diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 4bfe3aca..f050e6d1 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -34,4 +34,4 @@ jobs: - name: Publish to OpenVSX run: | - npx ovsx publish -p ${{ secrets.OPENVSX_TOKEN }} \ No newline at end of file + npx ovsx publish --no-dependencies -p ${{ secrets.OPENVSX_TOKEN }} \ No newline at end of file diff --git a/package.json b/package.json index dfd004f6..b37f93af 100644 --- a/package.json +++ b/package.json @@ -681,7 +681,7 @@ ] }, "scripts": { - "vscode:prepublish": "npm run build:ci && npm run compile", + "vscode:prepublish": "npm run build:webviews && npm run compile", "compile": "webpack", "watch": "webpack --watch", "package": "webpack --mode production --devtool hidden-source-map", diff --git a/src/activationHelpers/contextAware/miniIndex/indexes/search.ts b/src/activationHelpers/contextAware/miniIndex/indexes/search.ts index 440e26d9..fb030763 100644 --- a/src/activationHelpers/contextAware/miniIndex/indexes/search.ts +++ b/src/activationHelpers/contextAware/miniIndex/indexes/search.ts @@ -132,8 +132,8 @@ export function searchParallelVerses(translationPairsIndex: MiniSearch, sourceBi // Get source content from sourceBibleIndex const sourceResult = sourceBibleIndex.getStoredFields(result.vref); - const sourceContent = sourceResult ? sourceResult.content : ''; - + const sourceContent = sourceResult ? sourceResult.content as string : ''; + return { vref: result.vref, sourceVerse: { diff --git a/src/tsServer/spellCheck.ts b/src/tsServer/spellCheck.ts index f1d6625b..ef9c005e 100644 --- a/src/tsServer/spellCheck.ts +++ b/src/tsServer/spellCheck.ts @@ -175,6 +175,7 @@ export class SpellChecker { // FIXME: this should be an image hash return word.split('').reduce((acc, char) => acc + char.charCodeAt(0), 0).toString(); } +} export class SpellCheckDiagnosticsProvider { private spellChecker: SpellChecker; diff --git a/webviews/codex-webviews/package.json b/webviews/codex-webviews/package.json index a338519e..e0a8a108 100644 --- a/webviews/codex-webviews/package.json +++ b/webviews/codex-webviews/package.json @@ -5,9 +5,9 @@ "type": "module", "scripts": { "dev": "vite", - "build:ParallelView": "cross-env APP_NAME=ParallelView vite build", - "build:SemanticView": "cross-env APP_NAME=SemanticView vite build", - "build:TranslationNotesView": "cross-env APP_NAME=TranslationNotesView vite build", + "build:ParallelView": "npx cross-env APP_NAME=ParallelView vite build", + "build:SemanticView": "npx cross-env APP_NAME=SemanticView vite build", + "build:TranslationNotesView": "npx cross-env APP_NAME=TranslationNotesView vite build", "build:all": "npm run build:ParallelView && npm run build:TranslationNotesView && npm run build:SemanticView", "watch": "nodemon --watch src --ext ts,tsx --exec npm run build:all", "lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0", diff --git a/webviews/usfm-viewer/build/assets/App.js b/webviews/usfm-viewer/build/assets/App.js index 99f4f5c3..eada33ba 100644 --- a/webviews/usfm-viewer/build/assets/App.js +++ b/webviews/usfm-viewer/build/assets/App.js @@ -1,4 +1,4 @@ -var rc=Object.defineProperty;var lc=(e,n,t)=>n in e?rc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Ou=(e,n,t)=>(lc(e,typeof n!="symbol"?n+"":n,t),t);var Fd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Md(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:function(){return e[r]}})}),t}var Bi={exports:{}},br={},Hi={exports:{}},L={};/** +var tc=Object.defineProperty;var rc=(e,n,t)=>n in e?tc(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Ou=(e,n,t)=>rc(e,typeof n!="symbol"?n+"":n,t);var Fd=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Vi(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Md(e){if(e.__esModule)return e;var n=e.default;if(typeof n=="function"){var t=function r(){return this instanceof r?Reflect.construct(n,arguments,this.constructor):n.apply(this,arguments)};t.prototype=n.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var l=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,l.get?l:{enumerable:!0,get:function(){return e[r]}})}),t}var Bi={exports:{}},br={},Hi={exports:{}},L={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ var rc=Object.defineProperty;var lc=(e,n,t)=>n in e?rc(e,n,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Yt=Symbol.for("react.element"),oc=Symbol.for("react.portal"),uc=Symbol.for("react.fragment"),ic=Symbol.for("react.strict_mode"),sc=Symbol.for("react.profiler"),ac=Symbol.for("react.provider"),cc=Symbol.for("react.context"),fc=Symbol.for("react.forward_ref"),dc=Symbol.for("react.suspense"),pc=Symbol.for("react.memo"),mc=Symbol.for("react.lazy"),Du=Symbol.iterator;function vc(e){return e===null||typeof e!="object"?null:(e=Du&&e[Du]||e["@@iterator"],typeof e=="function"?e:null)}var Wi={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},Qi=Object.assign,Ki={};function lt(e,n,t){this.props=e,this.context=n,this.refs=Ki,this.updater=t||Wi}lt.prototype.isReactComponent={};lt.prototype.setState=function(e,n){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,n,"setState")};lt.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Yi(){}Yi.prototype=lt.prototype;function jo(e,n,t){this.props=e,this.context=n,this.refs=Ki,this.updater=t||Wi}var Uo=jo.prototype=new Yi;Uo.constructor=jo;Qi(Uo,lt.prototype);Uo.isPureReactComponent=!0;var Iu=Array.isArray,Xi=Object.prototype.hasOwnProperty,Ao={current:null},Gi={key:!0,ref:!0,__self:!0,__source:!0};function Zi(e,n,t){var r,l={},o=null,u=null;if(n!=null)for(r in n.ref!==void 0&&(u=n.ref),n.key!==void 0&&(o=""+n.key),n)Xi.call(n,r)&&!Gi.hasOwnProperty(r)&&(l[r]=n[r]);var i=arguments.length-2;if(i===1)l.children=t;else if(1n in e?rc(e,n,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Sc=ze,kc=Symbol.for("react.element"),Ec=Symbol.for("react.fragment"),Cc=Object.prototype.hasOwnProperty,_c=Sc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,xc={key:!0,ref:!0,__self:!0,__source:!0};function Ji(e,n,t){var r,l={},o=null,u=null;t!==void 0&&(o=""+t),n.key!==void 0&&(o=""+n.key),n.ref!==void 0&&(u=n.ref);for(r in n)Cc.call(n,r)&&!xc.hasOwnProperty(r)&&(l[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps,n)l[r]===void 0&&(l[r]=n[r]);return{$$typeof:kc,type:e,key:o,ref:u,props:l,_owner:_c.current}}br.Fragment=Ec;br.jsx=Ji;br.jsxs=Ji;Bi.exports=br;var Pc=Bi.exports,qi={exports:{}},ye={},bi={exports:{}},es={};/** + */var wc=ze,Sc=Symbol.for("react.element"),kc=Symbol.for("react.fragment"),Ec=Object.prototype.hasOwnProperty,Cc=wc.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,_c={key:!0,ref:!0,__self:!0,__source:!0};function qi(e,n,t){var r,l={},o=null,u=null;t!==void 0&&(o=""+t),n.key!==void 0&&(o=""+n.key),n.ref!==void 0&&(u=n.ref);for(r in n)Ec.call(n,r)&&!_c.hasOwnProperty(r)&&(l[r]=n[r]);if(e&&e.defaultProps)for(r in n=e.defaultProps,n)l[r]===void 0&&(l[r]=n[r]);return{$$typeof:Sc,type:e,key:o,ref:u,props:l,_owner:Cc.current}}br.Fragment=kc;br.jsx=qi;br.jsxs=qi;Bi.exports=br;var xc=Bi.exports,bi={exports:{}},ye={},es={exports:{}},ns={};/** * @license React * scheduler.production.min.js * @@ -22,7 +22,7 @@ var rc=Object.defineProperty;var lc=(e,n,t)=>n in e?rc(e,n,{enumerable:!0,config * * 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 n(C,N){var z=C.length;C.push(N);e:for(;0>>1,X=C[H];if(0>>1;Hl(yl,z))ynl(bt,yl)?(C[H]=bt,C[yn]=z,H=yn):(C[H]=yl,C[hn]=z,H=hn);else if(ynl(bt,z))C[H]=bt,C[yn]=z,H=yn;else break e}}return N}function l(C,N){var z=C.sortIndex-N.sortIndex;return z!==0?z:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,i=u.now();e.unstable_now=function(){return u.now()-i}}var s=[],c=[],v=1,m=null,p=3,g=!1,w=!1,S=!1,M=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var N=t(c);N!==null;){if(N.callback===null)r(c);else if(N.startTime<=C)r(c),N.sortIndex=N.expirationTime,n(s,N);else break;N=t(c)}}function h(C){if(S=!1,d(C),!w)if(t(s)!==null)w=!0,vl(E);else{var N=t(c);N!==null&&hl(h,N.startTime-C)}}function E(C,N){w=!1,S&&(S=!1,f(P),P=-1),g=!0;var z=p;try{for(d(N),m=t(s);m!==null&&(!(m.expirationTime>N)||C&&!xe());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var X=H(m.expirationTime<=N);N=e.unstable_now(),typeof X=="function"?m.callback=X:m===t(s)&&r(s),d(N)}else r(s);m=t(s)}if(m!==null)var qt=!0;else{var hn=t(c);hn!==null&&hl(h,hn.startTime-N),qt=!1}return qt}finally{m=null,p=z,g=!1}}var _=!1,x=null,P=-1,B=5,T=-1;function xe(){return!(e.unstable_now()-TC||125H?(C.sortIndex=z,n(c,C),t(s)===null&&C===t(c)&&(S?(f(P),P=-1):S=!0,hl(h,z-H))):(C.sortIndex=X,n(s,C),w||g||(w=!0,vl(E))),C},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(C){var N=p;return function(){var z=p;p=N;try{return C.apply(this,arguments)}finally{p=z}}}})(es);bi.exports=es;var Nc=bi.exports;/** + */(function(e){function n(C,N){var z=C.length;C.push(N);e:for(;0>>1,X=C[H];if(0>>1;Hl(yl,z))ynl(bt,yl)?(C[H]=bt,C[yn]=z,H=yn):(C[H]=yl,C[hn]=z,H=hn);else if(ynl(bt,z))C[H]=bt,C[yn]=z,H=yn;else break e}}return N}function l(C,N){var z=C.sortIndex-N.sortIndex;return z!==0?z:C.id-N.id}if(typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var u=Date,i=u.now();e.unstable_now=function(){return u.now()-i}}var s=[],c=[],v=1,m=null,p=3,g=!1,w=!1,S=!1,M=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var N=t(c);N!==null;){if(N.callback===null)r(c);else if(N.startTime<=C)r(c),N.sortIndex=N.expirationTime,n(s,N);else break;N=t(c)}}function h(C){if(S=!1,d(C),!w)if(t(s)!==null)w=!0,vl(E);else{var N=t(c);N!==null&&hl(h,N.startTime-C)}}function E(C,N){w=!1,S&&(S=!1,f(P),P=-1),g=!0;var z=p;try{for(d(N),m=t(s);m!==null&&(!(m.expirationTime>N)||C&&!xe());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var X=H(m.expirationTime<=N);N=e.unstable_now(),typeof X=="function"?m.callback=X:m===t(s)&&r(s),d(N)}else r(s);m=t(s)}if(m!==null)var qt=!0;else{var hn=t(c);hn!==null&&hl(h,hn.startTime-N),qt=!1}return qt}finally{m=null,p=z,g=!1}}var _=!1,x=null,P=-1,B=5,T=-1;function xe(){return!(e.unstable_now()-TC||125H?(C.sortIndex=z,n(c,C),t(s)===null&&C===t(c)&&(S?(f(P),P=-1):S=!0,hl(h,z-H))):(C.sortIndex=X,n(s,C),w||g||(w=!0,vl(E))),C},e.unstable_shouldYield=xe,e.unstable_wrapCallback=function(C){var N=p;return function(){var z=p;p=N;try{return C.apply(this,arguments)}finally{p=z}}}})(ns);es.exports=ns;var Pc=es.exports;/** * @license React * react-dom.production.min.js * @@ -30,11 +30,11 @@ var rc=Object.defineProperty;var lc=(e,n,t)=>n in e?rc(e,n,{enumerable:!0,config * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ns=ze,he=Nc;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wl=Object.prototype.hasOwnProperty,zc=/^[: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]*$/,Mu={},ju={};function Lc(e){return Wl.call(ju,e)?!0:Wl.call(Mu,e)?!1:zc.test(e)?ju[e]=!0:(Mu[e]=!0,!1)}function Tc(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Rc(e,n,t,r){if(n===null||typeof n>"u"||Tc(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ie(e,n,t,r,l,o,u){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=u}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new ie(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new ie(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){b[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){b[e]=new ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){b[e]=new ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){b[e]=new ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){b[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vo=/[\-:]([a-z])/g;function Bo(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 n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){b[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)});b.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){b[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ho(e,n,t,r){var l=b.hasOwnProperty(n)?b[n]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Wl=Object.prototype.hasOwnProperty,zc=/^[: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]*$/,Mu={},ju={};function Lc(e){return Wl.call(ju,e)?!0:Wl.call(Mu,e)?!1:zc.test(e)?ju[e]=!0:(Mu[e]=!0,!1)}function Tc(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Rc(e,n,t,r){if(n===null||typeof n>"u"||Tc(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ie(e,n,t,r,l,o,u){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=o,this.removeEmptyString=u}var b={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){b[e]=new ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];b[n]=new ie(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){b[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){b[e]=new ie(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){b[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){b[e]=new ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){b[e]=new ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){b[e]=new ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){b[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var Vo=/[\-:]([a-z])/g;function Bo(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 n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Vo,Bo);b[n]=new ie(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){b[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)});b.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){b[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ho(e,n,t,r){var l=b.hasOwnProperty(n)?b[n]:null;(l!==null?l.type!==0:r||!(2i||l[u]!==o[i]){var s=` `+l[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=u&&0<=i);break}}}finally{Sl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?yt(e):""}function Oc(e){switch(e.tag){case 5:return yt(e.type);case 16:return yt("Lazy");case 13:return yt("Suspense");case 19:return yt("SuspenseList");case 0:case 2:case 15:return e=kl(e.type,!1),e;case 11:return e=kl(e.type.render,!1),e;case 1:return e=kl(e.type,!0),e;default:return""}}function Xl(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 In:return"Fragment";case Dn:return"Portal";case Ql:return"Profiler";case Wo:return"StrictMode";case Kl:return"Suspense";case Yl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ls:return(e.displayName||"Context")+".Consumer";case rs:return(e._context.displayName||"Context")+".Provider";case Qo:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ko:return n=e.displayName||null,n!==null?n:Xl(e.type)||"Memo";case Ze:n=e._payload,e=e._init;try{return Xl(e(n))}catch{}}return null}function Dc(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Xl(n);case 8:return n===Wo?"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 n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function fn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function us(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Ic(e){var n=us(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,o=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,o.call(this,u)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function tr(e){e._valueTracker||(e._valueTracker=Ic(e))}function is(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=us(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Lr(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 Gl(e,n){var t=n.checked;return $({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function Au(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=fn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function ss(e,n){n=n.checked,n!=null&&Ho(e,"checked",n,!1)}function Zl(e,n){ss(e,n);var t=fn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Jl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Jl(e,n.type,fn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function $u(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Jl(e,n,t){(n!=="number"||Lr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var gt=Array.isArray;function Qn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=rr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function Rt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var kt={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},Fc=["Webkit","ms","Moz","O"];Object.keys(kt).forEach(function(e){Fc.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),kt[n]=kt[e]})});function ds(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||kt.hasOwnProperty(e)&&kt[e]?(""+n).trim():n+"px"}function ps(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=ds(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var Mc=$({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 eo(e,n){if(n){if(Mc[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function no(e,n){if(e.indexOf("-")===-1)return typeof n.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 to=null;function Yo(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ro=null,Kn=null,Yn=null;function Hu(e){if(e=Zt(e)){if(typeof ro!="function")throw Error(y(280));var n=e.stateNode;n&&(n=ll(n),ro(e.stateNode,e.type,n))}}function ms(e){Kn?Yn?Yn.push(e):Yn=[e]:Kn=e}function vs(){if(Kn){var e=Kn,n=Yn;if(Yn=Kn=null,Hu(e),n)for(e=0;e>>=0,e===0?32:31-(Yc(e)/Xc|0)|0}var lr=64,or=4194304;function wt(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 Dr(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,u=t&268435455;if(u!==0){var i=u&~l;i!==0?r=wt(i):(o&=u,o!==0&&(r=wt(o)))}else u=t&~l,u!==0?r=wt(u):o!==0&&(r=wt(o));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,o=n&-n,l>=o||l===16&&(o&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Xt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Re(n),e[n]=t}function qc(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=Ct),qu=" ",bu=!1;function Fs(e,n){switch(e){case"keyup":return Nf.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ms(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Fn=!1;function Lf(e,n){switch(e){case"compositionend":return Ms(n);case"keypress":return n.which!==32?null:(bu=!0,qu);case"textInput":return e=n.data,e===qu&&bu?null:e;default:return null}}function Tf(e,n){if(Fn)return e==="compositionend"||!nu&&Fs(e,n)?(e=Ds(),Sr=qo=en=null,Fn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=ri(t)}}function $s(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?$s(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Vs(){for(var e=window,n=Lr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Lr(e.document)}return n}function tu(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Af(e){var n=Vs(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&$s(t.ownerDocument.documentElement,t)){if(r!==null&&tu(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=li(t,o);var u=li(t,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Mn=null,ao=null,xt=null,co=!1;function oi(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;co||Mn==null||Mn!==Lr(r)||(r=Mn,"selectionStart"in r&&tu(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),xt&&jt(xt,r)||(xt=r,r=Mr(ao,"onSelect"),0An||(e.current=yo[An],yo[An]=null,An--)}function D(e,n){An++,yo[An]=e.current,e.current=n}var dn={},re=mn(dn),ce=mn(!1),xn=dn;function qn(e,n){var t=e.type.contextTypes;if(!t)return dn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function fe(e){return e=e.childContextTypes,e!=null}function Ur(){F(ce),F(re)}function di(e,n,t){if(re.current!==dn)throw Error(y(168));D(re,n),D(ce,t)}function Zs(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,Dc(e)||"Unknown",l));return $({},t,r)}function Ar(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dn,xn=re.current,D(re,e),D(ce,ce.current),!0}function pi(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=Zs(e,n,xn),r.__reactInternalMemoizedMergedChildContext=e,F(ce),F(re),D(re,e)):F(ce),D(ce,t)}var $e=null,ol=!1,Fl=!1;function Js(e){$e===null?$e=[e]:$e.push(e)}function Jf(e){ol=!0,Js(e)}function vn(){if(!Fl&&$e!==null){Fl=!0;var e=0,n=O;try{var t=$e;for(O=1;e>=u,l-=u,Ve=1<<32-Re(n)+l|t<P?(B=x,x=null):B=x.sibling;var T=p(f,x,d[P],h);if(T===null){x===null&&(x=B);break}e&&x&&T.alternate===null&&n(f,x),a=o(T,a,P),_===null?E=T:_.sibling=T,_=T,x=B}if(P===d.length)return t(f,x),j&&gn(f,P),E;if(x===null){for(;PP?(B=x,x=null):B=x.sibling;var xe=p(f,x,T.value,h);if(xe===null){x===null&&(x=B);break}e&&x&&xe.alternate===null&&n(f,x),a=o(xe,a,P),_===null?E=xe:_.sibling=xe,_=xe,x=B}if(T.done)return t(f,x),j&&gn(f,P),E;if(x===null){for(;!T.done;P++,T=d.next())T=m(f,T.value,h),T!==null&&(a=o(T,a,P),_===null?E=T:_.sibling=T,_=T);return j&&gn(f,P),E}for(x=r(f,x);!T.done;P++,T=d.next())T=g(x,f,P,T.value,h),T!==null&&(e&&T.alternate!==null&&x.delete(T.key===null?P:T.key),a=o(T,a,P),_===null?E=T:_.sibling=T,_=T);return e&&x.forEach(function(it){return n(f,it)}),j&&gn(f,P),E}function M(f,a,d,h){if(typeof d=="object"&&d!==null&&d.type===In&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case nr:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===In){if(_.tag===7){t(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ze&&Si(E)===_.type){t(f,_.sibling),a=l(_,d.props),a.ref=mt(f,_,d),a.return=f,f=a;break e}t(f,_);break}else n(f,_);_=_.sibling}d.type===In?(a=_n(d.props.children,f.mode,h,d.key),a.return=f,f=a):(h=zr(d.type,d.key,d.props,null,f.mode,h),h.ref=mt(f,a,d),h.return=f,f=h)}return u(f);case Dn:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=Hl(d,f.mode,h),a.return=f,f=a}return u(f);case Ze:return _=d._init,M(f,a,_(d._payload),h)}if(gt(d))return w(f,a,d,h);if(at(d))return S(f,a,d,h);dr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=Bl(d,f.mode,h),a.return=f,f=a),u(f)):t(f,a)}return M}var et=oa(!0),ua=oa(!1),Jt={},Ue=mn(Jt),Vt=mn(Jt),Bt=mn(Jt);function En(e){if(e===Jt)throw Error(y(174));return e}function fu(e,n){switch(D(Bt,n),D(Vt,e),D(Ue,Jt),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:bl(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=bl(n,e)}F(Ue),D(Ue,n)}function nt(){F(Ue),F(Vt),F(Bt)}function ia(e){En(Bt.current);var n=En(Ue.current),t=bl(n,e.type);n!==t&&(D(Vt,e),D(Ue,t))}function du(e){Vt.current===e&&(F(Ue),F(Vt))}var U=mn(0);function Qr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Ml=[];function pu(){for(var e=0;et?t:4,e(!0);var r=jl.transition;jl.transition={};try{e(!1),n()}finally{O=t,jl.transition=r}}function Ca(){return _e().memoizedState}function nd(e,n,t){var r=an(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},_a(e))xa(n,t);else if(t=na(e,n,t,r),t!==null){var l=oe();Oe(t,e,r,l),Pa(t,n,r)}}function td(e,n,t){var r=an(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(_a(e))xa(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var u=n.lastRenderedState,i=o(u,t);if(l.hasEagerState=!0,l.eagerState=i,De(i,u)){var s=n.interleaved;s===null?(l.next=l,au(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=na(e,n,l,r),t!==null&&(l=oe(),Oe(t,e,r,l),Pa(t,n,r))}}function _a(e){var n=e.alternate;return e===A||n!==null&&n===A}function xa(e,n){Pt=Kr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Pa(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Go(e,t)}}var Yr={readContext:Ce,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useInsertionEffect:ee,useLayoutEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useMutableSource:ee,useSyncExternalStore:ee,useId:ee,unstable_isNewReconciler:!1},rd={readContext:Ce,useCallback:function(e,n){return Fe().memoizedState=[e,n===void 0?null:n],e},useContext:Ce,useEffect:Ei,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,_r(4194308,4,ga.bind(null,n,e),t)},useLayoutEffect:function(e,n){return _r(4194308,4,e,n)},useInsertionEffect:function(e,n){return _r(4,2,e,n)},useMemo:function(e,n){var t=Fe();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Fe();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=nd.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var n=Fe();return e={current:e},n.memoizedState=e},useState:ki,useDebugValue:gu,useDeferredValue:function(e){return Fe().memoizedState=e},useTransition:function(){var e=ki(!1),n=e[0];return e=ed.bind(null,e[1]),Fe().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=A,l=Fe();if(j){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),Z===null)throw Error(y(349));Nn&30||ca(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,Ei(da.bind(null,r,o,e),[e]),r.flags|=2048,Qt(9,fa.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Fe(),n=Z.identifierPrefix;if(j){var t=Be,r=Ve;t=(r&~(1<<32-Re(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Ht++,0An||(e.current=yo[An],yo[An]=null,An--)}function D(e,n){An++,yo[An]=e.current,e.current=n}var dn={},re=mn(dn),ce=mn(!1),xn=dn;function qn(e,n){var t=e.type.contextTypes;if(!t)return dn;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in t)l[o]=n[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function fe(e){return e=e.childContextTypes,e!=null}function Ur(){F(ce),F(re)}function di(e,n,t){if(re.current!==dn)throw Error(y(168));D(re,n),D(ce,t)}function Zs(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,Dc(e)||"Unknown",l));return $({},t,r)}function Ar(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||dn,xn=re.current,D(re,e),D(ce,ce.current),!0}function pi(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=Zs(e,n,xn),r.__reactInternalMemoizedMergedChildContext=e,F(ce),F(re),D(re,e)):F(ce),D(ce,t)}var $e=null,ol=!1,Fl=!1;function Js(e){$e===null?$e=[e]:$e.push(e)}function Jf(e){ol=!0,Js(e)}function vn(){if(!Fl&&$e!==null){Fl=!0;var e=0,n=O;try{var t=$e;for(O=1;e>=u,l-=u,Ve=1<<32-Re(n)+l|t<P?(B=x,x=null):B=x.sibling;var T=p(f,x,d[P],h);if(T===null){x===null&&(x=B);break}e&&x&&T.alternate===null&&n(f,x),a=o(T,a,P),_===null?E=T:_.sibling=T,_=T,x=B}if(P===d.length)return t(f,x),j&&gn(f,P),E;if(x===null){for(;PP?(B=x,x=null):B=x.sibling;var xe=p(f,x,T.value,h);if(xe===null){x===null&&(x=B);break}e&&x&&xe.alternate===null&&n(f,x),a=o(xe,a,P),_===null?E=xe:_.sibling=xe,_=xe,x=B}if(T.done)return t(f,x),j&&gn(f,P),E;if(x===null){for(;!T.done;P++,T=d.next())T=m(f,T.value,h),T!==null&&(a=o(T,a,P),_===null?E=T:_.sibling=T,_=T);return j&&gn(f,P),E}for(x=r(f,x);!T.done;P++,T=d.next())T=g(x,f,P,T.value,h),T!==null&&(e&&T.alternate!==null&&x.delete(T.key===null?P:T.key),a=o(T,a,P),_===null?E=T:_.sibling=T,_=T);return e&&x.forEach(function(it){return n(f,it)}),j&&gn(f,P),E}function M(f,a,d,h){if(typeof d=="object"&&d!==null&&d.type===In&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case nr:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===In){if(_.tag===7){t(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ze&&hi(E)===_.type){t(f,_.sibling),a=l(_,d.props),a.ref=mt(f,_,d),a.return=f,f=a;break e}t(f,_);break}else n(f,_);_=_.sibling}d.type===In?(a=_n(d.props.children,f.mode,h,d.key),a.return=f,f=a):(h=zr(d.type,d.key,d.props,null,f.mode,h),h.ref=mt(f,a,d),h.return=f,f=h)}return u(f);case Dn:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){t(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{t(f,a);break}else n(f,a);a=a.sibling}a=Hl(d,f.mode,h),a.return=f,f=a}return u(f);case Ze:return _=d._init,M(f,a,_(d._payload),h)}if(gt(d))return w(f,a,d,h);if(at(d))return S(f,a,d,h);dr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(t(f,a.sibling),a=l(a,d),a.return=f,f=a):(t(f,a),a=Bl(d,f.mode,h),a.return=f,f=a),u(f)):t(f,a)}return M}var et=na(!0),ta=na(!1),Br=mn(null),Hr=null,Bn=null,uu=null;function iu(){uu=Bn=Hr=null}function su(e){var n=Br.current;F(Br),e._currentValue=n}function So(e,n,t){for(;e!==null;){var r=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,r!==null&&(r.childLanes|=n)):r!==null&&(r.childLanes&n)!==n&&(r.childLanes|=n),e===t)break;e=e.return}}function Gn(e,n){Hr=e,uu=Bn=null,e=e.dependencies,e!==null&&e.firstContext!==null&&(e.lanes&n&&(ae=!0),e.firstContext=null)}function Ce(e){var n=e._currentValue;if(uu!==e)if(e={context:e,memoizedValue:n,next:null},Bn===null){if(Hr===null)throw Error(y(308));Bn=e,Hr.dependencies={lanes:0,firstContext:e}}else Bn=Bn.next=e;return n}var kn=null;function au(e){kn===null?kn=[e]:kn.push(e)}function ra(e,n,t,r){var l=n.interleaved;return l===null?(t.next=t,au(n)):(t.next=l.next,l.next=t),n.interleaved=t,Ke(e,r)}function Ke(e,n){e.lanes|=n;var t=e.alternate;for(t!==null&&(t.lanes|=n),t=e,e=e.return;e!==null;)e.childLanes|=n,t=e.alternate,t!==null&&(t.childLanes|=n),t=e,e=e.return;return t.tag===3?t.stateNode:null}var Je=!1;function cu(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function la(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function He(e,n){return{eventTime:e,lane:n,tag:0,payload:null,callback:null,next:null}}function un(e,n,t){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,R&2){var l=r.pending;return l===null?n.next=n:(n.next=l.next,l.next=n),r.pending=n,Ke(e,t)}return l=r.interleaved,l===null?(n.next=n,au(r)):(n.next=l.next,l.next=n),r.interleaved=n,Ke(e,t)}function Er(e,n,t){if(n=n.updateQueue,n!==null&&(n=n.shared,(t&4194240)!==0)){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Go(e,t)}}function yi(e,n){var t=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,t===r)){var l=null,o=null;if(t=t.firstBaseUpdate,t!==null){do{var u={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};o===null?l=o=u:o=o.next=u,t=t.next}while(t!==null);o===null?l=o=n:o=o.next=n}else l=o=n;t={baseState:r.baseState,firstBaseUpdate:l,lastBaseUpdate:o,shared:r.shared,effects:r.effects},e.updateQueue=t;return}e=t.lastBaseUpdate,e===null?t.firstBaseUpdate=n:e.next=n,t.lastBaseUpdate=n}function Wr(e,n,t,r){var l=e.updateQueue;Je=!1;var o=l.firstBaseUpdate,u=l.lastBaseUpdate,i=l.shared.pending;if(i!==null){l.shared.pending=null;var s=i,c=s.next;s.next=null,u===null?o=c:u.next=c,u=s;var v=e.alternate;v!==null&&(v=v.updateQueue,i=v.lastBaseUpdate,i!==u&&(i===null?v.firstBaseUpdate=c:i.next=c,v.lastBaseUpdate=s))}if(o!==null){var m=l.baseState;u=0,v=c=s=null,i=o;do{var p=i.lane,g=i.eventTime;if((r&p)===p){v!==null&&(v=v.next={eventTime:g,lane:0,tag:i.tag,payload:i.payload,callback:i.callback,next:null});e:{var w=e,S=i;switch(p=n,g=t,S.tag){case 1:if(w=S.payload,typeof w=="function"){m=w.call(g,m,p);break e}m=w;break e;case 3:w.flags=w.flags&-65537|128;case 0:if(w=S.payload,p=typeof w=="function"?w.call(g,m,p):w,p==null)break e;m=$({},m,p);break e;case 2:Je=!0}}i.callback!==null&&i.lane!==0&&(e.flags|=64,p=l.effects,p===null?l.effects=[i]:p.push(i))}else g={eventTime:g,lane:p,tag:i.tag,payload:i.payload,callback:i.callback,next:null},v===null?(c=v=g,s=m):v=v.next=g,u|=p;if(i=i.next,i===null){if(i=l.shared.pending,i===null)break;p=i,i=p.next,p.next=null,l.lastBaseUpdate=p,l.shared.pending=null}}while(!0);if(v===null&&(s=m),l.baseState=s,l.firstBaseUpdate=c,l.lastBaseUpdate=v,n=l.shared.interleaved,n!==null){l=n;do u|=l.lane,l=l.next;while(l!==n)}else o===null&&(l.shared.lanes=0);zn|=u,e.lanes=u,e.memoizedState=m}}function gi(e,n,t){if(e=n.effects,n.effects=null,e!==null)for(n=0;nt?t:4,e(!0);var r=jl.transition;jl.transition={};try{e(!1),n()}finally{O=t,jl.transition=r}}function ka(){return _e().memoizedState}function nd(e,n,t){var r=an(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Ea(e))Ca(n,t);else if(t=ra(e,n,t,r),t!==null){var l=oe();Oe(t,e,r,l),_a(t,n,r)}}function td(e,n,t){var r=an(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Ea(e))Ca(n,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=n.lastRenderedReducer,o!==null))try{var u=n.lastRenderedState,i=o(u,t);if(l.hasEagerState=!0,l.eagerState=i,De(i,u)){var s=n.interleaved;s===null?(l.next=l,au(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=ra(e,n,l,r),t!==null&&(l=oe(),Oe(t,e,r,l),_a(t,n,r))}}function Ea(e){var n=e.alternate;return e===A||n!==null&&n===A}function Ca(e,n){Pt=Kr=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function _a(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Go(e,t)}}var Yr={readContext:Ce,useCallback:ee,useContext:ee,useEffect:ee,useImperativeHandle:ee,useInsertionEffect:ee,useLayoutEffect:ee,useMemo:ee,useReducer:ee,useRef:ee,useState:ee,useDebugValue:ee,useDeferredValue:ee,useTransition:ee,useMutableSource:ee,useSyncExternalStore:ee,useId:ee,unstable_isNewReconciler:!1},rd={readContext:Ce,useCallback:function(e,n){return Fe().memoizedState=[e,n===void 0?null:n],e},useContext:Ce,useEffect:Si,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,_r(4194308,4,ha.bind(null,n,e),t)},useLayoutEffect:function(e,n){return _r(4194308,4,e,n)},useInsertionEffect:function(e,n){return _r(4,2,e,n)},useMemo:function(e,n){var t=Fe();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=Fe();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=nd.bind(null,A,e),[r.memoizedState,e]},useRef:function(e){var n=Fe();return e={current:e},n.memoizedState=e},useState:wi,useDebugValue:gu,useDeferredValue:function(e){return Fe().memoizedState=e},useTransition:function(){var e=wi(!1),n=e[0];return e=ed.bind(null,e[1]),Fe().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=A,l=Fe();if(j){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),Z===null)throw Error(y(349));Nn&30||sa(r,n,t)}l.memoizedState=t;var o={value:t,getSnapshot:n};return l.queue=o,Si(ca.bind(null,r,o,e),[e]),r.flags|=2048,Qt(9,aa.bind(null,r,o,t,n),void 0,null),t},useId:function(){var e=Fe(),n=Z.identifierPrefix;if(j){var t=Be,r=Ve;t=(r&~(1<<32-Re(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Ht++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[Me]=n,e[$t]=r,Fa(e,n,!1,!1),n.stateNode=e;e:{switch(u=no(t,r),t){case"dialog":I("cancel",e),I("close",e),l=r;break;case"iframe":case"object":case"embed":I("load",e),l=r;break;case"video":case"audio":for(l=0;lrt&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304)}else{if(!r)if(e=Qr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),vt(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!j)return ne(n),null}else 2*W()-o.renderingStartTime>rt&&t!==1073741824&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304);o.isBackwards?(u.sibling=n.child,n.child=u):(t=o.last,t!==null?t.sibling=u:n.child=u,o.last=u)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=W(),n.sibling=null,t=U.current,D(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return _u(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?pe&1073741824&&(ne(n),n.subtreeFlags&6&&(n.flags|=8192)):ne(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function fd(e,n){switch(lu(n),n.tag){case 1:return fe(n.type)&&Ur(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return nt(),F(ce),F(re),pu(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return du(n),null;case 13:if(F(U),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));bn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(U),null;case 4:return nt(),null;case 10:return su(n.type._context),null;case 22:case 23:return _u(),null;case 24:return null;default:return null}}var mr=!1,te=!1,dd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Hn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){V(e,n,r)}else t.current=null}function Lo(e,n,t){try{t()}catch(r){V(e,n,r)}}var Ri=!1;function pd(e,n){if(fo=Ir,e=Vs(),tu(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var u=0,i=-1,s=-1,c=0,v=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(i=u+l),m!==o||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++c===l&&(i=u),p===o&&++v===r&&(s=u),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=i===-1||s===-1?null:{start:i,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(po={focusedElem:e,selectionRange:t},Ir=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,M=w.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?S:Ne(n.type,S),M);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(h){V(n,n.return,h)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return w=Ri,Ri=!1,w}function Nt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Lo(n,t,o)}l=l.next}while(l!==r)}}function sl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function To(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function Ua(e){var n=e.alternate;n!==null&&(e.alternate=null,Ua(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Me],delete n[$t],delete n[ho],delete n[Gf],delete n[Zf])),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 Aa(e){return e.tag===5||e.tag===3||e.tag===4}function Oi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Aa(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 Ro(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=jr));else if(r!==4&&(e=e.child,e!==null))for(Ro(e,n,t),e=e.sibling;e!==null;)Ro(e,n,t),e=e.sibling}function Oo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Oo(e,n,t),e=e.sibling;e!==null;)Oo(e,n,t),e=e.sibling}var J=null,Le=!1;function Ge(e,n,t){for(t=t.child;t!==null;)$a(e,n,t),t=t.sibling}function $a(e,n,t){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(el,t)}catch{}switch(t.tag){case 5:te||Hn(t,n);case 6:var r=J,l=Le;J=null,Ge(e,n,t),J=r,Le=l,J!==null&&(Le?(e=J,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):J.removeChild(t.stateNode));break;case 18:J!==null&&(Le?(e=J,t=t.stateNode,e.nodeType===8?Il(e.parentNode,t):e.nodeType===1&&Il(e,t),Ft(e)):Il(J,t.stateNode));break;case 4:r=J,l=Le,J=t.stateNode.containerInfo,Le=!0,Ge(e,n,t),J=r,Le=l;break;case 0:case 11:case 14:case 15:if(!te&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&(o&2||o&4)&&Lo(t,n,u),l=l.next}while(l!==r)}Ge(e,n,t);break;case 1:if(!te&&(Hn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(i){V(t,n,i)}Ge(e,n,t);break;case 21:Ge(e,n,t);break;case 22:t.mode&1?(te=(r=te)||t.memoizedState!==null,Ge(e,n,t),te=r):Ge(e,n,t);break;default:Ge(e,n,t)}}function Di(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new dd),n.forEach(function(r){var l=Ed.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Pe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~o}if(r=l,r=W()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Zr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var o=k,u=o.child;if(k.flags&16){var i=o.deletions;if(i!==null){for(var s=0;sW()-Eu?Cn(e,0):ku|=t),de(e,n)}function Xa(e,n){n===0&&(e.mode&1?(n=or,or<<=1,!(or&130023424)&&(or=4194304)):n=1);var t=oe();e=Ke(e,n),e!==null&&(Xt(e,n,t),de(e,t))}function kd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Xa(e,t)}function Ed(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),Xa(e,t)}var Ga;Ga=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||ce.current)ae=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ae=!1,ad(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&qs(n,Vr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;xr(e,n),e=n.pendingProps;var l=qn(n,re.current);Gn(n,t),l=vu(null,n,r,e,l,t);var o=hu();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,fe(r)?(o=!0,Ar(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,cu(n),l.updater=ul,n.stateNode=l,l._reactInternals=n,Eo(n,r,e,t),n=xo(null,n,r,!0,o,t)):(n.tag=0,j&&o&&ru(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(xr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=_d(r),e=Ne(r,e),l){case 0:n=_o(null,n,r,e,t);break e;case 1:n=zi(null,n,r,e,t);break e;case 11:n=Pi(null,n,r,e,t);break e;case 14:n=Ni(null,n,r,Ne(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_o(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),zi(e,n,r,l,t);case 3:e:{if(Oa(n),e===null)throw Error(y(387));r=n.pendingProps,o=n.memoizedState,l=o.element,ta(e,n),Wr(n,r,null,t);var u=n.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=tt(Error(y(423)),n),n=Li(e,n,r,t,l);break e}else if(r!==l){l=tt(Error(y(424)),n),n=Li(e,n,r,t,l);break e}else for(me=on(n.stateNode.containerInfo.firstChild),ve=n,j=!0,Te=null,t=ua(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(bn(),r===l){n=Ye(e,n,t);break e}le(e,n,r,t)}n=n.child}return n;case 5:return ia(n),e===null&&wo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,mo(r,l)?u=null:o!==null&&mo(r,o)&&(n.flags|=32),Ra(e,n),le(e,n,u,t),n.child;case 6:return e===null&&wo(n),null;case 13:return Da(e,n,t);case 4:return fu(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=et(n,null,r,t):le(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Pi(e,n,r,l,t);case 7:return le(e,n,n.pendingProps,t),n.child;case 8:return le(e,n,n.pendingProps.children,t),n.child;case 12:return le(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,u=l.value,D(Br,r._currentValue),r._currentValue=u,o!==null)if(De(o.value,u)){if(o.children===l.children&&!ce.current){n=Ye(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var i=o.dependencies;if(i!==null){u=o.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=He(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var v=c.pending;v===null?s.next=s:(s.next=v.next,v.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),So(o.return,t,n),i.lanes|=t;break}s=s.next}}else if(o.tag===10)u=o.type===n.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(y(341));u.lanes|=t,i=u.alternate,i!==null&&(i.lanes|=t),So(u,t,n),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===n){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}le(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Gn(n,t),l=Ce(l),r=r(l),n.flags|=1,le(e,n,r,t),n.child;case 14:return r=n.type,l=Ne(r,n.pendingProps),l=Ne(r.type,l),Ni(e,n,r,l,t);case 15:return La(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),xr(e,n),n.tag=1,fe(r)?(e=!0,Ar(n)):e=!1,Gn(n,t),la(n,r,l),Eo(n,r,l,t),xo(null,n,r,!0,e,t);case 19:return Ia(e,n,t);case 22:return Ta(e,n,t)}throw Error(y(156,n.tag))};function Za(e,n){return Es(e,n)}function Cd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ke(e,n,t,r){return new Cd(e,n,t,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _d(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qo)return 11;if(e===Ko)return 14}return 2}function cn(e,n){var t=e.alternate;return t===null?(t=ke(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function zr(e,n,t,r,l,o){var u=2;if(r=e,typeof e=="function")Pu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case In:return _n(t.children,l,o,n);case Wo:u=8,l|=8;break;case Ql:return e=ke(12,t,n,l|2),e.elementType=Ql,e.lanes=o,e;case Kl:return e=ke(13,t,n,l),e.elementType=Kl,e.lanes=o,e;case Yl:return e=ke(19,t,n,l),e.elementType=Yl,e.lanes=o,e;case os:return cl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rs:u=10;break e;case ls:u=9;break e;case Qo:u=11;break e;case Ko:u=14;break e;case Ze:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=ke(u,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function _n(e,n,t,r){return e=ke(7,e,r,n),e.lanes=t,e}function cl(e,n,t,r){return e=ke(22,e,r,n),e.elementType=os,e.lanes=t,e.stateNode={isHidden:!1},e}function Bl(e,n,t){return e=ke(6,e,null,n),e.lanes=t,e}function Hl(e,n,t){return n=ke(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function xd(e,n,t,r,l){this.tag=n,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=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Nu(e,n,t,r,l,o,u,i,s){return e=new xd(e,n,t,i,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=ke(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(o),e}function Pd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ec)}catch(e){console.error(e)}}ec(),qi.exports=ye;var Rd=qi.exports;const Ud=Vi(Rd);var nc=(e=>(e.showDialog="showDialog",e.save="save",e.openFile="openFile",e.OPEN_RESOURCE="openResource",e.createProject="createProject",e.createObsProject="createObsProject",e.openStory="openStory",e.DOWNLOAD_RESOURCE="downloadResource",e.SYNC_DOWNLOADED_RESOURCES="syncDownloadedResources",e.TEST_MESSAGE="testMessage",e.SEARCH_QUERY="searchQuery",e.SEARCH_RESULTS="searchResults",e.SCROLL_TO_CHAPTER="scrollToChapter",e.UPDATE_CHAPTER="updateChapter",e.BLOCK_CLICK="blockClick",e.SEND_BOOKS_IN_WORKSPACE="sendBooksInWorkspace",e.BOOKS_IN_WORKSPACE_RESPONSE="booksInWorkspaceResponse",e.OPEN_USFM_FILE="openUsfmFile",e.GET_USFM="get-usfm",e))(nc||{});class Od{constructor(){Ou(this,"vsCodeApi");typeof acquireVsCodeApi=="function"&&(this.vsCodeApi=acquireVsCodeApi())}postMessage(n){this.vsCodeApi&&this.vsCodeApi.postMessage(n)}setMessageListeners(n){console.log("in setmessage listeners"),this.vsCodeApi?window.addEventListener("message",n||(t=>{switch(t.data.type){case nc.showDialog:return}})):console.error("NO VSCODE API FOUND")}getState(){if(this.vsCodeApi)return this.vsCodeApi.getState();{const n=localStorage.getItem("vscodeState");return n?JSON.parse(n):void 0}}setState(n){return this.vsCodeApi?this.vsCodeApi.setState(n):(localStorage.setItem("vscodeState",JSON.stringify(n)),n)}}const Ad=new Od,Dd=ze.createContext({});function $d({children:e}){const[n,t]=ze.useState("GEN"),[r,l]=ze.useState([]),[o,u]=ze.useState(0),[i,s]=ze.useState(1),[c,v]=ze.useState(1),[m,p]=ze.useState(!1),[g,w]=ze.useState(!1),S={state:{selectedBook:n,bookChapters:r,verseCount:o,selectedChapter:i,selectedVerse:c,showChapterList:m,showVerseList:g},actions:{setSelectedBook:t,setBookChapters:l,setVerseCount:u,setSelectedChapter:s,setSelectedVerse:v,setShowChapterList:p,setShowVerseList:w}};return Pc.jsx(Dd.Provider,{value:S,children:e})}export{nc as M,jd as R,$d as a,Ud as b,Fd as c,Dd as d,Rd as e,Md as g,Pc as j,ze as r,Ad as v}; +`+o.stack}return{value:e,source:n,stack:l,digest:null}}function $l(e,n,t){return{value:e,source:null,stack:t??null,digest:n??null}}function Co(e,n){try{console.error(n.value)}catch(t){setTimeout(function(){throw t})}}var ud=typeof WeakMap=="function"?WeakMap:Map;function Pa(e,n,t){t=He(-1,t),t.tag=3,t.payload={element:null};var r=n.value;return t.callback=function(){Gr||(Gr=!0,Do=r),Co(e,n)},t}function Na(e,n,t){t=He(-1,t),t.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=n.value;t.payload=function(){return r(l)},t.callback=function(){Co(e,n)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(t.callback=function(){Co(e,n),typeof r!="function"&&(sn===null?sn=new Set([this]):sn.add(this));var u=n.stack;this.componentDidCatch(n.value,{componentStack:u!==null?u:""})}),t}function Ci(e,n,t){var r=e.pingCache;if(r===null){r=e.pingCache=new ud;var l=new Set;r.set(n,l)}else l=r.get(n),l===void 0&&(l=new Set,r.set(n,l));l.has(t)||(l.add(t),e=Sd.bind(null,e,n,t),n.then(e,e))}function _i(e){do{var n;if((n=e.tag===13)&&(n=e.memoizedState,n=n!==null?n.dehydrated!==null:!0),n)return e;e=e.return}while(e!==null);return null}function xi(e,n,t,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===n?e.flags|=65536:(e.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(n=He(-1,1),n.tag=2,un(t,n,1))),t.lanes|=1),e)}var id=Xe.ReactCurrentOwner,ae=!1;function le(e,n,t,r){n.child=e===null?ta(n,null,t,r):et(n,e.child,t,r)}function Pi(e,n,t,r,l){t=t.render;var o=n.ref;return Gn(n,l),r=vu(e,n,t,r,o,l),t=hu(),e!==null&&!ae?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ye(e,n,l)):(j&&t&&ru(n),n.flags|=1,le(e,n,r,l),n.child)}function Ni(e,n,t,r,l){if(e===null){var o=t.type;return typeof o=="function"&&!Pu(o)&&o.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(n.tag=15,n.type=o,za(e,n,o,r,l)):(e=zr(t.type,null,r,n,n.mode,l),e.ref=n.ref,e.return=n,n.child=e)}if(o=e.child,!(e.lanes&l)){var u=o.memoizedProps;if(t=t.compare,t=t!==null?t:jt,t(u,r)&&e.ref===n.ref)return Ye(e,n,l)}return n.flags|=1,e=cn(o,r),e.ref=n.ref,e.return=n,n.child=e}function za(e,n,t,r,l){if(e!==null){var o=e.memoizedProps;if(jt(o,r)&&e.ref===n.ref)if(ae=!1,n.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(ae=!0);else return n.lanes=e.lanes,Ye(e,n,l)}return _o(e,n,t,r,l)}function La(e,n,t){var r=n.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(n.mode&1))n.memoizedState={baseLanes:0,cachePool:null,transitions:null},D(Wn,pe),pe|=t;else{if(!(t&1073741824))return e=o!==null?o.baseLanes|t:t,n.lanes=n.childLanes=1073741824,n.memoizedState={baseLanes:e,cachePool:null,transitions:null},n.updateQueue=null,D(Wn,pe),pe|=e,null;n.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:t,D(Wn,pe),pe|=r}else o!==null?(r=o.baseLanes|t,n.memoizedState=null):r=t,D(Wn,pe),pe|=r;return le(e,n,l,t),n.child}function Ta(e,n){var t=n.ref;(e===null&&t!==null||e!==null&&e.ref!==t)&&(n.flags|=512,n.flags|=2097152)}function _o(e,n,t,r,l){var o=fe(t)?xn:re.current;return o=qn(n,o),Gn(n,l),t=vu(e,n,t,r,o,l),r=hu(),e!==null&&!ae?(n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l,Ye(e,n,l)):(j&&r&&ru(n),n.flags|=1,le(e,n,t,l),n.child)}function zi(e,n,t,r,l){if(fe(t)){var o=!0;Ar(n)}else o=!1;if(Gn(n,l),n.stateNode===null)xr(e,n),xa(n,t,r),Eo(n,t,r,l),r=!0;else if(e===null){var u=n.stateNode,i=n.memoizedProps;u.props=i;var s=u.context,c=t.contextType;typeof c=="object"&&c!==null?c=Ce(c):(c=fe(t)?xn:re.current,c=qn(n,c));var v=t.getDerivedStateFromProps,m=typeof v=="function"||typeof u.getSnapshotBeforeUpdate=="function";m||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==r||s!==c)&&Ei(n,u,r,c),Je=!1;var p=n.memoizedState;u.state=p,Wr(n,r,u,l),s=n.memoizedState,i!==r||p!==s||ce.current||Je?(typeof v=="function"&&(ko(n,t,v,r),s=n.memoizedState),(i=Je||ki(n,t,i,r,p,s,c))?(m||typeof u.UNSAFE_componentWillMount!="function"&&typeof u.componentWillMount!="function"||(typeof u.componentWillMount=="function"&&u.componentWillMount(),typeof u.UNSAFE_componentWillMount=="function"&&u.UNSAFE_componentWillMount()),typeof u.componentDidMount=="function"&&(n.flags|=4194308)):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=r,n.memoizedState=s),u.props=r,u.state=s,u.context=c,r=i):(typeof u.componentDidMount=="function"&&(n.flags|=4194308),r=!1)}else{u=n.stateNode,la(e,n),i=n.memoizedProps,c=n.type===n.elementType?i:Ne(n.type,i),u.props=c,m=n.pendingProps,p=u.context,s=t.contextType,typeof s=="object"&&s!==null?s=Ce(s):(s=fe(t)?xn:re.current,s=qn(n,s));var g=t.getDerivedStateFromProps;(v=typeof g=="function"||typeof u.getSnapshotBeforeUpdate=="function")||typeof u.UNSAFE_componentWillReceiveProps!="function"&&typeof u.componentWillReceiveProps!="function"||(i!==m||p!==s)&&Ei(n,u,r,s),Je=!1,p=n.memoizedState,u.state=p,Wr(n,r,u,l);var w=n.memoizedState;i!==m||p!==w||ce.current||Je?(typeof g=="function"&&(ko(n,t,g,r),w=n.memoizedState),(c=Je||ki(n,t,c,r,p,w,s)||!1)?(v||typeof u.UNSAFE_componentWillUpdate!="function"&&typeof u.componentWillUpdate!="function"||(typeof u.componentWillUpdate=="function"&&u.componentWillUpdate(r,w,s),typeof u.UNSAFE_componentWillUpdate=="function"&&u.UNSAFE_componentWillUpdate(r,w,s)),typeof u.componentDidUpdate=="function"&&(n.flags|=4),typeof u.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),n.memoizedProps=r,n.memoizedState=w),u.props=r,u.state=w,u.context=s,r=c):(typeof u.componentDidUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=4),typeof u.getSnapshotBeforeUpdate!="function"||i===e.memoizedProps&&p===e.memoizedState||(n.flags|=1024),r=!1)}return xo(e,n,t,r,o,l)}function xo(e,n,t,r,l,o){Ta(e,n);var u=(n.flags&128)!==0;if(!r&&!u)return l&&pi(n,t,!1),Ye(e,n,o);r=n.stateNode,id.current=n;var i=u&&typeof t.getDerivedStateFromError!="function"?null:r.render();return n.flags|=1,e!==null&&u?(n.child=et(n,e.child,null,o),n.child=et(n,null,i,o)):le(e,n,i,o),n.memoizedState=r.state,l&&pi(n,t,!0),n.child}function Ra(e){var n=e.stateNode;n.pendingContext?di(e,n.pendingContext,n.pendingContext!==n.context):n.context&&di(e,n.context,!1),fu(e,n.containerInfo)}function Li(e,n,t,r,l){return bn(),ou(l),n.flags|=256,le(e,n,t,r),n.child}var Po={dehydrated:null,treeContext:null,retryLane:0};function No(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oa(e,n,t){var r=n.pendingProps,l=U.current,o=!1,u=(n.flags&128)!==0,i;if((i=u)||(i=e!==null&&e.memoizedState===null?!1:(l&2)!==0),i?(o=!0,n.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),D(U,l&1),e===null)return wo(n),e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(n.mode&1?e.data==="$!"?n.lanes=8:n.lanes=1073741824:n.lanes=1,null):(u=r.children,e=r.fallback,o?(r=n.mode,o=n.child,u={mode:"hidden",children:u},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=u):o=cl(u,r,0,null),e=_n(e,r,t,null),o.return=n,e.return=n,o.sibling=e,n.child=o,n.child.memoizedState=No(t),n.memoizedState=Po,e):wu(n,u));if(l=e.memoizedState,l!==null&&(i=l.dehydrated,i!==null))return sd(e,n,u,r,i,l,t);if(o){o=r.fallback,u=n.mode,l=e.child,i=l.sibling;var s={mode:"hidden",children:r.children};return!(u&1)&&n.child!==l?(r=n.child,r.childLanes=0,r.pendingProps=s,n.deletions=null):(r=cn(l,s),r.subtreeFlags=l.subtreeFlags&14680064),i!==null?o=cn(i,o):(o=_n(o,u,t,null),o.flags|=2),o.return=n,r.return=n,r.sibling=o,n.child=r,r=o,o=n.child,u=e.child.memoizedState,u=u===null?No(t):{baseLanes:u.baseLanes|t,cachePool:null,transitions:u.transitions},o.memoizedState=u,o.childLanes=e.childLanes&~t,n.memoizedState=Po,r}return o=e.child,e=o.sibling,r=cn(o,{mode:"visible",children:r.children}),!(n.mode&1)&&(r.lanes=t),r.return=n,r.sibling=null,e!==null&&(t=n.deletions,t===null?(n.deletions=[e],n.flags|=16):t.push(e)),n.child=r,n.memoizedState=null,r}function wu(e,n){return n=cl({mode:"visible",children:n},e.mode,0,null),n.return=e,e.child=n}function pr(e,n,t,r){return r!==null&&ou(r),et(n,e.child,null,t),e=wu(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function sd(e,n,t,r,l,o,u){if(t)return n.flags&256?(n.flags&=-257,r=$l(Error(y(422))),pr(e,n,u,r)):n.memoizedState!==null?(n.child=e.child,n.flags|=128,null):(o=r.fallback,l=n.mode,r=cl({mode:"visible",children:r.children},l,0,null),o=_n(o,l,u,null),o.flags|=2,r.return=n,o.return=n,r.sibling=o,n.child=r,n.mode&1&&et(n,e.child,null,u),n.child.memoizedState=No(u),n.memoizedState=Po,o);if(!(n.mode&1))return pr(e,n,u,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var i=r.dgst;return r=i,o=Error(y(419)),r=$l(o,r,void 0),pr(e,n,u,r)}if(i=(u&e.childLanes)!==0,ae||i){if(r=Z,r!==null){switch(u&-u){case 4:l=2;break;case 16:l=8;break;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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|u)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Ke(e,l),Oe(r,e,l,-1))}return xu(),r=$l(Error(y(421))),pr(e,n,u,r)}return l.data==="$?"?(n.flags|=128,n.child=e.child,n=kd.bind(null,e),l._reactRetry=n,null):(e=o.treeContext,me=on(l.nextSibling),ve=n,j=!0,Te=null,e!==null&&(we[Se++]=Ve,we[Se++]=Be,we[Se++]=Pn,Ve=e.id,Be=e.overflow,Pn=n),n=wu(n,r.children),n.flags|=4096,n)}function Ti(e,n,t){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n),So(e.return,n,t)}function Vl(e,n,t,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:r,tail:t,tailMode:l}:(o.isBackwards=n,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=t,o.tailMode=l)}function Da(e,n,t){var r=n.pendingProps,l=r.revealOrder,o=r.tail;if(le(e,n,r.children,t),r=U.current,r&2)r=r&1|2,n.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ti(e,t,n);else if(e.tag===19)Ti(e,t,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(D(U,r),!(n.mode&1))n.memoizedState=null;else switch(l){case"forwards":for(t=n.child,l=null;t!==null;)e=t.alternate,e!==null&&Qr(e)===null&&(l=t),t=t.sibling;t=l,t===null?(l=n.child,n.child=null):(l=t.sibling,t.sibling=null),Vl(n,!1,l,t,o);break;case"backwards":for(t=null,l=n.child,n.child=null;l!==null;){if(e=l.alternate,e!==null&&Qr(e)===null){n.child=l;break}e=l.sibling,l.sibling=t,t=l,l=e}Vl(n,!0,t,null,o);break;case"together":Vl(n,!1,null,null,void 0);break;default:n.memoizedState=null}return n.child}function xr(e,n){!(n.mode&1)&&e!==null&&(e.alternate=null,n.alternate=null,n.flags|=2)}function Ye(e,n,t){if(e!==null&&(n.dependencies=e.dependencies),zn|=n.lanes,!(t&n.childLanes))return null;if(e!==null&&n.child!==e.child)throw Error(y(153));if(n.child!==null){for(e=n.child,t=cn(e,e.pendingProps),n.child=t,t.return=n;e.sibling!==null;)e=e.sibling,t=t.sibling=cn(e,e.pendingProps),t.return=n;t.sibling=null}return n.child}function ad(e,n,t){switch(n.tag){case 3:Ra(n),bn();break;case 5:oa(n);break;case 1:fe(n.type)&&Ar(n);break;case 4:fu(n,n.stateNode.containerInfo);break;case 10:var r=n.type._context,l=n.memoizedProps.value;D(Br,r._currentValue),r._currentValue=l;break;case 13:if(r=n.memoizedState,r!==null)return r.dehydrated!==null?(D(U,U.current&1),n.flags|=128,null):t&n.child.childLanes?Oa(e,n,t):(D(U,U.current&1),e=Ye(e,n,t),e!==null?e.sibling:null);D(U,U.current&1);break;case 19:if(r=(t&n.childLanes)!==0,e.flags&128){if(r)return Da(e,n,t);n.flags|=128}if(l=n.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),D(U,U.current),r)break;return null;case 22:case 23:return n.lanes=0,La(e,n,t)}return Ye(e,n,t)}var Ia,zo,Fa,Ma;Ia=function(e,n){for(var t=n.child;t!==null;){if(t.tag===5||t.tag===6)e.appendChild(t.stateNode);else if(t.tag!==4&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===n)break;for(;t.sibling===null;){if(t.return===null||t.return===n)return;t=t.return}t.sibling.return=t.return,t=t.sibling}};zo=function(){};Fa=function(e,n,t,r){var l=e.memoizedProps;if(l!==r){e=n.stateNode,En(Ue.current);var o=null;switch(t){case"input":l=Gl(e,l),r=Gl(e,r),o=[];break;case"select":l=$({},l,{value:void 0}),r=$({},r,{value:void 0}),o=[];break;case"textarea":l=ql(e,l),r=ql(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=jr)}eo(t,r);var u;t=null;for(c in l)if(!r.hasOwnProperty(c)&&l.hasOwnProperty(c)&&l[c]!=null)if(c==="style"){var i=l[c];for(u in i)i.hasOwnProperty(u)&&(t||(t={}),t[u]="")}else c!=="dangerouslySetInnerHTML"&&c!=="children"&&c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&c!=="autoFocus"&&(Tt.hasOwnProperty(c)?o||(o=[]):(o=o||[]).push(c,null));for(c in r){var s=r[c];if(i=l!=null?l[c]:void 0,r.hasOwnProperty(c)&&s!==i&&(s!=null||i!=null))if(c==="style")if(i){for(u in i)!i.hasOwnProperty(u)||s&&s.hasOwnProperty(u)||(t||(t={}),t[u]="");for(u in s)s.hasOwnProperty(u)&&i[u]!==s[u]&&(t||(t={}),t[u]=s[u])}else t||(o||(o=[]),o.push(c,t)),t=s;else c==="dangerouslySetInnerHTML"?(s=s?s.__html:void 0,i=i?i.__html:void 0,s!=null&&i!==s&&(o=o||[]).push(c,s)):c==="children"?typeof s!="string"&&typeof s!="number"||(o=o||[]).push(c,""+s):c!=="suppressContentEditableWarning"&&c!=="suppressHydrationWarning"&&(Tt.hasOwnProperty(c)?(s!=null&&c==="onScroll"&&I("scroll",e),o||i===s||(o=[])):(o=o||[]).push(c,s))}t&&(o=o||[]).push("style",t);var c=o;(n.updateQueue=c)&&(n.flags|=4)}};Ma=function(e,n,t,r){t!==r&&(n.flags|=4)};function vt(e,n){if(!j)switch(e.tailMode){case"hidden":n=e.tail;for(var t=null;n!==null;)n.alternate!==null&&(t=n),n=n.sibling;t===null?e.tail=null:t.sibling=null;break;case"collapsed":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ne(e){var n=e.alternate!==null&&e.alternate.child===e.child,t=0,r=0;if(n)for(var l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)t|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=t,n}function cd(e,n,t){var r=n.pendingProps;switch(lu(n),n.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ne(n),null;case 1:return fe(n.type)&&Ur(),ne(n),null;case 3:return r=n.stateNode,nt(),F(ce),F(re),pu(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(fr(n)?n.flags|=4:e===null||e.memoizedState.isDehydrated&&!(n.flags&256)||(n.flags|=1024,Te!==null&&(Mo(Te),Te=null))),zo(e,n),ne(n),null;case 5:du(n);var l=En(Bt.current);if(t=n.type,e!==null&&n.stateNode!=null)Fa(e,n,t,r,l),e.ref!==n.ref&&(n.flags|=512,n.flags|=2097152);else{if(!r){if(n.stateNode===null)throw Error(y(166));return ne(n),null}if(e=En(Ue.current),fr(n)){r=n.stateNode,t=n.type;var o=n.memoizedProps;switch(r[Me]=n,r[$t]=o,e=(n.mode&1)!==0,t){case"dialog":I("cancel",r),I("close",r);break;case"iframe":case"object":case"embed":I("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[Me]=n,e[$t]=r,Ia(e,n,!1,!1),n.stateNode=e;e:{switch(u=no(t,r),t){case"dialog":I("cancel",e),I("close",e),l=r;break;case"iframe":case"object":case"embed":I("load",e),l=r;break;case"video":case"audio":for(l=0;lrt&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304)}else{if(!r)if(e=Qr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),vt(o,!0),o.tail===null&&o.tailMode==="hidden"&&!u.alternate&&!j)return ne(n),null}else 2*W()-o.renderingStartTime>rt&&t!==1073741824&&(n.flags|=128,r=!0,vt(o,!1),n.lanes=4194304);o.isBackwards?(u.sibling=n.child,n.child=u):(t=o.last,t!==null?t.sibling=u:n.child=u,o.last=u)}return o.tail!==null?(n=o.tail,o.rendering=n,o.tail=n.sibling,o.renderingStartTime=W(),n.sibling=null,t=U.current,D(U,r?t&1|2:t&1),n):(ne(n),null);case 22:case 23:return _u(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?pe&1073741824&&(ne(n),n.subtreeFlags&6&&(n.flags|=8192)):ne(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function fd(e,n){switch(lu(n),n.tag){case 1:return fe(n.type)&&Ur(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return nt(),F(ce),F(re),pu(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return du(n),null;case 13:if(F(U),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));bn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return F(U),null;case 4:return nt(),null;case 10:return su(n.type._context),null;case 22:case 23:return _u(),null;case 24:return null;default:return null}}var mr=!1,te=!1,dd=typeof WeakSet=="function"?WeakSet:Set,k=null;function Hn(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){V(e,n,r)}else t.current=null}function Lo(e,n,t){try{t()}catch(r){V(e,n,r)}}var Ri=!1;function pd(e,n){if(fo=Ir,e=Vs(),tu(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{t.nodeType,o.nodeType}catch{t=null;break e}var u=0,i=-1,s=-1,c=0,v=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(i=u+l),m!==o||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++c===l&&(i=u),p===o&&++v===r&&(s=u),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=i===-1||s===-1?null:{start:i,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(po={focusedElem:e,selectionRange:t},Ir=!1,k=n;k!==null;)if(n=k,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,k=e;else for(;k!==null;){n=k;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var S=w.memoizedProps,M=w.memoizedState,f=n.stateNode,a=f.getSnapshotBeforeUpdate(n.elementType===n.type?S:Ne(n.type,S),M);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=n.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(h){V(n,n.return,h)}if(e=n.sibling,e!==null){e.return=n.return,k=e;break}k=n.return}return w=Ri,Ri=!1,w}function Nt(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&Lo(n,t,o)}l=l.next}while(l!==r)}}function sl(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function To(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function ja(e){var n=e.alternate;n!==null&&(e.alternate=null,ja(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Me],delete n[$t],delete n[ho],delete n[Gf],delete n[Zf])),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 Ua(e){return e.tag===5||e.tag===3||e.tag===4}function Oi(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Ua(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 Ro(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=jr));else if(r!==4&&(e=e.child,e!==null))for(Ro(e,n,t),e=e.sibling;e!==null;)Ro(e,n,t),e=e.sibling}function Oo(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Oo(e,n,t),e=e.sibling;e!==null;)Oo(e,n,t),e=e.sibling}var J=null,Le=!1;function Ge(e,n,t){for(t=t.child;t!==null;)Aa(e,n,t),t=t.sibling}function Aa(e,n,t){if(je&&typeof je.onCommitFiberUnmount=="function")try{je.onCommitFiberUnmount(el,t)}catch{}switch(t.tag){case 5:te||Hn(t,n);case 6:var r=J,l=Le;J=null,Ge(e,n,t),J=r,Le=l,J!==null&&(Le?(e=J,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):J.removeChild(t.stateNode));break;case 18:J!==null&&(Le?(e=J,t=t.stateNode,e.nodeType===8?Il(e.parentNode,t):e.nodeType===1&&Il(e,t),Ft(e)):Il(J,t.stateNode));break;case 4:r=J,l=Le,J=t.stateNode.containerInfo,Le=!0,Ge(e,n,t),J=r,Le=l;break;case 0:case 11:case 14:case 15:if(!te&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,u=o.destroy;o=o.tag,u!==void 0&&(o&2||o&4)&&Lo(t,n,u),l=l.next}while(l!==r)}Ge(e,n,t);break;case 1:if(!te&&(Hn(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(i){V(t,n,i)}Ge(e,n,t);break;case 21:Ge(e,n,t);break;case 22:t.mode&1?(te=(r=te)||t.memoizedState!==null,Ge(e,n,t),te=r):Ge(e,n,t);break;default:Ge(e,n,t)}}function Di(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new dd),n.forEach(function(r){var l=Ed.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function Pe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~o}if(r=l,r=W()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*vd(r/1960))-r,10e?16:e,nn===null)var r=!1;else{if(e=nn,nn=null,Zr=0,R&6)throw Error(y(331));var l=R;for(R|=4,k=e.current;k!==null;){var o=k,u=o.child;if(k.flags&16){var i=o.deletions;if(i!==null){for(var s=0;sW()-Eu?Cn(e,0):ku|=t),de(e,n)}function Ya(e,n){n===0&&(e.mode&1?(n=or,or<<=1,!(or&130023424)&&(or=4194304)):n=1);var t=oe();e=Ke(e,n),e!==null&&(Xt(e,n,t),de(e,t))}function kd(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),Ya(e,t)}function Ed(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),Ya(e,t)}var Xa;Xa=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||ce.current)ae=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return ae=!1,ad(e,n,t);ae=!!(e.flags&131072)}else ae=!1,j&&n.flags&1048576&&qs(n,Vr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;xr(e,n),e=n.pendingProps;var l=qn(n,re.current);Gn(n,t),l=vu(null,n,r,e,l,t);var o=hu();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,fe(r)?(o=!0,Ar(n)):o=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,cu(n),l.updater=il,n.stateNode=l,l._reactInternals=n,Eo(n,r,e,t),n=xo(null,n,r,!0,o,t)):(n.tag=0,j&&o&&ru(n),le(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(xr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=_d(r),e=Ne(r,e),l){case 0:n=_o(null,n,r,e,t);break e;case 1:n=zi(null,n,r,e,t);break e;case 11:n=Pi(null,n,r,e,t);break e;case 14:n=Ni(null,n,r,Ne(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),_o(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),zi(e,n,r,l,t);case 3:e:{if(Ra(n),e===null)throw Error(y(387));r=n.pendingProps,o=n.memoizedState,l=o.element,la(e,n),Wr(n,r,null,t);var u=n.memoizedState;if(r=u.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=o,n.memoizedState=o,n.flags&256){l=tt(Error(y(423)),n),n=Li(e,n,r,t,l);break e}else if(r!==l){l=tt(Error(y(424)),n),n=Li(e,n,r,t,l);break e}else for(me=on(n.stateNode.containerInfo.firstChild),ve=n,j=!0,Te=null,t=ta(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(bn(),r===l){n=Ye(e,n,t);break e}le(e,n,r,t)}n=n.child}return n;case 5:return oa(n),e===null&&wo(n),r=n.type,l=n.pendingProps,o=e!==null?e.memoizedProps:null,u=l.children,mo(r,l)?u=null:o!==null&&mo(r,o)&&(n.flags|=32),Ta(e,n),le(e,n,u,t),n.child;case 6:return e===null&&wo(n),null;case 13:return Oa(e,n,t);case 4:return fu(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=et(n,null,r,t):le(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),Pi(e,n,r,l,t);case 7:return le(e,n,n.pendingProps,t),n.child;case 8:return le(e,n,n.pendingProps.children,t),n.child;case 12:return le(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,o=n.memoizedProps,u=l.value,D(Br,r._currentValue),r._currentValue=u,o!==null)if(De(o.value,u)){if(o.children===l.children&&!ce.current){n=Ye(e,n,t);break e}}else for(o=n.child,o!==null&&(o.return=n);o!==null;){var i=o.dependencies;if(i!==null){u=o.child;for(var s=i.firstContext;s!==null;){if(s.context===r){if(o.tag===1){s=He(-1,t&-t),s.tag=2;var c=o.updateQueue;if(c!==null){c=c.shared;var v=c.pending;v===null?s.next=s:(s.next=v.next,v.next=s),c.pending=s}}o.lanes|=t,s=o.alternate,s!==null&&(s.lanes|=t),So(o.return,t,n),i.lanes|=t;break}s=s.next}}else if(o.tag===10)u=o.type===n.type?null:o.child;else if(o.tag===18){if(u=o.return,u===null)throw Error(y(341));u.lanes|=t,i=u.alternate,i!==null&&(i.lanes|=t),So(u,t,n),u=o.sibling}else u=o.child;if(u!==null)u.return=o;else for(u=o;u!==null;){if(u===n){u=null;break}if(o=u.sibling,o!==null){o.return=u.return,u=o;break}u=u.return}o=u}le(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Gn(n,t),l=Ce(l),r=r(l),n.flags|=1,le(e,n,r,t),n.child;case 14:return r=n.type,l=Ne(r,n.pendingProps),l=Ne(r.type,l),Ni(e,n,r,l,t);case 15:return za(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:Ne(r,l),xr(e,n),n.tag=1,fe(r)?(e=!0,Ar(n)):e=!1,Gn(n,t),xa(n,r,l),Eo(n,r,l,t),xo(null,n,r,!0,e,t);case 19:return Da(e,n,t);case 22:return La(e,n,t)}throw Error(y(156,n.tag))};function Ga(e,n){return Es(e,n)}function Cd(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ke(e,n,t,r){return new Cd(e,n,t,r)}function Pu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _d(e){if(typeof e=="function")return Pu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Qo)return 11;if(e===Ko)return 14}return 2}function cn(e,n){var t=e.alternate;return t===null?(t=ke(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function zr(e,n,t,r,l,o){var u=2;if(r=e,typeof e=="function")Pu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case In:return _n(t.children,l,o,n);case Wo:u=8,l|=8;break;case Ql:return e=ke(12,t,n,l|2),e.elementType=Ql,e.lanes=o,e;case Kl:return e=ke(13,t,n,l),e.elementType=Kl,e.lanes=o,e;case Yl:return e=ke(19,t,n,l),e.elementType=Yl,e.lanes=o,e;case os:return cl(t,l,o,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case rs:u=10;break e;case ls:u=9;break e;case Qo:u=11;break e;case Ko:u=14;break e;case Ze:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=ke(u,t,n,l),n.elementType=e,n.type=r,n.lanes=o,n}function _n(e,n,t,r){return e=ke(7,e,r,n),e.lanes=t,e}function cl(e,n,t,r){return e=ke(22,e,r,n),e.elementType=os,e.lanes=t,e.stateNode={isHidden:!1},e}function Bl(e,n,t){return e=ke(6,e,null,n),e.lanes=t,e}function Hl(e,n,t){return n=ke(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function xd(e,n,t,r,l){this.tag=n,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=Cl(0),this.expirationTimes=Cl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Nu(e,n,t,r,l,o,u,i,s){return e=new xd(e,n,t,i,s),n===1?(n=1,o===!0&&(n|=8)):n=0,o=ke(3,null,null,n),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},cu(o),e}function Pd(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ba)}catch(e){console.error(e)}}ba(),bi.exports=ye;var Rd=bi.exports;const Ud=Vi(Rd);var ec=(e=>(e.showDialog="showDialog",e.save="save",e.openFile="openFile",e.OPEN_RESOURCE="openResource",e.createProject="createProject",e.createObsProject="createObsProject",e.openStory="openStory",e.DOWNLOAD_RESOURCE="downloadResource",e.SYNC_DOWNLOADED_RESOURCES="syncDownloadedResources",e.TEST_MESSAGE="testMessage",e.SEARCH_QUERY="searchQuery",e.SEARCH_RESULTS="searchResults",e.SCROLL_TO_CHAPTER="scrollToChapter",e.UPDATE_CHAPTER="updateChapter",e.BLOCK_CLICK="blockClick",e.SEND_BOOKS_IN_WORKSPACE="sendBooksInWorkspace",e.BOOKS_IN_WORKSPACE_RESPONSE="booksInWorkspaceResponse",e.OPEN_USFM_FILE="openUsfmFile",e.GET_USFM="get-usfm",e))(ec||{});class Od{constructor(){Ou(this,"vsCodeApi");typeof acquireVsCodeApi=="function"&&(this.vsCodeApi=acquireVsCodeApi())}postMessage(n){this.vsCodeApi&&this.vsCodeApi.postMessage(n)}setMessageListeners(n){console.log("in setmessage listeners"),this.vsCodeApi?window.addEventListener("message",n||(t=>{switch(t.data.type){case ec.showDialog:return}})):console.error("NO VSCODE API FOUND")}getState(){if(this.vsCodeApi)return this.vsCodeApi.getState();{const n=localStorage.getItem("vscodeState");return n?JSON.parse(n):void 0}}setState(n){return this.vsCodeApi?this.vsCodeApi.setState(n):(localStorage.setItem("vscodeState",JSON.stringify(n)),n)}}const Ad=new Od,Dd=ze.createContext({});function $d({children:e}){const[n,t]=ze.useState("GEN"),[r,l]=ze.useState([]),[o,u]=ze.useState(0),[i,s]=ze.useState(1),[c,v]=ze.useState(1),[m,p]=ze.useState(!1),[g,w]=ze.useState(!1),S={state:{selectedBook:n,bookChapters:r,verseCount:o,selectedChapter:i,selectedVerse:c,showChapterList:m,showVerseList:g},actions:{setSelectedBook:t,setBookChapters:l,setVerseCount:u,setSelectedChapter:s,setSelectedVerse:v,setShowChapterList:p,setShowVerseList:w}};return xc.jsx(Dd.Provider,{value:S,children:e})}export{ec as M,jd as R,$d as a,Ud as b,Fd as c,Dd as d,Rd as e,Md as g,xc as j,ze as r,Ad as v}; diff --git a/webviews/usfm-viewer/build/assets/index.css b/webviews/usfm-viewer/build/assets/index.css index fb7f955e..b4b94e36 100644 --- a/webviews/usfm-viewer/build/assets/index.css +++ b/webviews/usfm-viewer/build/assets/index.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }.m-3{margin:.75rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-full{height:100%}.w-10{width:2.5rem}.w-full{width:100%}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.border{border-width:1px}.border-l-2{border-left-width:2px}.border-r-2{border-right-width:2px}.border-secondary{--tw-border-opacity: 1;border-color:rgb(21 21 21 / var(--tw-border-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.pb-16{padding-bottom:4rem}.text-left{text-align:left}.leading-8{line-height:2rem}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#root{max-width:1280px;margin:0 auto;text-align:left}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}.perf .title .section,.perf .heading .section,.sectionBody .paragraph{margin-left:.75rem;margin-right:.75rem}.perf .title .section,.perf .heading .section{display:flex;align-items:center}.editor{margin-top:.5rem;margin-bottom:.5rem}.heading .ms{font-size:1.125rem;line-height:1.75rem;text-transform:uppercase;letter-spacing:.05em;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.mark.chapter{margin-bottom:.5rem;display:block;-moz-column-break-before:column;break-before:column;border-bottom-width:1px;padding-bottom:.25rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.mark.chapter:before{--tw-content: "Chapter : ";content:var(--tw-content)}p.paragraph:has(.chapter){margin-top:.5rem}.mark.verse{margin-right:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.mark.verse:after{--tw-content: ".";content:var(--tw-content)}.major-title,.major-secondary-heading{--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.graft{vertical-align:super;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.editor .perf .footnote:before{cursor:pointer;font-weight:600;content:" ‡"}.editor .perf .xref:before{cursor:pointer;font-weight:600;content:" x"}.perf .sectionHeading{display:none}.perf .xq,.perf .fq{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}[contenteditable]:focus{outline:0px solid transparent}.ref-editor ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(228 242 255 / var(--tw-bg-opacity))}.ref-editor ::selection{--tw-bg-opacity: 1;background-color:rgb(228 242 255 / var(--tw-bg-opacity))}@media (max-width: 200px){.max-\[200px\]\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.max-\[200px\]\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 400px){.min-\[400px\]\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:currentColor}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:Inter var,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.m-3{margin:.75rem}.block{display:block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-full{height:100%}.w-10{width:2.5rem}.w-full{width:100%}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.gap-2{gap:.5rem}.gap-4{gap:1rem}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.rounded{border-radius:.25rem}.border{border-width:1px}.border-l-2{border-left-width:2px}.border-r-2{border-right-width:2px}.border-secondary{--tw-border-opacity: 1;border-color:rgb(21 21 21 / var(--tw-border-opacity))}.p-2{padding:.5rem}.p-4{padding:1rem}.pb-16{padding-bottom:4rem}.text-left{text-align:left}.leading-8{line-height:2rem}.opacity-25{opacity:.25}.opacity-75{opacity:.75}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}#root{max-width:1280px;margin:0 auto;text-align:left}@keyframes logo-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}@media (prefers-reduced-motion: no-preference){a:nth-of-type(2) .logo{animation:logo-spin infinite 20s linear}}.card{padding:2em}.read-the-docs{color:#888}.perf .title .section,.perf .heading .section,.sectionBody .paragraph{margin-left:.75rem;margin-right:.75rem}.perf .title .section,.perf .heading .section{display:flex;align-items:center}.editor{margin-top:.5rem;margin-bottom:.5rem}.heading .ms{font-size:1.125rem;line-height:1.75rem;text-transform:uppercase;letter-spacing:.05em;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.mark.chapter{margin-bottom:.5rem;display:block;-moz-column-break-before:column;break-before:column;border-bottom-width:1px;padding-bottom:.25rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em}.mark.chapter:before{--tw-content: "Chapter : ";content:var(--tw-content)}p.paragraph:has(.chapter){margin-top:.5rem}.mark.verse{margin-right:.25rem;font-size:1.125rem;line-height:1.75rem;font-weight:600}.mark.verse:after{--tw-content: ".";content:var(--tw-content)}.major-title,.major-secondary-heading{--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.graft{vertical-align:super;font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}.editor .perf .footnote:before{cursor:pointer;font-weight:600;content:" ‡"}.editor .perf .xref:before{cursor:pointer;font-weight:600;content:" x"}.perf .sectionHeading{display:none}.perf .xq,.perf .fq{font-size:.875rem;line-height:1.25rem;--tw-text-opacity: 1;color:rgb(255 85 0 / var(--tw-text-opacity))}[contenteditable]:focus{outline:0px solid transparent}.ref-editor ::-moz-selection{--tw-bg-opacity: 1;background-color:rgb(228 242 255 / var(--tw-bg-opacity))}.ref-editor ::selection{--tw-bg-opacity: 1;background-color:rgb(228 242 255 / var(--tw-bg-opacity))}@media (max-width: 200px){.max-\[200px\]\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.max-\[200px\]\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 400px){.min-\[400px\]\:grid-cols-6{grid-template-columns:repeat(6,minmax(0,1fr))}} diff --git a/webviews/usfm-viewer/build/assets/index.js b/webviews/usfm-viewer/build/assets/index.js index b82f0211..fdd46c13 100644 --- a/webviews/usfm-viewer/build/assets/index.js +++ b/webviews/usfm-viewer/build/assets/index.js @@ -1,120 +1,120 @@ -import{r as Et,j as xt,v as Oh,R as Gi,g as D8,c as we,M as h8,a as yB,b as gB}from"./App.js";const m8=Et.createContext({state:{},actions:{}}),AB=({children:e,editable:t=!0})=>{const r={sequenceIds:[],sectionable:!1,blockable:!0,editable:t,preview:!1,verbose:!1,graftSequenceId:null},[n,u]=Et.useState(r),s=Et.useCallback(E=>{u(A=>({...A,sectionable:E}))},[]),o=Et.useCallback(E=>{u(A=>({...A,blockable:E}))},[]),a=Et.useCallback(E=>{u(A=>({...A,editable:E}))},[]),i=Et.useCallback(E=>{u(A=>({...A,preview:E}))},[]),c=Et.useCallback(E=>{u(A=>({...A,...E}))},[]),l=Et.useCallback(E=>{u(A=>({...A,sequenceIds:E}))},[]),p=Et.useCallback(E=>{u(A=>({...A,graftSequenceId:E}))},[]),f=Et.useCallback(E=>{l([...n.sequenceIds,E])},[n.sequenceIds,l]),h={state:n,actions:{setSectionable:s,setBlockable:o,setEditable:a,setPreview:i,setToggles:c,setSequenceIds:l,addSequenceId:f,setGraftSequenceId:p}};return xt.jsx(m8.Provider,{value:h,children:e})};/*! +import{r as ft,j as It,v as Vh,R as Vi,g as L8,c as Ce,M as U8,a as aT,b as iT}from"./App.js";const G8=ft.createContext({state:{},actions:{}}),cT=({children:e,editable:t=!0})=>{const r={sequenceIds:[],sectionable:!1,blockable:!0,editable:t,preview:!1,verbose:!1,graftSequenceId:null},[n,u]=ft.useState(r),s=ft.useCallback(y=>{u(A=>({...A,sectionable:y}))},[]),o=ft.useCallback(y=>{u(A=>({...A,blockable:y}))},[]),a=ft.useCallback(y=>{u(A=>({...A,editable:y}))},[]),i=ft.useCallback(y=>{u(A=>({...A,preview:y}))},[]),c=ft.useCallback(y=>{u(A=>({...A,...y}))},[]),l=ft.useCallback(y=>{u(A=>({...A,sequenceIds:y}))},[]),p=ft.useCallback(y=>{u(A=>({...A,graftSequenceId:y}))},[]),d=ft.useCallback(y=>{l([...n.sequenceIds,y])},[n.sequenceIds,l]),h={state:n,actions:{setSectionable:s,setBlockable:o,setEditable:a,setPreview:i,setToggles:c,setSequenceIds:l,addSequenceId:d,setGraftSequenceId:p}};return It.jsx(G8.Provider,{value:h,children:e})};/*! * XRegExp 5.1.1 * * Steven Levithan (c) 2007-present MIT License - */const $t="xregexp",Qs={astral:!1,namespacing:!0},ou={};let ni={},Wo={};const h2=[],ua="default",ev="class",FB={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},CB=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,bB=/()??/.exec("")[1]===void 0,SB=/x/.flags!==void 0;function Vi(e){let t=!0;try{if(new RegExp("",e),e==="y"){const r="gy";".a".replace(new RegExp("a",r),".")===".."&&(t=!1)}}catch{t=!1}return t}const wB=Vi("d"),kh=Vi("s"),E8=Vi("u"),Ih=Vi("y"),v8={d:wB,g:!0,i:!0,m:!0,s:kh,u:E8,y:Ih},_B=kh?/[^dgimsuy]+/g:/[^dgimuy]+/g;function y8(e,t,r,n,u){if(e[$t]={captureNames:t},u)return e;if(e.__proto__)e.__proto__=ne.prototype;else for(const s in ne.prototype)e[s]=ne.prototype[s];return e[$t].source=r,e[$t].flags=n&&n.split("").sort().join(""),e}function _i(e){return e.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function co(e,t){if(!ne.isRegExp(e))throw new TypeError("Type RegExp expected");const r=e[$t]||{};let n=BB(e),u="",s="",o=null,a=null;return t=t||{},t.removeG&&(s+="g"),t.removeY&&(s+="y"),s&&(n=n.replace(new RegExp(`[${s}]+`,"g"),"")),t.addG&&(u+="g"),t.addY&&(u+="y"),u&&(n=_i(n+u)),t.isInternalOnly||(r.source!==void 0&&(o=r.source),r.flags!=null&&(a=u?_i(r.flags+u):r.flags)),e=y8(new RegExp(t.source||e.source,n),TB(e)?r.captureNames.slice(0):null,o,a,t.isInternalOnly),e}function g8(e){return parseInt(e,16)}function A8(e,t,r){const n=e.index+e[0].length,u=e.input[e.index-1],s=e.input[n];return/^[()|]$/.test(u)||/^[()|]$/.test(s)||e.index===0||n===e.input.length||/\(\?(?:[:=!]|<[=!])$/.test(e.input.substring(e.index-4,e.index))||$B(e.input,n,r)?"":"(?:)"}function BB(e){return SB?e.flags:/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(e))[1]}function TB(e){return!!(e[$t]&&e[$t].captureNames)}function Nh(e){return parseInt(e,10).toString(16)}function $B(e,t,r){const n="\\(\\?#[^)]*\\)",u="#[^#\\n]*",s="[?*+]|{\\d+(?:,\\d*)?}";return(r.includes("x")?new RegExp(`^(?:\\s|${u}|${n})*(?:${s})`):new RegExp(`^(?:${n})*(?:${s})`)).test(e.slice(t))}function Nl(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function Sa(e){if(e==null)throw new TypeError("Cannot convert null or undefined to object");return e}function qh(e){for(;e.length<4;)e=`0${e}`;return e}function PB(e,t){if(_i(t)!==t)throw new SyntaxError(`Invalid duplicate regex flag ${t}`);e=e.replace(/^\(\?([\w$]+)\)/,(r,n)=>{if(/[dgy]/.test(n))throw new SyntaxError(`Cannot use flags dgy in mode modifier ${r}`);return t=_i(t+n),""});for(const r of t)if(!v8[r])throw new SyntaxError(`Unknown regex flag ${r}`);return{pattern:e,flags:t}}function F8(e){const t={};return Nl(e,"String")?(ne.forEach(e,/[^\s,]+/,r=>{t[r]=!0}),t):e}function tv(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");v8[e]=!0}function OB(e,t,r,n,u){let s=h2.length;const o=e[r];let a=null,i,c;for(;s--;)if(c=h2[s],!(c.leadChar&&c.leadChar!==o||c.scope!==n&&c.scope!=="all"||c.flag&&!t.includes(c.flag))&&(i=ne.exec(e,c.regex,r,"sticky"),i)){a={matchLength:i[0].length,output:c.handler.call(u,i,n,t),reparse:c.reparse};break}return a}function C8(e){Qs.astral=e}function b8(e){Qs.namespacing=e}function ne(e,t){if(ne.isRegExp(e)){if(t!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return co(e)}if(e=e===void 0?"":String(e),t=t===void 0?"":String(t),ne.isInstalled("astral")&&!t.includes("A")&&(t+="A"),Wo[e]||(Wo[e]={}),!Wo[e][t]){const n={hasNamedCapture:!1,captureNames:[]};let u=ua,s="",o=0,a;const i=PB(e,t);let c=i.pattern;const l=i.flags;for(;o{r=r||{};let{optionalFlags:n}=r;if(r.flag&&tv(r.flag),n){n=n.split("");for(const u of n)tv(u)}h2.push({regex:co(e,{addG:!0,addY:Ih,isInternalOnly:!0}),handler:t,scope:r.scope||ua,flag:r.flag,reparse:r.reparse,leadChar:r.leadChar}),ne.cache.flush("patterns")};ne.cache=(e,t)=>(ni[e]||(ni[e]={}),ni[e][t]||(ni[e][t]=ne(e,t)));ne.cache.flush=e=>{e==="patterns"?Wo={}:ni={}};ne.escape=e=>String(Sa(e)).replace(/[\\\[\]{}()*+?.^$|]/g,"\\$&").replace(/[\s#\-,]/g,t=>`\\u${qh(Nh(t.charCodeAt(0)))}`);ne.exec=(e,t,r,n)=>{let u="g",s=!1,o=!1,a;s=Ih&&!!(n||t.sticky&&n!==!1),s?u+="y":n&&(o=!0,u+="FakeY"),t[$t]=t[$t]||{};const i=t[$t][u]||(t[$t][u]=co(t,{addG:!0,addY:s,source:o?`${t.source}|()`:void 0,removeY:n===!1,isInternalOnly:!0}));return r=r||0,i.lastIndex=r,a=ou.exec.call(i,e),o&&a&&a.pop()===""&&(a=null),t.global&&(t.lastIndex=a?i.lastIndex:0),a};ne.forEach=(e,t,r)=>{let n=0,u=-1,s;for(;s=ne.exec(e,t,n);)r(s,++u,e,t),n=s.index+(s[0].length||1)};ne.globalize=e=>co(e,{addG:!0});ne.install=e=>{e=F8(e),!Qs.astral&&e.astral&&C8(!0),!Qs.namespacing&&e.namespacing&&b8(!0)};ne.isInstalled=e=>!!Qs[e];ne.isRegExp=e=>Object.prototype.toString.call(e)==="[object RegExp]";ne.match=(e,t,r)=>{const n=t.global&&r!=="one"||r==="all",u=(n?"g":"")+(t.sticky?"y":"")||"noGY";t[$t]=t[$t]||{};const s=t[$t][u]||(t[$t][u]=co(t,{addG:!!n,removeG:r==="one",isInternalOnly:!0})),o=String(Sa(e)).match(s);return t.global&&(t.lastIndex=r==="one"&&o?o.index+o[0].length:0),n?o||[]:o&&o[0]};ne.matchChain=(e,t)=>function r(n,u){const s=t[u].regex?t[u]:{regex:t[u]},o=[];function a(i){if(s.backref){const c=`Backreference to undefined group: ${s.backref}`,l=isNaN(s.backref);if(l&&ne.isInstalled("namespacing")){if(!(i.groups&&s.backref in i.groups))throw new ReferenceError(c)}else if(!i.hasOwnProperty(s.backref))throw new ReferenceError(c);const p=l&&ne.isInstalled("namespacing")?i.groups[s.backref]:i[s.backref];o.push(p||"")}else o.push(i[0])}for(const i of n)ne.forEach(i,s.regex,a);return u===t.length-1||!o.length?o:r(o,u+1)}([e],0);ne.replace=(e,t,r,n)=>{const u=ne.isRegExp(t),s=t.global&&n!=="one"||n==="all",o=(s?"g":"")+(t.sticky?"y":"")||"noGY";let a=t;u?(t[$t]=t[$t]||{},a=t[$t][o]||(t[$t][o]=co(t,{addG:!!s,removeG:n==="one",isInternalOnly:!0}))):s&&(a=new RegExp(ne.escape(String(t)),"g"));const i=ou.replace.call(Sa(e),a,r);return u&&t.global&&(t.lastIndex=0),i};ne.replaceEach=(e,t)=>{for(const r of t)e=ne.replace(e,r[0],r[1],r[2]);return e};ne.split=(e,t,r)=>ou.split.call(Sa(e),t,r);ne.test=(e,t,r,n)=>!!ne.exec(e,t,r,n);ne.uninstall=e=>{e=F8(e),Qs.astral&&e.astral&&C8(!1),Qs.namespacing&&e.namespacing&&b8(!1)};ne.union=(e,t,r)=>{r=r||{};const n=r.conjunction||"or";let u=0,s,o;function a(p,f,d){const h=o[u-s];if(f){if(++u,h)return`(?<${h}>`}else if(d)return`\\${+d+s}`;return p}if(!(Nl(e,"Array")&&e.length))throw new TypeError("Must provide a nonempty array of patterns to merge");const i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,c=[];for(const p of e)ne.isRegExp(p)?(s=u,o=p[$t]&&p[$t].captureNames||[],c.push(ne(p.source).source.replace(i,a))):c.push(ne.escape(p));const l=n==="none"?"":"|";return ne(c.join(l),t)};ou.exec=function(e){const t=this.lastIndex,r=RegExp.prototype.exec.apply(this,arguments);if(r){if(!bB&&r.length>1&&r.includes("")){const n=co(this,{removeG:!0,isInternalOnly:!0});String(e).slice(r.index).replace(n,(...u)=>{const s=u.length;for(let o=1;or.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=t),r};ou.test=function(e){return!!ou.exec.call(this,e)};ou.match=function(e){if(!ne.isRegExp(e))e=new RegExp(e);else if(e.global){const t=String.prototype.match.apply(this,arguments);return e.lastIndex=0,t}return ou.exec.call(e,Sa(this))};ou.replace=function(e,t){const r=ne.isRegExp(e);let n,u,s;return r?(e[$t]&&({captureNames:u}=e[$t]),n=e.lastIndex):e+="",Nl(t,"Function")?s=String(this).replace(e,(...o)=>{if(u){let a;ne.isInstalled("namespacing")?(a=Object.create(null),o.push(a)):(o[0]=new String(o[0]),[a]=o);for(let i=0;i{return String(t).replace(CB,a);function a(i,c,l,p){c=c||l;const f=Nl(o[o.length-1],"Object")?4:3,d=o.length-f;if(c){if(/^\d+$/.test(c)){const E=+c;if(E<=d)return o[E]||""}const h=u?u.indexOf(c):-1;if(h<0)throw new SyntaxError(`Backreference to undefined group ${i}`);return o[h+1]||""}if(p===""||p===" ")throw new SyntaxError(`Invalid token ${i}`);if(p==="&"||+p==0)return o[0];if(p==="$")return"$";if(p==="`")return o[o.length-1].slice(0,o[o.length-2]);if(p==="'")return o[o.length-1].slice(o[o.length-2]+o[0].length);if(p=+p,!isNaN(p)){if(p>d)throw new SyntaxError(`Backreference to undefined group ${i}`);return o[p]||""}throw new SyntaxError(`Invalid token ${i}`)}}),r&&(e.global?e.lastIndex=0:e.lastIndex=n),s};ou.split=function(e,t){if(!ne.isRegExp(e))return String.prototype.split.apply(this,arguments);const r=String(this),n=[],u=e.lastIndex;let s=0,o;return t=(t===void 0?-1:t)>>>0,ne.forEach(r,e,a=>{a.index+a[0].length>s&&(n.push(r.slice(s,a.index)),a.length>1&&a.indext?n.slice(0,t):n};ne.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(e,t)=>{if(e[1]==="B"&&t===ua)return e[0];throw new SyntaxError(`Invalid escape ${e[0]}`)},{scope:"all",leadChar:"\\"});ne.addToken(/\\u{([\dA-Fa-f]+)}/,(e,t,r)=>{const n=g8(e[1]);if(n>1114111)throw new SyntaxError(`Invalid Unicode code point ${e[0]}`);if(n<=65535)return`\\u${qh(Nh(n))}`;if(E8&&r.includes("u"))return e[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")},{scope:"all",leadChar:"\\"});ne.addToken(/\(\?#[^)]*\)/,A8,{leadChar:"("});ne.addToken(/\s+|#[^\n]*\n?/,A8,{flag:"x"});kh||ne.addToken(/\./,()=>"[\\s\\S]",{flag:"s",leadChar:"."});ne.addToken(/\\k<([^>]+)>/,function(e){const t=isNaN(e[1])?this.captureNames.indexOf(e[1])+1:+e[1],r=e.index+e[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError(`Backreference to undefined group ${e[0]}`);return`\\${t}${r===e.input.length||isNaN(e.input[r])?"":"(?:)"}`},{leadChar:"\\"});ne.addToken(/\\(\d+)/,function(e,t){if(!(t===ua&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&e[1]!=="0")throw new SyntaxError(`Cannot use octal escape or backreference to undefined group ${e[0]}`);return e[0]},{scope:"all",leadChar:"\\"});ne.addToken(/\(\?P?<([\p{ID_Start}$_][\p{ID_Continue}$_\u200C\u200D]*)>/u,function(e){if(!ne.isInstalled("namespacing")&&(e[1]==="length"||e[1]==="__proto__"))throw new SyntaxError(`Cannot use reserved word as capture name ${e[0]}`);if(this.captureNames.includes(e[1]))throw new SyntaxError(`Cannot use same name for multiple groups ${e[0]}`);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("},{leadChar:"("});ne.addToken(/\((?!\?)/,function(e,t,r){return r.includes("n")?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n",leadChar:"("});/*! + */const _t="xregexp",Ws={astral:!1,namespacing:!0},Qn={};let ni={},Go={};const S2=[],ta="default",vy="class",lT={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},pT=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,dT=/()??/.exec("")[1]===void 0,fT=/x/.flags!==void 0;function Hi(e){let t=!0;try{if(new RegExp("",e),e==="y"){const r="gy";".a".replace(new RegExp("a",r),".")===".."&&(t=!1)}}catch{t=!1}return t}const DT=Hi("d"),Hh=Hi("s"),V8=Hi("u"),Wh=Hi("y"),H8={d:DT,g:!0,i:!0,m:!0,s:Hh,u:V8,y:Wh},hT=Hh?/[^dgimsuy]+/g:/[^dgimuy]+/g;function W8(e,t,r,n,u){if(e[_t]={captureNames:t},u)return e;if(e.__proto__)e.__proto__=Z.prototype;else for(const s in Z.prototype)e[s]=Z.prototype[s];return e[_t].source=r,e[_t].flags=n&&n.split("").sort().join(""),e}function Bi(e){return e.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function ro(e,t){if(!Z.isRegExp(e))throw new TypeError("Type RegExp expected");const r=e[_t]||{};let n=mT(e),u="",s="",o=null,a=null;return t=t||{},t.removeG&&(s+="g"),t.removeY&&(s+="y"),s&&(n=n.replace(new RegExp(`[${s}]+`,"g"),"")),t.addG&&(u+="g"),t.addY&&(u+="y"),u&&(n=Bi(n+u)),t.isInternalOnly||(r.source!==void 0&&(o=r.source),r.flags!=null&&(a=u?Bi(r.flags+u):r.flags)),e=W8(new RegExp(t.source||e.source,n),ET(e)?r.captureNames.slice(0):null,o,a,t.isInternalOnly),e}function J8(e){return parseInt(e,16)}function z8(e,t,r){const n=e.index+e[0].length,u=e.input[e.index-1],s=e.input[n];return/^[()|]$/.test(u)||/^[()|]$/.test(s)||e.index===0||n===e.input.length||/\(\?(?:[:=!]|<[=!])$/.test(e.input.substring(e.index-4,e.index))||yT(e.input,n,r)?"":"(?:)"}function mT(e){return fT?e.flags:/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(e))[1]}function ET(e){return!!(e[_t]&&e[_t].captureNames)}function Jh(e){return parseInt(e,10).toString(16)}function yT(e,t,r){const n="\\(\\?#[^)]*\\)",u="#[^#\\n]*",s="[?*+]|{\\d+(?:,\\d*)?}";return(r.includes("x")?new RegExp(`^(?:\\s|${u}|${n})*(?:${s})`):new RegExp(`^(?:${n})*(?:${s})`)).test(e.slice(t))}function Ul(e,t){return Object.prototype.toString.call(e)===`[object ${t}]`}function Ca(e){if(e==null)throw new TypeError("Cannot convert null or undefined to object");return e}function zh(e){for(;e.length<4;)e=`0${e}`;return e}function vT(e,t){if(Bi(t)!==t)throw new SyntaxError(`Invalid duplicate regex flag ${t}`);e=e.replace(/^\(\?([\w$]+)\)/,(r,n)=>{if(/[dgy]/.test(n))throw new SyntaxError(`Cannot use flags dgy in mode modifier ${r}`);return t=Bi(t+n),""});for(const r of t)if(!H8[r])throw new SyntaxError(`Unknown regex flag ${r}`);return{pattern:e,flags:t}}function K8(e){const t={};return Ul(e,"String")?(Z.forEach(e,/[^\s,]+/,r=>{t[r]=!0}),t):e}function gy(e){if(!/^[\w$]$/.test(e))throw new Error("Flag must be a single character A-Za-z0-9_$");H8[e]=!0}function gT(e,t,r,n,u){let s=S2.length;const o=e[r];let a=null,i,c;for(;s--;)if(c=S2[s],!(c.leadChar&&c.leadChar!==o||c.scope!==n&&c.scope!=="all"||c.flag&&!t.includes(c.flag))&&(i=Z.exec(e,c.regex,r,"sticky"),i)){a={matchLength:i[0].length,output:c.handler.call(u,i,n,t),reparse:c.reparse};break}return a}function X8(e){Ws.astral=e}function Y8(e){Ws.namespacing=e}function Z(e,t){if(Z.isRegExp(e)){if(t!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return ro(e)}if(e=e===void 0?"":String(e),t=t===void 0?"":String(t),Z.isInstalled("astral")&&!t.includes("A")&&(t+="A"),Go[e]||(Go[e]={}),!Go[e][t]){const n={hasNamedCapture:!1,captureNames:[]};let u=ta,s="",o=0,a;const i=vT(e,t);let c=i.pattern;const l=i.flags;for(;o{r=r||{};let{optionalFlags:n}=r;if(r.flag&&gy(r.flag),n){n=n.split("");for(const u of n)gy(u)}S2.push({regex:ro(e,{addG:!0,addY:Wh,isInternalOnly:!0}),handler:t,scope:r.scope||ta,flag:r.flag,reparse:r.reparse,leadChar:r.leadChar}),Z.cache.flush("patterns")};Z.cache=(e,t)=>(ni[e]||(ni[e]={}),ni[e][t]||(ni[e][t]=Z(e,t)));Z.cache.flush=e=>{e==="patterns"?Go={}:ni={}};Z.escape=e=>String(Ca(e)).replace(/[\\\[\]{}()*+?.^$|]/g,"\\$&").replace(/[\s#\-,]/g,t=>`\\u${zh(Jh(t.charCodeAt(0)))}`);Z.exec=(e,t,r,n)=>{let u="g",s=!1,o=!1,a;s=Wh&&!!(n||t.sticky&&n!==!1),s?u+="y":n&&(o=!0,u+="FakeY"),t[_t]=t[_t]||{};const i=t[_t][u]||(t[_t][u]=ro(t,{addG:!0,addY:s,source:o?`${t.source}|()`:void 0,removeY:n===!1,isInternalOnly:!0}));return r=r||0,i.lastIndex=r,a=Qn.exec.call(i,e),o&&a&&a.pop()===""&&(a=null),t.global&&(t.lastIndex=a?i.lastIndex:0),a};Z.forEach=(e,t,r)=>{let n=0,u=-1,s;for(;s=Z.exec(e,t,n);)r(s,++u,e,t),n=s.index+(s[0].length||1)};Z.globalize=e=>ro(e,{addG:!0});Z.install=e=>{e=K8(e),!Ws.astral&&e.astral&&X8(!0),!Ws.namespacing&&e.namespacing&&Y8(!0)};Z.isInstalled=e=>!!Ws[e];Z.isRegExp=e=>Object.prototype.toString.call(e)==="[object RegExp]";Z.match=(e,t,r)=>{const n=t.global&&r!=="one"||r==="all",u=(n?"g":"")+(t.sticky?"y":"")||"noGY";t[_t]=t[_t]||{};const s=t[_t][u]||(t[_t][u]=ro(t,{addG:!!n,removeG:r==="one",isInternalOnly:!0})),o=String(Ca(e)).match(s);return t.global&&(t.lastIndex=r==="one"&&o?o.index+o[0].length:0),n?o||[]:o&&o[0]};Z.matchChain=(e,t)=>function r(n,u){const s=t[u].regex?t[u]:{regex:t[u]},o=[];function a(i){if(s.backref){const c=`Backreference to undefined group: ${s.backref}`,l=isNaN(s.backref);if(l&&Z.isInstalled("namespacing")){if(!(i.groups&&s.backref in i.groups))throw new ReferenceError(c)}else if(!i.hasOwnProperty(s.backref))throw new ReferenceError(c);const p=l&&Z.isInstalled("namespacing")?i.groups[s.backref]:i[s.backref];o.push(p||"")}else o.push(i[0])}for(const i of n)Z.forEach(i,s.regex,a);return u===t.length-1||!o.length?o:r(o,u+1)}([e],0);Z.replace=(e,t,r,n)=>{const u=Z.isRegExp(t),s=t.global&&n!=="one"||n==="all",o=(s?"g":"")+(t.sticky?"y":"")||"noGY";let a=t;u?(t[_t]=t[_t]||{},a=t[_t][o]||(t[_t][o]=ro(t,{addG:!!s,removeG:n==="one",isInternalOnly:!0}))):s&&(a=new RegExp(Z.escape(String(t)),"g"));const i=Qn.replace.call(Ca(e),a,r);return u&&t.global&&(t.lastIndex=0),i};Z.replaceEach=(e,t)=>{for(const r of t)e=Z.replace(e,r[0],r[1],r[2]);return e};Z.split=(e,t,r)=>Qn.split.call(Ca(e),t,r);Z.test=(e,t,r,n)=>!!Z.exec(e,t,r,n);Z.uninstall=e=>{e=K8(e),Ws.astral&&e.astral&&X8(!1),Ws.namespacing&&e.namespacing&&Y8(!1)};Z.union=(e,t,r)=>{r=r||{};const n=r.conjunction||"or";let u=0,s,o;function a(p,d,f){const h=o[u-s];if(d){if(++u,h)return`(?<${h}>`}else if(f)return`\\${+f+s}`;return p}if(!(Ul(e,"Array")&&e.length))throw new TypeError("Must provide a nonempty array of patterns to merge");const i=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,c=[];for(const p of e)Z.isRegExp(p)?(s=u,o=p[_t]&&p[_t].captureNames||[],c.push(Z(p.source).source.replace(i,a))):c.push(Z.escape(p));const l=n==="none"?"":"|";return Z(c.join(l),t)};Qn.exec=function(e){const t=this.lastIndex,r=RegExp.prototype.exec.apply(this,arguments);if(r){if(!dT&&r.length>1&&r.includes("")){const n=ro(this,{removeG:!0,isInternalOnly:!0});String(e).slice(r.index).replace(n,(...u)=>{const s=u.length;for(let o=1;or.index&&(this.lastIndex=r.index)}return this.global||(this.lastIndex=t),r};Qn.test=function(e){return!!Qn.exec.call(this,e)};Qn.match=function(e){if(!Z.isRegExp(e))e=new RegExp(e);else if(e.global){const t=String.prototype.match.apply(this,arguments);return e.lastIndex=0,t}return Qn.exec.call(e,Ca(this))};Qn.replace=function(e,t){const r=Z.isRegExp(e);let n,u,s;return r?(e[_t]&&({captureNames:u}=e[_t]),n=e.lastIndex):e+="",Ul(t,"Function")?s=String(this).replace(e,(...o)=>{if(u){let a;Z.isInstalled("namespacing")?(a=Object.create(null),o.push(a)):(o[0]=new String(o[0]),[a]=o);for(let i=0;i{return String(t).replace(pT,a);function a(i,c,l,p){c=c||l;const d=Ul(o[o.length-1],"Object")?4:3,f=o.length-d;if(c){if(/^\d+$/.test(c)){const y=+c;if(y<=f)return o[y]||""}const h=u?u.indexOf(c):-1;if(h<0)throw new SyntaxError(`Backreference to undefined group ${i}`);return o[h+1]||""}if(p===""||p===" ")throw new SyntaxError(`Invalid token ${i}`);if(p==="&"||+p==0)return o[0];if(p==="$")return"$";if(p==="`")return o[o.length-1].slice(0,o[o.length-2]);if(p==="'")return o[o.length-1].slice(o[o.length-2]+o[0].length);if(p=+p,!isNaN(p)){if(p>f)throw new SyntaxError(`Backreference to undefined group ${i}`);return o[p]||""}throw new SyntaxError(`Invalid token ${i}`)}}),r&&(e.global?e.lastIndex=0:e.lastIndex=n),s};Qn.split=function(e,t){if(!Z.isRegExp(e))return String.prototype.split.apply(this,arguments);const r=String(this),n=[],u=e.lastIndex;let s=0,o;return t=(t===void 0?-1:t)>>>0,Z.forEach(r,e,a=>{a.index+a[0].length>s&&(n.push(r.slice(s,a.index)),a.length>1&&a.indext?n.slice(0,t):n};Z.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,(e,t)=>{if(e[1]==="B"&&t===ta)return e[0];throw new SyntaxError(`Invalid escape ${e[0]}`)},{scope:"all",leadChar:"\\"});Z.addToken(/\\u{([\dA-Fa-f]+)}/,(e,t,r)=>{const n=J8(e[1]);if(n>1114111)throw new SyntaxError(`Invalid Unicode code point ${e[0]}`);if(n<=65535)return`\\u${zh(Jh(n))}`;if(V8&&r.includes("u"))return e[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")},{scope:"all",leadChar:"\\"});Z.addToken(/\(\?#[^)]*\)/,z8,{leadChar:"("});Z.addToken(/\s+|#[^\n]*\n?/,z8,{flag:"x"});Hh||Z.addToken(/\./,()=>"[\\s\\S]",{flag:"s",leadChar:"."});Z.addToken(/\\k<([^>]+)>/,function(e){const t=isNaN(e[1])?this.captureNames.indexOf(e[1])+1:+e[1],r=e.index+e[0].length;if(!t||t>this.captureNames.length)throw new SyntaxError(`Backreference to undefined group ${e[0]}`);return`\\${t}${r===e.input.length||isNaN(e.input[r])?"":"(?:)"}`},{leadChar:"\\"});Z.addToken(/\\(\d+)/,function(e,t){if(!(t===ta&&/^[1-9]/.test(e[1])&&+e[1]<=this.captureNames.length)&&e[1]!=="0")throw new SyntaxError(`Cannot use octal escape or backreference to undefined group ${e[0]}`);return e[0]},{scope:"all",leadChar:"\\"});Z.addToken(/\(\?P?<([\p{ID_Start}$_][\p{ID_Continue}$_\u200C\u200D]*)>/u,function(e){if(!Z.isInstalled("namespacing")&&(e[1]==="length"||e[1]==="__proto__"))throw new SyntaxError(`Cannot use reserved word as capture name ${e[0]}`);if(this.captureNames.includes(e[1]))throw new SyntaxError(`Cannot use same name for multiple groups ${e[0]}`);return this.captureNames.push(e[1]),this.hasNamedCapture=!0,"("},{leadChar:"("});Z.addToken(/\((?!\?)/,function(e,t,r){return r.includes("n")?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n",leadChar:"("});/*! * XRegExp.build 5.1.1 * * Steven Levithan (c) 2012-present MIT License - */const kB=e=>{const t="xregexp",r=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,n=e.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,r],"g",{conjunction:"or"});function u(c){const l=/^(?:\(\?:\))*\^/,p=/\$(?:\(\?:\))*$/;return l.test(c)&&p.test(c)&&p.test(c.replace(/\\[\s\S]/g,""))?c.replace(l,"").replace(p,""):c}function s(c,l){const p=l?"x":"";return e.isRegExp(c)?c[t]&&c[t].captureNames?c:e(c.source,p):e(c,p)}function o(c){return c instanceof RegExp?c:e.escape(c)}function a(c,l,p){return c[`subpattern${p}`]=l,c}function i(c,l,p){const f=l(l,...p)=>{const f=p.map(o).reduce(a,{}),d=l.raw.map(i).join("");return e.build(d,f,c)},e.build=(c,l,p)=>{p=p||"";const f=p.includes("x"),d=/^\(\?([\w$]+)\)/.exec(c);d&&(p=e._clipDuplicates(p+d[1]));const h={};for(const $ in l)if(l.hasOwnProperty($)){const I=s(l[$],f);h[$]={pattern:u(I.source),names:I[t].captureNames||[]}}const E=s(c,f);let A=0,m,y=0;const F=[0],B=E[t].captureNames||[],P=E.source.replace(n,($,I,U,j,W)=>{const te=I||U;let Y,oe,ie;if(te){if(!h.hasOwnProperty(te))throw new ReferenceError(`Undefined property ${$}`);I?(Y=B[y],F[++y]=++A,oe=`(?<${Y||te}>`):oe="(?:",m=A;const fe=h[te].pattern.replace(r,(De,de,Ce)=>{if(de){if(Y=h[te].names[A-m],++A,Y)return`(?<${Y}>`}else if(Ce)return ie=+Ce-1,h[te].names[ie]?`\\k<${h[te].names[ie]}>`:`\\${+Ce+m}`;return De});return`${oe}${fe})`}if(j){if(Y=B[y],F[++y]=++A,Y)return`(?<${Y}>`}else if(W)return ie=+W-1,B[ie]?`\\k<${B[ie]}>`:`\\${F[+W]}`;return $});return e(P,p)}};/*! + */const AT=e=>{const t="xregexp",r=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,n=e.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,r],"g",{conjunction:"or"});function u(c){const l=/^(?:\(\?:\))*\^/,p=/\$(?:\(\?:\))*$/;return l.test(c)&&p.test(c)&&p.test(c.replace(/\\[\s\S]/g,""))?c.replace(l,"").replace(p,""):c}function s(c,l){const p=l?"x":"";return e.isRegExp(c)?c[t]&&c[t].captureNames?c:e(c.source,p):e(c,p)}function o(c){return c instanceof RegExp?c:e.escape(c)}function a(c,l,p){return c[`subpattern${p}`]=l,c}function i(c,l,p){const d=l(l,...p)=>{const d=p.map(o).reduce(a,{}),f=l.raw.map(i).join("");return e.build(f,d,c)},e.build=(c,l,p)=>{p=p||"";const d=p.includes("x"),f=/^\(\?([\w$]+)\)/.exec(c);f&&(p=e._clipDuplicates(p+f[1]));const h={};for(const N in l)if(l.hasOwnProperty(N)){const R=s(l[N],d);h[N]={pattern:u(R.source),names:R[t].captureNames||[]}}const y=s(c,d);let A=0,m,v=0;const C=[0],B=y[t].captureNames||[],T=y.source.replace(n,(N,R,J,q,G)=>{const ee=R||J;let K,ue,oe;if(ee){if(!h.hasOwnProperty(ee))throw new ReferenceError(`Undefined property ${N}`);R?(K=B[v],C[++v]=++A,ue=`(?<${K||ee}>`):ue="(?:",m=A;const de=h[ee].pattern.replace(r,(he,fe,ge)=>{if(fe){if(K=h[ee].names[A-m],++A,K)return`(?<${K}>`}else if(ge)return oe=+ge-1,h[ee].names[oe]?`\\k<${h[ee].names[oe]}>`:`\\${+ge+m}`;return he});return`${ue}${de})`}if(q){if(K=B[v],C[++v]=++A,K)return`(?<${K}>`}else if(G)return oe=+G-1,B[oe]?`\\k<${B[oe]}>`:`\\${C[+G]}`;return N});return e(T,p)}};/*! * XRegExp.matchRecursive 5.1.1 * * Steven Levithan (c) 2009-present MIT License - */const IB=e=>{function t(r,n,u,s){return{name:r,value:n,start:u,end:s}}e.matchRecursive=(r,n,u,s,o)=>{s=s||"",o=o||{};const a=s.includes("g"),i=s.includes("y"),c=s.replace(/y/g,"");n=e(n,c),u=e(u,c);let l,{escapeChar:p}=o;if(p){if(p.length>1)throw new Error("Cannot use more than one escape character");p=e.escape(p),l=new RegExp(`(?:${p}[\\S\\s]|(?:(?!${e.union([n,u],"",{conjunction:"or"}).source})[^${p}])+)+`,s.replace(e._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}let f=0,d=0,h=0,E=0,A,m,y,F;const B=o.valueNames,P=[];for(;;){if(p&&(h+=(e.exec(r,l,h,"sticky")||[""])[0].length),y=e.exec(r,n,h),F=e.exec(r,u,h),y&&F&&(y.index<=F.index?F=null:y=null),y||F)d=(y||F).index,h=d+(y||F)[0].length;else if(!f)break;if(i&&!f&&d>E)break;if(y)f||(A=d,m=h),f+=1;else if(F&&f){if(f-=1,!f&&(B?(B[0]&&A>E&&P.push(t(B[0],r.slice(E,A),E,A)),B[1]&&P.push(t(B[1],r.slice(A,m),A,m)),B[2]&&P.push(t(B[2],r.slice(m,d),m,d)),B[3]&&P.push(t(B[3],r.slice(d,h),d,h))):P.push(r.slice(m,d)),E=h,!a))break}else{const $=o.unbalanced||"error";if($==="skip"||$==="skip-lazy")if(F)F=null;else{if($==="skip"){const I=e.exec(r,n,A,"sticky")[0].length;h=A+(I||1)}else h=A+1;f=0}else if($==="error"){const I=F?"right":"left",U=F?d:A;throw new Error(`Unbalanced ${I} delimiter found in string at position ${U}`)}else throw new Error(`Unsupported value for unbalanced: ${$}`)}d===h&&(h+=1)}return a&&P.length>0&&!i&&B&&B[0]&&r.length>E&&P.push(t(B[0],r.slice(E),E,r.length)),P}};/*! + */const FT=e=>{function t(r,n,u,s){return{name:r,value:n,start:u,end:s}}e.matchRecursive=(r,n,u,s,o)=>{s=s||"",o=o||{};const a=s.includes("g"),i=s.includes("y"),c=s.replace(/y/g,"");n=e(n,c),u=e(u,c);let l,{escapeChar:p}=o;if(p){if(p.length>1)throw new Error("Cannot use more than one escape character");p=e.escape(p),l=new RegExp(`(?:${p}[\\S\\s]|(?:(?!${e.union([n,u],"",{conjunction:"or"}).source})[^${p}])+)+`,s.replace(e._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}let d=0,f=0,h=0,y=0,A,m,v,C;const B=o.valueNames,T=[];for(;;){if(p&&(h+=(e.exec(r,l,h,"sticky")||[""])[0].length),v=e.exec(r,n,h),C=e.exec(r,u,h),v&&C&&(v.index<=C.index?C=null:v=null),v||C)f=(v||C).index,h=f+(v||C)[0].length;else if(!d)break;if(i&&!d&&f>y)break;if(v)d||(A=f,m=h),d+=1;else if(C&&d){if(d-=1,!d&&(B?(B[0]&&A>y&&T.push(t(B[0],r.slice(y,A),y,A)),B[1]&&T.push(t(B[1],r.slice(A,m),A,m)),B[2]&&T.push(t(B[2],r.slice(m,f),m,f)),B[3]&&T.push(t(B[3],r.slice(f,h),f,h))):T.push(r.slice(m,f)),y=h,!a))break}else{const N=o.unbalanced||"error";if(N==="skip"||N==="skip-lazy")if(C)C=null;else{if(N==="skip"){const R=e.exec(r,n,A,"sticky")[0].length;h=A+(R||1)}else h=A+1;d=0}else if(N==="error"){const R=C?"right":"left",J=C?f:A;throw new Error(`Unbalanced ${R} delimiter found in string at position ${J}`)}else throw new Error(`Unsupported value for unbalanced: ${N}`)}f===h&&(h+=1)}return a&&T.length>0&&!i&&B&&B[0]&&r.length>y&&T.push(t(B[0],r.slice(y),y,r.length)),T}};/*! * XRegExp Unicode Base 5.1.1 * * Steven Levithan (c) 2008-present MIT License - */const NB=e=>{const t={},r={},n=e._dec,u=e._hex,s=e._pad4;function o(f){return f.replace(/[- _]+/g,"").toLowerCase()}function a(f){const d=/^\\[xu](.+)/.exec(f);return d?n(d[1]):f.charCodeAt(f[0]==="\\"?1:0)}function i(f){let d="",h=-1;return e.forEach(f,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,E=>{const A=a(E[1]);A>h+1&&(d+=`\\u${s(u(h+1))}`,A>h+2&&(d+=`-\\u${s(u(A-1))}`)),h=a(E[2]||E[1])}),h<65535&&(d+=`\\u${s(u(h+1))}`,h<65534&&(d+="-\\uFFFF")),d}function c(f){const d="b!";return t[f][d]||(t[f][d]=i(t[f].bmp))}function l(f,d){const h=t[f];let E="";return h.bmp&&!h.isBmpLast&&(E=`[${h.bmp}]${h.astral?"|":""}`),h.astral&&(E+=h.astral),h.isBmpLast&&h.bmp&&(E+=`${h.astral?"|":""}[${h.bmp}]`),d?`(?:(?!${E})(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-￿]))`:`(?:${E})`}function p(f,d){const h=d?"a!":"a=";return t[f][h]||(t[f][h]=l(f,d))}e.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(f,d,h)=>{const E="Invalid double negation ",A="Unknown Unicode token ",m="Unicode token missing data ",y="Astral mode required for Unicode token ",F="Astral mode does not support Unicode tokens within character classes",[B,P,$,I,U,j]=f;let W=P==="P"||!!$;const te=h.includes("A");let Y=o(j||U),oe=t[Y];if(P==="P"&&$)throw new SyntaxError(E+B);if(!t.hasOwnProperty(Y))throw new SyntaxError(A+B);if(I&&!(r[I]&&r[I][Y]))throw new SyntaxError(A+B);if(oe.inverseOf){if(Y=o(oe.inverseOf),!t.hasOwnProperty(Y))throw new ReferenceError(`${m+B} -> ${oe.inverseOf}`);oe=t[Y],W=!W}if(!(oe.bmp||te))throw new SyntaxError(y+B);if(te){if(d==="class")throw new SyntaxError(F);return p(Y,W)}return d==="class"?W?c(Y):oe.bmp:`${(W?"[^":"[")+oe.bmp}]`},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=(f,d)=>{const h="Unicode token requires name",E="Unicode token has no character data ";d&&(r[d]={});for(const A of f){if(!A.name)throw new Error(h);if(!(A.inverseOf||A.bmp||A.astral))throw new Error(E+A.name);const m=o(A.name);if(t[m]=A,d&&(r[d][m]=!0),A.alias){const y=o(A.alias);t[y]=A,d&&(r[d][y]=!0)}}e.cache.flush("patterns")},e._getUnicodeProperty=f=>{const d=o(f);return t[d]}};var Ys=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function S8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function qB(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var u=[null];u.push.apply(u,arguments);var s=Function.bind.apply(t,u);return new s}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),r}var xB=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCBD\uDCC3-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\uFEFF-",astral:"\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCC3-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F\uDC39-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD00-\uDD43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD838[\uDD37-\uDD3D]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF4A\uDF50]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|𝼊|\uD838[\uDD00-\uDD2C\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD30-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C\uDFC0-\uDFD4]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\uD807[\uDFDD-\uDFE0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\uD83C[\uDFFB-\uDFFF]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFDC\uDFE1-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|𞅏|\uD83B[\uDCAC\uDD2E]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}];/*! + */const CT=e=>{const t={},r={},n=e._dec,u=e._hex,s=e._pad4;function o(d){return d.replace(/[- _]+/g,"").toLowerCase()}function a(d){const f=/^\\[xu](.+)/.exec(d);return f?n(f[1]):d.charCodeAt(d[0]==="\\"?1:0)}function i(d){let f="",h=-1;return e.forEach(d,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,y=>{const A=a(y[1]);A>h+1&&(f+=`\\u${s(u(h+1))}`,A>h+2&&(f+=`-\\u${s(u(A-1))}`)),h=a(y[2]||y[1])}),h<65535&&(f+=`\\u${s(u(h+1))}`,h<65534&&(f+="-\\uFFFF")),f}function c(d){const f="b!";return t[d][f]||(t[d][f]=i(t[d].bmp))}function l(d,f){const h=t[d];let y="";return h.bmp&&!h.isBmpLast&&(y=`[${h.bmp}]${h.astral?"|":""}`),h.astral&&(y+=h.astral),h.isBmpLast&&h.bmp&&(y+=`${h.astral?"|":""}[${h.bmp}]`),f?`(?:(?!${y})(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-￿]))`:`(?:${y})`}function p(d,f){const h=f?"a!":"a=";return t[d][h]||(t[d][h]=l(d,f))}e.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,(d,f,h)=>{const y="Invalid double negation ",A="Unknown Unicode token ",m="Unicode token missing data ",v="Astral mode required for Unicode token ",C="Astral mode does not support Unicode tokens within character classes",[B,T,N,R,J,q]=d;let G=T==="P"||!!N;const ee=h.includes("A");let K=o(q||J),ue=t[K];if(T==="P"&&N)throw new SyntaxError(y+B);if(!t.hasOwnProperty(K))throw new SyntaxError(A+B);if(R&&!(r[R]&&r[R][K]))throw new SyntaxError(A+B);if(ue.inverseOf){if(K=o(ue.inverseOf),!t.hasOwnProperty(K))throw new ReferenceError(`${m+B} -> ${ue.inverseOf}`);ue=t[K],G=!G}if(!(ue.bmp||ee))throw new SyntaxError(v+B);if(ee){if(f==="class")throw new SyntaxError(C);return p(K,G)}return f==="class"?G?c(K):ue.bmp:`${(G?"[^":"[")+ue.bmp}]`},{scope:"all",optionalFlags:"A",leadChar:"\\"}),e.addUnicodeData=(d,f)=>{const h="Unicode token requires name",y="Unicode token has no character data ";f&&(r[f]={});for(const A of d){if(!A.name)throw new Error(h);if(!(A.inverseOf||A.bmp||A.astral))throw new Error(y+A.name);const m=o(A.name);if(t[m]=A,f&&(r[f][m]=!0),A.alias){const v=o(A.alias);t[v]=A,f&&(r[f][v]=!0)}}e.cache.flush("patterns")},e._getUnicodeProperty=d=>{const f=o(d);return t[f]}};var Vs=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Z8(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function bT(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function n(){if(this instanceof n){var u=[null];u.push.apply(u,arguments);var s=Function.bind.apply(t,u);return new s}return t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(n){var u=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,u.get?u:{enumerable:!0,get:function(){return e[n]}})}),r}var ST=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCBD\uDCC3-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\uFEFF-",astral:"\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCC3-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F\uDC39-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD00-\uDD43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD838[\uDD37-\uDD3D]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF4A\uDF50]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|𝼊|\uD838[\uDD00-\uDD2C\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD30-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C\uDFC0-\uDFD4]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\uD807[\uDFDD-\uDFE0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\uD83C[\uDFFB-\uDFFF]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFDC\uDFE1-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|𞅏|\uD83B[\uDCAC\uDD2E]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}];/*! * XRegExp Unicode Categories 5.1.1 * * Steven Levithan (c) 2010-present MIT License * Unicode data by Mathias Bynens - */const RB=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData(xB)};var jB=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC45\uDC71-\uDC75\uDC82-\uDCB8\uDCC2\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD47\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDCE\uDDCF\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDEB8\uDF00-\uDF1A\uDF1D-\uDF2A\uDF40-\uDF46]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B\uDD3C\uDD3F-\uDD42\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDDF\uDDE1\uDDE3\uDDE4\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE97\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\uD800-\uDBFF][\uDC00-\uDFFF]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\uFEFFᅠ￰-￸",astral:"\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDF80\uDF83-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]"},{name:"White_Space",bmp:" -\r …   - \u2028\u2029   "}];/*! + */const wT=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");e.addUnicodeData(ST)};var _T=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC45\uDC71-\uDC75\uDC82-\uDCB8\uDCC2\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD47\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDCE\uDDCF\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDEB8\uDF00-\uDF1A\uDF1D-\uDF2A\uDF40-\uDF46]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B\uDD3C\uDD3F-\uDD42\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDDF\uDDE1\uDDE3\uDDE4\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE97\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\uD800-\uDBFF][\uDC00-\uDFFF]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\uFEFFᅠ￰-￸",astral:"\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDF80\uDF83-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]"},{name:"White_Space",bmp:" -\r …   - \u2028\u2029   "}];/*! * XRegExp Unicode Properties 5.1.1 * * Steven Levithan (c) 2012-present MIT License * Unicode data by Mathias Bynens - */const MB=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");const t=jB;t.push({name:"Assigned",inverseOf:"Cn"}),e.addUnicodeData(t)};var LB=[{name:"Adlam",astral:"\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]"},{name:"Ahom",astral:"\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF46]"},{name:"Anatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\uD802[\uDF00-\uDF35\uDF39-\uDF3F]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\uD81A[\uDC00-\uDE38]"},{name:"Bassa_Vah",astral:"\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\uD804[\uDC00-\uDC4D\uDC52-\uDC75\uDC7F]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\uD806[\uDEB0-\uDEBF]"},{name:"Carian",astral:"\uD800[\uDEA0-\uDED0]"},{name:"Caucasian_Albanian",astral:"\uD801[\uDD30-\uDD63\uDD6F]"},{name:"Chakma",astral:"\uD804[\uDD00-\uDD34\uDD36-\uDD47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\uD803[\uDFB0-\uDFCB]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\uFEFF!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9C\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4\uDD01-\uDD3D]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDDAD\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA\uDFF0-\uDFF9]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]"},{name:"Cypriot",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]"},{name:"Cypro_Minoan",astral:"\uD80B[\uDF90-\uDFF2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\uD801[\uDC00-\uDC4F]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD46\uDD50-\uDD59]"},{name:"Dogra",astral:"\uD806[\uDC00-\uDC3B]"},{name:"Duployan",astral:"\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]"},{name:"Egyptian_Hieroglyphs",astral:"\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E\uDC30-\uDC38]"},{name:"Elbasan",astral:"\uD801[\uDD00-\uDD27]"},{name:"Elymaic",astral:"\uD803[\uDFE0-\uDFF6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]"},{name:"Gothic",astral:"\uD800[\uDF30-\uDF4A]"},{name:"Grantha",astral:"\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\uD803[\uDD00-\uDD27\uDD30-\uDD39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\uD82C[\uDC01-\uDD1F\uDD50-\uDD52]|🈀"},{name:"Imperial_Aramaic",astral:"\uD802[\uDC40-\uDC55\uDC57-\uDC5F]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\uD800[\uDDFD\uDEE0]|𑌻|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]"},{name:"Inscriptional_Pahlavi",astral:"\uD802[\uDF60-\uDF72\uDF78-\uDF7F]"},{name:"Inscriptional_Parthian",astral:"\uD802[\uDF40-\uDF55\uDF58-\uDF5F]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\uD804[\uDC80-\uDCC2\uDCCD]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD64-\uDD67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]"},{name:"Khitan_Small_Script",astral:"𖿤|\uD822[\uDF00-\uDFFF]|\uD823[\uDC00-\uDCD5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\uD804[\uDE00-\uDE11\uDE13-\uDE3E]"},{name:"Khudawadi",astral:"\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]"},{name:"Linear_B",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\uD800[\uDE80-\uDE9C]"},{name:"Lydian",astral:"\uD802[\uDD20-\uDD39\uDD3F]"},{name:"Mahajani",astral:"\uD804[\uDD50-\uDD76]"},{name:"Makasar",astral:"\uD807[\uDEE0-\uDEF8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]"},{name:"Marchen",astral:"\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]"},{name:"Masaram_Gondi",astral:"\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]"},{name:"Medefaidrin",astral:"\uD81B[\uDE40-\uDE9A]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]"},{name:"Meroitic_Cursive",astral:"\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]"},{name:"Meroitic_Hieroglyphs",astral:"\uD802[\uDD80-\uDD9F]"},{name:"Miao",astral:"\uD81B[\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F]"},{name:"Modi",astral:"\uD805[\uDE00-\uDE44\uDE50-\uDE59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\uD805[\uDE60-\uDE6C]"},{name:"Mro",astral:"\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]"},{name:"Multani",astral:"\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]"},{name:"Nandinagari",astral:"\uD806[\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\uD805[\uDC00-\uDC5B\uDC5D-\uDC61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\uD82C[\uDD70-\uDEFB]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\uD838[\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDD4F]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]"},{name:"Old_Italic",astral:"\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]"},{name:"Old_North_Arabian",astral:"\uD802[\uDE80-\uDE9F]"},{name:"Old_Permic",astral:"\uD800[\uDF50-\uDF7A]"},{name:"Old_Persian",astral:"\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]"},{name:"Old_Sogdian",astral:"\uD803[\uDF00-\uDF27]"},{name:"Old_South_Arabian",astral:"\uD802[\uDE60-\uDE7F]"},{name:"Old_Turkic",astral:"\uD803[\uDC00-\uDC48]"},{name:"Old_Uyghur",astral:"\uD803[\uDF70-\uDF89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]"},{name:"Osmanya",astral:"\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]"},{name:"Pahawh_Hmong",astral:"\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]"},{name:"Palmyrene",astral:"\uD802[\uDC60-\uDC7F]"},{name:"Pau_Cin_Hau",astral:"\uD806[\uDEC0-\uDEF8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\uD802[\uDD00-\uDD1B\uDD1F]"},{name:"Psalter_Pahlavi",astral:"\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\uD804[\uDD80-\uDDDF]"},{name:"Shavian",astral:"\uD801[\uDC50-\uDC7F]"},{name:"Siddham",astral:"\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]"},{name:"SignWriting",astral:"\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\uD804[\uDDE1-\uDDF4]"},{name:"Sogdian",astral:"\uD803[\uDF30-\uDF59]"},{name:"Sora_Sompeng",astral:"\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]"},{name:"Soyombo",astral:"\uD806[\uDE50-\uDEA2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\uD805[\uDE80-\uDEB9\uDEC0-\uDEC9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\uD807[\uDFC0-\uDFF1\uDFFF]"},{name:"Tangsa",astral:"\uD81A[\uDE70-\uDEBE\uDEC0-\uDEC9]"},{name:"Tangut",astral:"𖿠|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEFF]|\uD823[\uDD00-\uDD08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]"},{name:"Toto",astral:"\uD838[\uDE90-\uDEAE]"},{name:"Ugaritic",astral:"\uD800[\uDF80-\uDF9D\uDF9F]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\uD801[\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]"},{name:"Wancho",astral:"\uD838[\uDEC0-\uDEF9\uDEFF]"},{name:"Warang_Citi",astral:"\uD806[\uDCA0-\uDCF2\uDCFF]"},{name:"Yezidi",astral:"\uD803[\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\uD806[\uDE00-\uDE47]"}];/*! + */const BT=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");const t=_T;t.push({name:"Assigned",inverseOf:"Cn"}),e.addUnicodeData(t)};var TT=[{name:"Adlam",astral:"\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]"},{name:"Ahom",astral:"\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF46]"},{name:"Anatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\uD802[\uDF00-\uDF35\uDF39-\uDF3F]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\uD81A[\uDC00-\uDE38]"},{name:"Bassa_Vah",astral:"\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\uD804[\uDC00-\uDC4D\uDC52-\uDC75\uDC7F]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\uD806[\uDEB0-\uDEBF]"},{name:"Carian",astral:"\uD800[\uDEA0-\uDED0]"},{name:"Caucasian_Albanian",astral:"\uD801[\uDD30-\uDD63\uDD6F]"},{name:"Chakma",astral:"\uD804[\uDD00-\uDD34\uDD36-\uDD47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\uD803[\uDFB0-\uDFCB]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\uFEFF!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9C\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4\uDD01-\uDD3D]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDDAD\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA\uDFF0-\uDFF9]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]"},{name:"Cypriot",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]"},{name:"Cypro_Minoan",astral:"\uD80B[\uDF90-\uDFF2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\uD801[\uDC00-\uDC4F]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD46\uDD50-\uDD59]"},{name:"Dogra",astral:"\uD806[\uDC00-\uDC3B]"},{name:"Duployan",astral:"\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]"},{name:"Egyptian_Hieroglyphs",astral:"\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E\uDC30-\uDC38]"},{name:"Elbasan",astral:"\uD801[\uDD00-\uDD27]"},{name:"Elymaic",astral:"\uD803[\uDFE0-\uDFF6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]"},{name:"Gothic",astral:"\uD800[\uDF30-\uDF4A]"},{name:"Grantha",astral:"\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\uD803[\uDD00-\uDD27\uDD30-\uDD39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\uD82C[\uDC01-\uDD1F\uDD50-\uDD52]|🈀"},{name:"Imperial_Aramaic",astral:"\uD802[\uDC40-\uDC55\uDC57-\uDC5F]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\uD800[\uDDFD\uDEE0]|𑌻|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]"},{name:"Inscriptional_Pahlavi",astral:"\uD802[\uDF60-\uDF72\uDF78-\uDF7F]"},{name:"Inscriptional_Parthian",astral:"\uD802[\uDF40-\uDF55\uDF58-\uDF5F]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\uD804[\uDC80-\uDCC2\uDCCD]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD64-\uDD67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]"},{name:"Khitan_Small_Script",astral:"𖿤|\uD822[\uDF00-\uDFFF]|\uD823[\uDC00-\uDCD5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\uD804[\uDE00-\uDE11\uDE13-\uDE3E]"},{name:"Khudawadi",astral:"\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]"},{name:"Linear_B",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\uD800[\uDE80-\uDE9C]"},{name:"Lydian",astral:"\uD802[\uDD20-\uDD39\uDD3F]"},{name:"Mahajani",astral:"\uD804[\uDD50-\uDD76]"},{name:"Makasar",astral:"\uD807[\uDEE0-\uDEF8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]"},{name:"Marchen",astral:"\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]"},{name:"Masaram_Gondi",astral:"\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]"},{name:"Medefaidrin",astral:"\uD81B[\uDE40-\uDE9A]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]"},{name:"Meroitic_Cursive",astral:"\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]"},{name:"Meroitic_Hieroglyphs",astral:"\uD802[\uDD80-\uDD9F]"},{name:"Miao",astral:"\uD81B[\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F]"},{name:"Modi",astral:"\uD805[\uDE00-\uDE44\uDE50-\uDE59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\uD805[\uDE60-\uDE6C]"},{name:"Mro",astral:"\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]"},{name:"Multani",astral:"\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]"},{name:"Nandinagari",astral:"\uD806[\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\uD805[\uDC00-\uDC5B\uDC5D-\uDC61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\uD82C[\uDD70-\uDEFB]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\uD838[\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDD4F]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]"},{name:"Old_Italic",astral:"\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]"},{name:"Old_North_Arabian",astral:"\uD802[\uDE80-\uDE9F]"},{name:"Old_Permic",astral:"\uD800[\uDF50-\uDF7A]"},{name:"Old_Persian",astral:"\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]"},{name:"Old_Sogdian",astral:"\uD803[\uDF00-\uDF27]"},{name:"Old_South_Arabian",astral:"\uD802[\uDE60-\uDE7F]"},{name:"Old_Turkic",astral:"\uD803[\uDC00-\uDC48]"},{name:"Old_Uyghur",astral:"\uD803[\uDF70-\uDF89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]"},{name:"Osmanya",astral:"\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]"},{name:"Pahawh_Hmong",astral:"\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]"},{name:"Palmyrene",astral:"\uD802[\uDC60-\uDC7F]"},{name:"Pau_Cin_Hau",astral:"\uD806[\uDEC0-\uDEF8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\uD802[\uDD00-\uDD1B\uDD1F]"},{name:"Psalter_Pahlavi",astral:"\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\uD804[\uDD80-\uDDDF]"},{name:"Shavian",astral:"\uD801[\uDC50-\uDC7F]"},{name:"Siddham",astral:"\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]"},{name:"SignWriting",astral:"\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\uD804[\uDDE1-\uDDF4]"},{name:"Sogdian",astral:"\uD803[\uDF30-\uDF59]"},{name:"Sora_Sompeng",astral:"\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]"},{name:"Soyombo",astral:"\uD806[\uDE50-\uDEA2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\uD805[\uDE80-\uDEB9\uDEC0-\uDEC9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\uD807[\uDFC0-\uDFF1\uDFFF]"},{name:"Tangsa",astral:"\uD81A[\uDE70-\uDEBE\uDEC0-\uDEC9]"},{name:"Tangut",astral:"𖿠|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEFF]|\uD823[\uDD00-\uDD08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]"},{name:"Toto",astral:"\uD838[\uDE90-\uDEAE]"},{name:"Ugaritic",astral:"\uD800[\uDF80-\uDF9D\uDF9F]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\uD801[\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]"},{name:"Wancho",astral:"\uD838[\uDEC0-\uDEF9\uDEFF]"},{name:"Warang_Citi",astral:"\uD806[\uDCA0-\uDCF2\uDCFF]"},{name:"Yezidi",astral:"\uD803[\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\uD806[\uDE00-\uDE47]"}];/*! * XRegExp Unicode Scripts 5.1.1 * * Steven Levithan (c) 2010-present MIT License * Unicode data by Mathias Bynens - */const UB=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");e.addUnicodeData(LB,"Script")};kB(ne);IB(ne);NB(ne);RB(ne);MB(ne);UB(ne);const GB=Object.freeze(Object.defineProperty({__proto__:null,default:ne},Symbol.toStringTag,{value:"Module"}));function dt(e,t){if(!!!e)throw new Error(t)}function dn(e){return typeof(e==null?void 0:e.then)=="function"}function Mn(e){return typeof e=="object"&&e!==null}function tn(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const VB=/\r\n|[\n\r]/g;function m2(e,t){let r=0,n=1;for(const u of e.body.matchAll(VB)){if(typeof u.index=="number"||tn(!1),u.index>=t)break;r=u.index+u[0].length,n+=1}return{line:n,column:t+1-r}}function HB(e){return w8(e.source,m2(e.source,e.start))}function w8(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,u=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?r:0,i=t.column+a,c=`${e.name}:${o}:${i} -`,l=n.split(/\r\n|[\n\r]/g),p=l[u];if(p.length>120){const f=Math.floor(i/80),d=i%80,h=[];for(let E=0;E["|",E]),["|","^".padStart(d)],["|",h[f+1]]])}return c+rv([[`${o-1} |`,l[u-1]],[`${o} |`,p],["|","^".padStart(i)],[`${o+1} |`,l[u+1]]])}function rv(e){const t=e.filter(([n,u])=>u!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,u])=>n.padStart(r)+(u?" "+u:"")).join(` -`)}function WB(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class he extends Error{constructor(t,...r){var n,u,s;const{nodes:o,source:a,positions:i,path:c,originalError:l,extensions:p}=WB(r);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=l??void 0,this.nodes=nv(Array.isArray(o)?o:o?[o]:void 0);const f=nv((n=this.nodes)===null||n===void 0?void 0:n.map(h=>h.loc).filter(h=>h!=null));this.source=a??(f==null||(u=f[0])===null||u===void 0?void 0:u.source),this.positions=i??(f==null?void 0:f.map(h=>h.start)),this.locations=i&&a?i.map(h=>m2(a,h)):f==null?void 0:f.map(h=>m2(h.source,h.start));const d=Mn(l==null?void 0:l.extensions)?l==null?void 0:l.extensions:void 0;this.extensions=(s=p??d)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,he):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=` + */const $T=e=>{if(!e.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");e.addUnicodeData(TT,"Script")};AT(Z);FT(Z);CT(Z);wT(Z);BT(Z);$T(Z);const PT=Object.freeze(Object.defineProperty({__proto__:null,default:Z},Symbol.toStringTag,{value:"Module"}));function it(e,t){if(!!!e)throw new Error(t)}function sn(e){return typeof(e==null?void 0:e.then)=="function"}function Pn(e){return typeof e=="object"&&e!==null}function Wr(e,t){if(!!!e)throw new Error(t??"Unexpected invariant triggered.")}const kT=/\r\n|[\n\r]/g;function w2(e,t){let r=0,n=1;for(const u of e.body.matchAll(kT)){if(typeof u.index=="number"||Wr(!1),u.index>=t)break;r=u.index+u[0].length,n+=1}return{line:n,column:t+1-r}}function OT(e){return Q8(e.source,w2(e.source,e.start))}function Q8(e,t){const r=e.locationOffset.column-1,n="".padStart(r)+e.body,u=t.line-1,s=e.locationOffset.line-1,o=t.line+s,a=t.line===1?r:0,i=t.column+a,c=`${e.name}:${o}:${i} +`,l=n.split(/\r\n|[\n\r]/g),p=l[u];if(p.length>120){const d=Math.floor(i/80),f=i%80,h=[];for(let y=0;y["|",y]),["|","^".padStart(f)],["|",h[d+1]]])}return c+Ay([[`${o-1} |`,l[u-1]],[`${o} |`,p],["|","^".padStart(i)],[`${o+1} |`,l[u+1]]])}function Ay(e){const t=e.filter(([n,u])=>u!==void 0),r=Math.max(...t.map(([n])=>n.length));return t.map(([n,u])=>n.padStart(r)+(u?" "+u:"")).join(` +`)}function IT(e){const t=e[0];return t==null||"kind"in t||"length"in t?{nodes:t,source:e[1],positions:e[2],path:e[3],originalError:e[4],extensions:e[5]}:t}class De extends Error{constructor(t,...r){var n,u,s;const{nodes:o,source:a,positions:i,path:c,originalError:l,extensions:p}=IT(r);super(t),this.name="GraphQLError",this.path=c??void 0,this.originalError=l??void 0,this.nodes=Fy(Array.isArray(o)?o:o?[o]:void 0);const d=Fy((n=this.nodes)===null||n===void 0?void 0:n.map(h=>h.loc).filter(h=>h!=null));this.source=a??(d==null||(u=d[0])===null||u===void 0?void 0:u.source),this.positions=i??(d==null?void 0:d.map(h=>h.start)),this.locations=i&&a?i.map(h=>w2(a,h)):d==null?void 0:d.map(h=>w2(h.source,h.start));const f=Pn(l==null?void 0:l.extensions)?l==null?void 0:l.extensions:void 0;this.extensions=(s=p??f)!==null&&s!==void 0?s:Object.create(null),Object.defineProperties(this,{message:{writable:!0,enumerable:!0},name:{enumerable:!1},nodes:{enumerable:!1},source:{enumerable:!1},positions:{enumerable:!1},originalError:{enumerable:!1}}),l!=null&&l.stack?Object.defineProperty(this,"stack",{value:l.stack,writable:!0,configurable:!0}):Error.captureStackTrace?Error.captureStackTrace(this,De):Object.defineProperty(this,"stack",{value:Error().stack,writable:!0,configurable:!0})}get[Symbol.toStringTag](){return"GraphQLError"}toString(){let t=this.message;if(this.nodes)for(const r of this.nodes)r.loc&&(t+=` -`+HB(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=` +`+OT(r.loc));else if(this.source&&this.locations)for(const r of this.locations)t+=` -`+w8(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function nv(e){return e===void 0||e.length===0?void 0:e}function or(e,t,r){return new he(`Syntax Error: ${r}`,{source:e,positions:[t]})}class JB{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class _8{constructor(t,r,n,u,s,o){this.kind=t,this.start=r,this.end=n,this.line=u,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const B8={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},zB=new Set(Object.keys(B8));function E2(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&zB.has(t)}var ar;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(ar||(ar={}));var ze;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(ze||(ze={}));var V;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(V||(V={}));function v2(e){return e===9||e===32}function Bi(e){return e>=48&&e<=57}function T8(e){return e>=97&&e<=122||e>=65&&e<=90}function xh(e){return T8(e)||e===95}function $8(e){return T8(e)||Bi(e)||e===95}function KB(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,u=-1;for(let o=0;oa===0?o:o.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,u+1)}function XB(e){let t=0;for(;t1&&n.slice(1).every(d=>d.length===0||v2(d.charCodeAt(0))),o=r.endsWith('\\"""'),a=e.endsWith('"')&&!o,i=e.endsWith("\\"),c=a||i,l=!(t!=null&&t.minimize)&&(!u||e.length>70||c||s||o);let p="";const f=u&&v2(e.charCodeAt(0));return(l&&!f||s)&&(p+=` +`+Q8(this.source,r);return t}toJSON(){const t={message:this.message};return this.locations!=null&&(t.locations=this.locations),this.path!=null&&(t.path=this.path),this.extensions!=null&&Object.keys(this.extensions).length>0&&(t.extensions=this.extensions),t}}function Fy(e){return e===void 0||e.length===0?void 0:e}function rr(e,t,r){return new De(`Syntax Error: ${r}`,{source:e,positions:[t]})}class NT{constructor(t,r,n){this.start=t.start,this.end=r.end,this.startToken=t,this.endToken=r,this.source=n}get[Symbol.toStringTag](){return"Location"}toJSON(){return{start:this.start,end:this.end}}}class e5{constructor(t,r,n,u,s,o){this.kind=t,this.start=r,this.end=n,this.line=u,this.column=s,this.value=o,this.prev=null,this.next=null}get[Symbol.toStringTag](){return"Token"}toJSON(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}}}const t5={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]},qT=new Set(Object.keys(t5));function _2(e){const t=e==null?void 0:e.kind;return typeof t=="string"&&qT.has(t)}var nr;(function(e){e.QUERY="query",e.MUTATION="mutation",e.SUBSCRIPTION="subscription"})(nr||(nr={}));var Ue;(function(e){e.QUERY="QUERY",e.MUTATION="MUTATION",e.SUBSCRIPTION="SUBSCRIPTION",e.FIELD="FIELD",e.FRAGMENT_DEFINITION="FRAGMENT_DEFINITION",e.FRAGMENT_SPREAD="FRAGMENT_SPREAD",e.INLINE_FRAGMENT="INLINE_FRAGMENT",e.VARIABLE_DEFINITION="VARIABLE_DEFINITION",e.SCHEMA="SCHEMA",e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.FIELD_DEFINITION="FIELD_DEFINITION",e.ARGUMENT_DEFINITION="ARGUMENT_DEFINITION",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.ENUM_VALUE="ENUM_VALUE",e.INPUT_OBJECT="INPUT_OBJECT",e.INPUT_FIELD_DEFINITION="INPUT_FIELD_DEFINITION"})(Ue||(Ue={}));var j;(function(e){e.NAME="Name",e.DOCUMENT="Document",e.OPERATION_DEFINITION="OperationDefinition",e.VARIABLE_DEFINITION="VariableDefinition",e.SELECTION_SET="SelectionSet",e.FIELD="Field",e.ARGUMENT="Argument",e.FRAGMENT_SPREAD="FragmentSpread",e.INLINE_FRAGMENT="InlineFragment",e.FRAGMENT_DEFINITION="FragmentDefinition",e.VARIABLE="Variable",e.INT="IntValue",e.FLOAT="FloatValue",e.STRING="StringValue",e.BOOLEAN="BooleanValue",e.NULL="NullValue",e.ENUM="EnumValue",e.LIST="ListValue",e.OBJECT="ObjectValue",e.OBJECT_FIELD="ObjectField",e.DIRECTIVE="Directive",e.NAMED_TYPE="NamedType",e.LIST_TYPE="ListType",e.NON_NULL_TYPE="NonNullType",e.SCHEMA_DEFINITION="SchemaDefinition",e.OPERATION_TYPE_DEFINITION="OperationTypeDefinition",e.SCALAR_TYPE_DEFINITION="ScalarTypeDefinition",e.OBJECT_TYPE_DEFINITION="ObjectTypeDefinition",e.FIELD_DEFINITION="FieldDefinition",e.INPUT_VALUE_DEFINITION="InputValueDefinition",e.INTERFACE_TYPE_DEFINITION="InterfaceTypeDefinition",e.UNION_TYPE_DEFINITION="UnionTypeDefinition",e.ENUM_TYPE_DEFINITION="EnumTypeDefinition",e.ENUM_VALUE_DEFINITION="EnumValueDefinition",e.INPUT_OBJECT_TYPE_DEFINITION="InputObjectTypeDefinition",e.DIRECTIVE_DEFINITION="DirectiveDefinition",e.SCHEMA_EXTENSION="SchemaExtension",e.SCALAR_TYPE_EXTENSION="ScalarTypeExtension",e.OBJECT_TYPE_EXTENSION="ObjectTypeExtension",e.INTERFACE_TYPE_EXTENSION="InterfaceTypeExtension",e.UNION_TYPE_EXTENSION="UnionTypeExtension",e.ENUM_TYPE_EXTENSION="EnumTypeExtension",e.INPUT_OBJECT_TYPE_EXTENSION="InputObjectTypeExtension"})(j||(j={}));function B2(e){return e===9||e===32}function Ti(e){return e>=48&&e<=57}function r5(e){return e>=97&&e<=122||e>=65&&e<=90}function Kh(e){return r5(e)||e===95}function n5(e){return r5(e)||Ti(e)||e===95}function xT(e){var t;let r=Number.MAX_SAFE_INTEGER,n=null,u=-1;for(let o=0;oa===0?o:o.slice(r)).slice((t=n)!==null&&t!==void 0?t:0,u+1)}function RT(e){let t=0;for(;t1&&n.slice(1).every(f=>f.length===0||B2(f.charCodeAt(0))),o=r.endsWith('\\"""'),a=e.endsWith('"')&&!o,i=e.endsWith("\\"),c=a||i,l=!u||e.length>70||c||s||o;let p="";const d=u&&B2(e.charCodeAt(0));return(l&&!d||s)&&(p+=` `),p+=r,(l||c)&&(p+=` -`),'"""'+p+'"""'}var Ee;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(Ee||(Ee={}));class ZB{constructor(t){const r=new _8(Ee.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==Ee.EOF)do if(t.next)t=t.next;else{const r=eT(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===Ee.COMMENT);return t}}function QB(e){return e===Ee.BANG||e===Ee.DOLLAR||e===Ee.AMP||e===Ee.PAREN_L||e===Ee.PAREN_R||e===Ee.SPREAD||e===Ee.COLON||e===Ee.EQUALS||e===Ee.AT||e===Ee.BRACKET_L||e===Ee.BRACKET_R||e===Ee.BRACE_L||e===Ee.PIPE||e===Ee.BRACE_R}function wa(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function _p(e,t){return P8(e.charCodeAt(t))&&O8(e.charCodeAt(t+1))}function P8(e){return e>=55296&&e<=56319}function O8(e){return e>=56320&&e<=57343}function eo(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return Ee.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function Yt(e,t,r,n,u){const s=e.line,o=1+r-e.lineStart;return new _8(t,r,n,s,o,u)}function eT(e,t){const r=e.source.body,n=r.length;let u=t;for(;u=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function oT(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` -`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw or(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function aT(e,t){const r=e.source.body,n=r.length;let u=e.lineStart,s=t+3,o=s,a="";const i=[];for(;sk8?"["+DT(e)+"]":"{ "+r.map(([u,s])=>u+": "+Bp(s,t)).join(", ")+" }"}function dT(e,t){if(e.length===0)return"[]";if(t.length>k8)return"[Array]";const r=Math.min(cT,e.length),n=e.length-r,u=[];for(let s=0;s1&&u.push(`... ${n} more items`),"["+u.join(", ")+"]"}function DT(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const Ln=function(t,r){return t instanceof r};class Rh{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||dt(!1,`Body must be a string. Received: ${Se(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||dt(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||dt(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function hT(e){return Ln(e,Rh)}function jh(e,t){return new mT(e,t).parseDocument()}let mT=class{constructor(t,r={}){const n=hT(t)?t:new Rh(t);this._lexer=new ZB(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(Ee.NAME);return this.node(t,{kind:V.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:V.DOCUMENT,definitions:this.many(Ee.SOF,this.parseDefinition,Ee.EOF)})}parseDefinition(){if(this.peek(Ee.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===Ee.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw or(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(Ee.BRACE_L))return this.node(t,{kind:V.OPERATION_DEFINITION,operation:ar.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(Ee.NAME)&&(n=this.parseName()),this.node(t,{kind:V.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(Ee.NAME);switch(t.value){case"query":return ar.QUERY;case"mutation":return ar.MUTATION;case"subscription":return ar.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(Ee.PAREN_L,this.parseVariableDefinition,Ee.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:V.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(Ee.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(Ee.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(Ee.DOLLAR),this.node(t,{kind:V.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:V.SELECTION_SET,selections:this.many(Ee.BRACE_L,this.parseSelection,Ee.BRACE_R)})}parseSelection(){return this.peek(Ee.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,u;return this.expectOptionalToken(Ee.COLON)?(n=r,u=this.parseName()):u=r,this.node(t,{kind:V.FIELD,alias:n,name:u,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(Ee.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(Ee.PAREN_L,r,Ee.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(Ee.COLON),this.node(r,{kind:V.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(Ee.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(Ee.NAME)?this.node(t,{kind:V.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:V.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:V.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:V.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case Ee.BRACKET_L:return this.parseList(t);case Ee.BRACE_L:return this.parseObject(t);case Ee.INT:return this.advanceLexer(),this.node(r,{kind:V.INT,value:r.value});case Ee.FLOAT:return this.advanceLexer(),this.node(r,{kind:V.FLOAT,value:r.value});case Ee.STRING:case Ee.BLOCK_STRING:return this.parseStringLiteral();case Ee.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:V.BOOLEAN,value:!0});case"false":return this.node(r,{kind:V.BOOLEAN,value:!1});case"null":return this.node(r,{kind:V.NULL});default:return this.node(r,{kind:V.ENUM,value:r.value})}case Ee.DOLLAR:if(t)if(this.expectToken(Ee.DOLLAR),this._lexer.token.kind===Ee.NAME){const n=this._lexer.token.value;throw or(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:V.STRING,value:t.value,block:t.kind===Ee.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:V.LIST,values:this.any(Ee.BRACKET_L,r,Ee.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:V.OBJECT,fields:this.any(Ee.BRACE_L,r,Ee.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(Ee.COLON),this.node(r,{kind:V.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(Ee.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(Ee.AT),this.node(r,{kind:V.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(Ee.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(Ee.BRACKET_R),r=this.node(t,{kind:V.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(Ee.BANG)?this.node(t,{kind:V.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:V.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(Ee.STRING)||this.peek(Ee.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),u=this.many(Ee.BRACE_L,this.parseOperationTypeDefinition,Ee.BRACE_R);return this.node(t,{kind:V.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:u})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(Ee.COLON);const n=this.parseNamedType();return this.node(t,{kind:V.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),u=this.parseConstDirectives();return this.node(t,{kind:V.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:u})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),u=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:V.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:u,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(Ee.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseFieldDefinition,Ee.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),u=this.parseArgumentDefs();this.expectToken(Ee.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:V.FIELD_DEFINITION,description:r,name:n,arguments:u,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(Ee.PAREN_L,this.parseInputValueDef,Ee.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(Ee.COLON);const u=this.parseTypeReference();let s;this.expectOptionalToken(Ee.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:V.INPUT_VALUE_DEFINITION,description:r,name:n,type:u,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),u=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:V.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:u,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:V.UNION_TYPE_DEFINITION,description:r,name:n,directives:u,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(Ee.EQUALS)?this.delimitedMany(Ee.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:V.ENUM_TYPE_DEFINITION,description:r,name:n,directives:u,values:s})}parseEnumValuesDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseEnumValueDefinition,Ee.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),u=this.parseConstDirectives();return this.node(t,{kind:V.ENUM_VALUE_DEFINITION,description:r,name:n,directives:u})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw or(this._lexer.source,this._lexer.token.start,`${kc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:V.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:u,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(Ee.BRACE_L,this.parseInputValueDef,Ee.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===Ee.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(Ee.BRACE_L,this.parseOperationTypeDefinition,Ee.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:V.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:V.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&u.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:V.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:u,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&u.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:V.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:u,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseUnionMemberTypes();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:V.UNION_TYPE_EXTENSION,name:r,directives:n,types:u})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseEnumValuesDefinition();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:V.ENUM_TYPE_EXTENSION,name:r,directives:n,values:u})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseInputFieldsDefinition();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:V.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:u})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(Ee.AT);const n=this.parseName(),u=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:V.DIRECTIVE_DEFINITION,description:r,name:n,arguments:u,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(Ee.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(ze,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new JB(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw or(this._lexer.source,r.start,`Expected ${I8(t)}, found ${kc(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===Ee.NAME&&r.value===t)this.advanceLexer();else throw or(this._lexer.source,r.start,`Expected "${t}", found ${kc(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===Ee.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return or(this._lexer.source,r.start,`Unexpected ${kc(r)}.`)}any(t,r,n){this.expectToken(t);const u=[];for(;!this.expectOptionalToken(n);)u.push(r.call(this));return u}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const u=[];do u.push(r.call(this));while(!this.expectOptionalToken(n));return u}return[]}many(t,r,n){this.expectToken(t);const u=[];do u.push(r.call(this));while(!this.expectOptionalToken(n));return u}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==Ee.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw or(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function kc(e){const t=e.value;return I8(e.kind)+(t!=null?` "${t}"`:"")}function I8(e){return QB(e)?`"${e}"`:e}const ET=5;function Tu(e,t){const[r,n]=t?[e,t]:[void 0,e];let u=" Did you mean ";r&&(u+=r+" ");const s=n.map(i=>`"${i}"`);switch(s.length){case 0:return"";case 1:return u+s[0]+"?";case 2:return u+s[0]+" or "+s[1]+"?"}const o=s.slice(0,ET),a=o.pop();return u+o.join(", ")+", or "+a+"?"}function sv(e){return e}function to(e,t){const r=Object.create(null);for(const n of e)r[t(n)]=n;return r}function Mh(e,t,r){const n=Object.create(null);for(const u of e)n[t(u)]=r(u);return n}function Au(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}function Lh(e,t){let r=0,n=0;for(;r0);let a=0;do++n,a=a*10+s-y2,s=t.charCodeAt(n);while(Ic(s)&&a>0);if(oa)return 1}else{if(us)return 1;++r,++n}}return e.length-t.length}const y2=48,vT=57;function Ic(e){return!isNaN(e)&&y2<=e&&e<=vT}function ps(e,t){const r=Object.create(null),n=new yT(e),u=Math.floor(e.length*.4)+1;for(const s of t){const o=n.measure(s,u);o!==void 0&&(r[s]=o)}return Object.keys(r).sort((s,o)=>{const a=r[s]-r[o];return a!==0?a:Lh(s,o)})}class yT{constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=ov(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,r){if(this._input===t)return 0;const n=t.toLowerCase();if(this._inputLowerCase===n)return 1;let u=ov(n),s=this._inputArray;if(u.lengthr)return;const i=this._rows;for(let l=0;l<=a;l++)i[0][l]=l;for(let l=1;l<=o;l++){const p=i[(l-1)%3],f=i[l%3];let d=f[0]=l;for(let h=1;h<=a;h++){const E=u[l-1]===s[h-1]?0:1;let A=Math.min(p[h]+1,f[h-1]+1,p[h-1]+E);if(l>1&&h>1&&u[l-1]===s[h-2]&&u[l-2]===s[h-1]){const m=i[(l-2)%3][h-2];A=Math.min(A,m+1)}Ar)return}const c=i[o%3][a];return c<=r?c:void 0}}function ov(e){const t=e.length,r=new Array(t);for(let n=0;ne.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>Re(e.definitions,` +`),'"""'+p+'"""'}var me;(function(e){e.SOF="",e.EOF="",e.BANG="!",e.DOLLAR="$",e.AMP="&",e.PAREN_L="(",e.PAREN_R=")",e.SPREAD="...",e.COLON=":",e.EQUALS="=",e.AT="@",e.BRACKET_L="[",e.BRACKET_R="]",e.BRACE_L="{",e.PIPE="|",e.BRACE_R="}",e.NAME="Name",e.INT="Int",e.FLOAT="Float",e.STRING="String",e.BLOCK_STRING="BlockString",e.COMMENT="Comment"})(me||(me={}));class MT{constructor(t){const r=new e5(me.SOF,0,0,0,0);this.source=t,this.lastToken=r,this.token=r,this.line=1,this.lineStart=0}get[Symbol.toStringTag](){return"Lexer"}advance(){return this.lastToken=this.token,this.token=this.lookahead()}lookahead(){let t=this.token;if(t.kind!==me.EOF)do if(t.next)t=t.next;else{const r=UT(this,t.end);t.next=r,r.prev=t,t=r}while(t.kind===me.COMMENT);return t}}function LT(e){return e===me.BANG||e===me.DOLLAR||e===me.AMP||e===me.PAREN_L||e===me.PAREN_R||e===me.SPREAD||e===me.COLON||e===me.EQUALS||e===me.AT||e===me.BRACKET_L||e===me.BRACKET_R||e===me.BRACE_L||e===me.PIPE||e===me.BRACE_R}function ba(e){return e>=0&&e<=55295||e>=57344&&e<=1114111}function Ip(e,t){return u5(e.charCodeAt(t))&&s5(e.charCodeAt(t+1))}function u5(e){return e>=55296&&e<=56319}function s5(e){return e>=56320&&e<=57343}function Js(e,t){const r=e.source.body.codePointAt(t);if(r===void 0)return me.EOF;if(r>=32&&r<=126){const n=String.fromCodePoint(r);return n==='"'?`'"'`:`"${n}"`}return"U+"+r.toString(16).toUpperCase().padStart(4,"0")}function zt(e,t,r,n,u){const s=e.line,o=1+r-e.lineStart;return new e5(t,r,n,s,o,u)}function UT(e,t){const r=e.source.body,n=r.length;let u=t;for(;u=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:-1}function zT(e,t){const r=e.source.body;switch(r.charCodeAt(t+1)){case 34:return{value:'"',size:2};case 92:return{value:"\\",size:2};case 47:return{value:"/",size:2};case 98:return{value:"\b",size:2};case 102:return{value:"\f",size:2};case 110:return{value:` +`,size:2};case 114:return{value:"\r",size:2};case 116:return{value:" ",size:2}}throw rr(e.source,t,`Invalid character escape sequence: "${r.slice(t,t+2)}".`)}function KT(e,t){const r=e.source.body,n=r.length;let u=e.lineStart,s=t+3,o=s,a="";const i=[];for(;so5?"["+r$(e)+"]":"{ "+r.map(([u,s])=>u+": "+Np(s,t)).join(", ")+" }"}function t$(e,t){if(e.length===0)return"[]";if(t.length>o5)return"[Array]";const r=Math.min(YT,e.length),n=e.length-r,u=[];for(let s=0;s1&&u.push(`... ${n} more items`),"["+u.join(", ")+"]"}function r$(e){const t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if(t==="Object"&&typeof e.constructor=="function"){const r=e.constructor.name;if(typeof r=="string"&&r!=="")return r}return t}const kn=function(t,r){return t instanceof r};class Xh{constructor(t,r="GraphQL request",n={line:1,column:1}){typeof t=="string"||it(!1,`Body must be a string. Received: ${Ae(t)}.`),this.body=t,this.name=r,this.locationOffset=n,this.locationOffset.line>0||it(!1,"line in locationOffset is 1-indexed and must be positive."),this.locationOffset.column>0||it(!1,"column in locationOffset is 1-indexed and must be positive.")}get[Symbol.toStringTag](){return"Source"}}function n$(e){return kn(e,Xh)}function Yh(e,t){return new u$(e,t).parseDocument()}let u$=class{constructor(t,r={}){const n=n$(t)?t:new Xh(t);this._lexer=new MT(n),this._options=r,this._tokenCounter=0}parseName(){const t=this.expectToken(me.NAME);return this.node(t,{kind:j.NAME,value:t.value})}parseDocument(){return this.node(this._lexer.token,{kind:j.DOCUMENT,definitions:this.many(me.SOF,this.parseDefinition,me.EOF)})}parseDefinition(){if(this.peek(me.BRACE_L))return this.parseOperationDefinition();const t=this.peekDescription(),r=t?this._lexer.lookahead():this._lexer.token;if(r.kind===me.NAME){switch(r.value){case"schema":return this.parseSchemaDefinition();case"scalar":return this.parseScalarTypeDefinition();case"type":return this.parseObjectTypeDefinition();case"interface":return this.parseInterfaceTypeDefinition();case"union":return this.parseUnionTypeDefinition();case"enum":return this.parseEnumTypeDefinition();case"input":return this.parseInputObjectTypeDefinition();case"directive":return this.parseDirectiveDefinition()}if(t)throw rr(this._lexer.source,this._lexer.token.start,"Unexpected description, descriptions are supported only on type definitions.");switch(r.value){case"query":case"mutation":case"subscription":return this.parseOperationDefinition();case"fragment":return this.parseFragmentDefinition();case"extend":return this.parseTypeSystemExtension()}}throw this.unexpected(r)}parseOperationDefinition(){const t=this._lexer.token;if(this.peek(me.BRACE_L))return this.node(t,{kind:j.OPERATION_DEFINITION,operation:nr.QUERY,name:void 0,variableDefinitions:[],directives:[],selectionSet:this.parseSelectionSet()});const r=this.parseOperationType();let n;return this.peek(me.NAME)&&(n=this.parseName()),this.node(t,{kind:j.OPERATION_DEFINITION,operation:r,name:n,variableDefinitions:this.parseVariableDefinitions(),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseOperationType(){const t=this.expectToken(me.NAME);switch(t.value){case"query":return nr.QUERY;case"mutation":return nr.MUTATION;case"subscription":return nr.SUBSCRIPTION}throw this.unexpected(t)}parseVariableDefinitions(){return this.optionalMany(me.PAREN_L,this.parseVariableDefinition,me.PAREN_R)}parseVariableDefinition(){return this.node(this._lexer.token,{kind:j.VARIABLE_DEFINITION,variable:this.parseVariable(),type:(this.expectToken(me.COLON),this.parseTypeReference()),defaultValue:this.expectOptionalToken(me.EQUALS)?this.parseConstValueLiteral():void 0,directives:this.parseConstDirectives()})}parseVariable(){const t=this._lexer.token;return this.expectToken(me.DOLLAR),this.node(t,{kind:j.VARIABLE,name:this.parseName()})}parseSelectionSet(){return this.node(this._lexer.token,{kind:j.SELECTION_SET,selections:this.many(me.BRACE_L,this.parseSelection,me.BRACE_R)})}parseSelection(){return this.peek(me.SPREAD)?this.parseFragment():this.parseField()}parseField(){const t=this._lexer.token,r=this.parseName();let n,u;return this.expectOptionalToken(me.COLON)?(n=r,u=this.parseName()):u=r,this.node(t,{kind:j.FIELD,alias:n,name:u,arguments:this.parseArguments(!1),directives:this.parseDirectives(!1),selectionSet:this.peek(me.BRACE_L)?this.parseSelectionSet():void 0})}parseArguments(t){const r=t?this.parseConstArgument:this.parseArgument;return this.optionalMany(me.PAREN_L,r,me.PAREN_R)}parseArgument(t=!1){const r=this._lexer.token,n=this.parseName();return this.expectToken(me.COLON),this.node(r,{kind:j.ARGUMENT,name:n,value:this.parseValueLiteral(t)})}parseConstArgument(){return this.parseArgument(!0)}parseFragment(){const t=this._lexer.token;this.expectToken(me.SPREAD);const r=this.expectOptionalKeyword("on");return!r&&this.peek(me.NAME)?this.node(t,{kind:j.FRAGMENT_SPREAD,name:this.parseFragmentName(),directives:this.parseDirectives(!1)}):this.node(t,{kind:j.INLINE_FRAGMENT,typeCondition:r?this.parseNamedType():void 0,directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentDefinition(){const t=this._lexer.token;return this.expectKeyword("fragment"),this._options.allowLegacyFragmentVariables===!0?this.node(t,{kind:j.FRAGMENT_DEFINITION,name:this.parseFragmentName(),variableDefinitions:this.parseVariableDefinitions(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()}):this.node(t,{kind:j.FRAGMENT_DEFINITION,name:this.parseFragmentName(),typeCondition:(this.expectKeyword("on"),this.parseNamedType()),directives:this.parseDirectives(!1),selectionSet:this.parseSelectionSet()})}parseFragmentName(){if(this._lexer.token.value==="on")throw this.unexpected();return this.parseName()}parseValueLiteral(t){const r=this._lexer.token;switch(r.kind){case me.BRACKET_L:return this.parseList(t);case me.BRACE_L:return this.parseObject(t);case me.INT:return this.advanceLexer(),this.node(r,{kind:j.INT,value:r.value});case me.FLOAT:return this.advanceLexer(),this.node(r,{kind:j.FLOAT,value:r.value});case me.STRING:case me.BLOCK_STRING:return this.parseStringLiteral();case me.NAME:switch(this.advanceLexer(),r.value){case"true":return this.node(r,{kind:j.BOOLEAN,value:!0});case"false":return this.node(r,{kind:j.BOOLEAN,value:!1});case"null":return this.node(r,{kind:j.NULL});default:return this.node(r,{kind:j.ENUM,value:r.value})}case me.DOLLAR:if(t)if(this.expectToken(me.DOLLAR),this._lexer.token.kind===me.NAME){const n=this._lexer.token.value;throw rr(this._lexer.source,r.start,`Unexpected variable "$${n}" in constant value.`)}else throw this.unexpected(r);return this.parseVariable();default:throw this.unexpected()}}parseConstValueLiteral(){return this.parseValueLiteral(!0)}parseStringLiteral(){const t=this._lexer.token;return this.advanceLexer(),this.node(t,{kind:j.STRING,value:t.value,block:t.kind===me.BLOCK_STRING})}parseList(t){const r=()=>this.parseValueLiteral(t);return this.node(this._lexer.token,{kind:j.LIST,values:this.any(me.BRACKET_L,r,me.BRACKET_R)})}parseObject(t){const r=()=>this.parseObjectField(t);return this.node(this._lexer.token,{kind:j.OBJECT,fields:this.any(me.BRACE_L,r,me.BRACE_R)})}parseObjectField(t){const r=this._lexer.token,n=this.parseName();return this.expectToken(me.COLON),this.node(r,{kind:j.OBJECT_FIELD,name:n,value:this.parseValueLiteral(t)})}parseDirectives(t){const r=[];for(;this.peek(me.AT);)r.push(this.parseDirective(t));return r}parseConstDirectives(){return this.parseDirectives(!0)}parseDirective(t){const r=this._lexer.token;return this.expectToken(me.AT),this.node(r,{kind:j.DIRECTIVE,name:this.parseName(),arguments:this.parseArguments(t)})}parseTypeReference(){const t=this._lexer.token;let r;if(this.expectOptionalToken(me.BRACKET_L)){const n=this.parseTypeReference();this.expectToken(me.BRACKET_R),r=this.node(t,{kind:j.LIST_TYPE,type:n})}else r=this.parseNamedType();return this.expectOptionalToken(me.BANG)?this.node(t,{kind:j.NON_NULL_TYPE,type:r}):r}parseNamedType(){return this.node(this._lexer.token,{kind:j.NAMED_TYPE,name:this.parseName()})}peekDescription(){return this.peek(me.STRING)||this.peek(me.BLOCK_STRING)}parseDescription(){if(this.peekDescription())return this.parseStringLiteral()}parseSchemaDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("schema");const n=this.parseConstDirectives(),u=this.many(me.BRACE_L,this.parseOperationTypeDefinition,me.BRACE_R);return this.node(t,{kind:j.SCHEMA_DEFINITION,description:r,directives:n,operationTypes:u})}parseOperationTypeDefinition(){const t=this._lexer.token,r=this.parseOperationType();this.expectToken(me.COLON);const n=this.parseNamedType();return this.node(t,{kind:j.OPERATION_TYPE_DEFINITION,operation:r,type:n})}parseScalarTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("scalar");const n=this.parseName(),u=this.parseConstDirectives();return this.node(t,{kind:j.SCALAR_TYPE_DEFINITION,description:r,name:n,directives:u})}parseObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("type");const n=this.parseName(),u=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:j.OBJECT_TYPE_DEFINITION,description:r,name:n,interfaces:u,directives:s,fields:o})}parseImplementsInterfaces(){return this.expectOptionalKeyword("implements")?this.delimitedMany(me.AMP,this.parseNamedType):[]}parseFieldsDefinition(){return this.optionalMany(me.BRACE_L,this.parseFieldDefinition,me.BRACE_R)}parseFieldDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName(),u=this.parseArgumentDefs();this.expectToken(me.COLON);const s=this.parseTypeReference(),o=this.parseConstDirectives();return this.node(t,{kind:j.FIELD_DEFINITION,description:r,name:n,arguments:u,type:s,directives:o})}parseArgumentDefs(){return this.optionalMany(me.PAREN_L,this.parseInputValueDef,me.PAREN_R)}parseInputValueDef(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseName();this.expectToken(me.COLON);const u=this.parseTypeReference();let s;this.expectOptionalToken(me.EQUALS)&&(s=this.parseConstValueLiteral());const o=this.parseConstDirectives();return this.node(t,{kind:j.INPUT_VALUE_DEFINITION,description:r,name:n,type:u,defaultValue:s,directives:o})}parseInterfaceTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("interface");const n=this.parseName(),u=this.parseImplementsInterfaces(),s=this.parseConstDirectives(),o=this.parseFieldsDefinition();return this.node(t,{kind:j.INTERFACE_TYPE_DEFINITION,description:r,name:n,interfaces:u,directives:s,fields:o})}parseUnionTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("union");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseUnionMemberTypes();return this.node(t,{kind:j.UNION_TYPE_DEFINITION,description:r,name:n,directives:u,types:s})}parseUnionMemberTypes(){return this.expectOptionalToken(me.EQUALS)?this.delimitedMany(me.PIPE,this.parseNamedType):[]}parseEnumTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("enum");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseEnumValuesDefinition();return this.node(t,{kind:j.ENUM_TYPE_DEFINITION,description:r,name:n,directives:u,values:s})}parseEnumValuesDefinition(){return this.optionalMany(me.BRACE_L,this.parseEnumValueDefinition,me.BRACE_R)}parseEnumValueDefinition(){const t=this._lexer.token,r=this.parseDescription(),n=this.parseEnumValueName(),u=this.parseConstDirectives();return this.node(t,{kind:j.ENUM_VALUE_DEFINITION,description:r,name:n,directives:u})}parseEnumValueName(){if(this._lexer.token.value==="true"||this._lexer.token.value==="false"||this._lexer.token.value==="null")throw rr(this._lexer.source,this._lexer.token.start,`${Rc(this._lexer.token)} is reserved and cannot be used for an enum value.`);return this.parseName()}parseInputObjectTypeDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("input");const n=this.parseName(),u=this.parseConstDirectives(),s=this.parseInputFieldsDefinition();return this.node(t,{kind:j.INPUT_OBJECT_TYPE_DEFINITION,description:r,name:n,directives:u,fields:s})}parseInputFieldsDefinition(){return this.optionalMany(me.BRACE_L,this.parseInputValueDef,me.BRACE_R)}parseTypeSystemExtension(){const t=this._lexer.lookahead();if(t.kind===me.NAME)switch(t.value){case"schema":return this.parseSchemaExtension();case"scalar":return this.parseScalarTypeExtension();case"type":return this.parseObjectTypeExtension();case"interface":return this.parseInterfaceTypeExtension();case"union":return this.parseUnionTypeExtension();case"enum":return this.parseEnumTypeExtension();case"input":return this.parseInputObjectTypeExtension()}throw this.unexpected(t)}parseSchemaExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("schema");const r=this.parseConstDirectives(),n=this.optionalMany(me.BRACE_L,this.parseOperationTypeDefinition,me.BRACE_R);if(r.length===0&&n.length===0)throw this.unexpected();return this.node(t,{kind:j.SCHEMA_EXTENSION,directives:r,operationTypes:n})}parseScalarTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("scalar");const r=this.parseName(),n=this.parseConstDirectives();if(n.length===0)throw this.unexpected();return this.node(t,{kind:j.SCALAR_TYPE_EXTENSION,name:r,directives:n})}parseObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("type");const r=this.parseName(),n=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&u.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:j.OBJECT_TYPE_EXTENSION,name:r,interfaces:n,directives:u,fields:s})}parseInterfaceTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("interface");const r=this.parseName(),n=this.parseImplementsInterfaces(),u=this.parseConstDirectives(),s=this.parseFieldsDefinition();if(n.length===0&&u.length===0&&s.length===0)throw this.unexpected();return this.node(t,{kind:j.INTERFACE_TYPE_EXTENSION,name:r,interfaces:n,directives:u,fields:s})}parseUnionTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("union");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseUnionMemberTypes();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:j.UNION_TYPE_EXTENSION,name:r,directives:n,types:u})}parseEnumTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("enum");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseEnumValuesDefinition();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:j.ENUM_TYPE_EXTENSION,name:r,directives:n,values:u})}parseInputObjectTypeExtension(){const t=this._lexer.token;this.expectKeyword("extend"),this.expectKeyword("input");const r=this.parseName(),n=this.parseConstDirectives(),u=this.parseInputFieldsDefinition();if(n.length===0&&u.length===0)throw this.unexpected();return this.node(t,{kind:j.INPUT_OBJECT_TYPE_EXTENSION,name:r,directives:n,fields:u})}parseDirectiveDefinition(){const t=this._lexer.token,r=this.parseDescription();this.expectKeyword("directive"),this.expectToken(me.AT);const n=this.parseName(),u=this.parseArgumentDefs(),s=this.expectOptionalKeyword("repeatable");this.expectKeyword("on");const o=this.parseDirectiveLocations();return this.node(t,{kind:j.DIRECTIVE_DEFINITION,description:r,name:n,arguments:u,repeatable:s,locations:o})}parseDirectiveLocations(){return this.delimitedMany(me.PIPE,this.parseDirectiveLocation)}parseDirectiveLocation(){const t=this._lexer.token,r=this.parseName();if(Object.prototype.hasOwnProperty.call(Ue,r.value))return r;throw this.unexpected(t)}node(t,r){return this._options.noLocation!==!0&&(r.loc=new NT(t,this._lexer.lastToken,this._lexer.source)),r}peek(t){return this._lexer.token.kind===t}expectToken(t){const r=this._lexer.token;if(r.kind===t)return this.advanceLexer(),r;throw rr(this._lexer.source,r.start,`Expected ${a5(t)}, found ${Rc(r)}.`)}expectOptionalToken(t){return this._lexer.token.kind===t?(this.advanceLexer(),!0):!1}expectKeyword(t){const r=this._lexer.token;if(r.kind===me.NAME&&r.value===t)this.advanceLexer();else throw rr(this._lexer.source,r.start,`Expected "${t}", found ${Rc(r)}.`)}expectOptionalKeyword(t){const r=this._lexer.token;return r.kind===me.NAME&&r.value===t?(this.advanceLexer(),!0):!1}unexpected(t){const r=t??this._lexer.token;return rr(this._lexer.source,r.start,`Unexpected ${Rc(r)}.`)}any(t,r,n){this.expectToken(t);const u=[];for(;!this.expectOptionalToken(n);)u.push(r.call(this));return u}optionalMany(t,r,n){if(this.expectOptionalToken(t)){const u=[];do u.push(r.call(this));while(!this.expectOptionalToken(n));return u}return[]}many(t,r,n){this.expectToken(t);const u=[];do u.push(r.call(this));while(!this.expectOptionalToken(n));return u}delimitedMany(t,r){this.expectOptionalToken(t);const n=[];do n.push(r.call(this));while(this.expectOptionalToken(t));return n}advanceLexer(){const{maxTokens:t}=this._options,r=this._lexer.advance();if(t!==void 0&&r.kind!==me.EOF&&(++this._tokenCounter,this._tokenCounter>t))throw rr(this._lexer.source,r.start,`Document contains more that ${t} tokens. Parsing aborted.`)}};function Rc(e){const t=e.value;return a5(e.kind)+(t!=null?` "${t}"`:"")}function a5(e){return LT(e)?`"${e}"`:e}const s$=5;function wu(e,t){const[r,n]=t?[e,t]:[void 0,e];let u=" Did you mean ";r&&(u+=r+" ");const s=n.map(i=>`"${i}"`);switch(s.length){case 0:return"";case 1:return u+s[0]+"?";case 2:return u+s[0]+" or "+s[1]+"?"}const o=s.slice(0,s$),a=o.pop();return u+o.join(", ")+", or "+a+"?"}function by(e){return e}function zs(e,t){const r=Object.create(null);for(const n of e)r[t(n)]=n;return r}function Zh(e,t,r){const n=Object.create(null);for(const u of e)n[t(u)]=r(u);return n}function yu(e,t){const r=Object.create(null);for(const n of Object.keys(e))r[n]=t(e[n],n);return r}function Qh(e,t){let r=0,n=0;for(;r0);let a=0;do++n,a=a*10+s-T2,s=t.charCodeAt(n);while(jc(s)&&a>0);if(oa)return 1}else{if(us)return 1;++r,++n}}return e.length-t.length}const T2=48,o$=57;function jc(e){return!isNaN(e)&&T2<=e&&e<=o$}function ls(e,t){const r=Object.create(null),n=new a$(e),u=Math.floor(e.length*.4)+1;for(const s of t){const o=n.measure(s,u);o!==void 0&&(r[s]=o)}return Object.keys(r).sort((s,o)=>{const a=r[s]-r[o];return a!==0?a:Qh(s,o)})}class a${constructor(t){this._input=t,this._inputLowerCase=t.toLowerCase(),this._inputArray=Sy(this._inputLowerCase),this._rows=[new Array(t.length+1).fill(0),new Array(t.length+1).fill(0),new Array(t.length+1).fill(0)]}measure(t,r){if(this._input===t)return 0;const n=t.toLowerCase();if(this._inputLowerCase===n)return 1;let u=Sy(n),s=this._inputArray;if(u.lengthr)return;const i=this._rows;for(let l=0;l<=a;l++)i[0][l]=l;for(let l=1;l<=o;l++){const p=i[(l-1)%3],d=i[l%3];let f=d[0]=l;for(let h=1;h<=a;h++){const y=u[l-1]===s[h-1]?0:1;let A=Math.min(p[h]+1,d[h-1]+1,p[h-1]+y);if(l>1&&h>1&&u[l-1]===s[h-2]&&u[l-2]===s[h-1]){const m=i[(l-2)%3][h-2];A=Math.min(A,m+1)}Ar)return}const c=i[o%3][a];return c<=r?c:void 0}}function Sy(e){const t=e.length,r=new Array(t);for(let n=0;ne.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>ke(e.definitions,` -`)},OperationDefinition:{leave(e){const t=ft("(",Re(e.variableDefinitions,", "),")"),r=Re([e.operation,Re([e.name,t]),Re(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+ft(" = ",r)+ft(" ",Re(n," "))},SelectionSet:{leave:({selections:e})=>Fn(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:u}){const s=ft("",e,": ")+t;let o=s+ft("(",Re(r,", "),")");return o.length>bT&&(o=s+ft(`( -`,Al(Re(r,` +`)},OperationDefinition:{leave(e){const t=at("(",ke(e.variableDefinitions,", "),")"),r=ke([e.operation,ke([e.name,t]),ke(e.directives," ")]," ");return(r==="query"?"":r+" ")+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+at(" = ",r)+at(" ",ke(n," "))},SelectionSet:{leave:({selections:e})=>fn(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:u}){const s=at("",e,": ")+t;let o=s+at("(",ke(r,", "),")");return o.length>d$&&(o=s+at(`( +`,_l(ke(r,` `)),` -)`)),Re([o,Re(n," "),u]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+ft(" ",Re(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>Re(["...",ft("on ",e),Re(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:u})=>`fragment ${e}${ft("(",Re(r,", "),")")} on ${t} ${ft("",Re(n," ")," ")}`+u},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?YB(e):gT(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+Re(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+Re(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+ft("(",Re(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>ft("",e,` -`)+Re(["schema",Re(t," "),Fn(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>ft("",e,` -`)+Re(["scalar",t,Re(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:u})=>ft("",e,` -`)+Re(["type",t,ft("implements ",Re(r," & ")),Re(n," "),Fn(u)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:u})=>ft("",e,` -`)+t+(av(r)?ft(`( -`,Al(Re(r,` +)`)),ke([o,ke(n," "),u]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+at(" ",ke(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>ke(["...",at("on ",e),ke(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:u})=>`fragment ${e}${at("(",ke(r,", "),")")} on ${t} ${at("",ke(n," ")," ")}`+u},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?jT(e):i$(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+ke(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+ke(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+at("(",ke(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({description:e,directives:t,operationTypes:r})=>at("",e,` +`)+ke(["schema",ke(t," "),fn(r)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({description:e,name:t,directives:r})=>at("",e,` +`)+ke(["scalar",t,ke(r," ")]," ")},ObjectTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:u})=>at("",e,` +`)+ke(["type",t,at("implements ",ke(r," & ")),ke(n," "),fn(u)]," ")},FieldDefinition:{leave:({description:e,name:t,arguments:r,type:n,directives:u})=>at("",e,` +`)+t+(wy(r)?at(`( +`,_l(ke(r,` `)),` -)`):ft("(",Re(r,", "),")"))+": "+n+ft(" ",Re(u," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:u})=>ft("",e,` -`)+Re([t+": "+r,ft("= ",n),Re(u," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:u})=>ft("",e,` -`)+Re(["interface",t,ft("implements ",Re(r," & ")),Re(n," "),Fn(u)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>ft("",e,` -`)+Re(["union",t,Re(r," "),ft("= ",Re(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>ft("",e,` -`)+Re(["enum",t,Re(r," "),Fn(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>ft("",e,` -`)+Re([t,Re(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>ft("",e,` -`)+Re(["input",t,Re(r," "),Fn(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:u})=>ft("",e,` -`)+"directive @"+t+(av(r)?ft(`( -`,Al(Re(r,` +)`):at("(",ke(r,", "),")"))+": "+n+at(" ",ke(u," "))},InputValueDefinition:{leave:({description:e,name:t,type:r,defaultValue:n,directives:u})=>at("",e,` +`)+ke([t+": "+r,at("= ",n),ke(u," ")]," ")},InterfaceTypeDefinition:{leave:({description:e,name:t,interfaces:r,directives:n,fields:u})=>at("",e,` +`)+ke(["interface",t,at("implements ",ke(r," & ")),ke(n," "),fn(u)]," ")},UnionTypeDefinition:{leave:({description:e,name:t,directives:r,types:n})=>at("",e,` +`)+ke(["union",t,ke(r," "),at("= ",ke(n," | "))]," ")},EnumTypeDefinition:{leave:({description:e,name:t,directives:r,values:n})=>at("",e,` +`)+ke(["enum",t,ke(r," "),fn(n)]," ")},EnumValueDefinition:{leave:({description:e,name:t,directives:r})=>at("",e,` +`)+ke([t,ke(r," ")]," ")},InputObjectTypeDefinition:{leave:({description:e,name:t,directives:r,fields:n})=>at("",e,` +`)+ke(["input",t,ke(r," "),fn(n)]," ")},DirectiveDefinition:{leave:({description:e,name:t,arguments:r,repeatable:n,locations:u})=>at("",e,` +`)+"directive @"+t+(wy(r)?at(`( +`,_l(ke(r,` `)),` -)`):ft("(",Re(r,", "),")"))+(n?" repeatable":"")+" on "+Re(u," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>Re(["extend schema",Re(e," "),Fn(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>Re(["extend scalar",e,Re(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Re(["extend type",e,ft("implements ",Re(t," & ")),Re(r," "),Fn(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>Re(["extend interface",e,ft("implements ",Re(t," & ")),Re(r," "),Fn(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>Re(["extend union",e,Re(t," "),ft("= ",Re(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>Re(["extend enum",e,Re(t," "),Fn(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>Re(["extend input",e,Re(t," "),Fn(r)]," ")}};function Re(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function Fn(e){return ft(`{ -`,Al(Re(e,` +)`):at("(",ke(r,", "),")"))+(n?" repeatable":"")+" on "+ke(u," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>ke(["extend schema",ke(e," "),fn(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>ke(["extend scalar",e,ke(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ke(["extend type",e,at("implements ",ke(t," & ")),ke(r," "),fn(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>ke(["extend interface",e,at("implements ",ke(t," & ")),ke(r," "),fn(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>ke(["extend union",e,ke(t," "),at("= ",ke(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>ke(["extend enum",e,ke(t," "),fn(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>ke(["extend input",e,ke(t," "),fn(r)]," ")}};function ke(e,t=""){var r;return(r=e==null?void 0:e.filter(n=>n).join(t))!==null&&r!==void 0?r:""}function fn(e){return at(`{ +`,_l(ke(e,` `)),` -}`)}function ft(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function Al(e){return ft(" ",e.replace(/\n/g,` - `))}function av(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(` -`)))!==null&&t!==void 0?t:!1}function g2(e,t){switch(e.kind){case V.NULL:return null;case V.INT:return parseInt(e.value,10);case V.FLOAT:return parseFloat(e.value);case V.STRING:case V.ENUM:case V.BOOLEAN:return e.value;case V.LIST:return e.values.map(r=>g2(r,t));case V.OBJECT:return Mh(e.fields,r=>r.name.value,r=>g2(r.value,t));case V.VARIABLE:return t==null?void 0:t[e.name.value]}}function Un(e){if(e!=null||dt(!1,"Must provide name."),typeof e=="string"||dt(!1,"Expected name to be a string."),e.length===0)throw new he("Expected name to be a non-empty string.");for(let t=1;to(g2(a,i)),this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||dt(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Se(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||dt(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||dt(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Wr{constructor(t){var r;this.name=Un(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=()=>j8(t),this._interfaces=()=>R8(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||dt(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Se(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:L8(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function R8(e){var t;const r=q8((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(r)||dt(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),r}function j8(e){const t=x8(e.fields);return sa(t)||dt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Au(t,(r,n)=>{var u;sa(r)||dt(!1,`${e.name}.${n} field config must be an object.`),r.resolve==null||typeof r.resolve=="function"||dt(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${Se(r.resolve)}.`);const s=(u=r.args)!==null&&u!==void 0?u:{};return sa(s)||dt(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:Un(n),description:r.description,type:r.type,args:M8(s),resolve:r.resolve,subscribe:r.subscribe,deprecationReason:r.deprecationReason,extensions:hn(r.extensions),astNode:r.astNode}})}function M8(e){return Object.entries(e).map(([t,r])=>({name:Un(t),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:hn(r.extensions),astNode:r.astNode}))}function sa(e){return Mn(e)&&!Array.isArray(e)}function L8(e){return Au(e,t=>({description:t.description,type:t.type,args:U8(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function U8(e){return Mh(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Wi(e){return ct(e.type)&&e.defaultValue===void 0}class cs{constructor(t){var r;this.name=Un(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=j8.bind(void 0,t),this._interfaces=R8.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||dt(!1,`${this.name} must provide "resolveType" as a function, but got: ${Se(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:L8(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class Ti{constructor(t){var r;this.name=Un(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._types=BT.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||dt(!1,`${this.name} must provide "resolveType" as a function, but got: ${Se(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function BT(e){const t=q8(e.types);return Array.isArray(t)||dt(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class iu{constructor(t){var r;this.name=Un(t.name),this.description=t.description,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._values=TT(this.name,t.values),this._valueLookup=new Map(this._values.map(n=>[n.value,n])),this._nameLookup=to(this._values,n=>n.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const r=this._valueLookup.get(t);if(r===void 0)throw new he(`Enum "${this.name}" cannot represent value: ${Se(t)}`);return r.name}parseValue(t){if(typeof t!="string"){const n=Se(t);throw new he(`Enum "${this.name}" cannot represent non-string value: ${n}.`+Nc(this,n))}const r=this.getValue(t);if(r==null)throw new he(`Value "${t}" does not exist in "${this.name}" enum.`+Nc(this,t));return r.value}parseLiteral(t,r){if(t.kind!==V.ENUM){const u=Kt(t);throw new he(`Enum "${this.name}" cannot represent non-enum value: ${u}.`+Nc(this,u),{nodes:t})}const n=this.getValue(t.value);if(n==null){const u=Kt(t);throw new he(`Value "${u}" does not exist in "${this.name}" enum.`+Nc(this,u),{nodes:t})}return n.value}toConfig(){const t=Mh(this.getValues(),r=>r.name,r=>({description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Nc(e,t){const r=e.getValues().map(u=>u.name),n=ps(t,r);return Tu("the enum value",n)}function TT(e,t){return sa(t)||dt(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([r,n])=>(sa(n)||dt(!1,`${e}.${r} must refer to an object with a "value" key representing an internal value but got: ${Se(n)}.`),{name:wT(r),description:n.description,value:n.value!==void 0?n.value:r,deprecationReason:n.deprecationReason,extensions:hn(n.extensions),astNode:n.astNode}))}class ro{constructor(t){var r;this.name=Un(t.name),this.description=t.description,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=$T.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=Au(this.getFields(),r=>({description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function $T(e){const t=x8(e.fields);return sa(t)||dt(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),Au(t,(r,n)=>(!("resolve"in r)||dt(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:Un(n),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:hn(r.extensions),astNode:r.astNode}))}function G8(e){return ct(e.type)&&e.defaultValue===void 0}function A2(e,t){return e===t?!0:ct(e)&&ct(t)||jt(e)&&jt(t)?A2(e.ofType,t.ofType):!1}function oa(e,t,r){return t===r?!0:ct(r)?ct(t)?oa(e,t.ofType,r.ofType):!1:ct(t)?oa(e,t.ofType,r):jt(r)?jt(t)?oa(e,t.ofType,r.ofType):!1:jt(t)?!1:rs(r)&&(mt(t)||ut(t))&&e.isSubType(r,t)}function iv(e,t,r){return t===r?!0:rs(t)?rs(r)?e.getPossibleTypes(t).some(n=>e.isSubType(r,n)):e.isSubType(t,r):rs(r)?e.isSubType(r,t):!1}const Vf=2147483647,Hf=-2147483648,F2=new au({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=zi(e);if(typeof t=="boolean")return t?1:0;let r=t;if(typeof t=="string"&&t!==""&&(r=Number(t)),typeof r!="number"||!Number.isInteger(r))throw new he(`Int cannot represent non-integer value: ${Se(t)}`);if(r>Vf||rVf||eVf||te.name===t)}function zi(e){if(Mn(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Mn(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function V8(e){return Ln(e,ls)}class ls{constructor(t){var r,n;this.name=Un(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(r=t.isRepeatable)!==null&&r!==void 0?r:!1,this.extensions=hn(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||dt(!1,`@${t.name} locations must be an Array.`);const u=(n=t.args)!==null&&n!==void 0?n:{};Mn(u)&&!Array.isArray(u)||dt(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=M8(u)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:U8(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const H8=new ls({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[ze.FIELD,ze.FRAGMENT_SPREAD,ze.INLINE_FRAGMENT],args:{if:{type:new ot(Hr),description:"Included when true."}}}),W8=new ls({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[ze.FIELD,ze.FRAGMENT_SPREAD,ze.INLINE_FRAGMENT],args:{if:{type:new ot(Hr),description:"Skipped when true."}}}),PT="No longer supported",$p=new ls({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[ze.FIELD_DEFINITION,ze.ARGUMENT_DEFINITION,ze.INPUT_FIELD_DEFINITION,ze.ENUM_VALUE],args:{reason:{type:Rt,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:PT}}}),J8=new ls({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[ze.SCALAR],args:{url:{type:new ot(Rt),description:"The URL that specifies the behavior of this scalar."}}}),lo=Object.freeze([H8,W8,$p,J8]);function z8(e){return lo.some(({name:t})=>t===e.name)}function Wh(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function Yu(e,t){if(ct(t)){const r=Yu(e,t.ofType);return(r==null?void 0:r.kind)===V.NULL?null:r}if(e===null)return{kind:V.NULL};if(e===void 0)return null;if(jt(t)){const r=t.ofType;if(Wh(e)){const n=[];for(const u of e){const s=Yu(u,r);s!=null&&n.push(s)}return{kind:V.LIST,values:n}}return Yu(e,r)}if(bt(t)){if(!Mn(e))return null;const r=[];for(const n of Object.values(t.getFields())){const u=Yu(e[n.name],n.type);u&&r.push({kind:V.OBJECT_FIELD,name:{kind:V.NAME,value:n.name},value:u})}return{kind:V.OBJECT,fields:r}}if(Dn(t)){const r=t.serialize(e);if(r==null)return null;if(typeof r=="boolean")return{kind:V.BOOLEAN,value:r};if(typeof r=="number"&&Number.isFinite(r)){const n=String(r);return cv.test(n)?{kind:V.INT,value:n}:{kind:V.FLOAT,value:n}}if(typeof r=="string")return Zt(t)?{kind:V.ENUM,value:r}:t===xl&&cv.test(r)?{kind:V.INT,value:r}:{kind:V.STRING,value:r};throw new TypeError(`Cannot convert value to AST: ${Se(r)}.`)}tn(!1,"Unexpected input type: "+Se(t))}const cv=/^-?(?:0|[1-9][0-9]*)$/,Jh=new Wr({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Rt,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new ot(new gr(new ot(xn))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new ot(xn),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:xn,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:xn,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new ot(new gr(new ot(K8))),resolve:e=>e.getDirectives()}})}),K8=new Wr({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. +}`)}function at(e,t,r=""){return t!=null&&t!==""?e+t+r:""}function _l(e){return at(" ",e.replace(/\n/g,` + `))}function wy(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(` +`)))!==null&&t!==void 0?t:!1}function $2(e,t){switch(e.kind){case j.NULL:return null;case j.INT:return parseInt(e.value,10);case j.FLOAT:return parseFloat(e.value);case j.STRING:case j.ENUM:case j.BOOLEAN:return e.value;case j.LIST:return e.values.map(r=>$2(r,t));case j.OBJECT:return Zh(e.fields,r=>r.name.value,r=>$2(r.value,t));case j.VARIABLE:return t==null?void 0:t[e.name.value]}}function On(e){if(e!=null||it(!1,"Must provide name."),typeof e=="string"||it(!1,"Expected name to be a string."),e.length===0)throw new De("Expected name to be a non-empty string.");for(let t=1;to($2(a,i)),this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(s=t.extensionASTNodes)!==null&&s!==void 0?s:[],t.specifiedByURL==null||typeof t.specifiedByURL=="string"||it(!1,`${this.name} must provide "specifiedByURL" as a string, but got: ${Ae(t.specifiedByURL)}.`),t.serialize==null||typeof t.serialize=="function"||it(!1,`${this.name} must provide "serialize" function. If this custom Scalar is also used as an input type, ensure "parseValue" and "parseLiteral" functions are also provided.`),t.parseLiteral&&(typeof t.parseValue=="function"&&typeof t.parseLiteral=="function"||it(!1,`${this.name} must provide both "parseValue" and "parseLiteral" functions.`))}get[Symbol.toStringTag](){return"GraphQLScalarType"}toConfig(){return{name:this.name,description:this.description,specifiedByURL:this.specifiedByURL,serialize:this.serialize,parseValue:this.parseValue,parseLiteral:this.parseLiteral,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class jr{constructor(t){var r;this.name=On(t.name),this.description=t.description,this.isTypeOf=t.isTypeOf,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=()=>d5(t),this._interfaces=()=>p5(t),t.isTypeOf==null||typeof t.isTypeOf=="function"||it(!1,`${this.name} must provide "isTypeOf" as a function, but got: ${Ae(t.isTypeOf)}.`)}get[Symbol.toStringTag](){return"GraphQLObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:D5(this.getFields()),isTypeOf:this.isTypeOf,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function p5(e){var t;const r=c5((t=e.interfaces)!==null&&t!==void 0?t:[]);return Array.isArray(r)||it(!1,`${e.name} interfaces must be an Array or a function which returns an Array.`),r}function d5(e){const t=l5(e.fields);return ra(t)||it(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),yu(t,(r,n)=>{var u;ra(r)||it(!1,`${e.name}.${n} field config must be an object.`),r.resolve==null||typeof r.resolve=="function"||it(!1,`${e.name}.${n} field resolver must be a function if provided, but got: ${Ae(r.resolve)}.`);const s=(u=r.args)!==null&&u!==void 0?u:{};return ra(s)||it(!1,`${e.name}.${n} args must be an object with argument names as keys.`),{name:On(n),description:r.description,type:r.type,args:f5(s),resolve:r.resolve,subscribe:r.subscribe,deprecationReason:r.deprecationReason,extensions:an(r.extensions),astNode:r.astNode}})}function f5(e){return Object.entries(e).map(([t,r])=>({name:On(t),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:an(r.extensions),astNode:r.astNode}))}function ra(e){return Pn(e)&&!Array.isArray(e)}function D5(e){return yu(e,t=>({description:t.description,type:t.type,args:h5(t.args),resolve:t.resolve,subscribe:t.subscribe,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function h5(e){return Zh(e,t=>t.name,t=>({description:t.description,type:t.type,defaultValue:t.defaultValue,deprecationReason:t.deprecationReason,extensions:t.extensions,astNode:t.astNode}))}function Ji(e){return nt(e.type)&&e.defaultValue===void 0}class is{constructor(t){var r;this.name=On(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=d5.bind(void 0,t),this._interfaces=p5.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||it(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ae(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLInterfaceType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}getInterfaces(){return typeof this._interfaces=="function"&&(this._interfaces=this._interfaces()),this._interfaces}toConfig(){return{name:this.name,description:this.description,interfaces:this.getInterfaces(),fields:D5(this.getFields()),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}class $i{constructor(t){var r;this.name=On(t.name),this.description=t.description,this.resolveType=t.resolveType,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._types=m$.bind(void 0,t),t.resolveType==null||typeof t.resolveType=="function"||it(!1,`${this.name} must provide "resolveType" as a function, but got: ${Ae(t.resolveType)}.`)}get[Symbol.toStringTag](){return"GraphQLUnionType"}getTypes(){return typeof this._types=="function"&&(this._types=this._types()),this._types}toConfig(){return{name:this.name,description:this.description,types:this.getTypes(),resolveType:this.resolveType,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function m$(e){const t=c5(e.types);return Array.isArray(t)||it(!1,`Must provide Array of types or a function which returns such an array for Union ${e.name}.`),t}class tu{constructor(t){var r;this.name=On(t.name),this.description=t.description,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._values=E$(this.name,t.values),this._valueLookup=new Map(this._values.map(n=>[n.value,n])),this._nameLookup=zs(this._values,n=>n.name)}get[Symbol.toStringTag](){return"GraphQLEnumType"}getValues(){return this._values}getValue(t){return this._nameLookup[t]}serialize(t){const r=this._valueLookup.get(t);if(r===void 0)throw new De(`Enum "${this.name}" cannot represent value: ${Ae(t)}`);return r.name}parseValue(t){if(typeof t!="string"){const n=Ae(t);throw new De(`Enum "${this.name}" cannot represent non-string value: ${n}.`+Mc(this,n))}const r=this.getValue(t);if(r==null)throw new De(`Value "${t}" does not exist in "${this.name}" enum.`+Mc(this,t));return r.value}parseLiteral(t,r){if(t.kind!==j.ENUM){const u=Wt(t);throw new De(`Enum "${this.name}" cannot represent non-enum value: ${u}.`+Mc(this,u),{nodes:t})}const n=this.getValue(t.value);if(n==null){const u=Wt(t);throw new De(`Value "${u}" does not exist in "${this.name}" enum.`+Mc(this,u),{nodes:t})}return n.value}toConfig(){const t=Zh(this.getValues(),r=>r.name,r=>({description:r.description,value:r.value,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,values:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function Mc(e,t){const r=e.getValues().map(u=>u.name),n=ls(t,r);return wu("the enum value",n)}function E$(e,t){return ra(t)||it(!1,`${e} values must be an object with value names as keys.`),Object.entries(t).map(([r,n])=>(ra(n)||it(!1,`${e}.${r} must refer to an object with a "value" key representing an internal value but got: ${Ae(n)}.`),{name:D$(r),description:n.description,value:n.value!==void 0?n.value:r,deprecationReason:n.deprecationReason,extensions:an(n.extensions),astNode:n.astNode}))}class Ks{constructor(t){var r;this.name=On(t.name),this.description=t.description,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._fields=y$.bind(void 0,t)}get[Symbol.toStringTag](){return"GraphQLInputObjectType"}getFields(){return typeof this._fields=="function"&&(this._fields=this._fields()),this._fields}toConfig(){const t=yu(this.getFields(),r=>({description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:r.extensions,astNode:r.astNode}));return{name:this.name,description:this.description,fields:t,extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes}}toString(){return this.name}toJSON(){return this.toString()}}function y$(e){const t=l5(e.fields);return ra(t)||it(!1,`${e.name} fields must be an object with field names as keys or a function which returns such an object.`),yu(t,(r,n)=>(!("resolve"in r)||it(!1,`${e.name}.${n} field has a resolve property, but Input Types cannot define resolvers.`),{name:On(n),description:r.description,type:r.type,defaultValue:r.defaultValue,deprecationReason:r.deprecationReason,extensions:an(r.extensions),astNode:r.astNode}))}function m5(e){return nt(e.type)&&e.defaultValue===void 0}function P2(e,t){return e===t?!0:nt(e)&&nt(t)||qt(e)&&qt(t)?P2(e.ofType,t.ofType):!1}function na(e,t,r){return t===r?!0:nt(r)?nt(t)?na(e,t.ofType,r.ofType):!1:nt(t)?na(e,t.ofType,r):qt(r)?qt(t)?na(e,t.ofType,r.ofType):!1:qt(t)?!1:ts(r)&&(dt(t)||Xe(t))&&e.isSubType(r,t)}function _y(e,t,r){return t===r?!0:ts(t)?ts(r)?e.getPossibleTypes(t).some(n=>e.isSubType(r,n)):e.isSubType(t,r):ts(r)?e.isSubType(r,t):!1}const Qd=2147483647,ef=-2147483648,k2=new eu({name:"Int",description:"The `Int` scalar type represents non-fractional signed whole numeric values. Int can represent values between -(2^31) and 2^31 - 1.",serialize(e){const t=Ki(e);if(typeof t=="boolean")return t?1:0;let r=t;if(typeof t=="string"&&t!==""&&(r=Number(t)),typeof r!="number"||!Number.isInteger(r))throw new De(`Int cannot represent non-integer value: ${Ae(t)}`);if(r>Qd||rQd||eQd||te.name===t)}function Ki(e){if(Pn(e)){if(typeof e.valueOf=="function"){const t=e.valueOf();if(!Pn(t))return t}if(typeof e.toJSON=="function")return e.toJSON()}return e}function E5(e){return kn(e,cs)}class cs{constructor(t){var r,n;this.name=On(t.name),this.description=t.description,this.locations=t.locations,this.isRepeatable=(r=t.isRepeatable)!==null&&r!==void 0?r:!1,this.extensions=an(t.extensions),this.astNode=t.astNode,Array.isArray(t.locations)||it(!1,`@${t.name} locations must be an Array.`);const u=(n=t.args)!==null&&n!==void 0?n:{};Pn(u)&&!Array.isArray(u)||it(!1,`@${t.name} args must be an object with argument names as keys.`),this.args=f5(u)}get[Symbol.toStringTag](){return"GraphQLDirective"}toConfig(){return{name:this.name,description:this.description,locations:this.locations,args:h5(this.args),isRepeatable:this.isRepeatable,extensions:this.extensions,astNode:this.astNode}}toString(){return"@"+this.name}toJSON(){return this.toString()}}const y5=new cs({name:"include",description:"Directs the executor to include this field or fragment only when the `if` argument is true.",locations:[Ue.FIELD,Ue.FRAGMENT_SPREAD,Ue.INLINE_FRAGMENT],args:{if:{type:new Qe(Rr),description:"Included when true."}}}),v5=new cs({name:"skip",description:"Directs the executor to skip this field or fragment when the `if` argument is true.",locations:[Ue.FIELD,Ue.FRAGMENT_SPREAD,Ue.INLINE_FRAGMENT],args:{if:{type:new Qe(Rr),description:"Skipped when true."}}}),v$="No longer supported",xp=new cs({name:"deprecated",description:"Marks an element of a GraphQL schema as no longer supported.",locations:[Ue.FIELD_DEFINITION,Ue.ARGUMENT_DEFINITION,Ue.INPUT_FIELD_DEFINITION,Ue.ENUM_VALUE],args:{reason:{type:Nt,description:"Explains why this element was deprecated, usually also including a suggestion for how to access supported similar data. Formatted using the Markdown syntax, as specified by [CommonMark](https://commonmark.org/).",defaultValue:v$}}}),g5=new cs({name:"specifiedBy",description:"Exposes a URL that specifies the behavior of this scalar.",locations:[Ue.SCALAR],args:{url:{type:new Qe(Nt),description:"The URL that specifies the behavior of this scalar."}}}),no=Object.freeze([y5,v5,xp,g5]);function A5(e){return no.some(({name:t})=>t===e.name)}function um(e){return typeof e=="object"&&typeof(e==null?void 0:e[Symbol.iterator])=="function"}function Xu(e,t){if(nt(t)){const r=Xu(e,t.ofType);return(r==null?void 0:r.kind)===j.NULL?null:r}if(e===null)return{kind:j.NULL};if(e===void 0)return null;if(qt(t)){const r=t.ofType;if(um(e)){const n=[];for(const u of e){const s=Xu(u,r);s!=null&&n.push(s)}return{kind:j.LIST,values:n}}return Xu(e,r)}if(At(t)){if(!Pn(e))return null;const r=[];for(const n of Object.values(t.getFields())){const u=Xu(e[n.name],n.type);u&&r.push({kind:j.OBJECT_FIELD,name:{kind:j.NAME,value:n.name},value:u})}return{kind:j.OBJECT,fields:r}}if(on(t)){const r=t.serialize(e);if(r==null)return null;if(typeof r=="boolean")return{kind:j.BOOLEAN,value:r};if(typeof r=="number"&&Number.isFinite(r)){const n=String(r);return By.test(n)?{kind:j.INT,value:n}:{kind:j.FLOAT,value:n}}if(typeof r=="string")return Kt(t)?{kind:j.ENUM,value:r}:t===Vl&&By.test(r)?{kind:j.INT,value:r}:{kind:j.STRING,value:r};throw new TypeError(`Cannot convert value to AST: ${Ae(r)}.`)}Wr(!1,"Unexpected input type: "+Ae(t))}const By=/^-?(?:0|[1-9][0-9]*)$/,sm=new jr({name:"__Schema",description:"A GraphQL Schema defines the capabilities of a GraphQL server. It exposes all available types and directives on the server, as well as the entry points for query, mutation, and subscription operations.",fields:()=>({description:{type:Nt,resolve:e=>e.description},types:{description:"A list of all types supported by this server.",type:new Qe(new Dr(new Qe(Bn))),resolve(e){return Object.values(e.getTypeMap())}},queryType:{description:"The type that query operations will be rooted at.",type:new Qe(Bn),resolve:e=>e.getQueryType()},mutationType:{description:"If this server supports mutation, the type that mutation operations will be rooted at.",type:Bn,resolve:e=>e.getMutationType()},subscriptionType:{description:"If this server support subscription, the type that subscription operations will be rooted at.",type:Bn,resolve:e=>e.getSubscriptionType()},directives:{description:"A list of all directives supported by this server.",type:new Qe(new Dr(new Qe(F5))),resolve:e=>e.getDirectives()}})}),F5=new jr({name:"__Directive",description:`A Directive provides a way to describe alternate runtime execution and type validation behavior in a GraphQL document. -In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new ot(Rt),resolve:e=>e.name},description:{type:Rt,resolve:e=>e.description},isRepeatable:{type:new ot(Hr),resolve:e=>e.isRepeatable},locations:{type:new ot(new gr(new ot(X8))),resolve:e=>e.locations},args:{type:new ot(new gr(new ot(Pp))),args:{includeDeprecated:{type:Hr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}}})}),X8=new iu({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:ze.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:ze.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:ze.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:ze.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:ze.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:ze.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:ze.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:ze.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:ze.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:ze.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:ze.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:ze.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:ze.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:ze.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:ze.UNION,description:"Location adjacent to a union definition."},ENUM:{value:ze.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:ze.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:ze.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:ze.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),xn=new Wr({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new ot(Q8),resolve(e){if(nn(e))return ur.SCALAR;if(ut(e))return ur.OBJECT;if(mt(e))return ur.INTERFACE;if(lr(e))return ur.UNION;if(Zt(e))return ur.ENUM;if(bt(e))return ur.INPUT_OBJECT;if(jt(e))return ur.LIST;if(ct(e))return ur.NON_NULL;tn(!1,`Unexpected type: "${Se(e)}".`)}},name:{type:Rt,resolve:e=>"name"in e?e.name:void 0},description:{type:Rt,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Rt,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new gr(new ot(Y8)),args:{includeDeprecated:{type:Hr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(ut(e)||mt(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new gr(new ot(xn)),resolve(e){if(ut(e)||mt(e))return e.getInterfaces()}},possibleTypes:{type:new gr(new ot(xn)),resolve(e,t,r,{schema:n}){if(rs(e))return n.getPossibleTypes(e)}},enumValues:{type:new gr(new ot(Z8)),args:{includeDeprecated:{type:Hr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Zt(e)){const r=e.getValues();return t?r:r.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new gr(new ot(Pp)),args:{includeDeprecated:{type:Hr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(bt(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},ofType:{type:xn,resolve:e=>"ofType"in e?e.ofType:void 0}})}),Y8=new Wr({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new ot(Rt),resolve:e=>e.name},description:{type:Rt,resolve:e=>e.description},args:{type:new ot(new gr(new ot(Pp))),args:{includeDeprecated:{type:Hr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}},type:{type:new ot(xn),resolve:e=>e.type},isDeprecated:{type:new ot(Hr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Rt,resolve:e=>e.deprecationReason}})}),Pp=new Wr({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new ot(Rt),resolve:e=>e.name},description:{type:Rt,resolve:e=>e.description},type:{type:new ot(xn),resolve:e=>e.type},defaultValue:{type:Rt,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:r}=e,n=Yu(r,t);return n?Kt(n):null}},isDeprecated:{type:new ot(Hr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Rt,resolve:e=>e.deprecationReason}})}),Z8=new Wr({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new ot(Rt),resolve:e=>e.name},description:{type:Rt,resolve:e=>e.description},isDeprecated:{type:new ot(Hr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Rt,resolve:e=>e.deprecationReason}})});var ur;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(ur||(ur={}));const Q8=new iu({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:ur.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:ur.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:ur.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:ur.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:ur.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:ur.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:ur.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:ur.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Rl={name:"__schema",type:new ot(Jh),description:"Access the current type schema of this server.",args:[],resolve:(e,t,r,{schema:n})=>n,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},jl={name:"__type",type:xn,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new ot(Rt),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},r,{schema:n})=>n.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Ml={name:"__typename",type:new ot(Rt),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,r,{parentType:n})=>n.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},zh=Object.freeze([Jh,K8,X8,xn,Y8,Pp,Z8,Q8]);function Kh(e){return zh.some(({name:t})=>e.name===t)}function Xh(e){return Ln(e,Yh)}function OT(e){if(!Xh(e))throw new Error(`Expected ${Se(e)} to be a GraphQL schema.`);return e}class Yh{constructor(t){var r,n;this.__validationErrors=t.assumeValid===!0?[]:void 0,Mn(t)||dt(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||dt(!1,`"types" must be Array if provided but got: ${Se(t.types)}.`),!t.directives||Array.isArray(t.directives)||dt(!1,`"directives" must be Array if provided but got: ${Se(t.directives)}.`),this.description=t.description,this.extensions=hn(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(n=t.directives)!==null&&n!==void 0?n:lo;const u=new Set(t.types);if(t.types!=null)for(const s of t.types)u.delete(s),kn(s,u);this._queryType!=null&&kn(this._queryType,u),this._mutationType!=null&&kn(this._mutationType,u),this._subscriptionType!=null&&kn(this._subscriptionType,u);for(const s of this._directives)if(V8(s))for(const o of s.args)kn(o.type,u);kn(Jh,u),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of u){if(s==null)continue;const o=s.name;if(o||dt(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=s,mt(s)){for(const a of s.getInterfaces())if(mt(a)){let i=this._implementationsMap[a.name];i===void 0&&(i=this._implementationsMap[a.name]={objects:[],interfaces:[]}),i.interfaces.push(s)}}else if(ut(s)){for(const a of s.getInterfaces())if(mt(a)){let i=this._implementationsMap[a.name];i===void 0&&(i=this._implementationsMap[a.name]={objects:[],interfaces:[]}),i.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case ar.QUERY:return this.getQueryType();case ar.MUTATION:return this.getMutationType();case ar.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return lr(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const r=this._implementationsMap[t.name];return r??{objects:[],interfaces:[]}}isSubType(t,r){let n=this._subTypeMap[t.name];if(n===void 0){if(n=Object.create(null),lr(t))for(const u of t.getTypes())n[u.name]=!0;else{const u=this.getImplementations(t);for(const s of u.objects)n[s.name]=!0;for(const s of u.interfaces)n[s.name]=!0}this._subTypeMap[t.name]=n}return n[r.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(r=>r.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function kn(e,t){const r=Vr(e);if(!t.has(r)){if(t.add(r),lr(r))for(const n of r.getTypes())kn(n,t);else if(ut(r)||mt(r)){for(const n of r.getInterfaces())kn(n,t);for(const n of Object.values(r.getFields())){kn(n.type,t);for(const u of n.args)kn(u.type,t)}}else if(bt(r))for(const n of Object.values(r.getFields()))kn(n.type,t)}return t}function e5(e){if(OT(e),e.__validationErrors)return e.__validationErrors;const t=new kT(e);IT(t),NT(t),qT(t);const r=t.getErrors();return e.__validationErrors=r,r}function t5(e){const t=e5(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` +In some cases, you need to provide options to alter GraphQL's execution behavior in ways field arguments will not suffice, such as conditionally including or skipping a field. Directives provide this by describing additional information to the executor.`,fields:()=>({name:{type:new Qe(Nt),resolve:e=>e.name},description:{type:Nt,resolve:e=>e.description},isRepeatable:{type:new Qe(Rr),resolve:e=>e.isRepeatable},locations:{type:new Qe(new Dr(new Qe(C5))),resolve:e=>e.locations},args:{type:new Qe(new Dr(new Qe(Rp))),args:{includeDeprecated:{type:Rr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}}})}),C5=new tu({name:"__DirectiveLocation",description:"A Directive can be adjacent to many parts of the GraphQL language, a __DirectiveLocation describes one such possible adjacencies.",values:{QUERY:{value:Ue.QUERY,description:"Location adjacent to a query operation."},MUTATION:{value:Ue.MUTATION,description:"Location adjacent to a mutation operation."},SUBSCRIPTION:{value:Ue.SUBSCRIPTION,description:"Location adjacent to a subscription operation."},FIELD:{value:Ue.FIELD,description:"Location adjacent to a field."},FRAGMENT_DEFINITION:{value:Ue.FRAGMENT_DEFINITION,description:"Location adjacent to a fragment definition."},FRAGMENT_SPREAD:{value:Ue.FRAGMENT_SPREAD,description:"Location adjacent to a fragment spread."},INLINE_FRAGMENT:{value:Ue.INLINE_FRAGMENT,description:"Location adjacent to an inline fragment."},VARIABLE_DEFINITION:{value:Ue.VARIABLE_DEFINITION,description:"Location adjacent to a variable definition."},SCHEMA:{value:Ue.SCHEMA,description:"Location adjacent to a schema definition."},SCALAR:{value:Ue.SCALAR,description:"Location adjacent to a scalar definition."},OBJECT:{value:Ue.OBJECT,description:"Location adjacent to an object type definition."},FIELD_DEFINITION:{value:Ue.FIELD_DEFINITION,description:"Location adjacent to a field definition."},ARGUMENT_DEFINITION:{value:Ue.ARGUMENT_DEFINITION,description:"Location adjacent to an argument definition."},INTERFACE:{value:Ue.INTERFACE,description:"Location adjacent to an interface definition."},UNION:{value:Ue.UNION,description:"Location adjacent to a union definition."},ENUM:{value:Ue.ENUM,description:"Location adjacent to an enum definition."},ENUM_VALUE:{value:Ue.ENUM_VALUE,description:"Location adjacent to an enum value definition."},INPUT_OBJECT:{value:Ue.INPUT_OBJECT,description:"Location adjacent to an input object type definition."},INPUT_FIELD_DEFINITION:{value:Ue.INPUT_FIELD_DEFINITION,description:"Location adjacent to an input object field definition."}}}),Bn=new jr({name:"__Type",description:"The fundamental unit of any GraphQL Schema is the type. There are many kinds of types in GraphQL as represented by the `__TypeKind` enum.\n\nDepending on the kind of a type, certain fields describe information about that type. Scalar types provide no information beyond a name, description and optional `specifiedByURL`, while Enum types provide their values. Object and Interface types provide the fields they describe. Abstract types, Union and Interface, provide the Object types possible at runtime. List and NonNull types compose other types.",fields:()=>({kind:{type:new Qe(w5),resolve(e){if(zr(e))return er.SCALAR;if(Xe(e))return er.OBJECT;if(dt(e))return er.INTERFACE;if(or(e))return er.UNION;if(Kt(e))return er.ENUM;if(At(e))return er.INPUT_OBJECT;if(qt(e))return er.LIST;if(nt(e))return er.NON_NULL;Wr(!1,`Unexpected type: "${Ae(e)}".`)}},name:{type:Nt,resolve:e=>"name"in e?e.name:void 0},description:{type:Nt,resolve:e=>"description"in e?e.description:void 0},specifiedByURL:{type:Nt,resolve:e=>"specifiedByURL"in e?e.specifiedByURL:void 0},fields:{type:new Dr(new Qe(b5)),args:{includeDeprecated:{type:Rr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Xe(e)||dt(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},interfaces:{type:new Dr(new Qe(Bn)),resolve(e){if(Xe(e)||dt(e))return e.getInterfaces()}},possibleTypes:{type:new Dr(new Qe(Bn)),resolve(e,t,r,{schema:n}){if(ts(e))return n.getPossibleTypes(e)}},enumValues:{type:new Dr(new Qe(S5)),args:{includeDeprecated:{type:Rr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(Kt(e)){const r=e.getValues();return t?r:r.filter(n=>n.deprecationReason==null)}}},inputFields:{type:new Dr(new Qe(Rp)),args:{includeDeprecated:{type:Rr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){if(At(e)){const r=Object.values(e.getFields());return t?r:r.filter(n=>n.deprecationReason==null)}}},ofType:{type:Bn,resolve:e=>"ofType"in e?e.ofType:void 0}})}),b5=new jr({name:"__Field",description:"Object and Interface types are described by a list of Fields, each of which has a name, potentially a list of arguments, and a return type.",fields:()=>({name:{type:new Qe(Nt),resolve:e=>e.name},description:{type:Nt,resolve:e=>e.description},args:{type:new Qe(new Dr(new Qe(Rp))),args:{includeDeprecated:{type:Rr,defaultValue:!1}},resolve(e,{includeDeprecated:t}){return t?e.args:e.args.filter(r=>r.deprecationReason==null)}},type:{type:new Qe(Bn),resolve:e=>e.type},isDeprecated:{type:new Qe(Rr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Nt,resolve:e=>e.deprecationReason}})}),Rp=new jr({name:"__InputValue",description:"Arguments provided to Fields or Directives and the input fields of an InputObject are represented as Input Values which describe their type and optionally a default value.",fields:()=>({name:{type:new Qe(Nt),resolve:e=>e.name},description:{type:Nt,resolve:e=>e.description},type:{type:new Qe(Bn),resolve:e=>e.type},defaultValue:{type:Nt,description:"A GraphQL-formatted string representing the default value for this input value.",resolve(e){const{type:t,defaultValue:r}=e,n=Xu(r,t);return n?Wt(n):null}},isDeprecated:{type:new Qe(Rr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Nt,resolve:e=>e.deprecationReason}})}),S5=new jr({name:"__EnumValue",description:"One possible value for a given Enum. Enum values are unique values, not a placeholder for a string or numeric value. However an Enum value is returned in a JSON response as a string.",fields:()=>({name:{type:new Qe(Nt),resolve:e=>e.name},description:{type:Nt,resolve:e=>e.description},isDeprecated:{type:new Qe(Rr),resolve:e=>e.deprecationReason!=null},deprecationReason:{type:Nt,resolve:e=>e.deprecationReason}})});var er;(function(e){e.SCALAR="SCALAR",e.OBJECT="OBJECT",e.INTERFACE="INTERFACE",e.UNION="UNION",e.ENUM="ENUM",e.INPUT_OBJECT="INPUT_OBJECT",e.LIST="LIST",e.NON_NULL="NON_NULL"})(er||(er={}));const w5=new tu({name:"__TypeKind",description:"An enum describing what kind of type a given `__Type` is.",values:{SCALAR:{value:er.SCALAR,description:"Indicates this type is a scalar."},OBJECT:{value:er.OBJECT,description:"Indicates this type is an object. `fields` and `interfaces` are valid fields."},INTERFACE:{value:er.INTERFACE,description:"Indicates this type is an interface. `fields`, `interfaces`, and `possibleTypes` are valid fields."},UNION:{value:er.UNION,description:"Indicates this type is a union. `possibleTypes` is a valid field."},ENUM:{value:er.ENUM,description:"Indicates this type is an enum. `enumValues` is a valid field."},INPUT_OBJECT:{value:er.INPUT_OBJECT,description:"Indicates this type is an input object. `inputFields` is a valid field."},LIST:{value:er.LIST,description:"Indicates this type is a list. `ofType` is a valid field."},NON_NULL:{value:er.NON_NULL,description:"Indicates this type is a non-null. `ofType` is a valid field."}}}),Hl={name:"__schema",type:new Qe(sm),description:"Access the current type schema of this server.",args:[],resolve:(e,t,r,{schema:n})=>n,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Wl={name:"__type",type:Bn,description:"Request the type information of a single type.",args:[{name:"name",description:void 0,type:new Qe(Nt),defaultValue:void 0,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0}],resolve:(e,{name:t},r,{schema:n})=>n.getType(t),deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},Jl={name:"__typename",type:new Qe(Nt),description:"The name of the current Object type at runtime.",args:[],resolve:(e,t,r,{parentType:n})=>n.name,deprecationReason:void 0,extensions:Object.create(null),astNode:void 0},om=Object.freeze([sm,F5,C5,Bn,b5,Rp,S5,w5]);function am(e){return om.some(({name:t})=>e.name===t)}function im(e){return kn(e,cm)}function g$(e){if(!im(e))throw new Error(`Expected ${Ae(e)} to be a GraphQL schema.`);return e}class cm{constructor(t){var r,n;this.__validationErrors=t.assumeValid===!0?[]:void 0,Pn(t)||it(!1,"Must provide configuration object."),!t.types||Array.isArray(t.types)||it(!1,`"types" must be Array if provided but got: ${Ae(t.types)}.`),!t.directives||Array.isArray(t.directives)||it(!1,`"directives" must be Array if provided but got: ${Ae(t.directives)}.`),this.description=t.description,this.extensions=an(t.extensions),this.astNode=t.astNode,this.extensionASTNodes=(r=t.extensionASTNodes)!==null&&r!==void 0?r:[],this._queryType=t.query,this._mutationType=t.mutation,this._subscriptionType=t.subscription,this._directives=(n=t.directives)!==null&&n!==void 0?n:no;const u=new Set(t.types);if(t.types!=null)for(const s of t.types)u.delete(s),bn(s,u);this._queryType!=null&&bn(this._queryType,u),this._mutationType!=null&&bn(this._mutationType,u),this._subscriptionType!=null&&bn(this._subscriptionType,u);for(const s of this._directives)if(E5(s))for(const o of s.args)bn(o.type,u);bn(sm,u),this._typeMap=Object.create(null),this._subTypeMap=Object.create(null),this._implementationsMap=Object.create(null);for(const s of u){if(s==null)continue;const o=s.name;if(o||it(!1,"One of the provided types for building the Schema is missing a name."),this._typeMap[o]!==void 0)throw new Error(`Schema must contain uniquely named types but contains multiple types named "${o}".`);if(this._typeMap[o]=s,dt(s)){for(const a of s.getInterfaces())if(dt(a)){let i=this._implementationsMap[a.name];i===void 0&&(i=this._implementationsMap[a.name]={objects:[],interfaces:[]}),i.interfaces.push(s)}}else if(Xe(s)){for(const a of s.getInterfaces())if(dt(a)){let i=this._implementationsMap[a.name];i===void 0&&(i=this._implementationsMap[a.name]={objects:[],interfaces:[]}),i.objects.push(s)}}}}get[Symbol.toStringTag](){return"GraphQLSchema"}getQueryType(){return this._queryType}getMutationType(){return this._mutationType}getSubscriptionType(){return this._subscriptionType}getRootType(t){switch(t){case nr.QUERY:return this.getQueryType();case nr.MUTATION:return this.getMutationType();case nr.SUBSCRIPTION:return this.getSubscriptionType()}}getTypeMap(){return this._typeMap}getType(t){return this.getTypeMap()[t]}getPossibleTypes(t){return or(t)?t.getTypes():this.getImplementations(t).objects}getImplementations(t){const r=this._implementationsMap[t.name];return r??{objects:[],interfaces:[]}}isSubType(t,r){let n=this._subTypeMap[t.name];if(n===void 0){if(n=Object.create(null),or(t))for(const u of t.getTypes())n[u.name]=!0;else{const u=this.getImplementations(t);for(const s of u.objects)n[s.name]=!0;for(const s of u.interfaces)n[s.name]=!0}this._subTypeMap[t.name]=n}return n[r.name]!==void 0}getDirectives(){return this._directives}getDirective(t){return this.getDirectives().find(r=>r.name===t)}toConfig(){return{description:this.description,query:this.getQueryType(),mutation:this.getMutationType(),subscription:this.getSubscriptionType(),types:Object.values(this.getTypeMap()),directives:this.getDirectives(),extensions:this.extensions,astNode:this.astNode,extensionASTNodes:this.extensionASTNodes,assumeValid:this.__validationErrors!==void 0}}}function bn(e,t){const r=xr(e);if(!t.has(r)){if(t.add(r),or(r))for(const n of r.getTypes())bn(n,t);else if(Xe(r)||dt(r)){for(const n of r.getInterfaces())bn(n,t);for(const n of Object.values(r.getFields())){bn(n.type,t);for(const u of n.args)bn(u.type,t)}}else if(At(r))for(const n of Object.values(r.getFields()))bn(n.type,t)}return t}function _5(e){if(g$(e),e.__validationErrors)return e.__validationErrors;const t=new A$(e);F$(t),C$(t),b$(t);const r=t.getErrors();return e.__validationErrors=r,r}function B5(e){const t=_5(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` -`))}class kT{constructor(t){this._errors=[],this.schema=t}reportError(t,r){const n=Array.isArray(r)?r.filter(Boolean):r;this._errors.push(new he(t,{nodes:n}))}getErrors(){return this._errors}}function IT(e){const t=e.schema,r=t.getQueryType();if(!r)e.reportError("Query root type must be provided.",t.astNode);else if(!ut(r)){var n;e.reportError(`Query root type must be Object type, it cannot be ${Se(r)}.`,(n=Wf(t,ar.QUERY))!==null&&n!==void 0?n:r.astNode)}const u=t.getMutationType();if(u&&!ut(u)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Se(u)}.`,(s=Wf(t,ar.MUTATION))!==null&&s!==void 0?s:u.astNode)}const o=t.getSubscriptionType();if(o&&!ut(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Se(o)}.`,(a=Wf(t,ar.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function Wf(e,t){var r;return(r=[e.astNode,...e.extensionASTNodes].flatMap(n=>{var u;return(u=n==null?void 0:n.operationTypes)!==null&&u!==void 0?u:[]}).find(n=>n.operation===t))===null||r===void 0?void 0:r.type}function NT(e){for(const r of e.schema.getDirectives()){if(!V8(r)){e.reportError(`Expected directive but got: ${Se(r)}.`,r==null?void 0:r.astNode);continue}no(e,r);for(const n of r.args)if(no(e,n),In(n.type)||e.reportError(`The type of @${r.name}(${n.name}:) must be Input Type but got: ${Se(n.type)}.`,n.astNode),Wi(n)&&n.deprecationReason!=null){var t;e.reportError(`Required argument @${r.name}(${n.name}:) cannot be deprecated.`,[Zh(n.astNode),(t=n.astNode)===null||t===void 0?void 0:t.type])}}}function no(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function qT(e){const t=UT(e),r=e.schema.getTypeMap();for(const n of Object.values(r)){if(!Tp(n)){e.reportError(`Expected GraphQL named type but got: ${Se(n)}.`,n.astNode);continue}Kh(n)||no(e,n),ut(n)||mt(n)?(lv(e,n),pv(e,n)):lr(n)?jT(e,n):Zt(n)?MT(e,n):bt(n)&&(LT(e,n),t(n))}}function lv(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of r){if(no(e,o),!fi(o.type)){var n;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${Se(o.type)}.`,(n=o.astNode)===null||n===void 0?void 0:n.type)}for(const a of o.args){const i=a.name;if(no(e,a),!In(a.type)){var u;e.reportError(`The type of ${t.name}.${o.name}(${i}:) must be Input Type but got: ${Se(a.type)}.`,(u=a.astNode)===null||u===void 0?void 0:u.type)}if(Wi(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${i}:) cannot be deprecated.`,[Zh(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function pv(e,t){const r=Object.create(null);for(const n of t.getInterfaces()){if(!mt(n)){e.reportError(`Type ${Se(t)} must only implement Interface types, it cannot implement ${Se(n)}.`,di(t,n));continue}if(t===n){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,di(t,n));continue}if(r[n.name]){e.reportError(`Type ${t.name} can only implement ${n.name} once.`,di(t,n));continue}r[n.name]=!0,RT(e,t,n),xT(e,t,n)}}function xT(e,t,r){const n=t.getFields();for(const i of Object.values(r.getFields())){const c=i.name,l=n[c];if(!l){e.reportError(`Interface field ${r.name}.${c} expected but ${t.name} does not provide it.`,[i.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!oa(e.schema,l.type,i.type)){var u,s;e.reportError(`Interface field ${r.name}.${c} expects type ${Se(i.type)} but ${t.name}.${c} is type ${Se(l.type)}.`,[(u=i.astNode)===null||u===void 0?void 0:u.type,(s=l.astNode)===null||s===void 0?void 0:s.type])}for(const p of i.args){const f=p.name,d=l.args.find(h=>h.name===f);if(!d){e.reportError(`Interface field argument ${r.name}.${c}(${f}:) expected but ${t.name}.${c} does not provide it.`,[p.astNode,l.astNode]);continue}if(!A2(p.type,d.type)){var o,a;e.reportError(`Interface field argument ${r.name}.${c}(${f}:) expects type ${Se(p.type)} but ${t.name}.${c}(${f}:) is type ${Se(d.type)}.`,[(o=p.astNode)===null||o===void 0?void 0:o.type,(a=d.astNode)===null||a===void 0?void 0:a.type])}}for(const p of l.args){const f=p.name;!i.args.find(h=>h.name===f)&&Wi(p)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${f} that is missing from the Interface field ${r.name}.${c}.`,[p.astNode,i.astNode])}}}function RT(e,t,r){const n=t.getInterfaces();for(const u of r.getInterfaces())n.includes(u)||e.reportError(u===t?`Type ${t.name} cannot implement ${r.name} because it would create a circular reference.`:`Type ${t.name} must implement ${u.name} because it is implemented by ${r.name}.`,[...di(r,u),...di(t,r)])}function jT(e,t){const r=t.getTypes();r.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const n=Object.create(null);for(const u of r){if(n[u.name]){e.reportError(`Union type ${t.name} can only include type ${u.name} once.`,fv(t,u.name));continue}n[u.name]=!0,ut(u)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Se(u)}.`,fv(t,String(u)))}}function MT(e,t){const r=t.getValues();r.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const n of r)no(e,n)}function LT(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of r){if(no(e,s),!In(s.type)){var n;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${Se(s.type)}.`,(n=s.astNode)===null||n===void 0?void 0:n.type)}if(G8(s)&&s.deprecationReason!=null){var u;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[Zh(s.astNode),(u=s.astNode)===null||u===void 0?void 0:u.type])}}}function UT(e){const t=Object.create(null),r=[],n=Object.create(null);return u;function u(s){if(t[s.name])return;t[s.name]=!0,n[s.name]=r.length;const o=Object.values(s.getFields());for(const a of o)if(ct(a.type)&&bt(a.type.ofType)){const i=a.type.ofType,c=n[i.name];if(r.push(a),c===void 0)u(i);else{const l=r.slice(c),p=l.map(f=>f.name).join(".");e.reportError(`Cannot reference Input Object "${i.name}" within itself through a series of non-null fields: "${p}".`,l.map(f=>f.astNode))}r.pop()}n[s.name]=void 0}}function di(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function fv(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function Zh(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(r=>r.name.value===$p.name)}function rn(e,t){switch(t.kind){case V.LIST_TYPE:{const r=rn(e,t.type);return r&&new gr(r)}case V.NON_NULL_TYPE:{const r=rn(e,t.type);return r&&new ot(r)}case V.NAMED_TYPE:return e.getType(t.name.value)}}class r5{constructor(t,r,n){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??GT,r&&(In(r)&&this._inputTypeStack.push(r),is(r)&&this._parentTypeStack.push(r),fi(r)&&this._typeStack.push(r))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const r=this._schema;switch(t.kind){case V.SELECTION_SET:{const u=Vr(this.getType());this._parentTypeStack.push(is(u)?u:void 0);break}case V.FIELD:{const u=this.getParentType();let s,o;u&&(s=this._getFieldDef(r,u,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(fi(o)?o:void 0);break}case V.DIRECTIVE:this._directive=r.getDirective(t.name.value);break;case V.OPERATION_DEFINITION:{const u=r.getRootType(t.operation);this._typeStack.push(ut(u)?u:void 0);break}case V.INLINE_FRAGMENT:case V.FRAGMENT_DEFINITION:{const u=t.typeCondition,s=u?rn(r,u):Vr(this.getType());this._typeStack.push(fi(s)?s:void 0);break}case V.VARIABLE_DEFINITION:{const u=rn(r,t.type);this._inputTypeStack.push(In(u)?u:void 0);break}case V.ARGUMENT:{var n;let u,s;const o=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();o&&(u=o.args.find(a=>a.name===t.name.value),u&&(s=u.type)),this._argument=u,this._defaultValueStack.push(u?u.defaultValue:void 0),this._inputTypeStack.push(In(s)?s:void 0);break}case V.LIST:{const u=Vh(this.getInputType()),s=jt(u)?u.ofType:u;this._defaultValueStack.push(void 0),this._inputTypeStack.push(In(s)?s:void 0);break}case V.OBJECT_FIELD:{const u=Vr(this.getInputType());let s,o;bt(u)&&(o=u.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(In(s)?s:void 0);break}case V.ENUM:{const u=Vr(this.getInputType());let s;Zt(u)&&(s=u.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case V.SELECTION_SET:this._parentTypeStack.pop();break;case V.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case V.DIRECTIVE:this._directive=null;break;case V.OPERATION_DEFINITION:case V.INLINE_FRAGMENT:case V.FRAGMENT_DEFINITION:this._typeStack.pop();break;case V.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case V.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.LIST:case V.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case V.ENUM:this._enumValue=null;break}}}function GT(e,t,r){const n=r.name.value;if(n===Rl.name&&e.getQueryType()===t)return Rl;if(n===jl.name&&e.getQueryType()===t)return jl;if(n===Ml.name&&is(t))return Ml;if(ut(t)||mt(t))return t.getFields()[n]}function n5(e,t){return{enter(...r){const n=r[0];e.enter(n);const u=ql(t,n.kind).enter;if(u){const s=u.apply(t,r);return s!==void 0&&(e.leave(n),E2(s)&&e.enter(s)),s}},leave(...r){const n=r[0],u=ql(t,n.kind).leave;let s;return u&&(s=u.apply(t,r)),e.leave(n),s}}}function VT(e){return u5(e)||s5(e)||o5(e)}function u5(e){return e.kind===V.OPERATION_DEFINITION||e.kind===V.FRAGMENT_DEFINITION}function s5(e){return e.kind===V.SCHEMA_DEFINITION||Ki(e)||e.kind===V.DIRECTIVE_DEFINITION}function Ki(e){return e.kind===V.SCALAR_TYPE_DEFINITION||e.kind===V.OBJECT_TYPE_DEFINITION||e.kind===V.INTERFACE_TYPE_DEFINITION||e.kind===V.UNION_TYPE_DEFINITION||e.kind===V.ENUM_TYPE_DEFINITION||e.kind===V.INPUT_OBJECT_TYPE_DEFINITION}function o5(e){return e.kind===V.SCHEMA_EXTENSION||Qh(e)}function Qh(e){return e.kind===V.SCALAR_TYPE_EXTENSION||e.kind===V.OBJECT_TYPE_EXTENSION||e.kind===V.INTERFACE_TYPE_EXTENSION||e.kind===V.UNION_TYPE_EXTENSION||e.kind===V.ENUM_TYPE_EXTENSION||e.kind===V.INPUT_OBJECT_TYPE_EXTENSION}function HT(e){return{Document(t){for(const r of t.definitions)if(!u5(r)){const n=r.kind===V.SCHEMA_DEFINITION||r.kind===V.SCHEMA_EXTENSION?"schema":'"'+r.name.value+'"';e.reportError(new he(`The ${n} definition is not executable.`,{nodes:r}))}return!1}}}function WT(e){return{Field(t){const r=e.getParentType();if(r&&!e.getFieldDef()){const u=e.getSchema(),s=t.name.value;let o=Tu("to use an inline fragment on",JT(u,r,s));o===""&&(o=Tu(zT(r,s))),e.reportError(new he(`Cannot query field "${s}" on type "${r.name}".`+o,{nodes:t}))}}}}function JT(e,t,r){if(!rs(t))return[];const n=new Set,u=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[r]){n.add(o),u[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[r]&&(n.add(a),u[a.name]=((s=u[a.name])!==null&&s!==void 0?s:0)+1)}}return[...n].sort((o,a)=>{const i=u[a.name]-u[o.name];return i!==0?i:mt(o)&&e.isSubType(o,a)?-1:mt(a)&&e.isSubType(a,o)?1:Lh(o.name,a.name)}).map(o=>o.name)}function zT(e,t){if(ut(e)||mt(e)){const r=Object.keys(e.getFields());return ps(t,r)}return[]}function KT(e){return{InlineFragment(t){const r=t.typeCondition;if(r){const n=rn(e.getSchema(),r);if(n&&!is(n)){const u=Kt(r);e.reportError(new he(`Fragment cannot condition on non composite type "${u}".`,{nodes:r}))}}},FragmentDefinition(t){const r=rn(e.getSchema(),t.typeCondition);if(r&&!is(r)){const n=Kt(t.typeCondition);e.reportError(new he(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function XT(e){return{...a5(e),Argument(t){const r=e.getArgument(),n=e.getFieldDef(),u=e.getParentType();if(!r&&n&&u){const s=t.name.value,o=n.args.map(i=>i.name),a=ps(s,o);e.reportError(new he(`Unknown argument "${s}" on field "${u.name}.${n.name}".`+Tu(a),{nodes:t}))}}}}function a5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():lo;for(const o of n)t[o.name]=o.args.map(a=>a.name);const u=e.getDocument().definitions;for(const o of u)if(o.kind===V.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(i=>i.name.value)}return{Directive(o){const a=o.name.value,i=t[a];if(o.arguments&&i)for(const c of o.arguments){const l=c.name.value;if(!i.includes(l)){const p=ps(l,i);e.reportError(new he(`Unknown argument "${l}" on directive "@${a}".`+Tu(p),{nodes:c}))}}return!1}}}function i5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():lo;for(const s of n)t[s.name]=s.locations;const u=e.getDocument().definitions;for(const s of u)s.kind===V.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,i,c){const l=s.name.value,p=t[l];if(!p){e.reportError(new he(`Unknown directive "@${l}".`,{nodes:s}));return}const f=YT(c);f&&!p.includes(f)&&e.reportError(new he(`Directive "@${l}" may not be used on ${f}.`,{nodes:s}))}}}function YT(e){const t=e[e.length-1];switch("kind"in t||tn(!1),t.kind){case V.OPERATION_DEFINITION:return ZT(t.operation);case V.FIELD:return ze.FIELD;case V.FRAGMENT_SPREAD:return ze.FRAGMENT_SPREAD;case V.INLINE_FRAGMENT:return ze.INLINE_FRAGMENT;case V.FRAGMENT_DEFINITION:return ze.FRAGMENT_DEFINITION;case V.VARIABLE_DEFINITION:return ze.VARIABLE_DEFINITION;case V.SCHEMA_DEFINITION:case V.SCHEMA_EXTENSION:return ze.SCHEMA;case V.SCALAR_TYPE_DEFINITION:case V.SCALAR_TYPE_EXTENSION:return ze.SCALAR;case V.OBJECT_TYPE_DEFINITION:case V.OBJECT_TYPE_EXTENSION:return ze.OBJECT;case V.FIELD_DEFINITION:return ze.FIELD_DEFINITION;case V.INTERFACE_TYPE_DEFINITION:case V.INTERFACE_TYPE_EXTENSION:return ze.INTERFACE;case V.UNION_TYPE_DEFINITION:case V.UNION_TYPE_EXTENSION:return ze.UNION;case V.ENUM_TYPE_DEFINITION:case V.ENUM_TYPE_EXTENSION:return ze.ENUM;case V.ENUM_VALUE_DEFINITION:return ze.ENUM_VALUE;case V.INPUT_OBJECT_TYPE_DEFINITION:case V.INPUT_OBJECT_TYPE_EXTENSION:return ze.INPUT_OBJECT;case V.INPUT_VALUE_DEFINITION:{const r=e[e.length-3];return"kind"in r||tn(!1),r.kind===V.INPUT_OBJECT_TYPE_DEFINITION?ze.INPUT_FIELD_DEFINITION:ze.ARGUMENT_DEFINITION}default:tn(!1,"Unexpected kind: "+Se(t.kind))}}function ZT(e){switch(e){case ar.QUERY:return ze.QUERY;case ar.MUTATION:return ze.MUTATION;case ar.SUBSCRIPTION:return ze.SUBSCRIPTION}}function QT(e){return{FragmentSpread(t){const r=t.name.value;e.getFragment(r)||e.reportError(new he(`Unknown fragment "${r}".`,{nodes:t.name}))}}}function c5(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);for(const s of e.getDocument().definitions)Ki(s)&&(n[s.name.value]=!0);const u=[...Object.keys(r),...Object.keys(n)];return{NamedType(s,o,a,i,c){const l=s.name.value;if(!r[l]&&!n[l]){var p;const f=(p=c[2])!==null&&p!==void 0?p:a,d=f!=null&&e$(f);if(d&&dv.includes(l))return;const h=ps(l,d?dv.concat(u):u);e.reportError(new he(`Unknown type "${l}".`+Tu(h),{nodes:s}))}}}}const dv=[...Hh,...zh].map(e=>e.name);function e$(e){return"kind"in e&&(s5(e)||o5(e))}function t$(e){let t=0;return{Document(r){t=r.definitions.filter(n=>n.kind===V.OPERATION_DEFINITION).length},OperationDefinition(r){!r.name&&t>1&&e.reportError(new he("This anonymous operation must be the only defined operation.",{nodes:r}))}}}function r$(e){var t,r,n;const u=e.getSchema(),s=(t=(r=(n=u==null?void 0:u.astNode)!==null&&n!==void 0?n:u==null?void 0:u.getQueryType())!==null&&r!==void 0?r:u==null?void 0:u.getMutationType())!==null&&t!==void 0?t:u==null?void 0:u.getSubscriptionType();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new he("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new he("Must provide only one schema definition.",{nodes:a})),++o}}}function n$(e){const t=Object.create(null),r=[],n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return u(s),!1}};function u(s){if(t[s.name.value])return;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){n[o]=r.length;for(const i of a){const c=i.name.value,l=n[c];if(r.push(i),l===void 0){const p=e.getFragment(c);p&&u(p)}else{const p=r.slice(l),f=p.slice(0,-1).map(d=>'"'+d.name.value+'"').join(", ");e.reportError(new he(`Cannot spread fragment "${c}" within itself`+(f!==""?` via ${f}.`:"."),{nodes:p}))}r.pop()}n[o]=void 0}}}function u$(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){const n=e.getRecursiveVariableUsages(r);for(const{node:u}of n){const s=u.name.value;t[s]!==!0&&e.reportError(new he(r.name?`Variable "$${s}" is not defined by operation "${r.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[u,r]}))}}},VariableDefinition(r){t[r.variable.name.value]=!0}}}function s$(e){const t=[],r=[];return{OperationDefinition(n){return t.push(n),!1},FragmentDefinition(n){return r.push(n),!1},Document:{leave(){const n=Object.create(null);for(const u of t)for(const s of e.getRecursivelyReferencedFragments(u))n[s.name.value]=!0;for(const u of r){const s=u.name.value;n[s]!==!0&&e.reportError(new he(`Fragment "${s}" is never used.`,{nodes:u}))}}}}}function o$(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(r){const n=Object.create(null),u=e.getRecursiveVariableUsages(r);for(const{node:s}of u)n[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;n[o]!==!0&&e.reportError(new he(r.name?`Variable "$${o}" is never used in operation "${r.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(r){t.push(r)}}}function em(e){switch(e.kind){case V.OBJECT:return{...e,fields:a$(e.fields)};case V.LIST:return{...e,values:e.values.map(em)};case V.INT:case V.FLOAT:case V.STRING:case V.BOOLEAN:case V.NULL:case V.ENUM:case V.VARIABLE:return e}}function a$(e){return e.map(t=>({...t,value:em(t.value)})).sort((t,r)=>Lh(t.name.value,r.name.value))}function l5(e){return Array.isArray(e)?e.map(([t,r])=>`subfields "${t}" conflict because `+l5(r)).join(" and "):e}function i$(e){const t=new d$,r=new Map;return{SelectionSet(n){const u=c$(e,r,t,e.getParentType(),n);for(const[[s,o],a,i]of u){const c=l5(o);e.reportError(new he(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(i)}))}}}}function c$(e,t,r,n,u){const s=[],[o,a]=Gl(e,t,n,u);if(p$(e,s,t,r,o),a.length!==0)for(let i=0;i1)for(let a=0;a({kind:V.OBJECT_FIELD,name:u.name,value:u.value}))};return Kt(em(n))}function b2(e,t){return jt(e)?jt(t)?b2(e.ofType,t.ofType):!0:jt(t)?!0:ct(e)?ct(t)?b2(e.ofType,t.ofType):!0:ct(t)?!0:Dn(e)||Dn(t)?e!==t:!1}function Gl(e,t,r,n){const u=t.get(n);if(u)return u;const s=Object.create(null),o=Object.create(null);f5(e,r,n,s,o);const a=[s,Object.keys(o)];return t.set(n,a),a}function S2(e,t,r){const n=t.get(r.selectionSet);if(n)return n;const u=rn(e.getSchema(),r.typeCondition);return Gl(e,t,u,r.selectionSet)}function f5(e,t,r,n,u){for(const s of r.selections)switch(s.kind){case V.FIELD:{const o=s.name.value;let a;(ut(t)||mt(t))&&(a=t.getFields()[o]);const i=s.alias?s.alias.value:o;n[i]||(n[i]=[]),n[i].push([t,s,a]);break}case V.FRAGMENT_SPREAD:u[s.name.value]=!0;break;case V.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?rn(e.getSchema(),o):t;f5(e,a,s.selectionSet,n,u);break}}}function f$(e,t,r,n){if(e.length>0)return[[t,e.map(([u])=>u)],[r,...e.map(([,u])=>u).flat()],[n,...e.map(([,,u])=>u).flat()]]}class d${constructor(){this._data=new Map}has(t,r,n){var u;const[s,o]=ts.name.value));for(const s of n.args)if(!u.has(s.name)&&Wi(s)){const o=Se(s.type);e.reportError(new he(`Field "${n.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function d5(e){var t;const r=Object.create(null),n=e.getSchema(),u=(t=n==null?void 0:n.getDirectives())!==null&&t!==void 0?t:lo;for(const a of u)r[a.name]=to(a.args.filter(Wi),i=>i.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===V.DIRECTIVE_DEFINITION){var o;const i=(o=a.arguments)!==null&&o!==void 0?o:[];r[a.name.value]=to(i.filter(A$),c=>c.name.value)}return{Directive:{leave(a){const i=a.name.value,c=r[i];if(c){var l;const p=(l=a.arguments)!==null&&l!==void 0?l:[],f=new Set(p.map(d=>d.name.value));for(const[d,h]of Object.entries(c))if(!f.has(d)){const E=Uh(h.type)?Se(h.type):Kt(h.type);e.reportError(new he(`Directive "@${i}" argument "${d}" of type "${E}" is required, but it was not provided.`,{nodes:a}))}}}}}}function A$(e){return e.type.kind===V.NON_NULL_TYPE&&e.defaultValue==null}function F$(e){return{Field(t){const r=e.getType(),n=t.selectionSet;if(r){if(Dn(Vr(r))){if(n){const u=t.name.value,s=Se(r);e.reportError(new he(`Field "${u}" must not have a selection since type "${s}" has no subfields.`,{nodes:n}))}}else if(!n){const u=t.name.value,s=Se(r);e.reportError(new he(`Field "${u}" of type "${s}" must have a selection of subfields. Did you mean "${u} { ... }"?`,{nodes:t}))}}}}}function D5(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function $i(e,t,r){return{prev:e,key:t,typename:r}}function On(e){const t=[];let r=e;for(;r;)t.push(r.key),r=r.prev;return t.reverse()}function C$(e,t,r=b$){return oi(e,t,r,void 0)}function b$(e,t,r){let n="Invalid value "+Se(t);throw e.length>0&&(n+=` at "value${D5(e)}"`),r.message=n+": "+r.message,r}function oi(e,t,r,n){if(ct(t)){if(e!=null)return oi(e,t.ofType,r,n);r(On(n),e,new he(`Expected non-nullable type "${Se(t)}" not to be null.`));return}if(e==null)return null;if(jt(t)){const u=t.ofType;return Wh(e)?Array.from(e,(s,o)=>{const a=$i(n,o,void 0);return oi(s,u,r,a)}):[oi(e,u,r,n)]}if(bt(t)){if(!Mn(e)){r(On(n),e,new he(`Expected type "${t.name}" to be an object.`));return}const u={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)u[o.name]=o.defaultValue;else if(ct(o.type)){const i=Se(o.type);r(On(n),e,new he(`Field "${o.name}" of required type "${i}" was not provided.`))}continue}u[o.name]=oi(a,o.type,r,$i(n,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=ps(o,Object.keys(t.getFields()));r(On(n),e,new he(`Field "${o}" is not defined by type "${t.name}".`+Tu(a)))}return u}if(Dn(t)){let u;try{u=t.parseValue(e)}catch(s){s instanceof he?r(On(n),e,s):r(On(n),e,new he(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return u===void 0&&r(On(n),e,new he(`Expected type "${t.name}".`)),u}tn(!1,"Unexpected input type: "+Se(t))}function Zu(e,t,r){if(e){if(e.kind===V.VARIABLE){const n=e.name.value;if(r==null||r[n]===void 0)return;const u=r[n];return u===null&&ct(t)?void 0:u}if(ct(t))return e.kind===V.NULL?void 0:Zu(e,t.ofType,r);if(e.kind===V.NULL)return null;if(jt(t)){const n=t.ofType;if(e.kind===V.LIST){const s=[];for(const o of e.values)if(hv(o,r)){if(ct(n))return;s.push(null)}else{const a=Zu(o,n,r);if(a===void 0)return;s.push(a)}return s}const u=Zu(e,n,r);return u===void 0?void 0:[u]}if(bt(t)){if(e.kind!==V.OBJECT)return;const n=Object.create(null),u=to(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=u[s.name];if(!o||hv(o.value,r)){if(s.defaultValue!==void 0)n[s.name]=s.defaultValue;else if(ct(s.type))return;continue}const a=Zu(o.value,s.type,r);if(a===void 0)return;n[s.name]=a}return n}if(Dn(t)){let n;try{n=t.parseLiteral(e,r)}catch{return}return n===void 0?void 0:n}tn(!1,"Unexpected input type: "+Se(t))}}function hv(e,t){return e.kind===V.VARIABLE&&(t==null||t[e.name.value]===void 0)}function S$(e,t,r,n){const u=[],s=n==null?void 0:n.maxErrors;try{const o=w$(e,t,r,a=>{if(s!=null&&u.length>=s)throw new he("Too many errors processing variables, error limit reached. Execution aborted.");u.push(a)});if(u.length===0)return{coerced:o}}catch(o){u.push(o)}return{errors:u}}function w$(e,t,r,n){const u={};for(const s of t){const o=s.variable.name.value,a=rn(e,s.type);if(!In(a)){const c=Kt(s.type);n(new he(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!m5(r,o)){if(s.defaultValue)u[o]=Zu(s.defaultValue,a);else if(ct(a)){const c=Se(a);n(new he(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const i=r[o];if(i===null&&ct(a)){const c=Se(a);n(new he(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}u[o]=C$(i,a,(c,l,p)=>{let f=`Variable "$${o}" got invalid value `+Se(l);c.length>0&&(f+=` at "${o}${D5(c)}"`),n(new he(f+"; "+p.message,{nodes:s,originalError:p.originalError}))})}return u}function h5(e,t,r){var n;const u={},s=(n=t.arguments)!==null&&n!==void 0?n:[],o=to(s,a=>a.name.value);for(const a of e.args){const i=a.name,c=a.type,l=o[i];if(!l){if(a.defaultValue!==void 0)u[i]=a.defaultValue;else if(ct(c))throw new he(`Argument "${i}" of required type "${Se(c)}" was not provided.`,{nodes:t});continue}const p=l.value;let f=p.kind===V.NULL;if(p.kind===V.VARIABLE){const h=p.name.value;if(r==null||!m5(r,h)){if(a.defaultValue!==void 0)u[i]=a.defaultValue;else if(ct(c))throw new he(`Argument "${i}" of required type "${Se(c)}" was provided the variable "$${h}" which was not provided a runtime value.`,{nodes:p});continue}f=r[h]==null}if(f&&ct(c))throw new he(`Argument "${i}" of non-null type "${Se(c)}" must not be null.`,{nodes:p});const d=Zu(p,c,r);if(d===void 0)throw new he(`Argument "${i}" has invalid value ${Kt(p)}.`,{nodes:p});u[i]=d}return u}function Vl(e,t,r){var n;const u=(n=t.directives)===null||n===void 0?void 0:n.find(s=>s.name.value===e.name);if(u)return h5(e,u,r)}function m5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function E5(e,t,r,n,u){const s=new Map;return Hl(e,t,r,n,u,s,new Set),s}function _$(e,t,r,n,u){const s=new Map,o=new Set;for(const a of u)a.selectionSet&&Hl(e,t,r,n,a.selectionSet,s,o);return s}function Hl(e,t,r,n,u,s,o){for(const a of u.selections)switch(a.kind){case V.FIELD:{if(!Jf(r,a))continue;const i=B$(a),c=s.get(i);c!==void 0?c.push(a):s.set(i,[a]);break}case V.INLINE_FRAGMENT:{if(!Jf(r,a)||!mv(e,a,n))continue;Hl(e,t,r,n,a.selectionSet,s,o);break}case V.FRAGMENT_SPREAD:{const i=a.name.value;if(o.has(i)||!Jf(r,a))continue;o.add(i);const c=t[i];if(!c||!mv(e,c,n))continue;Hl(e,t,r,n,c.selectionSet,s,o);break}}}function Jf(e,t){const r=Vl(W8,t,e);if((r==null?void 0:r.if)===!0)return!1;const n=Vl(H8,t,e);return(n==null?void 0:n.if)!==!1}function mv(e,t,r){const n=t.typeCondition;if(!n)return!0;const u=rn(e,n);return u===r?!0:rs(u)?e.isSubType(u,r):!1}function B$(e){return e.alias?e.alias.value:e.name.value}function T$(e){return{OperationDefinition(t){if(t.operation==="subscription"){const r=e.getSchema(),n=r.getSubscriptionType();if(n){const u=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===V.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const i=E5(r,a,s,n,t.selectionSet);if(i.size>1){const p=[...i.values()].slice(1).flat();e.reportError(new he(u!=null?`Subscription "${u}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:p}))}for(const c of i.values())c[0].name.value.startsWith("__")&&e.reportError(new he(u!=null?`Subscription "${u}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function rm(e,t){const r=new Map;for(const n of e){const u=t(n),s=r.get(u);s===void 0?r.set(u,[n]):s.push(n)}return r}function $$(e){return{DirectiveDefinition(n){var u;const s=(u=n.arguments)!==null&&u!==void 0?u:[];return r(`@${n.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(n){var u;const s=n.name.value,o=(u=n.fields)!==null&&u!==void 0?u:[];for(const i of o){var a;const c=i.name.value,l=(a=i.arguments)!==null&&a!==void 0?a:[];r(`${s}.${c}`,l)}return!1}function r(n,u){const s=rm(u,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new he(`Argument "${n}(${o}:)" can only be defined once.`,{nodes:a.map(i=>i.name)}));return!1}}function v5(e){return{Field:t,Directive:t};function t(r){var n;const u=(n=r.arguments)!==null&&n!==void 0?n:[],s=rm(u,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new he(`There can be only one argument named "${o}".`,{nodes:a.map(i=>i.name)}))}}function P$(e){const t=Object.create(null),r=e.getSchema();return{DirectiveDefinition(n){const u=n.name.value;if(r!=null&&r.getDirective(u)){e.reportError(new he(`Directive "@${u}" already exists in the schema. It cannot be redefined.`,{nodes:n.name}));return}return t[u]?e.reportError(new he(`There can be only one directive named "@${u}".`,{nodes:[t[u],n.name]})):t[u]=n.name,!1}}}function y5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():lo;for(const a of n)t[a.name]=!a.isRepeatable;const u=e.getDocument().definitions;for(const a of u)a.kind===V.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let i;if(a.kind===V.SCHEMA_DEFINITION||a.kind===V.SCHEMA_EXTENSION)i=s;else if(Ki(a)||Qh(a)){const c=a.name.value;i=o[c],i===void 0&&(o[c]=i=Object.create(null))}else i=Object.create(null);for(const c of a.directives){const l=c.name.value;t[l]&&(i[l]?e.reportError(new he(`The directive "@${l}" can only be used once at this location.`,{nodes:[i[l],c]})):i[l]=c)}}}}function O$(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{EnumTypeDefinition:u,EnumTypeExtension:u};function u(s){var o;const a=s.name.value;n[a]||(n[a]=Object.create(null));const i=(o=s.values)!==null&&o!==void 0?o:[],c=n[a];for(const l of i){const p=l.name.value,f=r[a];Zt(f)&&f.getValue(p)?e.reportError(new he(`Enum value "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name})):c[p]?e.reportError(new he(`Enum value "${a}.${p}" can only be defined once.`,{nodes:[c[p],l.name]})):c[p]=l.name}return!1}}function k$(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{InputObjectTypeDefinition:u,InputObjectTypeExtension:u,InterfaceTypeDefinition:u,InterfaceTypeExtension:u,ObjectTypeDefinition:u,ObjectTypeExtension:u};function u(s){var o;const a=s.name.value;n[a]||(n[a]=Object.create(null));const i=(o=s.fields)!==null&&o!==void 0?o:[],c=n[a];for(const l of i){const p=l.name.value;I$(r[a],p)?e.reportError(new he(`Field "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name})):c[p]?e.reportError(new he(`Field "${a}.${p}" can only be defined once.`,{nodes:[c[p],l.name]})):c[p]=l.name}return!1}}function I$(e,t){return ut(e)||mt(e)||bt(e)?e.getFields()[t]!=null:!1}function N$(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(r){const n=r.name.value;return t[n]?e.reportError(new he(`There can be only one fragment named "${n}".`,{nodes:[t[n],r.name]})):t[n]=r.name,!1}}}function g5(e){const t=[];let r=Object.create(null);return{ObjectValue:{enter(){t.push(r),r=Object.create(null)},leave(){const n=t.pop();n||tn(!1),r=n}},ObjectField(n){const u=n.name.value;r[u]?e.reportError(new he(`There can be only one input field named "${u}".`,{nodes:[r[u],n.name]})):r[u]=n.name}}}function q$(e){const t=Object.create(null);return{OperationDefinition(r){const n=r.name;return n&&(t[n.value]?e.reportError(new he(`There can be only one operation named "${n.value}".`,{nodes:[t[n.value],n]})):t[n.value]=n),!1},FragmentDefinition:()=>!1}}function x$(e){const t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:u,SchemaExtension:u};function u(s){var o;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const i of a){const c=i.operation,l=r[c];n[c]?e.reportError(new he(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:i})):l?e.reportError(new he(`There can be only one ${c} type in schema.`,{nodes:[l,i]})):r[c]=i}return!1}}function R$(e){const t=Object.create(null),r=e.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(u){const s=u.name.value;if(r!=null&&r.getType(s)){e.reportError(new he(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:u.name}));return}return t[s]?e.reportError(new he(`There can be only one type named "${s}".`,{nodes:[t[s],u.name]})):t[s]=u.name,!1}}function j$(e){return{OperationDefinition(t){var r;const n=(r=t.variableDefinitions)!==null&&r!==void 0?r:[],u=rm(n,s=>s.variable.name.value);for(const[s,o]of u)o.length>1&&e.reportError(new he(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function M$(e){return{ListValue(t){const r=Vh(e.getParentInputType());if(!jt(r))return Os(e,t),!1},ObjectValue(t){const r=Vr(e.getInputType());if(!bt(r))return Os(e,t),!1;const n=to(t.fields,u=>u.name.value);for(const u of Object.values(r.getFields()))if(!n[u.name]&&G8(u)){const o=Se(u.type);e.reportError(new he(`Field "${r.name}.${u.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const r=Vr(e.getParentInputType());if(!e.getInputType()&&bt(r)){const u=ps(t.name.value,Object.keys(r.getFields()));e.reportError(new he(`Field "${t.name.value}" is not defined by type "${r.name}".`+Tu(u),{nodes:t}))}},NullValue(t){const r=e.getInputType();ct(r)&&e.reportError(new he(`Expected value of type "${Se(r)}", found ${Kt(t)}.`,{nodes:t}))},EnumValue:t=>Os(e,t),IntValue:t=>Os(e,t),FloatValue:t=>Os(e,t),StringValue:t=>Os(e,t),BooleanValue:t=>Os(e,t)}}function Os(e,t){const r=e.getInputType();if(!r)return;const n=Vr(r);if(!Dn(n)){const u=Se(r);e.reportError(new he(`Expected value of type "${u}", found ${Kt(t)}.`,{nodes:t}));return}try{if(n.parseLiteral(t,void 0)===void 0){const s=Se(r);e.reportError(new he(`Expected value of type "${s}", found ${Kt(t)}.`,{nodes:t}))}}catch(u){const s=Se(r);u instanceof he?e.reportError(u):e.reportError(new he(`Expected value of type "${s}", found ${Kt(t)}; `+u.message,{nodes:t,originalError:u}))}}function L$(e){return{VariableDefinition(t){const r=rn(e.getSchema(),t.type);if(r!==void 0&&!In(r)){const n=t.variable.name.value,u=Kt(t.type);e.reportError(new he(`Variable "$${n}" cannot be non-input type "${u}".`,{nodes:t.type}))}}}}function U$(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){const n=e.getRecursiveVariableUsages(r);for(const{node:u,type:s,defaultValue:o}of n){const a=u.name.value,i=t[a];if(i&&s){const c=e.getSchema(),l=rn(c,i.type);if(l&&!G$(c,l,i.defaultValue,s,o)){const p=Se(l),f=Se(s);e.reportError(new he(`Variable "$${a}" of type "${p}" used in position expecting type "${f}".`,{nodes:[i,u]}))}}}}},VariableDefinition(r){t[r.variable.name.value]=r}}}function G$(e,t,r,n,u){if(ct(n)&&!ct(t)){if(!(r!=null&&r.kind!==V.NULL)&&!(u!==void 0))return!1;const a=n.ofType;return oa(e,t,a)}return oa(e,t,n)}const V$=Object.freeze([HT,q$,t$,T$,c5,KT,L$,F$,WT,N$,QT,s$,D$,n$,j$,u$,o$,i5,y5,XT,v5,M$,g$,U$,i$,g5]),H$=Object.freeze([r$,x$,R$,O$,k$,$$,P$,c5,i5,y5,m$,a5,v5,g5,d5]);class A5{constructor(t,r){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=r}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let r;if(this._fragments)r=this._fragments;else{r=Object.create(null);for(const n of this.getDocument().definitions)n.kind===V.FRAGMENT_DEFINITION&&(r[n.name.value]=n);this._fragments=r}return r[t]}getFragmentSpreads(t){let r=this._fragmentSpreads.get(t);if(!r){r=[];const n=[t];let u;for(;u=n.pop();)for(const s of u.selections)s.kind===V.FRAGMENT_SPREAD?r.push(s):s.selectionSet&&n.push(s.selectionSet);this._fragmentSpreads.set(t,r)}return r}getRecursivelyReferencedFragments(t){let r=this._recursivelyReferencedFragments.get(t);if(!r){r=[];const n=Object.create(null),u=[t.selectionSet];let s;for(;s=u.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(n[a]!==!0){n[a]=!0;const i=this.getFragment(a);i&&(r.push(i),u.push(i.selectionSet))}}this._recursivelyReferencedFragments.set(t,r)}return r}}class W$ extends A5{constructor(t,r,n){super(t,n),this._schema=r}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class J$ extends A5{constructor(t,r,n,u){super(r,u),this._schema=t,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let r=this._variableUsages.get(t);if(!r){const n=[],u=new r5(this._schema);Hi(t,n5(u,{VariableDefinition:()=>!1,Variable(s){n.push({node:s,type:u.getInputType(),defaultValue:u.getDefaultValue()})}})),r=n,this._variableUsages.set(t,r)}return r}getRecursiveVariableUsages(t){let r=this._recursiveVariableUsages.get(t);if(!r){r=this.getVariableUsages(t);for(const n of this.getRecursivelyReferencedFragments(t))r=r.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(t,r)}return r}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function z$(e,t,r=V$,n,u=new r5(e)){var s;const o=(s=n==null?void 0:n.maxErrors)!==null&&s!==void 0?s:100;t||dt(!1,"Must provide document."),t5(e);const a=Object.freeze({}),i=[],c=new J$(e,t,u,p=>{if(i.length>=o)throw i.push(new he("Too many validation errors, error limit reached. Validation aborted.")),a;i.push(p)}),l=N8(r.map(p=>p(c)));try{Hi(t,n5(u,l))}catch(p){if(p!==a)throw p}return i}function K$(e,t,r=H$){const n=[],u=new W$(e,t,o=>{n.push(o)}),s=r.map(o=>o(u));return Hi(e,N8(s)),n}function X$(e){const t=K$(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` +`))}class A${constructor(t){this._errors=[],this.schema=t}reportError(t,r){const n=Array.isArray(r)?r.filter(Boolean):r;this._errors.push(new De(t,{nodes:n}))}getErrors(){return this._errors}}function F$(e){const t=e.schema,r=t.getQueryType();if(!r)e.reportError("Query root type must be provided.",t.astNode);else if(!Xe(r)){var n;e.reportError(`Query root type must be Object type, it cannot be ${Ae(r)}.`,(n=tf(t,nr.QUERY))!==null&&n!==void 0?n:r.astNode)}const u=t.getMutationType();if(u&&!Xe(u)){var s;e.reportError(`Mutation root type must be Object type if provided, it cannot be ${Ae(u)}.`,(s=tf(t,nr.MUTATION))!==null&&s!==void 0?s:u.astNode)}const o=t.getSubscriptionType();if(o&&!Xe(o)){var a;e.reportError(`Subscription root type must be Object type if provided, it cannot be ${Ae(o)}.`,(a=tf(t,nr.SUBSCRIPTION))!==null&&a!==void 0?a:o.astNode)}}function tf(e,t){var r;return(r=[e.astNode,...e.extensionASTNodes].flatMap(n=>{var u;return(u=n==null?void 0:n.operationTypes)!==null&&u!==void 0?u:[]}).find(n=>n.operation===t))===null||r===void 0?void 0:r.type}function C$(e){for(const r of e.schema.getDirectives()){if(!E5(r)){e.reportError(`Expected directive but got: ${Ae(r)}.`,r==null?void 0:r.astNode);continue}Xs(e,r);for(const n of r.args)if(Xs(e,n),Sn(n.type)||e.reportError(`The type of @${r.name}(${n.name}:) must be Input Type but got: ${Ae(n.type)}.`,n.astNode),Ji(n)&&n.deprecationReason!=null){var t;e.reportError(`Required argument @${r.name}(${n.name}:) cannot be deprecated.`,[lm(n.astNode),(t=n.astNode)===null||t===void 0?void 0:t.type])}}}function Xs(e,t){t.name.startsWith("__")&&e.reportError(`Name "${t.name}" must not begin with "__", which is reserved by GraphQL introspection.`,t.astNode)}function b$(e){const t=$$(e),r=e.schema.getTypeMap();for(const n of Object.values(r)){if(!qp(n)){e.reportError(`Expected GraphQL named type but got: ${Ae(n)}.`,n.astNode);continue}am(n)||Xs(e,n),Xe(n)||dt(n)?(Ty(e,n),$y(e,n)):or(n)?_$(e,n):Kt(n)?B$(e,n):At(n)&&(T$(e,n),t(n))}}function Ty(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const o of r){if(Xs(e,o),!fi(o.type)){var n;e.reportError(`The type of ${t.name}.${o.name} must be Output Type but got: ${Ae(o.type)}.`,(n=o.astNode)===null||n===void 0?void 0:n.type)}for(const a of o.args){const i=a.name;if(Xs(e,a),!Sn(a.type)){var u;e.reportError(`The type of ${t.name}.${o.name}(${i}:) must be Input Type but got: ${Ae(a.type)}.`,(u=a.astNode)===null||u===void 0?void 0:u.type)}if(Ji(a)&&a.deprecationReason!=null){var s;e.reportError(`Required argument ${t.name}.${o.name}(${i}:) cannot be deprecated.`,[lm(a.astNode),(s=a.astNode)===null||s===void 0?void 0:s.type])}}}}function $y(e,t){const r=Object.create(null);for(const n of t.getInterfaces()){if(!dt(n)){e.reportError(`Type ${Ae(t)} must only implement Interface types, it cannot implement ${Ae(n)}.`,Di(t,n));continue}if(t===n){e.reportError(`Type ${t.name} cannot implement itself because it would create a circular reference.`,Di(t,n));continue}if(r[n.name]){e.reportError(`Type ${t.name} can only implement ${n.name} once.`,Di(t,n));continue}r[n.name]=!0,w$(e,t,n),S$(e,t,n)}}function S$(e,t,r){const n=t.getFields();for(const i of Object.values(r.getFields())){const c=i.name,l=n[c];if(!l){e.reportError(`Interface field ${r.name}.${c} expected but ${t.name} does not provide it.`,[i.astNode,t.astNode,...t.extensionASTNodes]);continue}if(!na(e.schema,l.type,i.type)){var u,s;e.reportError(`Interface field ${r.name}.${c} expects type ${Ae(i.type)} but ${t.name}.${c} is type ${Ae(l.type)}.`,[(u=i.astNode)===null||u===void 0?void 0:u.type,(s=l.astNode)===null||s===void 0?void 0:s.type])}for(const p of i.args){const d=p.name,f=l.args.find(h=>h.name===d);if(!f){e.reportError(`Interface field argument ${r.name}.${c}(${d}:) expected but ${t.name}.${c} does not provide it.`,[p.astNode,l.astNode]);continue}if(!P2(p.type,f.type)){var o,a;e.reportError(`Interface field argument ${r.name}.${c}(${d}:) expects type ${Ae(p.type)} but ${t.name}.${c}(${d}:) is type ${Ae(f.type)}.`,[(o=p.astNode)===null||o===void 0?void 0:o.type,(a=f.astNode)===null||a===void 0?void 0:a.type])}}for(const p of l.args){const d=p.name;!i.args.find(h=>h.name===d)&&Ji(p)&&e.reportError(`Object field ${t.name}.${c} includes required argument ${d} that is missing from the Interface field ${r.name}.${c}.`,[p.astNode,i.astNode])}}}function w$(e,t,r){const n=t.getInterfaces();for(const u of r.getInterfaces())n.includes(u)||e.reportError(u===t?`Type ${t.name} cannot implement ${r.name} because it would create a circular reference.`:`Type ${t.name} must implement ${u.name} because it is implemented by ${r.name}.`,[...Di(r,u),...Di(t,r)])}function _$(e,t){const r=t.getTypes();r.length===0&&e.reportError(`Union type ${t.name} must define one or more member types.`,[t.astNode,...t.extensionASTNodes]);const n=Object.create(null);for(const u of r){if(n[u.name]){e.reportError(`Union type ${t.name} can only include type ${u.name} once.`,Py(t,u.name));continue}n[u.name]=!0,Xe(u)||e.reportError(`Union type ${t.name} can only include Object types, it cannot include ${Ae(u)}.`,Py(t,String(u)))}}function B$(e,t){const r=t.getValues();r.length===0&&e.reportError(`Enum type ${t.name} must define one or more values.`,[t.astNode,...t.extensionASTNodes]);for(const n of r)Xs(e,n)}function T$(e,t){const r=Object.values(t.getFields());r.length===0&&e.reportError(`Input Object type ${t.name} must define one or more fields.`,[t.astNode,...t.extensionASTNodes]);for(const s of r){if(Xs(e,s),!Sn(s.type)){var n;e.reportError(`The type of ${t.name}.${s.name} must be Input Type but got: ${Ae(s.type)}.`,(n=s.astNode)===null||n===void 0?void 0:n.type)}if(m5(s)&&s.deprecationReason!=null){var u;e.reportError(`Required input field ${t.name}.${s.name} cannot be deprecated.`,[lm(s.astNode),(u=s.astNode)===null||u===void 0?void 0:u.type])}}}function $$(e){const t=Object.create(null),r=[],n=Object.create(null);return u;function u(s){if(t[s.name])return;t[s.name]=!0,n[s.name]=r.length;const o=Object.values(s.getFields());for(const a of o)if(nt(a.type)&&At(a.type.ofType)){const i=a.type.ofType,c=n[i.name];if(r.push(a),c===void 0)u(i);else{const l=r.slice(c),p=l.map(d=>d.name).join(".");e.reportError(`Cannot reference Input Object "${i.name}" within itself through a series of non-null fields: "${p}".`,l.map(d=>d.astNode))}r.pop()}n[s.name]=void 0}}function Di(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(s=>{var o;return(o=s.interfaces)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t.name)}function Py(e,t){const{astNode:r,extensionASTNodes:n}=e;return(r!=null?[r,...n]:n).flatMap(s=>{var o;return(o=s.types)!==null&&o!==void 0?o:[]}).filter(s=>s.name.value===t)}function lm(e){var t;return e==null||(t=e.directives)===null||t===void 0?void 0:t.find(r=>r.name.value===xp.name)}function Jr(e,t){switch(t.kind){case j.LIST_TYPE:{const r=Jr(e,t.type);return r&&new Dr(r)}case j.NON_NULL_TYPE:{const r=Jr(e,t.type);return r&&new Qe(r)}case j.NAMED_TYPE:return e.getType(t.name.value)}}class T5{constructor(t,r,n){this._schema=t,this._typeStack=[],this._parentTypeStack=[],this._inputTypeStack=[],this._fieldDefStack=[],this._defaultValueStack=[],this._directive=null,this._argument=null,this._enumValue=null,this._getFieldDef=n??P$,r&&(Sn(r)&&this._inputTypeStack.push(r),as(r)&&this._parentTypeStack.push(r),fi(r)&&this._typeStack.push(r))}get[Symbol.toStringTag](){return"TypeInfo"}getType(){if(this._typeStack.length>0)return this._typeStack[this._typeStack.length-1]}getParentType(){if(this._parentTypeStack.length>0)return this._parentTypeStack[this._parentTypeStack.length-1]}getInputType(){if(this._inputTypeStack.length>0)return this._inputTypeStack[this._inputTypeStack.length-1]}getParentInputType(){if(this._inputTypeStack.length>1)return this._inputTypeStack[this._inputTypeStack.length-2]}getFieldDef(){if(this._fieldDefStack.length>0)return this._fieldDefStack[this._fieldDefStack.length-1]}getDefaultValue(){if(this._defaultValueStack.length>0)return this._defaultValueStack[this._defaultValueStack.length-1]}getDirective(){return this._directive}getArgument(){return this._argument}getEnumValue(){return this._enumValue}enter(t){const r=this._schema;switch(t.kind){case j.SELECTION_SET:{const u=xr(this.getType());this._parentTypeStack.push(as(u)?u:void 0);break}case j.FIELD:{const u=this.getParentType();let s,o;u&&(s=this._getFieldDef(r,u,t),s&&(o=s.type)),this._fieldDefStack.push(s),this._typeStack.push(fi(o)?o:void 0);break}case j.DIRECTIVE:this._directive=r.getDirective(t.name.value);break;case j.OPERATION_DEFINITION:{const u=r.getRootType(t.operation);this._typeStack.push(Xe(u)?u:void 0);break}case j.INLINE_FRAGMENT:case j.FRAGMENT_DEFINITION:{const u=t.typeCondition,s=u?Jr(r,u):xr(this.getType());this._typeStack.push(fi(s)?s:void 0);break}case j.VARIABLE_DEFINITION:{const u=Jr(r,t.type);this._inputTypeStack.push(Sn(u)?u:void 0);break}case j.ARGUMENT:{var n;let u,s;const o=(n=this.getDirective())!==null&&n!==void 0?n:this.getFieldDef();o&&(u=o.args.find(a=>a.name===t.name.value),u&&(s=u.type)),this._argument=u,this._defaultValueStack.push(u?u.defaultValue:void 0),this._inputTypeStack.push(Sn(s)?s:void 0);break}case j.LIST:{const u=rm(this.getInputType()),s=qt(u)?u.ofType:u;this._defaultValueStack.push(void 0),this._inputTypeStack.push(Sn(s)?s:void 0);break}case j.OBJECT_FIELD:{const u=xr(this.getInputType());let s,o;At(u)&&(o=u.getFields()[t.name.value],o&&(s=o.type)),this._defaultValueStack.push(o?o.defaultValue:void 0),this._inputTypeStack.push(Sn(s)?s:void 0);break}case j.ENUM:{const u=xr(this.getInputType());let s;Kt(u)&&(s=u.getValue(t.value)),this._enumValue=s;break}}}leave(t){switch(t.kind){case j.SELECTION_SET:this._parentTypeStack.pop();break;case j.FIELD:this._fieldDefStack.pop(),this._typeStack.pop();break;case j.DIRECTIVE:this._directive=null;break;case j.OPERATION_DEFINITION:case j.INLINE_FRAGMENT:case j.FRAGMENT_DEFINITION:this._typeStack.pop();break;case j.VARIABLE_DEFINITION:this._inputTypeStack.pop();break;case j.ARGUMENT:this._argument=null,this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case j.LIST:case j.OBJECT_FIELD:this._defaultValueStack.pop(),this._inputTypeStack.pop();break;case j.ENUM:this._enumValue=null;break}}}function P$(e,t,r){const n=r.name.value;if(n===Hl.name&&e.getQueryType()===t)return Hl;if(n===Wl.name&&e.getQueryType()===t)return Wl;if(n===Jl.name&&as(t))return Jl;if(Xe(t)||dt(t))return t.getFields()[n]}function $5(e,t){return{enter(...r){const n=r[0];e.enter(n);const u=Gl(t,n.kind).enter;if(u){const s=u.apply(t,r);return s!==void 0&&(e.leave(n),_2(s)&&e.enter(s)),s}},leave(...r){const n=r[0],u=Gl(t,n.kind).leave;let s;return u&&(s=u.apply(t,r)),e.leave(n),s}}}function k$(e){return P5(e)||k5(e)||O5(e)}function P5(e){return e.kind===j.OPERATION_DEFINITION||e.kind===j.FRAGMENT_DEFINITION}function k5(e){return e.kind===j.SCHEMA_DEFINITION||Xi(e)||e.kind===j.DIRECTIVE_DEFINITION}function Xi(e){return e.kind===j.SCALAR_TYPE_DEFINITION||e.kind===j.OBJECT_TYPE_DEFINITION||e.kind===j.INTERFACE_TYPE_DEFINITION||e.kind===j.UNION_TYPE_DEFINITION||e.kind===j.ENUM_TYPE_DEFINITION||e.kind===j.INPUT_OBJECT_TYPE_DEFINITION}function O5(e){return e.kind===j.SCHEMA_EXTENSION||pm(e)}function pm(e){return e.kind===j.SCALAR_TYPE_EXTENSION||e.kind===j.OBJECT_TYPE_EXTENSION||e.kind===j.INTERFACE_TYPE_EXTENSION||e.kind===j.UNION_TYPE_EXTENSION||e.kind===j.ENUM_TYPE_EXTENSION||e.kind===j.INPUT_OBJECT_TYPE_EXTENSION}function O$(e){return{Document(t){for(const r of t.definitions)if(!P5(r)){const n=r.kind===j.SCHEMA_DEFINITION||r.kind===j.SCHEMA_EXTENSION?"schema":'"'+r.name.value+'"';e.reportError(new De(`The ${n} definition is not executable.`,{nodes:r}))}return!1}}}function I$(e){return{Field(t){const r=e.getParentType();if(r&&!e.getFieldDef()){const u=e.getSchema(),s=t.name.value;let o=wu("to use an inline fragment on",N$(u,r,s));o===""&&(o=wu(q$(r,s))),e.reportError(new De(`Cannot query field "${s}" on type "${r.name}".`+o,{nodes:t}))}}}}function N$(e,t,r){if(!ts(t))return[];const n=new Set,u=Object.create(null);for(const o of e.getPossibleTypes(t))if(o.getFields()[r]){n.add(o),u[o.name]=1;for(const a of o.getInterfaces()){var s;a.getFields()[r]&&(n.add(a),u[a.name]=((s=u[a.name])!==null&&s!==void 0?s:0)+1)}}return[...n].sort((o,a)=>{const i=u[a.name]-u[o.name];return i!==0?i:dt(o)&&e.isSubType(o,a)?-1:dt(a)&&e.isSubType(a,o)?1:Qh(o.name,a.name)}).map(o=>o.name)}function q$(e,t){if(Xe(e)||dt(e)){const r=Object.keys(e.getFields());return ls(t,r)}return[]}function x$(e){return{InlineFragment(t){const r=t.typeCondition;if(r){const n=Jr(e.getSchema(),r);if(n&&!as(n)){const u=Wt(r);e.reportError(new De(`Fragment cannot condition on non composite type "${u}".`,{nodes:r}))}}},FragmentDefinition(t){const r=Jr(e.getSchema(),t.typeCondition);if(r&&!as(r)){const n=Wt(t.typeCondition);e.reportError(new De(`Fragment "${t.name.value}" cannot condition on non composite type "${n}".`,{nodes:t.typeCondition}))}}}}function R$(e){return{...I5(e),Argument(t){const r=e.getArgument(),n=e.getFieldDef(),u=e.getParentType();if(!r&&n&&u){const s=t.name.value,o=n.args.map(i=>i.name),a=ls(s,o);e.reportError(new De(`Unknown argument "${s}" on field "${u.name}.${n.name}".`+wu(a),{nodes:t}))}}}}function I5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():no;for(const o of n)t[o.name]=o.args.map(a=>a.name);const u=e.getDocument().definitions;for(const o of u)if(o.kind===j.DIRECTIVE_DEFINITION){var s;const a=(s=o.arguments)!==null&&s!==void 0?s:[];t[o.name.value]=a.map(i=>i.name.value)}return{Directive(o){const a=o.name.value,i=t[a];if(o.arguments&&i)for(const c of o.arguments){const l=c.name.value;if(!i.includes(l)){const p=ls(l,i);e.reportError(new De(`Unknown argument "${l}" on directive "@${a}".`+wu(p),{nodes:c}))}}return!1}}}function N5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():no;for(const s of n)t[s.name]=s.locations;const u=e.getDocument().definitions;for(const s of u)s.kind===j.DIRECTIVE_DEFINITION&&(t[s.name.value]=s.locations.map(o=>o.value));return{Directive(s,o,a,i,c){const l=s.name.value,p=t[l];if(!p){e.reportError(new De(`Unknown directive "@${l}".`,{nodes:s}));return}const d=j$(c);d&&!p.includes(d)&&e.reportError(new De(`Directive "@${l}" may not be used on ${d}.`,{nodes:s}))}}}function j$(e){const t=e[e.length-1];switch("kind"in t||Wr(!1),t.kind){case j.OPERATION_DEFINITION:return M$(t.operation);case j.FIELD:return Ue.FIELD;case j.FRAGMENT_SPREAD:return Ue.FRAGMENT_SPREAD;case j.INLINE_FRAGMENT:return Ue.INLINE_FRAGMENT;case j.FRAGMENT_DEFINITION:return Ue.FRAGMENT_DEFINITION;case j.VARIABLE_DEFINITION:return Ue.VARIABLE_DEFINITION;case j.SCHEMA_DEFINITION:case j.SCHEMA_EXTENSION:return Ue.SCHEMA;case j.SCALAR_TYPE_DEFINITION:case j.SCALAR_TYPE_EXTENSION:return Ue.SCALAR;case j.OBJECT_TYPE_DEFINITION:case j.OBJECT_TYPE_EXTENSION:return Ue.OBJECT;case j.FIELD_DEFINITION:return Ue.FIELD_DEFINITION;case j.INTERFACE_TYPE_DEFINITION:case j.INTERFACE_TYPE_EXTENSION:return Ue.INTERFACE;case j.UNION_TYPE_DEFINITION:case j.UNION_TYPE_EXTENSION:return Ue.UNION;case j.ENUM_TYPE_DEFINITION:case j.ENUM_TYPE_EXTENSION:return Ue.ENUM;case j.ENUM_VALUE_DEFINITION:return Ue.ENUM_VALUE;case j.INPUT_OBJECT_TYPE_DEFINITION:case j.INPUT_OBJECT_TYPE_EXTENSION:return Ue.INPUT_OBJECT;case j.INPUT_VALUE_DEFINITION:{const r=e[e.length-3];return"kind"in r||Wr(!1),r.kind===j.INPUT_OBJECT_TYPE_DEFINITION?Ue.INPUT_FIELD_DEFINITION:Ue.ARGUMENT_DEFINITION}default:Wr(!1,"Unexpected kind: "+Ae(t.kind))}}function M$(e){switch(e){case nr.QUERY:return Ue.QUERY;case nr.MUTATION:return Ue.MUTATION;case nr.SUBSCRIPTION:return Ue.SUBSCRIPTION}}function L$(e){return{FragmentSpread(t){const r=t.name.value;e.getFragment(r)||e.reportError(new De(`Unknown fragment "${r}".`,{nodes:t.name}))}}}function q5(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);for(const s of e.getDocument().definitions)Xi(s)&&(n[s.name.value]=!0);const u=[...Object.keys(r),...Object.keys(n)];return{NamedType(s,o,a,i,c){const l=s.name.value;if(!r[l]&&!n[l]){var p;const d=(p=c[2])!==null&&p!==void 0?p:a,f=d!=null&&U$(d);if(f&&ky.includes(l))return;const h=ls(l,f?ky.concat(u):u);e.reportError(new De(`Unknown type "${l}".`+wu(h),{nodes:s}))}}}}const ky=[...nm,...om].map(e=>e.name);function U$(e){return"kind"in e&&(k5(e)||O5(e))}function G$(e){let t=0;return{Document(r){t=r.definitions.filter(n=>n.kind===j.OPERATION_DEFINITION).length},OperationDefinition(r){!r.name&&t>1&&e.reportError(new De("This anonymous operation must be the only defined operation.",{nodes:r}))}}}function V$(e){var t,r,n;const u=e.getSchema(),s=(t=(r=(n=u==null?void 0:u.astNode)!==null&&n!==void 0?n:u==null?void 0:u.getQueryType())!==null&&r!==void 0?r:u==null?void 0:u.getMutationType())!==null&&t!==void 0?t:u==null?void 0:u.getSubscriptionType();let o=0;return{SchemaDefinition(a){if(s){e.reportError(new De("Cannot define a new schema within a schema extension.",{nodes:a}));return}o>0&&e.reportError(new De("Must provide only one schema definition.",{nodes:a})),++o}}}function H$(e){const t=Object.create(null),r=[],n=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(s){return u(s),!1}};function u(s){if(t[s.name.value])return;const o=s.name.value;t[o]=!0;const a=e.getFragmentSpreads(s.selectionSet);if(a.length!==0){n[o]=r.length;for(const i of a){const c=i.name.value,l=n[c];if(r.push(i),l===void 0){const p=e.getFragment(c);p&&u(p)}else{const p=r.slice(l),d=p.slice(0,-1).map(f=>'"'+f.name.value+'"').join(", ");e.reportError(new De(`Cannot spread fragment "${c}" within itself`+(d!==""?` via ${d}.`:"."),{nodes:p}))}r.pop()}n[o]=void 0}}}function W$(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){const n=e.getRecursiveVariableUsages(r);for(const{node:u}of n){const s=u.name.value;t[s]!==!0&&e.reportError(new De(r.name?`Variable "$${s}" is not defined by operation "${r.name.value}".`:`Variable "$${s}" is not defined.`,{nodes:[u,r]}))}}},VariableDefinition(r){t[r.variable.name.value]=!0}}}function J$(e){const t=[],r=[];return{OperationDefinition(n){return t.push(n),!1},FragmentDefinition(n){return r.push(n),!1},Document:{leave(){const n=Object.create(null);for(const u of t)for(const s of e.getRecursivelyReferencedFragments(u))n[s.name.value]=!0;for(const u of r){const s=u.name.value;n[s]!==!0&&e.reportError(new De(`Fragment "${s}" is never used.`,{nodes:u}))}}}}}function z$(e){let t=[];return{OperationDefinition:{enter(){t=[]},leave(r){const n=Object.create(null),u=e.getRecursiveVariableUsages(r);for(const{node:s}of u)n[s.name.value]=!0;for(const s of t){const o=s.variable.name.value;n[o]!==!0&&e.reportError(new De(r.name?`Variable "$${o}" is never used in operation "${r.name.value}".`:`Variable "$${o}" is never used.`,{nodes:s}))}}},VariableDefinition(r){t.push(r)}}}function dm(e){switch(e.kind){case j.OBJECT:return{...e,fields:K$(e.fields)};case j.LIST:return{...e,values:e.values.map(dm)};case j.INT:case j.FLOAT:case j.STRING:case j.BOOLEAN:case j.NULL:case j.ENUM:case j.VARIABLE:return e}}function K$(e){return e.map(t=>({...t,value:dm(t.value)})).sort((t,r)=>Qh(t.name.value,r.name.value))}function x5(e){return Array.isArray(e)?e.map(([t,r])=>`subfields "${t}" conflict because `+x5(r)).join(" and "):e}function X$(e){const t=new tP,r=new Map;return{SelectionSet(n){const u=Y$(e,r,t,e.getParentType(),n);for(const[[s,o],a,i]of u){const c=x5(o);e.reportError(new De(`Fields "${s}" conflict because ${c}. Use different aliases on the fields to fetch both if this was intentional.`,{nodes:a.concat(i)}))}}}}function Y$(e,t,r,n,u){const s=[],[o,a]=Xl(e,t,n,u);if(Q$(e,s,t,r,o),a.length!==0)for(let i=0;i1)for(let a=0;a({kind:j.OBJECT_FIELD,name:u.name,value:u.value}))};return Wt(dm(n))}function I2(e,t){return qt(e)?qt(t)?I2(e.ofType,t.ofType):!0:qt(t)?!0:nt(e)?nt(t)?I2(e.ofType,t.ofType):!0:nt(t)?!0:on(e)||on(t)?e!==t:!1}function Xl(e,t,r,n){const u=t.get(n);if(u)return u;const s=Object.create(null),o=Object.create(null);j5(e,r,n,s,o);const a=[s,Object.keys(o)];return t.set(n,a),a}function N2(e,t,r){const n=t.get(r.selectionSet);if(n)return n;const u=Jr(e.getSchema(),r.typeCondition);return Xl(e,t,u,r.selectionSet)}function j5(e,t,r,n,u){for(const s of r.selections)switch(s.kind){case j.FIELD:{const o=s.name.value;let a;(Xe(t)||dt(t))&&(a=t.getFields()[o]);const i=s.alias?s.alias.value:o;n[i]||(n[i]=[]),n[i].push([t,s,a]);break}case j.FRAGMENT_SPREAD:u[s.name.value]=!0;break;case j.INLINE_FRAGMENT:{const o=s.typeCondition,a=o?Jr(e.getSchema(),o):t;j5(e,a,s.selectionSet,n,u);break}}}function eP(e,t,r,n){if(e.length>0)return[[t,e.map(([u])=>u)],[r,...e.map(([,u])=>u).flat()],[n,...e.map(([,,u])=>u).flat()]]}class tP{constructor(){this._data=new Map}has(t,r,n){var u;const[s,o]=ts.name.value));for(const s of n.args)if(!u.has(s.name)&&Ji(s)){const o=Ae(s.type);e.reportError(new De(`Field "${n.name}" argument "${s.name}" of type "${o}" is required, but it was not provided.`,{nodes:t}))}}}}}function M5(e){var t;const r=Object.create(null),n=e.getSchema(),u=(t=n==null?void 0:n.getDirectives())!==null&&t!==void 0?t:no;for(const a of u)r[a.name]=zs(a.args.filter(Ji),i=>i.name);const s=e.getDocument().definitions;for(const a of s)if(a.kind===j.DIRECTIVE_DEFINITION){var o;const i=(o=a.arguments)!==null&&o!==void 0?o:[];r[a.name.value]=zs(i.filter(cP),c=>c.name.value)}return{Directive:{leave(a){const i=a.name.value,c=r[i];if(c){var l;const p=(l=a.arguments)!==null&&l!==void 0?l:[],d=new Set(p.map(f=>f.name.value));for(const[f,h]of Object.entries(c))if(!d.has(f)){const y=em(h.type)?Ae(h.type):Wt(h.type);e.reportError(new De(`Directive "@${i}" argument "${f}" of type "${y}" is required, but it was not provided.`,{nodes:a}))}}}}}}function cP(e){return e.type.kind===j.NON_NULL_TYPE&&e.defaultValue==null}function lP(e){return{Field(t){const r=e.getType(),n=t.selectionSet;if(r){if(on(xr(r))){if(n){const u=t.name.value,s=Ae(r);e.reportError(new De(`Field "${u}" must not have a selection since type "${s}" has no subfields.`,{nodes:n}))}}else if(!n){const u=t.name.value,s=Ae(r);e.reportError(new De(`Field "${u}" of type "${s}" must have a selection of subfields. Did you mean "${u} { ... }"?`,{nodes:t}))}}}}}function L5(e){return e.map(t=>typeof t=="number"?"["+t.toString()+"]":"."+t).join("")}function Pi(e,t,r){return{prev:e,key:t,typename:r}}function Cn(e){const t=[];let r=e;for(;r;)t.push(r.key),r=r.prev;return t.reverse()}function pP(e,t,r=dP){return oi(e,t,r,void 0)}function dP(e,t,r){let n="Invalid value "+Ae(t);throw e.length>0&&(n+=` at "value${L5(e)}"`),r.message=n+": "+r.message,r}function oi(e,t,r,n){if(nt(t)){if(e!=null)return oi(e,t.ofType,r,n);r(Cn(n),e,new De(`Expected non-nullable type "${Ae(t)}" not to be null.`));return}if(e==null)return null;if(qt(t)){const u=t.ofType;return um(e)?Array.from(e,(s,o)=>{const a=Pi(n,o,void 0);return oi(s,u,r,a)}):[oi(e,u,r,n)]}if(At(t)){if(!Pn(e)){r(Cn(n),e,new De(`Expected type "${t.name}" to be an object.`));return}const u={},s=t.getFields();for(const o of Object.values(s)){const a=e[o.name];if(a===void 0){if(o.defaultValue!==void 0)u[o.name]=o.defaultValue;else if(nt(o.type)){const i=Ae(o.type);r(Cn(n),e,new De(`Field "${o.name}" of required type "${i}" was not provided.`))}continue}u[o.name]=oi(a,o.type,r,Pi(n,o.name,t.name))}for(const o of Object.keys(e))if(!s[o]){const a=ls(o,Object.keys(t.getFields()));r(Cn(n),e,new De(`Field "${o}" is not defined by type "${t.name}".`+wu(a)))}return u}if(on(t)){let u;try{u=t.parseValue(e)}catch(s){s instanceof De?r(Cn(n),e,s):r(Cn(n),e,new De(`Expected type "${t.name}". `+s.message,{originalError:s}));return}return u===void 0&&r(Cn(n),e,new De(`Expected type "${t.name}".`)),u}Wr(!1,"Unexpected input type: "+Ae(t))}function Yu(e,t,r){if(e){if(e.kind===j.VARIABLE){const n=e.name.value;if(r==null||r[n]===void 0)return;const u=r[n];return u===null&&nt(t)?void 0:u}if(nt(t))return e.kind===j.NULL?void 0:Yu(e,t.ofType,r);if(e.kind===j.NULL)return null;if(qt(t)){const n=t.ofType;if(e.kind===j.LIST){const s=[];for(const o of e.values)if(Iy(o,r)){if(nt(n))return;s.push(null)}else{const a=Yu(o,n,r);if(a===void 0)return;s.push(a)}return s}const u=Yu(e,n,r);return u===void 0?void 0:[u]}if(At(t)){if(e.kind!==j.OBJECT)return;const n=Object.create(null),u=zs(e.fields,s=>s.name.value);for(const s of Object.values(t.getFields())){const o=u[s.name];if(!o||Iy(o.value,r)){if(s.defaultValue!==void 0)n[s.name]=s.defaultValue;else if(nt(s.type))return;continue}const a=Yu(o.value,s.type,r);if(a===void 0)return;n[s.name]=a}return n}if(on(t)){let n;try{n=t.parseLiteral(e,r)}catch{return}return n===void 0?void 0:n}Wr(!1,"Unexpected input type: "+Ae(t))}}function Iy(e,t){return e.kind===j.VARIABLE&&(t==null||t[e.name.value]===void 0)}function fP(e,t,r,n){const u=[],s=n==null?void 0:n.maxErrors;try{const o=DP(e,t,r,a=>{if(s!=null&&u.length>=s)throw new De("Too many errors processing variables, error limit reached. Execution aborted.");u.push(a)});if(u.length===0)return{coerced:o}}catch(o){u.push(o)}return{errors:u}}function DP(e,t,r,n){const u={};for(const s of t){const o=s.variable.name.value,a=Jr(e,s.type);if(!Sn(a)){const c=Wt(s.type);n(new De(`Variable "$${o}" expected value of type "${c}" which cannot be used as an input type.`,{nodes:s.type}));continue}if(!G5(r,o)){if(s.defaultValue)u[o]=Yu(s.defaultValue,a);else if(nt(a)){const c=Ae(a);n(new De(`Variable "$${o}" of required type "${c}" was not provided.`,{nodes:s}))}continue}const i=r[o];if(i===null&&nt(a)){const c=Ae(a);n(new De(`Variable "$${o}" of non-null type "${c}" must not be null.`,{nodes:s}));continue}u[o]=pP(i,a,(c,l,p)=>{let d=`Variable "$${o}" got invalid value `+Ae(l);c.length>0&&(d+=` at "${o}${L5(c)}"`),n(new De(d+"; "+p.message,{nodes:s,originalError:p.originalError}))})}return u}function U5(e,t,r){var n;const u={},s=(n=t.arguments)!==null&&n!==void 0?n:[],o=zs(s,a=>a.name.value);for(const a of e.args){const i=a.name,c=a.type,l=o[i];if(!l){if(a.defaultValue!==void 0)u[i]=a.defaultValue;else if(nt(c))throw new De(`Argument "${i}" of required type "${Ae(c)}" was not provided.`,{nodes:t});continue}const p=l.value;let d=p.kind===j.NULL;if(p.kind===j.VARIABLE){const h=p.name.value;if(r==null||!G5(r,h)){if(a.defaultValue!==void 0)u[i]=a.defaultValue;else if(nt(c))throw new De(`Argument "${i}" of required type "${Ae(c)}" was provided the variable "$${h}" which was not provided a runtime value.`,{nodes:p});continue}d=r[h]==null}if(d&&nt(c))throw new De(`Argument "${i}" of non-null type "${Ae(c)}" must not be null.`,{nodes:p});const f=Yu(p,c,r);if(f===void 0)throw new De(`Argument "${i}" has invalid value ${Wt(p)}.`,{nodes:p});u[i]=f}return u}function Yl(e,t,r){var n;const u=(n=t.directives)===null||n===void 0?void 0:n.find(s=>s.name.value===e.name);if(u)return U5(e,u,r)}function G5(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function V5(e,t,r,n,u){const s=new Map;return Zl(e,t,r,n,u,s,new Set),s}function hP(e,t,r,n,u){const s=new Map,o=new Set;for(const a of u)a.selectionSet&&Zl(e,t,r,n,a.selectionSet,s,o);return s}function Zl(e,t,r,n,u,s,o){for(const a of u.selections)switch(a.kind){case j.FIELD:{if(!rf(r,a))continue;const i=mP(a),c=s.get(i);c!==void 0?c.push(a):s.set(i,[a]);break}case j.INLINE_FRAGMENT:{if(!rf(r,a)||!Ny(e,a,n))continue;Zl(e,t,r,n,a.selectionSet,s,o);break}case j.FRAGMENT_SPREAD:{const i=a.name.value;if(o.has(i)||!rf(r,a))continue;o.add(i);const c=t[i];if(!c||!Ny(e,c,n))continue;Zl(e,t,r,n,c.selectionSet,s,o);break}}}function rf(e,t){const r=Yl(v5,t,e);if((r==null?void 0:r.if)===!0)return!1;const n=Yl(y5,t,e);return(n==null?void 0:n.if)!==!1}function Ny(e,t,r){const n=t.typeCondition;if(!n)return!0;const u=Jr(e,n);return u===r?!0:ts(u)?e.isSubType(u,r):!1}function mP(e){return e.alias?e.alias.value:e.name.value}function EP(e){return{OperationDefinition(t){if(t.operation==="subscription"){const r=e.getSchema(),n=r.getSubscriptionType();if(n){const u=t.name?t.name.value:null,s=Object.create(null),o=e.getDocument(),a=Object.create(null);for(const c of o.definitions)c.kind===j.FRAGMENT_DEFINITION&&(a[c.name.value]=c);const i=V5(r,a,s,n,t.selectionSet);if(i.size>1){const p=[...i.values()].slice(1).flat();e.reportError(new De(u!=null?`Subscription "${u}" must select only one top level field.`:"Anonymous Subscription must select only one top level field.",{nodes:p}))}for(const c of i.values())c[0].name.value.startsWith("__")&&e.reportError(new De(u!=null?`Subscription "${u}" must not select an introspection top level field.`:"Anonymous Subscription must not select an introspection top level field.",{nodes:c}))}}}}}function Dm(e,t){const r=new Map;for(const n of e){const u=t(n),s=r.get(u);s===void 0?r.set(u,[n]):s.push(n)}return r}function yP(e){return{DirectiveDefinition(n){var u;const s=(u=n.arguments)!==null&&u!==void 0?u:[];return r(`@${n.name.value}`,s)},InterfaceTypeDefinition:t,InterfaceTypeExtension:t,ObjectTypeDefinition:t,ObjectTypeExtension:t};function t(n){var u;const s=n.name.value,o=(u=n.fields)!==null&&u!==void 0?u:[];for(const i of o){var a;const c=i.name.value,l=(a=i.arguments)!==null&&a!==void 0?a:[];r(`${s}.${c}`,l)}return!1}function r(n,u){const s=Dm(u,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new De(`Argument "${n}(${o}:)" can only be defined once.`,{nodes:a.map(i=>i.name)}));return!1}}function H5(e){return{Field:t,Directive:t};function t(r){var n;const u=(n=r.arguments)!==null&&n!==void 0?n:[],s=Dm(u,o=>o.name.value);for(const[o,a]of s)a.length>1&&e.reportError(new De(`There can be only one argument named "${o}".`,{nodes:a.map(i=>i.name)}))}}function vP(e){const t=Object.create(null),r=e.getSchema();return{DirectiveDefinition(n){const u=n.name.value;if(r!=null&&r.getDirective(u)){e.reportError(new De(`Directive "@${u}" already exists in the schema. It cannot be redefined.`,{nodes:n.name}));return}return t[u]?e.reportError(new De(`There can be only one directive named "@${u}".`,{nodes:[t[u],n.name]})):t[u]=n.name,!1}}}function W5(e){const t=Object.create(null),r=e.getSchema(),n=r?r.getDirectives():no;for(const a of n)t[a.name]=!a.isRepeatable;const u=e.getDocument().definitions;for(const a of u)a.kind===j.DIRECTIVE_DEFINITION&&(t[a.name.value]=!a.repeatable);const s=Object.create(null),o=Object.create(null);return{enter(a){if(!("directives"in a)||!a.directives)return;let i;if(a.kind===j.SCHEMA_DEFINITION||a.kind===j.SCHEMA_EXTENSION)i=s;else if(Xi(a)||pm(a)){const c=a.name.value;i=o[c],i===void 0&&(o[c]=i=Object.create(null))}else i=Object.create(null);for(const c of a.directives){const l=c.name.value;t[l]&&(i[l]?e.reportError(new De(`The directive "@${l}" can only be used once at this location.`,{nodes:[i[l],c]})):i[l]=c)}}}}function gP(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{EnumTypeDefinition:u,EnumTypeExtension:u};function u(s){var o;const a=s.name.value;n[a]||(n[a]=Object.create(null));const i=(o=s.values)!==null&&o!==void 0?o:[],c=n[a];for(const l of i){const p=l.name.value,d=r[a];Kt(d)&&d.getValue(p)?e.reportError(new De(`Enum value "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name})):c[p]?e.reportError(new De(`Enum value "${a}.${p}" can only be defined once.`,{nodes:[c[p],l.name]})):c[p]=l.name}return!1}}function AP(e){const t=e.getSchema(),r=t?t.getTypeMap():Object.create(null),n=Object.create(null);return{InputObjectTypeDefinition:u,InputObjectTypeExtension:u,InterfaceTypeDefinition:u,InterfaceTypeExtension:u,ObjectTypeDefinition:u,ObjectTypeExtension:u};function u(s){var o;const a=s.name.value;n[a]||(n[a]=Object.create(null));const i=(o=s.fields)!==null&&o!==void 0?o:[],c=n[a];for(const l of i){const p=l.name.value;FP(r[a],p)?e.reportError(new De(`Field "${a}.${p}" already exists in the schema. It cannot also be defined in this type extension.`,{nodes:l.name})):c[p]?e.reportError(new De(`Field "${a}.${p}" can only be defined once.`,{nodes:[c[p],l.name]})):c[p]=l.name}return!1}}function FP(e,t){return Xe(e)||dt(e)||At(e)?e.getFields()[t]!=null:!1}function CP(e){const t=Object.create(null);return{OperationDefinition:()=>!1,FragmentDefinition(r){const n=r.name.value;return t[n]?e.reportError(new De(`There can be only one fragment named "${n}".`,{nodes:[t[n],r.name]})):t[n]=r.name,!1}}}function J5(e){const t=[];let r=Object.create(null);return{ObjectValue:{enter(){t.push(r),r=Object.create(null)},leave(){const n=t.pop();n||Wr(!1),r=n}},ObjectField(n){const u=n.name.value;r[u]?e.reportError(new De(`There can be only one input field named "${u}".`,{nodes:[r[u],n.name]})):r[u]=n.name}}}function bP(e){const t=Object.create(null);return{OperationDefinition(r){const n=r.name;return n&&(t[n.value]?e.reportError(new De(`There can be only one operation named "${n.value}".`,{nodes:[t[n.value],n]})):t[n.value]=n),!1},FragmentDefinition:()=>!1}}function SP(e){const t=e.getSchema(),r=Object.create(null),n=t?{query:t.getQueryType(),mutation:t.getMutationType(),subscription:t.getSubscriptionType()}:{};return{SchemaDefinition:u,SchemaExtension:u};function u(s){var o;const a=(o=s.operationTypes)!==null&&o!==void 0?o:[];for(const i of a){const c=i.operation,l=r[c];n[c]?e.reportError(new De(`Type for ${c} already defined in the schema. It cannot be redefined.`,{nodes:i})):l?e.reportError(new De(`There can be only one ${c} type in schema.`,{nodes:[l,i]})):r[c]=i}return!1}}function wP(e){const t=Object.create(null),r=e.getSchema();return{ScalarTypeDefinition:n,ObjectTypeDefinition:n,InterfaceTypeDefinition:n,UnionTypeDefinition:n,EnumTypeDefinition:n,InputObjectTypeDefinition:n};function n(u){const s=u.name.value;if(r!=null&&r.getType(s)){e.reportError(new De(`Type "${s}" already exists in the schema. It cannot also be defined in this type definition.`,{nodes:u.name}));return}return t[s]?e.reportError(new De(`There can be only one type named "${s}".`,{nodes:[t[s],u.name]})):t[s]=u.name,!1}}function _P(e){return{OperationDefinition(t){var r;const n=(r=t.variableDefinitions)!==null&&r!==void 0?r:[],u=Dm(n,s=>s.variable.name.value);for(const[s,o]of u)o.length>1&&e.reportError(new De(`There can be only one variable named "$${s}".`,{nodes:o.map(a=>a.variable.name)}))}}}function BP(e){return{ListValue(t){const r=rm(e.getParentInputType());if(!qt(r))return Ss(e,t),!1},ObjectValue(t){const r=xr(e.getInputType());if(!At(r))return Ss(e,t),!1;const n=zs(t.fields,u=>u.name.value);for(const u of Object.values(r.getFields()))if(!n[u.name]&&m5(u)){const o=Ae(u.type);e.reportError(new De(`Field "${r.name}.${u.name}" of required type "${o}" was not provided.`,{nodes:t}))}},ObjectField(t){const r=xr(e.getParentInputType());if(!e.getInputType()&&At(r)){const u=ls(t.name.value,Object.keys(r.getFields()));e.reportError(new De(`Field "${t.name.value}" is not defined by type "${r.name}".`+wu(u),{nodes:t}))}},NullValue(t){const r=e.getInputType();nt(r)&&e.reportError(new De(`Expected value of type "${Ae(r)}", found ${Wt(t)}.`,{nodes:t}))},EnumValue:t=>Ss(e,t),IntValue:t=>Ss(e,t),FloatValue:t=>Ss(e,t),StringValue:t=>Ss(e,t),BooleanValue:t=>Ss(e,t)}}function Ss(e,t){const r=e.getInputType();if(!r)return;const n=xr(r);if(!on(n)){const u=Ae(r);e.reportError(new De(`Expected value of type "${u}", found ${Wt(t)}.`,{nodes:t}));return}try{if(n.parseLiteral(t,void 0)===void 0){const s=Ae(r);e.reportError(new De(`Expected value of type "${s}", found ${Wt(t)}.`,{nodes:t}))}}catch(u){const s=Ae(r);u instanceof De?e.reportError(u):e.reportError(new De(`Expected value of type "${s}", found ${Wt(t)}; `+u.message,{nodes:t,originalError:u}))}}function TP(e){return{VariableDefinition(t){const r=Jr(e.getSchema(),t.type);if(r!==void 0&&!Sn(r)){const n=t.variable.name.value,u=Wt(t.type);e.reportError(new De(`Variable "$${n}" cannot be non-input type "${u}".`,{nodes:t.type}))}}}}function $P(e){let t=Object.create(null);return{OperationDefinition:{enter(){t=Object.create(null)},leave(r){const n=e.getRecursiveVariableUsages(r);for(const{node:u,type:s,defaultValue:o}of n){const a=u.name.value,i=t[a];if(i&&s){const c=e.getSchema(),l=Jr(c,i.type);if(l&&!PP(c,l,i.defaultValue,s,o)){const p=Ae(l),d=Ae(s);e.reportError(new De(`Variable "$${a}" of type "${p}" used in position expecting type "${d}".`,{nodes:[i,u]}))}}}}},VariableDefinition(r){t[r.variable.name.value]=r}}}function PP(e,t,r,n,u){if(nt(n)&&!nt(t)){if(!(r!=null&&r.kind!==j.NULL)&&!(u!==void 0))return!1;const a=n.ofType;return na(e,t,a)}return na(e,t,n)}const kP=Object.freeze([O$,bP,G$,EP,q5,x$,TP,lP,I$,CP,L$,J$,rP,H$,_P,W$,z$,N5,W5,R$,H5,BP,iP,$P,X$,J5]),OP=Object.freeze([V$,SP,wP,gP,AP,yP,vP,q5,N5,W5,uP,I5,H5,J5,M5]);class z5{constructor(t,r){this._ast=t,this._fragments=void 0,this._fragmentSpreads=new Map,this._recursivelyReferencedFragments=new Map,this._onError=r}get[Symbol.toStringTag](){return"ASTValidationContext"}reportError(t){this._onError(t)}getDocument(){return this._ast}getFragment(t){let r;if(this._fragments)r=this._fragments;else{r=Object.create(null);for(const n of this.getDocument().definitions)n.kind===j.FRAGMENT_DEFINITION&&(r[n.name.value]=n);this._fragments=r}return r[t]}getFragmentSpreads(t){let r=this._fragmentSpreads.get(t);if(!r){r=[];const n=[t];let u;for(;u=n.pop();)for(const s of u.selections)s.kind===j.FRAGMENT_SPREAD?r.push(s):s.selectionSet&&n.push(s.selectionSet);this._fragmentSpreads.set(t,r)}return r}getRecursivelyReferencedFragments(t){let r=this._recursivelyReferencedFragments.get(t);if(!r){r=[];const n=Object.create(null),u=[t.selectionSet];let s;for(;s=u.pop();)for(const o of this.getFragmentSpreads(s)){const a=o.name.value;if(n[a]!==!0){n[a]=!0;const i=this.getFragment(a);i&&(r.push(i),u.push(i.selectionSet))}}this._recursivelyReferencedFragments.set(t,r)}return r}}class IP extends z5{constructor(t,r,n){super(t,n),this._schema=r}get[Symbol.toStringTag](){return"SDLValidationContext"}getSchema(){return this._schema}}class NP extends z5{constructor(t,r,n,u){super(r,u),this._schema=t,this._typeInfo=n,this._variableUsages=new Map,this._recursiveVariableUsages=new Map}get[Symbol.toStringTag](){return"ValidationContext"}getSchema(){return this._schema}getVariableUsages(t){let r=this._variableUsages.get(t);if(!r){const n=[],u=new T5(this._schema);Wi(t,$5(u,{VariableDefinition:()=>!1,Variable(s){n.push({node:s,type:u.getInputType(),defaultValue:u.getDefaultValue()})}})),r=n,this._variableUsages.set(t,r)}return r}getRecursiveVariableUsages(t){let r=this._recursiveVariableUsages.get(t);if(!r){r=this.getVariableUsages(t);for(const n of this.getRecursivelyReferencedFragments(t))r=r.concat(this.getVariableUsages(n));this._recursiveVariableUsages.set(t,r)}return r}getType(){return this._typeInfo.getType()}getParentType(){return this._typeInfo.getParentType()}getInputType(){return this._typeInfo.getInputType()}getParentInputType(){return this._typeInfo.getParentInputType()}getFieldDef(){return this._typeInfo.getFieldDef()}getDirective(){return this._typeInfo.getDirective()}getArgument(){return this._typeInfo.getArgument()}getEnumValue(){return this._typeInfo.getEnumValue()}}function qP(e,t,r=kP,n,u=new T5(e)){var s;const o=(s=void 0)!==null&&s!==void 0?s:100;t||it(!1,"Must provide document."),B5(e);const a=Object.freeze({}),i=[],c=new NP(e,t,u,p=>{if(i.length>=o)throw i.push(new De("Too many validation errors, error limit reached. Validation aborted.")),a;i.push(p)}),l=i5(r.map(p=>p(c)));try{Wi(t,$5(u,l))}catch(p){if(p!==a)throw p}return i}function xP(e,t,r=OP){const n=[],u=new IP(e,t,o=>{n.push(o)}),s=r.map(o=>o(u));return Wi(e,i5(s)),n}function RP(e){const t=xP(e);if(t.length!==0)throw new Error(t.map(r=>r.message).join(` -`))}function Y$(e){let t;return function(n,u,s){t===void 0&&(t=new WeakMap);let o=t.get(n);o===void 0&&(o=new WeakMap,t.set(n,o));let a=o.get(u);a===void 0&&(a=new WeakMap,o.set(u,a));let i=a.get(s);return i===void 0&&(i=e(n,u,s),a.set(s,i)),i}}function Z$(e){return Promise.all(Object.values(e)).then(t=>{const r=Object.create(null);for(const[n,u]of Object.keys(e).entries())r[u]=t[n];return r})}function Q$(e,t,r){let n=r;for(const u of e)n=dn(n)?n.then(s=>t(s,u)):t(n,u);return n}function eP(e){return e instanceof Error?e:new tP(e)}class tP extends Error{constructor(t){super("Unexpected error value: "+Se(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Wl(e,t,r){var n;const u=eP(e);return rP(u)?u:new he(u.message,{nodes:(n=u.nodes)!==null&&n!==void 0?n:t,source:u.source,positions:u.positions,path:r,originalError:u})}function rP(e){return Array.isArray(e.path)}const nP=Y$((e,t,r)=>_$(e.schema,e.fragments,e.variableValues,t,r));function uP(e){arguments.length<2||dt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:r,variableValues:n,rootValue:u}=e;sP(t,r,n);const s=oP(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=aP(s,o,u);return dn(a)?a.then(i=>qc(i,s.errors),i=>(s.errors.push(i),qc(null,s.errors))):qc(a,s.errors)}catch(o){return s.errors.push(o),qc(null,s.errors)}}function qc(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function sP(e,t,r){t||dt(!1,"Must provide document."),t5(e),r==null||Mn(r)||dt(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function oP(e){var t,r;const{schema:n,document:u,rootValue:s,contextValue:o,variableValues:a,operationName:i,fieldResolver:c,typeResolver:l,subscribeFieldResolver:p}=e;let f;const d=Object.create(null);for(const A of u.definitions)switch(A.kind){case V.OPERATION_DEFINITION:if(i==null){if(f!==void 0)return[new he("Must provide operation name if query contains multiple operations.")];f=A}else((t=A.name)===null||t===void 0?void 0:t.value)===i&&(f=A);break;case V.FRAGMENT_DEFINITION:d[A.name.value]=A;break}if(!f)return i!=null?[new he(`Unknown operation named "${i}".`)]:[new he("Must provide an operation.")];const h=(r=f.variableDefinitions)!==null&&r!==void 0?r:[],E=S$(n,h,a??{},{maxErrors:50});return E.errors?E.errors:{schema:n,fragments:d,rootValue:s,contextValue:o,operation:f,variableValues:E.coerced,fieldResolver:c??yv,typeResolver:l??dP,subscribeFieldResolver:p??yv,errors:[]}}function aP(e,t,r){const n=e.schema.getRootType(t.operation);if(n==null)throw new he(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const u=E5(e.schema,e.fragments,e.variableValues,n,t.selectionSet),s=void 0;switch(t.operation){case ar.QUERY:return Jl(e,n,r,s,u);case ar.MUTATION:return iP(e,n,r,s,u);case ar.SUBSCRIPTION:return Jl(e,n,r,s,u)}}function iP(e,t,r,n,u){return Q$(u.entries(),(s,[o,a])=>{const i=$i(n,o,t.name),c=F5(e,t,r,a,i);return c===void 0?s:dn(c)?c.then(l=>(s[o]=l,s)):(s[o]=c,s)},Object.create(null))}function Jl(e,t,r,n,u){const s=Object.create(null);let o=!1;for(const[a,i]of u.entries()){const c=$i(n,a,t.name),l=F5(e,t,r,i,c);l!==void 0&&(s[a]=l,dn(l)&&(o=!0))}return o?Z$(s):s}function F5(e,t,r,n,u){var s;const o=DP(e.schema,t,n[0]);if(!o)return;const a=o.type,i=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=cP(e,o,n,t,u);try{const l=h5(o,n[0],e.variableValues),p=e.contextValue,f=i(r,l,p,c);let d;return dn(f)?d=f.then(h=>Pi(e,a,n,c,u,h)):d=Pi(e,a,n,c,u,f),dn(d)?d.then(void 0,h=>{const E=Wl(h,n,On(u));return zl(E,a,e)}):d}catch(l){const p=Wl(l,n,On(u));return zl(p,a,e)}}function cP(e,t,r,n,u){return{fieldName:t.name,fieldNodes:r,returnType:t.type,parentType:n,path:u,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function zl(e,t,r){if(ct(t))throw e;return r.errors.push(e),null}function Pi(e,t,r,n,u,s){if(s instanceof Error)throw s;if(ct(t)){const o=Pi(e,t.ofType,r,n,u,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${n.parentType.name}.${n.fieldName}.`);return o}if(s==null)return null;if(jt(t))return lP(e,t,r,n,u,s);if(Dn(t))return pP(t,s);if(rs(t))return fP(e,t,r,n,u,s);if(ut(t))return w2(e,t,r,n,u,s);tn(!1,"Cannot complete value of unexpected output type: "+Se(t))}function lP(e,t,r,n,u,s){if(!Wh(s))throw new he(`Expected Iterable, but did not find one for field "${n.parentType.name}.${n.fieldName}".`);const o=t.ofType;let a=!1;const i=Array.from(s,(c,l)=>{const p=$i(u,l,void 0);try{let f;return dn(c)?f=c.then(d=>Pi(e,o,r,n,p,d)):f=Pi(e,o,r,n,p,c),dn(f)?(a=!0,f.then(void 0,d=>{const h=Wl(d,r,On(p));return zl(h,o,e)})):f}catch(f){const d=Wl(f,r,On(p));return zl(d,o,e)}});return a?Promise.all(i):i}function pP(e,t){const r=e.serialize(t);if(r==null)throw new Error(`Expected \`${Se(e)}.serialize(${Se(t)})\` to return non-nullable value, returned: ${Se(r)}`);return r}function fP(e,t,r,n,u,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,i=e.contextValue,c=a(s,i,n,t);return dn(c)?c.then(l=>w2(e,Ev(l,e,t,r,n,s),r,n,u,s)):w2(e,Ev(c,e,t,r,n,s),r,n,u,s)}function Ev(e,t,r,n,u,s){if(e==null)throw new he(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${u.parentType.name}.${u.fieldName}". Either the "${r.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,n);if(ut(e))throw new he("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new he(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${u.parentType.name}.${u.fieldName}" with value ${Se(s)}, received "${Se(e)}".`);const o=t.schema.getType(e);if(o==null)throw new he(`Abstract type "${r.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:n});if(!ut(o))throw new he(`Abstract type "${r.name}" was resolved to a non-object type "${e}".`,{nodes:n});if(!t.schema.isSubType(r,o))throw new he(`Runtime Object type "${o.name}" is not a possible type for "${r.name}".`,{nodes:n});return o}function w2(e,t,r,n,u,s){const o=nP(e,t,r);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,n);if(dn(a))return a.then(i=>{if(!i)throw vv(t,s,r);return Jl(e,t,s,u,o)});if(!a)throw vv(t,s,r)}return Jl(e,t,s,u,o)}function vv(e,t,r){return new he(`Expected value of type "${e.name}" but got: ${Se(t)}.`,{nodes:r})}const dP=function(e,t,r,n){if(Mn(e)&&typeof e.__typename=="string")return e.__typename;const u=r.schema.getPossibleTypes(n),s=[];for(let o=0;o{for(let a=0;at(C5(e)))}function mP(e){const t=C5(e);if(dn(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function C5(e){arguments.length<2||dt(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:r,rootValue:n,contextValue:u,variableValues:s,operationName:o,fieldResolver:a,typeResolver:i}=e,c=e5(t);if(c.length>0)return{errors:c};let l;try{l=jh(r)}catch(f){return{errors:[f]}}const p=z$(t,l);return p.length>0?{errors:p}:uP({schema:t,document:l,rootValue:n,contextValue:u,variableValues:s,operationName:o,fieldResolver:a,typeResolver:i})}function EP(e,t,r){var n,u,s,o;const a=[],i=Object.create(null),c=[];let l;const p=[];for(const v of t.definitions)if(v.kind===V.SCHEMA_DEFINITION)l=v;else if(v.kind===V.SCHEMA_EXTENSION)p.push(v);else if(Ki(v))a.push(v);else if(Qh(v)){const C=v.name.value,D=i[C];i[C]=D?D.concat([v]):[v]}else v.kind===V.DIRECTIVE_DEFINITION&&c.push(v);if(Object.keys(i).length===0&&a.length===0&&c.length===0&&p.length===0&&l==null)return e;const f=Object.create(null);for(const v of e.types)f[v.name]=y(v);for(const v of a){var d;const C=v.name.value;f[C]=(d=gv[C])!==null&&d!==void 0?d:q(v)}const h={query:e.query&&A(e.query),mutation:e.mutation&&A(e.mutation),subscription:e.subscription&&A(e.subscription),...l&&te([l]),...te(p)};return{description:(n=l)===null||n===void 0||(u=n.description)===null||u===void 0?void 0:u.value,...h,types:Object.values(f),directives:[...e.directives.map(m),...c.map(ie)],extensions:Object.create(null),astNode:(s=l)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(p),assumeValid:(o=r==null?void 0:r.assumeValid)!==null&&o!==void 0?o:!1};function E(v){return jt(v)?new gr(E(v.ofType)):ct(v)?new ot(E(v.ofType)):A(v)}function A(v){return f[v.name]}function m(v){const C=v.toConfig();return new ls({...C,args:Au(C.args,W)})}function y(v){if(Kh(v)||Ji(v))return v;if(nn(v))return P(v);if(ut(v))return $(v);if(mt(v))return I(v);if(lr(v))return U(v);if(Zt(v))return B(v);if(bt(v))return F(v);tn(!1,"Unexpected type: "+Se(v))}function F(v){var C;const D=v.toConfig(),g=(C=i[D.name])!==null&&C!==void 0?C:[];return new ro({...D,fields:()=>({...Au(D.fields,O=>({...O,type:E(O.type)})),...de(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function B(v){var C;const D=v.toConfig(),g=(C=i[v.name])!==null&&C!==void 0?C:[];return new iu({...D,values:{...D.values,...Ce(g)},extensionASTNodes:D.extensionASTNodes.concat(g)})}function P(v){var C;const D=v.toConfig(),g=(C=i[D.name])!==null&&C!==void 0?C:[];let O=D.specifiedByURL;for(const w of g){var b;O=(b=Av(w))!==null&&b!==void 0?b:O}return new au({...D,specifiedByURL:O,extensionASTNodes:D.extensionASTNodes.concat(g)})}function $(v){var C;const D=v.toConfig(),g=(C=i[D.name])!==null&&C!==void 0?C:[];return new Wr({...D,interfaces:()=>[...v.getInterfaces().map(A),...pe(g)],fields:()=>({...Au(D.fields,j),...fe(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function I(v){var C;const D=v.toConfig(),g=(C=i[D.name])!==null&&C!==void 0?C:[];return new cs({...D,interfaces:()=>[...v.getInterfaces().map(A),...pe(g)],fields:()=>({...Au(D.fields,j),...fe(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function U(v){var C;const D=v.toConfig(),g=(C=i[D.name])!==null&&C!==void 0?C:[];return new Ti({...D,types:()=>[...v.getTypes().map(A),...Q(g)],extensionASTNodes:D.extensionASTNodes.concat(g)})}function j(v){return{...v,type:E(v.type),args:v.args&&Au(v.args,W)}}function W(v){return{...v,type:E(v.type)}}function te(v){const C={};for(const g of v){var D;const O=(D=g.operationTypes)!==null&&D!==void 0?D:[];for(const b of O)C[b.operation]=Y(b.type)}return C}function Y(v){var C;const D=v.name.value,g=(C=gv[D])!==null&&C!==void 0?C:f[D];if(g===void 0)throw new Error(`Unknown type: "${D}".`);return g}function oe(v){return v.kind===V.LIST_TYPE?new gr(oe(v.type)):v.kind===V.NON_NULL_TYPE?new ot(oe(v.type)):Y(v)}function ie(v){var C;return new ls({name:v.name.value,description:(C=v.description)===null||C===void 0?void 0:C.value,locations:v.locations.map(({value:D})=>D),isRepeatable:v.repeatable,args:De(v.arguments),astNode:v})}function fe(v){const C=Object.create(null);for(const O of v){var D;const b=(D=O.fields)!==null&&D!==void 0?D:[];for(const w of b){var g;C[w.name.value]={type:oe(w.type),description:(g=w.description)===null||g===void 0?void 0:g.value,args:De(w.arguments),deprecationReason:xc(w),astNode:w}}}return C}function De(v){const C=v??[],D=Object.create(null);for(const O of C){var g;const b=oe(O.type);D[O.name.value]={type:b,description:(g=O.description)===null||g===void 0?void 0:g.value,defaultValue:Zu(O.defaultValue,b),deprecationReason:xc(O),astNode:O}}return D}function de(v){const C=Object.create(null);for(const O of v){var D;const b=(D=O.fields)!==null&&D!==void 0?D:[];for(const w of b){var g;const x=oe(w.type);C[w.name.value]={type:x,description:(g=w.description)===null||g===void 0?void 0:g.value,defaultValue:Zu(w.defaultValue,x),deprecationReason:xc(w),astNode:w}}}return C}function Ce(v){const C=Object.create(null);for(const O of v){var D;const b=(D=O.values)!==null&&D!==void 0?D:[];for(const w of b){var g;C[w.name.value]={description:(g=w.description)===null||g===void 0?void 0:g.value,deprecationReason:xc(w),astNode:w}}}return C}function pe(v){return v.flatMap(C=>{var D,g;return(D=(g=C.interfaces)===null||g===void 0?void 0:g.map(Y))!==null&&D!==void 0?D:[]})}function Q(v){return v.flatMap(C=>{var D,g;return(D=(g=C.types)===null||g===void 0?void 0:g.map(Y))!==null&&D!==void 0?D:[]})}function q(v){var C;const D=v.name.value,g=(C=i[D])!==null&&C!==void 0?C:[];switch(v.kind){case V.OBJECT_TYPE_DEFINITION:{var O;const H=[v,...g];return new Wr({name:D,description:(O=v.description)===null||O===void 0?void 0:O.value,interfaces:()=>pe(H),fields:()=>fe(H),astNode:v,extensionASTNodes:g})}case V.INTERFACE_TYPE_DEFINITION:{var b;const H=[v,...g];return new cs({name:D,description:(b=v.description)===null||b===void 0?void 0:b.value,interfaces:()=>pe(H),fields:()=>fe(H),astNode:v,extensionASTNodes:g})}case V.ENUM_TYPE_DEFINITION:{var w;const H=[v,...g];return new iu({name:D,description:(w=v.description)===null||w===void 0?void 0:w.value,values:Ce(H),astNode:v,extensionASTNodes:g})}case V.UNION_TYPE_DEFINITION:{var x;const H=[v,...g];return new Ti({name:D,description:(x=v.description)===null||x===void 0?void 0:x.value,types:()=>Q(H),astNode:v,extensionASTNodes:g})}case V.SCALAR_TYPE_DEFINITION:{var k;return new au({name:D,description:(k=v.description)===null||k===void 0?void 0:k.value,specifiedByURL:Av(v),astNode:v,extensionASTNodes:g})}case V.INPUT_OBJECT_TYPE_DEFINITION:{var G;const H=[v,...g];return new ro({name:D,description:(G=v.description)===null||G===void 0?void 0:G.value,fields:()=>de(H),astNode:v,extensionASTNodes:g})}}}}const gv=to([...Hh,...zh],e=>e.name);function xc(e){const t=Vl($p,e);return t==null?void 0:t.reason}function Av(e){const t=Vl(J8,e);return t==null?void 0:t.url}function b5(e,t){e!=null&&e.kind===V.DOCUMENT||dt(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&X$(e);const n=EP({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(n.astNode==null)for(const s of n.types)switch(s.name){case"Query":n.query=s;break;case"Mutation":n.mutation=s;break;case"Subscription":n.subscription=s;break}const u=[...n.directives,...lo.filter(s=>n.directives.every(o=>o.name!==s.name))];return new Yh({...n,directives:u})}function vP(e,t){const r=jh(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return b5(r,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}const S5=e=>Array.isArray(e)?e:e?[e]:[];function yP(e,t){return String(e)String(t)?1:0}function Fv(e){var t,r;let n;return"alias"in e&&(n=(t=e.alias)===null||t===void 0?void 0:t.value),n==null&&"name"in e&&(n=(r=e.name)===null||r===void 0?void 0:r.value),n==null&&(n=e.kind),n}function Op(e,t,r){const n=Fv(e),u=Fv(t);return typeof r=="function"?r(n,u):yP(n,u)}function kp(e){return e!=null}function gP(e){return"errors"in e&&Array.isArray(e.errors)}const w5=3;function AP(e){return Ip(e,[])}function Ip(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return FP(e,t);default:return String(e)}}function Cv(e){return e instanceof he?e.toString():`${e.name}: ${e.message}; - ${e.stack}`}function FP(e,t){if(e===null)return"null";if(e instanceof Error)return gP(e)?Cv(e)+` -`+bv(e.errors,t):Cv(e);if(t.includes(e))return"[Circular]";const r=[...t,e];if(CP(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Ip(n,r)}else if(Array.isArray(e))return bv(e,r);return bP(e,r)}function CP(e){return typeof e.toJSON=="function"}function bP(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>w5?"["+SP(e)+"]":"{ "+r.map(([u,s])=>u+": "+Ip(s,t)).join(", ")+" }"}function bv(e,t){if(e.length===0)return"[]";if(t.length>w5)return"[Array]";const r=e.length,n=[];for(let u=0;ur==null?r:r[n],e==null?void 0:e.extensions)}function $u(e){if(ct(e)){const t=$u(e.ofType);if(t.kind===V.NON_NULL_TYPE)throw new Error(`Invalid type node ${AP(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:V.NON_NULL_TYPE,type:t}}else if(jt(e))return{kind:V.LIST_TYPE,type:$u(e.ofType)};return{kind:V.NAMED_TYPE,name:{kind:V.NAME,value:e.name}}}function _2(e){if(e===null)return{kind:V.NULL};if(e===void 0)return null;if(Array.isArray(e)){const t=[];for(const r of e){const n=_2(r);n!=null&&t.push(n)}return{kind:V.LIST,values:t}}if(typeof e=="object"){const t=[];for(const r in e){const n=e[r],u=_2(n);u&&t.push({kind:V.OBJECT_FIELD,name:{kind:V.NAME,value:r},value:u})}return{kind:V.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:V.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){const t=String(e);return wP.test(t)?{kind:V.INT,value:t}:{kind:V.FLOAT,value:t}}if(typeof e=="string")return{kind:V.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}const wP=/^-?(?:0|[1-9][0-9]*)$/;function _P(e){const t=new WeakMap;return function(n){const u=t.get(n);if(u===void 0){const s=e(n);return t.set(n,s),s}return u}}const BP=_P(function(t){const r=new Map,n=t.getQueryType();n&&r.set("query",n);const u=t.getMutationType();u&&r.set("mutation",u);const s=t.getSubscriptionType();return s&&r.set("subscription",s),r});function TP(e,t={}){const r=t.pathToDirectivesInExtensions,n=e.getTypeMap(),u=$P(e,r),s=u!=null?[u]:[],o=e.getDirectives();for(const a of o)z8(a)||s.push(PP(a,e,r));for(const a in n){const i=n[a],c=Ji(i),l=Kh(i);if(!(c||l))if(ut(i))s.push(OP(i,e,r));else if(mt(i))s.push(kP(i,e,r));else if(lr(i))s.push(IP(i,e,r));else if(bt(i))s.push(NP(i,e,r));else if(Zt(i))s.push(qP(i,e,r));else if(nn(i))s.push(xP(i,e,r));else throw new Error(`Unknown type ${i}.`)}return{kind:V.DOCUMENT,definitions:s}}function $P(e,t){var r,n;const u=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),s=[];if(e.astNode!=null&&s.push(e.astNode),e.extensionASTNodes!=null)for(const l of e.extensionASTNodes)s.push(l);for(const l of s)if(l.operationTypes)for(const p of l.operationTypes)u.set(p.operation,p);const o=BP(e);for(const[l,p]of u){const f=o.get(l);if(f!=null){const d=$u(f);p!=null?p.type=d:u.set(l,{kind:V.OPERATION_TYPE_DEFINITION,operation:l,type:d})}}const a=[...u.values()].filter(kp),i=_a(e,e,t);if(!a.length&&!i.length)return null;const c={kind:a!=null?V.SCHEMA_DEFINITION:V.SCHEMA_EXTENSION,operationTypes:a,directives:i};return c.description=((n=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&n!==void 0?n:e.description!=null)?{kind:V.STRING,value:e.description,block:!0}:void 0,c}function PP(e,t,r){var n,u,s,o;return{kind:V.DIRECTIVE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description}:void 0,name:{kind:V.NAME,value:e.name},arguments:(s=e.args)===null||s===void 0?void 0:s.map(a=>_5(a,t,r)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(a=>({kind:V.NAME,value:a})))||[]}}function _a(e,t,r){const n=nm(e,r);let u=[];e.astNode!=null&&u.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(u=u.concat(e.extensionASTNodes));let s;if(n!=null)s=um(t,n);else{s=[];for(const o of u)o.directives&&s.push(...o.directives)}return s}function Np(e,t,r){var n,u;let s=[],o=null;const a=nm(e,r);let i;return a!=null?i=um(t,a):i=(n=e.astNode)===null||n===void 0?void 0:n.directives,i!=null&&(s=i.filter(c=>c.name.value!=="deprecated"),e.deprecationReason!=null&&(o=(u=i.filter(c=>c.name.value==="deprecated"))===null||u===void 0?void 0:u[0])),e.deprecationReason!=null&&o==null&&(o=MP(e.deprecationReason)),o==null?s:[o].concat(s)}function _5(e,t,r){var n,u,s;return{kind:V.INPUT_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},type:$u(e.type),defaultValue:e.defaultValue!==void 0&&(s=Yu(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0,directives:Np(e,t,r)}}function OP(e,t,r){var n,u;return{kind:V.OBJECT_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>B5(s,t,r)),interfaces:Object.values(e.getInterfaces()).map(s=>$u(s)),directives:_a(e,t,r)}}function kP(e,t,r){var n,u;const s={kind:V.INTERFACE_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>B5(o,t,r)),directives:_a(e,t,r)};return"getInterfaces"in e&&(s.interfaces=Object.values(e.getInterfaces()).map(o=>$u(o))),s}function IP(e,t,r){var n,u;return{kind:V.UNION_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},directives:_a(e,t,r),types:e.getTypes().map(s=>$u(s))}}function NP(e,t,r){var n,u;return{kind:V.INPUT_OBJECT_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>RP(s,t,r)),directives:_a(e,t,r)}}function qP(e,t,r){var n,u;return{kind:V.ENUM_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},values:Object.values(e.getValues()).map(s=>jP(s,t,r)),directives:_a(e,t,r)}}function xP(e,t,r){var n,u,s;const o=nm(e,r),a=o?um(t,o):((n=e.astNode)===null||n===void 0?void 0:n.directives)||[],i=e.specifiedByUrl||e.specifiedByURL;if(i&&!a.some(c=>c.name.value==="specifiedBy")){const c={url:i};a.push(Kl("specifiedBy",c))}return{kind:V.SCALAR_TYPE_DEFINITION,description:(s=(u=e.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},directives:a}}function B5(e,t,r){var n,u;return{kind:V.FIELD_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},arguments:e.args.map(s=>_5(s,t,r)),type:$u(e.type),directives:Np(e,t,r)}}function RP(e,t,r){var n,u,s;return{kind:V.INPUT_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},type:$u(e.type),directives:Np(e,t,r),defaultValue:(s=Yu(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0}}function jP(e,t,r){var n,u;return{kind:V.ENUM_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:V.STRING,value:e.description,block:!0}:void 0,name:{kind:V.NAME,value:e.name},directives:Np(e,t,r)}}function MP(e){return Kl("deprecated",{reason:e},$p)}function Kl(e,t,r){const n=[];if(r!=null)for(const u of r.args){const s=u.name,o=t[s];if(o!==void 0){const a=Yu(o,u.type);a&&n.push({kind:V.ARGUMENT,name:{kind:V.NAME,value:s},value:a})}}else for(const u in t){const s=t[u],o=_2(s);o&&n.push({kind:V.ARGUMENT,name:{kind:V.NAME,value:u},value:o})}return{kind:V.DIRECTIVE,name:{kind:V.NAME,value:e},arguments:n}}function um(e,t){const r=[];for(const n in t){const u=t[n],s=e==null?void 0:e.getDirective(n);if(Array.isArray(u))for(const o of u)r.push(Kl(n,o,s));else r.push(Kl(n,u,s))}return r}const LP=80;let aa={};function B2(){aa={}}function UP(e){var t;const r=(t=e.name)===null||t===void 0?void 0:t.value;if(r!=null)switch(Rc(e,r),e.kind){case"EnumTypeDefinition":if(e.values)for(const n of e.values)Rc(n,r,n.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(const n of e.fields)if(Rc(n,r,n.name.value),zP(n)&&n.arguments)for(const u of n.arguments)Rc(u,r,n.name.value,u.name.value)}break}}function Rc(e,t,r,n){const u=KP(e);if(typeof u!="string"||u.length===0)return;const s=[t];r&&(s.push(r),n&&s.push(n));const o=s.join(".");aa[o]||(aa[o]=[]),aa[o].push(u)}function GP(e){return` +`))}function jP(e){let t;return function(n,u,s){t===void 0&&(t=new WeakMap);let o=t.get(n);o===void 0&&(o=new WeakMap,t.set(n,o));let a=o.get(u);a===void 0&&(a=new WeakMap,o.set(u,a));let i=a.get(s);return i===void 0&&(i=e(n,u,s),a.set(s,i)),i}}function MP(e){return Promise.all(Object.values(e)).then(t=>{const r=Object.create(null);for(const[n,u]of Object.keys(e).entries())r[u]=t[n];return r})}function LP(e,t,r){let n=r;for(const u of e)n=sn(n)?n.then(s=>t(s,u)):t(n,u);return n}function UP(e){return e instanceof Error?e:new GP(e)}class GP extends Error{constructor(t){super("Unexpected error value: "+Ae(t)),this.name="NonErrorThrown",this.thrownValue=t}}function Ql(e,t,r){var n;const u=UP(e);return VP(u)?u:new De(u.message,{nodes:(n=u.nodes)!==null&&n!==void 0?n:t,source:u.source,positions:u.positions,path:r,originalError:u})}function VP(e){return Array.isArray(e.path)}const HP=jP((e,t,r)=>hP(e.schema,e.fragments,e.variableValues,t,r));function WP(e){arguments.length<2||it(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,document:r,variableValues:n,rootValue:u}=e;JP(t,r,n);const s=zP(e);if(!("schema"in s))return{errors:s};try{const{operation:o}=s,a=KP(s,o,u);return sn(a)?a.then(i=>Lc(i,s.errors),i=>(s.errors.push(i),Lc(null,s.errors))):Lc(a,s.errors)}catch(o){return s.errors.push(o),Lc(null,s.errors)}}function Lc(e,t){return t.length===0?{data:e}:{errors:t,data:e}}function JP(e,t,r){t||it(!1,"Must provide document."),B5(e),r==null||Pn(r)||it(!1,"Variables must be provided as an Object where each property is a variable value. Perhaps look to see if an unparsed JSON string was provided.")}function zP(e){var t,r;const{schema:n,document:u,rootValue:s,contextValue:o,variableValues:a,operationName:i,fieldResolver:c,typeResolver:l,subscribeFieldResolver:p}=e;let d;const f=Object.create(null);for(const A of u.definitions)switch(A.kind){case j.OPERATION_DEFINITION:if(i==null){if(d!==void 0)return[new De("Must provide operation name if query contains multiple operations.")];d=A}else((t=A.name)===null||t===void 0?void 0:t.value)===i&&(d=A);break;case j.FRAGMENT_DEFINITION:f[A.name.value]=A;break}if(!d)return i!=null?[new De(`Unknown operation named "${i}".`)]:[new De("Must provide an operation.")];const h=(r=d.variableDefinitions)!==null&&r!==void 0?r:[],y=fP(n,h,a??{},{maxErrors:50});return y.errors?y.errors:{schema:n,fragments:f,rootValue:s,contextValue:o,operation:d,variableValues:y.coerced,fieldResolver:c??Ry,typeResolver:l??tk,subscribeFieldResolver:p??Ry,errors:[]}}function KP(e,t,r){const n=e.schema.getRootType(t.operation);if(n==null)throw new De(`Schema is not configured to execute ${t.operation} operation.`,{nodes:t});const u=V5(e.schema,e.fragments,e.variableValues,n,t.selectionSet),s=void 0;switch(t.operation){case nr.QUERY:return ep(e,n,r,s,u);case nr.MUTATION:return XP(e,n,r,s,u);case nr.SUBSCRIPTION:return ep(e,n,r,s,u)}}function XP(e,t,r,n,u){return LP(u.entries(),(s,[o,a])=>{const i=Pi(n,o,t.name),c=K5(e,t,r,a,i);return c===void 0?s:sn(c)?c.then(l=>(s[o]=l,s)):(s[o]=c,s)},Object.create(null))}function ep(e,t,r,n,u){const s=Object.create(null);let o=!1;for(const[a,i]of u.entries()){const c=Pi(n,a,t.name),l=K5(e,t,r,i,c);l!==void 0&&(s[a]=l,sn(l)&&(o=!0))}return o?MP(s):s}function K5(e,t,r,n,u){var s;const o=rk(e.schema,t,n[0]);if(!o)return;const a=o.type,i=(s=o.resolve)!==null&&s!==void 0?s:e.fieldResolver,c=YP(e,o,n,t,u);try{const l=U5(o,n[0],e.variableValues),p=e.contextValue,d=i(r,l,p,c);let f;return sn(d)?f=d.then(h=>ki(e,a,n,c,u,h)):f=ki(e,a,n,c,u,d),sn(f)?f.then(void 0,h=>{const y=Ql(h,n,Cn(u));return tp(y,a,e)}):f}catch(l){const p=Ql(l,n,Cn(u));return tp(p,a,e)}}function YP(e,t,r,n,u){return{fieldName:t.name,fieldNodes:r,returnType:t.type,parentType:n,path:u,schema:e.schema,fragments:e.fragments,rootValue:e.rootValue,operation:e.operation,variableValues:e.variableValues}}function tp(e,t,r){if(nt(t))throw e;return r.errors.push(e),null}function ki(e,t,r,n,u,s){if(s instanceof Error)throw s;if(nt(t)){const o=ki(e,t.ofType,r,n,u,s);if(o===null)throw new Error(`Cannot return null for non-nullable field ${n.parentType.name}.${n.fieldName}.`);return o}if(s==null)return null;if(qt(t))return ZP(e,t,r,n,u,s);if(on(t))return QP(t,s);if(ts(t))return ek(e,t,r,n,u,s);if(Xe(t))return q2(e,t,r,n,u,s);Wr(!1,"Cannot complete value of unexpected output type: "+Ae(t))}function ZP(e,t,r,n,u,s){if(!um(s))throw new De(`Expected Iterable, but did not find one for field "${n.parentType.name}.${n.fieldName}".`);const o=t.ofType;let a=!1;const i=Array.from(s,(c,l)=>{const p=Pi(u,l,void 0);try{let d;return sn(c)?d=c.then(f=>ki(e,o,r,n,p,f)):d=ki(e,o,r,n,p,c),sn(d)?(a=!0,d.then(void 0,f=>{const h=Ql(f,r,Cn(p));return tp(h,o,e)})):d}catch(d){const f=Ql(d,r,Cn(p));return tp(f,o,e)}});return a?Promise.all(i):i}function QP(e,t){const r=e.serialize(t);if(r==null)throw new Error(`Expected \`${Ae(e)}.serialize(${Ae(t)})\` to return non-nullable value, returned: ${Ae(r)}`);return r}function ek(e,t,r,n,u,s){var o;const a=(o=t.resolveType)!==null&&o!==void 0?o:e.typeResolver,i=e.contextValue,c=a(s,i,n,t);return sn(c)?c.then(l=>q2(e,qy(l,e,t,r,n,s),r,n,u,s)):q2(e,qy(c,e,t,r,n,s),r,n,u,s)}function qy(e,t,r,n,u,s){if(e==null)throw new De(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${u.parentType.name}.${u.fieldName}". Either the "${r.name}" type should provide a "resolveType" function or each possible type should provide an "isTypeOf" function.`,n);if(Xe(e))throw new De("Support for returning GraphQLObjectType from resolveType was removed in graphql-js@16.0.0 please return type name instead.");if(typeof e!="string")throw new De(`Abstract type "${r.name}" must resolve to an Object type at runtime for field "${u.parentType.name}.${u.fieldName}" with value ${Ae(s)}, received "${Ae(e)}".`);const o=t.schema.getType(e);if(o==null)throw new De(`Abstract type "${r.name}" was resolved to a type "${e}" that does not exist inside the schema.`,{nodes:n});if(!Xe(o))throw new De(`Abstract type "${r.name}" was resolved to a non-object type "${e}".`,{nodes:n});if(!t.schema.isSubType(r,o))throw new De(`Runtime Object type "${o.name}" is not a possible type for "${r.name}".`,{nodes:n});return o}function q2(e,t,r,n,u,s){const o=HP(e,t,r);if(t.isTypeOf){const a=t.isTypeOf(s,e.contextValue,n);if(sn(a))return a.then(i=>{if(!i)throw xy(t,s,r);return ep(e,t,s,u,o)});if(!a)throw xy(t,s,r)}return ep(e,t,s,u,o)}function xy(e,t,r){return new De(`Expected value of type "${e.name}" but got: ${Ae(t)}.`,{nodes:r})}const tk=function(e,t,r,n){if(Pn(e)&&typeof e.__typename=="string")return e.__typename;const u=r.schema.getPossibleTypes(n),s=[];for(let o=0;o{for(let a=0;at(X5(e)))}function uk(e){const t=X5(e);if(sn(t))throw new Error("GraphQL execution failed to complete synchronously.");return t}function X5(e){arguments.length<2||it(!1,"graphql@16 dropped long-deprecated support for positional arguments, please pass an object instead.");const{schema:t,source:r,rootValue:n,contextValue:u,variableValues:s,operationName:o,fieldResolver:a,typeResolver:i}=e,c=_5(t);if(c.length>0)return{errors:c};let l;try{l=Yh(r)}catch(d){return{errors:[d]}}const p=qP(t,l);return p.length>0?{errors:p}:WP({schema:t,document:l,rootValue:n,contextValue:u,variableValues:s,operationName:o,fieldResolver:a,typeResolver:i})}function sk(e,t,r){var n,u,s,o;const a=[],i=Object.create(null),c=[];let l;const p=[];for(const E of t.definitions)if(E.kind===j.SCHEMA_DEFINITION)l=E;else if(E.kind===j.SCHEMA_EXTENSION)p.push(E);else if(Xi(E))a.push(E);else if(pm(E)){const F=E.name.value,D=i[F];i[F]=D?D.concat([E]):[E]}else E.kind===j.DIRECTIVE_DEFINITION&&c.push(E);if(Object.keys(i).length===0&&a.length===0&&c.length===0&&p.length===0&&l==null)return e;const d=Object.create(null);for(const E of e.types)d[E.name]=v(E);for(const E of a){var f;const F=E.name.value;d[F]=(f=jy[F])!==null&&f!==void 0?f:O(E)}const h={query:e.query&&A(e.query),mutation:e.mutation&&A(e.mutation),subscription:e.subscription&&A(e.subscription),...l&&ee([l]),...ee(p)};return{description:(n=l)===null||n===void 0||(u=n.description)===null||u===void 0?void 0:u.value,...h,types:Object.values(d),directives:[...e.directives.map(m),...c.map(oe)],extensions:Object.create(null),astNode:(s=l)!==null&&s!==void 0?s:e.astNode,extensionASTNodes:e.extensionASTNodes.concat(p),assumeValid:(o=r==null?void 0:r.assumeValid)!==null&&o!==void 0?o:!1};function y(E){return qt(E)?new Dr(y(E.ofType)):nt(E)?new Qe(y(E.ofType)):A(E)}function A(E){return d[E.name]}function m(E){const F=E.toConfig();return new cs({...F,args:yu(F.args,G)})}function v(E){if(am(E)||zi(E))return E;if(zr(E))return T(E);if(Xe(E))return N(E);if(dt(E))return R(E);if(or(E))return J(E);if(Kt(E))return B(E);if(At(E))return C(E);Wr(!1,"Unexpected type: "+Ae(E))}function C(E){var F;const D=E.toConfig(),g=(F=i[D.name])!==null&&F!==void 0?F:[];return new Ks({...D,fields:()=>({...yu(D.fields,P=>({...P,type:y(P.type)})),...fe(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function B(E){var F;const D=E.toConfig(),g=(F=i[E.name])!==null&&F!==void 0?F:[];return new tu({...D,values:{...D.values,...ge(g)},extensionASTNodes:D.extensionASTNodes.concat(g)})}function T(E){var F;const D=E.toConfig(),g=(F=i[D.name])!==null&&F!==void 0?F:[];let P=D.specifiedByURL;for(const w of g){var b;P=(b=My(w))!==null&&b!==void 0?b:P}return new eu({...D,specifiedByURL:P,extensionASTNodes:D.extensionASTNodes.concat(g)})}function N(E){var F;const D=E.toConfig(),g=(F=i[D.name])!==null&&F!==void 0?F:[];return new jr({...D,interfaces:()=>[...E.getInterfaces().map(A),...pe(g)],fields:()=>({...yu(D.fields,q),...de(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function R(E){var F;const D=E.toConfig(),g=(F=i[D.name])!==null&&F!==void 0?F:[];return new is({...D,interfaces:()=>[...E.getInterfaces().map(A),...pe(g)],fields:()=>({...yu(D.fields,q),...de(g)}),extensionASTNodes:D.extensionASTNodes.concat(g)})}function J(E){var F;const D=E.toConfig(),g=(F=i[D.name])!==null&&F!==void 0?F:[];return new $i({...D,types:()=>[...E.getTypes().map(A),...z(g)],extensionASTNodes:D.extensionASTNodes.concat(g)})}function q(E){return{...E,type:y(E.type),args:E.args&&yu(E.args,G)}}function G(E){return{...E,type:y(E.type)}}function ee(E){const F={};for(const g of E){var D;const P=(D=g.operationTypes)!==null&&D!==void 0?D:[];for(const b of P)F[b.operation]=K(b.type)}return F}function K(E){var F;const D=E.name.value,g=(F=jy[D])!==null&&F!==void 0?F:d[D];if(g===void 0)throw new Error(`Unknown type: "${D}".`);return g}function ue(E){return E.kind===j.LIST_TYPE?new Dr(ue(E.type)):E.kind===j.NON_NULL_TYPE?new Qe(ue(E.type)):K(E)}function oe(E){var F;return new cs({name:E.name.value,description:(F=E.description)===null||F===void 0?void 0:F.value,locations:E.locations.map(({value:D})=>D),isRepeatable:E.repeatable,args:he(E.arguments),astNode:E})}function de(E){const F=Object.create(null);for(const P of E){var D;const b=(D=P.fields)!==null&&D!==void 0?D:[];for(const w of b){var g;F[w.name.value]={type:ue(w.type),description:(g=w.description)===null||g===void 0?void 0:g.value,args:he(w.arguments),deprecationReason:Uc(w),astNode:w}}}return F}function he(E){const F=E??[],D=Object.create(null);for(const P of F){var g;const b=ue(P.type);D[P.name.value]={type:b,description:(g=P.description)===null||g===void 0?void 0:g.value,defaultValue:Yu(P.defaultValue,b),deprecationReason:Uc(P),astNode:P}}return D}function fe(E){const F=Object.create(null);for(const P of E){var D;const b=(D=P.fields)!==null&&D!==void 0?D:[];for(const w of b){var g;const I=ue(w.type);F[w.name.value]={type:I,description:(g=w.description)===null||g===void 0?void 0:g.value,defaultValue:Yu(w.defaultValue,I),deprecationReason:Uc(w),astNode:w}}}return F}function ge(E){const F=Object.create(null);for(const P of E){var D;const b=(D=P.values)!==null&&D!==void 0?D:[];for(const w of b){var g;F[w.name.value]={description:(g=w.description)===null||g===void 0?void 0:g.value,deprecationReason:Uc(w),astNode:w}}}return F}function pe(E){return E.flatMap(F=>{var D,g;return(D=(g=F.interfaces)===null||g===void 0?void 0:g.map(K))!==null&&D!==void 0?D:[]})}function z(E){return E.flatMap(F=>{var D,g;return(D=(g=F.types)===null||g===void 0?void 0:g.map(K))!==null&&D!==void 0?D:[]})}function O(E){var F;const D=E.name.value,g=(F=i[D])!==null&&F!==void 0?F:[];switch(E.kind){case j.OBJECT_TYPE_DEFINITION:{var P;const L=[E,...g];return new jr({name:D,description:(P=E.description)===null||P===void 0?void 0:P.value,interfaces:()=>pe(L),fields:()=>de(L),astNode:E,extensionASTNodes:g})}case j.INTERFACE_TYPE_DEFINITION:{var b;const L=[E,...g];return new is({name:D,description:(b=E.description)===null||b===void 0?void 0:b.value,interfaces:()=>pe(L),fields:()=>de(L),astNode:E,extensionASTNodes:g})}case j.ENUM_TYPE_DEFINITION:{var w;const L=[E,...g];return new tu({name:D,description:(w=E.description)===null||w===void 0?void 0:w.value,values:ge(L),astNode:E,extensionASTNodes:g})}case j.UNION_TYPE_DEFINITION:{var I;const L=[E,...g];return new $i({name:D,description:(I=E.description)===null||I===void 0?void 0:I.value,types:()=>z(L),astNode:E,extensionASTNodes:g})}case j.SCALAR_TYPE_DEFINITION:{var $;return new eu({name:D,description:($=E.description)===null||$===void 0?void 0:$.value,specifiedByURL:My(E),astNode:E,extensionASTNodes:g})}case j.INPUT_OBJECT_TYPE_DEFINITION:{var M;const L=[E,...g];return new Ks({name:D,description:(M=E.description)===null||M===void 0?void 0:M.value,fields:()=>fe(L),astNode:E,extensionASTNodes:g})}}}}const jy=zs([...nm,...om],e=>e.name);function Uc(e){const t=Yl(xp,e);return t==null?void 0:t.reason}function My(e){const t=Yl(g5,e);return t==null?void 0:t.url}function Y5(e,t){e!=null&&e.kind===j.DOCUMENT||it(!1,"Must provide valid Document AST."),(t==null?void 0:t.assumeValid)!==!0&&(t==null?void 0:t.assumeValidSDL)!==!0&&RP(e);const n=sk({description:void 0,types:[],directives:[],extensions:Object.create(null),extensionASTNodes:[],assumeValid:!1},e,t);if(n.astNode==null)for(const s of n.types)switch(s.name){case"Query":n.query=s;break;case"Mutation":n.mutation=s;break;case"Subscription":n.subscription=s;break}const u=[...n.directives,...no.filter(s=>n.directives.every(o=>o.name!==s.name))];return new cm({...n,directives:u})}function ok(e,t){const r=Yh(e,{noLocation:t==null?void 0:t.noLocation,allowLegacyFragmentVariables:t==null?void 0:t.allowLegacyFragmentVariables});return Y5(r,{assumeValidSDL:t==null?void 0:t.assumeValidSDL,assumeValid:t==null?void 0:t.assumeValid})}const Z5=e=>Array.isArray(e)?e:e?[e]:[];function ak(e,t){return String(e)String(t)?1:0}function Ly(e){var t,r;let n;return"alias"in e&&(n=(t=e.alias)===null||t===void 0?void 0:t.value),n==null&&"name"in e&&(n=(r=e.name)===null||r===void 0?void 0:r.value),n==null&&(n=e.kind),n}function jp(e,t,r){const n=Ly(e),u=Ly(t);return typeof r=="function"?r(n,u):ak(n,u)}function Mp(e){return e!=null}function ik(e){return"errors"in e&&Array.isArray(e.errors)}const Q5=3;function ck(e){return Lp(e,[])}function Lp(e,t){switch(typeof e){case"string":return JSON.stringify(e);case"function":return e.name?`[function ${e.name}]`:"[function]";case"object":return lk(e,t);default:return String(e)}}function Uy(e){return e instanceof De?e.toString():`${e.name}: ${e.message}; + ${e.stack}`}function lk(e,t){if(e===null)return"null";if(e instanceof Error)return ik(e)?Uy(e)+` +`+Gy(e.errors,t):Uy(e);if(t.includes(e))return"[Circular]";const r=[...t,e];if(pk(e)){const n=e.toJSON();if(n!==e)return typeof n=="string"?n:Lp(n,r)}else if(Array.isArray(e))return Gy(e,r);return dk(e,r)}function pk(e){return typeof e.toJSON=="function"}function dk(e,t){const r=Object.entries(e);return r.length===0?"{}":t.length>Q5?"["+fk(e)+"]":"{ "+r.map(([u,s])=>u+": "+Lp(s,t)).join(", ")+" }"}function Gy(e,t){if(e.length===0)return"[]";if(t.length>Q5)return"[Array]";const r=e.length,n=[];for(let u=0;ur==null?r:r[n],e==null?void 0:e.extensions)}function _u(e){if(nt(e)){const t=_u(e.ofType);if(t.kind===j.NON_NULL_TYPE)throw new Error(`Invalid type node ${ck(e)}. Inner type of non-null type cannot be a non-null type.`);return{kind:j.NON_NULL_TYPE,type:t}}else if(qt(e))return{kind:j.LIST_TYPE,type:_u(e.ofType)};return{kind:j.NAMED_TYPE,name:{kind:j.NAME,value:e.name}}}function x2(e){if(e===null)return{kind:j.NULL};if(e===void 0)return null;if(Array.isArray(e)){const t=[];for(const r of e){const n=x2(r);n!=null&&t.push(n)}return{kind:j.LIST,values:t}}if(typeof e=="object"){const t=[];for(const r in e){const n=e[r],u=x2(n);u&&t.push({kind:j.OBJECT_FIELD,name:{kind:j.NAME,value:r},value:u})}return{kind:j.OBJECT,fields:t}}if(typeof e=="boolean")return{kind:j.BOOLEAN,value:e};if(typeof e=="number"&&isFinite(e)){const t=String(e);return Dk.test(t)?{kind:j.INT,value:t}:{kind:j.FLOAT,value:t}}if(typeof e=="string")return{kind:j.STRING,value:e};throw new TypeError(`Cannot convert value to AST: ${e}.`)}const Dk=/^-?(?:0|[1-9][0-9]*)$/;function hk(e){const t=new WeakMap;return function(n){const u=t.get(n);if(u===void 0){const s=e(n);return t.set(n,s),s}return u}}const mk=hk(function(t){const r=new Map,n=t.getQueryType();n&&r.set("query",n);const u=t.getMutationType();u&&r.set("mutation",u);const s=t.getSubscriptionType();return s&&r.set("subscription",s),r});function Ek(e,t={}){const r=t.pathToDirectivesInExtensions,n=e.getTypeMap(),u=yk(e,r),s=u!=null?[u]:[],o=e.getDirectives();for(const a of o)A5(a)||s.push(vk(a,e,r));for(const a in n){const i=n[a],c=zi(i),l=am(i);if(!(c||l))if(Xe(i))s.push(gk(i,e,r));else if(dt(i))s.push(Ak(i,e,r));else if(or(i))s.push(Fk(i,e,r));else if(At(i))s.push(Ck(i,e,r));else if(Kt(i))s.push(bk(i,e,r));else if(zr(i))s.push(Sk(i,e,r));else throw new Error(`Unknown type ${i}.`)}return{kind:j.DOCUMENT,definitions:s}}function yk(e,t){var r,n;const u=new Map([["query",void 0],["mutation",void 0],["subscription",void 0]]),s=[];if(e.astNode!=null&&s.push(e.astNode),e.extensionASTNodes!=null)for(const l of e.extensionASTNodes)s.push(l);for(const l of s)if(l.operationTypes)for(const p of l.operationTypes)u.set(p.operation,p);const o=mk(e);for(const[l,p]of u){const d=o.get(l);if(d!=null){const f=_u(d);p!=null?p.type=f:u.set(l,{kind:j.OPERATION_TYPE_DEFINITION,operation:l,type:f})}}const a=[...u.values()].filter(Mp),i=Sa(e,e,t);if(!a.length&&!i.length)return null;const c={kind:a!=null?j.SCHEMA_DEFINITION:j.SCHEMA_EXTENSION,operationTypes:a,directives:i};return c.description=((n=(r=e.astNode)===null||r===void 0?void 0:r.description)!==null&&n!==void 0?n:e.description!=null)?{kind:j.STRING,value:e.description,block:!0}:void 0,c}function vk(e,t,r){var n,u,s,o;return{kind:j.DIRECTIVE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description}:void 0,name:{kind:j.NAME,value:e.name},arguments:(s=e.args)===null||s===void 0?void 0:s.map(a=>e6(a,t,r)),repeatable:e.isRepeatable,locations:((o=e.locations)===null||o===void 0?void 0:o.map(a=>({kind:j.NAME,value:a})))||[]}}function Sa(e,t,r){const n=hm(e,r);let u=[];e.astNode!=null&&u.push(e.astNode),"extensionASTNodes"in e&&e.extensionASTNodes!=null&&(u=u.concat(e.extensionASTNodes));let s;if(n!=null)s=mm(t,n);else{s=[];for(const o of u)o.directives&&s.push(...o.directives)}return s}function Up(e,t,r){var n,u;let s=[],o=null;const a=hm(e,r);let i;return a!=null?i=mm(t,a):i=(n=e.astNode)===null||n===void 0?void 0:n.directives,i!=null&&(s=i.filter(c=>c.name.value!=="deprecated"),e.deprecationReason!=null&&(o=(u=i.filter(c=>c.name.value==="deprecated"))===null||u===void 0?void 0:u[0])),e.deprecationReason!=null&&o==null&&(o=Bk(e.deprecationReason)),o==null?s:[o].concat(s)}function e6(e,t,r){var n,u,s;return{kind:j.INPUT_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},type:_u(e.type),defaultValue:e.defaultValue!==void 0&&(s=Xu(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0,directives:Up(e,t,r)}}function gk(e,t,r){var n,u;return{kind:j.OBJECT_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>t6(s,t,r)),interfaces:Object.values(e.getInterfaces()).map(s=>_u(s)),directives:Sa(e,t,r)}}function Ak(e,t,r){var n,u;const s={kind:j.INTERFACE_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},fields:Object.values(e.getFields()).map(o=>t6(o,t,r)),directives:Sa(e,t,r)};return"getInterfaces"in e&&(s.interfaces=Object.values(e.getInterfaces()).map(o=>_u(o))),s}function Fk(e,t,r){var n,u;return{kind:j.UNION_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},directives:Sa(e,t,r),types:e.getTypes().map(s=>_u(s))}}function Ck(e,t,r){var n,u;return{kind:j.INPUT_OBJECT_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},fields:Object.values(e.getFields()).map(s=>wk(s,t,r)),directives:Sa(e,t,r)}}function bk(e,t,r){var n,u;return{kind:j.ENUM_TYPE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},values:Object.values(e.getValues()).map(s=>_k(s,t,r)),directives:Sa(e,t,r)}}function Sk(e,t,r){var n,u,s;const o=hm(e,r),a=o?mm(t,o):((n=e.astNode)===null||n===void 0?void 0:n.directives)||[],i=e.specifiedByUrl||e.specifiedByURL;if(i&&!a.some(c=>c.name.value==="specifiedBy")){const c={url:i};a.push(rp("specifiedBy",c))}return{kind:j.SCALAR_TYPE_DEFINITION,description:(s=(u=e.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},directives:a}}function t6(e,t,r){var n,u;return{kind:j.FIELD_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},arguments:e.args.map(s=>e6(s,t,r)),type:_u(e.type),directives:Up(e,t,r)}}function wk(e,t,r){var n,u,s;return{kind:j.INPUT_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},type:_u(e.type),directives:Up(e,t,r),defaultValue:(s=Xu(e.defaultValue,e.type))!==null&&s!==void 0?s:void 0}}function _k(e,t,r){var n,u;return{kind:j.ENUM_VALUE_DEFINITION,description:(u=(n=e.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:e.description?{kind:j.STRING,value:e.description,block:!0}:void 0,name:{kind:j.NAME,value:e.name},directives:Up(e,t,r)}}function Bk(e){return rp("deprecated",{reason:e},xp)}function rp(e,t,r){const n=[];if(r!=null)for(const u of r.args){const s=u.name,o=t[s];if(o!==void 0){const a=Xu(o,u.type);a&&n.push({kind:j.ARGUMENT,name:{kind:j.NAME,value:s},value:a})}}else for(const u in t){const s=t[u],o=x2(s);o&&n.push({kind:j.ARGUMENT,name:{kind:j.NAME,value:u},value:o})}return{kind:j.DIRECTIVE,name:{kind:j.NAME,value:e},arguments:n}}function mm(e,t){const r=[];for(const n in t){const u=t[n],s=e==null?void 0:e.getDirective(n);if(Array.isArray(u))for(const o of u)r.push(rp(n,o,s));else r.push(rp(n,u,s))}return r}const Tk=80;let ua={};function R2(){ua={}}function $k(e){var t;const r=(t=e.name)===null||t===void 0?void 0:t.value;if(r!=null)switch(Gc(e,r),e.kind){case"EnumTypeDefinition":if(e.values)for(const n of e.values)Gc(n,r,n.name.value);break;case"ObjectTypeDefinition":case"InputObjectTypeDefinition":case"InterfaceTypeDefinition":if(e.fields){for(const n of e.fields)if(Gc(n,r,n.name.value),qk(n)&&n.arguments)for(const u of n.arguments)Gc(u,r,n.name.value,u.name.value)}break}}function Gc(e,t,r,n){const u=xk(e);if(typeof u!="string"||u.length===0)return;const s=[t];r&&(s.push(r),n&&s.push(n));const o=s.join(".");ua[o]||(ua[o]=[]),ua[o].push(u)}function Pk(e){return` # `+e.replace(/\n/g,` -# `)}function xe(e,t){return e?e.filter(r=>r).join(t||""):""}function Sv(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(` -`)))!==null&&t!==void 0?t:!1}function VP(e){return(t,r,n,u,s)=>{var o;const a=[],i=u.reduce((p,f)=>(["fields","arguments","values"].includes(f)&&p.name&&a.push(p.name.value),p[f]),s[0]),c=[...a,(o=i==null?void 0:i.name)===null||o===void 0?void 0:o.value].filter(Boolean).join("."),l=[];return t.kind.includes("Definition")&&aa[c]&&l.push(...aa[c]),xe([...l.map(GP),t.description,e(t,r,n,u,s)],` -`)}}function Di(e){return e&&` ${e.replace(/\n/g,` - `)}`}function Cn(e){return e&&e.length!==0?`{ -${Di(xe(e,` +# `)}function $e(e,t){return e?e.filter(r=>r).join(t||""):""}function Vy(e){var t;return(t=e==null?void 0:e.some(r=>r.includes(` +`)))!==null&&t!==void 0?t:!1}function kk(e){return(t,r,n,u,s)=>{var o;const a=[],i=u.reduce((p,d)=>(["fields","arguments","values"].includes(d)&&p.name&&a.push(p.name.value),p[d]),s[0]),c=[...a,(o=i==null?void 0:i.name)===null||o===void 0?void 0:o.value].filter(Boolean).join("."),l=[];return t.kind.includes("Definition")&&ua[c]&&l.push(...ua[c]),$e([...l.map(Pk),t.description,e(t,r,n,u,s)],` +`)}}function hi(e){return e&&` ${e.replace(/\n/g,` + `)}`}function Dn(e){return e&&e.length!==0?`{ +${hi($e(e,` `))} -}`:""}function qt(e,t,r){return t?e+t+(r||""):""}function HP(e,t=!1){const r=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` +}`:""}function Ot(e,t,r){return t?e+t+(r||""):""}function Ok(e,t=!1){const r=e.replace(/"""/g,'\\"""');return(e[0]===" "||e[0]===" ")&&e.indexOf(` `)===-1?`"""${r.replace(/"$/,`" `)}"""`:`""" -${t?r:Di(r)} -"""`}const wv={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>xe(e.definitions,` +${t?r:hi(r)} +"""`}const Hy={Name:{leave:e=>e.value},Variable:{leave:e=>"$"+e.name},Document:{leave:e=>$e(e.definitions,` -`)},OperationDefinition:{leave:e=>{const t=qt("(",xe(e.variableDefinitions,", "),")");return xe([e.operation,xe([e.name,t]),xe(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+qt(" = ",r)+qt(" ",xe(n," "))},SelectionSet:{leave:({selections:e})=>Cn(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:u}){const s=qt("",e,": ")+t;let o=s+qt("(",xe(r,", "),")");return o.length>LP&&(o=s+qt(`( -`,Di(xe(r,` +`)},OperationDefinition:{leave:e=>{const t=Ot("(",$e(e.variableDefinitions,", "),")");return $e([e.operation,$e([e.name,t]),$e(e.directives," ")]," ")+" "+e.selectionSet}},VariableDefinition:{leave:({variable:e,type:t,defaultValue:r,directives:n})=>e+": "+t+Ot(" = ",r)+Ot(" ",$e(n," "))},SelectionSet:{leave:({selections:e})=>Dn(e)},Field:{leave({alias:e,name:t,arguments:r,directives:n,selectionSet:u}){const s=Ot("",e,": ")+t;let o=s+Ot("(",$e(r,", "),")");return o.length>Tk&&(o=s+Ot(`( +`,hi($e(r,` `)),` -)`)),xe([o,xe(n," "),u]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+qt(" ",xe(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>xe(["...",qt("on ",e),xe(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:u})=>`fragment ${e}${qt("(",xe(r,", "),")")} on ${t} ${qt("",xe(n," ")," ")}`+u},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?HP(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+xe(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+xe(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+qt("(",xe(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>xe(["schema",xe(e," "),Cn(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>xe(["scalar",e,xe(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:r,fields:n})=>xe(["type",e,qt("implements ",xe(t," & ")),xe(r," "),Cn(n)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:r,directives:n})=>e+(Sv(t)?qt(`( -`,Di(xe(t,` +)`)),$e([o,$e(n," "),u]," ")}},Argument:{leave:({name:e,value:t})=>e+": "+t},FragmentSpread:{leave:({name:e,directives:t})=>"..."+e+Ot(" ",$e(t," "))},InlineFragment:{leave:({typeCondition:e,directives:t,selectionSet:r})=>$e(["...",Ot("on ",e),$e(t," "),r]," ")},FragmentDefinition:{leave:({name:e,typeCondition:t,variableDefinitions:r,directives:n,selectionSet:u})=>`fragment ${e}${Ot("(",$e(r,", "),")")} on ${t} ${Ot("",$e(n," ")," ")}`+u},IntValue:{leave:({value:e})=>e},FloatValue:{leave:({value:e})=>e},StringValue:{leave:({value:e,block:t})=>t?Ok(e):JSON.stringify(e)},BooleanValue:{leave:({value:e})=>e?"true":"false"},NullValue:{leave:()=>"null"},EnumValue:{leave:({value:e})=>e},ListValue:{leave:({values:e})=>"["+$e(e,", ")+"]"},ObjectValue:{leave:({fields:e})=>"{"+$e(e,", ")+"}"},ObjectField:{leave:({name:e,value:t})=>e+": "+t},Directive:{leave:({name:e,arguments:t})=>"@"+e+Ot("(",$e(t,", "),")")},NamedType:{leave:({name:e})=>e},ListType:{leave:({type:e})=>"["+e+"]"},NonNullType:{leave:({type:e})=>e+"!"},SchemaDefinition:{leave:({directives:e,operationTypes:t})=>$e(["schema",$e(e," "),Dn(t)]," ")},OperationTypeDefinition:{leave:({operation:e,type:t})=>e+": "+t},ScalarTypeDefinition:{leave:({name:e,directives:t})=>$e(["scalar",e,$e(t," ")]," ")},ObjectTypeDefinition:{leave:({name:e,interfaces:t,directives:r,fields:n})=>$e(["type",e,Ot("implements ",$e(t," & ")),$e(r," "),Dn(n)]," ")},FieldDefinition:{leave:({name:e,arguments:t,type:r,directives:n})=>e+(Vy(t)?Ot(`( +`,hi($e(t,` `)),` -)`):qt("(",xe(t,", "),")"))+": "+r+qt(" ",xe(n," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:r,directives:n})=>xe([e+": "+t,qt("= ",r),xe(n," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:r,fields:n})=>xe(["interface",e,qt("implements ",xe(t," & ")),xe(r," "),Cn(n)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:r})=>xe(["union",e,xe(t," "),qt("= ",xe(r," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:r})=>xe(["enum",e,xe(t," "),Cn(r)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>xe([e,xe(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:r})=>xe(["input",e,xe(t," "),Cn(r)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:r,locations:n})=>"directive @"+e+(Sv(t)?qt(`( -`,Di(xe(t,` +)`):Ot("(",$e(t,", "),")"))+": "+r+Ot(" ",$e(n," "))},InputValueDefinition:{leave:({name:e,type:t,defaultValue:r,directives:n})=>$e([e+": "+t,Ot("= ",r),$e(n," ")]," ")},InterfaceTypeDefinition:{leave:({name:e,interfaces:t,directives:r,fields:n})=>$e(["interface",e,Ot("implements ",$e(t," & ")),$e(r," "),Dn(n)]," ")},UnionTypeDefinition:{leave:({name:e,directives:t,types:r})=>$e(["union",e,$e(t," "),Ot("= ",$e(r," | "))]," ")},EnumTypeDefinition:{leave:({name:e,directives:t,values:r})=>$e(["enum",e,$e(t," "),Dn(r)]," ")},EnumValueDefinition:{leave:({name:e,directives:t})=>$e([e,$e(t," ")]," ")},InputObjectTypeDefinition:{leave:({name:e,directives:t,fields:r})=>$e(["input",e,$e(t," "),Dn(r)]," ")},DirectiveDefinition:{leave:({name:e,arguments:t,repeatable:r,locations:n})=>"directive @"+e+(Vy(t)?Ot(`( +`,hi($e(t,` `)),` -)`):qt("(",xe(t,", "),")"))+(r?" repeatable":"")+" on "+xe(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>xe(["extend schema",xe(e," "),Cn(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>xe(["extend scalar",e,xe(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>xe(["extend type",e,qt("implements ",xe(t," & ")),xe(r," "),Cn(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>xe(["extend interface",e,qt("implements ",xe(t," & ")),xe(r," "),Cn(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>xe(["extend union",e,xe(t," "),qt("= ",xe(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>xe(["extend enum",e,xe(t," "),Cn(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>xe(["extend input",e,xe(t," "),Cn(r)]," ")}},WP=Object.keys(wv).reduce((e,t)=>({...e,[t]:{leave:VP(wv[t].leave)}}),{});function JP(e){return Hi(e,WP)}function zP(e){return e.kind==="FieldDefinition"}function KP(e){const t=XP(e);if(t!==void 0)return YP(` -${t}`)}function XP(e){const t=e.loc;if(!t)return;const r=[];let n=t.startToken.prev;for(;n!=null&&n.kind===Ee.COMMENT&&n.next!=null&&n.prev!=null&&n.line+1===n.next.line&&n.line!==n.prev.line;){const u=String(n.value);r.push(u),n=n.prev}return r.length>0?r.reverse().join(` -`):void 0}function YP(e){const t=e.split(/\r\n|[\n\r]/g),r=ZP(t);if(r!==0)for(let n=1;n0&&_v(t[0]);)t.shift();for(;t.length>0&&_v(t[t.length-1]);)t.pop();return t.join(` -`)}function ZP(e){let t=null;for(let r=1;rs(f));return{typeMap:n,directives:u};function s(f){if(z8(f))return f;const d=f.toConfig();return d.args=o(d.args),new ls(d)}function o(f){const d={};for(const h in f){const E=f[h],A=p(E.type);A!=null&&(E.type=A,d[h]=E)}return d}function a(f){if(ut(f)){const d=f.toConfig(),h={...d,fields:()=>i(d.fields),interfaces:()=>l(d.interfaces)};return new Wr(h)}else if(mt(f)){const d=f.toConfig(),h={...d,fields:()=>i(d.fields)};return"interfaces"in h&&(h.interfaces=()=>l(d.interfaces)),new cs(h)}else if(lr(f)){const d=f.toConfig(),h={...d,types:()=>l(d.types)};return new Ti(h)}else if(bt(f)){const d=f.toConfig(),h={...d,fields:()=>c(d.fields)};return new ro(h)}else if(Zt(f)){const d=f.toConfig();return new iu(d)}else if(nn(f)){if(Ji(f))return f;const d=f.toConfig();return new au(d)}throw new Error(`Unexpected schema type: ${f}`)}function i(f){const d={};for(const h in f){const E=f[h],A=p(E.type);A!=null&&E.args&&(E.type=A,E.args=o(E.args),d[h]=E)}return d}function c(f){const d={};for(const h in f){const E=f[h],A=p(E.type);A!=null&&(E.type=A,d[h]=E)}return d}function l(f){const d=[];for(const h of f){const E=p(h);E!=null&&d.push(E)}return d}function p(f){if(jt(f)){const d=p(f.ofType);return d!=null?new gr(d):null}else if(ct(f)){const d=p(f.ofType);return d!=null?new ot(d):null}else if(Tp(f)){let d=r[f.name];return d===void 0&&(d=QP(f)?eO(f):a(f),n[d.name]=r[f.name]=d),d!=null?n[d.name]:null}return null}}function Xl(e,t,r=null,n=null){if(t==null)return t;const u=Vh(e);if(Dn(u))return r!=null?r(u,t):t;if(jt(u))return S5(t).map(s=>Xl(u.ofType,s,r,n));if(bt(u)){const s=u.getFields(),o={};for(const a in t){const i=s[a];i!=null&&(o[a]=Xl(i.type,t[a],r,n))}return n!=null?n(u,o):o}}function $5(e,t){return Xl(e,t,(r,n)=>{try{return r.serialize(n)}catch{return n}})}function P5(e,t){return Xl(e,t,(r,n)=>{try{return r.parseValue(n)}catch{return n}})}function T2(e,t={}){const r=k5(O5($2(Bv(rO($2(Bv(e.getTypeMap(),e,$5),e,t,a=>Dn(a)),e,t),e,P5),e,t,a=>!Dn(a)),e,t),e,t),n=e.getDirectives(),u=nO(n,e,t),{typeMap:s,directives:o}=tO(r,u);return new Yh({...e.toConfig(),query:yo(s,yo(r,e.getQueryType())),mutation:yo(s,yo(r,e.getMutationType())),subscription:yo(s,yo(r,e.getSubscriptionType())),types:Object.values(s),directives:o})}function $2(e,t,r,n=()=>!0){const u={};for(const s in e)if(!s.startsWith("__")){const o=e[s];if(o==null||!n(o)){u[s]=o;continue}const a=sO(t,r,s);if(a==null){u[s]=o;continue}const i=a(o,t);if(i===void 0){u[s]=o;continue}u[s]=i}return u}function rO(e,t,r){const n=lO(r);return n?$2(e,t,{[Qe.ENUM_TYPE]:u=>{const s=u.toConfig(),o=s.values,a={};for(const i in o){const c=o[i],l=n(c,u.name,t,i);if(l===void 0)a[i]=c;else if(Array.isArray(l)){const[p,f]=l;a[p]=f===void 0?c:f}else l!==null&&(a[i]=l)}return Fl(new iu({...s,values:a}))}},u=>Zt(u)):e}function Bv(e,t,r){const n=k5(e,t,{[Qe.ARGUMENT]:u=>{if(u.defaultValue===void 0)return u;const s=Yl(e,u.type);if(s!=null)return{...u,defaultValue:r(s,u.defaultValue)}}});return O5(n,t,{[Qe.INPUT_OBJECT_FIELD]:u=>{if(u.defaultValue===void 0)return u;const s=Yl(n,u.type);if(s!=null)return{...u,defaultValue:r(s,u.defaultValue)}}})}function Yl(e,t){if(jt(t)){const r=Yl(e,t.ofType);return r!=null?new gr(r):null}else if(ct(t)){const r=Yl(e,t.ofType);return r!=null?new ot(r):null}else if(Tp(t)){const r=e[t.name];return r??null}return null}function O5(e,t,r){const n={};for(const u in e)if(!u.startsWith("__")){const s=e[u];if(!ut(s)&&!mt(s)&&!bt(s)){n[u]=s;continue}const o=aO(t,r,u);if(o==null){n[u]=s;continue}const a=s.toConfig(),i=a.fields,c={};for(const l in i){const p=i[l],f=o(p,l,u,t);if(f===void 0)c[l]=p;else if(Array.isArray(f)){const[d,h]=f;h.astNode!=null&&(h.astNode={...h.astNode,name:{...h.astNode.name,value:d}}),c[d]=h===void 0?p:h}else f!==null&&(c[l]=f)}ut(s)?n[u]=Fl(new Wr({...a,fields:c})):mt(s)?n[u]=Fl(new cs({...a,fields:c})):n[u]=Fl(new ro({...a,fields:c}))}return n}function k5(e,t,r){const n={};for(const u in e)if(!u.startsWith("__")){const s=e[u];if(!ut(s)&&!mt(s)){n[u]=s;continue}const o=iO(r);if(o==null){n[u]=s;continue}const a=s.toConfig(),i=a.fields,c={};for(const l in i){const p=i[l],f=p.args;if(f==null){c[l]=p;continue}const d=Object.keys(f);if(!d.length){c[l]=p;continue}const h={};for(const E of d){const A=f[E],m=o(A,l,u,t);if(m===void 0)h[E]=A;else if(Array.isArray(m)){const[y,F]=m;h[y]=F}else m!==null&&(h[E]=m)}c[l]={...p,args:h}}ut(s)?n[u]=new Wr({...a,fields:c}):mt(s)?n[u]=new cs({...a,fields:c}):n[u]=new ro({...a,fields:c})}return n}function nO(e,t,r){const n=cO(r);if(n==null)return e.slice();const u=[];for(const s of e){const o=n(s,t);o===void 0?u.push(s):o!==null&&u.push(o)}return u}function uO(e,t){var r,n,u;const s=e.getType(t),o=[Qe.TYPE];return ut(s)?(o.push(Qe.COMPOSITE_TYPE,Qe.OBJECT_TYPE),t===((r=e.getQueryType())===null||r===void 0?void 0:r.name)?o.push(Qe.ROOT_OBJECT,Qe.QUERY):t===((n=e.getMutationType())===null||n===void 0?void 0:n.name)?o.push(Qe.ROOT_OBJECT,Qe.MUTATION):t===((u=e.getSubscriptionType())===null||u===void 0?void 0:u.name)&&o.push(Qe.ROOT_OBJECT,Qe.SUBSCRIPTION)):bt(s)?o.push(Qe.INPUT_OBJECT_TYPE):mt(s)?o.push(Qe.COMPOSITE_TYPE,Qe.ABSTRACT_TYPE,Qe.INTERFACE_TYPE):lr(s)?o.push(Qe.COMPOSITE_TYPE,Qe.ABSTRACT_TYPE,Qe.UNION_TYPE):Zt(s)?o.push(Qe.ENUM_TYPE):nn(s)&&o.push(Qe.SCALAR_TYPE),o}function sO(e,t,r){const n=uO(e,r);let u;const s=[...n];for(;!u&&s.length>0;){const o=s.pop();u=t[o]}return u??null}function oO(e,t){var r,n,u;const s=e.getType(t),o=[Qe.FIELD];return ut(s)?(o.push(Qe.COMPOSITE_FIELD,Qe.OBJECT_FIELD),t===((r=e.getQueryType())===null||r===void 0?void 0:r.name)?o.push(Qe.ROOT_FIELD,Qe.QUERY_ROOT_FIELD):t===((n=e.getMutationType())===null||n===void 0?void 0:n.name)?o.push(Qe.ROOT_FIELD,Qe.MUTATION_ROOT_FIELD):t===((u=e.getSubscriptionType())===null||u===void 0?void 0:u.name)&&o.push(Qe.ROOT_FIELD,Qe.SUBSCRIPTION_ROOT_FIELD)):mt(s)?o.push(Qe.COMPOSITE_FIELD,Qe.INTERFACE_FIELD):bt(s)&&o.push(Qe.INPUT_OBJECT_FIELD),o}function aO(e,t,r){const n=oO(e,r);let u;const s=[...n];for(;!u&&s.length>0;){const o=s.pop();u=t[o]}return u??null}function iO(e){const t=e[Qe.ARGUMENT];return t??null}function cO(e){const t=e[Qe.DIRECTIVE];return t??null}function lO(e){const t=e[Qe.ENUM_VALUE];return t??null}function Fl(e){if(ut(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:V.OBJECT_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:V.OBJECT_TYPE_EXTENSION,fields:void 0}))),new Wr(t)}else if(mt(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:V.INTERFACE_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:V.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new cs(t)}else if(bt(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:V.INPUT_OBJECT_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:V.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new ro(t)}else if(Zt(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.values){const u=t.values[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,values:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,values:void 0}))),new iu(t)}else return e}function pO(e){return fO(e.getTypeMap(),e.getDirectives()),e}function fO(e,t){const r=Object.create(null);for(const c in e){const l=e[c];if(l==null||c.startsWith("__"))continue;const p=l.name;if(!p.startsWith("__")){if(r[p]!=null){console.warn(`Duplicate schema type name ${p} found; keeping the existing one found in the schema`);continue}r[p]=l}}for(const c in r){const l=r[c];e[c]=l}for(const c of t)c.args=c.args.filter(l=>(l.type=i(l.type),l.type!==null));for(const c in e){const l=e[c];!c.startsWith("__")&&c in r&&l!=null&&n(l)}for(const c in e)!c.startsWith("__")&&!(c in r)&&delete e[c];function n(c){if(ut(c)){u(c),s(c);return}else if(mt(c)){u(c),"getInterfaces"in c&&s(c);return}else if(lr(c)){a(c);return}else if(bt(c)){o(c);return}else if(Dn(c))return;throw new Error(`Unexpected schema type: ${c}`)}function u(c){const l=c.getFields();for(const[p,f]of Object.entries(l))f.args.map(d=>(d.type=i(d.type),d.type===null?null:d)).filter(Boolean),f.type=i(f.type),f.type===null&&delete l[p]}function s(c){if("getInterfaces"in c){const l=c.getInterfaces();l.push(...l.splice(0).map(p=>i(p)).filter(Boolean))}}function o(c){const l=c.getFields();for(const[p,f]of Object.entries(l))f.type=i(f.type),f.type===null&&delete l[p]}function a(c){const l=c.getTypes();l.push(...l.splice(0).map(p=>i(p)).filter(Boolean))}function i(c){if(jt(c)){const l=i(c.ofType);return l!=null?new gr(l):null}else if(ct(c)){const l=i(c.ofType);return l!=null?new ot(l):null}else if(Tp(c)){const l=e[c.name];if(l&&c!==l)return l}return c}}function I5(e,t){const r=e.getTypeMap();for(const n in r){const u=r[n];if(!Vr(u).name.startsWith("__")&&ut(u)){const s=u.getFields();for(const o in s){const a=s[o];t(a,n,o)}}}}function Tv(e,t){const r=e.getTypeMap();for(const n in r){const u=r[n];if(!Vr(u).name.startsWith("__")){if(ut(u)){const s=u.getFields();for(const o in s){const a=s[o];for(const i of a.args)i.defaultValue=t(i.type,i.defaultValue)}}else if(bt(u)){const s=u.getFields();for(const o in s){const a=s[o];a.defaultValue=t(a.type,a.defaultValue)}}}}}function qp(e,t=!1){const r=e[0]||{},n={};t&&Object.setPrototypeOf(n,Object.create(Object.getPrototypeOf(r)));for(const u of e)if(zf(r)&&zf(u)){if(t){const s=Object.getPrototypeOf(n),o=Object.getPrototypeOf(u);if(o)for(const a of Object.getOwnPropertyNames(o)){const i=Object.getOwnPropertyDescriptor(o,a);kp(i)&&Object.defineProperty(s,a,i)}}for(const s in u)zf(u[s])?s in n?n[s]=qp([n[s],u[s]],t):Object.assign(n,{[s]:u[s]}):Object.assign(n,{[s]:u[s]})}return n}function zf(e){return e&&typeof e=="object"&&!Array.isArray(e)}function dO(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===V.DOCUMENT}function DO(e,t={}){const{requireResolversForArgs:r,requireResolversForNonScalar:n,requireResolversForAllFields:u}=t;if(u&&(r||n))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");I5(e,(s,o,a)=>{u&&Kf("requireResolversForAllFields",u,s,o,a),r&&s.args.length>0&&Kf("requireResolversForArgs",r,s,o,a),n!=="ignore"&&!nn(Vr(s.type))&&Kf("requireResolversForNonScalar",n,s,o,a)})}function Kf(e,t,r,n,u){if(!r.resolve){const s=`Resolver missing for "${n}.${u}". +)`):Ot("(",$e(t,", "),")"))+(r?" repeatable":"")+" on "+$e(n," | ")},SchemaExtension:{leave:({directives:e,operationTypes:t})=>$e(["extend schema",$e(e," "),Dn(t)]," ")},ScalarTypeExtension:{leave:({name:e,directives:t})=>$e(["extend scalar",e,$e(t," ")]," ")},ObjectTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>$e(["extend type",e,Ot("implements ",$e(t," & ")),$e(r," "),Dn(n)]," ")},InterfaceTypeExtension:{leave:({name:e,interfaces:t,directives:r,fields:n})=>$e(["extend interface",e,Ot("implements ",$e(t," & ")),$e(r," "),Dn(n)]," ")},UnionTypeExtension:{leave:({name:e,directives:t,types:r})=>$e(["extend union",e,$e(t," "),Ot("= ",$e(r," | "))]," ")},EnumTypeExtension:{leave:({name:e,directives:t,values:r})=>$e(["extend enum",e,$e(t," "),Dn(r)]," ")},InputObjectTypeExtension:{leave:({name:e,directives:t,fields:r})=>$e(["extend input",e,$e(t," "),Dn(r)]," ")}},Ik=Object.keys(Hy).reduce((e,t)=>({...e,[t]:{leave:kk(Hy[t].leave)}}),{});function Nk(e){return Wi(e,Ik)}function qk(e){return e.kind==="FieldDefinition"}function xk(e){const t=Rk(e);if(t!==void 0)return jk(` +${t}`)}function Rk(e){const t=e.loc;if(!t)return;const r=[];let n=t.startToken.prev;for(;n!=null&&n.kind===me.COMMENT&&n.next!=null&&n.prev!=null&&n.line+1===n.next.line&&n.line!==n.prev.line;){const u=String(n.value);r.push(u),n=n.prev}return r.length>0?r.reverse().join(` +`):void 0}function jk(e){const t=e.split(/\r\n|[\n\r]/g),r=Mk(t);if(r!==0)for(let n=1;n0&&Wy(t[0]);)t.shift();for(;t.length>0&&Wy(t[t.length-1]);)t.pop();return t.join(` +`)}function Mk(e){let t=null;for(let r=1;rs(d));return{typeMap:n,directives:u};function s(d){if(A5(d))return d;const f=d.toConfig();return f.args=o(f.args),new cs(f)}function o(d){const f={};for(const h in d){const y=d[h],A=p(y.type);A!=null&&(y.type=A,f[h]=y)}return f}function a(d){if(Xe(d)){const f=d.toConfig(),h={...f,fields:()=>i(f.fields),interfaces:()=>l(f.interfaces)};return new jr(h)}else if(dt(d)){const f=d.toConfig(),h={...f,fields:()=>i(f.fields)};return"interfaces"in h&&(h.interfaces=()=>l(f.interfaces)),new is(h)}else if(or(d)){const f=d.toConfig(),h={...f,types:()=>l(f.types)};return new $i(h)}else if(At(d)){const f=d.toConfig(),h={...f,fields:()=>c(f.fields)};return new Ks(h)}else if(Kt(d)){const f=d.toConfig();return new tu(f)}else if(zr(d)){if(zi(d))return d;const f=d.toConfig();return new eu(f)}throw new Error(`Unexpected schema type: ${d}`)}function i(d){const f={};for(const h in d){const y=d[h],A=p(y.type);A!=null&&y.args&&(y.type=A,y.args=o(y.args),f[h]=y)}return f}function c(d){const f={};for(const h in d){const y=d[h],A=p(y.type);A!=null&&(y.type=A,f[h]=y)}return f}function l(d){const f=[];for(const h of d){const y=p(h);y!=null&&f.push(y)}return f}function p(d){if(qt(d)){const f=p(d.ofType);return f!=null?new Dr(f):null}else if(nt(d)){const f=p(d.ofType);return f!=null?new Qe(f):null}else if(qp(d)){let f=r[d.name];return f===void 0&&(f=Lk(d)?Uk(d):a(d),n[f.name]=r[d.name]=f),f!=null?n[f.name]:null}return null}}function np(e,t,r=null,n=null){if(t==null)return t;const u=rm(e);if(on(u))return r!=null?r(u,t):t;if(qt(u))return Z5(t).map(s=>np(u.ofType,s,r,n));if(At(u)){const s=u.getFields(),o={};for(const a in t){const i=s[a];i!=null&&(o[a]=np(i.type,t[a],r,n))}return n!=null?n(u,o):o}}function n6(e,t){return np(e,t,(r,n)=>{try{return r.serialize(n)}catch{return n}})}function u6(e,t){return np(e,t,(r,n)=>{try{return r.parseValue(n)}catch{return n}})}function j2(e,t={}){const r=o6(s6(M2(Jy(Vk(M2(Jy(e.getTypeMap(),e,n6),e,t,a=>on(a)),e,t),e,u6),e,t,a=>!on(a)),e,t),e,t),n=e.getDirectives(),u=Hk(n,e,t),{typeMap:s,directives:o}=Gk(r,u);return new cm({...e.toConfig(),query:mo(s,mo(r,e.getQueryType())),mutation:mo(s,mo(r,e.getMutationType())),subscription:mo(s,mo(r,e.getSubscriptionType())),types:Object.values(s),directives:o})}function M2(e,t,r,n=()=>!0){const u={};for(const s in e)if(!s.startsWith("__")){const o=e[s];if(o==null||!n(o)){u[s]=o;continue}const a=Jk(t,r,s);if(a==null){u[s]=o;continue}const i=a(o,t);if(i===void 0){u[s]=o;continue}u[s]=i}return u}function Vk(e,t,r){const n=Zk(r);return n?M2(e,t,{[ze.ENUM_TYPE]:u=>{const s=u.toConfig(),o=s.values,a={};for(const i in o){const c=o[i],l=n(c,u.name,t,i);if(l===void 0)a[i]=c;else if(Array.isArray(l)){const[p,d]=l;a[p]=d===void 0?c:d}else l!==null&&(a[i]=l)}return Bl(new tu({...s,values:a}))}},u=>Kt(u)):e}function Jy(e,t,r){const n=o6(e,t,{[ze.ARGUMENT]:u=>{if(u.defaultValue===void 0)return u;const s=up(e,u.type);if(s!=null)return{...u,defaultValue:r(s,u.defaultValue)}}});return s6(n,t,{[ze.INPUT_OBJECT_FIELD]:u=>{if(u.defaultValue===void 0)return u;const s=up(n,u.type);if(s!=null)return{...u,defaultValue:r(s,u.defaultValue)}}})}function up(e,t){if(qt(t)){const r=up(e,t.ofType);return r!=null?new Dr(r):null}else if(nt(t)){const r=up(e,t.ofType);return r!=null?new Qe(r):null}else if(qp(t)){const r=e[t.name];return r??null}return null}function s6(e,t,r){const n={};for(const u in e)if(!u.startsWith("__")){const s=e[u];if(!Xe(s)&&!dt(s)&&!At(s)){n[u]=s;continue}const o=Kk(t,r,u);if(o==null){n[u]=s;continue}const a=s.toConfig(),i=a.fields,c={};for(const l in i){const p=i[l],d=o(p,l,u,t);if(d===void 0)c[l]=p;else if(Array.isArray(d)){const[f,h]=d;h.astNode!=null&&(h.astNode={...h.astNode,name:{...h.astNode.name,value:f}}),c[f]=h===void 0?p:h}else d!==null&&(c[l]=d)}Xe(s)?n[u]=Bl(new jr({...a,fields:c})):dt(s)?n[u]=Bl(new is({...a,fields:c})):n[u]=Bl(new Ks({...a,fields:c}))}return n}function o6(e,t,r){const n={};for(const u in e)if(!u.startsWith("__")){const s=e[u];if(!Xe(s)&&!dt(s)){n[u]=s;continue}const o=Xk(r);if(o==null){n[u]=s;continue}const a=s.toConfig(),i=a.fields,c={};for(const l in i){const p=i[l],d=p.args;if(d==null){c[l]=p;continue}const f=Object.keys(d);if(!f.length){c[l]=p;continue}const h={};for(const y of f){const A=d[y],m=o(A,l,u,t);if(m===void 0)h[y]=A;else if(Array.isArray(m)){const[v,C]=m;h[v]=C}else m!==null&&(h[y]=m)}c[l]={...p,args:h}}Xe(s)?n[u]=new jr({...a,fields:c}):dt(s)?n[u]=new is({...a,fields:c}):n[u]=new Ks({...a,fields:c})}return n}function Hk(e,t,r){const n=Yk(r);if(n==null)return e.slice();const u=[];for(const s of e){const o=n(s,t);o===void 0?u.push(s):o!==null&&u.push(o)}return u}function Wk(e,t){var r,n,u;const s=e.getType(t),o=[ze.TYPE];return Xe(s)?(o.push(ze.COMPOSITE_TYPE,ze.OBJECT_TYPE),t===((r=e.getQueryType())===null||r===void 0?void 0:r.name)?o.push(ze.ROOT_OBJECT,ze.QUERY):t===((n=e.getMutationType())===null||n===void 0?void 0:n.name)?o.push(ze.ROOT_OBJECT,ze.MUTATION):t===((u=e.getSubscriptionType())===null||u===void 0?void 0:u.name)&&o.push(ze.ROOT_OBJECT,ze.SUBSCRIPTION)):At(s)?o.push(ze.INPUT_OBJECT_TYPE):dt(s)?o.push(ze.COMPOSITE_TYPE,ze.ABSTRACT_TYPE,ze.INTERFACE_TYPE):or(s)?o.push(ze.COMPOSITE_TYPE,ze.ABSTRACT_TYPE,ze.UNION_TYPE):Kt(s)?o.push(ze.ENUM_TYPE):zr(s)&&o.push(ze.SCALAR_TYPE),o}function Jk(e,t,r){const n=Wk(e,r);let u;const s=[...n];for(;!u&&s.length>0;){const o=s.pop();u=t[o]}return u??null}function zk(e,t){var r,n,u;const s=e.getType(t),o=[ze.FIELD];return Xe(s)?(o.push(ze.COMPOSITE_FIELD,ze.OBJECT_FIELD),t===((r=e.getQueryType())===null||r===void 0?void 0:r.name)?o.push(ze.ROOT_FIELD,ze.QUERY_ROOT_FIELD):t===((n=e.getMutationType())===null||n===void 0?void 0:n.name)?o.push(ze.ROOT_FIELD,ze.MUTATION_ROOT_FIELD):t===((u=e.getSubscriptionType())===null||u===void 0?void 0:u.name)&&o.push(ze.ROOT_FIELD,ze.SUBSCRIPTION_ROOT_FIELD)):dt(s)?o.push(ze.COMPOSITE_FIELD,ze.INTERFACE_FIELD):At(s)&&o.push(ze.INPUT_OBJECT_FIELD),o}function Kk(e,t,r){const n=zk(e,r);let u;const s=[...n];for(;!u&&s.length>0;){const o=s.pop();u=t[o]}return u??null}function Xk(e){const t=e[ze.ARGUMENT];return t??null}function Yk(e){const t=e[ze.DIRECTIVE];return t??null}function Zk(e){const t=e[ze.ENUM_VALUE];return t??null}function Bl(e){if(Xe(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:j.OBJECT_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:j.OBJECT_TYPE_EXTENSION,fields:void 0}))),new jr(t)}else if(dt(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:j.INTERFACE_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:j.INTERFACE_TYPE_EXTENSION,fields:void 0}))),new is(t)}else if(At(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.fields){const u=t.fields[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,kind:j.INPUT_OBJECT_TYPE_DEFINITION,fields:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,kind:j.INPUT_OBJECT_TYPE_EXTENSION,fields:void 0}))),new Ks(t)}else if(Kt(e)){const t=e.toConfig();if(t.astNode!=null){const r=[];for(const n in t.values){const u=t.values[n];u.astNode!=null&&r.push(u.astNode)}t.astNode={...t.astNode,values:r}}return t.extensionASTNodes!=null&&(t.extensionASTNodes=t.extensionASTNodes.map(r=>({...r,values:void 0}))),new tu(t)}else return e}function Qk(e){return eO(e.getTypeMap(),e.getDirectives()),e}function eO(e,t){const r=Object.create(null);for(const c in e){const l=e[c];if(l==null||c.startsWith("__"))continue;const p=l.name;if(!p.startsWith("__")){if(r[p]!=null){console.warn(`Duplicate schema type name ${p} found; keeping the existing one found in the schema`);continue}r[p]=l}}for(const c in r){const l=r[c];e[c]=l}for(const c of t)c.args=c.args.filter(l=>(l.type=i(l.type),l.type!==null));for(const c in e){const l=e[c];!c.startsWith("__")&&c in r&&l!=null&&n(l)}for(const c in e)!c.startsWith("__")&&!(c in r)&&delete e[c];function n(c){if(Xe(c)){u(c),s(c);return}else if(dt(c)){u(c),"getInterfaces"in c&&s(c);return}else if(or(c)){a(c);return}else if(At(c)){o(c);return}else if(on(c))return;throw new Error(`Unexpected schema type: ${c}`)}function u(c){const l=c.getFields();for(const[p,d]of Object.entries(l))d.args.map(f=>(f.type=i(f.type),f.type===null?null:f)).filter(Boolean),d.type=i(d.type),d.type===null&&delete l[p]}function s(c){if("getInterfaces"in c){const l=c.getInterfaces();l.push(...l.splice(0).map(p=>i(p)).filter(Boolean))}}function o(c){const l=c.getFields();for(const[p,d]of Object.entries(l))d.type=i(d.type),d.type===null&&delete l[p]}function a(c){const l=c.getTypes();l.push(...l.splice(0).map(p=>i(p)).filter(Boolean))}function i(c){if(qt(c)){const l=i(c.ofType);return l!=null?new Dr(l):null}else if(nt(c)){const l=i(c.ofType);return l!=null?new Qe(l):null}else if(qp(c)){const l=e[c.name];if(l&&c!==l)return l}return c}}function a6(e,t){const r=e.getTypeMap();for(const n in r){const u=r[n];if(!xr(u).name.startsWith("__")&&Xe(u)){const s=u.getFields();for(const o in s){const a=s[o];t(a,n,o)}}}}function zy(e,t){const r=e.getTypeMap();for(const n in r){const u=r[n];if(!xr(u).name.startsWith("__")){if(Xe(u)){const s=u.getFields();for(const o in s){const a=s[o];for(const i of a.args)i.defaultValue=t(i.type,i.defaultValue)}}else if(At(u)){const s=u.getFields();for(const o in s){const a=s[o];a.defaultValue=t(a.type,a.defaultValue)}}}}}function Gp(e,t=!1){const r=e[0]||{},n={};t&&Object.setPrototypeOf(n,Object.create(Object.getPrototypeOf(r)));for(const u of e)if(nf(r)&&nf(u)){if(t){const s=Object.getPrototypeOf(n),o=Object.getPrototypeOf(u);if(o)for(const a of Object.getOwnPropertyNames(o)){const i=Object.getOwnPropertyDescriptor(o,a);Mp(i)&&Object.defineProperty(s,a,i)}}for(const s in u)nf(u[s])?s in n?n[s]=Gp([n[s],u[s]],t):Object.assign(n,{[s]:u[s]}):Object.assign(n,{[s]:u[s]})}return n}function nf(e){return e&&typeof e=="object"&&!Array.isArray(e)}function tO(e){return e&&typeof e=="object"&&"kind"in e&&e.kind===j.DOCUMENT}function rO(e,t={}){const{requireResolversForArgs:r,requireResolversForNonScalar:n,requireResolversForAllFields:u}=t;if(u&&(r||n))throw new TypeError("requireResolversForAllFields takes precedence over the more specific assertions. Please configure either requireResolversForAllFields or requireResolversForArgs / requireResolversForNonScalar, but not a combination of them.");a6(e,(s,o,a)=>{u&&uf("requireResolversForAllFields",u,s,o,a),r&&s.args.length>0&&uf("requireResolversForArgs",r,s,o,a),n!=="ignore"&&!zr(xr(s.type))&&uf("requireResolversForNonScalar",n,s,o,a)})}function uf(e,t,r,n,u){if(!r.resolve){const s=`Resolver missing for "${n}.${u}". To disable this validator, use: resolverValidationOptions: { ${e}: 'ignore' - }`;if(t==="error")throw new Error(s);t==="warn"&&console.warn(s);return}if(typeof r.resolve!="function")throw new Error(`Resolver "${n}.${u}" must be a function`)}function hO(e,t){T2(e,{[Qe.ABSTRACT_TYPE]:r=>{if(!r.resolveType){const n=`Type "${r.name}" is missing a "__resolveType" resolver. Pass 'ignore' into "resolverValidationOptions.requireResolversForResolveType" to disable this error.`;if(t==="error")throw new Error(n);t==="warn"&&console.warn(n)}}})}function mO(e,t){const r={},n=e.getTypeMap();for(const u in n){const s=n[u];if("getInterfaces"in s){r[u]={};for(const a of s.getInterfaces())if(t[a.name])for(const i in t[a.name])(i==="__isTypeOf"||!i.startsWith("__"))&&(r[u][i]=t[a.name][i]);const o=t[u];r[u]={...r[u],...o}}else{const o=t[u];o!=null&&(r[u]=o)}}return r}function EO({schema:e,resolvers:t,defaultFieldResolver:r,resolverValidationOptions:n={},inheritResolversFromInterfaces:u=!1,updateResolversInPlace:s=!1}){const{requireResolversToMatchSchema:o="error",requireResolversForResolveType:a}=n,i=u?mO(e,t):t;for(const c in i){const l=i[c];if(typeof l!=="object")throw new Error(`"${c}" defined in resolvers, but has invalid value "${l}". The resolver's value must be of type object.`);const f=e.getType(c);if(f==null){if(o==="ignore")continue;throw new Error(`"${c}" defined in resolvers, but not in schema`)}else if(Ji(f))for(const d in l)d.startsWith("__")?f[d.substring(2)]=l[d]:f[d]=l[d];else if(Zt(f)){const d=f.getValues();for(const h in l)if(!h.startsWith("__")&&!d.some(E=>E.name===h)&&o&&o!=="ignore")throw new Error(`${f.name}.${h} was defined in resolvers, but not present within ${f.name}`)}else if(lr(f)){for(const d in l)if(!d.startsWith("__")&&o&&o!=="ignore")throw new Error(`${f.name}.${d} was defined in resolvers, but ${f.name} is not an object or interface type`)}else if(ut(f)||mt(f)){for(const d in l)if(!d.startsWith("__"))if(f.getFields()[d]==null){if(o&&o!=="ignore")throw new Error(`${c}.${d} defined in resolvers, but not in schema`)}else{const A=l[d];if(typeof A!="function"&&typeof A!="object")throw new Error(`Resolver ${c}.${d} must be object or function`)}}}return e=s?vO(e,i,r):yO(e,i,r),a&&a!=="ignore"&&hO(e,a),e}function vO(e,t,r){var n,u,s,o,a,i,c,l,p,f,d,h;const E=e.getTypeMap();for(const A in t){const m=e.getType(A),y=t[A];if(nn(m))for(const F in y)F.startsWith("__")?m[F.substring(2)]=y[F]:F==="astNode"&&m.astNode!=null?m.astNode={...m.astNode,description:(u=(n=y==null?void 0:y.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:m.astNode.description,directives:((s=m.astNode.directives)!==null&&s!==void 0?s:[]).concat((a=(o=y==null?void 0:y.astNode)===null||o===void 0?void 0:o.directives)!==null&&a!==void 0?a:[])}:F==="extensionASTNodes"&&m.extensionASTNodes!=null?m.extensionASTNodes=m.extensionASTNodes.concat((i=y==null?void 0:y.extensionASTNodes)!==null&&i!==void 0?i:[]):F==="extensions"&&m.extensions!=null&&y.extensions!=null?m.extensions=Object.assign(Object.create(null),m.extensions,y.extensions):m[F]=y[F];else if(Zt(m)){const F=m.toConfig(),B=F.values;for(const P in y)P.startsWith("__")?F[P.substring(2)]=y[P]:P==="astNode"&&F.astNode!=null?F.astNode={...F.astNode,description:(l=(c=y==null?void 0:y.astNode)===null||c===void 0?void 0:c.description)!==null&&l!==void 0?l:F.astNode.description,directives:((p=F.astNode.directives)!==null&&p!==void 0?p:[]).concat((d=(f=y==null?void 0:y.astNode)===null||f===void 0?void 0:f.directives)!==null&&d!==void 0?d:[])}:P==="extensionASTNodes"&&F.extensionASTNodes!=null?F.extensionASTNodes=F.extensionASTNodes.concat((h=y==null?void 0:y.extensionASTNodes)!==null&&h!==void 0?h:[]):P==="extensions"&&m.extensions!=null&&y.extensions!=null?m.extensions=Object.assign(Object.create(null),m.extensions,y.extensions):B[P]&&(B[P].value=y[P]);E[A]=new iu(F)}else if(lr(m))for(const F in y)F.startsWith("__")&&(m[F.substring(2)]=y[F]);else if(ut(m)||mt(m))for(const F in y){if(F.startsWith("__")){m[F.substring(2)]=y[F];continue}const P=m.getFields()[F];if(P!=null){const $=y[F];typeof $=="function"?P.resolve=$.bind(y):N5(P,$)}}}return Tv(e,$5),pO(e),Tv(e,P5),r!=null&&I5(e,A=>{A.resolve||(A.resolve=r)}),e}function yO(e,t,r){return e=T2(e,{[Qe.SCALAR_TYPE]:n=>{var u,s,o,a,i,c;const l=n.toConfig(),p=t[n.name];if(!Ji(n)&&p!=null){for(const f in p)f.startsWith("__")?l[f.substring(2)]=p[f]:f==="astNode"&&l.astNode!=null?l.astNode={...l.astNode,description:(s=(u=p==null?void 0:p.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:l.astNode.description,directives:((o=l.astNode.directives)!==null&&o!==void 0?o:[]).concat((i=(a=p==null?void 0:p.astNode)===null||a===void 0?void 0:a.directives)!==null&&i!==void 0?i:[])}:f==="extensionASTNodes"&&l.extensionASTNodes!=null?l.extensionASTNodes=l.extensionASTNodes.concat((c=p==null?void 0:p.extensionASTNodes)!==null&&c!==void 0?c:[]):f==="extensions"&&l.extensions!=null&&p.extensions!=null?l.extensions=Object.assign(Object.create(null),n.extensions,p.extensions):l[f]=p[f];return new au(l)}},[Qe.ENUM_TYPE]:n=>{var u,s,o,a,i,c;const l=t[n.name],p=n.toConfig(),f=p.values;if(l!=null){for(const d in l)d.startsWith("__")?p[d.substring(2)]=l[d]:d==="astNode"&&p.astNode!=null?p.astNode={...p.astNode,description:(s=(u=l==null?void 0:l.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:p.astNode.description,directives:((o=p.astNode.directives)!==null&&o!==void 0?o:[]).concat((i=(a=l==null?void 0:l.astNode)===null||a===void 0?void 0:a.directives)!==null&&i!==void 0?i:[])}:d==="extensionASTNodes"&&p.extensionASTNodes!=null?p.extensionASTNodes=p.extensionASTNodes.concat((c=l==null?void 0:l.extensionASTNodes)!==null&&c!==void 0?c:[]):d==="extensions"&&p.extensions!=null&&l.extensions!=null?p.extensions=Object.assign(Object.create(null),n.extensions,l.extensions):f[d]&&(f[d].value=l[d]);return new iu(p)}},[Qe.UNION_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__resolveType&&(s.resolveType=u.__resolveType),new Ti(s)}},[Qe.OBJECT_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__isTypeOf&&(s.isTypeOf=u.__isTypeOf),new Wr(s)}},[Qe.INTERFACE_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__resolveType&&(s.resolveType=u.__resolveType),new cs(s)}},[Qe.COMPOSITE_FIELD]:(n,u,s)=>{const o=t[s];if(o!=null){const a=o[u];if(a!=null){const i={...n};return typeof a=="function"?i.resolve=a.bind(o):N5(i,a),i}}}}),r!=null&&(e=T2(e,{[Qe.OBJECT_FIELD]:n=>({...n,resolve:n.resolve!=null?n.resolve:r})})),e}function N5(e,t){for(const r in t)e[r]=t[r]}function q5(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};const r=new Array;for(let u of e)Array.isArray(u)&&(u=q5(u)),typeof u=="object"&&u&&r.push(u);const n=qp(r,!0);if(t!=null&&t.exclusions)for(const u of t.exclusions){const[s,o]=u.split(".");!o||o==="*"?delete n[s]:n[s]&&delete n[s][o]}return n}function gO(e,t,r){const n=AO([...t,...e].filter(kp));return r&&r.sort&&n.sort(Op),n}function AO(e){return e.reduce((t,r)=>t.find(u=>u.name.value===r.name.value)?t:t.concat([r]),[])}function FO(e,t){return!!e.find(r=>r.name.value===t.name.value)}function CO(e,t){return t.some(({value:r})=>r===e.value)}function x5(e,t){const r=[...t];for(const n of e){const u=r.findIndex(s=>s.name.value===n.name.value);if(u>-1){const s=r[u];if(s.value.kind==="ListValue"){const o=s.value.values,a=n.value.values;s.value.values=_O(o,a,(i,c)=>{const l=i.value;return!l||!c.some(p=>p.value===l)})}else s.value=n.value}else r.push(n)}return r}function bO(e){return e.map((t,r,n)=>{const u=n.findIndex(s=>s.name.value===t.name.value);if(u!==r){const s=n[u];return t.arguments=x5(t.arguments,s.arguments),null}return t}).filter(kp)}function Ou(e=[],t=[],r){const n=r&&r.reverseDirectives,u=n?e:t,s=n?t:e,o=bO([...u]);for(const a of s)if(FO(o,a)){const i=o.findIndex(l=>l.name.value===a.name.value),c=o[i];o[i].arguments=x5(a.arguments||[],c.arguments||[])}else o.push(a);return o}function SO(e,t){const r=Kt({...e,description:void 0}),n=Kt({...t,description:void 0}),u=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(r.replace(u,"")===n.replace(u,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". + }`;if(t==="error")throw new Error(s);t==="warn"&&console.warn(s);return}if(typeof r.resolve!="function")throw new Error(`Resolver "${n}.${u}" must be a function`)}function nO(e,t){j2(e,{[ze.ABSTRACT_TYPE]:r=>{if(!r.resolveType){const n=`Type "${r.name}" is missing a "__resolveType" resolver. Pass 'ignore' into "resolverValidationOptions.requireResolversForResolveType" to disable this error.`;if(t==="error")throw new Error(n);t==="warn"&&console.warn(n)}}})}function uO(e,t){const r={},n=e.getTypeMap();for(const u in n){const s=n[u];if("getInterfaces"in s){r[u]={};for(const a of s.getInterfaces())if(t[a.name])for(const i in t[a.name])(i==="__isTypeOf"||!i.startsWith("__"))&&(r[u][i]=t[a.name][i]);const o=t[u];r[u]={...r[u],...o}}else{const o=t[u];o!=null&&(r[u]=o)}}return r}function sO({schema:e,resolvers:t,defaultFieldResolver:r,resolverValidationOptions:n={},inheritResolversFromInterfaces:u=!1,updateResolversInPlace:s=!1}){const{requireResolversToMatchSchema:o="error",requireResolversForResolveType:a}=n,i=u?uO(e,t):t;for(const c in i){const l=i[c];if(typeof l!=="object")throw new Error(`"${c}" defined in resolvers, but has invalid value "${l}". The resolver's value must be of type object.`);const d=e.getType(c);if(d==null){if(o==="ignore")continue;throw new Error(`"${c}" defined in resolvers, but not in schema`)}else if(zi(d))for(const f in l)f.startsWith("__")?d[f.substring(2)]=l[f]:d[f]=l[f];else if(Kt(d)){const f=d.getValues();for(const h in l)if(!h.startsWith("__")&&!f.some(y=>y.name===h)&&o&&o!=="ignore")throw new Error(`${d.name}.${h} was defined in resolvers, but not present within ${d.name}`)}else if(or(d)){for(const f in l)if(!f.startsWith("__")&&o&&o!=="ignore")throw new Error(`${d.name}.${f} was defined in resolvers, but ${d.name} is not an object or interface type`)}else if(Xe(d)||dt(d)){for(const f in l)if(!f.startsWith("__"))if(d.getFields()[f]==null){if(o&&o!=="ignore")throw new Error(`${c}.${f} defined in resolvers, but not in schema`)}else{const A=l[f];if(typeof A!="function"&&typeof A!="object")throw new Error(`Resolver ${c}.${f} must be object or function`)}}}return e=s?oO(e,i,r):aO(e,i,r),a&&a!=="ignore"&&nO(e,a),e}function oO(e,t,r){var n,u,s,o,a,i,c,l,p,d,f,h;const y=e.getTypeMap();for(const A in t){const m=e.getType(A),v=t[A];if(zr(m))for(const C in v)C.startsWith("__")?m[C.substring(2)]=v[C]:C==="astNode"&&m.astNode!=null?m.astNode={...m.astNode,description:(u=(n=v==null?void 0:v.astNode)===null||n===void 0?void 0:n.description)!==null&&u!==void 0?u:m.astNode.description,directives:((s=m.astNode.directives)!==null&&s!==void 0?s:[]).concat((a=(o=v==null?void 0:v.astNode)===null||o===void 0?void 0:o.directives)!==null&&a!==void 0?a:[])}:C==="extensionASTNodes"&&m.extensionASTNodes!=null?m.extensionASTNodes=m.extensionASTNodes.concat((i=v==null?void 0:v.extensionASTNodes)!==null&&i!==void 0?i:[]):C==="extensions"&&m.extensions!=null&&v.extensions!=null?m.extensions=Object.assign(Object.create(null),m.extensions,v.extensions):m[C]=v[C];else if(Kt(m)){const C=m.toConfig(),B=C.values;for(const T in v)T.startsWith("__")?C[T.substring(2)]=v[T]:T==="astNode"&&C.astNode!=null?C.astNode={...C.astNode,description:(l=(c=v==null?void 0:v.astNode)===null||c===void 0?void 0:c.description)!==null&&l!==void 0?l:C.astNode.description,directives:((p=C.astNode.directives)!==null&&p!==void 0?p:[]).concat((f=(d=v==null?void 0:v.astNode)===null||d===void 0?void 0:d.directives)!==null&&f!==void 0?f:[])}:T==="extensionASTNodes"&&C.extensionASTNodes!=null?C.extensionASTNodes=C.extensionASTNodes.concat((h=v==null?void 0:v.extensionASTNodes)!==null&&h!==void 0?h:[]):T==="extensions"&&m.extensions!=null&&v.extensions!=null?m.extensions=Object.assign(Object.create(null),m.extensions,v.extensions):B[T]&&(B[T].value=v[T]);y[A]=new tu(C)}else if(or(m))for(const C in v)C.startsWith("__")&&(m[C.substring(2)]=v[C]);else if(Xe(m)||dt(m))for(const C in v){if(C.startsWith("__")){m[C.substring(2)]=v[C];continue}const T=m.getFields()[C];if(T!=null){const N=v[C];typeof N=="function"?T.resolve=N.bind(v):i6(T,N)}}}return zy(e,n6),Qk(e),zy(e,u6),r!=null&&a6(e,A=>{A.resolve||(A.resolve=r)}),e}function aO(e,t,r){return e=j2(e,{[ze.SCALAR_TYPE]:n=>{var u,s,o,a,i,c;const l=n.toConfig(),p=t[n.name];if(!zi(n)&&p!=null){for(const d in p)d.startsWith("__")?l[d.substring(2)]=p[d]:d==="astNode"&&l.astNode!=null?l.astNode={...l.astNode,description:(s=(u=p==null?void 0:p.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:l.astNode.description,directives:((o=l.astNode.directives)!==null&&o!==void 0?o:[]).concat((i=(a=p==null?void 0:p.astNode)===null||a===void 0?void 0:a.directives)!==null&&i!==void 0?i:[])}:d==="extensionASTNodes"&&l.extensionASTNodes!=null?l.extensionASTNodes=l.extensionASTNodes.concat((c=p==null?void 0:p.extensionASTNodes)!==null&&c!==void 0?c:[]):d==="extensions"&&l.extensions!=null&&p.extensions!=null?l.extensions=Object.assign(Object.create(null),n.extensions,p.extensions):l[d]=p[d];return new eu(l)}},[ze.ENUM_TYPE]:n=>{var u,s,o,a,i,c;const l=t[n.name],p=n.toConfig(),d=p.values;if(l!=null){for(const f in l)f.startsWith("__")?p[f.substring(2)]=l[f]:f==="astNode"&&p.astNode!=null?p.astNode={...p.astNode,description:(s=(u=l==null?void 0:l.astNode)===null||u===void 0?void 0:u.description)!==null&&s!==void 0?s:p.astNode.description,directives:((o=p.astNode.directives)!==null&&o!==void 0?o:[]).concat((i=(a=l==null?void 0:l.astNode)===null||a===void 0?void 0:a.directives)!==null&&i!==void 0?i:[])}:f==="extensionASTNodes"&&p.extensionASTNodes!=null?p.extensionASTNodes=p.extensionASTNodes.concat((c=l==null?void 0:l.extensionASTNodes)!==null&&c!==void 0?c:[]):f==="extensions"&&p.extensions!=null&&l.extensions!=null?p.extensions=Object.assign(Object.create(null),n.extensions,l.extensions):d[f]&&(d[f].value=l[f]);return new tu(p)}},[ze.UNION_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__resolveType&&(s.resolveType=u.__resolveType),new $i(s)}},[ze.OBJECT_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__isTypeOf&&(s.isTypeOf=u.__isTypeOf),new jr(s)}},[ze.INTERFACE_TYPE]:n=>{const u=t[n.name];if(u!=null){const s=n.toConfig();return u.__resolveType&&(s.resolveType=u.__resolveType),new is(s)}},[ze.COMPOSITE_FIELD]:(n,u,s)=>{const o=t[s];if(o!=null){const a=o[u];if(a!=null){const i={...n};return typeof a=="function"?i.resolve=a.bind(o):i6(i,a),i}}}}),r!=null&&(e=j2(e,{[ze.OBJECT_FIELD]:n=>({...n,resolve:n.resolve!=null?n.resolve:r})})),e}function i6(e,t){for(const r in t)e[r]=t[r]}function c6(e,t){if(!e||Array.isArray(e)&&e.length===0)return{};if(!Array.isArray(e))return e;if(e.length===1)return e[0]||{};const r=new Array;for(let u of e)Array.isArray(u)&&(u=c6(u)),typeof u=="object"&&u&&r.push(u);return Gp(r,!0)}function iO(e,t,r){const n=cO([...t,...e].filter(Mp));return r&&r.sort&&n.sort(jp),n}function cO(e){return e.reduce((t,r)=>t.find(u=>u.name.value===r.name.value)?t:t.concat([r]),[])}function lO(e,t){return!!e.find(r=>r.name.value===t.name.value)}function pO(e,t){return t.some(({value:r})=>r===e.value)}function l6(e,t){const r=[...t];for(const n of e){const u=r.findIndex(s=>s.name.value===n.name.value);if(u>-1){const s=r[u];if(s.value.kind==="ListValue"){const o=s.value.values,a=n.value.values;s.value.values=hO(o,a,(i,c)=>{const l=i.value;return!l||!c.some(p=>p.value===l)})}else s.value=n.value}else r.push(n)}return r}function dO(e){return e.map((t,r,n)=>{const u=n.findIndex(s=>s.name.value===t.name.value);if(u!==r){const s=n[u];return t.arguments=l6(t.arguments,s.arguments),null}return t}).filter(Mp)}function $u(e=[],t=[],r){const n=r&&r.reverseDirectives,u=n?e:t,s=n?t:e,o=dO([...u]);for(const a of s)if(lO(o,a)){const i=o.findIndex(l=>l.name.value===a.name.value),c=o[i];o[i].arguments=l6(a.arguments||[],c.arguments||[])}else o.push(a);return o}function fO(e,t){const r=Wt({...e,description:void 0}),n=Wt({...t,description:void 0}),u=new RegExp("(directive @w*d*)|( on .*$)","g");if(!(r.replace(u,"")===n.replace(u,"")))throw new Error(`Unable to merge GraphQL directive "${e.name.value}". Existing directive: ${n} Received directive: - ${r}`)}function wO(e,t){return t?(SO(e,t),{...e,locations:[...t.locations,...e.locations.filter(r=>!CO(r,t.locations))]}):e}function _O(e,t,r){return e.concat(t.filter(n=>r(n,e)))}function BO(e,t,r){if(r!=null&&r.consistentEnumMerge){const s=[];e&&s.push(...e),e=t,t=s}const n=new Map;if(e)for(const s of e)n.set(s.name.value,s);if(t)for(const s of t){const o=s.name.value;if(n.has(o)){const a=n.get(o);a.description=s.description||a.description,a.directives=Ou(s.directives,a.directives)}else n.set(o,s)}const u=[...n.values()];return r&&r.sort&&u.sort(Op),u}function TO(e,t,r){return t?{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:Ou(e.directives,t.directives,r),values:BO(e.values,t.values,r)}:r!=null&&r.convertExtensions?{...e,kind:V.ENUM_TYPE_DEFINITION}:e}function $O(e){return typeof e=="string"}function PO(e){return e instanceof Rh}function $v(e){let t=e;for(;t.kind===V.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}function Pv(e){return e.kind!==V.NAMED_TYPE}function P2(e){return e.kind===V.LIST_TYPE}function Js(e){return e.kind===V.NON_NULL_TYPE}function Zl(e){return P2(e)?`[${Zl(e.type)}]`:Js(e)?`${Zl(e.type)}!`:e.name.value}var Ku;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(Ku||(Ku={}));function OO(e,t){return e==null&&t==null?Ku.A_EQUALS_B:e==null?Ku.A_SMALLER_THAN_B:t==null?Ku.A_GREATER_THAN_B:et?Ku.A_GREATER_THAN_B:Ku.A_EQUALS_B}function kO(e,t,r){const n=e.find(u=>u.name.value===t.name.value);if(n&&!(r!=null&&r.ignoreFieldConflicts)){const u=$v(n.type),s=$v(t.type);if(u.name.value!==s.name.value)throw new Error(`Field "${t.name.value}" already defined with a different type. Declared as "${u.name.value}", but you tried to override with "${s.name.value}"`)}return!!n}function sm(e,t,r,n){const u=[];if(r!=null&&u.push(...r),t!=null)for(const s of t)if(kO(u,s,n)){const o=u.find(a=>a.name.value===s.name.value);n!=null&&n.ignoreFieldConflicts||(n!=null&&n.throwOnConflict?Ov(e,o,s,!1):Ov(e,o,s,!0),Js(s.type)&&!Js(o.type)&&(o.type=s.type)),o.arguments=gO(s.arguments||[],o.arguments||[],n),o.directives=Ou(s.directives,o.directives,n),o.description=s.description||o.description}else u.push(s);if(n&&n.sort&&u.sort(Op),n&&n.exclusions){const s=n.exclusions;return u.filter(o=>!s.includes(`${e.name.value}.${o.name.value}`))}return u}function Ov(e,t,r,n=!1){const u=Zl(t.type),s=Zl(r.type);if(u!==s&&!ai(t.type,r.type,n))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${u}' to '${s}'`)}function ai(e,t,r=!1){if(!Pv(e)&&!Pv(t))return e.toString()===t.toString();if(Js(t)){const n=Js(e)?e.type:e;return ai(n,t.type)}return Js(e)?ai(t,e,r):P2(e)?P2(t)&&ai(e.type,t.type)||Js(t)&&ai(e,t.type):!1}function IO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:sm(e,e.fields,t.fields,r),directives:Ou(e.directives,t.directives,r)}}catch(n){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:V.INPUT_OBJECT_TYPE_DEFINITION}:e}function NO(e,t){return!!e.find(r=>r.name.value===t.name.value)}function om(e=[],t=[],r={}){const n=[...t,...e.filter(u=>!NO(t,u))];return r&&r.sort&&n.sort(Op),n}function qO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:sm(e,e.fields,t.fields,r),directives:Ou(e.directives,t.directives,r),interfaces:e.interfaces?om(e.interfaces,t.interfaces,r):void 0}}catch(n){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:V.INTERFACE_TYPE_DEFINITION}:e}function xO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:sm(e,e.fields,t.fields,r),directives:Ou(e.directives,t.directives,r),interfaces:om(e.interfaces,t.interfaces,r)}}catch(n){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:V.OBJECT_TYPE_DEFINITION}:e}function RO(e,t,r){return t?{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:Ou(e.directives,t.directives,r)}:r!=null&&r.convertExtensions?{...e,kind:V.SCALAR_TYPE_DEFINITION}:e}function jO(e,t,r){return t?{name:e.name,description:e.description||t.description,directives:Ou(e.directives,t.directives,r),kind:r!=null&&r.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?V.UNION_TYPE_DEFINITION:V.UNION_TYPE_EXTENSION,loc:e.loc,types:om(e.types,t.types,r)}:r!=null&&r.convertExtensions?{...e,kind:V.UNION_TYPE_DEFINITION}:e}const O2={query:"Query",mutation:"Mutation",subscription:"Subscription"};function MO(e=[],t=[]){const r=[];for(const n in O2){const u=e.find(s=>s.operation===n)||t.find(s=>s.operation===n);u&&r.push(u)}return r}function LO(e,t,r){return t?{kind:e.kind===V.SCHEMA_DEFINITION||t.kind===V.SCHEMA_DEFINITION?V.SCHEMA_DEFINITION:V.SCHEMA_EXTENSION,description:e.description||t.description,directives:Ou(e.directives,t.directives,r),operationTypes:MO(e.operationTypes,t.operationTypes)}:r!=null&&r.convertExtensions?{...e,kind:V.SCHEMA_DEFINITION}:e}const Yo="SCHEMA_DEF_SYMBOL";function UO(e){return"name"in e}function GO(e,t){var r,n,u;const s={};for(const o of e)if(UO(o)){const a=(r=o.name)===null||r===void 0?void 0:r.value;if(t!=null&&t.commentDescriptions&&UP(o),a==null)continue;if(!((n=t==null?void 0:t.exclusions)===null||n===void 0)&&n.includes(a+".*")||!((u=t==null?void 0:t.exclusions)===null||u===void 0)&&u.includes(a))delete s[a];else switch(o.kind){case V.OBJECT_TYPE_DEFINITION:case V.OBJECT_TYPE_EXTENSION:s[a]=xO(o,s[a],t);break;case V.ENUM_TYPE_DEFINITION:case V.ENUM_TYPE_EXTENSION:s[a]=TO(o,s[a],t);break;case V.UNION_TYPE_DEFINITION:case V.UNION_TYPE_EXTENSION:s[a]=jO(o,s[a],t);break;case V.SCALAR_TYPE_DEFINITION:case V.SCALAR_TYPE_EXTENSION:s[a]=RO(o,s[a],t);break;case V.INPUT_OBJECT_TYPE_DEFINITION:case V.INPUT_OBJECT_TYPE_EXTENSION:s[a]=IO(o,s[a],t);break;case V.INTERFACE_TYPE_DEFINITION:case V.INTERFACE_TYPE_EXTENSION:s[a]=qO(o,s[a],t);break;case V.DIRECTIVE_DEFINITION:s[a]=wO(o,s[a]);break}}else(o.kind===V.SCHEMA_DEFINITION||o.kind===V.SCHEMA_EXTENSION)&&(s[Yo]=LO(o,s[Yo],t));return s}function kv(e,t){B2();const r={kind:V.DOCUMENT,definitions:VO(e,{useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1,...t})};let n;return t!=null&&t.commentDescriptions?n=JP(r):n=r,B2(),n}function Jo(e,t,r=[],n=new Set){if(e&&!n.has(e))if(n.add(e),typeof e=="function")Jo(e(),t,r,n);else if(Array.isArray(e))for(const u of e)Jo(u,t,r,n);else if(Xh(e)){const u=TP(e,t);Jo(u.definitions,t,r,n)}else if($O(e)||PO(e)){const u=jh(e,t);Jo(u.definitions,t,r,n)}else if(typeof e=="object"&&VT(e))r.push(e);else if(dO(e))Jo(e.definitions,t,r,n);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return r}function VO(e,t){var r,n,u;B2();const s=Jo(e,t),o=GO(s,t);if(t!=null&&t.useSchemaDefinition){const i=o[Yo]||{kind:V.SCHEMA_DEFINITION,operationTypes:[]},c=i.operationTypes;for(const l in O2)if(!c.find(f=>f.operation===l)){const f=O2[l],d=o[f];d!=null&&d.name!=null&&c.push({kind:V.OPERATION_TYPE_DEFINITION,type:{kind:V.NAMED_TYPE,name:d.name},operation:l})}((r=i==null?void 0:i.operationTypes)===null||r===void 0?void 0:r.length)!=null&&i.operationTypes.length>0&&(o[Yo]=i)}t!=null&&t.forceSchemaDefinition&&!(!((u=(n=o[Yo])===null||n===void 0?void 0:n.operationTypes)===null||u===void 0)&&u.length)&&(o[Yo]={kind:V.SCHEMA_DEFINITION,operationTypes:[{kind:V.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:V.NAMED_TYPE,name:{kind:V.NAME,value:"Query"}}}]});const a=Object.values(o);if(t!=null&&t.sort){const i=typeof t.sort=="function"?t.sort:OO;a.sort((c,l)=>{var p,f;return i((p=c.name)===null||p===void 0?void 0:p.value,(f=l.name)===null||f===void 0?void 0:f.value)})}return a}function HO(e){return qp(e)}function go(e,t){e&&(e.extensions=qp([e.extensions||{},t||{}]))}function WO(e,t){go(e,t.schemaExtensions);for(const[r,n]of Object.entries(t.types||{})){const u=e.getType(r);if(u){if(go(u,n.extensions),n.type==="object"||n.type==="interface")for(const[s,o]of Object.entries(n.fields)){const a=u.getFields()[s];if(a){go(a,o.extensions);for(const[i,c]of Object.entries(o.arguments))go(a.args.find(l=>l.name===i),c)}}else if(n.type==="input")for(const[s,o]of Object.entries(n.fields)){const a=u.getFields()[s];go(a,o.extensions)}else if(n.type==="enum")for(const[s,o]of Object.entries(n.values)){const a=u.getValue(s);go(a,o)}}}return e}function JO({typeDefs:e,resolvers:t={},resolverValidationOptions:r={},inheritResolversFromInterfaces:n=!1,updateResolversInPlace:u=!1,schemaExtensions:s,...o}){if(typeof r!="object")throw new Error("Expected `resolverValidationOptions` to be an object");if(!e)throw new Error("Must provide typeDefs");let a;if(Xh(e))a=e;else if(o!=null&&o.commentDescriptions){const i=kv(e,{...o,commentDescriptions:!0});a=vP(i,o)}else{const i=kv(e,o);a=b5(i,o)}return a=EO({schema:a,resolvers:q5(t),resolverValidationOptions:r,inheritResolversFromInterfaces:n,updateResolversInPlace:u}),Object.keys(r).length>0&&DO(a,r),s&&(s=HO(S5(s)),WO(a,s)),a}const zO=new Error("request for lock canceled");var KO=function(e,t,r,n){function u(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(p){o(p)}}function i(l){try{c(n.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):u(l.value).then(a,i)}c((n=n.apply(e,t||[])).next())})};class XO{constructor(t,r=zO){this._value=t,this._cancelError=r,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,n)=>{this._weightedQueues[t-1]||(this._weightedQueues[t-1]=[]),this._weightedQueues[t-1].push({resolve:r,reject:n}),this._dispatch()})}runExclusive(t,r=1){return KO(this,void 0,void 0,function*(){const[n,u]=yield this.acquire(r);try{return yield t(n)}finally{u()}})}waitForUnlock(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),this._weightedWaiters[t-1].push(r),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatch()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatch()}cancel(){this._weightedQueues.forEach(t=>t.forEach(r=>r.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var t;for(let r=this._value;r>0;r--){const n=(t=this._weightedQueues[r-1])===null||t===void 0?void 0:t.shift();if(!n)continue;const u=this._value,s=r;this._value-=r,r=this._value+1,n.resolve([u,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(t){let r=!1;return()=>{r||(r=!0,this.release(t))}}_drainUnlockWaiters(){for(let t=this._value;t>0;t--)this._weightedWaiters[t-1]&&(this._weightedWaiters[t-1].forEach(r=>r()),this._weightedWaiters[t-1]=[])}}var YO=function(e,t,r,n){function u(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(p){o(p)}}function i(l){try{c(n.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):u(l.value).then(a,i)}c((n=n.apply(e,t||[])).next())})};class ZO{constructor(t){this._semaphore=new XO(1,t)}acquire(){return YO(this,void 0,void 0,function*(){const[,t]=yield this._semaphore.acquire();return t})}runExclusive(t){return this._semaphore.runExclusive(()=>t())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var k2={},QO={get exports(){return k2},set exports(e){k2=e}},R5={};R5.calculate=function(e){if(e==null)return null;for(var t=ek(e),r=-1,n=t.length,u=0,s=n,o;u>>8^tk[o];return(r^-1)>>>0};function ek(e){for(var t=[],r=0,n=e.length,u;r>6|192,u&63|128):t.push(u>>12|224,u>>6&63|128,u&63|128);return t}var tk=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];(function(e){e.exports=R5})(QO);const j5=S8(k2);var Ql={},rk={get exports(){return Ql},set exports(e){Ql=e}};/** + ${r}`)}function DO(e,t){return t?(fO(e,t),{...e,locations:[...t.locations,...e.locations.filter(r=>!pO(r,t.locations))]}):e}function hO(e,t,r){return e.concat(t.filter(n=>r(n,e)))}function mO(e,t,r){if(r!=null&&r.consistentEnumMerge){const s=[];e&&s.push(...e),e=t,t=s}const n=new Map;if(e)for(const s of e)n.set(s.name.value,s);if(t)for(const s of t){const o=s.name.value;if(n.has(o)){const a=n.get(o);a.description=s.description||a.description,a.directives=$u(s.directives,a.directives)}else n.set(o,s)}const u=[...n.values()];return r&&r.sort&&u.sort(jp),u}function EO(e,t,r){return t?{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="EnumTypeDefinition"||t.kind==="EnumTypeDefinition"?"EnumTypeDefinition":"EnumTypeExtension",loc:e.loc,directives:$u(e.directives,t.directives,r),values:mO(e.values,t.values,r)}:r!=null&&r.convertExtensions?{...e,kind:j.ENUM_TYPE_DEFINITION}:e}function yO(e){return typeof e=="string"}function vO(e){return e instanceof Xh}function Ky(e){let t=e;for(;t.kind===j.LIST_TYPE||t.kind==="NonNullType";)t=t.type;return t}function Xy(e){return e.kind!==j.NAMED_TYPE}function L2(e){return e.kind===j.LIST_TYPE}function Ms(e){return e.kind===j.NON_NULL_TYPE}function sp(e){return L2(e)?`[${sp(e.type)}]`:Ms(e)?`${sp(e.type)}!`:e.name.value}var zu;(function(e){e[e.A_SMALLER_THAN_B=-1]="A_SMALLER_THAN_B",e[e.A_EQUALS_B=0]="A_EQUALS_B",e[e.A_GREATER_THAN_B=1]="A_GREATER_THAN_B"})(zu||(zu={}));function gO(e,t){return e==null&&t==null?zu.A_EQUALS_B:e==null?zu.A_SMALLER_THAN_B:t==null?zu.A_GREATER_THAN_B:et?zu.A_GREATER_THAN_B:zu.A_EQUALS_B}function AO(e,t,r){const n=e.find(u=>u.name.value===t.name.value);if(n&&!(r!=null&&r.ignoreFieldConflicts)){const u=Ky(n.type),s=Ky(t.type);if(u.name.value!==s.name.value)throw new Error(`Field "${t.name.value}" already defined with a different type. Declared as "${u.name.value}", but you tried to override with "${s.name.value}"`)}return!!n}function Em(e,t,r,n){const u=[];if(r!=null&&u.push(...r),t!=null)for(const s of t)if(AO(u,s,n)){const o=u.find(a=>a.name.value===s.name.value);n!=null&&n.ignoreFieldConflicts||(n!=null&&n.throwOnConflict?Yy(e,o,s,!1):Yy(e,o,s,!0),Ms(s.type)&&!Ms(o.type)&&(o.type=s.type)),o.arguments=iO(s.arguments||[],o.arguments||[],n),o.directives=$u(s.directives,o.directives,n),o.description=s.description||o.description}else u.push(s);if(n&&n.sort&&u.sort(jp),n&&n.exclusions){const s=n.exclusions;return u.filter(o=>!s.includes(`${e.name.value}.${o.name.value}`))}return u}function Yy(e,t,r,n=!1){const u=sp(t.type),s=sp(r.type);if(u!==s&&!ai(t.type,r.type,n))throw new Error(`Field '${e.name.value}.${t.name.value}' changed type from '${u}' to '${s}'`)}function ai(e,t,r=!1){if(!Xy(e)&&!Xy(t))return e.toString()===t.toString();if(Ms(t)){const n=Ms(e)?e.type:e;return ai(n,t.type)}return Ms(e)?ai(t,e,r):L2(e)?L2(t)&&ai(e.type,t.type)||Ms(t)&&ai(e,t.type):!1}function FO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="InputObjectTypeDefinition"||t.kind==="InputObjectTypeDefinition"?"InputObjectTypeDefinition":"InputObjectTypeExtension",loc:e.loc,fields:Em(e,e.fields,t.fields,r),directives:$u(e.directives,t.directives,r)}}catch(n){throw new Error(`Unable to merge GraphQL input type "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:j.INPUT_OBJECT_TYPE_DEFINITION}:e}function CO(e,t){return!!e.find(r=>r.name.value===t.name.value)}function ym(e=[],t=[],r={}){const n=[...t,...e.filter(u=>!CO(t,u))];return r&&r.sort&&n.sort(jp),n}function bO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="InterfaceTypeDefinition"||t.kind==="InterfaceTypeDefinition"?"InterfaceTypeDefinition":"InterfaceTypeExtension",loc:e.loc,fields:Em(e,e.fields,t.fields,r),directives:$u(e.directives,t.directives,r),interfaces:e.interfaces?ym(e.interfaces,t.interfaces,r):void 0}}catch(n){throw new Error(`Unable to merge GraphQL interface "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:j.INTERFACE_TYPE_DEFINITION}:e}function SO(e,t,r){if(t)try{return{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="ObjectTypeDefinition"||t.kind==="ObjectTypeDefinition"?"ObjectTypeDefinition":"ObjectTypeExtension",loc:e.loc,fields:Em(e,e.fields,t.fields,r),directives:$u(e.directives,t.directives,r),interfaces:ym(e.interfaces,t.interfaces,r)}}catch(n){throw new Error(`Unable to merge GraphQL type "${e.name.value}": ${n.message}`)}return r!=null&&r.convertExtensions?{...e,kind:j.OBJECT_TYPE_DEFINITION}:e}function wO(e,t,r){return t?{name:e.name,description:e.description||t.description,kind:r!=null&&r.convertExtensions||e.kind==="ScalarTypeDefinition"||t.kind==="ScalarTypeDefinition"?"ScalarTypeDefinition":"ScalarTypeExtension",loc:e.loc,directives:$u(e.directives,t.directives,r)}:r!=null&&r.convertExtensions?{...e,kind:j.SCALAR_TYPE_DEFINITION}:e}function _O(e,t,r){return t?{name:e.name,description:e.description||t.description,directives:$u(e.directives,t.directives,r),kind:r!=null&&r.convertExtensions||e.kind==="UnionTypeDefinition"||t.kind==="UnionTypeDefinition"?j.UNION_TYPE_DEFINITION:j.UNION_TYPE_EXTENSION,loc:e.loc,types:ym(e.types,t.types,r)}:r!=null&&r.convertExtensions?{...e,kind:j.UNION_TYPE_DEFINITION}:e}const U2={query:"Query",mutation:"Mutation",subscription:"Subscription"};function BO(e=[],t=[]){const r=[];for(const n in U2){const u=e.find(s=>s.operation===n)||t.find(s=>s.operation===n);u&&r.push(u)}return r}function TO(e,t,r){return t?{kind:e.kind===j.SCHEMA_DEFINITION||t.kind===j.SCHEMA_DEFINITION?j.SCHEMA_DEFINITION:j.SCHEMA_EXTENSION,description:e.description||t.description,directives:$u(e.directives,t.directives,r),operationTypes:BO(e.operationTypes,t.operationTypes)}:r!=null&&r.convertExtensions?{...e,kind:j.SCHEMA_DEFINITION}:e}const zo="SCHEMA_DEF_SYMBOL";function $O(e){return"name"in e}function PO(e,t){var r,n,u;const s={};for(const o of e)if($O(o)){const a=(r=o.name)===null||r===void 0?void 0:r.value;if(t!=null&&t.commentDescriptions&&$k(o),a==null)continue;if(!((n=t==null?void 0:t.exclusions)===null||n===void 0)&&n.includes(a+".*")||!((u=t==null?void 0:t.exclusions)===null||u===void 0)&&u.includes(a))delete s[a];else switch(o.kind){case j.OBJECT_TYPE_DEFINITION:case j.OBJECT_TYPE_EXTENSION:s[a]=SO(o,s[a],t);break;case j.ENUM_TYPE_DEFINITION:case j.ENUM_TYPE_EXTENSION:s[a]=EO(o,s[a],t);break;case j.UNION_TYPE_DEFINITION:case j.UNION_TYPE_EXTENSION:s[a]=_O(o,s[a],t);break;case j.SCALAR_TYPE_DEFINITION:case j.SCALAR_TYPE_EXTENSION:s[a]=wO(o,s[a],t);break;case j.INPUT_OBJECT_TYPE_DEFINITION:case j.INPUT_OBJECT_TYPE_EXTENSION:s[a]=FO(o,s[a],t);break;case j.INTERFACE_TYPE_DEFINITION:case j.INTERFACE_TYPE_EXTENSION:s[a]=bO(o,s[a],t);break;case j.DIRECTIVE_DEFINITION:s[a]=DO(o,s[a]);break}}else(o.kind===j.SCHEMA_DEFINITION||o.kind===j.SCHEMA_EXTENSION)&&(s[zo]=TO(o,s[zo],t));return s}function Zy(e,t){R2();const r={kind:j.DOCUMENT,definitions:kO(e,{useSchemaDefinition:!0,forceSchemaDefinition:!1,throwOnConflict:!1,commentDescriptions:!1,...t})};let n;return t!=null&&t.commentDescriptions?n=Nk(r):n=r,R2(),n}function Vo(e,t,r=[],n=new Set){if(e&&!n.has(e))if(n.add(e),typeof e=="function")Vo(e(),t,r,n);else if(Array.isArray(e))for(const u of e)Vo(u,t,r,n);else if(im(e)){const u=Ek(e,t);Vo(u.definitions,t,r,n)}else if(yO(e)||vO(e)){const u=Yh(e,t);Vo(u.definitions,t,r,n)}else if(typeof e=="object"&&k$(e))r.push(e);else if(tO(e))Vo(e.definitions,t,r,n);else throw new Error(`typeDefs must contain only strings, documents, schemas, or functions, got ${typeof e}`);return r}function kO(e,t){var r,n,u;R2();const s=Vo(e,t),o=PO(s,t);if(t!=null&&t.useSchemaDefinition){const i=o[zo]||{kind:j.SCHEMA_DEFINITION,operationTypes:[]},c=i.operationTypes;for(const l in U2)if(!c.find(d=>d.operation===l)){const d=U2[l],f=o[d];f!=null&&f.name!=null&&c.push({kind:j.OPERATION_TYPE_DEFINITION,type:{kind:j.NAMED_TYPE,name:f.name},operation:l})}((r=i==null?void 0:i.operationTypes)===null||r===void 0?void 0:r.length)!=null&&i.operationTypes.length>0&&(o[zo]=i)}t!=null&&t.forceSchemaDefinition&&!(!((u=(n=o[zo])===null||n===void 0?void 0:n.operationTypes)===null||u===void 0)&&u.length)&&(o[zo]={kind:j.SCHEMA_DEFINITION,operationTypes:[{kind:j.OPERATION_TYPE_DEFINITION,operation:"query",type:{kind:j.NAMED_TYPE,name:{kind:j.NAME,value:"Query"}}}]});const a=Object.values(o);if(t!=null&&t.sort){const i=typeof t.sort=="function"?t.sort:gO;a.sort((c,l)=>{var p,d;return i((p=c.name)===null||p===void 0?void 0:p.value,(d=l.name)===null||d===void 0?void 0:d.value)})}return a}function OO(e){return Gp(e)}function Eo(e,t){e&&(e.extensions=Gp([e.extensions||{},t||{}]))}function IO(e,t){Eo(e,t.schemaExtensions);for(const[r,n]of Object.entries(t.types||{})){const u=e.getType(r);if(u){if(Eo(u,n.extensions),n.type==="object"||n.type==="interface")for(const[s,o]of Object.entries(n.fields)){const a=u.getFields()[s];if(a){Eo(a,o.extensions);for(const[i,c]of Object.entries(o.arguments))Eo(a.args.find(l=>l.name===i),c)}}else if(n.type==="input")for(const[s,o]of Object.entries(n.fields)){const a=u.getFields()[s];Eo(a,o.extensions)}else if(n.type==="enum")for(const[s,o]of Object.entries(n.values)){const a=u.getValue(s);Eo(a,o)}}}return e}function NO({typeDefs:e,resolvers:t={},resolverValidationOptions:r={},inheritResolversFromInterfaces:n=!1,updateResolversInPlace:u=!1,schemaExtensions:s,...o}){if(typeof r!="object")throw new Error("Expected `resolverValidationOptions` to be an object");if(!e)throw new Error("Must provide typeDefs");let a;if(im(e))a=e;else if(o!=null&&o.commentDescriptions){const i=Zy(e,{...o,commentDescriptions:!0});a=ok(i,o)}else{const i=Zy(e,o);a=Y5(i,o)}return a=sO({schema:a,resolvers:c6(t),resolverValidationOptions:r,inheritResolversFromInterfaces:n,updateResolversInPlace:u}),Object.keys(r).length>0&&rO(a,r),s&&(s=OO(Z5(s)),IO(a,s)),a}const qO=new Error("request for lock canceled");var xO=function(e,t,r,n){function u(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(p){o(p)}}function i(l){try{c(n.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):u(l.value).then(a,i)}c((n=n.apply(e,[])).next())})};class RO{constructor(t,r=qO){this._value=t,this._cancelError=r,this._weightedQueues=[],this._weightedWaiters=[]}acquire(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise((r,n)=>{this._weightedQueues[t-1]||(this._weightedQueues[t-1]=[]),this._weightedQueues[t-1].push({resolve:r,reject:n}),this._dispatch()})}runExclusive(t,r=1){return xO(this,void 0,void 0,function*(){const[n,u]=yield this.acquire(r);try{return yield t(n)}finally{u()}})}waitForUnlock(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);return new Promise(r=>{this._weightedWaiters[t-1]||(this._weightedWaiters[t-1]=[]),this._weightedWaiters[t-1].push(r),this._dispatch()})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(t){this._value=t,this._dispatch()}release(t=1){if(t<=0)throw new Error(`invalid weight ${t}: must be positive`);this._value+=t,this._dispatch()}cancel(){this._weightedQueues.forEach(t=>t.forEach(r=>r.reject(this._cancelError))),this._weightedQueues=[]}_dispatch(){var t;for(let r=this._value;r>0;r--){const n=(t=this._weightedQueues[r-1])===null||t===void 0?void 0:t.shift();if(!n)continue;const u=this._value,s=r;this._value-=r,r=this._value+1,n.resolve([u,this._newReleaser(s)])}this._drainUnlockWaiters()}_newReleaser(t){let r=!1;return()=>{r||(r=!0,this.release(t))}}_drainUnlockWaiters(){for(let t=this._value;t>0;t--)this._weightedWaiters[t-1]&&(this._weightedWaiters[t-1].forEach(r=>r()),this._weightedWaiters[t-1]=[])}}var jO=function(e,t,r,n){function u(s){return s instanceof r?s:new r(function(o){o(s)})}return new(r||(r=Promise))(function(s,o){function a(l){try{c(n.next(l))}catch(p){o(p)}}function i(l){try{c(n.throw(l))}catch(p){o(p)}}function c(l){l.done?s(l.value):u(l.value).then(a,i)}c((n=n.apply(e,[])).next())})};class MO{constructor(t){this._semaphore=new RO(1,t)}acquire(){return jO(this,void 0,void 0,function*(){const[,t]=yield this._semaphore.acquire();return t})}runExclusive(t){return this._semaphore.runExclusive(()=>t())}isLocked(){return this._semaphore.isLocked()}waitForUnlock(){return this._semaphore.waitForUnlock()}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var G2={},LO={get exports(){return G2},set exports(e){G2=e}},p6={};p6.calculate=function(e){if(e==null)return null;for(var t=UO(e),r=-1,n=t.length,u=0,s=n,o;u>>8^GO[o];return(r^-1)>>>0};function UO(e){for(var t=[],r=0,n=e.length,u;r>6|192,u&63|128):t.push(u>>12|224,u>>6&63|128,u&63|128);return t}var GO=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117];(function(e){e.exports=p6})(LO);const d6=Z8(G2);var op={},VO={get exports(){return op},set exports(e){op=e}};/** * @license BitSet.js v5.1.1 2/1/2020 * http://www.xarg.org/2014/03/javascript-bit-array/ * * Copyright (c) 2020, Robert Eisele (robert@xarg.org) * Dual licensed under the MIT or GPL Version 2 licenses. - **/(function(e,t){(function(r){var n=32,u=5;function s(p){return p-=p>>>1&1431655765,p=(p&858993459)+(p>>>2&858993459),(p+(p>>>4)&252645135)*16843009>>>24}function o(p,f){for(var d=0,h=0;h0?E:0,A),d);if(isNaN(m))throw SyntaxError("Invalid param");if(p.data.push(m|0),E<=0)break;E-=h,A-=h}while(!0);break;default:p.data=[0];var y=p.data;if(f instanceof Array){for(var F=f.length-1;F>=0;F--){var B=f[F];B===1/0?p._=-1:(c(p,B),y[B>>>u]|=1<>>u]|=($>>I&1)<>>u,h=p.data,E=p._,A=h.length;d>=A;d--)h.push(E)}var l={data:[],_:0};i.prototype={data:[],_:0,set:function(p,f){return p|=0,c(this,p),f===void 0||f?this.data[p>>>u]|=1<>>u]&=~(1<>>u;return d>=f.length?this._&1:f[d]>>>p&1},not:function(){for(var p=this.clone(),f=p.data,d=0;dm;y--)d[y]=h[y];for(;y>=0;y--)d[y]|=h[y];return f._|=l._,f},xor:function(p){a(l,p);var f=this.clone(),d=f.data,h=l.data,E=f._,A=l._,m=0,y=d.length-1,F=h.length-1;for(m=y;m>F;m--)d[m]^=A;for(m=F;m>y;m--)d[m]=E^h[m];for(;m>=0;m--)d[m]^=h[m];return f._^=A,f},andNot:function(p){return this.and(new i(p).flip())},flip:function(p,f){if(p===void 0){for(var d=this.data,h=0;h>>u]^=1<>>u]^=1<=0;h--)d[h]=0;this._=0}else if(f===void 0)p|=0,c(this,p),d[p>>>u]&=~(1<>>u]&=~(1<=0;d--)for(var h=f[d];h!==0;){var E=31-Math.clz32(h);h^=1<=0;E--){var A=f[E];A<0&&(A+=4294967296);var m=A.toString(p);d!==""&&(d+="0".repeat(h-m.length-1)),d+=m}return this._===0?(d=d.replace(/^0+/,""),d===""&&(d="0"),d):(d="1111"+d,d.replace(/^1+/,"...1111"))}else{if(2>p||p>36)throw SyntaxError("Invalid base");for(var d=[],y=[],E=f.length;E--;)for(var F=n;F--;)y.push(f[E]>>>F&1);do d.unshift(o(y,p).toString(p));while(!y.every(function(P){return P===0}));return d.join("")}},isEmpty:function(){if(this._!==0)return!1;for(var p=this.data,f=p.length-1;f>=0;f--)if(p[f]!==0)return!1;return!0},cardinality:function(){if(this._!==0)return 1/0;for(var p=0,f=this.data,d=0;d0;){var d=Math.clz32(p[f]);if(d!==n)return f*n+n-1-d}return 1/0}:function(){if(this._!==0)return 1/0;for(var p=this.data,f=p.length;f-- >0;){var d=p[f],h=0;if(d){for(;(d>>>=1)>0;h++);return f*n+h}}return 1/0},ntz:function(){for(var p=this.data,f=0;f>>1,f*n+s(d)}return 1/0},lsb:function(){for(var p=this.data,f=0;f>>=1;h++);return n*f+h}}return this._&1},equals:function(p){a(l,p);var f=this.data,d=l.data,h=this._,E=l._,A=f.length-1,m=d.length-1;if(E!==h)return!1;for(var y=Am;F--)if(f[F]!==E)return!1;for(F=m;F>A;F--)if(d[F]!==h)return!1;return!0},[Symbol.iterator]:function(){var p=this.data,f=0;if(this._===0){for(var d=0,h=p.length-1;h>=0;h--)if(p[h]!==0){d=h;break}return{next:function(){var E=f>>>u;return{done:E>d||E===d&&p[E]>>>f===0,value:E>d?0:p[E]>>>f++&1}}}}else return{next:function(){var E=f>>>u;return{done:!1,value:E>>f++&1:1}}}}},i.fromBinaryString=function(p){return new i("0b"+p)},i.fromHexString=function(p){return new i("0x"+p)},i.Random=function(p){(p===void 0||p<0)&&(p=n);for(var f=p%n,d=[],h=Math.ceil(p/n),E=Object.create(i.prototype),A=0;A0&&(d[h-1]&=(1<>6|192,t[r++]=u&63|128):(u&64512)==55296&&n+1>18|240,t[r++]=u>>12&63|128,t[r++]=u>>6&63|128,t[r++]=u&63|128):(t[r++]=u>>12|224,t[r++]=u>>6&63|128,t[r++]=u&63|128)}return t},Ak=function(e){for(var t=[],r=0,n=0;r191&&u<224){var s=e[r++];t[n++]=String.fromCharCode((u&31)<<6|s&63)}else if(u>239&&u<365){var s=e[r++],o=e[r++],a=e[r++],i=((u&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;t[n++]=String.fromCharCode(55296+(i>>10)),t[n++]=String.fromCharCode(56320+(i&1023))}else{var s=e[r++],o=e[r++];t[n++]=String.fromCharCode((u&15)<<12|(s&63)<<6|o&63)}}return t.join("")};var Iv={utf8ByteArrayToString:Ak,stringToUtf8ByteArray:gk},fa={};fa.byteLength=bk;fa.toByteArray=wk;fa.fromByteArray=Tk;var Qn=[],ln=[],Fk=typeof Uint8Array<"u"?Uint8Array:Array,Xf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var Ao=0,Ck=Xf.length;Ao0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function bk(e){var t=L5(e),r=t[0],n=t[1];return(r+n)*3/4-n}function Sk(e,t,r){return(t+r)*3/4-r}function wk(e){var t,r=L5(e),n=r[0],u=r[1],s=new Fk(Sk(e,n,u)),o=0,a=u>0?n-4:n,i;for(i=0;i>16&255,s[o++]=t>>8&255,s[o++]=t&255;return u===2&&(t=ln[e.charCodeAt(i)]<<2|ln[e.charCodeAt(i+1)]>>4,s[o++]=t&255),u===1&&(t=ln[e.charCodeAt(i)]<<10|ln[e.charCodeAt(i+1)]<<4|ln[e.charCodeAt(i+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function _k(e){return Qn[e>>18&63]+Qn[e>>12&63]+Qn[e>>6&63]+Qn[e&63]}function Bk(e,t,r){for(var n,u=[],s=t;sa?a:o+s));return n===1?(t=e[r-1],u.push(Qn[t>>2]+Qn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],u.push(Qn[t>>10]+Qn[t>>4&63]+Qn[t<<2&63]+"=")),u.join("")}const Or=(e,t,r)=>{if(typeof e!="number")throw new Error(`Argument ${r} of ${t} should be a number, not '${e}' (${typeof e})`)};let Oi=class{constructor(t,r){t=t||64,r=r||0,this.growMax=1024*16,this.length=r,this.byteArray=new Uint8Array(t)}byte(t){if(Or(t,"byte","n"),t>this.length-1)throw Error(`Attempt to read byte ${t} of ByteArray of length ${this.length}`);return this.byteArray[t]}bytes(t,r){if(Or(t,"bytes","n"),Or(r,"bytes","l"),t+r>this.length)throw Error(`Attempt to read ${r} bytes from start ${t} of ByteArray of length ${this.length}`);return this.byteArray.subarray(t,t+r)}setByte(t,r){if(Or(t,"setByte","n"),Or(r,"setByte","v"),t>this.length-1)throw Error(`Attempt to set byte ${t} of ByteArray of length ${this.length}`);if(typeof r!="number"||r<0||r>255)throw Error(`Expected value 0-255 when setting ByteArray, found ${r}`);this.byteArray[t]=r}setBytes(t,r){if(Or(t,"setBytes","n"),t+r.length>this.length)throw Error(`Attempt to set ${r.length} bytes from start ${t} of ByteArray of length ${this.length}`);this.byteArray.set(r,t)}pushByte(t){if(typeof t!="number"||t<0||t>255)throw Error(`Expected value 0-255 when pushing to ByteArray, found ${t}`);this.length===this.byteArray.length&&this.grow(),this.byteArray[this.length]=t,this.length++}grow(t){const r=new Uint8Array(Math.max(t||0,this.byteArray.length+Math.min(this.growMax,Math.max(16,this.byteArray.length))));r.set(this.byteArray),this.byteArray=r}trim(){const t=new Uint8Array(this.length);t.set(this.byteArray.subarray(0,this.length)),this.byteArray=t}pushBytes(t){for(const r of t)this.pushByte(r)}pushNByte(t){if(Or(t,"pushNByte","v"),typeof t!="number"||t<0)throw Error(`Expected positive number in pushNByte, found ${t}`);if(t<128)this.pushByte(t+128);else{const r=t%128;this.pushByte(r),this.pushNByte(t>>7)}}pushNBytes(t){for(const r of t)try{this.pushNByte(r)}catch{throw Error(`Error from pushNByte, called as pushNBytes(${JSON.stringify(t)})`)}}nByte(t){if(Or(t,"nByte","n"),t>this.length-1)throw Error(`Attempt to read nByte ${t} of ByteArray of length ${this.length}`);const r=this.byteArray[t];return r>127?r-128:r+128*this.nByte(t+1)}nBytes(t,r){Or(t,"nBytes","n"),Or(r,"nBytes","nValues");const n=[];for(;r>0;){let u=!1,s=0,o=1;do{if(t>this.length-1)throw Error(`Attempt to read nByte ${t} of ByteArray of length ${this.length} in nBytes(${t}, ${r})`);const a=this.byteArray[t];a>127?(s+=(a-128)*o,n.push(s),s=0,u=!0):(s+=a*o,o*=128),t++}while(!u);r--}return n}nByteLength(t){if(Or(t,"nByteLength","v"),t>=128**4)throw new Error("> 4 bytes found in nByteLength");let r=1;for(;t>127;)t=t>>7,r+=1;return r}pushCountedString(t){const r=Iv.stringToUtf8ByteArray(t);this.pushByte(r.length),this.pushBytes(r)}countedString(t){Or(t,"countedString","n");const r=this.byte(t);return Iv.utf8ByteArrayToString(this.bytes(t+1,r))}clear(){this.byteArray.fill(0),this.length=0}base64(){return fa.fromByteArray(this.byteArray)}fromBase64(t){this.byteArray=fa.toByteArray(t),this.length=this.byteArray.length}deleteItem(t){Or(t,"deleteItem","n");const r=this.byte(t)&63;if(this.length-=r,this.length>t){const n=this.byteArray.slice(t+r);this.byteArray.set(n,t)}}insert(t,r){Or(t,"insert","n");const n=r.length,u=this.length+n;if(u>=this.byteArray.length+n&&this.grow(u),t{let r=0,n=0;for(;r{let r=0,n=0;const u=[];for(;r>>1&1431655765,p=(p&858993459)+(p>>>2&858993459),(p+(p>>>4)&252645135)*16843009>>>24}function o(p,d){for(var f=0,h=0;h0?y:0,A),f);if(isNaN(m))throw SyntaxError("Invalid param");if(p.data.push(m|0),y<=0)break;y-=h,A-=h}while(!0);break;default:p.data=[0];var v=p.data;if(d instanceof Array){for(var C=d.length-1;C>=0;C--){var B=d[C];B===1/0?p._=-1:(c(p,B),v[B>>>u]|=1<>>u]|=(N>>R&1)<>>u,h=p.data,y=p._,A=h.length;f>=A;f--)h.push(y)}var l={data:[],_:0};i.prototype={data:[],_:0,set:function(p,d){return p|=0,c(this,p),d===void 0||d?this.data[p>>>u]|=1<>>u]&=~(1<>>u;return f>=d.length?this._&1:d[f]>>>p&1},not:function(){for(var p=this.clone(),d=p.data,f=0;fm;v--)f[v]=h[v];for(;v>=0;v--)f[v]|=h[v];return d._|=l._,d},xor:function(p){a(l,p);var d=this.clone(),f=d.data,h=l.data,y=d._,A=l._,m=0,v=f.length-1,C=h.length-1;for(m=v;m>C;m--)f[m]^=A;for(m=C;m>v;m--)f[m]=y^h[m];for(;m>=0;m--)f[m]^=h[m];return d._^=A,d},andNot:function(p){return this.and(new i(p).flip())},flip:function(p,d){if(p===void 0){for(var f=this.data,h=0;h>>u]^=1<>>u]^=1<=0;h--)f[h]=0;this._=0}else if(d===void 0)p|=0,c(this,p),f[p>>>u]&=~(1<>>u]&=~(1<=0;f--)for(var h=d[f];h!==0;){var y=31-Math.clz32(h);h^=1<=0;y--){var A=d[y];A<0&&(A+=4294967296);var m=A.toString(p);f!==""&&(f+="0".repeat(h-m.length-1)),f+=m}return this._===0?(f=f.replace(/^0+/,""),f===""&&(f="0"),f):(f="1111"+f,f.replace(/^1+/,"...1111"))}else{if(2>p||p>36)throw SyntaxError("Invalid base");for(var f=[],v=[],y=d.length;y--;)for(var C=n;C--;)v.push(d[y]>>>C&1);do f.unshift(o(v,p).toString(p));while(!v.every(function(T){return T===0}));return f.join("")}},isEmpty:function(){if(this._!==0)return!1;for(var p=this.data,d=p.length-1;d>=0;d--)if(p[d]!==0)return!1;return!0},cardinality:function(){if(this._!==0)return 1/0;for(var p=0,d=this.data,f=0;f0;){var f=Math.clz32(p[d]);if(f!==n)return d*n+n-1-f}return 1/0}:function(){if(this._!==0)return 1/0;for(var p=this.data,d=p.length;d-- >0;){var f=p[d],h=0;if(f){for(;(f>>>=1)>0;h++);return d*n+h}}return 1/0},ntz:function(){for(var p=this.data,d=0;d>>1,d*n+s(f)}return 1/0},lsb:function(){for(var p=this.data,d=0;d>>=1;h++);return n*d+h}}return this._&1},equals:function(p){a(l,p);var d=this.data,f=l.data,h=this._,y=l._,A=d.length-1,m=f.length-1;if(y!==h)return!1;for(var v=Am;C--)if(d[C]!==y)return!1;for(C=m;C>A;C--)if(f[C]!==h)return!1;return!0},[Symbol.iterator]:function(){var p=this.data,d=0;if(this._===0){for(var f=0,h=p.length-1;h>=0;h--)if(p[h]!==0){f=h;break}return{next:function(){var y=d>>>u;return{done:y>f||y===f&&p[y]>>>d===0,value:y>f?0:p[y]>>>d++&1}}}}else return{next:function(){var y=d>>>u;return{done:!1,value:y>>d++&1:1}}}}},i.fromBinaryString=function(p){return new i("0b"+p)},i.fromHexString=function(p){return new i("0x"+p)},i.Random=function(p){(p===void 0||p<0)&&(p=n);for(var d=p%n,f=[],h=Math.ceil(p/n),y=Object.create(i.prototype),A=0;A0&&(f[h-1]&=(1<>6|192,t[r++]=u&63|128):(u&64512)==55296&&n+1>18|240,t[r++]=u>>12&63|128,t[r++]=u>>6&63|128,t[r++]=u&63|128):(t[r++]=u>>12|224,t[r++]=u>>6&63|128,t[r++]=u&63|128)}return t},cI=function(e){for(var t=[],r=0,n=0;r191&&u<224){var s=e[r++];t[n++]=String.fromCharCode((u&31)<<6|s&63)}else if(u>239&&u<365){var s=e[r++],o=e[r++],a=e[r++],i=((u&7)<<18|(s&63)<<12|(o&63)<<6|a&63)-65536;t[n++]=String.fromCharCode(55296+(i>>10)),t[n++]=String.fromCharCode(56320+(i&1023))}else{var s=e[r++],o=e[r++];t[n++]=String.fromCharCode((u&15)<<12|(s&63)<<6|o&63)}}return t.join("")};var Qy={utf8ByteArrayToString:cI,stringToUtf8ByteArray:iI},la={};la.byteLength=dI;la.toByteArray=DI;la.fromByteArray=EI;var Hn=[],rn=[],lI=typeof Uint8Array<"u"?Uint8Array:Array,sf="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(var yo=0,pI=sf.length;yo0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function dI(e){var t=D6(e),r=t[0],n=t[1];return(r+n)*3/4-n}function fI(e,t,r){return(t+r)*3/4-r}function DI(e){var t,r=D6(e),n=r[0],u=r[1],s=new lI(fI(e,n,u)),o=0,a=u>0?n-4:n,i;for(i=0;i>16&255,s[o++]=t>>8&255,s[o++]=t&255;return u===2&&(t=rn[e.charCodeAt(i)]<<2|rn[e.charCodeAt(i+1)]>>4,s[o++]=t&255),u===1&&(t=rn[e.charCodeAt(i)]<<10|rn[e.charCodeAt(i+1)]<<4|rn[e.charCodeAt(i+2)]>>2,s[o++]=t>>8&255,s[o++]=t&255),s}function hI(e){return Hn[e>>18&63]+Hn[e>>12&63]+Hn[e>>6&63]+Hn[e&63]}function mI(e,t,r){for(var n,u=[],s=t;sa?a:o+s));return n===1?(t=e[r-1],u.push(Hn[t>>2]+Hn[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],u.push(Hn[t>>10]+Hn[t>>4&63]+Hn[t<<2&63]+"=")),u.join("")}const Sr=(e,t,r)=>{if(typeof e!="number")throw new Error(`Argument ${r} of ${t} should be a number, not '${e}' (${typeof e})`)};let Oi=class{constructor(t,r){t=t||64,r=r||0,this.growMax=1024*16,this.length=r,this.byteArray=new Uint8Array(t)}byte(t){if(Sr(t,"byte","n"),t>this.length-1)throw Error(`Attempt to read byte ${t} of ByteArray of length ${this.length}`);return this.byteArray[t]}bytes(t,r){if(Sr(t,"bytes","n"),Sr(r,"bytes","l"),t+r>this.length)throw Error(`Attempt to read ${r} bytes from start ${t} of ByteArray of length ${this.length}`);return this.byteArray.subarray(t,t+r)}setByte(t,r){if(Sr(t,"setByte","n"),Sr(r,"setByte","v"),t>this.length-1)throw Error(`Attempt to set byte ${t} of ByteArray of length ${this.length}`);if(typeof r!="number"||r<0||r>255)throw Error(`Expected value 0-255 when setting ByteArray, found ${r}`);this.byteArray[t]=r}setBytes(t,r){if(Sr(t,"setBytes","n"),t+r.length>this.length)throw Error(`Attempt to set ${r.length} bytes from start ${t} of ByteArray of length ${this.length}`);this.byteArray.set(r,t)}pushByte(t){if(typeof t!="number"||t<0||t>255)throw Error(`Expected value 0-255 when pushing to ByteArray, found ${t}`);this.length===this.byteArray.length&&this.grow(),this.byteArray[this.length]=t,this.length++}grow(t){const r=new Uint8Array(Math.max(t||0,this.byteArray.length+Math.min(this.growMax,Math.max(16,this.byteArray.length))));r.set(this.byteArray),this.byteArray=r}trim(){const t=new Uint8Array(this.length);t.set(this.byteArray.subarray(0,this.length)),this.byteArray=t}pushBytes(t){for(const r of t)this.pushByte(r)}pushNByte(t){if(Sr(t,"pushNByte","v"),typeof t!="number"||t<0)throw Error(`Expected positive number in pushNByte, found ${t}`);if(t<128)this.pushByte(t+128);else{const r=t%128;this.pushByte(r),this.pushNByte(t>>7)}}pushNBytes(t){for(const r of t)try{this.pushNByte(r)}catch{throw Error(`Error from pushNByte, called as pushNBytes(${JSON.stringify(t)})`)}}nByte(t){if(Sr(t,"nByte","n"),t>this.length-1)throw Error(`Attempt to read nByte ${t} of ByteArray of length ${this.length}`);const r=this.byteArray[t];return r>127?r-128:r+128*this.nByte(t+1)}nBytes(t,r){Sr(t,"nBytes","n"),Sr(r,"nBytes","nValues");const n=[];for(;r>0;){let u=!1,s=0,o=1;do{if(t>this.length-1)throw Error(`Attempt to read nByte ${t} of ByteArray of length ${this.length} in nBytes(${t}, ${r})`);const a=this.byteArray[t];a>127?(s+=(a-128)*o,n.push(s),s=0,u=!0):(s+=a*o,o*=128),t++}while(!u);r--}return n}nByteLength(t){if(Sr(t,"nByteLength","v"),t>=128**4)throw new Error("> 4 bytes found in nByteLength");let r=1;for(;t>127;)t=t>>7,r+=1;return r}pushCountedString(t){const r=Qy.stringToUtf8ByteArray(t);this.pushByte(r.length),this.pushBytes(r)}countedString(t){Sr(t,"countedString","n");const r=this.byte(t);return Qy.utf8ByteArrayToString(this.bytes(t+1,r))}clear(){this.byteArray.fill(0),this.length=0}base64(){return la.fromByteArray(this.byteArray)}fromBase64(t){this.byteArray=la.toByteArray(t),this.length=this.byteArray.length}deleteItem(t){Sr(t,"deleteItem","n");const r=this.byte(t)&63;if(this.length-=r,this.length>t){const n=this.byteArray.slice(t+r);this.byteArray.set(n,t)}}insert(t,r){Sr(t,"insert","n");const n=r.length,u=this.length+n;if(u>=this.byteArray.length+n&&this.grow(u),t{let r=0,n=0;for(;r{let r=0,n=0;const u=[];for(;r ** @@ -136,35 +136,35 @@ Received directive: ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/(function(e){(function(t,r,n){e.exports=n(t),e.exports.default=e.exports})(Ys,"UUID",function(){var t=function(v,C,D,g,O,b){for(var w=function(k,G){var H=k.toString(16);return H.length<2&&(H="0"+H),G&&(H=H.toUpperCase()),H},x=C;x<=D;x++)O[b++]=w(v[x],g);return O},r=function(v,C,D,g,O){for(var b=C;b<=D;b+=2)g[O++]=parseInt(v.substr(b,2),16)},n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],s=function(v,C){if(C%4!==0)throw new Error("z85_encode: invalid input length (multiple of 4 expected)");for(var D="",g=0,O=0;g=1;){var w=Math.floor(O/b)%85;D+=n[w],b/=85}O=0}return D},o=function(v,C){var D=v.length;if(D%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof C>"u"&&(C=new Array(D*4/5));for(var g=0,O=0,b=0;g=u.length)break;if(b=b*85+u[w],g%5===0){for(var x=16777216;x>=1;)C[O++]=Math.trunc(b/x%256),x/=256;b=0}}return C},a=function(v,C){var D={ibits:8,obits:8,obigendian:!0};for(var g in C)typeof D[g]<"u"&&(D[g]=C[g]);for(var O=[],b=0,w,x,k=0,G,H=0,re=v.length;k===0&&(x=v.charCodeAt(b++)),w=x>>D.ibits-(k+8)&255,k=(k+8)%D.ibits,D.obigendian?H===0?G=w<=re)););return O},i=function(v,C){var D={ibits:32,ibigendian:!0};for(var g in C)typeof D[g]<"u"&&(D[g]=C[g]);var O="",b=4294967295;D.ibits<32&&(b=(1<>D.ibits-8-G&255):O+=String.fromCharCode(k>>G&255);return O},c=8,l=8,p=256,f=function(v,C,D,g,O,b,w,x){return[x,w,b,O,g,D,C,v]},d=function(){return f(0,0,0,0,0,0,0,0)},h=function(v){return v.slice(0)},E=function(v){for(var C=d(),D=0;D=0;D--)C*=p,C+=v[D];return Math.floor(C)},m=function(v,C){for(var D=0,g=0;g=0;b--)D[b+1]=D[b];for(D[0]=v[0],b=0;bc*l)throw new Error("ui64_ror: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g>>b|D[g+1]<>>b&(1<c*l)throw new Error("ui64_rol: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g0;g--)D[g+O]=(D[g]<>>l-b)&(1<=0;g--)D[g]=0;for(g=0;g>16)+(C>>16)+(D>>16);return g<<16|D&65535},te=function(v,C){return v<>>32-C&4294967295},Y=function(v,C){function D(ke,Ie,ce,Te){return ke<20?Ie&ce|~Ie&Te:ke<40?Ie^ce^Te:ke<60?Ie&ce|Ie&Te|ce&Te:Ie^ce^Te}function g(ke){return ke<20?1518500249:ke<40?1859775393:ke<60?-1894007588:-899497514}v[C>>5]|=128<<24-C%32,v[(C+64>>9<<4)+15]=C;for(var O=Array(80),b=1732584193,w=-271733879,x=-1732584194,k=271733878,G=-1009589776,H=0;H>5]|=128<>>9<<4)+14]=C;for(var x=1732584193,k=-271733879,G=-1732584194,H=271733878,re=0;re>>0:Math.random()*4294967295>>>0),P(this.state,v),this.next()};De.prototype.next=function(){var v=h(this.state);F(this.state,this.mul),m(this.state,this.inc);var C=h(v);I(C,18),j(C,v),I(C,27);var D=h(v);I(D,59),B(C,this.mask);var g=A(D),O=h(C);return U(O,32-g),I(C,g),j(C,O),A(C)};var de=new De,Ce=function(v,C){for(var D=[],g=0;g=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(var v=0;v<16;v++)this[v]=0}};return typeof Uint8Array<"u"?q.prototype=new Uint8Array(16):Buffer?q.prototype=Buffer.alloc(16):q.prototype=new Array(16),q.prototype.constructor=q,q.prototype.make=function(v){var C,D=this;if(v===1){var g=new Date,O=g.getTime();O!==pe?Q=0:Q++,pe=O;var b=E(O);y(b,1e3*10),m(b,f(1,178,29,210,19,129,64,0)),Q>0&&m(b,E(Q));var w;w=$(b,8),D[3]=w&255,w=$(b,8),D[2]=w&255,w=$(b,8),D[1]=w&255,w=$(b,8),D[0]=w&255,w=$(b,8),D[5]=w&255,w=$(b,8),D[4]=w&255,w=$(b,8),D[7]=w&255,w=$(b,8),D[6]=w&15;var x=Ce(2,255);D[8]=x[0],D[9]=x[1];var k=Ce(6,255);for(k[0]|=1,k[0]|=2,C=0;C<6;C++)D[10+C]=k[C]}else if(v===4){var G=Ce(16,255);for(C=0;C<16;C++)this[C]=G[C]}else if(v===3||v===5){var H="",re=typeof arguments[1]=="object"&&arguments[1]instanceof q?arguments[1]:new q().parse(arguments[1]);for(C=0;C<16;C++)H+=String.fromCharCode(re[C]);H+=arguments[2];var _e=v===3?fe(H):oe(H);for(C=0;C<16;C++)D[C]=_e.charCodeAt(C)}else throw new Error("UUID: make: invalid version");return D[6]&=15,D[6]|=v<<4,D[8]&=63,D[8]|=128,D},q.prototype.format=function(v){var C,D;return v==="z85"?C=s(this,16):v==="b16"?(D=Array(32),t(this,0,15,!0,D,0),C=D.join("")):(v===void 0||v==="std")&&(D=new Array(36),t(this,0,3,!1,D,0),D[8]="-",t(this,4,5,!1,D,9),D[13]="-",t(this,6,7,!1,D,14),D[18]="-",t(this,8,9,!1,D,19),D[23]="-",t(this,10,15,!1,D,24),C=D.join("")),C},q.prototype.toString=function(v){return this.format(v)},q.prototype.toJSON=function(){return this.format("std")},q.prototype.parse=function(v,C){if(typeof v!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(C==="z85")o(v,this);else if(C==="b16")r(v,0,35,this,0);else if(C===void 0||C==="std"){var D={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(D[v]!==void 0)v=D[v];else if(!v.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');r(v,0,7,this,0),r(v,9,12,this,4),r(v,14,17,this,6),r(v,19,22,this,8),r(v,24,35,this,10)}return this},q.prototype.export=function(){for(var v=Array(16),C=0;C<16;C++)v[C]=this[C];return v},q.prototype.import=function(v){if(!(typeof v=="object"&&v instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(v.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(var C=0;C<16;C++){if(typeof v[C]!="number")throw new Error("UUID: import: invalid array element #"+C+" (type Number expected)");if(!(isFinite(v[C])&&Math.floor(v[C])===v[C]))throw new Error("UUID: import: invalid array element #"+C+" (Number with integer value expected)");if(!(v[C]>=0&&v[C]<=255))throw new Error("UUID: import: invalid array element #"+C+" (Number with integer value in range 0...255 expected)");this[C]=v[C]}return this},q.prototype.compare=function(v){if(typeof v!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(v instanceof q))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(var C=0;C<16;C++){if(this[C]v[C])return 1}return 0},q.prototype.equal=function(v){return this.compare(v)===0},q.prototype.fold=function(v){if(typeof v>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(v<1||v>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");for(var C=16/Math.pow(2,v),D=new Array(C),g=0;g>(-2*A&6)));return F},p=function(h){h=String(h),/[^\0-\xFF]/.test(h)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var E=h.length%3,A="",m=-1,y,F,B,P,$=h.length-E;++m<$;)y=h.charCodeAt(m)<<16,F=h.charCodeAt(++m)<<8,B=h.charCodeAt(++m),P=y+F+B,A+=i.charAt(P>>18&63)+i.charAt(P>>12&63)+i.charAt(P>>6&63)+i.charAt(P&63);return E==2?(y=h.charCodeAt(m)<<8,F=h.charCodeAt(++m),P=y+F,A+=i.charAt(P>>10)+i.charAt(P>>4&63)+i.charAt(P<<2&63)+"="):E==1&&(P=h.charCodeAt(m),A+=i.charAt(P>>2)+i.charAt(P<<4&63)+"=="),A},f={encode:p,decode:l,version:"1.0.0"};if(n&&!n.nodeType)if(u)u.exports=f;else for(var d in f)f.hasOwnProperty(d)&&(n[d]=f[d]);else r.base64=f})(Ys)})(qk,ep);const xk=ep,Rk=()=>xk.encode(new Nk(4)).substring(0,12),jk={heading:"block",title:"block",endTitle:"block",remark:"block",footnote:"inline",xref:"inline",noteCaller:"inline",esbCat:"inline",table:"block",tree:"block",kv:"block"},Mk={graftLocation:jk},V5={wordLike:0,punctuation:1,lineSpace:2,eol:3,softLineBreak:4,noBreakSpace:5,bareSlash:6,unknown:7},Lk=Object.entries(V5).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),Uk={wordLike:"wordLike",punctuation:"notWordLike",lineSpace:"notWordLike",eol:"notWordLike",softLineBreak:"notWordLike",noBreakSpace:"notWordLike",bareSlash:"notWordLike",unknown:"notWordLike"},tp={tokenEnum:V5,tokenEnumLabels:Lk,tokenCategory:Uk},H5={blockTag:0,inline:1,chapter:2,pubChapter:3,altChapter:4,verses:5,verse:6,pubVerse:7,altVerse:8,esbCat:9,span:10,table:11,cell:12,milestone:13,spanWithAtts:14,attribute:15,hangingGraft:16,orphanTokens:17,tTableRow:18,tTableCol:19,tTreeNode:20,tTreeParent:21,tTreeChild:22,tTreeContent:23,kvPrimary:24,kvSecondary:25,kvField:26},Gk=Object.entries(H5).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),Vk=e=>{const t=ne.exec(e,ne("([^1-9]+)(.*)")),r=t[1],n=t[2].length>0?t[2]:"1";return[r,n]},Hk=e=>{const t={th:{type:"colHeading",align:"left"},thr:{type:"colHeading",align:"right"},tc:{type:"body",align:"left"},tcr:{type:"body",align:"right"}},[r,n]=Vk(e);let u="1";if(n.includes("-")){const[s,o]=n.split("-");u=`${parseInt(o)-parseInt(s)+1}`}return`cell/${t[r].type}/${t[r].align}/${u}`},Wk=(e,t)=>{switch(e){case"blockTag":return`blockTag/${t[0]}`;case"inline":return`inline/${t[0]}`;case"chapter":return`chapter/${t[0]}`;case"verses":return`verses/${t[0]}`;case"verse":return`verse/${t[0]}`;case"span":return`span/${t[0]}`;case"table":return"table";case"cell":return Hk(t[0]);case"milestone":return`milestone/${t[0]}`;case"spanWithAtts":return`spanWithAtts/${t[0]}`;case"attribute":return`attribute/${t[0]}/${t[1]}/${t[2]}/${t[3]}`;case"orphanTokens":return"orphanTokens";case"hangingGraft":return"hangingGraft";case"pubChapter":return`pubChapter/${t[0]}`;case"pubVerse":return`pubVerse/${t[0]}`;case"altChapter":return`altChapter/${t[0]}`;case"altVerse":return`altVerse/${t[0]}`;case"esbCat":return`esbCat/${t[0]}`;case"tTableRow":return`tTableRow/${t[0]}`;case"tTableCol":return`tTableCol/${t[0]}`;case"tTreeNode":return`tTreeNode/${t[0]}`;case"tTreeParent":return`tTreeParent/${t[0]}`;case"tTreeChild":return`tTreeChild/${t[0]}/${t[1]}`;case"tTreeContent":return`tTreeContent/${t[0]}`;case"kvPrimary":return`kvPrimary/${t[0]}`;case"kvSecondary":return`kvSecondary/${t[0]}/${t[1]}`;case"kvField":return`kvField/${t[0]}`;default:throw new Error(`Unknown scope type '${e}' in labelForScope`)}},Jk=e=>{switch(e){case"orphanTokens":case"hangingGraft":case"table":return 1;case"blockTag":case"inline":case"chapter":case"verses":case"verse":case"span":case"milestone":case"spanWithAtts":case"pubChapter":case"altChapter":case"pubVerse":case"altVerse":case"esbCat":case"tTableRow":case"tTableCol":case"tTreeNode":case"tTreeParent":case"tTreeContent":case"kvPrimary":case"kvField":return 2;case"tTreeChild":case"kvSecondary":return 3;case"cell":return 4;case"attribute":return 6;default:throw new Error(`Unknown scope type '${e}' in nComponentsForScope`)}},ki={scopeEnum:H5,scopeEnumLabels:Gk,labelForScope:Wk,nComponentsForScope:Jk},W5={token:0,graft:1,startScope:2,endScope:3},zk=Object.entries(W5).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),J5=e=>({type:e[0],subType:e[1],payload:e[2]}),z5=e=>[e.type,e.subType,e.payload],Kk=e=>e.map(t=>J5(t)),Xk=e=>e.map(t=>z5(t)),Ii={itemEnum:W5,itemEnumLabels:zk,itemArray2Object:J5,itemObject2Array:z5,itemArrays2Objects:Kk,itemObjects2Arrays:Xk},Yk=(e,t)=>{const r=e.byte(t),n=r>>6,u=r&63,s=e.byte(t+1);return[u,n,s]},Zk=(e,t,r,n,u)=>{const s=tp.tokenCategory[tp.tokenEnumLabels[n]],o=t[s][r.nByte(u+2)];return e[s].countedString(o)},Qk=(e,t,r,n,u)=>{const s=ki.scopeEnumLabels[n];let o=ki.nComponentsForScope(s),a=2,i="";for(;o>1;){const c=r.nByte(u+a),l=t.scopeBits[c],p=e.scopeBits.countedString(l);i+=`/${p}`,a+=r.nByteLength(c),o--}return`${s}${i}`},eI=e=>ki.scopeEnumLabels[e],tI=(e,t,r)=>{const n=t.graftTypes[r];return e.graftTypes.countedString(n)},rI=(e,t,r,n)=>{const u=t.ids[r.nByte(n+2)];return e.ids.countedString(u)},nI=e=>{const t={};for(const[r,n]of Object.entries(e))t[r]=K5(r,n);return t},K5=(e,t)=>{const r=new Uint32Array(t.length);let n=0,u=0;for(;n{t||(t=!1);let r=0,n=0;const u=[];for(;r{throw new Error(`Undefined or null argument '${t}' in '${e}'`)},sI=(e,t,r)=>{t==null&&Zs("pushSuccinctTokenBytes","tokenEnumIndex"),r==null&&Zs("pushSuccinctTokenBytes","charsEnumIndex");const n=e.length;e.pushByte(0),e.pushByte(t),e.pushNByte(r),e.setByte(n,e.length-n|Ii.itemEnum.token<<6)},oI=(e,t,r)=>{t==null&&Zs("pushSuccinctGraftBytes","graftTypeEnumIndex"),r==null&&Zs("pushSuccinctGraftBytes","seqEnumIndex");const n=e.length;e.pushByte(0),e.pushByte(t),e.pushNByte(r),e.setByte(n,e.length-n|Ii.itemEnum.graft<<6)},aI=(e,t,r,n)=>{t==null&&Zs("pushSuccinctScopeBytes","itemTypeByte"),r==null&&Zs("pushSuccinctScopeBytes","scopeTypeByte"),n==null&&Zs("pushSuccinctScopeBytes","scopeBitBytes");const u=e.length;e.pushByte(0),e.pushByte(r);for(const s of n)e.pushNByte(s);e.setByte(u,e.length-u|t<<6)},Xu={enumIndex:K5,enumIndexes:nI,headerBytes:Yk,pushSuccinctTokenBytes:sI,pushSuccinctGraftBytes:oI,pushSuccinctScopeBytes:aI,succinctTokenChars:Zk,succinctScopeLabel:Qk,succinctScopeType:eI,succinctGraftName:tI,succinctGraftSeqId:rI,unpackEnum:uI},iI=e=>{const t=new Oi;t.fromBase64(e);const r=[];r.push(`* Char length ${t.length} *`);for(const[n,u]of Xu.unpackEnum(t,!0))r.push(`${n} "${u}"`);return r.join(` -`)},cI=(e,t)=>{const r=new Oi;r.fromBase64(e);const n={};for(const[a,i]of Object.entries(t))n[a]=new Oi,n[a].fromBase64(i);const u=Xu.enumIndexes(n),s=[];s.push(`* Char length ${r.length} *`);let o=0;for(;o{for(const t of e)xp(t)},xp=e=>{if(!ne.exec(e,/^[a-z][A-za-z0-9]*(:.+)?$/))throw new Error(`Tag '${e}' is not valid (should be [a-z][A-za-z0-9]*(:.+)?)`)},dI=(e,t)=>{xp(t),e.add(t)},DI=(e,t)=>{xp(t),e.delete(t)},hI={validateTags:fI,validateTag:xp,addTag:dI,removeTag:DI},mI=2,rp=3,Rp=["GEN","EXO","LEV","NUM","DEU","JOS","JDG","RUT","1SA","2SA","1KI","2KI","1CH","2CH","EZR","NEH","EST","JOB","PSA","PRO","ECC","SNG","ISA","JER","LAM","EZK","DAN","HOS","JOL","AMO","OBA","JON","MIC","NAM","HAB","ZEP","HAG","ZEC","MAL","MAT","MRK","LUK","JHN","ACT","ROM","1CO","2CO","GAL","EPH","PHP","COL","1TH","2TH","1TI","2TI","TIT","PHM","HEB","JAS","1PE","2PE","1JN","2JN","3JN","JUD","REV","TOB","JDT","ESG","WIS","SIR","BAR","LJE","S3Y","SUS","BEL","1MA","2MA","3MA","4MA","1ES","2ES","MAN","PS2","ODA","PSS","JSA","JDB","TBS","SST","DNT","BLT","EZA","5EZ","6EZ","DAG","PS3","2BA","LBA","JUB","ENO","1MQ","2MQ","3MQ","REP","4BA","LAO"],X5=()=>{const e={};for(const[t,r]of Object.entries(Rp))e[r]=parseInt(t);return e},EI=e=>{const t={};for(const r of e.split(/[\n\r]+/).map(n=>n.trim()).map(n=>ne.exec(n,ne("^([A-Z1-6]{3} [0-9]+:[0-9]+(-[0-9]+)?) = ([A-Z1-6]{3} [0-9]+:[0-9]+[a-z]?(-[0-9]+)?)$"))))r&&(r[1]in t||(t[r[1]]=[]),t[r[1]].push(r[3]));return{mappedVerses:t}},vI=e=>{const t={};for(const[r,n]of Object.entries(e.mappedVerses))for(const u of n)u in t?t[u].push(r):t[u]=[r];return{reverseMappedVerses:t}},Y5=e=>{const t={};for(let[r,n]of Object.entries(e)){typeof n=="string"&&(n=[n]);const[u,s]=r.split(" "),o=n[0].split(" ")[0],a=o===u?["cv"]:["bcv"];let[i,c]=s.split(":"),l=c;if(c.includes("-")){const p=c.split("-");c=p[0],l=p[1]}a.push([parseInt(c),parseInt(l)]),a.push([]);for(const p of n.map(f=>f.split(" ")[1])){let[f,d]=p.split(":"),h=d;if(d.includes("-")){const E=d.split("-");d=E[0],h=E[1]}a[0]==="cv"?a[2].push([parseInt(f),parseInt(d),parseInt(h)]):a[2].push([parseInt(f),parseInt(d),parseInt(h),o])}u in t||(t[u]={}),i in t[u]||(t[u][i]=[]),t[u][i].push(a)}return t},yI=e=>{const t={},r=X5();for(const[n,u]of Object.entries(Y5(e))){t[n]={};for(const[s,o]of Object.entries(u))t[n][s]=Z5(o,r)}return t},Z5=(e,t)=>{const r=(u,s)=>s+u*64,n=new Oi(64);for(const[u,[s,o],a]of e){const i=n.length,c=u==="bcv"?rp:mI;if(n.pushNBytes([0,s,o]),c===rp){const p=t[a[0][3]];n.pushNByte(p)}n.pushNByte(a.length);for(const[p,f]of a)n.pushNBytes([p,f]);const l=n.length-i;if(l>63)throw new Error(`Mapping in succinctifyVerseMapping ${JSON.stringify(a)} is too long (${l} bytes)`);n.setByte(i,r(c,l))}return n.trim(),n},Q5=(e,t)=>{const r=e.byte(t);return[r>>6,r%64]},gI=(e,t,r)=>{const n=[];let u=0;for(;u{let u=null,s=0;for(;sl){s+=i;continue}let p=t;if(a===rp){const d=e.nByte(o);p=Rp[d],o+=e.nByteLength(d)}u=[p,[]];const f=e.nByte(o);for(o+=e.nByteLength(f);u[1].length{if(typeof t!="object")throw new Error(`DocSet constructor expects selectors to be object, found ${typeof e.selectors}`);const r={};for(const n of e.processor.selectors)r[n.name]=n;for(const[n,u]of Object.entries(t)){if(!(n in r))throw new Error(`Unexpected selector '${n}' (expected one of [${Object.keys(r).join(", ")}])`);if(typeof u=="string"&&r[n].type!=="string"||typeof u=="number"&&r[n].type!=="integer")throw new Error(`Selector '${n}' is of type ${typeof u} (expected ${r[n].type})`);if(typeof u=="number"){if(!Number.isInteger(u))throw new Error(`Value '${u}' of integer selector '${n}' is not an integer`);if("min"in r[n]&&ur[n].max)throw new Error(`Value '${u}' is greater than ${r[n].max}`)}else if("regex"in r[n]&&!ne.exec(u,ne(r[n].regex),0))throw new Error(`Value '${u}' does not match regex '${r[n].regex}'`);if("enum"in r[n]&&!r[n].enum.includes(u))throw new Error(`Value '${u}' of selector '${n}' is not in enum`)}for(const n of Object.keys(r))if(!(n in t))throw new Error(`Expected selector '${n}' not found`);return t},CI=(e,t,r)=>{const n=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].filter(l=>l.startsWith("chapter/")).map(l=>parseInt(l.split("/")[1])).filter(l=>l>a&&l0,u=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].includes(`chapter/${a}`)&&e.blockHasMatchingItem(o,(l,p)=>p.has(`chapter/${a}`)?Array.from(p).filter(f=>f.startsWith("verse/")).filter(f=>parseInt(f.split("/")[1])>=i).length>0||i===0&&l[0]==="token"&&l[2]&&Array.from(p).filter(f=>f.startsWith("verse")).length===0:!1,{}),s=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].includes(`chapter/${a}`)&&e.blockHasMatchingItem(o,(l,p)=>p.has(`chapter/${a}`)?Array.from(p).filter(f=>f.startsWith("verse/")).filter(f=>parseInt(f.split("/")[1])<=i).length>0||i===0&&l[0]==="token"&&l[2]&&Array.from(p).filter(f=>f.startsWith("verse")).length===0:!1,{});if(ne.exec(r,ne("^[1-9][0-9]*$"))){const o=[`chapter/${r}`];return t.filter(a=>e.allScopesInBlock(a,o))}else if(ne.exec(r,ne("^[1-9][0-9]*-[1-9][0-9]*$"))){const[o,a]=r.split("-").map(c=>parseInt(c));if(o>a)throw new Error(`Chapter range must be from min to max, not '${r}'`);const i=[...Array(a-o+1).keys()].map(c=>`chapter/${c+o}`);return t.filter(c=>e.anyScopeInBlock(c,i))}else if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+$"))){const[o,a]=r.split(":").map(i=>parseInt(i));if(a===0){const i=[`chapter/${o}`];return t.filter(c=>e.allScopesInBlock(c,i)).filter(c=>[...e.allBlockScopes(c)].filter(l=>l.startsWith("verse")).length===0)}else{const i=[`chapter/${o}`,`verse/${a}`];return t.filter(c=>e.allScopesInBlock(c,i))}}else if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*$"))){const[o,a]=r.split(":"),[i,c]=a.split("-").map(f=>parseInt(f));if(i>c)throw new Error(`Verse range must be from min to max, not '${a}'`);const l=[`chapter/${o}`],p=[...Array(c-i+1).keys()].map(f=>`verse/${f+i}`);return t.filter(f=>e.allScopesInBlock(f,l)).filter(f=>e.anyScopeInBlock(f,p)||i===0&&[...e.allBlockScopes(f)].filter(d=>d.startsWith("verse")).length===0)}else if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*:[0-9]+$"))){const[o,a]=r.split("-"),[i,c]=o.split(":").map(h=>parseInt(h)),[l,p]=a.split(":").map(h=>parseInt(h));if(i>l)throw new Error(`Chapter range must be from min to max, not '${i}-${p}'`);const f=[...Array(l-i+1).keys()].map(h=>`chapter/${h+i}`);return t.filter(h=>e.anyScopeInBlock(h,f)).filter(h=>n(h,i,l)||u(h,i,c)||s(h,l,p))}else throw new Error(`Bad cv reference '${r}'`)},bI=(e,t)=>{const[r,n,u]=Ae.succinct.headerBytes(t.bs,0),s=e.unsuccinctifyScope(t.bs,n,u,0);return new Set([...e.unsuccinctifyScopes(t.os).map(o=>o[2]),...e.unsuccinctifyScopes(t.is).map(o=>o[2]),s[2]])},SI=(e,t,r)=>{const n=e.allBlockScopes(t);for(const u of r)if(!n.has(u))return!1;return!0},wI=(e,t,r)=>{const n=e.allBlockScopes(t);for(const u of r)if(n.has(u))return!0;return!1},_I=(e,t,r)=>{const[n,u,s]=Ae.succinct.headerBytes(t.bs,0);return e.unsuccinctifyScope(t.bs,u,s,0)[2]===r},BI=(e,t,r)=>{let n=!1,u=0;const s=t.c;if(r.includes(-1))return!1;for(;!n&&u{const u=new Set(e.unsuccinctifyScopes(t.os).map(s=>s[2]));for(const s of e.unsuccinctifyItems(t.c,n,0)){if(s[0]==="scope"&&s[1]==="start"&&u.add(s[2]),r(s,u))return!0;s[0]==="scope"&&s[1]==="end"&&u.delete(s[2])}return!1},$I=(e,t,r)=>{e.maybeBuildEnumIndexes();const n=t.bs,[u,s,o]=Ae.succinct.headerBytes(n,0),a=e.unsuccinctifyScope(n,s,o,0),i=e.unsuccinctifyGrafts(t.bg),c=e.unsuccinctifyScopes(t.os),l=e.unsuccinctifyScopes(t.is),p=t.nt.nByte(0),f=e.unsuccinctifyItems(t.c,r||{},p);return{bs:a,bg:i,c:f,os:c,is:l,nt:p}},PI=(e,t,r,n,u)=>{if(n===void 0)throw new Error("nextToken (previously includeContext) must now be provided to unsuccinctifyItems");if(n!==null&&typeof n!="number")throw new Error(`nextToken (previously includeContext) must be null or an integer, not ${typeof n} '${JSON.stringify(n)}' in unsuccinctifyItems`);const s=[];let o=0,a=n||0;const i=new Set(u||[]),c=[Ae.itemDefs.itemEnum.startScope,Ae.itemDefs.itemEnum.endScope];for(;o0){if(!r.scopes&&c.includes(p)){o+=l;continue}if(!r.tokens&&p===Ae.itemDefs.itemEnum.token){o+=l;continue}if(!r.grafts&&p===Ae.itemDefs.itemEnum.graft){o+=l;continue}}if(c.includes(p)){const h=Ae.succinct.succinctScopeType(f);if(Object.keys(r).length>0&&r.scopes&&r.excludeScopeTypes&&r.excludeScopeTypes.includes(h)){o+=l;continue}}const d=e.unsuccinctifyItem(t,o,{})[0];d[0]==="token"?(Object.keys(r).length===0||r.tokens)&&(n!==null&&(d.push(d[0]==="token"&&d[1]==="wordLike"?a++:null),d.push([...i])),s.push(d)):d[0]==="scope"&&d[1]==="start"?(Object.keys(r).length===0||r.scopes)&&(i.add(d[2]),s.push(d)):d[0]==="scope"&&d[1]==="end"?(Object.keys(r).length===0||r.scopes)&&(i.delete(d[2]),s.push(d)):d[0]==="graft"&&(Object.keys(r).length===0||r.grafts)&&s.push(d),o+=l}return s},OI=(e,t,r,n)=>{let u=null;const[s,o,a]=Ae.succinct.headerBytes(t,r);switch(o){case Ae.itemDefs.itemEnum.token:(Object.keys(n).length===0||n.tokens)&&(u=e.unsuccinctifyToken(t,a,r));break;case Ae.itemDefs.itemEnum.startScope:case Ae.itemDefs.itemEnum.endScope:(Object.keys(n).length===0||n.scopes)&&(u=e.unsuccinctifyScope(t,o,a,r));break;case Ae.itemDefs.itemEnum.graft:(Object.keys(n).length===0||n.grafts)&&(u=e.unsuccinctifyGraft(t,a,r));break}return[u,s]},kI=(e,t,r)=>{const n=new Set(e.unsuccinctifyScopes(t.os).map(p=>p[2])),u=r.requiredScopes||[],i=r.anyScope||!1?()=>{for(const p of u)if(n.has(p))return!0;return u.length===0}:()=>{for(const p of u)if(!n.has(p))return!1;return!0},c=p=>!r.withChars||r.withChars.length===0||p[0]==="token"&&r.withChars.includes(p[2]),l=[];for(const p of e.unsuccinctifyItems(t.c,r,t.nt.nByte(0),n))p[0]==="scope"&&p[1]==="start"&&n.add(p[2]),i()&&c(p)&&l.push(p),p[0]==="scope"&&p[1]==="end"&&n.delete(p[2]);return l},II=(e,t,r,n)=>{n=n||{};const u=new Set(e.unsuccinctifyScopes(t.os).map(c=>c[2])),o=(()=>{if(ne.exec(r,ne("^[1-9][0-9]*$")))return()=>u.has(`chapter/${r}`);if(ne.exec(r,ne("^[1-9][0-9]*-[1-9][0-9]*$")))return()=>{const[c,l]=r.split("-").map(p=>parseInt(p));if(c>l)throw new Error(`Chapter range must be from min to max, not '${r}'`);for(const p of[...Array(l-c+1).keys()].map(f=>`chapter/${f+c}`))if(u.has(p))return!0;return!1};if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+$")))return()=>{const[c,l]=r.split(":").map(p=>parseInt(p));if(l===0)return u.has(`chapter/${c}`)&&[...u].filter(p=>p.startsWith("verse")).length===0;for(const p of[`chapter/${c}`,`verse/${l}`])if(!u.has(p))return!1;return!0};if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*$")))return()=>{const[c,l]=r.split(":"),[p,f]=l.split("-").map(E=>parseInt(E));if(p>f)throw new Error(`Verse range must be from min to max, not '${l}'`);const d=`chapter/${c}`,h=[...Array(f-p+1).keys()].map(E=>`verse/${E+p}`);if(!u.has(d))return!1;for(const E of h)if(u.has(E))return!0;return p===0&&[...u].filter(E=>E.startsWith("verse")).length===0};if(ne.exec(r,ne("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*:[0-9]+$")))return()=>{const[c,l]=r.split("-"),[p,f]=c.split(":").map(y=>parseInt(y)),[d,h]=l.split(":").map(y=>parseInt(y));if(p>d)throw new Error(`Chapter range must be from min to max, not '${p}-${h}'`);const E=[...u],A=E.filter(y=>y.startsWith("chapter/"));if(A.length>1)throw new Error(`Expected zero or one chapter for item, found ${A.length}`);const m=parseInt(A[0].split("/")[1]);return md?!1:m===p?E.filter(y=>y.startsWith("verse/")&&parseInt(y.split("/")[1])>=f).length>0||f===0&&E.filter(y=>y.startsWith("verse")).length===0:m===d?E.filter(y=>y.startsWith("verse/")&&parseInt(y.split("/")[1])<=h).length>0||h===0&&E.filter(y=>y.startsWith("verse")).length===0:!0};throw new Error(`Bad cv reference '${r}'`)})(),a=c=>{if(!n||Object.keys(n).length===0)return!0;{const l=c[0];return l==="token"&&"tokens"in n||l==="graft"&&"grafts"in n||l==="scope"&&"scopes"in n}},i=[];for(const c of e.unsuccinctifyItems(t.c,{},t.nt.nByte(0)))c[0]==="scope"&&c[1]==="start"&&u.add(c[2]),o()&&a(c)&&i.push(c),c[0]==="scope"&&c[1]==="end"&&u.delete(c[2]);return i},NI=(e,t)=>{const r=new Map;let n=0,u=0;for(;n{if(!(t in e.preEnums))throw new Error(`Unknown category ${t} in recordPreEnum. Maybe call buildPreEnums()?`);r.length>255&&console.log("Value length of",r.length,"in recordPreEnum"),e.preEnums[t].has(r)?e.preEnums[t].get(r).frequency++:e.preEnums[t].set(r,{enum:e.preEnums[t].size,frequency:1})},xI=(e,t,r)=>{const n=new Map([...r.entries()]);for(const u of n.keys())u.length>255&&console.log("enum text for",t,"has length",u.length,"in buildEnum - truncating"),e.enums[t].pushCountedString(u.substring(0,255));e.enums[t].trim()},RI=(e,t,r,n)=>{if(n||(n=!1),!(t in e.preEnums))throw new Error(`Unknown category ${t} in preEnums. Maybe call buildPreEnums()?`);if(e.preEnums[t].has(r))return e.preEnums[t].get(r).enum;if(n)return e.preEnums[t].set(r,{enum:e.preEnums[t].size,frequency:1}),e.enums[t].pushCountedString(r),e.buildEnumIndex(t),e.preEnums[t].get(r).enum;throw new Error(`Unknown value '${r}' for category ${t} in enumForCategoryValue. Maybe call buildPreEnums()?`)},jI=(e,t)=>{let r=0,n=0;for(;n{let u=[];if(!r)return u;let s=r.startBlock,o=r.nextToken;for(;s<=r.endBlock;){let a=e.unsuccinctifyItems(t.blocks[s].c,{},o);const i=e.unsuccinctifyScopes(t.blocks[s].bs)[0],c=e.unsuccinctifyGrafts(t.blocks[s].bg);if(s===r.startBlock&&s===r.endBlock?a=a.slice(r.startItem,r.endItem+1):s===r.startBlock?a=a.slice(r.startItem):s===r.endBlock&&(a=a.slice(0,r.endItem+1)),n){let l=[];for(const p of a)l.push(p.concat([p[0]==="token"&&p[1]==="wordLike"?o++:null]));a=l}u.push([...c,["scope","start",i[2]],...a,["scope","end",i[2]]]),s++}return u},LI=(e,t,r)=>{let n=[];const u=()=>{for(const c of r)if(!s(c))return!1;return!0},s=c=>{for(const l of n)if(l.startsWith(c))return l;return null};e.maybeBuildEnumIndexes();const o=[];let a=new Set([]),i=!0;for(const[c,l]of t.entries()){const[p,f,d]=Ae.succinct.headerBytes(l.bs,0),h=e.unsuccinctifyScope(l.bs,f,d,0)[2],E=["scope","start",h],A=["scope","end",h],m=e.unsuccinctifyGrafts(l.bg);n=new Set(e.unsuccinctifyScopes(l.os).map(y=>y[2]).concat([h]));for(const y of m.concat([E,...e.unsuccinctifyItems(l.c,{},l.nt.nByte(0),n),A]).concat(c!==t.length-1?[["token","lineSpace"," "]]:[])){if(y[0]==="scope"&&y[1]==="start"&&a.add(y[2]),y[0]==="token"&&a.size>0){for(const F of Array.from(a))n.add(F);a.clear()}u()?(i&&o.push([[...n],[]]),o[o.length-1][1].push(y),i=!1):i=!0,y[0]==="scope"&&y[1]==="end"&&(n.delete(y[2]),a.delete(y[2]))}}return o},UI=(e,t,r)=>{let n=new Set([]);const u=o=>o[0]==="scope"&&o[1]==="start"&&r.includes(o[2]);e.maybeBuildEnumIndexes();const s=[[[],[]]];for(const o of t){const[a,i,c]=Ae.succinct.headerBytes(o.bs,0),l=e.unsuccinctifyScope(o.bs,i,c,0)[2],p=e.unsuccinctifyGrafts(o.bg);n.add(l),e.unsuccinctifyScopes(o.os).forEach(d=>n.add(d[2]));const f=p.concat([l].concat(e.unsuccinctifyItems(o.c,{},o.nt.nByte(0))));for(const d of f){if(d[0]==="scope"&&d[1]==="start"&&n.add(d[2]),u(d)){s[s.length-1][0]=[...n].sort(),s.push([[],[]]);for(const h of[...n].filter(E=>["blockTag","verse","verses","chapter"].includes(E.split("/")[0])||r.includes(E)))n.delete(h);n.add(l)}s[s.length-1][1].push(d)}s[s.length-1][1].push(["scope","end",l]),s[s.length-1][1].push(["token","punctuation",` -`])}return s[s.length-1][0]=[...n].sort(),s},GI=e=>{e.preEnums={};for(const r of Object.keys(e.enums))e.preEnums[r]=new Map;e.maybeBuildEnumIndexes();for(const r of e.documents())for(const n of Object.values(r.sequences))r.rerecordPreEnums(e,n);e.sortPreEnums();const t=e.makeRehashEnumMap();for(const r of e.documents())for(const n of Object.values(r.sequences))r.rewriteSequenceBlocks(n.id,t);return e.buildEnums(),e.buildEnumIndexes(),!0},VI=e=>{const t={};for(const[r,n]of Object.entries(e.enums)){t[r]=[];let u=0;for(;u{const o=e.processor.documents[t];if(!o)throw new Error(`Document '${t}' not found`);let a;if(r){if(a=o.sequences[r],!a)throw new Error(`Sequence '${r}' not found`)}else a=o.sequences[o.mainId];if(a.blocks.length<=n)throw new Error(`Could not find block ${n} (length=${a.blocks.length})`);const i=a.blocks[n],c=new Ni(s.length);e.maybeBuildPreEnums();let l=0;n<0&&(l=a.blocks[n-1].nt.nByte(0));let p,f,d,h,E,A=null;for(const m of s)switch(m.type){case"token":p=e.enumForCategoryValue(JI[m.subType],m.payload,!0),WI(c,zI[m.subType],p),l++;break;case"graft":f=e.enumForCategoryValue("graftTypes",m.subType,!0),d=e.enumForCategoryValue("ids",m.payload,!0),HI(c,f,d);break;case"scope":if(h=m.payload.split("/"),E=cm[h[0]],!E&&E!==0)throw new Error(`"${h[0]}" is not a scope type`);A=h.slice(1).map(y=>e.enumForCategoryValue("scopeBits",y,!0)),am(c,im[`${m.subType}Scope`],E,A);break}return c.trim(),i[u]=c,u==="c"&&(i.nt.clear(),i.nt.pushNByte(l)),!0},KI=(e,t,r,n,u)=>Xi(e,t,r,n,"c",u),e6=(e,t,r,n,u)=>Xi(e,t,r,n,"bg",u),XI=(e,t,r,n,u)=>Xi(e,t,r,n,"bs",[u]),YI=(e,t,r,n,u)=>Xi(e,t,r,n,"os",u),ZI=(e,t,r,n,u)=>Xi(e,t,r,n,"is",u),QI=(e,t,r)=>{const n=(l,p)=>{for(const f of Array.from(l))if(!p.has(f))return!1;for(const f of Array.from(p))if(!l.has(f))return!1;return!0},u=(l,p,f)=>{const d=f.split("/"),h=cm[d[0]];if(!h&&h!==0)throw new Error(`"${d[0]}" is not a scope type`);const E=d.slice(1).map(A=>l.enumForCategoryValue("scopeBits",A,!0));am(p,im.startScope,h,E)},s=t.blocks[r],o=new Set,a=new Set;for(const l of e.unsuccinctifyScopes(s.os))a.add(l[2]);for(const l of e.unsuccinctifyItems(s.c,{scopes:!0},null))l[1]==="start"?(o.add(l[2]),a.add(l[2])):a.delete(l[2]);const i=Array.from(o),c=new Ni(i.length);for(const l of i)u(e,c,l);if(c.trim(),s.is=c,rd[2]));if(!n(a,f)){const d=new Ni(f.length);for(const h of Array.from(a))u(e,d,h);d.trim(),l.os=d,e.updateBlockIndexesAfterEdit(t,r+1)}}},eN=(e,t)=>{const r=(u,s,o)=>{const a=o.split("/"),i=cm[a[0]];if(!i&&i!==0)throw new Error(`"${a[0]}" is not a scope type`);const c=a.slice(1).map(l=>u.enumForCategoryValue("scopeBits",l,!0));am(s,im.startScope,i,c)},n=new Set;for(const u of t.blocks){const s=Array.from(n),o=new Ni(s.length);for(const l of s)r(e,o,l);o.trim(),u.os=o;const a=new Set;for(const l of e.unsuccinctifyItems(u.c,{scopes:!0},null))l[1]==="start"?(a.add(l[2]),n.add(l[2])):n.delete(l[2]);const i=Array.from(a),c=new Ni(i.length);for(const l of i)r(e,c,l);c.trim(),u.is=c}},tN=e=>{const t={id:e.id,metadata:{selectors:e.selectors},enums:{},docs:{},tags:Array.from(e.tags)};for(const[r,n]of Object.entries(e.enums))n.trim(),t.enums[r]=n.base64();t.docs={};for(const r of e.docIds)t.docs[r]=e.processor.documents[r].serializeSuccinct();return t},Fo=Ae.ByteArray,{addTag:rN,removeTag:nN,validateTags:qv}=Ae.tags,{succinctGraftName:uN,succinctGraftSeqId:sN,succinctScopeLabel:oN,succinctTokenChars:aN,headerBytes:Yf,enumIndex:iN,enumIndexes:cN}=Ae.succinct,{itemEnum:lN}=Ae.itemDefs,{tokenEnumLabels:pN}=Ae.tokenDefs;class xv{constructor(t,r,n,u){this.processor=t,this.preEnums={},this.enumIndexes={},this.docIds=[],u?this.fromSuccinct(t,u):this.fromScratch(t,r,n),qv(this.tags)}fromScratch(t,r,n){const u=r||t.selectors;this.selectors=Nv(this,u),this.id=this.selectorString(),this.tags=new Set(n||[]),this.enums={ids:new Fo(512),wordLike:new Fo(8192),notWordLike:new Fo(256),scopeBits:new Fo(256),graftTypes:new Fo(10)}}fromSuccinct(t,r){const n=u=>{const s=new Fo(256);return s.fromBase64(u),s.trim(),s};this.id=r.id,this.selectors=Nv(this,r.metadata.selectors),this.tags=new Set(r.tags),qv(this.tags),this.preEnums={},this.enums={ids:n(r.enums.ids),wordLike:n(r.enums.wordLike),notWordLike:n(r.enums.notWordLike),scopeBits:n(r.enums.scopeBits),graftTypes:n(r.enums.graftTypes)},this.enumIndexes={},this.docIds=[]}addTag(t){rN(this.tags,t)}removeTag(t){nN(this.tags,t)}selectorString(){return this.processor.selectorString(this.selectors)}documents(){return this.docIds.map(t=>this.processor.documents[t])}documentWithBook(t){const r=Object.values(this.documents()).filter(n=>"bookCode"in n.headers&&n.headers.bookCode===t);return r.length===1?r[0]:null}maybeBuildPreEnums(){Object.keys(this.preEnums).length===0&&this.buildPreEnums()}buildPreEnums(){for(const[t,r]of Object.entries(this.enums))this.preEnums[t]=NI(this,r)}recordPreEnum(t,r){qI(this,t,r)}sortPreEnums(){for(const t of Object.keys(this.preEnums)){this.preEnums[t]=new Map([...this.preEnums[t].entries()].sort((n,u)=>u[1].frequency-n[1].frequency));let r=0;for(const[n,u]of this.preEnums[t])u.enum=r++}}enumForCategoryValue(t,r,n){return RI(this,t,r,n)}buildEnums(){for(const[t,r]of Object.entries(this.preEnums))this.enums[t].clear(),this.buildEnum(t,r)}buildEnum(t,r){xI(this,t,r)}maybeBuildEnumIndexes(){Object.keys(this.enumIndexes).length===0&&this.buildEnumIndexes()}buildEnumIndexes(){this.enumIndexes=cN(this.enums)}buildEnumIndex(t){this.enumIndexes[t]=iN(t,this.enums[t])}unsuccinctifyBlock(t,r){return $I(this,t,r)}unsuccinctifyItems(t,r,n,u){return PI(this,t,r,n,u)}unsuccinctifyItem(t,r,n){return OI(this,t,r,n)}unsuccinctifyPrunedItems(t,r){return kI(this,t,r)}unsuccinctifyScopes(t){const r=[];let n=0;for(;no[2]))}unsuccinctifyItemsWithScriptureCV(t,r,n){return II(this,t,r,n)}succinctTokenChars(t,r,n){return aN(this.enums,this.enumIndexes,t,r,n)}succinctScopeLabel(t,r,n){return oN(this.enums,this.enumIndexes,t,r,n)}succinctGraftName(t){return uN(this.enums,this.enumIndexes,t)}succinctGraftSeqId(t,r){return sN(this.enums,this.enumIndexes,t,r)}countItems(t){return jI(this,t)}itemsByIndex(t,r,n){return MI(this,t,r,n)}blocksWithScriptureCV(t,r){return CI(this,t,r)}allBlockScopes(t){return bI(this,t)}allScopesInBlock(t,r){return SI(this,t,r)}anyScopeInBlock(t,r){return wI(this,t,r)}blockHasBlockScope(t,r){return _I(this,t,r)}blockHasChars(t,r){return BI(this,t,r)}blockHasMatchingItem(t,r,n){return TI(this,t,r,n)}sequenceItemsByScopes(t,r){return LI(this,t,r)}sequenceItemsByMilestones(t,r){return UI(this,t,r)}rehash(){return GI(this)}makeRehashEnumMap(){return VI(this)}updateItems(t,r,n,u){return KI(this,t,r,n,u)}updateBlockGrafts(t,r,n,u){return e6(this,t,r,n,u)}updateBlockScope(t,r,n,u){return XI(this,t,r,n,u)}updateOpenScopes(t,r,n,u){return YI(this,t,r,n,u)}updateIncludedScopes(t,r,n,u){return ZI(this,t,r,n,u)}updateBlockIndexesAfterEdit(t,r){QI(this,t,r)}updateBlockIndexesAfterFilter(t){eN(this,t)}serializeSuccinct(){return tN(this)}checksum(){const t=[...this.docIds].sort().join(" ");return j5.calculate(t)}}var np={},fN={get exports(){return np},set exports(e){np=e}},t6={},Rn={},da={},Yi={},lt={},qi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((F,B)=>`${F}${B}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((F,B)=>(B instanceof r&&(F[B.str]=(F[B.str]||0)+1),F),{})}}e._Code=n,e.nil=new n("");function u(m,...y){const F=[m[0]];let B=0;for(;B{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${c}${p.scopePath}`})}scopeCode(c=this._values,l,p){return this._reduceValues(c,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,p)}_reduceValues(c,l,p={},f){let d=t.nil;for(const h in c){const E=c[h];if(!E)continue;const A=p[h]=p[h]||new Map;E.forEach(m=>{if(A.has(m))return;A.set(m,n.Started);let y=l(m);if(y){const F=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${F} ${m} = ${y};${this.opts._n}`}else if(y=f==null?void 0:f(m))d=(0,t._)`${d}${y}${this.opts._n}`;else throw new r(m);A.set(m,n.Completed)})}return d}}e.ValueScope=a})(N2);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=qi,r=N2;var n=qi;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var u=N2;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return u.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return u.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return u.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return u.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,g){return this}}class o extends s{constructor(D,g,O){super(),this.varKind=D,this.name=g,this.rhs=O}render({es5:D,_n:g}){const O=D?r.varKinds.var:this.varKind,b=this.rhs===void 0?"":` = ${this.rhs}`;return`${O} ${this.name}${b};`+g}optimizeNames(D,g){if(D[this.name.str])return this.rhs&&(this.rhs=ie(this.rhs,D,g)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(D,g,O){super(),this.lhs=D,this.rhs=g,this.sideEffects=O}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,g){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,D,g),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(D,this.rhs)}}class i extends a{constructor(D,g,O,b){super(D,O,b),this.op=g}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class c extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class l extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class f extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,g){return this.code=ie(this.code,D,g),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class d extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((g,O)=>g+O.render(D),"")}optimizeNodes(){const{nodes:D}=this;let g=D.length;for(;g--;){const O=D[g].optimizeNodes();Array.isArray(O)?D.splice(g,1,...O):O?D[g]=O:D.splice(g,1)}return D.length>0?this:void 0}optimizeNames(D,g){const{nodes:O}=this;let b=O.length;for(;b--;){const w=O[b];w.optimizeNames(D,g)||(fe(D,w.names),O.splice(b,1))}return O.length>0?this:void 0}get names(){return this.nodes.reduce((D,g)=>Y(D,g.names),{})}}class h extends d{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class E extends d{}class A extends h{}A.kind="else";class m extends h{constructor(D,g){super(g),this.condition=D}render(D){let g=`if(${this.condition})`+super.render(D);return this.else&&(g+="else "+this.else.render(D)),g}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let g=this.else;if(g){const O=g.optimizeNodes();g=this.else=Array.isArray(O)?new A(O):O}if(g)return D===!1?g instanceof m?g:g.nodes:this.nodes.length?this:new m(De(D),g instanceof m?[g]:g.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,g){var O;if(this.else=(O=this.else)===null||O===void 0?void 0:O.optimizeNames(D,g),!!(super.optimizeNames(D,g)||this.else))return this.condition=ie(this.condition,D,g),this}get names(){const D=super.names;return oe(D,this.condition),this.else&&Y(D,this.else.names),D}}m.kind="if";class y extends h{}y.kind="for";class F extends y{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iteration=ie(this.iteration,D,g),this}get names(){return Y(super.names,this.iteration.names)}}class B extends y{constructor(D,g,O,b){super(),this.varKind=D,this.name=g,this.from=O,this.to=b}render(D){const g=D.es5?r.varKinds.var:this.varKind,{name:O,from:b,to:w}=this;return`for(${g} ${O}=${b}; ${O}<${w}; ${O}++)`+super.render(D)}get names(){const D=oe(super.names,this.from);return oe(D,this.to)}}class P extends y{constructor(D,g,O,b){super(),this.loop=D,this.varKind=g,this.name=O,this.iterable=b}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iterable=ie(this.iterable,D,g),this}get names(){return Y(super.names,this.iterable.names)}}class $ extends h{constructor(D,g,O){super(),this.name=D,this.args=g,this.async=O}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}$.kind="func";class I extends d{render(D){return"return "+super.render(D)}}I.kind="return";class U extends h{render(D){let g="try"+super.render(D);return this.catch&&(g+=this.catch.render(D)),this.finally&&(g+=this.finally.render(D)),g}optimizeNodes(){var D,g;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(g=this.finally)===null||g===void 0||g.optimizeNodes(),this}optimizeNames(D,g){var O,b;return super.optimizeNames(D,g),(O=this.catch)===null||O===void 0||O.optimizeNames(D,g),(b=this.finally)===null||b===void 0||b.optimizeNames(D,g),this}get names(){const D=super.names;return this.catch&&Y(D,this.catch.names),this.finally&&Y(D,this.finally.names),D}}class j extends h{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}j.kind="catch";class W extends h{render(D){return"finally"+super.render(D)}}W.kind="finally";class te{constructor(D,g={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...g,_n:g.lines?` -`:""},this._extScope=D,this._scope=new r.Scope({parent:D}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,g){const O=this._extScope.value(D,g);return(this._values[O.prefix]||(this._values[O.prefix]=new Set)).add(O),O}getScopeValue(D,g){return this._extScope.getValue(D,g)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,g,O,b){const w=this._scope.toName(g);return O!==void 0&&b&&(this._constants[w.str]=O),this._leafNode(new o(D,w,O)),w}const(D,g,O){return this._def(r.varKinds.const,D,g,O)}let(D,g,O){return this._def(r.varKinds.let,D,g,O)}var(D,g,O){return this._def(r.varKinds.var,D,g,O)}assign(D,g,O){return this._leafNode(new a(D,g,O))}add(D,g){return this._leafNode(new i(D,e.operators.ADD,g))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new f(D)),this}object(...D){const g=["{"];for(const[O,b]of D)g.length>1&&g.push(","),g.push(O),(O!==b||this.opts.es5)&&(g.push(":"),(0,t.addCodeArg)(g,b));return g.push("}"),new t._Code(g)}if(D,g,O){if(this._blockNode(new m(D)),g&&O)this.code(g).else().code(O).endIf();else if(g)this.code(g).endIf();else if(O)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new m(D))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(m,A)}_for(D,g){return this._blockNode(D),g&&this.code(g).endFor(),this}for(D,g){return this._for(new F(D),g)}forRange(D,g,O,b,w=this.opts.es5?r.varKinds.var:r.varKinds.let){const x=this._scope.toName(D);return this._for(new B(w,x,g,O),()=>b(x))}forOf(D,g,O,b=r.varKinds.const){const w=this._scope.toName(D);if(this.opts.es5){const x=g instanceof t.Name?g:this.var("_arr",g);return this.forRange("_i",0,(0,t._)`${x}.length`,k=>{this.var(w,(0,t._)`${x}[${k}]`),O(w)})}return this._for(new P("of",b,w,g),()=>O(w))}forIn(D,g,O,b=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${g})`,O);const w=this._scope.toName(D);return this._for(new P("in",b,w,g),()=>O(w))}endFor(){return this._endBlockNode(y)}label(D){return this._leafNode(new c(D))}break(D){return this._leafNode(new l(D))}return(D){const g=new I;if(this._blockNode(g),this.code(D),g.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(D,g,O){if(!g&&!O)throw new Error('CodeGen: "try" without "catch" and "finally"');const b=new U;if(this._blockNode(b),this.code(D),g){const w=this.name("e");this._currNode=b.catch=new j(w),g(w)}return O&&(this._currNode=b.finally=new W,this.code(O)),this._endBlockNode(j,W)}throw(D){return this._leafNode(new p(D))}block(D,g){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(g),this}endBlock(D){const g=this._blockStarts.pop();if(g===void 0)throw new Error("CodeGen: not in self-balancing block");const O=this._nodes.length-g;if(O<0||D!==void 0&&O!==D)throw new Error(`CodeGen: wrong number of nodes: ${O} vs ${D} expected`);return this._nodes.length=g,this}func(D,g=t.nil,O,b){return this._blockNode(new $(D,g,O)),b&&this.code(b).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,g){const O=this._currNode;if(O instanceof D||g&&O instanceof g)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${g?`${D.kind}/${g.kind}`:D.kind}"`)}_elseNode(D){const g=this._currNode;if(!(g instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=g.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const g=this._nodes;g[g.length-1]=D}}e.CodeGen=te;function Y(C,D){for(const g in D)C[g]=(C[g]||0)+(D[g]||0);return C}function oe(C,D){return D instanceof t._CodeOrName?Y(C,D.names):C}function ie(C,D,g){if(C instanceof t.Name)return O(C);if(!b(C))return C;return new t._Code(C._items.reduce((w,x)=>(x instanceof t.Name&&(x=O(x)),x instanceof t._Code?w.push(...x._items):w.push(x),w),[]));function O(w){const x=g[w.str];return x===void 0||D[w.str]!==1?w:(delete D[w.str],x)}function b(w){return w instanceof t._Code&&w._items.some(x=>x instanceof t.Name&&D[x.str]===1&&g[x.str]!==void 0)}}function fe(C,D){for(const g in D)C[g]=(C[g]||0)-(D[g]||0)}function De(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${v(C)}`}e.not=De;const de=q(e.operators.AND);function Ce(...C){return C.reduce(de)}e.and=Ce;const pe=q(e.operators.OR);function Q(...C){return C.reduce(pe)}e.or=Q;function q(C){return(D,g)=>D===t.nil?g:g===t.nil?D:(0,t._)`${v(D)} ${C} ${v(g)}`}function v(C){return C instanceof t.Name?C:(0,t._)`(${C})`}})(lt);var vt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=lt,r=qi;function n($){const I={};for(const U of $)I[U]=!0;return I}e.toHash=n;function u($,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(s($,I),!o(I,$.self.RULES.all))}e.alwaysValidSchema=u;function s($,I=$.schema){const{opts:U,self:j}=$;if(!U.strictSchema||typeof I=="boolean")return;const W=j.RULES.keywords;for(const te in I)W[te]||P($,`unknown keyword: "${te}"`)}e.checkUnknownRules=s;function o($,I){if(typeof $=="boolean")return!$;for(const U in $)if(I[U])return!0;return!1}e.schemaHasRules=o;function a($,I){if(typeof $=="boolean")return!$;for(const U in $)if(U!=="$ref"&&I.all[U])return!0;return!1}e.schemaHasRulesButRef=a;function i({topSchemaRef:$,schemaPath:I},U,j,W){if(!W){if(typeof U=="number"||typeof U=="boolean")return U;if(typeof U=="string")return(0,t._)`${U}`}return(0,t._)`${$}${I}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=i;function c($){return f(decodeURIComponent($))}e.unescapeFragment=c;function l($){return encodeURIComponent(p($))}e.escapeFragment=l;function p($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function f($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=f;function d($,I){if(Array.isArray($))for(const U of $)I(U);else I($)}e.eachItem=d;function h({mergeNames:$,mergeToName:I,mergeValues:U,resultToName:j}){return(W,te,Y,oe)=>{const ie=Y===void 0?te:Y instanceof t.Name?(te instanceof t.Name?$(W,te,Y):I(W,te,Y),Y):te instanceof t.Name?(I(W,Y,te),te):U(te,Y);return oe===t.Name&&!(ie instanceof t.Name)?j(W,ie):ie}}e.mergeEvaluated={props:h({mergeNames:($,I,U)=>$.if((0,t._)`${U} !== true && ${I} !== undefined`,()=>{$.if((0,t._)`${I} === true`,()=>$.assign(U,!0),()=>$.assign(U,(0,t._)`${U} || {}`).code((0,t._)`Object.assign(${U}, ${I})`))}),mergeToName:($,I,U)=>$.if((0,t._)`${U} !== true`,()=>{I===!0?$.assign(U,!0):($.assign(U,(0,t._)`${U} || {}`),A($,U,I))}),mergeValues:($,I)=>$===!0?!0:{...$,...I},resultToName:E}),items:h({mergeNames:($,I,U)=>$.if((0,t._)`${U} !== true && ${I} !== undefined`,()=>$.assign(U,(0,t._)`${I} === true ? true : ${U} > ${I} ? ${U} : ${I}`)),mergeToName:($,I,U)=>$.if((0,t._)`${U} !== true`,()=>$.assign(U,I===!0?!0:(0,t._)`${U} > ${I} ? ${U} : ${I}`)),mergeValues:($,I)=>$===!0?!0:Math.max($,I),resultToName:($,I)=>$.var("items",I)})};function E($,I){if(I===!0)return $.var("props",!0);const U=$.var("props",(0,t._)`{}`);return I!==void 0&&A($,U,I),U}e.evaluatedPropsToName=E;function A($,I,U){Object.keys(U).forEach(j=>$.assign((0,t._)`${I}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=A;const m={};function y($,I){return $.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new r._Code(I.code))})}e.useFunc=y;var F;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(F=e.Type||(e.Type={}));function B($,I,U){if($ instanceof t.Name){const j=I===F.Num;return U?j?(0,t._)`"[" + ${$} + "]"`:(0,t._)`"['" + ${$} + "']"`:j?(0,t._)`"/" + ${$}`:(0,t._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return U?(0,t.getProperty)($).toString():"/"+p($)}e.getErrorPath=B;function P($,I,U=$.opts.strictSchema){if(U){if(I=`strict mode: ${I}`,U===!0)throw new Error(I);$.self.logger.warn(I)}}e.checkStrictMode=P})(vt);var cu={};Object.defineProperty(cu,"__esModule",{value:!0});const Cr=lt,dN={data:new Cr.Name("data"),valCxt:new Cr.Name("valCxt"),instancePath:new Cr.Name("instancePath"),parentData:new Cr.Name("parentData"),parentDataProperty:new Cr.Name("parentDataProperty"),rootData:new Cr.Name("rootData"),dynamicAnchors:new Cr.Name("dynamicAnchors"),vErrors:new Cr.Name("vErrors"),errors:new Cr.Name("errors"),this:new Cr.Name("this"),self:new Cr.Name("self"),scope:new Cr.Name("scope"),json:new Cr.Name("json"),jsonPos:new Cr.Name("jsonPos"),jsonLen:new Cr.Name("jsonLen"),jsonPart:new Cr.Name("jsonPart")};cu.default=dN;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=lt,r=vt,n=cu;e.keywordError={message:({keyword:A})=>(0,t.str)`must pass "${A}" keyword validation`},e.keyword$DataError={message:({keyword:A,schemaType:m})=>m?(0,t.str)`"${A}" keyword must be ${m} ($data)`:(0,t.str)`"${A}" keyword is invalid ($data)`};function u(A,m=e.keywordError,y,F){const{it:B}=A,{gen:P,compositeRule:$,allErrors:I}=B,U=p(A,m,y);F??($||I)?i(P,U):c(B,(0,t._)`[${U}]`)}e.reportError=u;function s(A,m=e.keywordError,y){const{it:F}=A,{gen:B,compositeRule:P,allErrors:$}=F,I=p(A,m,y);i(B,I),P||$||c(F,n.default.vErrors)}e.reportExtraError=s;function o(A,m){A.assign(n.default.errors,m),A.if((0,t._)`${n.default.vErrors} !== null`,()=>A.if(m,()=>A.assign((0,t._)`${n.default.vErrors}.length`,m),()=>A.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:A,keyword:m,schemaValue:y,data:F,errsCount:B,it:P}){if(B===void 0)throw new Error("ajv implementation error");const $=A.name("err");A.forRange("i",B,n.default.errors,I=>{A.const($,(0,t._)`${n.default.vErrors}[${I}]`),A.if((0,t._)`${$}.instancePath === undefined`,()=>A.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,P.errorPath))),A.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${P.errSchemaPath}/${m}`),P.opts.verbose&&(A.assign((0,t._)`${$}.schema`,y),A.assign((0,t._)`${$}.data`,F))})}e.extendErrors=a;function i(A,m){const y=A.const("err",m);A.if((0,t._)`${n.default.vErrors} === null`,()=>A.assign(n.default.vErrors,(0,t._)`[${y}]`),(0,t._)`${n.default.vErrors}.push(${y})`),A.code((0,t._)`${n.default.errors}++`)}function c(A,m){const{gen:y,validateName:F,schemaEnv:B}=A;B.$async?y.throw((0,t._)`new ${A.ValidationError}(${m})`):(y.assign((0,t._)`${F}.errors`,m),y.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(A,m,y){const{createErrors:F}=A.it;return F===!1?(0,t._)`{}`:f(A,m,y)}function f(A,m,y={}){const{gen:F,it:B}=A,P=[d(B,y),h(A,y)];return E(A,m,P),F.object(...P)}function d({errorPath:A},{instancePath:m}){const y=m?(0,t.str)`${A}${(0,r.getErrorPath)(m,r.Type.Str)}`:A;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,y)]}function h({keyword:A,it:{errSchemaPath:m}},{schemaPath:y,parentSchema:F}){let B=F?m:(0,t.str)`${m}/${A}`;return y&&(B=(0,t.str)`${B}${(0,r.getErrorPath)(y,r.Type.Str)}`),[l.schemaPath,B]}function E(A,{params:m,message:y},F){const{keyword:B,data:P,schemaValue:$,it:I}=A,{opts:U,propertyName:j,topSchemaRef:W,schemaPath:te}=I;F.push([l.keyword,B],[l.params,typeof m=="function"?m(A):m||(0,t._)`{}`]),U.messages&&F.push([l.message,typeof y=="function"?y(A):y]),U.verbose&&F.push([l.schema,$],[l.parentSchema,(0,t._)`${W}${te}`],[n.default.data,P]),j&&F.push([l.propertyName,j])}})(Yi);Object.defineProperty(da,"__esModule",{value:!0});da.boolOrEmptySchema=da.topBoolOrEmptySchema=void 0;const DN=Yi,hN=lt,mN=cu,EN={message:"boolean schema is false"};function vN(e){const{gen:t,schema:r,validateName:n}=e;r===!1?r6(e,!1):typeof r=="object"&&r.$async===!0?t.return(mN.default.data):(t.assign((0,hN._)`${n}.errors`,null),t.return(!0))}da.topBoolOrEmptySchema=vN;function yN(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),r6(e)):r.var(t,!0)}da.boolOrEmptySchema=yN;function r6(e,t){const{gen:r,data:n}=e,u={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,DN.reportError)(u,EN,void 0,t)}var Zi={},uo={};Object.defineProperty(uo,"__esModule",{value:!0});uo.getRules=uo.isJSONType=void 0;const gN=["string","number","integer","boolean","null","object","array"],AN=new Set(gN);function FN(e){return typeof e=="string"&&AN.has(e)}uo.isJSONType=FN;function CN(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}uo.getRules=CN;var bu={};Object.defineProperty(bu,"__esModule",{value:!0});bu.shouldUseRule=bu.shouldUseGroup=bu.schemaHasRulesForType=void 0;function bN({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&n6(e,n)}bu.schemaHasRulesForType=bN;function n6(e,t){return t.rules.some(r=>u6(e,r))}bu.shouldUseGroup=n6;function u6(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}bu.shouldUseRule=u6;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=uo,r=bu,n=Yi,u=lt,s=vt;var o;(function(F){F[F.Correct=0]="Correct",F[F.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function a(F){const B=i(F.type);if(B.includes("null")){if(F.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!B.length&&F.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');F.nullable===!0&&B.push("null")}return B}e.getSchemaTypes=a;function i(F){const B=Array.isArray(F)?F:F?[F]:[];if(B.every(t.isJSONType))return B;throw new Error("type must be JSONType or JSONType[]: "+B.join(","))}e.getJSONTypes=i;function c(F,B){const{gen:P,data:$,opts:I}=F,U=p(B,I.coerceTypes),j=B.length>0&&!(U.length===0&&B.length===1&&(0,r.schemaHasRulesForType)(F,B[0]));if(j){const W=E(B,$,I.strictNumbers,o.Wrong);P.if(W,()=>{U.length?f(F,B,U):m(F)})}return j}e.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function p(F,B){return B?F.filter(P=>l.has(P)||B==="array"&&P==="array"):[]}function f(F,B,P){const{gen:$,data:I,opts:U}=F,j=$.let("dataType",(0,u._)`typeof ${I}`),W=$.let("coerced",(0,u._)`undefined`);U.coerceTypes==="array"&&$.if((0,u._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>$.assign(I,(0,u._)`${I}[0]`).assign(j,(0,u._)`typeof ${I}`).if(E(B,I,U.strictNumbers),()=>$.assign(W,I))),$.if((0,u._)`${W} !== undefined`);for(const Y of P)(l.has(Y)||Y==="array"&&U.coerceTypes==="array")&&te(Y);$.else(),m(F),$.endIf(),$.if((0,u._)`${W} !== undefined`,()=>{$.assign(I,W),d(F,W)});function te(Y){switch(Y){case"string":$.elseIf((0,u._)`${j} == "number" || ${j} == "boolean"`).assign(W,(0,u._)`"" + ${I}`).elseIf((0,u._)`${I} === null`).assign(W,(0,u._)`""`);return;case"number":$.elseIf((0,u._)`${j} == "boolean" || ${I} === null - || (${j} == "string" && ${I} && ${I} == +${I})`).assign(W,(0,u._)`+${I}`);return;case"integer":$.elseIf((0,u._)`${j} === "boolean" || ${I} === null - || (${j} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(W,(0,u._)`+${I}`);return;case"boolean":$.elseIf((0,u._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(W,!1).elseIf((0,u._)`${I} === "true" || ${I} === 1`).assign(W,!0);return;case"null":$.elseIf((0,u._)`${I} === "" || ${I} === 0 || ${I} === false`),$.assign(W,null);return;case"array":$.elseIf((0,u._)`${j} === "string" || ${j} === "number" - || ${j} === "boolean" || ${I} === null`).assign(W,(0,u._)`[${I}]`)}}}function d({gen:F,parentData:B,parentDataProperty:P},$){F.if((0,u._)`${B} !== undefined`,()=>F.assign((0,u._)`${B}[${P}]`,$))}function h(F,B,P,$=o.Correct){const I=$===o.Correct?u.operators.EQ:u.operators.NEQ;let U;switch(F){case"null":return(0,u._)`${B} ${I} null`;case"array":U=(0,u._)`Array.isArray(${B})`;break;case"object":U=(0,u._)`${B} && typeof ${B} == "object" && !Array.isArray(${B})`;break;case"integer":U=j((0,u._)`!(${B} % 1) && !isNaN(${B})`);break;case"number":U=j();break;default:return(0,u._)`typeof ${B} ${I} ${F}`}return $===o.Correct?U:(0,u.not)(U);function j(W=u.nil){return(0,u.and)((0,u._)`typeof ${B} == "number"`,W,P?(0,u._)`isFinite(${B})`:u.nil)}}e.checkDataType=h;function E(F,B,P,$){if(F.length===1)return h(F[0],B,P,$);let I;const U=(0,s.toHash)(F);if(U.array&&U.object){const j=(0,u._)`typeof ${B} != "object"`;I=U.null?j:(0,u._)`!${B} || ${j}`,delete U.null,delete U.array,delete U.object}else I=u.nil;U.number&&delete U.integer;for(const j in U)I=(0,u.and)(I,h(j,B,P,$));return I}e.checkDataTypes=E;const A={message:({schema:F})=>`must be ${F}`,params:({schema:F,schemaValue:B})=>typeof F=="string"?(0,u._)`{type: ${F}}`:(0,u._)`{type: ${B}}`};function m(F){const B=y(F);(0,n.reportError)(B,A)}e.reportTypeError=m;function y(F){const{gen:B,data:P,schema:$}=F,I=(0,s.schemaRefOrVal)(F,$,"type");return{gen:B,keyword:"type",data:P,schema:$.type,schemaCode:I,schemaValue:I,parentSchema:$,params:{},it:F}}})(Zi);var jp={};Object.defineProperty(jp,"__esModule",{value:!0});jp.assignDefaults=void 0;const Co=lt,SN=vt;function wN(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const u in r)Rv(e,u,r[u].default);else t==="array"&&Array.isArray(n)&&n.forEach((u,s)=>Rv(e,s,u.default))}jp.assignDefaults=wN;function Rv(e,t,r){const{gen:n,compositeRule:u,data:s,opts:o}=e;if(r===void 0)return;const a=(0,Co._)`${s}${(0,Co.getProperty)(t)}`;if(u){(0,SN.checkStrictMode)(e,`default is ignored for: ${a}`);return}let i=(0,Co._)`${a} === undefined`;o.useDefaults==="empty"&&(i=(0,Co._)`${i} || ${a} === null || ${a} === ""`),n.if(i,(0,Co._)`${a} = ${(0,Co.stringify)(r)}`)}var ru={},at={};Object.defineProperty(at,"__esModule",{value:!0});at.validateUnion=at.validateArray=at.usePattern=at.callValidateCode=at.schemaProperties=at.allSchemaProperties=at.noPropertyInData=at.propertyInData=at.isOwnProperty=at.hasPropFunc=at.reportMissingProp=at.checkMissingProp=at.checkReportMissingProp=void 0;const Bt=lt,lm=vt,Lu=cu,_N=vt;function BN(e,t){const{gen:r,data:n,it:u}=e;r.if(fm(r,n,t,u.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Bt._)`${t}`},!0),e.error()})}at.checkReportMissingProp=BN;function TN({gen:e,data:t,it:{opts:r}},n,u){return(0,Bt.or)(...n.map(s=>(0,Bt.and)(fm(e,t,s,r.ownProperties),(0,Bt._)`${u} = ${s}`)))}at.checkMissingProp=TN;function $N(e,t){e.setParams({missingProperty:t},!0),e.error()}at.reportMissingProp=$N;function s6(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Bt._)`Object.prototype.hasOwnProperty`})}at.hasPropFunc=s6;function pm(e,t,r){return(0,Bt._)`${s6(e)}.call(${t}, ${r})`}at.isOwnProperty=pm;function PN(e,t,r,n){const u=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} !== undefined`;return n?(0,Bt._)`${u} && ${pm(e,t,r)}`:u}at.propertyInData=PN;function fm(e,t,r,n){const u=(0,Bt._)`${t}${(0,Bt.getProperty)(r)} === undefined`;return n?(0,Bt.or)(u,(0,Bt.not)(pm(e,t,r))):u}at.noPropertyInData=fm;function o6(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}at.allSchemaProperties=o6;function ON(e,t){return o6(t).filter(r=>!(0,lm.alwaysValidSchema)(e,t[r]))}at.schemaProperties=ON;function kN({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:u,errorPath:s},it:o},a,i,c){const l=c?(0,Bt._)`${e}, ${t}, ${n}${u}`:t,p=[[Lu.default.instancePath,(0,Bt.strConcat)(Lu.default.instancePath,s)],[Lu.default.parentData,o.parentData],[Lu.default.parentDataProperty,o.parentDataProperty],[Lu.default.rootData,Lu.default.rootData]];o.opts.dynamicRef&&p.push([Lu.default.dynamicAnchors,Lu.default.dynamicAnchors]);const f=(0,Bt._)`${l}, ${r.object(...p)}`;return i!==Bt.nil?(0,Bt._)`${a}.call(${i}, ${f})`:(0,Bt._)`${a}(${f})`}at.callValidateCode=kN;const IN=(0,Bt._)`new RegExp`;function NN({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:u}=t.code,s=u(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Bt._)`${u.code==="new RegExp"?IN:(0,_N.useFunc)(e,u)}(${r}, ${n})`})}at.usePattern=NN;function qN(e){const{gen:t,data:r,keyword:n,it:u}=e,s=t.name("valid");if(u.allErrors){const a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){const i=t.const("len",(0,Bt._)`${r}.length`);t.forRange("i",0,i,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:lm.Type.Num},s),t.if((0,Bt.not)(s),a)})}}at.validateArray=qN;function xN(e){const{gen:t,schema:r,keyword:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(i=>(0,lm.alwaysValidSchema)(u,i))&&!u.opts.unevaluated)return;const o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((i,c)=>{const l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,Bt._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Bt.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}at.validateUnion=xN;Object.defineProperty(ru,"__esModule",{value:!0});ru.validateKeywordUsage=ru.validSchemaType=ru.funcKeywordCode=ru.macroKeywordCode=void 0;const _r=lt,Ms=cu,RN=at,jN=Yi;function MN(e,t){const{gen:r,keyword:n,schema:u,parentSchema:s,it:o}=e,a=t.macro.call(o.self,u,s,o),i=a6(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");e.subschema({schema:a,schemaPath:_r.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:i,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}ru.macroKeywordCode=MN;function LN(e,t){var r;const{gen:n,keyword:u,schema:s,parentSchema:o,$data:a,it:i}=e;GN(i,t);const c=!a&&t.compile?t.compile.call(i.self,s,o,i):t.validate,l=a6(n,u,c),p=n.let("valid");e.block$data(p,f),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function f(){if(t.errors===!1)E(),t.modifying&&jv(e),A(()=>e.error());else{const m=t.async?d():h();t.modifying&&jv(e),A(()=>UN(e,m))}}function d(){const m=n.let("ruleErrs",null);return n.try(()=>E((0,_r._)`await `),y=>n.assign(p,!1).if((0,_r._)`${y} instanceof ${i.ValidationError}`,()=>n.assign(m,(0,_r._)`${y}.errors`),()=>n.throw(y))),m}function h(){const m=(0,_r._)`${l}.errors`;return n.assign(m,null),E(_r.nil),m}function E(m=t.async?(0,_r._)`await `:_r.nil){const y=i.opts.passContext?Ms.default.this:Ms.default.self,F=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,_r._)`${m}${(0,RN.callValidateCode)(e,l,y,F)}`,t.modifying)}function A(m){var y;n.if((0,_r.not)((y=t.valid)!==null&&y!==void 0?y:p),m)}}ru.funcKeywordCode=LN;function jv(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,_r._)`${n.parentData}[${n.parentDataProperty}]`))}function UN(e,t){const{gen:r}=e;r.if((0,_r._)`Array.isArray(${t})`,()=>{r.assign(Ms.default.vErrors,(0,_r._)`${Ms.default.vErrors} === null ? ${t} : ${Ms.default.vErrors}.concat(${t})`).assign(Ms.default.errors,(0,_r._)`${Ms.default.vErrors}.length`),(0,jN.extendErrors)(e)},()=>e.error())}function GN({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function a6(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,_r.stringify)(r)})}function VN(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}ru.validSchemaType=VN;function HN({schema:e,opts:t,self:r,errSchemaPath:n},u,s){if(Array.isArray(u.keyword)?!u.keyword.includes(s):u.keyword!==s)throw new Error("ajv implementation error");const o=u.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(u.validateSchema&&!u.validateSchema(e[s])){const i=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(u.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(i);else throw new Error(i)}}ru.validateKeywordUsage=HN;var ns={};Object.defineProperty(ns,"__esModule",{value:!0});ns.extendSubschemaMode=ns.extendSubschemaData=ns.getSubschema=void 0;const eu=lt,i6=vt;function WN(e,{keyword:t,schemaProp:r,schema:n,schemaPath:u,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,eu._)`${e.schemaPath}${(0,eu.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,eu._)`${e.schemaPath}${(0,eu.getProperty)(t)}${(0,eu.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,i6.escapeFragment)(r)}`}}if(n!==void 0){if(u===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:u,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ns.getSubschema=WN;function JN(e,t,{dataProp:r,dataPropType:n,data:u,dataTypes:s,propertyName:o}){if(u!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(r!==void 0){const{errorPath:c,dataPathArr:l,opts:p}=t,f=a.let("data",(0,eu._)`${t.data}${(0,eu.getProperty)(r)}`,!0);i(f),e.errorPath=(0,eu.str)`${c}${(0,i6.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,eu._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(u!==void 0){const c=u instanceof eu.Name?u:a.let("data",u,!0);i(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function i(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}ns.extendSubschemaData=JN;function zN(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:u,allErrors:s}){n!==void 0&&(e.compositeRule=n),u!==void 0&&(e.createErrors=u),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}ns.extendSubschemaMode=zN;var vr={},c6=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,u,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(u=n;u--!==0;)if(!e(t[u],r[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(u=n;u--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[u]))return!1;for(u=n;u--!==0;){var o=s[u];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},q2={},KN={get exports(){return q2},set exports(e){q2=e}},Qu=KN.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},u=r.post||function(){};Cl(t,n,u,e,"",e)};Qu.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Qu.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Qu.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Qu.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Cl(e,t,r,n,u,s,o,a,i,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,u,s,o,a,i,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in Qu.arrayKeywords)for(var f=0;ft+=l6(n)),t===1/0))return 1/0}return t}function p6(e,t="",r){r!==!1&&(t=ia(t));const n=e.parse(t);return f6(e,n)}vr.getFullPath=p6;function f6(e,t){return e.serialize(t).split("#")[0]+"#"}vr._getFullPath=f6;const nq=/#\/?$/;function ia(e){return e?e.replace(nq,""):""}vr.normalizeId=ia;function uq(e,t,r){return r=ia(r),e.resolve(t,r)}vr.resolveUrl=uq;const sq=/^[a-z_][-a-z0-9._]*$/i;function oq(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,u=ia(e[r]||t),s={"":u},o=p6(n,u,!1),a={},i=new Set;return QN(e,{allKeys:!0},(p,f,d,h)=>{if(h===void 0)return;const E=o+f;let A=s[h];typeof p[r]=="string"&&(A=m.call(this,p[r])),y.call(this,p.$anchor),y.call(this,p.$dynamicAnchor),s[f]=A;function m(F){const B=this.opts.uriResolver.resolve;if(F=ia(A?B(A,F):F),i.has(F))throw l(F);i.add(F);let P=this.refs[F];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?c(p,P.schema,F):F!==ia(E)&&(F[0]==="#"?(c(p,a[F],F),a[F]=p):this.refs[F]=E),F}function y(F){if(typeof F=="string"){if(!sq.test(F))throw new Error(`invalid anchor "${F}"`);m.call(this,`#${F}`)}}}),a;function c(p,f,d){if(f!==void 0&&!ZN(p,f))throw l(d)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}vr.getSchemaRefs=oq;Object.defineProperty(Rn,"__esModule",{value:!0});Rn.getData=Rn.KeywordCxt=Rn.validateFunctionCode=void 0;const d6=da,Mv=Zi,dm=bu,up=Zi,aq=jp,hi=ru,Zf=ns,Ve=lt,Ye=cu,iq=vr,Su=vt,Ua=Yi;function cq(e){if(m6(e)&&(E6(e),h6(e))){fq(e);return}D6(e,()=>(0,d6.topBoolOrEmptySchema)(e))}Rn.validateFunctionCode=cq;function D6({gen:e,validateName:t,schema:r,schemaEnv:n,opts:u},s){u.code.es5?e.func(t,(0,Ve._)`${Ye.default.data}, ${Ye.default.valCxt}`,n.$async,()=>{e.code((0,Ve._)`"use strict"; ${Lv(r,u)}`),pq(e,u),e.code(s)}):e.func(t,(0,Ve._)`${Ye.default.data}, ${lq(u)}`,n.$async,()=>e.code(Lv(r,u)).code(s))}function lq(e){return(0,Ve._)`{${Ye.default.instancePath}="", ${Ye.default.parentData}, ${Ye.default.parentDataProperty}, ${Ye.default.rootData}=${Ye.default.data}${e.dynamicRef?(0,Ve._)`, ${Ye.default.dynamicAnchors}={}`:Ve.nil}}={}`}function pq(e,t){e.if(Ye.default.valCxt,()=>{e.var(Ye.default.instancePath,(0,Ve._)`${Ye.default.valCxt}.${Ye.default.instancePath}`),e.var(Ye.default.parentData,(0,Ve._)`${Ye.default.valCxt}.${Ye.default.parentData}`),e.var(Ye.default.parentDataProperty,(0,Ve._)`${Ye.default.valCxt}.${Ye.default.parentDataProperty}`),e.var(Ye.default.rootData,(0,Ve._)`${Ye.default.valCxt}.${Ye.default.rootData}`),t.dynamicRef&&e.var(Ye.default.dynamicAnchors,(0,Ve._)`${Ye.default.valCxt}.${Ye.default.dynamicAnchors}`)},()=>{e.var(Ye.default.instancePath,(0,Ve._)`""`),e.var(Ye.default.parentData,(0,Ve._)`undefined`),e.var(Ye.default.parentDataProperty,(0,Ve._)`undefined`),e.var(Ye.default.rootData,Ye.default.data),t.dynamicRef&&e.var(Ye.default.dynamicAnchors,(0,Ve._)`{}`)})}function fq(e){const{schema:t,opts:r,gen:n}=e;D6(e,()=>{r.$comment&&t.$comment&&y6(e),Eq(e),n.let(Ye.default.vErrors,null),n.let(Ye.default.errors,0),r.unevaluated&&dq(e),v6(e),gq(e)})}function dq(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Ve._)`${r}.evaluated`),t.if((0,Ve._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Ve._)`${e.evaluated}.props`,(0,Ve._)`undefined`)),t.if((0,Ve._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Ve._)`${e.evaluated}.items`,(0,Ve._)`undefined`))}function Lv(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Ve._)`/*# sourceURL=${r} */`:Ve.nil}function Dq(e,t){if(m6(e)&&(E6(e),h6(e))){hq(e,t);return}(0,d6.boolOrEmptySchema)(e,t)}function h6({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function m6(e){return typeof e.schema!="boolean"}function hq(e,t){const{schema:r,gen:n,opts:u}=e;u.$comment&&r.$comment&&y6(e),vq(e),yq(e);const s=n.const("_errs",Ye.default.errors);v6(e,s),n.var(t,(0,Ve._)`${s} === ${Ye.default.errors}`)}function E6(e){(0,Su.checkUnknownRules)(e),mq(e)}function v6(e,t){if(e.opts.jtd)return Uv(e,[],!1,t);const r=(0,Mv.getSchemaTypes)(e.schema),n=(0,Mv.coerceAndCheckDataType)(e,r);Uv(e,r,!n,t)}function mq(e){const{schema:t,errSchemaPath:r,opts:n,self:u}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Su.schemaHasRulesButRef)(t,u.RULES)&&u.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Eq(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Su.checkStrictMode)(e,"default is ignored in the schema root")}function vq(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,iq.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function yq(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function y6({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:u}){const s=r.$comment;if(u.$comment===!0)e.code((0,Ve._)`${Ye.default.self}.logger.log(${s})`);else if(typeof u.$comment=="function"){const o=(0,Ve.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,Ve._)`${Ye.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function gq(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:u,opts:s}=e;r.$async?t.if((0,Ve._)`${Ye.default.errors} === 0`,()=>t.return(Ye.default.data),()=>t.throw((0,Ve._)`new ${u}(${Ye.default.vErrors})`)):(t.assign((0,Ve._)`${n}.errors`,Ye.default.vErrors),s.unevaluated&&Aq(e),t.return((0,Ve._)`${Ye.default.errors} === 0`))}function Aq({gen:e,evaluated:t,props:r,items:n}){r instanceof Ve.Name&&e.assign((0,Ve._)`${t}.props`,r),n instanceof Ve.Name&&e.assign((0,Ve._)`${t}.items`,n)}function Uv(e,t,r,n){const{gen:u,schema:s,data:o,allErrors:a,opts:i,self:c}=e,{RULES:l}=c;if(s.$ref&&(i.ignoreKeywordsWithRef||!(0,Su.schemaHasRulesButRef)(s,l))){u.block(()=>F6(e,"$ref",l.all.$ref.definition));return}i.jtd||Fq(e,t),u.block(()=>{for(const f of l.rules)p(f);p(l.post)});function p(f){(0,dm.shouldUseGroup)(s,f)&&(f.type?(u.if((0,up.checkDataType)(f.type,o,i.strictNumbers)),Gv(e,f),t.length===1&&t[0]===f.type&&r&&(u.else(),(0,up.reportTypeError)(e)),u.endIf()):Gv(e,f),a||u.if((0,Ve._)`${Ye.default.errors} === ${n||0}`))}}function Gv(e,t){const{gen:r,schema:n,opts:{useDefaults:u}}=e;u&&(0,aq.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,dm.shouldUseRule)(n,s)&&F6(e,s.keyword,s.definition,t.type)})}function Fq(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Cq(e,t),e.opts.allowUnionTypes||bq(e,t),Sq(e,e.dataTypes))}function Cq(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{g6(e.dataTypes,r)||Dm(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),_q(e,t)}}function bq(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&Dm(e,"use allowUnionTypes to allow union type keyword")}function Sq(e,t){const r=e.self.RULES.all;for(const n in r){const u=r[n];if(typeof u=="object"&&(0,dm.shouldUseRule)(e.schema,u)){const{type:s}=u.definition;s.length&&!s.some(o=>wq(t,o))&&Dm(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function wq(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function g6(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function _q(e,t){const r=[];for(const n of e.dataTypes)g6(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function Dm(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Su.checkStrictMode)(e,t,e.opts.strictTypes)}let A6=class{constructor(t,r,n){if((0,hi.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Su.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",C6(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,hi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ye.default.errors))}result(t,r,n){this.failResult((0,Ve.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Ve.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,Ve._)`${r} !== undefined && (${(0,Ve.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ua.reportExtraError:Ua.reportError)(this,this.def.error,r)}$dataError(){(0,Ua.reportError)(this,this.def.$dataError||Ua.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ua.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Ve.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Ve.nil,r=Ve.nil){if(!this.$data)return;const{gen:n,schemaCode:u,schemaType:s,def:o}=this;n.if((0,Ve.or)((0,Ve._)`${u} === undefined`,r)),t!==Ve.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Ve.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:u,it:s}=this;return(0,Ve.or)(o(),a());function o(){if(n.length){if(!(r instanceof Ve.Name))throw new Error("ajv implementation error");const i=Array.isArray(n)?n:[n];return(0,Ve._)`${(0,up.checkDataTypes)(i,r,s.opts.strictNumbers,up.DataType.Wrong)}`}return Ve.nil}function a(){if(u.validateSchema){const i=t.scopeValue("validate$data",{ref:u.validateSchema});return(0,Ve._)`!${i}(${r})`}return Ve.nil}}subschema(t,r){const n=(0,Zf.getSubschema)(this.it,t);(0,Zf.extendSubschemaData)(n,this.it,t),(0,Zf.extendSubschemaMode)(n,t);const u={...this.it,...n,items:void 0,props:void 0};return Dq(u,r),u}mergeEvaluated(t,r){const{it:n,gen:u}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Su.mergeEvaluated.props(u,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Su.mergeEvaluated.items(u,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:u}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return u.if(r,()=>this.mergeEvaluated(t,Ve.Name)),!0}};Rn.KeywordCxt=A6;function F6(e,t,r,n){const u=new A6(e,r,t);"code"in r?r.code(u,n):u.$data&&r.validate?(0,hi.funcKeywordCode)(u,r):"macro"in r?(0,hi.macroKeywordCode)(u,r):(r.compile||r.validate)&&(0,hi.funcKeywordCode)(u,r)}const Bq=/^\/(?:[^~]|~0|~1)*$/,Tq=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function C6(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let u,s;if(e==="")return Ye.default.rootData;if(e[0]==="/"){if(!Bq.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);u=e,s=Ye.default.rootData}else{const c=Tq.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const l=+c[1];if(u=c[2],u==="#"){if(l>=t)throw new Error(i("property/index",l));return n[t-l]}if(l>t)throw new Error(i("data",l));if(s=r[t-l],!u)return s}let o=s;const a=u.split("/");for(const c of a)c&&(s=(0,Ve._)`${s}${(0,Ve.getProperty)((0,Su.unescapeJsonPointer)(c))}`,o=(0,Ve._)`${o} && ${s}`);return o;function i(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Rn.getData=C6;var Qi={};Object.defineProperty(Qi,"__esModule",{value:!0});let $q=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};Qi.default=$q;var ec={};Object.defineProperty(ec,"__esModule",{value:!0});const Qf=vr;let Pq=class extends Error{constructor(t,r,n,u){super(u||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Qf.resolveUrl)(t,r,n),this.missingSchema=(0,Qf.normalizeId)((0,Qf.getFullPath)(t,this.missingRef))}};ec.default=Pq;var Ur={};Object.defineProperty(Ur,"__esModule",{value:!0});Ur.resolveSchema=Ur.getCompilingSchema=Ur.resolveRef=Ur.compileSchema=Ur.SchemaEnv=void 0;const bn=lt,Oq=Qi,ks=cu,Nn=vr,Vv=vt,kq=Rn;let Mp=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,Nn.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Ur.SchemaEnv=Mp;function hm(e){const t=b6.call(this,e);if(t)return t;const r=(0,Nn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:u}=this.opts.code,{ownProperties:s}=this.opts,o=new bn.CodeGen(this.scope,{es5:n,lines:u,ownProperties:s});let a;e.$async&&(a=o.scopeValue("Error",{ref:Oq.default,code:(0,bn._)`require("ajv/dist/runtime/validation_error").default`}));const i=o.scopeName("validate");e.validateName=i;const c={gen:o,allErrors:this.opts.allErrors,data:ks.default.data,parentData:ks.default.parentData,parentDataProperty:ks.default.parentDataProperty,dataNames:[ks.default.data],dataPathArr:[bn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,bn.stringify)(e.schema)}:{ref:e.schema}),validateName:i,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:bn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,bn._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,kq.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const p=o.toString();l=`${o.scopeRefs(ks.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const d=new Function(`${ks.default.self}`,`${ks.default.scope}`,l)(this,this.scope.get());if(this.scope.value(i,{ref:d}),d.errors=null,d.schema=e.schema,d.schemaEnv=e,e.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:i,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:E}=c;d.evaluated={props:h instanceof bn.Name?void 0:h,items:E instanceof bn.Name?void 0:E,dynamicProps:h instanceof bn.Name,dynamicItems:E instanceof bn.Name},d.source&&(d.source.evaluated=(0,bn.stringify)(d.evaluated))}return e.validate=d,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}Ur.compileSchema=hm;function Iq(e,t,r){var n;r=(0,Nn.resolveUrl)(this.opts.uriResolver,t,r);const u=e.refs[r];if(u)return u;let s=xq.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new Mp({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Nq.call(this,s)}Ur.resolveRef=Iq;function Nq(e){return(0,Nn.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:hm.call(this,e)}function b6(e){for(const t of this._compilations)if(qq(t,e))return t}Ur.getCompilingSchema=b6;function qq(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function xq(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||Lp.call(this,e,t)}function Lp(e,t){const r=this.opts.uriResolver.parse(t),n=(0,Nn._getFullPath)(this.opts.uriResolver,r);let u=(0,Nn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===u)return e1.call(this,r,e);const s=(0,Nn.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const a=Lp.call(this,e,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:e1.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||hm.call(this,o),s===(0,Nn.normalizeId)(t)){const{schema:a}=o,{schemaId:i}=this.opts,c=a[i];return c&&(u=(0,Nn.resolveUrl)(this.opts.uriResolver,u,c)),new Mp({schema:a,schemaId:i,root:e,baseId:u})}return e1.call(this,r,o)}}Ur.resolveSchema=Lp;const Rq=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function e1(e,{baseId:t,schema:r,root:n}){var u;if(((u=e.fragment)===null||u===void 0?void 0:u[0])!=="/")return;for(const a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const i=r[(0,Vv.unescapeFragment)(a)];if(i===void 0)return;r=i;const c=typeof r=="object"&&r[this.opts.schemaId];!Rq.has(a)&&c&&(t=(0,Nn.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,Vv.schemaHasRulesButRef)(r,this.RULES)){const a=(0,Nn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=Lp.call(this,n,a)}const{schemaId:o}=this.opts;if(s=s||new Mp({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const jq="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Mq="Meta-schema for $data reference (JSON AnySchema extension proposal)",Lq="object",Uq=["$data"],Gq={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},Vq=!1,Hq={$id:jq,description:Mq,type:Lq,required:Uq,properties:Gq,additionalProperties:Vq};var mm={},sp={},Wq={get exports(){return sp},set exports(e){sp=e}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(Ys,function(r){function n(){for(var R=arguments.length,T=Array(R),M=0;M1){T[0]=T[0].slice(0,-1);for(var K=T.length-1,z=1;z= 0x80 (not a basic code point)","invalid-input":"Invalid input"},te=E-A,Y=Math.floor,oe=String.fromCharCode;function ie(R){throw new RangeError(W[R])}function fe(R,T){for(var M=[],K=R.length;K--;)M[K]=T(R[K]);return M}function De(R,T){var M=R.split("@"),K="";M.length>1&&(K=M[0]+"@",R=M[1]),R=R.replace(j,".");var z=R.split("."),me=fe(z,T).join(".");return K+me}function de(R){for(var T=[],M=0,K=R.length;M=55296&&z<=56319&&M>1,T+=Y(T/M);T>te*m>>1;z+=E)T=Y(T/te);return Y(z+(te+1)*T/(T+y))},v=function(T){var M=[],K=T.length,z=0,me=P,ve=B,Oe=T.lastIndexOf($);Oe<0&&(Oe=0);for(var Me=0;Me=128&&ie("not-basic"),M.push(T.charCodeAt(Me));for(var et=Oe>0?Oe+1:0;et=K&&ie("invalid-input");var Fe=pe(T.charCodeAt(et++));(Fe>=E||Fe>Y((h-z)/Je))&&ie("overflow"),z+=Fe*Je;var We=tt<=ve?A:tt>=ve+m?m:tt-ve;if(FeY(h/nt)&&ie("overflow"),Je*=nt}var Ke=M.length+1;ve=q(z-$e,Ke,$e==0),Y(z/Ke)>h-me&&ie("overflow"),me+=Y(z/Ke),z%=Ke,M.splice(z++,0,me)}return String.fromCodePoint.apply(String,M)},C=function(T){var M=[];T=de(T);var K=T.length,z=P,me=0,ve=B,Oe=!0,Me=!1,et=void 0;try{for(var $e=T[Symbol.iterator](),Je;!(Oe=(Je=$e.next()).done);Oe=!0){var tt=Je.value;tt<128&&M.push(oe(tt))}}catch(Pr){Me=!0,et=Pr}finally{try{!Oe&&$e.return&&$e.return()}finally{if(Me)throw et}}var Fe=M.length,We=Fe;for(Fe&&M.push($);We=z&&frY((h-me)/Ft)&&ie("overflow"),me+=(nt-z)*Ft,z=nt;var At=!0,dr=!1,Ht=void 0;try{for(var Kr=T[Symbol.iterator](),Bs;!(At=(Bs=Kr.next()).done);At=!0){var Ts=Bs.value;if(Tsh&&ie("overflow"),Ts==z){for(var vn=me,$r=E;;$r+=E){var yn=$r<=ve?A:$r>=ve+m?m:$r-ve;if(vn>6|192).toString(16).toUpperCase()+"%"+(T&63|128).toString(16).toUpperCase():M="%"+(T>>12|224).toString(16).toUpperCase()+"%"+(T>>6&63|128).toString(16).toUpperCase()+"%"+(T&63|128).toString(16).toUpperCase(),M}function x(R){for(var T="",M=0,K=R.length;M=194&&z<224){if(K-M>=6){var me=parseInt(R.substr(M+4,2),16);T+=String.fromCharCode((z&31)<<6|me&63)}else T+=R.substr(M,6);M+=6}else if(z>=224){if(K-M>=9){var ve=parseInt(R.substr(M+4,2),16),Oe=parseInt(R.substr(M+7,2),16);T+=String.fromCharCode((z&15)<<12|(ve&63)<<6|Oe&63)}else T+=R.substr(M,9);M+=9}else T+=R.substr(M,3),M+=3}return T}function k(R,T){function M(K){var z=x(K);return z.match(T.UNRESERVED)?z:K}return R.scheme&&(R.scheme=String(R.scheme).replace(T.PCT_ENCODED,M).toLowerCase().replace(T.NOT_SCHEME,"")),R.userinfo!==void 0&&(R.userinfo=String(R.userinfo).replace(T.PCT_ENCODED,M).replace(T.NOT_USERINFO,w).replace(T.PCT_ENCODED,o)),R.host!==void 0&&(R.host=String(R.host).replace(T.PCT_ENCODED,M).toLowerCase().replace(T.NOT_HOST,w).replace(T.PCT_ENCODED,o)),R.path!==void 0&&(R.path=String(R.path).replace(T.PCT_ENCODED,M).replace(R.scheme?T.NOT_PATH:T.NOT_PATH_NOSCHEME,w).replace(T.PCT_ENCODED,o)),R.query!==void 0&&(R.query=String(R.query).replace(T.PCT_ENCODED,M).replace(T.NOT_QUERY,w).replace(T.PCT_ENCODED,o)),R.fragment!==void 0&&(R.fragment=String(R.fragment).replace(T.PCT_ENCODED,M).replace(T.NOT_FRAGMENT,w).replace(T.PCT_ENCODED,o)),R}function G(R){return R.replace(/^0*(.*)/,"$1")||"0"}function H(R,T){var M=R.match(T.IPV4ADDRESS)||[],K=f(M,2),z=K[1];return z?z.split(".").map(G).join("."):R}function re(R,T){var M=R.match(T.IPV6ADDRESS)||[],K=f(M,3),z=K[1],me=K[2];if(z){for(var ve=z.toLowerCase().split("::").reverse(),Oe=f(ve,2),Me=Oe[0],et=Oe[1],$e=et?et.split(":").map(G):[],Je=Me.split(":").map(G),tt=T.IPV4ADDRESS.test(Je[Je.length-1]),Fe=tt?7:8,We=Je.length-Fe,nt=Array(Fe),Ke=0;Ke1){var rr=nt.slice(0,kt.index),fr=nt.slice(kt.index+kt.length);It=rr.join(":")+"::"+fr.join(":")}else It=nt.join(":");return me&&(It+="%"+me),It}else return R}var _e=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Le="".match(/(){0}/)[1]===void 0;function Ue(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M={},K=T.iri!==!1?p:l;T.reference==="suffix"&&(R=(T.scheme?T.scheme+":":"")+"//"+R);var z=R.match(_e);if(z){Le?(M.scheme=z[1],M.userinfo=z[3],M.host=z[4],M.port=parseInt(z[5],10),M.path=z[6]||"",M.query=z[7],M.fragment=z[8],isNaN(M.port)&&(M.port=z[5])):(M.scheme=z[1]||void 0,M.userinfo=R.indexOf("@")!==-1?z[3]:void 0,M.host=R.indexOf("//")!==-1?z[4]:void 0,M.port=parseInt(z[5],10),M.path=z[6]||"",M.query=R.indexOf("?")!==-1?z[7]:void 0,M.fragment=R.indexOf("#")!==-1?z[8]:void 0,isNaN(M.port)&&(M.port=R.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?z[4]:void 0)),M.host&&(M.host=re(H(M.host,K),K)),M.scheme===void 0&&M.userinfo===void 0&&M.host===void 0&&M.port===void 0&&!M.path&&M.query===void 0?M.reference="same-document":M.scheme===void 0?M.reference="relative":M.fragment===void 0?M.reference="absolute":M.reference="uri",T.reference&&T.reference!=="suffix"&&T.reference!==M.reference&&(M.error=M.error||"URI is not a "+T.reference+" reference.");var me=b[(T.scheme||M.scheme||"").toLowerCase()];if(!T.unicodeSupport&&(!me||!me.unicodeSupport)){if(M.host&&(T.domainHost||me&&me.domainHost))try{M.host=O.toASCII(M.host.replace(K.PCT_ENCODED,x).toLowerCase())}catch(ve){M.error=M.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}k(M,l)}else k(M,K);me&&me.parse&&me.parse(M,T)}else M.error=M.error||"URI can not be parsed.";return M}function Ge(R,T){var M=T.iri!==!1?p:l,K=[];return R.userinfo!==void 0&&(K.push(R.userinfo),K.push("@")),R.host!==void 0&&K.push(re(H(String(R.host),M),M).replace(M.IPV6ADDRESS,function(z,me,ve){return"["+me+(ve?"%25"+ve:"")+"]"})),(typeof R.port=="number"||typeof R.port=="string")&&(K.push(":"),K.push(String(R.port))),K.length?K.join(""):void 0}var be=/^\.\.?\//,je=/^\/\.(\/|$)/,ke=/^\/\.\.(\/|$)/,Ie=/^\/?(?:.|\n)*?(?=\/|$)/;function ce(R){for(var T=[];R.length;)if(R.match(be))R=R.replace(be,"");else if(R.match(je))R=R.replace(je,"/");else if(R.match(ke))R=R.replace(ke,"/"),T.pop();else if(R==="."||R==="..")R="";else{var M=R.match(Ie);if(M){var K=M[0];R=R.slice(K.length),T.push(K)}else throw new Error("Unexpected dot segment condition")}return T.join("")}function Te(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=T.iri?p:l,K=[],z=b[(T.scheme||R.scheme||"").toLowerCase()];if(z&&z.serialize&&z.serialize(R,T),R.host&&!M.IPV6ADDRESS.test(R.host)){if(T.domainHost||z&&z.domainHost)try{R.host=T.iri?O.toUnicode(R.host):O.toASCII(R.host.replace(M.PCT_ENCODED,x).toLowerCase())}catch(Oe){R.error=R.error||"Host's domain name can not be converted to "+(T.iri?"Unicode":"ASCII")+" via punycode: "+Oe}}k(R,M),T.reference!=="suffix"&&R.scheme&&(K.push(R.scheme),K.push(":"));var me=Ge(R,T);if(me!==void 0&&(T.reference!=="suffix"&&K.push("//"),K.push(me),R.path&&R.path.charAt(0)!=="/"&&K.push("/")),R.path!==void 0){var ve=R.path;!T.absolutePath&&(!z||!z.absolutePath)&&(ve=ce(ve)),me===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),K.push(ve)}return R.query!==void 0&&(K.push("?"),K.push(R.query)),R.fragment!==void 0&&(K.push("#"),K.push(R.fragment)),K.join("")}function Z(R,T){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=arguments[3],z={};return K||(R=Ue(Te(R,M),M),T=Ue(Te(T,M),M)),M=M||{},!M.tolerant&&T.scheme?(z.scheme=T.scheme,z.userinfo=T.userinfo,z.host=T.host,z.port=T.port,z.path=ce(T.path||""),z.query=T.query):(T.userinfo!==void 0||T.host!==void 0||T.port!==void 0?(z.userinfo=T.userinfo,z.host=T.host,z.port=T.port,z.path=ce(T.path||""),z.query=T.query):(T.path?(T.path.charAt(0)==="/"?z.path=ce(T.path):((R.userinfo!==void 0||R.host!==void 0||R.port!==void 0)&&!R.path?z.path="/"+T.path:R.path?z.path=R.path.slice(0,R.path.lastIndexOf("/")+1)+T.path:z.path=T.path,z.path=ce(z.path)),z.query=T.query):(z.path=R.path,T.query!==void 0?z.query=T.query:z.query=R.query),z.userinfo=R.userinfo,z.host=R.host,z.port=R.port),z.scheme=R.scheme),z.fragment=T.fragment,z}function ae(R,T,M){var K=i({scheme:"null"},M);return Te(Z(Ue(R,K),Ue(T,K),K,!0),K)}function le(R,T){return typeof R=="string"?R=Te(Ue(R,T),T):s(R)==="object"&&(R=Ue(Te(R,T),T)),R}function N(R,T,M){return typeof R=="string"?R=Te(Ue(R,M),M):s(R)==="object"&&(R=Te(R,M)),typeof T=="string"?T=Te(Ue(T,M),M):s(T)==="object"&&(T=Te(T,M)),R===T}function S(R,T){return R&&R.toString().replace(!T||!T.iri?l.ESCAPE:p.ESCAPE,w)}function _(R,T){return R&&R.toString().replace(!T||!T.iri?l.PCT_ENCODED:p.PCT_ENCODED,x)}var L={scheme:"http",domainHost:!0,parse:function(T,M){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T},serialize:function(T,M){var K=String(T.scheme).toLowerCase()==="https";return(T.port===(K?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}},J={scheme:"https",domainHost:L.domainHost,parse:L.parse,serialize:L.serialize};function ee(R){return typeof R.secure=="boolean"?R.secure:String(R.scheme).toLowerCase()==="wss"}var ue={scheme:"ws",domainHost:!0,parse:function(T,M){var K=T;return K.secure=ee(K),K.resourceName=(K.path||"/")+(K.query?"?"+K.query:""),K.path=void 0,K.query=void 0,K},serialize:function(T,M){if((T.port===(ee(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){var K=T.resourceName.split("?"),z=f(K,2),me=z[0],ve=z[1];T.path=me&&me!=="/"?me:void 0,T.query=ve,T.resourceName=void 0}return T.fragment=void 0,T}},ge={scheme:"wss",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize},Be={},qe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Pe="[0-9A-Fa-f]",rt=u(u("%[EFef]"+Pe+"%"+Pe+Pe+"%"+Pe+Pe)+"|"+u("%[89A-Fa-f]"+Pe+"%"+Pe+Pe)+"|"+u("%"+Pe+Pe)),Ar="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",sn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",En=n(sn,'[\\"\\\\]'),xu="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Wn=new RegExp(qe,"g"),Qt=new RegExp(rt,"g"),Cs=new RegExp(n("[^]",Ar,"[\\.]",'[\\"]',En),"g"),fu=new RegExp(n("[^]",qe,xu),"g"),bs=fu;function zr(R){var T=x(R);return T.match(Wn)?T:R}var Ss={scheme:"mailto",parse:function(T,M){var K=T,z=K.to=K.path?K.path.split(","):[];if(K.path=void 0,K.query){for(var me=!1,ve={},Oe=K.query.split("&"),Me=0,et=Oe.length;Menew RegExp(Q,q);d.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},m={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function F(Q){var q,v,C,D,g,O,b,w,x,k,G,H,re,_e,Le,Ue,Ge,be,je,ke,Ie,ce,Te,Z,ae;const le=Q.strict,N=(q=Q.code)===null||q===void 0?void 0:q.optimize,S=N===!0||N===void 0?1:N||0,_=(C=(v=Q.code)===null||v===void 0?void 0:v.regExp)!==null&&C!==void 0?C:d,L=(D=Q.uriResolver)!==null&&D!==void 0?D:f.default;return{strictSchema:(O=(g=Q.strictSchema)!==null&&g!==void 0?g:le)!==null&&O!==void 0?O:!0,strictNumbers:(w=(b=Q.strictNumbers)!==null&&b!==void 0?b:le)!==null&&w!==void 0?w:!0,strictTypes:(k=(x=Q.strictTypes)!==null&&x!==void 0?x:le)!==null&&k!==void 0?k:"log",strictTuples:(H=(G=Q.strictTuples)!==null&&G!==void 0?G:le)!==null&&H!==void 0?H:"log",strictRequired:(_e=(re=Q.strictRequired)!==null&&re!==void 0?re:le)!==null&&_e!==void 0?_e:!1,code:Q.code?{...Q.code,optimize:S,regExp:_}:{optimize:S,regExp:_},loopRequired:(Le=Q.loopRequired)!==null&&Le!==void 0?Le:y,loopEnum:(Ue=Q.loopEnum)!==null&&Ue!==void 0?Ue:y,meta:(Ge=Q.meta)!==null&&Ge!==void 0?Ge:!0,messages:(be=Q.messages)!==null&&be!==void 0?be:!0,inlineRefs:(je=Q.inlineRefs)!==null&&je!==void 0?je:!0,schemaId:(ke=Q.schemaId)!==null&&ke!==void 0?ke:"$id",addUsedSchema:(Ie=Q.addUsedSchema)!==null&&Ie!==void 0?Ie:!0,validateSchema:(ce=Q.validateSchema)!==null&&ce!==void 0?ce:!0,validateFormats:(Te=Q.validateFormats)!==null&&Te!==void 0?Te:!0,unicodeRegExp:(Z=Q.unicodeRegExp)!==null&&Z!==void 0?Z:!0,int32range:(ae=Q.int32range)!==null&&ae!==void 0?ae:!0,uriResolver:L}}class B{constructor(q={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,q=this.opts={...q,...F(q)};const{es5:v,lines:C}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:E,es5:v,lines:C}),this.logger=Y(q.logger);const D=q.validateFormats;q.validateFormats=!1,this.RULES=(0,s.getRules)(),P.call(this,A,q,"NOT SUPPORTED"),P.call(this,m,q,"DEPRECATED","warn"),this._metaOpts=W.call(this),q.formats&&U.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),q.keywords&&j.call(this,q.keywords),typeof q.meta=="object"&&this.addMetaSchema(q.meta),I.call(this),q.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:q,meta:v,schemaId:C}=this.opts;let D=p;C==="id"&&(D={...p},D.id=D.$id,delete D.$id),v&&q&&this.addMetaSchema(D,D[C],!1)}defaultMeta(){const{meta:q,schemaId:v}=this.opts;return this.opts.defaultMeta=typeof q=="object"?q[v]||q:void 0}validate(q,v){let C;if(typeof q=="string"){if(C=this.getSchema(q),!C)throw new Error(`no schema with key or ref "${q}"`)}else C=this.compile(q);const D=C(v);return"$async"in C||(this.errors=C.errors),D}compile(q,v){const C=this._addSchema(q,v);return C.validate||this._compileSchemaEnv(C)}compileAsync(q,v){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:C}=this.opts;return D.call(this,q,v);async function D(k,G){await g.call(this,k.$schema);const H=this._addSchema(k,G);return H.validate||O.call(this,H)}async function g(k){k&&!this.getSchema(k)&&await D.call(this,{$ref:k},!0)}async function O(k){try{return this._compileSchemaEnv(k)}catch(G){if(!(G instanceof u.default))throw G;return b.call(this,G),await w.call(this,G.missingSchema),O.call(this,k)}}function b({missingSchema:k,missingRef:G}){if(this.refs[k])throw new Error(`AnySchema ${k} is loaded but ${G} cannot be resolved`)}async function w(k){const G=await x.call(this,k);this.refs[k]||await g.call(this,G.$schema),this.refs[k]||this.addSchema(G,k,v)}async function x(k){const G=this._loading[k];if(G)return G;try{return await(this._loading[k]=C(k))}finally{delete this._loading[k]}}}addSchema(q,v,C,D=this.opts.validateSchema){if(Array.isArray(q)){for(const O of q)this.addSchema(O,void 0,C,D);return this}let g;if(typeof q=="object"){const{schemaId:O}=this.opts;if(g=q[O],g!==void 0&&typeof g!="string")throw new Error(`schema ${O} must be string`)}return v=(0,i.normalizeId)(v||g),this._checkUnique(v),this.schemas[v]=this._addSchema(q,C,v,D,!0),this}addMetaSchema(q,v,C=this.opts.validateSchema){return this.addSchema(q,v,!0,C),this}validateSchema(q,v){if(typeof q=="boolean")return!0;let C;if(C=q.$schema,C!==void 0&&typeof C!="string")throw new Error("$schema must be a string");if(C=C||this.opts.defaultMeta||this.defaultMeta(),!C)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(C,q);if(!D&&v){const g="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(g);else throw new Error(g)}return D}getSchema(q){let v;for(;typeof(v=$.call(this,q))=="string";)q=v;if(v===void 0){const{schemaId:C}=this.opts,D=new o.SchemaEnv({schema:{},schemaId:C});if(v=o.resolveSchema.call(this,D,q),!v)return;this.refs[q]=v}return v.validate||this._compileSchemaEnv(v)}removeSchema(q){if(q instanceof RegExp)return this._removeAllSchemas(this.schemas,q),this._removeAllSchemas(this.refs,q),this;switch(typeof q){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const v=$.call(this,q);return typeof v=="object"&&this._cache.delete(v.schema),delete this.schemas[q],delete this.refs[q],this}case"object":{const v=q;this._cache.delete(v);let C=q[this.opts.schemaId];return C&&(C=(0,i.normalizeId)(C),delete this.schemas[C],delete this.refs[C]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(q){for(const v of q)this.addKeyword(v);return this}addKeyword(q,v){let C;if(typeof q=="string")C=q,typeof v=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),v.keyword=C);else if(typeof q=="object"&&v===void 0){if(v=q,C=v.keyword,Array.isArray(C)&&!C.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ie.call(this,C,v),!v)return(0,l.eachItem)(C,g=>fe.call(this,g)),this;de.call(this,v);const D={...v,type:(0,c.getJSONTypes)(v.type),schemaType:(0,c.getJSONTypes)(v.schemaType)};return(0,l.eachItem)(C,D.type.length===0?g=>fe.call(this,g,D):g=>D.type.forEach(O=>fe.call(this,g,D,O))),this}getKeyword(q){const v=this.RULES.all[q];return typeof v=="object"?v.definition:!!v}removeKeyword(q){const{RULES:v}=this;delete v.keywords[q],delete v.all[q];for(const C of v.rules){const D=C.rules.findIndex(g=>g.keyword===q);D>=0&&C.rules.splice(D,1)}return this}addFormat(q,v){return typeof v=="string"&&(v=new RegExp(v)),this.formats[q]=v,this}errorsText(q=this.errors,{separator:v=", ",dataVar:C="data"}={}){return!q||q.length===0?"No errors":q.map(D=>`${C}${D.instancePath} ${D.message}`).reduce((D,g)=>D+v+g)}$dataMetaSchema(q,v){const C=this.RULES.all;q=JSON.parse(JSON.stringify(q));for(const D of v){const g=D.split("/").slice(1);let O=q;for(const b of g)O=O[b];for(const b in C){const w=C[b];if(typeof w!="object")continue;const{$data:x}=w.definition,k=O[b];x&&k&&(O[b]=pe(k))}}return q}_removeAllSchemas(q,v){for(const C in q){const D=q[C];(!v||v.test(C))&&(typeof D=="string"?delete q[C]:D&&!D.meta&&(this._cache.delete(D.schema),delete q[C]))}}_addSchema(q,v,C,D=this.opts.validateSchema,g=this.opts.addUsedSchema){let O;const{schemaId:b}=this.opts;if(typeof q=="object")O=q[b];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof q!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(q);if(w!==void 0)return w;C=(0,i.normalizeId)(O||C);const x=i.getSchemaRefs.call(this,q,C);return w=new o.SchemaEnv({schema:q,schemaId:b,meta:v,baseId:C,localRefs:x}),this._cache.set(w.schema,w),g&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=w),D&&this.validateSchema(q,!0),w}_checkUnique(q){if(this.schemas[q]||this.refs[q])throw new Error(`schema with key or id "${q}" already exists`)}_compileSchemaEnv(q){if(q.meta?this._compileMetaSchema(q):o.compileSchema.call(this,q),!q.validate)throw new Error("ajv implementation error");return q.validate}_compileMetaSchema(q){const v=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,q)}finally{this.opts=v}}}e.default=B,B.ValidationError=n.default,B.MissingRefError=u.default;function P(Q,q,v,C="error"){for(const D in Q){const g=D;g in q&&this.logger[C](`${v}: option ${D}. ${Q[g]}`)}}function $(Q){return Q=(0,i.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function I(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const q in Q)this.addSchema(Q[q],q)}function U(){for(const Q in this.opts.formats){const q=this.opts.formats[Q];q&&this.addFormat(Q,q)}}function j(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const q in Q){const v=Q[q];v.keyword||(v.keyword=q),this.addKeyword(v)}}function W(){const Q={...this.opts};for(const q of h)delete Q[q];return Q}const te={log(){},warn(){},error(){}};function Y(Q){if(Q===!1)return te;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function ie(Q,q){const{RULES:v}=this;if((0,l.eachItem)(Q,C=>{if(v.keywords[C])throw new Error(`Keyword ${C} is already defined`);if(!oe.test(C))throw new Error(`Keyword ${C} has invalid name`)}),!!q&&q.$data&&!("code"in q||"validate"in q))throw new Error('$data keyword must have "code" or "validate" function')}function fe(Q,q,v){var C;const D=q==null?void 0:q.post;if(v&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:g}=this;let O=D?g.post:g.rules.find(({type:w})=>w===v);if(O||(O={type:v,rules:[]},g.rules.push(O)),g.keywords[Q]=!0,!q)return;const b={keyword:Q,definition:{...q,type:(0,c.getJSONTypes)(q.type),schemaType:(0,c.getJSONTypes)(q.schemaType)}};q.before?De.call(this,O,b,q.before):O.rules.push(b),g.all[Q]=b,(C=q.implements)===null||C===void 0||C.forEach(w=>this.addKeyword(w))}function De(Q,q,v){const C=Q.rules.findIndex(D=>D.keyword===v);C>=0?Q.rules.splice(C,0,q):(Q.rules.push(q),this.logger.warn(`rule ${v} is not defined`))}function de(Q){let{metaSchema:q}=Q;q!==void 0&&(Q.$data&&this.opts.$data&&(q=pe(q)),Q.validateSchema=this.compile(q,!0))}const Ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(Q){return{anyOf:[Q,Ce]}}})(t6);var Em={},vm={},ym={};Object.defineProperty(ym,"__esModule",{value:!0});const Jq={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};ym.default=Jq;var so={};Object.defineProperty(so,"__esModule",{value:!0});so.callRef=so.getValidate=void 0;const zq=ec,Hv=at,qr=lt,bo=cu,Wv=Ur,jc=vt,Kq={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:u,schemaEnv:s,validateName:o,opts:a,self:i}=n,{root:c}=s;if((r==="#"||r==="#/")&&u===c.baseId)return p();const l=Wv.resolveRef.call(i,c,u,r);if(l===void 0)throw new zq.default(n.opts.uriResolver,u,r);if(l instanceof Wv.SchemaEnv)return f(l);return d(l);function p(){if(s===c)return bl(e,o,s,s.$async);const h=t.scopeValue("root",{ref:c});return bl(e,(0,qr._)`${h}.validate`,c,c.$async)}function f(h){const E=w6(e,h);bl(e,E,h,h.$async)}function d(h){const E=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,qr.stringify)(h)}:{ref:h}),A=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:qr.nil,topSchemaRef:E,errSchemaPath:r},A);e.mergeEvaluated(m),e.ok(A)}}};function w6(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,qr._)`${r.scopeValue("wrapper",{ref:t})}.validate`}so.getValidate=w6;function bl(e,t,r,n){const{gen:u,it:s}=e,{allErrors:o,schemaEnv:a,opts:i}=s,c=i.passContext?bo.default.this:qr.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=u.let("valid");u.try(()=>{u.code((0,qr._)`await ${(0,Hv.callValidateCode)(e,t,c)}`),d(t),o||u.assign(h,!0)},E=>{u.if((0,qr._)`!(${E} instanceof ${s.ValidationError})`,()=>u.throw(E)),f(E),o||u.assign(h,!1)}),e.ok(h)}function p(){e.result((0,Hv.callValidateCode)(e,t,c),()=>d(t),()=>f(t))}function f(h){const E=(0,qr._)`${h}.errors`;u.assign(bo.default.vErrors,(0,qr._)`${bo.default.vErrors} === null ? ${E} : ${bo.default.vErrors}.concat(${E})`),u.assign(bo.default.errors,(0,qr._)`${bo.default.vErrors}.length`)}function d(h){var E;if(!s.opts.unevaluated)return;const A=(E=r==null?void 0:r.validate)===null||E===void 0?void 0:E.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=jc.mergeEvaluated.props(u,A.props,s.props));else{const m=u.var("props",(0,qr._)`${h}.evaluated.props`);s.props=jc.mergeEvaluated.props(u,m,s.props,qr.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=jc.mergeEvaluated.items(u,A.items,s.items));else{const m=u.var("items",(0,qr._)`${h}.evaluated.items`);s.items=jc.mergeEvaluated.items(u,m,s.items,qr.Name)}}}so.callRef=bl;so.default=Kq;Object.defineProperty(vm,"__esModule",{value:!0});const Xq=ym,Yq=so,Zq=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Xq.default,Yq.default];vm.default=Zq;var gm={},Am={};Object.defineProperty(Am,"__esModule",{value:!0});const op=lt,Uu=op.operators,ap={maximum:{okStr:"<=",ok:Uu.LTE,fail:Uu.GT},minimum:{okStr:">=",ok:Uu.GTE,fail:Uu.LT},exclusiveMaximum:{okStr:"<",ok:Uu.LT,fail:Uu.GTE},exclusiveMinimum:{okStr:">",ok:Uu.GT,fail:Uu.LTE}},Qq={message:({keyword:e,schemaCode:t})=>(0,op.str)`must be ${ap[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,op._)`{comparison: ${ap[e].okStr}, limit: ${t}}`},ex={keyword:Object.keys(ap),type:"number",schemaType:"number",$data:!0,error:Qq,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,op._)`${r} ${ap[t].fail} ${n} || isNaN(${r})`)}};Am.default=ex;var Fm={};Object.defineProperty(Fm,"__esModule",{value:!0});const mi=lt,tx={message:({schemaCode:e})=>(0,mi.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,mi._)`{multipleOf: ${e}}`},rx={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:tx,code(e){const{gen:t,data:r,schemaCode:n,it:u}=e,s=u.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,mi._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,mi._)`${o} !== parseInt(${o})`;e.fail$data((0,mi._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};Fm.default=rx;var Cm={},bm={};Object.defineProperty(bm,"__esModule",{value:!0});function _6(e){const t=e.length;let r=0,n=0,u;for(;n=55296&&u<=56319&&n(0,Ls._)`{limit: ${e}}`},ox={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:sx,code(e){const{keyword:t,data:r,schemaCode:n,it:u}=e,s=t==="maxLength"?Ls.operators.GT:Ls.operators.LT,o=u.opts.unicode===!1?(0,Ls._)`${r}.length`:(0,Ls._)`${(0,nx.useFunc)(e.gen,ux.default)}(${r})`;e.fail$data((0,Ls._)`${o} ${s} ${n}`)}};Cm.default=ox;var Sm={};Object.defineProperty(Sm,"__esModule",{value:!0});const ax=at,ip=lt,ix={message:({schemaCode:e})=>(0,ip.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,ip._)`{pattern: ${e}}`},cx={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:ix,code(e){const{data:t,$data:r,schema:n,schemaCode:u,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?(0,ip._)`(new RegExp(${u}, ${o}))`:(0,ax.usePattern)(e,n);e.fail$data((0,ip._)`!${a}.test(${t})`)}};Sm.default=cx;var wm={};Object.defineProperty(wm,"__esModule",{value:!0});const Ei=lt,lx={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Ei.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ei._)`{limit: ${e}}`},px={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:lx,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxProperties"?Ei.operators.GT:Ei.operators.LT;e.fail$data((0,Ei._)`Object.keys(${r}).length ${u} ${n}`)}};wm.default=px;var _m={};Object.defineProperty(_m,"__esModule",{value:!0});const Ga=at,vi=lt,fx=vt,dx={message:({params:{missingProperty:e}})=>(0,vi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,vi._)`{missingProperty: ${e}}`},Dx={keyword:"required",type:"object",schemaType:"array",$data:!0,error:dx,code(e){const{gen:t,schema:r,schemaCode:n,data:u,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;const i=r.length>=a.loopRequired;if(o.allErrors?c():l(),a.strictRequired){const d=e.parentSchema.properties,{definedProperties:h}=e.it;for(const E of r)if((d==null?void 0:d[E])===void 0&&!h.has(E)){const A=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${E}" is not defined at "${A}" (strictRequired)`;(0,fx.checkStrictMode)(o,m,o.opts.strictRequired)}}function c(){if(i||s)e.block$data(vi.nil,p);else for(const d of r)(0,Ga.checkReportMissingProp)(e,d)}function l(){const d=t.let("missing");if(i||s){const h=t.let("valid",!0);e.block$data(h,()=>f(d,h)),e.ok(h)}else t.if((0,Ga.checkMissingProp)(e,r,d)),(0,Ga.reportMissingProp)(e,d),t.else()}function p(){t.forOf("prop",n,d=>{e.setParams({missingProperty:d}),t.if((0,Ga.noPropertyInData)(t,u,d,a.ownProperties),()=>e.error())})}function f(d,h){e.setParams({missingProperty:d}),t.forOf(d,n,()=>{t.assign(h,(0,Ga.propertyInData)(t,u,d,a.ownProperties)),t.if((0,vi.not)(h),()=>{e.error(),t.break()})},vi.nil)}}};_m.default=Dx;var Bm={};Object.defineProperty(Bm,"__esModule",{value:!0});const yi=lt,hx={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,yi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,yi._)`{limit: ${e}}`},mx={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:hx,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxItems"?yi.operators.GT:yi.operators.LT;e.fail$data((0,yi._)`${r}.length ${u} ${n}`)}};Bm.default=mx;var Tm={},tc={};Object.defineProperty(tc,"__esModule",{value:!0});const B6=c6;B6.code='require("ajv/dist/runtime/equal").default';tc.default=B6;Object.defineProperty(Tm,"__esModule",{value:!0});const t1=Zi,hr=lt,Ex=vt,vx=tc,yx={message:({params:{i:e,j:t}})=>(0,hr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,hr._)`{i: ${e}, j: ${t}}`},gx={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:yx,code(e){const{gen:t,data:r,$data:n,schema:u,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!u)return;const i=t.let("valid"),c=s.items?(0,t1.getSchemaTypes)(s.items):[];e.block$data(i,l,(0,hr._)`${o} === false`),e.ok(i);function l(){const h=t.let("i",(0,hr._)`${r}.length`),E=t.let("j");e.setParams({i:h,j:E}),t.assign(i,!0),t.if((0,hr._)`${h} > 1`,()=>(p()?f:d)(h,E))}function p(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,E){const A=t.name("item"),m=(0,t1.checkDataTypes)(c,A,a.opts.strictNumbers,t1.DataType.Wrong),y=t.const("indices",(0,hr._)`{}`);t.for((0,hr._)`;${h}--;`,()=>{t.let(A,(0,hr._)`${r}[${h}]`),t.if(m,(0,hr._)`continue`),c.length>1&&t.if((0,hr._)`typeof ${A} == "string"`,(0,hr._)`${A} += "_"`),t.if((0,hr._)`typeof ${y}[${A}] == "number"`,()=>{t.assign(E,(0,hr._)`${y}[${A}]`),e.error(),t.assign(i,!1).break()}).code((0,hr._)`${y}[${A}] = ${h}`)})}function d(h,E){const A=(0,Ex.useFunc)(t,vx.default),m=t.name("outer");t.label(m).for((0,hr._)`;${h}--;`,()=>t.for((0,hr._)`${E} = ${h}; ${E}--;`,()=>t.if((0,hr._)`${A}(${r}[${h}], ${r}[${E}])`,()=>{e.error(),t.assign(i,!1).break(m)})))}}};Tm.default=gx;var $m={};Object.defineProperty($m,"__esModule",{value:!0});const R2=lt,Ax=vt,Fx=tc,Cx={message:"must be equal to constant",params:({schemaCode:e})=>(0,R2._)`{allowedValue: ${e}}`},bx={keyword:"const",$data:!0,error:Cx,code(e){const{gen:t,data:r,$data:n,schemaCode:u,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,R2._)`!${(0,Ax.useFunc)(t,Fx.default)}(${r}, ${u})`):e.fail((0,R2._)`${s} !== ${r}`)}};$m.default=bx;var Pm={};Object.defineProperty(Pm,"__esModule",{value:!0});const ii=lt,Sx=vt,wx=tc,_x={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ii._)`{allowedValues: ${e}}`},Bx={keyword:"enum",schemaType:"array",$data:!0,error:_x,code(e){const{gen:t,data:r,$data:n,schema:u,schemaCode:s,it:o}=e;if(!n&&u.length===0)throw new Error("enum must have non-empty array");const a=u.length>=o.opts.loopEnum;let i;const c=()=>i??(i=(0,Sx.useFunc)(t,wx.default));let l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const d=t.const("vSchema",s);l=(0,ii.or)(...u.map((h,E)=>f(d,E)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,d=>t.if((0,ii._)`${c()}(${r}, ${d})`,()=>t.assign(l,!0).break()))}function f(d,h){const E=u[h];return typeof E=="object"&&E!==null?(0,ii._)`${c()}(${r}, ${d}[${h}])`:(0,ii._)`${r} === ${E}`}}};Pm.default=Bx;Object.defineProperty(gm,"__esModule",{value:!0});const Tx=Am,$x=Fm,Px=Cm,Ox=Sm,kx=wm,Ix=_m,Nx=Bm,qx=Tm,xx=$m,Rx=Pm,jx=[Tx.default,$x.default,Px.default,Ox.default,kx.default,Ix.default,Nx.default,qx.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},xx.default,Rx.default];gm.default=jx;var Om={},Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});Ba.validateAdditionalItems=void 0;const Us=lt,j2=vt,Mx={message:({params:{len:e}})=>(0,Us.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Us._)`{limit: ${e}}`},Lx={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Mx,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,j2.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}T6(e,n)}};function T6(e,t){const{gen:r,schema:n,data:u,keyword:s,it:o}=e;o.items=!0;const a=r.const("len",(0,Us._)`${u}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Us._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,j2.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,Us._)`${a} <= ${t.length}`);r.if((0,Us.not)(c),()=>i(c)),e.ok(c)}function i(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:j2.Type.Num},c),o.allErrors||r.if((0,Us.not)(c),()=>r.break())})}}Ba.validateAdditionalItems=T6;Ba.default=Lx;var km={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateTuple=void 0;const Jv=lt,Sl=vt,Ux=at,Gx={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return $6(e,"additionalItems",t);r.items=!0,!(0,Sl.alwaysValidSchema)(r,t)&&e.ok((0,Ux.validateArray)(e))}};function $6(e,t,r=e.schema){const{gen:n,parentSchema:u,data:s,keyword:o,it:a}=e;l(u),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Sl.mergeEvaluated.items(n,r.length,a.items));const i=n.name("valid"),c=n.const("len",(0,Jv._)`${s}.length`);r.forEach((p,f)=>{(0,Sl.alwaysValidSchema)(a,p)||(n.if((0,Jv._)`${c} > ${f}`,()=>e.subschema({keyword:o,schemaProp:f,dataProp:f},i)),e.ok(i))});function l(p){const{opts:f,errSchemaPath:d}=a,h=r.length,E=h===p.minItems&&(h===p.maxItems||p[t]===!1);if(f.strictTuples&&!E){const A=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${d}"`;(0,Sl.checkStrictMode)(a,A,f.strictTuples)}}}Ta.validateTuple=$6;Ta.default=Gx;Object.defineProperty(km,"__esModule",{value:!0});const Vx=Ta,Hx={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Vx.validateTuple)(e,"items")};km.default=Hx;var Im={};Object.defineProperty(Im,"__esModule",{value:!0});const zv=lt,Wx=vt,Jx=at,zx=Ba,Kx={message:({params:{len:e}})=>(0,zv.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,zv._)`{limit: ${e}}`},Xx={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Kx,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:u}=r;n.items=!0,!(0,Wx.alwaysValidSchema)(n,t)&&(u?(0,zx.validateAdditionalItems)(e,u):e.ok((0,Jx.validateArray)(e)))}};Im.default=Xx;var Nm={};Object.defineProperty(Nm,"__esModule",{value:!0});const pn=lt,Mc=vt,Yx={message:({params:{min:e,max:t}})=>t===void 0?(0,pn.str)`must contain at least ${e} valid item(s)`:(0,pn.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,pn._)`{minContains: ${e}}`:(0,pn._)`{minContains: ${e}, maxContains: ${t}}`},Zx={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Yx,code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;let o,a;const{minContains:i,maxContains:c}=n;s.opts.next?(o=i===void 0?1:i,a=c):o=1;const l=t.const("len",(0,pn._)`${u}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,Mc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Mc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Mc.alwaysValidSchema)(s,r)){let E=(0,pn._)`${l} >= ${o}`;a!==void 0&&(E=(0,pn._)`${E} && ${l} <= ${a}`),e.pass(E);return}s.items=!0;const p=t.name("valid");a===void 0&&o===1?d(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),a!==void 0&&t.if((0,pn._)`${u}.length > 0`,f)):(t.let(p,!1),f()),e.result(p,()=>e.reset());function f(){const E=t.name("_valid"),A=t.let("count",0);d(E,()=>t.if(E,()=>h(A)))}function d(E,A){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:Mc.Type.Num,compositeRule:!0},E),A()})}function h(E){t.code((0,pn._)`${E}++`),a===void 0?t.if((0,pn._)`${E} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,pn._)`${E} > ${a}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,pn._)`${E} >= ${o}`,()=>t.assign(p,!0)))}}};Nm.default=Zx;var P6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=lt,r=vt,n=at;e.error={message:({params:{property:i,depsCount:c,deps:l}})=>{const p=c===1?"property":"properties";return(0,t.str)`must have ${p} ${l} when property ${i} is present`},params:({params:{property:i,depsCount:c,deps:l,missingProperty:p}})=>(0,t._)`{property: ${i}, +*/(function(e){(function(t,r,n){e.exports=n(t),e.exports.default=e.exports})(Vs,"UUID",function(){var t=function(E,F,D,g,P,b){for(var w=function($,M){var L=$.toString(16);return L.length<2&&(L="0"+L),M&&(L=L.toUpperCase()),L},I=F;I<=D;I++)P[b++]=w(E[I],g);return P},r=function(E,F,D,g,P){for(var b=F;b<=D;b+=2)g[P++]=parseInt(E.substr(b,2),16)},n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],s=function(E,F){for(var D="",g=0,P=0;g=1;){var w=Math.floor(P/b)%85;D+=n[w],b/=85}P=0}return D},o=function(E,F){var D=E.length;if(D%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof F>"u"&&(F=new Array(D*4/5));for(var g=0,P=0,b=0;g=u.length)break;if(b=b*85+u[w],g%5===0){for(var I=16777216;I>=1;)F[P++]=Math.trunc(b/I%256),I/=256;b=0}}return F},a=function(E,F){var D={ibits:8,obits:8,obigendian:!0};for(var g in F)typeof D[g]<"u"&&(D[g]=F[g]);for(var P=[],b=0,w,I,$=0,M,L=0,Y=E.length;$===0&&(I=E.charCodeAt(b++)),w=I>>D.ibits-($+8)&255,$=($+8)%D.ibits,D.obigendian?L===0?M=w<=Y)););return P},i=function(E,F){var D={ibits:32,ibigendian:!0};for(var g in F)typeof D[g]<"u"&&(D[g]=F[g]);var P="",b=4294967295;D.ibits<32&&(b=(1<>D.ibits-8-M&255):P+=String.fromCharCode($>>M&255);return P},c=8,l=8,p=256,d=function(E,F,D,g,P,b,w,I){return[I,w,b,P,g,D,F,E]},f=function(){return d(0,0,0,0,0,0,0,0)},h=function(E){return E.slice(0)},y=function(E){for(var F=f(),D=0;D=0;D--)F*=p,F+=E[D];return Math.floor(F)},m=function(E,F){for(var D=0,g=0;g=0;b--)D[b+1]=D[b];for(D[0]=E[0],b=0;bc*l)throw new Error("ui64_ror: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g>>b|D[g+1]<>>b&(1<c*l)throw new Error("ui64_rol: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g0;g--)D[g+P]=(D[g]<>>l-b)&(1<=0;g--)D[g]=0;for(g=0;g>16)+(F>>16)+(D>>16);return g<<16|D&65535},ee=function(E,F){return E<>>32-F&4294967295},K=function(E,F){function D(Pe,Be,le,Te){return Pe<20?Be&le|~Be&Te:Pe<40?Be^le^Te:Pe<60?Be&le|Be&Te|le&Te:Be^le^Te}function g(Pe){return Pe<20?1518500249:Pe<40?1859775393:Pe<60?-1894007588:-899497514}E[F>>5]|=128<<24-F%32,E[(F+64>>9<<4)+15]=F;for(var P=Array(80),b=1732584193,w=-271733879,I=-1732584194,$=271733878,M=-1009589776,L=0;L>5]|=128<>>9<<4)+14]=F;for(var I=1732584193,$=-271733879,M=-1732584194,L=271733878,Y=0;Y>>0:Math.random()*4294967295>>>0),T(this.state,E),this.next()};he.prototype.next=function(){var E=h(this.state);C(this.state,this.mul),m(this.state,this.inc);var F=h(E);R(F,18),q(F,E),R(F,27);var D=h(E);R(D,59),B(F,this.mask);var g=A(D),P=h(F);return J(P,32-g),R(F,g),q(F,P),A(F)};var fe=new he,ge=function(E,F){for(var D=[],g=0;g=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(var E=0;E<16;E++)this[E]=0}};return typeof Uint8Array<"u"?O.prototype=new Uint8Array(16):Buffer?O.prototype=Buffer.alloc(16):O.prototype=new Array(16),O.prototype.constructor=O,O.prototype.make=function(E){var F,D=this;if(E===1){var g=new Date,P=g.getTime();P!==pe?z=0:z++,pe=P;var b=y(P);v(b,1e3*10),m(b,d(1,178,29,210,19,129,64,0)),z>0&&m(b,y(z));var w;w=N(b,8),D[3]=w&255,w=N(b,8),D[2]=w&255,w=N(b,8),D[1]=w&255,w=N(b,8),D[0]=w&255,w=N(b,8),D[5]=w&255,w=N(b,8),D[4]=w&255,w=N(b,8),D[7]=w&255,w=N(b,8),D[6]=w&15;var I=ge(2,255);D[8]=I[0],D[9]=I[1];var $=ge(6,255);for($[0]|=1,$[0]|=2,F=0;F<6;F++)D[10+F]=$[F]}else if(E===4){var M=ge(16,255);for(F=0;F<16;F++)this[F]=M[F]}else if(E===3||E===5){var L="",Y=typeof arguments[1]=="object"&&arguments[1]instanceof O?arguments[1]:new O().parse(arguments[1]);for(F=0;F<16;F++)L+=String.fromCharCode(Y[F]);L+=arguments[2];var be=E===3?de(L):ue(L);for(F=0;F<16;F++)D[F]=be.charCodeAt(F)}else throw new Error("UUID: make: invalid version");return D[6]&=15,D[6]|=E<<4,D[8]&=63,D[8]|=128,D},O.prototype.format=function(E){var F,D;return E==="z85"?F=s(this,16):E==="b16"?(D=Array(32),t(this,0,15,!0,D,0),F=D.join("")):(E===void 0||E==="std")&&(D=new Array(36),t(this,0,3,!1,D,0),D[8]="-",t(this,4,5,!1,D,9),D[13]="-",t(this,6,7,!1,D,14),D[18]="-",t(this,8,9,!1,D,19),D[23]="-",t(this,10,15,!1,D,24),F=D.join("")),F},O.prototype.toString=function(E){return this.format(E)},O.prototype.toJSON=function(){return this.format("std")},O.prototype.parse=function(E,F){if(typeof E!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(F==="z85")o(E,this);else if(F==="b16")r(E,0,35,this,0);else if(F===void 0||F==="std"){var D={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(D[E]!==void 0)E=D[E];else if(!E.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');r(E,0,7,this,0),r(E,9,12,this,4),r(E,14,17,this,6),r(E,19,22,this,8),r(E,24,35,this,10)}return this},O.prototype.export=function(){for(var E=Array(16),F=0;F<16;F++)E[F]=this[F];return E},O.prototype.import=function(E){if(!(typeof E=="object"&&E instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(E.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(var F=0;F<16;F++){if(typeof E[F]!="number")throw new Error("UUID: import: invalid array element #"+F+" (type Number expected)");if(!(isFinite(E[F])&&Math.floor(E[F])===E[F]))throw new Error("UUID: import: invalid array element #"+F+" (Number with integer value expected)");if(!(E[F]>=0&&E[F]<=255))throw new Error("UUID: import: invalid array element #"+F+" (Number with integer value in range 0...255 expected)");this[F]=E[F]}return this},O.prototype.compare=function(E){if(typeof E!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(E instanceof O))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(var F=0;F<16;F++){if(this[F]E[F])return 1}return 0},O.prototype.equal=function(E){return this.compare(E)===0},O.prototype.fold=function(E){if(typeof E>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(E<1||E>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");for(var F=16/Math.pow(2,E),D=new Array(F),g=0;g>(-2*A&6)));return C},p=function(h){h=String(h),/[^\0-\xFF]/.test(h)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var y=h.length%3,A="",m=-1,v,C,B,T,N=h.length-y;++m>18&63)+i.charAt(T>>12&63)+i.charAt(T>>6&63)+i.charAt(T&63);return y==2?(v=h.charCodeAt(m)<<8,C=h.charCodeAt(++m),T=v+C,A+=i.charAt(T>>10)+i.charAt(T>>4&63)+i.charAt(T<<2&63)+"="):y==1&&(T=h.charCodeAt(m),A+=i.charAt(T>>2)+i.charAt(T<<4&63)+"=="),A},d={encode:p,decode:l,version:"1.0.0"};if(n&&!n.nodeType)if(u)u.exports=d;else for(var f in d)d.hasOwnProperty(f)&&(n[f]=d[f]);else r.base64=d})(Vs)})(bI,ap);const SI=ap,wI=()=>SI.encode(new CI(4)).substring(0,12),_I={heading:"block",title:"block",endTitle:"block",remark:"block",footnote:"inline",xref:"inline",noteCaller:"inline",esbCat:"inline",table:"block",tree:"block",kv:"block"},BI={graftLocation:_I},E6={wordLike:0,punctuation:1,lineSpace:2,eol:3,softLineBreak:4,noBreakSpace:5,bareSlash:6,unknown:7},TI=Object.entries(E6).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),$I={wordLike:"wordLike",punctuation:"notWordLike",lineSpace:"notWordLike",eol:"notWordLike",softLineBreak:"notWordLike",noBreakSpace:"notWordLike",bareSlash:"notWordLike",unknown:"notWordLike"},ip={tokenEnum:E6,tokenEnumLabels:TI,tokenCategory:$I},y6={blockTag:0,inline:1,chapter:2,pubChapter:3,altChapter:4,verses:5,verse:6,pubVerse:7,altVerse:8,esbCat:9,span:10,table:11,cell:12,milestone:13,spanWithAtts:14,attribute:15,hangingGraft:16,orphanTokens:17,tTableRow:18,tTableCol:19,tTreeNode:20,tTreeParent:21,tTreeChild:22,tTreeContent:23,kvPrimary:24,kvSecondary:25,kvField:26},PI=Object.entries(y6).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),kI=e=>{const t=Z.exec(e,Z("([^1-9]+)(.*)")),r=t[1],n=t[2].length>0?t[2]:"1";return[r,n]},OI=e=>{const t={th:{type:"colHeading",align:"left"},thr:{type:"colHeading",align:"right"},tc:{type:"body",align:"left"},tcr:{type:"body",align:"right"}},[r,n]=kI(e);let u="1";if(n.includes("-")){const[s,o]=n.split("-");u=`${parseInt(o)-parseInt(s)+1}`}return`cell/${t[r].type}/${t[r].align}/${u}`},II=(e,t)=>{switch(e){case"blockTag":return`blockTag/${t[0]}`;case"inline":return`inline/${t[0]}`;case"chapter":return`chapter/${t[0]}`;case"verses":return`verses/${t[0]}`;case"verse":return`verse/${t[0]}`;case"span":return`span/${t[0]}`;case"table":return"table";case"cell":return OI(t[0]);case"milestone":return`milestone/${t[0]}`;case"spanWithAtts":return`spanWithAtts/${t[0]}`;case"attribute":return`attribute/${t[0]}/${t[1]}/${t[2]}/${t[3]}`;case"orphanTokens":return"orphanTokens";case"hangingGraft":return"hangingGraft";case"pubChapter":return`pubChapter/${t[0]}`;case"pubVerse":return`pubVerse/${t[0]}`;case"altChapter":return`altChapter/${t[0]}`;case"altVerse":return`altVerse/${t[0]}`;case"esbCat":return`esbCat/${t[0]}`;case"tTableRow":return`tTableRow/${t[0]}`;case"tTableCol":return`tTableCol/${t[0]}`;case"tTreeNode":return`tTreeNode/${t[0]}`;case"tTreeParent":return`tTreeParent/${t[0]}`;case"tTreeChild":return`tTreeChild/${t[0]}/${t[1]}`;case"tTreeContent":return`tTreeContent/${t[0]}`;case"kvPrimary":return`kvPrimary/${t[0]}`;case"kvSecondary":return`kvSecondary/${t[0]}/${t[1]}`;case"kvField":return`kvField/${t[0]}`;default:throw new Error(`Unknown scope type '${e}' in labelForScope`)}},NI=e=>{switch(e){case"orphanTokens":case"hangingGraft":case"table":return 1;case"blockTag":case"inline":case"chapter":case"verses":case"verse":case"span":case"milestone":case"spanWithAtts":case"pubChapter":case"altChapter":case"pubVerse":case"altVerse":case"esbCat":case"tTableRow":case"tTableCol":case"tTreeNode":case"tTreeParent":case"tTreeContent":case"kvPrimary":case"kvField":return 2;case"tTreeChild":case"kvSecondary":return 3;case"cell":return 4;case"attribute":return 6;default:throw new Error(`Unknown scope type '${e}' in nComponentsForScope`)}},Ii={scopeEnum:y6,scopeEnumLabels:PI,labelForScope:II,nComponentsForScope:NI},v6={token:0,graft:1,startScope:2,endScope:3},qI=Object.entries(v6).sort((e,t)=>e[1]-t[1]).map(e=>e[0]),g6=e=>({type:e[0],subType:e[1],payload:e[2]}),A6=e=>[e.type,e.subType,e.payload],xI=e=>e.map(t=>g6(t)),RI=e=>e.map(t=>A6(t)),Ni={itemEnum:v6,itemEnumLabels:qI,itemArray2Object:g6,itemObject2Array:A6,itemArrays2Objects:xI,itemObjects2Arrays:RI},jI=(e,t)=>{const r=e.byte(t),n=r>>6,u=r&63,s=e.byte(t+1);return[u,n,s]},MI=(e,t,r,n,u)=>{const s=ip.tokenCategory[ip.tokenEnumLabels[n]],o=t[s][r.nByte(u+2)];return e[s].countedString(o)},LI=(e,t,r,n,u)=>{const s=Ii.scopeEnumLabels[n];let o=Ii.nComponentsForScope(s),a=2,i="";for(;o>1;){const c=r.nByte(u+a),l=t.scopeBits[c],p=e.scopeBits.countedString(l);i+=`/${p}`,a+=r.nByteLength(c),o--}return`${s}${i}`},UI=e=>Ii.scopeEnumLabels[e],GI=(e,t,r)=>{const n=t.graftTypes[r];return e.graftTypes.countedString(n)},VI=(e,t,r,n)=>{const u=t.ids[r.nByte(n+2)];return e.ids.countedString(u)},HI=e=>{const t={};for(const[r,n]of Object.entries(e))t[r]=F6(r,n);return t},F6=(e,t)=>{const r=new Uint32Array(t.length);let n=0,u=0;for(;n{t||(t=!1);let r=0,n=0;const u=[];for(;r{throw new Error(`Undefined or null argument '${t}' in '${e}'`)},JI=(e,t,r)=>{t==null&&Hs("pushSuccinctTokenBytes","tokenEnumIndex"),r==null&&Hs("pushSuccinctTokenBytes","charsEnumIndex");const n=e.length;e.pushByte(0),e.pushByte(t),e.pushNByte(r),e.setByte(n,e.length-n|Ni.itemEnum.token<<6)},zI=(e,t,r)=>{t==null&&Hs("pushSuccinctGraftBytes","graftTypeEnumIndex"),r==null&&Hs("pushSuccinctGraftBytes","seqEnumIndex");const n=e.length;e.pushByte(0),e.pushByte(t),e.pushNByte(r),e.setByte(n,e.length-n|Ni.itemEnum.graft<<6)},KI=(e,t,r,n)=>{t==null&&Hs("pushSuccinctScopeBytes","itemTypeByte"),r==null&&Hs("pushSuccinctScopeBytes","scopeTypeByte"),n==null&&Hs("pushSuccinctScopeBytes","scopeBitBytes");const u=e.length;e.pushByte(0),e.pushByte(r);for(const s of n)e.pushNByte(s);e.setByte(u,e.length-u|t<<6)},Ku={enumIndex:F6,enumIndexes:HI,headerBytes:jI,pushSuccinctTokenBytes:JI,pushSuccinctGraftBytes:zI,pushSuccinctScopeBytes:KI,succinctTokenChars:MI,succinctScopeLabel:LI,succinctScopeType:UI,succinctGraftName:GI,succinctGraftSeqId:VI,unpackEnum:WI},XI=e=>{const t=new Oi;t.fromBase64(e);const r=[];r.push(`* Char length ${t.length} *`);for(const[n,u]of Ku.unpackEnum(t,!0))r.push(`${n} "${u}"`);return r.join(` +`)},YI=(e,t)=>{const r=new Oi;r.fromBase64(e);const n={};for(const[a,i]of Object.entries(t))n[a]=new Oi,n[a].fromBase64(i);const u=Ku.enumIndexes(n),s=[];s.push(`* Char length ${r.length} *`);let o=0;for(;o{for(const t of e)Vp(t)},Vp=e=>{if(!Z.exec(e,/^[a-z][A-za-z0-9]*(:.+)?$/))throw new Error(`Tag '${e}' is not valid (should be [a-z][A-za-z0-9]*(:.+)?)`)},tN=(e,t)=>{Vp(t),e.add(t)},rN=(e,t)=>{Vp(t),e.delete(t)},nN={validateTags:eN,validateTag:Vp,addTag:tN,removeTag:rN},uN=2,cp=3,Hp=["GEN","EXO","LEV","NUM","DEU","JOS","JDG","RUT","1SA","2SA","1KI","2KI","1CH","2CH","EZR","NEH","EST","JOB","PSA","PRO","ECC","SNG","ISA","JER","LAM","EZK","DAN","HOS","JOL","AMO","OBA","JON","MIC","NAM","HAB","ZEP","HAG","ZEC","MAL","MAT","MRK","LUK","JHN","ACT","ROM","1CO","2CO","GAL","EPH","PHP","COL","1TH","2TH","1TI","2TI","TIT","PHM","HEB","JAS","1PE","2PE","1JN","2JN","3JN","JUD","REV","TOB","JDT","ESG","WIS","SIR","BAR","LJE","S3Y","SUS","BEL","1MA","2MA","3MA","4MA","1ES","2ES","MAN","PS2","ODA","PSS","JSA","JDB","TBS","SST","DNT","BLT","EZA","5EZ","6EZ","DAG","PS3","2BA","LBA","JUB","ENO","1MQ","2MQ","3MQ","REP","4BA","LAO"],C6=()=>{const e={};for(const[t,r]of Object.entries(Hp))e[r]=parseInt(t);return e},sN=e=>{const t={};for(const r of e.split(/[\n\r]+/).map(n=>n.trim()).map(n=>Z.exec(n,Z("^([A-Z1-6]{3} [0-9]+:[0-9]+(-[0-9]+)?) = ([A-Z1-6]{3} [0-9]+:[0-9]+[a-z]?(-[0-9]+)?)$"))))r&&(r[1]in t||(t[r[1]]=[]),t[r[1]].push(r[3]));return{mappedVerses:t}},oN=e=>{const t={};for(const[r,n]of Object.entries(e.mappedVerses))for(const u of n)u in t?t[u].push(r):t[u]=[r];return{reverseMappedVerses:t}},b6=e=>{const t={};for(let[r,n]of Object.entries(e)){typeof n=="string"&&(n=[n]);const[u,s]=r.split(" "),o=n[0].split(" ")[0],a=o===u?["cv"]:["bcv"];let[i,c]=s.split(":"),l=c;if(c.includes("-")){const p=c.split("-");c=p[0],l=p[1]}a.push([parseInt(c),parseInt(l)]),a.push([]);for(const p of n.map(d=>d.split(" ")[1])){let[d,f]=p.split(":"),h=f;if(f.includes("-")){const y=f.split("-");f=y[0],h=y[1]}a[0]==="cv"?a[2].push([parseInt(d),parseInt(f),parseInt(h)]):a[2].push([parseInt(d),parseInt(f),parseInt(h),o])}u in t||(t[u]={}),i in t[u]||(t[u][i]=[]),t[u][i].push(a)}return t},aN=e=>{const t={},r=C6();for(const[n,u]of Object.entries(b6(e))){t[n]={};for(const[s,o]of Object.entries(u))t[n][s]=S6(o,r)}return t},S6=(e,t)=>{const r=(u,s)=>s+u*64,n=new Oi(64);for(const[u,[s,o],a]of e){const i=n.length,c=u==="bcv"?cp:uN;if(n.pushNBytes([0,s,o]),c===cp){const p=t[a[0][3]];n.pushNByte(p)}n.pushNByte(a.length);for(const[p,d]of a)n.pushNBytes([p,d]);const l=n.length-i;if(l>63)throw new Error(`Mapping in succinctifyVerseMapping ${JSON.stringify(a)} is too long (${l} bytes)`);n.setByte(i,r(c,l))}return n.trim(),n},w6=(e,t)=>{const r=e.byte(t);return[r>>6,r%64]},iN=(e,t,r)=>{const n=[];let u=0;for(;u{let u=null,s=0;for(;sl){s+=i;continue}let p=t;if(a===cp){const f=e.nByte(o);p=Hp[f],o+=e.nByteLength(f)}u=[p,[]];const d=e.nByte(o);for(o+=e.nByteLength(d);u[1].length{if(typeof t!="object")throw new Error(`DocSet constructor expects selectors to be object, found ${typeof e.selectors}`);const r={};for(const n of e.processor.selectors)r[n.name]=n;for(const[n,u]of Object.entries(t)){if(!(n in r))throw new Error(`Unexpected selector '${n}' (expected one of [${Object.keys(r).join(", ")}])`);if(typeof u=="string"&&r[n].type!=="string"||typeof u=="number"&&r[n].type!=="integer")throw new Error(`Selector '${n}' is of type ${typeof u} (expected ${r[n].type})`);if(typeof u=="number"){if(!Number.isInteger(u))throw new Error(`Value '${u}' of integer selector '${n}' is not an integer`);if("min"in r[n]&&ur[n].max)throw new Error(`Value '${u}' is greater than ${r[n].max}`)}else if("regex"in r[n]&&!Z.exec(u,Z(r[n].regex),0))throw new Error(`Value '${u}' does not match regex '${r[n].regex}'`);if("enum"in r[n]&&!r[n].enum.includes(u))throw new Error(`Value '${u}' of selector '${n}' is not in enum`)}for(const n of Object.keys(r))if(!(n in t))throw new Error(`Expected selector '${n}' not found`);return t},pN=(e,t,r)=>{const n=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].filter(l=>l.startsWith("chapter/")).map(l=>parseInt(l.split("/")[1])).filter(l=>l>a&&l0,u=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].includes(`chapter/${a}`)&&e.blockHasMatchingItem(o,(l,p)=>p.has(`chapter/${a}`)?Array.from(p).filter(d=>d.startsWith("verse/")).filter(d=>parseInt(d.split("/")[1])>=i).length>0||i===0&&l[0]==="token"&&l[2]&&Array.from(p).filter(d=>d.startsWith("verse")).length===0:!1,{}),s=(o,a,i)=>[...e.unsuccinctifyScopes(o.os).map(l=>l[2]),...e.unsuccinctifyScopes(o.is).map(l=>l[2])].includes(`chapter/${a}`)&&e.blockHasMatchingItem(o,(l,p)=>p.has(`chapter/${a}`)?Array.from(p).filter(d=>d.startsWith("verse/")).filter(d=>parseInt(d.split("/")[1])<=i).length>0||i===0&&l[0]==="token"&&l[2]&&Array.from(p).filter(d=>d.startsWith("verse")).length===0:!1,{});if(Z.exec(r,Z("^[1-9][0-9]*$"))){const o=[`chapter/${r}`];return t.filter(a=>e.allScopesInBlock(a,o))}else if(Z.exec(r,Z("^[1-9][0-9]*-[1-9][0-9]*$"))){const[o,a]=r.split("-").map(c=>parseInt(c));if(o>a)throw new Error(`Chapter range must be from min to max, not '${r}'`);const i=[...Array(a-o+1).keys()].map(c=>`chapter/${c+o}`);return t.filter(c=>e.anyScopeInBlock(c,i))}else if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+$"))){const[o,a]=r.split(":").map(i=>parseInt(i));if(a===0){const i=[`chapter/${o}`];return t.filter(c=>e.allScopesInBlock(c,i)).filter(c=>[...e.allBlockScopes(c)].filter(l=>l.startsWith("verse")).length===0)}else{const i=[`chapter/${o}`,`verse/${a}`];return t.filter(c=>e.allScopesInBlock(c,i))}}else if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*$"))){const[o,a]=r.split(":"),[i,c]=a.split("-").map(d=>parseInt(d));if(i>c)throw new Error(`Verse range must be from min to max, not '${a}'`);const l=[`chapter/${o}`],p=[...Array(c-i+1).keys()].map(d=>`verse/${d+i}`);return t.filter(d=>e.allScopesInBlock(d,l)).filter(d=>e.anyScopeInBlock(d,p)||i===0&&[...e.allBlockScopes(d)].filter(f=>f.startsWith("verse")).length===0)}else if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*:[0-9]+$"))){const[o,a]=r.split("-"),[i,c]=o.split(":").map(h=>parseInt(h)),[l,p]=a.split(":").map(h=>parseInt(h));if(i>l)throw new Error(`Chapter range must be from min to max, not '${i}-${p}'`);const d=[...Array(l-i+1).keys()].map(h=>`chapter/${h+i}`);return t.filter(h=>e.anyScopeInBlock(h,d)).filter(h=>n(h,i,l)||u(h,i,c)||s(h,l,p))}else throw new Error(`Bad cv reference '${r}'`)},dN=(e,t)=>{const[r,n,u]=ye.succinct.headerBytes(t.bs,0),s=e.unsuccinctifyScope(t.bs,n,u,0);return new Set([...e.unsuccinctifyScopes(t.os).map(o=>o[2]),...e.unsuccinctifyScopes(t.is).map(o=>o[2]),s[2]])},fN=(e,t,r)=>{const n=e.allBlockScopes(t);for(const u of r)if(!n.has(u))return!1;return!0},DN=(e,t,r)=>{const n=e.allBlockScopes(t);for(const u of r)if(n.has(u))return!0;return!1},hN=(e,t,r)=>{const[n,u,s]=ye.succinct.headerBytes(t.bs,0);return e.unsuccinctifyScope(t.bs,u,s,0)[2]===r},mN=(e,t,r)=>{let n=!1,u=0;const s=t.c;if(r.includes(-1))return!1;for(;!n&&u{const u=new Set(e.unsuccinctifyScopes(t.os).map(s=>s[2]));for(const s of e.unsuccinctifyItems(t.c,n,0)){if(s[0]==="scope"&&s[1]==="start"&&u.add(s[2]),r(s,u))return!0;s[0]==="scope"&&s[1]==="end"&&u.delete(s[2])}return!1},yN=(e,t,r)=>{e.maybeBuildEnumIndexes();const n=t.bs,[u,s,o]=ye.succinct.headerBytes(n,0),a=e.unsuccinctifyScope(n,s,o,0),i=e.unsuccinctifyGrafts(t.bg),c=e.unsuccinctifyScopes(t.os),l=e.unsuccinctifyScopes(t.is),p=t.nt.nByte(0),d=e.unsuccinctifyItems(t.c,r||{},p);return{bs:a,bg:i,c:d,os:c,is:l,nt:p}},vN=(e,t,r,n,u)=>{if(n===void 0)throw new Error("nextToken (previously includeContext) must now be provided to unsuccinctifyItems");if(n!==null&&typeof n!="number")throw new Error(`nextToken (previously includeContext) must be null or an integer, not ${typeof n} '${JSON.stringify(n)}' in unsuccinctifyItems`);const s=[];let o=0,a=n||0;const i=new Set(u||[]),c=[ye.itemDefs.itemEnum.startScope,ye.itemDefs.itemEnum.endScope];for(;o0){if(!r.scopes&&c.includes(p)){o+=l;continue}if(!r.tokens&&p===ye.itemDefs.itemEnum.token){o+=l;continue}if(!r.grafts&&p===ye.itemDefs.itemEnum.graft){o+=l;continue}}if(c.includes(p)){const h=ye.succinct.succinctScopeType(d);if(Object.keys(r).length>0&&r.scopes&&r.excludeScopeTypes&&r.excludeScopeTypes.includes(h)){o+=l;continue}}const f=e.unsuccinctifyItem(t,o,{})[0];f[0]==="token"?(Object.keys(r).length===0||r.tokens)&&(n!==null&&(f.push(f[0]==="token"&&f[1]==="wordLike"?a++:null),f.push([...i])),s.push(f)):f[0]==="scope"&&f[1]==="start"?(Object.keys(r).length===0||r.scopes)&&(i.add(f[2]),s.push(f)):f[0]==="scope"&&f[1]==="end"?(Object.keys(r).length===0||r.scopes)&&(i.delete(f[2]),s.push(f)):f[0]==="graft"&&(Object.keys(r).length===0||r.grafts)&&s.push(f),o+=l}return s},gN=(e,t,r,n)=>{let u=null;const[s,o,a]=ye.succinct.headerBytes(t,r);switch(o){case ye.itemDefs.itemEnum.token:(Object.keys(n).length===0||n.tokens)&&(u=e.unsuccinctifyToken(t,a,r));break;case ye.itemDefs.itemEnum.startScope:case ye.itemDefs.itemEnum.endScope:(Object.keys(n).length===0||n.scopes)&&(u=e.unsuccinctifyScope(t,o,a,r));break;case ye.itemDefs.itemEnum.graft:(Object.keys(n).length===0||n.grafts)&&(u=e.unsuccinctifyGraft(t,a,r));break}return[u,s]},AN=(e,t,r)=>{const n=new Set(e.unsuccinctifyScopes(t.os).map(p=>p[2])),u=r.requiredScopes||[],i=r.anyScope||!1?()=>{for(const p of u)if(n.has(p))return!0;return u.length===0}:()=>{for(const p of u)if(!n.has(p))return!1;return!0},c=p=>!r.withChars||r.withChars.length===0||p[0]==="token"&&r.withChars.includes(p[2]),l=[];for(const p of e.unsuccinctifyItems(t.c,r,t.nt.nByte(0),n))p[0]==="scope"&&p[1]==="start"&&n.add(p[2]),i()&&c(p)&&l.push(p),p[0]==="scope"&&p[1]==="end"&&n.delete(p[2]);return l},FN=(e,t,r,n)=>{n=n||{};const u=new Set(e.unsuccinctifyScopes(t.os).map(c=>c[2])),o=(()=>{if(Z.exec(r,Z("^[1-9][0-9]*$")))return()=>u.has(`chapter/${r}`);if(Z.exec(r,Z("^[1-9][0-9]*-[1-9][0-9]*$")))return()=>{const[c,l]=r.split("-").map(p=>parseInt(p));if(c>l)throw new Error(`Chapter range must be from min to max, not '${r}'`);for(const p of[...Array(l-c+1).keys()].map(d=>`chapter/${d+c}`))if(u.has(p))return!0;return!1};if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+$")))return()=>{const[c,l]=r.split(":").map(p=>parseInt(p));if(l===0)return u.has(`chapter/${c}`)&&[...u].filter(p=>p.startsWith("verse")).length===0;for(const p of[`chapter/${c}`,`verse/${l}`])if(!u.has(p))return!1;return!0};if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*$")))return()=>{const[c,l]=r.split(":"),[p,d]=l.split("-").map(y=>parseInt(y));if(p>d)throw new Error(`Verse range must be from min to max, not '${l}'`);const f=`chapter/${c}`,h=[...Array(d-p+1).keys()].map(y=>`verse/${y+p}`);if(!u.has(f))return!1;for(const y of h)if(u.has(y))return!0;return p===0&&[...u].filter(y=>y.startsWith("verse")).length===0};if(Z.exec(r,Z("^[1-9][0-9]*:[0-9]+-[1-9][0-9]*:[0-9]+$")))return()=>{const[c,l]=r.split("-"),[p,d]=c.split(":").map(v=>parseInt(v)),[f,h]=l.split(":").map(v=>parseInt(v));if(p>f)throw new Error(`Chapter range must be from min to max, not '${p}-${h}'`);const y=[...u],A=y.filter(v=>v.startsWith("chapter/"));if(A.length>1)throw new Error(`Expected zero or one chapter for item, found ${A.length}`);const m=parseInt(A[0].split("/")[1]);return mf?!1:m===p?y.filter(v=>v.startsWith("verse/")&&parseInt(v.split("/")[1])>=d).length>0||d===0&&y.filter(v=>v.startsWith("verse")).length===0:m===f?y.filter(v=>v.startsWith("verse/")&&parseInt(v.split("/")[1])<=h).length>0||h===0&&y.filter(v=>v.startsWith("verse")).length===0:!0};throw new Error(`Bad cv reference '${r}'`)})(),a=c=>{if(!n||Object.keys(n).length===0)return!0;{const l=c[0];return l==="token"&&"tokens"in n||l==="graft"&&"grafts"in n||l==="scope"&&"scopes"in n}},i=[];if(n.excludeScopeTypes)for(const c of e.unsuccinctifyItems(t.c,n,t.nt.nByte(0)))c[0]==="scope"&&c[1]==="start"&&u.add(c[2]),o()&&a(c)&&i.push(c),c[0]==="scope"&&c[1]==="end"&&u.delete(c[2]);else for(const c of e.unsuccinctifyItems(t.c,{},t.nt.nByte(0)))c[0]==="scope"&&c[1]==="start"&&u.add(c[2]),o()&&a(c)&&i.push(c),c[0]==="scope"&&c[1]==="end"&&u.delete(c[2]);return i},CN=(e,t)=>{const r=new Map;let n=0,u=0;for(;n{if(!(t in e.preEnums))throw new Error(`Unknown category ${t} in recordPreEnum. Maybe call buildPreEnums()?`);r.length>255&&console.log("Value length of",r.length,"in recordPreEnum"),e.preEnums[t].has(r)?e.preEnums[t].get(r).frequency++:e.preEnums[t].set(r,{enum:e.preEnums[t].size,frequency:1})},SN=(e,t,r)=>{const n=new Map([...r.entries()]);for(const u of n.keys())u.length>255&&console.log("enum text for",t,"has length",u.length,"in buildEnum - truncating"),e.enums[t].pushCountedString(u.substring(0,255));e.enums[t].trim()},wN=(e,t,r,n)=>{if(n||(n=!1),!(t in e.preEnums))throw new Error(`Unknown category ${t} in preEnums. Maybe call buildPreEnums()?`);if(e.preEnums[t].has(r))return e.preEnums[t].get(r).enum;if(n)return e.preEnums[t].set(r,{enum:e.preEnums[t].size,frequency:1}),e.enums[t].pushCountedString(r),e.buildEnumIndex(t),e.preEnums[t].get(r).enum;throw new Error(`Unknown value '${r}' for category ${t} in enumForCategoryValue. Maybe call buildPreEnums()?`)},_N=(e,t)=>{let r=0,n=0;for(;n{let u=[];if(!r)return u;let s=r.startBlock,o=r.nextToken;for(;s<=r.endBlock;){let a=e.unsuccinctifyItems(t.blocks[s].c,{},o);const i=e.unsuccinctifyScopes(t.blocks[s].bs)[0],c=e.unsuccinctifyGrafts(t.blocks[s].bg);if(s===r.startBlock&&s===r.endBlock?a=a.slice(r.startItem,r.endItem+1):s===r.startBlock?a=a.slice(r.startItem):s===r.endBlock&&(a=a.slice(0,r.endItem+1)),n){let l=[];for(const p of a)l.push(p.concat([p[0]==="token"&&p[1]==="wordLike"?o++:null]));a=l}u.push([...c,["scope","start",i[2]],...a,["scope","end",i[2]]]),s++}return u},TN=(e,t,r)=>{let n=[];const u=()=>{for(const c of r)if(!s(c))return!1;return!0},s=c=>{for(const l of n)if(l.startsWith(c))return l;return null};e.maybeBuildEnumIndexes();const o=[];let a=new Set([]),i=!0;for(const[c,l]of t.entries()){const[p,d,f]=ye.succinct.headerBytes(l.bs,0),h=e.unsuccinctifyScope(l.bs,d,f,0)[2],y=["scope","start",h],A=["scope","end",h],m=e.unsuccinctifyGrafts(l.bg);n=new Set(e.unsuccinctifyScopes(l.os).map(v=>v[2]).concat([h]));for(const v of m.concat([y,...e.unsuccinctifyItems(l.c,{},l.nt.nByte(0),n),A]).concat(c!==t.length-1?[["token","lineSpace"," "]]:[])){if(v[0]==="scope"&&v[1]==="start"&&a.add(v[2]),v[0]==="token"&&a.size>0){for(const C of Array.from(a))n.add(C);a.clear()}u()?(i&&o.push([[...n],[]]),o[o.length-1][1].push(v),i=!1):i=!0,v[0]==="scope"&&v[1]==="end"&&(n.delete(v[2]),a.delete(v[2]))}}return o},$N=(e,t,r)=>{let n=new Set([]);const u=o=>o[0]==="scope"&&o[1]==="start"&&r.includes(o[2]);e.maybeBuildEnumIndexes();const s=[[[],[]]];for(const o of t){const[a,i,c]=ye.succinct.headerBytes(o.bs,0),l=e.unsuccinctifyScope(o.bs,i,c,0)[2],p=e.unsuccinctifyGrafts(o.bg);n.add(l),e.unsuccinctifyScopes(o.os).forEach(f=>n.add(f[2]));const d=p.concat([l].concat(e.unsuccinctifyItems(o.c,{},o.nt.nByte(0))));for(const f of d){if(f[0]==="scope"&&f[1]==="start"&&n.add(f[2]),u(f)){s[s.length-1][0]=[...n].sort(),s.push([[],[]]);for(const h of[...n].filter(y=>["blockTag","verse","verses","chapter"].includes(y.split("/")[0])||r.includes(y)))n.delete(h);n.add(l)}s[s.length-1][1].push(f)}s[s.length-1][1].push(["scope","end",l]),s[s.length-1][1].push(["token","punctuation",` +`])}return s[s.length-1][0]=[...n].sort(),s},PN=e=>{e.preEnums={};for(const r of Object.keys(e.enums))e.preEnums[r]=new Map;e.maybeBuildEnumIndexes();for(const r of e.documents())for(const n of Object.values(r.sequences))r.rerecordPreEnums(e,n);e.sortPreEnums();const t=e.makeRehashEnumMap();for(const r of e.documents())for(const n of Object.values(r.sequences))r.rewriteSequenceBlocks(n.id,t);return e.buildEnums(),e.buildEnumIndexes(),!0},kN=e=>{const t={};for(const[r,n]of Object.entries(e.enums)){t[r]=[];let u=0;for(;u{const o=e.processor.documents[t];if(!o)throw new Error(`Document '${t}' not found`);let a;if(r){if(a=o.sequences[r],!a)throw new Error(`Sequence '${r}' not found`)}else a=o.sequences[o.mainId];if(a.blocks.length<=n)throw new Error(`Could not find block ${n} (length=${a.blocks.length})`);const i=a.blocks[n],c=new qi(s.length);e.maybeBuildPreEnums();let l=0;n<0&&(l=a.blocks[n-1].nt.nByte(0));let p,d,f,h,y,A=null;for(const m of s)switch(m.type){case"token":p=e.enumForCategoryValue(NN[m.subType],m.payload,!0),IN(c,qN[m.subType],p),l++;break;case"graft":d=e.enumForCategoryValue("graftTypes",m.subType,!0),f=e.enumForCategoryValue("ids",m.payload,!0),ON(c,d,f);break;case"scope":if(h=m.payload.split("/"),y=Am[h[0]],!y&&y!==0)throw new Error(`"${h[0]}" is not a scope type`);A=h.slice(1).map(v=>e.enumForCategoryValue("scopeBits",v,!0)),vm(c,gm[`${m.subType}Scope`],y,A);break}return c.trim(),i[u]=c,u==="c"&&(i.nt.clear(),i.nt.pushNByte(l)),!0},xN=(e,t,r,n,u)=>Yi(e,t,r,n,"c",u),_6=(e,t,r,n,u)=>Yi(e,t,r,n,"bg",u),RN=(e,t,r,n,u)=>Yi(e,t,r,n,"bs",[u]),jN=(e,t,r,n,u)=>Yi(e,t,r,n,"os",u),MN=(e,t,r,n,u)=>Yi(e,t,r,n,"is",u),LN=(e,t,r)=>{const n=(l,p)=>{for(const d of Array.from(l))if(!p.has(d))return!1;for(const d of Array.from(p))if(!l.has(d))return!1;return!0},u=(l,p,d)=>{const f=d.split("/"),h=Am[f[0]];if(!h&&h!==0)throw new Error(`"${f[0]}" is not a scope type`);const y=f.slice(1).map(A=>l.enumForCategoryValue("scopeBits",A,!0));vm(p,gm.startScope,h,y)},s=t.blocks[r],o=new Set,a=new Set;for(const l of e.unsuccinctifyScopes(s.os))a.add(l[2]);for(const l of e.unsuccinctifyItems(s.c,{scopes:!0},null))l[1]==="start"?(o.add(l[2]),a.add(l[2])):a.delete(l[2]);const i=Array.from(o),c=new qi(i.length);for(const l of i)u(e,c,l);if(c.trim(),s.is=c,rf[2]));if(!n(a,d)){const f=new qi(d.length);for(const h of Array.from(a))u(e,f,h);f.trim(),l.os=f,e.updateBlockIndexesAfterEdit(t,r+1)}}},UN=(e,t)=>{const r=(u,s,o)=>{const a=o.split("/"),i=Am[a[0]];if(!i&&i!==0)throw new Error(`"${a[0]}" is not a scope type`);const c=a.slice(1).map(l=>u.enumForCategoryValue("scopeBits",l,!0));vm(s,gm.startScope,i,c)},n=new Set;for(const u of t.blocks){const s=Array.from(n),o=new qi(s.length);for(const l of s)r(e,o,l);o.trim(),u.os=o;const a=new Set;for(const l of e.unsuccinctifyItems(u.c,{scopes:!0},null))l[1]==="start"?(a.add(l[2]),n.add(l[2])):n.delete(l[2]);const i=Array.from(a),c=new qi(i.length);for(const l of i)r(e,c,l);c.trim(),u.is=c}},GN=e=>{const t={id:e.id,metadata:{selectors:e.selectors},enums:{},docs:{},tags:Array.from(e.tags)};for(const[r,n]of Object.entries(e.enums))n.trim(),t.enums[r]=n.base64();t.docs={};for(const r of e.docIds)t.docs[r]=e.processor.documents[r].serializeSuccinct();return t},vo=ye.ByteArray,{addTag:VN,removeTag:HN,validateTags:tv}=ye.tags,{succinctGraftName:WN,succinctGraftSeqId:JN,succinctScopeLabel:zN,succinctTokenChars:KN,headerBytes:of,enumIndex:XN,enumIndexes:YN}=ye.succinct,{itemEnum:ZN}=ye.itemDefs,{tokenEnumLabels:QN}=ye.tokenDefs;class rv{constructor(t,r,n,u){this.processor=t,this.preEnums={},this.enumIndexes={},this.docIds=[],u?this.fromSuccinct(t,u):this.fromScratch(t,r,n),tv(this.tags)}fromScratch(t,r,n){const u=r||t.selectors;this.selectors=ev(this,u),this.id=this.selectorString(),this.tags=new Set(n||[]),this.enums={ids:new vo(512),wordLike:new vo(8192),notWordLike:new vo(256),scopeBits:new vo(256),graftTypes:new vo(10)}}fromSuccinct(t,r){const n=u=>{const s=new vo(256);return s.fromBase64(u),s.trim(),s};this.id=r.id,this.selectors=ev(this,r.metadata.selectors),this.tags=new Set(r.tags),tv(this.tags),this.preEnums={},this.enums={ids:n(r.enums.ids),wordLike:n(r.enums.wordLike),notWordLike:n(r.enums.notWordLike),scopeBits:n(r.enums.scopeBits),graftTypes:n(r.enums.graftTypes)},this.enumIndexes={},this.docIds=[]}addTag(t){VN(this.tags,t)}removeTag(t){HN(this.tags,t)}selectorString(){return this.processor.selectorString(this.selectors)}documents(){return this.docIds.map(t=>this.processor.documents[t])}documentWithBook(t){const r=Object.values(this.documents()).filter(n=>"bookCode"in n.headers&&n.headers.bookCode===t);return r.length===1?r[0]:null}maybeBuildPreEnums(){Object.keys(this.preEnums).length===0&&this.buildPreEnums()}buildPreEnums(){for(const[t,r]of Object.entries(this.enums))this.preEnums[t]=CN(this,r)}recordPreEnum(t,r){bN(this,t,r)}sortPreEnums(){for(const t of Object.keys(this.preEnums)){this.preEnums[t]=new Map([...this.preEnums[t].entries()].sort((n,u)=>u[1].frequency-n[1].frequency));let r=0;for(const[n,u]of this.preEnums[t])u.enum=r++}}enumForCategoryValue(t,r,n){return wN(this,t,r,n)}buildEnums(){for(const[t,r]of Object.entries(this.preEnums))this.enums[t].clear(),this.buildEnum(t,r)}buildEnum(t,r){SN(this,t,r)}maybeBuildEnumIndexes(){Object.keys(this.enumIndexes).length===0&&this.buildEnumIndexes()}buildEnumIndexes(){this.enumIndexes=YN(this.enums)}buildEnumIndex(t){this.enumIndexes[t]=XN(t,this.enums[t])}unsuccinctifyBlock(t,r){return yN(this,t,r)}unsuccinctifyItems(t,r,n,u){return vN(this,t,r,n,u)}unsuccinctifyItem(t,r,n){return gN(this,t,r,n)}unsuccinctifyPrunedItems(t,r){return AN(this,t,r)}unsuccinctifyScopes(t){const r=[];let n=0;for(;no[2]))}unsuccinctifyItemsWithScriptureCV(t,r,n){return FN(this,t,r,n)}succinctTokenChars(t,r,n){return KN(this.enums,this.enumIndexes,t,r,n)}succinctScopeLabel(t,r,n){return zN(this.enums,this.enumIndexes,t,r,n)}succinctGraftName(t){return WN(this.enums,this.enumIndexes,t)}succinctGraftSeqId(t,r){return JN(this.enums,this.enumIndexes,t,r)}countItems(t){return _N(this,t)}itemsByIndex(t,r,n){return BN(this,t,r,n)}blocksWithScriptureCV(t,r){return pN(this,t,r)}allBlockScopes(t){return dN(this,t)}allScopesInBlock(t,r){return fN(this,t,r)}anyScopeInBlock(t,r){return DN(this,t,r)}blockHasBlockScope(t,r){return hN(this,t,r)}blockHasChars(t,r){return mN(this,t,r)}blockHasMatchingItem(t,r,n){return EN(this,t,r,n)}sequenceItemsByScopes(t,r){return TN(this,t,r)}sequenceItemsByMilestones(t,r){return $N(this,t,r)}rehash(){return PN(this)}makeRehashEnumMap(){return kN(this)}updateItems(t,r,n,u){return xN(this,t,r,n,u)}updateBlockGrafts(t,r,n,u){return _6(this,t,r,n,u)}updateBlockScope(t,r,n,u){return RN(this,t,r,n,u)}updateOpenScopes(t,r,n,u){return jN(this,t,r,n,u)}updateIncludedScopes(t,r,n,u){return MN(this,t,r,n,u)}updateBlockIndexesAfterEdit(t,r){LN(this,t,r)}updateBlockIndexesAfterFilter(t){UN(this,t)}serializeSuccinct(){return GN(this)}checksum(){const t=[...this.docIds].sort().join(" ");return d6.calculate(t)}}var lp={},eq={get exports(){return lp},set exports(e){lp=e}},B6={},Tn={},pa={},Zi={},ut={},xi={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(v){if(super(),!e.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((C,B)=>`${C}${B}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((C,B)=>(B instanceof r&&(C[B.str]=(C[B.str]||0)+1),C),{})}}e._Code=n,e.nil=new n("");function u(m,...v){const C=[m[0]];let B=0;for(;B{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${c}${p.scopePath}`})}scopeCode(c=this._values,l,p){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},l,p)}_reduceValues(c,l,p={},d){let f=t.nil;for(const h in c){const y=c[h];if(!y)continue;const A=p[h]=p[h]||new Map;y.forEach(m=>{if(A.has(m))return;A.set(m,n.Started);let v=l(m);if(v){const C=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${C} ${m} = ${v};${this.opts._n}`}else if(v=d==null?void 0:d(m))f=(0,t._)`${f}${v}${this.opts._n}`;else throw new r(m);A.set(m,n.Completed)})}return f}}e.ValueScope=a})(H2);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=xi,r=H2;var n=xi;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var u=H2;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return u.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return u.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return u.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return u.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,g){return this}}class o extends s{constructor(D,g,P){super(),this.varKind=D,this.name=g,this.rhs=P}render({es5:D,_n:g}){const P=D?r.varKinds.var:this.varKind,b=this.rhs===void 0?"":` = ${this.rhs}`;return`${P} ${this.name}${b};`+g}optimizeNames(D,g){if(D[this.name.str])return this.rhs&&(this.rhs=oe(this.rhs,D,g)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(D,g,P){super(),this.lhs=D,this.rhs=g,this.sideEffects=P}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,g){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=oe(this.rhs,D,g),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ue(D,this.rhs)}}class i extends a{constructor(D,g,P,b){super(D,P,b),this.op=g}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class c extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class l extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class d extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,g){return this.code=oe(this.code,D,g),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((g,P)=>g+P.render(D),"")}optimizeNodes(){const{nodes:D}=this;let g=D.length;for(;g--;){const P=D[g].optimizeNodes();Array.isArray(P)?D.splice(g,1,...P):P?D[g]=P:D.splice(g,1)}return D.length>0?this:void 0}optimizeNames(D,g){const{nodes:P}=this;let b=P.length;for(;b--;){const w=P[b];w.optimizeNames(D,g)||(de(D,w.names),P.splice(b,1))}return P.length>0?this:void 0}get names(){return this.nodes.reduce((D,g)=>K(D,g.names),{})}}class h extends f{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class y extends f{}class A extends h{}A.kind="else";class m extends h{constructor(D,g){super(g),this.condition=D}render(D){let g=`if(${this.condition})`+super.render(D);return this.else&&(g+="else "+this.else.render(D)),g}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let g=this.else;if(g){const P=g.optimizeNodes();g=this.else=Array.isArray(P)?new A(P):P}if(g)return D===!1?g instanceof m?g:g.nodes:this.nodes.length?this:new m(he(D),g instanceof m?[g]:g.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,g){var P;if(this.else=(P=this.else)===null||P===void 0?void 0:P.optimizeNames(D,g),!!(super.optimizeNames(D,g)||this.else))return this.condition=oe(this.condition,D,g),this}get names(){const D=super.names;return ue(D,this.condition),this.else&&K(D,this.else.names),D}}m.kind="if";class v extends h{}v.kind="for";class C extends v{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iteration=oe(this.iteration,D,g),this}get names(){return K(super.names,this.iteration.names)}}class B extends v{constructor(D,g,P,b){super(),this.varKind=D,this.name=g,this.from=P,this.to=b}render(D){const g=D.es5?r.varKinds.var:this.varKind,{name:P,from:b,to:w}=this;return`for(${g} ${P}=${b}; ${P}<${w}; ${P}++)`+super.render(D)}get names(){const D=ue(super.names,this.from);return ue(D,this.to)}}class T extends v{constructor(D,g,P,b){super(),this.loop=D,this.varKind=g,this.name=P,this.iterable=b}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iterable=oe(this.iterable,D,g),this}get names(){return K(super.names,this.iterable.names)}}class N extends h{constructor(D,g,P){super(),this.name=D,this.args=g,this.async=P}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}N.kind="func";class R extends f{render(D){return"return "+super.render(D)}}R.kind="return";class J extends h{render(D){let g="try"+super.render(D);return this.catch&&(g+=this.catch.render(D)),this.finally&&(g+=this.finally.render(D)),g}optimizeNodes(){var D,g;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(g=this.finally)===null||g===void 0||g.optimizeNodes(),this}optimizeNames(D,g){var P,b;return super.optimizeNames(D,g),(P=this.catch)===null||P===void 0||P.optimizeNames(D,g),(b=this.finally)===null||b===void 0||b.optimizeNames(D,g),this}get names(){const D=super.names;return this.catch&&K(D,this.catch.names),this.finally&&K(D,this.finally.names),D}}class q extends h{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}q.kind="catch";class G extends h{render(D){return"finally"+super.render(D)}}G.kind="finally";class ee{constructor(D,g={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...g,_n:g.lines?` +`:""},this._extScope=D,this._scope=new r.Scope({parent:D}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,g){const P=this._extScope.value(D,g);return(this._values[P.prefix]||(this._values[P.prefix]=new Set)).add(P),P}getScopeValue(D,g){return this._extScope.getValue(D,g)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,g,P,b){const w=this._scope.toName(g);return P!==void 0&&b&&(this._constants[w.str]=P),this._leafNode(new o(D,w,P)),w}const(D,g,P){return this._def(r.varKinds.const,D,g,P)}let(D,g,P){return this._def(r.varKinds.let,D,g,P)}var(D,g,P){return this._def(r.varKinds.var,D,g,P)}assign(D,g,P){return this._leafNode(new a(D,g,P))}add(D,g){return this._leafNode(new i(D,e.operators.ADD,g))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new d(D)),this}object(...D){const g=["{"];for(const[P,b]of D)g.length>1&&g.push(","),g.push(P),(P!==b||this.opts.es5)&&(g.push(":"),(0,t.addCodeArg)(g,b));return g.push("}"),new t._Code(g)}if(D,g,P){if(this._blockNode(new m(D)),g&&P)this.code(g).else().code(P).endIf();else if(g)this.code(g).endIf();else if(P)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new m(D))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(m,A)}_for(D,g){return this._blockNode(D),g&&this.code(g).endFor(),this}for(D,g){return this._for(new C(D),g)}forRange(D,g,P,b,w=this.opts.es5?r.varKinds.var:r.varKinds.let){const I=this._scope.toName(D);return this._for(new B(w,I,g,P),()=>b(I))}forOf(D,g,P,b=r.varKinds.const){const w=this._scope.toName(D);if(this.opts.es5){const I=g instanceof t.Name?g:this.var("_arr",g);return this.forRange("_i",0,(0,t._)`${I}.length`,$=>{this.var(w,(0,t._)`${I}[${$}]`),P(w)})}return this._for(new T("of",b,w,g),()=>P(w))}forIn(D,g,P,b=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${g})`,P);const w=this._scope.toName(D);return this._for(new T("in",b,w,g),()=>P(w))}endFor(){return this._endBlockNode(v)}label(D){return this._leafNode(new c(D))}break(D){return this._leafNode(new l(D))}return(D){const g=new R;if(this._blockNode(g),this.code(D),g.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(D,g,P){if(!g&&!P)throw new Error('CodeGen: "try" without "catch" and "finally"');const b=new J;if(this._blockNode(b),this.code(D),g){const w=this.name("e");this._currNode=b.catch=new q(w),g(w)}return P&&(this._currNode=b.finally=new G,this.code(P)),this._endBlockNode(q,G)}throw(D){return this._leafNode(new p(D))}block(D,g){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(g),this}endBlock(D){const g=this._blockStarts.pop();if(g===void 0)throw new Error("CodeGen: not in self-balancing block");const P=this._nodes.length-g;if(P<0||D!==void 0&&P!==D)throw new Error(`CodeGen: wrong number of nodes: ${P} vs ${D} expected`);return this._nodes.length=g,this}func(D,g=t.nil,P,b){return this._blockNode(new N(D,g,P)),b&&this.code(b).endFunc(),this}endFunc(){return this._endBlockNode(N)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,g){const P=this._currNode;if(P instanceof D||g&&P instanceof g)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${g?`${D.kind}/${g.kind}`:D.kind}"`)}_elseNode(D){const g=this._currNode;if(!(g instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=g.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const g=this._nodes;g[g.length-1]=D}}e.CodeGen=ee;function K(F,D){for(const g in D)F[g]=(F[g]||0)+(D[g]||0);return F}function ue(F,D){return D instanceof t._CodeOrName?K(F,D.names):F}function oe(F,D,g){if(F instanceof t.Name)return P(F);if(!b(F))return F;return new t._Code(F._items.reduce((w,I)=>(I instanceof t.Name&&(I=P(I)),I instanceof t._Code?w.push(...I._items):w.push(I),w),[]));function P(w){const I=g[w.str];return I===void 0||D[w.str]!==1?w:(delete D[w.str],I)}function b(w){return w instanceof t._Code&&w._items.some(I=>I instanceof t.Name&&D[I.str]===1&&g[I.str]!==void 0)}}function de(F,D){for(const g in D)F[g]=(F[g]||0)-(D[g]||0)}function he(F){return typeof F=="boolean"||typeof F=="number"||F===null?!F:(0,t._)`!${E(F)}`}e.not=he;const fe=O(e.operators.AND);function ge(...F){return F.reduce(fe)}e.and=ge;const pe=O(e.operators.OR);function z(...F){return F.reduce(pe)}e.or=z;function O(F){return(D,g)=>D===t.nil?g:g===t.nil?D:(0,t._)`${E(D)} ${F} ${E(g)}`}function E(F){return F instanceof t.Name?F:(0,t._)`(${F})`}})(ut);var Dt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=ut,r=xi;function n(N){const R={};for(const J of N)R[J]=!0;return R}e.toHash=n;function u(N,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(s(N,R),!o(R,N.self.RULES.all))}e.alwaysValidSchema=u;function s(N,R=N.schema){const{opts:J,self:q}=N;if(!J.strictSchema||typeof R=="boolean")return;const G=q.RULES.keywords;for(const ee in R)G[ee]||T(N,`unknown keyword: "${ee}"`)}e.checkUnknownRules=s;function o(N,R){if(typeof N=="boolean")return!N;for(const J in N)if(R[J])return!0;return!1}e.schemaHasRules=o;function a(N,R){if(typeof N=="boolean")return!N;for(const J in N)if(J!=="$ref"&&R.all[J])return!0;return!1}e.schemaHasRulesButRef=a;function i({topSchemaRef:N,schemaPath:R},J,q,G){if(!G){if(typeof J=="number"||typeof J=="boolean")return J;if(typeof J=="string")return(0,t._)`${J}`}return(0,t._)`${N}${R}${(0,t.getProperty)(q)}`}e.schemaRefOrVal=i;function c(N){return d(decodeURIComponent(N))}e.unescapeFragment=c;function l(N){return encodeURIComponent(p(N))}e.escapeFragment=l;function p(N){return typeof N=="number"?`${N}`:N.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function d(N){return N.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=d;function f(N,R){if(Array.isArray(N))for(const J of N)R(J);else R(N)}e.eachItem=f;function h({mergeNames:N,mergeToName:R,mergeValues:J,resultToName:q}){return(G,ee,K,ue)=>{const oe=K===void 0?ee:K instanceof t.Name?(ee instanceof t.Name?N(G,ee,K):R(G,ee,K),K):ee instanceof t.Name?(R(G,K,ee),ee):J(ee,K);return ue===t.Name&&!(oe instanceof t.Name)?q(G,oe):oe}}e.mergeEvaluated={props:h({mergeNames:(N,R,J)=>N.if((0,t._)`${J} !== true && ${R} !== undefined`,()=>{N.if((0,t._)`${R} === true`,()=>N.assign(J,!0),()=>N.assign(J,(0,t._)`${J} || {}`).code((0,t._)`Object.assign(${J}, ${R})`))}),mergeToName:(N,R,J)=>N.if((0,t._)`${J} !== true`,()=>{R===!0?N.assign(J,!0):(N.assign(J,(0,t._)`${J} || {}`),A(N,J,R))}),mergeValues:(N,R)=>N===!0?!0:{...N,...R},resultToName:y}),items:h({mergeNames:(N,R,J)=>N.if((0,t._)`${J} !== true && ${R} !== undefined`,()=>N.assign(J,(0,t._)`${R} === true ? true : ${J} > ${R} ? ${J} : ${R}`)),mergeToName:(N,R,J)=>N.if((0,t._)`${J} !== true`,()=>N.assign(J,R===!0?!0:(0,t._)`${J} > ${R} ? ${J} : ${R}`)),mergeValues:(N,R)=>N===!0?!0:Math.max(N,R),resultToName:(N,R)=>N.var("items",R)})};function y(N,R){if(R===!0)return N.var("props",!0);const J=N.var("props",(0,t._)`{}`);return R!==void 0&&A(N,J,R),J}e.evaluatedPropsToName=y;function A(N,R,J){Object.keys(J).forEach(q=>N.assign((0,t._)`${R}${(0,t.getProperty)(q)}`,!0))}e.setEvaluated=A;const m={};function v(N,R){return N.scopeValue("func",{ref:R,code:m[R.code]||(m[R.code]=new r._Code(R.code))})}e.useFunc=v;var C;(function(N){N[N.Num=0]="Num",N[N.Str=1]="Str"})(C=e.Type||(e.Type={}));function B(N,R,J){if(N instanceof t.Name){const q=R===C.Num;return J?q?(0,t._)`"[" + ${N} + "]"`:(0,t._)`"['" + ${N} + "']"`:q?(0,t._)`"/" + ${N}`:(0,t._)`"/" + ${N}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return J?(0,t.getProperty)(N).toString():"/"+p(N)}e.getErrorPath=B;function T(N,R,J=N.opts.strictSchema){if(J){if(R=`strict mode: ${R}`,J===!0)throw new Error(R);N.self.logger.warn(R)}}e.checkStrictMode=T})(Dt);var ru={};Object.defineProperty(ru,"__esModule",{value:!0});const Er=ut,tq={data:new Er.Name("data"),valCxt:new Er.Name("valCxt"),instancePath:new Er.Name("instancePath"),parentData:new Er.Name("parentData"),parentDataProperty:new Er.Name("parentDataProperty"),rootData:new Er.Name("rootData"),dynamicAnchors:new Er.Name("dynamicAnchors"),vErrors:new Er.Name("vErrors"),errors:new Er.Name("errors"),this:new Er.Name("this"),self:new Er.Name("self"),scope:new Er.Name("scope"),json:new Er.Name("json"),jsonPos:new Er.Name("jsonPos"),jsonLen:new Er.Name("jsonLen"),jsonPart:new Er.Name("jsonPart")};ru.default=tq;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=ut,r=Dt,n=ru;e.keywordError={message:({keyword:A})=>(0,t.str)`must pass "${A}" keyword validation`},e.keyword$DataError={message:({keyword:A,schemaType:m})=>m?(0,t.str)`"${A}" keyword must be ${m} ($data)`:(0,t.str)`"${A}" keyword is invalid ($data)`};function u(A,m=e.keywordError,v,C){const{it:B}=A,{gen:T,compositeRule:N,allErrors:R}=B,J=p(A,m,v);C??(N||R)?i(T,J):c(B,(0,t._)`[${J}]`)}e.reportError=u;function s(A,m=e.keywordError,v){const{it:C}=A,{gen:B,compositeRule:T,allErrors:N}=C,R=p(A,m,v);i(B,R),T||N||c(C,n.default.vErrors)}e.reportExtraError=s;function o(A,m){A.assign(n.default.errors,m),A.if((0,t._)`${n.default.vErrors} !== null`,()=>A.if(m,()=>A.assign((0,t._)`${n.default.vErrors}.length`,m),()=>A.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:A,keyword:m,schemaValue:v,data:C,errsCount:B,it:T}){if(B===void 0)throw new Error("ajv implementation error");const N=A.name("err");A.forRange("i",B,n.default.errors,R=>{A.const(N,(0,t._)`${n.default.vErrors}[${R}]`),A.if((0,t._)`${N}.instancePath === undefined`,()=>A.assign((0,t._)`${N}.instancePath`,(0,t.strConcat)(n.default.instancePath,T.errorPath))),A.assign((0,t._)`${N}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${m}`),T.opts.verbose&&(A.assign((0,t._)`${N}.schema`,v),A.assign((0,t._)`${N}.data`,C))})}e.extendErrors=a;function i(A,m){const v=A.const("err",m);A.if((0,t._)`${n.default.vErrors} === null`,()=>A.assign(n.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${n.default.vErrors}.push(${v})`),A.code((0,t._)`${n.default.errors}++`)}function c(A,m){const{gen:v,validateName:C,schemaEnv:B}=A;B.$async?v.throw((0,t._)`new ${A.ValidationError}(${m})`):(v.assign((0,t._)`${C}.errors`,m),v.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(A,m,v){const{createErrors:C}=A.it;return C===!1?(0,t._)`{}`:d(A,m,v)}function d(A,m,v={}){const{gen:C,it:B}=A,T=[f(B,v),h(A,v)];return y(A,m,T),C.object(...T)}function f({errorPath:A},{instancePath:m}){const v=m?(0,t.str)`${A}${(0,r.getErrorPath)(m,r.Type.Str)}`:A;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,v)]}function h({keyword:A,it:{errSchemaPath:m}},{schemaPath:v,parentSchema:C}){let B=C?m:(0,t.str)`${m}/${A}`;return v&&(B=(0,t.str)`${B}${(0,r.getErrorPath)(v,r.Type.Str)}`),[l.schemaPath,B]}function y(A,{params:m,message:v},C){const{keyword:B,data:T,schemaValue:N,it:R}=A,{opts:J,propertyName:q,topSchemaRef:G,schemaPath:ee}=R;C.push([l.keyword,B],[l.params,typeof m=="function"?m(A):m||(0,t._)`{}`]),J.messages&&C.push([l.message,typeof v=="function"?v(A):v]),J.verbose&&C.push([l.schema,N],[l.parentSchema,(0,t._)`${G}${ee}`],[n.default.data,T]),q&&C.push([l.propertyName,q])}})(Zi);Object.defineProperty(pa,"__esModule",{value:!0});pa.boolOrEmptySchema=pa.topBoolOrEmptySchema=void 0;const rq=Zi,nq=ut,uq=ru,sq={message:"boolean schema is false"};function oq(e){const{gen:t,schema:r,validateName:n}=e;r===!1?T6(e,!1):typeof r=="object"&&r.$async===!0?t.return(uq.default.data):(t.assign((0,nq._)`${n}.errors`,null),t.return(!0))}pa.topBoolOrEmptySchema=oq;function aq(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),T6(e)):r.var(t,!0)}pa.boolOrEmptySchema=aq;function T6(e,t){const{gen:r,data:n}=e,u={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,rq.reportError)(u,sq,void 0,t)}var Qi={},Ys={};Object.defineProperty(Ys,"__esModule",{value:!0});Ys.getRules=Ys.isJSONType=void 0;const iq=["string","number","integer","boolean","null","object","array"],cq=new Set(iq);function lq(e){return typeof e=="string"&&cq.has(e)}Ys.isJSONType=lq;function pq(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Ys.getRules=pq;var Au={};Object.defineProperty(Au,"__esModule",{value:!0});Au.shouldUseRule=Au.shouldUseGroup=Au.schemaHasRulesForType=void 0;function dq({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&$6(e,n)}Au.schemaHasRulesForType=dq;function $6(e,t){return t.rules.some(r=>P6(e,r))}Au.shouldUseGroup=$6;function P6(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Au.shouldUseRule=P6;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=Ys,r=Au,n=Zi,u=ut,s=Dt;var o;(function(C){C[C.Correct=0]="Correct",C[C.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function a(C){const B=i(C.type);if(B.includes("null")){if(C.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!B.length&&C.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');C.nullable===!0&&B.push("null")}return B}e.getSchemaTypes=a;function i(C){const B=Array.isArray(C)?C:C?[C]:[];if(B.every(t.isJSONType))return B;throw new Error("type must be JSONType or JSONType[]: "+B.join(","))}e.getJSONTypes=i;function c(C,B){const{gen:T,data:N,opts:R}=C,J=p(B,R.coerceTypes),q=B.length>0&&!(J.length===0&&B.length===1&&(0,r.schemaHasRulesForType)(C,B[0]));if(q){const G=y(B,N,R.strictNumbers,o.Wrong);T.if(G,()=>{J.length?d(C,B,J):m(C)})}return q}e.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function p(C,B){return B?C.filter(T=>l.has(T)||B==="array"&&T==="array"):[]}function d(C,B,T){const{gen:N,data:R,opts:J}=C,q=N.let("dataType",(0,u._)`typeof ${R}`),G=N.let("coerced",(0,u._)`undefined`);J.coerceTypes==="array"&&N.if((0,u._)`${q} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>N.assign(R,(0,u._)`${R}[0]`).assign(q,(0,u._)`typeof ${R}`).if(y(B,R,J.strictNumbers),()=>N.assign(G,R))),N.if((0,u._)`${G} !== undefined`);for(const K of T)(l.has(K)||K==="array"&&J.coerceTypes==="array")&&ee(K);N.else(),m(C),N.endIf(),N.if((0,u._)`${G} !== undefined`,()=>{N.assign(R,G),f(C,G)});function ee(K){switch(K){case"string":N.elseIf((0,u._)`${q} == "number" || ${q} == "boolean"`).assign(G,(0,u._)`"" + ${R}`).elseIf((0,u._)`${R} === null`).assign(G,(0,u._)`""`);return;case"number":N.elseIf((0,u._)`${q} == "boolean" || ${R} === null + || (${q} == "string" && ${R} && ${R} == +${R})`).assign(G,(0,u._)`+${R}`);return;case"integer":N.elseIf((0,u._)`${q} === "boolean" || ${R} === null + || (${q} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(G,(0,u._)`+${R}`);return;case"boolean":N.elseIf((0,u._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(G,!1).elseIf((0,u._)`${R} === "true" || ${R} === 1`).assign(G,!0);return;case"null":N.elseIf((0,u._)`${R} === "" || ${R} === 0 || ${R} === false`),N.assign(G,null);return;case"array":N.elseIf((0,u._)`${q} === "string" || ${q} === "number" + || ${q} === "boolean" || ${R} === null`).assign(G,(0,u._)`[${R}]`)}}}function f({gen:C,parentData:B,parentDataProperty:T},N){C.if((0,u._)`${B} !== undefined`,()=>C.assign((0,u._)`${B}[${T}]`,N))}function h(C,B,T,N=o.Correct){const R=N===o.Correct?u.operators.EQ:u.operators.NEQ;let J;switch(C){case"null":return(0,u._)`${B} ${R} null`;case"array":J=(0,u._)`Array.isArray(${B})`;break;case"object":J=(0,u._)`${B} && typeof ${B} == "object" && !Array.isArray(${B})`;break;case"integer":J=q((0,u._)`!(${B} % 1) && !isNaN(${B})`);break;case"number":J=q();break;default:return(0,u._)`typeof ${B} ${R} ${C}`}return N===o.Correct?J:(0,u.not)(J);function q(G=u.nil){return(0,u.and)((0,u._)`typeof ${B} == "number"`,G,T?(0,u._)`isFinite(${B})`:u.nil)}}e.checkDataType=h;function y(C,B,T,N){if(C.length===1)return h(C[0],B,T,N);let R;const J=(0,s.toHash)(C);if(J.array&&J.object){const q=(0,u._)`typeof ${B} != "object"`;R=J.null?q:(0,u._)`!${B} || ${q}`,delete J.null,delete J.array,delete J.object}else R=u.nil;J.number&&delete J.integer;for(const q in J)R=(0,u.and)(R,h(q,B,T,N));return R}e.checkDataTypes=y;const A={message:({schema:C})=>`must be ${C}`,params:({schema:C,schemaValue:B})=>typeof C=="string"?(0,u._)`{type: ${C}}`:(0,u._)`{type: ${B}}`};function m(C){const B=v(C);(0,n.reportError)(B,A)}e.reportTypeError=m;function v(C){const{gen:B,data:T,schema:N}=C,R=(0,s.schemaRefOrVal)(C,N,"type");return{gen:B,keyword:"type",data:T,schema:N.type,schemaCode:R,schemaValue:R,parentSchema:N,params:{},it:C}}})(Qi);var Wp={};Object.defineProperty(Wp,"__esModule",{value:!0});Wp.assignDefaults=void 0;const go=ut,fq=Dt;function Dq(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const u in r)nv(e,u,r[u].default);else t==="array"&&Array.isArray(n)&&n.forEach((u,s)=>nv(e,s,u.default))}Wp.assignDefaults=Dq;function nv(e,t,r){const{gen:n,compositeRule:u,data:s,opts:o}=e;if(r===void 0)return;const a=(0,go._)`${s}${(0,go.getProperty)(t)}`;if(u){(0,fq.checkStrictMode)(e,`default is ignored for: ${a}`);return}let i=(0,go._)`${a} === undefined`;o.useDefaults==="empty"&&(i=(0,go._)`${i} || ${a} === null || ${a} === ""`),n.if(i,(0,go._)`${a} = ${(0,go.stringify)(r)}`)}var zn={},tt={};Object.defineProperty(tt,"__esModule",{value:!0});tt.validateUnion=tt.validateArray=tt.usePattern=tt.callValidateCode=tt.schemaProperties=tt.allSchemaProperties=tt.noPropertyInData=tt.propertyInData=tt.isOwnProperty=tt.hasPropFunc=tt.reportMissingProp=tt.checkMissingProp=tt.checkReportMissingProp=void 0;const St=ut,Fm=Dt,Mu=ru,hq=Dt;function mq(e,t){const{gen:r,data:n,it:u}=e;r.if(bm(r,n,t,u.opts.ownProperties),()=>{e.setParams({missingProperty:(0,St._)`${t}`},!0),e.error()})}tt.checkReportMissingProp=mq;function Eq({gen:e,data:t,it:{opts:r}},n,u){return(0,St.or)(...n.map(s=>(0,St.and)(bm(e,t,s,r.ownProperties),(0,St._)`${u} = ${s}`)))}tt.checkMissingProp=Eq;function yq(e,t){e.setParams({missingProperty:t},!0),e.error()}tt.reportMissingProp=yq;function k6(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,St._)`Object.prototype.hasOwnProperty`})}tt.hasPropFunc=k6;function Cm(e,t,r){return(0,St._)`${k6(e)}.call(${t}, ${r})`}tt.isOwnProperty=Cm;function vq(e,t,r,n){const u=(0,St._)`${t}${(0,St.getProperty)(r)} !== undefined`;return n?(0,St._)`${u} && ${Cm(e,t,r)}`:u}tt.propertyInData=vq;function bm(e,t,r,n){const u=(0,St._)`${t}${(0,St.getProperty)(r)} === undefined`;return n?(0,St.or)(u,(0,St.not)(Cm(e,t,r))):u}tt.noPropertyInData=bm;function O6(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}tt.allSchemaProperties=O6;function gq(e,t){return O6(t).filter(r=>!(0,Fm.alwaysValidSchema)(e,t[r]))}tt.schemaProperties=gq;function Aq({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:u,errorPath:s},it:o},a,i,c){const l=c?(0,St._)`${e}, ${t}, ${n}${u}`:t,p=[[Mu.default.instancePath,(0,St.strConcat)(Mu.default.instancePath,s)],[Mu.default.parentData,o.parentData],[Mu.default.parentDataProperty,o.parentDataProperty],[Mu.default.rootData,Mu.default.rootData]];o.opts.dynamicRef&&p.push([Mu.default.dynamicAnchors,Mu.default.dynamicAnchors]);const d=(0,St._)`${l}, ${r.object(...p)}`;return i!==St.nil?(0,St._)`${a}.call(${i}, ${d})`:(0,St._)`${a}(${d})`}tt.callValidateCode=Aq;const Fq=(0,St._)`new RegExp`;function Cq({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:u}=t.code,s=u(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,St._)`${u.code==="new RegExp"?Fq:(0,hq.useFunc)(e,u)}(${r}, ${n})`})}tt.usePattern=Cq;function bq(e){const{gen:t,data:r,keyword:n,it:u}=e,s=t.name("valid");if(u.allErrors){const a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){const i=t.const("len",(0,St._)`${r}.length`);t.forRange("i",0,i,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:Fm.Type.Num},s),t.if((0,St.not)(s),a)})}}tt.validateArray=bq;function Sq(e){const{gen:t,schema:r,keyword:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(i=>(0,Fm.alwaysValidSchema)(u,i))&&!u.opts.unevaluated)return;const o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((i,c)=>{const l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,St._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,St.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}tt.validateUnion=Sq;Object.defineProperty(zn,"__esModule",{value:!0});zn.validateKeywordUsage=zn.validSchemaType=zn.funcKeywordCode=zn.macroKeywordCode=void 0;const gr=ut,Os=ru,wq=tt,_q=Zi;function Bq(e,t){const{gen:r,keyword:n,schema:u,parentSchema:s,it:o}=e,a=t.macro.call(o.self,u,s,o),i=I6(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");e.subschema({schema:a,schemaPath:gr.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:i,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}zn.macroKeywordCode=Bq;function Tq(e,t){var r;const{gen:n,keyword:u,schema:s,parentSchema:o,$data:a,it:i}=e;Pq(i,t);const c=!a&&t.compile?t.compile.call(i.self,s,o,i):t.validate,l=I6(n,u,c),p=n.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1)y(),t.modifying&&uv(e),A(()=>e.error());else{const m=t.async?f():h();t.modifying&&uv(e),A(()=>$q(e,m))}}function f(){const m=n.let("ruleErrs",null);return n.try(()=>y((0,gr._)`await `),v=>n.assign(p,!1).if((0,gr._)`${v} instanceof ${i.ValidationError}`,()=>n.assign(m,(0,gr._)`${v}.errors`),()=>n.throw(v))),m}function h(){const m=(0,gr._)`${l}.errors`;return n.assign(m,null),y(gr.nil),m}function y(m=t.async?(0,gr._)`await `:gr.nil){const v=i.opts.passContext?Os.default.this:Os.default.self,C=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,gr._)`${m}${(0,wq.callValidateCode)(e,l,v,C)}`,t.modifying)}function A(m){var v;n.if((0,gr.not)((v=t.valid)!==null&&v!==void 0?v:p),m)}}zn.funcKeywordCode=Tq;function uv(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,gr._)`${n.parentData}[${n.parentDataProperty}]`))}function $q(e,t){const{gen:r}=e;r.if((0,gr._)`Array.isArray(${t})`,()=>{r.assign(Os.default.vErrors,(0,gr._)`${Os.default.vErrors} === null ? ${t} : ${Os.default.vErrors}.concat(${t})`).assign(Os.default.errors,(0,gr._)`${Os.default.vErrors}.length`),(0,_q.extendErrors)(e)},()=>e.error())}function Pq({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function I6(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,gr.stringify)(r)})}function kq(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}zn.validSchemaType=kq;function Oq({schema:e,opts:t,self:r,errSchemaPath:n},u,s){if(Array.isArray(u.keyword)?!u.keyword.includes(s):u.keyword!==s)throw new Error("ajv implementation error");const o=u.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(u.validateSchema&&!u.validateSchema(e[s])){const i=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(u.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(i);else throw new Error(i)}}zn.validateKeywordUsage=Oq;var rs={};Object.defineProperty(rs,"__esModule",{value:!0});rs.extendSubschemaMode=rs.extendSubschemaData=rs.getSubschema=void 0;const Wn=ut,N6=Dt;function Iq(e,{keyword:t,schemaProp:r,schema:n,schemaPath:u,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Wn._)`${e.schemaPath}${(0,Wn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Wn._)`${e.schemaPath}${(0,Wn.getProperty)(t)}${(0,Wn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,N6.escapeFragment)(r)}`}}if(n!==void 0){if(u===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:u,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}rs.getSubschema=Iq;function Nq(e,t,{dataProp:r,dataPropType:n,data:u,dataTypes:s,propertyName:o}){if(u!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(r!==void 0){const{errorPath:c,dataPathArr:l,opts:p}=t,d=a.let("data",(0,Wn._)`${t.data}${(0,Wn.getProperty)(r)}`,!0);i(d),e.errorPath=(0,Wn.str)`${c}${(0,N6.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Wn._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(u!==void 0){const c=u instanceof Wn.Name?u:a.let("data",u,!0);i(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function i(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}rs.extendSubschemaData=Nq;function qq(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:u,allErrors:s}){n!==void 0&&(e.compositeRule=n),u!==void 0&&(e.createErrors=u),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}rs.extendSubschemaMode=qq;var dr={},q6=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,u,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(u=n;u--!==0;)if(!e(t[u],r[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(u=n;u--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[u]))return!1;for(u=n;u--!==0;){var o=s[u];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},W2={},xq={get exports(){return W2},set exports(e){W2=e}},Zu=xq.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},u=r.post||function(){};Tl(t,n,u,e,"",e)};Zu.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Zu.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Zu.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Zu.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function Tl(e,t,r,n,u,s,o,a,i,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,u,s,o,a,i,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in Zu.arrayKeywords)for(var d=0;dt+=x6(n)),t===1/0))return 1/0}return t}function R6(e,t="",r){r!==!1&&(t=sa(t));const n=e.parse(t);return j6(e,n)}dr.getFullPath=R6;function j6(e,t){return e.serialize(t).split("#")[0]+"#"}dr._getFullPath=j6;const Hq=/#\/?$/;function sa(e){return e?e.replace(Hq,""):""}dr.normalizeId=sa;function Wq(e,t,r){return r=sa(r),e.resolve(t,r)}dr.resolveUrl=Wq;const Jq=/^[a-z_][-a-z0-9._]*$/i;function zq(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,u=sa(e[r]||t),s={"":u},o=R6(n,u,!1),a={},i=new Set;return Lq(e,{allKeys:!0},(p,d,f,h)=>{if(h===void 0)return;const y=o+d;let A=s[h];typeof p[r]=="string"&&(A=m.call(this,p[r])),v.call(this,p.$anchor),v.call(this,p.$dynamicAnchor),s[d]=A;function m(C){const B=this.opts.uriResolver.resolve;if(C=sa(A?B(A,C):C),i.has(C))throw l(C);i.add(C);let T=this.refs[C];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?c(p,T.schema,C):C!==sa(y)&&(C[0]==="#"?(c(p,a[C],C),a[C]=p):this.refs[C]=y),C}function v(C){if(typeof C=="string"){if(!Jq.test(C))throw new Error(`invalid anchor "${C}"`);m.call(this,`#${C}`)}}}),a;function c(p,d,f){if(d!==void 0&&!Mq(p,d))throw l(f)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}dr.getSchemaRefs=zq;Object.defineProperty(Tn,"__esModule",{value:!0});Tn.getData=Tn.KeywordCxt=Tn.validateFunctionCode=void 0;const M6=pa,sv=Qi,Sm=Au,pp=Qi,Kq=Wp,mi=zn,af=rs,Re=ut,We=ru,Xq=dr,Fu=Dt,Ua=Zi;function Yq(e){if(G6(e)&&(V6(e),U6(e))){ex(e);return}L6(e,()=>(0,M6.topBoolOrEmptySchema)(e))}Tn.validateFunctionCode=Yq;function L6({gen:e,validateName:t,schema:r,schemaEnv:n,opts:u},s){u.code.es5?e.func(t,(0,Re._)`${We.default.data}, ${We.default.valCxt}`,n.$async,()=>{e.code((0,Re._)`"use strict"; ${ov(r,u)}`),Qq(e,u),e.code(s)}):e.func(t,(0,Re._)`${We.default.data}, ${Zq(u)}`,n.$async,()=>e.code(ov(r,u)).code(s))}function Zq(e){return(0,Re._)`{${We.default.instancePath}="", ${We.default.parentData}, ${We.default.parentDataProperty}, ${We.default.rootData}=${We.default.data}${e.dynamicRef?(0,Re._)`, ${We.default.dynamicAnchors}={}`:Re.nil}}={}`}function Qq(e,t){e.if(We.default.valCxt,()=>{e.var(We.default.instancePath,(0,Re._)`${We.default.valCxt}.${We.default.instancePath}`),e.var(We.default.parentData,(0,Re._)`${We.default.valCxt}.${We.default.parentData}`),e.var(We.default.parentDataProperty,(0,Re._)`${We.default.valCxt}.${We.default.parentDataProperty}`),e.var(We.default.rootData,(0,Re._)`${We.default.valCxt}.${We.default.rootData}`),t.dynamicRef&&e.var(We.default.dynamicAnchors,(0,Re._)`${We.default.valCxt}.${We.default.dynamicAnchors}`)},()=>{e.var(We.default.instancePath,(0,Re._)`""`),e.var(We.default.parentData,(0,Re._)`undefined`),e.var(We.default.parentDataProperty,(0,Re._)`undefined`),e.var(We.default.rootData,We.default.data),t.dynamicRef&&e.var(We.default.dynamicAnchors,(0,Re._)`{}`)})}function ex(e){const{schema:t,opts:r,gen:n}=e;L6(e,()=>{r.$comment&&t.$comment&&W6(e),sx(e),n.let(We.default.vErrors,null),n.let(We.default.errors,0),r.unevaluated&&tx(e),H6(e),ix(e)})}function tx(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,Re._)`${r}.evaluated`),t.if((0,Re._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,Re._)`${e.evaluated}.props`,(0,Re._)`undefined`)),t.if((0,Re._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,Re._)`${e.evaluated}.items`,(0,Re._)`undefined`))}function ov(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,Re._)`/*# sourceURL=${r} */`:Re.nil}function rx(e,t){if(G6(e)&&(V6(e),U6(e))){nx(e,t);return}(0,M6.boolOrEmptySchema)(e,t)}function U6({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function G6(e){return typeof e.schema!="boolean"}function nx(e,t){const{schema:r,gen:n,opts:u}=e;u.$comment&&r.$comment&&W6(e),ox(e),ax(e);const s=n.const("_errs",We.default.errors);H6(e,s),n.var(t,(0,Re._)`${s} === ${We.default.errors}`)}function V6(e){(0,Fu.checkUnknownRules)(e),ux(e)}function H6(e,t){if(e.opts.jtd)return av(e,[],!1,t);const r=(0,sv.getSchemaTypes)(e.schema),n=(0,sv.coerceAndCheckDataType)(e,r);av(e,r,!n,t)}function ux(e){const{schema:t,errSchemaPath:r,opts:n,self:u}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,Fu.schemaHasRulesButRef)(t,u.RULES)&&u.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function sx(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,Fu.checkStrictMode)(e,"default is ignored in the schema root")}function ox(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,Xq.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function ax(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function W6({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:u}){const s=r.$comment;if(u.$comment===!0)e.code((0,Re._)`${We.default.self}.logger.log(${s})`);else if(typeof u.$comment=="function"){const o=(0,Re.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,Re._)`${We.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function ix(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:u,opts:s}=e;r.$async?t.if((0,Re._)`${We.default.errors} === 0`,()=>t.return(We.default.data),()=>t.throw((0,Re._)`new ${u}(${We.default.vErrors})`)):(t.assign((0,Re._)`${n}.errors`,We.default.vErrors),s.unevaluated&&cx(e),t.return((0,Re._)`${We.default.errors} === 0`))}function cx({gen:e,evaluated:t,props:r,items:n}){r instanceof Re.Name&&e.assign((0,Re._)`${t}.props`,r),n instanceof Re.Name&&e.assign((0,Re._)`${t}.items`,n)}function av(e,t,r,n){const{gen:u,schema:s,data:o,allErrors:a,opts:i,self:c}=e,{RULES:l}=c;if(s.$ref&&(i.ignoreKeywordsWithRef||!(0,Fu.schemaHasRulesButRef)(s,l))){u.block(()=>K6(e,"$ref",l.all.$ref.definition));return}i.jtd||lx(e,t),u.block(()=>{for(const d of l.rules)p(d);p(l.post)});function p(d){(0,Sm.shouldUseGroup)(s,d)&&(d.type?(u.if((0,pp.checkDataType)(d.type,o,i.strictNumbers)),iv(e,d),t.length===1&&t[0]===d.type&&r&&(u.else(),(0,pp.reportTypeError)(e)),u.endIf()):iv(e,d),a||u.if((0,Re._)`${We.default.errors} === ${n||0}`))}}function iv(e,t){const{gen:r,schema:n,opts:{useDefaults:u}}=e;u&&(0,Kq.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,Sm.shouldUseRule)(n,s)&&K6(e,s.keyword,s.definition,t.type)})}function lx(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(px(e,t),e.opts.allowUnionTypes||dx(e,t),fx(e,e.dataTypes))}function px(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{J6(e.dataTypes,r)||wm(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),hx(e,t)}}function dx(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&wm(e,"use allowUnionTypes to allow union type keyword")}function fx(e,t){const r=e.self.RULES.all;for(const n in r){const u=r[n];if(typeof u=="object"&&(0,Sm.shouldUseRule)(e.schema,u)){const{type:s}=u.definition;s.length&&!s.some(o=>Dx(t,o))&&wm(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function Dx(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function J6(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function hx(e,t){const r=[];for(const n of e.dataTypes)J6(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function wm(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,Fu.checkStrictMode)(e,t,e.opts.strictTypes)}let z6=class{constructor(t,r,n){if((0,mi.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,Fu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",X6(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,mi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",We.default.errors))}result(t,r,n){this.failResult((0,Re.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,Re.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,Re._)`${r} !== undefined && (${(0,Re.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ua.reportExtraError:Ua.reportError)(this,this.def.error,r)}$dataError(){(0,Ua.reportError)(this,this.def.$dataError||Ua.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ua.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=Re.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=Re.nil,r=Re.nil){if(!this.$data)return;const{gen:n,schemaCode:u,schemaType:s,def:o}=this;n.if((0,Re.or)((0,Re._)`${u} === undefined`,r)),t!==Re.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==Re.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:u,it:s}=this;return(0,Re.or)(o(),a());function o(){if(n.length){if(!(r instanceof Re.Name))throw new Error("ajv implementation error");const i=Array.isArray(n)?n:[n];return(0,Re._)`${(0,pp.checkDataTypes)(i,r,s.opts.strictNumbers,pp.DataType.Wrong)}`}return Re.nil}function a(){if(u.validateSchema){const i=t.scopeValue("validate$data",{ref:u.validateSchema});return(0,Re._)`!${i}(${r})`}return Re.nil}}subschema(t,r){const n=(0,af.getSubschema)(this.it,t);(0,af.extendSubschemaData)(n,this.it,t),(0,af.extendSubschemaMode)(n,t);const u={...this.it,...n,items:void 0,props:void 0};return rx(u,r),u}mergeEvaluated(t,r){const{it:n,gen:u}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=Fu.mergeEvaluated.props(u,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=Fu.mergeEvaluated.items(u,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:u}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return u.if(r,()=>this.mergeEvaluated(t,Re.Name)),!0}};Tn.KeywordCxt=z6;function K6(e,t,r,n){const u=new z6(e,r,t);"code"in r?r.code(u,n):u.$data&&r.validate?(0,mi.funcKeywordCode)(u,r):"macro"in r?(0,mi.macroKeywordCode)(u,r):(r.compile||r.validate)&&(0,mi.funcKeywordCode)(u,r)}const mx=/^\/(?:[^~]|~0|~1)*$/,Ex=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function X6(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let u,s;if(e==="")return We.default.rootData;if(e[0]==="/"){if(!mx.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);u=e,s=We.default.rootData}else{const c=Ex.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const l=+c[1];if(u=c[2],u==="#"){if(l>=t)throw new Error(i("property/index",l));return n[t-l]}if(l>t)throw new Error(i("data",l));if(s=r[t-l],!u)return s}let o=s;const a=u.split("/");for(const c of a)c&&(s=(0,Re._)`${s}${(0,Re.getProperty)((0,Fu.unescapeJsonPointer)(c))}`,o=(0,Re._)`${o} && ${s}`);return o;function i(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}Tn.getData=X6;var ec={};Object.defineProperty(ec,"__esModule",{value:!0});let yx=class extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}};ec.default=yx;var tc={};Object.defineProperty(tc,"__esModule",{value:!0});const cf=dr;let vx=class extends Error{constructor(t,r,n,u){super(u||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,cf.resolveUrl)(t,r,n),this.missingSchema=(0,cf.normalizeId)((0,cf.getFullPath)(t,this.missingRef))}};tc.default=vx;var Nr={};Object.defineProperty(Nr,"__esModule",{value:!0});Nr.resolveSchema=Nr.getCompilingSchema=Nr.resolveRef=Nr.compileSchema=Nr.SchemaEnv=void 0;const hn=ut,gx=ec,ws=ru,wn=dr,cv=Dt,Ax=Tn;let Jp=class{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,wn.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}};Nr.SchemaEnv=Jp;function _m(e){const t=Y6.call(this,e);if(t)return t;const r=(0,wn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:u}=this.opts.code,{ownProperties:s}=this.opts,o=new hn.CodeGen(this.scope,{es5:n,lines:u,ownProperties:s});let a;e.$async&&(a=o.scopeValue("Error",{ref:gx.default,code:(0,hn._)`require("ajv/dist/runtime/validation_error").default`}));const i=o.scopeName("validate");e.validateName=i;const c={gen:o,allErrors:this.opts.allErrors,data:ws.default.data,parentData:ws.default.parentData,parentDataProperty:ws.default.parentDataProperty,dataNames:[ws.default.data],dataPathArr:[hn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,hn.stringify)(e.schema)}:{ref:e.schema}),validateName:i,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:hn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,hn._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,Ax.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const p=o.toString();l=`${o.scopeRefs(ws.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const f=new Function(`${ws.default.self}`,`${ws.default.scope}`,l)(this,this.scope.get());if(this.scope.value(i,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:i,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:y}=c;f.evaluated={props:h instanceof hn.Name?void 0:h,items:y instanceof hn.Name?void 0:y,dynamicProps:h instanceof hn.Name,dynamicItems:y instanceof hn.Name},f.source&&(f.source.evaluated=(0,hn.stringify)(f.evaluated))}return e.validate=f,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}Nr.compileSchema=_m;function Fx(e,t,r){var n;r=(0,wn.resolveUrl)(this.opts.uriResolver,t,r);const u=e.refs[r];if(u)return u;let s=Sx.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new Jp({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Cx.call(this,s)}Nr.resolveRef=Fx;function Cx(e){return(0,wn.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:_m.call(this,e)}function Y6(e){for(const t of this._compilations)if(bx(t,e))return t}Nr.getCompilingSchema=Y6;function bx(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Sx(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||zp.call(this,e,t)}function zp(e,t){const r=this.opts.uriResolver.parse(t),n=(0,wn._getFullPath)(this.opts.uriResolver,r);let u=(0,wn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===u)return lf.call(this,r,e);const s=(0,wn.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const a=zp.call(this,e,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:lf.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||_m.call(this,o),s===(0,wn.normalizeId)(t)){const{schema:a}=o,{schemaId:i}=this.opts,c=a[i];return c&&(u=(0,wn.resolveUrl)(this.opts.uriResolver,u,c)),new Jp({schema:a,schemaId:i,root:e,baseId:u})}return lf.call(this,r,o)}}Nr.resolveSchema=zp;const wx=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function lf(e,{baseId:t,schema:r,root:n}){var u;if(((u=e.fragment)===null||u===void 0?void 0:u[0])!=="/")return;for(const a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const i=r[(0,cv.unescapeFragment)(a)];if(i===void 0)return;r=i;const c=typeof r=="object"&&r[this.opts.schemaId];!wx.has(a)&&c&&(t=(0,wn.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,cv.schemaHasRulesButRef)(r,this.RULES)){const a=(0,wn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=zp.call(this,n,a)}const{schemaId:o}=this.opts;if(s=s||new Jp({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const _x="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Bx="Meta-schema for $data reference (JSON AnySchema extension proposal)",Tx="object",$x=["$data"],Px={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},kx=!1,Ox={$id:_x,description:Bx,type:Tx,required:$x,properties:Px,additionalProperties:kx};var Bm={},dp={},Ix={get exports(){return dp},set exports(e){dp=e}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(Vs,function(r){function n(){for(var Q=arguments.length,V=Array(Q),te=0;te1){V[0]=V[0].slice(0,-1);for(var ie=V.length-1,ae=1;ae= 0x80 (not a basic code point)","invalid-input":"Invalid input"},ee=y-A,K=Math.floor,ue=String.fromCharCode;function oe(Q){throw new RangeError(G[Q])}function de(Q,V){for(var te=[],ie=Q.length;ie--;)te[ie]=V(Q[ie]);return te}function he(Q,V){var te=Q.split("@"),ie="";te.length>1&&(ie=te[0]+"@",Q=te[1]),Q=Q.replace(q,".");var ae=Q.split("."),xe=de(ae,V).join(".");return ie+xe}function fe(Q){for(var V=[],te=0,ie=Q.length;te=55296&&ae<=56319&&te>1,V+=K(V/te);V>ee*m>>1;ae+=y)V=K(V/ee);return K(ae+(ee+1)*V/(V+v))},E=function(V){var te=[],ie=V.length,ae=0,xe=T,Le=B,ot=V.lastIndexOf(N);ot<0&&(ot=0);for(var ct=0;ct=128&&oe("not-basic"),te.push(V.charCodeAt(ct));for(var $t=ot>0?ot+1:0;$t=ie&&oe("invalid-input");var He=pe(V.charCodeAt($t++));(He>=y||He>K((h-ae)/Et))&&oe("overflow"),ae+=He*Et;var ht=Pt<=Le?A:Pt>=Le+m?m:Pt-Le;if(HeK(h/jt)&&oe("overflow"),Et*=jt}var vt=te.length+1;Le=O(ae-et,vt,et==0),K(ae/vt)>h-xe&&oe("overflow"),xe+=K(ae/vt),ae%=vt,te.splice(ae++,0,xe)}return String.fromCodePoint.apply(String,te)},F=function(V){var te=[];V=fe(V);var ie=V.length,ae=T,xe=0,Le=B,ot=!0,ct=!1,$t=void 0;try{for(var et=V[Symbol.iterator](),Et;!(ot=(Et=et.next()).done);ot=!0){var Pt=Et.value;Pt<128&&te.push(ue(Pt))}}catch(xu){ct=!0,$t=xu}finally{try{!ot&&et.return&&et.return()}finally{if(ct)throw $t}}var He=te.length,ht=He;for(He&&te.push(N);ht=ae&&auK((h-xe)/br)&&oe("overflow"),xe+=(jt-ae)*br,ae=jt;var Xt=!0,iu=!1,pn=void 0;try{for(var Fs=V[Symbol.iterator](),kc;!(Xt=(kc=Fs.next()).done);Xt=!0){var Oc=kc.value;if(Och&&oe("overflow"),Oc==ae){for(var fo=xe,cu=y;;cu+=y){var Do=cu<=Le?A:cu>=Le+m?m:cu-Le;if(fo>6|192).toString(16).toUpperCase()+"%"+(V&63|128).toString(16).toUpperCase():te="%"+(V>>12|224).toString(16).toUpperCase()+"%"+(V>>6&63|128).toString(16).toUpperCase()+"%"+(V&63|128).toString(16).toUpperCase(),te}function I(Q){for(var V="",te=0,ie=Q.length;te=194&&ae<224){if(ie-te>=6){var xe=parseInt(Q.substr(te+4,2),16);V+=String.fromCharCode((ae&31)<<6|xe&63)}else V+=Q.substr(te,6);te+=6}else if(ae>=224){if(ie-te>=9){var Le=parseInt(Q.substr(te+4,2),16),ot=parseInt(Q.substr(te+7,2),16);V+=String.fromCharCode((ae&15)<<12|(Le&63)<<6|ot&63)}else V+=Q.substr(te,9);te+=9}else V+=Q.substr(te,3),te+=3}return V}function $(Q,V){function te(ie){var ae=I(ie);return ae.match(V.UNRESERVED)?ae:ie}return Q.scheme&&(Q.scheme=String(Q.scheme).replace(V.PCT_ENCODED,te).toLowerCase().replace(V.NOT_SCHEME,"")),Q.userinfo!==void 0&&(Q.userinfo=String(Q.userinfo).replace(V.PCT_ENCODED,te).replace(V.NOT_USERINFO,w).replace(V.PCT_ENCODED,o)),Q.host!==void 0&&(Q.host=String(Q.host).replace(V.PCT_ENCODED,te).toLowerCase().replace(V.NOT_HOST,w).replace(V.PCT_ENCODED,o)),Q.path!==void 0&&(Q.path=String(Q.path).replace(V.PCT_ENCODED,te).replace(Q.scheme?V.NOT_PATH:V.NOT_PATH_NOSCHEME,w).replace(V.PCT_ENCODED,o)),Q.query!==void 0&&(Q.query=String(Q.query).replace(V.PCT_ENCODED,te).replace(V.NOT_QUERY,w).replace(V.PCT_ENCODED,o)),Q.fragment!==void 0&&(Q.fragment=String(Q.fragment).replace(V.PCT_ENCODED,te).replace(V.NOT_FRAGMENT,w).replace(V.PCT_ENCODED,o)),Q}function M(Q){return Q.replace(/^0*(.*)/,"$1")||"0"}function L(Q,V){var te=Q.match(V.IPV4ADDRESS)||[],ie=d(te,2),ae=ie[1];return ae?ae.split(".").map(M).join("."):Q}function Y(Q,V){var te=Q.match(V.IPV6ADDRESS)||[],ie=d(te,3),ae=ie[1],xe=ie[2];if(ae){for(var Le=ae.toLowerCase().split("::").reverse(),ot=d(Le,2),ct=ot[0],$t=ot[1],et=$t?$t.split(":").map(M):[],Et=ct.split(":").map(M),Pt=V.IPV4ADDRESS.test(Et[Et.length-1]),He=Pt?7:8,ht=Et.length-He,jt=Array(He),vt=0;vt1){var ln=jt.slice(0,Yr.index),au=jt.slice(Yr.index+Yr.length);Zr=ln.join(":")+"::"+au.join(":")}else Zr=jt.join(":");return xe&&(Zr+="%"+xe),Zr}else return Q}var be=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Ne="".match(/(){0}/)[1]===void 0;function Ve(Q){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te={},ie=V.iri!==!1?p:l;V.reference==="suffix"&&(Q=(V.scheme?V.scheme+":":"")+"//"+Q);var ae=Q.match(be);if(ae){Ne?(te.scheme=ae[1],te.userinfo=ae[3],te.host=ae[4],te.port=parseInt(ae[5],10),te.path=ae[6]||"",te.query=ae[7],te.fragment=ae[8],isNaN(te.port)&&(te.port=ae[5])):(te.scheme=ae[1]||void 0,te.userinfo=Q.indexOf("@")!==-1?ae[3]:void 0,te.host=Q.indexOf("//")!==-1?ae[4]:void 0,te.port=parseInt(ae[5],10),te.path=ae[6]||"",te.query=Q.indexOf("?")!==-1?ae[7]:void 0,te.fragment=Q.indexOf("#")!==-1?ae[8]:void 0,isNaN(te.port)&&(te.port=Q.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?ae[4]:void 0)),te.host&&(te.host=Y(L(te.host,ie),ie)),te.scheme===void 0&&te.userinfo===void 0&&te.host===void 0&&te.port===void 0&&!te.path&&te.query===void 0?te.reference="same-document":te.scheme===void 0?te.reference="relative":te.fragment===void 0?te.reference="absolute":te.reference="uri",V.reference&&V.reference!=="suffix"&&V.reference!==te.reference&&(te.error=te.error||"URI is not a "+V.reference+" reference.");var xe=b[(V.scheme||te.scheme||"").toLowerCase()];if(!V.unicodeSupport&&(!xe||!xe.unicodeSupport)){if(te.host&&(V.domainHost||xe&&xe.domainHost))try{te.host=P.toASCII(te.host.replace(ie.PCT_ENCODED,I).toLowerCase())}catch(Le){te.error=te.error||"Host's domain name can not be converted to ASCII via punycode: "+Le}$(te,l)}else $(te,ie);xe&&xe.parse&&xe.parse(te,V)}else te.error=te.error||"URI can not be parsed.";return te}function Me(Q,V){var te=V.iri!==!1?p:l,ie=[];return Q.userinfo!==void 0&&(ie.push(Q.userinfo),ie.push("@")),Q.host!==void 0&&ie.push(Y(L(String(Q.host),te),te).replace(te.IPV6ADDRESS,function(ae,xe,Le){return"["+xe+(Le?"%25"+Le:"")+"]"})),(typeof Q.port=="number"||typeof Q.port=="string")&&(ie.push(":"),ie.push(String(Q.port))),ie.length?ie.join(""):void 0}var Fe=/^\.\.?\//,qe=/^\/\.(\/|$)/,Pe=/^\/\.\.(\/|$)/,Be=/^\/?(?:.|\n)*?(?=\/|$)/;function le(Q){for(var V=[];Q.length;)if(Q.match(Fe))Q=Q.replace(Fe,"");else if(Q.match(qe))Q=Q.replace(qe,"/");else if(Q.match(Pe))Q=Q.replace(Pe,"/"),V.pop();else if(Q==="."||Q==="..")Q="";else{var te=Q.match(Be);if(te){var ie=te[0];Q=Q.slice(ie.length),V.push(ie)}else throw new Error("Unexpected dot segment condition")}return V.join("")}function Te(Q){var V=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},te=V.iri?p:l,ie=[],ae=b[(V.scheme||Q.scheme||"").toLowerCase()];if(ae&&ae.serialize&&ae.serialize(Q,V),Q.host&&!te.IPV6ADDRESS.test(Q.host)){if(V.domainHost||ae&&ae.domainHost)try{Q.host=V.iri?P.toUnicode(Q.host):P.toASCII(Q.host.replace(te.PCT_ENCODED,I).toLowerCase())}catch(ot){Q.error=Q.error||"Host's domain name can not be converted to "+(V.iri?"Unicode":"ASCII")+" via punycode: "+ot}}$(Q,te),V.reference!=="suffix"&&Q.scheme&&(ie.push(Q.scheme),ie.push(":"));var xe=Me(Q,V);if(xe!==void 0&&(V.reference!=="suffix"&&ie.push("//"),ie.push(xe),Q.path&&Q.path.charAt(0)!=="/"&&ie.push("/")),Q.path!==void 0){var Le=Q.path;!V.absolutePath&&(!ae||!ae.absolutePath)&&(Le=le(Le)),xe===void 0&&(Le=Le.replace(/^\/\//,"/%2F")),ie.push(Le)}return Q.query!==void 0&&(ie.push("?"),ie.push(Q.query)),Q.fragment!==void 0&&(ie.push("#"),ie.push(Q.fragment)),ie.join("")}function W(Q,V){var te=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},ie=arguments[3],ae={};return ie||(Q=Ve(Te(Q,te),te),V=Ve(Te(V,te),te)),te=te||{},!te.tolerant&&V.scheme?(ae.scheme=V.scheme,ae.userinfo=V.userinfo,ae.host=V.host,ae.port=V.port,ae.path=le(V.path||""),ae.query=V.query):(V.userinfo!==void 0||V.host!==void 0||V.port!==void 0?(ae.userinfo=V.userinfo,ae.host=V.host,ae.port=V.port,ae.path=le(V.path||""),ae.query=V.query):(V.path?(V.path.charAt(0)==="/"?ae.path=le(V.path):((Q.userinfo!==void 0||Q.host!==void 0||Q.port!==void 0)&&!Q.path?ae.path="/"+V.path:Q.path?ae.path=Q.path.slice(0,Q.path.lastIndexOf("/")+1)+V.path:ae.path=V.path,ae.path=le(ae.path)),ae.query=V.query):(ae.path=Q.path,V.query!==void 0?ae.query=V.query:ae.query=Q.query),ae.userinfo=Q.userinfo,ae.host=Q.host,ae.port=Q.port),ae.scheme=Q.scheme),ae.fragment=V.fragment,ae}function se(Q,V,te){var ie=i({scheme:"null"},te);return Te(W(Ve(Q,ie),Ve(V,ie),ie,!0),ie)}function ce(Q,V){return typeof Q=="string"?Q=Te(Ve(Q,V),V):s(Q)==="object"&&(Q=Ve(Te(Q,V),V)),Q}function k(Q,V,te){return typeof Q=="string"?Q=Te(Ve(Q,te),te):s(Q)==="object"&&(Q=Te(Q,te)),typeof V=="string"?V=Te(Ve(V,te),te):s(V)==="object"&&(V=Te(V,te)),Q===V}function S(Q,V){return Q&&Q.toString().replace(!V||!V.iri?l.ESCAPE:p.ESCAPE,w)}function _(Q,V){return Q&&Q.toString().replace(!V||!V.iri?l.PCT_ENCODED:p.PCT_ENCODED,I)}var x={scheme:"http",domainHost:!0,parse:function(V,te){return V.host||(V.error=V.error||"HTTP URIs must have a host."),V},serialize:function(V,te){var ie=String(V.scheme).toLowerCase()==="https";return(V.port===(ie?443:80)||V.port==="")&&(V.port=void 0),V.path||(V.path="/"),V}},U={scheme:"https",domainHost:x.domainHost,parse:x.parse,serialize:x.serialize};function X(Q){return typeof Q.secure=="boolean"?Q.secure:String(Q.scheme).toLowerCase()==="wss"}var re={scheme:"ws",domainHost:!0,parse:function(V,te){var ie=V;return ie.secure=X(ie),ie.resourceName=(ie.path||"/")+(ie.query?"?"+ie.query:""),ie.path=void 0,ie.query=void 0,ie},serialize:function(V,te){if((V.port===(X(V)?443:80)||V.port==="")&&(V.port=void 0),typeof V.secure=="boolean"&&(V.scheme=V.secure?"wss":"ws",V.secure=void 0),V.resourceName){var ie=V.resourceName.split("?"),ae=d(ie,2),xe=ae[0],Le=ae[1];V.path=xe&&xe!=="/"?xe:void 0,V.query=Le,V.resourceName=void 0}return V.fragment=void 0,V}},ve={scheme:"wss",domainHost:re.domainHost,parse:re.parse,serialize:re.serialize},Se={},Oe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Ie="[0-9A-Fa-f]",Ke=u(u("%[EFef]"+Ie+"%"+Ie+Ie+"%"+Ie+Ie)+"|"+u("%[89A-Fa-f]"+Ie+"%"+Ie+Ie)+"|"+u("%"+Ie+Ie)),Cr="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",xn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",su=n(xn,'[\\"\\\\]'),lo="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Nu=new RegExp(Oe,"g"),Xr=new RegExp(Ke,"g"),Ra=new RegExp(n("[^]",Cr,"[\\.]",'[\\"]',su),"g"),po=new RegExp(n("[^]",Oe,lo),"g"),ja=po;function ou(Q){var V=I(Q);return V.match(Nu)?V:Q}var Tc={scheme:"mailto",parse:function(V,te){var ie=V,ae=ie.to=ie.path?ie.path.split(","):[];if(ie.path=void 0,ie.query){for(var xe=!1,Le={},ot=ie.query.split("&"),ct=0,$t=ot.length;ct<$t;++ct){var et=ot[ct].split("=");switch(et[0]){case"to":for(var Et=et[1].split(","),Pt=0,He=Et.length;Ptnew RegExp(z,O);f.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},m={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function C(z){var O,E,F,D,g,P,b,w,I,$,M,L,Y,be,Ne,Ve,Me,Fe,qe,Pe,Be,le,Te,W,se;const ce=z.strict,k=(O=z.code)===null||O===void 0?void 0:O.optimize,S=k===!0||k===void 0?1:k||0,_=(F=(E=z.code)===null||E===void 0?void 0:E.regExp)!==null&&F!==void 0?F:f,x=(D=z.uriResolver)!==null&&D!==void 0?D:d.default;return{strictSchema:(P=(g=z.strictSchema)!==null&&g!==void 0?g:ce)!==null&&P!==void 0?P:!0,strictNumbers:(w=(b=z.strictNumbers)!==null&&b!==void 0?b:ce)!==null&&w!==void 0?w:!0,strictTypes:($=(I=z.strictTypes)!==null&&I!==void 0?I:ce)!==null&&$!==void 0?$:"log",strictTuples:(L=(M=z.strictTuples)!==null&&M!==void 0?M:ce)!==null&&L!==void 0?L:"log",strictRequired:(be=(Y=z.strictRequired)!==null&&Y!==void 0?Y:ce)!==null&&be!==void 0?be:!1,code:z.code?{...z.code,optimize:S,regExp:_}:{optimize:S,regExp:_},loopRequired:(Ne=z.loopRequired)!==null&&Ne!==void 0?Ne:v,loopEnum:(Ve=z.loopEnum)!==null&&Ve!==void 0?Ve:v,meta:(Me=z.meta)!==null&&Me!==void 0?Me:!0,messages:(Fe=z.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(qe=z.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(Pe=z.schemaId)!==null&&Pe!==void 0?Pe:"$id",addUsedSchema:(Be=z.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(le=z.validateSchema)!==null&&le!==void 0?le:!0,validateFormats:(Te=z.validateFormats)!==null&&Te!==void 0?Te:!0,unicodeRegExp:(W=z.unicodeRegExp)!==null&&W!==void 0?W:!0,int32range:(se=z.int32range)!==null&&se!==void 0?se:!0,uriResolver:x}}class B{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...C(O)};const{es5:E,lines:F}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:E,lines:F}),this.logger=K(O.logger);const D=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),T.call(this,A,O,"NOT SUPPORTED"),T.call(this,m,O,"DEPRECATED","warn"),this._metaOpts=G.call(this),O.formats&&J.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&q.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),R.call(this),O.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:E,schemaId:F}=this.opts;let D=p;F==="id"&&(D={...p},D.id=D.$id,delete D.$id),E&&O&&this.addMetaSchema(D,D[F],!1)}defaultMeta(){const{meta:O,schemaId:E}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[E]||O:void 0}validate(O,E){let F;if(typeof O=="string"){if(F=this.getSchema(O),!F)throw new Error(`no schema with key or ref "${O}"`)}else F=this.compile(O);const D=F(E);return"$async"in F||(this.errors=F.errors),D}compile(O,E){const F=this._addSchema(O,E);return F.validate||this._compileSchemaEnv(F)}compileAsync(O,E){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:F}=this.opts;return D.call(this,O,E);async function D($,M){await g.call(this,$.$schema);const L=this._addSchema($,M);return L.validate||P.call(this,L)}async function g($){$&&!this.getSchema($)&&await D.call(this,{$ref:$},!0)}async function P($){try{return this._compileSchemaEnv($)}catch(M){if(!(M instanceof u.default))throw M;return b.call(this,M),await w.call(this,M.missingSchema),P.call(this,$)}}function b({missingSchema:$,missingRef:M}){if(this.refs[$])throw new Error(`AnySchema ${$} is loaded but ${M} cannot be resolved`)}async function w($){const M=await I.call(this,$);this.refs[$]||await g.call(this,M.$schema),this.refs[$]||this.addSchema(M,$,E)}async function I($){const M=this._loading[$];if(M)return M;try{return await(this._loading[$]=F($))}finally{delete this._loading[$]}}}addSchema(O,E,F,D=this.opts.validateSchema){if(Array.isArray(O)){for(const P of O)this.addSchema(P,void 0,F,D);return this}let g;if(typeof O=="object"){const{schemaId:P}=this.opts;if(g=O[P],g!==void 0&&typeof g!="string")throw new Error(`schema ${P} must be string`)}return E=(0,i.normalizeId)(E||g),this._checkUnique(E),this.schemas[E]=this._addSchema(O,F,E,D,!0),this}addMetaSchema(O,E,F=this.opts.validateSchema){return this.addSchema(O,E,!0,F),this}validateSchema(O,E){if(typeof O=="boolean")return!0;let F;if(F=O.$schema,F!==void 0&&typeof F!="string")throw new Error("$schema must be a string");if(F=F||this.opts.defaultMeta||this.defaultMeta(),!F)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(F,O);if(!D&&E){const g="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(g);else throw new Error(g)}return D}getSchema(O){let E;for(;typeof(E=N.call(this,O))=="string";)O=E;if(E===void 0){const{schemaId:F}=this.opts,D=new o.SchemaEnv({schema:{},schemaId:F});if(E=o.resolveSchema.call(this,D,O),!E)return;this.refs[O]=E}return E.validate||this._compileSchemaEnv(E)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const E=N.call(this,O);return typeof E=="object"&&this._cache.delete(E.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const E=O;this._cache.delete(E);let F=O[this.opts.schemaId];return F&&(F=(0,i.normalizeId)(F),delete this.schemas[F],delete this.refs[F]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const E of O)this.addKeyword(E);return this}addKeyword(O,E){let F;if(typeof O=="string")F=O,typeof E=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),E.keyword=F);else if(typeof O=="object"&&E===void 0){if(E=O,F=E.keyword,Array.isArray(F)&&!F.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(oe.call(this,F,E),!E)return(0,l.eachItem)(F,g=>de.call(this,g)),this;fe.call(this,E);const D={...E,type:(0,c.getJSONTypes)(E.type),schemaType:(0,c.getJSONTypes)(E.schemaType)};return(0,l.eachItem)(F,D.type.length===0?g=>de.call(this,g,D):g=>D.type.forEach(P=>de.call(this,g,D,P))),this}getKeyword(O){const E=this.RULES.all[O];return typeof E=="object"?E.definition:!!E}removeKeyword(O){const{RULES:E}=this;delete E.keywords[O],delete E.all[O];for(const F of E.rules){const D=F.rules.findIndex(g=>g.keyword===O);D>=0&&F.rules.splice(D,1)}return this}addFormat(O,E){return typeof E=="string"&&(E=new RegExp(E)),this.formats[O]=E,this}errorsText(O=this.errors,{separator:E=", ",dataVar:F="data"}={}){return!O||O.length===0?"No errors":O.map(D=>`${F}${D.instancePath} ${D.message}`).reduce((D,g)=>D+E+g)}$dataMetaSchema(O,E){const F=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const D of E){const g=D.split("/").slice(1);let P=O;for(const b of g)P=P[b];for(const b in F){const w=F[b];if(typeof w!="object")continue;const{$data:I}=w.definition,$=P[b];I&&$&&(P[b]=pe($))}}return O}_removeAllSchemas(O,E){for(const F in O){const D=O[F];(!E||E.test(F))&&(typeof D=="string"?delete O[F]:D&&!D.meta&&(this._cache.delete(D.schema),delete O[F]))}}_addSchema(O,E,F,D=this.opts.validateSchema,g=this.opts.addUsedSchema){let P;const{schemaId:b}=this.opts;if(typeof O=="object")P=O[b];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(O);if(w!==void 0)return w;F=(0,i.normalizeId)(P||F);const I=i.getSchemaRefs.call(this,O,F);return w=new o.SchemaEnv({schema:O,schemaId:b,meta:E,baseId:F,localRefs:I}),this._cache.set(w.schema,w),g&&!F.startsWith("#")&&(F&&this._checkUnique(F),this.refs[F]=w),D&&this.validateSchema(O,!0),w}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):o.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const E=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,O)}finally{this.opts=E}}}e.default=B,B.ValidationError=n.default,B.MissingRefError=u.default;function T(z,O,E,F="error"){for(const D in z){const g=D;g in O&&this.logger[F](`${E}: option ${D}. ${z[g]}`)}}function N(z){return z=(0,i.normalizeId)(z),this.schemas[z]||this.refs[z]}function R(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const O in z)this.addSchema(z[O],O)}function J(){for(const z in this.opts.formats){const O=this.opts.formats[z];O&&this.addFormat(z,O)}}function q(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in z){const E=z[O];E.keyword||(E.keyword=O),this.addKeyword(E)}}function G(){const z={...this.opts};for(const O of h)delete z[O];return z}const ee={log(){},warn(){},error(){}};function K(z){if(z===!1)return ee;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}const ue=/^[a-z_$][a-z0-9_$:-]*$/i;function oe(z,O){const{RULES:E}=this;if((0,l.eachItem)(z,F=>{if(E.keywords[F])throw new Error(`Keyword ${F} is already defined`);if(!ue.test(F))throw new Error(`Keyword ${F} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function de(z,O,E){var F;const D=O==null?void 0:O.post;if(E&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:g}=this;let P=D?g.post:g.rules.find(({type:w})=>w===E);if(P||(P={type:E,rules:[]},g.rules.push(P)),g.keywords[z]=!0,!O)return;const b={keyword:z,definition:{...O,type:(0,c.getJSONTypes)(O.type),schemaType:(0,c.getJSONTypes)(O.schemaType)}};O.before?he.call(this,P,b,O.before):P.rules.push(b),g.all[z]=b,(F=O.implements)===null||F===void 0||F.forEach(w=>this.addKeyword(w))}function he(z,O,E){const F=z.rules.findIndex(D=>D.keyword===E);F>=0?z.rules.splice(F,0,O):(z.rules.push(O),this.logger.warn(`rule ${E} is not defined`))}function fe(z){let{metaSchema:O}=z;O!==void 0&&(z.$data&&this.opts.$data&&(O=pe(O)),z.validateSchema=this.compile(O,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(z){return{anyOf:[z,ge]}}})(B6);var Tm={},$m={},Pm={};Object.defineProperty(Pm,"__esModule",{value:!0});const Nx={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};Pm.default=Nx;var Zs={};Object.defineProperty(Zs,"__esModule",{value:!0});Zs.callRef=Zs.getValidate=void 0;const qx=tc,lv=tt,Tr=ut,Ao=ru,pv=Nr,Vc=Dt,xx={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:u,schemaEnv:s,validateName:o,opts:a,self:i}=n,{root:c}=s;if((r==="#"||r==="#/")&&u===c.baseId)return p();const l=pv.resolveRef.call(i,c,u,r);if(l===void 0)throw new qx.default(n.opts.uriResolver,u,r);if(l instanceof pv.SchemaEnv)return d(l);return f(l);function p(){if(s===c)return $l(e,o,s,s.$async);const h=t.scopeValue("root",{ref:c});return $l(e,(0,Tr._)`${h}.validate`,c,c.$async)}function d(h){const y=Q6(e,h);$l(e,y,h,h.$async)}function f(h){const y=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,Tr.stringify)(h)}:{ref:h}),A=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:Tr.nil,topSchemaRef:y,errSchemaPath:r},A);e.mergeEvaluated(m),e.ok(A)}}};function Q6(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,Tr._)`${r.scopeValue("wrapper",{ref:t})}.validate`}Zs.getValidate=Q6;function $l(e,t,r,n){const{gen:u,it:s}=e,{allErrors:o,schemaEnv:a,opts:i}=s,c=i.passContext?Ao.default.this:Tr.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=u.let("valid");u.try(()=>{u.code((0,Tr._)`await ${(0,lv.callValidateCode)(e,t,c)}`),f(t),o||u.assign(h,!0)},y=>{u.if((0,Tr._)`!(${y} instanceof ${s.ValidationError})`,()=>u.throw(y)),d(y),o||u.assign(h,!1)}),e.ok(h)}function p(){e.result((0,lv.callValidateCode)(e,t,c),()=>f(t),()=>d(t))}function d(h){const y=(0,Tr._)`${h}.errors`;u.assign(Ao.default.vErrors,(0,Tr._)`${Ao.default.vErrors} === null ? ${y} : ${Ao.default.vErrors}.concat(${y})`),u.assign(Ao.default.errors,(0,Tr._)`${Ao.default.vErrors}.length`)}function f(h){var y;if(!s.opts.unevaluated)return;const A=(y=r==null?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=Vc.mergeEvaluated.props(u,A.props,s.props));else{const m=u.var("props",(0,Tr._)`${h}.evaluated.props`);s.props=Vc.mergeEvaluated.props(u,m,s.props,Tr.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=Vc.mergeEvaluated.items(u,A.items,s.items));else{const m=u.var("items",(0,Tr._)`${h}.evaluated.items`);s.items=Vc.mergeEvaluated.items(u,m,s.items,Tr.Name)}}}Zs.callRef=$l;Zs.default=xx;Object.defineProperty($m,"__esModule",{value:!0});const Rx=Pm,jx=Zs,Mx=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Rx.default,jx.default];$m.default=Mx;var km={},Om={};Object.defineProperty(Om,"__esModule",{value:!0});const fp=ut,Lu=fp.operators,Dp={maximum:{okStr:"<=",ok:Lu.LTE,fail:Lu.GT},minimum:{okStr:">=",ok:Lu.GTE,fail:Lu.LT},exclusiveMaximum:{okStr:"<",ok:Lu.LT,fail:Lu.GTE},exclusiveMinimum:{okStr:">",ok:Lu.GT,fail:Lu.LTE}},Lx={message:({keyword:e,schemaCode:t})=>(0,fp.str)`must be ${Dp[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,fp._)`{comparison: ${Dp[e].okStr}, limit: ${t}}`},Ux={keyword:Object.keys(Dp),type:"number",schemaType:"number",$data:!0,error:Lx,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,fp._)`${r} ${Dp[t].fail} ${n} || isNaN(${r})`)}};Om.default=Ux;var Im={};Object.defineProperty(Im,"__esModule",{value:!0});const Ei=ut,Gx={message:({schemaCode:e})=>(0,Ei.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ei._)`{multipleOf: ${e}}`},Vx={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Gx,code(e){const{gen:t,data:r,schemaCode:n,it:u}=e,s=u.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,Ei._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Ei._)`${o} !== parseInt(${o})`;e.fail$data((0,Ei._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};Im.default=Vx;var Nm={},qm={};Object.defineProperty(qm,"__esModule",{value:!0});function e7(e){const t=e.length;let r=0,n=0,u;for(;n=55296&&u<=56319&&n(0,Is._)`{limit: ${e}}`},zx={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Jx,code(e){const{keyword:t,data:r,schemaCode:n,it:u}=e,s=t==="maxLength"?Is.operators.GT:Is.operators.LT,o=u.opts.unicode===!1?(0,Is._)`${r}.length`:(0,Is._)`${(0,Hx.useFunc)(e.gen,Wx.default)}(${r})`;e.fail$data((0,Is._)`${o} ${s} ${n}`)}};Nm.default=zx;var xm={};Object.defineProperty(xm,"__esModule",{value:!0});const Kx=tt,hp=ut,Xx={message:({schemaCode:e})=>(0,hp.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,hp._)`{pattern: ${e}}`},Yx={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Xx,code(e){const{data:t,$data:r,schema:n,schemaCode:u,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?(0,hp._)`(new RegExp(${u}, ${o}))`:(0,Kx.usePattern)(e,n);e.fail$data((0,hp._)`!${a}.test(${t})`)}};xm.default=Yx;var Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});const yi=ut,Zx={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,yi.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,yi._)`{limit: ${e}}`},Qx={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Zx,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxProperties"?yi.operators.GT:yi.operators.LT;e.fail$data((0,yi._)`Object.keys(${r}).length ${u} ${n}`)}};Rm.default=Qx;var jm={};Object.defineProperty(jm,"__esModule",{value:!0});const Ga=tt,vi=ut,eR=Dt,tR={message:({params:{missingProperty:e}})=>(0,vi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,vi._)`{missingProperty: ${e}}`},rR={keyword:"required",type:"object",schemaType:"array",$data:!0,error:tR,code(e){const{gen:t,schema:r,schemaCode:n,data:u,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;const i=r.length>=a.loopRequired;if(o.allErrors?c():l(),a.strictRequired){const f=e.parentSchema.properties,{definedProperties:h}=e.it;for(const y of r)if((f==null?void 0:f[y])===void 0&&!h.has(y)){const A=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${y}" is not defined at "${A}" (strictRequired)`;(0,eR.checkStrictMode)(o,m,o.opts.strictRequired)}}function c(){if(i||s)e.block$data(vi.nil,p);else for(const f of r)(0,Ga.checkReportMissingProp)(e,f)}function l(){const f=t.let("missing");if(i||s){const h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,Ga.checkMissingProp)(e,r,f)),(0,Ga.reportMissingProp)(e,f),t.else()}function p(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,Ga.noPropertyInData)(t,u,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,Ga.propertyInData)(t,u,f,a.ownProperties)),t.if((0,vi.not)(h),()=>{e.error(),t.break()})},vi.nil)}}};jm.default=rR;var Mm={};Object.defineProperty(Mm,"__esModule",{value:!0});const gi=ut,nR={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,gi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,gi._)`{limit: ${e}}`},uR={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:nR,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxItems"?gi.operators.GT:gi.operators.LT;e.fail$data((0,gi._)`${r}.length ${u} ${n}`)}};Mm.default=uR;var Lm={},rc={};Object.defineProperty(rc,"__esModule",{value:!0});const t7=q6;t7.code='require("ajv/dist/runtime/equal").default';rc.default=t7;Object.defineProperty(Lm,"__esModule",{value:!0});const pf=Qi,cr=ut,sR=Dt,oR=rc,aR={message:({params:{i:e,j:t}})=>(0,cr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,cr._)`{i: ${e}, j: ${t}}`},iR={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:aR,code(e){const{gen:t,data:r,$data:n,schema:u,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!u)return;const i=t.let("valid"),c=s.items?(0,pf.getSchemaTypes)(s.items):[];e.block$data(i,l,(0,cr._)`${o} === false`),e.ok(i);function l(){const h=t.let("i",(0,cr._)`${r}.length`),y=t.let("j");e.setParams({i:h,j:y}),t.assign(i,!0),t.if((0,cr._)`${h} > 1`,()=>(p()?d:f)(h,y))}function p(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function d(h,y){const A=t.name("item"),m=(0,pf.checkDataTypes)(c,A,a.opts.strictNumbers,pf.DataType.Wrong),v=t.const("indices",(0,cr._)`{}`);t.for((0,cr._)`;${h}--;`,()=>{t.let(A,(0,cr._)`${r}[${h}]`),t.if(m,(0,cr._)`continue`),c.length>1&&t.if((0,cr._)`typeof ${A} == "string"`,(0,cr._)`${A} += "_"`),t.if((0,cr._)`typeof ${v}[${A}] == "number"`,()=>{t.assign(y,(0,cr._)`${v}[${A}]`),e.error(),t.assign(i,!1).break()}).code((0,cr._)`${v}[${A}] = ${h}`)})}function f(h,y){const A=(0,sR.useFunc)(t,oR.default),m=t.name("outer");t.label(m).for((0,cr._)`;${h}--;`,()=>t.for((0,cr._)`${y} = ${h}; ${y}--;`,()=>t.if((0,cr._)`${A}(${r}[${h}], ${r}[${y}])`,()=>{e.error(),t.assign(i,!1).break(m)})))}}};Lm.default=iR;var Um={};Object.defineProperty(Um,"__esModule",{value:!0});const z2=ut,cR=Dt,lR=rc,pR={message:"must be equal to constant",params:({schemaCode:e})=>(0,z2._)`{allowedValue: ${e}}`},dR={keyword:"const",$data:!0,error:pR,code(e){const{gen:t,data:r,$data:n,schemaCode:u,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,z2._)`!${(0,cR.useFunc)(t,lR.default)}(${r}, ${u})`):e.fail((0,z2._)`${s} !== ${r}`)}};Um.default=dR;var Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});const ii=ut,fR=Dt,DR=rc,hR={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,ii._)`{allowedValues: ${e}}`},mR={keyword:"enum",schemaType:"array",$data:!0,error:hR,code(e){const{gen:t,data:r,$data:n,schema:u,schemaCode:s,it:o}=e;if(!n&&u.length===0)throw new Error("enum must have non-empty array");const a=u.length>=o.opts.loopEnum;let i;const c=()=>i??(i=(0,fR.useFunc)(t,DR.default));let l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const f=t.const("vSchema",s);l=(0,ii.or)(...u.map((h,y)=>d(f,y)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,f=>t.if((0,ii._)`${c()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function d(f,h){const y=u[h];return typeof y=="object"&&y!==null?(0,ii._)`${c()}(${r}, ${f}[${h}])`:(0,ii._)`${r} === ${y}`}}};Gm.default=mR;Object.defineProperty(km,"__esModule",{value:!0});const ER=Om,yR=Im,vR=Nm,gR=xm,AR=Rm,FR=jm,CR=Mm,bR=Lm,SR=Um,wR=Gm,_R=[ER.default,yR.default,vR.default,gR.default,AR.default,FR.default,CR.default,bR.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},SR.default,wR.default];km.default=_R;var Vm={},wa={};Object.defineProperty(wa,"__esModule",{value:!0});wa.validateAdditionalItems=void 0;const Ns=ut,K2=Dt,BR={message:({params:{len:e}})=>(0,Ns.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Ns._)`{limit: ${e}}`},TR={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:BR,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,K2.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}r7(e,n)}};function r7(e,t){const{gen:r,schema:n,data:u,keyword:s,it:o}=e;o.items=!0;const a=r.const("len",(0,Ns._)`${u}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Ns._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,K2.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,Ns._)`${a} <= ${t.length}`);r.if((0,Ns.not)(c),()=>i(c)),e.ok(c)}function i(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:K2.Type.Num},c),o.allErrors||r.if((0,Ns.not)(c),()=>r.break())})}}wa.validateAdditionalItems=r7;wa.default=TR;var Hm={},_a={};Object.defineProperty(_a,"__esModule",{value:!0});_a.validateTuple=void 0;const dv=ut,Pl=Dt,$R=tt,PR={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return n7(e,"additionalItems",t);r.items=!0,!(0,Pl.alwaysValidSchema)(r,t)&&e.ok((0,$R.validateArray)(e))}};function n7(e,t,r=e.schema){const{gen:n,parentSchema:u,data:s,keyword:o,it:a}=e;l(u),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Pl.mergeEvaluated.items(n,r.length,a.items));const i=n.name("valid"),c=n.const("len",(0,dv._)`${s}.length`);r.forEach((p,d)=>{(0,Pl.alwaysValidSchema)(a,p)||(n.if((0,dv._)`${c} > ${d}`,()=>e.subschema({keyword:o,schemaProp:d,dataProp:d},i)),e.ok(i))});function l(p){const{opts:d,errSchemaPath:f}=a,h=r.length,y=h===p.minItems&&(h===p.maxItems||p[t]===!1);if(d.strictTuples&&!y){const A=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,Pl.checkStrictMode)(a,A,d.strictTuples)}}}_a.validateTuple=n7;_a.default=PR;Object.defineProperty(Hm,"__esModule",{value:!0});const kR=_a,OR={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,kR.validateTuple)(e,"items")};Hm.default=OR;var Wm={};Object.defineProperty(Wm,"__esModule",{value:!0});const fv=ut,IR=Dt,NR=tt,qR=wa,xR={message:({params:{len:e}})=>(0,fv.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,fv._)`{limit: ${e}}`},RR={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:xR,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:u}=r;n.items=!0,!(0,IR.alwaysValidSchema)(n,t)&&(u?(0,qR.validateAdditionalItems)(e,u):e.ok((0,NR.validateArray)(e)))}};Wm.default=RR;var Jm={};Object.defineProperty(Jm,"__esModule",{value:!0});const nn=ut,Hc=Dt,jR={message:({params:{min:e,max:t}})=>t===void 0?(0,nn.str)`must contain at least ${e} valid item(s)`:(0,nn.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,nn._)`{minContains: ${e}}`:(0,nn._)`{minContains: ${e}, maxContains: ${t}}`},MR={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:jR,code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;let o,a;const{minContains:i,maxContains:c}=n;s.opts.next?(o=i===void 0?1:i,a=c):o=1;const l=t.const("len",(0,nn._)`${u}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,Hc.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,Hc.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,Hc.alwaysValidSchema)(s,r)){let y=(0,nn._)`${l} >= ${o}`;a!==void 0&&(y=(0,nn._)`${y} && ${l} <= ${a}`),e.pass(y);return}s.items=!0;const p=t.name("valid");a===void 0&&o===1?f(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),a!==void 0&&t.if((0,nn._)`${u}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,()=>e.reset());function d(){const y=t.name("_valid"),A=t.let("count",0);f(y,()=>t.if(y,()=>h(A)))}function f(y,A){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:Hc.Type.Num,compositeRule:!0},y),A()})}function h(y){t.code((0,nn._)`${y}++`),a===void 0?t.if((0,nn._)`${y} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,nn._)`${y} > ${a}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,nn._)`${y} >= ${o}`,()=>t.assign(p,!0)))}}};Jm.default=MR;var u7={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=ut,r=Dt,n=tt;e.error={message:({params:{property:i,depsCount:c,deps:l}})=>{const p=c===1?"property":"properties";return(0,t.str)`must have ${p} ${l} when property ${i} is present`},params:({params:{property:i,depsCount:c,deps:l,missingProperty:p}})=>(0,t._)`{property: ${i}, missingProperty: ${p}, depsCount: ${c}, - deps: ${l}}`};const u={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[c,l]=s(i);o(i,c),a(i,l)}};function s({schema:i}){const c={},l={};for(const p in i){if(p==="__proto__")continue;const f=Array.isArray(i[p])?c:l;f[p]=i[p]}return[c,l]}function o(i,c=i.schema){const{gen:l,data:p,it:f}=i;if(Object.keys(c).length===0)return;const d=l.let("missing");for(const h in c){const E=c[h];if(E.length===0)continue;const A=(0,n.propertyInData)(l,p,h,f.opts.ownProperties);i.setParams({property:h,depsCount:E.length,deps:E.join(", ")}),f.allErrors?l.if(A,()=>{for(const m of E)(0,n.checkReportMissingProp)(i,m)}):(l.if((0,t._)`${A} && (${(0,n.checkMissingProp)(i,E,d)})`),(0,n.reportMissingProp)(i,d),l.else())}}e.validatePropertyDeps=o;function a(i,c=i.schema){const{gen:l,data:p,keyword:f,it:d}=i,h=l.name("valid");for(const E in c)(0,r.alwaysValidSchema)(d,c[E])||(l.if((0,n.propertyInData)(l,p,E,d.opts.ownProperties),()=>{const A=i.subschema({keyword:f,schemaProp:E},h);i.mergeValidEvaluated(A,h)},()=>l.var(h,!0)),i.ok(h))}e.validateSchemaDeps=a,e.default=u})(P6);var qm={};Object.defineProperty(qm,"__esModule",{value:!0});const O6=lt,Qx=vt,eR={message:"property name must be valid",params:({params:e})=>(0,O6._)`{propertyName: ${e.propertyName}}`},tR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:eR,code(e){const{gen:t,schema:r,data:n,it:u}=e;if((0,Qx.alwaysValidSchema)(u,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,O6.not)(s),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(s)}};qm.default=tR;var Up={};Object.defineProperty(Up,"__esModule",{value:!0});const Lc=at,Tn=lt,rR=cu,Uc=vt,nR={message:"must NOT have additional properties",params:({params:e})=>(0,Tn._)`{additionalProperty: ${e.additionalProperty}}`},uR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:nR,code(e){const{gen:t,schema:r,parentSchema:n,data:u,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:i}=o;if(o.props=!0,i.removeAdditional!=="all"&&(0,Uc.alwaysValidSchema)(o,r))return;const c=(0,Lc.allSchemaProperties)(n.properties),l=(0,Lc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,Tn._)`${s} === ${rR.default.errors}`);function p(){t.forIn("key",u,A=>{!c.length&&!l.length?h(A):t.if(f(A),()=>h(A))})}function f(A){let m;if(c.length>8){const y=(0,Uc.schemaRefOrVal)(o,n.properties,"properties");m=(0,Lc.isOwnProperty)(t,y,A)}else c.length?m=(0,Tn.or)(...c.map(y=>(0,Tn._)`${A} === ${y}`)):m=Tn.nil;return l.length&&(m=(0,Tn.or)(m,...l.map(y=>(0,Tn._)`${(0,Lc.usePattern)(e,y)}.test(${A})`))),(0,Tn.not)(m)}function d(A){t.code((0,Tn._)`delete ${u}[${A}]`)}function h(A){if(i.removeAdditional==="all"||i.removeAdditional&&r===!1){d(A);return}if(r===!1){e.setParams({additionalProperty:A}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Uc.alwaysValidSchema)(o,r)){const m=t.name("valid");i.removeAdditional==="failing"?(E(A,m,!1),t.if((0,Tn.not)(m),()=>{e.reset(),d(A)})):(E(A,m),a||t.if((0,Tn.not)(m),()=>t.break()))}}function E(A,m,y){const F={keyword:"additionalProperties",dataProp:A,dataPropType:Uc.Type.Str};y===!1&&Object.assign(F,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(F,m)}}};Up.default=uR;var xm={};Object.defineProperty(xm,"__esModule",{value:!0});const sR=Rn,Kv=at,r1=vt,Xv=Up,oR={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Xv.default.code(new sR.KeywordCxt(s,Xv.default,"additionalProperties"));const o=(0,Kv.allSchemaProperties)(r);for(const p of o)s.definedProperties.add(p);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=r1.mergeEvaluated.props(t,(0,r1.toHash)(o),s.props));const a=o.filter(p=>!(0,r1.alwaysValidSchema)(s,r[p]));if(a.length===0)return;const i=t.name("valid");for(const p of a)c(p)?l(p):(t.if((0,Kv.propertyInData)(t,u,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(i,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(i);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},i)}}};xm.default=oR;var Rm={};Object.defineProperty(Rm,"__esModule",{value:!0});const Yv=at,Gc=lt,Zv=vt,Qv=vt,aR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:u,it:s}=e,{opts:o}=s,a=(0,Yv.allSchemaProperties)(r),i=a.filter(E=>(0,Zv.alwaysValidSchema)(s,r[E]));if(a.length===0||i.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof Gc.Name)&&(s.props=(0,Qv.evaluatedPropsToName)(t,s.props));const{props:p}=s;f();function f(){for(const E of a)c&&d(E),s.allErrors?h(E):(t.var(l,!0),h(E),t.if(l))}function d(E){for(const A in c)new RegExp(E).test(A)&&(0,Zv.checkStrictMode)(s,`property ${A} matches pattern ${E} (use allowMatchingProperties)`)}function h(E){t.forIn("key",n,A=>{t.if((0,Gc._)`${(0,Yv.usePattern)(e,E)}.test(${A})`,()=>{const m=i.includes(E);m||e.subschema({keyword:"patternProperties",schemaProp:E,dataProp:A,dataPropType:Qv.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,Gc._)`${p}[${A}]`,!0):!m&&!s.allErrors&&t.if((0,Gc.not)(l),()=>t.break())})})}}};Rm.default=aR;var jm={};Object.defineProperty(jm,"__esModule",{value:!0});const iR=vt,cR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,iR.alwaysValidSchema)(n,r)){e.fail();return}const u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};jm.default=cR;var Mm={};Object.defineProperty(Mm,"__esModule",{value:!0});const lR=at,pR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:lR.validateUnion,error:{message:"must match a schema in anyOf"}};Mm.default=pR;var Lm={};Object.defineProperty(Lm,"__esModule",{value:!0});const wl=lt,fR=vt,dR={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,wl._)`{passingSchemas: ${e.passing}}`},DR={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:dR,code(e){const{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),a=t.let("passing",null),i=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let f;(0,fR.alwaysValidSchema)(u,l)?t.var(i,!0):f=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},i),p>0&&t.if((0,wl._)`${i} && ${o}`).assign(o,!1).assign(a,(0,wl._)`[${a}, ${p}]`).else(),t.if(i,()=>{t.assign(o,!0),t.assign(a,p),f&&e.mergeEvaluated(f,wl.Name)})})}}};Lm.default=DR;var Um={};Object.defineProperty(Um,"__esModule",{value:!0});const hR=vt,mR={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const u=t.name("valid");r.forEach((s,o)=>{if((0,hR.alwaysValidSchema)(n,s))return;const a=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(a)})}};Um.default=mR;var Gm={};Object.defineProperty(Gm,"__esModule",{value:!0});const cp=lt,k6=vt,ER={message:({params:e})=>(0,cp.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,cp._)`{failingKeyword: ${e.ifClause}}`},vR={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ER,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,k6.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const u=ey(n,"then"),s=ey(n,"else");if(!u&&!s)return;const o=t.let("valid",!0),a=t.name("_valid");if(i(),e.reset(),u&&s){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else u?t.if(a,c("then")):t.if((0,cp.not)(a),c("else"));e.pass(o,()=>e.error(!0));function i(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{const f=e.subschema({keyword:l},a);t.assign(o,a),e.mergeValidEvaluated(f,o),p?t.assign(p,(0,cp._)`${l}`):e.setParams({ifClause:l})}}}};function ey(e,t){const r=e.schema[t];return r!==void 0&&!(0,k6.alwaysValidSchema)(e,r)}Gm.default=vR;var Vm={};Object.defineProperty(Vm,"__esModule",{value:!0});const yR=vt,gR={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,yR.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};Vm.default=gR;Object.defineProperty(Om,"__esModule",{value:!0});const AR=Ba,FR=km,CR=Ta,bR=Im,SR=Nm,wR=P6,_R=qm,BR=Up,TR=xm,$R=Rm,PR=jm,OR=Mm,kR=Lm,IR=Um,NR=Gm,qR=Vm;function xR(e=!1){const t=[PR.default,OR.default,kR.default,IR.default,NR.default,qR.default,_R.default,BR.default,wR.default,TR.default,$R.default];return e?t.push(FR.default,bR.default):t.push(AR.default,CR.default),t.push(SR.default),t}Om.default=xR;var Hm={},Wm={};Object.defineProperty(Wm,"__esModule",{value:!0});const Jt=lt,RR={message:({schemaCode:e})=>(0,Jt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Jt._)`{format: ${e}}`},jR={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:RR,code(e,t){const{gen:r,data:n,$data:u,schema:s,schemaCode:o,it:a}=e,{opts:i,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!i.validateFormats)return;u?f():d();function f(){const h=r.scopeValue("formats",{ref:p.formats,code:i.code.formats}),E=r.const("fDef",(0,Jt._)`${h}[${o}]`),A=r.let("fType"),m=r.let("format");r.if((0,Jt._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>r.assign(A,(0,Jt._)`${E}.type || "string"`).assign(m,(0,Jt._)`${E}.validate`),()=>r.assign(A,(0,Jt._)`"string"`).assign(m,E)),e.fail$data((0,Jt.or)(y(),F()));function y(){return i.strictSchema===!1?Jt.nil:(0,Jt._)`${o} && !${m}`}function F(){const B=l.$async?(0,Jt._)`(${E}.async ? await ${m}(${n}) : ${m}(${n}))`:(0,Jt._)`${m}(${n})`,P=(0,Jt._)`(typeof ${m} == "function" ? ${B} : ${m}.test(${n}))`;return(0,Jt._)`${m} && ${m} !== true && ${A} === ${t} && !${P}`}}function d(){const h=p.formats[s];if(!h){y();return}if(h===!0)return;const[E,A,m]=F(h);E===t&&e.pass(B());function y(){if(i.strictSchema===!1){p.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function F(P){const $=P instanceof RegExp?(0,Jt.regexpCode)(P):i.code.formats?(0,Jt._)`${i.code.formats}${(0,Jt.getProperty)(s)}`:void 0,I=r.scopeValue("formats",{key:s,ref:P,code:$});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,Jt._)`${I}.validate`]:["string",P,I]}function B(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Jt._)`await ${m}(${n})`}return typeof A=="function"?(0,Jt._)`${m}(${n})`:(0,Jt._)`${m}.test(${n})`}}}};Wm.default=jR;Object.defineProperty(Hm,"__esModule",{value:!0});const MR=Wm,LR=[MR.default];Hm.default=LR;var Da={};Object.defineProperty(Da,"__esModule",{value:!0});Da.contentVocabulary=Da.metadataVocabulary=void 0;Da.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Da.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Em,"__esModule",{value:!0});const UR=vm,GR=gm,VR=Om,HR=Hm,ty=Da,WR=[UR.default,GR.default,(0,VR.default)(),HR.default,ty.metadataVocabulary,ty.contentVocabulary];Em.default=WR;var Jm={},I6={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(I6);Object.defineProperty(Jm,"__esModule",{value:!0});const zo=lt,M2=I6,ry=Ur,JR=vt,zR={message:({params:{discrError:e,tagName:t}})=>e===M2.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,zo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},KR={keyword:"discriminator",type:"object",schemaType:"object",error:zR,code(e){const{gen:t,data:r,schema:n,parentSchema:u,it:s}=e,{oneOf:o}=u;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const i=t.let("valid",!1),c=t.const("tag",(0,zo._)`${r}${(0,zo.getProperty)(a)}`);t.if((0,zo._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:M2.DiscrError.Tag,tag:c,tagName:a})),e.ok(i);function l(){const d=f();t.if(!1);for(const h in d)t.elseIf((0,zo._)`${c} === ${h}`),t.assign(i,p(d[h]));t.else(),e.error(!1,{discrError:M2.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(d){const h=t.name("valid"),E=e.subschema({keyword:"oneOf",schemaProp:d},h);return e.mergeEvaluated(E,zo.Name),h}function f(){var d;const h={},E=m(u);let A=!0;for(let B=0;Bthis.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=Rn;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=lt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=Qi;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=ec;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(fN,np);const nj="Root",uj="object",sj="Root Element",oj={base64String:{type:"string",pattern:"^[A-Za-z0-9/+=]*$"},tagString:{type:"string",pattern:"^[a-z][a-z0-9]*(:.+)?$"}},aj={id:{type:"string"},metadata:{type:"object",properties:{selectors:{type:"object",additionalProperties:{type:"string"}}},required:["selectors"],additionalProperties:!1},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},enums:{type:"object",properties:{ids:{$ref:"#/definitions/base64String"},wordLike:{$ref:"#/definitions/base64String"},notWordLike:{$ref:"#/definitions/base64String"},scopeBits:{$ref:"#/definitions/base64String"},graftTypes:{$ref:"#/definitions/base64String"}},required:["ids","wordLike","notWordLike","scopeBits","graftTypes"],additionalProperties:!1},docs:{type:"object",propertyNames:{type:"string"},additionalProperties:{type:"object",properties:{sequences:{type:"object",additionalProperties:{type:"object",properties:{type:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{bs:{type:"string"},bg:{type:"string"},c:{type:"string"},is:{type:"string"},os:{type:"string"},nt:{type:"string"}},required:["bs","bg","c","is","os","nt"],additionalProperties:!1}},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},chapters:{type:"object",additionalProperties:{type:"string"}},chapterVerses:{type:"object",additionalProperties:{type:"string"}},tokensPresent:{type:"string"}},required:["blocks","tags"],additionalProperties:!1}},headers:{type:"object",additionalProperties:{type:"string"}},mainId:{type:"string"},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}}},required:["sequences","headers","mainId","tags"],additionalProperties:!1}},additionalProperties:!1},ij=["id","enums","docs","tags"],cj=!1,lj={title:nj,type:uj,description:sj,definitions:oj,properties:aj,required:ij,additionalProperties:cj},pj="version 0.1.0",fj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/document_structure.json",dj="Document (Structure)",Dj="A document, typically corresponding to a single USFM or USX book",hj="object",mj={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},Ej=["schema","metadata"],vj=!1,yj={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},gj={$comment:pj,$id:fj,title:dj,description:Dj,type:hj,properties:mj,required:Ej,additionalProperties:vj,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:yj,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},Aj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/sequence_structure.json",Fj="Sequence (Structure)",Cj="A sequence contains a 'flow' of one or more blocks",bj="object",Sj={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}}},wj=["type"],_j=!1,Bj={$id:Aj,title:Fj,description:Cj,type:bj,properties:Sj,required:wj,additionalProperties:_j},Tj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/block_structure.json",$j="Block (Structure)",Pj="A block, which represents either a paragraph of text or a graft",Oj="object",kj={type:{type:"string",description:"The type of block",enum:["paragraph","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},Ij=["type"],Nj=!1,qj={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},xj={$id:Tj,title:$j,description:Pj,type:Oj,properties:kj,required:Ij,additionalProperties:Nj,if:{properties:{type:{enum:["paragraph"]}}},then:qj,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},Rj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/contentElement_structure.json",jj="Content Element (Structure)",Mj="A content element, ie some form of (possibly nested) markup",Lj="object",Uj={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},Gj=["type"],Vj=!1,Hj={$id:Rj,title:jj,description:Mj,type:Lj,properties:Uj,required:Gj,additionalProperties:Vj},Wj="version 0.2.0",Jj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_document_constraint.json",zj="object",Kj={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},Xj={$comment:Wj,$id:Jj,type:zj,properties:Kj},Yj="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_sequence_constraint.json",Zj="object",Qj={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},eM={$id:Yj,type:Zj,properties:Qj},tM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_block_constraint.json",rM="object",nM={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},uM={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},sM={$id:tM,type:rM,properties:nM,if:{properties:{type:{enum:["graft"]}}},then:uM,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},oM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_contentElement_constraint.json",aM="object",iM=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],cM={$id:oM,type:aM,allOf:iM},lM="version 0.2.0",pM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_document_constraint.json",fM="object",dM={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sofria_sequence_constraint.json"}}},DM={$comment:lM,$id:pM,type:fM,properties:dM},hM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_sequence_constraint.json",mM="object",EM={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},vM={$id:hM,type:mM,properties:EM},yM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_block_constraint.json",gM="object",AM={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},FM={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},CM={$id:yM,type:gM,properties:AM,if:{properties:{type:{enum:["graft"]}}},then:FM,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},bM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_contentElement_constraint.json",SM="object",wM=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["block"]},{required:["preview_text"]}]}},else:{required:["block"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],_M={$id:bM,type:SM,allOf:wM},BM="version 0.1.0",TM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/document_structure.json",$M="Document (Structure)",PM="A document, typically corresponding to a single USFM or USX book",OM="object",kM={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},IM=["schema","metadata"],NM=!1,qM={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},xM={$comment:BM,$id:TM,title:$M,description:PM,type:OM,properties:kM,required:IM,additionalProperties:NM,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:qM,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},RM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/sequence_structure.json",jM="Sequence (Structure)",MM="A sequence contains a 'flow' of one or more blocks",LM="object",UM={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},GM=["type"],VM=!1,HM={$id:RM,title:jM,description:MM,type:LM,properties:UM,required:GM,additionalProperties:VM},WM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/block_structure.json",JM="Block (Structure)",zM="A block, which represents either a paragraph of text or a graft",KM="object",XM={type:{type:"string",description:"The type of block",enum:["paragraph","row","node","lookup","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},YM=["type"],ZM=!1,QM={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},eL={$id:WM,title:JM,description:zM,type:KM,properties:XM,required:YM,additionalProperties:ZM,if:{properties:{type:{enum:["paragraph","row","node","lookup"]}}},then:QM,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},tL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/contentElement_structure.json",rL="Content Element (Structure)",nL="A content element, ie some form of (possibly nested) markup",uL="object",sL={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},oL=["type"],aL=!1,iL={$id:tL,title:rL,description:nL,type:uL,properties:sL,required:oL,additionalProperties:aL},cL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/hook_structure.json",lL="Hook (Structure)",pL="Hooks, ie typed labels that may be used to link documents",fL="array",dL={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},DL={$id:cL,title:lL,description:pL,type:fL,items:dL},hL="version 0.3.0",mL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_document_constraint.json",EL="object",vL={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},yL={$comment:hL,$id:mL,type:EL,properties:vL},gL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_sequence_constraint.json",AL="object",FL={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},CL={$id:gL,type:AL,properties:FL},bL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_block_constraint.json",SL="object",wL={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},_L={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},BL={$id:bL,type:SL,properties:wL,if:{properties:{type:{enum:["graft"]}}},then:_L,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},TL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_contentElement_constraint.json",$L="object",PL=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],OL={$id:TL,type:$L,allOf:PL},kL="version 0.3.0",IL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_document_constraint.json",NL="object",qL={sequence:{$ref:"./sofria_sequence_constraint.json"}},xL={$comment:kL,$id:IL,type:NL,properties:qL},RL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_sequence_constraint.json",jL="object",ML={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},LL={$id:RL,type:jL,properties:ML},UL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_block_constraint.json",GL="object",VL={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},HL={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},WL={$id:UL,type:GL,properties:VL,if:{properties:{type:{enum:["graft"]}}},then:HL,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},JL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_contentElement_constraint.json",zL="object",KL=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],XL={$id:JL,type:zL,allOf:KL};var Wt=np,YL=lj,n1=gj,So=Bj,wo=xj,_o=Hj,ZL=Xj,ny=eM,uy=sM,sy=cM,QL=DM,oy=vM,ay=CM,iy=_M,u1=xM,Bo=HM,To=eL,$o=iL,Jn=DL,eU=yL,cy=CL,ly=BL,py=OL,tU=xL,fy=LL,dy=WL,Dy=XL;let rU=class{constructor(){this.schema={structure:{},constraint:{},proskomma:{}};for(var[t,r]of[["succinct",{"0.2.0":[{name:"Proskomma Serialized Succinct",validator:new Wt().compile(YL)}]}]])this.schema.proskomma[t]=r;for(var[n,u]of[["document",{"0.2.1":[{name:"Document Structure",validator:new Wt().addSchema(_o).addSchema(wo).addSchema(So).compile(n1)}],"0.3.0":[{name:"Document Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).addSchema(Bo).compile(u1)}]}],["sequence",{"0.2.1":[{name:"Sequence Structure",validator:new Wt().addSchema(_o).addSchema(wo).compile(So)}],"0.3.0":[{name:"Sequence Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).compile(Bo)}]}]])this.schema.structure[n]=u;for(var[s,o]of[["perfDocument",{"0.2.1":[{name:"Document Structure",validator:new Wt().addSchema(_o).addSchema(wo).addSchema(So).compile(n1)},{name:"PERF Document",validator:new Wt().addSchema(sy).addSchema(uy).addSchema(ny).compile(ZL)}],"0.3.0":[{name:"Document Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).addSchema(Bo).compile(u1)},{name:"PERF Document",validator:new Wt().addSchema(Jn).addSchema(py).addSchema(ly).addSchema(cy).compile(eU)}]}],["perfSequence",{"0.2.1":[{name:"Sequence Structure",validator:new Wt().addSchema(_o).addSchema(wo).compile(So)},{name:"PERF Sequence",validator:new Wt().addSchema(sy).addSchema(uy).compile(ny)}],"0.3.0":[{name:"Sequence Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).compile(Bo)},{name:"PERF Sequence",validator:new Wt().addSchema(Jn).addSchema(py).addSchema(ly).compile(cy)}]}],["sofriaDocument",{"0.2.1":[{name:"Document Structure",validator:new Wt().addSchema(_o).addSchema(wo).addSchema(So).compile(n1)},{name:"SOFRIA Document",validator:new Wt().addSchema(iy).addSchema(ay).addSchema(oy).compile(QL)}],"0.3.0":[{name:"Document Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).addSchema(Bo).compile(u1)},{name:"SOFRIA Document",validator:new Wt().addSchema(Jn).addSchema(Dy).addSchema(dy).addSchema(fy).compile(tU)}]}],["sofriaSequence",{"0.2.1":[{name:"Sequence Structure",validator:new Wt().addSchema(_o).addSchema(wo).compile(So)},{name:"SOFRIA Sequence",validator:new Wt().addSchema(iy).addSchema(ay).compile(oy)}],"0.3.0":[{name:"Sequence Structure",validator:new Wt().addSchema(Jn).addSchema($o).addSchema(To).compile(Bo)},{name:"SOFRIA Sequence",validator:new Wt().addSchema(Jn).addSchema(Dy).addSchema(dy).compile(fy)}]}]])this.schema.constraint[s]=o}schemaInfo(){var t={};for(var[r,n]of Object.entries(this.schema)){t[r]={};for(var[u,s]of Object.entries(n)){t[r][u]={};for(var[o,a]of Object.entries(s))t[r][u][o]=a.map(i=>i.name)}}return t}validate(t,r,n,u){if(u===void 0)throw new Error("data argument is missing. Usage: validate(schemaType, schemaKey, schemaVersion, data)");if(u===null)throw new Error("Data argument is null");var s=Object.keys(this.schema);if(!s.includes(t))throw new Error("Schema type must be one of ".concat(s.map(l=>"'".concat(l,"'")).join(", "),", not '").concat(t,"'"));if(!this.schema[t][r])throw new Error("Unknown ".concat(t," schema key ").concat(r));if(!this.schema[t][r][n])throw new Error("Unknown version ".concat(n," for ").concat(t," schema key ").concat(r));var o=this.schema[t][r][n],a;for(var{name:i,validator:c}of o)if(a={validatorName:i,isValid:c(u),errors:c.errors},!a.isValid)break;return{requested:{schemaType:t,schemaKey:r,schemaVersion:n},lastSchema:a.validatorName,isValid:a.isValid,errors:a.errors}}};var nU=rU,uU=["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt","th","thr","tc","tcr"],sU=["ms","mr","s","sr","r","qa","sp","sd"],oU=["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"],aU=["imt","is","imte"],iU=["ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex"],cU={characterTags:uU,bodyTags:oU,headingTags:sU,introHeadingTags:aU,introBodyTags:iU};const zm=qB(GB);var hy=lU(zm);function lU(e){return e&&e.__esModule?e:{default:e}}var pU={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.verseContent=[],t.chapter=null,t.verses=null,r.cv={}}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{element:u}=t.sequences[0];u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,n.cv[r.chapter]={},n.cv[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,n.cv[r.chapter][r.verses]={})}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{chapter:u,verses:s}=r,{text:o}=t.sequences[0].element,a=(0,hy.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=hy.default.match(o,a,"all");for(var c of i){var l,p;(p=(l=n.cv[u][s])[c])!==null&&p!==void 0||(l[c]=0),n.cv[u][s][c]+=1}}}]},N6={verseWordsActions:pU},my=fU(zm);function fU(e){return e&&e.__esModule?e:{default:e}}function Ey(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.lastWord="",t.waitingMarkup=[],t.currentOccurrences={},t.PendingStartMilestones=[],r.stripped={},r.unalignedWords={},!0}}],startMilestone:[{description:"Ignore zaln startMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n),r.PendingStartMilestones.push(n)}}],endMilestone:[{description:"Ignore zaln endMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r,output:n,config:u}=e,{chapter:s,verses:o,lastWord:a}=r,{verseWords:i}=u,c=["after",a,r.currentOccurrences[a],i[s][o][a]].join("--"),l=Vc({},t.sequences[0].element);l.subtype=l.subType,delete l.subType;var p={chapter:s,verses:o,occurrence:r.currentOccurrences[a],occurrences:i[s][o][a],position:"after",word:a,payload:l,startMilestone:r.PendingStartMilestones.shift()};return n.stripped[r.chapter][r.verses][c]?n.stripped[r.chapter][r.verses][c].push(p):n.stripped[r.chapter][r.verses][c]=[p],!1}}],startWrapper:[{description:"Ignore w startWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e,n=Vc({},t.sequences[0].element);n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n)}}],endWrapper:[{description:"Ignore w endWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n,config:u}=e;try{var s=t.sequences[0];if(s.type!=="main")return!0;var o=s.element.text,a=(0,my.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=my.default.match(o,a,"all"),{chapter:c,verses:l}=r,{verseWords:p}=u;for(var f of i){var d,h;if((h=(d=r.currentOccurrences)[f])!==null&&h!==void 0||(d[f]=0),r.currentOccurrences[f]++,!r.PendingStartMilestones.length&&r.waitingMarkup.length){var E,A,m,y;(A=(E=n.unalignedWords)[c])!==null&&A!==void 0||(E[c]={}),(y=(m=n.unalignedWords[c])[l])!==null&&y!==void 0||(m[l]=[]),n.unalignedWords[c][l].push({word:f,occurrence:r.currentOccurrences[f],totalOccurrences:p[c][l][f]})}for(;r.waitingMarkup.length;){var F=r.waitingMarkup.shift(),B=["before",f,r.currentOccurrences[f],p[c][l][f]].join("--"),P={chapter:c,verses:l,occurrence:r.currentOccurrences[f],occurrences:p[c][l][f],position:"before",word:f,payload:Vc(Vc({},F),F.subtype==="usfm:w"&&{content:[f]})};n.stripped[r.chapter][r.verses][B]?n.stripped[r.chapter][r.verses][B].push(P):n.stripped[r.chapter][r.verses][B]=[P]}r.lastWord=f}}catch($){throw console.error($),$}return!0}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;try{var u=t.sequences[0].element;u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter]={},n.stripped[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter][r.verses]={})}catch(s){throw console.error(s),s}return!0}}]},q6={stripMarkupActions:mU},zs=EU(zm);function EU(e){return e&&e.__esModule?e:{default:e}}var x6=[["printable","wordLike",(0,zs.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")],["printable","lineSpace",(0,zs.default)("([\\p{Separator} ]{1,127})")],["printable","punctuation",(0,zs.default)("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",(0,zs.default)("(.)")]],vU=zs.default.union(x6.map(e=>e[2])),yU={type:"end_milestone",subtype:"usfm:zaln"},gU={startDocument:[{description:"setup",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.currentOccurrences={},r.unalignedWords={},!0}}],text:[{description:"add-to-text",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;try{let y=function(){for(;h.length;)n.outputContentStack[0].push(h.shift())};var s=r.sequences[0];if(s.type!=="main")return!0;var o=r.sequences[0].element.text,a=zs.default.match(o,vU,"all"),{chapter:i,verses:c}=n;if(!c)return!0;var{totalOccurrences:l,strippedAlignment:p}=t,f={opened:null},d=F=>{var{subtype:B,content:P=[],atts:$={}}=F;return Object.keys($).length>0?{type:"wrapper",subtype:B,content:P,atts:$}:{type:"wrapper",subtype:B,content:P}},h=[],E=function(B){var P,$,I,U=(P=zs.default.match(B,x6[0][2],"all"))===null||P===void 0?void 0:P.length;if(!U)return h.push(B),"continue";(I=($=n.currentOccurrences)[B])!==null&&I!==void 0||($[B]=0),n.currentOccurrences[B]++;var j=pe=>[pe,B,n.currentOccurrences[B],l[i][c][B]].join("--"),W=p[i][c],te=!1,Y=W[j("after")],oe=W[j("before")];if(oe!=null&&oe.length&&y(),Y!=null&&Y.length&&!f.opened&&(Y.map(pe=>{var{startMilestone:Q}=pe;return n.outputContentStack[0].push(Q)}),te=!0),oe==null||oe.forEach(pe=>{var{payload:Q}=pe;Q.type!=="start_milestone"&&n.outputContentStack[0].push(Q),Q.type==="start_milestone"&&!te&&(n.outputContentStack[0].push(Q),f.opened=!0)}),Y==null||Y.forEach(pe=>{var{payload:Q}=pe;f.opened=!1,n.outputContentStack[0].push(Q)}),!(oe!=null&&oe.length)){var ie,fe,De,de;f.opened&&(n.outputContentStack[0].push(yU),f.opened=!1),y(),(fe=(ie=u.unalignedWords)[i])!==null&&fe!==void 0||(ie[i]={}),(de=(De=u.unalignedWords[i])[c])!==null&&de!==void 0||(De[c]=[]),u.unalignedWords[n.chapter][n.verses].push({word:B,occurrence:n.currentOccurrences[B],totalOccurrences:l[i][c][B]});var Ce=d({subtype:"usfm:w",content:[B]});n.outputContentStack[0].push(Ce)}};for(var A of a)var m=E(A);return y(),!1}catch(y){throw console.error(y),y}}}],mark:[{description:"mark-chapters",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.chapter=s.atts.number,n.verses=0,!0}},{description:"mark-verses",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="verses"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.verses=s.atts.number,n.currentOccurrences={},!0}}]},R6={mergeAlignmentActions:gU},{verseWordsActions:AU}=N6,{stripMarkupActions:FU}=q6,{mergeAlignmentActions:CU}=R6,bU={verseWordsActions:AU,stripMarkupActions:FU,mergeAlignmentActions:CU};let SU=class{constructor(t){if(!t)throw new Error("Must provide a constructor object to constructor");this.description=t.description||function(r){throw r}(new Error("Must provide a description in constructor object")),this.test=t.test||(()=>!0),this.action=t.action||(()=>null)}};var wU=SU,vy=wU;let _U=class j6{constructor(t){if(this.constructor===j6)throw new Error("Abstract class ProskommaRender cannot be instantiated - make as subclass!");var r=t.actions||{};this.debugLevel=t.debugLevel||0,this.actions={};for(var n of["startDocument","endDocument","startSequence","endSequence","unresolvedBlockGraft","blockGraft","startParagraph","endParagraph","metaContent","mark","unresolvedInlineGraft","inlineGraft","startWrapper","endWrapper","startMilestone","endMilestone","text"])r[n]?this.actions[n]=r[n].map(u=>new vy(u)):this.actions[n]=[]}addRenderActionObject(t,r){if(!this.actions[t])throw new Error("Unknown event '".concat(t));this.actions[t].push(r)}addRenderAction(t,r){this.addRenderActionObject(t,new vy(r))}describeRenderActions(t){if(!this.actions[t])throw new Error("Unknown event '".concat(t));var r=["**Actions for ".concat(t,`** + deps: ${l}}`};const u={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[c,l]=s(i);o(i,c),a(i,l)}};function s({schema:i}){const c={},l={};for(const p in i){if(p==="__proto__")continue;const d=Array.isArray(i[p])?c:l;d[p]=i[p]}return[c,l]}function o(i,c=i.schema){const{gen:l,data:p,it:d}=i;if(Object.keys(c).length===0)return;const f=l.let("missing");for(const h in c){const y=c[h];if(y.length===0)continue;const A=(0,n.propertyInData)(l,p,h,d.opts.ownProperties);i.setParams({property:h,depsCount:y.length,deps:y.join(", ")}),d.allErrors?l.if(A,()=>{for(const m of y)(0,n.checkReportMissingProp)(i,m)}):(l.if((0,t._)`${A} && (${(0,n.checkMissingProp)(i,y,f)})`),(0,n.reportMissingProp)(i,f),l.else())}}e.validatePropertyDeps=o;function a(i,c=i.schema){const{gen:l,data:p,keyword:d,it:f}=i,h=l.name("valid");for(const y in c)(0,r.alwaysValidSchema)(f,c[y])||(l.if((0,n.propertyInData)(l,p,y,f.opts.ownProperties),()=>{const A=i.subschema({keyword:d,schemaProp:y},h);i.mergeValidEvaluated(A,h)},()=>l.var(h,!0)),i.ok(h))}e.validateSchemaDeps=a,e.default=u})(u7);var zm={};Object.defineProperty(zm,"__esModule",{value:!0});const s7=ut,LR=Dt,UR={message:"property name must be valid",params:({params:e})=>(0,s7._)`{propertyName: ${e.propertyName}}`},GR={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:UR,code(e){const{gen:t,schema:r,data:n,it:u}=e;if((0,LR.alwaysValidSchema)(u,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,s7.not)(s),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(s)}};zm.default=GR;var Kp={};Object.defineProperty(Kp,"__esModule",{value:!0});const Wc=tt,gn=ut,VR=ru,Jc=Dt,HR={message:"must NOT have additional properties",params:({params:e})=>(0,gn._)`{additionalProperty: ${e.additionalProperty}}`},WR={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:HR,code(e){const{gen:t,schema:r,parentSchema:n,data:u,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:i}=o;if(o.props=!0,i.removeAdditional!=="all"&&(0,Jc.alwaysValidSchema)(o,r))return;const c=(0,Wc.allSchemaProperties)(n.properties),l=(0,Wc.allSchemaProperties)(n.patternProperties);p(),e.ok((0,gn._)`${s} === ${VR.default.errors}`);function p(){t.forIn("key",u,A=>{!c.length&&!l.length?h(A):t.if(d(A),()=>h(A))})}function d(A){let m;if(c.length>8){const v=(0,Jc.schemaRefOrVal)(o,n.properties,"properties");m=(0,Wc.isOwnProperty)(t,v,A)}else c.length?m=(0,gn.or)(...c.map(v=>(0,gn._)`${A} === ${v}`)):m=gn.nil;return l.length&&(m=(0,gn.or)(m,...l.map(v=>(0,gn._)`${(0,Wc.usePattern)(e,v)}.test(${A})`))),(0,gn.not)(m)}function f(A){t.code((0,gn._)`delete ${u}[${A}]`)}function h(A){if(i.removeAdditional==="all"||i.removeAdditional&&r===!1){f(A);return}if(r===!1){e.setParams({additionalProperty:A}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,Jc.alwaysValidSchema)(o,r)){const m=t.name("valid");i.removeAdditional==="failing"?(y(A,m,!1),t.if((0,gn.not)(m),()=>{e.reset(),f(A)})):(y(A,m),a||t.if((0,gn.not)(m),()=>t.break()))}}function y(A,m,v){const C={keyword:"additionalProperties",dataProp:A,dataPropType:Jc.Type.Str};v===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(C,m)}}};Kp.default=WR;var Km={};Object.defineProperty(Km,"__esModule",{value:!0});const JR=Tn,Dv=tt,df=Dt,hv=Kp,zR={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&hv.default.code(new JR.KeywordCxt(s,hv.default,"additionalProperties"));const o=(0,Dv.allSchemaProperties)(r);for(const p of o)s.definedProperties.add(p);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=df.mergeEvaluated.props(t,(0,df.toHash)(o),s.props));const a=o.filter(p=>!(0,df.alwaysValidSchema)(s,r[p]));if(a.length===0)return;const i=t.name("valid");for(const p of a)c(p)?l(p):(t.if((0,Dv.propertyInData)(t,u,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(i,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(i);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},i)}}};Km.default=zR;var Xm={};Object.defineProperty(Xm,"__esModule",{value:!0});const mv=tt,zc=ut,Ev=Dt,yv=Dt,KR={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:u,it:s}=e,{opts:o}=s,a=(0,mv.allSchemaProperties)(r),i=a.filter(y=>(0,Ev.alwaysValidSchema)(s,r[y]));if(a.length===0||i.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof zc.Name)&&(s.props=(0,yv.evaluatedPropsToName)(t,s.props));const{props:p}=s;d();function d(){for(const y of a)c&&f(y),s.allErrors?h(y):(t.var(l,!0),h(y),t.if(l))}function f(y){for(const A in c)new RegExp(y).test(A)&&(0,Ev.checkStrictMode)(s,`property ${A} matches pattern ${y} (use allowMatchingProperties)`)}function h(y){t.forIn("key",n,A=>{t.if((0,zc._)`${(0,mv.usePattern)(e,y)}.test(${A})`,()=>{const m=i.includes(y);m||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:A,dataPropType:yv.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,zc._)`${p}[${A}]`,!0):!m&&!s.allErrors&&t.if((0,zc.not)(l),()=>t.break())})})}}};Xm.default=KR;var Ym={};Object.defineProperty(Ym,"__esModule",{value:!0});const XR=Dt,YR={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,XR.alwaysValidSchema)(n,r)){e.fail();return}const u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};Ym.default=YR;var Zm={};Object.defineProperty(Zm,"__esModule",{value:!0});const ZR=tt,QR={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ZR.validateUnion,error:{message:"must match a schema in anyOf"}};Zm.default=QR;var Qm={};Object.defineProperty(Qm,"__esModule",{value:!0});const kl=ut,ej=Dt,tj={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,kl._)`{passingSchemas: ${e.passing}}`},rj={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:tj,code(e){const{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),a=t.let("passing",null),i=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let d;(0,ej.alwaysValidSchema)(u,l)?t.var(i,!0):d=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},i),p>0&&t.if((0,kl._)`${i} && ${o}`).assign(o,!1).assign(a,(0,kl._)`[${a}, ${p}]`).else(),t.if(i,()=>{t.assign(o,!0),t.assign(a,p),d&&e.mergeEvaluated(d,kl.Name)})})}}};Qm.default=rj;var eE={};Object.defineProperty(eE,"__esModule",{value:!0});const nj=Dt,uj={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const u=t.name("valid");r.forEach((s,o)=>{if((0,nj.alwaysValidSchema)(n,s))return;const a=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(a)})}};eE.default=uj;var tE={};Object.defineProperty(tE,"__esModule",{value:!0});const mp=ut,o7=Dt,sj={message:({params:e})=>(0,mp.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,mp._)`{failingKeyword: ${e.ifClause}}`},oj={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:sj,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,o7.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const u=vv(n,"then"),s=vv(n,"else");if(!u&&!s)return;const o=t.let("valid",!0),a=t.name("_valid");if(i(),e.reset(),u&&s){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else u?t.if(a,c("then")):t.if((0,mp.not)(a),c("else"));e.pass(o,()=>e.error(!0));function i(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{const d=e.subschema({keyword:l},a);t.assign(o,a),e.mergeValidEvaluated(d,o),p?t.assign(p,(0,mp._)`${l}`):e.setParams({ifClause:l})}}}};function vv(e,t){const r=e.schema[t];return r!==void 0&&!(0,o7.alwaysValidSchema)(e,r)}tE.default=oj;var rE={};Object.defineProperty(rE,"__esModule",{value:!0});const aj=Dt,ij={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,aj.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};rE.default=ij;Object.defineProperty(Vm,"__esModule",{value:!0});const cj=wa,lj=Hm,pj=_a,dj=Wm,fj=Jm,Dj=u7,hj=zm,mj=Kp,Ej=Km,yj=Xm,vj=Ym,gj=Zm,Aj=Qm,Fj=eE,Cj=tE,bj=rE;function Sj(e=!1){const t=[vj.default,gj.default,Aj.default,Fj.default,Cj.default,bj.default,hj.default,mj.default,Dj.default,Ej.default,yj.default];return e?t.push(lj.default,dj.default):t.push(cj.default,pj.default),t.push(fj.default),t}Vm.default=Sj;var nE={},uE={};Object.defineProperty(uE,"__esModule",{value:!0});const Vt=ut,wj={message:({schemaCode:e})=>(0,Vt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Vt._)`{format: ${e}}`},_j={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:wj,code(e,t){const{gen:r,data:n,$data:u,schema:s,schemaCode:o,it:a}=e,{opts:i,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!i.validateFormats)return;u?d():f();function d(){const h=r.scopeValue("formats",{ref:p.formats,code:i.code.formats}),y=r.const("fDef",(0,Vt._)`${h}[${o}]`),A=r.let("fType"),m=r.let("format");r.if((0,Vt._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(A,(0,Vt._)`${y}.type || "string"`).assign(m,(0,Vt._)`${y}.validate`),()=>r.assign(A,(0,Vt._)`"string"`).assign(m,y)),e.fail$data((0,Vt.or)(v(),C()));function v(){return i.strictSchema===!1?Vt.nil:(0,Vt._)`${o} && !${m}`}function C(){const B=l.$async?(0,Vt._)`(${y}.async ? await ${m}(${n}) : ${m}(${n}))`:(0,Vt._)`${m}(${n})`,T=(0,Vt._)`(typeof ${m} == "function" ? ${B} : ${m}.test(${n}))`;return(0,Vt._)`${m} && ${m} !== true && ${A} === ${t} && !${T}`}}function f(){const h=p.formats[s];if(!h){v();return}if(h===!0)return;const[y,A,m]=C(h);y===t&&e.pass(B());function v(){if(i.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function C(T){const N=T instanceof RegExp?(0,Vt.regexpCode)(T):i.code.formats?(0,Vt._)`${i.code.formats}${(0,Vt.getProperty)(s)}`:void 0,R=r.scopeValue("formats",{key:s,ref:T,code:N});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Vt._)`${R}.validate`]:["string",T,R]}function B(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Vt._)`await ${m}(${n})`}return typeof A=="function"?(0,Vt._)`${m}(${n})`:(0,Vt._)`${m}.test(${n})`}}}};uE.default=_j;Object.defineProperty(nE,"__esModule",{value:!0});const Bj=uE,Tj=[Bj.default];nE.default=Tj;var da={};Object.defineProperty(da,"__esModule",{value:!0});da.contentVocabulary=da.metadataVocabulary=void 0;da.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];da.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(Tm,"__esModule",{value:!0});const $j=$m,Pj=km,kj=Vm,Oj=nE,gv=da,Ij=[$j.default,Pj.default,(0,kj.default)(),Oj.default,gv.metadataVocabulary,gv.contentVocabulary];Tm.default=Ij;var sE={},a7={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(a7);Object.defineProperty(sE,"__esModule",{value:!0});const Ho=ut,X2=a7,Av=Nr,Nj=Dt,qj={message:({params:{discrError:e,tagName:t}})=>e===X2.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ho._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},xj={keyword:"discriminator",type:"object",schemaType:"object",error:qj,code(e){const{gen:t,data:r,schema:n,parentSchema:u,it:s}=e,{oneOf:o}=u;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const i=t.let("valid",!1),c=t.const("tag",(0,Ho._)`${r}${(0,Ho.getProperty)(a)}`);t.if((0,Ho._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:X2.DiscrError.Tag,tag:c,tagName:a})),e.ok(i);function l(){const f=d();t.if(!1);for(const h in f)t.elseIf((0,Ho._)`${c} === ${h}`),t.assign(i,p(f[h]));t.else(),e.error(!1,{discrError:X2.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(f){const h=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(y,Ho.Name),h}function d(){var f;const h={},y=m(u);let A=!0;for(let B=0;Bthis.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=Tn;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=ut;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=ec;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=tc;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(eq,lp);const Hj="Root",Wj="object",Jj="Root Element",zj={base64String:{type:"string",pattern:"^[A-Za-z0-9/+=]*$"},tagString:{type:"string",pattern:"^[a-z][a-z0-9]*(:.+)?$"}},Kj={id:{type:"string"},metadata:{type:"object",properties:{selectors:{type:"object",additionalProperties:{type:"string"}}},required:["selectors"],additionalProperties:!1},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},enums:{type:"object",properties:{ids:{$ref:"#/definitions/base64String"},wordLike:{$ref:"#/definitions/base64String"},notWordLike:{$ref:"#/definitions/base64String"},scopeBits:{$ref:"#/definitions/base64String"},graftTypes:{$ref:"#/definitions/base64String"}},required:["ids","wordLike","notWordLike","scopeBits","graftTypes"],additionalProperties:!1},docs:{type:"object",propertyNames:{type:"string"},additionalProperties:{type:"object",properties:{sequences:{type:"object",additionalProperties:{type:"object",properties:{type:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{bs:{type:"string"},bg:{type:"string"},c:{type:"string"},is:{type:"string"},os:{type:"string"},nt:{type:"string"}},required:["bs","bg","c","is","os","nt"],additionalProperties:!1}},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},chapters:{type:"object",additionalProperties:{type:"string"}},chapterVerses:{type:"object",additionalProperties:{type:"string"}},tokensPresent:{type:"string"}},required:["blocks","tags"],additionalProperties:!1}},headers:{type:"object",additionalProperties:{type:"string"}},mainId:{type:"string"},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}}},required:["sequences","headers","mainId","tags"],additionalProperties:!1}},additionalProperties:!1},Xj=["id","enums","docs","tags"],Yj=!1,Zj={title:Hj,type:Wj,description:Jj,definitions:zj,properties:Kj,required:Xj,additionalProperties:Yj},Qj="version 0.1.0",eM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/document_structure.json",tM="Document (Structure)",rM="A document, typically corresponding to a single USFM or USX book",nM="object",uM={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},sM=["schema","metadata"],oM=!1,aM={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},iM={$comment:Qj,$id:eM,title:tM,description:rM,type:nM,properties:uM,required:sM,additionalProperties:oM,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:aM,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},cM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/sequence_structure.json",lM="Sequence (Structure)",pM="A sequence contains a 'flow' of one or more blocks",dM="object",fM={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}}},DM=["type"],hM=!1,mM={$id:cM,title:lM,description:pM,type:dM,properties:fM,required:DM,additionalProperties:hM},EM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/block_structure.json",yM="Block (Structure)",vM="A block, which represents either a paragraph of text or a graft",gM="object",AM={type:{type:"string",description:"The type of block",enum:["paragraph","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},FM=["type"],CM=!1,bM={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},SM={$id:EM,title:yM,description:vM,type:gM,properties:AM,required:FM,additionalProperties:CM,if:{properties:{type:{enum:["paragraph"]}}},then:bM,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},wM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/contentElement_structure.json",_M="Content Element (Structure)",BM="A content element, ie some form of (possibly nested) markup",TM="object",$M={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},PM=["type"],kM=!1,OM={$id:wM,title:_M,description:BM,type:TM,properties:$M,required:PM,additionalProperties:kM},IM="version 0.2.0",NM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_document_constraint.json",qM="object",xM={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},RM={$comment:IM,$id:NM,type:qM,properties:xM},jM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_sequence_constraint.json",MM="object",LM={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},UM={$id:jM,type:MM,properties:LM},GM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_block_constraint.json",VM="object",HM={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},WM={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},JM={$id:GM,type:VM,properties:HM,if:{properties:{type:{enum:["graft"]}}},then:WM,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},zM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_contentElement_constraint.json",KM="object",XM=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],YM={$id:zM,type:KM,allOf:XM},ZM="version 0.2.0",QM="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_document_constraint.json",eL="object",tL={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sofria_sequence_constraint.json"}}},rL={$comment:ZM,$id:QM,type:eL,properties:tL},nL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_sequence_constraint.json",uL="object",sL={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},oL={$id:nL,type:uL,properties:sL},aL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_block_constraint.json",iL="object",cL={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},lL={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},pL={$id:aL,type:iL,properties:cL,if:{properties:{type:{enum:["graft"]}}},then:lL,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},dL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_contentElement_constraint.json",fL="object",DL=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["block"]},{required:["preview_text"]}]}},else:{required:["block"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],hL={$id:dL,type:fL,allOf:DL},mL="version 0.1.0",EL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/document_structure.json",yL="Document (Structure)",vL="A document, typically corresponding to a single USFM or USX book",gL="object",AL={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},FL=["schema","metadata"],CL=!1,bL={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},SL={$comment:mL,$id:EL,title:yL,description:vL,type:gL,properties:AL,required:FL,additionalProperties:CL,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:bL,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},wL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/sequence_structure.json",_L="Sequence (Structure)",BL="A sequence contains a 'flow' of one or more blocks",TL="object",$L={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},PL=["type"],kL=!1,OL={$id:wL,title:_L,description:BL,type:TL,properties:$L,required:PL,additionalProperties:kL},IL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/block_structure.json",NL="Block (Structure)",qL="A block, which represents either a paragraph of text or a graft",xL="object",RL={type:{type:"string",description:"The type of block",enum:["paragraph","row","node","lookup","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},jL=["type"],ML=!1,LL={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},UL={$id:IL,title:NL,description:qL,type:xL,properties:RL,required:jL,additionalProperties:ML,if:{properties:{type:{enum:["paragraph","row","node","lookup"]}}},then:LL,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},GL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/contentElement_structure.json",VL="Content Element (Structure)",HL="A content element, ie some form of (possibly nested) markup",WL="object",JL={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},zL=["type"],KL=!1,XL={$id:GL,title:VL,description:HL,type:WL,properties:JL,required:zL,additionalProperties:KL},YL="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/hook_structure.json",ZL="Hook (Structure)",QL="Hooks, ie typed labels that may be used to link documents",eU="array",tU={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},rU={$id:YL,title:ZL,description:QL,type:eU,items:tU},nU="version 0.3.0",uU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_document_constraint.json",sU="object",oU={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},aU={$comment:nU,$id:uU,type:sU,properties:oU},iU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_sequence_constraint.json",cU="object",lU={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},pU={$id:iU,type:cU,properties:lU},dU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_block_constraint.json",fU="object",DU={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},hU={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},mU={$id:dU,type:fU,properties:DU,if:{properties:{type:{enum:["graft"]}}},then:hU,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},EU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_contentElement_constraint.json",yU="object",vU=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],gU={$id:EU,type:yU,allOf:vU},AU="version 0.3.0",FU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_document_constraint.json",CU="object",bU={sequence:{$ref:"./sofria_sequence_constraint.json"}},SU={$comment:AU,$id:FU,type:CU,properties:bU},wU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_sequence_constraint.json",_U="object",BU={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},TU={$id:wU,type:_U,properties:BU},$U="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_block_constraint.json",PU="object",kU={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},OU={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},IU={$id:$U,type:PU,properties:kU,if:{properties:{type:{enum:["graft"]}}},then:OU,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},NU="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_contentElement_constraint.json",qU="object",xU=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],RU={$id:NU,type:qU,allOf:xU};var Gt=lp,jU=Zj,ff=iM,Fo=mM,Co=SM,bo=OM,MU=RM,Fv=UM,Cv=JM,bv=YM,LU=rL,Sv=oL,wv=pL,_v=hL,Df=SL,So=OL,wo=UL,_o=XL,jn=rU,UU=aU,Bv=pU,Tv=mU,$v=gU,GU=SU,Pv=TU,kv=IU,Ov=RU;let VU=class{constructor(){this.schema={structure:{},constraint:{},proskomma:{}};for(var[t,r]of[["succinct",{"0.2.0":[{name:"Proskomma Serialized Succinct",validator:new Gt().compile(jU)}]}]])this.schema.proskomma[t]=r;for(var[n,u]of[["document",{"0.2.1":[{name:"Document Structure",validator:new Gt().addSchema(bo).addSchema(Co).addSchema(Fo).compile(ff)}],"0.3.0":[{name:"Document Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).addSchema(So).compile(Df)}]}],["sequence",{"0.2.1":[{name:"Sequence Structure",validator:new Gt().addSchema(bo).addSchema(Co).compile(Fo)}],"0.3.0":[{name:"Sequence Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).compile(So)}]}]])this.schema.structure[n]=u;for(var[s,o]of[["perfDocument",{"0.2.1":[{name:"Document Structure",validator:new Gt().addSchema(bo).addSchema(Co).addSchema(Fo).compile(ff)},{name:"PERF Document",validator:new Gt().addSchema(bv).addSchema(Cv).addSchema(Fv).compile(MU)}],"0.3.0":[{name:"Document Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).addSchema(So).compile(Df)},{name:"PERF Document",validator:new Gt().addSchema(jn).addSchema($v).addSchema(Tv).addSchema(Bv).compile(UU)}]}],["perfSequence",{"0.2.1":[{name:"Sequence Structure",validator:new Gt().addSchema(bo).addSchema(Co).compile(Fo)},{name:"PERF Sequence",validator:new Gt().addSchema(bv).addSchema(Cv).compile(Fv)}],"0.3.0":[{name:"Sequence Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).compile(So)},{name:"PERF Sequence",validator:new Gt().addSchema(jn).addSchema($v).addSchema(Tv).compile(Bv)}]}],["sofriaDocument",{"0.2.1":[{name:"Document Structure",validator:new Gt().addSchema(bo).addSchema(Co).addSchema(Fo).compile(ff)},{name:"SOFRIA Document",validator:new Gt().addSchema(_v).addSchema(wv).addSchema(Sv).compile(LU)}],"0.3.0":[{name:"Document Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).addSchema(So).compile(Df)},{name:"SOFRIA Document",validator:new Gt().addSchema(jn).addSchema(Ov).addSchema(kv).addSchema(Pv).compile(GU)}]}],["sofriaSequence",{"0.2.1":[{name:"Sequence Structure",validator:new Gt().addSchema(bo).addSchema(Co).compile(Fo)},{name:"SOFRIA Sequence",validator:new Gt().addSchema(_v).addSchema(wv).compile(Sv)}],"0.3.0":[{name:"Sequence Structure",validator:new Gt().addSchema(jn).addSchema(_o).addSchema(wo).compile(So)},{name:"SOFRIA Sequence",validator:new Gt().addSchema(jn).addSchema(Ov).addSchema(kv).compile(Pv)}]}]])this.schema.constraint[s]=o}schemaInfo(){var t={};for(var[r,n]of Object.entries(this.schema)){t[r]={};for(var[u,s]of Object.entries(n)){t[r][u]={};for(var[o,a]of Object.entries(s))t[r][u][o]=a.map(i=>i.name)}}return t}validate(t,r,n,u){if(u===void 0)throw new Error("data argument is missing. Usage: validate(schemaType, schemaKey, schemaVersion, data)");if(u===null)throw new Error("Data argument is null");var s=Object.keys(this.schema);if(!s.includes(t))throw new Error("Schema type must be one of ".concat(s.map(l=>"'".concat(l,"'")).join(", "),", not '").concat(t,"'"));if(!this.schema[t][r])throw new Error("Unknown ".concat(t," schema key ").concat(r));if(!this.schema[t][r][n])throw new Error("Unknown version ".concat(n," for ").concat(t," schema key ").concat(r));var o=this.schema[t][r][n],a;for(var{name:i,validator:c}of o)if(a={validatorName:i,isValid:c(u),errors:c.errors},!a.isValid)break;return{requested:{schemaType:t,schemaKey:r,schemaVersion:n},lastSchema:a.validatorName,isValid:a.isValid,errors:a.errors}}};var HU=VU,WU=["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt","th","thr","tc","tcr"],JU=["ms","mr","s","sr","r","qa","sp","sd"],zU=["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"],KU=["imt","is","imte"],XU=["ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex"],YU={characterTags:WU,bodyTags:zU,headingTags:JU,introHeadingTags:KU,introBodyTags:XU};const oE=bT(PT);var Iv=ZU(oE);function ZU(e){return e&&e.__esModule?e:{default:e}}var QU={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.verseContent=[],t.chapter=null,t.verses=null,r.cv={}}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{element:u}=t.sequences[0];u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,n.cv[r.chapter]={},n.cv[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,n.cv[r.chapter][r.verses]={})}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{chapter:u,verses:s}=r,{text:o}=t.sequences[0].element,a=(0,Iv.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=Iv.default.match(o,a,"all");for(var c of i){var l,p;(p=(l=n.cv[u][s])[c])!==null&&p!==void 0||(l[c]=0),n.cv[u][s][c]+=1}}}]},i7={verseWordsActions:QU},Nv=eG(oE);function eG(e){return e&&e.__esModule?e:{default:e}}function qv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Kc(e){for(var t=1;t!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.lastWord="",t.waitingMarkup=[],t.currentOccurrences={},t.PendingStartMilestones=[],r.stripped={},r.unalignedWords={},!0}}],startMilestone:[{description:"Ignore zaln startMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n),r.PendingStartMilestones.push(n)}}],endMilestone:[{description:"Ignore zaln endMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r,output:n,config:u}=e,{chapter:s,verses:o,lastWord:a}=r,{verseWords:i}=u,c=["after",a,r.currentOccurrences[a],i[s][o][a]].join("--"),l=Kc({},t.sequences[0].element);l.subtype=l.subType,delete l.subType;var p={chapter:s,verses:o,occurrence:r.currentOccurrences[a],occurrences:i[s][o][a],position:"after",word:a,payload:l,startMilestone:r.PendingStartMilestones.shift()};return n.stripped[r.chapter][r.verses][c]?n.stripped[r.chapter][r.verses][c].push(p):n.stripped[r.chapter][r.verses][c]=[p],!1}}],startWrapper:[{description:"Ignore w startWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e,n=Kc({},t.sequences[0].element);n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n)}}],endWrapper:[{description:"Ignore w endWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n,config:u}=e;try{var s=t.sequences[0];if(s.type!=="main")return!0;var o=s.element.text,a=(0,Nv.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=Nv.default.match(o,a,"all"),{chapter:c,verses:l}=r,{verseWords:p}=u;for(var d of i){var f,h;if((h=(f=r.currentOccurrences)[d])!==null&&h!==void 0||(f[d]=0),r.currentOccurrences[d]++,!r.PendingStartMilestones.length&&r.waitingMarkup.length){var y,A,m,v;(A=(y=n.unalignedWords)[c])!==null&&A!==void 0||(y[c]={}),(v=(m=n.unalignedWords[c])[l])!==null&&v!==void 0||(m[l]=[]),n.unalignedWords[c][l].push({word:d,occurrence:r.currentOccurrences[d],totalOccurrences:p[c][l][d]})}for(;r.waitingMarkup.length;){var C=r.waitingMarkup.shift(),B=["before",d,r.currentOccurrences[d],p[c][l][d]].join("--"),T={chapter:c,verses:l,occurrence:r.currentOccurrences[d],occurrences:p[c][l][d],position:"before",word:d,payload:Kc(Kc({},C),C.subtype==="usfm:w"&&{content:[d]})};n.stripped[r.chapter][r.verses][B]?n.stripped[r.chapter][r.verses][B].push(T):n.stripped[r.chapter][r.verses][B]=[T]}r.lastWord=d}}catch(N){throw console.error(N),N}return!0}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;try{var u=t.sequences[0].element;u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter]={},n.stripped[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter][r.verses]={})}catch(s){throw console.error(s),s}return!0}}]},c7={stripMarkupActions:uG},Ls=sG(oE);function sG(e){return e&&e.__esModule?e:{default:e}}var l7=[["printable","wordLike",(0,Ls.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")],["printable","lineSpace",(0,Ls.default)("([\\p{Separator} ]{1,127})")],["printable","punctuation",(0,Ls.default)("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",(0,Ls.default)("(.)")]],oG=Ls.default.union(l7.map(e=>e[2])),aG={type:"end_milestone",subtype:"usfm:zaln"},iG={startDocument:[{description:"setup",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.currentOccurrences={},r.unalignedWords={},!0}}],text:[{description:"add-to-text",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;try{let v=function(){for(;h.length;)n.outputContentStack[0].push(h.shift())};var s=r.sequences[0];if(s.type!=="main")return!0;var o=r.sequences[0].element.text,a=Ls.default.match(o,oG,"all"),{chapter:i,verses:c}=n;if(!c)return!0;var{totalOccurrences:l,strippedAlignment:p}=t,d={opened:null},f=C=>{var{subtype:B,content:T=[],atts:N={}}=C;return Object.keys(N).length>0?{type:"wrapper",subtype:B,content:T,atts:N}:{type:"wrapper",subtype:B,content:T}},h=[],y=function(B){var T,N,R,J=(T=Ls.default.match(B,l7[0][2],"all"))===null||T===void 0?void 0:T.length;if(!J)return h.push(B),"continue";(R=(N=n.currentOccurrences)[B])!==null&&R!==void 0||(N[B]=0),n.currentOccurrences[B]++;var q=pe=>[pe,B,n.currentOccurrences[B],l[i][c][B]].join("--"),G=p[i][c],ee=!1,K=G[q("after")],ue=G[q("before")];if(ue!=null&&ue.length&&v(),K!=null&&K.length&&!d.opened&&(K.map(pe=>{var{startMilestone:z}=pe;return n.outputContentStack[0].push(z)}),ee=!0),ue==null||ue.forEach(pe=>{var{payload:z}=pe;z.type!=="start_milestone"&&n.outputContentStack[0].push(z),z.type==="start_milestone"&&!ee&&(n.outputContentStack[0].push(z),d.opened=!0)}),K==null||K.forEach(pe=>{var{payload:z}=pe;d.opened=!1,n.outputContentStack[0].push(z)}),!(ue!=null&&ue.length)){var oe,de,he,fe;d.opened&&(n.outputContentStack[0].push(aG),d.opened=!1),v(),(de=(oe=u.unalignedWords)[i])!==null&&de!==void 0||(oe[i]={}),(fe=(he=u.unalignedWords[i])[c])!==null&&fe!==void 0||(he[c]=[]),u.unalignedWords[n.chapter][n.verses].push({word:B,occurrence:n.currentOccurrences[B],totalOccurrences:l[i][c][B]});var ge=f({subtype:"usfm:w",content:[B]});n.outputContentStack[0].push(ge)}};for(var A of a)var m=y(A);return v(),!1}catch(v){throw console.error(v),v}}}],mark:[{description:"mark-chapters",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.chapter=s.atts.number,n.verses=0,!0}},{description:"mark-verses",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="verses"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.verses=s.atts.number,n.currentOccurrences={},!0}}]},p7={mergeAlignmentActions:iG},{verseWordsActions:cG}=i7,{stripMarkupActions:lG}=c7,{mergeAlignmentActions:pG}=p7,dG={verseWordsActions:cG,stripMarkupActions:lG,mergeAlignmentActions:pG};let fG=class{constructor(t){if(!t)throw new Error("Must provide a constructor object to constructor");this.description=t.description||function(r){throw r}(new Error("Must provide a description in constructor object")),this.test=t.test||(()=>!0),this.action=t.action||(()=>null)}};var DG=fG,xv=DG;let hG=class d7{constructor(t){if(this.constructor===d7)throw new Error("Abstract class ProskommaRender cannot be instantiated - make as subclass!");var r=t.actions||{};this.debugLevel=t.debugLevel||0,this.actions={};for(var n of["startDocument","endDocument","startSequence","endSequence","unresolvedBlockGraft","blockGraft","startParagraph","endParagraph","metaContent","mark","unresolvedInlineGraft","inlineGraft","startWrapper","endWrapper","startMilestone","endMilestone","text"])r[n]?this.actions[n]=r[n].map(u=>new xv(u)):this.actions[n]=[]}addRenderActionObject(t,r){if(!this.actions[t])throw new Error("Unknown event '".concat(t));this.actions[t].push(r)}addRenderAction(t,r){this.addRenderActionObject(t,new xv(r))}describeRenderActions(t){if(!this.actions[t])throw new Error("Unknown event '".concat(t));var r=["**Actions for ".concat(t,`** `)];for(var n of this.actions[t])r.push("IF ".concat(n.test.toString(),":")),r.push(" DO ".concat(n.description));return r.join(` -`)}renderDocument(t){var{docId:r,config:n,output:u}=t,s={},o={};return this.renderDocument1({docId:r,config:n,context:s,workspace:o,output:u}),u}renderDocument1(t){throw new Error("Define renderDocument1() in subclass")}renderEvent(t,r){var n=r.context;if(this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length),"EVENT ").concat(t)),!this.actions[t])throw new Error("Unknown event '".concat(t));var u=!1;for(var s of this.actions[t]){var o=!1;try{o=s.test(r)}catch(c){var a="Exception from test of action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c);throw new Error(a)}if(o){u=!0,this.debugLevel>0&&console.log("".concat(" ".repeat(n.sequences.length)," ").concat(t," action: ").concat(s.description));var i=!1;try{i=s.action(r)}catch(c){throw new Error("Exception from action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c))}if(!i)break}}if(["unresolvedBlockGraft","unresolvedInlineGraft"].includes(t)&&this.actions[t].length===0)throw new Error("No action for ".concat(t," graft event in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: add an action or fix your data!"));!u&&this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length)," No matching action"))}};var rc=_U,BU=rc;let TU=class extends BU{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata,mainSequenceId:this.srcJson.main_sequence_id,nSequences:Object.keys(this.srcJson.sequences).length},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,this.srcJson.main_sequence_id),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.srcJson.sequences[r];if(!u)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(u,r)),this.renderEvent("startSequence",t);for(var[s,o]of u.blocks.entries())n.sequences[0].block={type:o.type,subType:o.subtype,blockN:s,wrappers:[]},o.type==="graft"?o.target&&!this.srcJson.sequences[o.target]?(n.sequences[0].block.target=o.target,this.renderEvent("unresolvedBlockGraft",t)):(n.sequences[0].block.target=o.target,n.sequences[0].block.isNew=o.new||!1,this.renderEvent("blockGraft",t)):(this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete n.sequences[0].block;this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.target&&(s.target=t.target),t.type==="graft"&&(s.isNew=t.new||!1),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft"){if(t.target&&t.target&&!this.srcJson.sequences[t.target]){this.renderEvent("unresolvedInlineGraft",r);return}this.renderEvent("inlineGraft",r),n(s)}else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var fs=TU,$U=PU(fs);function PU(e){return e&&e.__esModule?e:{default:e}}var{verseWordsActions:OU}=N6,kU=function(t){var{perf:r}=t,n=new $U.default({srcJson:r,actions:OU}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},IU={name:"verseWords",type:"Transform",description:"PERF=>JSON: Counts words occurrences",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"verseWords",type:"json"}],code:kU},NU={verseWords:IU},qU=e=>{var t={};for(var r of e)for(var n of Object.keys(r))t[n]?t[n].push(...r[n]):t[n]=r[n];return t},Gp=qU,xU={startDocument:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf={},u.perf.schema=r.document.schema,u.perf.metadata=r.document.metadata,u.perf.sequences={}}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf.sequences[r.sequences[0].id]={type:r.sequences[0].type,blocks:[]},n.outputSequence=u.perf.sequences[r.sequences[0].id],r.sequences[0].type==="main"&&(u.perf.main_sequence_id=r.sequences[0].id)}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;r.sequences.length>1&&(n.outputSequence=u.perf.sequences[r.sequences[1].id])}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type,subtype:t.subType};t.target&&(r.target=t.target,e.context.renderer.renderSequenceId(e,r.target)),t.isNew&&(r.new=t.isNew),e.workspace.outputSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].block,o={type:s.type,subtype:s.subType,content:[]};n.outputSequence.blocks.push(o),n.currentContent=o.content,n.outputBlock=n.outputSequence.blocks[n.outputSequence.blocks.length-1],n.outputContentStack=[n.outputBlock.content]}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.currentContent=s.metaContent;var o=n.outputContentStack[1][n.outputContentStack[1].length-1];o.meta_content=[],n.outputContentStack.unshift(o.meta_content),r.renderer.renderContent(n.currentContent,e),n.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType};if(t.target){r.target=t.target;var n=e.workspace.outputContentStack[0];e.context.renderer.renderSequenceId(e,t.target),e.workspace.outputContentStack[0]=n}t.isNew&&(r.new=t.isNew),e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType,content:[]};"atts"in s&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o),n.outputContentStack.unshift(o.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};n.outputContentStack[0].push(o)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.outputContentStack[0].push(s.text)}}]},nc={identityActions:xU},RU=M6(fs),jU=M6(Gp);function M6(e){return e&&e.__esModule?e:{default:e}}var{identityActions:MU}=nc,{stripMarkupActions:LU}=q6,UU=function(t){var{perf:r,verseWords:n}=t,u=new RU.default({srcJson:r,actions:(0,jU.default)([LU,MU])}),s={};return u.renderDocument({docId:"",config:{verseWords:n},output:s}),{perf:s.perf,strippedAlignment:s.stripped,unalignedWords:s.unalignedWords}},GU={name:"stripAlignment",type:"Transform",description:"PERF=>PERF: Strips alignment markup",inputs:[{name:"perf",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],code:UU},VU={stripAlignment:GU},HU=L6(fs),WU=L6(Gp);function L6(e){return e&&e.__esModule?e:{default:e}}var{identityActions:JU}=nc,{mergeAlignmentActions:zU}=R6,KU=function(t){var{perf:r,verseWords:n,strippedAlignment:u}=t,s=new HU.default({srcJson:r,actions:(0,WU.default)([zU,JU])}),o={};return s.renderDocument({docId:"",config:{totalOccurrences:n,strippedAlignment:u},output:o}),{perf:o.perf,unalignedWords:o.unalignedWords}},XU={name:"mergeAlignment",type:"Transform",description:"PERF=>PERF adds report to verses",inputs:[{name:"perf",type:"json",source:""},{name:"strippedAlignment",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],code:KU},YU={mergeAlignment:XU},{verseWords:ZU}=NU,{stripAlignment:QU}=VU,{mergeAlignment:eG}=YU,tG={verseWords:ZU,stripAlignment:QU,mergeAlignment:eG},rG=bU,nG=tG,uG={transforms:nG,renderActions:rG},sG={},U6=function(t){var{usfm:r,selectors:n,proskomma:u}=t;u.importDocuments(n,"usfm",[r]);var s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0],o=s.id,a=s.docSetId;u.gqlQuerySync('mutation { deleteDocument(docSetId: "'.concat(a,'", documentId: "').concat(o,'") }'));var i=JSON.parse(s.perf);return{perf:i}},oG={name:"usfmToPerf",type:"Transform",description:"USFM=>PERF: Conversion via Proskomma",inputs:[{name:"usfm",type:"text",source:""},{name:"selectors",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:U6},aG={usfmToPerf:oG,usfmToPerfCode:U6},{usfmToPerf:iG,usfmToPerfCode:cG}=aG,lG={usfmToPerf:iG,usfmToPerfCode:cG},pG=sG,fG=lG,dG={transforms:fG,renderActions:pG};function yy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function DG(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.sofria={},u.sofria.schema=r.document.schema,u.sofria.metadata=r.document.metadata,u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.chapter=null,n.verses=null,n.cachedChapter=null,n.cachedVerses=null}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{workspace:t}=e;t.currentSequence.type==="main"&&(t.chapter=null,t.verses=null),t.currentSequence=null}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.currentContent=n.metaContent;var u=r.outputContentStack[1][r.outputContentStack[1].length-1];u.meta_content=[],r.outputContentStack.unshift(u.meta_content),t.renderer.renderContent(r.currentContent,e),r.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType,sequence:{}},n=e.workspace.currentSequence,u=[...e.workspace.outputContentStack];e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.outputContentStack=u,e.workspace.currentSequence=n,e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?(r.chapter=n.atts.number,r.cachedChapter=r.chapter):n.subType==="verses"&&(r.verses=n.atts.number,r.cachedVerses=r.verses);var u={type:n.type,subtype:n.subType,content:[]};if("atts"in n&&(u.atts=DG({},n.atts)),r.outputContentStack.length===0)throw new Error("outputContentStack is empty before pushing to its first element, near ".concat(t.document.metadata.document.bookCode," ").concat(r.cachedChapter,":").concat(r.cachedVerses));r.outputContentStack[0].push(u),r.outputContentStack.unshift(u.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?r.chapter=null:n.subType==="verses"&&(r.verses=null),r.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};r.outputContentStack[0].push(u)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.outputContentStack[0].push(n.text)}}]},yG={identityActions:vG},{identityActions:gG}=yG,AG={identityActions:gG},FG=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:identityAction}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},CG={name:"identity",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:FG},bG={identity:CG},{identity:SG}=bG,wG={identity:SG},_G=AG,BG=wG,TG={transforms:BG,renderActions:_G},$G={startDocument:[{description:"Set up word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.words={}}}],text:[{description:"Split strings and add words to word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;for(var s of r.sequences[0].element.text.split(/[\s:;,.]+/).filter(o=>o.length>0))s=s.toLowerCase(),s in n.words?n.words[s]+=1:n.words[s]=1}}],endDocument:[{description:"Sort words",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.words=[...Object.entries(n.words)].sort((s,o)=>o[1]-s[1])}}]},G6={wordCountActions:$G},gy=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),PG={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.blockRecords=[],r.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(gy(t))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(gy(t))}}],mark:[{description:"Add chapter number to block record",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.blockRecords[n.blockRecords.length-1].perfChapter=r.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;for(var[n,u]of Object.entries(t.blockRecords))if(u.perfChapter){for(var s=n,o=!1;s>0&&!o;)t.blockRecords[s-1].type==="paragraph"||t.blockRecords[s-1].subType==="title"?o=!0:s--;r.report[s.toString()]=u.perfChapter}}}]},V6={calculateUsfmChapterPositionsActions:PG},kr=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,OG=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r==null&&(r={});var n="\\".concat(t,"-s |");for(var[u,s]of Object.entries(r))u==="x-morph"&&typeof s!="string"?n=n+kr(u)+'="'+s.join(",")+'" ':n=n+kr(u)+'="'+s+'" ';return n+"\\*"},kG=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;r==null&&(r={});var u="|";for(var[s,o]of Object.entries(r))u=u+kr(s)+'="'+o+'" ';return u=u+"\\",n&&(u=u+"+"),u+t+"*"},IG={startDocument:[{description:"Set up environment",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits=[""],r.nestedWrapper=0;for(var[n,u]of Object.entries(t.document.metadata.document).filter(s=>!["tags","properties","bookCode","cl"].includes(s[0])))r.usfmBits.push("\\".concat(kr(n)," ").concat(u,` +`)}renderDocument(t){var{docId:r,config:n,output:u}=t,s={},o={};return this.renderDocument1({docId:r,config:n,context:s,workspace:o,output:u}),u}renderDocument1(t){throw new Error("Define renderDocument1() in subclass")}renderEvent(t,r){var n=r.context;if(this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length),"EVENT ").concat(t)),!this.actions[t])throw new Error("Unknown event '".concat(t));var u=!1;for(var s of this.actions[t]){var o=!1;try{o=s.test(r)}catch(c){var a="Exception from test of action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c);throw new Error(a)}if(o){u=!0,this.debugLevel>0&&console.log("".concat(" ".repeat(n.sequences.length)," ").concat(t," action: ").concat(s.description));var i=!1;try{i=s.action(r)}catch(c){throw new Error("Exception from action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c))}if(!i)break}}if(["unresolvedBlockGraft","unresolvedInlineGraft"].includes(t)&&this.actions[t].length===0)throw new Error("No action for ".concat(t," graft event in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: add an action or fix your data!"));!u&&this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length)," No matching action"))}};var nc=hG,mG=nc;let EG=class extends mG{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata,mainSequenceId:this.srcJson.main_sequence_id,nSequences:Object.keys(this.srcJson.sequences).length},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,this.srcJson.main_sequence_id),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.srcJson.sequences[r];if(!u)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(u,r)),this.renderEvent("startSequence",t);for(var[s,o]of u.blocks.entries())n.sequences[0].block={type:o.type,subType:o.subtype,blockN:s,wrappers:[]},o.type==="graft"?o.target&&!this.srcJson.sequences[o.target]?(n.sequences[0].block.target=o.target,this.renderEvent("unresolvedBlockGraft",t)):(n.sequences[0].block.target=o.target,n.sequences[0].block.isNew=o.new||!1,this.renderEvent("blockGraft",t)):(this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete n.sequences[0].block;this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.target&&(s.target=t.target),t.type==="graft"&&(s.isNew=t.new||!1),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft"){if(t.target&&t.target&&!this.srcJson.sequences[t.target]){this.renderEvent("unresolvedInlineGraft",r);return}this.renderEvent("inlineGraft",r),n(s)}else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var ps=EG,yG=vG(ps);function vG(e){return e&&e.__esModule?e:{default:e}}var{verseWordsActions:gG}=i7,AG=function(t){var{perf:r}=t,n=new yG.default({srcJson:r,actions:gG}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},FG={name:"verseWords",type:"Transform",description:"PERF=>JSON: Counts words occurrences",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"verseWords",type:"json"}],code:AG},CG={verseWords:FG},bG=e=>{var t={};for(var r of e)for(var n of Object.keys(r))t[n]?t[n].push(...r[n]):t[n]=r[n];return t},Xp=bG,SG={startDocument:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf={},u.perf.schema=r.document.schema,u.perf.metadata=r.document.metadata,u.perf.sequences={}}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf.sequences[r.sequences[0].id]={type:r.sequences[0].type,blocks:[]},n.outputSequence=u.perf.sequences[r.sequences[0].id],r.sequences[0].type==="main"&&(u.perf.main_sequence_id=r.sequences[0].id)}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;r.sequences.length>1&&(n.outputSequence=u.perf.sequences[r.sequences[1].id])}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type,subtype:t.subType};t.target&&(r.target=t.target,e.context.renderer.renderSequenceId(e,r.target)),t.isNew&&(r.new=t.isNew),e.workspace.outputSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].block,o={type:s.type,subtype:s.subType,content:[]};n.outputSequence.blocks.push(o),n.currentContent=o.content,n.outputBlock=n.outputSequence.blocks[n.outputSequence.blocks.length-1],n.outputContentStack=[n.outputBlock.content]}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.currentContent=s.metaContent;var o=n.outputContentStack[1][n.outputContentStack[1].length-1];o.meta_content=[],n.outputContentStack.unshift(o.meta_content),r.renderer.renderContent(n.currentContent,e),n.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType};if(t.target){r.target=t.target;var n=e.workspace.outputContentStack[0];e.context.renderer.renderSequenceId(e,t.target),e.workspace.outputContentStack[0]=n}t.isNew&&(r.new=t.isNew),e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType,content:[]};"atts"in s&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o),n.outputContentStack.unshift(o.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};n.outputContentStack[0].push(o)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.outputContentStack[0].push(s.text)}}]},uc={identityActions:SG},wG=f7(ps),_G=f7(Xp);function f7(e){return e&&e.__esModule?e:{default:e}}var{identityActions:BG}=uc,{stripMarkupActions:TG}=c7,$G=function(t){var{perf:r,verseWords:n}=t,u=new wG.default({srcJson:r,actions:(0,_G.default)([TG,BG])}),s={};return u.renderDocument({docId:"",config:{verseWords:n},output:s}),{perf:s.perf,strippedAlignment:s.stripped,unalignedWords:s.unalignedWords}},PG={name:"stripAlignment",type:"Transform",description:"PERF=>PERF: Strips alignment markup",inputs:[{name:"perf",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],code:$G},kG={stripAlignment:PG},OG=D7(ps),IG=D7(Xp);function D7(e){return e&&e.__esModule?e:{default:e}}var{identityActions:NG}=uc,{mergeAlignmentActions:qG}=p7,xG=function(t){var{perf:r,verseWords:n,strippedAlignment:u}=t,s=new OG.default({srcJson:r,actions:(0,IG.default)([qG,NG])}),o={};return s.renderDocument({docId:"",config:{totalOccurrences:n,strippedAlignment:u},output:o}),{perf:o.perf,unalignedWords:o.unalignedWords}},RG={name:"mergeAlignment",type:"Transform",description:"PERF=>PERF adds report to verses",inputs:[{name:"perf",type:"json",source:""},{name:"strippedAlignment",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],code:xG},jG={mergeAlignment:RG},{verseWords:MG}=CG,{stripAlignment:LG}=kG,{mergeAlignment:UG}=jG,GG={verseWords:MG,stripAlignment:LG,mergeAlignment:UG},VG=dG,HG=GG,WG={transforms:HG,renderActions:VG},JG={},h7=function(t){var{usfm:r,selectors:n,proskomma:u}=t;u.importDocuments(n,"usfm",[r]);var s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0],o=s.id,a=s.docSetId;u.gqlQuerySync('mutation { deleteDocument(docSetId: "'.concat(a,'", documentId: "').concat(o,'") }'));var i=JSON.parse(s.perf);return{perf:i}},zG={name:"usfmToPerf",type:"Transform",description:"USFM=>PERF: Conversion via Proskomma",inputs:[{name:"usfm",type:"text",source:""},{name:"selectors",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:h7},KG={usfmToPerf:zG,usfmToPerfCode:h7},{usfmToPerf:XG,usfmToPerfCode:YG}=KG,ZG={usfmToPerf:XG,usfmToPerfCode:YG},QG=JG,eV=ZG,tV={transforms:eV,renderActions:QG};function Rv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function rV(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.sofria={},u.sofria.schema=r.document.schema,u.sofria.metadata=r.document.metadata,u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.chapter=null,n.verses=null,n.cachedChapter=null,n.cachedVerses=null}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{workspace:t}=e;t.currentSequence.type==="main"&&(t.chapter=null,t.verses=null),t.currentSequence=null}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.currentContent=n.metaContent;var u=r.outputContentStack[1][r.outputContentStack[1].length-1];u.meta_content=[],r.outputContentStack.unshift(u.meta_content),t.renderer.renderContent(r.currentContent,e),r.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType,sequence:{}},n=e.workspace.currentSequence,u=[...e.workspace.outputContentStack];e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.outputContentStack=u,e.workspace.currentSequence=n,e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?(r.chapter=n.atts.number,r.cachedChapter=r.chapter):n.subType==="verses"&&(r.verses=n.atts.number,r.cachedVerses=r.verses);var u={type:n.type,subtype:n.subType,content:[]};if("atts"in n&&(u.atts=rV({},n.atts)),r.outputContentStack.length===0)throw new Error("outputContentStack is empty before pushing to its first element, near ".concat(t.document.metadata.document.bookCode," ").concat(r.cachedChapter,":").concat(r.cachedVerses));r.outputContentStack[0].push(u),r.outputContentStack.unshift(u.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?r.chapter=null:n.subType==="verses"&&(r.verses=null),r.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};r.outputContentStack[0].push(u)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.outputContentStack[0].push(n.text)}}]},aV={identityActions:oV},{identityActions:iV}=aV,cV={identityActions:iV},lV=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:identityAction}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},pV={name:"identity",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:lV},dV={identity:pV},{identity:fV}=dV,DV={identity:fV},hV=cV,mV=DV,EV={transforms:mV,renderActions:hV},yV={startDocument:[{description:"Set up word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.words={}}}],text:[{description:"Split strings and add words to word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;for(var s of r.sequences[0].element.text.split(/[\s:;,.]+/).filter(o=>o.length>0))s=s.toLowerCase(),s in n.words?n.words[s]+=1:n.words[s]=1}}],endDocument:[{description:"Sort words",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.words=[...Object.entries(n.words)].sort((s,o)=>o[1]-s[1])}}]},m7={wordCountActions:yV},jv=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),vV={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.blockRecords=[],r.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(jv(t))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(jv(t))}}],mark:[{description:"Add chapter number to block record",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.blockRecords[n.blockRecords.length-1].perfChapter=r.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;for(var[n,u]of Object.entries(t.blockRecords))if(u.perfChapter){for(var s=n,o=!1;s>0&&!o;)t.blockRecords[s-1].type==="paragraph"||t.blockRecords[s-1].subType==="title"?o=!0:s--;r.report[s.toString()]=u.perfChapter}}}]},E7={calculateUsfmChapterPositionsActions:vV},wr=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,gV=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r==null&&(r={});var n="\\".concat(t,"-s |");for(var[u,s]of Object.entries(r))u==="x-morph"&&typeof s!="string"?n=n+wr(u)+'="'+s.join(",")+'" ':n=n+wr(u)+'="'+s+'" ';return n+"\\*"},AV=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;r==null&&(r={});var u="|";for(var[s,o]of Object.entries(r))u=u+wr(s)+'="'+o+'" ';return u=u+"\\",n&&(u=u+"+"),u+t+"*"},FV={startDocument:[{description:"Set up environment",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits=[""],r.nestedWrapper=0;for(var[n,u]of Object.entries(t.document.metadata.document).filter(s=>!["tags","properties","bookCode","cl"].includes(s[0])))r.usfmBits.push("\\".concat(wr(n)," ").concat(u,` `))}}],blockGraft:[{description:"Follow block grafts",test:e=>{var{context:t}=e;return["title","heading","introduction"].includes(t.sequences[0].block.subType)},action:e=>{var t=e.context.sequences[0],r=e.config.report[t.block.blockN.toString()],n=t.block.target;r&&t.type==="main"&&e.workspace.usfmBits.push(` \\c `.concat(r,` -`)),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0];r.usfmBits.push("\\".concat(kr(u.block.subType.split(":")[1])," "))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0],s=n.report[u.block.blockN.toString()];s&&u.type==="main"&&r.usfmBits.push(` +`)),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0];r.usfmBits.push("\\".concat(wr(u.block.subType.split(":")[1])," "))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0],s=n.report[u.block.blockN.toString()];s&&u.type==="main"&&r.usfmBits.push(` \\c `.concat(s,` `)),r.usfmBits.push(` -\\`.concat(kr(u.block.subType.split(":")[1]),` -`))}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e,u=t.sequences[0];r.usfmBits.push("\\".concat(kr(u.block.subType.split(":")[1]),"*"))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{}},{description:"Output nl",test:()=>!0,action:e=>{var{workspace:t}=e;t.usfmBits.push(` -`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u=OG(kr(n.subType.split(":")[1]),n.atts);r.usfmBits.push(u)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push("\\".concat(kr(t.sequences[0].element.subType.split(":")[1]),"-e\\*"))}}],text:[{description:"Output text",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.text;r.usfmBits.push(n)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="verses"&&r.usfmBits.push(` +\\`.concat(wr(u.block.subType.split(":")[1]),` +`))}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e,u=t.sequences[0];r.usfmBits.push("\\".concat(wr(u.block.subType.split(":")[1]),"*"))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{}},{description:"Output nl",test:()=>!0,action:e=>{var{workspace:t}=e;t.usfmBits.push(` +`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u=gV(wr(n.subType.split(":")[1]),n.atts);r.usfmBits.push(u)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push("\\".concat(wr(t.sequences[0].element.subType.split(":")[1]),"-e\\*"))}}],text:[{description:"Output text",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.text;r.usfmBits.push(n)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="verses"&&r.usfmBits.push(` \\v `.concat(n.atts.number,` `))}}],endSequence:[{description:"Output \\cl",test:e=>{var{context:t}=e;return t.document.metadata.document.cl&&t.sequences[0].type==="title"},action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push(` \\cl `.concat(t.document.metadata.document.cl,` -`))}}],startWrapper:[{description:"Output start tag",test:()=>!0,action:e=>{var{workspace:t,context:r}=e,n=r.sequences[0];t.nestedWrapper>0?t.usfmBits.push("\\+".concat(kr(n.element.subType.split(":")[1])," ")):t.usfmBits.push("\\".concat(kr(n.element.subType.split(":")[1])," ")),t.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:e=>{var{context:t}=e;return!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(t.sequences[0].element.subType.split(":")[1])},action:e=>{var{workspace:t,context:r}=e;t.nestedWrapper-=1;var n=r.sequences[0],u=n.element.subType.split(":")[1],s=t.nestedWrapper>0;if(u==="w"){var o=kG(kr(u),n.element.atts,s);t.usfmBits.push(o)}else s?t.usfmBits.push("\\+".concat(kr(n.element.subType.split(":")[1]),"*")):t.usfmBits.push("\\".concat(kr(n.element.subType.split(":")[1]),"*"))}},{description:"Do NOT output end tag",test:()=>!0,action:e=>{var{workspace:t}=e;t.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;r.usfm=t.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` -`)}}]},H6={perfToUsfmActions:IG},{wordCountActions:NG}=G6,{calculateUsfmChapterPositionsActions:qG}=V6,{perfToUsfmActions:xG}=H6,RG={wordCountActions:NG,perfToUsfmActions:xG,calculateUsfmChapterPositionsActions:qG},jG=MG(fs);function MG(e){return e&&e.__esModule?e:{default:e}}var{wordCountActions:LG}=G6,UG=function(t){var{perf:r}=t,n=new jG.default({srcJson:r,actions:LG}),u={};return n.renderDocument({docId:"",config:{},output:u}),{report:u.report}},GG={name:"wordCount",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:UG},VG={wordCount:GG},HG=WG(fs);function WG(e){return e&&e.__esModule?e:{default:e}}var{calculateUsfmChapterPositionsActions:JG}=V6,zG=function(t){var{perf:r}=t,n=new HG.default({srcJson:r,actions:JG}),u={};return n.renderDocument({docId:"",config:{maxLength:60},output:u}),{report:u.report}},KG={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:zG},XG={calculateUsfmChapterPositions:KG},YG=ZG(fs);function ZG(e){return e&&e.__esModule?e:{default:e}}var{perfToUsfmActions:QG}=H6,eV=function(t){var{perf:r,report:n}=t,u=new YG.default({srcJson:r,actions:QG}),s={};return u.renderDocument({docId:"",config:{report:n},output:s}),{usfm:s.usfm}},tV={name:"perfToUsfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:eV},rV={perfToUsfm:tV},{wordCount:nV}=VG,{calculateUsfmChapterPositions:uV}=XG,{perfToUsfm:sV}=rV,oV={wordCount:nV,perfToUsfm:sV,calculateUsfmChapterPositions:uV},aV=RG,iV=oV,cV={transforms:iV,renderActions:aV},lV={startMilestone:[{description:"Ignore startMilestone events",test:()=>!0,action:()=>{}}],endMilestone:[{description:"Ignore endMilestone events",test:()=>!0,action:()=>{}}],startWrapper:[{description:"Ignore startWrapper events",test:()=>!0,action:()=>{}}],endWrapper:[{description:"Ignore endWrapper events",test:()=>!0,action:()=>{}}],blockGraft:[{description:"Ignore blockGraft events, except for title (\\mt)",test:e=>e.context.sequences[0].block.subType!=="title",action:e=>{}}],inlineGraft:[{description:"Ignore inlineGraft events",test:()=>!0,action:()=>{}}],mark:[{description:"Ignore mark events, except for chapter and verses",test:e=>{var{context:t}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)},action:()=>{}}]},W6={justTheBibleActions:lV},{identityActions:pV}=nc,{justTheBibleActions:fV}=W6,dV={identityActions:pV,justTheBibleActions:fV},{identityActions:DV}=nc,hV=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:DV}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},mV={name:"identityTransform",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:hV},EV={identity:mV},vV=J6(fs),yV=J6(Gp);function J6(e){return e&&e.__esModule?e:{default:e}}var{identityActions:gV}=nc,{justTheBibleActions:AV}=W6,FV=function(t){var{perf:r}=t,n=new vV.default({srcJson:r,actions:(0,yV.default)([AV,gV])}),u={};return n.renderDocument({docId:"",config:{},output:u}),{perf:u.perf}},CV={name:"justTheBible",type:"Transform",description:"PERF=>PERF: Strips most markup",documentation:"This transform removes milestones, wrappers and most marks. It has been used in several pipelines. It may also be stripping metaContent.",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:FV},bV={justTheBible:CV};const ir={},z6=e=>{let t=typeof e;return t==="number"||t==="string"||t==="boolean"||t==="undefined"||t==="bigint"||t==="symbol"||e===null},uc=e=>{if(z6(e)||!(e instanceof Object))return"primitive";const t=e.constructor&&e.constructor.name&&e.constructor.name.toLowerCase();if(typeof t=="string"&&t.length&&ir[t])return t;let r;for(const n in ir)if(r=ir[n].type,!r||e instanceof r)return n;return"unknown"},SV=(e,t,r)=>Array.prototype.push.call(e,r),wV=e=>{const t=[];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},_V=e=>{const t=[...e];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},BV=(e,t,r)=>{const n=e.length;for(let u=0;u{Object.assign(ir,{array:{type:Array,mayDeepCopy:!0,addElement:SV,makeEmpty:wV,makeShallow:_V,iterate:BV}})},$V=()=>{Object.assign(ir,{date:{type:Date,makeShallow:e=>new Date(e.getTime())}})},PV=()=>{Object.assign(ir,{regexp:{type:RegExp,makeShallow:e=>new RegExp(e)}})},OV=()=>{Object.assign(ir,{function:{type:Function,makeShallow:e=>e}})},kV=()=>{Object.assign(ir,{error:{type:Error,makeShallow:e=>{const t=new Error(e.message);return t.stack=e.stack,t}}})},IV=e=>{let t=typeof Ys<"u"&&Ys[e]||typeof window<"u"&&window[e]||typeof WorkerGlobalScope<"u"&&WorkerGlobalScope[e];typeof t<"u"&&(ir[e.toLowerCase()]={type:t,makeShallow:r=>t.from(r)})},NV=()=>{["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].forEach(t=>IV(t))},qV=()=>{typeof ArrayBuffer<"u"&&Object.assign(ir,{arraybuffer:{type:ArrayBuffer,makeShallow:e=>e.slice(0)}})},xV=()=>{typeof Map>"u"||Object.assign(ir,{map:{type:Map,mayDeepCopy:!0,addElement:(e,t,r)=>e.set(t,r),makeEmpty:()=>new Map,makeShallow:e=>new Map(e),iterate:(e,t,r)=>{e.forEach((n,u)=>{const s={key:u,value:n,type:uc(n)};r(s)})}}})},RV=()=>{typeof Set>"u"||Object.assign(ir,{set:{type:Set,mayDeepCopy:!0,addElement:(e,t,r)=>e.add(r),makeEmpty:()=>new Set,makeShallow:e=>new Set(e),iterate:(e,t,r)=>{e.forEach(n=>{const u={key:null,value:n,type:uc(n)};r(u)})}}})},jV=()=>{typeof WeakSet>"u"||Object.assign(ir,{weakset:{type:WeakSet,makeShallow:e=>e}})},MV=()=>{typeof WeakMap>"u"||Object.assign(ir,{weakmap:{type:WeakMap,makeShallow:e=>e}})},LV=()=>{typeof Buffer>"u"||Object.assign(ir,{buffer:{type:Buffer,makeShallow:e=>Buffer.from(e)}})},UV=(e,t,r,n=void 0)=>{n?Object.defineProperty(e,t,n):e[t]=r},GV=e=>{const t={};return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},VV=e=>{const t=Object.assign({},e);return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},HV=(e,t,r)=>{const n=t?Object.getOwnPropertyNames(e):Object.keys(e),u=n.length;for(let s=0;s{Object.assign(ir,{object:{type:Object,mayDeepCopy:!0,addElement:UV,makeEmpty:GV,makeShallow:VV,iterate:HV}})},JV=()=>{Object.assign(ir,{unknown:{makeShallow:e=>e},primitive:{makeShallow:e=>e}})};TV();$V();PV();OV();kV();NV();qV();xV();RV();jV();MV();LV();WV();JV();function zV(e){return ir[e]}var KV=[z6,uc,zV];const[XV,YV,L2]=KV,U2={goDeep:!0,includeNonEnumerable:!1,detectCircular:!0,maxDepth:20};function ZV(e){Object.keys(U2).forEach(t=>{e[t]===void 0&&(e[t]=U2[t])})}let QV=class{constructor(){this._seenMap=new WeakMap}setAsCopied(t,r){t instanceof Object&&this._seenMap.set(t,r)}wasCopied(t){return t instanceof Object&&this._seenMap.has(t)}getCopy(t){return this._seenMap.get(t)}};function eH(e,t,r){const{options:n,watcher:u}=r;let s;return t.mayDeepCopy?(s=t.makeEmpty(e),n.detectCircular&&u.setAsCopied(e,s)):s=t.makeShallow(e),s}function tH(e,t){if(e>=t)throw`Error max depth of ${t} levels exceeded, possible circular reference`}const K6=(e,t,r)=>{const{destObject:n,srcType:u,watcher:s,options:o}=t,a=o.detectCircular;tH(++r,o.maxDepth);const i=L2(u);if(!i.mayDeepCopy)return;const c=i.addElement;i.iterate(e,o.includeNonEnumerable,l=>{const p=l.value,f=l.type,d=L2(f);let h,E=!1;a&&s.wasCopied(p)?(h=s.getCopy(p),E=!0):h=eH(p,d,{options:o,watcher:s}),c(n,l.key,h,l.descriptor),d.mayDeepCopy&&!E&&K6(p,{destObject:h,srcType:f,watcher:s,options:o},r)})};function rH(e,t=U2){if(ZV(t),XV(e))return e;const r=YV(e),n=L2(r);if(!t.goDeep||!n.mayDeepCopy)return n.makeShallow(e);const u=t.detectCircular?new QV:null;let s=n.makeEmpty(e);return t.detectCircular&&u.setAsCopied(e,s),K6(e,{destObject:s,srcType:r,watcher:u,options:t},0),s}var X6=rH,nH=uH(X6);function uH(e){return e&&e.__esModule?e:{default:e}}var lp=e=>{var t=[];for(var r of e)typeof r=="string"?t.length>0&&typeof t[t.length-1]=="string"?t[t.length-1]+=r:t.push(r):(r.content&&(r.content=lp(r.content)),r.metaContent&&(r.metaContent=lp(r.content)),t.push(r));return t},sH=e=>{var t=(0,nH.default)(e);for(var r of Object.values(t.sequences))for(var n of r.blocks)n.content&&(n.content=lp(n.content)),n.metaContent&&(n.metaContent=lp(n.metaContent));return t},Y6=function(t){var{perf:r}=t;return{perf:sH(r)}},oH={name:"mergePerfText",type:"Transform",description:"PERF=>PERF: Merge consecutive text strings",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:Y6},aH={mergePerfText:oH,mergePerfTextCode:Y6},{identity:iH}=EV,{justTheBible:cH}=bV,{mergePerfText:lH,mergePerfTextCode:pH}=aH,fH={identity:iH,justTheBible:cH,mergePerfText:lH,mergePerfTextCode:pH},dH=dV,DH=fH,hH={transforms:DH,renderActions:dH},mH=uG,EH=dG,vH=TG,yH=cV,gH=hH,Z6={xToPerf:EH,perfToX:yH,sofriaToSofria:vH,alignment:mH,perfToPerf:gH};const AH=[{id:0,type:"Inputs",inputs:{usfm:"text",selectors:"json"}},{id:2,title:"USFM to PERF",name:"usfmToPerf",type:"Transform",inputs:[{name:"usfm",type:"text",source:"Input usfm"},{name:"selectors",type:"json",source:"Input selectors"}],outputs:[{name:"perf",type:"json"}],description:"USFM=>PERF: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 2 perf"}]}],FH=[{id:0,type:"Inputs",inputs:{perf:"json",strippedAlignment:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"strippedAlignment",type:"json",source:"Input strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:3,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],CH=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:3,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"strippedAlignment",type:"json",source:"Transform 2 strippedAlignment"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],bH=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perfToUsfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],SH=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Simplify Input PERF",name:"justTheBible",transformName:"justTheBible",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"perf",type:"json"}]},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 1 perf"}]}];var wH=sc(AH),_H=sc(FH),BH=sc(CH),TH=sc(bH),$H=sc(SH);function sc(e){return e&&e.__esModule?e:{default:e}}var Q6={usfmToPerfPipeline:wH.default,mergeAlignmentPipeline:_H.default,stripAlignmentPipeline:BH.default,perfToUsfmPipeline:TH.default,justTheBiblePipeline:$H.default};function Ay(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Fy(e){for(var t=1;t!0,action:e=>{var{workspace:t,context:r}=e,n=r.sequences[0];t.nestedWrapper>0?t.usfmBits.push("\\+".concat(wr(n.element.subType.split(":")[1])," ")):t.usfmBits.push("\\".concat(wr(n.element.subType.split(":")[1])," ")),t.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:e=>{var{context:t}=e;return!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(t.sequences[0].element.subType.split(":")[1])},action:e=>{var{workspace:t,context:r}=e;t.nestedWrapper-=1;var n=r.sequences[0],u=n.element.subType.split(":")[1],s=t.nestedWrapper>0;if(u==="w"){var o=AV(wr(u),n.element.atts,s);t.usfmBits.push(o)}else s?t.usfmBits.push("\\+".concat(wr(n.element.subType.split(":")[1]),"*")):t.usfmBits.push("\\".concat(wr(n.element.subType.split(":")[1]),"*"))}},{description:"Do NOT output end tag",test:()=>!0,action:e=>{var{workspace:t}=e;t.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;r.usfm=t.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` +`)}}]},y7={perfToUsfmActions:FV},{wordCountActions:CV}=m7,{calculateUsfmChapterPositionsActions:bV}=E7,{perfToUsfmActions:SV}=y7,wV={wordCountActions:CV,perfToUsfmActions:SV,calculateUsfmChapterPositionsActions:bV},_V=BV(ps);function BV(e){return e&&e.__esModule?e:{default:e}}var{wordCountActions:TV}=m7,$V=function(t){var{perf:r}=t,n=new _V.default({srcJson:r,actions:TV}),u={};return n.renderDocument({docId:"",config:{},output:u}),{report:u.report}},PV={name:"wordCount",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:$V},kV={wordCount:PV},OV=IV(ps);function IV(e){return e&&e.__esModule?e:{default:e}}var{calculateUsfmChapterPositionsActions:NV}=E7,qV=function(t){var{perf:r}=t,n=new OV.default({srcJson:r,actions:NV}),u={};return n.renderDocument({docId:"",config:{maxLength:60},output:u}),{report:u.report}},xV={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:qV},RV={calculateUsfmChapterPositions:xV},jV=MV(ps);function MV(e){return e&&e.__esModule?e:{default:e}}var{perfToUsfmActions:LV}=y7,UV=function(t){var{perf:r,report:n}=t,u=new jV.default({srcJson:r,actions:LV}),s={};return u.renderDocument({docId:"",config:{report:n},output:s}),{usfm:s.usfm}},GV={name:"perfToUsfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:UV},VV={perfToUsfm:GV},{wordCount:HV}=kV,{calculateUsfmChapterPositions:WV}=RV,{perfToUsfm:JV}=VV,zV={wordCount:HV,perfToUsfm:JV,calculateUsfmChapterPositions:WV},KV=wV,XV=zV,YV={transforms:XV,renderActions:KV},ZV={startMilestone:[{description:"Ignore startMilestone events",test:()=>!0,action:()=>{}}],endMilestone:[{description:"Ignore endMilestone events",test:()=>!0,action:()=>{}}],startWrapper:[{description:"Ignore startWrapper events",test:()=>!0,action:()=>{}}],endWrapper:[{description:"Ignore endWrapper events",test:()=>!0,action:()=>{}}],blockGraft:[{description:"Ignore blockGraft events, except for title (\\mt)",test:e=>e.context.sequences[0].block.subType!=="title",action:e=>{}}],inlineGraft:[{description:"Ignore inlineGraft events",test:()=>!0,action:()=>{}}],mark:[{description:"Ignore mark events, except for chapter and verses",test:e=>{var{context:t}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)},action:()=>{}}]},v7={justTheBibleActions:ZV},{identityActions:QV}=uc,{justTheBibleActions:eH}=v7,tH={identityActions:QV,justTheBibleActions:eH},{identityActions:rH}=uc,nH=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:rH}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},uH={name:"identityTransform",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:nH},sH={identity:uH},oH=g7(ps),aH=g7(Xp);function g7(e){return e&&e.__esModule?e:{default:e}}var{identityActions:iH}=uc,{justTheBibleActions:cH}=v7,lH=function(t){var{perf:r}=t,n=new oH.default({srcJson:r,actions:(0,aH.default)([cH,iH])}),u={};return n.renderDocument({docId:"",config:{},output:u}),{perf:u.perf}},pH={name:"justTheBible",type:"Transform",description:"PERF=>PERF: Strips most markup",documentation:"This transform removes milestones, wrappers and most marks. It has been used in several pipelines. It may also be stripping metaContent.",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:lH},dH={justTheBible:pH};const ur={},A7=e=>{let t=typeof e;return t==="number"||t==="string"||t==="boolean"||t==="undefined"||t==="bigint"||t==="symbol"||e===null},sc=e=>{if(A7(e)||!(e instanceof Object))return"primitive";const t=e.constructor&&e.constructor.name&&e.constructor.name.toLowerCase();if(typeof t=="string"&&t.length&&ur[t])return t;let r;for(const n in ur)if(r=ur[n].type,!r||e instanceof r)return n;return"unknown"},fH=(e,t,r)=>Array.prototype.push.call(e,r),DH=e=>{const t=[];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},hH=e=>{const t=[...e];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},mH=(e,t,r)=>{const n=e.length;for(let u=0;u{Object.assign(ur,{array:{type:Array,mayDeepCopy:!0,addElement:fH,makeEmpty:DH,makeShallow:hH,iterate:mH}})},yH=()=>{Object.assign(ur,{date:{type:Date,makeShallow:e=>new Date(e.getTime())}})},vH=()=>{Object.assign(ur,{regexp:{type:RegExp,makeShallow:e=>new RegExp(e)}})},gH=()=>{Object.assign(ur,{function:{type:Function,makeShallow:e=>e}})},AH=()=>{Object.assign(ur,{error:{type:Error,makeShallow:e=>{const t=new Error(e.message);return t.stack=e.stack,t}}})},FH=e=>{let t=typeof Vs<"u"&&Vs[e]||typeof window<"u"&&window[e]||typeof WorkerGlobalScope<"u"&&WorkerGlobalScope[e];typeof t<"u"&&(ur[e.toLowerCase()]={type:t,makeShallow:r=>t.from(r)})},CH=()=>{["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].forEach(t=>FH(t))},bH=()=>{typeof ArrayBuffer<"u"&&Object.assign(ur,{arraybuffer:{type:ArrayBuffer,makeShallow:e=>e.slice(0)}})},SH=()=>{typeof Map>"u"||Object.assign(ur,{map:{type:Map,mayDeepCopy:!0,addElement:(e,t,r)=>e.set(t,r),makeEmpty:()=>new Map,makeShallow:e=>new Map(e),iterate:(e,t,r)=>{e.forEach((n,u)=>{const s={key:u,value:n,type:sc(n)};r(s)})}}})},wH=()=>{typeof Set>"u"||Object.assign(ur,{set:{type:Set,mayDeepCopy:!0,addElement:(e,t,r)=>e.add(r),makeEmpty:()=>new Set,makeShallow:e=>new Set(e),iterate:(e,t,r)=>{e.forEach(n=>{const u={key:null,value:n,type:sc(n)};r(u)})}}})},_H=()=>{typeof WeakSet>"u"||Object.assign(ur,{weakset:{type:WeakSet,makeShallow:e=>e}})},BH=()=>{typeof WeakMap>"u"||Object.assign(ur,{weakmap:{type:WeakMap,makeShallow:e=>e}})},TH=()=>{typeof Buffer>"u"||Object.assign(ur,{buffer:{type:Buffer,makeShallow:e=>Buffer.from(e)}})},$H=(e,t,r,n=void 0)=>{n?Object.defineProperty(e,t,n):e[t]=r},PH=e=>{const t={};return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},kH=e=>{const t=Object.assign({},e);return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},OH=(e,t,r)=>{const n=t?Object.getOwnPropertyNames(e):Object.keys(e),u=n.length;for(let s=0;s{Object.assign(ur,{object:{type:Object,mayDeepCopy:!0,addElement:$H,makeEmpty:PH,makeShallow:kH,iterate:OH}})},NH=()=>{Object.assign(ur,{unknown:{makeShallow:e=>e},primitive:{makeShallow:e=>e}})};EH();yH();vH();gH();AH();CH();bH();SH();wH();_H();BH();TH();IH();NH();function qH(e){return ur[e]}var xH=[A7,sc,qH];const[RH,jH,Y2]=xH,Z2={goDeep:!0,includeNonEnumerable:!1,detectCircular:!0,maxDepth:20};function MH(e){Object.keys(Z2).forEach(t=>{e[t]===void 0&&(e[t]=Z2[t])})}let LH=class{constructor(){this._seenMap=new WeakMap}setAsCopied(t,r){t instanceof Object&&this._seenMap.set(t,r)}wasCopied(t){return t instanceof Object&&this._seenMap.has(t)}getCopy(t){return this._seenMap.get(t)}};function UH(e,t,r){const{options:n,watcher:u}=r;let s;return t.mayDeepCopy?(s=t.makeEmpty(e),n.detectCircular&&u.setAsCopied(e,s)):s=t.makeShallow(e),s}function GH(e,t){if(e>=t)throw`Error max depth of ${t} levels exceeded, possible circular reference`}const F7=(e,t,r)=>{const{destObject:n,srcType:u,watcher:s,options:o}=t,a=o.detectCircular;GH(++r,o.maxDepth);const i=Y2(u);if(!i.mayDeepCopy)return;const c=i.addElement;i.iterate(e,o.includeNonEnumerable,l=>{const p=l.value,d=l.type,f=Y2(d);let h,y=!1;a&&s.wasCopied(p)?(h=s.getCopy(p),y=!0):h=UH(p,f,{options:o,watcher:s}),c(n,l.key,h,l.descriptor),f.mayDeepCopy&&!y&&F7(p,{destObject:h,srcType:d,watcher:s,options:o},r)})};function VH(e,t=Z2){if(MH(t),RH(e))return e;const r=jH(e),n=Y2(r);if(!t.goDeep||!n.mayDeepCopy)return n.makeShallow(e);const u=t.detectCircular?new LH:null;let s=n.makeEmpty(e);return t.detectCircular&&u.setAsCopied(e,s),F7(e,{destObject:s,srcType:r,watcher:u,options:t},0),s}var C7=VH,HH=WH(C7);function WH(e){return e&&e.__esModule?e:{default:e}}var Ep=e=>{var t=[];for(var r of e)typeof r=="string"?t.length>0&&typeof t[t.length-1]=="string"?t[t.length-1]+=r:t.push(r):(r.content&&(r.content=Ep(r.content)),r.metaContent&&(r.metaContent=Ep(r.content)),t.push(r));return t},JH=e=>{var t=(0,HH.default)(e);for(var r of Object.values(t.sequences))for(var n of r.blocks)n.content&&(n.content=Ep(n.content)),n.metaContent&&(n.metaContent=Ep(n.metaContent));return t},b7=function(t){var{perf:r}=t;return{perf:JH(r)}},zH={name:"mergePerfText",type:"Transform",description:"PERF=>PERF: Merge consecutive text strings",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:b7},KH={mergePerfText:zH,mergePerfTextCode:b7},{identity:XH}=sH,{justTheBible:YH}=dH,{mergePerfText:ZH,mergePerfTextCode:QH}=KH,eW={identity:XH,justTheBible:YH,mergePerfText:ZH,mergePerfTextCode:QH},tW=tH,rW=eW,nW={transforms:rW,renderActions:tW},uW=WG,sW=tV,oW=EV,aW=YV,iW=nW,S7={xToPerf:sW,perfToX:aW,sofriaToSofria:oW,alignment:uW,perfToPerf:iW};const cW=[{id:0,type:"Inputs",inputs:{usfm:"text",selectors:"json"}},{id:2,title:"USFM to PERF",name:"usfmToPerf",type:"Transform",inputs:[{name:"usfm",type:"text",source:"Input usfm"},{name:"selectors",type:"json",source:"Input selectors"}],outputs:[{name:"perf",type:"json"}],description:"USFM=>PERF: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 2 perf"}]}],lW=[{id:0,type:"Inputs",inputs:{perf:"json",strippedAlignment:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"strippedAlignment",type:"json",source:"Input strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:3,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],pW=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:3,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"strippedAlignment",type:"json",source:"Transform 2 strippedAlignment"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],dW=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perfToUsfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],fW=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Simplify Input PERF",name:"justTheBible",transformName:"justTheBible",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"perf",type:"json"}]},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 1 perf"}]}];var DW=oc(cW),hW=oc(lW),mW=oc(pW),EW=oc(dW),yW=oc(fW);function oc(e){return e&&e.__esModule?e:{default:e}}var w7={usfmToPerfPipeline:DW.default,mergeAlignmentPipeline:hW.default,stripAlignmentPipeline:mW.default,perfToUsfmPipeline:EW.default,justTheBiblePipeline:yW.default};function Mv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Lv(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"perf",n=t.filter(E=>E.type==="Transform");if(n.length===0)throw new Error("No Transform steps found in report steps");var u=Object.keys(n).map(E=>n[E].name);if(r==="sofria"){var s=null;for(var[o,a]of Object.entries(this.namespaces))if(o==="sofriaToSofria"){a.transforms?s=Object.entries(a.transforms):s=Object.entries(a);for(var[i,c]of s)u.includes(i)&&(this.transforms[i]=c)}}else{var l=null;for(var[p,f]of Object.entries(this.namespaces))if(p!=="sofriaToSofria"){f.transforms?l=Object.entries(f.transforms):l=Object.entries(f);for(var[d,h]of l)u.includes(d)&&(this.transforms[d]=h)}}}evaluateSteps(t){var{specSteps:r,inputValues:n}=t;this.verbose&&console.log("** Evaluate **");var u=r.filter(j=>j.type==="Inputs")[0];if(!u)throw new Error("No Inputs step found in report steps");var s=r.filter(j=>j.type==="Outputs")[0];if(!s)throw new Error("No Outputs step found in report steps");var o=r.filter(j=>j.type==="Transform");if(o.length===0)throw new Error("No Transform steps found in report steps");var a={},i={};for(var c of Object.values(o)){a[c.id]={};for(var l of c.inputs)a[c.id][l.name]=null;i[c.id]={};for(var p of c.outputs)i[c.id][p]=null}for(var[f,d]of Object.entries(n))for(var h of o)for(var E of h.inputs)E.source==="Input ".concat(f)&&(this.verbose&&console.log("Copying Input ".concat(f," to Transform ").concat(h.id," ").concat(E.name," input")),a[h.id][E.name]=d);for(var A=!0;A;){A=!1;for(var m of o)if(Object.values(a[m.id]).filter(j=>!j).length===0&&Object.values(i[m.id]).filter(j=>!j).length>0){this.verbose&&console.log("Evaluating Transform ".concat(m.id));try{i[m.id]=this.transforms[m.name].code(Fy(Fy({},a[m.id]),{},{proskomma:this.getProskomma()}))}catch(j){var y="Error evaluating Transform ".concat(m.id," (name=").concat(m.name,", type=").concat(typeof m.code,"): ").concat(j);throw new Error(y)}for(var F of o)for(var B of F.inputs)for(var P of Object.keys(i[m.id]))B.source==="Transform ".concat(m.id," ").concat(P)&&(this.verbose&&console.log("Copying Transform ".concat(m.id," ").concat(P," output to Transform ").concat(F.id," ").concat(B.name," input")),a[F.id][B.name]=i[m.id][P]);A=!0}}var $={};for(var I of s.outputs){var U=I.source.split(" ")[1];this.verbose&&console.log("Copying Transform ".concat(U," ").concat(I.name," to Output ").concat(I.name)),$[I.name]=i[U][I.name]}return this.verbose&&console.log("****"),$}};var RH=xH;function by(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Sy(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let GH=class extends UH{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync('{document(id: "'.concat(r,'") {docSetId mainSequence { id } nSequences sequences {id} headers { key value } } }')),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;i.data.document.sequences.map(m=>m.id);var f={};for(var d of i.data.document.headers)f[d.key]=d.value;var h=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),E={};for(var A of h.data.docSet.selectors)E[A.key]=A.value;u.document={id:r,schema:{structure:"flat",structure_version:"0.2.1",constraints:[{name:"perf",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:E,properties:{},tags:[]},document:Sy(Sy({},f),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,l),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:Is(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.pk.gqlQuerySync('{document(id: "'.concat(n.document.id,'") {sequence(id:"').concat(r,'") {id type nBlocks } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(s,r)),this.renderEvent("startSequence",t);for(var o=0,a=0;a1&&arguments[1]!==void 0?arguments[1]:"perf",n=t.filter(y=>y.type==="Transform");if(n.length===0)throw new Error("No Transform steps found in report steps");var u=Object.keys(n).map(y=>n[y].name);if(r==="sofria"){var s=null;for(var[o,a]of Object.entries(this.namespaces))if(o==="sofriaToSofria"){a.transforms?s=Object.entries(a.transforms):s=Object.entries(a);for(var[i,c]of s)u.includes(i)&&(this.transforms[i]=c)}}else{var l=null;for(var[p,d]of Object.entries(this.namespaces))if(p!=="sofriaToSofria"){d.transforms?l=Object.entries(d.transforms):l=Object.entries(d);for(var[f,h]of l)u.includes(f)&&(this.transforms[f]=h)}}}evaluateSteps(t){var{specSteps:r,inputValues:n}=t;this.verbose&&console.log("** Evaluate **");var u=r.filter(q=>q.type==="Inputs")[0];if(!u)throw new Error("No Inputs step found in report steps");var s=r.filter(q=>q.type==="Outputs")[0];if(!s)throw new Error("No Outputs step found in report steps");var o=r.filter(q=>q.type==="Transform");if(o.length===0)throw new Error("No Transform steps found in report steps");var a={},i={};for(var c of Object.values(o)){a[c.id]={};for(var l of c.inputs)a[c.id][l.name]=null;i[c.id]={};for(var p of c.outputs)i[c.id][p]=null}for(var[d,f]of Object.entries(n))for(var h of o)for(var y of h.inputs)y.source==="Input ".concat(d)&&(this.verbose&&console.log("Copying Input ".concat(d," to Transform ").concat(h.id," ").concat(y.name," input")),a[h.id][y.name]=f);for(var A=!0;A;){A=!1;for(var m of o)if(Object.values(a[m.id]).filter(q=>!q).length===0&&Object.values(i[m.id]).filter(q=>!q).length>0){this.verbose&&console.log("Evaluating Transform ".concat(m.id));try{i[m.id]=this.transforms[m.name].code(Lv(Lv({},a[m.id]),{},{proskomma:this.getProskomma()}))}catch(q){var v="Error evaluating Transform ".concat(m.id," (name=").concat(m.name,", type=").concat(typeof m.code,"): ").concat(q);throw new Error(v)}for(var C of o)for(var B of C.inputs)for(var T of Object.keys(i[m.id]))B.source==="Transform ".concat(m.id," ").concat(T)&&(this.verbose&&console.log("Copying Transform ".concat(m.id," ").concat(T," output to Transform ").concat(C.id," ").concat(B.name," input")),a[C.id][B.name]=i[m.id][T]);A=!0}}var N={};for(var R of s.outputs){var J=R.source.split(" ")[1];this.verbose&&console.log("Copying Transform ".concat(J," ").concat(R.name," to Output ").concat(R.name)),N[R.name]=i[J][R.name]}return this.verbose&&console.log("****"),N}};var wW=SW;function Gv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Vv(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let PW=class extends $W{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync('{document(id: "'.concat(r,'") {docSetId mainSequence { id } nSequences sequences {id} headers { key value } } }')),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;i.data.document.sequences.map(m=>m.id);var d={};for(var f of i.data.document.headers)d[f.key]=f.value;var h=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),y={};for(var A of h.data.docSet.selectors)y[A.key]=A.value;u.document={id:r,schema:{structure:"flat",structure_version:"0.2.1",constraints:[{name:"perf",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:y,properties:{},tags:[]},document:Vv(Vv({},d),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,l),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:_s(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.pk.gqlQuerySync('{document(id: "'.concat(n.document.id,'") {sequence(id:"').concat(r,'") {id type nBlocks } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(s,r)),this.renderEvent("startSequence",t);for(var o=0,a=0;a{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.sequence&&(s.sequence=this.sequenceContext(t.sequence)),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft")this.cachedSequences.unshift(t.sequence),this.renderEvent("inlineGraft",r),this.cachedSequences.shift(),n(s);else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var JH=WH;function wy(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function _y(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let ZH=class extends YH{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null,this.cachedSequenceIds=[],this.sequences=null,this.currentCV={chapter:null,verses:null}}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync(`{ + }`)),c=i.data.document.sequence.blocks[0];for(var l of c.bg)n.sequences[0].block={type:"graft",subType:_s(l.subType),blockN:o},n.sequences[0].block.target=l.payload,n.sequences[0].block.isNew=!1,this.renderEvent("blockGraft",t),o++;n.sequences[0].block={type:"paragraph",subType:"usfm:".concat(c.bs.payload.split("/")[1]),blockN:o,wrappers:[]},this.renderEvent("startParagraph",t),this._tokens=[],this.renderContent(c.items,t),this._tokens=[],this.renderEvent("endParagraph",t),delete n.sequences[0].block,o++}this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderItem(n,r);this.maybeRenderText(r)}renderItem(t,r){if(t.type==="scope"&&t.payload.startsWith("attribute")){var n=t.payload.split("/");t.subType==="start"?(this._container||(this._container={direction:"start",subType:"usfm:w",type:"wrapper",atts:{}}),n[3]in this._container.atts?this._container.atts[n[3]].push(n[5]):this._container.atts[n[3]]=[n[5]]):this._container||(this._container={direction:"end",subType:"usfm:".concat(_s(n[2]))},n[1]==="milestone"?this._container.type="end_milestone":(this._container.type="wrapper",this._container.atts={}))}else if(this._container&&(this.maybeRenderText(r),this.renderContainer(r)),t.type==="token")this._tokens.push(t.payload.replace(/\s+/g," "));else if(t.type==="graft"){this.maybeRenderText(r);var u={type:"graft",subType:_s(t.subType),target:t.payload,isNew:!1};r.context.sequences[0].element=u,this.renderEvent("inlineGraft",r),delete r.context.sequences[0].element}else{this.maybeRenderText(r);var s=t.payload.split("/");if(["chapter","verses","pubChapter","pubVerse","altChapter","altVerse"].includes(s[0])){if(t.subType==="start"){var o={type:"mark",subType:_s(s[0]),atts:{number:s[1]}};r.context.sequences[0].element=o,this.renderEvent("mark",r),delete r.context.sequences[0].element}}else if(s[0]==="span"){var a={type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}};r.context.sequences[0].element=a,t.subType==="start"?(r.context.sequences[0].block.wrappers.unshift(a.subType),this.renderEvent("startWrapper",r)):(this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift()),delete r.context.sequences[0].element}else if(s[0]==="spanWithAtts")t.subType==="start"&&(this._container={direction:"start",type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}});else if(s[0]==="milestone"&&t.subType==="start")if(s[1]==="ts"){var i={type:"mark",subType:"usfm:".concat(_s(s[1])),atts:{}};r.context.sequences[0].element=i,this.renderEvent("mark",r),delete r.context.sequences[0].element}else this._container={type:"start_milestone",subType:"usfm:".concat(_s(s[1])),atts:{}}}}maybeRenderText(t){if(this._tokens.length!==0){var r={type:"text",text:this._tokens.join("")};t.context.sequences[0].element=r,this._tokens=[],this.renderEvent("text",t),delete t.context.sequences[0].element}}renderContainer(t){if(this._container.type==="wrapper"){var r=this._container.direction;delete this._container.direction,r==="start"?(t.context.sequences[0].element=this._container,t.context.sequences[0].block.wrappers.unshift(this._container.subType),this.renderEvent("startWrapper",t),delete t.context.sequences[0].element):(t.context.sequences[0].element=this._container,this.renderEvent("endWrapper",t),t.context.sequences[0].block.wrappers.shift(),delete t.context.sequences[0].element)}else this._container.type==="start_milestone"?(t.context.sequences[0].element=this._container,this.renderEvent("startMilestone",t),delete t.context.sequences[0].element):this._container.type==="end_milestone"&&(t.context.sequences[0].element=this._container,this.renderEvent("endMilestone",t),delete t.context.sequences[0].element);this._container=null}};var kW=PW,OW=nc;let IW=class extends OW{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson,this.cachedSequences=[]}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequence(a,this.srcJson.sequence),this.renderEvent("endDocument",a)}sequenceContext(t){return{type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequence(t,r){var n;if(r)n=r;else{if(this.cachedSequences.length===0)throw new Error("No sequence provided and no sequences cached");n=this.cachedSequences[0]}var u=t.context;u.sequences.unshift(n),this.renderEvent("startSequence",t);for(var[s,o]of n.blocks.entries())u.sequences[0].block={type:o.type,blockN:s,wrappers:[]},o.type==="graft"?(u.sequences[0].block.sequence=this.sequenceContext(o.sequence),this.cachedSequences.unshift(o.sequence),this.renderEvent("blockGraft",t),this.cachedSequences.shift()):(this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete u.sequences[0].block;this.renderEvent("endSequence",t),this.cachedSequence=null,u.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.sequence&&(s.sequence=this.sequenceContext(t.sequence)),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft")this.cachedSequences.unshift(t.sequence),this.renderEvent("inlineGraft",r),this.cachedSequences.shift(),n(s);else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var NW=IW;function Hv(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Wv(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let MW=class extends jW{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null,this.cachedSequenceIds=[],this.sequences=null,this.currentCV={chapter:null,verses:null}}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync(`{ document(id: "`.concat(r,`") { docSetId mainSequence { id } @@ -189,7 +189,7 @@ Received directive: value } } - }`)),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;this.sequences={};for(var f of i.data.document.sequences)this.sequences[f.id]=f;var d={};for(var h of i.data.document.headers)d[h.key]=h.value;var E=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),A={};for(var m of E.data.docSet.selectors)A[m.key]=m.value;u.document={id:r,schema:{structure:"nested",structure_version:"0.2.1",constraints:[{name:"sofria",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:A,properties:{},tags:[]},document:_y(_y({},d),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},n.chapters&&(u.document.metadata.document.properties.chapters=n.chapters[0]),u.sequences=[],this.renderEvent("startDocument",a),this.cachedSequenceIds.unshift(l),this.renderSequence(a,l),this.cachedSequenceIds.shift(),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:Gu(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequence(t){var r=t.context,n=this.cachedSequenceIds[0],u=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {sequence(id:"').concat(n,'") {id type nBlocks blocks { os {payload} is {payload} } } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(n,"' not found in renderSequenceId()"));r.sequences.unshift(this.sequenceContext(s,n)),this.renderEvent("startSequence",t);for(var o=0,a=0;ay.payload),...s.blocks[a].is.map(y=>y.payload)].filter(y=>["chapter"].includes(y.split("/")[0])).map(y=>y.split("/")[1]);if(i.length===0||!t.config.chapters.includes(i[0]))continue}var c=this.pk.gqlQuerySync(`{ + }`)),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;this.sequences={};for(var d of i.data.document.sequences)this.sequences[d.id]=d;var f={};for(var h of i.data.document.headers)f[h.key]=h.value;var y=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),A={};for(var m of y.data.docSet.selectors)A[m.key]=m.value;u.document={id:r,schema:{structure:"nested",structure_version:"0.2.1",constraints:[{name:"sofria",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:A,properties:{},tags:[]},document:Wv(Wv({},f),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},n.chapters&&(u.document.metadata.document.properties.chapters=n.chapters[0]),u.sequences=[],this.renderEvent("startDocument",a),this.cachedSequenceIds.unshift(l),this.renderSequence(a,l),this.cachedSequenceIds.shift(),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:Uu(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequence(t){var r=t.context,n=this.cachedSequenceIds[0],u=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {sequence(id:"').concat(n,'") {id type nBlocks blocks { os {payload} is {payload} } } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(n,"' not found in renderSequenceId()"));r.sequences.unshift(this.sequenceContext(s,n)),this.renderEvent("startSequence",t);for(var o=0,a=0;av.payload),...s.blocks[a].is.map(v=>v.payload)].filter(v=>["chapter"].includes(v.split("/")[0])).map(v=>v.split("/")[1]);if(i.length===0||!t.config.chapters.includes(i[0]))continue}var c=this.pk.gqlQuerySync(`{ document(id: "`.concat(r.document.id,`") { sequence(id:"`).concat(n,`") { blocks(positions:`).concat(a,`) { @@ -199,44 +199,44 @@ Received directive: } } } - }`)),l=c.data.document.sequence.blocks[0];for(var p of l.bg)r.sequences[0].block={type:"graft",subType:Gu(p.subType),blockN:o,sequence:this.sequences[p.payload]},this.cachedSequenceIds.unshift(p.payload),this.renderEvent("blockGraft",t),this.cachedSequenceIds.shift(),o++;var f=l.bs.payload.split("/"),d=f[1]?"usfm:".concat(f[1]):f[0];if(r.sequences[0].block={type:"paragraph",subType:d,blockN:o,wrappers:[]},this.renderEvent("startParagraph",t),this._tokens=[],s.type==="main"&&this.currentCV.chapter){var h={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=h,t.context.sequences[0].block.wrappers.unshift(h.subType),this.renderEvent("startWrapper",t)}if(s.type==="main"&&this.currentCV.verses){var E={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=E,t.context.sequences[0].block.wrappers.unshift(E.subType),this.renderEvent("startWrapper",t)}if(this.renderContent(l.items,t),this._tokens=[],s.type==="main"&&this.currentCV.verses){var A={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=A,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}if(s.type==="main"&&this.currentCV.chapter){var m={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=m,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}this.renderEvent("endParagraph",t),delete r.sequences[0].block,o++}this.renderEvent("endSequence",t),r.sequences.shift()}renderContent(t,r){for(var n of t)this.renderItem(n,r);this.maybeRenderText(r)}renderItem(t,r){if(t.type==="scope"&&t.payload.startsWith("attribute")){var n=t.payload.split("/");t.subType==="start"?(this._container||(this._container={direction:"start",subType:"usfm:w",type:"wrapper",atts:{}}),n[3]in this._container.atts?this._container.atts[n[3]].push(n[5]):this._container.atts[n[3]]=[n[5]]):this._container||(this._container={direction:"end",subType:"usfm:".concat(Gu(n[2]))},n[1]==="milestone"?this._container.type="end_milestone":(this._container.type="wrapper",this._container.atts={}))}else if(this._container&&(this.maybeRenderText(r),this.renderContainer(r)),t.type==="token")this._tokens.push(t.payload.replace(/\s+/g," "));else if(t.type==="graft"){this.maybeRenderText(r);var u={type:"graft",subType:Gu(t.subType),sequence:this.sequences[t.payload]};r.context.sequences[0].element=u,this.cachedSequenceIds.unshift(t.payload),this.renderEvent("inlineGraft",r),this.cachedSequenceIds.shift(),delete r.context.sequences[0].element}else{this.maybeRenderText(r);var s=t.payload.split("/");if(["chapter","verses"].includes(s[0])){var o={type:"wrapper",subType:Gu(s[0]),atts:{number:s[1]}};if(r.context.sequences[0].element=o,t.subType==="start"){this.currentCV[s[0]]=s[1],r.context.sequences[0].block.wrappers.unshift(o.subType),this.renderEvent("startWrapper",r);var a={type:"mark",subType:"".concat(s[0],"_label"),atts:{number:s[1]}};r.context.sequences[0].element=a,this.renderEvent("mark",r),r.context.sequences[0].element=o}else this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift(),delete r.context.sequences[0].element,this.currentCV[s[0]]=null}else if(["pubChapter","pubVerse","altChapter","altVerse"].includes(s[0])){if(t.subType==="start"){var i={type:"mark",subType:Gu(s[0]),atts:{number:s[1]}};r.context.sequences[0].element=i,this.renderEvent("mark",r),delete r.context.sequences[0].element}}else if(s[0]==="span"){var c={type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}};r.context.sequences[0].element=c,t.subType==="start"?(r.context.sequences[0].block.wrappers.unshift(c.subType),this.renderEvent("startWrapper",r)):(this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift()),delete r.context.sequences[0].element}else if(s[0]==="spanWithAtts")t.subType==="start"&&(this._container={direction:"start",type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}});else if(s[0]==="milestone"&&t.subType==="start")if(s[1]==="ts"){var l={type:"mark",subType:"usfm:".concat(Gu(s[1])),atts:{}};r.context.sequences[0].element=l,this.renderEvent("mark",r),delete r.context.sequences[0].element}else this._container={type:"start_milestone",subType:"usfm:".concat(Gu(s[1])),atts:{}}}}maybeRenderText(t){if(this._tokens.length!==0){var r={type:"text",text:this._tokens.join("")};t.context.sequences[0].element=r,this._tokens=[],this.renderEvent("text",t),delete t.context.sequences[0].element}}renderContainer(t){if(this._container.type==="wrapper"){var r=this._container.direction;delete this._container.direction,r==="start"?(t.context.sequences[0].element=this._container,t.context.sequences[0].block.wrappers.unshift(this._container.subType),this.renderEvent("startWrapper",t),delete t.context.sequences[0].element):(t.context.sequences[0].element=this._container,this.renderEvent("endWrapper",t),t.context.sequences[0].block.wrappers.shift(),delete t.context.sequences[0].element)}else this._container.type==="start_milestone"?(t.context.sequences[0].element=this._container,this.renderEvent("startMilestone",t),delete t.context.sequences[0].element):this._container.type==="end_milestone"&&(t.context.sequences[0].element=this._container,this.renderEvent("endMilestone",t),delete t.context.sequences[0].element);this._container=null}};var QH=ZH,eW=nU,tW=cU,rW=RH,nW=rc,uW=fs,sW=VH,oW=JH,aW=QH,iW=Gp,cW=Q6,lW=Z6,Fu={Validator:eW,usfmHelps:tW,ProskommaRender:nW,PerfRenderFromJson:uW,SofriaRenderFromJson:oW,SofriaRenderFromProskomma:aW,PerfRenderFromProskomma:sW,mergeActions:iW,PipelineHandler:rW,pipelines:cW,render:lW};const ds=[["chapter","chapter",ne("([\\r\\n]*\\\\c[ \\t]+(\\d+)[ \\t\\r\\n]*)")],["pubchapter","pubchapter",ne("([\\r\\n]*\\\\cp[ \\t]+([^\\r\\n]+)[ \\t\\r\\n]*)")],["verses","verses",ne("(\\\\v[ \\t]+([\\d\\-]+)[ \\t\\r\\n]*)")],["attribute","attribute",ne('([ \\t]*\\|?[ \\t]*([A-Za-z0-9\\-]+)="([^"]*)"[ \\t]?)')],["attribute","defaultAttribute",ne("([ \\t]*\\|[ \\t]*([^\\|\\\\]*))")],["milestone","emptyMilestone",ne("(\\\\([a-z1-9]+)\\\\[*])")],["milestone","startMilestoneTag",ne("(\\\\([a-z1-9]+)-([se]))")],["milestone","endMilestoneMarker",ne("(\\\\([*]))")],["tag","endTag",ne("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[*])")],["tag","startTag",ne("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[ \\t]?)")],["bad","bareSlash",ne("(\\\\)")],["printable","eol",ne("([ \\t]*[\\r\\n]+[ \\t]*)")],["break","noBreakSpace",ne("~")],["break","softLineBreak",ne("//")],["printable","wordLike",ne("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")],["printable","lineSpace",ne("([\\p{Separator} ]{1,127})")],["printable","punctuation",ne("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",ne("(.)")]],e7=ne.union(ds.map(e=>e[2])),s1=(e,t)=>({subclass:e,printValue:t[0]}),pW=(e,t)=>({subclass:e,numberString:t[2],number:parseInt(t[2]),printValue:`\\c ${t[2]} -`}),fW=(e,t)=>{const r={subclass:e,numberString:t[2],printValue:`\\v ${t[2]} -`};if(r.numberString.includes("-")){const[n,u]=r.numberString.split("-").map(s=>parseInt(s));r.numbers=Array.from(Array(u-n+1).keys()).map(s=>s+n)}else r.numbers=[parseInt(r.numberString)];return r},dW=(e,t)=>{let r;return e==="defaultAttribute"?r={subclass:e,key:"default",valueString:t[2].trim().replace(/\//g,"÷")}:r={subclass:e,key:t[2],valueString:t[3].trim().replace(/\//g,"÷")},r.values=r.valueString.split(",").map(n=>n.trim()),r.printValue=`| ${r.key}="${r.valueString}"`,r},DW=(e,t)=>({subclass:e,numberString:t[2],printValue:`\\cp ${t[2]} -`}),hW=(e,t)=>{const r={subclass:e,sOrE:null};return e==="endMilestoneMarker"?r.printValue="\\*":(r.tagName=t[2],e==="emptyMilestone"?r.printValue=`\\${r.tagName}\\*`:(r.printValue=`\\${r.tagName}`,r.sOrE=t[3])),r},mW=(e,t)=>{const r={subclass:e,tagName:t[2],isNested:!1};return r.tagName.startsWith("+")&&(r.isNested=!0,r.tagName=r.tagName.substring(1)),r.tagLevel=t[3]!==""?parseInt(t[3]):1,r.fullTagName=`${r.tagName}${t[3]==="1"?"":t[3]}`,r.printValue=e==="startTag"?`\\${r.fullTagName} `:`\\${r.fullTagName}*`,r},Xe={printable:s1,chapter:pW,pubchapter:DW,verses:fW,tag:mW,break:s1,milestone:hW,attribute:dW,bad:s1},t7=(e,t)=>{for(let r=0;r{const r=ne.match(e,e7,"all");for(let n=0;n */var $y;function AW(){return $y||($y=1,Hc.read=function(e,t,r,n,u){var s,o,a=u*8-n-1,i=(1<>1,l=-7,p=r?u-1:0,f=r?-1:1,d=e[t+p];for(p+=f,s=d&(1<<-l)-1,d>>=-l,l+=a;l>0;s=s*256+e[t+p],p+=f,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=o*256+e[t+p],p+=f,l-=8);if(s===0)s=1-c;else{if(s===i)return o?NaN:(d?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(d?-1:1)*o*Math.pow(2,s-n)},Hc.write=function(e,t,r,n,u,s){var o,a,i,c=s*8-u-1,l=(1<>1,f=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:s-1,h=n?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-o))<1&&(o--,i*=2),o+p>=1?t+=f/i:t+=f*Math.pow(2,1-p),t*i>=2&&(o++,i/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*i-1)*Math.pow(2,u),o=o+p):(a=t*Math.pow(2,p-1)*Math.pow(2,u),o=0));u>=8;e[r+d]=a&255,d+=h,a/=256,u-=8);for(o=o<0;e[r+d]=o&255,d+=h,o/=256,c-=8);e[r+d-h]|=E*128}),Hc}/*! + }`)),l=c.data.document.sequence.blocks[0];for(var p of l.bg)r.sequences[0].block={type:"graft",subType:Uu(p.subType),blockN:o,sequence:this.sequences[p.payload]},this.cachedSequenceIds.unshift(p.payload),this.renderEvent("blockGraft",t),this.cachedSequenceIds.shift(),o++;var d=l.bs.payload.split("/"),f=d[1]?"usfm:".concat(d[1]):d[0];if(r.sequences[0].block={type:"paragraph",subType:f,blockN:o,wrappers:[]},this.renderEvent("startParagraph",t),this._tokens=[],s.type==="main"&&this.currentCV.chapter){var h={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=h,t.context.sequences[0].block.wrappers.unshift(h.subType),this.renderEvent("startWrapper",t)}if(s.type==="main"&&this.currentCV.verses){var y={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=y,t.context.sequences[0].block.wrappers.unshift(y.subType),this.renderEvent("startWrapper",t)}if(this.renderContent(l.items,t),this._tokens=[],s.type==="main"&&this.currentCV.verses){var A={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=A,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}if(s.type==="main"&&this.currentCV.chapter){var m={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=m,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}this.renderEvent("endParagraph",t),delete r.sequences[0].block,o++}this.renderEvent("endSequence",t),r.sequences.shift()}renderContent(t,r){for(var n of t)this.renderItem(n,r);this.maybeRenderText(r)}renderItem(t,r){if(t.type==="scope"&&t.payload.startsWith("attribute")){var n=t.payload.split("/");t.subType==="start"?(this._container||(this._container={direction:"start",subType:"usfm:w",type:"wrapper",atts:{}}),n[3]in this._container.atts?this._container.atts[n[3]].push(n[5]):this._container.atts[n[3]]=[n[5]]):this._container||(this._container={direction:"end",subType:"usfm:".concat(Uu(n[2]))},n[1]==="milestone"?this._container.type="end_milestone":(this._container.type="wrapper",this._container.atts={}))}else if(this._container&&(this.maybeRenderText(r),this.renderContainer(r)),t.type==="token")this._tokens.push(t.payload.replace(/\s+/g," "));else if(t.type==="graft"){this.maybeRenderText(r);var u={type:"graft",subType:Uu(t.subType),sequence:this.sequences[t.payload]};r.context.sequences[0].element=u,this.cachedSequenceIds.unshift(t.payload),this.renderEvent("inlineGraft",r),this.cachedSequenceIds.shift(),delete r.context.sequences[0].element}else{this.maybeRenderText(r);var s=t.payload.split("/");if(["chapter","verses"].includes(s[0])){var o={type:"wrapper",subType:Uu(s[0]),atts:{number:s[1]}};if(r.context.sequences[0].element=o,t.subType==="start"){this.currentCV[s[0]]=s[1],r.context.sequences[0].block.wrappers.unshift(o.subType),this.renderEvent("startWrapper",r);var a={type:"mark",subType:"".concat(s[0],"_label"),atts:{number:s[1]}};r.context.sequences[0].element=a,this.renderEvent("mark",r),r.context.sequences[0].element=o}else this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift(),delete r.context.sequences[0].element,this.currentCV[s[0]]=null}else if(["pubChapter","pubVerse","altChapter","altVerse"].includes(s[0])){if(t.subType==="start"){var i={type:"mark",subType:Uu(s[0]),atts:{number:s[1]}};r.context.sequences[0].element=i,this.renderEvent("mark",r),delete r.context.sequences[0].element}}else if(s[0]==="span"){var c={type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}};r.context.sequences[0].element=c,t.subType==="start"?(r.context.sequences[0].block.wrappers.unshift(c.subType),this.renderEvent("startWrapper",r)):(this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift()),delete r.context.sequences[0].element}else if(s[0]==="spanWithAtts")t.subType==="start"&&(this._container={direction:"start",type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}});else if(s[0]==="milestone"&&t.subType==="start")if(s[1]==="ts"){var l={type:"mark",subType:"usfm:".concat(Uu(s[1])),atts:{}};r.context.sequences[0].element=l,this.renderEvent("mark",r),delete r.context.sequences[0].element}else this._container={type:"start_milestone",subType:"usfm:".concat(Uu(s[1])),atts:{}}}}maybeRenderText(t){if(this._tokens.length!==0){var r={type:"text",text:this._tokens.join("")};t.context.sequences[0].element=r,this._tokens=[],this.renderEvent("text",t),delete t.context.sequences[0].element}}renderContainer(t){if(this._container.type==="wrapper"){var r=this._container.direction;delete this._container.direction,r==="start"?(t.context.sequences[0].element=this._container,t.context.sequences[0].block.wrappers.unshift(this._container.subType),this.renderEvent("startWrapper",t),delete t.context.sequences[0].element):(t.context.sequences[0].element=this._container,this.renderEvent("endWrapper",t),t.context.sequences[0].block.wrappers.shift(),delete t.context.sequences[0].element)}else this._container.type==="start_milestone"?(t.context.sequences[0].element=this._container,this.renderEvent("startMilestone",t),delete t.context.sequences[0].element):this._container.type==="end_milestone"&&(t.context.sequences[0].element=this._container,this.renderEvent("endMilestone",t),delete t.context.sequences[0].element);this._container=null}};var LW=MW,UW=HU,GW=YU,VW=wW,HW=nc,WW=ps,JW=kW,zW=NW,KW=LW,XW=Xp,YW=w7,ZW=S7,vu={Validator:UW,usfmHelps:GW,ProskommaRender:HW,PerfRenderFromJson:WW,SofriaRenderFromJson:zW,SofriaRenderFromProskomma:KW,PerfRenderFromProskomma:JW,mergeActions:XW,PipelineHandler:VW,pipelines:YW,render:ZW};const ds=[["chapter","chapter",Z("([\\r\\n]*\\\\c[ \\t]+(\\d+)[ \\t\\r\\n]*)")],["pubchapter","pubchapter",Z("([\\r\\n]*\\\\cp[ \\t]+([^\\r\\n]+)[ \\t\\r\\n]*)")],["verses","verses",Z("(\\\\v[ \\t]+([\\d\\-]+)[ \\t\\r\\n]*)")],["attribute","attribute",Z('([ \\t]*\\|?[ \\t]*([A-Za-z0-9\\-]+)="([^"]*)"[ \\t]?)')],["attribute","defaultAttribute",Z("([ \\t]*\\|[ \\t]*([^\\|\\\\]*))")],["milestone","emptyMilestone",Z('(\\\\([a-z1-9]+)([ \\t]*\\|[ \\t]*[a-z1-9]+="[^\\|\\\\"]*")*\\\\[*])')],["milestone","startMilestoneTag",Z("(\\\\([a-z1-9]+)-([se]))")],["milestone","endMilestoneMarker",Z("(\\\\([*]))")],["tag","endTag",Z("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[*])")],["tag","startTag",Z("(\\\\([+]?[a-z\\-]+)([1-9]?(-([1-9]))?)[ \\t]?)")],["bad","bareSlash",Z("(\\\\)")],["printable","eol",Z("([ \\t]*[\\r\\n]+[ \\t]*)")],["break","softLineBreak",Z("//")],["printable","wordLike",Z("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060~]{1,127})")],["printable","lineSpace",Z("([\\p{Separator} ]{1,127})")],["printable","punctuation",Z("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",Z("(.)")]],_7=Z.union(ds.map(e=>e[2])),hf=(e,t)=>({subclass:e,printValue:t[0].replace(/~/g," ")}),QW=(e,t)=>({subclass:e,numberString:t[2],number:parseInt(t[2]),printValue:`\\c ${t[2]} +`}),eJ=(e,t)=>{const r={subclass:e,numberString:t[2],printValue:`\\v ${t[2]} +`};if(r.numberString.includes("-")){const[n,u]=r.numberString.split("-").map(s=>parseInt(s));r.numbers=Array.from(Array(u-n+1).keys()).map(s=>s+n)}else r.numbers=[parseInt(r.numberString)];return r},tJ=(e,t)=>{let r;return e==="defaultAttribute"?r={subclass:e,key:"default",valueString:t[2].trim().replace(/\//g,"÷")}:r={subclass:e,key:t[2],valueString:t[3].trim().replace(/\//g,"÷")},r.values=r.valueString.split(",").map(n=>n.trim()),r.printValue=`| ${r.key}="${r.valueString}"`,r},rJ=(e,t)=>({subclass:e,numberString:t[2],printValue:`\\cp ${t[2]} +`}),nJ=(e,t)=>{const r={subclass:e,sOrE:null};return e==="endMilestoneMarker"?r.printValue="\\*":(r.tagName=t[2],e==="emptyMilestone"?(r.printValue=`\\${r.tagName}\\*`,r.attributes=t[1]?t[1].split("|").slice(1).map(n=>n.split("=")).map(n=>[n[0],n[1].replace(/"/g,"").replace(/[\\*]/g,"")]):[]):(r.printValue=`\\${r.tagName}`,r.sOrE=t[3])),r},uJ=(e,t)=>{const r={subclass:e,tagName:t[2],isNested:!1};return r.tagName.startsWith("+")&&(r.isNested=!0,r.tagName=r.tagName.substring(1)),r.tagLevel=t[3]!==""?parseInt(t[3]):1,r.fullTagName=`${r.tagName}${t[3]==="1"?"":t[3]}`,r.printValue=e==="startTag"?`\\${r.fullTagName} `:`\\${r.fullTagName}*`,r},Ge={printable:hf,chapter:QW,pubchapter:rJ,verses:eJ,tag:uJ,break:hf,milestone:nJ,attribute:tJ,bad:hf},B7=(e,t)=>{for(let r=0;r{const r=Z.match(e,_7,"all");for(let n=0;n */var Kv;function cJ(){return Kv||(Kv=1,Xc.read=function(e,t,r,n,u){var s,o,a=u*8-n-1,i=(1<>1,l=-7,p=r?u-1:0,d=r?-1:1,f=e[t+p];for(p+=d,s=f&(1<<-l)-1,f>>=-l,l+=a;l>0;s=s*256+e[t+p],p+=d,l-=8);for(o=s&(1<<-l)-1,s>>=-l,l+=n;l>0;o=o*256+e[t+p],p+=d,l-=8);if(s===0)s=1-c;else{if(s===i)return o?NaN:(f?-1:1)*(1/0);o=o+Math.pow(2,n),s=s-c}return(f?-1:1)*o*Math.pow(2,s-n)},Xc.write=function(e,t,r,n,u,s){var o,a,i,c=s*8-u-1,l=(1<>1,d=u===23?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:s-1,h=n?1:-1,y=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-o))<1&&(o--,i*=2),o+p>=1?t+=d/i:t+=d*Math.pow(2,1-p),t*i>=2&&(o++,i/=2),o+p>=l?(a=0,o=l):o+p>=1?(a=(t*i-1)*Math.pow(2,u),o=o+p):(a=t*Math.pow(2,p-1)*Math.pow(2,u),o=0));u>=8;e[r+f]=a&255,f+=h,a/=256,u-=8);for(o=o<0;e[r+f]=o&255,f+=h,o/=256,c-=8);e[r+f-h]|=y*128}),Xc}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT - */var Py;function FW(){return Py||(Py=1,function(e){const t=fa,r=AW(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=y,e.INSPECT_MAX_BYTES=50;const u=2147483647;e.kMaxLength=u,a.TYPED_ARRAY_SUPPORT=s(),!a.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.");function s(){try{const N=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(N,S),N.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(N){if(N>u)throw new RangeError('The value "'+N+'" is invalid for option "size"');const S=new Uint8Array(N);return Object.setPrototypeOf(S,a.prototype),S}function a(N,S,_){if(typeof N=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(N)}return i(N,S,_)}a.poolSize=8192;function i(N,S,_){if(typeof N=="string")return f(N,S);if(ArrayBuffer.isView(N))return h(N);if(N==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N);if(ce(N,ArrayBuffer)||N&&ce(N.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ce(N,SharedArrayBuffer)||N&&ce(N.buffer,SharedArrayBuffer)))return E(N,S,_);if(typeof N=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const L=N.valueOf&&N.valueOf();if(L!=null&&L!==N)return a.from(L,S,_);const J=A(N);if(J)return J;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof N[Symbol.toPrimitive]=="function")return a.from(N[Symbol.toPrimitive]("string"),S,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof N)}a.from=function(N,S,_){return i(N,S,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(N){if(typeof N!="number")throw new TypeError('"size" argument must be of type number');if(N<0)throw new RangeError('The value "'+N+'" is invalid for option "size"')}function l(N,S,_){return c(N),N<=0?o(N):S!==void 0?typeof _=="string"?o(N).fill(S,_):o(N).fill(S):o(N)}a.alloc=function(N,S,_){return l(N,S,_)};function p(N){return c(N),o(N<0?0:m(N)|0)}a.allocUnsafe=function(N){return p(N)},a.allocUnsafeSlow=function(N){return p(N)};function f(N,S){if((typeof S!="string"||S==="")&&(S="utf8"),!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const _=F(N,S)|0;let L=o(_);const J=L.write(N,S);return J!==_&&(L=L.slice(0,J)),L}function d(N){const S=N.length<0?0:m(N.length)|0,_=o(S);for(let L=0;L=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return N|0}function y(N){return+N!=N&&(N=0),a.alloc(+N)}a.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==a.prototype},a.compare=function(S,_){if(ce(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),ce(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(S)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===_)return 0;let L=S.length,J=_.length;for(let ee=0,ue=Math.min(L,J);eeJ.length?(a.isBuffer(ue)||(ue=a.from(ue)),ue.copy(J,ee)):Uint8Array.prototype.set.call(J,ue,ee);else if(a.isBuffer(ue))ue.copy(J,ee);else throw new TypeError('"list" argument must be an Array of Buffers');ee+=ue.length}return J};function F(N,S){if(a.isBuffer(N))return N.length;if(ArrayBuffer.isView(N)||ce(N,ArrayBuffer))return N.byteLength;if(typeof N!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof N);const _=N.length,L=arguments.length>2&&arguments[2]===!0;if(!L&&_===0)return 0;let J=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return Ge(N).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return ke(N).length;default:if(J)return L?-1:Ge(N).length;S=(""+S).toLowerCase(),J=!0}}a.byteLength=F;function B(N,S,_){let L=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,S>>>=0,_<=S))return"";for(N||(N="utf8");;)switch(N){case"hex":return pe(this,S,_);case"utf8":case"utf-8":return ie(this,S,_);case"ascii":return de(this,S,_);case"latin1":case"binary":return Ce(this,S,_);case"base64":return oe(this,S,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Q(this,S,_);default:if(L)throw new TypeError("Unknown encoding: "+N);N=(N+"").toLowerCase(),L=!0}}a.prototype._isBuffer=!0;function P(N,S,_){const L=N[S];N[S]=N[_],N[_]=L}a.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(S+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(S,_,L,J,ee){if(ce(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),!a.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(_===void 0&&(_=0),L===void 0&&(L=S?S.length:0),J===void 0&&(J=0),ee===void 0&&(ee=this.length),_<0||L>S.length||J<0||ee>this.length)throw new RangeError("out of range index");if(J>=ee&&_>=L)return 0;if(J>=ee)return-1;if(_>=L)return 1;if(_>>>=0,L>>>=0,J>>>=0,ee>>>=0,this===S)return 0;let ue=ee-J,ge=L-_;const Be=Math.min(ue,ge),qe=this.slice(J,ee),Pe=S.slice(_,L);for(let rt=0;rt2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Te(_)&&(_=J?0:N.length-1),_<0&&(_=N.length+_),_>=N.length){if(J)return-1;_=N.length-1}else if(_<0)if(J)_=0;else return-1;if(typeof S=="string"&&(S=a.from(S,L)),a.isBuffer(S))return S.length===0?-1:I(N,S,_,L,J);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?J?Uint8Array.prototype.indexOf.call(N,S,_):Uint8Array.prototype.lastIndexOf.call(N,S,_):I(N,[S],_,L,J);throw new TypeError("val must be string, number or Buffer")}function I(N,S,_,L,J){let ee=1,ue=N.length,ge=S.length;if(L!==void 0&&(L=String(L).toLowerCase(),L==="ucs2"||L==="ucs-2"||L==="utf16le"||L==="utf-16le")){if(N.length<2||S.length<2)return-1;ee=2,ue/=2,ge/=2,_/=2}function Be(Pe,rt){return ee===1?Pe[rt]:Pe.readUInt16BE(rt*ee)}let qe;if(J){let Pe=-1;for(qe=_;qeue&&(_=ue-ge),qe=_;qe>=0;qe--){let Pe=!0;for(let rt=0;rtJ&&(L=J)):L=J;const ee=S.length;L>ee/2&&(L=ee/2);let ue;for(ue=0;ue>>0,isFinite(L)?(L=L>>>0,J===void 0&&(J="utf8")):(J=L,L=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const ee=this.length-_;if((L===void 0||L>ee)&&(L=ee),S.length>0&&(L<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");J||(J="utf8");let ue=!1;for(;;)switch(J){case"hex":return U(this,S,_,L);case"utf8":case"utf-8":return j(this,S,_,L);case"ascii":case"latin1":case"binary":return W(this,S,_,L);case"base64":return te(this,S,_,L);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Y(this,S,_,L);default:if(ue)throw new TypeError("Unknown encoding: "+J);J=(""+J).toLowerCase(),ue=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function oe(N,S,_){return S===0&&_===N.length?t.fromByteArray(N):t.fromByteArray(N.slice(S,_))}function ie(N,S,_){_=Math.min(N.length,_);const L=[];let J=S;for(;J<_;){const ee=N[J];let ue=null,ge=ee>239?4:ee>223?3:ee>191?2:1;if(J+ge<=_){let Be,qe,Pe,rt;switch(ge){case 1:ee<128&&(ue=ee);break;case 2:Be=N[J+1],(Be&192)===128&&(rt=(ee&31)<<6|Be&63,rt>127&&(ue=rt));break;case 3:Be=N[J+1],qe=N[J+2],(Be&192)===128&&(qe&192)===128&&(rt=(ee&15)<<12|(Be&63)<<6|qe&63,rt>2047&&(rt<55296||rt>57343)&&(ue=rt));break;case 4:Be=N[J+1],qe=N[J+2],Pe=N[J+3],(Be&192)===128&&(qe&192)===128&&(Pe&192)===128&&(rt=(ee&15)<<18|(Be&63)<<12|(qe&63)<<6|Pe&63,rt>65535&&rt<1114112&&(ue=rt))}}ue===null?(ue=65533,ge=1):ue>65535&&(ue-=65536,L.push(ue>>>10&1023|55296),ue=56320|ue&1023),L.push(ue),J+=ge}return De(L)}const fe=4096;function De(N){const S=N.length;if(S<=fe)return String.fromCharCode.apply(String,N);let _="",L=0;for(;LL)&&(_=L);let J="";for(let ee=S;ee<_;++ee)J+=Z[N[ee]];return J}function Q(N,S,_){const L=N.slice(S,_);let J="";for(let ee=0;eeL&&(S=L),_<0?(_+=L,_<0&&(_=0)):_>L&&(_=L),__)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(S,_,L){S=S>>>0,_=_>>>0,L||q(S,_,this.length);let J=this[S],ee=1,ue=0;for(;++ue<_&&(ee*=256);)J+=this[S+ue]*ee;return J},a.prototype.readUintBE=a.prototype.readUIntBE=function(S,_,L){S=S>>>0,_=_>>>0,L||q(S,_,this.length);let J=this[S+--_],ee=1;for(;_>0&&(ee*=256);)J+=this[S+--_]*ee;return J},a.prototype.readUint8=a.prototype.readUInt8=function(S,_){return S=S>>>0,_||q(S,1,this.length),this[S]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(S,_){return S=S>>>0,_||q(S,2,this.length),this[S]|this[S+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(S,_){return S=S>>>0,_||q(S,2,this.length),this[S]<<8|this[S+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(S,_){return S=S>>>0,_||q(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(S,_){return S=S>>>0,_||q(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},a.prototype.readBigUInt64LE=ae(function(S){S=S>>>0,re(S,"offset");const _=this[S],L=this[S+7];(_===void 0||L===void 0)&&_e(S,this.length-8);const J=_+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,ee=this[++S]+this[++S]*2**8+this[++S]*2**16+L*2**24;return BigInt(J)+(BigInt(ee)<>>0,re(S,"offset");const _=this[S],L=this[S+7];(_===void 0||L===void 0)&&_e(S,this.length-8);const J=_*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],ee=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+L;return(BigInt(J)<>>0,_=_>>>0,L||q(S,_,this.length);let J=this[S],ee=1,ue=0;for(;++ue<_&&(ee*=256);)J+=this[S+ue]*ee;return ee*=128,J>=ee&&(J-=Math.pow(2,8*_)),J},a.prototype.readIntBE=function(S,_,L){S=S>>>0,_=_>>>0,L||q(S,_,this.length);let J=_,ee=1,ue=this[S+--J];for(;J>0&&(ee*=256);)ue+=this[S+--J]*ee;return ee*=128,ue>=ee&&(ue-=Math.pow(2,8*_)),ue},a.prototype.readInt8=function(S,_){return S=S>>>0,_||q(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},a.prototype.readInt16LE=function(S,_){S=S>>>0,_||q(S,2,this.length);const L=this[S]|this[S+1]<<8;return L&32768?L|4294901760:L},a.prototype.readInt16BE=function(S,_){S=S>>>0,_||q(S,2,this.length);const L=this[S+1]|this[S]<<8;return L&32768?L|4294901760:L},a.prototype.readInt32LE=function(S,_){return S=S>>>0,_||q(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},a.prototype.readInt32BE=function(S,_){return S=S>>>0,_||q(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},a.prototype.readBigInt64LE=ae(function(S){S=S>>>0,re(S,"offset");const _=this[S],L=this[S+7];(_===void 0||L===void 0)&&_e(S,this.length-8);const J=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(L<<24);return(BigInt(J)<>>0,re(S,"offset");const _=this[S],L=this[S+7];(_===void 0||L===void 0)&&_e(S,this.length-8);const J=(_<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(J)<>>0,_||q(S,4,this.length),r.read(this,S,!0,23,4)},a.prototype.readFloatBE=function(S,_){return S=S>>>0,_||q(S,4,this.length),r.read(this,S,!1,23,4)},a.prototype.readDoubleLE=function(S,_){return S=S>>>0,_||q(S,8,this.length),r.read(this,S,!0,52,8)},a.prototype.readDoubleBE=function(S,_){return S=S>>>0,_||q(S,8,this.length),r.read(this,S,!1,52,8)};function v(N,S,_,L,J,ee){if(!a.isBuffer(N))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>J||SN.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(S,_,L,J){if(S=+S,_=_>>>0,L=L>>>0,!J){const ge=Math.pow(2,8*L)-1;v(this,S,_,L,ge,0)}let ee=1,ue=0;for(this[_]=S&255;++ue>>0,L=L>>>0,!J){const ge=Math.pow(2,8*L)-1;v(this,S,_,L,ge,0)}let ee=L-1,ue=1;for(this[_+ee]=S&255;--ee>=0&&(ue*=256);)this[_+ee]=S/ue&255;return _+L},a.prototype.writeUint8=a.prototype.writeUInt8=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,1,255,0),this[_]=S&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,2,65535,0),this[_]=S&255,this[_+1]=S>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,2,65535,0),this[_]=S>>>8,this[_+1]=S&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,4,4294967295,0),this[_+3]=S>>>24,this[_+2]=S>>>16,this[_+1]=S>>>8,this[_]=S&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,4,4294967295,0),this[_]=S>>>24,this[_+1]=S>>>16,this[_+2]=S>>>8,this[_+3]=S&255,_+4};function C(N,S,_,L,J){H(S,L,J,N,_,7);let ee=Number(S&BigInt(4294967295));N[_++]=ee,ee=ee>>8,N[_++]=ee,ee=ee>>8,N[_++]=ee,ee=ee>>8,N[_++]=ee;let ue=Number(S>>BigInt(32)&BigInt(4294967295));return N[_++]=ue,ue=ue>>8,N[_++]=ue,ue=ue>>8,N[_++]=ue,ue=ue>>8,N[_++]=ue,_}function D(N,S,_,L,J){H(S,L,J,N,_,7);let ee=Number(S&BigInt(4294967295));N[_+7]=ee,ee=ee>>8,N[_+6]=ee,ee=ee>>8,N[_+5]=ee,ee=ee>>8,N[_+4]=ee;let ue=Number(S>>BigInt(32)&BigInt(4294967295));return N[_+3]=ue,ue=ue>>8,N[_+2]=ue,ue=ue>>8,N[_+1]=ue,ue=ue>>8,N[_]=ue,_+8}a.prototype.writeBigUInt64LE=ae(function(S,_=0){return C(this,S,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=ae(function(S,_=0){return D(this,S,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(S,_,L,J){if(S=+S,_=_>>>0,!J){const Be=Math.pow(2,8*L-1);v(this,S,_,L,Be-1,-Be)}let ee=0,ue=1,ge=0;for(this[_]=S&255;++ee>0)-ge&255;return _+L},a.prototype.writeIntBE=function(S,_,L,J){if(S=+S,_=_>>>0,!J){const Be=Math.pow(2,8*L-1);v(this,S,_,L,Be-1,-Be)}let ee=L-1,ue=1,ge=0;for(this[_+ee]=S&255;--ee>=0&&(ue*=256);)S<0&&ge===0&&this[_+ee+1]!==0&&(ge=1),this[_+ee]=(S/ue>>0)-ge&255;return _+L},a.prototype.writeInt8=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,1,127,-128),S<0&&(S=255+S+1),this[_]=S&255,_+1},a.prototype.writeInt16LE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,2,32767,-32768),this[_]=S&255,this[_+1]=S>>>8,_+2},a.prototype.writeInt16BE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,2,32767,-32768),this[_]=S>>>8,this[_+1]=S&255,_+2},a.prototype.writeInt32LE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,4,2147483647,-2147483648),this[_]=S&255,this[_+1]=S>>>8,this[_+2]=S>>>16,this[_+3]=S>>>24,_+4},a.prototype.writeInt32BE=function(S,_,L){return S=+S,_=_>>>0,L||v(this,S,_,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[_]=S>>>24,this[_+1]=S>>>16,this[_+2]=S>>>8,this[_+3]=S&255,_+4},a.prototype.writeBigInt64LE=ae(function(S,_=0){return C(this,S,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=ae(function(S,_=0){return D(this,S,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function g(N,S,_,L,J,ee){if(_+L>N.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function O(N,S,_,L,J){return S=+S,_=_>>>0,J||g(N,S,_,4),r.write(N,S,_,L,23,4),_+4}a.prototype.writeFloatLE=function(S,_,L){return O(this,S,_,!0,L)},a.prototype.writeFloatBE=function(S,_,L){return O(this,S,_,!1,L)};function b(N,S,_,L,J){return S=+S,_=_>>>0,J||g(N,S,_,8),r.write(N,S,_,L,52,8),_+8}a.prototype.writeDoubleLE=function(S,_,L){return b(this,S,_,!0,L)},a.prototype.writeDoubleBE=function(S,_,L){return b(this,S,_,!1,L)},a.prototype.copy=function(S,_,L,J){if(!a.isBuffer(S))throw new TypeError("argument should be a Buffer");if(L||(L=0),!J&&J!==0&&(J=this.length),_>=S.length&&(_=S.length),_||(_=0),J>0&&J=this.length)throw new RangeError("Index out of range");if(J<0)throw new RangeError("sourceEnd out of bounds");J>this.length&&(J=this.length),S.length-_>>0,L=L===void 0?this.length:L>>>0,S||(S=0);let ee;if(typeof S=="number")for(ee=_;ee2**32?J=k(String(_)):typeof _=="bigint"&&(J=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(J=k(J)),J+="n"),L+=` It must be ${S}. Received ${J}`,L},RangeError);function k(N){let S="",_=N.length;const L=N[0]==="-"?1:0;for(;_>=L+4;_-=3)S=`_${N.slice(_-3,_)}${S}`;return`${N.slice(0,_)}${S}`}function G(N,S,_){re(S,"offset"),(N[S]===void 0||N[S+_]===void 0)&&_e(S,N.length-(_+1))}function H(N,S,_,L,J,ee){if(N>_||N3?S===0||S===BigInt(0)?ge=`>= 0${ue} and < 2${ue} ** ${(ee+1)*8}${ue}`:ge=`>= -(2${ue} ** ${(ee+1)*8-1}${ue}) and < 2 ** ${(ee+1)*8-1}${ue}`:ge=`>= ${S}${ue} and <= ${_}${ue}`,new w.ERR_OUT_OF_RANGE("value",ge,N)}G(L,J,ee)}function re(N,S){if(typeof N!="number")throw new w.ERR_INVALID_ARG_TYPE(S,"number",N)}function _e(N,S,_){throw Math.floor(N)!==N?(re(N,_),new w.ERR_OUT_OF_RANGE(_||"offset","an integer",N)):S<0?new w.ERR_BUFFER_OUT_OF_BOUNDS:new w.ERR_OUT_OF_RANGE(_||"offset",`>= ${_?1:0} and <= ${S}`,N)}const Le=/[^+/0-9A-Za-z-_]/g;function Ue(N){if(N=N.split("=")[0],N=N.trim().replace(Le,""),N.length<2)return"";for(;N.length%4!==0;)N=N+"=";return N}function Ge(N,S){S=S||1/0;let _;const L=N.length;let J=null;const ee=[];for(let ue=0;ue55295&&_<57344){if(!J){if(_>56319){(S-=3)>-1&&ee.push(239,191,189);continue}else if(ue+1===L){(S-=3)>-1&&ee.push(239,191,189);continue}J=_;continue}if(_<56320){(S-=3)>-1&&ee.push(239,191,189),J=_;continue}_=(J-55296<<10|_-56320)+65536}else J&&(S-=3)>-1&&ee.push(239,191,189);if(J=null,_<128){if((S-=1)<0)break;ee.push(_)}else if(_<2048){if((S-=2)<0)break;ee.push(_>>6|192,_&63|128)}else if(_<65536){if((S-=3)<0)break;ee.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((S-=4)<0)break;ee.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return ee}function be(N){const S=[];for(let _=0;_>8,J=_%256,ee.push(J),ee.push(L);return ee}function ke(N){return t.toByteArray(Ue(N))}function Ie(N,S,_,L){let J;for(J=0;J=S.length||J>=N.length);++J)S[J+_]=N[J];return J}function ce(N,S){return N instanceof S||N!=null&&N.constructor!=null&&N.constructor.name!=null&&N.constructor.name===S.name}function Te(N){return N!==N}const Z=function(){const N="0123456789abcdef",S=new Array(256);for(let _=0;_<16;++_){const L=_*16;for(let J=0;J<16;++J)S[L+J]=N[_]+N[J]}return S}();function ae(N){return typeof BigInt>"u"?le:N}function le(){throw new Error("BigInt not supported")}}(c1)),c1}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var Oy;function CW(){return Oy||(Oy=1,function(e,t){var r=FW(),n=r.Buffer;function u(o,a){for(var i in o)a[i]=o[i]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(u(r,t),t.Buffer=s);function s(o,a,i){return n(o,a,i)}s.prototype=Object.create(n.prototype),u(n,s),s.from=function(o,a,i){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,i)},s.alloc=function(o,a,i){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=n(o);return a!==void 0?typeof i=="string"?c.fill(a,i):c.fill(a):c.fill(0),c},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}}(gW,gi)),gi}var ky;function bW(){if(ky)return i1;ky=1;var e=CW().Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.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}};function r(m){if(!m)return"utf8";for(var y;;)switch(m){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 m;default:if(y)return;m=(""+m).toLowerCase(),y=!0}}function n(m){var y=r(m);if(typeof y!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return y||m}i1.StringDecoder=u;function u(m){this.encoding=n(m);var y;switch(this.encoding){case"utf16le":this.text=p,this.end=f,y=4;break;case"utf8":this.fillLast=i,y=4;break;case"base64":this.text=d,this.end=h,y=3;break;default:this.write=E,this.end=A;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(y)}u.prototype.write=function(m){if(m.length===0)return"";var y,F;if(this.lastNeed){if(y=this.fillLast(m),y===void 0)return"";F=this.lastNeed,this.lastNeed=0}else F=0;return F>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function o(m,y,F){var B=y.length-1;if(B=0?(P>0&&(m.lastNeed=P-1),P):--B=0?(P>0&&(m.lastNeed=P-2),P):--B=0?(P>0&&(P===2?P=0:m.lastNeed=P-3),P):0))}function a(m,y,F){if((y[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&y.length>1){if((y[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&y.length>2&&(y[2]&192)!==128)return m.lastNeed=2,"�"}}function i(m){var y=this.lastTotal-this.lastNeed,F=a(this,m);if(F!==void 0)return F;if(this.lastNeed<=m.length)return m.copy(this.lastChar,y,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,y,0,m.length),this.lastNeed-=m.length}function c(m,y){var F=o(this,m,y);if(!this.lastNeed)return m.toString("utf8",y);this.lastTotal=F;var B=m.length-(F-this.lastNeed);return m.copy(this.lastChar,0,B),m.toString("utf8",y,B)}function l(m){var y=m&&m.length?this.write(m):"";return this.lastNeed?y+"�":y}function p(m,y){if((m.length-y)%2===0){var F=m.toString("utf16le",y);if(F){var B=F.charCodeAt(F.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],F.slice(0,-1)}return F}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",y,m.length-1)}function f(m){var y=m&&m.length?this.write(m):"";if(this.lastNeed){var F=this.lastTotal-this.lastNeed;return y+this.lastChar.toString("utf16le",0,F)}return y}function d(m,y){var F=(m.length-y)%3;return F===0?m.toString("base64",y):(this.lastNeed=3-F,this.lastTotal=3,F===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",y,m.length-F))}function h(m){var y=m&&m.length?this.write(m):"";return this.lastNeed?y+this.lastChar.toString("base64",0,3-this.lastNeed):y}function E(m){return m.toString(this.encoding)}function A(m){return m&&m.length?this.write(m):""}return i1}(function(e){(function(t){t.parser=function(b,w){return new n(b,w)},t.SAXParser=n,t.SAXStream=l,t.createStream=c,t.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(b,w){if(!(this instanceof n))return new n(b,w);var x=this;s(x),x.q=x.c="",x.bufferCheckPosition=t.MAX_BUFFER_LENGTH,x.opt=w||{},x.opt.lowercase=x.opt.lowercase||x.opt.lowercasetags,x.looseCase=x.opt.lowercase?"toLowerCase":"toUpperCase",x.tags=[],x.closed=x.closedRoot=x.sawRoot=!1,x.tag=x.error=null,x.strict=!!b,x.noscript=!!(b||x.opt.noscript),x.state=j.BEGIN,x.strictEntities=x.opt.strictEntities,x.ENTITIES=x.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),x.attribList=[],x.opt.xmlns&&(x.ns=Object.create(E)),x.trackPosition=x.opt.position!==!1,x.trackPosition&&(x.position=x.line=x.column=0),te(x,"onready")}Object.create||(Object.create=function(b){function w(){}w.prototype=b;var x=new w;return x}),Object.keys||(Object.keys=function(b){var w=[];for(var x in b)b.hasOwnProperty(x)&&w.push(x);return w});function u(b){for(var w=Math.max(t.MAX_BUFFER_LENGTH,10),x=0,k=0,G=r.length;kw)switch(r[k]){case"textNode":oe(b);break;case"cdata":Y(b,"oncdata",b.cdata),b.cdata="";break;case"script":Y(b,"onscript",b.script),b.script="";break;default:fe(b,"Max buffer length exceeded: "+r[k])}x=Math.max(x,H)}var re=t.MAX_BUFFER_LENGTH-x;b.bufferCheckPosition=re+b.position}function s(b){for(var w=0,x=r.length;w"||B(b)}function I(b,w){return b.test(w)}function U(b,w){return!I(b,w)}var j=0;t.STATE={BEGIN:j++,BEGIN_WHITESPACE:j++,TEXT:j++,TEXT_ENTITY:j++,OPEN_WAKA:j++,SGML_DECL:j++,SGML_DECL_QUOTED:j++,DOCTYPE:j++,DOCTYPE_QUOTED:j++,DOCTYPE_DTD:j++,DOCTYPE_DTD_QUOTED:j++,COMMENT_STARTING:j++,COMMENT:j++,COMMENT_ENDING:j++,COMMENT_ENDED:j++,CDATA:j++,CDATA_ENDING:j++,CDATA_ENDING_2:j++,PROC_INST:j++,PROC_INST_BODY:j++,PROC_INST_ENDING:j++,OPEN_TAG:j++,OPEN_TAG_SLASH:j++,ATTRIB:j++,ATTRIB_NAME:j++,ATTRIB_NAME_SAW_WHITE:j++,ATTRIB_VALUE:j++,ATTRIB_VALUE_QUOTED:j++,ATTRIB_VALUE_CLOSED:j++,ATTRIB_VALUE_UNQUOTED:j++,ATTRIB_VALUE_ENTITY_Q:j++,ATTRIB_VALUE_ENTITY_U:j++,CLOSE_TAG:j++,CLOSE_TAG_SAW_WHITE:j++,SCRIPT:j++,SCRIPT_ENDING:j++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(b){var w=t.ENTITIES[b],x=typeof w=="number"?String.fromCharCode(w):w;t.ENTITIES[b]=x});for(var W in t.STATE)t.STATE[t.STATE[W]]=W;j=t.STATE;function te(b,w,x){b[w]&&b[w](x)}function Y(b,w,x){b.textNode&&oe(b),te(b,w,x)}function oe(b){b.textNode=ie(b.opt,b.textNode),b.textNode&&te(b,"ontext",b.textNode),b.textNode=""}function ie(b,w){return b.trim&&(w=w.trim()),b.normalize&&(w=w.replace(/\s+/g," ")),w}function fe(b,w){return oe(b),b.trackPosition&&(w+=` + */var Xv;function lJ(){return Xv||(Xv=1,function(e){const t=la,r=cJ(),n=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;e.Buffer=a,e.SlowBuffer=v,e.INSPECT_MAX_BYTES=50;const u=2147483647;e.kMaxLength=u,a.TYPED_ARRAY_SUPPORT=s(),!a.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.");function s(){try{const k=new Uint8Array(1),S={foo:function(){return 42}};return Object.setPrototypeOf(S,Uint8Array.prototype),Object.setPrototypeOf(k,S),k.foo()===42}catch{return!1}}Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}});function o(k){if(k>u)throw new RangeError('The value "'+k+'" is invalid for option "size"');const S=new Uint8Array(k);return Object.setPrototypeOf(S,a.prototype),S}function a(k,S,_){if(typeof k=="number"){if(typeof S=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return p(k)}return i(k,S,_)}a.poolSize=8192;function i(k,S,_){if(typeof k=="string")return d(k,S);if(ArrayBuffer.isView(k))return h(k);if(k==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k);if(le(k,ArrayBuffer)||k&&le(k.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(le(k,SharedArrayBuffer)||k&&le(k.buffer,SharedArrayBuffer)))return y(k,S,_);if(typeof k=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const x=k.valueOf&&k.valueOf();if(x!=null&&x!==k)return a.from(x,S,_);const U=A(k);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof k[Symbol.toPrimitive]=="function")return a.from(k[Symbol.toPrimitive]("string"),S,_);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof k)}a.from=function(k,S,_){return i(k,S,_)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array);function c(k){if(typeof k!="number")throw new TypeError('"size" argument must be of type number');if(k<0)throw new RangeError('The value "'+k+'" is invalid for option "size"')}function l(k,S,_){return c(k),k<=0?o(k):S!==void 0?typeof _=="string"?o(k).fill(S,_):o(k).fill(S):o(k)}a.alloc=function(k,S,_){return l(k,S,_)};function p(k){return c(k),o(k<0?0:m(k)|0)}a.allocUnsafe=function(k){return p(k)},a.allocUnsafeSlow=function(k){return p(k)};function d(k,S){if((typeof S!="string"||S==="")&&(S="utf8"),!a.isEncoding(S))throw new TypeError("Unknown encoding: "+S);const _=C(k,S)|0;let x=o(_);const U=x.write(k,S);return U!==_&&(x=x.slice(0,U)),x}function f(k){const S=k.length<0?0:m(k.length)|0,_=o(S);for(let x=0;x=u)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u.toString(16)+" bytes");return k|0}function v(k){return+k!=k&&(k=0),a.alloc(+k)}a.isBuffer=function(S){return S!=null&&S._isBuffer===!0&&S!==a.prototype},a.compare=function(S,_){if(le(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),le(_,Uint8Array)&&(_=a.from(_,_.offset,_.byteLength)),!a.isBuffer(S)||!a.isBuffer(_))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(S===_)return 0;let x=S.length,U=_.length;for(let X=0,re=Math.min(x,U);XU.length?(a.isBuffer(re)||(re=a.from(re)),re.copy(U,X)):Uint8Array.prototype.set.call(U,re,X);else if(a.isBuffer(re))re.copy(U,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=re.length}return U};function C(k,S){if(a.isBuffer(k))return k.length;if(ArrayBuffer.isView(k)||le(k,ArrayBuffer))return k.byteLength;if(typeof k!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof k);const _=k.length,x=arguments.length>2&&arguments[2]===!0;if(!x&&_===0)return 0;let U=!1;for(;;)switch(S){case"ascii":case"latin1":case"binary":return _;case"utf8":case"utf-8":return Me(k).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _*2;case"hex":return _>>>1;case"base64":return Pe(k).length;default:if(U)return x?-1:Me(k).length;S=(""+S).toLowerCase(),U=!0}}a.byteLength=C;function B(k,S,_){let x=!1;if((S===void 0||S<0)&&(S=0),S>this.length||((_===void 0||_>this.length)&&(_=this.length),_<=0)||(_>>>=0,S>>>=0,_<=S))return"";for(k||(k="utf8");;)switch(k){case"hex":return pe(this,S,_);case"utf8":case"utf-8":return oe(this,S,_);case"ascii":return fe(this,S,_);case"latin1":case"binary":return ge(this,S,_);case"base64":return ue(this,S,_);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return z(this,S,_);default:if(x)throw new TypeError("Unknown encoding: "+k);k=(k+"").toLowerCase(),x=!0}}a.prototype._isBuffer=!0;function T(k,S,_){const x=k[S];k[S]=k[_],k[_]=x}a.prototype.swap16=function(){const S=this.length;if(S%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let _=0;__&&(S+=" ... "),""},n&&(a.prototype[n]=a.prototype.inspect),a.prototype.compare=function(S,_,x,U,X){if(le(S,Uint8Array)&&(S=a.from(S,S.offset,S.byteLength)),!a.isBuffer(S))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof S);if(_===void 0&&(_=0),x===void 0&&(x=S?S.length:0),U===void 0&&(U=0),X===void 0&&(X=this.length),_<0||x>S.length||U<0||X>this.length)throw new RangeError("out of range index");if(U>=X&&_>=x)return 0;if(U>=X)return-1;if(_>=x)return 1;if(_>>>=0,x>>>=0,U>>>=0,X>>>=0,this===S)return 0;let re=X-U,ve=x-_;const Se=Math.min(re,ve),Oe=this.slice(U,X),Ie=S.slice(_,x);for(let Ke=0;Ke2147483647?_=2147483647:_<-2147483648&&(_=-2147483648),_=+_,Te(_)&&(_=U?0:k.length-1),_<0&&(_=k.length+_),_>=k.length){if(U)return-1;_=k.length-1}else if(_<0)if(U)_=0;else return-1;if(typeof S=="string"&&(S=a.from(S,x)),a.isBuffer(S))return S.length===0?-1:R(k,S,_,x,U);if(typeof S=="number")return S=S&255,typeof Uint8Array.prototype.indexOf=="function"?U?Uint8Array.prototype.indexOf.call(k,S,_):Uint8Array.prototype.lastIndexOf.call(k,S,_):R(k,[S],_,x,U);throw new TypeError("val must be string, number or Buffer")}function R(k,S,_,x,U){let X=1,re=k.length,ve=S.length;if(x!==void 0&&(x=String(x).toLowerCase(),x==="ucs2"||x==="ucs-2"||x==="utf16le"||x==="utf-16le")){if(k.length<2||S.length<2)return-1;X=2,re/=2,ve/=2,_/=2}function Se(Ie,Ke){return X===1?Ie[Ke]:Ie.readUInt16BE(Ke*X)}let Oe;if(U){let Ie=-1;for(Oe=_;Oere&&(_=re-ve),Oe=_;Oe>=0;Oe--){let Ie=!0;for(let Ke=0;KeU&&(x=U)):x=U;const X=S.length;x>X/2&&(x=X/2);let re;for(re=0;re>>0,isFinite(x)?(x=x>>>0,U===void 0&&(U="utf8")):(U=x,x=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-_;if((x===void 0||x>X)&&(x=X),S.length>0&&(x<0||_<0)||_>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let re=!1;for(;;)switch(U){case"hex":return J(this,S,_,x);case"utf8":case"utf-8":return q(this,S,_,x);case"ascii":case"latin1":case"binary":return G(this,S,_,x);case"base64":return ee(this,S,_,x);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,S,_,x);default:if(re)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),re=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function ue(k,S,_){return S===0&&_===k.length?t.fromByteArray(k):t.fromByteArray(k.slice(S,_))}function oe(k,S,_){_=Math.min(k.length,_);const x=[];let U=S;for(;U<_;){const X=k[U];let re=null,ve=X>239?4:X>223?3:X>191?2:1;if(U+ve<=_){let Se,Oe,Ie,Ke;switch(ve){case 1:X<128&&(re=X);break;case 2:Se=k[U+1],(Se&192)===128&&(Ke=(X&31)<<6|Se&63,Ke>127&&(re=Ke));break;case 3:Se=k[U+1],Oe=k[U+2],(Se&192)===128&&(Oe&192)===128&&(Ke=(X&15)<<12|(Se&63)<<6|Oe&63,Ke>2047&&(Ke<55296||Ke>57343)&&(re=Ke));break;case 4:Se=k[U+1],Oe=k[U+2],Ie=k[U+3],(Se&192)===128&&(Oe&192)===128&&(Ie&192)===128&&(Ke=(X&15)<<18|(Se&63)<<12|(Oe&63)<<6|Ie&63,Ke>65535&&Ke<1114112&&(re=Ke))}}re===null?(re=65533,ve=1):re>65535&&(re-=65536,x.push(re>>>10&1023|55296),re=56320|re&1023),x.push(re),U+=ve}return he(x)}const de=4096;function he(k){const S=k.length;if(S<=de)return String.fromCharCode.apply(String,k);let _="",x=0;for(;xx)&&(_=x);let U="";for(let X=S;X<_;++X)U+=W[k[X]];return U}function z(k,S,_){const x=k.slice(S,_);let U="";for(let X=0;Xx&&(S=x),_<0?(_+=x,_<0&&(_=0)):_>x&&(_=x),__)throw new RangeError("Trying to access beyond buffer length")}a.prototype.readUintLE=a.prototype.readUIntLE=function(S,_,x){S=S>>>0,_=_>>>0,x||O(S,_,this.length);let U=this[S],X=1,re=0;for(;++re<_&&(X*=256);)U+=this[S+re]*X;return U},a.prototype.readUintBE=a.prototype.readUIntBE=function(S,_,x){S=S>>>0,_=_>>>0,x||O(S,_,this.length);let U=this[S+--_],X=1;for(;_>0&&(X*=256);)U+=this[S+--_]*X;return U},a.prototype.readUint8=a.prototype.readUInt8=function(S,_){return S=S>>>0,_||O(S,1,this.length),this[S]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(S,_){return S=S>>>0,_||O(S,2,this.length),this[S]|this[S+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(S,_){return S=S>>>0,_||O(S,2,this.length),this[S]<<8|this[S+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(S,_){return S=S>>>0,_||O(S,4,this.length),(this[S]|this[S+1]<<8|this[S+2]<<16)+this[S+3]*16777216},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(S,_){return S=S>>>0,_||O(S,4,this.length),this[S]*16777216+(this[S+1]<<16|this[S+2]<<8|this[S+3])},a.prototype.readBigUInt64LE=se(function(S){S=S>>>0,Y(S,"offset");const _=this[S],x=this[S+7];(_===void 0||x===void 0)&&be(S,this.length-8);const U=_+this[++S]*2**8+this[++S]*2**16+this[++S]*2**24,X=this[++S]+this[++S]*2**8+this[++S]*2**16+x*2**24;return BigInt(U)+(BigInt(X)<>>0,Y(S,"offset");const _=this[S],x=this[S+7];(_===void 0||x===void 0)&&be(S,this.length-8);const U=_*2**24+this[++S]*2**16+this[++S]*2**8+this[++S],X=this[++S]*2**24+this[++S]*2**16+this[++S]*2**8+x;return(BigInt(U)<>>0,_=_>>>0,x||O(S,_,this.length);let U=this[S],X=1,re=0;for(;++re<_&&(X*=256);)U+=this[S+re]*X;return X*=128,U>=X&&(U-=Math.pow(2,8*_)),U},a.prototype.readIntBE=function(S,_,x){S=S>>>0,_=_>>>0,x||O(S,_,this.length);let U=_,X=1,re=this[S+--U];for(;U>0&&(X*=256);)re+=this[S+--U]*X;return X*=128,re>=X&&(re-=Math.pow(2,8*_)),re},a.prototype.readInt8=function(S,_){return S=S>>>0,_||O(S,1,this.length),this[S]&128?(255-this[S]+1)*-1:this[S]},a.prototype.readInt16LE=function(S,_){S=S>>>0,_||O(S,2,this.length);const x=this[S]|this[S+1]<<8;return x&32768?x|4294901760:x},a.prototype.readInt16BE=function(S,_){S=S>>>0,_||O(S,2,this.length);const x=this[S+1]|this[S]<<8;return x&32768?x|4294901760:x},a.prototype.readInt32LE=function(S,_){return S=S>>>0,_||O(S,4,this.length),this[S]|this[S+1]<<8|this[S+2]<<16|this[S+3]<<24},a.prototype.readInt32BE=function(S,_){return S=S>>>0,_||O(S,4,this.length),this[S]<<24|this[S+1]<<16|this[S+2]<<8|this[S+3]},a.prototype.readBigInt64LE=se(function(S){S=S>>>0,Y(S,"offset");const _=this[S],x=this[S+7];(_===void 0||x===void 0)&&be(S,this.length-8);const U=this[S+4]+this[S+5]*2**8+this[S+6]*2**16+(x<<24);return(BigInt(U)<>>0,Y(S,"offset");const _=this[S],x=this[S+7];(_===void 0||x===void 0)&&be(S,this.length-8);const U=(_<<24)+this[++S]*2**16+this[++S]*2**8+this[++S];return(BigInt(U)<>>0,_||O(S,4,this.length),r.read(this,S,!0,23,4)},a.prototype.readFloatBE=function(S,_){return S=S>>>0,_||O(S,4,this.length),r.read(this,S,!1,23,4)},a.prototype.readDoubleLE=function(S,_){return S=S>>>0,_||O(S,8,this.length),r.read(this,S,!0,52,8)},a.prototype.readDoubleBE=function(S,_){return S=S>>>0,_||O(S,8,this.length),r.read(this,S,!1,52,8)};function E(k,S,_,x,U,X){if(!a.isBuffer(k))throw new TypeError('"buffer" argument must be a Buffer instance');if(S>U||Sk.length)throw new RangeError("Index out of range")}a.prototype.writeUintLE=a.prototype.writeUIntLE=function(S,_,x,U){if(S=+S,_=_>>>0,x=x>>>0,!U){const ve=Math.pow(2,8*x)-1;E(this,S,_,x,ve,0)}let X=1,re=0;for(this[_]=S&255;++re>>0,x=x>>>0,!U){const ve=Math.pow(2,8*x)-1;E(this,S,_,x,ve,0)}let X=x-1,re=1;for(this[_+X]=S&255;--X>=0&&(re*=256);)this[_+X]=S/re&255;return _+x},a.prototype.writeUint8=a.prototype.writeUInt8=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,1,255,0),this[_]=S&255,_+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,2,65535,0),this[_]=S&255,this[_+1]=S>>>8,_+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,2,65535,0),this[_]=S>>>8,this[_+1]=S&255,_+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,4,4294967295,0),this[_+3]=S>>>24,this[_+2]=S>>>16,this[_+1]=S>>>8,this[_]=S&255,_+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,4,4294967295,0),this[_]=S>>>24,this[_+1]=S>>>16,this[_+2]=S>>>8,this[_+3]=S&255,_+4};function F(k,S,_,x,U){L(S,x,U,k,_,7);let X=Number(S&BigInt(4294967295));k[_++]=X,X=X>>8,k[_++]=X,X=X>>8,k[_++]=X,X=X>>8,k[_++]=X;let re=Number(S>>BigInt(32)&BigInt(4294967295));return k[_++]=re,re=re>>8,k[_++]=re,re=re>>8,k[_++]=re,re=re>>8,k[_++]=re,_}function D(k,S,_,x,U){L(S,x,U,k,_,7);let X=Number(S&BigInt(4294967295));k[_+7]=X,X=X>>8,k[_+6]=X,X=X>>8,k[_+5]=X,X=X>>8,k[_+4]=X;let re=Number(S>>BigInt(32)&BigInt(4294967295));return k[_+3]=re,re=re>>8,k[_+2]=re,re=re>>8,k[_+1]=re,re=re>>8,k[_]=re,_+8}a.prototype.writeBigUInt64LE=se(function(S,_=0){return F(this,S,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=se(function(S,_=0){return D(this,S,_,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(S,_,x,U){if(S=+S,_=_>>>0,!U){const Se=Math.pow(2,8*x-1);E(this,S,_,x,Se-1,-Se)}let X=0,re=1,ve=0;for(this[_]=S&255;++X>0)-ve&255;return _+x},a.prototype.writeIntBE=function(S,_,x,U){if(S=+S,_=_>>>0,!U){const Se=Math.pow(2,8*x-1);E(this,S,_,x,Se-1,-Se)}let X=x-1,re=1,ve=0;for(this[_+X]=S&255;--X>=0&&(re*=256);)S<0&&ve===0&&this[_+X+1]!==0&&(ve=1),this[_+X]=(S/re>>0)-ve&255;return _+x},a.prototype.writeInt8=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,1,127,-128),S<0&&(S=255+S+1),this[_]=S&255,_+1},a.prototype.writeInt16LE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,2,32767,-32768),this[_]=S&255,this[_+1]=S>>>8,_+2},a.prototype.writeInt16BE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,2,32767,-32768),this[_]=S>>>8,this[_+1]=S&255,_+2},a.prototype.writeInt32LE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,4,2147483647,-2147483648),this[_]=S&255,this[_+1]=S>>>8,this[_+2]=S>>>16,this[_+3]=S>>>24,_+4},a.prototype.writeInt32BE=function(S,_,x){return S=+S,_=_>>>0,x||E(this,S,_,4,2147483647,-2147483648),S<0&&(S=4294967295+S+1),this[_]=S>>>24,this[_+1]=S>>>16,this[_+2]=S>>>8,this[_+3]=S&255,_+4},a.prototype.writeBigInt64LE=se(function(S,_=0){return F(this,S,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=se(function(S,_=0){return D(this,S,_,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function g(k,S,_,x,U,X){if(_+x>k.length)throw new RangeError("Index out of range");if(_<0)throw new RangeError("Index out of range")}function P(k,S,_,x,U){return S=+S,_=_>>>0,U||g(k,S,_,4),r.write(k,S,_,x,23,4),_+4}a.prototype.writeFloatLE=function(S,_,x){return P(this,S,_,!0,x)},a.prototype.writeFloatBE=function(S,_,x){return P(this,S,_,!1,x)};function b(k,S,_,x,U){return S=+S,_=_>>>0,U||g(k,S,_,8),r.write(k,S,_,x,52,8),_+8}a.prototype.writeDoubleLE=function(S,_,x){return b(this,S,_,!0,x)},a.prototype.writeDoubleBE=function(S,_,x){return b(this,S,_,!1,x)},a.prototype.copy=function(S,_,x,U){if(!a.isBuffer(S))throw new TypeError("argument should be a Buffer");if(x||(x=0),!U&&U!==0&&(U=this.length),_>=S.length&&(_=S.length),_||(_=0),U>0&&U=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),S.length-_>>0,x=x===void 0?this.length:x>>>0,S||(S=0);let X;if(typeof S=="number")for(X=_;X2**32?U=$(String(_)):typeof _=="bigint"&&(U=String(_),(_>BigInt(2)**BigInt(32)||_<-(BigInt(2)**BigInt(32)))&&(U=$(U)),U+="n"),x+=` It must be ${S}. Received ${U}`,x},RangeError);function $(k){let S="",_=k.length;const x=k[0]==="-"?1:0;for(;_>=x+4;_-=3)S=`_${k.slice(_-3,_)}${S}`;return`${k.slice(0,_)}${S}`}function M(k,S,_){Y(S,"offset"),(k[S]===void 0||k[S+_]===void 0)&&be(S,k.length-(_+1))}function L(k,S,_,x,U,X){if(k>_||k= 0${re} and < 2${re} ** ${(X+1)*8}${re}`:ve=`>= -(2${re} ** ${(X+1)*8-1}${re}) and < 2 ** ${(X+1)*8-1}${re}`,new w.ERR_OUT_OF_RANGE("value",ve,k)}M(x,U,X)}function Y(k,S){if(typeof k!="number")throw new w.ERR_INVALID_ARG_TYPE(S,"number",k)}function be(k,S,_){throw Math.floor(k)!==k?(Y(k,_),new w.ERR_OUT_OF_RANGE("offset","an integer",k)):S<0?new w.ERR_BUFFER_OUT_OF_BOUNDS:new w.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${S}`,k)}const Ne=/[^+/0-9A-Za-z-_]/g;function Ve(k){if(k=k.split("=")[0],k=k.trim().replace(Ne,""),k.length<2)return"";for(;k.length%4!==0;)k=k+"=";return k}function Me(k,S){S=S||1/0;let _;const x=k.length;let U=null;const X=[];for(let re=0;re55295&&_<57344){if(!U){if(_>56319){(S-=3)>-1&&X.push(239,191,189);continue}else if(re+1===x){(S-=3)>-1&&X.push(239,191,189);continue}U=_;continue}if(_<56320){(S-=3)>-1&&X.push(239,191,189),U=_;continue}_=(U-55296<<10|_-56320)+65536}else U&&(S-=3)>-1&&X.push(239,191,189);if(U=null,_<128){if((S-=1)<0)break;X.push(_)}else if(_<2048){if((S-=2)<0)break;X.push(_>>6|192,_&63|128)}else if(_<65536){if((S-=3)<0)break;X.push(_>>12|224,_>>6&63|128,_&63|128)}else if(_<1114112){if((S-=4)<0)break;X.push(_>>18|240,_>>12&63|128,_>>6&63|128,_&63|128)}else throw new Error("Invalid code point")}return X}function Fe(k){const S=[];for(let _=0;_>8,U=_%256,X.push(U),X.push(x);return X}function Pe(k){return t.toByteArray(Ve(k))}function Be(k,S,_,x){let U;for(U=0;U=S.length||U>=k.length);++U)S[U+_]=k[U];return U}function le(k,S){return k instanceof S||k!=null&&k.constructor!=null&&k.constructor.name!=null&&k.constructor.name===S.name}function Te(k){return k!==k}const W=function(){const k="0123456789abcdef",S=new Array(256);for(let _=0;_<16;++_){const x=_*16;for(let U=0;U<16;++U)S[x+U]=k[_]+k[U]}return S}();function se(k){return typeof BigInt>"u"?ce:k}function ce(){throw new Error("BigInt not supported")}}(vf)),vf}/*! safe-buffer. MIT License. Feross Aboukhadijeh */var Yv;function pJ(){return Yv||(Yv=1,function(e,t){var r=lJ(),n=r.Buffer;function u(o,a){for(var i in o)a[i]=o[i]}n.from&&n.alloc&&n.allocUnsafe&&n.allocUnsafeSlow?e.exports=r:(u(r,t),t.Buffer=s);function s(o,a,i){return n(o,a,i)}s.prototype=Object.create(n.prototype),u(n,s),s.from=function(o,a,i){if(typeof o=="number")throw new TypeError("Argument must not be a number");return n(o,a,i)},s.alloc=function(o,a,i){if(typeof o!="number")throw new TypeError("Argument must be a number");var c=n(o);return a!==void 0?typeof i=="string"?c.fill(a,i):c.fill(a):c.fill(0),c},s.allocUnsafe=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return n(o)},s.allocUnsafeSlow=function(o){if(typeof o!="number")throw new TypeError("Argument must be a number");return r.SlowBuffer(o)}}(iJ,Ai)),Ai}var Zv;function dJ(){if(Zv)return yf;Zv=1;var e=pJ().Buffer,t=e.isEncoding||function(m){switch(m=""+m,m&&m.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}};function r(m){if(!m)return"utf8";for(var v;;)switch(m){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 m;default:if(v)return;m=(""+m).toLowerCase(),v=!0}}function n(m){var v=r(m);if(typeof v!="string"&&(e.isEncoding===t||!t(m)))throw new Error("Unknown encoding: "+m);return v||m}yf.StringDecoder=u;function u(m){this.encoding=n(m);var v;switch(this.encoding){case"utf16le":this.text=p,this.end=d,v=4;break;case"utf8":this.fillLast=i,v=4;break;case"base64":this.text=f,this.end=h,v=3;break;default:this.write=y,this.end=A;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=e.allocUnsafe(v)}u.prototype.write=function(m){if(m.length===0)return"";var v,C;if(this.lastNeed){if(v=this.fillLast(m),v===void 0)return"";C=this.lastNeed,this.lastNeed=0}else C=0;return C>5===6?2:m>>4===14?3:m>>3===30?4:m>>6===2?-1:-2}function o(m,v,C){var B=v.length-1;if(B=0?(T>0&&(m.lastNeed=T-1),T):--B=0?(T>0&&(m.lastNeed=T-2),T):--B=0?(T>0&&(T===2?T=0:m.lastNeed=T-3),T):0))}function a(m,v,C){if((v[0]&192)!==128)return m.lastNeed=0,"�";if(m.lastNeed>1&&v.length>1){if((v[1]&192)!==128)return m.lastNeed=1,"�";if(m.lastNeed>2&&v.length>2&&(v[2]&192)!==128)return m.lastNeed=2,"�"}}function i(m){var v=this.lastTotal-this.lastNeed,C=a(this,m);if(C!==void 0)return C;if(this.lastNeed<=m.length)return m.copy(this.lastChar,v,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);m.copy(this.lastChar,v,0,m.length),this.lastNeed-=m.length}function c(m,v){var C=o(this,m,v);if(!this.lastNeed)return m.toString("utf8",v);this.lastTotal=C;var B=m.length-(C-this.lastNeed);return m.copy(this.lastChar,0,B),m.toString("utf8",v,B)}function l(m){var v=m&&m.length?this.write(m):"";return this.lastNeed?v+"�":v}function p(m,v){if((m.length-v)%2===0){var C=m.toString("utf16le",v);if(C){var B=C.charCodeAt(C.length-1);if(B>=55296&&B<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1],C.slice(0,-1)}return C}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=m[m.length-1],m.toString("utf16le",v,m.length-1)}function d(m){var v=m&&m.length?this.write(m):"";if(this.lastNeed){var C=this.lastTotal-this.lastNeed;return v+this.lastChar.toString("utf16le",0,C)}return v}function f(m,v){var C=(m.length-v)%3;return C===0?m.toString("base64",v):(this.lastNeed=3-C,this.lastTotal=3,C===1?this.lastChar[0]=m[m.length-1]:(this.lastChar[0]=m[m.length-2],this.lastChar[1]=m[m.length-1]),m.toString("base64",v,m.length-C))}function h(m){var v=m&&m.length?this.write(m):"";return this.lastNeed?v+this.lastChar.toString("base64",0,3-this.lastNeed):v}function y(m){return m.toString(this.encoding)}function A(m){return m&&m.length?this.write(m):""}return yf}(function(e){(function(t){t.parser=function(b,w){return new n(b,w)},t.SAXParser=n,t.SAXStream=l,t.createStream=c,t.MAX_BUFFER_LENGTH=64*1024;var r=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];t.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"];function n(b,w){if(!(this instanceof n))return new n(b,w);var I=this;s(I),I.q=I.c="",I.bufferCheckPosition=t.MAX_BUFFER_LENGTH,I.opt=w||{},I.opt.lowercase=I.opt.lowercase||I.opt.lowercasetags,I.looseCase=I.opt.lowercase?"toLowerCase":"toUpperCase",I.tags=[],I.closed=I.closedRoot=I.sawRoot=!1,I.tag=I.error=null,I.strict=!!b,I.noscript=!!(b||I.opt.noscript),I.state=q.BEGIN,I.strictEntities=I.opt.strictEntities,I.ENTITIES=I.strictEntities?Object.create(t.XML_ENTITIES):Object.create(t.ENTITIES),I.attribList=[],I.opt.xmlns&&(I.ns=Object.create(y)),I.trackPosition=I.opt.position!==!1,I.trackPosition&&(I.position=I.line=I.column=0),ee(I,"onready")}Object.create||(Object.create=function(b){function w(){}w.prototype=b;var I=new w;return I}),Object.keys||(Object.keys=function(b){var w=[];for(var I in b)b.hasOwnProperty(I)&&w.push(I);return w});function u(b){for(var w=Math.max(t.MAX_BUFFER_LENGTH,10),I=0,$=0,M=r.length;$w)switch(r[$]){case"textNode":ue(b);break;case"cdata":K(b,"oncdata",b.cdata),b.cdata="";break;case"script":K(b,"onscript",b.script),b.script="";break;default:de(b,"Max buffer length exceeded: "+r[$])}I=Math.max(I,L)}var Y=t.MAX_BUFFER_LENGTH-I;b.bufferCheckPosition=Y+b.position}function s(b){for(var w=0,I=r.length;w"||B(b)}function R(b,w){return b.test(w)}function J(b,w){return!R(b,w)}var q=0;t.STATE={BEGIN:q++,BEGIN_WHITESPACE:q++,TEXT:q++,TEXT_ENTITY:q++,OPEN_WAKA:q++,SGML_DECL:q++,SGML_DECL_QUOTED:q++,DOCTYPE:q++,DOCTYPE_QUOTED:q++,DOCTYPE_DTD:q++,DOCTYPE_DTD_QUOTED:q++,COMMENT_STARTING:q++,COMMENT:q++,COMMENT_ENDING:q++,COMMENT_ENDED:q++,CDATA:q++,CDATA_ENDING:q++,CDATA_ENDING_2:q++,PROC_INST:q++,PROC_INST_BODY:q++,PROC_INST_ENDING:q++,OPEN_TAG:q++,OPEN_TAG_SLASH:q++,ATTRIB:q++,ATTRIB_NAME:q++,ATTRIB_NAME_SAW_WHITE:q++,ATTRIB_VALUE:q++,ATTRIB_VALUE_QUOTED:q++,ATTRIB_VALUE_CLOSED:q++,ATTRIB_VALUE_UNQUOTED:q++,ATTRIB_VALUE_ENTITY_Q:q++,ATTRIB_VALUE_ENTITY_U:q++,CLOSE_TAG:q++,CLOSE_TAG_SAW_WHITE:q++,SCRIPT:q++,SCRIPT_ENDING:q++},t.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},t.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},Object.keys(t.ENTITIES).forEach(function(b){var w=t.ENTITIES[b],I=typeof w=="number"?String.fromCharCode(w):w;t.ENTITIES[b]=I});for(var G in t.STATE)t.STATE[t.STATE[G]]=G;q=t.STATE;function ee(b,w,I){b[w]&&b[w](I)}function K(b,w,I){b.textNode&&ue(b),ee(b,w,I)}function ue(b){b.textNode=oe(b.opt,b.textNode),b.textNode&&ee(b,"ontext",b.textNode),b.textNode=""}function oe(b,w){return b.trim&&(w=w.trim()),b.normalize&&(w=w.replace(/\s+/g," ")),w}function de(b,w){return ue(b),b.trackPosition&&(w+=` Line: `+b.line+` Column: `+b.column+` -Char: `+b.c),w=new Error(w),b.error=w,te(b,"onerror",w),b}function De(b){return b.sawRoot&&!b.closedRoot&&de(b,"Unclosed root tag"),b.state!==j.BEGIN&&b.state!==j.BEGIN_WHITESPACE&&b.state!==j.TEXT&&fe(b,"Unexpected end"),oe(b),b.c="",b.closed=!0,te(b,"onend"),n.call(b,b.strict,b.opt),b}function de(b,w){if(typeof b!="object"||!(b instanceof n))throw new Error("bad call to strictFail");b.strict&&fe(b,w)}function Ce(b){b.strict||(b.tagName=b.tagName[b.looseCase]());var w=b.tags[b.tags.length-1]||b,x=b.tag={name:b.tagName,attributes:{}};b.opt.xmlns&&(x.ns=w.ns),b.attribList.length=0,Y(b,"onopentagstart",x)}function pe(b,w){var x=b.indexOf(":"),k=x<0?["",b]:b.split(":"),G=k[0],H=k[1];return w&&b==="xmlns"&&(G="xmlns",H=""),{prefix:G,local:H}}function Q(b){if(b.strict||(b.attribName=b.attribName[b.looseCase]()),b.attribList.indexOf(b.attribName)!==-1||b.tag.attributes.hasOwnProperty(b.attribName)){b.attribName=b.attribValue="";return}if(b.opt.xmlns){var w=pe(b.attribName,!0),x=w.prefix,k=w.local;if(x==="xmlns")if(k==="xml"&&b.attribValue!==d)de(b,"xml: prefix must be bound to "+d+` -Actual: `+b.attribValue);else if(k==="xmlns"&&b.attribValue!==h)de(b,"xmlns: prefix must be bound to "+h+` -Actual: `+b.attribValue);else{var G=b.tag,H=b.tags[b.tags.length-1]||b;G.ns===H.ns&&(G.ns=Object.create(H.ns)),G.ns[k]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,Y(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}function q(b,w){if(b.opt.xmlns){var x=b.tag,k=pe(b.tagName);x.prefix=k.prefix,x.local=k.local,x.uri=x.ns[k.prefix]||"",x.prefix&&!x.uri&&(de(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),x.uri=k.prefix);var G=b.tags[b.tags.length-1]||b;x.ns&&G.ns!==x.ns&&Object.keys(x.ns).forEach(function(ce){Y(b,"onopennamespace",{prefix:ce,uri:x.ns[ce]})});for(var H=0,re=b.attribList.length;H",b.tagName="",b.state=j.SCRIPT;return}Y(b,"onscript",b.script),b.script=""}var w=b.tags.length,x=b.tagName;b.strict||(x=x[b.looseCase]());for(var k=x;w--;){var G=b.tags[w];if(G.name!==k)de(b,"Unexpected close tag");else break}if(w<0){de(b,"Unmatched closing tag: "+b.tagName),b.textNode+="",b.state=j.TEXT;return}b.tagName=x;for(var H=b.tags.length;H-- >w;){var re=b.tag=b.tags.pop();b.tagName=b.tag.name,Y(b,"onclosetag",b.tagName);var _e={};for(var Le in re.ns)_e[Le]=re.ns[Le];var Ue=b.tags[b.tags.length-1]||b;b.opt.xmlns&&re.ns!==Ue.ns&&Object.keys(re.ns).forEach(function(Ge){var be=re.ns[Ge];Y(b,"onclosenamespace",{prefix:Ge,uri:be})})}w===0&&(b.closedRoot=!0),b.tagName=b.attribValue=b.attribName="",b.attribList.length=0,b.state=j.TEXT}function C(b){var w=b.entity,x=w.toLowerCase(),k,G="";return b.ENTITIES[w]?b.ENTITIES[w]:b.ENTITIES[x]?b.ENTITIES[x]:(w=x,w.charAt(0)==="#"&&(w.charAt(1)==="x"?(w=w.slice(2),k=parseInt(w,16),G=k.toString(16)):(w=w.slice(1),k=parseInt(w,10),G=k.toString(10))),w=w.replace(/^0+/,""),isNaN(k)||G.toLowerCase()!==w?(de(b,"Invalid character entity"),"&"+b.entity+";"):String.fromCodePoint(k))}function D(b,w){w==="<"?(b.state=j.OPEN_WAKA,b.startTagPosition=b.position):B(w)||(de(b,"Non-whitespace before first tag."),b.textNode=w,b.state=j.TEXT)}function g(b,w){var x="";return w"?(Y(w,"onsgmldeclaration",w.sgmlDecl),w.sgmlDecl="",w.state=j.TEXT):(P(k)&&(w.state=j.SGML_DECL_QUOTED),w.sgmlDecl+=k);continue;case j.SGML_DECL_QUOTED:k===w.q&&(w.state=j.SGML_DECL,w.q=""),w.sgmlDecl+=k;continue;case j.DOCTYPE:k===">"?(w.state=j.TEXT,Y(w,"ondoctype",w.doctype),w.doctype=!0):(w.doctype+=k,k==="["?w.state=j.DOCTYPE_DTD:P(k)&&(w.state=j.DOCTYPE_QUOTED,w.q=k));continue;case j.DOCTYPE_QUOTED:w.doctype+=k,k===w.q&&(w.q="",w.state=j.DOCTYPE);continue;case j.DOCTYPE_DTD:w.doctype+=k,k==="]"?w.state=j.DOCTYPE:P(k)&&(w.state=j.DOCTYPE_DTD_QUOTED,w.q=k);continue;case j.DOCTYPE_DTD_QUOTED:w.doctype+=k,k===w.q&&(w.state=j.DOCTYPE_DTD,w.q="");continue;case j.COMMENT:k==="-"?w.state=j.COMMENT_ENDING:w.comment+=k;continue;case j.COMMENT_ENDING:k==="-"?(w.state=j.COMMENT_ENDED,w.comment=ie(w.opt,w.comment),w.comment&&Y(w,"oncomment",w.comment),w.comment=""):(w.comment+="-"+k,w.state=j.COMMENT);continue;case j.COMMENT_ENDED:k!==">"?(de(w,"Malformed comment"),w.comment+="--"+k,w.state=j.COMMENT):w.state=j.TEXT;continue;case j.CDATA:k==="]"?w.state=j.CDATA_ENDING:w.cdata+=k;continue;case j.CDATA_ENDING:k==="]"?w.state=j.CDATA_ENDING_2:(w.cdata+="]"+k,w.state=j.CDATA);continue;case j.CDATA_ENDING_2:k===">"?(w.cdata&&Y(w,"oncdata",w.cdata),Y(w,"onclosecdata"),w.cdata="",w.state=j.TEXT):k==="]"?w.cdata+="]":(w.cdata+="]]"+k,w.state=j.CDATA);continue;case j.PROC_INST:k==="?"?w.state=j.PROC_INST_ENDING:B(k)?w.state=j.PROC_INST_BODY:w.procInstName+=k;continue;case j.PROC_INST_BODY:if(!w.procInstBody&&B(k))continue;k==="?"?w.state=j.PROC_INST_ENDING:w.procInstBody+=k;continue;case j.PROC_INST_ENDING:k===">"?(Y(w,"onprocessinginstruction",{name:w.procInstName,body:w.procInstBody}),w.procInstName=w.procInstBody="",w.state=j.TEXT):(w.procInstBody+="?"+k,w.state=j.PROC_INST_BODY);continue;case j.OPEN_TAG:I(m,k)?w.tagName+=k:(Ce(w),k===">"?q(w):k==="/"?w.state=j.OPEN_TAG_SLASH:(B(k)||de(w,"Invalid character in tag name"),w.state=j.ATTRIB));continue;case j.OPEN_TAG_SLASH:k===">"?(q(w,!0),v(w)):(de(w,"Forward-slash in opening tag not followed by >"),w.state=j.ATTRIB);continue;case j.ATTRIB:if(B(k))continue;k===">"?q(w):k==="/"?w.state=j.OPEN_TAG_SLASH:I(A,k)?(w.attribName=k,w.attribValue="",w.state=j.ATTRIB_NAME):de(w,"Invalid attribute name");continue;case j.ATTRIB_NAME:k==="="?w.state=j.ATTRIB_VALUE:k===">"?(de(w,"Attribute without value"),w.attribValue=w.attribName,Q(w),q(w)):B(k)?w.state=j.ATTRIB_NAME_SAW_WHITE:I(m,k)?w.attribName+=k:de(w,"Invalid attribute name");continue;case j.ATTRIB_NAME_SAW_WHITE:if(k==="=")w.state=j.ATTRIB_VALUE;else{if(B(k))continue;de(w,"Attribute without value"),w.tag.attributes[w.attribName]="",w.attribValue="",Y(w,"onattribute",{name:w.attribName,value:""}),w.attribName="",k===">"?q(w):I(A,k)?(w.attribName=k,w.state=j.ATTRIB_NAME):(de(w,"Invalid attribute name"),w.state=j.ATTRIB)}continue;case j.ATTRIB_VALUE:if(B(k))continue;P(k)?(w.q=k,w.state=j.ATTRIB_VALUE_QUOTED):(de(w,"Unquoted attribute value"),w.state=j.ATTRIB_VALUE_UNQUOTED,w.attribValue=k);continue;case j.ATTRIB_VALUE_QUOTED:if(k!==w.q){k==="&"?w.state=j.ATTRIB_VALUE_ENTITY_Q:w.attribValue+=k;continue}Q(w),w.q="",w.state=j.ATTRIB_VALUE_CLOSED;continue;case j.ATTRIB_VALUE_CLOSED:B(k)?w.state=j.ATTRIB:k===">"?q(w):k==="/"?w.state=j.OPEN_TAG_SLASH:I(A,k)?(de(w,"No whitespace between attributes"),w.attribName=k,w.attribValue="",w.state=j.ATTRIB_NAME):de(w,"Invalid attribute name");continue;case j.ATTRIB_VALUE_UNQUOTED:if(!$(k)){k==="&"?w.state=j.ATTRIB_VALUE_ENTITY_U:w.attribValue+=k;continue}Q(w),k===">"?q(w):w.state=j.ATTRIB;continue;case j.CLOSE_TAG:if(w.tagName)k===">"?v(w):I(m,k)?w.tagName+=k:w.script?(w.script+=""?v(w):de(w,"Invalid characters in closing tag");continue;case j.TEXT_ENTITY:case j.ATTRIB_VALUE_ENTITY_Q:case j.ATTRIB_VALUE_ENTITY_U:var re,_e;switch(w.state){case j.TEXT_ENTITY:re=j.TEXT,_e="textNode";break;case j.ATTRIB_VALUE_ENTITY_Q:re=j.ATTRIB_VALUE_QUOTED,_e="attribValue";break;case j.ATTRIB_VALUE_ENTITY_U:re=j.ATTRIB_VALUE_UNQUOTED,_e="attribValue";break}k===";"?(w[_e]+=C(w),w.entity="",w.state=re):I(w.entity.length?F:y,k)?w.entity+=k:(de(w,"Invalid character in entity name"),w[_e]+="&"+w.entity+k,w.entity="",w.state=re);continue;default:throw new Error(w,"Unknown state: "+w.state)}return w.position>=w.bufferCheckPosition&&u(w),w}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var b=String.fromCharCode,w=Math.floor,x=function(){var k=16384,G=[],H,re,_e=-1,Le=arguments.length;if(!Le)return"";for(var Ue="";++_e1114111||w(Ge)!==Ge)throw RangeError("Invalid code point: "+Ge);Ge<=65535?G.push(Ge):(Ge-=65536,H=(Ge>>10)+55296,re=Ge%1024+56320,G.push(H,re)),(_e+1===Le||G.length>k)&&(Ue+=b.apply(null,G),G.length=0)}return Ue};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:x,configurable:!0,writable:!0}):String.fromCodePoint=x}()})(e)})(r7);class SW{constructor(){this.sax=r7.parser(!0),this.sax.ontext=t=>this.handleSaxText(t),this.sax.onopentag=t=>this.handleSaxOpenTag(t),this.sax.onclosetag=t=>this.handleSaxCloseTag(t),this.lexed=[],this.elementStack=[],this.currentText="",this.openTagHandlers={usx:this.ignoreHandler,book:this.handleBookOpen,chapter:this.handleChapter,verse:this.handleVerses,para:this.handleParaOpen,table:this.ignoreHandler,row:this.handleRowOpen,cell:this.handleCellOpen,char:this.handleCharOpen,ms:this.handleMSOpen,note:this.handleNoteOpen,sidebar:this.handleSidebarOpen,periph:this.notHandledHandler,figure:this.handleFigureOpen,optbreak:this.handleOptBreakOpen,ref:this.ignoreHandler},this.closeTagHandlers={usx:this.ignoreHandler,book:this.handleBookClose,chapter:this.ignoreHandler,verse:this.ignoreHandler,para:this.handleParaClose,table:this.ignoreHandler,row:this.handleRowClose,cell:this.handleCellClose,char:this.handleCharClose,ms:this.handleMSClose,note:this.handleNoteClose,sidebar:this.handleSidebarClose,periph:this.notHandledHandler,figure:this.handleFigureClose,optbreak:this.handleOptBreakClose,ref:this.ignoreHandler}}lexAndParse(t,r){this.parser=r,this.lexed=[],this.elementStack=[],this.sax.write(t).close()}handleSaxText(t){this.currentText=this.replaceEntities(t),ne.match(this.currentText,e7,"all").map(r=>t7(r,ds)).forEach(r=>this.parser.parseItem(r))}replaceEntities(t){return t.replace("<","<").replace(">",">").replace("'","'").replace(""",'"').replace("&","&")}handleSaxOpenTag(t){const r=t.name,n=t.attributes;if(r in this.openTagHandlers)this.openTagHandlers[r](this,"open",r,n);else throw new Error(`Unexpected open element tag '${r}' in UsxParser`)}handleSaxCloseTag(t){this.closeTagHandlers[t](this,"close",t)}notHandledHandler(t,r,n){console.error(`WARNING: ${r} element tag '${n}' is not handled by UsxParser`)}stackPush(t,r){this.elementStack.push([t,r])}stackPop(){return this.elementStack.pop()}splitTagNumber(t){const r=ne.exec(t,ne("([^1-9]+)(.*)")),n=r[1],u=r[2].length>0?r[2]:"1";return[n,u]}ignoreHandler(t,r,n){}handleParaOpen(t,r,n,u){t.currentText="";const[s,o]=t.splitTagNumber(u.style);["cp"].includes(s)||t.parser.parseItem(Xe.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleParaClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);["cp"].includes(n)?t.parser.parseItem(Xe.pubchapter("pubchapter",[null,null,t.currentText])):t.parser.parseItem(Xe.tag("endTag",[null,null,n,u])),t.currentText=""}handleCharOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Xe.tag("startTag",[null,null,`+${s}`,o]));const a=["sid","eid","style","srcloc","link-href","link-title","link-id","closed"];for(const[i,c]of Object.entries(u))a.includes(i)||t.parser.parseItem(Xe.attribute("attribute",[null,null,i,c]));t.stackPush(n,u)}handleCharClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Xe.tag("endTag",[null,null,`+${n}`,u]))}handleRefOpen(t){t.parser.parseItem(Xe.tag("startTag",[null,null,"xt",""]))}handleRefClose(t){t.parser.parseItem(Xe.tag("endTag",[null,null,"xt",""]))}handleRowOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Xe.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleRowClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Xe.tag("endTag",[null,null,n,u]))}handleCellOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Xe.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleCellClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Xe.tag("endTag",[null,null,n,u]))}handleBookOpen(t,r,n,u){t.parser.parseItem(Xe.tag("startTag",[null,null,"id",""])),t.parser.parseItem(Xe.printable("wordLike",[u.code])),t.parser.parseItem(Xe.printable("lineSpace",[" "])),t.stackPush(n,u)}handleBookClose(t){t.stackPop(),t.parser.parseItem(Xe.tag("endTag",[null,null,"id",""]))}handleChapter(t,r,n,u){u.number&&(t.parser.parseItem(Xe.chapter("chapter",[null,null,u.number])),u.pubnumber&&t.parser.parseItem(Xe.pubchapter("pubchapter",[null,null,u.pubnumber])),u.altnumber&&(t.parser.parseItem(Xe.tag("startTag",[null,null,"+ca",""])),t.parser.parseItem(Xe.printable("wordLike",[u.altnumber])),t.parser.parseItem(Xe.tag("endTag",[null,null,"+ca",""]))))}handleVerses(t,r,n,u){u.number&&(t.parser.parseItem(Xe.verses("verses",[null,null,u.number])),u.pubnumber&&(t.parser.parseItem(Xe.tag("startTag",[null,null,"+vp",""])),t.parser.parseItem(Xe.printable("wordLike",[u.pubnumber])),t.parser.parseItem(Xe.tag("endTag",[null,null,"+vp",""]))),u.altnumber&&(t.parser.parseItem(Xe.tag("startTag",[null,null,"+va",""])),t.parser.parseItem(Xe.printable("wordLike",[u.altnumber])),t.parser.parseItem(Xe.tag("endTag",[null,null,"+va",""]))))}handleNoteOpen(t,r,n,u){t.parser.parseItem(Xe.tag("startTag",[null,null,u.style,""])),t.parser.parseItem(Xe.printable("punctuation",[u.caller])),t.stackPush(n,u)}handleNoteClose(t){const r=t.stackPop()[1];t.parser.parseItem(Xe.tag("endTag",[null,null,r.style,""]))}handleSidebarOpen(t,r,n,u){t.parser.parseItem(Xe.tag("startTag",[null,null,"esb",""])),"category"in u&&(t.parser.parseItem(Xe.tag("startTag",[null,null,"cat",""])),t.parser.parseItem(Xe.printable("wordLike",[u.category])),t.parser.parseItem(Xe.tag("endTag",[null,null,"cat",""]))),t.stackPush(n,u)}handleSidebarClose(t){t.stackPop(),t.parser.parseItem(Xe.tag("startTag",[null,null,"esbe",""]))}handleMSOpen(t,r,n,u){let s=ne.exec(u.style,ne("(([a-z1-9]+)-([se]))"));if(s){const o=Xe.milestone("startMilestoneTag",[null,null,s[2],s[3]]);t.parser.parseItem(o);const a=["sid","eid","style","srcloc","link-href","link-title","link-id"];for(const[i,c]of Object.entries(u))a.includes(i)||t.parser.parseItem(Xe.attribute("attribute",[null,null,i,c]));t.parser.parseItem(Xe.milestone("endMilestoneMarker"))}else{const o=Xe.milestone("emptyMilestone",[null,null,u.style,""]);t.parser.parseItem(o)}t.stackPush(n,u)}handleMSClose(t){t.stackPop()}handleFigureOpen(t,r,n,u){t.parser.parseItem(Xe.tag("startTag",[null,null,"+fig",""]));for(const[s,o]of Object.entries(u)){if(s==="style")continue;const a=s==="file"?"src":s;t.parser.parseItem(Xe.attribute("attribute",[null,null,a,o]))}t.stackPush(n,u)}handleFigureClose(t){t.stackPop()[1],t.parser.parseItem(Xe.tag("endTag",[null,null,"+fig",""]))}handleOptBreakOpen(t,r,n,u){t.parser.parseItem(Xe.printable("softLineBreak",["//"])),t.stackPush(n,u)}handleOptBreakClose(t){t.stackPop()}}const wW=(e,t)=>{new SW().lexAndParse(e,t)},Po=Ae.ByteArray,{pushSuccinctGraftBytes:_W,pushSuccinctScopeBytes:BW,pushSuccinctTokenBytes:TW}=Ae.succinct,{addTag:$W}=Ae.tags,{labelForScope:l1}=Ae.scopeDefs,{itemEnum:PW}=Ae.itemDefs,{scopeEnum:OW}=Ae.scopeDefs,{tokenCategory:kW,tokenEnum:IW}=Ae.tokenDefs,Cu=class{constructor(e){this.id=Ae.generateId(),this.type=e,this.tags=new Set([]),this.blocks=[],this.activeScopes=[]}addTag(e){$W(this.tags,e)}plainText(){return this.blocks.map(e=>e.plainText()).join("").trim()}addItem(e){this.lastBlock().addItem(e)}addBlockGraft(e){this.newBlock("hangingGraft"),this.lastBlock().bg.push(e)}lastBlock(){return this.blocks.length===0&&this.newBlock("orphanTokens"),this.blocks[this.blocks.length-1]}newBlock(e){this.blocks.length>0&&["orphanTokens","hangingGraft"].includes(this.blocks[this.blocks.length-1].bs.payload)?this.lastBlock().bs={type:"scope",subType:"start",payload:e}:this.blocks.push(new NW(e))}trim(){this.blocks.forEach(e=>e.trim())}reorderSpanWithAtts(){this.blocks.forEach(e=>e.reorderSpanWithAtts())}makeNoteGrafts(e){this.blocks.forEach(t=>t.makeNoteGrafts(e))}close(e){for(const t of this.activeScopes.filter(()=>!0).reverse())this.closeActiveScope(e,t);this.activeScopes=[]}closeActiveScope(e,t){this.addItem({type:"scope",subType:"end",payload:t.label}),t.onEnd&&t.onEnd(e,t.label)}filterGrafts(e){return this.blocks.map(t=>t.filterGrafts(e)).reduce((t,r)=>t.concat(r),[])}filterScopes(e){this.blocks.forEach(t=>t.filterScopes(e))}text(){return this.blocks.map(e=>e.text()).join("")}addTableScopes(){let e=!1;for(const[t,r]of this.blocks.entries())!e&&r.bs.payload==="blockTag/tr"?(e=!0,this.blocks[t].items.unshift({type:"scope",subType:"start",payload:l1("table",[])})):e&&r.bs.payload!=="blockTag/tr"&&(e=!1,this.blocks[t-1].items.push({type:"scope",subType:"end",payload:l1("table",[])}));e&&this.lastBlock().items.push({type:"scope",subType:"end",payload:l1("table",[])})}graftifyIntroductionHeadings(e){let t=[...this.blocks.entries()];t.reverse();const r=["iot","is"].concat(e.customTags.introHeading);for(const[n,u]of t){const s=u.bs.payload.split("/")[1].replace(/[0-9]/g,"");if(r.includes(s)){const o=new Cu("heading");e.sequences.heading.push(o),o.blocks.push(u);const a={type:"graft",subType:"heading",payload:o.id};this.blocks.length1&&(this.moveOrphanStartScopes(),this.moveOrphanEndScopes())}moveOrphanStartScopes(){for(const[e,t]of this.blocks.entries())if(!(e>=this.blocks.length-1))for(const r of[...t.items].reverse()){if(r.subType!=="start"||r.payload.startsWith("altChapter"))break;this.blocks[e+1].items.unshift(this.blocks[e].items.pop())}}moveOrphanStartScopes2(){for(const[e,t]of this.blocks.entries())if(!(e>=this.blocks.length-1))for(const r of[...t.items].reverse()){if(r.subType!=="start")break;this.blocks[e+1].items.unshift(this.blocks[e].items.pop())}}moveOrphanEndScopes(){for(const[e,t]of this.blocks.entries())if(e!==0)for(const r of[...t.items]){if(r.subType!=="end")break;this.blocks[e-1].items.push(this.blocks[e].items.shift())}}removeEmptyBlocks(e){const t=["blockTag/b","blockTag/ib"].concat(e),r=[];let n=!1;for(const u of this.blocks.entries())u[1].tokens().length===0&&!t.includes(u[1].bs.payload)&&r.push(u);for(const[u,s]of r.reverse())if(ut.removeGraftsToEmptySequences(e))}succinctifyBlocks(e){const t=[];let r=[];const n=s=>{s.subType==="start"?r.filter(a=>a.payload===s.payload).length===0&&r.push(s):r=r.filter(o=>o.payload!==s.payload)};let u=0;for(const s of this.blocks){const o=new Po(s.length),a=new Po(1),i=new Po(1),c=new Po(1),l=new Po(1);l.pushNByte(u);for(const d of s.bg)this.pushSuccinctGraft(a,e,d);for(const d of r)this.pushSuccinctScope(i,e,d);const p=[];for(const d of s.items)switch(d.type){case"token":this.pushSuccinctToken(o,e,d),d.subType==="wordLike"&&u++;break;case"graft":this.pushSuccinctGraft(o,e,d);break;case"scope":this.pushSuccinctScope(o,e,d),n(d),d.subType==="start"&&p.push(d);break;default:throw new Error(`Item type ${d.type} is not handled in succinctifyBlocks`)}const f=new Po(10);this.pushSuccinctScope(f,e,s.bs);for(const d of p)this.pushSuccinctScope(c,e,d);o.trim(),a.trim(),f.trim(),i.trim(),c.trim(),t.push({c:o,bs:f,bg:a,os:i,is:c,nt:l})}return t}pushSuccinctToken(e,t,r){const n=t.enumForCategoryValue(kW[r.subType],r.payload);TW(e,IW[r.subType],n)}pushSuccinctGraft(e,t,r){const n=t.enumForCategoryValue("graftTypes",r.subType),u=t.enumForCategoryValue("ids",r.payload);_W(e,n,u)}pushSuccinctScope(e,t,r){const n=r.payload.split("/"),u=OW[n[0]],s=n.slice(1).map(o=>t.enumForCategoryValue("scopeBits",o));BW(e,PW[`${r.subType}Scope`],u,s)}},NW=class{constructor(e){this.id=Ae.generateId(),this.items=[],this.bg=[],this.bs={type:"scope",subType:"start",payload:e},this.os=[]}addItem(e){this.items.push(e)}plainText(){return this.items.filter(e=>e.type==="token").map(e=>e.payload).join("")}trim(){this.items=this.trimEnd(this.trimStart(this.items))}reorderSpanWithAtts(){const e=[];for(const[t,r]of this.items.entries())r.subType==="start"&&r.payload.startsWith("spanWithAtts")&&e.push(t+1);for(const t of e){let r=t,n=[],u=[];for(;!(r>=this.items.length);){const s=this.items[r];if(s.type==="token")n.push(s);else if(s.subType==="start"&&s.payload.startsWith("attribute/spanWithAtts"))u.push(s);else break;r++}if(n.length!==0&&u.length!==0){let s=t;for(const o of u)this.items[s]=o,s++;for(const o of n)this.items[s]=o,s++}}}inlineToEnd(){let e=null;for(const[t,r]of this.items.entries())if(r.subType==="end"&&["inline/f","inline/fe","inline/x"].includes(r.payload)){e=r,this.items.splice(t,1);break}e&&this.addItem(e)}makeNoteGrafts(e){const t=[];for(const[r,n]of this.items.entries())n.subType==="start"&&(n.payload.startsWith("inline/f")||n.payload.startsWith("inline/x"))&&t.push(r);for(const r of t){const n=this.items[r].payload,u=this.items[r+1];if(u.type==="token"&&u.payload.length===1){const s=new Cu("noteCaller");s.newBlock(n),s.addItem(u),e.sequences.noteCaller.push(s),this.items[r+1]={type:"graft",subType:"noteCaller",payload:s.id}}}}trimStart(e){if(e.length===0)return e;const t=e[0];return["lineSpace","eol"].includes(t.subType)?this.trimStart(e.slice(1)):t.type==="token"?e:[t,...this.trimStart(e.slice(1))]}trimEnd(e){if(e.length===0)return e;const t=e[e.length-1];return["lineSpace","eol"].includes(t.subType)?this.trimEnd(e.slice(0,e.length-1)):t.type==="token"?e:[...this.trimEnd(e.slice(0,e.length-1)),t]}filterGrafts(e){const t=[];let r=[];for(const[n,u]of this.grafts())this.graftPassesOptions(u,e)?t.push(u.payload):r.push(n);for(const[n,u]of Array.from(r.entries()))this.items.splice(u-n,1);r=[];for(const[n,u]of this.bg.entries())this.graftPassesOptions(u,e)?t.push(u.payload):r.push(n);for(const[n,u]of Array.from(r.entries()))this.bg.splice(u-n,1);return t}filterScopes(e){const t=[];for(const[r,n]of this.scopes())this.scopePassesOptions(n,e)||t.push(r);for(const[r,n]of Array.from(t.entries()))this.items.splice(n-r,1)}graftPassesOptions(e,t){return(!("includeGrafts"in t)||t.includeGrafts.includes(e.subType))&&(!("excludeGrafts"in t)||!t.excludeGrafts.includes(e.subType))}scopePassesOptions(e,t){return(!("includeScopes"in t)||this.scopeMatchesOptionArray(e.payload,t.includeScopes))&&(!("excludeScopes"in t)||!this.scopeMatchesOptionArray(e.payload,t.excludeScopes))}scopeMatchesOptionArray(e,t){for(const r of t)if(e.startsWith(r))return!0;return!1}removeGraftsToEmptySequences(e){const t=[];let r=[];for(const[n,u]of this.grafts())e.includes(u.payload)&&r.push(n);for(const[n,u]of Array.from(r.entries()))this.items.splice(u-n,1);r=[];for(const[n,u]of this.bg.entries())e.includes(u.payload)&&r.push(n);for(const[n,u]of Array.from(r.entries()))this.bg.splice(u-n,1);return t}grafts(){return Array.from(this.items.entries()).filter(e=>e[1].type==="graft")}scopes(){return Array.from(this.items.entries()).filter(e=>e[1].type==="scope")}tokens(){return Array.from(this.items.entries()).filter(e=>!["scope","graft"].includes(e[1].type))}text(){return this.tokens().map(e=>e[1].payload).join("")}},ci={},n7=[];for(const e of ds)["wordLike","eol","lineSpace","punctuation","unknown"].includes(e[1])&&(ci[e[1]]=ne(`^${e[2].xregexp.source}$`),n7.push(e[2]));const u7=e=>{const t=ne.union(n7),r=[];for(const n of ne.match(e,t,"all")){let u;ne.test(n,ci.wordLike)?u="wordLike":ne.test(n,ci.punctuation)?u="punctuation":ne.test(n,ci.lineSpace)?u="lineSpace":ne.test(n,ci.eol)?u="eol":u="unknown",r.push([n,u])}return r},{labelForScope:qW}=Ae.scopeDefs,xW=(e,t,r)=>{const{rows:n}=JSON.parse(e);t.headers.id=r,t.headers.bookCode=r;const u=new Cu("table");for(const[s,o]of n.entries())for(const[a,i]of o.entries()){u.newBlock(qW("tTableRow",[`${s}`]));const c=u.lastBlock();c.addItem({type:"scope",subType:"start",payload:`tTableCol/${a}`});for(const[l,p]of u7(i))c.addItem({type:"token",subType:p,payload:l});c.addItem({type:"scope",subType:"end",payload:`tTableCol/${a}`})}t.sequences.table.push(u),t.sequences.main.addBlockGraft({type:"graft",subType:"table",payload:u.id})},{labelForScope:Wc}=Ae.scopeDefs;let p1=0;const s7=(e,t)=>{typeof t!="number"&&(p1=0);const r={...e,id:p1,parentId:typeof t=="number"?t:"none"};return p1++,e.children&&(r.children=e.children.map(n=>s7(n,r.id))),r},o7=e=>{const t=[{}];if(t[0].id=e.id,t[0].parentId=e.parentId,e.content&&(t[0].content=e.content),e.children){t[0].children=[];for(const r of e.children)t[0].children.push(r.id),o7(r).forEach(n=>t.push(n))}return t},RW=(e,t,r)=>{t.headers.id=r,t.headers.bookCode=r;const n=new Cu("tree");for(const u of o7(s7(JSON.parse(e)))){n.newBlock(Wc("tTreeNode",[`${u.id}`]));const s=Wc("tTreeParent",[`${u.parentId}`]);if(n.lastBlock().items.push({type:"scope",subType:"start",payload:s}),u.content)for(const[o,a]of Object.entries(u.content)){const i=n.lastBlock().items.length,c=u7(a),l=Wc("tTreeContent",[o,u.id,`${i}`,`${c.length}`]);n.lastBlock().items.push({type:"scope",subType:"start",payload:l});for(const[p,f]of c)n.lastBlock().items.push({type:"token",subType:f,payload:p});n.lastBlock().items.push({type:"scope",subType:"end",payload:l})}if(u.children)for(const[o,a]of u.children.entries()){const i=Wc("tTreeChild",[o,a]);n.lastBlock().items.push({type:"scope",subType:"start",payload:i}),n.lastBlock().items.push({type:"scope",subType:"end",payload:i})}n.lastBlock().items.push({type:"scope",subType:"end",payload:s})}t.sequences.tree.push(n),t.sequences.main.addBlockGraft({type:"graft",subType:"tree",payload:n.id})},{labelForScope:Pt}=Ae.scopeDefs,jW=e=>{const t={};for(const r of e)for(const n of r.contexts){n[0]in t||(t[n[0]]={});const u=n[1];if(!u)t[n[0]]._noAccessor=r.parser;else{u in t[n[0]]||(t[n[0]][u]={});for(const s of n[2])t[n[0]][u][s]=r.parser}}return t},MW=e=>[{contexts:[["startTag","tagName",["id","usfm","ide","sts","h","toc","toca","cl"]]],parser:{baseSequenceType:"header",forceNewSequence:!0,newBlock:!0,useTempSequence:!0,newScopes:[{label:t=>t.fullTagName,endedBy:["baseSequenceChange"],onEnd:(t,r)=>{if(t.headers[r]=t.current.sequence.plainText(),r==="id"&&(t.headers[r].length===3||t.headers[r].length>3&&t.headers[r].substring(3,4)===" ")){const n=t.headers[r].substring(0,3);t.headers.bookCode=n}}}]}},{contexts:[["startTag","tagName",["ms","mr","s","sr","r","qa","sp","sd"].concat(e.customTags.heading)]],parser:{baseSequenceType:"heading",forceNewSequence:!0,newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["mt"]]],parser:{baseSequenceType:"title",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["mte"]]],parser:{baseSequenceType:"endTitle",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["imt","is","ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex","imte"].concat(e.customTags.intro)]],parser:{baseSequenceType:"introduction",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["esb"]]],parser:{baseSequenceType:"sidebar",newBlock:!0,newScopes:[],after:t=>{t.mainLike=t.current.sequence}}},{contexts:[["startTag","tagName",["esbe"]]],parser:{baseSequenceType:"main",newBlock:!0,newScopes:[],after:t=>{t.mainLike=t.sequences.main}}},{contexts:[["startTag","tagName",["cat"]]],parser:{inlineSequenceType:"esbCat",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/cat","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=Ae.generateId(),u={label:()=>Pt("esbCat",[n]),endedBy:["startTag/esbe"]};t.openNewScope(r,u,!0,t.mainLike)}}},{contexts:[["startTag","tagName",["rem"]]],parser:{baseSequenceType:"remark",forceNewSequence:!0,newScopes:[]}},{contexts:[["startTag","tagName",["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"].concat(e.customTags.paragraph)]],parser:{baseSequenceType:"mainLike",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["tr"]]],parser:{newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["f","fe"]]],parser:{inlineSequenceType:"footnote",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/f","endTag/fe","endBlock"],onEnd:t=>t.returnToBaseSequence()}]}},{contexts:[["startTag","tagName",["x"]]],parser:{inlineSequenceType:"xref",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/x","endBlock"],onEnd:t=>t.returnToBaseSequence()}]}},{contexts:[["startTag","tagName",["fig"]]],parser:{inlineSequenceType:"fig",forceNewSequence:!0,newScopes:[{label:t=>Pt("spanWithAtts",[t.tagName]),endedBy:["endBlock","endTag/$tagName$"],onEnd:t=>t.clearAttributeContext()}],during:(t,r)=>{t.setAttributeContext(Pt("spanWithAtts",[r.tagName]))}}},{contexts:[["chapter"]],parser:{mainSequence:!0,newScopes:[{label:t=>Pt("chapter",[t.number]),endedBy:["chapter"]}]}},{contexts:[["pubchapter"]],parser:{mainSequence:!0,newScopes:[{label:t=>Pt("pubChapter",[t.numberString]),endedBy:["pubchapter","chapter"]}]}},{contexts:[["startTag","tagName",["ca"]]],parser:{inlineSequenceType:"altNumber",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/ca","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=Ae.generateId(),u={label:()=>Pt("altChapter",[n]),endedBy:["startTag/ca","chapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["verses"]],parser:{mainSequence:!0,newScopes:[{label:t=>Pt("verses",[t.numberString]),endedBy:["verses","chapter","pubchapter"]}],during:(t,r)=>{r.numbers.forEach(n=>{const u={label:()=>Pt("verse",[n]),endedBy:["verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)})}}},{contexts:[["startTag","tagName",["vp"]]],parser:{inlineSequenceType:"pubNumber",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/vp","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=Ae.generateId(),u={label:()=>Pt("pubVerse",[n]),endedBy:["startTag/vp","verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["startTag","tagName",["va"]]],parser:{inlineSequenceType:"altNumber",forceNewSequence:!0,newScopes:[{label:t=>Pt("inline",[t.fullTagName]),endedBy:["endTag/va","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=Ae.generateId(),u={label:()=>Pt("altVerse",[n]),endedBy:["startTag/va","verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["startTag","tagName",["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt"].concat(e.customTags.char)]],parser:{newScopes:[{label:t=>Pt("span",[t.fullTagName]),endedBy:["endBlock","endTag/$fullTagName$","implicitEnd"]}]}},{contexts:[["startTag","tagName",["th","thr","tc","tcr"]]],parser:{newScopes:[{label:t=>Pt("cell",[t.fullTagName]),endedBy:["startTag/th","startTag/thr","startTag/tc","startTag/tcr","startTag/th2","startTag/thr2","startTag/tc2","startTag/tcr2","startTag/th3","startTag/thr3","startTag/tc3","startTag/tcr3","endBlock","endTag/$fullTagName$"]}]}},{contexts:[["emptyMilestone"]],parser:{during:(t,r)=>t.addEmptyMilestone(Pt("milestone",[r.tagName]))}},{contexts:[["startMilestoneTag","sOrE","s"]],parser:{newScopes:[{label:t=>Pt("milestone",[t.tagName]),endedBy:["endMilestone/$tagName$"]}],during:(t,r)=>{t.setAttributeContext(Pt("milestone",[r.tagName]))}}},{contexts:[["endMilestoneMarker"]],parser:{during:t=>t.clearAttributeContext()}},{contexts:[["attribute"],["defaultAttribute"]],parser:{during:(t,r)=>{const n={w:"lemma",rb:"gloss",xt:"link-href"};if(t.current.attributeContext){const u=t.current.attributeContext.split("/");r.key==="default"&&u.length===2&&(r.key=n[u[1]]||`unknownDefault_${u[1]}`,r.printValue=r.printValue.replace(/default/,r.key)),[...r.values.entries()].forEach(s=>{const o={label:a=>Pt("attribute",[t.current.attributeContext,a.key,s[0],s[1]]),endedBy:["$attributeContext$"]};t.openNewScope(r,o)})}else t.addToken(Xe.printable("unknown",[r.printValue]))}}},{contexts:[["startTag","tagName",["w","rb"].concat(e.customTags.word)]],parser:{newScopes:[{label:t=>Pt("spanWithAtts",[t.tagName]),endedBy:["endBlock","endTag/$tagName$"],onEnd:t=>t.clearAttributeContext()}],during:(t,r)=>{t.setAttributeContext(Pt("spanWithAtts",[r.tagName]))}}},{contexts:[["wordLike"],["lineSpace"],["punctuation"],["eol"]],parser:{during:(t,r)=>t.addToken(r)}},{contexts:[["noBreakSpace"]],parser:{during:t=>{t.addToken(Xe.printable("lineSpace",[" "]))}}},{contexts:[["softLineBreak"]],parser:{during:t=>{t.addToken(Xe.printable("softLineBreak",["//"]))}}},{contexts:[["bareSlash"]],parser:{during:t=>{t.addToken(Xe.printable("bareSlash",["\\"]))}}},{contexts:[["unknown"]],parser:{during:(t,r)=>{t.addToken(Xe.printable("unknown",[r.printValue]))}}}],{labelForScope:f1}=Ae.scopeDefs,Iy=Ae.parserConstants,LW=class{constructor(e,t,r){this.filterOptions=e,this.customTags=t,this.emptyBlocks=r,this.specs=MW(this),this.specLookup=jW(this.specs),this.headers={},this.baseSequenceTypes=Iy.usfm.baseSequenceTypes,this.inlineSequenceTypes=Iy.usfm.inlineSequenceTypes,this.setSequences(),this.setCurrent()}setSequences(){this.sequences={};for(const[e,t]of Object.entries({...this.baseSequenceTypes,...this.inlineSequenceTypes}))switch(t){case"1":this.sequences[e]=new Cu(e);break;case"?":this.sequences[e]=null;break;case"*":this.sequences[e]=[];break;default:throw new Error(`Unexpected sequence arity '${t}' for '${e}'`)}this.mainLike=this.sequences.main}setCurrent(){this.current={sequence:this.sequences.main,parentSequence:null,baseSequenceType:"main",inlineSequenceType:null,attributeContext:null}}parseItem(e){let t=!1;["startTag"].includes(e.subclass)&&(this.closeActiveScopes(`startTag/${e.fullTagName}`),e.isNested||this.closeActiveScopes("implicitEnd")),["endTag"].includes(e.subclass)&&this.closeActiveScopes(`endTag/${e.fullTagName}`),["startMilestoneTag"].includes(e.subclass)&&e.sOrE==="e"&&this.closeActiveScopes(`endMilestone/${e.tagName}`),["chapter","pubchapter","verses"].includes(e.subclass)&&this.closeActiveScopes(e.subclass,this.sequences.main);const r=this.specForItem(e);r&&("before"in r.parser&&r.parser.before(this,e),t=!1,r.parser.baseSequenceType&&(t=(r.parser.baseSequenceType==="mainLike"?this.mainLike.type:r.parser.baseSequenceType)!==this.current.baseSequenceType||r.parser.forceNewSequence),t?(this.closeActiveScopes("baseSequenceChange"),this.changeBaseSequence(r.parser),"newBlock"in r.parser&&r.parser.newBlock&&(this.closeActiveScopes("endBlock"),this.current.sequence.newBlock(f1("blockTag",[e.fullTagName])))):r.parser.inlineSequenceType?(this.current.inlineSequenceType=r.parser.inlineSequenceType,this.current.parentSequence=this.current.sequence,this.current.parentSequence.type==="header"&&(this.current.parentSequence=this.sequences.main),this.current.sequence=new Cu(this.current.inlineSequenceType),this.current.sequence.newBlock(f1("inline",r.parser.inlineSequenceType)),this.sequences[this.current.inlineSequenceType].push(this.current.sequence),this.current.parentSequence.addItem({type:"graft",subType:this.current.inlineSequenceType,payload:this.current.sequence.id})):"newBlock"in r.parser&&r.parser.newBlock&&this.current.sequence.newBlock(f1("blockTag",[e.fullTagName])),"during"in r.parser&&r.parser.during(this,e),this.openNewScopes(r.parser,e),"after"in r.parser&&r.parser.after(this,e))}tidy(){for(const r of this.sequences.introduction)r.graftifyIntroductionHeadings(this);const e=this.allSequences();for(const r of e)r.trim(),r.reorderSpanWithAtts(),r.makeNoteGrafts(this),r.moveOrphanScopes(),r.removeEmptyBlocks(this.emptyBlocks);const t=this.emptySequences(e);for(const r of e)t&&r.removeGraftsToEmptySequences(t),r.addTableScopes(),r.close(this),this.substitutePubNumberScopes(r),r.moveOrphanStartScopes2(),r.type==="sidebar"&&this.substituteEsbCatScopes(r),["footnote","xref"].includes(r.type)&&r.lastBlock().inlineToEnd()}emptySequences(e){return e.filter(t=>t.blocks.length===0).map(t=>t.id)}substitutePubNumberScopes(e){const t={},r=this.sequenceById();for(const n of e.blocks){let u=0;const s=[...n.items];for(const[o,a]of s.entries())if(a.type==="graft"&&["pubNumber","altNumber"].includes(a.subType)){const i=r[a.payload].text().trim(),c=s[o+1].payload.split("/")[1];t[c]=i,n.items.splice(o-u,1),u++}}if(Object.keys(t).length>0)for(const n of e.blocks)for(const u of n.items.filter(s=>s.type==="scope")){const s=u.payload.split("/");["altChapter","pubVerse","altVerse"].includes(s[0])&&(u.payload=`${s[0]}/${t[s[1]]}`)}}substituteEsbCatScopes(e){const t={},r=this.sequenceById();for(const n of e.blocks){let u=0;const s=[...n.items];for(const[o,a]of s.entries())if(a.type==="graft"&&a.subType==="esbCat"){const i=r[a.payload].text().trim(),c=s[1].payload.split("/")[1];t[c]=i,n.items.splice(o-u,1),u++}}if(Object.keys(t).length>0)for(const n of e.blocks)for(const u of n.items.filter(s=>s.type==="scope")){const s=u.payload.split("/");s[0]==="esbCat"&&(u.payload=`${s[0]}/${t[s[1]]}`)}}allSequences(){const e=[];for(const[t,r]of Object.entries({...this.baseSequenceTypes,...this.inlineSequenceTypes}))switch(r){case"1":case"?":this.sequences[t]&&e.push(this.sequences[t]);break;case"*":this.sequences[t].forEach(n=>{e.push(n)});break;default:throw new Error(`Unexpected sequence arity '${r}' for '${t}'`)}return e}sequenceById(){const e={};return this.allSequences().forEach(t=>{e[t.id]=t}),e}filter(){const e=[],t=this.sequenceById();this.filterGrafts(this.sequences.main.id,t,e,this.filterOptions),this.removeUnusedSequences(e),this.filterScopes(Object.values(t),this.filterOptions)}filterGrafts(e,t,r,n){r.push(e);const u=t[e].filterGrafts(n);for(const s of u){if(t[s].type==="main")throw new Error("MAIN is child!",JSON.stringify(t[e],null,2));this.filterGrafts(s,t,r,n)}}removeUnusedSequences(e){for(const t of this.allSequences())if(!e.includes(t.id)){const r={...this.baseSequenceTypes,...this.inlineSequenceTypes}[t.type];switch(r){case"1":throw new Error("Attempting to remove sequence with arity of 1");case"?":this.sequences[t.type]=null;break;case"*":this.sequences[t.type]=this.sequences[t.type].filter(n=>n.id!==t.id);break;default:throw new Error(`Unexpected sequence arity '${r}' for '${t.type}'`)}}}filterScopes(e,t){e.forEach(r=>r.filterScopes(t))}specForItem(e){const t=e.subclass;if(!(t in this.specLookup))return null;for(const r of["tagName","sOrE"])if(r in e&&r in this.specLookup[t]&&e[r]in this.specLookup[t][r])return{parser:this.specLookup[t][r][e[r]]};return"_noAccessor"in this.specLookup[t]?{parser:this.specLookup[t]._noAccessor}:null}closeActiveScopes(e,t){t===void 0&&(t=this.current.sequence);const r=t.activeScopes.filter(n=>n.endedBy.includes(e)).reverse();t.activeScopes=t.activeScopes.filter(n=>!n.endedBy.includes(e)),r.forEach(n=>this.closeActiveScope(n,t))}closeActiveScope(e,t){this.addScope("end",e.label,t),e.onEnd&&e.onEnd(this,e.label)}changeBaseSequence(e){const t=e.baseSequenceType;if(t==="mainLike"){this.current.sequence=this.mainLike;return}this.current.baseSequenceType=t;const r=this.baseSequenceTypes[t];switch(r){case"1":this.current.sequence=this.sequences[t];break;case"?":this.sequences[t]||(this.sequences[t]=new Cu(t)),this.current.sequence=this.sequences[t];break;case"*":this.current.sequence=new Cu(t),e.useTempSequence||this.sequences[t].push(this.current.sequence);break;default:throw new Error(`Unexpected base sequence arity '${r}' for '${t}'`)}!e.useTempSequence&&this.current.sequence.type!=="main"&&this.mainLike.addBlockGraft({type:"graft",subType:this.current.baseSequenceType,payload:this.current.sequence.id})}returnToBaseSequence(){this.current.inlineSequenceType=null,this.current.sequence=this.current.parentSequence,this.current.parentSequence=null}openNewScopes(e,t){if(e.newScopes){let r=this.current.sequence;"mainSequence"in e&&e.mainSequence&&(r=this.sequences.main),e.newScopes.forEach(n=>this.openNewScope(t,n,!0,r))}}openNewScope(e,t,r,n){r===void 0&&(r=!0),n===void 0&&(n=this.current.sequence),r&&n.addItem({type:"scope",subType:"start",payload:t.label(e)});const u={label:t.label(e),endedBy:this.substituteEndedBys(t.endedBy,e)};"onEnd"in t&&(u.onEnd=t.onEnd),n.activeScopes.push(u)}substituteEndedBys(e,t){return e.map(r=>{let n=r.replace("$fullTagName$",t.fullTagName).replace("$tagName$",t.tagName);return this.current.attributeContext&&(n=n.replace("$attributeContext$",this.current.attributeContext.replace("milestone","endMilestone").replace("spanWithAtts","endTag"))),n})}addToken(e){this.current.sequence.addItem({type:"token",subType:e.subclass,payload:e.printValue})}addScope(e,t,r){r===void 0&&(r=this.current.sequence),r.addItem({type:"scope",subType:e,payload:t})}addEmptyMilestone(e){this.mainLike.addItem({type:"scope",subType:"start",payload:e}),this.mainLike.addItem({type:"scope",subType:"end",payload:e})}setAttributeContext(e){this.current.attributeContext=e}clearAttributeContext(){this.current.attributeContext=null}},UW=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perf2usfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],GW=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"PERF to PkJSON",name:"perf2PkJson",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"pkJson",type:"json"}],documentation:"",description:"PERF=>JSON: Converts PERF to current Proskomma input format"},{id:999,type:"Outputs",outputs:[{name:"pkJson",type:"json",source:"Transform 1 pkJson"}]}],a7={perf2usfmPipeline:UW,perf2PkJsonPipeline:GW},Ny=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),VW={startDocument:[{description:"Set up storage",test:()=>!0,action:({workspace:e,output:t})=>{e.blockRecords=[],t.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:({context:e,workspace:t})=>{t.blockRecords.push(Ny(e))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:({context:e,workspace:t})=>{t.blockRecords.push(Ny(e))}}],mark:[{description:"Add chapter number to block record",test:({context:e})=>e.sequences[0].element.subType==="chapter",action:({context:e,workspace:t})=>{t.blockRecords[t.blockRecords.length-1].perfChapter=e.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:({workspace:e,output:t})=>{for(const[r,n]of Object.entries(e.blockRecords)){if(!n.perfChapter)continue;let u=r,s=!1;for(;u>0&&!s;)e.blockRecords[u-1].type==="paragraph"||e.blockRecords[u-1].subType==="title"?s=!0:u--;t.report[u.toString()]=n.perfChapter}}}]},HW=function({perf:e}){const t=new Fu.PerfRenderFromJson({srcJson:e,actions:VW}),r={};return t.renderDocument({docId:"",config:{maxLength:60},output:r}),{report:r.report}},WW={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:HW},Ir=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,JW=(e,t)=>{let r=`\\${t}-s |`;for(let[n,u]of Object.entries(e))n==="x-morph"?r=r+Ir(n)+'="'+u.join(",")+'" ':r=r+Ir(n)+'="'+u+'" ';return r+"\\*"},zW=(e,t,r=!1)=>{let n="|";for(let[u,s]of Object.entries(e))n=n+Ir(u)+'="'+s+'" ';return n=n+"\\",r&&(n=n+"+"),n+t+"*"},KW={startDocument:[{description:"Set up environment",test:()=>!0,action:({context:e,workspace:t})=>{t.usfmBits=[""],t.nestedWrapper=0;for(let[r,n]of Object.entries(e.document.metadata.document).filter(u=>!["tags","properties","bookCode","cl"].includes(u[0])))t.usfmBits.push(`\\${Ir(r)} ${n} +Char: `+b.c),w=new Error(w),b.error=w,ee(b,"onerror",w),b}function he(b){return b.sawRoot&&!b.closedRoot&&fe(b,"Unclosed root tag"),b.state!==q.BEGIN&&b.state!==q.BEGIN_WHITESPACE&&b.state!==q.TEXT&&de(b,"Unexpected end"),ue(b),b.c="",b.closed=!0,ee(b,"onend"),n.call(b,b.strict,b.opt),b}function fe(b,w){if(typeof b!="object"||!(b instanceof n))throw new Error("bad call to strictFail");b.strict&&de(b,w)}function ge(b){b.strict||(b.tagName=b.tagName[b.looseCase]());var w=b.tags[b.tags.length-1]||b,I=b.tag={name:b.tagName,attributes:{}};b.opt.xmlns&&(I.ns=w.ns),b.attribList.length=0,K(b,"onopentagstart",I)}function pe(b,w){var I=b.indexOf(":"),$=I<0?["",b]:b.split(":"),M=$[0],L=$[1];return w&&b==="xmlns"&&(M="xmlns",L=""),{prefix:M,local:L}}function z(b){if(b.strict||(b.attribName=b.attribName[b.looseCase]()),b.attribList.indexOf(b.attribName)!==-1||b.tag.attributes.hasOwnProperty(b.attribName)){b.attribName=b.attribValue="";return}if(b.opt.xmlns){var w=pe(b.attribName,!0),I=w.prefix,$=w.local;if(I==="xmlns")if($==="xml"&&b.attribValue!==f)fe(b,"xml: prefix must be bound to "+f+` +Actual: `+b.attribValue);else if($==="xmlns"&&b.attribValue!==h)fe(b,"xmlns: prefix must be bound to "+h+` +Actual: `+b.attribValue);else{var M=b.tag,L=b.tags[b.tags.length-1]||b;M.ns===L.ns&&(M.ns=Object.create(L.ns)),M.ns[$]=b.attribValue}b.attribList.push([b.attribName,b.attribValue])}else b.tag.attributes[b.attribName]=b.attribValue,K(b,"onattribute",{name:b.attribName,value:b.attribValue});b.attribName=b.attribValue=""}function O(b,w){if(b.opt.xmlns){var I=b.tag,$=pe(b.tagName);I.prefix=$.prefix,I.local=$.local,I.uri=I.ns[$.prefix]||"",I.prefix&&!I.uri&&(fe(b,"Unbound namespace prefix: "+JSON.stringify(b.tagName)),I.uri=$.prefix);var M=b.tags[b.tags.length-1]||b;I.ns&&M.ns!==I.ns&&Object.keys(I.ns).forEach(function(le){K(b,"onopennamespace",{prefix:le,uri:I.ns[le]})});for(var L=0,Y=b.attribList.length;L",b.tagName="",b.state=q.SCRIPT;return}K(b,"onscript",b.script),b.script=""}var w=b.tags.length,I=b.tagName;b.strict||(I=I[b.looseCase]());for(var $=I;w--;){var M=b.tags[w];if(M.name!==$)fe(b,"Unexpected close tag");else break}if(w<0){fe(b,"Unmatched closing tag: "+b.tagName),b.textNode+="",b.state=q.TEXT;return}b.tagName=I;for(var L=b.tags.length;L-- >w;){var Y=b.tag=b.tags.pop();b.tagName=b.tag.name,K(b,"onclosetag",b.tagName);var be={};for(var Ne in Y.ns)be[Ne]=Y.ns[Ne];var Ve=b.tags[b.tags.length-1]||b;b.opt.xmlns&&Y.ns!==Ve.ns&&Object.keys(Y.ns).forEach(function(Me){var Fe=Y.ns[Me];K(b,"onclosenamespace",{prefix:Me,uri:Fe})})}w===0&&(b.closedRoot=!0),b.tagName=b.attribValue=b.attribName="",b.attribList.length=0,b.state=q.TEXT}function F(b){var w=b.entity,I=w.toLowerCase(),$,M="";return b.ENTITIES[w]?b.ENTITIES[w]:b.ENTITIES[I]?b.ENTITIES[I]:(w=I,w.charAt(0)==="#"&&(w.charAt(1)==="x"?(w=w.slice(2),$=parseInt(w,16),M=$.toString(16)):(w=w.slice(1),$=parseInt(w,10),M=$.toString(10))),w=w.replace(/^0+/,""),isNaN($)||M.toLowerCase()!==w?(fe(b,"Invalid character entity"),"&"+b.entity+";"):String.fromCodePoint($))}function D(b,w){w==="<"?(b.state=q.OPEN_WAKA,b.startTagPosition=b.position):B(w)||(fe(b,"Non-whitespace before first tag."),b.textNode=w,b.state=q.TEXT)}function g(b,w){var I="";return w"?(K(w,"onsgmldeclaration",w.sgmlDecl),w.sgmlDecl="",w.state=q.TEXT):(T($)&&(w.state=q.SGML_DECL_QUOTED),w.sgmlDecl+=$);continue;case q.SGML_DECL_QUOTED:$===w.q&&(w.state=q.SGML_DECL,w.q=""),w.sgmlDecl+=$;continue;case q.DOCTYPE:$===">"?(w.state=q.TEXT,K(w,"ondoctype",w.doctype),w.doctype=!0):(w.doctype+=$,$==="["?w.state=q.DOCTYPE_DTD:T($)&&(w.state=q.DOCTYPE_QUOTED,w.q=$));continue;case q.DOCTYPE_QUOTED:w.doctype+=$,$===w.q&&(w.q="",w.state=q.DOCTYPE);continue;case q.DOCTYPE_DTD:w.doctype+=$,$==="]"?w.state=q.DOCTYPE:T($)&&(w.state=q.DOCTYPE_DTD_QUOTED,w.q=$);continue;case q.DOCTYPE_DTD_QUOTED:w.doctype+=$,$===w.q&&(w.state=q.DOCTYPE_DTD,w.q="");continue;case q.COMMENT:$==="-"?w.state=q.COMMENT_ENDING:w.comment+=$;continue;case q.COMMENT_ENDING:$==="-"?(w.state=q.COMMENT_ENDED,w.comment=oe(w.opt,w.comment),w.comment&&K(w,"oncomment",w.comment),w.comment=""):(w.comment+="-"+$,w.state=q.COMMENT);continue;case q.COMMENT_ENDED:$!==">"?(fe(w,"Malformed comment"),w.comment+="--"+$,w.state=q.COMMENT):w.state=q.TEXT;continue;case q.CDATA:$==="]"?w.state=q.CDATA_ENDING:w.cdata+=$;continue;case q.CDATA_ENDING:$==="]"?w.state=q.CDATA_ENDING_2:(w.cdata+="]"+$,w.state=q.CDATA);continue;case q.CDATA_ENDING_2:$===">"?(w.cdata&&K(w,"oncdata",w.cdata),K(w,"onclosecdata"),w.cdata="",w.state=q.TEXT):$==="]"?w.cdata+="]":(w.cdata+="]]"+$,w.state=q.CDATA);continue;case q.PROC_INST:$==="?"?w.state=q.PROC_INST_ENDING:B($)?w.state=q.PROC_INST_BODY:w.procInstName+=$;continue;case q.PROC_INST_BODY:if(!w.procInstBody&&B($))continue;$==="?"?w.state=q.PROC_INST_ENDING:w.procInstBody+=$;continue;case q.PROC_INST_ENDING:$===">"?(K(w,"onprocessinginstruction",{name:w.procInstName,body:w.procInstBody}),w.procInstName=w.procInstBody="",w.state=q.TEXT):(w.procInstBody+="?"+$,w.state=q.PROC_INST_BODY);continue;case q.OPEN_TAG:R(m,$)?w.tagName+=$:(ge(w),$===">"?O(w):$==="/"?w.state=q.OPEN_TAG_SLASH:(B($)||fe(w,"Invalid character in tag name"),w.state=q.ATTRIB));continue;case q.OPEN_TAG_SLASH:$===">"?(O(w,!0),E(w)):(fe(w,"Forward-slash in opening tag not followed by >"),w.state=q.ATTRIB);continue;case q.ATTRIB:if(B($))continue;$===">"?O(w):$==="/"?w.state=q.OPEN_TAG_SLASH:R(A,$)?(w.attribName=$,w.attribValue="",w.state=q.ATTRIB_NAME):fe(w,"Invalid attribute name");continue;case q.ATTRIB_NAME:$==="="?w.state=q.ATTRIB_VALUE:$===">"?(fe(w,"Attribute without value"),w.attribValue=w.attribName,z(w),O(w)):B($)?w.state=q.ATTRIB_NAME_SAW_WHITE:R(m,$)?w.attribName+=$:fe(w,"Invalid attribute name");continue;case q.ATTRIB_NAME_SAW_WHITE:if($==="=")w.state=q.ATTRIB_VALUE;else{if(B($))continue;fe(w,"Attribute without value"),w.tag.attributes[w.attribName]="",w.attribValue="",K(w,"onattribute",{name:w.attribName,value:""}),w.attribName="",$===">"?O(w):R(A,$)?(w.attribName=$,w.state=q.ATTRIB_NAME):(fe(w,"Invalid attribute name"),w.state=q.ATTRIB)}continue;case q.ATTRIB_VALUE:if(B($))continue;T($)?(w.q=$,w.state=q.ATTRIB_VALUE_QUOTED):(fe(w,"Unquoted attribute value"),w.state=q.ATTRIB_VALUE_UNQUOTED,w.attribValue=$);continue;case q.ATTRIB_VALUE_QUOTED:if($!==w.q){$==="&"?w.state=q.ATTRIB_VALUE_ENTITY_Q:w.attribValue+=$;continue}z(w),w.q="",w.state=q.ATTRIB_VALUE_CLOSED;continue;case q.ATTRIB_VALUE_CLOSED:B($)?w.state=q.ATTRIB:$===">"?O(w):$==="/"?w.state=q.OPEN_TAG_SLASH:R(A,$)?(fe(w,"No whitespace between attributes"),w.attribName=$,w.attribValue="",w.state=q.ATTRIB_NAME):fe(w,"Invalid attribute name");continue;case q.ATTRIB_VALUE_UNQUOTED:if(!N($)){$==="&"?w.state=q.ATTRIB_VALUE_ENTITY_U:w.attribValue+=$;continue}z(w),$===">"?O(w):w.state=q.ATTRIB;continue;case q.CLOSE_TAG:if(w.tagName)$===">"?E(w):R(m,$)?w.tagName+=$:w.script?(w.script+=""?E(w):fe(w,"Invalid characters in closing tag");continue;case q.TEXT_ENTITY:case q.ATTRIB_VALUE_ENTITY_Q:case q.ATTRIB_VALUE_ENTITY_U:var Y,be;switch(w.state){case q.TEXT_ENTITY:Y=q.TEXT,be="textNode";break;case q.ATTRIB_VALUE_ENTITY_Q:Y=q.ATTRIB_VALUE_QUOTED,be="attribValue";break;case q.ATTRIB_VALUE_ENTITY_U:Y=q.ATTRIB_VALUE_UNQUOTED,be="attribValue";break}$===";"?(w[be]+=F(w),w.entity="",w.state=Y):R(w.entity.length?C:v,$)?w.entity+=$:(fe(w,"Invalid character in entity name"),w[be]+="&"+w.entity+$,w.entity="",w.state=Y);continue;default:throw new Error(w,"Unknown state: "+w.state)}return w.position>=w.bufferCheckPosition&&u(w),w}/*! http://mths.be/fromcodepoint v0.1.0 by @mathias */String.fromCodePoint||function(){var b=String.fromCharCode,w=Math.floor,I=function(){var $=16384,M=[],L,Y,be=-1,Ne=arguments.length;if(!Ne)return"";for(var Ve="";++be1114111||w(Me)!==Me)throw RangeError("Invalid code point: "+Me);Me<=65535?M.push(Me):(Me-=65536,L=(Me>>10)+55296,Y=Me%1024+56320,M.push(L,Y)),(be+1===Ne||M.length>$)&&(Ve+=b.apply(null,M),M.length=0)}return Ve};Object.defineProperty?Object.defineProperty(String,"fromCodePoint",{value:I,configurable:!0,writable:!0}):String.fromCodePoint=I}()})(e)})(T7);class fJ{constructor(){this.sax=T7.parser(!0),this.sax.ontext=t=>this.handleSaxText(t),this.sax.onopentag=t=>this.handleSaxOpenTag(t),this.sax.onclosetag=t=>this.handleSaxCloseTag(t),this.lexed=[],this.elementStack=[],this.currentText="",this.openTagHandlers={usx:this.ignoreHandler,book:this.handleBookOpen,chapter:this.handleChapter,verse:this.handleVerses,para:this.handleParaOpen,table:this.ignoreHandler,row:this.handleRowOpen,cell:this.handleCellOpen,char:this.handleCharOpen,ms:this.handleMSOpen,note:this.handleNoteOpen,sidebar:this.handleSidebarOpen,periph:this.notHandledHandler,figure:this.handleFigureOpen,optbreak:this.handleOptBreakOpen,ref:this.ignoreHandler},this.closeTagHandlers={usx:this.ignoreHandler,book:this.handleBookClose,chapter:this.ignoreHandler,verse:this.ignoreHandler,para:this.handleParaClose,table:this.ignoreHandler,row:this.handleRowClose,cell:this.handleCellClose,char:this.handleCharClose,ms:this.handleMSClose,note:this.handleNoteClose,sidebar:this.handleSidebarClose,periph:this.notHandledHandler,figure:this.handleFigureClose,optbreak:this.handleOptBreakClose,ref:this.ignoreHandler}}lexAndParse(t,r){this.parser=r,this.lexed=[],this.elementStack=[],this.sax.write(t).close()}handleSaxText(t){this.currentText=this.replaceEntities(t),Z.match(this.currentText,_7,"all").map(r=>B7(r,ds)).forEach(r=>this.parser.parseItem(r))}replaceEntities(t){return t.replace("<","<").replace(">",">").replace("'","'").replace(""",'"').replace("&","&")}handleSaxOpenTag(t){const r=t.name,n=t.attributes;if(r in this.openTagHandlers)this.openTagHandlers[r](this,"open",r,n);else throw new Error(`Unexpected open element tag '${r}' in UsxParser`)}handleSaxCloseTag(t){this.closeTagHandlers[t](this,"close",t)}notHandledHandler(t,r,n){console.error(`WARNING: ${r} element tag '${n}' is not handled by UsxParser`)}stackPush(t,r){this.elementStack.push([t,r])}stackPop(){return this.elementStack.pop()}splitTagNumber(t){const r=Z.exec(t,Z("([^1-9]+)(.*)")),n=r[1],u=r[2].length>0?r[2]:"1";return[n,u]}ignoreHandler(t,r,n){}handleParaOpen(t,r,n,u){t.currentText="";const[s,o]=t.splitTagNumber(u.style);["cp"].includes(s)||t.parser.parseItem(Ge.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleParaClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);["cp"].includes(n)?t.parser.parseItem(Ge.pubchapter("pubchapter",[null,null,t.currentText])):t.parser.parseItem(Ge.tag("endTag",[null,null,n,u])),t.currentText=""}handleCharOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Ge.tag("startTag",[null,null,`+${s}`,o]));const a=["sid","eid","style","srcloc","link-href","link-title","link-id","closed"];for(const[i,c]of Object.entries(u))a.includes(i)||t.parser.parseItem(Ge.attribute("attribute",[null,null,i,c]));t.stackPush(n,u)}handleCharClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Ge.tag("endTag",[null,null,`+${n}`,u]))}handleRefOpen(t){t.parser.parseItem(Ge.tag("startTag",[null,null,"xt",""]))}handleRefClose(t){t.parser.parseItem(Ge.tag("endTag",[null,null,"xt",""]))}handleRowOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Ge.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleRowClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Ge.tag("endTag",[null,null,n,u]))}handleCellOpen(t,r,n,u){const[s,o]=t.splitTagNumber(u.style);t.parser.parseItem(Ge.tag("startTag",[null,null,s,o])),t.stackPush(n,u)}handleCellClose(t){const r=t.stackPop()[1],[n,u]=t.splitTagNumber(r.style);t.parser.parseItem(Ge.tag("endTag",[null,null,n,u]))}handleBookOpen(t,r,n,u){t.parser.parseItem(Ge.tag("startTag",[null,null,"id",""])),t.parser.parseItem(Ge.printable("wordLike",[u.code])),t.parser.parseItem(Ge.printable("lineSpace",[" "])),t.stackPush(n,u)}handleBookClose(t){t.stackPop(),t.parser.parseItem(Ge.tag("endTag",[null,null,"id",""]))}handleChapter(t,r,n,u){u.number&&(t.parser.parseItem(Ge.chapter("chapter",[null,null,u.number])),u.pubnumber&&t.parser.parseItem(Ge.pubchapter("pubchapter",[null,null,u.pubnumber])),u.altnumber&&(t.parser.parseItem(Ge.tag("startTag",[null,null,"+ca",""])),t.parser.parseItem(Ge.printable("wordLike",[u.altnumber])),t.parser.parseItem(Ge.tag("endTag",[null,null,"+ca",""]))))}handleVerses(t,r,n,u){u.number&&(t.parser.parseItem(Ge.verses("verses",[null,null,u.number])),u.pubnumber&&(t.parser.parseItem(Ge.tag("startTag",[null,null,"+vp",""])),t.parser.parseItem(Ge.printable("wordLike",[u.pubnumber])),t.parser.parseItem(Ge.tag("endTag",[null,null,"+vp",""]))),u.altnumber&&(t.parser.parseItem(Ge.tag("startTag",[null,null,"+va",""])),t.parser.parseItem(Ge.printable("wordLike",[u.altnumber])),t.parser.parseItem(Ge.tag("endTag",[null,null,"+va",""]))))}handleNoteOpen(t,r,n,u){t.parser.parseItem(Ge.tag("startTag",[null,null,u.style,""])),t.parser.parseItem(Ge.printable("punctuation",[u.caller])),t.stackPush(n,u)}handleNoteClose(t){const r=t.stackPop()[1];t.parser.parseItem(Ge.tag("endTag",[null,null,r.style,""]))}handleSidebarOpen(t,r,n,u){t.parser.parseItem(Ge.tag("startTag",[null,null,"esb",""])),"category"in u&&(t.parser.parseItem(Ge.tag("startTag",[null,null,"cat",""])),t.parser.parseItem(Ge.printable("wordLike",[u.category])),t.parser.parseItem(Ge.tag("endTag",[null,null,"cat",""]))),t.stackPush(n,u)}handleSidebarClose(t){t.stackPop(),t.parser.parseItem(Ge.tag("startTag",[null,null,"esbe",""]))}handleMSOpen(t,r,n,u){let s=Z.exec(u.style,Z("(([a-z1-9]+)-([se]))"));if(s){const o=Ge.milestone("startMilestoneTag",[null,null,s[2],s[3]]);t.parser.parseItem(o);const a=["sid","eid","style","srcloc","link-href","link-title","link-id"];for(const[i,c]of Object.entries(u))a.includes(i)||t.parser.parseItem(Ge.attribute("attribute",[null,null,i,c]));t.parser.parseItem(Ge.milestone("endMilestoneMarker"))}else{const o=Ge.milestone("emptyMilestone",[null,null,u.style,""]);t.parser.parseItem(o)}t.stackPush(n,u)}handleMSClose(t){t.stackPop()}handleFigureOpen(t,r,n,u){t.parser.parseItem(Ge.tag("startTag",[null,null,"+fig",""]));for(const[s,o]of Object.entries(u)){if(s==="style")continue;const a=s==="file"?"src":s;t.parser.parseItem(Ge.attribute("attribute",[null,null,a,o]))}t.stackPush(n,u)}handleFigureClose(t){t.stackPop()[1],t.parser.parseItem(Ge.tag("endTag",[null,null,"+fig",""]))}handleOptBreakOpen(t,r,n,u){t.parser.parseItem(Ge.printable("softLineBreak",["//"])),t.stackPush(n,u)}handleOptBreakClose(t){t.stackPop()}}const DJ=(e,t)=>{new fJ().lexAndParse(e,t)},Bo=ye.ByteArray,{pushSuccinctGraftBytes:hJ,pushSuccinctScopeBytes:mJ,pushSuccinctTokenBytes:EJ}=ye.succinct,{addTag:yJ}=ye.tags,{labelForScope:gf}=ye.scopeDefs,{itemEnum:vJ}=ye.itemDefs,{scopeEnum:gJ}=ye.scopeDefs,{tokenCategory:AJ,tokenEnum:FJ}=ye.tokenDefs,gu=class{constructor(e){this.id=ye.generateId(),this.type=e,this.tags=new Set([]),this.blocks=[],this.activeScopes=[]}addTag(e){yJ(this.tags,e)}plainText(){return this.blocks.map(e=>e.plainText()).join("").trim()}addItem(e){this.lastBlock().addItem(e)}addBlockGraft(e){this.newBlock("hangingGraft"),this.lastBlock().bg.push(e)}lastBlock(){return this.blocks.length===0&&this.newBlock("orphanTokens"),this.blocks[this.blocks.length-1]}newBlock(e){this.blocks.length>0&&["orphanTokens","hangingGraft"].includes(this.blocks[this.blocks.length-1].bs.payload)?this.lastBlock().bs={type:"scope",subType:"start",payload:e}:this.blocks.push(new CJ(e))}trim(){this.blocks.forEach(e=>e.trim())}reorderSpanWithAtts(){this.blocks.forEach(e=>e.reorderSpanWithAtts())}makeNoteGrafts(e){this.blocks.forEach(t=>t.makeNoteGrafts(e))}close(e){for(const t of this.activeScopes.filter(()=>!0).reverse())this.closeActiveScope(e,t);this.activeScopes=[]}closeActiveScope(e,t){this.addItem({type:"scope",subType:"end",payload:t.label}),t.onEnd&&t.onEnd(e,t.label)}filterGrafts(e){return this.blocks.map(t=>t.filterGrafts(e)).reduce((t,r)=>t.concat(r),[])}filterScopes(e){this.blocks.forEach(t=>t.filterScopes(e))}text(){return this.blocks.map(e=>e.text()).join("")}addTableScopes(){let e=!1;for(const[t,r]of this.blocks.entries())!e&&r.bs.payload==="blockTag/tr"?(e=!0,this.blocks[t].items.unshift({type:"scope",subType:"start",payload:gf("table",[])})):e&&r.bs.payload!=="blockTag/tr"&&(e=!1,this.blocks[t-1].items.push({type:"scope",subType:"end",payload:gf("table",[])}));e&&this.lastBlock().items.push({type:"scope",subType:"end",payload:gf("table",[])})}graftifyIntroductionHeadings(e){let t=[...this.blocks.entries()];t.reverse();const r=["iot","is"].concat(e.customTags.introHeading);for(const[n,u]of t){const s=u.bs.payload.split("/")[1].replace(/[0-9]/g,"");if(r.includes(s)){const o=new gu("heading");e.sequences.heading.push(o),o.blocks.push(u);const a={type:"graft",subType:"heading",payload:o.id};this.blocks.length1&&(this.moveOrphanStartScopes(),this.moveOrphanEndScopes())}moveOrphanStartScopes(){for(const[e,t]of this.blocks.entries())if(!(e>=this.blocks.length-1))for(const r of[...t.items].reverse()){if(r.subType!=="start"||r.payload.startsWith("altChapter"))break;this.blocks[e+1].items.unshift(this.blocks[e].items.pop())}}moveOrphanStartScopes2(){for(const[e,t]of this.blocks.entries())if(!(e>=this.blocks.length-1))for(const r of[...t.items].reverse()){if(r.subType!=="start")break;this.blocks[e+1].items.unshift(this.blocks[e].items.pop())}}moveOrphanEndScopes(){for(const[e,t]of this.blocks.entries())if(e!==0)for(const r of[...t.items]){if(r.subType!=="end")break;this.blocks[e-1].items.push(this.blocks[e].items.shift())}}removeEmptyBlocks(e){const t=["blockTag/b","blockTag/ib"].concat(e),r=[];let n=!1;const u=s=>{const o=s.filter(i=>i.type==="scope"&&i.payload.startsWith("milestone")),a=new Set([]);for(const i of o)if(i.subType==="start")a.add(i.payload);else if(a.has(i.payload))return!0;return!1};for(const s of this.blocks.entries())s[1].tokens().length===0&&!u(s[1].items)&&!t.includes(s[1].bs.payload)&&r.push(s);for(const[s,o]of r.reverse())if(st.removeGraftsToEmptySequences(e))}succinctifyBlocks(e){const t=[];let r=[];const n=s=>{s.subType==="start"?r.filter(a=>a.payload===s.payload).length===0&&r.push(s):r=r.filter(o=>o.payload!==s.payload)};let u=0;for(const s of this.blocks){const o=new Bo(s.length),a=new Bo(1),i=new Bo(1),c=new Bo(1),l=new Bo(1);l.pushNByte(u);for(const f of s.bg)this.pushSuccinctGraft(a,e,f);for(const f of r)this.pushSuccinctScope(i,e,f);const p=[];for(const f of s.items)switch(f.type){case"token":this.pushSuccinctToken(o,e,f),f.subType==="wordLike"&&u++;break;case"graft":this.pushSuccinctGraft(o,e,f);break;case"scope":this.pushSuccinctScope(o,e,f),n(f),f.subType==="start"&&p.push(f);break;default:throw new Error(`Item type ${f.type} is not handled in succinctifyBlocks`)}const d=new Bo(10);this.pushSuccinctScope(d,e,s.bs);for(const f of p)this.pushSuccinctScope(c,e,f);o.trim(),a.trim(),d.trim(),i.trim(),c.trim(),t.push({c:o,bs:d,bg:a,os:i,is:c,nt:l})}return t}pushSuccinctToken(e,t,r){const n=t.enumForCategoryValue(AJ[r.subType],r.payload);EJ(e,FJ[r.subType],n)}pushSuccinctGraft(e,t,r){const n=t.enumForCategoryValue("graftTypes",r.subType),u=t.enumForCategoryValue("ids",r.payload);hJ(e,n,u)}pushSuccinctScope(e,t,r){const n=r.payload.split("/"),u=gJ[n[0]],s=n.slice(1).map(o=>t.enumForCategoryValue("scopeBits",o));mJ(e,vJ[`${r.subType}Scope`],u,s)}},CJ=class{constructor(e){this.id=ye.generateId(),this.items=[],this.bg=[],this.bs={type:"scope",subType:"start",payload:e},this.os=[]}addItem(e){this.items.push(e)}plainText(){return this.items.filter(e=>e.type==="token").map(e=>e.payload).join("")}trim(){this.items=this.trimEnd(this.trimStart(this.items))}reorderSpanWithAtts(){const e=[];for(const[t,r]of this.items.entries())r.subType==="start"&&r.payload.startsWith("spanWithAtts")&&e.push(t+1);for(const t of e){let r=t,n=[],u=[];for(;!(r>=this.items.length);){const s=this.items[r];if(s.type==="token")n.push(s);else if(s.subType==="start"&&s.payload.startsWith("attribute/spanWithAtts"))u.push(s);else break;r++}if(n.length!==0&&u.length!==0){let s=t;for(const o of u)this.items[s]=o,s++;for(const o of n)this.items[s]=o,s++}}}inlineToEnd(){let e=null;for(const[t,r]of this.items.entries())if(r.subType==="end"&&["inline/f","inline/fe","inline/x"].includes(r.payload)){e=r,this.items.splice(t,1);break}e&&this.addItem(e)}makeNoteGrafts(e){const t=[];for(const[r,n]of this.items.entries())n.subType==="start"&&(n.payload.startsWith("inline/f")||n.payload.startsWith("inline/x"))&&t.push(r);for(const r of t){const n=this.items[r].payload,u=this.items[r+1];if(u.type==="token"&&u.payload.length===1){const s=new gu("noteCaller");s.newBlock(n),s.addItem(u),e.sequences.noteCaller.push(s),this.items[r+1]={type:"graft",subType:"noteCaller",payload:s.id}}}}trimStart(e){if(e.length===0)return e;const t=e[0];return["lineSpace","eol"].includes(t.subType)?this.trimStart(e.slice(1)):t.type==="token"?e:[t,...this.trimStart(e.slice(1))]}trimEnd(e){if(e.length===0)return e;const t=e[e.length-1];return["lineSpace","eol"].includes(t.subType)?this.trimEnd(e.slice(0,e.length-1)):t.type==="token"?e:[...this.trimEnd(e.slice(0,e.length-1)),t]}filterGrafts(e){const t=[];let r=[];for(const[n,u]of this.grafts())this.graftPassesOptions(u,e)?t.push(u.payload):r.push(n);for(const[n,u]of Array.from(r.entries()))this.items.splice(u-n,1);r=[];for(const[n,u]of this.bg.entries())this.graftPassesOptions(u,e)?t.push(u.payload):r.push(n);for(const[n,u]of Array.from(r.entries()))this.bg.splice(u-n,1);return t}filterScopes(e){const t=[];for(const[r,n]of this.scopes())this.scopePassesOptions(n,e)||t.push(r);for(const[r,n]of Array.from(t.entries()))this.items.splice(n-r,1)}graftPassesOptions(e,t){return(!("includeGrafts"in t)||t.includeGrafts.includes(e.subType))&&(!("excludeGrafts"in t)||!t.excludeGrafts.includes(e.subType))}scopePassesOptions(e,t){return(!("includeScopes"in t)||this.scopeMatchesOptionArray(e.payload,t.includeScopes))&&(!("excludeScopes"in t)||!this.scopeMatchesOptionArray(e.payload,t.excludeScopes))}scopeMatchesOptionArray(e,t){for(const r of t)if(e.startsWith(r))return!0;return!1}removeGraftsToEmptySequences(e){const t=[];let r=[];for(const[n,u]of this.grafts())e.includes(u.payload)&&r.push(n);for(const[n,u]of Array.from(r.entries()))this.items.splice(u-n,1);r=[];for(const[n,u]of this.bg.entries())e.includes(u.payload)&&r.push(n);for(const[n,u]of Array.from(r.entries()))this.bg.splice(u-n,1);return t}grafts(){return Array.from(this.items.entries()).filter(e=>e[1].type==="graft")}scopes(){return Array.from(this.items.entries()).filter(e=>e[1].type==="scope")}tokens(){return Array.from(this.items.entries()).filter(e=>!["scope","graft"].includes(e[1].type))}text(){return this.tokens().map(e=>e[1].payload).join("")}},ci={},$7=[];for(const e of ds)["wordLike","eol","lineSpace","punctuation","unknown"].includes(e[1])&&(ci[e[1]]=Z(`^${e[2].xregexp.source}$`),$7.push(e[2]));const P7=e=>{const t=Z.union($7),r=[];for(const n of Z.match(e,t,"all")){let u;Z.test(n,ci.wordLike)?u="wordLike":Z.test(n,ci.punctuation)?u="punctuation":Z.test(n,ci.lineSpace)?u="lineSpace":Z.test(n,ci.eol)?u="eol":u="unknown",r.push([n,u])}return r},{labelForScope:bJ}=ye.scopeDefs,SJ=(e,t,r)=>{const{rows:n}=JSON.parse(e);t.headers.id=r,t.headers.bookCode=r;const u=new gu("table");for(const[s,o]of n.entries())for(const[a,i]of o.entries()){u.newBlock(bJ("tTableRow",[`${s}`]));const c=u.lastBlock();c.addItem({type:"scope",subType:"start",payload:`tTableCol/${a}`});for(const[l,p]of P7(i))c.addItem({type:"token",subType:p,payload:l});c.addItem({type:"scope",subType:"end",payload:`tTableCol/${a}`})}t.sequences.table.push(u),t.sequences.main.addBlockGraft({type:"graft",subType:"table",payload:u.id})},{labelForScope:Yc}=ye.scopeDefs;let Af=0;const k7=(e,t)=>{typeof t!="number"&&(Af=0);const r={...e,id:Af,parentId:typeof t=="number"?t:"none"};return Af++,e.children&&(r.children=e.children.map(n=>k7(n,r.id))),r},O7=e=>{const t=[{}];if(t[0].id=e.id,t[0].parentId=e.parentId,e.content&&(t[0].content=e.content),e.children){t[0].children=[];for(const r of e.children)t[0].children.push(r.id),O7(r).forEach(n=>t.push(n))}return t},wJ=(e,t,r)=>{t.headers.id=r,t.headers.bookCode=r;const n=new gu("tree");for(const u of O7(k7(JSON.parse(e)))){n.newBlock(Yc("tTreeNode",[`${u.id}`]));const s=Yc("tTreeParent",[`${u.parentId}`]);if(n.lastBlock().items.push({type:"scope",subType:"start",payload:s}),u.content)for(const[o,a]of Object.entries(u.content)){const i=n.lastBlock().items.length,c=P7(a),l=Yc("tTreeContent",[o,u.id,`${i}`,`${c.length}`]);n.lastBlock().items.push({type:"scope",subType:"start",payload:l});for(const[p,d]of c)n.lastBlock().items.push({type:"token",subType:d,payload:p});n.lastBlock().items.push({type:"scope",subType:"end",payload:l})}if(u.children)for(const[o,a]of u.children.entries()){const i=Yc("tTreeChild",[o,a]);n.lastBlock().items.push({type:"scope",subType:"start",payload:i}),n.lastBlock().items.push({type:"scope",subType:"end",payload:i})}n.lastBlock().items.push({type:"scope",subType:"end",payload:s})}t.sequences.tree.push(n),t.sequences.main.addBlockGraft({type:"graft",subType:"tree",payload:n.id})},{labelForScope:Bt}=ye.scopeDefs,_J=e=>{const t={};for(const r of e)for(const n of r.contexts){n[0]in t||(t[n[0]]={});const u=n[1];if(!u)t[n[0]]._noAccessor=r.parser;else{u in t[n[0]]||(t[n[0]][u]={});for(const s of n[2])t[n[0]][u][s]=r.parser}}return t},BJ=e=>[{contexts:[["startTag","tagName",["id","usfm","ide","sts","h","toc","toca","cl"]]],parser:{baseSequenceType:"header",forceNewSequence:!0,newBlock:!0,useTempSequence:!0,newScopes:[{label:t=>t.fullTagName,endedBy:["baseSequenceChange"],onEnd:(t,r)=>{if(t.headers[r]=t.current.sequence.plainText(),r==="id"&&(t.headers[r].length===3||t.headers[r].length>3&&t.headers[r].substring(3,4)===" ")){const n=t.headers[r].substring(0,3);t.headers.bookCode=n}}}]}},{contexts:[["startTag","tagName",["ms","mr","s","sr","r","qa","sp","sd"].concat(e.customTags.heading)]],parser:{baseSequenceType:"heading",forceNewSequence:!0,newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["mt"]]],parser:{baseSequenceType:"title",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["mte"]]],parser:{baseSequenceType:"endTitle",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["imt","is","ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex","imte"].concat(e.customTags.intro)]],parser:{baseSequenceType:"introduction",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["esb"]]],parser:{baseSequenceType:"sidebar",newBlock:!0,newScopes:[],after:t=>{t.mainLike=t.current.sequence}}},{contexts:[["startTag","tagName",["esbe"]]],parser:{baseSequenceType:"main",newBlock:!0,newScopes:[],after:t=>{t.mainLike=t.sequences.main}}},{contexts:[["startTag","tagName",["cat"]]],parser:{inlineSequenceType:"esbCat",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/cat","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=ye.generateId(),u={label:()=>Bt("esbCat",[n]),endedBy:["startTag/esbe"]};t.openNewScope(r,u,!0,t.mainLike)}}},{contexts:[["startTag","tagName",["rem"]]],parser:{baseSequenceType:"remark",forceNewSequence:!0,newScopes:[]}},{contexts:[["startTag","tagName",["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"].concat(e.customTags.paragraph)]],parser:{baseSequenceType:"mainLike",newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["tr"]]],parser:{newBlock:!0,newScopes:[]}},{contexts:[["startTag","tagName",["f","fe"]]],parser:{inlineSequenceType:"footnote",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/f","endTag/fe","endBlock"],onEnd:t=>t.returnToBaseSequence()}]}},{contexts:[["startTag","tagName",["x"]]],parser:{inlineSequenceType:"xref",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/x","endBlock"],onEnd:t=>t.returnToBaseSequence()}]}},{contexts:[["startTag","tagName",["fig"]]],parser:{inlineSequenceType:"fig",forceNewSequence:!0,newScopes:[{label:t=>Bt("spanWithAtts",[t.tagName]),endedBy:["endBlock","endTag/$tagName$"],onEnd:t=>t.clearAttributeContext()}],during:(t,r)=>{t.setAttributeContext(Bt("spanWithAtts",[r.tagName]))}}},{contexts:[["chapter"]],parser:{mainSequence:!0,newScopes:[{label:t=>Bt("chapter",[t.number]),endedBy:["chapter"]}]}},{contexts:[["pubchapter"]],parser:{mainSequence:!0,newScopes:[{label:t=>Bt("pubChapter",[t.numberString]),endedBy:["pubchapter","chapter"]}]}},{contexts:[["startTag","tagName",["ca"]]],parser:{inlineSequenceType:"altNumber",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/ca","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=ye.generateId(),u={label:()=>Bt("altChapter",[n]),endedBy:["startTag/ca","chapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["verses"]],parser:{mainSequence:!0,newScopes:[{label:t=>Bt("verses",[t.numberString]),endedBy:["verses","chapter","pubchapter"]}],during:(t,r)=>{r.numbers.forEach(n=>{const u={label:()=>Bt("verse",[n]),endedBy:["verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)})}}},{contexts:[["startTag","tagName",["vp"]]],parser:{inlineSequenceType:"pubNumber",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/vp","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=ye.generateId(),u={label:()=>Bt("pubVerse",[n]),endedBy:["startTag/vp","verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["startTag","tagName",["va"]]],parser:{inlineSequenceType:"altNumber",forceNewSequence:!0,newScopes:[{label:t=>Bt("inline",[t.fullTagName]),endedBy:["endTag/va","endBlock","implicitEnd"],onEnd:t=>t.returnToBaseSequence()}],during:(t,r)=>{const n=ye.generateId(),u={label:()=>Bt("altVerse",[n]),endedBy:["startTag/va","verses","chapter","pubchapter"]};t.openNewScope(r,u,!0,t.sequences.main)}}},{contexts:[["startTag","tagName",["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt"].concat(e.customTags.char)]],parser:{newScopes:[{label:t=>Bt("span",[t.fullTagName]),endedBy:["endBlock","endTag/$fullTagName$","implicitEnd"]}]}},{contexts:[["startTag","tagName",["th","thr","tc","tcr"]]],parser:{newScopes:[{label:t=>Bt("cell",[t.fullTagName]),endedBy:["startTag/th","startTag/thr","startTag/tc","startTag/tcr","startTag/th2","startTag/thr2","startTag/tc2","startTag/tcr2","startTag/th3","startTag/thr3","startTag/tc3","startTag/tcr3","endBlock","endTag/$fullTagName$"]}]}},{contexts:[["emptyMilestone"]],parser:{during:(t,r)=>{t.addEmptyMilestone(Bt("milestone",[r.tagName]))}}},{contexts:[["startMilestoneTag","sOrE","s"]],parser:{newScopes:[{label:t=>Bt("milestone",[t.tagName]),endedBy:["endMilestone/$tagName$"]}],during:(t,r)=>{t.setAttributeContext(Bt("milestone",[r.tagName]))}}},{contexts:[["endMilestoneMarker"]],parser:{during:t=>t.clearAttributeContext()}},{contexts:[["attribute"],["defaultAttribute"]],parser:{during:(t,r)=>{const n={w:"lemma",rb:"gloss",xt:"link-href"};if(t.current.attributeContext){const u=t.current.attributeContext.split("/");r.key==="default"&&u.length===2&&(r.key=n[u[1]]||`unknownDefault_${u[1]}`,r.printValue=r.printValue.replace(/default/,r.key)),[...r.values.entries()].forEach(s=>{const o={label:a=>Bt("attribute",[t.current.attributeContext,a.key,s[0],s[1]]),endedBy:["$attributeContext$"]};t.openNewScope(r,o)})}else t.addToken(Ge.printable("unknown",[r.printValue]))}}},{contexts:[["startTag","tagName",["w","rb"].concat(e.customTags.word)]],parser:{newScopes:[{label:t=>Bt("spanWithAtts",[t.tagName]),endedBy:["endBlock","endTag/$tagName$"],onEnd:t=>t.clearAttributeContext()}],during:(t,r)=>{t.setAttributeContext(Bt("spanWithAtts",[r.tagName]))}}},{contexts:[["wordLike"],["lineSpace"],["punctuation"],["eol"]],parser:{during:(t,r)=>t.addToken(r)}},{contexts:[["noBreakSpace"]],parser:{during:t=>{t.addToken(Ge.printable("lineSpace",[" "]))}}},{contexts:[["softLineBreak"]],parser:{during:t=>{t.addToken(Ge.printable("softLineBreak",["//"]))}}},{contexts:[["bareSlash"]],parser:{during:t=>{t.addToken(Ge.printable("bareSlash",["\\"]))}}},{contexts:[["unknown"]],parser:{during:(t,r)=>{t.addToken(Ge.printable("unknown",[r.printValue]))}}}],{labelForScope:Ff}=ye.scopeDefs,Qv=ye.parserConstants,TJ=class{constructor(e,t,r){this.filterOptions=e,this.customTags=t,this.emptyBlocks=r,this.specs=BJ(this),this.specLookup=_J(this.specs),this.headers={},this.baseSequenceTypes=Qv.usfm.baseSequenceTypes,this.inlineSequenceTypes=Qv.usfm.inlineSequenceTypes,this.setSequences(),this.setCurrent()}setSequences(){this.sequences={};for(const[e,t]of Object.entries({...this.baseSequenceTypes,...this.inlineSequenceTypes}))switch(t){case"1":this.sequences[e]=new gu(e);break;case"?":this.sequences[e]=null;break;case"*":this.sequences[e]=[];break;default:throw new Error(`Unexpected sequence arity '${t}' for '${e}'`)}this.mainLike=this.sequences.main}setCurrent(){this.current={sequence:this.sequences.main,parentSequence:null,baseSequenceType:"main",inlineSequenceType:null,attributeContext:null}}parseItem(e){let t=!1;["startTag"].includes(e.subclass)&&(this.closeActiveScopes(`startTag/${e.fullTagName}`),e.isNested||this.closeActiveScopes("implicitEnd")),["endTag"].includes(e.subclass)&&this.closeActiveScopes(`endTag/${e.fullTagName}`),["startMilestoneTag"].includes(e.subclass)&&e.sOrE==="e"&&this.closeActiveScopes(`endMilestone/${e.tagName}`),["chapter","pubchapter","verses"].includes(e.subclass)&&this.closeActiveScopes(e.subclass,this.sequences.main);const r=this.specForItem(e);r&&("before"in r.parser&&r.parser.before(this,e),t=!1,r.parser.baseSequenceType&&(t=(r.parser.baseSequenceType==="mainLike"?this.mainLike.type:r.parser.baseSequenceType)!==this.current.baseSequenceType||r.parser.forceNewSequence),t?(this.closeActiveScopes("baseSequenceChange"),this.changeBaseSequence(r.parser),"newBlock"in r.parser&&r.parser.newBlock&&(this.closeActiveScopes("endBlock"),this.current.sequence.newBlock(Ff("blockTag",[e.fullTagName])))):r.parser.inlineSequenceType?(this.current.inlineSequenceType=r.parser.inlineSequenceType,this.current.parentSequence=this.current.sequence,this.current.parentSequence.type==="header"&&(this.current.parentSequence=this.sequences.main),this.current.sequence=new gu(this.current.inlineSequenceType),this.current.sequence.newBlock(Ff("inline",r.parser.inlineSequenceType)),this.sequences[this.current.inlineSequenceType].push(this.current.sequence),this.current.parentSequence.addItem({type:"graft",subType:this.current.inlineSequenceType,payload:this.current.sequence.id})):"newBlock"in r.parser&&r.parser.newBlock&&this.current.sequence.newBlock(Ff("blockTag",[e.fullTagName])),"during"in r.parser&&r.parser.during(this,e),this.openNewScopes(r.parser,e),"after"in r.parser&&r.parser.after(this,e))}tidy(){for(const r of this.sequences.introduction)r.graftifyIntroductionHeadings(this);const e=this.allSequences();for(const r of e)r.trim(),r.reorderSpanWithAtts(),r.makeNoteGrafts(this),r.moveOrphanScopes(),r.removeEmptyBlocks(this.emptyBlocks);const t=this.emptySequences(e);for(const r of e)t&&r.removeGraftsToEmptySequences(t),r.addTableScopes(),r.close(this),this.substitutePubNumberScopes(r),r.moveOrphanStartScopes2(),r.type==="sidebar"&&this.substituteEsbCatScopes(r),["footnote","xref"].includes(r.type)&&r.lastBlock().inlineToEnd()}emptySequences(e){return e.filter(t=>t.blocks.length===0).map(t=>t.id)}substitutePubNumberScopes(e){const t={},r=this.sequenceById();for(const n of e.blocks){let u=0;const s=[...n.items];for(const[o,a]of s.entries())if(a.type==="graft"&&["pubNumber","altNumber"].includes(a.subType)){const i=r[a.payload].text().trim(),c=s[o+1].payload.split("/")[1];t[c]=i,n.items.splice(o-u,1),u++}}if(Object.keys(t).length>0)for(const n of e.blocks)for(const u of n.items.filter(s=>s.type==="scope")){const s=u.payload.split("/");["altChapter","pubVerse","altVerse"].includes(s[0])&&(u.payload=`${s[0]}/${t[s[1]]}`)}}substituteEsbCatScopes(e){const t={},r=this.sequenceById();for(const n of e.blocks){let u=0;const s=[...n.items];for(const[o,a]of s.entries())if(a.type==="graft"&&a.subType==="esbCat"){const i=r[a.payload].text().trim(),c=s[1].payload.split("/")[1];t[c]=i,n.items.splice(o-u,1),u++}}if(Object.keys(t).length>0)for(const n of e.blocks)for(const u of n.items.filter(s=>s.type==="scope")){const s=u.payload.split("/");s[0]==="esbCat"&&(u.payload=`${s[0]}/${t[s[1]]}`)}}allSequences(){const e=[];for(const[t,r]of Object.entries({...this.baseSequenceTypes,...this.inlineSequenceTypes}))switch(r){case"1":case"?":this.sequences[t]&&e.push(this.sequences[t]);break;case"*":this.sequences[t].forEach(n=>{e.push(n)});break;default:throw new Error(`Unexpected sequence arity '${r}' for '${t}'`)}return e}sequenceById(){const e={};return this.allSequences().forEach(t=>{e[t.id]=t}),e}filter(){const e=[],t=this.sequenceById();this.filterGrafts(this.sequences.main.id,t,e,this.filterOptions),this.removeUnusedSequences(e),this.filterScopes(Object.values(t),this.filterOptions)}filterGrafts(e,t,r,n){r.push(e);const u=t[e].filterGrafts(n);for(const s of u){if(t[s].type==="main")throw new Error("MAIN is child!",JSON.stringify(t[e],null,2));this.filterGrafts(s,t,r,n)}}removeUnusedSequences(e){for(const t of this.allSequences())if(!e.includes(t.id)){const r={...this.baseSequenceTypes,...this.inlineSequenceTypes}[t.type];switch(r){case"1":throw new Error("Attempting to remove sequence with arity of 1");case"?":this.sequences[t.type]=null;break;case"*":this.sequences[t.type]=this.sequences[t.type].filter(n=>n.id!==t.id);break;default:throw new Error(`Unexpected sequence arity '${r}' for '${t.type}'`)}}}filterScopes(e,t){e.forEach(r=>r.filterScopes(t))}specForItem(e){const t=e.subclass;if(!(t in this.specLookup))return null;for(const r of["tagName","sOrE"])if(r in e&&r in this.specLookup[t]&&e[r]in this.specLookup[t][r])return{parser:this.specLookup[t][r][e[r]]};return"_noAccessor"in this.specLookup[t]?{parser:this.specLookup[t]._noAccessor}:null}closeActiveScopes(e,t){t===void 0&&(t=this.current.sequence);const r=t.activeScopes.filter(n=>n.endedBy.includes(e)).reverse();t.activeScopes=t.activeScopes.filter(n=>!n.endedBy.includes(e)),r.forEach(n=>this.closeActiveScope(n,t))}closeActiveScope(e,t){this.addScope("end",e.label,t),e.onEnd&&e.onEnd(this,e.label)}changeBaseSequence(e){const t=e.baseSequenceType;if(t==="mainLike"){this.current.sequence=this.mainLike;return}this.current.baseSequenceType=t;const r=this.baseSequenceTypes[t];switch(r){case"1":this.current.sequence=this.sequences[t];break;case"?":this.sequences[t]||(this.sequences[t]=new gu(t)),this.current.sequence=this.sequences[t];break;case"*":this.current.sequence=new gu(t),e.useTempSequence||this.sequences[t].push(this.current.sequence);break;default:throw new Error(`Unexpected base sequence arity '${r}' for '${t}'`)}!e.useTempSequence&&this.current.sequence.type!=="main"&&this.mainLike.addBlockGraft({type:"graft",subType:this.current.baseSequenceType,payload:this.current.sequence.id})}returnToBaseSequence(){this.current.inlineSequenceType=null,this.current.sequence=this.current.parentSequence,this.current.parentSequence=null}openNewScopes(e,t){if(e.newScopes){let r=this.current.sequence;"mainSequence"in e&&e.mainSequence&&(r=this.sequences.main),e.newScopes.forEach(n=>this.openNewScope(t,n,!0,r))}}openNewScope(e,t,r,n){r===void 0&&(r=!0),n===void 0&&(n=this.current.sequence),r&&n.addItem({type:"scope",subType:"start",payload:t.label(e)});const u={label:t.label(e),endedBy:this.substituteEndedBys(t.endedBy,e)};"onEnd"in t&&(u.onEnd=t.onEnd),n.activeScopes.push(u)}substituteEndedBys(e,t){return e.map(r=>{let n=r.replace("$fullTagName$",t.fullTagName).replace("$tagName$",t.tagName);return this.current.attributeContext&&(n=n.replace("$attributeContext$",this.current.attributeContext.replace("milestone","endMilestone").replace("spanWithAtts","endTag"))),n})}addToken(e){this.current.sequence.addItem({type:"token",subType:e.subclass,payload:e.printValue})}addScope(e,t,r){r===void 0&&(r=this.current.sequence),r.addItem({type:"scope",subType:e,payload:t})}addEmptyMilestone(e){this.mainLike.addItem({type:"scope",subType:"start",payload:e}),this.mainLike.addItem({type:"scope",subType:"end",payload:e})}setAttributeContext(e){this.current.attributeContext=e}clearAttributeContext(){this.current.attributeContext=null}},$J=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perf2usfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],PJ=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"PERF to PkJSON",name:"perf2PkJson",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"pkJson",type:"json"}],documentation:"",description:"PERF=>JSON: Converts PERF to current Proskomma input format"},{id:999,type:"Outputs",outputs:[{name:"pkJson",type:"json",source:"Transform 1 pkJson"}]}],I7={perf2usfmPipeline:$J,perf2PkJsonPipeline:PJ},eg=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),kJ={startDocument:[{description:"Set up storage",test:()=>!0,action:({workspace:e,output:t})=>{e.blockRecords=[],t.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:({context:e,workspace:t})=>{t.blockRecords.push(eg(e))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:({context:e,workspace:t})=>{t.blockRecords.push(eg(e))}}],mark:[{description:"Add chapter number to block record",test:({context:e})=>e.sequences[0].element.subType==="chapter",action:({context:e,workspace:t})=>{t.blockRecords[t.blockRecords.length-1].perfChapter=e.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:({workspace:e,output:t})=>{for(const[r,n]of Object.entries(e.blockRecords)){if(!n.perfChapter)continue;let u=r,s=!1;for(;u>0&&!s;)e.blockRecords[u-1].type==="paragraph"||e.blockRecords[u-1].subType==="title"?s=!0:u--;t.report[u.toString()]=n.perfChapter}}}]},OJ=function({perf:e}){const t=new vu.PerfRenderFromJson({srcJson:e,actions:kJ}),r={};return t.renderDocument({docId:"",config:{maxLength:60},output:r}),{report:r.report}},IJ={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:OJ},_r=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,NJ=(e,t)=>{let r=`\\${t}-s |`;for(let[n,u]of Object.entries(e))n==="x-morph"?r=r+_r(n)+'="'+u.join(",")+'" ':r=r+_r(n)+'="'+u+'" ';return r+"\\*"},qJ=(e,t,r=!1)=>{let n="|";for(let[u,s]of Object.entries(e))n=n+_r(u)+'="'+s+'" ';return n=n+"\\",r&&(n=n+"+"),n+t+"*"},xJ={startDocument:[{description:"Set up environment",test:()=>!0,action:({context:e,workspace:t})=>{t.usfmBits=[""],t.nestedWrapper=0;for(let[r,n]of Object.entries(e.document.metadata.document).filter(u=>!["tags","properties","bookCode","cl"].includes(u[0])))t.usfmBits.push(`\\${_r(r)} ${n} `)}}],blockGraft:[{description:"Follow block grafts",test:({context:e})=>["title","heading","introduction"].includes(e.sequences[0].block.subType),action:e=>{let t=e.context.sequences[0],r=e.config.report[t.block.blockN.toString()];const n=t.block.target;r&&t.type==="main"&&e.workspace.usfmBits.push(` \\c ${r} -`),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{const t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"&&e.sequences[0].type==="footnote"||e.sequences[0].block.subType==="usfm:x"&&e.sequences[0].type==="xref",action:({context:e,workspace:t})=>{t.nestedWrapper=0;let r=e.sequences[0];t.usfmBits.push(`\\${Ir(r.block.subType.split(":")[1])} `)}},{description:"Output footnote note_caller tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"||e.sequences[0].block.subType==="usfm:x",action:({workspace:e})=>{e.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:({context:e,workspace:t,config:r})=>{t.nestedWrapper=0;let n=e.sequences[0],u=r.report[n.block.blockN.toString()];u&&n.type==="main"&&t.usfmBits.push(` +`),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{const t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"&&e.sequences[0].type==="footnote"||e.sequences[0].block.subType==="usfm:x"&&e.sequences[0].type==="xref",action:({context:e,workspace:t})=>{t.nestedWrapper=0;let r=e.sequences[0];t.usfmBits.push(`\\${_r(r.block.subType.split(":")[1])} `)}},{description:"Output footnote note_caller tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"||e.sequences[0].block.subType==="usfm:x",action:({workspace:e})=>{e.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:({context:e,workspace:t,config:r})=>{t.nestedWrapper=0;let n=e.sequences[0],u=r.report[n.block.blockN.toString()];u&&n.type==="main"&&t.usfmBits.push(` \\c ${u} `),t.usfmBits.push(` -\\${Ir(n.block.subType.split(":")[1])} -`)}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"&&e.sequences[0].type==="footnote"||e.sequences[0].block.subType==="usfm:x"&&e.sequences[0].type==="xref",action:({context:e,workspace:t})=>{let r=e.sequences[0];t.usfmBits.push(`\\${Ir(r.block.subType.split(":")[1])}*`)}},{description:"Output footnote note_caller tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"||e.sequences[0].block.subType==="usfm:x",action:()=>{}},{description:"Output nl",test:()=>!0,action:({workspace:e})=>{e.usfmBits.push(` -`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:({context:e,workspace:t})=>{let r=e.sequences[0].element,n=JW(r.atts,Ir(r.subType.split(":")[1]));t.usfmBits.push(n)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:({context:e,workspace:t})=>{t.usfmBits.push(`\\${Ir(e.sequences[0].element.subType.split(":")[1])}-e\\*`)}}],text:[{description:"Output text",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element.text;t.usfmBits.push(r)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element;r.subType==="verses"&&t.usfmBits.push(` +\\${_r(n.block.subType.split(":")[1])} +`)}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"&&e.sequences[0].type==="footnote"||e.sequences[0].block.subType==="usfm:x"&&e.sequences[0].type==="xref",action:({context:e,workspace:t})=>{let r=e.sequences[0];t.usfmBits.push(`\\${_r(r.block.subType.split(":")[1])}*`)}},{description:"Output footnote note_caller tag (footnote)",test:({context:e})=>e.sequences[0].block.subType==="usfm:f"||e.sequences[0].block.subType==="usfm:x",action:()=>{}},{description:"Output nl",test:()=>!0,action:({workspace:e})=>{e.usfmBits.push(` +`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:({context:e,workspace:t})=>{let r=e.sequences[0].element,n=NJ(r.atts,_r(r.subType.split(":")[1]));t.usfmBits.push(n)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:({context:e,workspace:t})=>{t.usfmBits.push(`\\${_r(e.sequences[0].element.subType.split(":")[1])}-e\\*`)}}],text:[{description:"Output text",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element.text;t.usfmBits.push(r)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element;r.subType==="verses"&&t.usfmBits.push(` \\v ${r.atts.number} `)}}],endSequence:[{description:"Output \\cl",test:({context:e})=>e.document.metadata.document.cl&&e.sequences[0].type==="title",action:({context:e,workspace:t})=>{t.usfmBits.push(` \\cl ${e.document.metadata.document.cl} -`)}}],startWrapper:[{description:"Output start tag",test:()=>!0,action:({workspace:e,context:t})=>{let r=t.sequences[0];e.nestedWrapper>0?e.usfmBits.push(`\\+${Ir(r.element.subType.split(":")[1])} `):e.usfmBits.push(`\\${Ir(r.element.subType.split(":")[1])} `),e.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:({context:e})=>!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(e.sequences[0].element.subType.split(":")[1]),action:({workspace:e,context:t})=>{e.nestedWrapper-=1;let r=t.sequences[0],n=r.element.subType.split(":")[1],u=e.nestedWrapper>0;if(n==="w"){let s=zW(r.element.atts,Ir(n),u);e.usfmBits.push(s)}else u?e.usfmBits.push(`\\+${Ir(r.element.subType.split(":")[1])}*`):e.usfmBits.push(`\\${Ir(r.element.subType.split(":")[1])}*`)}},{description:"Do NOT output end tag",test:()=>!0,action:({workspace:e})=>{e.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:({workspace:e,output:t})=>{t.usfm=e.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` -`)}}]},XW=function({perf:e,report:t}){const r=new Fu.PerfRenderFromJson({srcJson:e,actions:KW}),n={};return r.renderDocument({docId:"",config:{report:t},output:n}),{usfm:n.usfm}},YW={name:"perf2usfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:XW},ZW=ds.filter(e=>e[1]==="wordLike")[0][2],QW=ds.filter(e=>e[1]==="lineSpace")[0][2],eJ=ds.filter(e=>e[1]==="punctuation")[0][2],tJ=e=>{[...e.os].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t})}),e.os=[]},rJ=e=>{[...e.os.filter(t=>["span"].includes(t.split("/")[1]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},qy=e=>{[...e.os.filter(t=>["verse","verses"].includes(t.split("/")[0]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},nJ=e=>{[...e.os.filter(t=>["chapter"].includes(t.split("/")[0]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},uJ={startDocument:[{description:"Set up word object",test:()=>!0,action:({workspace:e,output:t})=>{t.pkJson={},e.sequenceId=null,e.block=null,e.os=[],e.waitingBlockGrafts=[]}}],startSequence:[{description:"Add sequence array to output",test:()=>!0,action:e=>{e.output.pkJson[e.context.sequences[0].id]=[],e.workspace.sequenceId=e.context.sequences[0].id}}],endSequence:[{description:"Reset sequenceId pointer",test:()=>!0,action:e=>{var t;tJ(e.workspace),e.workspace.sequenceId=(t=e.context.sequences[1])==null?void 0:t.id}}],unresolvedBlockGraft:[{description:"Stash for next para",test:()=>!0,action:({context:e,workspace:t})=>{e.sequences[0].block.target&&t.waitingBlockGrafts.push({type:"graft",subType:e.sequences[0].block.subType,payload:e.sequences[0].block.target})}}],unresolvedInlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:({context:e,workspace:t})=>{e.sequences[0].element.target&&t.block.items.push({type:"graft",subType:e.sequences[0].element.subType,payload:e.sequences[0].element.target})}}],startParagraph:[{description:"Add object for paragraph block",test:()=>!0,action:({context:e,workspace:t,output:r})=>{t.block={os:[...t.os],is:[],bs:{type:"scope",subType:"start",payload:`blockTag/${e.sequences[0].block.subType.split(":")[1]}`},bg:[...t.waitingBlockGrafts],items:[]},r.pkJson[t.sequenceId].push(t.block)}}],endParagraph:[{description:"Close open scopes",test:()=>!0,action:({workspace:e})=>{rJ(e),e.waitingBlockGrafts=[]}}],mark:[{description:"ts mark as milestone",test:({context:e})=>["usfm:ts"].includes(e.sequences[0].element.subType),action:({workspace:e})=>{const t="milestone/ts";e.block.is.includes(t)||e.block.is.push(t),e.os.push(t),e.block.items.push({type:"scope",subType:"start",payload:t}),e.block.items.push({type:"scope",subType:"end",payload:t})}},{description:"Chapter",test:({context:e})=>["chapter"].includes(e.sequences[0].element.subType),action:({context:e,workspace:t})=>{qy(t),nJ(t);const n=`chapter/${e.sequences[0].element.atts.number}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n})}},{description:"Verses",test:({context:e})=>["verses"].includes(e.sequences[0].element.subType),action:({context:e,workspace:t})=>{qy(t);const r=e.sequences[0].element,n=r.atts.number;let u=[parseInt(n)];if(n.includes("-")){let[o,a]=n.split("-").map(i=>parseInt(i));for(u=[o];o<=a;)o++,u.push(o)}for(const o of u){const a=`verse/${o}`;t.os.push(a),t.block.is.includes(a)||t.block.is.push(a),t.block.items.push({type:"scope",subType:"start",payload:a})}const s=`verses/${r.atts.number}`;t.block.is.includes(s)||t.block.is.push(s),t.os.push(s),t.block.items.push({type:"scope",subType:"start",payload:s})}}],startMilestone:[{description:"Add scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`milestone/${r.subType.split(":")[1]}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n});for(const[u,s]of Object.entries(r.atts||{})){const o=s.toString().split(",");for(const[a,i]of o.entries()){const c=`attribute/milestone/${r.subType.split(":")[1]}/${u}/${a}/${i}`;t.block.is.includes(c)||t.block.is.push(c),t.os.push(c),t.block.items.push({type:"scope",subType:"start",payload:c})}}}}],endMilestone:[{description:"Remove scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`attribute/milestone/${r.subType.split(":")[1]}`;for(const s of[...t.os.filter(o=>o.startsWith(n))].reverse())t.os=t.os.filter(o=>o!==s),t.block.items.push({type:"scope",subType:"end",payload:s});const u=`milestone/${r.subType.split(":")[1]}`;t.os=t.os.filter(s=>s!==u),t.block.items.push({type:"scope",subType:"end",payload:u})}}],startWrapper:[{description:"Add scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`${r.subType==="usfm:w"?"spanWithAtts":"span"}/${r.subType.split(":")[1]}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n});for(const[u,s]of Object.entries(r.atts||{})){const o=s.toString().split(",");for(const[a,i]of o.entries()){const c=`attribute/spanWithAtts/w/${u}/${a}/${i}`;t.block.is.includes(c)||t.block.is.push(c),t.os.push(c),t.block.items.push({type:"scope",subType:"start",payload:c})}}}}],endWrapper:[{description:"Remove scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element;for(const[u,s]of[...Object.entries(r.atts||{})].reverse()){const o=s.toString().split(",");for(const[a,i]of[...o.entries()].reverse()){const c=`attribute/spanWithAtts/w/${u}/${a}/${i}`;t.os=t.os.filter(l=>l!==c),t.block.items.push({type:"scope",subType:"end",payload:c})}}const n=`${r.subType==="usfm:w"?"spanWithAtts":"span"}/${r.subType.split(":")[1]}`;t.os=t.os.filter(u=>u!==n),t.block.items.push({type:"scope",subType:"end",payload:n})}}],text:[{description:"Log occurrences",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element.text,n=ne.union(ds.map(s=>s[2])),u=ne.match(r,n,"all");for(const s of u){let o;ne.test(s,ZW)?o="wordLike":ne.test(s,QW)?o="lineSpace":ne.test(s,eJ)&&(o="punctuation"),t.block.items.push({type:"token",subType:o,payload:s})}}}],endDocument:[{description:"Rework hanging end cv scopes",test:()=>!0,action:({output:e})=>{const t=Object.values(e.pkJson)[0];for(let r=1;r0;){const o=n.shift();u.push(o),t[r].os=t[r].os.filter(a=>a!==o.payload),s--}}}}]},sJ=function({perf:e}){const t=new Fu.PerfRenderFromJson({srcJson:e,ignoreMissingSequences:!0,actions:uJ}),r={};return t.renderDocument({docId:"",config:{},output:r}),{pkJson:r.pkJson}},oJ={name:"perf2PkJson",type:"Transform",description:"PERF=>JSON: Converts PERF to current Proskomma input format",documentation:"",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"pkJson",type:"json"}],code:sJ},i7={calculateUsfmChapterPositions:WW,perf2usfm:YW,perf2PkJson:oJ},xy=Ae.ByteArray,{itemEnum:d1}=Ae.itemDefs,{tokenEnum:aJ}=Ae.tokenDefs,iJ=0,Zo=2,pp=3,Jc=e=>{const t=e.sequences[e.mainId],r=e.processor.docSets[e.docSetId];r.buildPreEnums(),r.buildEnumIndexes();const n={},u={};let s="0",o="0",a="1",i=0;if(t.chapterVerses={},r.enums.wordLike.length===0)throw new Error("No wordLike content in docSet - probably a USFM issue, maybe missing \\mt?");t.tokensPresent=new M5(new Array(r.enums.wordLike.length).fill(0).map(c=>c.toString()).join(""));for(const[c,l]of t.blocks.entries()){let p=0,f=l.c,d=-1;for(;pparseInt(A)).sort((A,m)=>A-m);if(f.length===0)continue;const d=f[f.length-1],h=Array.from(Array(d+1).keys());let E=0;for(const A of h){const m=`${A}`;if(m in l){const y=l[m],F=y.length;for(const[B,P]of y.entries()){if(!P.verses){console.log(`** VerseElement without verses for ${A} in buildChapterVerseIndex`);continue}const $=r.enumForCategoryValue("scopeBits",P.verses),I=P.startBlock===P.endBlock?Zo:pp;p.pushByte(0),I===Zo?p.pushNBytes([P.startBlock,P.startItem,P.endItem,P.nextToken,$]):p.pushNBytes([P.startBlock,P.endBlock,P.startItem,P.endItem,P.nextToken,$]),p.setByte(E,D1(I,B===F-1,p.length-E)),E=p.length}}else p.pushByte(D1(iJ,!0,1)),E++}p.trim()}t.chapters={};for(const[c,l]of Object.entries(u)){if(!("startBlock"in l)||!("endBlock"in l))continue;const p=new xy;t.chapters[c]=p;const f=l.startBlock===l.endBlock?Zo:pp;p.pushByte(0),f===Zo?p.pushNBytes([l.startBlock,l.startItem,l.endItem,l.nextToken]):p.pushNBytes([l.startBlock,l.endBlock,l.startItem,l.endItem,l.nextToken]),p.setByte(0,D1(f,!0,p.length)),p.trim()}},Ry=(e,t)=>{const r=e.processor.docSets[e.docSetId];r.buildEnumIndexes();const n=[],u=e.sequences[e.mainId].chapterVerses[t];if(u){let s=0,o=[];for(;s{const r=e.sequences[e.mainId].chapters[t];if(r){const n=c7(r,0)[0];if(n===Zo){const u=r.nBytes(1,4);return{startBlock:u[0],endBlock:u[0],startItem:u[1],endItem:u[2],nextToken:u[3]}}else if(n===pp){const u=r.nBytes(1,5);return{startBlock:u[0],endBlock:u[1],startItem:u[2],endItem:u[3],nextToken:u[4]}}}},D1=(e,t,r)=>r+(t?32:0)+e*64,c7=(e,t)=>{const r=e.byte(t);return[r>>6,(r>>5)%2===1,r%32]},cJ=e=>{const t=new Set,r=e.processor.docSets[e.docSetId];r.maybeBuildEnumIndexes();const n=(s,o,a)=>{a.add(o.id);for(const i of o.blocks){for(const c of r.unsuccinctifyGrafts(i.bg))a.has(c[2])||n(s,s.sequences[c[2]],a);for(const c of r.unsuccinctifyItems(i.c,{grafts:!0},0))a.has(c[2])||n(s,s.sequences[c[2]],a)}};n(e,e.sequences[e.mainId],t);let u=!1;for(const s of Object.keys(e.sequences))t.has(s)||(delete e.sequences[s],u=!0);return u},lJ=(e,t,r)=>{const n=Ae.generateId();return e.sequences[n]={id:n,type:t,tags:new Set(r||[]),isBaseType:t in e.baseSequenceTypes,blocks:[]},n},pJ=(e,t)=>{if(!(t in e.sequences))return!1;if(e.sequences[t].type==="main")throw new Error("Cannot delete main sequence");return e.sequences[t].type in e.baseSequenceTypes?My(e,"block",t):My(e,"inline",t),delete e.sequences[t],e.buildChapterVerseIndex(globalThis),e.gcSequences(),!0},My=(e,t,r)=>{const n=e.processor.docSets[e.docSetId];for(const u of Object.values(e.sequences))for(const s of u.blocks){const o=t==="block"?s.bg:s.c;let a=0;for(;a{e.processor.docSets[e.docSetId].maybeBuildEnumIndexes(),r=r||(l=>l);const i=e.sequences[t],c=r({id:t,type:i.type,tags:i.tags,isBaseType:i.isBaseType,verseMapping:i.verseMapping});return dJ(i,c,n,u,s,o),e.sequences[t]=c,c.type==="main"&&e.buildChapterVerseIndex(),c},dJ=(e,t,r,n,u,s)=>{r=r||((o,a,i)=>!!i),n=n||((o,a,i,c,l,p,f)=>!!i||f),u=u||((o,a,i)=>i),s=s||((o,a,i,c,l,p,f,d,h)=>{for(let E=0;E{let o=0,a=-1;for(;o{if(n!==!1&&(n=!0),!(t in e.sequences))return!1;const u=e.sequences[t];return r<0||r>=u.blocks.length?!1:(u.blocks.splice(r,1),n&&e.buildChapterVerseIndex(globalThis),!0)},AJ=(e,t,r,n,u,s)=>{if(s!==!1&&(s=!0),!(t in e.sequences))return!1;const o=e.sequences[t];if(r<0||r>o.blocks.length)return!1;const a=e.processor.docSets[e.docSetId];a.maybeBuildPreEnums();const i={bs:new js(0),bg:new js(0),c:new js(0),os:new js(0),is:new js(0),nt:new js(0)},c=n.split("/"),l=mJ[c[0]],p=p7(c[0]);if(c.length!==p)throw new Error(`Scope ${n} has ${c.length} component(s) (expected ${p}`);const f=c.slice(1).map(d=>a.enumForCategoryValue("scopeBits",d,!0));return l7(i.bs,G2.startScope,l,f),i.bs.trim(),u&&e6(a,e.id,t,r,u),o.blocks.splice(r,0,i),s&&e.buildChapterVerseIndex(),!0},FJ=(e,t)=>{for(const r of["bs","bg","c","is","os"]){const n=e[r],u=new js(n.length);let s=0;for(;s1;){const f=t.scopeBits[n.nByte(s+p)];l.push(f),p+=n.nByteLength(f),c--}l7(u,a,i,l)}s+=o}u.trim(),e[r]=u}},CJ=Ae.ByteArray,{itemEnum:h1}=Ae.itemDefs,bJ=(e,t)=>{if(!t||Object.keys(t).length===0)return;const r=e.processor.docSets[e.docSetId],n=(s,o,a,i,c,l,p)=>{if(c===h1.token)return!0;if(c===h1.startScope||c===h1.endScope){if(!t.includeScopes&&!t.excludeScopes)return!0;{const f=r.unsuccinctifyScope(a.c,c,l,p);return(!t.includeScopes||t.includeScopes.filter(d=>f[2].startsWith(d)).length>0)&&(!t.excludeScopes||t.excludeScopes.filter(d=>f[2].startsWith(d)).length===0)}}else{if(!t.includeGrafts&&!t.excludeGrafts)return!0;const f=r.unsuccinctifyGraft(a.c,l,p);return(!t.includeGrafts||t.includeGrafts.filter(d=>f[1].startsWith(d)).length>0)&&(!t.excludeGrafts||t.excludeGrafts.filter(d=>f[1].startsWith(d)).length===0)}},u=(s,o,a)=>{const i=new CJ(a.bg.length);let c=0;for(;cd[1].startsWith(h)).length>0)&&(!t.excludeGrafts||t.excludeGrafts.filter(h=>d[1].startsWith(h)).length===0))for(let h=0;h{e.modifySequence(s,null,null,n,u,null)}),Object.values(e.sequences).forEach(s=>r.updateBlockIndexesAfterFilter(s)),e.gcSequences()},SJ=e=>{const t={sequences:{}};t.headers=e.headers,t.mainId=e.mainId,t.tags=Array.from(e.tags);for(const[r,n]of Object.entries(e.sequences))t.sequences[r]=wJ(n);return t},wJ=e=>{const t={type:e.type,blocks:e.blocks.map(r=>_J(r)),tags:Array.from(e.tags)};if(e.type==="main"){t.chapters={};for(const[r,n]of Object.entries(e.chapters||{}))n.trim(),t.chapters[r]=n.base64();t.chapterVerses={};for(const[r,n]of Object.entries(e.chapterVerses||{}))n.trim(),t.chapterVerses[r]=n.base64();"tokensPresent"in e&&(t.tokensPresent="0x"+e.tokensPresent.toString(16))}return t},_J=e=>{for(const t of["bs","bg","c","is","os","nt"])e[t].trim();return{bs:e.bs.base64(),bg:e.bg.base64(),c:e.c.base64(),is:e.is.base64(),os:e.os.base64(),nt:e.nt.base64()}},BJ=(e,t)=>{e.recordPreEnum("scopeBits","0");for(const[r,n]of t.blocks.entries())for(const[u,s]of[...n.items,n.bs,...n.bg].entries())if(s.subType==="wordLike")e.recordPreEnum("wordLike",s.payload);else if(["lineSpace","eol","punctuation","softLineBreak","bareSlash","unknown"].includes(s.subType))e.recordPreEnum("notWordLike",s.payload);else if(s.type==="graft")e.recordPreEnum("graftTypes",s.subType);else if(s.subType==="start"){const o=s.payload.split("/");if(o.length!==Ae.scopeDefs.nComponentsForScope(o[0]))throw new Error(`Scope ${s.payload} has unexpected number of components`);for(const a of o.slice(1))e.recordPreEnum("scopeBits",a)}},TJ=(e,t)=>{e.recordPreEnum("scopeBits","0"),e.recordPreEnum("ids",t.id);for(const r of t.blocks)for(const n of["bs","bg","c","is","os"])$J(e,r[n])},$J=(e,t)=>{for(const r of e.unsuccinctifyItems(t,{},0))if(r[0]==="token")r[1]==="wordLike"?e.recordPreEnum("wordLike",r[2]):e.recordPreEnum("notWordLike",r[2]);else if(r[0]==="graft")e.recordPreEnum("graftTypes",r[1]);else if(r[0]==="scope"&&r[1]==="start"){const n=r[2].split("/");if(n.length!==Ae.scopeDefs.nComponentsForScope(n[0]))throw new Error(`Scope ${r[2]} has unexpected number of components`);for(const u of n.slice(1))e.recordPreEnum("scopeBits",u)}},{addTag:PJ,removeTag:OJ,validateTags:kJ}=Ae.tags,IJ=Ae.parserConstants;let Uy=class{constructor(t,r,n,u,s,o,a,i){if(this.processor=t,this.docSetId=r,this.baseSequenceTypes=IJ.usfm.baseSequenceTypes,n)switch(this.id=Ae.generateId(),this.filterOptions=s,this.customTags=o,this.emptyBlocks=a,this.tags=new Set(i||[]),kJ(this.tags),this.headers={},this.mainId=null,this.sequences={},n.toLowerCase()){case"usfm":case"sfm":this.processUsfm(u);break;case"usx":this.processUsx(u);break;case"tsv":this.processTSV(u);break;case"nodes":this.processNodes(u);break;default:throw new Error(`Unknown document contentType '${n}'`)}}addTag(t){PJ(this.tags,t)}removeTag(t){OJ(this.tags,t)}makeParser(){return new LW(this.filterOptions,this.customTags,this.emptyBlocks)}processUsfm(t){const r=this.makeParser();EW(t,r),this.postParseScripture(r)}processUsx(t){const r=this.makeParser();wW(t,r),this.postParseScripture(r)}processTSV(t){const r=this.makeParser(),n=`T${this.processor.nextTable>9?this.processor.nextTable:"0"+this.processor.nextTable}`;this.processor.nextTable++,xW(t,r,n),this.headers=r.headers,this.succinctPass1(r),this.succinctPass2(r),Jc(this);const u=Object.values(this.sequences).filter(s=>s.type==="table")[0];for(const[s,o]of JSON.parse(t).headings.entries())u.tags.add(`col${s}:${o}`)}processNodes(t){const r=this.makeParser(),n=`N${this.processor.nextNodes>9?this.processor.nextNodes:"0"+this.processor.nextNodes}`;this.processor.nextNodes++,RW(t,r,n),this.headers=r.headers,this.succinctPass1(r),this.succinctPass2(r),Jc(this)}postParseScripture(t){t.tidy();const r=t.filterOptions;this.headers=t.headers,this.succinctPass1(t),this.succinctPass2(t),this.succinctFilter(r),Jc(this)}succinctFilter(t){bJ(this,t)}succinctPass1(t){const r=this.processor.docSets[this.docSetId];for(const n of t.allSequences())r.recordPreEnum("ids",n.id),this.recordPreEnums(r,n);r.enums.wordLike.length===0&&r.sortPreEnums(),r.buildEnums()}recordPreEnums(t,r){BJ(t,r)}rerecordPreEnums(t,r){TJ(t,r)}succinctPass2(t){const r=this.processor.docSets[this.docSetId];this.mainId=t.sequences.main.id;for(const n of t.allSequences())this.sequences[n.id]={id:n.id,type:n.type,tags:new Set(n.tags),isBaseType:n.type in t.baseSequenceTypes,blocks:n.succinctifyBlocks(r)};this.sequences[this.mainId].verseMapping={}}modifySequence(t,r,n,u,s,o){fJ(this,t,r,n,u,s,o)}buildChapterVerseIndex(){Jc(this)}chapterVerseIndexes(){const t={};for(const r of Object.keys(this.sequences[this.mainId].chapterVerses))t[r]=Ry(this,r);return t}chapterVerseIndex(t){return Ry(this,t)}chapterIndexes(){const t={};for(const r of Object.keys(this.sequences[this.mainId].chapters))t[r]=jy(this,r);return t}chapterIndex(t){return jy(this,t)}rewriteSequenceBlocks(t,r){const n=this.sequences[t];for(const u of n.blocks)this.rewriteSequenceBlock(u,r)}rewriteSequenceBlock(t,r){FJ(t,r)}serializeSuccinct(){return SJ(this)}gcSequences(){return cJ(this)}newSequence(t,r){return lJ(this,t,r)}deleteSequence(t){return pJ(this,t)}deleteBlock(t,r,n){return gJ(this,t,r,n)}newBlock(t,r,n,u,s){return AJ(this,t,r,n,u,s)}perf(t){const r=new Fu.PerfRenderFromProskomma({proskomma:this.processor,actions:Fu.render.perfToPerf.renderActions.identityActions}),n={};return r.renderDocument({docId:this.id,config:{},output:n}),t?JSON.stringify(n.perf,null,t):JSON.stringify(n.perf)}async usfm(){const t=JSON.parse(this.perf());try{return(await new Fu.PipelineHandler({pipelines:a7,transforms:i7,proskomma:this.processor}).runPipeline("perf2usfmPipeline",{perf:t})).usfm}catch(r){console.error(`pipelineHandler Error : -`,r)}}sofria(t,r){const n=new Fu.SofriaRenderFromProskomma({proskomma:this.processor,actions:Fu.render.sofriaToSofria.renderActions.identityActions}),u={},s={};r&&(s.chapters=[`${r}`]);try{n.renderDocument({docId:this.id,config:s,output:u})}catch(o){throw console.log(o),o}return t?JSON.stringify(u.sofria,null,t):JSON.stringify(u.sofria)}};const NJ=` +`)}}],startWrapper:[{description:"Output start tag",test:()=>!0,action:({workspace:e,context:t})=>{let r=t.sequences[0];e.nestedWrapper>0?e.usfmBits.push(`\\+${_r(r.element.subType.split(":")[1])} `):e.usfmBits.push(`\\${_r(r.element.subType.split(":")[1])} `),e.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:({context:e})=>!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(e.sequences[0].element.subType.split(":")[1]),action:({workspace:e,context:t})=>{e.nestedWrapper-=1;let r=t.sequences[0],n=r.element.subType.split(":")[1],u=e.nestedWrapper>0;if(n==="w"){let s=qJ(r.element.atts,_r(n),u);e.usfmBits.push(s)}else u?e.usfmBits.push(`\\+${_r(r.element.subType.split(":")[1])}*`):e.usfmBits.push(`\\${_r(r.element.subType.split(":")[1])}*`)}},{description:"Do NOT output end tag",test:()=>!0,action:({workspace:e})=>{e.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:({workspace:e,output:t})=>{t.usfm=e.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` +`)}}]},RJ=function({perf:e,report:t}){const r=new vu.PerfRenderFromJson({srcJson:e,actions:xJ}),n={};return r.renderDocument({docId:"",config:{report:t},output:n}),{usfm:n.usfm}},jJ={name:"perf2usfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:RJ},MJ=ds.filter(e=>e[1]==="wordLike")[0][2],LJ=ds.filter(e=>e[1]==="lineSpace")[0][2],UJ=ds.filter(e=>e[1]==="punctuation")[0][2],GJ=e=>{[...e.os].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t})}),e.os=[]},VJ=e=>{[...e.os.filter(t=>["span"].includes(t.split("/")[1]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},tg=e=>{[...e.os.filter(t=>["verse","verses"].includes(t.split("/")[0]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},HJ=e=>{[...e.os.filter(t=>["chapter"].includes(t.split("/")[0]))].reverse().forEach(t=>{e.block.items.push({type:"scope",subType:"end",payload:t}),e.os=[...e.os.filter(r=>r!==t)]})},WJ={startDocument:[{description:"Set up word object",test:()=>!0,action:({workspace:e,output:t})=>{t.pkJson={},e.sequenceId=null,e.block=null,e.os=[],e.waitingBlockGrafts=[]}}],startSequence:[{description:"Add sequence array to output",test:()=>!0,action:e=>{e.output.pkJson[e.context.sequences[0].id]=[],e.workspace.sequenceId=e.context.sequences[0].id}}],endSequence:[{description:"Reset sequenceId pointer",test:()=>!0,action:e=>{var t;GJ(e.workspace),e.workspace.sequenceId=(t=e.context.sequences[1])==null?void 0:t.id}}],unresolvedBlockGraft:[{description:"Stash for next para",test:()=>!0,action:({context:e,workspace:t})=>{e.sequences[0].block.target&&t.waitingBlockGrafts.push({type:"graft",subType:e.sequences[0].block.subType,payload:e.sequences[0].block.target})}}],unresolvedInlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:({context:e,workspace:t})=>{e.sequences[0].element.target&&t.block.items.push({type:"graft",subType:e.sequences[0].element.subType,payload:e.sequences[0].element.target})}}],startParagraph:[{description:"Add object for paragraph block",test:()=>!0,action:({context:e,workspace:t,output:r})=>{t.block={os:[...t.os],is:[],bs:{type:"scope",subType:"start",payload:`blockTag/${e.sequences[0].block.subType.split(":")[1]}`},bg:[...t.waitingBlockGrafts],items:[]},r.pkJson[t.sequenceId].push(t.block)}}],endParagraph:[{description:"Close open scopes",test:()=>!0,action:({workspace:e})=>{VJ(e),e.waitingBlockGrafts=[]}}],mark:[{description:"ts mark as milestone",test:({context:e})=>["usfm:ts"].includes(e.sequences[0].element.subType),action:({workspace:e})=>{const t="milestone/ts";e.block.is.includes(t)||e.block.is.push(t),e.os.push(t),e.block.items.push({type:"scope",subType:"start",payload:t}),e.block.items.push({type:"scope",subType:"end",payload:t})}},{description:"Chapter",test:({context:e})=>["chapter"].includes(e.sequences[0].element.subType),action:({context:e,workspace:t})=>{tg(t),HJ(t);const n=`chapter/${e.sequences[0].element.atts.number}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n})}},{description:"Verses",test:({context:e})=>["verses"].includes(e.sequences[0].element.subType),action:({context:e,workspace:t})=>{tg(t);const r=e.sequences[0].element,n=r.atts.number;let u=[parseInt(n)];if(n.includes("-")){let[o,a]=n.split("-").map(i=>parseInt(i));for(u=[o];o<=a;)o++,u.push(o)}for(const o of u){const a=`verse/${o}`;t.os.push(a),t.block.is.includes(a)||t.block.is.push(a),t.block.items.push({type:"scope",subType:"start",payload:a})}const s=`verses/${r.atts.number}`;t.block.is.includes(s)||t.block.is.push(s),t.os.push(s),t.block.items.push({type:"scope",subType:"start",payload:s})}}],startMilestone:[{description:"Add scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`milestone/${r.subType.split(":")[1]}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n});for(const[u,s]of Object.entries(r.atts||{})){const o=s.toString().split(",");for(const[a,i]of o.entries()){const c=`attribute/milestone/${r.subType.split(":")[1]}/${u}/${a}/${i}`;t.block.is.includes(c)||t.block.is.push(c),t.os.push(c),t.block.items.push({type:"scope",subType:"start",payload:c})}}}}],endMilestone:[{description:"Remove scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`attribute/milestone/${r.subType.split(":")[1]}`;for(const s of[...t.os.filter(o=>o.startsWith(n))].reverse())t.os=t.os.filter(o=>o!==s),t.block.items.push({type:"scope",subType:"end",payload:s});const u=`milestone/${r.subType.split(":")[1]}`;t.os=t.os.filter(s=>s!==u),t.block.items.push({type:"scope",subType:"end",payload:u})}}],startWrapper:[{description:"Add scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element,n=`${r.subType==="usfm:w"?"spanWithAtts":"span"}/${r.subType.split(":")[1]}`;t.block.is.includes(n)||t.block.is.push(n),t.os.push(n),t.block.items.push({type:"scope",subType:"start",payload:n});for(const[u,s]of Object.entries(r.atts||{})){const o=s.toString().split(",");for(const[a,i]of o.entries()){const c=`attribute/spanWithAtts/w/${u}/${a}/${i}`;t.block.is.includes(c)||t.block.is.push(c),t.os.push(c),t.block.items.push({type:"scope",subType:"start",payload:c})}}}}],endWrapper:[{description:"Remove scope and update state",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element;for(const[u,s]of[...Object.entries(r.atts||{})].reverse()){const o=s.toString().split(",");for(const[a,i]of[...o.entries()].reverse()){const c=`attribute/spanWithAtts/w/${u}/${a}/${i}`;t.os=t.os.filter(l=>l!==c),t.block.items.push({type:"scope",subType:"end",payload:c})}}const n=`${r.subType==="usfm:w"?"spanWithAtts":"span"}/${r.subType.split(":")[1]}`;t.os=t.os.filter(u=>u!==n),t.block.items.push({type:"scope",subType:"end",payload:n})}}],text:[{description:"Log occurrences",test:()=>!0,action:({context:e,workspace:t})=>{const r=e.sequences[0].element.text,n=Z.union(ds.map(s=>s[2])),u=Z.match(r,n,"all");for(const s of u){let o;Z.test(s,MJ)?o="wordLike":Z.test(s,LJ)?o="lineSpace":Z.test(s,UJ)&&(o="punctuation"),t.block.items.push({type:"token",subType:o,payload:s})}}}],endDocument:[{description:"Rework hanging end cv scopes",test:()=>!0,action:({output:e})=>{const t=Object.values(e.pkJson)[0];for(let r=1;r0;){const o=n.shift();u.push(o),t[r].os=t[r].os.filter(a=>a!==o.payload),s--}}}}]},JJ=function({perf:e}){const t=new vu.PerfRenderFromJson({srcJson:e,ignoreMissingSequences:!0,actions:WJ}),r={};return t.renderDocument({docId:"",config:{},output:r}),{pkJson:r.pkJson}},zJ={name:"perf2PkJson",type:"Transform",description:"PERF=>JSON: Converts PERF to current Proskomma input format",documentation:"",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"pkJson",type:"json"}],code:JJ},N7={calculateUsfmChapterPositions:IJ,perf2usfm:jJ,perf2PkJson:zJ},rg=ye.ByteArray,{itemEnum:Cf}=ye.itemDefs,{tokenEnum:KJ}=ye.tokenDefs,XJ=0,Ko=2,yp=3,Zc=e=>{const t=e.sequences[e.mainId],r=e.processor.docSets[e.docSetId];r.buildPreEnums(),r.buildEnumIndexes();const n={},u={};let s="0",o="0",a="1",i=0;if(t.chapterVerses={},r.enums.wordLike.length===0)throw new Error("No wordLike content in docSet - probably a USFM issue, maybe missing \\mt?");t.tokensPresent=new f6(new Array(r.enums.wordLike.length).fill(0).map(c=>c.toString()).join(""));for(const[c,l]of t.blocks.entries()){let p=0,d=l.c,f=-1;for(;pparseInt(A)).sort((A,m)=>A-m);if(d.length===0)continue;const f=d[d.length-1],h=Array.from(Array(f+1).keys());let y=0;for(const A of h){const m=`${A}`;if(m in l){const v=l[m],C=v.length;for(const[B,T]of v.entries()){if(!T.verses){console.log(`** VerseElement without verses for ${A} in buildChapterVerseIndex`);continue}const N=r.enumForCategoryValue("scopeBits",T.verses),R=T.startBlock===T.endBlock?Ko:yp;p.pushByte(0),R===Ko?p.pushNBytes([T.startBlock,T.startItem,T.endItem,T.nextToken,N]):p.pushNBytes([T.startBlock,T.endBlock,T.startItem,T.endItem,T.nextToken,N]),p.setByte(y,bf(R,B===C-1,p.length-y)),y=p.length}}else p.pushByte(bf(XJ,!0,1)),y++}p.trim()}t.chapters={};for(const[c,l]of Object.entries(u)){if(!("startBlock"in l)||!("endBlock"in l))continue;const p=new rg;t.chapters[c]=p;const d=l.startBlock===l.endBlock?Ko:yp;p.pushByte(0),d===Ko?p.pushNBytes([l.startBlock,l.startItem,l.endItem,l.nextToken]):p.pushNBytes([l.startBlock,l.endBlock,l.startItem,l.endItem,l.nextToken]),p.setByte(0,bf(d,!0,p.length)),p.trim()}},ng=(e,t)=>{const r=e.processor.docSets[e.docSetId];r.buildEnumIndexes();const n=[],u=e.sequences[e.mainId].chapterVerses[t];if(u){let s=0,o=[];for(;s{const r=e.sequences[e.mainId].chapters[t];if(r){const n=q7(r,0)[0];if(n===Ko){const u=r.nBytes(1,4);return{startBlock:u[0],endBlock:u[0],startItem:u[1],endItem:u[2],nextToken:u[3]}}else if(n===yp){const u=r.nBytes(1,5);return{startBlock:u[0],endBlock:u[1],startItem:u[2],endItem:u[3],nextToken:u[4]}}}},bf=(e,t,r)=>r+(t?32:0)+e*64,q7=(e,t)=>{const r=e.byte(t);return[r>>6,(r>>5)%2===1,r%32]},YJ=e=>{const t=new Set,r=e.processor.docSets[e.docSetId];r.maybeBuildEnumIndexes();const n=(s,o,a)=>{a.add(o.id);for(const i of o.blocks){for(const c of r.unsuccinctifyGrafts(i.bg))a.has(c[2])||n(s,s.sequences[c[2]],a);for(const c of r.unsuccinctifyItems(i.c,{grafts:!0},0))a.has(c[2])||n(s,s.sequences[c[2]],a)}};n(e,e.sequences[e.mainId],t);let u=!1;for(const s of Object.keys(e.sequences))t.has(s)||(delete e.sequences[s],u=!0);return u},ZJ=(e,t,r)=>{const n=ye.generateId();return e.sequences[n]={id:n,type:t,tags:new Set(r||[]),isBaseType:t in e.baseSequenceTypes,blocks:[]},n},QJ=(e,t)=>{if(!(t in e.sequences))return!1;if(e.sequences[t].type==="main")throw new Error("Cannot delete main sequence");return e.sequences[t].type in e.baseSequenceTypes?sg(e,"block",t):sg(e,"inline",t),delete e.sequences[t],e.buildChapterVerseIndex(globalThis),e.gcSequences(),!0},sg=(e,t,r)=>{const n=e.processor.docSets[e.docSetId];for(const u of Object.values(e.sequences))for(const s of u.blocks){const o=t==="block"?s.bg:s.c;let a=0;for(;a{e.processor.docSets[e.docSetId].maybeBuildEnumIndexes(),r=r||(l=>l);const i=e.sequences[t],c=r({id:t,type:i.type,tags:i.tags,isBaseType:i.isBaseType,verseMapping:i.verseMapping});return tz(i,c,n,u,s,o),e.sequences[t]=c,c.type==="main"&&e.buildChapterVerseIndex(),c},tz=(e,t,r,n,u,s)=>{r=r||((o,a,i)=>!!i),n=n||((o,a,i,c,l,p,d)=>!!i||d),u=u||((o,a,i)=>i),s=s||((o,a,i,c,l,p,d,f,h)=>{for(let y=0;y{let o=0,a=-1;for(;o{if(n!==!1&&(n=!0),!(t in e.sequences))return!1;const u=e.sequences[t];return r<0||r>=u.blocks.length?!1:(u.blocks.splice(r,1),n&&e.buildChapterVerseIndex(globalThis),!0)},cz=(e,t,r,n,u,s)=>{if(s!==!1&&(s=!0),!(t in e.sequences))return!1;const o=e.sequences[t];if(r<0||r>o.blocks.length)return!1;const a=e.processor.docSets[e.docSetId];a.maybeBuildPreEnums();const i={bs:new ks(0),bg:new ks(0),c:new ks(0),os:new ks(0),is:new ks(0),nt:new ks(0)},c=n.split("/"),l=uz[c[0]],p=R7(c[0]);if(c.length!==p)throw new Error(`Scope ${n} has ${c.length} component(s) (expected ${p}`);const d=c.slice(1).map(f=>a.enumForCategoryValue("scopeBits",f,!0));return x7(i.bs,Q2.startScope,l,d),i.bs.trim(),u&&_6(a,e.id,t,r,u),o.blocks.splice(r,0,i),s&&e.buildChapterVerseIndex(),!0},lz=(e,t)=>{for(const r of["bs","bg","c","is","os"]){const n=e[r],u=new ks(n.length);let s=0;for(;s1;){const d=t.scopeBits[n.nByte(s+p)];l.push(d),p+=n.nByteLength(d),c--}x7(u,a,i,l)}s+=o}u.trim(),e[r]=u}},pz=ye.ByteArray,{itemEnum:Sf}=ye.itemDefs,dz=(e,t)=>{if(!t||Object.keys(t).length===0)return;const r=e.processor.docSets[e.docSetId],n=(s,o,a,i,c,l,p)=>{if(c===Sf.token)return!0;if(c===Sf.startScope||c===Sf.endScope){if(!t.includeScopes&&!t.excludeScopes)return!0;{const d=r.unsuccinctifyScope(a.c,c,l,p);return(!t.includeScopes||t.includeScopes.filter(f=>d[2].startsWith(f)).length>0)&&(!t.excludeScopes||t.excludeScopes.filter(f=>d[2].startsWith(f)).length===0)}}else{if(!t.includeGrafts&&!t.excludeGrafts)return!0;const d=r.unsuccinctifyGraft(a.c,l,p);return(!t.includeGrafts||t.includeGrafts.filter(f=>d[1].startsWith(f)).length>0)&&(!t.excludeGrafts||t.excludeGrafts.filter(f=>d[1].startsWith(f)).length===0)}},u=(s,o,a)=>{const i=new pz(a.bg.length);let c=0;for(;cf[1].startsWith(h)).length>0)&&(!t.excludeGrafts||t.excludeGrafts.filter(h=>f[1].startsWith(h)).length===0))for(let h=0;h{e.modifySequence(s,null,null,n,u,null)}),Object.values(e.sequences).forEach(s=>r.updateBlockIndexesAfterFilter(s)),e.gcSequences()},fz=e=>{const t={sequences:{}};t.headers=e.headers,t.mainId=e.mainId,t.tags=Array.from(e.tags);for(const[r,n]of Object.entries(e.sequences))t.sequences[r]=Dz(n);return t},Dz=e=>{const t={type:e.type,blocks:e.blocks.map(r=>hz(r)),tags:Array.from(e.tags)};if(e.type==="main"){t.chapters={};for(const[r,n]of Object.entries(e.chapters||{}))n.trim(),t.chapters[r]=n.base64();t.chapterVerses={};for(const[r,n]of Object.entries(e.chapterVerses||{}))n.trim(),t.chapterVerses[r]=n.base64();"tokensPresent"in e&&(t.tokensPresent="0x"+e.tokensPresent.toString(16))}return t},hz=e=>{for(const t of["bs","bg","c","is","os","nt"])e[t].trim();return{bs:e.bs.base64(),bg:e.bg.base64(),c:e.c.base64(),is:e.is.base64(),os:e.os.base64(),nt:e.nt.base64()}},mz=(e,t)=>{e.recordPreEnum("scopeBits","0");for(const[r,n]of t.blocks.entries())for(const[u,s]of[...n.items,n.bs,...n.bg].entries())if(s.subType==="wordLike")e.recordPreEnum("wordLike",s.payload);else if(["lineSpace","eol","punctuation","softLineBreak","bareSlash","unknown"].includes(s.subType))e.recordPreEnum("notWordLike",s.payload);else if(s.type==="graft")e.recordPreEnum("graftTypes",s.subType);else if(s.subType==="start"){const o=s.payload.split("/");if(o.length!==ye.scopeDefs.nComponentsForScope(o[0]))throw new Error(`Scope ${s.payload} has unexpected number of components`);for(const a of o.slice(1))e.recordPreEnum("scopeBits",a)}},Ez=(e,t)=>{e.recordPreEnum("scopeBits","0"),e.recordPreEnum("ids",t.id);for(const r of t.blocks)for(const n of["bs","bg","c","is","os"])yz(e,r[n])},yz=(e,t)=>{for(const r of e.unsuccinctifyItems(t,{},0))if(r[0]==="token")r[1]==="wordLike"?e.recordPreEnum("wordLike",r[2]):e.recordPreEnum("notWordLike",r[2]);else if(r[0]==="graft")e.recordPreEnum("graftTypes",r[1]);else if(r[0]==="scope"&&r[1]==="start"){const n=r[2].split("/");if(n.length!==ye.scopeDefs.nComponentsForScope(n[0]))throw new Error(`Scope ${r[2]} has unexpected number of components`);for(const u of n.slice(1))e.recordPreEnum("scopeBits",u)}},{addTag:vz,removeTag:gz,validateTags:Az}=ye.tags,Fz=ye.parserConstants;let ag=class{constructor(t,r,n,u,s,o,a,i){if(this.processor=t,this.docSetId=r,this.baseSequenceTypes=Fz.usfm.baseSequenceTypes,n)switch(this.id=ye.generateId(),this.filterOptions=s,this.customTags=o,this.emptyBlocks=a,this.tags=new Set(i||[]),Az(this.tags),this.headers={},this.mainId=null,this.sequences={},n.toLowerCase()){case"usfm":case"sfm":this.processUsfm(u);break;case"usx":this.processUsx(u);break;case"tsv":this.processTSV(u);break;case"nodes":this.processNodes(u);break;default:throw new Error(`Unknown document contentType '${n}'`)}}addTag(t){vz(this.tags,t)}removeTag(t){gz(this.tags,t)}makeParser(){return new TJ(this.filterOptions,this.customTags,this.emptyBlocks)}processUsfm(t){const r=this.makeParser();sJ(t,r),this.postParseScripture(r)}processUsx(t){const r=this.makeParser();DJ(t,r),this.postParseScripture(r)}processTSV(t){const r=this.makeParser(),n=`T${this.processor.nextTable>9?this.processor.nextTable:"0"+this.processor.nextTable}`;this.processor.nextTable++,SJ(t,r,n),this.headers=r.headers,this.succinctPass1(r),this.succinctPass2(r),Zc(this);const u=Object.values(this.sequences).filter(s=>s.type==="table")[0];for(const[s,o]of JSON.parse(t).headings.entries())u.tags.add(`col${s}:${o}`)}processNodes(t){const r=this.makeParser(),n=`N${this.processor.nextNodes>9?this.processor.nextNodes:"0"+this.processor.nextNodes}`;this.processor.nextNodes++,wJ(t,r,n),this.headers=r.headers,this.succinctPass1(r),this.succinctPass2(r),Zc(this)}postParseScripture(t){t.tidy();const r=t.filterOptions;this.headers=t.headers,this.succinctPass1(t),this.succinctPass2(t),this.succinctFilter(r),Zc(this)}succinctFilter(t){dz(this,t)}succinctPass1(t){const r=this.processor.docSets[this.docSetId];for(const n of t.allSequences())r.recordPreEnum("ids",n.id),this.recordPreEnums(r,n);r.enums.wordLike.length===0&&r.sortPreEnums(),r.buildEnums()}recordPreEnums(t,r){mz(t,r)}rerecordPreEnums(t,r){Ez(t,r)}succinctPass2(t){const r=this.processor.docSets[this.docSetId];this.mainId=t.sequences.main.id;for(const n of t.allSequences())this.sequences[n.id]={id:n.id,type:n.type,tags:new Set(n.tags),isBaseType:n.type in t.baseSequenceTypes,blocks:n.succinctifyBlocks(r)};this.sequences[this.mainId].verseMapping={}}modifySequence(t,r,n,u,s,o){ez(this,t,r,n,u,s,o)}buildChapterVerseIndex(){Zc(this)}chapterVerseIndexes(){const t={};for(const r of Object.keys(this.sequences[this.mainId].chapterVerses))t[r]=ng(this,r);return t}chapterVerseIndex(t){return ng(this,t)}chapterIndexes(){const t={};for(const r of Object.keys(this.sequences[this.mainId].chapters))t[r]=ug(this,r);return t}chapterIndex(t){return ug(this,t)}rewriteSequenceBlocks(t,r){const n=this.sequences[t];for(const u of n.blocks)this.rewriteSequenceBlock(u,r)}rewriteSequenceBlock(t,r){lz(t,r)}serializeSuccinct(){return fz(this)}gcSequences(){return YJ(this)}newSequence(t,r){return ZJ(this,t,r)}deleteSequence(t){return QJ(this,t)}deleteBlock(t,r,n){return iz(this,t,r,n)}newBlock(t,r,n,u,s){return cz(this,t,r,n,u,s)}perf(t){const r=new vu.PerfRenderFromProskomma({proskomma:this.processor,actions:vu.render.perfToPerf.renderActions.identityActions}),n={};return r.renderDocument({docId:this.id,config:{},output:n}),t?JSON.stringify(n.perf,null,t):JSON.stringify(n.perf)}async usfm(){const t=JSON.parse(this.perf());try{return(await new vu.PipelineHandler({pipelines:I7,transforms:N7,proskomma:this.processor}).runPipeline("perf2usfmPipeline",{perf:t})).usfm}catch(r){console.error(`pipelineHandler Error : +`,r)}}sofria(t,r){const n=new vu.SofriaRenderFromProskomma({proskomma:this.processor,actions:vu.render.sofriaToSofria.renderActions.identityActions}),u={},s={};r&&(s.chapters=[`${r}`]);try{n.renderDocument({docId:this.id,config:s,output:u})}catch(o){throw console.log(o),o}return t?JSON.stringify(u.sofria,null,t):JSON.stringify(u.sofria)}};const Cz=` """Key/Value tuple""" type KeyValue { """The key""" key: String! """The value""" value: String! -}`,qJ={key:e=>e[0],value:e=>e[1]},xJ=` +}`,bz={key:e=>e[0],value:e=>e[1]},Sz=` """A chapter-verse reference""" type cv { """The chapter number""" @@ -244,7 +244,7 @@ type cv { """The verse number""" verse: Int } -`,RJ={chapter:e=>e[0],verse:e=>e[1]},jJ=` +`,wz={chapter:e=>e[0],verse:e=>e[1]},_z=` """Type-dependent parts of the ID header""" type idParts { """The type of the ID""" @@ -257,7 +257,7 @@ type idParts { index: Int! ): String } -`,MJ={type:e=>e[0],parts:e=>e[1],part:(e,t)=>!e[1]||t.index<0||t.index>=e[1].length?null:e[1][t.index]},LJ=` +`,Bz={type:e=>e[0],parts:e=>e[1],part:(e,t)=>!e[1]||t.index<0||t.index>=e[1].length?null:e[1][t.index]},Tz=` """Attribute Specification""" input AttSpec { """The type of attribute, ie what type of thing it's connected to""" @@ -268,7 +268,7 @@ tagName: String! attKey: String! """The position of the value (which is 0 except for attributes with multiple values)""" valueN: Int! -}`,UJ=` +}`,$z=` """Key/Regex tuple""" input KeyMatches { """The key""" @@ -276,7 +276,7 @@ input KeyMatches { """The regex to match""" matches: String! } -`,GJ=` +`,Pz=` """Input Key/Value Object""" input InputKeyValue { """The key""" @@ -284,7 +284,7 @@ input InputKeyValue { """The value""" value: String! } -`,VJ=` +`,kz=` """Input Key/Values Object""" input KeyValues { """The key""" @@ -292,7 +292,7 @@ input KeyValues { """The values""" values: [String!]! } -`,HJ=` +`,Oz=` """Item for arguments""" input InputItemObject { """The basic item type (token, scope or graft)'""" @@ -301,7 +301,7 @@ input InputItemObject { subType: String! """The content of the item (the text for tokens, the label for scopes and the sequence id for grafts)""" payload: String! -}`,WJ=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},JJ=` +}`,Iz=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},Nz=` """Item""" type Item { """The basic item type (token, scope or graft)""" @@ -328,9 +328,9 @@ type Item { startsWith: [String!] ): [String!] } -`,zJ={type:e=>e[0],subType:e=>e[1],payload:(e,t)=>{let r=e[2];if(e[0]==="token"&&(t.normalizeSpace&&(r=e[2].replace(/[ \t\n\r]+/g," ")),t.includeChars||t.excludeChars)){let n=r.split("");n=n.filter(u=>!t.includeChars||t.includeChars.includes(u)),n=n.filter(u=>!t.excludeChars||!t.excludeChars.includes(u)),r=n.join("")}return r},position:e=>e[3],scopes:(e,t)=>e[4]?e[4].filter(r=>!t.startsWith||WJ(t.startsWith,r)):[]},KJ=e=>{let t;switch(e[0]){case"token":return`|${e[2]}`;case"scope":return t=e[1]==="start"?"+":"-",`${t}${e[2]}${t}`;case"graft":return`>${e[1]}<`}},Vp=e=>e.map(t=>KJ(t)).join(""),XJ=e=>{const t=["ItemGroup:"];return t.push(` Open Scopes ${e[0].join(", ")}`),t.push(` ${Vp(e[1])}`),t.join(` -`)},YJ=e=>{const t=["Block:"];return e.bg.length>0&&e.bg.forEach(r=>t.push(` ${r[1]} graft to ${r[2]}`)),t.push(` Scope ${e.bs[2]}`),t.push(` ${Vp(e.c)}`),t.join(` -`)},ZJ=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},QJ=` +`,qz={type:e=>e[0],subType:e=>e[1],payload:(e,t)=>{let r=e[2];if(e[0]==="token"&&(t.normalizeSpace&&(r=e[2].replace(/[ \t\n\r]+/g," ")),t.includeChars||t.excludeChars)){let n=r.split("");n=n.filter(u=>!t.includeChars||t.includeChars.includes(u)),n=n.filter(u=>!t.excludeChars||!t.excludeChars.includes(u)),r=n.join("")}return r},position:e=>e[3],scopes:(e,t)=>e[4]?e[4].filter(r=>!t.startsWith||Iz(t.startsWith,r)):[]},xz=e=>{let t;switch(e[0]){case"token":return`|${e[2]}`;case"scope":return t=e[1]==="start"?"+":"-",`${t}${e[2]}${t}`;case"graft":return`>${e[1]}<`}},Yp=e=>e.map(t=>xz(t)).join(""),Rz=e=>{const t=["ItemGroup:"];return t.push(` Open Scopes ${e[0].join(", ")}`),t.push(` ${Yp(e[1])}`),t.join(` +`)},jz=e=>{const t=["Block:"];return e.bg.length>0&&e.bg.forEach(r=>t.push(` ${r[1]} graft to ${r[2]}`)),t.push(` Scope ${e.bs[2]}`),t.push(` ${Yp(e.c)}`),t.join(` +`)},Mz=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},Lz=` """A collection of items, with scope context""" type ItemGroup { """Items for this itemGroup""" @@ -357,7 +357,7 @@ type ItemGroup { """A list of scopes from the items of the itemGroup""" includedScopes: [String!]! } -`,ez={items:e=>e[1],tokens:(e,t)=>e[1].filter(r=>r[0]==="token"&&(!t.withChars||t.withChars.includes(r[2]))&&(!t.withSubTypes||t.withSubTypes.includes(r[1]))),text:(e,t)=>{const r=e[1].filter(n=>n[0]==="token").map(n=>n[2]).join("");return t.normalizeSpace?r.replace(/[ \t\n\r]+/g," "):r},scopeLabels:(e,t)=>e[0].filter(r=>!t.startsWith||ZJ(t.startsWith,r)),dump:e=>XJ(e),includedScopes:e=>Array.from(new Set(e[1].filter(t=>t[0]==="scope"&&t[1]==="start").map(t=>t[2])))},tz=` +`,Uz={items:e=>e[1],tokens:(e,t)=>e[1].filter(r=>r[0]==="token"&&(!t.withChars||t.withChars.includes(r[2]))&&(!t.withSubTypes||t.withSubTypes.includes(r[1]))),text:(e,t)=>{const r=e[1].filter(n=>n[0]==="token").map(n=>n[2]).join("");return t.normalizeSpace?r.replace(/[ \t\n\r]+/g," "):r},scopeLabels:(e,t)=>e[0].filter(r=>!t.startsWith||Mz(t.startsWith,r)),dump:e=>Rz(e),includedScopes:e=>Array.from(new Set(e[1].filter(t=>t[0]==="scope"&&t[1]==="start").map(t=>t[2])))},Gz=` """Key/Items tuple""" type kvEntry { """The key""" @@ -366,14 +366,14 @@ type kvEntry { secondaryKeys: [KeyValue!] """The fields as itemGroups""" itemGroups: [ItemGroup]! -}`,rz={key:e=>e[0],secondaryKeys:e=>e[1],itemGroups:e=>e[2]},nz=` +}`,Vz={key:e=>e[0],secondaryKeys:e=>e[1],itemGroups:e=>e[2]},Hz=` """Information about a regex match on an enum""" type regexIndex { """The index in the enum""" index: String! """The string in the enum that matched""" matched: String! -}`,uz={index:e=>e[0],matched:e=>e[1]},sz=` +}`,Wz={index:e=>e[0],matched:e=>e[1]},Jz=` """Row Equals Specification""" input rowEqualsSpec { """The position of the column in which to search a match""" @@ -381,7 +381,7 @@ input rowEqualsSpec { """The values to match""" values: [String!]! } -`,oz=` +`,zz=` """Row Match Specification""" input rowMatchSpec { """The position of the column in which to search a match""" @@ -389,7 +389,7 @@ input rowMatchSpec { """The regex to match""" matching: String! } -`,az=` +`,Kz=` """Information about a verse range (which may only cover one verse)""" type verseRange { """The range, as it would be printed in a Bible""" @@ -397,7 +397,7 @@ type verseRange { """A list of verse numbers for this range""" numbers: [Int!]! } -`,iz=` +`,Xz=` """Mapped verse information""" type orig { """The book code""" @@ -405,7 +405,7 @@ type orig { """A list of chapter-verse references""" cvs: [cv!]! } -`,cz=` +`,Yz=` """Information about a verse number (which may be part of a verse range)""" type verseNumber { """The verse number""" @@ -415,7 +415,7 @@ type verseNumber { """The reference for this verse when mapped to 'original' versification""" orig: orig! } -`,lz={orig:(e,t,r)=>{const n=r.doc.headers.bookCode,u=r.cvIndex[0],s=e.number,o=r.doc.sequences[r.doc.mainId];if(o.verseMapping&&"forward"in o.verseMapping&&`${u}`in o.verseMapping.forward){const a=Ae.versification.mapVerse(o.verseMapping.forward[`${u}`],n,u,s);return{book:a[0],cvs:a[1]}}else return{book:n,cvs:[[u,s]]}}},pz=` +`,Zz={orig:(e,t,r)=>{const n=r.doc.headers.bookCode,u=r.cvIndex[0],s=e.number,o=r.doc.sequences[r.doc.mainId];if(o.verseMapping&&"forward"in o.verseMapping&&`${u}`in o.verseMapping.forward){const a=ye.versification.mapVerse(o.verseMapping.forward[`${u}`],n,u,s);return{book:a[0],cvs:a[1]}}else return{book:n,cvs:[[u,s]]}}},Qz=` """A table cell""" type cell { """The row numbers""" @@ -432,7 +432,7 @@ type cell { normalizeSpace: Boolean ): String! } -`,fz={rows:e=>e[0],columns:e=>e[1],items:e=>e[2],tokens:e=>e[2].filter(t=>t[0]==="token"),text:(e,t)=>{let r=e[2].filter(n=>n[0]==="token").map(n=>n[2]).join("").trim();return t.normalizeSpace&&(r=r.replace(/[ \t\n\r]+/g," ")),r}},dz=` +`,eK={rows:e=>e[0],columns:e=>e[1],items:e=>e[2],tokens:e=>e[2].filter(t=>t[0]==="token"),text:(e,t)=>{let r=e[2].filter(n=>n[0]==="token").map(n=>n[2]).join("").trim();return t.normalizeSpace&&(r=r.replace(/[ \t\n\r]+/g," ")),r}},tK=` """A chapter index entry""" type cIndex { """The chapter number""" @@ -469,7 +469,7 @@ type cIndex { normalizeSpace: Boolean ): String! } -`,Dz={chapter:e=>e[0],startBlock:e=>e[1].startBlock,endBlock:e=>e[1].endBlock,startItem:e=>e[1].startItem,endItem:e=>e[1].endItem,nextToken:e=>e[1].nextToken,items:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," "]].concat(u)),[]),dumpItems:(e,t,r)=>{const n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],!1);return n.length>0?Vp(n.reduce((u,s)=>u.concat([["token","lineSpace"," ",null]].concat(s)))):""},tokens:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," "]].concat(u)),[]).filter(n=>n[0]==="token"&&(!t.withChars||t.withChars.includes(n[2]))&&(!t.withSubTypes||t.withSubTypes.includes(n[1]))),text:(e,t,r)=>{let n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1]).reduce((u,s)=>u.concat([["token","lineSpace"," "]].concat(s)),[]).filter(u=>u[0]==="token").map(u=>u[1]==="lineSpace"?" ":u[2]).join("").trim();return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n}},hz=` +`,rK={chapter:e=>e[0],startBlock:e=>e[1].startBlock,endBlock:e=>e[1].endBlock,startItem:e=>e[1].startItem,endItem:e=>e[1].endItem,nextToken:e=>e[1].nextToken,items:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," "]].concat(u)),[]),dumpItems:(e,t,r)=>{const n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],!1);return n.length>0?Yp(n.reduce((u,s)=>u.concat([["token","lineSpace"," ",null]].concat(s)))):""},tokens:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1],t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," "]].concat(u)),[]).filter(n=>n[0]==="token"&&(!t.withChars||t.withChars.includes(n[2]))&&(!t.withSubTypes||t.withSubTypes.includes(n[1]))),text:(e,t,r)=>{let n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e[1]).reduce((u,s)=>u.concat([["token","lineSpace"," "]].concat(s)),[]).filter(u=>u[0]==="token").map(u=>u[1]==="lineSpace"?" ":u[2]).join("").trim();return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n}},nK=` """""" type cvVerseElement { """The zero-indexed number of the block where the verse starts""" @@ -506,13 +506,13 @@ type cvVerseElement { normalizeSpace: Boolean ): String! } -`,mz={startBlock:e=>e.startBlock,endBlock:e=>e.endBlock,startItem:e=>e.startItem,endItem:e=>e.endItem,nextToken:e=>e.nextToken,verseRange:e=>e.verses,items:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u))),dumpItems:(e,t,r)=>Vp(r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u)))),tokens:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u))).filter(n=>n[0]==="token"&&(!t.withChars||t.withChars.includes(n[2]))&&(!t.withSubTypes||t.withSubTypes.includes(n[1]))),text:(e,t,r)=>{let n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e).reduce((u,s)=>u.concat([["token","lineSpace"," ",null]].concat(s))).filter(u=>u[0]==="token").map(u=>u[1]==="lineSpace"?" ":u[2]).join("").trim();return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n}},Ez=` +`,uK={startBlock:e=>e.startBlock,endBlock:e=>e.endBlock,startItem:e=>e.startItem,endItem:e=>e.endItem,nextToken:e=>e.nextToken,verseRange:e=>e.verses,items:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u))),dumpItems:(e,t,r)=>Yp(r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u)))),tokens:(e,t,r)=>r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e,t.includeContext).reduce((n,u)=>n.concat([["token","lineSpace"," ",null]].concat(u))).filter(n=>n[0]==="token"&&(!t.withChars||t.withChars.includes(n[2]))&&(!t.withSubTypes||t.withSubTypes.includes(n[1]))),text:(e,t,r)=>{let n=r.docSet.itemsByIndex(r.doc.sequences[r.doc.mainId],e).reduce((u,s)=>u.concat([["token","lineSpace"," ",null]].concat(s))).filter(u=>u[0]==="token").map(u=>u[1]==="lineSpace"?" ":u[2]).join("").trim();return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n}},sK=` """Information about a verse in the chapter, which may be split into several pieces""" type cvVerses { """The pieces of verse""" verse: [cvVerseElement] } -`,vz={verse:e=>e},yz=` +`,oK={verse:e=>e},aK=` """A chapterVerse index entry""" type cvIndex { """The chapter number""" @@ -524,7 +524,7 @@ type cvIndex { """A list of verse number and range information, organized by verse range""" verseRanges: [verseRange!] } -`,gz={chapter:e=>e[0],verses:e=>e[1],verseNumbers:(e,t,r)=>(r.cvIndex=e,[...e[1].entries()].filter(n=>n[1].length>0).map(n=>({number:n[0],range:n[1][n[1].length-1].verses}))),verseRanges:e=>{const t=[];for(const[r,n]of[...e[1].entries()].filter(u=>u[1].length>0))t.length===0||t[t.length-1].range!==n[n.length-1].verses?t.push({range:n[n.length-1].verses,numbers:[r]}):t[t.length-1].numbers.push(r);return t}},Gy=(e,t)=>{const r=parseInt(e[0]),n=parseInt(e[1]);if(e[3].length<=n||e[3][n].length===0)return null;let u=null,s=r,o=n,a=e[3],i=a[n][0].verses,c=!1;for(;!u;)if(o+=1,o>=a.length){if(c||!e[4])break;o=-1,s+=1,a=e[4],c=!0}else a[o].length>0&&(!t||c||a[o][0].verses!==i)&&(u=[s,o]);return u},Vy=(e,t)=>{const r=parseInt(e[0]),n=parseInt(e[1]);if(e[3].length<=n||e[3][n].length===0)return null;let u=null,s=r,o=n,a=e[3],i=a[n][0].verses,c=!1;for(;!u;)if(o-=1,o<0){if(c||!e[2])break;o=e[2].length,s-=1,a=e[2],c=!0}else a[o].length>0&&(!t||c||a[o][0].verses!==i)&&(u=[s,o]);return u},Az=` +`,iK={chapter:e=>e[0],verses:e=>e[1],verseNumbers:(e,t,r)=>(r.cvIndex=e,[...e[1].entries()].filter(n=>n[1].length>0).map(n=>({number:n[0],range:n[1][n[1].length-1].verses}))),verseRanges:e=>{const t=[];for(const[r,n]of[...e[1].entries()].filter(u=>u[1].length>0))t.length===0||t[t.length-1].range!==n[n.length-1].verses?t.push({range:n[n.length-1].verses,numbers:[r]}):t[t.length-1].numbers.push(r);return t}},ig=(e,t)=>{const r=parseInt(e[0]),n=parseInt(e[1]);if(e[3].length<=n||e[3][n].length===0)return null;let u=null,s=r,o=n,a=e[3],i=a[n][0].verses,c=!1;for(;!u;)if(o+=1,o>=a.length){if(c||!e[4])break;o=-1,s+=1,a=e[4],c=!0}else a[o].length>0&&(!t||c||a[o][0].verses!==i)&&(u=[s,o]);return u},cg=(e,t)=>{const r=parseInt(e[0]),n=parseInt(e[1]);if(e[3].length<=n||e[3][n].length===0)return null;let u=null,s=r,o=n,a=e[3],i=a[n][0].verses,c=!1;for(;!u;)if(o-=1,o<0){if(c||!e[2])break;o=e[2].length,s-=1,a=e[2],c=!0}else a[o].length>0&&(!t||c||a[o][0].verses!==i)&&(u=[s,o]);return u},cK=` """Various answers to 'previous' and 'next' with respect to a verse""" type cvNavigation { """The verse number for the next verse""" @@ -540,7 +540,7 @@ type cvNavigation { """The previous chapter number (as a string)""" previousChapter: String } -`,Fz={nextVerse:e=>Gy(e,!1),previousVerse:e=>Vy(e,!1),nextVerseRangeVerse:e=>Gy(e,!0),previousVerseRangeVerse:e=>Vy(e,!0),nextChapter:e=>e[3].length>0&&e[4].length>0?(parseInt(e[0])+1).toString():null,previousChapter:e=>e[2].length>0&&e[3].length>0?(parseInt(e[0])-1).toString():null},Cz=` +`,lK={nextVerse:e=>ig(e,!1),previousVerse:e=>cg(e,!1),nextVerseRangeVerse:e=>ig(e,!0),previousVerseRangeVerse:e=>cg(e,!0),nextChapter:e=>e[3].length>0&&e[4].length>0?(parseInt(e[0])+1).toString():null,previousChapter:e=>e[2].length>0&&e[3].length>0?(parseInt(e[0])-1).toString():null},pK=` """A specification to create or update a block""" input inputBlockSpec { """The block scope as an item""" @@ -554,7 +554,7 @@ input inputBlockSpec { """The items""" items: [InputItemObject!]! } -`,bz=` +`,dK=` """A tree node""" type node { """The node id""" @@ -571,7 +571,7 @@ type node { """The node children ids""" childIds: [String!]! } -`,Sz={id:(e,t,r)=>{const[n,u,s]=Ae.succinct.headerBytes(e.bs,0);return r.docSet.unsuccinctifyScope(e.bs,u,s,0)[2].split("/")[1]},parentId:(e,t,r)=>{const n=r.docSet.unsuccinctifyScopes(e.is).filter(u=>u[2].startsWith("tTreeParent"))[0][2].split("/")[1];return n==="none"?null:n},keys:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is).filter(n=>n[2].startsWith("tTreeContent")).map(n=>n[2].split("/")[1]),itemGroups:(e,t,r)=>r.docSet.sequenceItemsByScopes([e],["tTreeContent/"],t.includeContext||!1),childIds:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is).filter(n=>n[2].startsWith("tTreeChild")).map(n=>n[2].split("/")[2])},wz=` +`,fK={id:(e,t,r)=>{const[n,u,s]=ye.succinct.headerBytes(e.bs,0);return r.docSet.unsuccinctifyScope(e.bs,u,s,0)[2].split("/")[1]},parentId:(e,t,r)=>{const n=r.docSet.unsuccinctifyScopes(e.is).filter(u=>u[2].startsWith("tTreeParent"))[0][2].split("/")[1];return n==="none"?null:n},keys:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is).filter(n=>n[2].startsWith("tTreeContent")).map(n=>n[2].split("/")[1]),itemGroups:(e,t,r)=>r.docSet.sequenceItemsByScopes([e],["tTreeContent/"],t.includeContext||!1),childIds:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is).filter(n=>n[2].startsWith("tTreeChild")).map(n=>n[2].split("/")[2])},DK=` """A contiguous flow of content for key-values""" type kvSequence { """The id of the sequence""" @@ -603,7 +603,7 @@ type kvSequence { tagName: String ): Boolean! } -`,_z={nEntries:e=>e.blocks.length,entries:(e,t,r)=>{let n=e.blocks.map(u=>[r.docSet.unsuccinctifyScopes(u.bs).map(s=>s[2].split("/")[1])[0],r.docSet.unsuccinctifyScopes(u.is).filter(s=>s[2].startsWith("kvSecondary/")).map(s=>[s[2].split("/")[1],s[2].split("/")[2]]),r.docSet.sequenceItemsByScopes([u],["kvField/"],!1)]);if(t.keyMatches&&(n=n.filter(u=>ne.test(u[0],ne(t.keyMatches)))),t.keyEquals&&(n=n.filter(u=>t.keyEquals.includes(u[0]))),t.secondaryMatches){const u={};t.secondaryMatches.forEach(s=>u[s.key]=s.matches),n=n.filter(s=>{const o={};s[1].forEach(a=>o[a[0]]=a[1]);for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!ne.test(i,ne(a[1])))return!1}return!0})}if(t.secondaryEquals){const u={};t.secondaryEquals.forEach(s=>u[s.key]=s.values),n=n.filter(s=>{const o={};s[1].forEach(a=>o[a[0]]=a[1]);for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!a[1].includes(i))return!1}return!0})}if(t.contentMatches){const u={};t.contentMatches.forEach(s=>u[s.key]=s.matches),n=n.filter(s=>{const o={};s[2].forEach(a=>o[a[0].filter(i=>i.startsWith("kvField"))[0].split("/")[1]]=a[1].filter(i=>i[0]==="token").map(i=>i[2]).join(""));for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!ne.test(i,ne(a[1])))return!1}return!0})}if(t.contentEquals){const u={};t.contentEquals.forEach(s=>u[s.key]=s.values),n=n.filter(s=>{const o={};s[2].forEach(a=>o[a[0].filter(i=>i.startsWith("kvField"))[0].split("/")[1]]=a[1].filter(i=>i[0]==="token").map(i=>i[2]).join(""));for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!i.includes(a[1]))return!1}return!0})}return n},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName)},Bz=` +`,hK={nEntries:e=>e.blocks.length,entries:(e,t,r)=>{let n=e.blocks.map(u=>[r.docSet.unsuccinctifyScopes(u.bs).map(s=>s[2].split("/")[1])[0],r.docSet.unsuccinctifyScopes(u.is).filter(s=>s[2].startsWith("kvSecondary/")).map(s=>[s[2].split("/")[1],s[2].split("/")[2]]),r.docSet.sequenceItemsByScopes([u],["kvField/"],!1)]);if(t.keyMatches&&(n=n.filter(u=>Z.test(u[0],Z(t.keyMatches)))),t.keyEquals&&(n=n.filter(u=>t.keyEquals.includes(u[0]))),t.secondaryMatches){const u={};t.secondaryMatches.forEach(s=>u[s.key]=s.matches),n=n.filter(s=>{const o={};s[1].forEach(a=>o[a[0]]=a[1]);for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!Z.test(i,Z(a[1])))return!1}return!0})}if(t.secondaryEquals){const u={};t.secondaryEquals.forEach(s=>u[s.key]=s.values),n=n.filter(s=>{const o={};s[1].forEach(a=>o[a[0]]=a[1]);for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!a[1].includes(i))return!1}return!0})}if(t.contentMatches){const u={};t.contentMatches.forEach(s=>u[s.key]=s.matches),n=n.filter(s=>{const o={};s[2].forEach(a=>o[a[0].filter(i=>i.startsWith("kvField"))[0].split("/")[1]]=a[1].filter(i=>i[0]==="token").map(i=>i[2]).join(""));for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!Z.test(i,Z(a[1])))return!1}return!0})}if(t.contentEquals){const u={};t.contentEquals.forEach(s=>u[s.key]=s.values),n=n.filter(s=>{const o={};s[2].forEach(a=>o[a[0].filter(i=>i.startsWith("kvField"))[0].split("/")[1]]=a[1].filter(i=>i[0]==="token").map(i=>i[2]).join(""));for(const a of Object.entries(u)){const i=o[a[0]];if(!i||!i.includes(a[1]))return!1}return!0})}return n},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName)},mK=` """A contiguous flow of content for a table""" type tableSequence { """The id of the sequence""" @@ -639,18 +639,18 @@ type tableSequence { """A list of column headings for this tableSequence, derived from the sequence tags""" headings: [String!]! } -`,Tz={nCells:e=>e.blocks.length,nRows:(e,t,r)=>{const n=new Set([]);for(const u of e.blocks){const[s,o,a]=Ae.succinct.headerBytes(u.bs,0),i=r.docSet.unsuccinctifyScope(u.bs,o,a,0)[2];n.add(i.split("/")[1])}return n.size},nColumns:(e,t,r)=>{const n=new Set([]);for(const u of e.blocks)for(const s of r.docSet.unsuccinctifyScopes(u.is).map(o=>o[2]))s.startsWith("tTableCol")&&n.add(s.split("/")[1]);return n.size},cells:(e,t,r)=>{const n=[];for(const u of e.blocks)n.push([r.docSet.unsuccinctifyScopes(u.bs).map(s=>parseInt(s[2].split("/")[1])),Array.from(new Set(r.docSet.unsuccinctifyScopes(u.is).filter(s=>s[2].startsWith("tTableCol")).map(s=>parseInt(s[2].split("/")[1])))),r.docSet.unsuccinctifyItems(u.c,{},0)]);return n},rows:(e,t,r)=>{const n=(c,l)=>{if(c[l.colN]===void 0)return!1;const p=c[l.colN][2].filter(f=>f[0]==="token").map(f=>f[2]).join("");return ne.test(p,ne(l.matching))},u=(c,l)=>l.length===0?!0:n(c,l[0])?u(c,l.slice(1)):!1,s=(c,l)=>{if(c[l.colN]===void 0)return!1;const p=c[l.colN][2].filter(f=>f[0]==="token").map(f=>f[2]).join("");return l.values.includes(p)},o=(c,l)=>l.length===0?!0:s(c,l[0])?o(c,l.slice(1)):!1;let a=[],i=-1;for(const c of e.blocks){const l=r.docSet.unsuccinctifyScopes(c.bs).map(p=>parseInt(p[2].split("/")[1]));t.positions&&!t.positions.includes(l[0])||(l[0]!==i&&(a.push([]),i=l[0]),a[a.length-1].push([l,Array.from(new Set(r.docSet.unsuccinctifyScopes(c.is).filter(p=>p[2].startsWith("tTableCol")).map(p=>parseInt(p[2].split("/")[1])))),r.docSet.unsuccinctifyItems(c.c,{},0)]))}return t.matches&&(a=a.filter(c=>u(c,t.matches))),t.equals&&(a=a.filter(c=>o(c,t.equals))),t.columns&&(a=a.map(c=>[...c.entries()].filter(l=>t.columns.includes(l[0])).map(l=>l[1]))),a},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),headings:e=>Array.from(e.tags).filter(t=>t.startsWith("col")).sort((t,r)=>parseInt(t.split(":")[0].substring(3))-parseInt(r.split(":")[0].substring(3))).map(t=>t.split(":")[1])},$z={equals:(e,t,r,n)=>r===n,notEqual:(e,t,r,n)=>r!==n,and:(e,t,...r)=>r.filter(n=>!n).length===0,or:(e,t,...r)=>r.filter(n=>n).length>0,not:(e,t,r)=>!r,idRef:(e,t)=>e.unsuccinctifyScopes(t.bs)[0][2].split("/")[1],parentIdRef:(e,t)=>e.unsuccinctifyScopes(t.is).filter(r=>r[2].startsWith("tTreeParent"))[0][2].split("/")[1],nChildren:(e,t)=>e.unsuccinctifyScopes(t.is).filter(r=>r[2].startsWith("tTreeChild")).length,contentRef:(e,t,r)=>{const n=e.sequenceItemsByScopes([t],["tTreeContent/"],!1).filter(u=>u[0].filter(o=>o.startsWith("tTreeContent"))[0].split("/")[1]===r);return n[0]?n[0][1].filter(u=>u[0]==="token").map(u=>u[2]).join(""):""},hasContent:(e,t,r)=>e.sequenceItemsByScopes([t],["tTreeContent/"],!1).filter(u=>u[0].filter(o=>o.startsWith("tTreeContent"))[0].split("/")[1]===r).length>0,concat:(e,t,...r)=>r.join(""),startsWith:(e,t,r,n)=>r.startsWith(n),endsWith:(e,t,r,n)=>r.endsWith(n),contains:(e,t,r,n)=>r.includes(n),matches:(e,t,r,n)=>ne.test(r,ne(n)),int:(e,t,r)=>parseInt(r),string:(e,t,r)=>`${r}`,left:(e,t,r,n)=>r.substring(0,n),right:(e,t,r,n)=>r.substring(r.length-n),length:(e,t,r)=>r.length,indexOf:(e,t,r,n)=>r.indexOf(n),add:(e,t,...r)=>r.reduce((n,u)=>n+u),mul:(e,t,...r)=>r.reduce((n,u)=>n*u),sub:(e,t,r,n)=>r-n,div:(e,t,r,n)=>Math.floor(r/n),mod:(e,t,r,n)=>r%n,gt:(e,t,r,n)=>r>n,lt:(e,t,r,n)=>rr>=n,le:(e,t,r,n)=>r<=n},Pz={quotedString:e=>e.substring(1,e.length-1),int:e=>parseInt(e),true:()=>!0,false:()=>!1},Oz=e=>{const t=[[]];let r=0,n=0,u=!1;for(;e&&rs.join(""))},Km={expression:{oneOf:["stringExpression","intExpression","booleanExpression"]},booleanExpression:{oneOf:["booleanPrimitive","equals","notEqual","and","or","not","contains","startsWith","endsWith","matches","gt","lt","ge","le","hasContent"]},stringExpression:{oneOf:["concat","left","right","string","idRef","parentIdRef","contentRef","stringPrimitive"]},intExpression:{oneOf:["length","indexOf","int","nChildren","intPrimitive","add","sub","mul","div","mod"]},equals:{regex:ne("^==\\((.+)\\)$"),doc:{operator:"==",args:["expression","expression"],result:"boolean",description:"Are the arguments strictly equal?"},argStructure:[["expression",[2,2]]]},notEqual:{regex:ne("^!=\\((.+)\\)$"),doc:{operator:"!=",args:["expression","expression"],result:"boolean",description:"Are the arguments not strictly equal?"},argStructure:[["expression",[2,2]]]},and:{regex:ne("^and\\((.+)\\)$"),doc:{operator:"and",args:["boolean","boolean","..."],result:"boolean",description:"Are all the arguments true?"},breakOn:!1,argStructure:[["booleanExpression",[2,null]]]},or:{regex:ne("^or\\((.+)\\)$"),doc:{operator:"or",args:["boolean","boolean"],result:"boolean",description:"Are any arguments true?"},breakOn:!0,argStructure:[["booleanExpression",[2,null]]]},concat:{regex:ne("^concat\\((.+)\\)$"),doc:{operator:"concat",args:["string","string","..."],result:"string",description:"Concatenates string arguments"},argStructure:[["stringExpression",[2,null]]]},contentRef:{regex:ne("^content\\((.+)\\)$"),doc:{operator:"content",args:["string"],result:"string",description:"String value of the specified content for the node"},argStructure:[["stringExpression",[1,1]]]},hasContent:{regex:ne("^hasContent\\((.+)\\)$"),doc:{operator:"hasContent",args:["string"],result:"boolean",description:"Does the node have this content?"},argStructure:[["stringExpression",[1,1]]]},contains:{regex:ne("^contains\\((.+)\\)$"),doc:{operator:"contains",args:["string","string"],result:"boolean",description:"Does the first string contain the second string?"},argStructure:[["stringExpression",[2,2]]]},startsWith:{regex:ne("^startsWith\\((.+)\\)$"),doc:{operator:"startsWith",args:["string","string"],result:"boolean",description:"Does the first string start with the second string?"},argStructure:[["stringExpression",[2,2]]]},endsWith:{regex:ne("^endsWith\\((.+)\\)$"),doc:{operator:"endsWith",args:["string","string"],result:"boolean",description:"Does the first string end with the second string?"},argStructure:[["stringExpression",[2,2]]]},matches:{regex:ne("^matches\\((.+)\\)$"),doc:{operator:"matches",args:["string","regex"],result:"boolean",description:"Does the first string match the regex in the second string?"},argStructure:[["stringExpression",[2,2]]]},left:{regex:ne("^left\\((.+)\\)$"),doc:{operator:"left",args:["string","integer"],result:"string",description:"The first n characters of the string"},argStructure:[["stringExpression",[1,1]],["intExpression",[1,1]]]},right:{regex:ne("^right\\((.+)\\)$"),doc:{operator:"right",args:["string","integer"],result:"string",description:"The last n characters of the string"},argStructure:[["stringExpression",[1,1]],["intExpression",[1,1]]]},length:{regex:ne("^length\\((.+)\\)$"),doc:{operator:"length",args:["string"],result:"integer",description:"The number of characters in the string"},argStructure:[["stringExpression",[1,1]]]},indexOf:{regex:ne("^indexOf\\((.+)\\)$"),doc:{operator:"indexOf",args:["string","string"],result:"number",description:"The integer position at which the second string starts in the first string"},argStructure:[["stringExpression",[2,2]]]},not:{regex:ne("^not\\((.+)\\)$"),doc:{operator:"not",args:["boolean"],result:"boolean",description:"The inverse boolean value of the argument"},argStructure:[["booleanExpression",[1,1]]]},int:{regex:ne("^int\\((.+)\\)$"),doc:{operator:"int",args:["string"],result:"integer",description:"The integer value of the string"},argStructure:[["stringExpression",[1,1]]]},string:{regex:ne("^string\\((.+)\\)$"),doc:{operator:"string",args:["integer"],result:"string",description:"The string value of the integer"},argStructure:[["intExpression",[1,1]]]},idRef:{regex:ne("^id$"),doc:{operator:"id",args:[],result:"string",description:"The node ID"},argStructure:[]},parentIdRef:{regex:ne("^parentId$"),doc:{operator:"parentId",args:[],result:"string",description:"The node's parent ID"},argStructure:[]},nChildren:{regex:ne("^nChildren$"),doc:{operator:"nChildren",args:[],result:"int",description:"The number of children of the node"},argStructure:[]},add:{regex:ne("^add\\((.+)\\)$"),doc:{operator:"add",args:["integer","..."],result:"integer",description:"The numeric sum of the arguments"},argStructure:[["intExpression",[2,null]]]},mul:{regex:ne("^mul\\((.+)\\)$"),doc:{operator:"mul",args:["integer","..."],result:"integer",description:"The numeric product of the arguments"},argStructure:[["intExpression",[2,null]]]},sub:{regex:ne("^sub\\((.+)\\)$"),doc:{operator:"sub",args:["integer","integer"],result:"integer",description:"The first integer minus the second"},argStructure:[["intExpression",[2,2]]]},div:{regex:ne("^div\\((.+)\\)$"),doc:{operator:"div",args:["integer","integer"],result:"integer",description:"The first integer divided by the second"},argStructure:[["intExpression",[2,2]]]},mod:{regex:ne("^mod\\((.+)\\)$"),doc:{operator:"mod",args:["integer","integer"],result:"integer",description:"The modulus of the first integer when divided by the second"},argStructure:[["intExpression",[2,2]]]},gt:{regex:ne("^>\\((.+)\\)$"),doc:{operator:">",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically greater than the second?"},argStructure:[["intExpression",[2,2]]]},lt:{regex:ne("^<\\((.+)\\)$"),doc:{operator:"<",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically less than the second?"},argStructure:[["intExpression",[2,2]]]},ge:{regex:ne("^>=\\((.+)\\)$"),doc:{operator:">=",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically greater than or equal to the second?"},argStructure:[["intExpression",[2,2]]]},le:{regex:ne("^<=\\((.+)\\)$"),doc:{operator:"<=",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically less than or equal to the second?"},argStructure:[["intExpression",[2,2]]]},stringPrimitive:{regex:ne("^('([^']|\\\\')*')$"),parseFunctions:[null,"quotedString"]},intPrimitive:{regex:ne("^(-?[0-9]+)$"),parseFunctions:[null,"int"]},booleanPrimitive:{regex:ne("^(true)|(false)$"),parseFunctions:[null,"true","false"]}},kz=(e,t,r,n,u)=>{const s=Km[n];if(!s)throw new Error(`Unknown expression ${n} for predicate ${r}`);const o=a=>[a.map(i=>i[1][0]).reduce((i,c)=>i+c),a.filter(i=>i[1][1]===null).length>0];if(s.parseFunctions){let a=!1;for(const[i,c]of s.parseFunctions.entries())if(!(!c||!u[i]))return a=!0,{data:Pz[c](u[i])};if(!a)return{errors:`Could not parse predicate ${r}`}}else{const a=Oz(u[1]),i=s.argStructure,c=[];if(i.length>0){const l=o(i);if(a.lengthl[0])return{errors:`Expected at most ${l[0]} args for '${n}', found ${a.length}`};let p=0,f=0,d=0;for(;p=i[f][1][1]&&(f++,d=0)}}if(c.filter(l=>l.errors).length===0){const l=c.map(f=>f.data);return{data:$z[n](e,t,...l)}}return{errors:`Could not parse arguments to ${n}: ${a.filter(l=>l.errors).map(l=>l.errors).join("; ")}`}}},Xm=(e,t,r,n)=>{const u=Km[n];if(!u)throw new Error(`Unknown expression ${n} for predicate ${r}`);if(u.oneOf){let s=null;for(const o of u.oneOf){const a=Xm(e,t,r,o);if(a.errors)(!s||a.errors.length({data:t.data.filter(n=>{const u=Xm(e,n,r,"booleanExpression");if(u.errors)throw new Error(`Predicate - ${u.errors}`);return u.data})}),cn="(\\[(([^\\]']|'([^']|\\\\')*')+)\\])*",Nz=(e,t,r,n,u,s)=>{const o=s[1].split(",").map(a=>a.trim());return{data:Array.from(o).map(a=>t[r.get(a)])}},qz=(e,t)=>({data:[t[0]]}),xz=(e,t)=>({data:t}),Rz=(e,t,r,n,u,s)=>{const o=s[2],a=new Set([]);for(const i of n.data){const c=e.unsuccinctifyScopes(i.is).map(l=>l[2].split("/")).filter(l=>l[0]==="tTreeChild").filter(l=>!o||l[1]===o).map(l=>l[2]);for(const l of c)a.add(l)}return{data:Array.from(a).map(i=>t[r.get(i)])}},jz=(e,t,r,n)=>{const u=new Set([]);for(const s of n.data){const o=e.unsuccinctifyScopes(s.is).filter(a=>a[2].startsWith("tTreeParent")).map(a=>a[2].split("/")[1])[0];u.add(o)}return{data:Array.from(u).map(s=>t[r.get(s)])}},Mz=(e,t,r,n,u,s)=>{let o=parseInt(s[2]);if(o<1)return{errors:`Expected a positive integer argument for ancestor, found ${u}`};let a=n.data;for(;o>0;){const i=new Set([]);for(const c of a){const l=e.unsuccinctifyScopes(c.is).filter(p=>p[2].startsWith("tTreeParent")).map(p=>p[2].split("/")[1])[0];i.add(l)}a=Array.from(i).map(c=>t[r.get(c)]),o--}return{data:a}},Lz=(e,t,r,n,u,s)=>{const o=new Set([]),a=(l,p)=>{const f=e.unsuccinctifyScopes(l.is).filter(d=>d[2].startsWith("tTreeChild")).map(d=>d[2].split("/")[2]);(p<=1||p===null)&&f.forEach(d=>o.add(d)),(p===null||p>1)&&f.map(d=>t[r.get(d)]).forEach(d=>a(d,p-1))};let i=null;s[3]&&(i=parseInt(s[3]));let c=-1;s[5]&&(c=parseInt(s[5]));for(const l of n.data)a(l,i);return{data:[...Array.from(o).entries()].filter(l=>c<0||l[0]===c).map(l=>l[1]).map(l=>t[r.get(l)])}},Uz=(e,t,r,n)=>{const u=new Set([]),s=o=>{const a=e.unsuccinctifyScopes(o.is).filter(i=>i[2].startsWith("tTreeChild")).map(i=>i[2].split("/")[2]);a.length===0?u.add(e.unsuccinctifyScopes(o.bs)[0][2].split("/")[1]):a.map(i=>t[r.get(i)]).forEach(i=>s(i))};for(const o of n.data)s(o);return{data:Array.from(u).map(o=>t[r.get(o)])}},Gz=(e,t,r,n)=>{const u=new Set([]);for(const a of n.data){const i=e.unsuccinctifyScopes(a.is).filter(c=>c[2].startsWith("tTreeParent")).map(c=>c[2].split("/")[1])[0];u.add(i)}const s=t.filter(a=>u.has(e.unsuccinctifyScopes(a.bs)[0][2].split("/")[1])),o=new Set([]);for(const a of s){const i=e.unsuccinctifyScopes(a.is).filter(c=>c[2].startsWith("tTreeChild")).map(c=>c[2].split("/")[2]);for(const c of i)o.add(c)}return{data:Array.from(o).map(a=>t[r.get(a)])}},Hp=(e,t,r,n,u,s)=>{const o={};(u.size===0||u.has("id"))&&(o.id=e.unsuccinctifyScopes(t.bs)[0][2].split("/")[1]),(u.size===0||u.has("parentId"))&&(o.parentId=e.unsuccinctifyScopes(t.is).filter(c=>c[2].startsWith("tTreeParent")).map(c=>c[2].split("/")[1])[0]);const a={};for(const[c,l]of e.sequenceItemsByScopes([t],["tTreeContent/"],!1)){const p=c.filter(f=>f.startsWith("tTreeContent"))[0].split("/")[1];(u.size===0||u.has("content")||u.has(`@${p}`))&&(a[p]=l.filter(f=>f[0]==="token").map(f=>f[2]).join(""))}Object.keys(a).length>0&&(o.content=a);const i=[];if(u.has("children"))for(const c of e.unsuccinctifyScopes(t.is).filter(l=>l[2].startsWith("tTreeChild")).map(l=>l[2].split("/")[2]))i.push(c);return i.length>0&&(s?o.children=i.map(c=>r[n.get(c)]).map(c=>Hp(e,c,r,n,u,!0)):o.children=i),o},Vz=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(i=>i.trim())));for(const i of n.data)o.push(Hp(e,i,t,r,a,!0));return{data:o}},Hz=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(c=>c.trim()).filter(c=>c.startsWith("@"))));for(const c of n.data)o.push(Hp(e,c,t,r,a,!0));const i={};for(const c of Array.from(a).map(l=>l.substring(1)))i[c]=Array.from(new Set(o.filter(l=>l.content).map(l=>l.content).filter(l=>c in l).map(l=>l[c]).sort()));return{data:i}},Wz=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(i=>i.trim())));for(const i of n.data)o.push(Hp(e,i,t,r,a,!1));return{data:o}},Hy=[{regex:ne(`^#\\{([^}]+)\\}${cn}$`),doc:{title:"Nodes by Id",syntax:"#(id, id, ...)",description:"Returns nodes whose id is listed"},predicateCapture:3,inputType:null,outputType:"nodes",function:Nz},{regex:ne(`^root${cn}$`),doc:{title:"Root Node",syntax:"root",description:"Returns the root node"},predicateCapture:2,inputType:null,outputType:"nodes",function:qz},{regex:ne(`^nodes${cn}$`),doc:{title:"Nodes",syntax:"nodes",description:"Returns all the nodes"},predicateCapture:2,function:xz,inputType:null,outputType:"nodes"},{regex:ne(`^children(\\((\\d+)\\))?${cn}$`),doc:{title:"Children",syntax:"children; children(pos)",description:"Returns the children of the current node(s), optionally filtered by position within the parent node"},predicateCapture:4,inputType:"nodes",outputType:"nodes",function:Rz},{regex:ne(`^descendants((\\((\\d+)(,\\s*(\\d+))?\\))?)${cn}$`),doc:{title:"Descendants",syntax:"descendants; descendants(depth); descendants(depth, pos)",description:"Returns the descendants of the current node(s), optionally at the specified level, optionally filtered by position"},predicateCapture:7,inputType:"nodes",outputType:"nodes",function:Lz},{regex:ne(`^leaves${cn}$`),doc:{title:"Leaves",syntax:"leaves",description:"Returns the leaves (ie the nodes with no children) below the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:Uz},{regex:ne(`^parent${cn}$`),doc:{title:"Parent",syntax:"parent",description:"Returns the parent of the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:jz},{regex:ne(`^ancestor(\\((\\d+)\\))${cn}$`),doc:{title:"Ancestor",syntax:"ancestor(depth)",description:"Returns the nth ancestor of the node"},predicateCapture:5,inputType:"nodes",outputType:"nodes",function:Mz},{regex:ne(`^siblings${cn}$`),doc:{title:"Siblings",syntax:"siblings",description:"Returns the children of the parent of the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:Gz},{regex:ne(`^node(\\{([^}]+)\\})?${cn}$`),doc:{title:"Node Details",syntax:"node; node{ id, parentId, content, children, @foo }",description:"Returns an object containing the specified content"},predicateCapture:4,inputType:"nodes",outputType:"node",function:Wz},{regex:ne(`^branch(\\{([^}]+)\\})?${cn}$`),doc:{title:"Branch",syntax:"branch; branch{ id, parentId, content, children, @foo }",description:"Returns nested objects containing the specified content"},predicateCapture:4,inputType:"nodes",outputType:"node",function:Vz},{regex:ne(`^values(\\{([^}]+)\\})?${cn}$`),doc:{title:"Values",syntax:"values{ @foo ... }",description:"Returns all values across nodes for the specified fields"},predicateCapture:4,inputType:"nodes",outputType:"values",function:Hz}];class m1{constructor(){this.currentStepType=null}doStep(t,r,n,u,s){for(const o of Hy){const a=ne.exec(s,o.regex);if(a&&o.inputType===this.currentStepType){let i=o.function(t,r,n,u,s,a);return a[o.predicateCapture]&&(i=Iz(t,i,a[o.predicateCapture])),this.currentStepType=o.outputType,i}}return{errors:`Unable to match step ${s}`}}parse1(t,r,n,u,s){if(s.length>0){const o=this.doStep(t,r,n,u,s[0]);return o.errors||o.data.length===0?o:this.parse1(t,r,n,o,s.slice(1))}else return u}queryArray(t){const r=[];for(const n of t.split("/"))r.push(n);return r}indexNodes(t,r){const n=new Map;for(const[u,s]of r.entries()){const o=t.unsuccinctifyScopes(s.bs)[0][2].split("/")[1];n.set(o,u)}return n}doc(){return`** Steps ** +`,EK={nCells:e=>e.blocks.length,nRows:(e,t,r)=>{const n=new Set([]);for(const u of e.blocks){const[s,o,a]=ye.succinct.headerBytes(u.bs,0),i=r.docSet.unsuccinctifyScope(u.bs,o,a,0)[2];n.add(i.split("/")[1])}return n.size},nColumns:(e,t,r)=>{const n=new Set([]);for(const u of e.blocks)for(const s of r.docSet.unsuccinctifyScopes(u.is).map(o=>o[2]))s.startsWith("tTableCol")&&n.add(s.split("/")[1]);return n.size},cells:(e,t,r)=>{const n=[];for(const u of e.blocks)n.push([r.docSet.unsuccinctifyScopes(u.bs).map(s=>parseInt(s[2].split("/")[1])),Array.from(new Set(r.docSet.unsuccinctifyScopes(u.is).filter(s=>s[2].startsWith("tTableCol")).map(s=>parseInt(s[2].split("/")[1])))),r.docSet.unsuccinctifyItems(u.c,{},0)]);return n},rows:(e,t,r)=>{const n=(c,l)=>{if(c[l.colN]===void 0)return!1;const p=c[l.colN][2].filter(d=>d[0]==="token").map(d=>d[2]).join("");return Z.test(p,Z(l.matching))},u=(c,l)=>l.length===0?!0:n(c,l[0])?u(c,l.slice(1)):!1,s=(c,l)=>{if(c[l.colN]===void 0)return!1;const p=c[l.colN][2].filter(d=>d[0]==="token").map(d=>d[2]).join("");return l.values.includes(p)},o=(c,l)=>l.length===0?!0:s(c,l[0])?o(c,l.slice(1)):!1;let a=[],i=-1;for(const c of e.blocks){const l=r.docSet.unsuccinctifyScopes(c.bs).map(p=>parseInt(p[2].split("/")[1]));t.positions&&!t.positions.includes(l[0])||(l[0]!==i&&(a.push([]),i=l[0]),a[a.length-1].push([l,Array.from(new Set(r.docSet.unsuccinctifyScopes(c.is).filter(p=>p[2].startsWith("tTableCol")).map(p=>parseInt(p[2].split("/")[1])))),r.docSet.unsuccinctifyItems(c.c,{},0)]))}return t.matches&&(a=a.filter(c=>u(c,t.matches))),t.equals&&(a=a.filter(c=>o(c,t.equals))),t.columns&&(a=a.map(c=>[...c.entries()].filter(l=>t.columns.includes(l[0])).map(l=>l[1]))),a},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),headings:e=>Array.from(e.tags).filter(t=>t.startsWith("col")).sort((t,r)=>parseInt(t.split(":")[0].substring(3))-parseInt(r.split(":")[0].substring(3))).map(t=>t.split(":")[1])},yK={equals:(e,t,r,n)=>r===n,notEqual:(e,t,r,n)=>r!==n,and:(e,t,...r)=>r.filter(n=>!n).length===0,or:(e,t,...r)=>r.filter(n=>n).length>0,not:(e,t,r)=>!r,idRef:(e,t)=>e.unsuccinctifyScopes(t.bs)[0][2].split("/")[1],parentIdRef:(e,t)=>e.unsuccinctifyScopes(t.is).filter(r=>r[2].startsWith("tTreeParent"))[0][2].split("/")[1],nChildren:(e,t)=>e.unsuccinctifyScopes(t.is).filter(r=>r[2].startsWith("tTreeChild")).length,contentRef:(e,t,r)=>{const n=e.sequenceItemsByScopes([t],["tTreeContent/"],!1).filter(u=>u[0].filter(o=>o.startsWith("tTreeContent"))[0].split("/")[1]===r);return n[0]?n[0][1].filter(u=>u[0]==="token").map(u=>u[2]).join(""):""},hasContent:(e,t,r)=>e.sequenceItemsByScopes([t],["tTreeContent/"],!1).filter(u=>u[0].filter(o=>o.startsWith("tTreeContent"))[0].split("/")[1]===r).length>0,concat:(e,t,...r)=>r.join(""),startsWith:(e,t,r,n)=>r.startsWith(n),endsWith:(e,t,r,n)=>r.endsWith(n),contains:(e,t,r,n)=>r.includes(n),matches:(e,t,r,n)=>Z.test(r,Z(n)),int:(e,t,r)=>parseInt(r),string:(e,t,r)=>`${r}`,left:(e,t,r,n)=>r.substring(0,n),right:(e,t,r,n)=>r.substring(r.length-n),length:(e,t,r)=>r.length,indexOf:(e,t,r,n)=>r.indexOf(n),add:(e,t,...r)=>r.reduce((n,u)=>n+u),mul:(e,t,...r)=>r.reduce((n,u)=>n*u),sub:(e,t,r,n)=>r-n,div:(e,t,r,n)=>Math.floor(r/n),mod:(e,t,r,n)=>r%n,gt:(e,t,r,n)=>r>n,lt:(e,t,r,n)=>rr>=n,le:(e,t,r,n)=>r<=n},vK={quotedString:e=>e.substring(1,e.length-1),int:e=>parseInt(e),true:()=>!0,false:()=>!1},gK=e=>{const t=[[]];let r=0,n=0,u=!1;for(;e&&rs.join(""))},aE={expression:{oneOf:["stringExpression","intExpression","booleanExpression"]},booleanExpression:{oneOf:["booleanPrimitive","equals","notEqual","and","or","not","contains","startsWith","endsWith","matches","gt","lt","ge","le","hasContent"]},stringExpression:{oneOf:["concat","left","right","string","idRef","parentIdRef","contentRef","stringPrimitive"]},intExpression:{oneOf:["length","indexOf","int","nChildren","intPrimitive","add","sub","mul","div","mod"]},equals:{regex:Z("^==\\((.+)\\)$"),doc:{operator:"==",args:["expression","expression"],result:"boolean",description:"Are the arguments strictly equal?"},argStructure:[["expression",[2,2]]]},notEqual:{regex:Z("^!=\\((.+)\\)$"),doc:{operator:"!=",args:["expression","expression"],result:"boolean",description:"Are the arguments not strictly equal?"},argStructure:[["expression",[2,2]]]},and:{regex:Z("^and\\((.+)\\)$"),doc:{operator:"and",args:["boolean","boolean","..."],result:"boolean",description:"Are all the arguments true?"},breakOn:!1,argStructure:[["booleanExpression",[2,null]]]},or:{regex:Z("^or\\((.+)\\)$"),doc:{operator:"or",args:["boolean","boolean"],result:"boolean",description:"Are any arguments true?"},breakOn:!0,argStructure:[["booleanExpression",[2,null]]]},concat:{regex:Z("^concat\\((.+)\\)$"),doc:{operator:"concat",args:["string","string","..."],result:"string",description:"Concatenates string arguments"},argStructure:[["stringExpression",[2,null]]]},contentRef:{regex:Z("^content\\((.+)\\)$"),doc:{operator:"content",args:["string"],result:"string",description:"String value of the specified content for the node"},argStructure:[["stringExpression",[1,1]]]},hasContent:{regex:Z("^hasContent\\((.+)\\)$"),doc:{operator:"hasContent",args:["string"],result:"boolean",description:"Does the node have this content?"},argStructure:[["stringExpression",[1,1]]]},contains:{regex:Z("^contains\\((.+)\\)$"),doc:{operator:"contains",args:["string","string"],result:"boolean",description:"Does the first string contain the second string?"},argStructure:[["stringExpression",[2,2]]]},startsWith:{regex:Z("^startsWith\\((.+)\\)$"),doc:{operator:"startsWith",args:["string","string"],result:"boolean",description:"Does the first string start with the second string?"},argStructure:[["stringExpression",[2,2]]]},endsWith:{regex:Z("^endsWith\\((.+)\\)$"),doc:{operator:"endsWith",args:["string","string"],result:"boolean",description:"Does the first string end with the second string?"},argStructure:[["stringExpression",[2,2]]]},matches:{regex:Z("^matches\\((.+)\\)$"),doc:{operator:"matches",args:["string","regex"],result:"boolean",description:"Does the first string match the regex in the second string?"},argStructure:[["stringExpression",[2,2]]]},left:{regex:Z("^left\\((.+)\\)$"),doc:{operator:"left",args:["string","integer"],result:"string",description:"The first n characters of the string"},argStructure:[["stringExpression",[1,1]],["intExpression",[1,1]]]},right:{regex:Z("^right\\((.+)\\)$"),doc:{operator:"right",args:["string","integer"],result:"string",description:"The last n characters of the string"},argStructure:[["stringExpression",[1,1]],["intExpression",[1,1]]]},length:{regex:Z("^length\\((.+)\\)$"),doc:{operator:"length",args:["string"],result:"integer",description:"The number of characters in the string"},argStructure:[["stringExpression",[1,1]]]},indexOf:{regex:Z("^indexOf\\((.+)\\)$"),doc:{operator:"indexOf",args:["string","string"],result:"number",description:"The integer position at which the second string starts in the first string"},argStructure:[["stringExpression",[2,2]]]},not:{regex:Z("^not\\((.+)\\)$"),doc:{operator:"not",args:["boolean"],result:"boolean",description:"The inverse boolean value of the argument"},argStructure:[["booleanExpression",[1,1]]]},int:{regex:Z("^int\\((.+)\\)$"),doc:{operator:"int",args:["string"],result:"integer",description:"The integer value of the string"},argStructure:[["stringExpression",[1,1]]]},string:{regex:Z("^string\\((.+)\\)$"),doc:{operator:"string",args:["integer"],result:"string",description:"The string value of the integer"},argStructure:[["intExpression",[1,1]]]},idRef:{regex:Z("^id$"),doc:{operator:"id",args:[],result:"string",description:"The node ID"},argStructure:[]},parentIdRef:{regex:Z("^parentId$"),doc:{operator:"parentId",args:[],result:"string",description:"The node's parent ID"},argStructure:[]},nChildren:{regex:Z("^nChildren$"),doc:{operator:"nChildren",args:[],result:"int",description:"The number of children of the node"},argStructure:[]},add:{regex:Z("^add\\((.+)\\)$"),doc:{operator:"add",args:["integer","..."],result:"integer",description:"The numeric sum of the arguments"},argStructure:[["intExpression",[2,null]]]},mul:{regex:Z("^mul\\((.+)\\)$"),doc:{operator:"mul",args:["integer","..."],result:"integer",description:"The numeric product of the arguments"},argStructure:[["intExpression",[2,null]]]},sub:{regex:Z("^sub\\((.+)\\)$"),doc:{operator:"sub",args:["integer","integer"],result:"integer",description:"The first integer minus the second"},argStructure:[["intExpression",[2,2]]]},div:{regex:Z("^div\\((.+)\\)$"),doc:{operator:"div",args:["integer","integer"],result:"integer",description:"The first integer divided by the second"},argStructure:[["intExpression",[2,2]]]},mod:{regex:Z("^mod\\((.+)\\)$"),doc:{operator:"mod",args:["integer","integer"],result:"integer",description:"The modulus of the first integer when divided by the second"},argStructure:[["intExpression",[2,2]]]},gt:{regex:Z("^>\\((.+)\\)$"),doc:{operator:">",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically greater than the second?"},argStructure:[["intExpression",[2,2]]]},lt:{regex:Z("^<\\((.+)\\)$"),doc:{operator:"<",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically less than the second?"},argStructure:[["intExpression",[2,2]]]},ge:{regex:Z("^>=\\((.+)\\)$"),doc:{operator:">=",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically greater than or equal to the second?"},argStructure:[["intExpression",[2,2]]]},le:{regex:Z("^<=\\((.+)\\)$"),doc:{operator:"<=",args:["integer","integer"],result:"boolean",description:"Is the first integer numerically less than or equal to the second?"},argStructure:[["intExpression",[2,2]]]},stringPrimitive:{regex:Z("^('([^']|\\\\')*')$"),parseFunctions:[null,"quotedString"]},intPrimitive:{regex:Z("^(-?[0-9]+)$"),parseFunctions:[null,"int"]},booleanPrimitive:{regex:Z("^(true)|(false)$"),parseFunctions:[null,"true","false"]}},AK=(e,t,r,n,u)=>{const s=aE[n];if(!s)throw new Error(`Unknown expression ${n} for predicate ${r}`);const o=a=>[a.map(i=>i[1][0]).reduce((i,c)=>i+c),a.filter(i=>i[1][1]===null).length>0];if(s.parseFunctions){let a=!1;for(const[i,c]of s.parseFunctions.entries())if(!(!c||!u[i]))return a=!0,{data:vK[c](u[i])};if(!a)return{errors:`Could not parse predicate ${r}`}}else{const a=gK(u[1]),i=s.argStructure,c=[];if(i.length>0){const l=o(i);if(a.lengthl[0])return{errors:`Expected at most ${l[0]} args for '${n}', found ${a.length}`};let p=0,d=0,f=0;for(;p=i[d][1][1]&&(d++,f=0)}}if(c.filter(l=>l.errors).length===0){const l=c.map(d=>d.data);return{data:yK[n](e,t,...l)}}return{errors:`Could not parse arguments to ${n}: ${a.filter(l=>l.errors).map(l=>l.errors).join("; ")}`}}},iE=(e,t,r,n)=>{const u=aE[n];if(!u)throw new Error(`Unknown expression ${n} for predicate ${r}`);if(u.oneOf){let s=null;for(const o of u.oneOf){const a=iE(e,t,r,o);if(a.errors)(!s||a.errors.length({data:t.data.filter(n=>{const u=iE(e,n,r,"booleanExpression");if(u.errors)throw new Error(`Predicate - ${u.errors}`);return u.data})}),tn="(\\[(([^\\]']|'([^']|\\\\')*')+)\\])*",CK=(e,t,r,n,u,s)=>{const o=s[1].split(",").map(a=>a.trim());return{data:Array.from(o).map(a=>t[r.get(a)])}},bK=(e,t)=>({data:[t[0]]}),SK=(e,t)=>({data:t}),wK=(e,t,r,n,u,s)=>{const o=s[2],a=new Set([]);for(const i of n.data){const c=e.unsuccinctifyScopes(i.is).map(l=>l[2].split("/")).filter(l=>l[0]==="tTreeChild").filter(l=>!o||l[1]===o).map(l=>l[2]);for(const l of c)a.add(l)}return{data:Array.from(a).map(i=>t[r.get(i)])}},_K=(e,t,r,n)=>{const u=new Set([]);for(const s of n.data){const o=e.unsuccinctifyScopes(s.is).filter(a=>a[2].startsWith("tTreeParent")).map(a=>a[2].split("/")[1])[0];u.add(o)}return{data:Array.from(u).map(s=>t[r.get(s)])}},BK=(e,t,r,n,u,s)=>{let o=parseInt(s[2]);if(o<1)return{errors:`Expected a positive integer argument for ancestor, found ${u}`};let a=n.data;for(;o>0;){const i=new Set([]);for(const c of a){const l=e.unsuccinctifyScopes(c.is).filter(p=>p[2].startsWith("tTreeParent")).map(p=>p[2].split("/")[1])[0];i.add(l)}a=Array.from(i).map(c=>t[r.get(c)]),o--}return{data:a}},TK=(e,t,r,n,u,s)=>{const o=new Set([]),a=(l,p)=>{const d=e.unsuccinctifyScopes(l.is).filter(f=>f[2].startsWith("tTreeChild")).map(f=>f[2].split("/")[2]);(p<=1||p===null)&&d.forEach(f=>o.add(f)),(p===null||p>1)&&d.map(f=>t[r.get(f)]).forEach(f=>a(f,p-1))};let i=null;s[3]&&(i=parseInt(s[3]));let c=-1;s[5]&&(c=parseInt(s[5]));for(const l of n.data)a(l,i);return{data:[...Array.from(o).entries()].filter(l=>c<0||l[0]===c).map(l=>l[1]).map(l=>t[r.get(l)])}},$K=(e,t,r,n)=>{const u=new Set([]),s=o=>{const a=e.unsuccinctifyScopes(o.is).filter(i=>i[2].startsWith("tTreeChild")).map(i=>i[2].split("/")[2]);a.length===0?u.add(e.unsuccinctifyScopes(o.bs)[0][2].split("/")[1]):a.map(i=>t[r.get(i)]).forEach(i=>s(i))};for(const o of n.data)s(o);return{data:Array.from(u).map(o=>t[r.get(o)])}},PK=(e,t,r,n)=>{const u=new Set([]);for(const a of n.data){const i=e.unsuccinctifyScopes(a.is).filter(c=>c[2].startsWith("tTreeParent")).map(c=>c[2].split("/")[1])[0];u.add(i)}const s=t.filter(a=>u.has(e.unsuccinctifyScopes(a.bs)[0][2].split("/")[1])),o=new Set([]);for(const a of s){const i=e.unsuccinctifyScopes(a.is).filter(c=>c[2].startsWith("tTreeChild")).map(c=>c[2].split("/")[2]);for(const c of i)o.add(c)}return{data:Array.from(o).map(a=>t[r.get(a)])}},Zp=(e,t,r,n,u,s)=>{const o={};(u.size===0||u.has("id"))&&(o.id=e.unsuccinctifyScopes(t.bs)[0][2].split("/")[1]),(u.size===0||u.has("parentId"))&&(o.parentId=e.unsuccinctifyScopes(t.is).filter(c=>c[2].startsWith("tTreeParent")).map(c=>c[2].split("/")[1])[0]);const a={};for(const[c,l]of e.sequenceItemsByScopes([t],["tTreeContent/"],!1)){const p=c.filter(d=>d.startsWith("tTreeContent"))[0].split("/")[1];(u.size===0||u.has("content")||u.has(`@${p}`))&&(a[p]=l.filter(d=>d[0]==="token").map(d=>d[2]).join(""))}Object.keys(a).length>0&&(o.content=a);const i=[];if(u.has("children"))for(const c of e.unsuccinctifyScopes(t.is).filter(l=>l[2].startsWith("tTreeChild")).map(l=>l[2].split("/")[2]))i.push(c);return i.length>0&&(s?o.children=i.map(c=>r[n.get(c)]).map(c=>Zp(e,c,r,n,u,!0)):o.children=i),o},kK=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(i=>i.trim())));for(const i of n.data)o.push(Zp(e,i,t,r,a,!0));return{data:o}},OK=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(c=>c.trim()).filter(c=>c.startsWith("@"))));for(const c of n.data)o.push(Zp(e,c,t,r,a,!0));const i={};for(const c of Array.from(a).map(l=>l.substring(1)))i[c]=Array.from(new Set(o.filter(l=>l.content).map(l=>l.content).filter(l=>c in l).map(l=>l[c]).sort()));return{data:i}},IK=(e,t,r,n,u,s)=>{const o=[];let a=new Set([]);s[2]&&(a=new Set(s[2].split(",").map(i=>i.trim())));for(const i of n.data)o.push(Zp(e,i,t,r,a,!1));return{data:o}},lg=[{regex:Z(`^#\\{([^}]+)\\}${tn}$`),doc:{title:"Nodes by Id",syntax:"#(id, id, ...)",description:"Returns nodes whose id is listed"},predicateCapture:3,inputType:null,outputType:"nodes",function:CK},{regex:Z(`^root${tn}$`),doc:{title:"Root Node",syntax:"root",description:"Returns the root node"},predicateCapture:2,inputType:null,outputType:"nodes",function:bK},{regex:Z(`^nodes${tn}$`),doc:{title:"Nodes",syntax:"nodes",description:"Returns all the nodes"},predicateCapture:2,function:SK,inputType:null,outputType:"nodes"},{regex:Z(`^children(\\((\\d+)\\))?${tn}$`),doc:{title:"Children",syntax:"children; children(pos)",description:"Returns the children of the current node(s), optionally filtered by position within the parent node"},predicateCapture:4,inputType:"nodes",outputType:"nodes",function:wK},{regex:Z(`^descendants((\\((\\d+)(,\\s*(\\d+))?\\))?)${tn}$`),doc:{title:"Descendants",syntax:"descendants; descendants(depth); descendants(depth, pos)",description:"Returns the descendants of the current node(s), optionally at the specified level, optionally filtered by position"},predicateCapture:7,inputType:"nodes",outputType:"nodes",function:TK},{regex:Z(`^leaves${tn}$`),doc:{title:"Leaves",syntax:"leaves",description:"Returns the leaves (ie the nodes with no children) below the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:$K},{regex:Z(`^parent${tn}$`),doc:{title:"Parent",syntax:"parent",description:"Returns the parent of the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:_K},{regex:Z(`^ancestor(\\((\\d+)\\))${tn}$`),doc:{title:"Ancestor",syntax:"ancestor(depth)",description:"Returns the nth ancestor of the node"},predicateCapture:5,inputType:"nodes",outputType:"nodes",function:BK},{regex:Z(`^siblings${tn}$`),doc:{title:"Siblings",syntax:"siblings",description:"Returns the children of the parent of the current node"},predicateCapture:2,inputType:"nodes",outputType:"nodes",function:PK},{regex:Z(`^node(\\{([^}]+)\\})?${tn}$`),doc:{title:"Node Details",syntax:"node; node{ id, parentId, content, children, @foo }",description:"Returns an object containing the specified content"},predicateCapture:4,inputType:"nodes",outputType:"node",function:IK},{regex:Z(`^branch(\\{([^}]+)\\})?${tn}$`),doc:{title:"Branch",syntax:"branch; branch{ id, parentId, content, children, @foo }",description:"Returns nested objects containing the specified content"},predicateCapture:4,inputType:"nodes",outputType:"node",function:kK},{regex:Z(`^values(\\{([^}]+)\\})?${tn}$`),doc:{title:"Values",syntax:"values{ @foo ... }",description:"Returns all values across nodes for the specified fields"},predicateCapture:4,inputType:"nodes",outputType:"values",function:OK}];class wf{constructor(){this.currentStepType=null}doStep(t,r,n,u,s){for(const o of lg){const a=Z.exec(s,o.regex);if(a&&o.inputType===this.currentStepType){let i=o.function(t,r,n,u,s,a);return a[o.predicateCapture]&&(i=FK(t,i,a[o.predicateCapture])),this.currentStepType=o.outputType,i}}return{errors:`Unable to match step ${s}`}}parse1(t,r,n,u,s){if(s.length>0){const o=this.doStep(t,r,n,u,s[0]);return o.errors||o.data.length===0?o:this.parse1(t,r,n,o,s.slice(1))}else return u}queryArray(t){const r=[];for(const n of t.split("/"))r.push(n);return r}indexNodes(t,r){const n=new Map;for(const[u,s]of r.entries()){const o=t.unsuccinctifyScopes(s.bs)[0][2].split("/")[1];n.set(o,u)}return n}doc(){return`** Steps ** -`+Hy.map(t=>t.doc).map(t=>`* ${t.title} * +`+lg.map(t=>t.doc).map(t=>`* ${t.title} * ${t.syntax} ${t.description}`).join(` `)+`** Predicate Operators ** -`+Object.values(Km).filter(t=>t.doc).map(t=>`${t.doc.operator}(${t.doc.args.map(r=>"<"+r+">").join(", ")}) => ${t.doc.result} +`+Object.values(aE).filter(t=>t.doc).map(t=>`${t.doc.operator}(${t.doc.args.map(r=>"<"+r+">").join(", ")}) => ${t.doc.result} ${t.doc.description}`).join(` -`)}parse(t,r,n){const u=this.parse1(t,r,this.indexNodes(t,r),{data:r},this.queryArray(n));if(u.data)switch(this.currentStepType){case"nodes":u.data=u.data.map(o=>({id:t.unsuccinctifyScopes(o.bs)[0][2].split("/")[1]}))}return JSON.stringify(u,null,2)}}const Jz=` +`)}parse(t,r,n){const u=this.parse1(t,r,this.indexNodes(t,r),{data:r},this.queryArray(n));if(u.data)switch(this.currentStepType){case"nodes":u.data=u.data.map(o=>({id:t.unsuccinctifyScopes(o.bs)[0][2].split("/")[1]}))}return JSON.stringify(u,null,2)}}const NK=` """The nodes of a tree""" type treeSequence { """The id of the sequence""" @@ -681,7 +681,7 @@ type treeSequence { tagName: String ): Boolean! } -`,zz={nNodes:e=>e.blocks.length,nodes:e=>e.blocks,tribos:(e,t,r)=>new m1().parse(r.docSet,e.blocks,t.query),triboi:(e,t,r)=>t.queries.map(n=>new m1().parse(r.docSet,e.blocks,n)),tribosDoc:()=>new m1().doc(),tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName)},Kz=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},Xz=` +`,qK={nNodes:e=>e.blocks.length,nodes:e=>e.blocks,tribos:(e,t,r)=>new wf().parse(r.docSet,e.blocks,t.query),triboi:(e,t,r)=>t.queries.map(n=>new wf().parse(r.docSet,e.blocks,n)),tribosDoc:()=>new wf().doc(),tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName)},xK=(e,t)=>{if(e.length===0)return!0;for(const r of e)if(t.startsWith(r))return!0;return!1},RK=` """Part of a sequence, roughly equivalent to a USFM paragraph""" type Block { """The length in bytes of the succinct representation of c (block items)""" @@ -764,7 +764,7 @@ type Block { startsWith: [String!] ): [String!]! } -`,Yz={cBL:e=>e.c.length,bgBL:e=>e.bg.length,osBL:e=>e.os.length,isBL:e=>e.is.length,ntBL:e=>e.nt.length,cL:(e,t,r)=>r.docSet.countItems(e.c),bgL:(e,t,r)=>r.docSet.countItems(e.bg),osL:(e,t,r)=>r.docSet.countItems(e.os),isL:(e,t,r)=>r.docSet.countItems(e.is),is:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is),os:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.os),bs:(e,t,r)=>{const[n,u,s]=Ae.succinct.headerBytes(e.bs,0);return r.docSet.unsuccinctifyScope(e.bs,u,s,0)},bg:(e,t,r)=>r.docSet.unsuccinctifyGrafts(e.bg),nt:e=>e.nt.nByte(0),items:(e,t,r)=>{if(t.withScopes&&t.withScriptureCV)throw new Error("Cannot specify both withScopes and withScriptureCV");return t.withScriptureCV?r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,{},t.includeContext||!1):r.docSet.unsuccinctifyPrunedItems(e,{tokens:!0,scopes:!0,grafts:!0,excludeScopeTypes:t.excludeScopeTypes||[],requiredScopes:t.withScopes||[],anyScope:t.anyScope||!1})},tokens:(e,t,r)=>{if(Object.keys(t).filter(u=>u.includes("Chars")).length>1)throw new Error('Only one of "withChars", "withAnyCaseChars" and "withCharsMatchingRegex" may be specified');let n;return t.withScriptureCV?n=r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,{tokens:!0},t.includeContext||!1):n=r.docSet.unsuccinctifyPrunedItems(e,{tokens:!0,scopes:!0,requiredScopes:t.withScopes||[],anyScope:t.anyScope||!1}),t.withSubTypes&&(n=n.filter(u=>t.withSubTypes.includes(u[1]))),t.withChars?n=n.filter(u=>t.withChars.includes(u[2])):t.withMatchingChars&&(n=n.filter(u=>{for(const s of t.withMatchingChars)if(ne.test(u,ne(s)))return!0;return!1})),n.filter(u=>u[0]==="token")},text:(e,t,r)=>{let u=(t.withScriptureCV?r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,{tokens:!0},!1):r.docSet.unsuccinctifyItems(e.c,{tokens:!0},null)).map(s=>s[2]).join("").trim();return t.normalizeSpace&&(u=u.replace(/[ \t\n\r]+/g," ")),u},itemGroups:(e,t,r)=>{if(t.byScopes&&t.byMilestones)throw new Error("Cannot specify both byScopes and byMilestones");if(!t.byScopes&&!t.byMilestones)throw new Error("Must specify either byScopes or byMilestones");return t.byScopes?r.docSet.sequenceItemsByScopes([e],t.byScopes):r.docSet.sequenceItemsByMilestones([e],t.byMilestones)},dump:(e,t,r)=>YJ(r.docSet.unsuccinctifyBlock(e,{},null)),scopeLabels:(e,t,r)=>[...r.docSet.unsuccinctifyBlockScopeLabelsSet(e)].filter(n=>!t.startsWith||Kz(t.startsWith,n))},f7=(e,t,r)=>{let n=[t.map(u=>[Ae.enums.enumStringIndex(e.enums.wordLike,u)])];return r?n=n[0]:n=n.map(u=>u.reduce((s,o)=>s.concat(o))),n},d7=(e,t,r)=>{let n=[t.map(u=>Ae.enums.enumRegexIndexTuples(e.enums.wordLike,u).map(s=>s[0]))];return r?n=n[0]:n=n.map(u=>u.reduce((s,o)=>s.concat(o))),n},D7=(e,t,r)=>{if(r&&t.filter(n=>n.length===0).length>0||(t=t.filter(n=>n.length>0),t.length===0))return!1;for(const n of t){let u=!1;for(const s of n)if(s>=0&&e.tokensPresent.get(s)>0){u=!0;break}if(r&&!u)return!1;if(!r&&u)return!0}return r},V2=(e,t,r,n)=>{let u=f7(e,r,n);return D7(t,u,n)},H2=(e,t,r,n)=>{let u=d7(e,r,n);return D7(t,u,n)},Zz={tokens:!1,scopes:!0,grafts:!1,requiredScopes:[]},Qz=(e,t,r,n,u)=>{let s=new Set([]);for(const o of e.unsuccinctifyPrunedItems(t,Zz,!1)){const[a,i,c,l,p,f]=o[2].split("/");for(const[d,h]of r.entries()){for(const E of h)if(i===E.attType&&c===E.tagName&&l===E.attKey&&parseInt(p)===E.valueN&&n[d].includes(f)){if(!u)return!0;s.add(d);break}if(s.size===r.length)return!0}}return!1},eK=` +`,jK={cBL:e=>e.c.length,bgBL:e=>e.bg.length,osBL:e=>e.os.length,isBL:e=>e.is.length,ntBL:e=>e.nt.length,cL:(e,t,r)=>r.docSet.countItems(e.c),bgL:(e,t,r)=>r.docSet.countItems(e.bg),osL:(e,t,r)=>r.docSet.countItems(e.os),isL:(e,t,r)=>r.docSet.countItems(e.is),is:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.is),os:(e,t,r)=>r.docSet.unsuccinctifyScopes(e.os),bs:(e,t,r)=>{const[n,u,s]=ye.succinct.headerBytes(e.bs,0);return r.docSet.unsuccinctifyScope(e.bs,u,s,0)},bg:(e,t,r)=>r.docSet.unsuccinctifyGrafts(e.bg),nt:e=>e.nt.nByte(0),items:(e,t,r)=>{if(t.withScopes&&t.withScriptureCV)throw new Error("Cannot specify both withScopes and withScriptureCV");return t.withScriptureCV?r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,t.excludeScopeTypes?{tokens:!0,scopes:!0,grafts:!0,excludeScopeTypes:t.excludeScopeTypes||[],anyScope:t.anyScope||!1,includeContext:t.includeContext||!1}:{}):r.docSet.unsuccinctifyPrunedItems(e,{tokens:!0,scopes:!0,grafts:!0,excludeScopeTypes:t.excludeScopeTypes||[],requiredScopes:t.withScopes||[],anyScope:t.anyScope||!1})},tokens:(e,t,r)=>{if(Object.keys(t).filter(u=>u.includes("Chars")).length>1)throw new Error('Only one of "withChars", "withAnyCaseChars" and "withCharsMatchingRegex" may be specified');let n;return t.withScriptureCV?n=r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,{tokens:!0},t.includeContext||!1):n=r.docSet.unsuccinctifyPrunedItems(e,{tokens:!0,scopes:!0,requiredScopes:t.withScopes||[],anyScope:t.anyScope||!1}),t.withSubTypes&&(n=n.filter(u=>t.withSubTypes.includes(u[1]))),t.withChars?n=n.filter(u=>t.withChars.includes(u[2])):t.withMatchingChars&&(n=n.filter(u=>{for(const s of t.withMatchingChars)if(Z.test(u,Z(s)))return!0;return!1})),n.filter(u=>u[0]==="token")},text:(e,t,r)=>{let u=(t.withScriptureCV?r.docSet.unsuccinctifyItemsWithScriptureCV(e,t.withScriptureCV,{tokens:!0},!1):r.docSet.unsuccinctifyItems(e.c,{tokens:!0},null)).map(s=>s[2]).join("").trim();return t.normalizeSpace&&(u=u.replace(/[ \t\n\r]+/g," ")),u},itemGroups:(e,t,r)=>{if(t.byScopes&&t.byMilestones)throw new Error("Cannot specify both byScopes and byMilestones");if(!t.byScopes&&!t.byMilestones)throw new Error("Must specify either byScopes or byMilestones");return t.byScopes?r.docSet.sequenceItemsByScopes([e],t.byScopes):r.docSet.sequenceItemsByMilestones([e],t.byMilestones)},dump:(e,t,r)=>jz(r.docSet.unsuccinctifyBlock(e,{},null)),scopeLabels:(e,t,r)=>[...r.docSet.unsuccinctifyBlockScopeLabelsSet(e)].filter(n=>!t.startsWith||xK(t.startsWith,n))},j7=(e,t,r)=>{let n=[t.map(u=>[ye.enums.enumStringIndex(e.enums.wordLike,u)])];return r?n=n[0]:n=n.map(u=>u.reduce((s,o)=>s.concat(o))),n},M7=(e,t,r)=>{let n=[t.map(u=>ye.enums.enumRegexIndexTuples(e.enums.wordLike,u).map(s=>s[0]))];return r?n=n[0]:n=n.map(u=>u.reduce((s,o)=>s.concat(o))),n},L7=(e,t,r)=>{if(r&&t.filter(n=>n.length===0).length>0||(t=t.filter(n=>n.length>0),t.length===0))return!1;for(const n of t){let u=!1;for(const s of n)if(s>=0&&e.tokensPresent.get(s)>0){u=!0;break}if(r&&!u)return!1;if(!r&&u)return!0}return r},eh=(e,t,r,n)=>{let u=j7(e,r,n);return L7(t,u,n)},th=(e,t,r,n)=>{let u=M7(e,r,n);return L7(t,u,n)},MK={tokens:!1,scopes:!0,grafts:!1,requiredScopes:[]},LK=(e,t,r,n,u)=>{let s=new Set([]);for(const o of e.unsuccinctifyPrunedItems(t,MK,!1)){const[a,i,c,l,p,d]=o[2].split("/");for(const[f,h]of r.entries()){for(const y of h)if(i===y.attType&&c===y.tagName&&l===y.attKey&&parseInt(p)===y.valueN&&n[f].includes(d)){if(!u)return!0;s.add(f);break}if(s.size===r.length)return!0}}return!1},UK=` """A contiguous flow of content""" type Sequence { """The id of the sequence""" @@ -846,8 +846,8 @@ type Sequence { allChars: Boolean ): Boolean! } -`,tK={nBlocks:e=>e.blocks.length,blocks:(e,t,r)=>{if(r.docSet.maybeBuildEnumIndexes(),t.withScopes&&t.withScriptureCV)throw new Error("Cannot specify both withScopes and withScriptureCV");if(t.attSpecs&&!t.attValues)throw new Error("Cannot specify attSpecs without attValues");if(!t.attSpecs&&t.attValues)throw new Error("Cannot specify attValues without attSpecs");if(t.attSpecs&&t.attValues&&t.attSpecs.length!==t.attValues.length)throw new Error("attSpecs and attValues must be same length");if(t.withChars&&t.withMatchingChars)throw new Error("Cannot specify both withChars and withMatchingChars");let n=e.blocks;if(t.positions&&(n=Array.from(n.entries()).filter(u=>t.positions.includes(u[0])).map(u=>u[1])),t.withScopes&&(n=n.filter(u=>r.docSet.allScopesInBlock(u,t.withScopes))),t.withScriptureCV&&(n=r.docSet.blocksWithScriptureCV(n,t.withScriptureCV)),t.attSpecs&&(n=n.filter(u=>Qz(r.docSet,u,t.attSpecs,t.attValues,t.allAtts||!1))),t.withBlockScope&&(n=n.filter(u=>r.docSet.blockHasBlockScope(u,t.withBlockScope))),t.withChars){if(e.type==="main"&&!V2(r.docSet,e,t.withChars,t.allChars))return[];let u=f7(r.docSet,t.withChars,t.allChars);for(const s of u)n=n.filter(o=>r.docSet.blockHasChars(o,s))}if(t.withMatchingChars){if(e.type==="main"&&!H2(r.docSet,e,t.withMatchingChars,t.allChars))return[];let u=d7(r.docSet,t.withMatchingChars,t.allChars);for(const s of u)n=n.filter(o=>r.docSet.blockHasChars(o,s))}return n},blocksItems:(e,t,r)=>e.blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{},null)),blocksTokens:(e,t,r)=>e.blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null)),blocksText:(e,t,r)=>e.blocks.map(n=>{let u=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(s=>s[2]).join("");return t.normalizeSpace&&(u=u.replace(/[ \t\n\r]+/g," ")),u}),text:(e,t,r)=>{let n=e.blocks.map(u=>r.docSet.unsuccinctifyItems(u.c,{tokens:!0},null).map(s=>s[2]).join("")).join(` -`);return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n},itemGroups:(e,t,r)=>{if(t.byScopes&&t.byMilestones)throw new Error("Cannot specify both byScopes and byMilestones");if(!t.byScopes&&!t.byMilestones)throw new Error("Must specify either byScopes or byMilestones");return t.byScopes?r.docSet.sequenceItemsByScopes(e.blocks,t.byScopes):r.docSet.sequenceItemsByMilestones(e.blocks,t.byMilestones)},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),wordLikes:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);if(t.coerceCase&&!["toLower","toUpper","none"].includes(t.coerceCase))throw new Error(`coerceCase, when present, must be 'toLower', 'toUpper' or 'none', not '${t.coerceCase}'`);r.docSet.maybeBuildEnumIndexes();let n=new Set,u=0;for(const s of e.tokensPresent){if(s){const o=r.docSet.enumIndexes.wordLike[u];let a=r.docSet.enums.wordLike.countedString(o);t.coerceCase==="toLower"&&(a=a.toLowerCase()),t.coerceCase==="toUpper"&&(a=a.toUpperCase()),n.add(a)}u++}return Array.from(n).sort()},hasChars:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);return V2(r.docSet,e,t.chars,t.allChars||!1)},hasMatchingChars:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);return H2(r.docSet,e,t.chars,t.allChars)}},h7=(e,t)=>{let r=e;for(const n of t)n[0]==="scope"&&(n[1]==="start"?r.filter(s=>s===n[2]).length===0&&r.push(n[2]):r=r.filter(u=>u!==n[2]));return r},rK=(e,t,r,n,u)=>{const s=e.chapterIndex(n);if(s){const o=r.blocks[s.startBlock];return[[h7(t.docSet.unsuccinctifyScopes(o.os).map(a=>a[2]),t.docSet.unsuccinctifyItems(o.c,{},0,[]).slice(0,s.startItem+1).filter(a=>a[0]==="scope")),t.docSet.itemsByIndex(r,s,u||!1).reduce((a,i)=>a.concat([["token","lineSpace"," "]].concat(i)))]]}else return[]},nK=(e,t,r,n,u,s,o,a)=>{let i=t.docSet,c=e.headers.bookCode,l=u.map(E=>[parseInt(n),parseInt(E)]);if(o){const E=e.processor.docSets[a];if(E&&(i=E),"forward"in r.verseMapping&&n in r.verseMapping.forward){let m=[];for(const F of u)m.push(Ae.versification.mapVerse(r.verseMapping.forward[n],e.headers.bookCode,n,F));const y=m[0];c=y[0],l=y[1]}const A=i.documentWithBook(c);if(A){const m=A.sequences[A.mainId];if(m.verseMapping&&"reversed"in m.verseMapping){const y=[];for(const[F,B]of l)`${F}`in m.verseMapping.reversed?y.push(Ae.versification.mapVerse(m.verseMapping.reversed[`${F}`],c,F,B)):y.push([c,[[F,B]]]),c=y[0][0],l=y.map(P=>P[1]).reduce((P,$)=>P.concat($))}}}const p={},f=i.documentWithBook(c);if(!f)return[];const d=f.sequences[f.mainId];for(const E of l.map(A=>A[0]))E in p||(p[E]=f.chapterVerseIndex(E));const h=[];for(const[E,A]of l)if(p[E]){let m=[],y,F;if(p[E][A]){for(const P of p[E][A])y||(y=P.startBlock,F=P.startItem),m=m.concat(i.itemsByIndex(d,P,s||null).reduce(($,I)=>$.concat([["token","lineSpace"," "]].concat(I))));const B=d.blocks[y];h.push([h7(i.unsuccinctifyScopes(B.os).map(P=>P[2]),i.unsuccinctifyItems(B.c,{},0,[]).slice(0,F+1).filter(P=>P[0]==="scope")),m])}}return h},m7=(e,t)=>t.length===0?!1:e.includes(`chapter/${t[0][0]}`)&&(!t[0][1]||e.filter(r=>r.startsWith("verse/")&&parseInt(r.split("/")[1])>=t[0][1]).length>0)&&(!t[0][2]||e.filter(r=>r.startsWith("verse/")&&parseInt(r.split("/")[1])<=t[0][2]).length>0)?!0:m7(e,t.slice(1)),zc=(e,t,r,n,u,s)=>{const[o,a]=n.split(":").map(f=>parseInt(f)),[i,c]=u.split(":").map(f=>parseInt(f));if(im7(f[0],l))},uK=(e,t,r,n,u,s)=>{if(t.chapter&&!t.verses)return rK(e,r,n,t.chapter,t.includeContext);if(t.verses)return nK(e,r,n,t.chapter,t.verses,t.includeContext,u,s);throw new Error("Unexpected args to do_cv_separate_args")},sK=(e,t,r,n)=>{if(ne.test(t.chapterVerses,ne("^[0-9]+:[0-9]+-[0-9]+:[0-9]+$"))){const[u,s]=t.chapterVerses.split("-");return zc(e,r,n,u,s,t.includeContext)}else if(ne.test(t.chapterVerses,ne("^[0-9]+:[0-9]+-[0-9]+$"))){const[u,s]=t.chapterVerses.split(":"),[o,a]=s.split("-");return zc(e,r,n,`${u}:${o}`,`${u}:${a}`,t.includeContext)}else if(ne.test(t.chapterVerses,ne("^[0-9]+:[0-9]+$"))){const[u,s]=t.chapterVerses.split(":");return zc(e,r,n,`${u}:${s}`,`${u}:${s}`,t.includeContext)}else if(ne.test(t.chapterVerses,ne("^[0-9]+$"))){const u=t.chapterVerses,s=e.chapterVerseIndex(u);if(!s)throw new Error(`No chapter ${u} found`);const o=s.map((a,i)=>[i,a]).filter(a=>a[1].length>0).map(a=>a[0]);return zc(e,r,n,`${u}:${Math.min(o)}`,`${u}:${Math.max(o)}`,t.includeContext)}else throw new Error(`Could not parse chapterVerses string '${t.chapterVerses}'`)},E1=(e,t,r,n,u)=>{r.docSet=e.processor.docSets[e.docSetId];const s=e.sequences[e.mainId];if(!t.chapter&&!t.chapterVerses)throw new Error("Must specify either chapter or chapterVerses for cv");if(t.chapter&&t.chapterVerses)throw new Error("Must not specify both chapter and chapterVerses for cv");if(t.chapterVerses&&t.verses)throw new Error("Must not specify both chapterVerses and verses for cv");return t.chapter?uK(e,t,r,s,n,u):sK(e,t,r,s)},Wy=(e,t)=>t in e.headers?e.headers[t]:null,oK=` +`,GK={nBlocks:e=>e.blocks.length,blocks:(e,t,r)=>{if(r.docSet.maybeBuildEnumIndexes(),t.withScopes&&t.withScriptureCV)throw new Error("Cannot specify both withScopes and withScriptureCV");if(t.attSpecs&&!t.attValues)throw new Error("Cannot specify attSpecs without attValues");if(!t.attSpecs&&t.attValues)throw new Error("Cannot specify attValues without attSpecs");if(t.attSpecs&&t.attValues&&t.attSpecs.length!==t.attValues.length)throw new Error("attSpecs and attValues must be same length");if(t.withChars&&t.withMatchingChars)throw new Error("Cannot specify both withChars and withMatchingChars");let n=e.blocks;if(t.positions&&(n=Array.from(n.entries()).filter(u=>t.positions.includes(u[0])).map(u=>u[1])),t.withScopes&&(n=n.filter(u=>r.docSet.allScopesInBlock(u,t.withScopes))),t.withScriptureCV&&(n=r.docSet.blocksWithScriptureCV(n,t.withScriptureCV)),t.attSpecs&&(n=n.filter(u=>LK(r.docSet,u,t.attSpecs,t.attValues,t.allAtts||!1))),t.withBlockScope&&(n=n.filter(u=>r.docSet.blockHasBlockScope(u,t.withBlockScope))),t.withChars){if(e.type==="main"&&!eh(r.docSet,e,t.withChars,t.allChars))return[];let u=j7(r.docSet,t.withChars,t.allChars);for(const s of u)n=n.filter(o=>r.docSet.blockHasChars(o,s))}if(t.withMatchingChars){if(e.type==="main"&&!th(r.docSet,e,t.withMatchingChars,t.allChars))return[];let u=M7(r.docSet,t.withMatchingChars,t.allChars);for(const s of u)n=n.filter(o=>r.docSet.blockHasChars(o,s))}return n},blocksItems:(e,t,r)=>e.blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{},null)),blocksTokens:(e,t,r)=>e.blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null)),blocksText:(e,t,r)=>e.blocks.map(n=>{let u=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(s=>s[2]).join("");return t.normalizeSpace&&(u=u.replace(/[ \t\n\r]+/g," ")),u}),text:(e,t,r)=>{let n=e.blocks.map(u=>r.docSet.unsuccinctifyItems(u.c,{tokens:!0},null).map(s=>s[2]).join("")).join(` +`);return t.normalizeSpace&&(n=n.replace(/[ \t\n\r]+/g," ")),n},itemGroups:(e,t,r)=>{if(t.byScopes&&t.byMilestones)throw new Error("Cannot specify both byScopes and byMilestones");if(!t.byScopes&&!t.byMilestones)throw new Error("Must specify either byScopes or byMilestones");return t.byScopes?r.docSet.sequenceItemsByScopes(e.blocks,t.byScopes):r.docSet.sequenceItemsByMilestones(e.blocks,t.byMilestones)},tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),wordLikes:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);if(t.coerceCase&&!["toLower","toUpper","none"].includes(t.coerceCase))throw new Error(`coerceCase, when present, must be 'toLower', 'toUpper' or 'none', not '${t.coerceCase}'`);r.docSet.maybeBuildEnumIndexes();let n=new Set,u=0;for(const s of e.tokensPresent){if(s){const o=r.docSet.enumIndexes.wordLike[u];let a=r.docSet.enums.wordLike.countedString(o);t.coerceCase==="toLower"&&(a=a.toLowerCase()),t.coerceCase==="toUpper"&&(a=a.toUpperCase()),n.add(a)}u++}return Array.from(n).sort()},hasChars:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);return eh(r.docSet,e,t.chars,t.allChars||!1)},hasMatchingChars:(e,t,r)=>{if(e.type!=="main")throw new Error(`Only available for the main sequence, not ${e.type}`);return th(r.docSet,e,t.chars,t.allChars)}},U7=(e,t)=>{let r=e;for(const n of t)n[0]==="scope"&&(n[1]==="start"?r.filter(s=>s===n[2]).length===0&&r.push(n[2]):r=r.filter(u=>u!==n[2]));return r},VK=(e,t,r,n,u)=>{const s=e.chapterIndex(n);if(s){const o=r.blocks[s.startBlock];return o?[[U7(t.docSet.unsuccinctifyScopes(o.os).map(a=>a[2]),t.docSet.unsuccinctifyItems(o.c,{},0,[]).slice(0,s.startItem+1).filter(a=>a[0]==="scope")),t.docSet.itemsByIndex(r,s,u||!1).reduce((a,i)=>a.concat([["token","lineSpace"," "]].concat(i)))]]:[]}else return[]},HK=(e,t,r,n,u,s,o,a)=>{let i=t.docSet,c=e.headers.bookCode,l=u.map(y=>[parseInt(n),parseInt(y)]);if(o){const y=e.processor.docSets[a];if(y&&(i=y),"forward"in r.verseMapping&&n in r.verseMapping.forward){let m=[];for(const C of u)m.push(ye.versification.mapVerse(r.verseMapping.forward[n],e.headers.bookCode,n,C));const v=m[0];c=v[0],l=v[1]}const A=i.documentWithBook(c);if(A){const m=A.sequences[A.mainId];if(m.verseMapping&&"reversed"in m.verseMapping){const v=[];for(const[C,B]of l)`${C}`in m.verseMapping.reversed?v.push(ye.versification.mapVerse(m.verseMapping.reversed[`${C}`],c,C,B)):v.push([c,[[C,B]]]),c=v[0][0],l=v.map(T=>T[1]).reduce((T,N)=>T.concat(N))}}}const p={},d=i.documentWithBook(c);if(!d)return[];const f=d.sequences[d.mainId];for(const y of l.map(A=>A[0]))y in p||(p[y]=d.chapterVerseIndex(y));const h=[];for(const[y,A]of l)if(p[y]){let m=[],v=0,C=0;if(p[y][A]){for(const T of p[y][A])v||(v=T.startBlock,C=T.startItem),m=m.concat(i.itemsByIndex(f,T,s||null).reduce((N,R)=>N.concat([["token","lineSpace"," "]].concat(R))));const B=f.blocks[v];h.push(B?[U7(i.unsuccinctifyScopes(B.os).map(T=>T[2]),i.unsuccinctifyItems(B.c,{},0,[]).slice(0,C+1).filter(T=>T[0]==="scope")),m]:[])}}return h},G7=(e,t)=>t.length===0?!1:e.includes(`chapter/${t[0][0]}`)&&(!t[0][1]||e.filter(r=>r.startsWith("verse/")&&parseInt(r.split("/")[1])>=t[0][1]).length>0)&&(!t[0][2]||e.filter(r=>r.startsWith("verse/")&&parseInt(r.split("/")[1])<=t[0][2]).length>0)?!0:G7(e,t.slice(1)),Qc=(e,t,r,n,u,s)=>{const[o,a]=n.split(":").map(d=>parseInt(d)),[i,c]=u.split(":").map(d=>parseInt(d));if(iG7(d[0],l))},WK=(e,t,r,n,u,s)=>{if(t.chapter&&!t.verses)return VK(e,r,n,t.chapter,t.includeContext);if(t.verses)return HK(e,r,n,t.chapter,t.verses,t.includeContext,u,s);throw new Error("Unexpected args to do_cv_separate_args")},JK=(e,t,r,n)=>{if(Z.test(t.chapterVerses,Z("^[0-9]+:[0-9]+-[0-9]+:[0-9]+$"))){const[u,s]=t.chapterVerses.split("-");return Qc(e,r,n,u,s,t.includeContext)}else if(Z.test(t.chapterVerses,Z("^[0-9]+:[0-9]+-[0-9]+$"))){const[u,s]=t.chapterVerses.split(":"),[o,a]=s.split("-");return Qc(e,r,n,`${u}:${o}`,`${u}:${a}`,t.includeContext)}else if(Z.test(t.chapterVerses,Z("^[0-9]+:[0-9]+$"))){const[u,s]=t.chapterVerses.split(":");return Qc(e,r,n,`${u}:${s}`,`${u}:${s}`,t.includeContext)}else if(Z.test(t.chapterVerses,Z("^[0-9]+$"))){const u=t.chapterVerses,s=e.chapterVerseIndex(u);if(!s)throw new Error(`No chapter ${u} found`);const o=s.map((a,i)=>[i,a]).filter(a=>a[1].length>0).map(a=>a[0]);return Qc(e,r,n,`${u}:${Math.min(o)}`,`${u}:${Math.max(o)}`,t.includeContext)}else throw new Error(`Could not parse chapterVerses string '${t.chapterVerses}'`)},_f=(e,t,r,n,u)=>{r.docSet=e.processor.docSets[e.docSetId];const s=e.sequences[e.mainId];if(!t.chapter&&!t.chapterVerses)throw new Error("Must specify either chapter or chapterVerses for cv");if(t.chapter&&t.chapterVerses)throw new Error("Must not specify both chapter and chapterVerses for cv");if(t.chapterVerses&&t.verses)throw new Error("Must not specify both chapterVerses and verses for cv");return t.chapter?WK(e,t,r,s,n,u):JK(e,t,r,s)},pg=(e,t)=>t in e.headers?e.headers[t]:null,zK=` """A document, typically corresponding to USFM for one book""" type Document { """The id of the document""" @@ -1038,8 +1038,8 @@ type Document { chapter: Int ): String! } -`,aK={idParts:e=>{const t=Wy(e,"id");if(!t)return[null,null];const r=ne.exec(t,/^(P\d\d)\s+([A-Z0-6]{3})\s+(\S+)\s+-\s+(.*)/);if(r)return["periph",r.slice(1)];const n=ne.exec(t,/^([A-Z0-6]{3})\s+(.*)/);return n?["book",n.slice(1)]:[null,[t]]},headers:e=>Object.entries(e.headers),header:(e,t)=>Wy(e,t.id),mainSequence:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId]),nSequences:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],Object.keys(e.sequences).length),sequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.types&&(n=n.filter(u=>t.types.includes(u.type))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},tableSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="table"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},treeSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="tree"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},kvSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="kv"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},textSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type!=="tree"&&u.type!=="table"&&u.type!=="kv"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},sequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>t.id.includes(u.id)),n[0]||null},tableSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="table")throw new Error(`Expected sequence id ${n[0].id} to be of type 'table', not '${n[0].type}'`);return n[0]||null},treeSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="tree")throw new Error(`Expected sequence id ${n[0].id} to be of type 'tree', not '${n[0].type}'`);return n[0]||null},kvSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="vk")throw new Error(`Expected sequence id ${n[0].id} to be of type 'kv', not '${n[0].type}'`);return n[0]||null},mainBlocks:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks),mainBlocksItems:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{},null))),mainBlocksTokens:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null))),mainBlocksText:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>{let s=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(o=>o[2]).join("").trim();return t.normalizeSpace&&(s=s.replace(/[ \t\n\r]+/g," ")),s})),mainText:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>{let s=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(o=>o[2]).join("").trim();return t.normalizeSpace&&(s=s.replace(/[ \t\n\r]+/g," ")),s}).join(` -`)),tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),cv:(e,t,r)=>E1(e,t,r,!1),mappedCv:(e,t,r)=>{if(t.verses.length!==1)throw new Error(`mappedCv expects exactly one verse, not ${t.verses.length}`);return E1(e,t,r,!0,t.mappedDocSetId)},mappedCvs:(e,t,r)=>{const u=e.chapterVerseIndex(t.chapter).filter(o=>o.length>0).map(o=>o[0].verses);let s=[];for(const o of u)s.push(E1(e,{...t,verses:[o]},r,!0,t.mappedDocSetId).map(a=>[[`fromChapter/${t.chapter}`,`fromVerse/${o}`,...a[0]],a[1]]));return s},cvNavigation:(e,t)=>[t.chapter,t.verse,e.chapterVerseIndex((parseInt(t.chapter)-1).toString()),e.chapterVerseIndex(t.chapter),e.chapterVerseIndex((parseInt(t.chapter)+1).toString())],cvIndexes:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,Object.entries(e.chapterVerseIndexes())),cvIndex:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,[t.chapter,e.chapterVerseIndex(t.chapter)||[]]),cIndexes:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,Object.entries(e.chapterIndexes())),cIndex:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId],r.doc=e;const n=e.chapterIndex(t.chapter);return[t.chapter,n||{}]},cvMatching:(e,t,r)=>{if(!t.withChars&&!t.withMatchingChars&&!t.withScopes)throw new Error("Must specify at least one of withChars or withMatchingChars or withScopes");if(t.withChars&&t.withMatchingChars)throw new Error("Must not specify both withChars and withMatchingChars");r.docSet=e.processor.docSets[e.docSetId];let n;t.withChars&&t.allChars?n=t.withChars.map(i=>ne(`^${i}$`)):t.withChars?n=[ne.union(t.withChars.map(i=>ne(`^${i}$`,"i")))]:t.withMatchingChars&&t.allChars?n=t.withMatchingChars.map(i=>ne(i,"i")):t.withMatchingChars&&(n=[ne.union(t.withMatchingChars.map(i=>ne(i,"i")))]);const u=i=>{for(const c of t.withScopes||[])if(!i.includes(c))return!1;return!0},s=i=>{const c=t.withScopes||[];for(const l of c)if(i.includes(l))return!0;return c.length===0},o=i=>{for(const c of n||[]){let l=!1;for(const p of i)if(ne.test(p[2],c)){l=!0;break}if(!l)return!1}return!0};return r.docSet.sequenceItemsByScopes(e.sequences[e.mainId].blocks,["chapter/","verses/"]).filter(i=>(t.allScopes?u:s)(i[1].filter(c=>c[0]==="scope"&&c[1]==="start").map(c=>c[2]))&&o(i[1]))},perf:(e,t)=>e.perf(t.indent),usfm:e=>e.usfm(),sofria:(e,t)=>e.sofria(t.indent,t.chapter)},iK=(e,t)=>{const r=e.headers.bookCode||"GEN",n=t.headers.bookCode||"GEN",u=Ae.canons.ptBooks[r]?Ae.canons.ptBooks[r].position:999,s=Ae.canons.ptBooks[n]?Ae.canons.ptBooks[n].position:999;return u-s},cK=(e,t)=>{const r=e.headers.bookCode||"GEN",n=t.headers.bookCode||"GEN";return r.localeCompare(n)},lK=(e,t)=>{const r=[1,2,3,4,5,6];let n=e.headers.bookCode||"GEN";r.includes(n[0])&&(n=n.substring(1)+n[0]);let u=t.headers.bookCode||"GEN";return r.includes(u[0])&&(u=u.substring(1)+u[0]),n.localeCompare(u)},us={paratext:iK,alpha:cK,alpha2:lK},pK=` +`,KK={idParts:e=>{const t=pg(e,"id");if(!t)return[null,null];const r=Z.exec(t,/^(P\d\d)\s+([A-Z0-6]{3})\s+(\S+)\s+-\s+(.*)/);if(r)return["periph",r.slice(1)];const n=Z.exec(t,/^([A-Z0-6]{3})\s+(.*)/);return n?["book",n.slice(1)]:[null,[t]]},headers:e=>Object.entries(e.headers),header:(e,t)=>pg(e,t.id),mainSequence:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId]),nSequences:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],Object.keys(e.sequences).length),sequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.types&&(n=n.filter(u=>t.types.includes(u.type))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},tableSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="table"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},treeSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="tree"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},kvSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type==="kv"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},textSequences:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>u.type!=="tree"&&u.type!=="table"&&u.type!=="kv"),t.ids&&(n=n.filter(u=>t.ids.includes(u.id))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},sequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);return n=n.filter(u=>t.id.includes(u.id)),n[0]||null},tableSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="table")throw new Error(`Expected sequence id ${n[0].id} to be of type 'table', not '${n[0].type}'`);return n[0]||null},treeSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="tree")throw new Error(`Expected sequence id ${n[0].id} to be of type 'tree', not '${n[0].type}'`);return n[0]||null},kvSequence:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId];let n=Object.values(e.sequences);if(n=n.filter(u=>t.id.includes(u.id)),n[0]&&n[0].type!=="vk")throw new Error(`Expected sequence id ${n[0].id} to be of type 'kv', not '${n[0].type}'`);return n[0]||null},mainBlocks:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks),mainBlocksItems:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{},null))),mainBlocksTokens:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null))),mainBlocksText:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>{let s=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(o=>o[2]).join("").trim();return t.normalizeSpace&&(s=s.replace(/[ \t\n\r]+/g," ")),s})),mainText:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],e.sequences[e.mainId].blocks.map(n=>{let s=r.docSet.unsuccinctifyItems(n.c,{tokens:!0},null).map(o=>o[2]).join("").trim();return t.normalizeSpace&&(s=s.replace(/[ \t\n\r]+/g," ")),s}).join(` +`)),tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),cv:(e,t,r)=>_f(e,t,r,!1),mappedCv:(e,t,r)=>{if(t.verses.length!==1)throw new Error(`mappedCv expects exactly one verse, not ${t.verses.length}`);return _f(e,t,r,!0,t.mappedDocSetId)},mappedCvs:(e,t,r)=>{const u=e.chapterVerseIndex(t.chapter).filter(o=>o.length>0).map(o=>o[0].verses);let s=[];for(const o of u)s.push(_f(e,{...t,verses:[o]},r,!0,t.mappedDocSetId).map(a=>[[`fromChapter/${t.chapter}`,`fromVerse/${o}`,...a[0]],a[1]]));return s},cvNavigation:(e,t)=>[t.chapter,t.verse,e.chapterVerseIndex((parseInt(t.chapter)-1).toString()),e.chapterVerseIndex(t.chapter),e.chapterVerseIndex((parseInt(t.chapter)+1).toString())],cvIndexes:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,Object.entries(e.chapterVerseIndexes())),cvIndex:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,[t.chapter,e.chapterVerseIndex(t.chapter)||[]]),cIndexes:(e,t,r)=>(r.docSet=e.processor.docSets[e.docSetId],r.doc=e,Object.entries(e.chapterIndexes())),cIndex:(e,t,r)=>{r.docSet=e.processor.docSets[e.docSetId],r.doc=e;const n=e.chapterIndex(t.chapter);return[t.chapter,n||{}]},cvMatching:(e,t,r)=>{if(!t.withChars&&!t.withMatchingChars&&!t.withScopes)throw new Error("Must specify at least one of withChars or withMatchingChars or withScopes");if(t.withChars&&t.withMatchingChars)throw new Error("Must not specify both withChars and withMatchingChars");r.docSet=e.processor.docSets[e.docSetId];let n;t.withChars&&t.allChars?n=t.withChars.map(i=>Z(`^${i}$`)):t.withChars?n=[Z.union(t.withChars.map(i=>Z(`^${i}$`,"i")))]:t.withMatchingChars&&t.allChars?n=t.withMatchingChars.map(i=>Z(i,"i")):t.withMatchingChars&&(n=[Z.union(t.withMatchingChars.map(i=>Z(i,"i")))]);const u=i=>{for(const c of t.withScopes||[])if(!i.includes(c))return!1;return!0},s=i=>{const c=t.withScopes||[];for(const l of c)if(i.includes(l))return!0;return c.length===0},o=i=>{for(const c of n||[]){let l=!1;for(const p of i)if(Z.test(p[2],c)){l=!0;break}if(!l)return!1}return!0};return r.docSet.sequenceItemsByScopes(e.sequences[e.mainId].blocks,["chapter/","verses/"]).filter(i=>(t.allScopes?u:s)(i[1].filter(c=>c[0]==="scope"&&c[1]==="start").map(c=>c[2]))&&o(i[1]))},perf:(e,t)=>e.perf(t.indent),usfm:e=>e.usfm(),sofria:(e,t)=>e.sofria(t.indent,t.chapter)},XK=(e,t)=>{const r=e.headers.bookCode||"GEN",n=t.headers.bookCode||"GEN",u=ye.canons.ptBooks[r]?ye.canons.ptBooks[r].position:999,s=ye.canons.ptBooks[n]?ye.canons.ptBooks[n].position:999;return u-s},YK=(e,t)=>{const r=e.headers.bookCode||"GEN",n=t.headers.bookCode||"GEN";return r.localeCompare(n)},ZK=(e,t)=>{const r=[1,2,3,4,5,6];let n=e.headers.bookCode||"GEN";r.includes(n[0])&&(n=n.substring(1)+n[0]);let u=t.headers.bookCode||"GEN";return r.includes(u[0])&&(u=u.substring(1)+u[0]),n.localeCompare(u)},ns={paratext:XK,alpha:YK,alpha2:ZK},QK=` """A collection of documents that share the same set of selector values""" type DocSet { """The id of the docSet, which is formed by concatenating the docSet's selector values""" @@ -1080,7 +1080,7 @@ type DocSet { withTags: [String!] """Only return documents with none of the specified tags""" withoutTags: [String!] - """Sort returned documents by the designated method (currently ${Object.keys(us).join(", ")})\`""" + """Sort returned documents by the designated method (currently ${Object.keys(ns).join(", ")})\`""" sortedBy: String ): [Document!]! """The number of documents in the docSet""" @@ -1116,7 +1116,7 @@ type DocSet { """A string containing the unique characters in the docSet""" uniqueCharsString: String! } -`,fK={selectors:e=>Object.entries(e.selectors),selector:(e,t)=>e.selectors[t.id],tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),documents:(e,t,r)=>{const n=(s,o)=>{for(const a of o||[])if(!(a.key in s)||s[a.key]!==a.value)return!1;return!0};if(t.withChars&&t.withMatchingChars)throw new Error("Cannot specify both withChars and withMatchingChars");r.docSet=e;let u=e.documents();if(t.ids&&(u=u.filter(s=>t.ids.includes(s.id))),t.withChars&&(u=u.filter(s=>V2(e,s.sequences[s.mainId],t.withChars,t.allChars))),t.withMatchingChars&&(u=u.filter(s=>H2(e,s.sequences[s.mainId],t.withMatchingChars,t.allChars))),t.withScopes){const s=o=>new Set(o.sequences[o.mainId].blocks.map(a=>r.docSet.unsuccinctifyBlockScopeLabelsSet(a)).map(a=>Array.from(a)).reduce((a,i)=>a.concat(i)));u=u.filter(o=>{const a=s(o),i=t.allScopes?t.withScopes.length:1;return t.withScopes.filter(c=>a.has(c)).length>=i})}if(t.withHeaderValues&&(u=u.filter(s=>n(s.headers,t.withHeaderValues))),t.withTags&&(u=u.filter(s=>t.withTags.filter(o=>s.tags.has(o)).length===t.withTags.length)),t.withoutTags&&(u=u.filter(s=>t.withoutTags.filter(o=>s.tags.has(o)).length===0)),t.sortedBy){if(!(t.sortedBy in us))throw new Error(`sortedBy value must be one of [${Object.keys(us)}], not ${t.sortedBy}`);u.sort(us[t.sortedBy])}return u},nDocuments:(e,t,r)=>(r.docSet=e,e.documents().length),document:(e,t)=>e.documentWithBook(t.bookCode),hasMapping:e=>e.tags.has("hasMapping"),enumIndexForString:(e,t)=>Ae.enums.enumStringIndex(e.enums[t.enumType],t.searchString),enumRegexIndexesForString:(e,t)=>Ae.enums.enumRegexIndexTuples(e.enums[t.enumType],t.searchRegex),wordLikes:(e,t)=>{if(t.coerceCase&&!["toLower","toUpper","none"].includes(t.coerceCase))throw new Error(`coerceCase, when present, must be 'toLower', 'toUpper' or 'none', not '${t.coerceCase}'`);let r=Ae.succinct.unpackEnum(e.enums.wordLike);return t.coerceCase==="toLower"&&(r=r.map(n=>n.toLowerCase())),t.coerceCase==="toUpper"&&(r=r.map(n=>n.toUpperCase())),Array.from(new Set(r))},uniqueChars:e=>{const t=new Set([]);for(const r of[...Ae.succinct.unpackEnum(e.enums.wordLike),...Ae.succinct.unpackEnum(e.enums.notWordLike)])for(const n of r.split(""))t.add(n);return Array.from(t).sort()},uniqueCharsString:e=>{const t=new Set([]);for(const r of[...Ae.succinct.unpackEnum(e.enums.wordLike),...Ae.succinct.unpackEnum(e.enums.notWordLike)])for(const n of r.split(""))t.add(n);return Array.from(t).sort().join("")}},dK=`# Versification "English" +`,eX={selectors:e=>Object.entries(e.selectors),selector:(e,t)=>e.selectors[t.id],tags:e=>Array.from(e.tags),tagsKv:e=>Array.from(e.tags).map(t=>t.includes(":")?[t.substring(0,t.indexOf(":")),t.substring(t.indexOf(":")+1)]:[t,""]),hasTag:(e,t)=>e.tags.has(t.tagName),documents:(e,t,r)=>{const n=(s,o)=>{for(const a of o||[])if(!(a.key in s)||s[a.key]!==a.value)return!1;return!0};if(t.withChars&&t.withMatchingChars)throw new Error("Cannot specify both withChars and withMatchingChars");r.docSet=e;let u=e.documents();if(t.ids&&(u=u.filter(s=>t.ids.includes(s.id))),t.withChars&&(u=u.filter(s=>eh(e,s.sequences[s.mainId],t.withChars,t.allChars))),t.withMatchingChars&&(u=u.filter(s=>th(e,s.sequences[s.mainId],t.withMatchingChars,t.allChars))),t.withScopes){const s=o=>new Set(o.sequences[o.mainId].blocks.map(a=>r.docSet.unsuccinctifyBlockScopeLabelsSet(a)).map(a=>Array.from(a)).reduce((a,i)=>a.concat(i)));u=u.filter(o=>{const a=s(o),i=t.allScopes?t.withScopes.length:1;return t.withScopes.filter(c=>a.has(c)).length>=i})}if(t.withHeaderValues&&(u=u.filter(s=>n(s.headers,t.withHeaderValues))),t.withTags&&(u=u.filter(s=>t.withTags.filter(o=>s.tags.has(o)).length===t.withTags.length)),t.withoutTags&&(u=u.filter(s=>t.withoutTags.filter(o=>s.tags.has(o)).length===0)),t.sortedBy){if(!(t.sortedBy in ns))throw new Error(`sortedBy value must be one of [${Object.keys(ns)}], not ${t.sortedBy}`);u.sort(ns[t.sortedBy])}return u},nDocuments:(e,t,r)=>(r.docSet=e,e.documents().length),document:(e,t)=>e.documentWithBook(t.bookCode),hasMapping:e=>e.tags.has("hasMapping"),enumIndexForString:(e,t)=>ye.enums.enumStringIndex(e.enums[t.enumType],t.searchString),enumRegexIndexesForString:(e,t)=>ye.enums.enumRegexIndexTuples(e.enums[t.enumType],t.searchRegex),wordLikes:(e,t)=>{if(t.coerceCase&&!["toLower","toUpper","none"].includes(t.coerceCase))throw new Error(`coerceCase, when present, must be 'toLower', 'toUpper' or 'none', not '${t.coerceCase}'`);let r=ye.succinct.unpackEnum(e.enums.wordLike);return t.coerceCase==="toLower"&&(r=r.map(n=>n.toLowerCase())),t.coerceCase==="toUpper"&&(r=r.map(n=>n.toUpperCase())),Array.from(new Set(r))},uniqueChars:e=>{const t=new Set([]);for(const r of[...ye.succinct.unpackEnum(e.enums.wordLike),...ye.succinct.unpackEnum(e.enums.notWordLike)])for(const n of r.split(""))t.add(n);return Array.from(t).sort()},uniqueCharsString:e=>{const t=new Set([]);for(const r of[...ye.succinct.unpackEnum(e.enums.wordLike),...ye.succinct.unpackEnum(e.enums.notWordLike)])for(const n of r.split(""))t.add(n);return Array.from(t).sort().join("")}},tX=`# Versification "English" # Version=2.0 # # modifications by Reinier de Blois 13/March/2012 @@ -1568,7 +1568,7 @@ S3Y 1:34-35 = DAG 3:56-57 S3Y 1:37 = DAG 3:58 S3Y 1:36 = DAG 3:59 S3Y 1:38-68 = DAG 3:60-90 -`,DK=`# Versification "Septuagint" +`,rX=`# Versification "Septuagint" # Version=1.7 # # modifications by Studge 26/ June/ 2009 @@ -2517,7 +2517,7 @@ EZR 23:1-31 = NEH 13:1-31 #! *ESG 8:12,-,a,b,c,d,e,f,g,h,i,k,l,m,n,o,p,q,r,s,t,u,x #! *ESG 10:3,-,a,b,c,d,e,f,g,h,i,k,l #! *SIR 1:1,-,a,b,c,d,e,f,g,h -`,hK=`# Versification "Original" +`,nX=`# Versification "Original" # Version=1.200 # (not a very good name but I have not heard a better suggestion) # @@ -2671,7 +2671,7 @@ S3Y 1:34-35 = DAG 3:56-57 S3Y 1:37 = DAG 3:58 S3Y 1:36 = DAG 3:59 S3Y 1:38-68 = DAG 3:60-90 -`,mK=`# Versification "Russian Protestant" +`,uX=`# Versification "Russian Protestant" # Version=1.4 # # This is the versification used by the "Canonical" (Protestant) edition of the Russian Synodal Bible @@ -3012,7 +3012,7 @@ ROM 14:24-26 = ROM 16:25-27 # REV 13:1b = REV 13:1 # cant handle split verses yet REV 13:1 = REV 12:18 REV 13:1 = REV 13:1 -`,EK=`# Versification "Russian Orthodox" +`,sX=`# Versification "Russian Orthodox" # Version=1.3 # # This is the versification used by the Orthodox (or "non-canonical") edition of the Russian Synodal Bible @@ -3552,7 +3552,7 @@ ESG 10:11 = ESG 10:3h ESG 10:12 = ESG 10:3i ESG 10:13 = ESG 10:3k ESG 10:14 = ESG 10:3l -`,vK=`# Versification "Vulgate" +`,oX=`# Versification "Vulgate" # Version=1.5 # # modifications by Studge 26/June/2009 @@ -4386,8 +4386,8 @@ DAG 13:1-63 = SUS 1:63 # Bel and the Dragon DAG 14:1-42 = BEL 1:42 #------------------------------------------------------- -`,W2={eng:{raw:dK},lxx:{raw:DK},org:{raw:hK},rsc:{raw:mK},rso:{raw:EK},vul:{raw:vK}},yK=/^([A-Z0-9]{3}) (([0-9]+:[0-9]+) ?)*$/;for(const[e,t]of Object.entries(W2)){t.cv={};const r=t.raw.split(` -`).filter(n=>n.match(yK));if(r)for(const n of r){const u=n.slice(0,3);t.cv[u]={};for(const s of n.substr(4).split(" ")){const[o,a]=s.split(":");t.cv[u][o]=a}}}const gK=` +`,rh={eng:{raw:tX},lxx:{raw:rX},org:{raw:nX},rsc:{raw:uX},rso:{raw:sX},vul:{raw:oX}},aX=/^([A-Z0-9]{3}) (([0-9]+:[0-9]+) ?)*$/;for(const[e,t]of Object.entries(rh)){t.cv={};const r=t.raw.split(` +`).filter(n=>n.match(aX));if(r)for(const n of r){const u=n.slice(0,3);t.cv[u]={};for(const s of n.substr(4).split(" ")){const[o,a]=s.split(":");t.cv[u][o]=a}}}const iX=` """The top level of Proskomma queries""" type Query { """The id of the processor, which is different for each Proskomma instance""" @@ -4432,7 +4432,7 @@ type Query { withTags: [String!] """Only return documents with none of the specified tags""" withoutTags: [String!] - """Sort returned documents by the designated method (currently ${Object.keys(us).join(", ")})""" + """Sort returned documents by the designated method (currently ${Object.keys(ns).join(", ")})""" sortedBy: String ): [Document!]! """The document with the specified id, or the specified docSet and withBook""" @@ -4452,7 +4452,7 @@ type Query { id: String! ) : versification! } -`,AK={id:e=>e.processorId,selectors:e=>e.selectors,docSets:(e,t)=>{const r=(u,s)=>{for(const o of s)if(u.selectors[o.key].toString()!==o.value)return!1;return!0};let n=("withBook"in t?e.docSetsWithBook(t.withBook):Object.values(e.docSets)).filter(u=>!t.ids||t.ids.includes(u.id));return t.withSelectors&&(n=n.filter(u=>r(u,t.withSelectors))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},docSet:(e,t)=>e.docSetById(t.id),documents:(e,t)=>{const r=(u,s)=>{for(const o of s||[])if(!(o.key in u)||u[o.key]!==o.value)return!1;return!0};let n=t.withBook?e.documentsWithBook(t.withBook):e.documentList();if(n=n.filter(u=>!t.ids||t.ids.includes(u.id)),t.withHeaderValues&&(n=n.filter(u=>r(u.headers,t.withHeaderValues))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),t.sortedBy){if(!(t.sortedBy in us))throw new Error(`sortedBy value must be one of [${Object.keys(us).join(", ")}], not ${t.sortedBy}`);n.sort(us[t.sortedBy])}return n},document:(e,t)=>{if(t.id&&!t.docSetId&&!t.withBook)return e.documentById(t.id);if(!t.id&&t.docSetId&&t.withBook)return e.documentsWithBook(t.withBook).filter(r=>r.docSetId===t.docSetId)[0];throw new Error("document requires either id or both docSetId and withBook (but not all three)")},versifications:()=>Object.entries(W2),versification:(e,t)=>Object.entries(W2).filter(r=>r[0]===t.id)[0]},FK=` +`,cX={id:e=>e.processorId,selectors:e=>e.selectors,docSets:(e,t)=>{const r=(u,s)=>{for(const o of s)if(u.selectors[o.key].toString()!==o.value)return!1;return!0};let n=("withBook"in t?e.docSetsWithBook(t.withBook):Object.values(e.docSets)).filter(u=>!t.ids||t.ids.includes(u.id));return t.withSelectors&&(n=n.filter(u=>r(u,t.withSelectors))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),n},docSet:(e,t)=>e.docSetById(t.id),documents:(e,t)=>{const r=(u,s)=>{for(const o of s||[])if(!(o.key in u)||u[o.key]!==o.value)return!1;return!0};let n=t.withBook?e.documentsWithBook(t.withBook):e.documentList();if(n=n.filter(u=>!t.ids||t.ids.includes(u.id)),t.withHeaderValues&&(n=n.filter(u=>r(u.headers,t.withHeaderValues))),t.withTags&&(n=n.filter(u=>t.withTags.filter(s=>u.tags.has(s)).length===t.withTags.length)),t.withoutTags&&(n=n.filter(u=>t.withoutTags.filter(s=>u.tags.has(s)).length===0)),t.sortedBy){if(!(t.sortedBy in ns))throw new Error(`sortedBy value must be one of [${Object.keys(ns).join(", ")}], not ${t.sortedBy}`);n.sort(ns[t.sortedBy])}return n},document:(e,t)=>{if(t.id&&!t.docSetId&&!t.withBook)return e.documentById(t.id);if(!t.id&&t.docSetId&&t.withBook)return e.documentsWithBook(t.withBook).filter(r=>r.docSetId===t.docSetId)[0];throw new Error("document requires either id or both docSetId and withBook (but not all three)")},versifications:()=>Object.entries(rh),versification:(e,t)=>Object.entries(rh).filter(r=>r[0]===t.id)[0]},lX=` """Specification of a selector""" type selectorSpec { """Name (ie the key)""" @@ -4468,7 +4468,7 @@ type selectorSpec { """Enum of permitted string values""" enum: [String!] } -`,CK={regex:e=>e.regex||null,min:e=>e.min||null,max:e=>e.max||null,enum:e=>e.enum||null},bK=` +`,pX={regex:e=>e.regex||null,min:e=>e.min||null,max:e=>e.max||null,enum:e=>e.enum||null},dX=` """Input specification of a selector""" input inputSelectorSpec { """Name (ie the key)""" @@ -4484,7 +4484,7 @@ input inputSelectorSpec { """Enum of permitted string values""" enum: [String!] } -`,J2=(e,t,r,n)=>{const u=r.blocks.length;for(let s=0;s{const u=r.blocks.length;for(let s=0;s{const r={};return t.selectors.forEach(n=>{r[n.key]=n.value}),!!e.importDocument(r,t.contentType,t.content,null,null,null,t.tags||[])},newSequence:(e,t)=>{const r=e.documents[t.documentId],n=r.processor.docSets[r.docSetId];if(!r)throw new Error(`Document '${t.documentId}' not found`);const u=r.newSequence(t.type,t.tags);if(t.blocksSpec&&(J2(n,r,r.sequences[u],t.blocksSpec),r.buildChapterVerseIndex()),t.graftToMain){n.maybeBuildPreEnums();const s=r.sequences[r.mainId].blocks[0].bg,o=n.enumForCategoryValue("graftTypes",t.type,!0),a=n.enumForCategoryValue("ids",u,!0);Ae.succinct.pushSuccinctGraftBytes(s,o,a)}return u},newBlock:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.newBlock(t.sequenceId,t.blockN,t.blockScope)}},_K=` +`,DX={addDocument:(e,t)=>{const r={};return t.selectors.forEach(n=>{r[n.key]=n.value}),!!e.importDocument(r,t.contentType,t.content,null,null,null,t.tags||[])},newSequence:(e,t)=>{const r=e.documents[t.documentId],n=r.processor.docSets[r.docSetId];if(!r)throw new Error(`Document '${t.documentId}' not found`);const u=r.newSequence(t.type,t.tags);if(t.blocksSpec&&(nh(n,r,r.sequences[u],t.blocksSpec),r.buildChapterVerseIndex()),t.graftToMain){n.maybeBuildPreEnums();const s=r.sequences[r.mainId].blocks[0].bg,o=n.enumForCategoryValue("graftTypes",t.type,!0),a=n.enumForCategoryValue("ids",u,!0);ye.succinct.pushSuccinctGraftBytes(s,o,a)}return u},newBlock:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.newBlock(t.sequenceId,t.blockN,t.blockScope)}},hX=` """Deletes a docSet""" deleteDocSet( """The id of the docSet containing the document to be deleted""" @@ -4549,13 +4549,13 @@ input inputSelectorSpec { """The zero-indexed number of the block to be deleted""" blockN: Int! ): Boolean -`,BK={deleteDocSet:(e,t)=>e.deleteDocSet(t.docSetId),deleteDocument:(e,t)=>e.deleteDocument(t.docSetId,t.documentId),deleteSequence:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.deleteSequence(t.sequenceId)},deleteBlock:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.deleteBlock(t.sequenceId,t.blockN)}},TK=` +`,mX={deleteDocSet:(e,t)=>e.deleteDocSet(t.docSetId),deleteDocument:(e,t)=>e.deleteDocument(t.docSetId,t.documentId),deleteSequence:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.deleteSequence(t.sequenceId)},deleteBlock:(e,t)=>{const r=e.documents[t.documentId];if(!r)throw new Error(`Document '${t.documentId}' not found`);return r.deleteBlock(t.sequenceId,t.blockN)}},EX=` """Explicitly rebuild the text lookup tables for a docSet. (You probably don't need to do this)""" rehashDocSet( """The id of the docSet""" docSetId: String! ): Boolean! -`,$K={rehashDocSet:(e,t)=>e.rehashDocSet(t.docSetId)},PK=` +`,yX={rehashDocSet:(e,t)=>e.rehashDocSet(t.docSetId)},vX=` """Add one or more tags to a docSet, if they are not already present""" addDocSetTags( """The id of the docSet to which the tags will be added""" @@ -4610,7 +4610,7 @@ input inputSelectorSpec { """A list of tags to be removed""" tags: [String]! ) : [String!] -`,OK={addDocSetTags:(e,t)=>{const r=e.docSets[t.docSetId];for(const n of t.tags)r.addTag(n);return Array.from(r.tags)},addDocumentTags:(e,t)=>{const n=e.docSets[t.docSetId].processor.documents[t.documentId];for(const u of t.tags)n.addTag(u);return Array.from(n.tags)},addSequenceTags:(e,t)=>{const u=e.docSets[t.docSetId].processor.documents[t.documentId].sequences[t.sequenceId];for(const s of t.tags)Ae.tags.addTag(u.tags,s);return Array.from(u.tags)},removeDocSetTags:(e,t)=>{const r=e.docSets[t.docSetId];for(const n of t.tags)r.removeTag(n);return Array.from(r.tags)},removeDocumentTags:(e,t)=>{const n=e.docSets[t.docSetId].processor.documents[t.documentId];for(const u of t.tags)n.removeTag(u);return Array.from(n.tags)},removeSequenceTags:(e,t)=>{const u=e.docSets[t.docSetId].processor.documents[t.documentId].sequences[t.sequenceId];for(const s of t.tags)Ae.tags.removeTag(u.tags,s);return Array.from(u.tags)}},kK=` +`,gX={addDocSetTags:(e,t)=>{const r=e.docSets[t.docSetId];for(const n of t.tags)r.addTag(n);return Array.from(r.tags)},addDocumentTags:(e,t)=>{const n=e.docSets[t.docSetId].processor.documents[t.documentId];for(const u of t.tags)n.addTag(u);return Array.from(n.tags)},addSequenceTags:(e,t)=>{const u=e.docSets[t.docSetId].processor.documents[t.documentId].sequences[t.sequenceId];for(const s of t.tags)ye.tags.addTag(u.tags,s);return Array.from(u.tags)},removeDocSetTags:(e,t)=>{const r=e.docSets[t.docSetId];for(const n of t.tags)r.removeTag(n);return Array.from(r.tags)},removeDocumentTags:(e,t)=>{const n=e.docSets[t.docSetId].processor.documents[t.documentId];for(const u of t.tags)n.removeTag(u);return Array.from(n.tags)},removeSequenceTags:(e,t)=>{const u=e.docSets[t.docSetId].processor.documents[t.documentId].sequences[t.sequenceId];for(const s of t.tags)ye.tags.removeTag(u.tags,s);return Array.from(u.tags)}},AX=` """Replaces the items of a block with a new set of items""" updateItems( """The id of the docSet containing the document containing the sequence containing the block for which the items will be updated""" @@ -4658,8 +4658,8 @@ input inputSelectorSpec { documentId: String! ) : Boolean! -`,IK={updateItems:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);if(!t.items)throw new Error("Must provide items");return!(!r.updateItems(t.documentId,t.sequenceId,t.blockPosition,t.items)||t.blockGrafts&&!r.updateBlockGrafts(t.documentId,t.sequenceId,t.blockPosition,t.blockGrafts)||t.blockScope&&!r.updateBlockScope(t.documentId,t.sequenceId,t.blockPosition,t.blockScope))},updateAllBlocks:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);const u=n.sequences[t.sequenceId||n.mainId];if(!u)throw new Error(`Sequence '${t.sequenceId||n.mainId}' not found`);return J2(r,n,u,t.blocksSpec),n.buildChapterVerseIndex(),!0},updateSequenceFromPerf:async(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);const u=n.sequences[t.sequenceId||n.mainId];if(!u)throw new Error(`Sequence '${t.sequenceId||n.mainId}' not found`);const s=JSON.parse(t.perf),o={schema:{structure:"flat",structure_version:"0.3.0",constraints:[{name:"perf",version:"0.3.0"}]},metadata:{translation:{},document:{}},sequences:{},main_sequence_id:t.sequenceId};o.sequences[t.sequenceId]=s;let a={};try{const c=await new Fu.PipelineHandler({pipelines:a7,transforms:i7,proskomma:e}).runPipeline("perf2PkJsonPipeline",{perf:o});a=Object.values(c.pkJson)[0]}catch(i){return console.error(`pipelineHandler Error : -`,i),!1}return J2(r,n,u,a),n.buildChapterVerseIndex(),!0},gcSequences:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);return n.gcSequences()?(r.rehash(),!0):!1}},NK=` +`,FX={updateItems:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);if(!t.items)throw new Error("Must provide items");return!(!r.updateItems(t.documentId,t.sequenceId,t.blockPosition,t.items)||t.blockGrafts&&!r.updateBlockGrafts(t.documentId,t.sequenceId,t.blockPosition,t.blockGrafts)||t.blockScope&&!r.updateBlockScope(t.documentId,t.sequenceId,t.blockPosition,t.blockScope))},updateAllBlocks:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);const u=n.sequences[t.sequenceId||n.mainId];if(!u)throw new Error(`Sequence '${t.sequenceId||n.mainId}' not found`);return nh(r,n,u,t.blocksSpec),n.buildChapterVerseIndex(),!0},updateSequenceFromPerf:async(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);const u=n.sequences[t.sequenceId||n.mainId];if(!u)throw new Error(`Sequence '${t.sequenceId||n.mainId}' not found`);const s=JSON.parse(t.perf),o={schema:{structure:"flat",structure_version:"0.3.0",constraints:[{name:"perf",version:"0.3.0"}]},metadata:{translation:{},document:{}},sequences:{},main_sequence_id:t.sequenceId};o.sequences[t.sequenceId]=s;let a={};try{const c=await new vu.PipelineHandler({pipelines:I7,transforms:N7,proskomma:e}).runPipeline("perf2PkJsonPipeline",{perf:o});a=Object.values(c.pkJson)[0]}catch(i){return console.error(`pipelineHandler Error : +`,i),!1}return nh(r,n,u,a),n.buildChapterVerseIndex(),!0},gcSequences:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)throw new Error(`DocSet '${t.docSetId}' not found`);const n=e.documents[t.documentId];if(!n)throw new Error(`Document '${t.documentId}' not found`);return n.gcSequences()?(r.rehash(),!0):!1}},CX=` """Adds verse mapping tables to the documents in a docSet, where the verse mapping may be provided in legacy .vrs or JSON format""" setVerseMapping( """the id of the docSet to which the verse mapping will be added""" @@ -4674,15 +4674,15 @@ input inputSelectorSpec { """The id of the docSet from which verse mapping will be removed""" docSetId: String! ): Boolean! -`,qK={setVerseMapping:(e,t)=>{if(t.vrsSource&&t.jsonSource)throw new Error("Cannot specify both vrsSource and jsonSource");if(!t.vrsSource&&!t.jsonSource)throw new Error("Must specify either vrsSource or jsonSource");const r=e.docSets[t.docSetId];if(!r)return!1;let n;t.vrsSource?n=Ae.versification.vrs2json(t.vrsSource):n=t.jsonSource;const u=Ae.versification.succinctifyVerseMappings(n.mappedVerses),s=Ae.versification.reverseVersification(n),o=Ae.versification.succinctifyVerseMappings(s.reverseMappedVerses);for(const a of r.documents().filter(i=>"bookCode"in i.headers)){const i=a.headers.bookCode,c=r.documentWithBook(i);if(!c)continue;const l=c.sequences[c.mainId];l.verseMapping={},i in u&&(l.verseMapping.forward=u[i]),i in o&&(l.verseMapping.reversed=o[i])}return r.tags.add("hasMapping"),!0},unsetVerseMapping:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)return!1;for(const n of r.documents().filter(u=>"bookCode"in u.headers)){const u=n.headers.bookCode,s=r.documentWithBook(u);if(s){const o=s.sequences[s.mainId];o.verseMapping={}}}return r.tags.delete("hasMapping"),!0}},xK=` +`,bX={setVerseMapping:(e,t)=>{if(t.vrsSource&&t.jsonSource)throw new Error("Cannot specify both vrsSource and jsonSource");if(!t.vrsSource&&!t.jsonSource)throw new Error("Must specify either vrsSource or jsonSource");const r=e.docSets[t.docSetId];if(!r)return!1;let n;t.vrsSource?n=ye.versification.vrs2json(t.vrsSource):n=t.jsonSource;const u=ye.versification.succinctifyVerseMappings(n.mappedVerses),s=ye.versification.reverseVersification(n),o=ye.versification.succinctifyVerseMappings(s.reverseMappedVerses);for(const a of r.documents().filter(i=>"bookCode"in i.headers)){const i=a.headers.bookCode,c=r.documentWithBook(i);if(!c)continue;const l=c.sequences[c.mainId];l.verseMapping={},i in u&&(l.verseMapping.forward=u[i]),i in o&&(l.verseMapping.reversed=o[i])}return r.tags.add("hasMapping"),!0},unsetVerseMapping:(e,t)=>{const r=e.docSets[t.docSetId];if(!r)return!1;for(const n of r.documents().filter(u=>"bookCode"in u.headers)){const u=n.headers.bookCode,s=r.documentWithBook(u);if(s){const o=s.sequences[s.mainId];o.verseMapping={}}}return r.tags.delete("hasMapping"),!0}},SX=` type Mutation { -${SK} -${_K} -${TK} -${PK} -${kK} -${NK} -}`,RK={...wK,...BK,...$K,...OK,...IK,...qK},jK=` +${fX} +${hX} +${EX} +${vX} +${AX} +${CX} +}`,wX={...DX,...mX,...yX,...gX,...FX,...bX},_X=` """Information about a standard versification scheme""" type versification { """id, derived from the Paratext vrs filename""" @@ -4697,7 +4697,7 @@ type versification { bookCode: String! ): cvBook! } -`,MK={id:e=>e[0],vrs:e=>e[1].raw,cvBooks:e=>Object.entries(e[1].cv),cvBook:(e,t)=>Object.entries(e[1].cv).filter(r=>r[0]===t.bookCode)[0]},LK=` +`,BX={id:e=>e[0],vrs:e=>e[1].raw,cvBooks:e=>Object.entries(e[1].cv),cvBook:(e,t)=>Object.entries(e[1].cv).filter(r=>r[0]===t.bookCode)[0]},TX=` """Chapter/verse information for a book""" type cvBook { """The bookCode""" @@ -4705,7 +4705,7 @@ type cvBook { """The chapter records""" chapters: [cvChapter!]! } -`,UK={bookCode:e=>e[0],chapters:e=>Object.entries(e[1])},GK=` +`,$X={bookCode:e=>e[0],chapters:e=>Object.entries(e[1])},PX=` """Information for a chapter""" type cvChapter { """The chapter""" @@ -4713,69 +4713,69 @@ type cvChapter { """The maximum verse number""" maxVerse: Int! } -`,VK={chapter:e=>parseInt(e[0]),maxVerse:e=>parseInt(e[1])},HK=` - ${gK} - ${xK} - ${NJ} - ${xJ} - ${jJ} - ${LJ} - ${UJ} - ${GJ} - ${VJ} - ${HJ} - ${JJ} - ${QJ} - ${tz} - ${nz} - ${sz} - ${oz} - ${az} - ${iz} - ${cz} - ${pz} - ${dz} - ${hz} - ${Ez} - ${yz} - ${Az} +`,kX={chapter:e=>parseInt(e[0]),maxVerse:e=>parseInt(e[1])},OX=` + ${iX} + ${SX} ${Cz} - ${bz} - ${wz} - ${Bz} + ${Sz} + ${_z} + ${Tz} + ${$z} + ${Pz} + ${kz} + ${Oz} + ${Nz} + ${Lz} + ${Gz} + ${Hz} ${Jz} + ${zz} + ${Kz} ${Xz} - ${eK} - ${oK} + ${Yz} + ${Qz} + ${tK} + ${nK} + ${sK} + ${aK} + ${cK} ${pK} - ${FK} - ${bK} - ${jK} - ${LK} - ${GK} - `,WK={Mutation:RK,Query:AK,KeyValue:qJ,cv:RJ,idParts:MJ,Item:zJ,ItemGroup:ez,kvEntry:rz,regexIndex:uz,verseNumber:lz,cell:fz,cIndex:Dz,cvVerseElement:mz,cvVerses:vz,cvIndex:gz,cvNavigation:Fz,node:Sz,kvSequence:_z,tableSequence:Tz,treeSequence:zz,Block:Yz,Sequence:tK,Document:aK,DocSet:fK,selectorSpec:CK,versification:MK,cvBook:UK,cvChapter:VK},Jy=JO({typeDefs:HK,resolvers:WK});class JK{constructor(t){this.processorId=Ae.generateId(),this.documents={},this.docSetsBySelector={},this.docSets={},this.filters={},this.customTags={heading:[],paragraph:[],char:[],word:[],intro:[],introHeading:[]},this.emptyBlocks=[],this.selectors=t||[{name:"lang",type:"string",regex:"[a-z]{3}"},{name:"abbr",type:"string"}],this.validateSelectorSpec(this.selectors),this.mutex=new ZO,this.nextPeriph=0,this.nextTable=0,this.nextNodes=0}validateSelectors(){if(this.selectors.length===0)throw new Error("No selectors found");for(const[t,r]of this.selectors.entries()){if(!("name"in r))throw new Error(`Selector ${t} has no name`);if(!("type"in r))throw new Error(`Selector ${t} has no type`);if(!["string","integer"].includes(r.type))throw new Error(`Type for selector ${t} must be string or number, not ${r.type}`);if(r.type==="string"){if("min"in r)throw new Error("String selector should not include 'min'");if("max"in r)throw new Error("String selector should not include 'max'");if("regex"in r)try{ne(r.regex)}catch(n){throw new Error(`Regex '${r.regex}' is not valid: ${n}`)}if("enum"in r){for(const n of r.enum)if(typeof n!="string")throw new Error(`Enum values for selector ${r.name} should be strings, not '${n}'`)}}else{if("regex"in r)throw new Error("Integer selector should not include 'regex'");if("min"in r&&typeof r.min!="number")throw new Error(`'min' must be a number, not '${r.min}'`);if("max"in r&&typeof r.max!="number")throw new Error(`'max' must be a number, not '${r.max}'`);if("min"in r&&"max"in r&&r.min>r.max)throw new Error(`'min' cannot be greater than 'max' (${r.min} > ${r.max})`);if("enum"in r){for(const n of r.enum)if(typeof n!="number")throw new Error(`Enum values for selector ${r.name} should be numbers, not '${n}'`)}}for(const n of Object.keys(r))if(!["name","type","regex","min","max","enum"].includes(n))throw new Error(`Unexpected key '${n}' in selector ${t}`)}}validateSelectorSpec(t){for(const r of t){if(!r.name)throw new Error(`name not found in selector spec element '${JSON.stringify(r)}'`);if(!r.type)throw new Error(`type not found in selector spec element '${JSON.stringify(r)}'`);if(!["string","integer"].includes(r.type))throw new Error(`Type for spec element must be string or number, not ${r.type}`);for(const n of Object.keys(r))if(!["name","type","regex","min","max","enum"].includes(n))throw new Error(`Unexpected key '${n}' in selectorSpec`)}}selectorString(t){return this.selectors.map(r=>r.name).map(r=>`${t[r]}`).join("_")}processor(){return"Proskomma JS"}packageVersion(){return yk.version}docSetList(){return Object.values(this.docSets)}docSetsById(t){return Object.values(this.docSets).filter(r=>t.includes(r.id))}docSetById(t){return this.docSets[t]}docSetsWithBook(t){const r=Object.values(this.documents).filter(u=>"bookCode"in u.headers&&u.headers.bookCode===t).map(u=>u.id),n=u=>{for(const s of r)if(u.docIds.includes(s))return!0;return!1};return Object.values(this.docSets).filter(u=>n(u))}nDocSets(){return this.docSetList().length}nDocuments(){return this.documentList().length}documentList(){return Object.values(this.documents)}documentById(t){return this.documents[t]}documentsById(t){return Object.values(this.documents).filter(r=>t.includes(r.id))}documentsWithBook(t){return Object.values(this.documents).filter(r=>"bookCode"in r.headers&&r.headers.bookCode===t)}importDocument(t,r,n,u,s,o,a){return this.importDocuments(t,r,[n],u,s,o,a)[0]}importDocuments(t,r,n,u,s,o,a){u||(u=this.filters),s||(s=this.customTags),o||(o=this.emptyBlocks),a||(a=[]);const i=this.findOrMakeDocSet(t),c=this.docSets[i];c.buildPreEnums();const l=[];for(const p of n){let f=new Uy(this,i,r,p,u,s,o,a);const d=f.headers.bookCode;if(Object.values(this.documents).filter(E=>c.docIds.includes(E.id)).map(E=>E.headers.bookCode).includes(d))throw new Error(`Attempt to import document with bookCode '${d}' which already exists in docSet ${i}`);this.addDocument(f,i),l.push(f)}return c.preEnums={},l}importUsfmPeriph(t,r,n,u,s,o){const a=r.toString().split(/[\n\r]+/),i=a[0].substring(4,7);if(!["FRT","BAK","INT"].includes(i))throw new Error(`importUsfmInt() expected bookCode of FRT, BAK or INT, not '${i}'`);let c=[];for(const l of a)if(l.substring(0,7)==="\\periph"){let p=ne.exec(l,ne('^\\\\periph (.*)\\|\\s*id\\s*=\\s*"([^"]+)"\\s*$'));if(!p)throw new Error(`Unable to parse periph line '${l}'`);const f=p[1],d=p[2],h=`\\id P${this.nextPeriph>9?this.nextPeriph:"0"+this.nextPeriph}`;c.push([`${h} INT ${d} - ${f}`]),this.nextPeriph++}else c.length>0&&l.substring(0,3)!=="\\id"&&c[c.length-1].push(l);this.importDocuments(t,"usfm",c.map(l=>l.join(` + ${dK} + ${DK} + ${mK} + ${NK} + ${RK} + ${UK} + ${zK} + ${QK} + ${lX} + ${dX} + ${_X} + ${TX} + ${PX} + `,IX={Mutation:wX,Query:cX,KeyValue:bz,cv:wz,idParts:Bz,Item:qz,ItemGroup:Uz,kvEntry:Vz,regexIndex:Wz,verseNumber:Zz,cell:eK,cIndex:rK,cvVerseElement:uK,cvVerses:oK,cvIndex:iK,cvNavigation:lK,node:fK,kvSequence:hK,tableSequence:EK,treeSequence:qK,Block:jK,Sequence:GK,Document:KK,DocSet:eX,selectorSpec:pX,versification:BX,cvBook:$X,cvChapter:kX},dg=NO({typeDefs:OX,resolvers:IX});class NX{constructor(t){this.processorId=ye.generateId(),this.documents={},this.docSetsBySelector={},this.docSets={},this.filters={},this.customTags={heading:[],paragraph:[],char:[],word:[],intro:[],introHeading:[]},this.emptyBlocks=[],this.selectors=t||[{name:"lang",type:"string",regex:"[a-z]{3}"},{name:"abbr",type:"string"}],this.validateSelectorSpec(this.selectors),this.mutex=new MO,this.nextPeriph=0,this.nextTable=0,this.nextNodes=0}validateSelectors(){if(this.selectors.length===0)throw new Error("No selectors found");for(const[t,r]of this.selectors.entries()){if(!("name"in r))throw new Error(`Selector ${t} has no name`);if(!("type"in r))throw new Error(`Selector ${t} has no type`);if(!["string","integer"].includes(r.type))throw new Error(`Type for selector ${t} must be string or number, not ${r.type}`);if(r.type==="string"){if("min"in r)throw new Error("String selector should not include 'min'");if("max"in r)throw new Error("String selector should not include 'max'");if("regex"in r)try{Z(r.regex)}catch(n){throw new Error(`Regex '${r.regex}' is not valid: ${n}`)}if("enum"in r){for(const n of r.enum)if(typeof n!="string")throw new Error(`Enum values for selector ${r.name} should be strings, not '${n}'`)}}else{if("regex"in r)throw new Error("Integer selector should not include 'regex'");if("min"in r&&typeof r.min!="number")throw new Error(`'min' must be a number, not '${r.min}'`);if("max"in r&&typeof r.max!="number")throw new Error(`'max' must be a number, not '${r.max}'`);if("min"in r&&"max"in r&&r.min>r.max)throw new Error(`'min' cannot be greater than 'max' (${r.min} > ${r.max})`);if("enum"in r){for(const n of r.enum)if(typeof n!="number")throw new Error(`Enum values for selector ${r.name} should be numbers, not '${n}'`)}}for(const n of Object.keys(r))if(!["name","type","regex","min","max","enum"].includes(n))throw new Error(`Unexpected key '${n}' in selector ${t}`)}}validateSelectorSpec(t){for(const r of t){if(!r.name)throw new Error(`name not found in selector spec element '${JSON.stringify(r)}'`);if(!r.type)throw new Error(`type not found in selector spec element '${JSON.stringify(r)}'`);if(!["string","integer"].includes(r.type))throw new Error(`Type for spec element must be string or number, not ${r.type}`);for(const n of Object.keys(r))if(!["name","type","regex","min","max","enum"].includes(n))throw new Error(`Unexpected key '${n}' in selectorSpec`)}}selectorString(t){return this.selectors.map(r=>r.name).map(r=>`${t[r]}`).join("_")}processor(){return"Proskomma JS"}packageVersion(){return aI.version}docSetList(){return Object.values(this.docSets)}docSetsById(t){return Object.values(this.docSets).filter(r=>t.includes(r.id))}docSetById(t){return this.docSets[t]}docSetsWithBook(t){const r=Object.values(this.documents).filter(u=>"bookCode"in u.headers&&u.headers.bookCode===t).map(u=>u.id),n=u=>{for(const s of r)if(u.docIds.includes(s))return!0;return!1};return Object.values(this.docSets).filter(u=>n(u))}nDocSets(){return this.docSetList().length}nDocuments(){return this.documentList().length}documentList(){return Object.values(this.documents)}documentById(t){return this.documents[t]}documentsById(t){return Object.values(this.documents).filter(r=>t.includes(r.id))}documentsWithBook(t){return Object.values(this.documents).filter(r=>"bookCode"in r.headers&&r.headers.bookCode===t)}importDocument(t,r,n,u,s,o,a){return this.importDocuments(t,r,[n],u,s,o,a)[0]}importDocuments(t,r,n,u,s,o,a){u||(u=this.filters),s||(s=this.customTags),o||(o=this.emptyBlocks),a||(a=[]);const i=this.findOrMakeDocSet(t),c=this.docSets[i];c.buildPreEnums();const l=[];for(const p of n){let d=new ag(this,i,r,p,u,s,o,a);const f=d.headers.bookCode;if(Object.values(this.documents).filter(y=>c.docIds.includes(y.id)).map(y=>y.headers.bookCode).includes(f))throw new Error(`Attempt to import document with bookCode '${f}' which already exists in docSet ${i}`);this.addDocument(d,i),l.push(d)}return c.preEnums={},l}importUsfmPeriph(t,r,n,u,s,o){const a=r.toString().split(/[\n\r]+/),i=a[0].substring(4,7);if(!["FRT","BAK","INT"].includes(i))throw new Error(`importUsfmInt() expected bookCode of FRT, BAK or INT, not '${i}'`);let c=[];for(const l of a)if(l.substring(0,7)==="\\periph"){let p=Z.exec(l,Z('^\\\\periph (.*)\\|\\s*id\\s*=\\s*"([^"]+)"\\s*$'));if(!p)throw new Error(`Unable to parse periph line '${l}'`);const d=p[1],f=p[2],h=`\\id P${this.nextPeriph>9?this.nextPeriph:"0"+this.nextPeriph}`;c.push([`${h} INT ${f} - ${d}`]),this.nextPeriph++}else c.length>0&&l.substring(0,3)!=="\\id"&&c[c.length-1].push(l);this.importDocuments(t,"usfm",c.map(l=>l.join(` `)),n,u,s,o)}cleanUsfm(t,r){r=r||{};const n=t.toString().split(/[\n\r]+/),u=[];let s=!0;const o=["\\id","\\ide","\\usfm","\\sts","\\rem","\\h","\\toc"];for(const a of n){const i=a.split(" ")[0].replace(/[0-9]+/g,"");if("remove"in r&&r.remove.includes(i))continue;const c=o.includes(i);s&&!c&&i!=="\\mt"&&u.push("\\mt1 USFM"),u.push(a),c||(s=!1)}return u.join(` -`)}deleteDocSet(t){if(!(t in this.docSets))return!1;for(const o of Object.entries(this.documents).filter(a=>a[1].docSetId===t).map(a=>a[0]))this.deleteDocument(t,o,!1,!1);let r=this.docSetsBySelector;const n=this.selectors.slice(0,this.selectors.length-1);for(const o of n)r=r[this.docSets[t].selectors[o.name]];const u=this.selectors[this.selectors.length-1].name,s=this.docSets[t].selectors[u];if(!r[s])throw new Error(`Could not find docSetId '${t}' in docSetsBySelector in deleteDocSet`);return delete r[s],delete this.docSets[t],!0}deleteDocument(t,r,n,u){return n=n===void 0?!0:n,u=u===void 0?!0:u,!(t in this.docSets)||!(r in this.documents)?!1:(delete this.documents[r],this.docSets[t].docIds.length>1?(this.docSets[t].docIds=this.docSets[t].docIds.filter(s=>s!==r),u&&this.rehashDocSet(t)):n&&this.deleteDocSet(t),!0)}rehashDocSet(t){return t in this.docSets?this.docSets[t].rehash():!1}addDocument(t,r){this.documents[t.id]=t,this.docSets[r].docIds.push(t.id),this.docSets[r].buildEnumIndexes()}loadSuccinctDocSet(t){const r=t.id;if(r in this.docSets)throw new Error(`Attempting to succinct load docSet ${r} which is already loaded`);const n=new xv(this,null,null,t),u=n.id;this.docSets[u]=n;let s=this.docSetsBySelector;const o=t.metadata.selectors;for(const i of this.selectors)i.name===this.selectors[this.selectors.length-1].name?o[i.name]in s||(s[o[i.name]]=n,this.docSets[n.id]=n):(o[i.name]in s||(s[o[i.name]]={}),s=s[o[i.name]]);n.buildPreEnums();const a=[];for(const i of Object.keys(t.docs)){let c=this.newDocumentFromSuccinct(i,t);a.push(c)}return n.preEnums={},a}newDocumentFromSuccinct(t,r){const n=new Uy(this,r.id);n.id=t;const u=r.docs[t];n.filterOptions={},n.customTags=[],n.emptyBlocks=[],n.tags=new Set(u.tags),n.headers=u.headers,n.mainId=u.mainId,n.sequences={};for(const[s,o]of Object.entries(u.sequences)){if(n.sequences[s]={id:s,type:o.type,tags:new Set(o.tags),blocks:[]},o.type==="main"){if(n.sequences[s].chapters={},!("chapters"in o))throw new Error("chapters not found in main sequence");for(const[a,i]of Object.entries(o.chapters)){const c=new Ae.ByteArray;c.fromBase64(i),n.sequences[s].chapters[a]=c}if(n.sequences[s].chapterVerses={},!("chapterVerses"in o))throw new Error("chapterVerses not found in main sequence");for(const[a,i]of Object.entries(o.chapterVerses)){const c=new Ae.ByteArray;c.fromBase64(i),n.sequences[s].chapterVerses[a]=c}if(!("tokensPresent"in o))throw new Error("tokensPresent not found in main sequence");n.sequences[s].tokensPresent=new M5(o.tokensPresent)}for(const a of o.blocks){const i={};for(const[c,l]of Object.entries(a)){const p=new Ae.ByteArray(256);p.fromBase64(l),i[c]=p}n.sequences[s].blocks.push(i)}}return this.addDocument(n,r.id),n}findOrMakeDocSet(t){let r=this.docSetsBySelector,n;for(const u of this.selectors)u.name===this.selectors[this.selectors.length-1].name?t[u.name]in r?n=r[t[u.name]]:(n=new xv(this,t),r[t[u.name]]=n,this.docSets[n.id]=n):(t[u.name]in r||(r[t[u.name]]={}),r=r[t[u.name]]);return n.id}async gqlQuery(t,r){const n=await this.mutex.acquire();try{const u=await hP({schema:Jy,source:t,rootValue:this,contextValue:{}});return r&&r(u),u}finally{n()}}gqlQuerySync(t,r){const n=mP({schema:Jy,source:t,rootValue:this,contextValue:{}});return r&&r(n),n}serializeSuccinct(t){return this.docSets[t].serializeSuccinct()}checksum(){const t=Object.values(this.docSets).map(r=>r.checksum()).sort().join(" ");return j5.calculate(t)}}const zK=e=>{let t,r,n;try{const u=new JK;u.importDocument({lang:"xxx",abbr:"XXX"},"usfm",e);const s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0];t=JSON.parse(s.perf),n=s.id,r=s.docSetId}catch(u){console.log(u),t=null}return{perf:t,docSetId:r,id:n}},KK=({scrollToChapter:e,bookCode:t,setBookCode:r})=>{const[n,u]=Et.useState(null),[s,o]=Et.useState(null),[a,i]=Et.useState(null),[c,l]=Et.useState(null),[p,f]=Et.useState(1);return Et.useEffect(()=>{Oh.setMessageListeners(d=>{switch(d.data.type){case"update-usfm":{const{usfm:h,bookID:E,chapter:A,verse:m}=d.data.payload;console.log("useDocument",{bookCode:t,bookID:E,chapter:A,verse:m}),e(A,m),console.log("scrolling to chapter",A),console.log("received",{usfm:h,bookID:E,chapter:A,verse:m}),u(d.data.payload.usfm),f(d.data.payload.chapter);const{perf:y,id:F,docSetId:B}=zK(d.data.payload.usfm);console.log({perf:y,id:F,docSetId:B}),y&&y.metadata.document.bookCode&&r(y.metadata.document.bookCode),o(y),l(F),i(B);break}case"fileOpened":console.log(`received message from extension :${d.data.type}`);break}})},[]),{document:n,perf:s,bookCode:t,id:c,docSetId:a,chapter:p}};var Ym={},Kc={},E7={exports:{}},XK="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",YK=XK,ZK=YK;function v7(){}function y7(){}y7.resetWarningCache=v7;var QK=function(){function e(n,u,s,o,a,i){if(i!==ZK){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:y7,resetWarningCache:v7};return r.PropTypes=r,r};E7.exports=QK();var ku=E7.exports;function z2(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array&&(n=e.length)===t.length){for(;n--&&z2(e[n],t[n]););return n===-1}if(r===Object){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(n in e)if(!(n in t)||!z2(e[n],t[n]))return!1;return!0}}return e!==e&&t!==t}function Zm(e){const t=Gi.useRef([]);return z2(e,t.current)||(t.current=e),t.current}function eX(e,t){return Gi.useCallback(e,Zm(t))}function fp(e,t){Gi.useEffect(e,Zm(t))}function g7(e,t){return Gi.useMemo(e,Zm(t))}const tX=Object.freeze(Object.defineProperty({__proto__:null,useDeepCompareCallback:eX,useDeepCompareEffect:fp,useDeepCompareMemo:g7},Symbol.toStringTag,{value:"Module"})),Wp=D8(tX);var dp={exports:{}};dp.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",u=1,s=2,o=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",p="[object Date]",f="[object Error]",d="[object Function]",h="[object GeneratorFunction]",E="[object Map]",A="[object Number]",m="[object Null]",y="[object Object]",F="[object Promise]",B="[object Proxy]",P="[object RegExp]",$="[object Set]",I="[object String]",U="[object Symbol]",j="[object Undefined]",W="[object WeakMap]",te="[object ArrayBuffer]",Y="[object DataView]",oe="[object Float32Array]",ie="[object Float64Array]",fe="[object Int8Array]",De="[object Int16Array]",de="[object Int32Array]",Ce="[object Uint8Array]",pe="[object Uint8ClampedArray]",Q="[object Uint16Array]",q="[object Uint32Array]",v=/[\\^$.*+?()[\]{}|]/g,C=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,g={};g[oe]=g[ie]=g[fe]=g[De]=g[de]=g[Ce]=g[pe]=g[Q]=g[q]=!0,g[a]=g[i]=g[te]=g[l]=g[Y]=g[p]=g[f]=g[d]=g[E]=g[A]=g[y]=g[P]=g[$]=g[I]=g[W]=!1;var O=typeof we=="object"&&we&&we.Object===Object&&we,b=typeof self=="object"&&self&&self.Object===Object&&self,w=O||b||Function("return this")(),x=t&&!t.nodeType&&t,k=x&&!0&&e&&!e.nodeType&&e,G=k&&k.exports===x,H=G&&O.process,re=function(){try{return H&&H.binding&&H.binding("util")}catch{}}(),_e=re&&re.isTypedArray;function Le(X,se){for(var ye=-1,Ne=X==null?0:X.length,St=0,st=[];++ye-1}function Fe(X,se){var ye=this.__data__,Ne=$r(ye,X);return Ne<0?(++this.size,ye.push([X,se])):ye[Ne][1]=se,this}Me.prototype.clear=et,Me.prototype.delete=$e,Me.prototype.get=Je,Me.prototype.has=tt,Me.prototype.set=Fe;function We(X){var se=-1,ye=X==null?0:X.length;for(this.clear();++senr))return!1;var Nt=st.get(X);if(Nt&&st.get(se))return Nt==se;var Xr=-1,An=!0,Fr=ye&s?new rr:void 0;for(st.set(X,se),st.set(se,X);++Xr-1&&X%1==0&&X-1&&X%1==0&&X<=o}function Y3(X){var se=typeof X;return X!=null&&(se=="object"||se=="function")}function La(X){return X!=null&&typeof X=="object"}var Z3=_e?je(_e):rB;function mB(X){return DB(X)?vn(X):nB(X)}function EB(){return[]}function vB(){return!1}e.exports=hB})(dp,dp.exports);var rX=dp.exports,nu={};Object.defineProperty(nu,"__esModule",{value:!0});nu.removePreviewTextInGrafts=nu.embedSequencesInMainGrafts=nu.embedSequencesInGrafts=nu.embedPreviewTextInGrafts=void 0;function Qm(e){return oX(e)||sX(e)||uX(e)||nX()}function nX(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function uX(e,t){if(e){if(typeof e=="string")return K2(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return K2(e,t)}}function sX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oX(e){if(Array.isArray(e))return K2(e)}function K2(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function DX(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function hX(e){var t=e.type;e.content;var r=e.show,n=e.index,u=e.verbose,s=dX(e,pX);(0,v1.useEffect)(function(){return u&&console.log("SectionHeading: Mount/First Render",n),function(){u&&console.log("SectionHeading: UnMount/Destroyed",n)}},[]);var o=n&&"Chapter ".concat(n);return o||(o=t==="main"?"Title & Introduction":t),v1.default.createElement("div",Y2({className:"sectionHeading"},s),v1.default.createElement("span",{className:"expand"},r?"":"...",o,r?"":"..."))}var Xc={},Jp={};Object.defineProperty(Jp,"__esModule",{value:!0});Jp.getTarget=void 0;var mX=function(t){var r,n=t.content,u=document.createElement("div");u.innerHTML=n;var s=((r=u.firstChild)===null||r===void 0?void 0:r.dataset)||{},o=s.target;return o};Jp.getTarget=mX;var zy;function EX(){if(zy)return Xc;zy=1;function e(y){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(F){return typeof F}:function(F){return F&&typeof Symbol=="function"&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F},e(y)}Object.defineProperty(Xc,"__esModule",{value:!0}),Xc.default=m;var t=a(Et),r=Jp,n=s(x7()),u=["htmlPerf","onHtmlPerf","sequenceIds","addSequenceId","options","content","style","contentEditable","index","verbose","setFootNote"];function s(y){return y&&y.__esModule?y:{default:y}}function o(y){if(typeof WeakMap!="function")return null;var F=new WeakMap,B=new WeakMap;return(o=function($){return $?B:F})(y)}function a(y,F){if(!F&&y&&y.__esModule)return y;if(y===null||e(y)!=="object"&&typeof y!="function")return{default:y};var B=o(F);if(B&&B.has(y))return B.get(y);var P={},$=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var I in y)if(I!=="default"&&Object.prototype.hasOwnProperty.call(y,I)){var U=$?Object.getOwnPropertyDescriptor(y,I):null;U&&(U.get||U.set)?Object.defineProperty(P,I,U):P[I]=y[I]}return P.default=y,B&&B.set(y,P),P}function i(y){return f(y)||p(y)||l(y)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(y,F){if(y){if(typeof y=="string")return d(y,F);var B=Object.prototype.toString.call(y).slice(8,-1);if(B==="Object"&&y.constructor&&(B=y.constructor.name),B==="Map"||B==="Set")return Array.from(y);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return d(y,F)}}function p(y){if(typeof Symbol<"u"&&y[Symbol.iterator]!=null||y["@@iterator"]!=null)return Array.from(y)}function f(y){if(Array.isArray(y))return d(y)}function d(y,F){(F==null||F>y.length)&&(F=y.length);for(var B=0,P=new Array(F);B=0)&&Object.prototype.propertyIsEnumerable.call(y,P)&&(B[P]=y[P])}return B}function A(y,F){if(y==null)return{};var B={},P=Object.keys(y),$,I;for(I=0;I=0)&&(B[$]=y[$]);return B}function m(y){var F=y.htmlPerf,B=y.onHtmlPerf,P=y.sequenceIds,$=y.addSequenceId,I=y.options,U=y.content;y.style;var j=y.contentEditable,W=y.index,te=y.verbose;y.setFootNote;var Y=E(y,u);(0,t.useEffect)(function(){return te&&console.log("Block: Mount/First Render",W),function(){te&&console.log("Block: UnMount/Destroyed",W)}},[]);var oe,ie=!!U.match(/data-type="paragraph"/);if(ie&&(oe=t.default.createElement("div",h({contentEditable:j},Y))),!ie){var fe=(0,r.getTarget)({content:U});if(fe&&!I.preview){var De={sequenceIds:[].concat(i(P),[fe]),addSequenceId:$,htmlPerf:F,onHtmlPerf:B};oe=t.default.createElement(n.default,De)}oe||(oe=t.default.createElement("div",h({},Y,{contentEditable:!1})))}return t.default.createElement(t.default.Fragment,null,oe)}return Xc}var zp={},b7={},Kp={},eE={};Object.defineProperty(eE,"__esModule",{value:!0});eE.default=tE;var Ky=Et,y1=Wp,Vu=vX(ku);function vX(e){return e&&e.__esModule?e:{default:e}}function xi(e){"@babel/helpers - typeof";return xi=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},xi(e)}function Xy(e,t){return FX(e)||AX(e,t)||gX(e,t)||yX()}function yX(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gX(e,t){if(e){if(typeof e=="string")return Yy(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yy(e,t)}}function Yy(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);ra[1].docSetId===t).map(a=>a[0]))this.deleteDocument(t,o,!1,!1);let r=this.docSetsBySelector;const n=this.selectors.slice(0,this.selectors.length-1);for(const o of n)r=r[this.docSets[t].selectors[o.name]];const u=this.selectors[this.selectors.length-1].name,s=this.docSets[t].selectors[u];if(!r[s])throw new Error(`Could not find docSetId '${t}' in docSetsBySelector in deleteDocSet`);return delete r[s],delete this.docSets[t],!0}deleteDocument(t,r,n,u){return n=n===void 0?!0:n,u=u===void 0?!0:u,!(t in this.docSets)||!(r in this.documents)?!1:(delete this.documents[r],this.docSets[t].docIds.length>1?(this.docSets[t].docIds=this.docSets[t].docIds.filter(s=>s!==r),u&&this.rehashDocSet(t)):n&&this.deleteDocSet(t),!0)}rehashDocSet(t){return t in this.docSets?this.docSets[t].rehash():!1}addDocument(t,r){this.documents[t.id]=t,this.docSets[r].docIds.push(t.id),this.docSets[r].buildEnumIndexes()}loadSuccinctDocSet(t,r){const n=t.id;if(n in this.docSets&&!r)throw new Error(`Attempting to succinct load docSet ${n} which is already loaded, without bookCodes argument`);const u=new rv(this,null,null,t),s=u.id;this.docSets[s]=u;let o=this.docSetsBySelector;const a=t.metadata.selectors;for(const l of this.selectors)l.name===this.selectors[this.selectors.length-1].name?a[l.name]in o||(o[a[l.name]]=u,this.docSets[u.id]=u):(a[l.name]in o||(o[a[l.name]]={}),o=o[a[l.name]]);u.buildPreEnums();const i=[],c=l=>!r||r.includes(t.docs[l].headers.bookCode);for(const l of Object.keys(t.docs).filter(c)){let p=this.newDocumentFromSuccinct(l,t);i.push(p)}return u.preEnums={},i}augmentSuccinctDocSet(t,r){if(!r||r.length===0)throw new Error("bookCodes argument must be present and contain at least one element in augmentSuccinctDocSet");const n=u=>{const s=t.docs[u];return r.includes(s.headers.bookCode)};if(!this.docSets[t.id])throw new Error(`docSet id '${t.id}' not found in Proskomma when using augmentSuccinctDocSet. Load it first with optional bookCodes argument`);for(const u of Object.keys(t.docs).filter(n))this.documents[u]||this.newDocumentFromSuccinct(u,t)}newDocumentFromSuccinct(t,r){const n=new ag(this,r.id);n.id=t;const u=r.docs[t];n.filterOptions={},n.customTags=[],n.emptyBlocks=[],n.tags=new Set(u.tags),n.headers=u.headers,n.mainId=u.mainId,n.sequences={};for(const[s,o]of Object.entries(u.sequences)){if(n.sequences[s]={id:s,type:o.type,tags:new Set(o.tags),blocks:[]},o.type==="main"){if(n.sequences[s].chapters={},!("chapters"in o))throw new Error("chapters not found in main sequence");for(const[a,i]of Object.entries(o.chapters)){const c=new ye.ByteArray;c.fromBase64(i),n.sequences[s].chapters[a]=c}if(n.sequences[s].chapterVerses={},!("chapterVerses"in o))throw new Error("chapterVerses not found in main sequence");for(const[a,i]of Object.entries(o.chapterVerses)){const c=new ye.ByteArray;c.fromBase64(i),n.sequences[s].chapterVerses[a]=c}if(!("tokensPresent"in o))throw new Error("tokensPresent not found in main sequence");n.sequences[s].tokensPresent=new f6(o.tokensPresent)}for(const a of o.blocks){const i={};for(const[c,l]of Object.entries(a)){const p=new ye.ByteArray(256);p.fromBase64(l),i[c]=p}n.sequences[s].blocks.push(i)}}return this.addDocument(n,r.id),n}findOrMakeDocSet(t){let r=this.docSetsBySelector,n;for(const u of this.selectors)u.name===this.selectors[this.selectors.length-1].name?t[u.name]in r?n=r[t[u.name]]:(n=new rv(this,t),r[t[u.name]]=n,this.docSets[n.id]=n):(t[u.name]in r||(r[t[u.name]]={}),r=r[t[u.name]]);return n.id}async gqlQuery(t,r){const n=await this.mutex.acquire();try{const u=await nk({schema:dg,source:t,rootValue:this,contextValue:{}});return r&&r(u),u}finally{n()}}gqlQuerySync(t,r){const n=uk({schema:dg,source:t,rootValue:this,contextValue:{}});return r&&r(n),n}serializeSuccinct(t){return this.docSets[t].serializeSuccinct()}checksum(){const t=Object.values(this.docSets).map(r=>r.checksum()).sort().join(" ");return d6.calculate(t)}}const qX=e=>{let t,r,n;try{const u=new NX;u.importDocument({lang:"xxx",abbr:"XXX"},"usfm",e);const s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0];t=JSON.parse(s.perf),n=s.id,r=s.docSetId}catch(u){console.log(u),t=null}return{perf:t,docSetId:r,id:n}},xX=({scrollToChapter:e,bookCode:t,setBookCode:r})=>{const[n,u]=ft.useState(null),[s,o]=ft.useState(null),[a,i]=ft.useState(null),[c,l]=ft.useState(null),[p,d]=ft.useState(1);return ft.useEffect(()=>{Vh.setMessageListeners(f=>{switch(f.data.type){case"update-usfm":{const{usfm:h,bookID:y,chapter:A,verse:m}=f.data.payload;console.log("useDocument",{bookCode:t,bookID:y,chapter:A,verse:m}),e(A,m),console.log("scrolling to chapter",A),console.log("received",{usfm:h,bookID:y,chapter:A,verse:m}),u(f.data.payload.usfm),d(f.data.payload.chapter);const{perf:v,id:C,docSetId:B}=qX(f.data.payload.usfm);console.log({perf:v,id:C,docSetId:B}),v&&v.metadata.document.bookCode&&r(v.metadata.document.bookCode),o(v),l(C),i(B);break}case"fileOpened":console.log(`received message from extension :${f.data.type}`);break}})},[]),{document:n,perf:s,bookCode:t,id:c,docSetId:a,chapter:p}};var cE={},el={},V7={exports:{}},RX="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",jX=RX,MX=jX;function H7(){}function W7(){}W7.resetWarningCache=H7;var LX=function(){function e(n,u,s,o,a,i){if(i!==MX){var c=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw c.name="Invariant Violation",c}}e.isRequired=e;function t(){return e}var r={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:W7,resetWarningCache:H7};return r.PropTypes=r,r};V7.exports=LX();var Pu=V7.exports;function uh(e,t){var r,n;if(e===t)return!0;if(e&&t&&(r=e.constructor)===t.constructor){if(r===Date)return e.getTime()===t.getTime();if(r===RegExp)return e.toString()===t.toString();if(r===Array&&(n=e.length)===t.length){for(;n--&&uh(e[n],t[n]););return n===-1}if(r===Object){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(n in e)if(!(n in t)||!uh(e[n],t[n]))return!1;return!0}}return e!==e&&t!==t}function lE(e){const t=Vi.useRef([]);return uh(e,t.current)||(t.current=e),t.current}function UX(e,t){return Vi.useCallback(e,lE(t))}function vp(e,t){Vi.useEffect(e,lE(t))}function J7(e,t){return Vi.useMemo(e,lE(t))}const GX=Object.freeze(Object.defineProperty({__proto__:null,useDeepCompareCallback:UX,useDeepCompareEffect:vp,useDeepCompareMemo:J7},Symbol.toStringTag,{value:"Module"})),Qp=L8(GX);var gp={exports:{}};gp.exports;(function(e,t){var r=200,n="__lodash_hash_undefined__",u=1,s=2,o=9007199254740991,a="[object Arguments]",i="[object Array]",c="[object AsyncFunction]",l="[object Boolean]",p="[object Date]",d="[object Error]",f="[object Function]",h="[object GeneratorFunction]",y="[object Map]",A="[object Number]",m="[object Null]",v="[object Object]",C="[object Promise]",B="[object Proxy]",T="[object RegExp]",N="[object Set]",R="[object String]",J="[object Symbol]",q="[object Undefined]",G="[object WeakMap]",ee="[object ArrayBuffer]",K="[object DataView]",ue="[object Float32Array]",oe="[object Float64Array]",de="[object Int8Array]",he="[object Int16Array]",fe="[object Int32Array]",ge="[object Uint8Array]",pe="[object Uint8ClampedArray]",z="[object Uint16Array]",O="[object Uint32Array]",E=/[\\^$.*+?()[\]{}|]/g,F=/^\[object .+?Constructor\]$/,D=/^(?:0|[1-9]\d*)$/,g={};g[ue]=g[oe]=g[de]=g[he]=g[fe]=g[ge]=g[pe]=g[z]=g[O]=!0,g[a]=g[i]=g[ee]=g[l]=g[K]=g[p]=g[d]=g[f]=g[y]=g[A]=g[v]=g[T]=g[N]=g[R]=g[G]=!1;var P=typeof Ce=="object"&&Ce&&Ce.Object===Object&&Ce,b=typeof self=="object"&&self&&self.Object===Object&&self,w=P||b||Function("return this")(),I=t&&!t.nodeType&&t,$=I&&!0&&e&&!e.nodeType&&e,M=$&&$.exports===I,L=M&&P.process,Y=function(){try{return L&&L.binding&&L.binding("util")}catch{}}(),be=Y&&Y.isTypedArray;function Ne(H,ne){for(var Ee=-1,_e=H==null?0:H.length,Ft=0,Ye=[];++Ee<_e;){var Mt=H[Ee];ne(Mt,Ee,H)&&(Ye[Ft++]=Mt)}return Ye}function Ve(H,ne){for(var Ee=-1,_e=ne.length,Ft=H.length;++Ee<_e;)H[Ft+Ee]=ne[Ee];return H}function Me(H,ne){for(var Ee=-1,_e=H==null?0:H.length;++Ee<_e;)if(ne(H[Ee],Ee,H))return!0;return!1}function Fe(H,ne){for(var Ee=-1,_e=Array(H);++Ee-1}function He(H,ne){var Ee=this.__data__,_e=cu(Ee,H);return _e<0?(++this.size,Ee.push([H,ne])):Ee[_e][1]=ne,this}ct.prototype.clear=$t,ct.prototype.delete=et,ct.prototype.get=Et,ct.prototype.has=Pt,ct.prototype.set=He;function ht(H){var ne=-1,Ee=H==null?0:H.length;for(this.clear();++neQt))return!1;var kt=Ye.get(H);if(kt&&Ye.get(ne))return kt==ne;var Lr=-1,dn=!0,mr=Ee&s?new ln:void 0;for(Ye.set(H,ne),Ye.set(ne,H);++Lr-1&&H%1==0&&H-1&&H%1==0&&H<=o}function my(H){var ne=typeof H;return H!=null&&(ne=="object"||ne=="function")}function La(H){return H!=null&&typeof H=="object"}var Ey=be?qe(be):VB;function uT(H){return rT(H)?fo(H):HB(H)}function sT(){return[]}function oT(){return!1}e.exports=nT})(gp,gp.exports);var VX=gp.exports,Kn={};Object.defineProperty(Kn,"__esModule",{value:!0});Kn.removePreviewTextInGrafts=Kn.embedSequencesInMainGrafts=Kn.embedSequencesInGrafts=Kn.embedPreviewTextInGrafts=void 0;function pE(e){return zX(e)||JX(e)||WX(e)||HX()}function HX(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function WX(e,t){if(e){if(typeof e=="string")return sh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return sh(e,t)}}function JX(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function zX(e){if(Array.isArray(e))return sh(e)}function sh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function rY(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function nY(e){var t=e.type;e.content;var r=e.show,n=e.index,u=e.verbose,s=tY(e,QX);(0,Bf.useEffect)(function(){return u&&console.log("SectionHeading: Mount/First Render",n),function(){u&&console.log("SectionHeading: UnMount/Destroyed",n)}},[]);var o=n&&"Chapter ".concat(n);return o||(o=t==="main"?"Title & Introduction":t),Bf.default.createElement("div",ah({className:"sectionHeading"},s),Bf.default.createElement("span",{className:"expand"},r?"":"...",o,r?"":"..."))}var tl={},ed={};Object.defineProperty(ed,"__esModule",{value:!0});ed.getTarget=void 0;var uY=function(t){var r,n=t.content,u=document.createElement("div");u.innerHTML=n;var s=((r=u.firstChild)===null||r===void 0?void 0:r.dataset)||{},o=s.target;return o};ed.getTarget=uY;var fg;function sY(){if(fg)return tl;fg=1;function e(v){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(C){return typeof C}:function(C){return C&&typeof Symbol=="function"&&C.constructor===Symbol&&C!==Symbol.prototype?"symbol":typeof C},e(v)}Object.defineProperty(tl,"__esModule",{value:!0}),tl.default=m;var t=a(ft),r=ed,n=s(l9()),u=["htmlPerf","onHtmlPerf","sequenceIds","addSequenceId","options","content","style","contentEditable","index","verbose","setFootNote"];function s(v){return v&&v.__esModule?v:{default:v}}function o(v){if(typeof WeakMap!="function")return null;var C=new WeakMap,B=new WeakMap;return(o=function(N){return N?B:C})(v)}function a(v,C){if(v&&v.__esModule)return v;if(v===null||e(v)!=="object"&&typeof v!="function")return{default:v};var B=o(C);if(B&&B.has(v))return B.get(v);var T={},N=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var R in v)if(R!=="default"&&Object.prototype.hasOwnProperty.call(v,R)){var J=N?Object.getOwnPropertyDescriptor(v,R):null;J&&(J.get||J.set)?Object.defineProperty(T,R,J):T[R]=v[R]}return T.default=v,B&&B.set(v,T),T}function i(v){return d(v)||p(v)||l(v)||c()}function c(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function l(v,C){if(v){if(typeof v=="string")return f(v,C);var B=Object.prototype.toString.call(v).slice(8,-1);if(B==="Object"&&v.constructor&&(B=v.constructor.name),B==="Map"||B==="Set")return Array.from(v);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return f(v,C)}}function p(v){if(typeof Symbol<"u"&&v[Symbol.iterator]!=null||v["@@iterator"]!=null)return Array.from(v)}function d(v){if(Array.isArray(v))return f(v)}function f(v,C){(C==null||C>v.length)&&(C=v.length);for(var B=0,T=new Array(C);B=0)&&Object.prototype.propertyIsEnumerable.call(v,T)&&(B[T]=v[T])}return B}function A(v,C){if(v==null)return{};var B={},T=Object.keys(v),N,R;for(R=0;R=0)&&(B[N]=v[N]);return B}function m(v){var C=v.htmlPerf,B=v.onHtmlPerf,T=v.sequenceIds,N=v.addSequenceId,R=v.options,J=v.content;v.style;var q=v.contentEditable,G=v.index,ee=v.verbose;v.setFootNote;var K=y(v,u);(0,t.useEffect)(function(){return ee&&console.log("Block: Mount/First Render",G),function(){ee&&console.log("Block: UnMount/Destroyed",G)}},[]);var ue,oe=!!J.match(/data-type="paragraph"/);if(oe&&(ue=t.default.createElement("div",h({contentEditable:q},K))),!oe){var de=(0,r.getTarget)({content:J});if(de&&!R.preview){var he={sequenceIds:[].concat(i(T),[de]),addSequenceId:N,htmlPerf:C,onHtmlPerf:B};ue=t.default.createElement(n.default,he)}ue||(ue=t.default.createElement("div",h({},K,{contentEditable:!1})))}return t.default.createElement(t.default.Fragment,null,ue)}return tl}var td={},Y7={},rd={},dE={};Object.defineProperty(dE,"__esModule",{value:!0});dE.default=fE;var Dg=ft,Tf=Qp,Gu=oY(Pu);function oY(e){return e&&e.__esModule?e:{default:e}}function Ri(e){"@babel/helpers - typeof";return Ri=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},Ri(e)}function hg(e,t){return lY(e)||cY(e,t)||iY(e,t)||aY()}function aY(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function iY(e,t){if(e){if(typeof e=="string")return mg(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return mg(e,t)}}function mg(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r/g,"​"]}:{embededHtml:[/0&&Object.keys(F).forEach(function(B){var P=Xy(F[B],2),$=P[0],I=P[1];y=y.replace($,I)}),y},[t,a,u,c]),E=(0,y1.useDeepCompareCallback)(function(y){var F;if(a)F=y.innerHTML.replaceAll("​","");else{var B=document.createElement("div");B.innerHTML=y.innerHTML.replaceAll("e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(F=Pn.default.createElement(f,y,m)),Pn.default.createElement("div",{className:"contextMenuWrapper",onContextMenu:h,style:{}},n,F)}nE.propTypes={components:Va.default.shape({contextMenu:Va.default.func,contextMenuItem:Va.default.func}),save:Va.default.func.isRequired,children:Va.default.any.isRequired};nE.defaultProps=th;Object.defineProperty(Kp,"__esModule",{value:!0});Kp.default=sE;var rh=UX(Et),Yr=uE(ku),B7=uE(eE);uE(rE);var jX=["content","verbose","options"],MX=["content","onContent","decorators","style","onClick","components","options","index","verbose"],LX=["editIndex","save"];function uE(e){return e&&e.__esModule?e:{default:e}}function T7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(T7=function(u){return u?r:t})(e)}function UX(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||Ea(e)!=="object"&&typeof e!="function")return{default:e};var r=T7(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function Ea(e){"@babel/helpers - typeof";return Ea=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},Ea(e)}function Dp(){return Dp=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function GX(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function eg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Qo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dY(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var Bl={content:"",onContent:function(t){console.warn(`EditableSection.onContent() not provided: +`,t)},options:{editable:!0},decorators:{}};function fE(e){var t=e.content,r=e.onContent,n=e.onInput,u=e.decorators,s=e.options,o=rl(rl({},Z7.options),s),a=o.returnHtml,i=o.editable,c=o.preview,l=(0,Dg.useState)(0),p=hg(l,2),d=p[0],f=p[1],h=(0,Tf.useDeepCompareMemo)(function(){var v=t,C=rl(a?{spanPadding:[/<\/span>/g,"​"]}:{embededHtml:[/0&&Object.keys(C).forEach(function(B){var T=hg(C[B],2),N=T[0],R=T[1];v=v.replace(N,R)}),v},[t,a,u,c]),y=(0,Tf.useDeepCompareCallback)(function(v){var C;if(a)C=v.innerHTML.replaceAll("​","");else{var B=document.createElement("div");B.innerHTML=v.innerHTML.replaceAll("e.length)&&(t=e.length);for(var r=0,n=new Array(t);r0&&(C=Fn.default.createElement(d,v,m)),Fn.default.createElement("div",{className:"contextMenuWrapper",onContextMenu:h,style:{}},n,C)}hE.propTypes={components:Va.default.shape({contextMenu:Va.default.func,contextMenuItem:Va.default.func}),save:Va.default.func.isRequired,children:Va.default.any.isRequired};hE.defaultProps=ph;Object.defineProperty(rd,"__esModule",{value:!0});rd.default=EE;var dh=$Y(ft),Ur=mE(Pu),t9=mE(dE);mE(DE);var _Y=["content","verbose","options"],BY=["content","onContent","decorators","style","onClick","components","options","index","verbose"],TY=["editIndex","save"];function mE(e){return e&&e.__esModule?e:{default:e}}function r9(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(r9=function(u){return u?r:t})(e)}function $Y(e,t){if(e&&e.__esModule)return e;if(e===null||ha(e)!=="object"&&typeof e!="function")return{default:e};var r=r9(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function ha(e){"@babel/helpers - typeof";return ha=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},ha(e)}function Ap(){return Ap=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function PY(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function vg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Xo(e){for(var t=1;te.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function tZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var Il={content:"",onContent:function(t){console.warn(`EditableSection.onContent() not provided: -`,t)},options:{editable:!0},components:{section:function(t){t.show;var r=t.children,n=t.dir,u=_l(t,eY);return Zn.default.createElement("div",ca({className:"section "+n,dir:n},u),r)},sectionHeading:function(t){t.show;var r=t.content,n=_l(t,tY);return Zn.default.createElement("h2",ca({className:"sectionHeading"},n),r)},sectionBody:function(t){var r=t.children;t.show;var n=_l(t,rY);return Zn.default.createElement("div",ca({className:"sectionBody"},n),r)}},handlers:{onBlockClick:function(t){t.content;var r=t.index;console.warn(`EditableSection.onBlockClick({content, index}) not provided. +`,t)},options:{editable:!0},components:{section:function(t){t.show;var r=t.children,n=t.dir,u=Ol(t,UY);return Vn.default.createElement("div",oa({className:"section "+n,dir:n},u),r)},sectionHeading:function(t){t.show;var r=t.content,n=Ol(t,GY);return Vn.default.createElement("h2",oa({className:"sectionHeading"},n),r)},sectionBody:function(t){var r=t.children;t.show;var n=Ol(t,VY);return Vn.default.createElement("div",oa({className:"sectionBody"},n),r)}},handlers:{onBlockClick:function(t){t.content;var r=t.index;console.warn(`EditableSection.onBlockClick({content, index}) not provided. `,r)}},joiners:{block:` -`},show:!0,onShow:function(){console.warn("EditableSection.onShow() not provided.")}},DY={whiteSpace:"nowrap",overflow:"hidden",contentOverflow:"ellipsis"};function cE(e){var t=e.content,r=e.onContent,n=e.parsers,u=e.joiners,s=e.decorators,o=e.index,a=e.onShow,i=e.show,c=e.dir,l=e.verbose,p=l===void 0?!1:l,f=_l(e,nY),d=Oo(Oo({},Bl.components),f.components),h=d||{},E=h.section,A=h.sectionHeading,m=h.sectionBody,y=Oo(Oo({},Bl.options),f.options),F=Oo(Oo({},Bl.handlers),f.handlers),B=F.onBlockClick;(0,Zn.useEffect)(function(){p&&console.log("EditableSection First Render")},[]);var P=(0,ZX.default)({content:t,parsers:n,options:y,show:i}),$=(0,rg.useDeepCompareCallback)(function(U,j){var W=sY(P);W[j]=U;var te=W.join(u.block);r(te)},[P]),I=(0,rg.useDeepCompareMemo)(function(){var U=Zn.default.createElement(Zn.default.Fragment,null);return i&&(U=P.map(function(j,W){var te={content:j,components:d,options:y,onContent:function(oe){$(oe,W)},onInput:f==null?void 0:f.onInput,onClick:function(oe){B({content:j,index:W,element:oe.target})},decorators:s,index:W,verbose:p};return Zn.default.createElement(QX.default,ca({key:W+j},te))})),U},[P,d,y,B,$,s]);return Zn.default.createElement(E,{dir:c,show:i,index:o},y.sectionable&&Zn.default.createElement(A,{show:i,dir:c,style:DY,onClick:a,content:t,index:o,"data-test-id":"sectionHeading"}),Zn.default.createElement(m,{show:i,dir:c,index:o},I))}cE.propTypes={content:wt.default.string.isRequired,onContent:wt.default.func,onInput:wt.default.func,options:wt.default.shape({sectionable:wt.default.bool,blockable:wt.default.bool,editable:wt.default.bool,returnHtml:wt.default.bool}),components:wt.default.shape({section:wt.default.func,sectionHeading:wt.default.func,sectionBody:wt.default.func,block:wt.default.func}),parsers:wt.default.shape({block:wt.default.func}),joiners:wt.default.shape({block:wt.default.string}),decorators:wt.default.object,handlers:wt.default.shape({onBlockClick:wt.default.func}),index:wt.default.number,verbose:wt.default.bool,show:wt.default.bool,onShow:wt.default.func,dir:wt.default.string};cE.defaultProps=Bl;var lE={},O7={exports:{}};(function(e){function t(a,i,c,l){Object.defineProperty(a,i,{get:c,set:l,enumerable:!0,configurable:!0})}t(e.exports,"addArrowKeyNavigationToContenteditableElements",()=>n),t(e.exports,"getContenteditableElements",()=>u),t(e.exports,"addArrowKeyNavigationToElements",()=>s),t(e.exports,"addArrowKeyNavigationToElement",()=>o);function r({element:a}){let i=0;if(typeof window.getSelection<"u"&&window.getSelection().rangeCount!==0){const p=window.getSelection().getRangeAt(0),f=p.cloneRange();f.selectNodeContents(a),f.setEnd(p.endContainer,p.endOffset),i=f.toString().length}return i}function n(a){const{verbose:i}=a||{},c=u();s({elements:c,verbose:i})}function u(){return document.querySelectorAll("[contenteditable]")}function s({elements:a,verbose:i}){[...a].forEach(c=>{o({element:c,verbose:i})})}function o({element:a,verbose:i=!1}){a.addEventListener("keydown",c=>{var A,m;const{key:l,target:p}=c,f=r({element:p}),d=c.target.textContent,h=d.match(/^\s*/)[0].length,E=d.length-h;i&&console.log({key:l,position:f,whitespaceOffset:h,length:E,string:d}),l==="ArrowUp"&&f<=h&&((A=c.target.previousElementSibling)==null||A.focus()),l==="ArrowDown"&&f>=E&&((m=c.target.nextElementSibling)==null||m.focus())})}})(O7);var hY=O7.exports,pE={};Object.defineProperty(pE,"__esModule",{value:!0});pE.default=fE;var mY=Et,Wa=EY(ku);function EY(e){return e&&e.__esModule?e:{default:e}}function ji(e){"@babel/helpers - typeof";return ji=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},ji(e)}function ug(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Qc(e){for(var t=1;tn),t(e.exports,"getContenteditableElements",()=>u),t(e.exports,"addArrowKeyNavigationToElements",()=>s),t(e.exports,"addArrowKeyNavigationToElement",()=>o);function r({element:a}){let i=0;if(typeof window.getSelection<"u"&&window.getSelection().rangeCount!==0){const p=window.getSelection().getRangeAt(0),d=p.cloneRange();d.selectNodeContents(a),d.setEnd(p.endContainer,p.endOffset),i=d.toString().length}return i}function n(a){const{verbose:i}=a||{},c=u();s({elements:c,verbose:i})}function u(){return document.querySelectorAll("[contenteditable]")}function s({elements:a,verbose:i}){[...a].forEach(c=>{o({element:c,verbose:i})})}function o({element:a,verbose:i=!1}){a.addEventListener("keydown",c=>{var A,m;const{key:l,target:p}=c,d=r({element:p}),f=c.target.textContent,h=f.match(/^\s*/)[0].length,y=f.length-h;i&&console.log({key:l,position:d,whitespaceOffset:h,length:y,string:f}),l==="ArrowUp"&&d<=h&&((A=c.target.previousElementSibling)==null||A.focus()),l==="ArrowDown"&&d>=y&&((m=c.target.nextElementSibling)==null||m.focus())})}})(s9);var nZ=s9.exports,CE={};Object.defineProperty(CE,"__esModule",{value:!0});CE.default=bE;var uZ=ft,Wa=sZ(Pu);function sZ(e){return e&&e.__esModule?e:{default:e}}function Mi(e){"@babel/helpers - typeof";return Mi=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},Mi(e)}function Cg(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function ul(e){for(var t=1;t.3&&(r=!0)}return r};Yp.isRtl=FY;function ya(e){"@babel/helpers - typeof";return ya=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},ya(e)}Object.defineProperty(lE,"__esModule",{value:!0});lE.default=DE;var li=TY(Et),Ct=dE(ku),g1=Wp,CY=hY,bY=dE(pE),SY=Yp,wY=dE(Xp),_Y=["children","content"],BY=["content","onContent","components","parsers","joiners","decorators","sectionIndex","verbose"];function dE(e){return e&&e.__esModule?e:{default:e}}function k7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(k7=function(u){return u?r:t})(e)}function TY(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||ya(e)!=="object"&&typeof e!="function")return{default:e};var r=k7(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function $Y(e){return IY(e)||kY(e)||OY(e)||PY()}function PY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function OY(e,t){if(e){if(typeof e=="string")return ah(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ah(e,t)}}function kY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function IY(e){if(Array.isArray(e))return ah(e)}function ah(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function RY(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var Tl={content:"",onContent:function(t){console.warn(`EditableContent.onContent() not provided: +`)}}};function bE(e){var t=e.content,r=e.parsers,n=e.options,u=ul(ul({},mh.options),n),s=u.sectionable,o=ul(ul({},mh.parsers),r),a=o.section,i=(0,uZ.useMemo)(function(){var c=[];return c=s?a(t):[t],c},[t,s,a]);return i}bE.propTypes={content:Wa.default.string.isRequired,options:Wa.default.shape({sectionable:Wa.default.bool}),parsers:Wa.default.shape({section:Wa.default.func})};bE.defaultProps=mh;var ud={};Object.defineProperty(ud,"__esModule",{value:!0});ud.isRtl=void 0;var cZ=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/gm,lZ=function(t){var r=!1;if(t&&t.length){var n=t.match(cZ),u=n==null?void 0:n.length,s=t.length,o=u/s;o>.3&&(r=!0)}return r};ud.isRtl=lZ;function Ea(e){"@babel/helpers - typeof";return Ea=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},Ea(e)}Object.defineProperty(FE,"__esModule",{value:!0});FE.default=wE;var li=EZ(ft),gt=SE(Pu),$f=Qp,pZ=nZ,dZ=SE(CE),fZ=ud,DZ=SE(nd),hZ=["children","content"],mZ=["content","onContent","components","parsers","joiners","decorators","sectionIndex","verbose"];function SE(e){return e&&e.__esModule?e:{default:e}}function o9(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(o9=function(u){return u?r:t})(e)}function EZ(e,t){if(e&&e.__esModule)return e;if(e===null||Ea(e)!=="object"&&typeof e!="function")return{default:e};var r=o9(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function yZ(e){return FZ(e)||AZ(e)||gZ(e)||vZ()}function vZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gZ(e,t){if(e){if(typeof e=="string")return Eh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Eh(e,t)}}function AZ(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function FZ(e){if(Array.isArray(e))return Eh(e)}function Eh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function wZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var Nl={content:"",onContent:function(t){console.warn(`EditableContent.onContent() not provided: -`,t)},options:{sectionable:!0,blockable:!0,editable:!0,preview:!1},components:{document:function(t){var r=t.children;t.content;var n=I7(t,_Y);return li.default.createElement("div",Mi({className:"document"},n),r)}},parsers:{section:function(t){return t.split(` +`,t)},options:{sectionable:!0,blockable:!0,editable:!0,preview:!1},components:{document:function(t){var r=t.children;t.content;var n=a9(t,hZ);return li.default.createElement("div",Li({className:"document"},n),r)}},parsers:{section:function(t){return t.split(` `)},block:function(t){return t.split(` `)}},joiners:{section:` @@ -4785,73 +4785,73 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho `,r)},onBlockClick:function(t){t.content;var r=t.index;console.warn(`EditableContent.onBlockClick({content, index}) not provided. -`,r)}},sectionIndex:0};function DE(e){var t=e.content,r=e.onContent,n=e.components,u=e.parsers,s=e.joiners,o=e.decorators,a=e.sectionIndex,i=e.verbose,c=i===void 0?!1:i,l=I7(e,BY),p=(0,li.useMemo)(function(){return Ns(Ns({},Tl.components),n)},[]),f=p.document,d=Ns(Ns({},Tl.options),l.options),h=Ns(Ns({},Tl.handlers),l.handlers);(0,li.useEffect)(function(){c&&console.log("EditableContent First Render")},[]),(0,g1.useDeepCompareEffect)(function(){(0,CY.addArrowKeyNavigationToContenteditableElements)()},[d,t]);var E=(0,bY.default)({content:t,parsers:u,options:d}),A=(0,g1.useDeepCompareCallback)(function(F,B){var P=$Y(E);P[B]=F;var $=P.join(s.section);r($)},[E,r]),m=(0,g1.useDeepCompareMemo)(function(){var F,B=(0,SY.isRtl)(t)?"rtl":"";return F=E.map(function(P,$){var I={content:P,onContent:function(j){A(j,$)},onInput:l==null?void 0:l.onInput,show:!d.sectionable||a===-1||$===a,onShow:function(){h.onSectionClick({content:P,index:$})},index:$,components:p,options:d,parsers:u,joiners:s,handlers:h,decorators:o,dir:B,verbose:c};return li.default.createElement(wY.default,Mi({key:$},I))}),F},[E,d,u,s,o,h,a]),y=Ns({content:t,className:d.preview?"preview":""},l);return li.default.createElement(f,Mi({key:"1"},y),m)}DE.propTypes={content:Ct.default.string.isRequired,onContent:Ct.default.func,onInput:Ct.default.func,options:Ct.default.shape({sectionable:Ct.default.bool,blockable:Ct.default.bool,editable:Ct.default.bool,preview:Ct.default.bool}),components:Ct.default.shape({document:Ct.default.func,section:Ct.default.func,sectionHeading:Ct.default.func,sectionBody:Ct.default.func,block:Ct.default.func}),parsers:Ct.default.shape({section:Ct.default.func,block:Ct.default.func}),joiners:Ct.default.shape({section:Ct.default.string,block:Ct.default.string}),decorators:Ct.default.object,handlers:Ct.default.shape({onSectionClick:Ct.default.func,onBlockClick:Ct.default.func}),sectionIndex:Ct.default.number,verbose:Ct.default.bool};DE.defaultProps=Tl;var Zp={};Object.defineProperty(Zp,"__esModule",{value:!0});Zp.segmenter=void 0;function jY(e){return GY(e)||UY(e)||LY(e)||MY()}function MY(){throw new TypeError(`Invalid attempt to spread non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function LY(e,t){if(e){if(typeof e=="string")return ih(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return ih(e,t)}}function UY(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function GY(e){if(Array.isArray(e))return ih(e)}function ih(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var f=n.pop(),d=f.dataset.type==="graft",h=Hu(f.classList).includes("title"),E=Hu(f.classList).includes("introduction");d&&!h&&!E?p=[].concat(Hu(p),[f]):(n=[].concat(Hu(n),[f]),l=!1)}else l=!1;r=[].concat(Hu(r),[n]),n=Hu(p.reverse())}}return n=[].concat(Hu(n),[u]),!0}),r=[].concat(Hu(r),[n]),n=[],r.map(function(u){return u.map(function(s){return s.outerHTML}).join(` -`)})}}var EE={};function lh(e){"@babel/helpers - typeof";return lh=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},lh(e)}Object.defineProperty(EE,"__esModule",{value:!0});EE.default=tZ;var og=ZY(Et),YY=["nodes","children","content","className","verbose"];function N7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(N7=function(u){return u?r:t})(e)}function ZY(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||lh(e)!=="object"&&typeof e!="function")return{default:e};var r=N7(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function ph(){return ph=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function eZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function tZ(e){var t=e.nodes,r=t===void 0?{}:t,n=e.children;e.content;var u=e.className,s=e.verbose;QY(e,YY),(0,og.useEffect)(function(){return s&&console.log("Document: Mount/First Render"),function(){s&&console.log("Document: UnMount/Destroyed")}},[]);var o=r.sequence(),a=o.dataset,i=o.className;return og.default.createElement("section",ph({id:"sequence",className:"".concat(i," ").concat(u)},a),n)}function fh(e){"@babel/helpers - typeof";return fh=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},fh(e)}Object.defineProperty(zp,"__esModule",{value:!0});zp.default=vE;var A1=iZ(Et),_t=ac(ku),rZ=b7,nZ=ac(hE),uZ=ac(mE),sZ=ac(EE),oZ=ac(oc),aZ=["htmlSequence","onHtmlSequence","options","components","parsers","joiners","decorators","handlers","sectionIndex","verbose"];function ac(e){return e&&e.__esModule?e:{default:e}}function q7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(q7=function(u){return u?r:t})(e)}function iZ(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||fh(e)!=="object"&&typeof e!="function")return{default:e};var r=q7(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function dh(){return dh=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function pZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var Dh={decorators:{chapter:[/\\c\s+(\d*)/g,'$1'],verses:[/\\v\s+(\d*)/g,'$1']},joiners:{section:"",block:""}};function vE(e){var t=e.htmlSequence,r=e.onHtmlSequence,n=e.options,u=e.components,s=e.parsers,o=e.joiners,a=e.decorators,i=e.handlers,c=e.sectionIndex,l=e.verbose,p=l===void 0?!1:l,f=lZ(e,aZ),d=Du(Du({},Dh.decorators),a),h=Du(Du({},Dh.joiners),o);(0,A1.useEffect)(function(){return p&&console.log("PerfEditor First Render"),function(){p&&console.log("PerfEditor Unmount")}},[]);var E=new DOMParser,A=E.parseFromString(t,"text/html"),m={sequence:function(){return A.getElementsByTagName("section")[0]}},y=Du({returnHtml:!0},n),F=Du({section:(0,uZ.default)({nodes:m}),block:nZ.default},s),B=Du({document:function(U){return(0,sZ.default)(Du({nodes:m,verbose:p},U))},sectionHeading:oZ.default},u),P=function(U){m.sequence().innerHTML=U,r(m.sequence().outerHTML)},$=Du({content:m.sequence().innerHTML,onContent:P,options:y,components:B,parsers:F,joiners:h,decorators:d,handlers:i,sectionIndex:c,verbose:p},f);return A1.default.createElement("div",{className:"perf",key:"1"},A1.default.createElement(rZ.EditableContent,dh({key:"1"},$)))}vE.propTypes={htmlSequence:_t.default.string.isRequired,onHtmlSequence:_t.default.func,options:_t.default.shape({sectionable:_t.default.bool,blockable:_t.default.bool,editable:_t.default.bool,preview:_t.default.bool}),components:_t.default.shape({document:_t.default.func,section:_t.default.func,sectionHeading:_t.default.func,sectionBody:_t.default.func,block:_t.default.func}),parsers:_t.default.shape({section:_t.default.func,block:_t.default.func}),joiners:_t.default.shape({section:_t.default.string,block:_t.default.string}),decorators:_t.default.object,handlers:_t.default.shape({onSectionClick:_t.default.func,onBlockClick:_t.default.func}),sectionIndex:_t.default.number,verbose:_t.default.bool};vE.defaultProps=Dh;var ig;function x7(){if(ig)return Kc;ig=1;function e(W){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},e(W)}Object.defineProperty(Kc,"__esModule",{value:!0}),Kc.default=j;var t=d(Et),r=p(ku),n=Wp,u=p(rX),s=nu,o=ha,a=p(oc),i=p(EX()),c=p(zp),l=["htmlPerf","onHtmlPerf","sequenceIds","addSequenceId","options","components","handlers"];function p(W){return W&&W.__esModule?W:{default:W}}function f(W){if(typeof WeakMap!="function")return null;var te=new WeakMap,Y=new WeakMap;return(f=function(ie){return ie?Y:te})(W)}function d(W,te){if(!te&&W&&W.__esModule)return W;if(W===null||e(W)!=="object"&&typeof W!="function")return{default:W};var Y=f(te);if(Y&&Y.has(W))return Y.get(W);var oe={},ie=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var fe in W)if(fe!=="default"&&Object.prototype.hasOwnProperty.call(W,fe)){var De=ie?Object.getOwnPropertyDescriptor(W,fe):null;De&&(De.get||De.set)?Object.defineProperty(oe,fe,De):oe[fe]=W[fe]}return oe.default=W,Y&&Y.set(W,oe),oe}function h(W,te){var Y=Object.keys(W);if(Object.getOwnPropertySymbols){var oe=Object.getOwnPropertySymbols(W);te&&(oe=oe.filter(function(ie){return Object.getOwnPropertyDescriptor(W,ie).enumerable})),Y.push.apply(Y,oe)}return Y}function E(W){for(var te=1;teW.length)&&(te=W.length);for(var Y=0,oe=new Array(te);Y=0)&&Object.prototype.propertyIsEnumerable.call(W,oe)&&(Y[oe]=W[oe])}return Y}function U(W,te){if(W==null)return{};var Y={},oe=Object.keys(W),ie,fe;for(fe=0;fe=0)&&(Y[ie]=W[ie]);return Y}function j(W){var te=W.htmlPerf,Y=W.onHtmlPerf,oe=W.sequenceIds,ie=W.addSequenceId,fe=W.options,De=W.components,de=W.handlers,Ce=I(W,l),pe=(0,t.useState)({}),Q=m(pe,2),q=Q[0],v=Q[1],C=oe.at(-1),D=E({sectionHeading:a.default},De),g=(0,n.useDeepCompareMemo)(function(){return(0,s.embedPreviewTextInGrafts)({htmlPerf:te,sequenceId:C})},[te,C]),O=(0,t.useMemo)(function(){return(0,o.getTypeFromSequenceHtml)({htmlSequence:g})},[g]),b=(0,n.useDeepCompareMemo)(function(){return q[C]||0},[q,C]),w=(0,n.useDeepCompareCallback)(function(H){H.content;var re=H.index,_e=E({},q);_e[C]=re,v(_e)},[v,q]),x=(0,t.useCallback)(function(H){var re;H.content;var _e=H.element,Le=_e==null||(re=_e.dataset)===null||re===void 0?void 0:re.target;Le&&ie(Le)},[ie]),k=(0,n.useDeepCompareCallback)(function(H){var re=g!==H;if(re){var _e=structuredClone(te);_e.sequencesHtml[C]=H;var Le=!(0,u.default)(te,_e);if(Le){var Ue=(0,s.removePreviewTextInGrafts)({htmlPerf:_e,sequenceId:C});Y(Ue,{sequenceId:C,htmlSequence:H})}}},[te,Y,g,C]),G=E({htmlSequence:g,onHtmlSequence:k,components:E(E({},D),{},{sectionHeading:function(re){return D.sectionHeading(E({type:O},re))},block:function(re){return(0,i.default)(E({htmlPerf:te,onHtmlPerf:Y,sequenceIds:oe,addSequenceId:ie},re))}}),options:fe,handlers:E({onSectionClick:w,onBlockClick:x},de),decorators:{},sectionIndex:b},Ce);return t.default.createElement(c.default,G)}return j.propTypes={htmlPerf:r.default.object.isRequired,onHtmlPerf:r.default.func,options:r.default.shape({sectionable:r.default.bool,blockable:r.default.bool,editable:r.default.bool,preview:r.default.bool}),components:r.default.shape({document:r.default.func,section:r.default.func,sectionHeading:r.default.func,sectionBody:r.default.func,block:r.default.func}),parsers:r.default.shape({section:r.default.func,block:r.default.func}),joiners:r.default.shape({section:r.default.string,block:r.default.string}),decorators:r.default.object,handlers:r.default.shape({onSectionClick:r.default.func,onBlockClick:r.default.func}),sectionIndex:r.default.number,verbose:r.default.bool},j.defaultProps={sequenceIds:[]},Kc}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HtmlPerfEditor",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"HtmlSequenceEditor",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"SectionHeading",{enumerable:!0,get:function(){return n.default}});var t=u(x7()),r=u(zp),n=u(oc);function u(s){return s&&s.__esModule?s:{default:s}}})(Ym);const fZ=({content:e})=>{var n;const t=document.createElement("div");t.innerHTML=e;const{target:r}=((n=t.firstChild)==null?void 0:n.dataset)||{};return r};function dZ({htmlPerf:e,onHtmlPerf:t,sequenceIds:r,addSequenceId:n,options:u,content:s,contentEditable:o,...a}){let i;const c=!!s.match(/data-type="paragraph"/);if(c&&(i=xt.jsx("div",{className:"editor-paragraph",contentEditable:o,...a})),!c){const l=fZ({content:s});if(l&&!u.preview){const p={sequenceIds:[...r,l],addSequenceId:n,htmlPerf:e,onHtmlPerf:t,options:u};i=xt.jsx(Ym.HtmlPerfEditor,{...p})}i||(i=xt.jsx("div",{...a,contentEditable:!1}))}return xt.jsx(xt.Fragment,{children:i})}function DZ(){return xt.jsx("div",{className:"h-full w-full items-center justify-center flex",children:xt.jsxs("svg",{className:"animate-spin h-10 w-10",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[xt.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),xt.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}function hZ(e){const{sequenceIds:t,htmlPerf:r,sectionable:n,blockable:u,editable:s,preview:o,verbose:a,addSequenceId:i}=e,c=t.at(-1),l={onBlockClick:({element:d})=>{Oh.postMessage({type:h8.BLOCK_CLICK,payload:{action:"click"}});const{tagName:h}=d;h==="SPAN"&&console.log("onBlockClick",{element:d})}};function p(d){console.log({htmlPerf:d})}const f={htmlPerf:r,onHtmlPerf:p,sequenceIds:t,addSequenceId:i,components:{block:d=>dZ({htmlPerf:r,onHtmlPerf:p,sequenceIds:t,addSequenceId:i,...d})},options:{sectionable:n,blockable:u,editable:s,preview:o},decorators:{},verbose:a,handlers:l};return xt.jsx("div",{style:{fontFamily:"roboto",fontSize:"1rem",direction:"ltr",textAlign:"left"},children:xt.jsxs("div",{id:"bibleRefEditor",className:"bibleRefEditor",children:[!c&&xt.jsx(DZ,{}),c&&xt.jsx(Ym.HtmlPerfEditor,{...f})]})})}const mZ=e=>({"*":{"*":{tagName:"span"},sequence:{tagName:"section"}},wrapper:{"*":{tagName:"wrapper"},sequence:{tagName:"section"}},paragraph:{"*":{tagName:"p"},"usfm:mt":{classList:["major-title","paragraph","mt","hidden"],tagName:"h2",attributes:{contenteditable:!1}},"usfm:ms":{classList:["major-section-heading","paragraph","ms"],tagName:"h3",attributes:{contenteditable:!1}}},mark:{"*":{tagName:"span"},chapter:({atts:t})=>t?(e.lastChapter=t.number,{classList:["mark","chapter",`chapter-${t.number}`],id:`ch-${t.number}`,tagName:"span"}):{tagName:"span"},verses:({atts:t})=>({classList:t?["mark","verse",`verse-${t.number}`]:void 0,id:t?`ch${e.lastChapter}v${t.number}`:void 0,tagName:"span",attributes:{contenteditable:!1}})},graft:{heading:{tagName:"div"},title:{tagName:"div"},introduction:{tagName:"div"}}}),el=mZ({});var yE={},Qp={},hh={exports:{}},R7={},jn={},ga={},ic={},pt={},Li={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(y){if(super(),!e.IDENTIFIER.test(y))throw new Error("CodeGen: name must be a valid identifier");this.str=y}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(y){super(),this._items=typeof y=="string"?[y]:y}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const y=this._items[0];return y===""||y==='""'}get str(){var y;return(y=this._str)!==null&&y!==void 0?y:this._str=this._items.reduce((F,B)=>`${F}${B}`,"")}get names(){var y;return(y=this._names)!==null&&y!==void 0?y:this._names=this._items.reduce((F,B)=>(B instanceof r&&(F[B.str]=(F[B.str]||0)+1),F),{})}}e._Code=n,e.nil=new n("");function u(m,...y){const F=[m[0]];let B=0;for(;B{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${c}${p.scopePath}`})}scopeCode(c=this._values,l,p){return this._reduceValues(c,f=>{if(f.value===void 0)throw new Error(`CodeGen: name "${f}" has no value`);return f.value.code},l,p)}_reduceValues(c,l,p={},f){let d=t.nil;for(const h in c){const E=c[h];if(!E)continue;const A=p[h]=p[h]||new Map;E.forEach(m=>{if(A.has(m))return;A.set(m,n.Started);let y=l(m);if(y){const F=this.opts.es5?e.varKinds.var:e.varKinds.const;d=(0,t._)`${d}${F} ${m} = ${y};${this.opts._n}`}else if(y=f==null?void 0:f(m))d=(0,t._)`${d}${y}${this.opts._n}`;else throw new r(m);A.set(m,n.Completed)})}return d}}e.ValueScope=a})(mh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Li,r=mh;var n=Li;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var u=mh;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return u.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return u.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return u.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return u.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,g){return this}}class o extends s{constructor(D,g,O){super(),this.varKind=D,this.name=g,this.rhs=O}render({es5:D,_n:g}){const O=D?r.varKinds.var:this.varKind,b=this.rhs===void 0?"":` = ${this.rhs}`;return`${O} ${this.name}${b};`+g}optimizeNames(D,g){if(D[this.name.str])return this.rhs&&(this.rhs=ie(this.rhs,D,g)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(D,g,O){super(),this.lhs=D,this.rhs=g,this.sideEffects=O}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,g){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=ie(this.rhs,D,g),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return oe(D,this.rhs)}}class i extends a{constructor(D,g,O,b){super(D,O,b),this.op=g}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class c extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class l extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class f extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,g){return this.code=ie(this.code,D,g),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class d extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((g,O)=>g+O.render(D),"")}optimizeNodes(){const{nodes:D}=this;let g=D.length;for(;g--;){const O=D[g].optimizeNodes();Array.isArray(O)?D.splice(g,1,...O):O?D[g]=O:D.splice(g,1)}return D.length>0?this:void 0}optimizeNames(D,g){const{nodes:O}=this;let b=O.length;for(;b--;){const w=O[b];w.optimizeNames(D,g)||(fe(D,w.names),O.splice(b,1))}return O.length>0?this:void 0}get names(){return this.nodes.reduce((D,g)=>Y(D,g.names),{})}}class h extends d{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class E extends d{}class A extends h{}A.kind="else";class m extends h{constructor(D,g){super(g),this.condition=D}render(D){let g=`if(${this.condition})`+super.render(D);return this.else&&(g+="else "+this.else.render(D)),g}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let g=this.else;if(g){const O=g.optimizeNodes();g=this.else=Array.isArray(O)?new A(O):O}if(g)return D===!1?g instanceof m?g:g.nodes:this.nodes.length?this:new m(De(D),g instanceof m?[g]:g.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,g){var O;if(this.else=(O=this.else)===null||O===void 0?void 0:O.optimizeNames(D,g),!!(super.optimizeNames(D,g)||this.else))return this.condition=ie(this.condition,D,g),this}get names(){const D=super.names;return oe(D,this.condition),this.else&&Y(D,this.else.names),D}}m.kind="if";class y extends h{}y.kind="for";class F extends y{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iteration=ie(this.iteration,D,g),this}get names(){return Y(super.names,this.iteration.names)}}class B extends y{constructor(D,g,O,b){super(),this.varKind=D,this.name=g,this.from=O,this.to=b}render(D){const g=D.es5?r.varKinds.var:this.varKind,{name:O,from:b,to:w}=this;return`for(${g} ${O}=${b}; ${O}<${w}; ${O}++)`+super.render(D)}get names(){const D=oe(super.names,this.from);return oe(D,this.to)}}class P extends y{constructor(D,g,O,b){super(),this.loop=D,this.varKind=g,this.name=O,this.iterable=b}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iterable=ie(this.iterable,D,g),this}get names(){return Y(super.names,this.iterable.names)}}class $ extends h{constructor(D,g,O){super(),this.name=D,this.args=g,this.async=O}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}$.kind="func";class I extends d{render(D){return"return "+super.render(D)}}I.kind="return";class U extends h{render(D){let g="try"+super.render(D);return this.catch&&(g+=this.catch.render(D)),this.finally&&(g+=this.finally.render(D)),g}optimizeNodes(){var D,g;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(g=this.finally)===null||g===void 0||g.optimizeNodes(),this}optimizeNames(D,g){var O,b;return super.optimizeNames(D,g),(O=this.catch)===null||O===void 0||O.optimizeNames(D,g),(b=this.finally)===null||b===void 0||b.optimizeNames(D,g),this}get names(){const D=super.names;return this.catch&&Y(D,this.catch.names),this.finally&&Y(D,this.finally.names),D}}class j extends h{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}j.kind="catch";class W extends h{render(D){return"finally"+super.render(D)}}W.kind="finally";class te{constructor(D,g={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...g,_n:g.lines?` -`:""},this._extScope=D,this._scope=new r.Scope({parent:D}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,g){const O=this._extScope.value(D,g);return(this._values[O.prefix]||(this._values[O.prefix]=new Set)).add(O),O}getScopeValue(D,g){return this._extScope.getValue(D,g)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,g,O,b){const w=this._scope.toName(g);return O!==void 0&&b&&(this._constants[w.str]=O),this._leafNode(new o(D,w,O)),w}const(D,g,O){return this._def(r.varKinds.const,D,g,O)}let(D,g,O){return this._def(r.varKinds.let,D,g,O)}var(D,g,O){return this._def(r.varKinds.var,D,g,O)}assign(D,g,O){return this._leafNode(new a(D,g,O))}add(D,g){return this._leafNode(new i(D,e.operators.ADD,g))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new f(D)),this}object(...D){const g=["{"];for(const[O,b]of D)g.length>1&&g.push(","),g.push(O),(O!==b||this.opts.es5)&&(g.push(":"),(0,t.addCodeArg)(g,b));return g.push("}"),new t._Code(g)}if(D,g,O){if(this._blockNode(new m(D)),g&&O)this.code(g).else().code(O).endIf();else if(g)this.code(g).endIf();else if(O)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new m(D))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(m,A)}_for(D,g){return this._blockNode(D),g&&this.code(g).endFor(),this}for(D,g){return this._for(new F(D),g)}forRange(D,g,O,b,w=this.opts.es5?r.varKinds.var:r.varKinds.let){const x=this._scope.toName(D);return this._for(new B(w,x,g,O),()=>b(x))}forOf(D,g,O,b=r.varKinds.const){const w=this._scope.toName(D);if(this.opts.es5){const x=g instanceof t.Name?g:this.var("_arr",g);return this.forRange("_i",0,(0,t._)`${x}.length`,k=>{this.var(w,(0,t._)`${x}[${k}]`),O(w)})}return this._for(new P("of",b,w,g),()=>O(w))}forIn(D,g,O,b=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${g})`,O);const w=this._scope.toName(D);return this._for(new P("in",b,w,g),()=>O(w))}endFor(){return this._endBlockNode(y)}label(D){return this._leafNode(new c(D))}break(D){return this._leafNode(new l(D))}return(D){const g=new I;if(this._blockNode(g),this.code(D),g.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(I)}try(D,g,O){if(!g&&!O)throw new Error('CodeGen: "try" without "catch" and "finally"');const b=new U;if(this._blockNode(b),this.code(D),g){const w=this.name("e");this._currNode=b.catch=new j(w),g(w)}return O&&(this._currNode=b.finally=new W,this.code(O)),this._endBlockNode(j,W)}throw(D){return this._leafNode(new p(D))}block(D,g){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(g),this}endBlock(D){const g=this._blockStarts.pop();if(g===void 0)throw new Error("CodeGen: not in self-balancing block");const O=this._nodes.length-g;if(O<0||D!==void 0&&O!==D)throw new Error(`CodeGen: wrong number of nodes: ${O} vs ${D} expected`);return this._nodes.length=g,this}func(D,g=t.nil,O,b){return this._blockNode(new $(D,g,O)),b&&this.code(b).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,g){const O=this._currNode;if(O instanceof D||g&&O instanceof g)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${g?`${D.kind}/${g.kind}`:D.kind}"`)}_elseNode(D){const g=this._currNode;if(!(g instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=g.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const g=this._nodes;g[g.length-1]=D}}e.CodeGen=te;function Y(C,D){for(const g in D)C[g]=(C[g]||0)+(D[g]||0);return C}function oe(C,D){return D instanceof t._CodeOrName?Y(C,D.names):C}function ie(C,D,g){if(C instanceof t.Name)return O(C);if(!b(C))return C;return new t._Code(C._items.reduce((w,x)=>(x instanceof t.Name&&(x=O(x)),x instanceof t._Code?w.push(...x._items):w.push(x),w),[]));function O(w){const x=g[w.str];return x===void 0||D[w.str]!==1?w:(delete D[w.str],x)}function b(w){return w instanceof t._Code&&w._items.some(x=>x instanceof t.Name&&D[x.str]===1&&g[x.str]!==void 0)}}function fe(C,D){for(const g in D)C[g]=(C[g]||0)-(D[g]||0)}function De(C){return typeof C=="boolean"||typeof C=="number"||C===null?!C:(0,t._)`!${v(C)}`}e.not=De;const de=q(e.operators.AND);function Ce(...C){return C.reduce(de)}e.and=Ce;const pe=q(e.operators.OR);function Q(...C){return C.reduce(pe)}e.or=Q;function q(C){return(D,g)=>D===t.nil?g:g===t.nil?D:(0,t._)`${v(D)} ${C} ${v(g)}`}function v(C){return C instanceof t.Name?C:(0,t._)`(${C})`}})(pt);var yt={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.checkStrictMode=e.getErrorPath=e.Type=e.useFunc=e.setEvaluated=e.evaluatedPropsToName=e.mergeEvaluated=e.eachItem=e.unescapeJsonPointer=e.escapeJsonPointer=e.escapeFragment=e.unescapeFragment=e.schemaRefOrVal=e.schemaHasRulesButRef=e.schemaHasRules=e.checkUnknownRules=e.alwaysValidSchema=e.toHash=void 0;const t=pt,r=Li;function n($){const I={};for(const U of $)I[U]=!0;return I}e.toHash=n;function u($,I){return typeof I=="boolean"?I:Object.keys(I).length===0?!0:(s($,I),!o(I,$.self.RULES.all))}e.alwaysValidSchema=u;function s($,I=$.schema){const{opts:U,self:j}=$;if(!U.strictSchema||typeof I=="boolean")return;const W=j.RULES.keywords;for(const te in I)W[te]||P($,`unknown keyword: "${te}"`)}e.checkUnknownRules=s;function o($,I){if(typeof $=="boolean")return!$;for(const U in $)if(I[U])return!0;return!1}e.schemaHasRules=o;function a($,I){if(typeof $=="boolean")return!$;for(const U in $)if(U!=="$ref"&&I.all[U])return!0;return!1}e.schemaHasRulesButRef=a;function i({topSchemaRef:$,schemaPath:I},U,j,W){if(!W){if(typeof U=="number"||typeof U=="boolean")return U;if(typeof U=="string")return(0,t._)`${U}`}return(0,t._)`${$}${I}${(0,t.getProperty)(j)}`}e.schemaRefOrVal=i;function c($){return f(decodeURIComponent($))}e.unescapeFragment=c;function l($){return encodeURIComponent(p($))}e.escapeFragment=l;function p($){return typeof $=="number"?`${$}`:$.replace(/~/g,"~0").replace(/\//g,"~1")}e.escapeJsonPointer=p;function f($){return $.replace(/~1/g,"/").replace(/~0/g,"~")}e.unescapeJsonPointer=f;function d($,I){if(Array.isArray($))for(const U of $)I(U);else I($)}e.eachItem=d;function h({mergeNames:$,mergeToName:I,mergeValues:U,resultToName:j}){return(W,te,Y,oe)=>{const ie=Y===void 0?te:Y instanceof t.Name?(te instanceof t.Name?$(W,te,Y):I(W,te,Y),Y):te instanceof t.Name?(I(W,Y,te),te):U(te,Y);return oe===t.Name&&!(ie instanceof t.Name)?j(W,ie):ie}}e.mergeEvaluated={props:h({mergeNames:($,I,U)=>$.if((0,t._)`${U} !== true && ${I} !== undefined`,()=>{$.if((0,t._)`${I} === true`,()=>$.assign(U,!0),()=>$.assign(U,(0,t._)`${U} || {}`).code((0,t._)`Object.assign(${U}, ${I})`))}),mergeToName:($,I,U)=>$.if((0,t._)`${U} !== true`,()=>{I===!0?$.assign(U,!0):($.assign(U,(0,t._)`${U} || {}`),A($,U,I))}),mergeValues:($,I)=>$===!0?!0:{...$,...I},resultToName:E}),items:h({mergeNames:($,I,U)=>$.if((0,t._)`${U} !== true && ${I} !== undefined`,()=>$.assign(U,(0,t._)`${I} === true ? true : ${U} > ${I} ? ${U} : ${I}`)),mergeToName:($,I,U)=>$.if((0,t._)`${U} !== true`,()=>$.assign(U,I===!0?!0:(0,t._)`${U} > ${I} ? ${U} : ${I}`)),mergeValues:($,I)=>$===!0?!0:Math.max($,I),resultToName:($,I)=>$.var("items",I)})};function E($,I){if(I===!0)return $.var("props",!0);const U=$.var("props",(0,t._)`{}`);return I!==void 0&&A($,U,I),U}e.evaluatedPropsToName=E;function A($,I,U){Object.keys(U).forEach(j=>$.assign((0,t._)`${I}${(0,t.getProperty)(j)}`,!0))}e.setEvaluated=A;const m={};function y($,I){return $.scopeValue("func",{ref:I,code:m[I.code]||(m[I.code]=new r._Code(I.code))})}e.useFunc=y;var F;(function($){$[$.Num=0]="Num",$[$.Str=1]="Str"})(F=e.Type||(e.Type={}));function B($,I,U){if($ instanceof t.Name){const j=I===F.Num;return U?j?(0,t._)`"[" + ${$} + "]"`:(0,t._)`"['" + ${$} + "']"`:j?(0,t._)`"/" + ${$}`:(0,t._)`"/" + ${$}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return U?(0,t.getProperty)($).toString():"/"+p($)}e.getErrorPath=B;function P($,I,U=$.opts.strictSchema){if(U){if(I=`strict mode: ${I}`,U===!0)throw new Error(I);$.self.logger.warn(I)}}e.checkStrictMode=P})(yt);var lu={};Object.defineProperty(lu,"__esModule",{value:!0});const br=pt,EZ={data:new br.Name("data"),valCxt:new br.Name("valCxt"),instancePath:new br.Name("instancePath"),parentData:new br.Name("parentData"),parentDataProperty:new br.Name("parentDataProperty"),rootData:new br.Name("rootData"),dynamicAnchors:new br.Name("dynamicAnchors"),vErrors:new br.Name("vErrors"),errors:new br.Name("errors"),this:new br.Name("this"),self:new br.Name("self"),scope:new br.Name("scope"),json:new br.Name("json"),jsonPos:new br.Name("jsonPos"),jsonLen:new br.Name("jsonLen"),jsonPart:new br.Name("jsonPart")};lu.default=EZ;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=pt,r=yt,n=lu;e.keywordError={message:({keyword:A})=>(0,t.str)`must pass "${A}" keyword validation`},e.keyword$DataError={message:({keyword:A,schemaType:m})=>m?(0,t.str)`"${A}" keyword must be ${m} ($data)`:(0,t.str)`"${A}" keyword is invalid ($data)`};function u(A,m=e.keywordError,y,F){const{it:B}=A,{gen:P,compositeRule:$,allErrors:I}=B,U=p(A,m,y);F??($||I)?i(P,U):c(B,(0,t._)`[${U}]`)}e.reportError=u;function s(A,m=e.keywordError,y){const{it:F}=A,{gen:B,compositeRule:P,allErrors:$}=F,I=p(A,m,y);i(B,I),P||$||c(F,n.default.vErrors)}e.reportExtraError=s;function o(A,m){A.assign(n.default.errors,m),A.if((0,t._)`${n.default.vErrors} !== null`,()=>A.if(m,()=>A.assign((0,t._)`${n.default.vErrors}.length`,m),()=>A.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:A,keyword:m,schemaValue:y,data:F,errsCount:B,it:P}){if(B===void 0)throw new Error("ajv implementation error");const $=A.name("err");A.forRange("i",B,n.default.errors,I=>{A.const($,(0,t._)`${n.default.vErrors}[${I}]`),A.if((0,t._)`${$}.instancePath === undefined`,()=>A.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,P.errorPath))),A.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${P.errSchemaPath}/${m}`),P.opts.verbose&&(A.assign((0,t._)`${$}.schema`,y),A.assign((0,t._)`${$}.data`,F))})}e.extendErrors=a;function i(A,m){const y=A.const("err",m);A.if((0,t._)`${n.default.vErrors} === null`,()=>A.assign(n.default.vErrors,(0,t._)`[${y}]`),(0,t._)`${n.default.vErrors}.push(${y})`),A.code((0,t._)`${n.default.errors}++`)}function c(A,m){const{gen:y,validateName:F,schemaEnv:B}=A;B.$async?y.throw((0,t._)`new ${A.ValidationError}(${m})`):(y.assign((0,t._)`${F}.errors`,m),y.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(A,m,y){const{createErrors:F}=A.it;return F===!1?(0,t._)`{}`:f(A,m,y)}function f(A,m,y={}){const{gen:F,it:B}=A,P=[d(B,y),h(A,y)];return E(A,m,P),F.object(...P)}function d({errorPath:A},{instancePath:m}){const y=m?(0,t.str)`${A}${(0,r.getErrorPath)(m,r.Type.Str)}`:A;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,y)]}function h({keyword:A,it:{errSchemaPath:m}},{schemaPath:y,parentSchema:F}){let B=F?m:(0,t.str)`${m}/${A}`;return y&&(B=(0,t.str)`${B}${(0,r.getErrorPath)(y,r.Type.Str)}`),[l.schemaPath,B]}function E(A,{params:m,message:y},F){const{keyword:B,data:P,schemaValue:$,it:I}=A,{opts:U,propertyName:j,topSchemaRef:W,schemaPath:te}=I;F.push([l.keyword,B],[l.params,typeof m=="function"?m(A):m||(0,t._)`{}`]),U.messages&&F.push([l.message,typeof y=="function"?y(A):y]),U.verbose&&F.push([l.schema,$],[l.parentSchema,(0,t._)`${W}${te}`],[n.default.data,P]),j&&F.push([l.propertyName,j])}})(ic);Object.defineProperty(ga,"__esModule",{value:!0});ga.boolOrEmptySchema=ga.topBoolOrEmptySchema=void 0;const vZ=ic,yZ=pt,gZ=lu,AZ={message:"boolean schema is false"};function FZ(e){const{gen:t,schema:r,validateName:n}=e;r===!1?j7(e,!1):typeof r=="object"&&r.$async===!0?t.return(gZ.default.data):(t.assign((0,yZ._)`${n}.errors`,null),t.return(!0))}ga.topBoolOrEmptySchema=FZ;function CZ(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),j7(e)):r.var(t,!0)}ga.boolOrEmptySchema=CZ;function j7(e,t){const{gen:r,data:n}=e,u={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,vZ.reportError)(u,AZ,void 0,t)}var cc={},oo={};Object.defineProperty(oo,"__esModule",{value:!0});oo.getRules=oo.isJSONType=void 0;const bZ=["string","number","integer","boolean","null","object","array"],SZ=new Set(bZ);function wZ(e){return typeof e=="string"&&SZ.has(e)}oo.isJSONType=wZ;function _Z(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}oo.getRules=_Z;var wu={};Object.defineProperty(wu,"__esModule",{value:!0});wu.shouldUseRule=wu.shouldUseGroup=wu.schemaHasRulesForType=void 0;function BZ({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&M7(e,n)}wu.schemaHasRulesForType=BZ;function M7(e,t){return t.rules.some(r=>L7(e,r))}wu.shouldUseGroup=M7;function L7(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}wu.shouldUseRule=L7;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.reportTypeError=e.checkDataTypes=e.checkDataType=e.coerceAndCheckDataType=e.getJSONTypes=e.getSchemaTypes=e.DataType=void 0;const t=oo,r=wu,n=ic,u=pt,s=yt;var o;(function(F){F[F.Correct=0]="Correct",F[F.Wrong=1]="Wrong"})(o=e.DataType||(e.DataType={}));function a(F){const B=i(F.type);if(B.includes("null")){if(F.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!B.length&&F.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');F.nullable===!0&&B.push("null")}return B}e.getSchemaTypes=a;function i(F){const B=Array.isArray(F)?F:F?[F]:[];if(B.every(t.isJSONType))return B;throw new Error("type must be JSONType or JSONType[]: "+B.join(","))}e.getJSONTypes=i;function c(F,B){const{gen:P,data:$,opts:I}=F,U=p(B,I.coerceTypes),j=B.length>0&&!(U.length===0&&B.length===1&&(0,r.schemaHasRulesForType)(F,B[0]));if(j){const W=E(B,$,I.strictNumbers,o.Wrong);P.if(W,()=>{U.length?f(F,B,U):m(F)})}return j}e.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function p(F,B){return B?F.filter(P=>l.has(P)||B==="array"&&P==="array"):[]}function f(F,B,P){const{gen:$,data:I,opts:U}=F,j=$.let("dataType",(0,u._)`typeof ${I}`),W=$.let("coerced",(0,u._)`undefined`);U.coerceTypes==="array"&&$.if((0,u._)`${j} == 'object' && Array.isArray(${I}) && ${I}.length == 1`,()=>$.assign(I,(0,u._)`${I}[0]`).assign(j,(0,u._)`typeof ${I}`).if(E(B,I,U.strictNumbers),()=>$.assign(W,I))),$.if((0,u._)`${W} !== undefined`);for(const Y of P)(l.has(Y)||Y==="array"&&U.coerceTypes==="array")&&te(Y);$.else(),m(F),$.endIf(),$.if((0,u._)`${W} !== undefined`,()=>{$.assign(I,W),d(F,W)});function te(Y){switch(Y){case"string":$.elseIf((0,u._)`${j} == "number" || ${j} == "boolean"`).assign(W,(0,u._)`"" + ${I}`).elseIf((0,u._)`${I} === null`).assign(W,(0,u._)`""`);return;case"number":$.elseIf((0,u._)`${j} == "boolean" || ${I} === null - || (${j} == "string" && ${I} && ${I} == +${I})`).assign(W,(0,u._)`+${I}`);return;case"integer":$.elseIf((0,u._)`${j} === "boolean" || ${I} === null - || (${j} === "string" && ${I} && ${I} == +${I} && !(${I} % 1))`).assign(W,(0,u._)`+${I}`);return;case"boolean":$.elseIf((0,u._)`${I} === "false" || ${I} === 0 || ${I} === null`).assign(W,!1).elseIf((0,u._)`${I} === "true" || ${I} === 1`).assign(W,!0);return;case"null":$.elseIf((0,u._)`${I} === "" || ${I} === 0 || ${I} === false`),$.assign(W,null);return;case"array":$.elseIf((0,u._)`${j} === "string" || ${j} === "number" - || ${j} === "boolean" || ${I} === null`).assign(W,(0,u._)`[${I}]`)}}}function d({gen:F,parentData:B,parentDataProperty:P},$){F.if((0,u._)`${B} !== undefined`,()=>F.assign((0,u._)`${B}[${P}]`,$))}function h(F,B,P,$=o.Correct){const I=$===o.Correct?u.operators.EQ:u.operators.NEQ;let U;switch(F){case"null":return(0,u._)`${B} ${I} null`;case"array":U=(0,u._)`Array.isArray(${B})`;break;case"object":U=(0,u._)`${B} && typeof ${B} == "object" && !Array.isArray(${B})`;break;case"integer":U=j((0,u._)`!(${B} % 1) && !isNaN(${B})`);break;case"number":U=j();break;default:return(0,u._)`typeof ${B} ${I} ${F}`}return $===o.Correct?U:(0,u.not)(U);function j(W=u.nil){return(0,u.and)((0,u._)`typeof ${B} == "number"`,W,P?(0,u._)`isFinite(${B})`:u.nil)}}e.checkDataType=h;function E(F,B,P,$){if(F.length===1)return h(F[0],B,P,$);let I;const U=(0,s.toHash)(F);if(U.array&&U.object){const j=(0,u._)`typeof ${B} != "object"`;I=U.null?j:(0,u._)`!${B} || ${j}`,delete U.null,delete U.array,delete U.object}else I=u.nil;U.number&&delete U.integer;for(const j in U)I=(0,u.and)(I,h(j,B,P,$));return I}e.checkDataTypes=E;const A={message:({schema:F})=>`must be ${F}`,params:({schema:F,schemaValue:B})=>typeof F=="string"?(0,u._)`{type: ${F}}`:(0,u._)`{type: ${B}}`};function m(F){const B=y(F);(0,n.reportError)(B,A)}e.reportTypeError=m;function y(F){const{gen:B,data:P,schema:$}=F,I=(0,s.schemaRefOrVal)(F,$,"type");return{gen:B,keyword:"type",data:P,schema:$.type,schemaCode:I,schemaValue:I,parentSchema:$,params:{},it:F}}})(cc);var ef={};Object.defineProperty(ef,"__esModule",{value:!0});ef.assignDefaults=void 0;const ko=pt,TZ=yt;function $Z(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const u in r)cg(e,u,r[u].default);else t==="array"&&Array.isArray(n)&&n.forEach((u,s)=>cg(e,s,u.default))}ef.assignDefaults=$Z;function cg(e,t,r){const{gen:n,compositeRule:u,data:s,opts:o}=e;if(r===void 0)return;const a=(0,ko._)`${s}${(0,ko.getProperty)(t)}`;if(u){(0,TZ.checkStrictMode)(e,`default is ignored for: ${a}`);return}let i=(0,ko._)`${a} === undefined`;o.useDefaults==="empty"&&(i=(0,ko._)`${i} || ${a} === null || ${a} === ""`),n.if(i,(0,ko._)`${a} = ${(0,ko.stringify)(r)}`)}var uu={},it={};Object.defineProperty(it,"__esModule",{value:!0});it.validateUnion=it.validateArray=it.usePattern=it.callValidateCode=it.schemaProperties=it.allSchemaProperties=it.noPropertyInData=it.propertyInData=it.isOwnProperty=it.hasPropFunc=it.reportMissingProp=it.checkMissingProp=it.checkReportMissingProp=void 0;const Tt=pt,gE=yt,Wu=lu,PZ=yt;function OZ(e,t){const{gen:r,data:n,it:u}=e;r.if(FE(r,n,t,u.opts.ownProperties),()=>{e.setParams({missingProperty:(0,Tt._)`${t}`},!0),e.error()})}it.checkReportMissingProp=OZ;function kZ({gen:e,data:t,it:{opts:r}},n,u){return(0,Tt.or)(...n.map(s=>(0,Tt.and)(FE(e,t,s,r.ownProperties),(0,Tt._)`${u} = ${s}`)))}it.checkMissingProp=kZ;function IZ(e,t){e.setParams({missingProperty:t},!0),e.error()}it.reportMissingProp=IZ;function U7(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,Tt._)`Object.prototype.hasOwnProperty`})}it.hasPropFunc=U7;function AE(e,t,r){return(0,Tt._)`${U7(e)}.call(${t}, ${r})`}it.isOwnProperty=AE;function NZ(e,t,r,n){const u=(0,Tt._)`${t}${(0,Tt.getProperty)(r)} !== undefined`;return n?(0,Tt._)`${u} && ${AE(e,t,r)}`:u}it.propertyInData=NZ;function FE(e,t,r,n){const u=(0,Tt._)`${t}${(0,Tt.getProperty)(r)} === undefined`;return n?(0,Tt.or)(u,(0,Tt.not)(AE(e,t,r))):u}it.noPropertyInData=FE;function G7(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}it.allSchemaProperties=G7;function qZ(e,t){return G7(t).filter(r=>!(0,gE.alwaysValidSchema)(e,t[r]))}it.schemaProperties=qZ;function xZ({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:u,errorPath:s},it:o},a,i,c){const l=c?(0,Tt._)`${e}, ${t}, ${n}${u}`:t,p=[[Wu.default.instancePath,(0,Tt.strConcat)(Wu.default.instancePath,s)],[Wu.default.parentData,o.parentData],[Wu.default.parentDataProperty,o.parentDataProperty],[Wu.default.rootData,Wu.default.rootData]];o.opts.dynamicRef&&p.push([Wu.default.dynamicAnchors,Wu.default.dynamicAnchors]);const f=(0,Tt._)`${l}, ${r.object(...p)}`;return i!==Tt.nil?(0,Tt._)`${a}.call(${i}, ${f})`:(0,Tt._)`${a}(${f})`}it.callValidateCode=xZ;const RZ=(0,Tt._)`new RegExp`;function jZ({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:u}=t.code,s=u(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,Tt._)`${u.code==="new RegExp"?RZ:(0,PZ.useFunc)(e,u)}(${r}, ${n})`})}it.usePattern=jZ;function MZ(e){const{gen:t,data:r,keyword:n,it:u}=e,s=t.name("valid");if(u.allErrors){const a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){const i=t.const("len",(0,Tt._)`${r}.length`);t.forRange("i",0,i,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:gE.Type.Num},s),t.if((0,Tt.not)(s),a)})}}it.validateArray=MZ;function LZ(e){const{gen:t,schema:r,keyword:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(i=>(0,gE.alwaysValidSchema)(u,i))&&!u.opts.unevaluated)return;const o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((i,c)=>{const l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,Tt._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,Tt.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}it.validateUnion=LZ;Object.defineProperty(uu,"__esModule",{value:!0});uu.validateKeywordUsage=uu.validSchemaType=uu.funcKeywordCode=uu.macroKeywordCode=void 0;const Br=pt,Gs=lu,UZ=it,GZ=ic;function VZ(e,t){const{gen:r,keyword:n,schema:u,parentSchema:s,it:o}=e,a=t.macro.call(o.self,u,s,o),i=V7(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");e.subschema({schema:a,schemaPath:Br.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:i,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}uu.macroKeywordCode=VZ;function HZ(e,t){var r;const{gen:n,keyword:u,schema:s,parentSchema:o,$data:a,it:i}=e;JZ(i,t);const c=!a&&t.compile?t.compile.call(i.self,s,o,i):t.validate,l=V7(n,u,c),p=n.let("valid");e.block$data(p,f),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function f(){if(t.errors===!1)E(),t.modifying&&lg(e),A(()=>e.error());else{const m=t.async?d():h();t.modifying&&lg(e),A(()=>WZ(e,m))}}function d(){const m=n.let("ruleErrs",null);return n.try(()=>E((0,Br._)`await `),y=>n.assign(p,!1).if((0,Br._)`${y} instanceof ${i.ValidationError}`,()=>n.assign(m,(0,Br._)`${y}.errors`),()=>n.throw(y))),m}function h(){const m=(0,Br._)`${l}.errors`;return n.assign(m,null),E(Br.nil),m}function E(m=t.async?(0,Br._)`await `:Br.nil){const y=i.opts.passContext?Gs.default.this:Gs.default.self,F=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,Br._)`${m}${(0,UZ.callValidateCode)(e,l,y,F)}`,t.modifying)}function A(m){var y;n.if((0,Br.not)((y=t.valid)!==null&&y!==void 0?y:p),m)}}uu.funcKeywordCode=HZ;function lg(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Br._)`${n.parentData}[${n.parentDataProperty}]`))}function WZ(e,t){const{gen:r}=e;r.if((0,Br._)`Array.isArray(${t})`,()=>{r.assign(Gs.default.vErrors,(0,Br._)`${Gs.default.vErrors} === null ? ${t} : ${Gs.default.vErrors}.concat(${t})`).assign(Gs.default.errors,(0,Br._)`${Gs.default.vErrors}.length`),(0,GZ.extendErrors)(e)},()=>e.error())}function JZ({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function V7(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Br.stringify)(r)})}function zZ(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}uu.validSchemaType=zZ;function KZ({schema:e,opts:t,self:r,errSchemaPath:n},u,s){if(Array.isArray(u.keyword)?!u.keyword.includes(s):u.keyword!==s)throw new Error("ajv implementation error");const o=u.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(u.validateSchema&&!u.validateSchema(e[s])){const i=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(u.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(i);else throw new Error(i)}}uu.validateKeywordUsage=KZ;var ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.extendSubschemaMode=ss.extendSubschemaData=ss.getSubschema=void 0;const tu=pt,H7=yt;function XZ(e,{keyword:t,schemaProp:r,schema:n,schemaPath:u,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,tu._)`${e.schemaPath}${(0,tu.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,tu._)`${e.schemaPath}${(0,tu.getProperty)(t)}${(0,tu.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,H7.escapeFragment)(r)}`}}if(n!==void 0){if(u===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:u,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}ss.getSubschema=XZ;function YZ(e,t,{dataProp:r,dataPropType:n,data:u,dataTypes:s,propertyName:o}){if(u!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(r!==void 0){const{errorPath:c,dataPathArr:l,opts:p}=t,f=a.let("data",(0,tu._)`${t.data}${(0,tu.getProperty)(r)}`,!0);i(f),e.errorPath=(0,tu.str)`${c}${(0,H7.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,tu._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(u!==void 0){const c=u instanceof tu.Name?u:a.let("data",u,!0);i(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function i(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}ss.extendSubschemaData=YZ;function ZZ(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:u,allErrors:s}){n!==void 0&&(e.compositeRule=n),u!==void 0&&(e.createErrors=u),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}ss.extendSubschemaMode=ZZ;var yr={},W7=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,u,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(u=n;u--!==0;)if(!e(t[u],r[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(u=n;u--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[u]))return!1;for(u=n;u--!==0;){var o=s[u];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},J7={exports:{}},es=J7.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},u=r.post||function(){};$l(t,n,u,e,"",e)};es.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};es.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};es.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};es.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function $l(e,t,r,n,u,s,o,a,i,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,u,s,o,a,i,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in es.arrayKeywords)for(var f=0;ft+=z7(n)),t===1/0))return 1/0}return t}function K7(e,t="",r){r!==!1&&(t=la(t));const n=e.parse(t);return X7(e,n)}yr.getFullPath=K7;function X7(e,t){return e.serialize(t).split("#")[0]+"#"}yr._getFullPath=X7;const aQ=/#\/?$/;function la(e){return e?e.replace(aQ,""):""}yr.normalizeId=la;function iQ(e,t,r){return r=la(r),e.resolve(t,r)}yr.resolveUrl=iQ;const cQ=/^[a-z_][-a-z0-9._]*$/i;function lQ(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,u=la(e[r]||t),s={"":u},o=K7(n,u,!1),a={},i=new Set;return nQ(e,{allKeys:!0},(p,f,d,h)=>{if(h===void 0)return;const E=o+f;let A=s[h];typeof p[r]=="string"&&(A=m.call(this,p[r])),y.call(this,p.$anchor),y.call(this,p.$dynamicAnchor),s[f]=A;function m(F){const B=this.opts.uriResolver.resolve;if(F=la(A?B(A,F):F),i.has(F))throw l(F);i.add(F);let P=this.refs[F];return typeof P=="string"&&(P=this.refs[P]),typeof P=="object"?c(p,P.schema,F):F!==la(E)&&(F[0]==="#"?(c(p,a[F],F),a[F]=p):this.refs[F]=E),F}function y(F){if(typeof F=="string"){if(!cQ.test(F))throw new Error(`invalid anchor "${F}"`);m.call(this,`#${F}`)}}}),a;function c(p,f,d){if(f!==void 0&&!rQ(p,f))throw l(d)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}yr.getSchemaRefs=lQ;Object.defineProperty(jn,"__esModule",{value:!0});jn.getData=jn.KeywordCxt=jn.validateFunctionCode=void 0;const Y7=ga,pg=cc,CE=wu,hp=cc,pQ=ef,Ai=uu,F1=ss,He=pt,Ze=lu,fQ=yr,_u=yt,Ja=ic;function dQ(e){if(e9(e)&&(t9(e),Q7(e))){mQ(e);return}Z7(e,()=>(0,Y7.topBoolOrEmptySchema)(e))}jn.validateFunctionCode=dQ;function Z7({gen:e,validateName:t,schema:r,schemaEnv:n,opts:u},s){u.code.es5?e.func(t,(0,He._)`${Ze.default.data}, ${Ze.default.valCxt}`,n.$async,()=>{e.code((0,He._)`"use strict"; ${fg(r,u)}`),hQ(e,u),e.code(s)}):e.func(t,(0,He._)`${Ze.default.data}, ${DQ(u)}`,n.$async,()=>e.code(fg(r,u)).code(s))}function DQ(e){return(0,He._)`{${Ze.default.instancePath}="", ${Ze.default.parentData}, ${Ze.default.parentDataProperty}, ${Ze.default.rootData}=${Ze.default.data}${e.dynamicRef?(0,He._)`, ${Ze.default.dynamicAnchors}={}`:He.nil}}={}`}function hQ(e,t){e.if(Ze.default.valCxt,()=>{e.var(Ze.default.instancePath,(0,He._)`${Ze.default.valCxt}.${Ze.default.instancePath}`),e.var(Ze.default.parentData,(0,He._)`${Ze.default.valCxt}.${Ze.default.parentData}`),e.var(Ze.default.parentDataProperty,(0,He._)`${Ze.default.valCxt}.${Ze.default.parentDataProperty}`),e.var(Ze.default.rootData,(0,He._)`${Ze.default.valCxt}.${Ze.default.rootData}`),t.dynamicRef&&e.var(Ze.default.dynamicAnchors,(0,He._)`${Ze.default.valCxt}.${Ze.default.dynamicAnchors}`)},()=>{e.var(Ze.default.instancePath,(0,He._)`""`),e.var(Ze.default.parentData,(0,He._)`undefined`),e.var(Ze.default.parentDataProperty,(0,He._)`undefined`),e.var(Ze.default.rootData,Ze.default.data),t.dynamicRef&&e.var(Ze.default.dynamicAnchors,(0,He._)`{}`)})}function mQ(e){const{schema:t,opts:r,gen:n}=e;Z7(e,()=>{r.$comment&&t.$comment&&n9(e),AQ(e),n.let(Ze.default.vErrors,null),n.let(Ze.default.errors,0),r.unevaluated&&EQ(e),r9(e),bQ(e)})}function EQ(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,He._)`${r}.evaluated`),t.if((0,He._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,He._)`${e.evaluated}.props`,(0,He._)`undefined`)),t.if((0,He._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,He._)`${e.evaluated}.items`,(0,He._)`undefined`))}function fg(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,He._)`/*# sourceURL=${r} */`:He.nil}function vQ(e,t){if(e9(e)&&(t9(e),Q7(e))){yQ(e,t);return}(0,Y7.boolOrEmptySchema)(e,t)}function Q7({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function e9(e){return typeof e.schema!="boolean"}function yQ(e,t){const{schema:r,gen:n,opts:u}=e;u.$comment&&r.$comment&&n9(e),FQ(e),CQ(e);const s=n.const("_errs",Ze.default.errors);r9(e,s),n.var(t,(0,He._)`${s} === ${Ze.default.errors}`)}function t9(e){(0,_u.checkUnknownRules)(e),gQ(e)}function r9(e,t){if(e.opts.jtd)return dg(e,[],!1,t);const r=(0,pg.getSchemaTypes)(e.schema),n=(0,pg.coerceAndCheckDataType)(e,r);dg(e,r,!n,t)}function gQ(e){const{schema:t,errSchemaPath:r,opts:n,self:u}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,_u.schemaHasRulesButRef)(t,u.RULES)&&u.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function AQ(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,_u.checkStrictMode)(e,"default is ignored in the schema root")}function FQ(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,fQ.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function CQ(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function n9({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:u}){const s=r.$comment;if(u.$comment===!0)e.code((0,He._)`${Ze.default.self}.logger.log(${s})`);else if(typeof u.$comment=="function"){const o=(0,He.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,He._)`${Ze.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function bQ(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:u,opts:s}=e;r.$async?t.if((0,He._)`${Ze.default.errors} === 0`,()=>t.return(Ze.default.data),()=>t.throw((0,He._)`new ${u}(${Ze.default.vErrors})`)):(t.assign((0,He._)`${n}.errors`,Ze.default.vErrors),s.unevaluated&&SQ(e),t.return((0,He._)`${Ze.default.errors} === 0`))}function SQ({gen:e,evaluated:t,props:r,items:n}){r instanceof He.Name&&e.assign((0,He._)`${t}.props`,r),n instanceof He.Name&&e.assign((0,He._)`${t}.items`,n)}function dg(e,t,r,n){const{gen:u,schema:s,data:o,allErrors:a,opts:i,self:c}=e,{RULES:l}=c;if(s.$ref&&(i.ignoreKeywordsWithRef||!(0,_u.schemaHasRulesButRef)(s,l))){u.block(()=>o9(e,"$ref",l.all.$ref.definition));return}i.jtd||wQ(e,t),u.block(()=>{for(const f of l.rules)p(f);p(l.post)});function p(f){(0,CE.shouldUseGroup)(s,f)&&(f.type?(u.if((0,hp.checkDataType)(f.type,o,i.strictNumbers)),Dg(e,f),t.length===1&&t[0]===f.type&&r&&(u.else(),(0,hp.reportTypeError)(e)),u.endIf()):Dg(e,f),a||u.if((0,He._)`${Ze.default.errors} === ${n||0}`))}}function Dg(e,t){const{gen:r,schema:n,opts:{useDefaults:u}}=e;u&&(0,pQ.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,CE.shouldUseRule)(n,s)&&o9(e,s.keyword,s.definition,t.type)})}function wQ(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(_Q(e,t),e.opts.allowUnionTypes||BQ(e,t),TQ(e,e.dataTypes))}function _Q(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{u9(e.dataTypes,r)||bE(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),PQ(e,t)}}function BQ(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&bE(e,"use allowUnionTypes to allow union type keyword")}function TQ(e,t){const r=e.self.RULES.all;for(const n in r){const u=r[n];if(typeof u=="object"&&(0,CE.shouldUseRule)(e.schema,u)){const{type:s}=u.definition;s.length&&!s.some(o=>$Q(t,o))&&bE(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function $Q(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function u9(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function PQ(e,t){const r=[];for(const n of e.dataTypes)u9(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function bE(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,_u.checkStrictMode)(e,t,e.opts.strictTypes)}class s9{constructor(t,r,n){if((0,Ai.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,_u.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",a9(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Ai.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Ze.default.errors))}result(t,r,n){this.failResult((0,He.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,He.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,He._)`${r} !== undefined && (${(0,He.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ja.reportExtraError:Ja.reportError)(this,this.def.error,r)}$dataError(){(0,Ja.reportError)(this,this.def.$dataError||Ja.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ja.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=He.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=He.nil,r=He.nil){if(!this.$data)return;const{gen:n,schemaCode:u,schemaType:s,def:o}=this;n.if((0,He.or)((0,He._)`${u} === undefined`,r)),t!==He.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==He.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:u,it:s}=this;return(0,He.or)(o(),a());function o(){if(n.length){if(!(r instanceof He.Name))throw new Error("ajv implementation error");const i=Array.isArray(n)?n:[n];return(0,He._)`${(0,hp.checkDataTypes)(i,r,s.opts.strictNumbers,hp.DataType.Wrong)}`}return He.nil}function a(){if(u.validateSchema){const i=t.scopeValue("validate$data",{ref:u.validateSchema});return(0,He._)`!${i}(${r})`}return He.nil}}subschema(t,r){const n=(0,F1.getSubschema)(this.it,t);(0,F1.extendSubschemaData)(n,this.it,t),(0,F1.extendSubschemaMode)(n,t);const u={...this.it,...n,items:void 0,props:void 0};return vQ(u,r),u}mergeEvaluated(t,r){const{it:n,gen:u}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=_u.mergeEvaluated.props(u,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=_u.mergeEvaluated.items(u,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:u}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return u.if(r,()=>this.mergeEvaluated(t,He.Name)),!0}}jn.KeywordCxt=s9;function o9(e,t,r,n){const u=new s9(e,r,t);"code"in r?r.code(u,n):u.$data&&r.validate?(0,Ai.funcKeywordCode)(u,r):"macro"in r?(0,Ai.macroKeywordCode)(u,r):(r.compile||r.validate)&&(0,Ai.funcKeywordCode)(u,r)}const OQ=/^\/(?:[^~]|~0|~1)*$/,kQ=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function a9(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let u,s;if(e==="")return Ze.default.rootData;if(e[0]==="/"){if(!OQ.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);u=e,s=Ze.default.rootData}else{const c=kQ.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const l=+c[1];if(u=c[2],u==="#"){if(l>=t)throw new Error(i("property/index",l));return n[t-l]}if(l>t)throw new Error(i("data",l));if(s=r[t-l],!u)return s}let o=s;const a=u.split("/");for(const c of a)c&&(s=(0,He._)`${s}${(0,He.getProperty)((0,_u.unescapeJsonPointer)(c))}`,o=(0,He._)`${o} && ${s}`);return o;function i(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}jn.getData=a9;var lc={};Object.defineProperty(lc,"__esModule",{value:!0});class IQ extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}lc.default=IQ;var pc={};Object.defineProperty(pc,"__esModule",{value:!0});const C1=yr;class NQ extends Error{constructor(t,r,n,u){super(u||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,C1.resolveUrl)(t,r,n),this.missingSchema=(0,C1.normalizeId)((0,C1.getFullPath)(t,this.missingRef))}}pc.default=NQ;var Gr={};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.resolveSchema=Gr.getCompilingSchema=Gr.resolveRef=Gr.compileSchema=Gr.SchemaEnv=void 0;const Sn=pt,qQ=lc,qs=lu,qn=yr,hg=yt,xQ=jn;class tf{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,qn.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}Gr.SchemaEnv=tf;function SE(e){const t=i9.call(this,e);if(t)return t;const r=(0,qn.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:u}=this.opts.code,{ownProperties:s}=this.opts,o=new Sn.CodeGen(this.scope,{es5:n,lines:u,ownProperties:s});let a;e.$async&&(a=o.scopeValue("Error",{ref:qQ.default,code:(0,Sn._)`require("ajv/dist/runtime/validation_error").default`}));const i=o.scopeName("validate");e.validateName=i;const c={gen:o,allErrors:this.opts.allErrors,data:qs.default.data,parentData:qs.default.parentData,parentDataProperty:qs.default.parentDataProperty,dataNames:[qs.default.data],dataPathArr:[Sn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,Sn.stringify)(e.schema)}:{ref:e.schema}),validateName:i,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:Sn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,Sn._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,xQ.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const p=o.toString();l=`${o.scopeRefs(qs.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const d=new Function(`${qs.default.self}`,`${qs.default.scope}`,l)(this,this.scope.get());if(this.scope.value(i,{ref:d}),d.errors=null,d.schema=e.schema,d.schemaEnv=e,e.$async&&(d.$async=!0),this.opts.code.source===!0&&(d.source={validateName:i,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:E}=c;d.evaluated={props:h instanceof Sn.Name?void 0:h,items:E instanceof Sn.Name?void 0:E,dynamicProps:h instanceof Sn.Name,dynamicItems:E instanceof Sn.Name},d.source&&(d.source.evaluated=(0,Sn.stringify)(d.evaluated))}return e.validate=d,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}Gr.compileSchema=SE;function RQ(e,t,r){var n;r=(0,qn.resolveUrl)(this.opts.uriResolver,t,r);const u=e.refs[r];if(u)return u;let s=LQ.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new tf({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=jQ.call(this,s)}Gr.resolveRef=RQ;function jQ(e){return(0,qn.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:SE.call(this,e)}function i9(e){for(const t of this._compilations)if(MQ(t,e))return t}Gr.getCompilingSchema=i9;function MQ(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function LQ(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||rf.call(this,e,t)}function rf(e,t){const r=this.opts.uriResolver.parse(t),n=(0,qn._getFullPath)(this.opts.uriResolver,r);let u=(0,qn.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===u)return b1.call(this,r,e);const s=(0,qn.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const a=rf.call(this,e,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:b1.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||SE.call(this,o),s===(0,qn.normalizeId)(t)){const{schema:a}=o,{schemaId:i}=this.opts,c=a[i];return c&&(u=(0,qn.resolveUrl)(this.opts.uriResolver,u,c)),new tf({schema:a,schemaId:i,root:e,baseId:u})}return b1.call(this,r,o)}}Gr.resolveSchema=rf;const UQ=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function b1(e,{baseId:t,schema:r,root:n}){var u;if(((u=e.fragment)===null||u===void 0?void 0:u[0])!=="/")return;for(const a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const i=r[(0,hg.unescapeFragment)(a)];if(i===void 0)return;r=i;const c=typeof r=="object"&&r[this.opts.schemaId];!UQ.has(a)&&c&&(t=(0,qn.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,hg.schemaHasRulesButRef)(r,this.RULES)){const a=(0,qn.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=rf.call(this,n,a)}const{schemaId:o}=this.opts;if(s=s||new tf({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const GQ="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",VQ="Meta-schema for $data reference (JSON AnySchema extension proposal)",HQ="object",WQ=["$data"],JQ={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},zQ=!1,KQ={$id:GQ,description:VQ,type:HQ,required:WQ,properties:JQ,additionalProperties:zQ};var wE={},vh={exports:{}};/** @license URI.js v4.4.1 (c) 2011 Gary Court. License: http://github.com/garycourt/uri-js */(function(e,t){(function(r,n){n(t)})(we,function(r){function n(){for(var R=arguments.length,T=Array(R),M=0;M1){T[0]=T[0].slice(0,-1);for(var K=T.length-1,z=1;z= 0x80 (not a basic code point)","invalid-input":"Invalid input"},te=E-A,Y=Math.floor,oe=String.fromCharCode;function ie(R){throw new RangeError(W[R])}function fe(R,T){for(var M=[],K=R.length;K--;)M[K]=T(R[K]);return M}function De(R,T){var M=R.split("@"),K="";M.length>1&&(K=M[0]+"@",R=M[1]),R=R.replace(j,".");var z=R.split("."),me=fe(z,T).join(".");return K+me}function de(R){for(var T=[],M=0,K=R.length;M=55296&&z<=56319&&M>1,T+=Y(T/M);T>te*m>>1;z+=E)T=Y(T/te);return Y(z+(te+1)*T/(T+y))},v=function(T){var M=[],K=T.length,z=0,me=P,ve=B,Oe=T.lastIndexOf($);Oe<0&&(Oe=0);for(var Me=0;Me=128&&ie("not-basic"),M.push(T.charCodeAt(Me));for(var et=Oe>0?Oe+1:0;et=K&&ie("invalid-input");var Fe=pe(T.charCodeAt(et++));(Fe>=E||Fe>Y((h-z)/Je))&&ie("overflow"),z+=Fe*Je;var We=tt<=ve?A:tt>=ve+m?m:tt-ve;if(FeY(h/nt)&&ie("overflow"),Je*=nt}var Ke=M.length+1;ve=q(z-$e,Ke,$e==0),Y(z/Ke)>h-me&&ie("overflow"),me+=Y(z/Ke),z%=Ke,M.splice(z++,0,me)}return String.fromCodePoint.apply(String,M)},C=function(T){var M=[];T=de(T);var K=T.length,z=P,me=0,ve=B,Oe=!0,Me=!1,et=void 0;try{for(var $e=T[Symbol.iterator](),Je;!(Oe=(Je=$e.next()).done);Oe=!0){var tt=Je.value;tt<128&&M.push(oe(tt))}}catch(Pr){Me=!0,et=Pr}finally{try{!Oe&&$e.return&&$e.return()}finally{if(Me)throw et}}var Fe=M.length,We=Fe;for(Fe&&M.push($);We=z&&frY((h-me)/Ft)&&ie("overflow"),me+=(nt-z)*Ft,z=nt;var At=!0,dr=!1,Ht=void 0;try{for(var Kr=T[Symbol.iterator](),Bs;!(At=(Bs=Kr.next()).done);At=!0){var Ts=Bs.value;if(Tsh&&ie("overflow"),Ts==z){for(var vn=me,$r=E;;$r+=E){var yn=$r<=ve?A:$r>=ve+m?m:$r-ve;if(vn>6|192).toString(16).toUpperCase()+"%"+(T&63|128).toString(16).toUpperCase():M="%"+(T>>12|224).toString(16).toUpperCase()+"%"+(T>>6&63|128).toString(16).toUpperCase()+"%"+(T&63|128).toString(16).toUpperCase(),M}function x(R){for(var T="",M=0,K=R.length;M=194&&z<224){if(K-M>=6){var me=parseInt(R.substr(M+4,2),16);T+=String.fromCharCode((z&31)<<6|me&63)}else T+=R.substr(M,6);M+=6}else if(z>=224){if(K-M>=9){var ve=parseInt(R.substr(M+4,2),16),Oe=parseInt(R.substr(M+7,2),16);T+=String.fromCharCode((z&15)<<12|(ve&63)<<6|Oe&63)}else T+=R.substr(M,9);M+=9}else T+=R.substr(M,3),M+=3}return T}function k(R,T){function M(K){var z=x(K);return z.match(T.UNRESERVED)?z:K}return R.scheme&&(R.scheme=String(R.scheme).replace(T.PCT_ENCODED,M).toLowerCase().replace(T.NOT_SCHEME,"")),R.userinfo!==void 0&&(R.userinfo=String(R.userinfo).replace(T.PCT_ENCODED,M).replace(T.NOT_USERINFO,w).replace(T.PCT_ENCODED,o)),R.host!==void 0&&(R.host=String(R.host).replace(T.PCT_ENCODED,M).toLowerCase().replace(T.NOT_HOST,w).replace(T.PCT_ENCODED,o)),R.path!==void 0&&(R.path=String(R.path).replace(T.PCT_ENCODED,M).replace(R.scheme?T.NOT_PATH:T.NOT_PATH_NOSCHEME,w).replace(T.PCT_ENCODED,o)),R.query!==void 0&&(R.query=String(R.query).replace(T.PCT_ENCODED,M).replace(T.NOT_QUERY,w).replace(T.PCT_ENCODED,o)),R.fragment!==void 0&&(R.fragment=String(R.fragment).replace(T.PCT_ENCODED,M).replace(T.NOT_FRAGMENT,w).replace(T.PCT_ENCODED,o)),R}function G(R){return R.replace(/^0*(.*)/,"$1")||"0"}function H(R,T){var M=R.match(T.IPV4ADDRESS)||[],K=f(M,2),z=K[1];return z?z.split(".").map(G).join("."):R}function re(R,T){var M=R.match(T.IPV6ADDRESS)||[],K=f(M,3),z=K[1],me=K[2];if(z){for(var ve=z.toLowerCase().split("::").reverse(),Oe=f(ve,2),Me=Oe[0],et=Oe[1],$e=et?et.split(":").map(G):[],Je=Me.split(":").map(G),tt=T.IPV4ADDRESS.test(Je[Je.length-1]),Fe=tt?7:8,We=Je.length-Fe,nt=Array(Fe),Ke=0;Ke1){var rr=nt.slice(0,kt.index),fr=nt.slice(kt.index+kt.length);It=rr.join(":")+"::"+fr.join(":")}else It=nt.join(":");return me&&(It+="%"+me),It}else return R}var _e=/^(?:([^:\/?#]+):)?(?:\/\/((?:([^\/?#@]*)@)?(\[[^\/?#\]]+\]|[^\/?#:]*)(?:\:(\d*))?))?([^?#]*)(?:\?([^#]*))?(?:#((?:.|\n|\r)*))?/i,Le="".match(/(){0}/)[1]===void 0;function Ue(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M={},K=T.iri!==!1?p:l;T.reference==="suffix"&&(R=(T.scheme?T.scheme+":":"")+"//"+R);var z=R.match(_e);if(z){Le?(M.scheme=z[1],M.userinfo=z[3],M.host=z[4],M.port=parseInt(z[5],10),M.path=z[6]||"",M.query=z[7],M.fragment=z[8],isNaN(M.port)&&(M.port=z[5])):(M.scheme=z[1]||void 0,M.userinfo=R.indexOf("@")!==-1?z[3]:void 0,M.host=R.indexOf("//")!==-1?z[4]:void 0,M.port=parseInt(z[5],10),M.path=z[6]||"",M.query=R.indexOf("?")!==-1?z[7]:void 0,M.fragment=R.indexOf("#")!==-1?z[8]:void 0,isNaN(M.port)&&(M.port=R.match(/\/\/(?:.|\n)*\:(?:\/|\?|\#|$)/)?z[4]:void 0)),M.host&&(M.host=re(H(M.host,K),K)),M.scheme===void 0&&M.userinfo===void 0&&M.host===void 0&&M.port===void 0&&!M.path&&M.query===void 0?M.reference="same-document":M.scheme===void 0?M.reference="relative":M.fragment===void 0?M.reference="absolute":M.reference="uri",T.reference&&T.reference!=="suffix"&&T.reference!==M.reference&&(M.error=M.error||"URI is not a "+T.reference+" reference.");var me=b[(T.scheme||M.scheme||"").toLowerCase()];if(!T.unicodeSupport&&(!me||!me.unicodeSupport)){if(M.host&&(T.domainHost||me&&me.domainHost))try{M.host=O.toASCII(M.host.replace(K.PCT_ENCODED,x).toLowerCase())}catch(ve){M.error=M.error||"Host's domain name can not be converted to ASCII via punycode: "+ve}k(M,l)}else k(M,K);me&&me.parse&&me.parse(M,T)}else M.error=M.error||"URI can not be parsed.";return M}function Ge(R,T){var M=T.iri!==!1?p:l,K=[];return R.userinfo!==void 0&&(K.push(R.userinfo),K.push("@")),R.host!==void 0&&K.push(re(H(String(R.host),M),M).replace(M.IPV6ADDRESS,function(z,me,ve){return"["+me+(ve?"%25"+ve:"")+"]"})),(typeof R.port=="number"||typeof R.port=="string")&&(K.push(":"),K.push(String(R.port))),K.length?K.join(""):void 0}var be=/^\.\.?\//,je=/^\/\.(\/|$)/,ke=/^\/\.\.(\/|$)/,Ie=/^\/?(?:.|\n)*?(?=\/|$)/;function ce(R){for(var T=[];R.length;)if(R.match(be))R=R.replace(be,"");else if(R.match(je))R=R.replace(je,"/");else if(R.match(ke))R=R.replace(ke,"/"),T.pop();else if(R==="."||R==="..")R="";else{var M=R.match(Ie);if(M){var K=M[0];R=R.slice(K.length),T.push(K)}else throw new Error("Unexpected dot segment condition")}return T.join("")}function Te(R){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},M=T.iri?p:l,K=[],z=b[(T.scheme||R.scheme||"").toLowerCase()];if(z&&z.serialize&&z.serialize(R,T),R.host&&!M.IPV6ADDRESS.test(R.host)){if(T.domainHost||z&&z.domainHost)try{R.host=T.iri?O.toUnicode(R.host):O.toASCII(R.host.replace(M.PCT_ENCODED,x).toLowerCase())}catch(Oe){R.error=R.error||"Host's domain name can not be converted to "+(T.iri?"Unicode":"ASCII")+" via punycode: "+Oe}}k(R,M),T.reference!=="suffix"&&R.scheme&&(K.push(R.scheme),K.push(":"));var me=Ge(R,T);if(me!==void 0&&(T.reference!=="suffix"&&K.push("//"),K.push(me),R.path&&R.path.charAt(0)!=="/"&&K.push("/")),R.path!==void 0){var ve=R.path;!T.absolutePath&&(!z||!z.absolutePath)&&(ve=ce(ve)),me===void 0&&(ve=ve.replace(/^\/\//,"/%2F")),K.push(ve)}return R.query!==void 0&&(K.push("?"),K.push(R.query)),R.fragment!==void 0&&(K.push("#"),K.push(R.fragment)),K.join("")}function Z(R,T){var M=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},K=arguments[3],z={};return K||(R=Ue(Te(R,M),M),T=Ue(Te(T,M),M)),M=M||{},!M.tolerant&&T.scheme?(z.scheme=T.scheme,z.userinfo=T.userinfo,z.host=T.host,z.port=T.port,z.path=ce(T.path||""),z.query=T.query):(T.userinfo!==void 0||T.host!==void 0||T.port!==void 0?(z.userinfo=T.userinfo,z.host=T.host,z.port=T.port,z.path=ce(T.path||""),z.query=T.query):(T.path?(T.path.charAt(0)==="/"?z.path=ce(T.path):((R.userinfo!==void 0||R.host!==void 0||R.port!==void 0)&&!R.path?z.path="/"+T.path:R.path?z.path=R.path.slice(0,R.path.lastIndexOf("/")+1)+T.path:z.path=T.path,z.path=ce(z.path)),z.query=T.query):(z.path=R.path,T.query!==void 0?z.query=T.query:z.query=R.query),z.userinfo=R.userinfo,z.host=R.host,z.port=R.port),z.scheme=R.scheme),z.fragment=T.fragment,z}function ae(R,T,M){var K=i({scheme:"null"},M);return Te(Z(Ue(R,K),Ue(T,K),K,!0),K)}function le(R,T){return typeof R=="string"?R=Te(Ue(R,T),T):s(R)==="object"&&(R=Ue(Te(R,T),T)),R}function N(R,T,M){return typeof R=="string"?R=Te(Ue(R,M),M):s(R)==="object"&&(R=Te(R,M)),typeof T=="string"?T=Te(Ue(T,M),M):s(T)==="object"&&(T=Te(T,M)),R===T}function S(R,T){return R&&R.toString().replace(!T||!T.iri?l.ESCAPE:p.ESCAPE,w)}function _(R,T){return R&&R.toString().replace(!T||!T.iri?l.PCT_ENCODED:p.PCT_ENCODED,x)}var L={scheme:"http",domainHost:!0,parse:function(T,M){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T},serialize:function(T,M){var K=String(T.scheme).toLowerCase()==="https";return(T.port===(K?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}},J={scheme:"https",domainHost:L.domainHost,parse:L.parse,serialize:L.serialize};function ee(R){return typeof R.secure=="boolean"?R.secure:String(R.scheme).toLowerCase()==="wss"}var ue={scheme:"ws",domainHost:!0,parse:function(T,M){var K=T;return K.secure=ee(K),K.resourceName=(K.path||"/")+(K.query?"?"+K.query:""),K.path=void 0,K.query=void 0,K},serialize:function(T,M){if((T.port===(ee(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){var K=T.resourceName.split("?"),z=f(K,2),me=z[0],ve=z[1];T.path=me&&me!=="/"?me:void 0,T.query=ve,T.resourceName=void 0}return T.fragment=void 0,T}},ge={scheme:"wss",domainHost:ue.domainHost,parse:ue.parse,serialize:ue.serialize},Be={},qe="[A-Za-z0-9\\-\\.\\_\\~\\xA0-\\u200D\\u2010-\\u2029\\u202F-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFEF]",Pe="[0-9A-Fa-f]",rt=u(u("%[EFef]"+Pe+"%"+Pe+Pe+"%"+Pe+Pe)+"|"+u("%[89A-Fa-f]"+Pe+"%"+Pe+Pe)+"|"+u("%"+Pe+Pe)),Ar="[A-Za-z0-9\\!\\$\\%\\'\\*\\+\\-\\^\\_\\`\\{\\|\\}\\~]",sn="[\\!\\$\\%\\'\\(\\)\\*\\+\\,\\-\\.0-9\\<\\>A-Z\\x5E-\\x7E]",En=n(sn,'[\\"\\\\]'),xu="[\\!\\$\\'\\(\\)\\*\\+\\,\\;\\:\\@]",Wn=new RegExp(qe,"g"),Qt=new RegExp(rt,"g"),Cs=new RegExp(n("[^]",Ar,"[\\.]",'[\\"]',En),"g"),fu=new RegExp(n("[^]",qe,xu),"g"),bs=fu;function zr(R){var T=x(R);return T.match(Wn)?T:R}var Ss={scheme:"mailto",parse:function(T,M){var K=T,z=K.to=K.path?K.path.split(","):[];if(K.path=void 0,K.query){for(var me=!1,ve={},Oe=K.query.split("&"),Me=0,et=Oe.length;Menew RegExp(Q,q);d.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},m={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},y=200;function F(Q){var q,v,C,D,g,O,b,w,x,k,G,H,re,_e,Le,Ue,Ge,be,je,ke,Ie,ce,Te,Z,ae;const le=Q.strict,N=(q=Q.code)===null||q===void 0?void 0:q.optimize,S=N===!0||N===void 0?1:N||0,_=(C=(v=Q.code)===null||v===void 0?void 0:v.regExp)!==null&&C!==void 0?C:d,L=(D=Q.uriResolver)!==null&&D!==void 0?D:f.default;return{strictSchema:(O=(g=Q.strictSchema)!==null&&g!==void 0?g:le)!==null&&O!==void 0?O:!0,strictNumbers:(w=(b=Q.strictNumbers)!==null&&b!==void 0?b:le)!==null&&w!==void 0?w:!0,strictTypes:(k=(x=Q.strictTypes)!==null&&x!==void 0?x:le)!==null&&k!==void 0?k:"log",strictTuples:(H=(G=Q.strictTuples)!==null&&G!==void 0?G:le)!==null&&H!==void 0?H:"log",strictRequired:(_e=(re=Q.strictRequired)!==null&&re!==void 0?re:le)!==null&&_e!==void 0?_e:!1,code:Q.code?{...Q.code,optimize:S,regExp:_}:{optimize:S,regExp:_},loopRequired:(Le=Q.loopRequired)!==null&&Le!==void 0?Le:y,loopEnum:(Ue=Q.loopEnum)!==null&&Ue!==void 0?Ue:y,meta:(Ge=Q.meta)!==null&&Ge!==void 0?Ge:!0,messages:(be=Q.messages)!==null&&be!==void 0?be:!0,inlineRefs:(je=Q.inlineRefs)!==null&&je!==void 0?je:!0,schemaId:(ke=Q.schemaId)!==null&&ke!==void 0?ke:"$id",addUsedSchema:(Ie=Q.addUsedSchema)!==null&&Ie!==void 0?Ie:!0,validateSchema:(ce=Q.validateSchema)!==null&&ce!==void 0?ce:!0,validateFormats:(Te=Q.validateFormats)!==null&&Te!==void 0?Te:!0,unicodeRegExp:(Z=Q.unicodeRegExp)!==null&&Z!==void 0?Z:!0,int32range:(ae=Q.int32range)!==null&&ae!==void 0?ae:!0,uriResolver:L}}class B{constructor(q={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,q=this.opts={...q,...F(q)};const{es5:v,lines:C}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:E,es5:v,lines:C}),this.logger=Y(q.logger);const D=q.validateFormats;q.validateFormats=!1,this.RULES=(0,s.getRules)(),P.call(this,A,q,"NOT SUPPORTED"),P.call(this,m,q,"DEPRECATED","warn"),this._metaOpts=W.call(this),q.formats&&U.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),q.keywords&&j.call(this,q.keywords),typeof q.meta=="object"&&this.addMetaSchema(q.meta),I.call(this),q.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:q,meta:v,schemaId:C}=this.opts;let D=p;C==="id"&&(D={...p},D.id=D.$id,delete D.$id),v&&q&&this.addMetaSchema(D,D[C],!1)}defaultMeta(){const{meta:q,schemaId:v}=this.opts;return this.opts.defaultMeta=typeof q=="object"?q[v]||q:void 0}validate(q,v){let C;if(typeof q=="string"){if(C=this.getSchema(q),!C)throw new Error(`no schema with key or ref "${q}"`)}else C=this.compile(q);const D=C(v);return"$async"in C||(this.errors=C.errors),D}compile(q,v){const C=this._addSchema(q,v);return C.validate||this._compileSchemaEnv(C)}compileAsync(q,v){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:C}=this.opts;return D.call(this,q,v);async function D(k,G){await g.call(this,k.$schema);const H=this._addSchema(k,G);return H.validate||O.call(this,H)}async function g(k){k&&!this.getSchema(k)&&await D.call(this,{$ref:k},!0)}async function O(k){try{return this._compileSchemaEnv(k)}catch(G){if(!(G instanceof u.default))throw G;return b.call(this,G),await w.call(this,G.missingSchema),O.call(this,k)}}function b({missingSchema:k,missingRef:G}){if(this.refs[k])throw new Error(`AnySchema ${k} is loaded but ${G} cannot be resolved`)}async function w(k){const G=await x.call(this,k);this.refs[k]||await g.call(this,G.$schema),this.refs[k]||this.addSchema(G,k,v)}async function x(k){const G=this._loading[k];if(G)return G;try{return await(this._loading[k]=C(k))}finally{delete this._loading[k]}}}addSchema(q,v,C,D=this.opts.validateSchema){if(Array.isArray(q)){for(const O of q)this.addSchema(O,void 0,C,D);return this}let g;if(typeof q=="object"){const{schemaId:O}=this.opts;if(g=q[O],g!==void 0&&typeof g!="string")throw new Error(`schema ${O} must be string`)}return v=(0,i.normalizeId)(v||g),this._checkUnique(v),this.schemas[v]=this._addSchema(q,C,v,D,!0),this}addMetaSchema(q,v,C=this.opts.validateSchema){return this.addSchema(q,v,!0,C),this}validateSchema(q,v){if(typeof q=="boolean")return!0;let C;if(C=q.$schema,C!==void 0&&typeof C!="string")throw new Error("$schema must be a string");if(C=C||this.opts.defaultMeta||this.defaultMeta(),!C)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(C,q);if(!D&&v){const g="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(g);else throw new Error(g)}return D}getSchema(q){let v;for(;typeof(v=$.call(this,q))=="string";)q=v;if(v===void 0){const{schemaId:C}=this.opts,D=new o.SchemaEnv({schema:{},schemaId:C});if(v=o.resolveSchema.call(this,D,q),!v)return;this.refs[q]=v}return v.validate||this._compileSchemaEnv(v)}removeSchema(q){if(q instanceof RegExp)return this._removeAllSchemas(this.schemas,q),this._removeAllSchemas(this.refs,q),this;switch(typeof q){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const v=$.call(this,q);return typeof v=="object"&&this._cache.delete(v.schema),delete this.schemas[q],delete this.refs[q],this}case"object":{const v=q;this._cache.delete(v);let C=q[this.opts.schemaId];return C&&(C=(0,i.normalizeId)(C),delete this.schemas[C],delete this.refs[C]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(q){for(const v of q)this.addKeyword(v);return this}addKeyword(q,v){let C;if(typeof q=="string")C=q,typeof v=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),v.keyword=C);else if(typeof q=="object"&&v===void 0){if(v=q,C=v.keyword,Array.isArray(C)&&!C.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(ie.call(this,C,v),!v)return(0,l.eachItem)(C,g=>fe.call(this,g)),this;de.call(this,v);const D={...v,type:(0,c.getJSONTypes)(v.type),schemaType:(0,c.getJSONTypes)(v.schemaType)};return(0,l.eachItem)(C,D.type.length===0?g=>fe.call(this,g,D):g=>D.type.forEach(O=>fe.call(this,g,D,O))),this}getKeyword(q){const v=this.RULES.all[q];return typeof v=="object"?v.definition:!!v}removeKeyword(q){const{RULES:v}=this;delete v.keywords[q],delete v.all[q];for(const C of v.rules){const D=C.rules.findIndex(g=>g.keyword===q);D>=0&&C.rules.splice(D,1)}return this}addFormat(q,v){return typeof v=="string"&&(v=new RegExp(v)),this.formats[q]=v,this}errorsText(q=this.errors,{separator:v=", ",dataVar:C="data"}={}){return!q||q.length===0?"No errors":q.map(D=>`${C}${D.instancePath} ${D.message}`).reduce((D,g)=>D+v+g)}$dataMetaSchema(q,v){const C=this.RULES.all;q=JSON.parse(JSON.stringify(q));for(const D of v){const g=D.split("/").slice(1);let O=q;for(const b of g)O=O[b];for(const b in C){const w=C[b];if(typeof w!="object")continue;const{$data:x}=w.definition,k=O[b];x&&k&&(O[b]=pe(k))}}return q}_removeAllSchemas(q,v){for(const C in q){const D=q[C];(!v||v.test(C))&&(typeof D=="string"?delete q[C]:D&&!D.meta&&(this._cache.delete(D.schema),delete q[C]))}}_addSchema(q,v,C,D=this.opts.validateSchema,g=this.opts.addUsedSchema){let O;const{schemaId:b}=this.opts;if(typeof q=="object")O=q[b];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof q!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(q);if(w!==void 0)return w;C=(0,i.normalizeId)(O||C);const x=i.getSchemaRefs.call(this,q,C);return w=new o.SchemaEnv({schema:q,schemaId:b,meta:v,baseId:C,localRefs:x}),this._cache.set(w.schema,w),g&&!C.startsWith("#")&&(C&&this._checkUnique(C),this.refs[C]=w),D&&this.validateSchema(q,!0),w}_checkUnique(q){if(this.schemas[q]||this.refs[q])throw new Error(`schema with key or id "${q}" already exists`)}_compileSchemaEnv(q){if(q.meta?this._compileMetaSchema(q):o.compileSchema.call(this,q),!q.validate)throw new Error("ajv implementation error");return q.validate}_compileMetaSchema(q){const v=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,q)}finally{this.opts=v}}}e.default=B,B.ValidationError=n.default,B.MissingRefError=u.default;function P(Q,q,v,C="error"){for(const D in Q){const g=D;g in q&&this.logger[C](`${v}: option ${D}. ${Q[g]}`)}}function $(Q){return Q=(0,i.normalizeId)(Q),this.schemas[Q]||this.refs[Q]}function I(){const Q=this.opts.schemas;if(Q)if(Array.isArray(Q))this.addSchema(Q);else for(const q in Q)this.addSchema(Q[q],q)}function U(){for(const Q in this.opts.formats){const q=this.opts.formats[Q];q&&this.addFormat(Q,q)}}function j(Q){if(Array.isArray(Q)){this.addVocabulary(Q);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const q in Q){const v=Q[q];v.keyword||(v.keyword=q),this.addKeyword(v)}}function W(){const Q={...this.opts};for(const q of h)delete Q[q];return Q}const te={log(){},warn(){},error(){}};function Y(Q){if(Q===!1)return te;if(Q===void 0)return console;if(Q.log&&Q.warn&&Q.error)return Q;throw new Error("logger must implement log, warn and error methods")}const oe=/^[a-z_$][a-z0-9_$:-]*$/i;function ie(Q,q){const{RULES:v}=this;if((0,l.eachItem)(Q,C=>{if(v.keywords[C])throw new Error(`Keyword ${C} is already defined`);if(!oe.test(C))throw new Error(`Keyword ${C} has invalid name`)}),!!q&&q.$data&&!("code"in q||"validate"in q))throw new Error('$data keyword must have "code" or "validate" function')}function fe(Q,q,v){var C;const D=q==null?void 0:q.post;if(v&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:g}=this;let O=D?g.post:g.rules.find(({type:w})=>w===v);if(O||(O={type:v,rules:[]},g.rules.push(O)),g.keywords[Q]=!0,!q)return;const b={keyword:Q,definition:{...q,type:(0,c.getJSONTypes)(q.type),schemaType:(0,c.getJSONTypes)(q.schemaType)}};q.before?De.call(this,O,b,q.before):O.rules.push(b),g.all[Q]=b,(C=q.implements)===null||C===void 0||C.forEach(w=>this.addKeyword(w))}function De(Q,q,v){const C=Q.rules.findIndex(D=>D.keyword===v);C>=0?Q.rules.splice(C,0,q):(Q.rules.push(q),this.logger.warn(`rule ${v} is not defined`))}function de(Q){let{metaSchema:q}=Q;q!==void 0&&(Q.$data&&this.opts.$data&&(q=pe(q)),Q.validateSchema=this.compile(q,!0))}const Ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(Q){return{anyOf:[Q,Ce]}}})(R7);var _E={},BE={},TE={};Object.defineProperty(TE,"__esModule",{value:!0});const YQ={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};TE.default=YQ;var ao={};Object.defineProperty(ao,"__esModule",{value:!0});ao.callRef=ao.getValidate=void 0;const ZQ=pc,mg=it,xr=pt,Io=lu,Eg=Gr,tl=yt,QQ={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:u,schemaEnv:s,validateName:o,opts:a,self:i}=n,{root:c}=s;if((r==="#"||r==="#/")&&u===c.baseId)return p();const l=Eg.resolveRef.call(i,c,u,r);if(l===void 0)throw new ZQ.default(n.opts.uriResolver,u,r);if(l instanceof Eg.SchemaEnv)return f(l);return d(l);function p(){if(s===c)return Pl(e,o,s,s.$async);const h=t.scopeValue("root",{ref:c});return Pl(e,(0,xr._)`${h}.validate`,c,c.$async)}function f(h){const E=l9(e,h);Pl(e,E,h,h.$async)}function d(h){const E=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,xr.stringify)(h)}:{ref:h}),A=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:xr.nil,topSchemaRef:E,errSchemaPath:r},A);e.mergeEvaluated(m),e.ok(A)}}};function l9(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,xr._)`${r.scopeValue("wrapper",{ref:t})}.validate`}ao.getValidate=l9;function Pl(e,t,r,n){const{gen:u,it:s}=e,{allErrors:o,schemaEnv:a,opts:i}=s,c=i.passContext?Io.default.this:xr.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=u.let("valid");u.try(()=>{u.code((0,xr._)`await ${(0,mg.callValidateCode)(e,t,c)}`),d(t),o||u.assign(h,!0)},E=>{u.if((0,xr._)`!(${E} instanceof ${s.ValidationError})`,()=>u.throw(E)),f(E),o||u.assign(h,!1)}),e.ok(h)}function p(){e.result((0,mg.callValidateCode)(e,t,c),()=>d(t),()=>f(t))}function f(h){const E=(0,xr._)`${h}.errors`;u.assign(Io.default.vErrors,(0,xr._)`${Io.default.vErrors} === null ? ${E} : ${Io.default.vErrors}.concat(${E})`),u.assign(Io.default.errors,(0,xr._)`${Io.default.vErrors}.length`)}function d(h){var E;if(!s.opts.unevaluated)return;const A=(E=r==null?void 0:r.validate)===null||E===void 0?void 0:E.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=tl.mergeEvaluated.props(u,A.props,s.props));else{const m=u.var("props",(0,xr._)`${h}.evaluated.props`);s.props=tl.mergeEvaluated.props(u,m,s.props,xr.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=tl.mergeEvaluated.items(u,A.items,s.items));else{const m=u.var("items",(0,xr._)`${h}.evaluated.items`);s.items=tl.mergeEvaluated.items(u,m,s.items,xr.Name)}}}ao.callRef=Pl;ao.default=QQ;Object.defineProperty(BE,"__esModule",{value:!0});const eee=TE,tee=ao,ree=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",eee.default,tee.default];BE.default=ree;var $E={},PE={};Object.defineProperty(PE,"__esModule",{value:!0});const mp=pt,Ju=mp.operators,Ep={maximum:{okStr:"<=",ok:Ju.LTE,fail:Ju.GT},minimum:{okStr:">=",ok:Ju.GTE,fail:Ju.LT},exclusiveMaximum:{okStr:"<",ok:Ju.LT,fail:Ju.GTE},exclusiveMinimum:{okStr:">",ok:Ju.GT,fail:Ju.LTE}},nee={message:({keyword:e,schemaCode:t})=>(0,mp.str)`must be ${Ep[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,mp._)`{comparison: ${Ep[e].okStr}, limit: ${t}}`},uee={keyword:Object.keys(Ep),type:"number",schemaType:"number",$data:!0,error:nee,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,mp._)`${r} ${Ep[t].fail} ${n} || isNaN(${r})`)}};PE.default=uee;var OE={};Object.defineProperty(OE,"__esModule",{value:!0});const Fi=pt,see={message:({schemaCode:e})=>(0,Fi.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Fi._)`{multipleOf: ${e}}`},oee={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:see,code(e){const{gen:t,data:r,schemaCode:n,it:u}=e,s=u.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,Fi._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Fi._)`${o} !== parseInt(${o})`;e.fail$data((0,Fi._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};OE.default=oee;var kE={},IE={};Object.defineProperty(IE,"__esModule",{value:!0});function p9(e){const t=e.length;let r=0,n=0,u;for(;n=55296&&u<=56319&&n(0,Vs._)`{limit: ${e}}`},lee={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:cee,code(e){const{keyword:t,data:r,schemaCode:n,it:u}=e,s=t==="maxLength"?Vs.operators.GT:Vs.operators.LT,o=u.opts.unicode===!1?(0,Vs._)`${r}.length`:(0,Vs._)`${(0,aee.useFunc)(e.gen,iee.default)}(${r})`;e.fail$data((0,Vs._)`${o} ${s} ${n}`)}};kE.default=lee;var NE={};Object.defineProperty(NE,"__esModule",{value:!0});const pee=it,vp=pt,fee={message:({schemaCode:e})=>(0,vp.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,vp._)`{pattern: ${e}}`},dee={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:fee,code(e){const{data:t,$data:r,schema:n,schemaCode:u,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?(0,vp._)`(new RegExp(${u}, ${o}))`:(0,pee.usePattern)(e,n);e.fail$data((0,vp._)`!${a}.test(${t})`)}};NE.default=dee;var qE={};Object.defineProperty(qE,"__esModule",{value:!0});const Ci=pt,Dee={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,Ci.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,Ci._)`{limit: ${e}}`},hee={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:Dee,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxProperties"?Ci.operators.GT:Ci.operators.LT;e.fail$data((0,Ci._)`Object.keys(${r}).length ${u} ${n}`)}};qE.default=hee;var xE={};Object.defineProperty(xE,"__esModule",{value:!0});const za=it,bi=pt,mee=yt,Eee={message:({params:{missingProperty:e}})=>(0,bi.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,bi._)`{missingProperty: ${e}}`},vee={keyword:"required",type:"object",schemaType:"array",$data:!0,error:Eee,code(e){const{gen:t,schema:r,schemaCode:n,data:u,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;const i=r.length>=a.loopRequired;if(o.allErrors?c():l(),a.strictRequired){const d=e.parentSchema.properties,{definedProperties:h}=e.it;for(const E of r)if((d==null?void 0:d[E])===void 0&&!h.has(E)){const A=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${E}" is not defined at "${A}" (strictRequired)`;(0,mee.checkStrictMode)(o,m,o.opts.strictRequired)}}function c(){if(i||s)e.block$data(bi.nil,p);else for(const d of r)(0,za.checkReportMissingProp)(e,d)}function l(){const d=t.let("missing");if(i||s){const h=t.let("valid",!0);e.block$data(h,()=>f(d,h)),e.ok(h)}else t.if((0,za.checkMissingProp)(e,r,d)),(0,za.reportMissingProp)(e,d),t.else()}function p(){t.forOf("prop",n,d=>{e.setParams({missingProperty:d}),t.if((0,za.noPropertyInData)(t,u,d,a.ownProperties),()=>e.error())})}function f(d,h){e.setParams({missingProperty:d}),t.forOf(d,n,()=>{t.assign(h,(0,za.propertyInData)(t,u,d,a.ownProperties)),t.if((0,bi.not)(h),()=>{e.error(),t.break()})},bi.nil)}}};xE.default=vee;var RE={};Object.defineProperty(RE,"__esModule",{value:!0});const Si=pt,yee={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,Si.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,Si._)`{limit: ${e}}`},gee={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:yee,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxItems"?Si.operators.GT:Si.operators.LT;e.fail$data((0,Si._)`${r}.length ${u} ${n}`)}};RE.default=gee;var jE={},fc={};Object.defineProperty(fc,"__esModule",{value:!0});const f9=W7;f9.code='require("ajv/dist/runtime/equal").default';fc.default=f9;Object.defineProperty(jE,"__esModule",{value:!0});const S1=cc,mr=pt,Aee=yt,Fee=fc,Cee={message:({params:{i:e,j:t}})=>(0,mr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,mr._)`{i: ${e}, j: ${t}}`},bee={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:Cee,code(e){const{gen:t,data:r,$data:n,schema:u,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!u)return;const i=t.let("valid"),c=s.items?(0,S1.getSchemaTypes)(s.items):[];e.block$data(i,l,(0,mr._)`${o} === false`),e.ok(i);function l(){const h=t.let("i",(0,mr._)`${r}.length`),E=t.let("j");e.setParams({i:h,j:E}),t.assign(i,!0),t.if((0,mr._)`${h} > 1`,()=>(p()?f:d)(h,E))}function p(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function f(h,E){const A=t.name("item"),m=(0,S1.checkDataTypes)(c,A,a.opts.strictNumbers,S1.DataType.Wrong),y=t.const("indices",(0,mr._)`{}`);t.for((0,mr._)`;${h}--;`,()=>{t.let(A,(0,mr._)`${r}[${h}]`),t.if(m,(0,mr._)`continue`),c.length>1&&t.if((0,mr._)`typeof ${A} == "string"`,(0,mr._)`${A} += "_"`),t.if((0,mr._)`typeof ${y}[${A}] == "number"`,()=>{t.assign(E,(0,mr._)`${y}[${A}]`),e.error(),t.assign(i,!1).break()}).code((0,mr._)`${y}[${A}] = ${h}`)})}function d(h,E){const A=(0,Aee.useFunc)(t,Fee.default),m=t.name("outer");t.label(m).for((0,mr._)`;${h}--;`,()=>t.for((0,mr._)`${E} = ${h}; ${E}--;`,()=>t.if((0,mr._)`${A}(${r}[${h}], ${r}[${E}])`,()=>{e.error(),t.assign(i,!1).break(m)})))}}};jE.default=bee;var ME={};Object.defineProperty(ME,"__esModule",{value:!0});const yh=pt,See=yt,wee=fc,_ee={message:"must be equal to constant",params:({schemaCode:e})=>(0,yh._)`{allowedValue: ${e}}`},Bee={keyword:"const",$data:!0,error:_ee,code(e){const{gen:t,data:r,$data:n,schemaCode:u,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,yh._)`!${(0,See.useFunc)(t,wee.default)}(${r}, ${u})`):e.fail((0,yh._)`${s} !== ${r}`)}};ME.default=Bee;var LE={};Object.defineProperty(LE,"__esModule",{value:!0});const pi=pt,Tee=yt,$ee=fc,Pee={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,pi._)`{allowedValues: ${e}}`},Oee={keyword:"enum",schemaType:"array",$data:!0,error:Pee,code(e){const{gen:t,data:r,$data:n,schema:u,schemaCode:s,it:o}=e;if(!n&&u.length===0)throw new Error("enum must have non-empty array");const a=u.length>=o.opts.loopEnum;let i;const c=()=>i??(i=(0,Tee.useFunc)(t,$ee.default));let l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const d=t.const("vSchema",s);l=(0,pi.or)(...u.map((h,E)=>f(d,E)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,d=>t.if((0,pi._)`${c()}(${r}, ${d})`,()=>t.assign(l,!0).break()))}function f(d,h){const E=u[h];return typeof E=="object"&&E!==null?(0,pi._)`${c()}(${r}, ${d}[${h}])`:(0,pi._)`${r} === ${E}`}}};LE.default=Oee;Object.defineProperty($E,"__esModule",{value:!0});const kee=PE,Iee=OE,Nee=kE,qee=NE,xee=qE,Ree=xE,jee=RE,Mee=jE,Lee=ME,Uee=LE,Gee=[kee.default,Iee.default,Nee.default,qee.default,xee.default,Ree.default,jee.default,Mee.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},Lee.default,Uee.default];$E.default=Gee;var UE={},$a={};Object.defineProperty($a,"__esModule",{value:!0});$a.validateAdditionalItems=void 0;const Hs=pt,gh=yt,Vee={message:({params:{len:e}})=>(0,Hs.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Hs._)`{limit: ${e}}`},Hee={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:Vee,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,gh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}d9(e,n)}};function d9(e,t){const{gen:r,schema:n,data:u,keyword:s,it:o}=e;o.items=!0;const a=r.const("len",(0,Hs._)`${u}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Hs._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,gh.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,Hs._)`${a} <= ${t.length}`);r.if((0,Hs.not)(c),()=>i(c)),e.ok(c)}function i(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:gh.Type.Num},c),o.allErrors||r.if((0,Hs.not)(c),()=>r.break())})}}$a.validateAdditionalItems=d9;$a.default=Hee;var GE={},Pa={};Object.defineProperty(Pa,"__esModule",{value:!0});Pa.validateTuple=void 0;const vg=pt,Ol=yt,Wee=it,Jee={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return D9(e,"additionalItems",t);r.items=!0,!(0,Ol.alwaysValidSchema)(r,t)&&e.ok((0,Wee.validateArray)(e))}};function D9(e,t,r=e.schema){const{gen:n,parentSchema:u,data:s,keyword:o,it:a}=e;l(u),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=Ol.mergeEvaluated.items(n,r.length,a.items));const i=n.name("valid"),c=n.const("len",(0,vg._)`${s}.length`);r.forEach((p,f)=>{(0,Ol.alwaysValidSchema)(a,p)||(n.if((0,vg._)`${c} > ${f}`,()=>e.subschema({keyword:o,schemaProp:f,dataProp:f},i)),e.ok(i))});function l(p){const{opts:f,errSchemaPath:d}=a,h=r.length,E=h===p.minItems&&(h===p.maxItems||p[t]===!1);if(f.strictTuples&&!E){const A=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${d}"`;(0,Ol.checkStrictMode)(a,A,f.strictTuples)}}}Pa.validateTuple=D9;Pa.default=Jee;Object.defineProperty(GE,"__esModule",{value:!0});const zee=Pa,Kee={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,zee.validateTuple)(e,"items")};GE.default=Kee;var VE={};Object.defineProperty(VE,"__esModule",{value:!0});const yg=pt,Xee=yt,Yee=it,Zee=$a,Qee={message:({params:{len:e}})=>(0,yg.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,yg._)`{limit: ${e}}`},ete={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:Qee,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:u}=r;n.items=!0,!(0,Xee.alwaysValidSchema)(n,t)&&(u?(0,Zee.validateAdditionalItems)(e,u):e.ok((0,Yee.validateArray)(e)))}};VE.default=ete;var HE={};Object.defineProperty(HE,"__esModule",{value:!0});const fn=pt,rl=yt,tte={message:({params:{min:e,max:t}})=>t===void 0?(0,fn.str)`must contain at least ${e} valid item(s)`:(0,fn.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,fn._)`{minContains: ${e}}`:(0,fn._)`{minContains: ${e}, maxContains: ${t}}`},rte={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:tte,code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;let o,a;const{minContains:i,maxContains:c}=n;s.opts.next?(o=i===void 0?1:i,a=c):o=1;const l=t.const("len",(0,fn._)`${u}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,rl.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,rl.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,rl.alwaysValidSchema)(s,r)){let E=(0,fn._)`${l} >= ${o}`;a!==void 0&&(E=(0,fn._)`${E} && ${l} <= ${a}`),e.pass(E);return}s.items=!0;const p=t.name("valid");a===void 0&&o===1?d(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),a!==void 0&&t.if((0,fn._)`${u}.length > 0`,f)):(t.let(p,!1),f()),e.result(p,()=>e.reset());function f(){const E=t.name("_valid"),A=t.let("count",0);d(E,()=>t.if(E,()=>h(A)))}function d(E,A){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:rl.Type.Num,compositeRule:!0},E),A()})}function h(E){t.code((0,fn._)`${E}++`),a===void 0?t.if((0,fn._)`${E} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,fn._)`${E} > ${a}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,fn._)`${E} >= ${o}`,()=>t.assign(p,!0)))}}};HE.default=rte;var h9={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=pt,r=yt,n=it;e.error={message:({params:{property:i,depsCount:c,deps:l}})=>{const p=c===1?"property":"properties";return(0,t.str)`must have ${p} ${l} when property ${i} is present`},params:({params:{property:i,depsCount:c,deps:l,missingProperty:p}})=>(0,t._)`{property: ${i}, +`,r)}},sectionIndex:0};function wE(e){var t=e.content,r=e.onContent,n=e.components,u=e.parsers,s=e.joiners,o=e.decorators,a=e.sectionIndex,i=e.verbose,c=i===void 0?!1:i,l=a9(e,mZ),p=(0,li.useMemo)(function(){return Bs(Bs({},Nl.components),n)},[]),d=p.document,f=Bs(Bs({},Nl.options),l.options),h=Bs(Bs({},Nl.handlers),l.handlers);(0,li.useEffect)(function(){c&&console.log("EditableContent First Render")},[]),(0,$f.useDeepCompareEffect)(function(){(0,pZ.addArrowKeyNavigationToContenteditableElements)()},[f,t]);var y=(0,dZ.default)({content:t,parsers:u,options:f}),A=(0,$f.useDeepCompareCallback)(function(C,B){var T=yZ(y);T[B]=C;var N=T.join(s.section);r(N)},[y,r]),m=(0,$f.useDeepCompareMemo)(function(){var C,B=(0,fZ.isRtl)(t)?"rtl":"";return C=y.map(function(T,N){var R={content:T,onContent:function(q){A(q,N)},onInput:l==null?void 0:l.onInput,show:!f.sectionable||a===-1||N===a,onShow:function(){h.onSectionClick({content:T,index:N})},index:N,components:p,options:f,parsers:u,joiners:s,handlers:h,decorators:o,dir:B,verbose:c};return li.default.createElement(DZ.default,Li({key:N},R))}),C},[y,f,u,s,o,h,a]),v=Bs({content:t,className:f.preview?"preview":""},l);return li.default.createElement(d,Li({key:"1"},v),m)}wE.propTypes={content:gt.default.string.isRequired,onContent:gt.default.func,onInput:gt.default.func,options:gt.default.shape({sectionable:gt.default.bool,blockable:gt.default.bool,editable:gt.default.bool,preview:gt.default.bool}),components:gt.default.shape({document:gt.default.func,section:gt.default.func,sectionHeading:gt.default.func,sectionBody:gt.default.func,block:gt.default.func}),parsers:gt.default.shape({section:gt.default.func,block:gt.default.func}),joiners:gt.default.shape({section:gt.default.string,block:gt.default.string}),decorators:gt.default.object,handlers:gt.default.shape({onSectionClick:gt.default.func,onBlockClick:gt.default.func}),sectionIndex:gt.default.number,verbose:gt.default.bool};wE.defaultProps=Nl;var sd={};Object.defineProperty(sd,"__esModule",{value:!0});sd.segmenter=void 0;function _Z(e){return PZ(e)||$Z(e)||TZ(e)||BZ()}function BZ(){throw new TypeError(`Invalid attempt to spread non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function TZ(e,t){if(e){if(typeof e=="string")return yh(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return yh(e,t)}}function $Z(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function PZ(e){if(Array.isArray(e))return yh(e)}function yh(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);re.length)&&(t=e.length);for(var r=0,n=new Array(t);r0){var d=n.pop(),f=d.dataset.type==="graft",h=Vu(d.classList).includes("title"),y=Vu(d.classList).includes("introduction");f&&!h&&!y?p=[].concat(Vu(p),[d]):(n=[].concat(Vu(n),[d]),l=!1)}else l=!1;r=[].concat(Vu(r),[n]),n=Vu(p.reverse())}}return n=[].concat(Vu(n),[u]),!0}),r=[].concat(Vu(r),[n]),n=[],r.map(function(u){return u.map(function(s){return s.outerHTML}).join(` +`)})}}var TE={};function gh(e){"@babel/helpers - typeof";return gh=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},gh(e)}Object.defineProperty(TE,"__esModule",{value:!0});TE.default=GZ;var Sg=MZ(ft),jZ=["nodes","children","content","className","verbose"];function i9(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(i9=function(u){return u?r:t})(e)}function MZ(e,t){if(e&&e.__esModule)return e;if(e===null||gh(e)!=="object"&&typeof e!="function")return{default:e};var r=i9(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function Ah(){return Ah=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function UZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function GZ(e){var t=e.nodes,r=t===void 0?{}:t,n=e.children;e.content;var u=e.className,s=e.verbose;LZ(e,jZ),(0,Sg.useEffect)(function(){return s&&console.log("Document: Mount/First Render"),function(){s&&console.log("Document: UnMount/Destroyed")}},[]);var o=r.sequence(),a=o.dataset,i=o.className;return Sg.default.createElement("section",Ah({id:"sequence",className:"".concat(i," ").concat(u)},a),n)}function Fh(e){"@babel/helpers - typeof";return Fh=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},Fh(e)}Object.defineProperty(td,"__esModule",{value:!0});td.default=$E;var Pf=XZ(ft),bt=ic(Pu),VZ=Y7,HZ=ic(_E),WZ=ic(BE),JZ=ic(TE),zZ=ic(ac),KZ=["htmlSequence","onHtmlSequence","options","components","parsers","joiners","decorators","handlers","sectionIndex","verbose"];function ic(e){return e&&e.__esModule?e:{default:e}}function c9(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(c9=function(u){return u?r:t})(e)}function XZ(e,t){if(e&&e.__esModule)return e;if(e===null||Fh(e)!=="object"&&typeof e!="function")return{default:e};var r=c9(t);if(r&&r.has(e))return r.get(e);var n={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if(s!=="default"&&Object.prototype.hasOwnProperty.call(e,s)){var o=u?Object.getOwnPropertyDescriptor(e,s):null;o&&(o.get||o.set)?Object.defineProperty(n,s,o):n[s]=e[s]}return n.default=e,r&&r.set(e,n),n}function Ch(){return Ch=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function QZ(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var bh={decorators:{chapter:[/\\c\s+(\d*)/g,'$1'],verses:[/\\v\s+(\d*)/g,'$1']},joiners:{section:"",block:""}};function $E(e){var t=e.htmlSequence,r=e.onHtmlSequence,n=e.options,u=e.components,s=e.parsers,o=e.joiners,a=e.decorators,i=e.handlers,c=e.sectionIndex,l=e.verbose,p=l===void 0?!1:l,d=ZZ(e,KZ),f=pu(pu({},bh.decorators),a),h=pu(pu({},bh.joiners),o);(0,Pf.useEffect)(function(){return p&&console.log("PerfEditor First Render"),function(){p&&console.log("PerfEditor Unmount")}},[]);var y=new DOMParser,A=y.parseFromString(t,"text/html"),m={sequence:function(){return A.getElementsByTagName("section")[0]}},v=pu({returnHtml:!0},n),C=pu({section:(0,WZ.default)({nodes:m}),block:HZ.default},s),B=pu({document:function(J){return(0,JZ.default)(pu({nodes:m,verbose:p},J))},sectionHeading:zZ.default},u),T=function(J){m.sequence().innerHTML=J,r(m.sequence().outerHTML)},N=pu({content:m.sequence().innerHTML,onContent:T,options:v,components:B,parsers:C,joiners:h,decorators:f,handlers:i,sectionIndex:c,verbose:p},d);return Pf.default.createElement("div",{className:"perf",key:"1"},Pf.default.createElement(VZ.EditableContent,Ch({key:"1"},N)))}$E.propTypes={htmlSequence:bt.default.string.isRequired,onHtmlSequence:bt.default.func,options:bt.default.shape({sectionable:bt.default.bool,blockable:bt.default.bool,editable:bt.default.bool,preview:bt.default.bool}),components:bt.default.shape({document:bt.default.func,section:bt.default.func,sectionHeading:bt.default.func,sectionBody:bt.default.func,block:bt.default.func}),parsers:bt.default.shape({section:bt.default.func,block:bt.default.func}),joiners:bt.default.shape({section:bt.default.string,block:bt.default.string}),decorators:bt.default.object,handlers:bt.default.shape({onSectionClick:bt.default.func,onBlockClick:bt.default.func}),sectionIndex:bt.default.number,verbose:bt.default.bool};$E.defaultProps=bh;var _g;function l9(){if(_g)return el;_g=1;function e(G){"@babel/helpers - typeof";return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},e(G)}Object.defineProperty(el,"__esModule",{value:!0}),el.default=q;var t=f(ft),r=p(Pu),n=Qp,u=p(VX),s=Kn,o=fa,a=p(ac),i=p(sY()),c=p(td),l=["htmlPerf","onHtmlPerf","sequenceIds","addSequenceId","options","components","handlers"];function p(G){return G&&G.__esModule?G:{default:G}}function d(G){if(typeof WeakMap!="function")return null;var ee=new WeakMap,K=new WeakMap;return(d=function(oe){return oe?K:ee})(G)}function f(G,ee){if(G&&G.__esModule)return G;if(G===null||e(G)!=="object"&&typeof G!="function")return{default:G};var K=d(ee);if(K&&K.has(G))return K.get(G);var ue={},oe=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var de in G)if(de!=="default"&&Object.prototype.hasOwnProperty.call(G,de)){var he=oe?Object.getOwnPropertyDescriptor(G,de):null;he&&(he.get||he.set)?Object.defineProperty(ue,de,he):ue[de]=G[de]}return ue.default=G,K&&K.set(G,ue),ue}function h(G,ee){var K=Object.keys(G);if(Object.getOwnPropertySymbols){var ue=Object.getOwnPropertySymbols(G);ee&&(ue=ue.filter(function(oe){return Object.getOwnPropertyDescriptor(G,oe).enumerable})),K.push.apply(K,ue)}return K}function y(G){for(var ee=1;eeG.length)&&(ee=G.length);for(var K=0,ue=new Array(ee);K=0)&&Object.prototype.propertyIsEnumerable.call(G,ue)&&(K[ue]=G[ue])}return K}function J(G,ee){if(G==null)return{};var K={},ue=Object.keys(G),oe,de;for(de=0;de=0)&&(K[oe]=G[oe]);return K}function q(G){var ee=G.htmlPerf,K=G.onHtmlPerf,ue=G.sequenceIds,oe=G.addSequenceId,de=G.options,he=G.components,fe=G.handlers,ge=R(G,l),pe=(0,t.useState)({}),z=m(pe,2),O=z[0],E=z[1],F=ue.at(-1),D=y({sectionHeading:a.default},he),g=(0,n.useDeepCompareMemo)(function(){return(0,s.embedPreviewTextInGrafts)({htmlPerf:ee,sequenceId:F})},[ee,F]),P=(0,t.useMemo)(function(){return(0,o.getTypeFromSequenceHtml)({htmlSequence:g})},[g]),b=(0,n.useDeepCompareMemo)(function(){return O[F]||0},[O,F]),w=(0,n.useDeepCompareCallback)(function(L){L.content;var Y=L.index,be=y({},O);be[F]=Y,E(be)},[E,O]),I=(0,t.useCallback)(function(L){var Y;L.content;var be=L.element,Ne=be==null||(Y=be.dataset)===null||Y===void 0?void 0:Y.target;Ne&&oe(Ne)},[oe]),$=(0,n.useDeepCompareCallback)(function(L){var Y=g!==L;if(Y){var be=structuredClone(ee);be.sequencesHtml[F]=L;var Ne=!(0,u.default)(ee,be);if(Ne){var Ve=(0,s.removePreviewTextInGrafts)({htmlPerf:be,sequenceId:F});K(Ve,{sequenceId:F,htmlSequence:L})}}},[ee,K,g,F]),M=y({htmlSequence:g,onHtmlSequence:$,components:y(y({},D),{},{sectionHeading:function(Y){return D.sectionHeading(y({type:P},Y))},block:function(Y){return(0,i.default)(y({htmlPerf:ee,onHtmlPerf:K,sequenceIds:ue,addSequenceId:oe},Y))}}),options:de,handlers:y({onSectionClick:w,onBlockClick:I},fe),decorators:{},sectionIndex:b},ge);return t.default.createElement(c.default,M)}return q.propTypes={htmlPerf:r.default.object.isRequired,onHtmlPerf:r.default.func,options:r.default.shape({sectionable:r.default.bool,blockable:r.default.bool,editable:r.default.bool,preview:r.default.bool}),components:r.default.shape({document:r.default.func,section:r.default.func,sectionHeading:r.default.func,sectionBody:r.default.func,block:r.default.func}),parsers:r.default.shape({section:r.default.func,block:r.default.func}),joiners:r.default.shape({section:r.default.string,block:r.default.string}),decorators:r.default.object,handlers:r.default.shape({onSectionClick:r.default.func,onBlockClick:r.default.func}),sectionIndex:r.default.number,verbose:r.default.bool},q.defaultProps={sequenceIds:[]},el}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),Object.defineProperty(e,"HtmlPerfEditor",{enumerable:!0,get:function(){return t.default}}),Object.defineProperty(e,"HtmlSequenceEditor",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(e,"SectionHeading",{enumerable:!0,get:function(){return n.default}});var t=u(l9()),r=u(td),n=u(ac);function u(s){return s&&s.__esModule?s:{default:s}}})(cE);const eQ=({content:e})=>{var n;const t=document.createElement("div");t.innerHTML=e;const{target:r}=((n=t.firstChild)==null?void 0:n.dataset)||{};return r};function tQ({htmlPerf:e,onHtmlPerf:t,sequenceIds:r,addSequenceId:n,options:u,content:s,contentEditable:o,...a}){let i;const c=!!s.match(/data-type="paragraph"/);if(c&&(i=It.jsx("div",{className:"editor-paragraph",contentEditable:o,...a})),!c){const l=eQ({content:s});if(l&&!u.preview){const p={sequenceIds:[...r,l],addSequenceId:n,htmlPerf:e,onHtmlPerf:t,options:u};i=It.jsx(cE.HtmlPerfEditor,{...p})}i||(i=It.jsx("div",{...a,contentEditable:!1}))}return It.jsx(It.Fragment,{children:i})}function rQ(){return It.jsx("div",{className:"h-full w-full items-center justify-center flex",children:It.jsxs("svg",{className:"animate-spin h-10 w-10",xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",children:[It.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),It.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]})})}function nQ(e){const{sequenceIds:t,htmlPerf:r,sectionable:n,blockable:u,editable:s,preview:o,verbose:a,addSequenceId:i}=e,c=t.at(-1),l={onBlockClick:({element:f})=>{Vh.postMessage({type:U8.BLOCK_CLICK,payload:{action:"click"}});const{tagName:h}=f;h==="SPAN"&&console.log("onBlockClick",{element:f})}};function p(f){console.log({htmlPerf:f})}const d={htmlPerf:r,onHtmlPerf:p,sequenceIds:t,addSequenceId:i,components:{block:f=>tQ({htmlPerf:r,onHtmlPerf:p,sequenceIds:t,addSequenceId:i,...f})},options:{sectionable:n,blockable:u,editable:s,preview:o},decorators:{},verbose:a,handlers:l};return It.jsx("div",{style:{fontFamily:"roboto",fontSize:"1rem",direction:"ltr",textAlign:"left"},children:It.jsxs("div",{id:"bibleRefEditor",className:"bibleRefEditor",children:[!c&&It.jsx(rQ,{}),c&&It.jsx(cE.HtmlPerfEditor,{...d})]})})}const uQ=e=>({"*":{"*":{tagName:"span"},sequence:{tagName:"section"}},wrapper:{"*":{tagName:"wrapper"},sequence:{tagName:"section"}},paragraph:{"*":{tagName:"p"},"usfm:mt":{classList:["major-title","paragraph","mt","hidden"],tagName:"h2",attributes:{contenteditable:!1}},"usfm:ms":{classList:["major-section-heading","paragraph","ms"],tagName:"h3",attributes:{contenteditable:!1}}},mark:{"*":{tagName:"span"},chapter:({atts:t})=>t?(e.lastChapter=t.number,{classList:["mark","chapter",`chapter-${t.number}`],id:`ch-${t.number}`,tagName:"span"}):{tagName:"span"},verses:({atts:t})=>({classList:t?["mark","verse",`verse-${t.number}`]:void 0,id:t?`ch${e.lastChapter}v${t.number}`:void 0,tagName:"span",attributes:{contenteditable:!1}})},graft:{heading:{tagName:"div"},title:{tagName:"div"},introduction:{tagName:"div"}}}),sl=uQ({});var PE={},od={},Sh={exports:{}},p9={},$n={},ya={},cc={},st={},Ui={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class r extends t{constructor(v){if(super(),!e.IDENTIFIER.test(v))throw new Error("CodeGen: name must be a valid identifier");this.str=v}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(v){super(),this._items=typeof v=="string"?[v]:v}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const v=this._items[0];return v===""||v==='""'}get str(){var v;return(v=this._str)!==null&&v!==void 0?v:this._str=this._items.reduce((C,B)=>`${C}${B}`,"")}get names(){var v;return(v=this._names)!==null&&v!==void 0?v:this._names=this._items.reduce((C,B)=>(B instanceof r&&(C[B.str]=(C[B.str]||0)+1),C),{})}}e._Code=n,e.nil=new n("");function u(m,...v){const C=[m[0]];let B=0;for(;B{if(p.scopePath===void 0)throw new Error(`CodeGen: name "${p}" has no value`);return(0,t._)`${c}${p.scopePath}`})}scopeCode(c=this._values,l,p){return this._reduceValues(c,d=>{if(d.value===void 0)throw new Error(`CodeGen: name "${d}" has no value`);return d.value.code},l,p)}_reduceValues(c,l,p={},d){let f=t.nil;for(const h in c){const y=c[h];if(!y)continue;const A=p[h]=p[h]||new Map;y.forEach(m=>{if(A.has(m))return;A.set(m,n.Started);let v=l(m);if(v){const C=this.opts.es5?e.varKinds.var:e.varKinds.const;f=(0,t._)`${f}${C} ${m} = ${v};${this.opts._n}`}else if(v=d==null?void 0:d(m))f=(0,t._)`${f}${v}${this.opts._n}`;else throw new r(m);A.set(m,n.Completed)})}return f}}e.ValueScope=a})(wh);(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=Ui,r=wh;var n=Ui;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var u=wh;Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return u.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return u.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return u.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return u.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class s{optimizeNodes(){return this}optimizeNames(D,g){return this}}class o extends s{constructor(D,g,P){super(),this.varKind=D,this.name=g,this.rhs=P}render({es5:D,_n:g}){const P=D?r.varKinds.var:this.varKind,b=this.rhs===void 0?"":` = ${this.rhs}`;return`${P} ${this.name}${b};`+g}optimizeNames(D,g){if(D[this.name.str])return this.rhs&&(this.rhs=oe(this.rhs,D,g)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class a extends s{constructor(D,g,P){super(),this.lhs=D,this.rhs=g,this.sideEffects=P}render({_n:D}){return`${this.lhs} = ${this.rhs};`+D}optimizeNames(D,g){if(!(this.lhs instanceof t.Name&&!D[this.lhs.str]&&!this.sideEffects))return this.rhs=oe(this.rhs,D,g),this}get names(){const D=this.lhs instanceof t.Name?{}:{...this.lhs.names};return ue(D,this.rhs)}}class i extends a{constructor(D,g,P,b){super(D,P,b),this.op=g}render({_n:D}){return`${this.lhs} ${this.op}= ${this.rhs};`+D}}class c extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`${this.label}:`+D}}class l extends s{constructor(D){super(),this.label=D,this.names={}}render({_n:D}){return`break${this.label?` ${this.label}`:""};`+D}}class p extends s{constructor(D){super(),this.error=D}render({_n:D}){return`throw ${this.error};`+D}get names(){return this.error.names}}class d extends s{constructor(D){super(),this.code=D}render({_n:D}){return`${this.code};`+D}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(D,g){return this.code=oe(this.code,D,g),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends s{constructor(D=[]){super(),this.nodes=D}render(D){return this.nodes.reduce((g,P)=>g+P.render(D),"")}optimizeNodes(){const{nodes:D}=this;let g=D.length;for(;g--;){const P=D[g].optimizeNodes();Array.isArray(P)?D.splice(g,1,...P):P?D[g]=P:D.splice(g,1)}return D.length>0?this:void 0}optimizeNames(D,g){const{nodes:P}=this;let b=P.length;for(;b--;){const w=P[b];w.optimizeNames(D,g)||(de(D,w.names),P.splice(b,1))}return P.length>0?this:void 0}get names(){return this.nodes.reduce((D,g)=>K(D,g.names),{})}}class h extends f{render(D){return"{"+D._n+super.render(D)+"}"+D._n}}class y extends f{}class A extends h{}A.kind="else";class m extends h{constructor(D,g){super(g),this.condition=D}render(D){let g=`if(${this.condition})`+super.render(D);return this.else&&(g+="else "+this.else.render(D)),g}optimizeNodes(){super.optimizeNodes();const D=this.condition;if(D===!0)return this.nodes;let g=this.else;if(g){const P=g.optimizeNodes();g=this.else=Array.isArray(P)?new A(P):P}if(g)return D===!1?g instanceof m?g:g.nodes:this.nodes.length?this:new m(he(D),g instanceof m?[g]:g.nodes);if(!(D===!1||!this.nodes.length))return this}optimizeNames(D,g){var P;if(this.else=(P=this.else)===null||P===void 0?void 0:P.optimizeNames(D,g),!!(super.optimizeNames(D,g)||this.else))return this.condition=oe(this.condition,D,g),this}get names(){const D=super.names;return ue(D,this.condition),this.else&&K(D,this.else.names),D}}m.kind="if";class v extends h{}v.kind="for";class C extends v{constructor(D){super(),this.iteration=D}render(D){return`for(${this.iteration})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iteration=oe(this.iteration,D,g),this}get names(){return K(super.names,this.iteration.names)}}class B extends v{constructor(D,g,P,b){super(),this.varKind=D,this.name=g,this.from=P,this.to=b}render(D){const g=D.es5?r.varKinds.var:this.varKind,{name:P,from:b,to:w}=this;return`for(${g} ${P}=${b}; ${P}<${w}; ${P}++)`+super.render(D)}get names(){const D=ue(super.names,this.from);return ue(D,this.to)}}class T extends v{constructor(D,g,P,b){super(),this.loop=D,this.varKind=g,this.name=P,this.iterable=b}render(D){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(D)}optimizeNames(D,g){if(super.optimizeNames(D,g))return this.iterable=oe(this.iterable,D,g),this}get names(){return K(super.names,this.iterable.names)}}class N extends h{constructor(D,g,P){super(),this.name=D,this.args=g,this.async=P}render(D){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(D)}}N.kind="func";class R extends f{render(D){return"return "+super.render(D)}}R.kind="return";class J extends h{render(D){let g="try"+super.render(D);return this.catch&&(g+=this.catch.render(D)),this.finally&&(g+=this.finally.render(D)),g}optimizeNodes(){var D,g;return super.optimizeNodes(),(D=this.catch)===null||D===void 0||D.optimizeNodes(),(g=this.finally)===null||g===void 0||g.optimizeNodes(),this}optimizeNames(D,g){var P,b;return super.optimizeNames(D,g),(P=this.catch)===null||P===void 0||P.optimizeNames(D,g),(b=this.finally)===null||b===void 0||b.optimizeNames(D,g),this}get names(){const D=super.names;return this.catch&&K(D,this.catch.names),this.finally&&K(D,this.finally.names),D}}class q extends h{constructor(D){super(),this.error=D}render(D){return`catch(${this.error})`+super.render(D)}}q.kind="catch";class G extends h{render(D){return"finally"+super.render(D)}}G.kind="finally";class ee{constructor(D,g={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...g,_n:g.lines?` +`:""},this._extScope=D,this._scope=new r.Scope({parent:D}),this._nodes=[new y]}toString(){return this._root.render(this.opts)}name(D){return this._scope.name(D)}scopeName(D){return this._extScope.name(D)}scopeValue(D,g){const P=this._extScope.value(D,g);return(this._values[P.prefix]||(this._values[P.prefix]=new Set)).add(P),P}getScopeValue(D,g){return this._extScope.getValue(D,g)}scopeRefs(D){return this._extScope.scopeRefs(D,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(D,g,P,b){const w=this._scope.toName(g);return P!==void 0&&b&&(this._constants[w.str]=P),this._leafNode(new o(D,w,P)),w}const(D,g,P){return this._def(r.varKinds.const,D,g,P)}let(D,g,P){return this._def(r.varKinds.let,D,g,P)}var(D,g,P){return this._def(r.varKinds.var,D,g,P)}assign(D,g,P){return this._leafNode(new a(D,g,P))}add(D,g){return this._leafNode(new i(D,e.operators.ADD,g))}code(D){return typeof D=="function"?D():D!==t.nil&&this._leafNode(new d(D)),this}object(...D){const g=["{"];for(const[P,b]of D)g.length>1&&g.push(","),g.push(P),(P!==b||this.opts.es5)&&(g.push(":"),(0,t.addCodeArg)(g,b));return g.push("}"),new t._Code(g)}if(D,g,P){if(this._blockNode(new m(D)),g&&P)this.code(g).else().code(P).endIf();else if(g)this.code(g).endIf();else if(P)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(D){return this._elseNode(new m(D))}else(){return this._elseNode(new A)}endIf(){return this._endBlockNode(m,A)}_for(D,g){return this._blockNode(D),g&&this.code(g).endFor(),this}for(D,g){return this._for(new C(D),g)}forRange(D,g,P,b,w=this.opts.es5?r.varKinds.var:r.varKinds.let){const I=this._scope.toName(D);return this._for(new B(w,I,g,P),()=>b(I))}forOf(D,g,P,b=r.varKinds.const){const w=this._scope.toName(D);if(this.opts.es5){const I=g instanceof t.Name?g:this.var("_arr",g);return this.forRange("_i",0,(0,t._)`${I}.length`,$=>{this.var(w,(0,t._)`${I}[${$}]`),P(w)})}return this._for(new T("of",b,w,g),()=>P(w))}forIn(D,g,P,b=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(D,(0,t._)`Object.keys(${g})`,P);const w=this._scope.toName(D);return this._for(new T("in",b,w,g),()=>P(w))}endFor(){return this._endBlockNode(v)}label(D){return this._leafNode(new c(D))}break(D){return this._leafNode(new l(D))}return(D){const g=new R;if(this._blockNode(g),this.code(D),g.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(R)}try(D,g,P){if(!g&&!P)throw new Error('CodeGen: "try" without "catch" and "finally"');const b=new J;if(this._blockNode(b),this.code(D),g){const w=this.name("e");this._currNode=b.catch=new q(w),g(w)}return P&&(this._currNode=b.finally=new G,this.code(P)),this._endBlockNode(q,G)}throw(D){return this._leafNode(new p(D))}block(D,g){return this._blockStarts.push(this._nodes.length),D&&this.code(D).endBlock(g),this}endBlock(D){const g=this._blockStarts.pop();if(g===void 0)throw new Error("CodeGen: not in self-balancing block");const P=this._nodes.length-g;if(P<0||D!==void 0&&P!==D)throw new Error(`CodeGen: wrong number of nodes: ${P} vs ${D} expected`);return this._nodes.length=g,this}func(D,g=t.nil,P,b){return this._blockNode(new N(D,g,P)),b&&this.code(b).endFunc(),this}endFunc(){return this._endBlockNode(N)}optimize(D=1){for(;D-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(D){return this._currNode.nodes.push(D),this}_blockNode(D){this._currNode.nodes.push(D),this._nodes.push(D)}_endBlockNode(D,g){const P=this._currNode;if(P instanceof D||g&&P instanceof g)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${g?`${D.kind}/${g.kind}`:D.kind}"`)}_elseNode(D){const g=this._currNode;if(!(g instanceof m))throw new Error('CodeGen: "else" without "if"');return this._currNode=g.else=D,this}get _root(){return this._nodes[0]}get _currNode(){const D=this._nodes;return D[D.length-1]}set _currNode(D){const g=this._nodes;g[g.length-1]=D}}e.CodeGen=ee;function K(F,D){for(const g in D)F[g]=(F[g]||0)+(D[g]||0);return F}function ue(F,D){return D instanceof t._CodeOrName?K(F,D.names):F}function oe(F,D,g){if(F instanceof t.Name)return P(F);if(!b(F))return F;return new t._Code(F._items.reduce((w,I)=>(I instanceof t.Name&&(I=P(I)),I instanceof t._Code?w.push(...I._items):w.push(I),w),[]));function P(w){const I=g[w.str];return I===void 0||D[w.str]!==1?w:(delete D[w.str],I)}function b(w){return w instanceof t._Code&&w._items.some(I=>I instanceof t.Name&&D[I.str]===1&&g[I.str]!==void 0)}}function de(F,D){for(const g in D)F[g]=(F[g]||0)-(D[g]||0)}function he(F){return typeof F=="boolean"||typeof F=="number"||F===null?!F:(0,t._)`!${E(F)}`}e.not=he;const fe=O(e.operators.AND);function ge(...F){return F.reduce(fe)}e.and=ge;const pe=O(e.operators.OR);function z(...F){return F.reduce(pe)}e.or=z;function O(F){return(D,g)=>D===t.nil?g:g===t.nil?D:(0,t._)`${E(D)} ${F} ${E(g)}`}function E(F){return F instanceof t.Name?F:(0,t._)`(${F})`}})(st);var we={};Object.defineProperty(we,"__esModule",{value:!0});we.checkStrictMode=we.getErrorPath=we.Type=we.useFunc=we.setEvaluated=we.evaluatedPropsToName=we.mergeEvaluated=we.eachItem=we.unescapeJsonPointer=we.escapeJsonPointer=we.escapeFragment=we.unescapeFragment=we.schemaRefOrVal=we.schemaHasRulesButRef=we.schemaHasRules=we.checkUnknownRules=we.alwaysValidSchema=we.toHash=void 0;const yt=st,sQ=Ui;function oQ(e){const t={};for(const r of e)t[r]=!0;return t}we.toHash=oQ;function aQ(e,t){return typeof t=="boolean"?t:Object.keys(t).length===0?!0:(d9(e,t),!f9(t,e.self.RULES.all))}we.alwaysValidSchema=aQ;function d9(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema||typeof t=="boolean")return;const u=n.RULES.keywords;for(const s in t)u[s]||m9(e,`unknown keyword: "${s}"`)}we.checkUnknownRules=d9;function f9(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(t[r])return!0;return!1}we.schemaHasRules=f9;function iQ(e,t){if(typeof e=="boolean")return!e;for(const r in e)if(r!=="$ref"&&t.all[r])return!0;return!1}we.schemaHasRulesButRef=iQ;function cQ({topSchemaRef:e,schemaPath:t},r,n,u){if(!u){if(typeof r=="number"||typeof r=="boolean")return r;if(typeof r=="string")return(0,yt._)`${r}`}return(0,yt._)`${e}${t}${(0,yt.getProperty)(n)}`}we.schemaRefOrVal=cQ;function lQ(e){return D9(decodeURIComponent(e))}we.unescapeFragment=lQ;function pQ(e){return encodeURIComponent(kE(e))}we.escapeFragment=pQ;function kE(e){return typeof e=="number"?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}we.escapeJsonPointer=kE;function D9(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}we.unescapeJsonPointer=D9;function dQ(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)}we.eachItem=dQ;function Bg({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:n}){return(u,s,o,a)=>{const i=o===void 0?s:o instanceof yt.Name?(s instanceof yt.Name?e(u,s,o):t(u,s,o),o):s instanceof yt.Name?(t(u,o,s),s):r(s,o);return a===yt.Name&&!(i instanceof yt.Name)?n(u,i):i}}we.mergeEvaluated={props:Bg({mergeNames:(e,t,r)=>e.if((0,yt._)`${r} !== true && ${t} !== undefined`,()=>{e.if((0,yt._)`${t} === true`,()=>e.assign(r,!0),()=>e.assign(r,(0,yt._)`${r} || {}`).code((0,yt._)`Object.assign(${r}, ${t})`))}),mergeToName:(e,t,r)=>e.if((0,yt._)`${r} !== true`,()=>{t===!0?e.assign(r,!0):(e.assign(r,(0,yt._)`${r} || {}`),OE(e,r,t))}),mergeValues:(e,t)=>e===!0?!0:{...e,...t},resultToName:h9}),items:Bg({mergeNames:(e,t,r)=>e.if((0,yt._)`${r} !== true && ${t} !== undefined`,()=>e.assign(r,(0,yt._)`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`)),mergeToName:(e,t,r)=>e.if((0,yt._)`${r} !== true`,()=>e.assign(r,t===!0?!0:(0,yt._)`${r} > ${t} ? ${r} : ${t}`)),mergeValues:(e,t)=>e===!0?!0:Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})};function h9(e,t){if(t===!0)return e.var("props",!0);const r=e.var("props",(0,yt._)`{}`);return t!==void 0&&OE(e,r,t),r}we.evaluatedPropsToName=h9;function OE(e,t,r){Object.keys(r).forEach(n=>e.assign((0,yt._)`${t}${(0,yt.getProperty)(n)}`,!0))}we.setEvaluated=OE;const Tg={};function fQ(e,t){return e.scopeValue("func",{ref:t,code:Tg[t.code]||(Tg[t.code]=new sQ._Code(t.code))})}we.useFunc=fQ;var _h;(function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"})(_h||(we.Type=_h={}));function DQ(e,t,r){if(e instanceof yt.Name){const n=t===_h.Num;return r?n?(0,yt._)`"[" + ${e} + "]"`:(0,yt._)`"['" + ${e} + "']"`:n?(0,yt._)`"/" + ${e}`:(0,yt._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,yt.getProperty)(e).toString():"/"+kE(e)}we.getErrorPath=DQ;function m9(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,r===!0)throw new Error(t);e.self.logger.warn(t)}}we.checkStrictMode=m9;var nu={};Object.defineProperty(nu,"__esModule",{value:!0});const yr=st,hQ={data:new yr.Name("data"),valCxt:new yr.Name("valCxt"),instancePath:new yr.Name("instancePath"),parentData:new yr.Name("parentData"),parentDataProperty:new yr.Name("parentDataProperty"),rootData:new yr.Name("rootData"),dynamicAnchors:new yr.Name("dynamicAnchors"),vErrors:new yr.Name("vErrors"),errors:new yr.Name("errors"),this:new yr.Name("this"),self:new yr.Name("self"),scope:new yr.Name("scope"),json:new yr.Name("json"),jsonPos:new yr.Name("jsonPos"),jsonLen:new yr.Name("jsonLen"),jsonPart:new yr.Name("jsonPart")};nu.default=hQ;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=st,r=we,n=nu;e.keywordError={message:({keyword:A})=>(0,t.str)`must pass "${A}" keyword validation`},e.keyword$DataError={message:({keyword:A,schemaType:m})=>m?(0,t.str)`"${A}" keyword must be ${m} ($data)`:(0,t.str)`"${A}" keyword is invalid ($data)`};function u(A,m=e.keywordError,v,C){const{it:B}=A,{gen:T,compositeRule:N,allErrors:R}=B,J=p(A,m,v);C??(N||R)?i(T,J):c(B,(0,t._)`[${J}]`)}e.reportError=u;function s(A,m=e.keywordError,v){const{it:C}=A,{gen:B,compositeRule:T,allErrors:N}=C,R=p(A,m,v);i(B,R),T||N||c(C,n.default.vErrors)}e.reportExtraError=s;function o(A,m){A.assign(n.default.errors,m),A.if((0,t._)`${n.default.vErrors} !== null`,()=>A.if(m,()=>A.assign((0,t._)`${n.default.vErrors}.length`,m),()=>A.assign(n.default.vErrors,null)))}e.resetErrorsCount=o;function a({gen:A,keyword:m,schemaValue:v,data:C,errsCount:B,it:T}){if(B===void 0)throw new Error("ajv implementation error");const N=A.name("err");A.forRange("i",B,n.default.errors,R=>{A.const(N,(0,t._)`${n.default.vErrors}[${R}]`),A.if((0,t._)`${N}.instancePath === undefined`,()=>A.assign((0,t._)`${N}.instancePath`,(0,t.strConcat)(n.default.instancePath,T.errorPath))),A.assign((0,t._)`${N}.schemaPath`,(0,t.str)`${T.errSchemaPath}/${m}`),T.opts.verbose&&(A.assign((0,t._)`${N}.schema`,v),A.assign((0,t._)`${N}.data`,C))})}e.extendErrors=a;function i(A,m){const v=A.const("err",m);A.if((0,t._)`${n.default.vErrors} === null`,()=>A.assign(n.default.vErrors,(0,t._)`[${v}]`),(0,t._)`${n.default.vErrors}.push(${v})`),A.code((0,t._)`${n.default.errors}++`)}function c(A,m){const{gen:v,validateName:C,schemaEnv:B}=A;B.$async?v.throw((0,t._)`new ${A.ValidationError}(${m})`):(v.assign((0,t._)`${C}.errors`,m),v.return(!1))}const l={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function p(A,m,v){const{createErrors:C}=A.it;return C===!1?(0,t._)`{}`:d(A,m,v)}function d(A,m,v={}){const{gen:C,it:B}=A,T=[f(B,v),h(A,v)];return y(A,m,T),C.object(...T)}function f({errorPath:A},{instancePath:m}){const v=m?(0,t.str)`${A}${(0,r.getErrorPath)(m,r.Type.Str)}`:A;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,v)]}function h({keyword:A,it:{errSchemaPath:m}},{schemaPath:v,parentSchema:C}){let B=C?m:(0,t.str)`${m}/${A}`;return v&&(B=(0,t.str)`${B}${(0,r.getErrorPath)(v,r.Type.Str)}`),[l.schemaPath,B]}function y(A,{params:m,message:v},C){const{keyword:B,data:T,schemaValue:N,it:R}=A,{opts:J,propertyName:q,topSchemaRef:G,schemaPath:ee}=R;C.push([l.keyword,B],[l.params,typeof m=="function"?m(A):m||(0,t._)`{}`]),J.messages&&C.push([l.message,typeof v=="function"?v(A):v]),J.verbose&&C.push([l.schema,N],[l.parentSchema,(0,t._)`${G}${ee}`],[n.default.data,T]),q&&C.push([l.propertyName,q])}})(cc);Object.defineProperty(ya,"__esModule",{value:!0});ya.boolOrEmptySchema=ya.topBoolOrEmptySchema=void 0;const mQ=cc,EQ=st,yQ=nu,vQ={message:"boolean schema is false"};function gQ(e){const{gen:t,schema:r,validateName:n}=e;r===!1?E9(e,!1):typeof r=="object"&&r.$async===!0?t.return(yQ.default.data):(t.assign((0,EQ._)`${n}.errors`,null),t.return(!0))}ya.topBoolOrEmptySchema=gQ;function AQ(e,t){const{gen:r,schema:n}=e;n===!1?(r.var(t,!1),E9(e)):r.var(t,!0)}ya.boolOrEmptySchema=AQ;function E9(e,t){const{gen:r,data:n}=e,u={gen:r,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,mQ.reportError)(u,vQ,void 0,t)}var Yt={},Qs={};Object.defineProperty(Qs,"__esModule",{value:!0});Qs.getRules=Qs.isJSONType=void 0;const FQ=["string","number","integer","boolean","null","object","array"],CQ=new Set(FQ);function bQ(e){return typeof e=="string"&&CQ.has(e)}Qs.isJSONType=bQ;function SQ(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}Qs.getRules=SQ;var Cu={};Object.defineProperty(Cu,"__esModule",{value:!0});Cu.shouldUseRule=Cu.shouldUseGroup=Cu.schemaHasRulesForType=void 0;function wQ({schema:e,self:t},r){const n=t.RULES.types[r];return n&&n!==!0&&y9(e,n)}Cu.schemaHasRulesForType=wQ;function y9(e,t){return t.rules.some(r=>v9(e,r))}Cu.shouldUseGroup=y9;function v9(e,t){var r;return e[t.keyword]!==void 0||((r=t.definition.implements)===null||r===void 0?void 0:r.some(n=>e[n]!==void 0))}Cu.shouldUseRule=v9;Object.defineProperty(Yt,"__esModule",{value:!0});Yt.reportTypeError=Yt.checkDataTypes=Yt.checkDataType=Yt.coerceAndCheckDataType=Yt.getJSONTypes=Yt.getSchemaTypes=Yt.DataType=void 0;const _Q=Qs,BQ=Cu,TQ=cc,Ze=st,g9=we;var aa;(function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"})(aa||(Yt.DataType=aa={}));function $Q(e){const t=A9(e.type);if(t.includes("null")){if(e.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&e.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');e.nullable===!0&&t.push("null")}return t}Yt.getSchemaTypes=$Q;function A9(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(_Q.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}Yt.getJSONTypes=A9;function PQ(e,t){const{gen:r,data:n,opts:u}=e,s=kQ(t,u.coerceTypes),o=t.length>0&&!(s.length===0&&t.length===1&&(0,BQ.schemaHasRulesForType)(e,t[0]));if(o){const a=IE(t,n,u.strictNumbers,aa.Wrong);r.if(a,()=>{s.length?OQ(e,t,s):NE(e)})}return o}Yt.coerceAndCheckDataType=PQ;const F9=new Set(["string","number","integer","boolean","null"]);function kQ(e,t){return t?e.filter(r=>F9.has(r)||t==="array"&&r==="array"):[]}function OQ(e,t,r){const{gen:n,data:u,opts:s}=e,o=n.let("dataType",(0,Ze._)`typeof ${u}`),a=n.let("coerced",(0,Ze._)`undefined`);s.coerceTypes==="array"&&n.if((0,Ze._)`${o} == 'object' && Array.isArray(${u}) && ${u}.length == 1`,()=>n.assign(u,(0,Ze._)`${u}[0]`).assign(o,(0,Ze._)`typeof ${u}`).if(IE(t,u,s.strictNumbers),()=>n.assign(a,u))),n.if((0,Ze._)`${a} !== undefined`);for(const c of r)(F9.has(c)||c==="array"&&s.coerceTypes==="array")&&i(c);n.else(),NE(e),n.endIf(),n.if((0,Ze._)`${a} !== undefined`,()=>{n.assign(u,a),IQ(e,a)});function i(c){switch(c){case"string":n.elseIf((0,Ze._)`${o} == "number" || ${o} == "boolean"`).assign(a,(0,Ze._)`"" + ${u}`).elseIf((0,Ze._)`${u} === null`).assign(a,(0,Ze._)`""`);return;case"number":n.elseIf((0,Ze._)`${o} == "boolean" || ${u} === null + || (${o} == "string" && ${u} && ${u} == +${u})`).assign(a,(0,Ze._)`+${u}`);return;case"integer":n.elseIf((0,Ze._)`${o} === "boolean" || ${u} === null + || (${o} === "string" && ${u} && ${u} == +${u} && !(${u} % 1))`).assign(a,(0,Ze._)`+${u}`);return;case"boolean":n.elseIf((0,Ze._)`${u} === "false" || ${u} === 0 || ${u} === null`).assign(a,!1).elseIf((0,Ze._)`${u} === "true" || ${u} === 1`).assign(a,!0);return;case"null":n.elseIf((0,Ze._)`${u} === "" || ${u} === 0 || ${u} === false`),n.assign(a,null);return;case"array":n.elseIf((0,Ze._)`${o} === "string" || ${o} === "number" + || ${o} === "boolean" || ${u} === null`).assign(a,(0,Ze._)`[${u}]`)}}}function IQ({gen:e,parentData:t,parentDataProperty:r},n){e.if((0,Ze._)`${t} !== undefined`,()=>e.assign((0,Ze._)`${t}[${r}]`,n))}function Bh(e,t,r,n=aa.Correct){const u=n===aa.Correct?Ze.operators.EQ:Ze.operators.NEQ;let s;switch(e){case"null":return(0,Ze._)`${t} ${u} null`;case"array":s=(0,Ze._)`Array.isArray(${t})`;break;case"object":s=(0,Ze._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=o((0,Ze._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=o();break;default:return(0,Ze._)`typeof ${t} ${u} ${e}`}return n===aa.Correct?s:(0,Ze.not)(s);function o(a=Ze.nil){return(0,Ze.and)((0,Ze._)`typeof ${t} == "number"`,a,r?(0,Ze._)`isFinite(${t})`:Ze.nil)}}Yt.checkDataType=Bh;function IE(e,t,r,n){if(e.length===1)return Bh(e[0],t,r,n);let u;const s=(0,g9.toHash)(e);if(s.array&&s.object){const o=(0,Ze._)`typeof ${t} != "object"`;u=s.null?o:(0,Ze._)`!${t} || ${o}`,delete s.null,delete s.array,delete s.object}else u=Ze.nil;s.number&&delete s.integer;for(const o in s)u=(0,Ze.and)(u,Bh(o,t,r,n));return u}Yt.checkDataTypes=IE;const NQ={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>typeof e=="string"?(0,Ze._)`{type: ${e}}`:(0,Ze._)`{type: ${t}}`};function NE(e){const t=qQ(e);(0,TQ.reportError)(t,NQ)}Yt.reportTypeError=NE;function qQ(e){const{gen:t,data:r,schema:n}=e,u=(0,g9.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:u,schemaValue:u,parentSchema:n,params:{},it:e}}var ad={};Object.defineProperty(ad,"__esModule",{value:!0});ad.assignDefaults=void 0;const $o=st,xQ=we;function RQ(e,t){const{properties:r,items:n}=e.schema;if(t==="object"&&r)for(const u in r)$g(e,u,r[u].default);else t==="array"&&Array.isArray(n)&&n.forEach((u,s)=>$g(e,s,u.default))}ad.assignDefaults=RQ;function $g(e,t,r){const{gen:n,compositeRule:u,data:s,opts:o}=e;if(r===void 0)return;const a=(0,$o._)`${s}${(0,$o.getProperty)(t)}`;if(u){(0,xQ.checkStrictMode)(e,`default is ignored for: ${a}`);return}let i=(0,$o._)`${a} === undefined`;o.useDefaults==="empty"&&(i=(0,$o._)`${i} || ${a} === null || ${a} === ""`),n.if(i,(0,$o._)`${a} = ${(0,$o.stringify)(r)}`)}var Xn={},rt={};Object.defineProperty(rt,"__esModule",{value:!0});rt.validateUnion=rt.validateArray=rt.usePattern=rt.callValidateCode=rt.schemaProperties=rt.allSchemaProperties=rt.noPropertyInData=rt.propertyInData=rt.isOwnProperty=rt.hasPropFunc=rt.reportMissingProp=rt.checkMissingProp=rt.checkReportMissingProp=void 0;const wt=st,qE=we,Hu=nu,jQ=we;function MQ(e,t){const{gen:r,data:n,it:u}=e;r.if(RE(r,n,t,u.opts.ownProperties),()=>{e.setParams({missingProperty:(0,wt._)`${t}`},!0),e.error()})}rt.checkReportMissingProp=MQ;function LQ({gen:e,data:t,it:{opts:r}},n,u){return(0,wt.or)(...n.map(s=>(0,wt.and)(RE(e,t,s,r.ownProperties),(0,wt._)`${u} = ${s}`)))}rt.checkMissingProp=LQ;function UQ(e,t){e.setParams({missingProperty:t},!0),e.error()}rt.reportMissingProp=UQ;function C9(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,wt._)`Object.prototype.hasOwnProperty`})}rt.hasPropFunc=C9;function xE(e,t,r){return(0,wt._)`${C9(e)}.call(${t}, ${r})`}rt.isOwnProperty=xE;function GQ(e,t,r,n){const u=(0,wt._)`${t}${(0,wt.getProperty)(r)} !== undefined`;return n?(0,wt._)`${u} && ${xE(e,t,r)}`:u}rt.propertyInData=GQ;function RE(e,t,r,n){const u=(0,wt._)`${t}${(0,wt.getProperty)(r)} === undefined`;return n?(0,wt.or)(u,(0,wt.not)(xE(e,t,r))):u}rt.noPropertyInData=RE;function b9(e){return e?Object.keys(e).filter(t=>t!=="__proto__"):[]}rt.allSchemaProperties=b9;function VQ(e,t){return b9(t).filter(r=>!(0,qE.alwaysValidSchema)(e,t[r]))}rt.schemaProperties=VQ;function HQ({schemaCode:e,data:t,it:{gen:r,topSchemaRef:n,schemaPath:u,errorPath:s},it:o},a,i,c){const l=c?(0,wt._)`${e}, ${t}, ${n}${u}`:t,p=[[Hu.default.instancePath,(0,wt.strConcat)(Hu.default.instancePath,s)],[Hu.default.parentData,o.parentData],[Hu.default.parentDataProperty,o.parentDataProperty],[Hu.default.rootData,Hu.default.rootData]];o.opts.dynamicRef&&p.push([Hu.default.dynamicAnchors,Hu.default.dynamicAnchors]);const d=(0,wt._)`${l}, ${r.object(...p)}`;return i!==wt.nil?(0,wt._)`${a}.call(${i}, ${d})`:(0,wt._)`${a}(${d})`}rt.callValidateCode=HQ;const WQ=(0,wt._)`new RegExp`;function JQ({gen:e,it:{opts:t}},r){const n=t.unicodeRegExp?"u":"",{regExp:u}=t.code,s=u(r,n);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:(0,wt._)`${u.code==="new RegExp"?WQ:(0,jQ.useFunc)(e,u)}(${r}, ${n})`})}rt.usePattern=JQ;function zQ(e){const{gen:t,data:r,keyword:n,it:u}=e,s=t.name("valid");if(u.allErrors){const a=t.let("valid",!0);return o(()=>t.assign(a,!1)),a}return t.var(s,!0),o(()=>t.break()),s;function o(a){const i=t.const("len",(0,wt._)`${r}.length`);t.forRange("i",0,i,c=>{e.subschema({keyword:n,dataProp:c,dataPropType:qE.Type.Num},s),t.if((0,wt.not)(s),a)})}}rt.validateArray=zQ;function KQ(e){const{gen:t,schema:r,keyword:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some(i=>(0,qE.alwaysValidSchema)(u,i))&&!u.opts.unevaluated)return;const o=t.let("valid",!1),a=t.name("_valid");t.block(()=>r.forEach((i,c)=>{const l=e.subschema({keyword:n,schemaProp:c,compositeRule:!0},a);t.assign(o,(0,wt._)`${o} || ${a}`),e.mergeValidEvaluated(l,a)||t.if((0,wt.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}rt.validateUnion=KQ;Object.defineProperty(Xn,"__esModule",{value:!0});Xn.validateKeywordUsage=Xn.validSchemaType=Xn.funcKeywordCode=Xn.macroKeywordCode=void 0;const Ar=st,qs=nu,XQ=rt,YQ=cc;function ZQ(e,t){const{gen:r,keyword:n,schema:u,parentSchema:s,it:o}=e,a=t.macro.call(o.self,u,s,o),i=S9(r,n,a);o.opts.validateSchema!==!1&&o.self.validateSchema(a,!0);const c=r.name("valid");e.subschema({schema:a,schemaPath:Ar.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:i,compositeRule:!0},c),e.pass(c,()=>e.error(!0))}Xn.macroKeywordCode=ZQ;function QQ(e,t){var r;const{gen:n,keyword:u,schema:s,parentSchema:o,$data:a,it:i}=e;tee(i,t);const c=!a&&t.compile?t.compile.call(i.self,s,o,i):t.validate,l=S9(n,u,c),p=n.let("valid");e.block$data(p,d),e.ok((r=t.valid)!==null&&r!==void 0?r:p);function d(){if(t.errors===!1)y(),t.modifying&&Pg(e),A(()=>e.error());else{const m=t.async?f():h();t.modifying&&Pg(e),A(()=>eee(e,m))}}function f(){const m=n.let("ruleErrs",null);return n.try(()=>y((0,Ar._)`await `),v=>n.assign(p,!1).if((0,Ar._)`${v} instanceof ${i.ValidationError}`,()=>n.assign(m,(0,Ar._)`${v}.errors`),()=>n.throw(v))),m}function h(){const m=(0,Ar._)`${l}.errors`;return n.assign(m,null),y(Ar.nil),m}function y(m=t.async?(0,Ar._)`await `:Ar.nil){const v=i.opts.passContext?qs.default.this:qs.default.self,C=!("compile"in t&&!a||t.schema===!1);n.assign(p,(0,Ar._)`${m}${(0,XQ.callValidateCode)(e,l,v,C)}`,t.modifying)}function A(m){var v;n.if((0,Ar.not)((v=t.valid)!==null&&v!==void 0?v:p),m)}}Xn.funcKeywordCode=QQ;function Pg(e){const{gen:t,data:r,it:n}=e;t.if(n.parentData,()=>t.assign(r,(0,Ar._)`${n.parentData}[${n.parentDataProperty}]`))}function eee(e,t){const{gen:r}=e;r.if((0,Ar._)`Array.isArray(${t})`,()=>{r.assign(qs.default.vErrors,(0,Ar._)`${qs.default.vErrors} === null ? ${t} : ${qs.default.vErrors}.concat(${t})`).assign(qs.default.errors,(0,Ar._)`${qs.default.vErrors}.length`),(0,YQ.extendErrors)(e)},()=>e.error())}function tee({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}function S9(e,t,r){if(r===void 0)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword",typeof r=="function"?{ref:r}:{ref:r,code:(0,Ar.stringify)(r)})}function ree(e,t,r=!1){return!t.length||t.some(n=>n==="array"?Array.isArray(e):n==="object"?e&&typeof e=="object"&&!Array.isArray(e):typeof e==n||r&&typeof e>"u")}Xn.validSchemaType=ree;function nee({schema:e,opts:t,self:r,errSchemaPath:n},u,s){if(Array.isArray(u.keyword)?!u.keyword.includes(s):u.keyword!==s)throw new Error("ajv implementation error");const o=u.dependencies;if(o!=null&&o.some(a=>!Object.prototype.hasOwnProperty.call(e,a)))throw new Error(`parent schema must have dependencies of ${s}: ${o.join(",")}`);if(u.validateSchema&&!u.validateSchema(e[s])){const i=`keyword "${s}" value is invalid at path "${n}": `+r.errorsText(u.validateSchema.errors);if(t.validateSchema==="log")r.logger.error(i);else throw new Error(i)}}Xn.validateKeywordUsage=nee;var us={};Object.defineProperty(us,"__esModule",{value:!0});us.extendSubschemaMode=us.extendSubschemaData=us.getSubschema=void 0;const Jn=st,w9=we;function uee(e,{keyword:t,schemaProp:r,schema:n,schemaPath:u,errSchemaPath:s,topSchemaRef:o}){if(t!==void 0&&n!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(t!==void 0){const a=e.schema[t];return r===void 0?{schema:a,schemaPath:(0,Jn._)`${e.schemaPath}${(0,Jn.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:a[r],schemaPath:(0,Jn._)`${e.schemaPath}${(0,Jn.getProperty)(t)}${(0,Jn.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,w9.escapeFragment)(r)}`}}if(n!==void 0){if(u===void 0||s===void 0||o===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:n,schemaPath:u,topSchemaRef:o,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')}us.getSubschema=uee;function see(e,t,{dataProp:r,dataPropType:n,data:u,dataTypes:s,propertyName:o}){if(u!==void 0&&r!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:a}=t;if(r!==void 0){const{errorPath:c,dataPathArr:l,opts:p}=t,d=a.let("data",(0,Jn._)`${t.data}${(0,Jn.getProperty)(r)}`,!0);i(d),e.errorPath=(0,Jn.str)`${c}${(0,w9.getErrorPath)(r,n,p.jsPropertySyntax)}`,e.parentDataProperty=(0,Jn._)`${r}`,e.dataPathArr=[...l,e.parentDataProperty]}if(u!==void 0){const c=u instanceof Jn.Name?u:a.let("data",u,!0);i(c),o!==void 0&&(e.propertyName=o)}s&&(e.dataTypes=s);function i(c){e.data=c,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,c]}}us.extendSubschemaData=see;function oee(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:u,allErrors:s}){n!==void 0&&(e.compositeRule=n),u!==void 0&&(e.createErrors=u),s!==void 0&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=r}us.extendSubschemaMode=oee;var fr={},_9=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,u,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(u=n;u--!==0;)if(!e(t[u],r[u]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(u=n;u--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[u]))return!1;for(u=n;u--!==0;){var o=s[u];if(!e(t[o],r[o]))return!1}return!0}return t!==t&&r!==r},B9={exports:{}},Qu=B9.exports=function(e,t,r){typeof t=="function"&&(r=t,t={}),r=t.cb||r;var n=typeof r=="function"?r:r.pre||function(){},u=r.post||function(){};ql(t,n,u,e,"",e)};Qu.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0};Qu.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0};Qu.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0};Qu.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function ql(e,t,r,n,u,s,o,a,i,c){if(n&&typeof n=="object"&&!Array.isArray(n)){t(n,u,s,o,a,i,c);for(var l in n){var p=n[l];if(Array.isArray(p)){if(l in Qu.arrayKeywords)for(var d=0;dt+=T9(n)),t===1/0))return 1/0}return t}function $9(e,t="",r){r!==!1&&(t=ia(t));const n=e.parse(t);return P9(e,n)}fr.getFullPath=$9;function P9(e,t){return e.serialize(t).split("#")[0]+"#"}fr._getFullPath=P9;const hee=/#\/?$/;function ia(e){return e?e.replace(hee,""):""}fr.normalizeId=ia;function mee(e,t,r){return r=ia(r),e.resolve(t,r)}fr.resolveUrl=mee;const Eee=/^[a-z_][-a-z0-9._]*$/i;function yee(e,t){if(typeof e=="boolean")return{};const{schemaId:r,uriResolver:n}=this.opts,u=ia(e[r]||t),s={"":u},o=$9(n,u,!1),a={},i=new Set;return pee(e,{allKeys:!0},(p,d,f,h)=>{if(h===void 0)return;const y=o+d;let A=s[h];typeof p[r]=="string"&&(A=m.call(this,p[r])),v.call(this,p.$anchor),v.call(this,p.$dynamicAnchor),s[d]=A;function m(C){const B=this.opts.uriResolver.resolve;if(C=ia(A?B(A,C):C),i.has(C))throw l(C);i.add(C);let T=this.refs[C];return typeof T=="string"&&(T=this.refs[T]),typeof T=="object"?c(p,T.schema,C):C!==ia(y)&&(C[0]==="#"?(c(p,a[C],C),a[C]=p):this.refs[C]=y),C}function v(C){if(typeof C=="string"){if(!Eee.test(C))throw new Error(`invalid anchor "${C}"`);m.call(this,`#${C}`)}}}),a;function c(p,d,f){if(d!==void 0&&!lee(p,d))throw l(f)}function l(p){return new Error(`reference "${p}" resolves to more than one schema`)}}fr.getSchemaRefs=yee;Object.defineProperty($n,"__esModule",{value:!0});$n.getData=$n.KeywordCxt=$n.validateFunctionCode=void 0;const k9=ya,kg=Yt,jE=Cu,Fp=Yt,vee=ad,Fi=Xn,kf=us,je=st,Je=nu,gee=fr,bu=we,Ja=cc;function Aee(e){if(N9(e)&&(q9(e),I9(e))){bee(e);return}O9(e,()=>(0,k9.topBoolOrEmptySchema)(e))}$n.validateFunctionCode=Aee;function O9({gen:e,validateName:t,schema:r,schemaEnv:n,opts:u},s){u.code.es5?e.func(t,(0,je._)`${Je.default.data}, ${Je.default.valCxt}`,n.$async,()=>{e.code((0,je._)`"use strict"; ${Og(r,u)}`),Cee(e,u),e.code(s)}):e.func(t,(0,je._)`${Je.default.data}, ${Fee(u)}`,n.$async,()=>e.code(Og(r,u)).code(s))}function Fee(e){return(0,je._)`{${Je.default.instancePath}="", ${Je.default.parentData}, ${Je.default.parentDataProperty}, ${Je.default.rootData}=${Je.default.data}${e.dynamicRef?(0,je._)`, ${Je.default.dynamicAnchors}={}`:je.nil}}={}`}function Cee(e,t){e.if(Je.default.valCxt,()=>{e.var(Je.default.instancePath,(0,je._)`${Je.default.valCxt}.${Je.default.instancePath}`),e.var(Je.default.parentData,(0,je._)`${Je.default.valCxt}.${Je.default.parentData}`),e.var(Je.default.parentDataProperty,(0,je._)`${Je.default.valCxt}.${Je.default.parentDataProperty}`),e.var(Je.default.rootData,(0,je._)`${Je.default.valCxt}.${Je.default.rootData}`),t.dynamicRef&&e.var(Je.default.dynamicAnchors,(0,je._)`${Je.default.valCxt}.${Je.default.dynamicAnchors}`)},()=>{e.var(Je.default.instancePath,(0,je._)`""`),e.var(Je.default.parentData,(0,je._)`undefined`),e.var(Je.default.parentDataProperty,(0,je._)`undefined`),e.var(Je.default.rootData,Je.default.data),t.dynamicRef&&e.var(Je.default.dynamicAnchors,(0,je._)`{}`)})}function bee(e){const{schema:t,opts:r,gen:n}=e;O9(e,()=>{r.$comment&&t.$comment&&R9(e),Tee(e),n.let(Je.default.vErrors,null),n.let(Je.default.errors,0),r.unevaluated&&See(e),x9(e),kee(e)})}function See(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",(0,je._)`${r}.evaluated`),t.if((0,je._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,je._)`${e.evaluated}.props`,(0,je._)`undefined`)),t.if((0,je._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,je._)`${e.evaluated}.items`,(0,je._)`undefined`))}function Og(e,t){const r=typeof e=="object"&&e[t.schemaId];return r&&(t.code.source||t.code.process)?(0,je._)`/*# sourceURL=${r} */`:je.nil}function wee(e,t){if(N9(e)&&(q9(e),I9(e))){_ee(e,t);return}(0,k9.boolOrEmptySchema)(e,t)}function I9({schema:e,self:t}){if(typeof e=="boolean")return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function N9(e){return typeof e.schema!="boolean"}function _ee(e,t){const{schema:r,gen:n,opts:u}=e;u.$comment&&r.$comment&&R9(e),$ee(e),Pee(e);const s=n.const("_errs",Je.default.errors);x9(e,s),n.var(t,(0,je._)`${s} === ${Je.default.errors}`)}function q9(e){(0,bu.checkUnknownRules)(e),Bee(e)}function x9(e,t){if(e.opts.jtd)return Ig(e,[],!1,t);const r=(0,kg.getSchemaTypes)(e.schema),n=(0,kg.coerceAndCheckDataType)(e,r);Ig(e,r,!n,t)}function Bee(e){const{schema:t,errSchemaPath:r,opts:n,self:u}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,bu.schemaHasRulesButRef)(t,u.RULES)&&u.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}function Tee(e){const{schema:t,opts:r}=e;t.default!==void 0&&r.useDefaults&&r.strictSchema&&(0,bu.checkStrictMode)(e,"default is ignored in the schema root")}function $ee(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,gee.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function Pee(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}function R9({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:u}){const s=r.$comment;if(u.$comment===!0)e.code((0,je._)`${Je.default.self}.logger.log(${s})`);else if(typeof u.$comment=="function"){const o=(0,je.str)`${n}/$comment`,a=e.scopeValue("root",{ref:t.root});e.code((0,je._)`${Je.default.self}.opts.$comment(${s}, ${o}, ${a}.schema)`)}}function kee(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:u,opts:s}=e;r.$async?t.if((0,je._)`${Je.default.errors} === 0`,()=>t.return(Je.default.data),()=>t.throw((0,je._)`new ${u}(${Je.default.vErrors})`)):(t.assign((0,je._)`${n}.errors`,Je.default.vErrors),s.unevaluated&&Oee(e),t.return((0,je._)`${Je.default.errors} === 0`))}function Oee({gen:e,evaluated:t,props:r,items:n}){r instanceof je.Name&&e.assign((0,je._)`${t}.props`,r),n instanceof je.Name&&e.assign((0,je._)`${t}.items`,n)}function Ig(e,t,r,n){const{gen:u,schema:s,data:o,allErrors:a,opts:i,self:c}=e,{RULES:l}=c;if(s.$ref&&(i.ignoreKeywordsWithRef||!(0,bu.schemaHasRulesButRef)(s,l))){u.block(()=>L9(e,"$ref",l.all.$ref.definition));return}i.jtd||Iee(e,t),u.block(()=>{for(const d of l.rules)p(d);p(l.post)});function p(d){(0,jE.shouldUseGroup)(s,d)&&(d.type?(u.if((0,Fp.checkDataType)(d.type,o,i.strictNumbers)),Ng(e,d),t.length===1&&t[0]===d.type&&r&&(u.else(),(0,Fp.reportTypeError)(e)),u.endIf()):Ng(e,d),a||u.if((0,je._)`${Je.default.errors} === ${n||0}`))}}function Ng(e,t){const{gen:r,schema:n,opts:{useDefaults:u}}=e;u&&(0,vee.assignDefaults)(e,t.type),r.block(()=>{for(const s of t.rules)(0,jE.shouldUseRule)(n,s)&&L9(e,s.keyword,s.definition,t.type)})}function Iee(e,t){e.schemaEnv.meta||!e.opts.strictTypes||(Nee(e,t),e.opts.allowUnionTypes||qee(e,t),xee(e,e.dataTypes))}function Nee(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(r=>{j9(e.dataTypes,r)||ME(e,`type "${r}" not allowed by context "${e.dataTypes.join(",")}"`)}),jee(e,t)}}function qee(e,t){t.length>1&&!(t.length===2&&t.includes("null"))&&ME(e,"use allowUnionTypes to allow union type keyword")}function xee(e,t){const r=e.self.RULES.all;for(const n in r){const u=r[n];if(typeof u=="object"&&(0,jE.shouldUseRule)(e.schema,u)){const{type:s}=u.definition;s.length&&!s.some(o=>Ree(t,o))&&ME(e,`missing type "${s.join(",")}" for keyword "${n}"`)}}}function Ree(e,t){return e.includes(t)||t==="number"&&e.includes("integer")}function j9(e,t){return e.includes(t)||t==="integer"&&e.includes("number")}function jee(e,t){const r=[];for(const n of e.dataTypes)j9(t,n)?r.push(n):t.includes("integer")&&n==="number"&&r.push("integer");e.dataTypes=r}function ME(e,t){const r=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${r}" (strictTypes)`,(0,bu.checkStrictMode)(e,t,e.opts.strictTypes)}class M9{constructor(t,r,n){if((0,Fi.validateKeywordUsage)(t,r,n),this.gen=t.gen,this.allErrors=t.allErrors,this.keyword=n,this.data=t.data,this.schema=t.schema[n],this.$data=r.$data&&t.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,bu.schemaRefOrVal)(t,this.schema,n,this.$data),this.schemaType=r.schemaType,this.parentSchema=t.schema,this.params={},this.it=t,this.def=r,this.$data)this.schemaCode=t.gen.const("vSchema",U9(this.$data,t));else if(this.schemaCode=this.schemaValue,!(0,Fi.validSchemaType)(this.schema,r.schemaType,r.allowUndefined))throw new Error(`${n} value must be ${JSON.stringify(r.schemaType)}`);("code"in r?r.trackErrors:r.errors!==!1)&&(this.errsCount=t.gen.const("_errs",Je.default.errors))}result(t,r,n){this.failResult((0,je.not)(t),r,n)}failResult(t,r,n){this.gen.if(t),n?n():this.error(),r?(this.gen.else(),r(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(t,r){this.failResult((0,je.not)(t),void 0,r)}fail(t){if(t===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(t),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(t){if(!this.$data)return this.fail(t);const{schemaCode:r}=this;this.fail((0,je._)`${r} !== undefined && (${(0,je.or)(this.invalid$data(),t)})`)}error(t,r,n){if(r){this.setParams(r),this._error(t,n),this.setParams({});return}this._error(t,n)}_error(t,r){(t?Ja.reportExtraError:Ja.reportError)(this,this.def.error,r)}$dataError(){(0,Ja.reportError)(this,this.def.$dataError||Ja.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,Ja.resetErrorsCount)(this.gen,this.errsCount)}ok(t){this.allErrors||this.gen.if(t)}setParams(t,r){r?Object.assign(this.params,t):this.params=t}block$data(t,r,n=je.nil){this.gen.block(()=>{this.check$data(t,n),r()})}check$data(t=je.nil,r=je.nil){if(!this.$data)return;const{gen:n,schemaCode:u,schemaType:s,def:o}=this;n.if((0,je.or)((0,je._)`${u} === undefined`,r)),t!==je.nil&&n.assign(t,!0),(s.length||o.validateSchema)&&(n.elseIf(this.invalid$data()),this.$dataError(),t!==je.nil&&n.assign(t,!1)),n.else()}invalid$data(){const{gen:t,schemaCode:r,schemaType:n,def:u,it:s}=this;return(0,je.or)(o(),a());function o(){if(n.length){if(!(r instanceof je.Name))throw new Error("ajv implementation error");const i=Array.isArray(n)?n:[n];return(0,je._)`${(0,Fp.checkDataTypes)(i,r,s.opts.strictNumbers,Fp.DataType.Wrong)}`}return je.nil}function a(){if(u.validateSchema){const i=t.scopeValue("validate$data",{ref:u.validateSchema});return(0,je._)`!${i}(${r})`}return je.nil}}subschema(t,r){const n=(0,kf.getSubschema)(this.it,t);(0,kf.extendSubschemaData)(n,this.it,t),(0,kf.extendSubschemaMode)(n,t);const u={...this.it,...n,items:void 0,props:void 0};return wee(u,r),u}mergeEvaluated(t,r){const{it:n,gen:u}=this;n.opts.unevaluated&&(n.props!==!0&&t.props!==void 0&&(n.props=bu.mergeEvaluated.props(u,t.props,n.props,r)),n.items!==!0&&t.items!==void 0&&(n.items=bu.mergeEvaluated.items(u,t.items,n.items,r)))}mergeValidEvaluated(t,r){const{it:n,gen:u}=this;if(n.opts.unevaluated&&(n.props!==!0||n.items!==!0))return u.if(r,()=>this.mergeEvaluated(t,je.Name)),!0}}$n.KeywordCxt=M9;function L9(e,t,r,n){const u=new M9(e,r,t);"code"in r?r.code(u,n):u.$data&&r.validate?(0,Fi.funcKeywordCode)(u,r):"macro"in r?(0,Fi.macroKeywordCode)(u,r):(r.compile||r.validate)&&(0,Fi.funcKeywordCode)(u,r)}const Mee=/^\/(?:[^~]|~0|~1)*$/,Lee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function U9(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let u,s;if(e==="")return Je.default.rootData;if(e[0]==="/"){if(!Mee.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);u=e,s=Je.default.rootData}else{const c=Lee.exec(e);if(!c)throw new Error(`Invalid JSON-pointer: ${e}`);const l=+c[1];if(u=c[2],u==="#"){if(l>=t)throw new Error(i("property/index",l));return n[t-l]}if(l>t)throw new Error(i("data",l));if(s=r[t-l],!u)return s}let o=s;const a=u.split("/");for(const c of a)c&&(s=(0,je._)`${s}${(0,je.getProperty)((0,bu.unescapeJsonPointer)(c))}`,o=(0,je._)`${o} && ${s}`);return o;function i(c,l){return`Cannot access ${c} ${l} levels up, current level is ${t}`}}$n.getData=U9;var lc={};Object.defineProperty(lc,"__esModule",{value:!0});class Uee extends Error{constructor(t){super("validation failed"),this.errors=t,this.ajv=this.validation=!0}}lc.default=Uee;var Ba={};Object.defineProperty(Ba,"__esModule",{value:!0});const Of=fr;class Gee extends Error{constructor(t,r,n,u){super(u||`can't resolve reference ${n} from id ${r}`),this.missingRef=(0,Of.resolveUrl)(t,r,n),this.missingSchema=(0,Of.normalizeId)((0,Of.getFullPath)(t,this.missingRef))}}Ba.default=Gee;var qr={};Object.defineProperty(qr,"__esModule",{value:!0});qr.resolveSchema=qr.getCompilingSchema=qr.resolveRef=qr.compileSchema=qr.SchemaEnv=void 0;const mn=st,Vee=lc,Ts=nu,_n=fr,qg=we,Hee=$n;class id{constructor(t){var r;this.refs={},this.dynamicAnchors={};let n;typeof t.schema=="object"&&(n=t.schema),this.schema=t.schema,this.schemaId=t.schemaId,this.root=t.root||this,this.baseId=(r=t.baseId)!==null&&r!==void 0?r:(0,_n.normalizeId)(n==null?void 0:n[t.schemaId||"$id"]),this.schemaPath=t.schemaPath,this.localRefs=t.localRefs,this.meta=t.meta,this.$async=n==null?void 0:n.$async,this.refs={}}}qr.SchemaEnv=id;function LE(e){const t=G9.call(this,e);if(t)return t;const r=(0,_n.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:n,lines:u}=this.opts.code,{ownProperties:s}=this.opts,o=new mn.CodeGen(this.scope,{es5:n,lines:u,ownProperties:s});let a;e.$async&&(a=o.scopeValue("Error",{ref:Vee.default,code:(0,mn._)`require("ajv/dist/runtime/validation_error").default`}));const i=o.scopeName("validate");e.validateName=i;const c={gen:o,allErrors:this.opts.allErrors,data:Ts.default.data,parentData:Ts.default.parentData,parentDataProperty:Ts.default.parentDataProperty,dataNames:[Ts.default.data],dataPathArr:[mn.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:o.scopeValue("schema",this.opts.code.source===!0?{ref:e.schema,code:(0,mn.stringify)(e.schema)}:{ref:e.schema}),validateName:i,ValidationError:a,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:mn.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,mn._)`""`,opts:this.opts,self:this};let l;try{this._compilations.add(e),(0,Hee.validateFunctionCode)(c),o.optimize(this.opts.code.optimize);const p=o.toString();l=`${o.scopeRefs(Ts.default.scope)}return ${p}`,this.opts.code.process&&(l=this.opts.code.process(l,e));const f=new Function(`${Ts.default.self}`,`${Ts.default.scope}`,l)(this,this.scope.get());if(this.scope.value(i,{ref:f}),f.errors=null,f.schema=e.schema,f.schemaEnv=e,e.$async&&(f.$async=!0),this.opts.code.source===!0&&(f.source={validateName:i,validateCode:p,scopeValues:o._values}),this.opts.unevaluated){const{props:h,items:y}=c;f.evaluated={props:h instanceof mn.Name?void 0:h,items:y instanceof mn.Name?void 0:y,dynamicProps:h instanceof mn.Name,dynamicItems:y instanceof mn.Name},f.source&&(f.source.evaluated=(0,mn.stringify)(f.evaluated))}return e.validate=f,e}catch(p){throw delete e.validate,delete e.validateName,l&&this.logger.error("Error compiling schema, function code:",l),p}finally{this._compilations.delete(e)}}qr.compileSchema=LE;function Wee(e,t,r){var n;r=(0,_n.resolveUrl)(this.opts.uriResolver,t,r);const u=e.refs[r];if(u)return u;let s=Kee.call(this,e,r);if(s===void 0){const o=(n=e.localRefs)===null||n===void 0?void 0:n[r],{schemaId:a}=this.opts;o&&(s=new id({schema:o,schemaId:a,root:e,baseId:t}))}if(s!==void 0)return e.refs[r]=Jee.call(this,s)}qr.resolveRef=Wee;function Jee(e){return(0,_n.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:LE.call(this,e)}function G9(e){for(const t of this._compilations)if(zee(t,e))return t}qr.getCompilingSchema=G9;function zee(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function Kee(e,t){let r;for(;typeof(r=this.refs[t])=="string";)t=r;return r||this.schemas[t]||cd.call(this,e,t)}function cd(e,t){const r=this.opts.uriResolver.parse(t),n=(0,_n._getFullPath)(this.opts.uriResolver,r);let u=(0,_n.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===u)return If.call(this,r,e);const s=(0,_n.normalizeId)(n),o=this.refs[s]||this.schemas[s];if(typeof o=="string"){const a=cd.call(this,e,o);return typeof(a==null?void 0:a.schema)!="object"?void 0:If.call(this,r,a)}if(typeof(o==null?void 0:o.schema)=="object"){if(o.validate||LE.call(this,o),s===(0,_n.normalizeId)(t)){const{schema:a}=o,{schemaId:i}=this.opts,c=a[i];return c&&(u=(0,_n.resolveUrl)(this.opts.uriResolver,u,c)),new id({schema:a,schemaId:i,root:e,baseId:u})}return If.call(this,r,o)}}qr.resolveSchema=cd;const Xee=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function If(e,{baseId:t,schema:r,root:n}){var u;if(((u=e.fragment)===null||u===void 0?void 0:u[0])!=="/")return;for(const a of e.fragment.slice(1).split("/")){if(typeof r=="boolean")return;const i=r[(0,qg.unescapeFragment)(a)];if(i===void 0)return;r=i;const c=typeof r=="object"&&r[this.opts.schemaId];!Xee.has(a)&&c&&(t=(0,_n.resolveUrl)(this.opts.uriResolver,t,c))}let s;if(typeof r!="boolean"&&r.$ref&&!(0,qg.schemaHasRulesButRef)(r,this.RULES)){const a=(0,_n.resolveUrl)(this.opts.uriResolver,t,r.$ref);s=cd.call(this,n,a)}const{schemaId:o}=this.opts;if(s=s||new id({schema:r,schemaId:o,root:n,baseId:t}),s.schema!==s.root.schema)return s}const Yee="https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",Zee="Meta-schema for $data reference (JSON AnySchema extension proposal)",Qee="object",ete=["$data"],tte={$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},rte=!1,nte={$id:Yee,description:Zee,type:Qee,required:ete,properties:tte,additionalProperties:rte};var UE={},ld={exports:{}};const ute={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,a:10,A:10,b:11,B:11,c:12,C:12,d:13,D:13,e:14,E:14,f:15,F:15};var ste={HEX:ute};const{HEX:ote}=ste;function V9(e){if(W9(e,".")<3)return{host:e,isIPV4:!1};const t=e.match(/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/u)||[],[r]=t;return r?{host:ite(r,"."),isIPV4:!0}:{host:e,isIPV4:!1}}function $h(e,t=!1){let r="",n=!0;for(const u of e){if(ote[u]===void 0)return;u!=="0"&&n===!0&&(n=!1),n||(r+=u)}return t&&r.length===0&&(r="0"),r}function ate(e){let t=0;const r={error:!1,address:"",zone:""},n=[],u=[];let s=!1,o=!1,a=!1;function i(){if(u.length){if(s===!1){const c=$h(u);if(c!==void 0)n.push(c);else return r.error=!0,!1}u.length=0}return!0}for(let c=0;c7){r.error=!0;break}c-1>=0&&e[c-1]===":"&&(o=!0);continue}else if(l==="%"){if(!i())break;s=!0}else{u.push(l);continue}}return u.length&&(s?r.zone=u.join(""):a?n.push(u.join("")):n.push($h(u))),r.address=n.join(""),r}function H9(e,t={}){if(W9(e,":")<2)return{host:e,isIPV6:!1};const r=ate(e);if(r.error)return{host:e,isIPV6:!1};{let n=r.address,u=r.address;return r.zone&&(n+="%"+r.zone,u+="%25"+r.zone),{host:n,escapedHost:u,isIPV6:!0}}}function ite(e,t){let r="",n=!0;const u=e.length;for(let s=0;s/[^!"$&'()*+,\-.;=_`a-z{}~]/u.test(String.fromCharCode(t)));function Ite(e){let t=0;for(let r=0,n=e.length;r126||Ote[t])return!0;return!1}const Nte=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function Bu(e,t){const r=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},u=e.indexOf("%")!==-1;let s=!1;r.reference==="suffix"&&(e=(r.scheme?r.scheme+":":"")+"//"+e);const o=e.match(Nte);if(o){if(n.scheme=o[1],n.userinfo=o[3],n.host=o[4],n.port=parseInt(o[5],10),n.path=o[6]||"",n.query=o[7],n.fragment=o[8],isNaN(n.port)&&(n.port=o[5]),n.host){const i=Bte(n.host);if(i.isIPV4===!1){const c=_te(i.host,{isIPV4:!1});n.host=c.host.toLowerCase(),s=c.isIPV6}else n.host=i.host,s=!0}n.scheme===void 0&&n.userinfo===void 0&&n.host===void 0&&n.port===void 0&&!n.path&&n.query===void 0?n.reference="same-document":n.scheme===void 0?n.reference="relative":n.fragment===void 0?n.reference="absolute":n.reference="uri",r.reference&&r.reference!=="suffix"&&r.reference!==n.reference&&(n.error=n.error||"URI is not a "+r.reference+" reference.");const a=VE[(r.scheme||n.scheme||"").toLowerCase()];if(!r.unicodeSupport&&(!a||!a.unicodeSupport)&&n.host&&(r.domainHost||a&&a.domainHost)&&s===!1&&Ite(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(i){n.error=n.error||"Host's domain name can not be converted to ASCII: "+i}(!a||a&&!a.skipNormalize)&&(u&&n.scheme!==void 0&&(n.scheme=unescape(n.scheme)),u&&n.userinfo!==void 0&&(n.userinfo=unescape(n.userinfo)),u&&n.host!==void 0&&(n.host=unescape(n.host)),n.path!==void 0&&n.path.length&&(n.path=escape(unescape(n.path))),n.fragment!==void 0&&n.fragment.length&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),a&&a.parse&&a.parse(n,r)}else n.error=n.error||"URI can not be parsed.";return n}const HE={SCHEMES:VE,normalize:$te,resolve:Pte,resolveComponents:Y9,equal:kte,serialize:Yn,parse:Bu};ld.exports=HE;ld.exports.default=HE;ld.exports.fastUri=HE;var qte=ld.exports;Object.defineProperty(UE,"__esModule",{value:!0});const Z9=qte;Z9.code='require("ajv/dist/runtime/uri").default';UE.default=Z9;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=$n;Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=st;Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=lc,u=Ba,s=Qs,o=qr,a=st,i=fr,c=Yt,l=we,p=nte,d=UE,f=(z,O)=>new RegExp(z,O);f.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],y=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),A={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},m={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},v=200;function C(z){var O,E,F,D,g,P,b,w,I,$,M,L,Y,be,Ne,Ve,Me,Fe,qe,Pe,Be,le,Te,W,se;const ce=z.strict,k=(O=z.code)===null||O===void 0?void 0:O.optimize,S=k===!0||k===void 0?1:k||0,_=(F=(E=z.code)===null||E===void 0?void 0:E.regExp)!==null&&F!==void 0?F:f,x=(D=z.uriResolver)!==null&&D!==void 0?D:d.default;return{strictSchema:(P=(g=z.strictSchema)!==null&&g!==void 0?g:ce)!==null&&P!==void 0?P:!0,strictNumbers:(w=(b=z.strictNumbers)!==null&&b!==void 0?b:ce)!==null&&w!==void 0?w:!0,strictTypes:($=(I=z.strictTypes)!==null&&I!==void 0?I:ce)!==null&&$!==void 0?$:"log",strictTuples:(L=(M=z.strictTuples)!==null&&M!==void 0?M:ce)!==null&&L!==void 0?L:"log",strictRequired:(be=(Y=z.strictRequired)!==null&&Y!==void 0?Y:ce)!==null&&be!==void 0?be:!1,code:z.code?{...z.code,optimize:S,regExp:_}:{optimize:S,regExp:_},loopRequired:(Ne=z.loopRequired)!==null&&Ne!==void 0?Ne:v,loopEnum:(Ve=z.loopEnum)!==null&&Ve!==void 0?Ve:v,meta:(Me=z.meta)!==null&&Me!==void 0?Me:!0,messages:(Fe=z.messages)!==null&&Fe!==void 0?Fe:!0,inlineRefs:(qe=z.inlineRefs)!==null&&qe!==void 0?qe:!0,schemaId:(Pe=z.schemaId)!==null&&Pe!==void 0?Pe:"$id",addUsedSchema:(Be=z.addUsedSchema)!==null&&Be!==void 0?Be:!0,validateSchema:(le=z.validateSchema)!==null&&le!==void 0?le:!0,validateFormats:(Te=z.validateFormats)!==null&&Te!==void 0?Te:!0,unicodeRegExp:(W=z.unicodeRegExp)!==null&&W!==void 0?W:!0,int32range:(se=z.int32range)!==null&&se!==void 0?se:!0,uriResolver:x}}class B{constructor(O={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,O=this.opts={...O,...C(O)};const{es5:E,lines:F}=this.opts.code;this.scope=new a.ValueScope({scope:{},prefixes:y,es5:E,lines:F}),this.logger=K(O.logger);const D=O.validateFormats;O.validateFormats=!1,this.RULES=(0,s.getRules)(),T.call(this,A,O,"NOT SUPPORTED"),T.call(this,m,O,"DEPRECATED","warn"),this._metaOpts=G.call(this),O.formats&&J.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),O.keywords&&q.call(this,O.keywords),typeof O.meta=="object"&&this.addMetaSchema(O.meta),R.call(this),O.validateFormats=D}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:O,meta:E,schemaId:F}=this.opts;let D=p;F==="id"&&(D={...p},D.id=D.$id,delete D.$id),E&&O&&this.addMetaSchema(D,D[F],!1)}defaultMeta(){const{meta:O,schemaId:E}=this.opts;return this.opts.defaultMeta=typeof O=="object"?O[E]||O:void 0}validate(O,E){let F;if(typeof O=="string"){if(F=this.getSchema(O),!F)throw new Error(`no schema with key or ref "${O}"`)}else F=this.compile(O);const D=F(E);return"$async"in F||(this.errors=F.errors),D}compile(O,E){const F=this._addSchema(O,E);return F.validate||this._compileSchemaEnv(F)}compileAsync(O,E){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:F}=this.opts;return D.call(this,O,E);async function D($,M){await g.call(this,$.$schema);const L=this._addSchema($,M);return L.validate||P.call(this,L)}async function g($){$&&!this.getSchema($)&&await D.call(this,{$ref:$},!0)}async function P($){try{return this._compileSchemaEnv($)}catch(M){if(!(M instanceof u.default))throw M;return b.call(this,M),await w.call(this,M.missingSchema),P.call(this,$)}}function b({missingSchema:$,missingRef:M}){if(this.refs[$])throw new Error(`AnySchema ${$} is loaded but ${M} cannot be resolved`)}async function w($){const M=await I.call(this,$);this.refs[$]||await g.call(this,M.$schema),this.refs[$]||this.addSchema(M,$,E)}async function I($){const M=this._loading[$];if(M)return M;try{return await(this._loading[$]=F($))}finally{delete this._loading[$]}}}addSchema(O,E,F,D=this.opts.validateSchema){if(Array.isArray(O)){for(const P of O)this.addSchema(P,void 0,F,D);return this}let g;if(typeof O=="object"){const{schemaId:P}=this.opts;if(g=O[P],g!==void 0&&typeof g!="string")throw new Error(`schema ${P} must be string`)}return E=(0,i.normalizeId)(E||g),this._checkUnique(E),this.schemas[E]=this._addSchema(O,F,E,D,!0),this}addMetaSchema(O,E,F=this.opts.validateSchema){return this.addSchema(O,E,!0,F),this}validateSchema(O,E){if(typeof O=="boolean")return!0;let F;if(F=O.$schema,F!==void 0&&typeof F!="string")throw new Error("$schema must be a string");if(F=F||this.opts.defaultMeta||this.defaultMeta(),!F)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const D=this.validate(F,O);if(!D&&E){const g="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(g);else throw new Error(g)}return D}getSchema(O){let E;for(;typeof(E=N.call(this,O))=="string";)O=E;if(E===void 0){const{schemaId:F}=this.opts,D=new o.SchemaEnv({schema:{},schemaId:F});if(E=o.resolveSchema.call(this,D,O),!E)return;this.refs[O]=E}return E.validate||this._compileSchemaEnv(E)}removeSchema(O){if(O instanceof RegExp)return this._removeAllSchemas(this.schemas,O),this._removeAllSchemas(this.refs,O),this;switch(typeof O){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const E=N.call(this,O);return typeof E=="object"&&this._cache.delete(E.schema),delete this.schemas[O],delete this.refs[O],this}case"object":{const E=O;this._cache.delete(E);let F=O[this.opts.schemaId];return F&&(F=(0,i.normalizeId)(F),delete this.schemas[F],delete this.refs[F]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(O){for(const E of O)this.addKeyword(E);return this}addKeyword(O,E){let F;if(typeof O=="string")F=O,typeof E=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),E.keyword=F);else if(typeof O=="object"&&E===void 0){if(E=O,F=E.keyword,Array.isArray(F)&&!F.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(oe.call(this,F,E),!E)return(0,l.eachItem)(F,g=>de.call(this,g)),this;fe.call(this,E);const D={...E,type:(0,c.getJSONTypes)(E.type),schemaType:(0,c.getJSONTypes)(E.schemaType)};return(0,l.eachItem)(F,D.type.length===0?g=>de.call(this,g,D):g=>D.type.forEach(P=>de.call(this,g,D,P))),this}getKeyword(O){const E=this.RULES.all[O];return typeof E=="object"?E.definition:!!E}removeKeyword(O){const{RULES:E}=this;delete E.keywords[O],delete E.all[O];for(const F of E.rules){const D=F.rules.findIndex(g=>g.keyword===O);D>=0&&F.rules.splice(D,1)}return this}addFormat(O,E){return typeof E=="string"&&(E=new RegExp(E)),this.formats[O]=E,this}errorsText(O=this.errors,{separator:E=", ",dataVar:F="data"}={}){return!O||O.length===0?"No errors":O.map(D=>`${F}${D.instancePath} ${D.message}`).reduce((D,g)=>D+E+g)}$dataMetaSchema(O,E){const F=this.RULES.all;O=JSON.parse(JSON.stringify(O));for(const D of E){const g=D.split("/").slice(1);let P=O;for(const b of g)P=P[b];for(const b in F){const w=F[b];if(typeof w!="object")continue;const{$data:I}=w.definition,$=P[b];I&&$&&(P[b]=pe($))}}return O}_removeAllSchemas(O,E){for(const F in O){const D=O[F];(!E||E.test(F))&&(typeof D=="string"?delete O[F]:D&&!D.meta&&(this._cache.delete(D.schema),delete O[F]))}}_addSchema(O,E,F,D=this.opts.validateSchema,g=this.opts.addUsedSchema){let P;const{schemaId:b}=this.opts;if(typeof O=="object")P=O[b];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof O!="boolean")throw new Error("schema must be object or boolean")}let w=this._cache.get(O);if(w!==void 0)return w;F=(0,i.normalizeId)(P||F);const I=i.getSchemaRefs.call(this,O,F);return w=new o.SchemaEnv({schema:O,schemaId:b,meta:E,baseId:F,localRefs:I}),this._cache.set(w.schema,w),g&&!F.startsWith("#")&&(F&&this._checkUnique(F),this.refs[F]=w),D&&this.validateSchema(O,!0),w}_checkUnique(O){if(this.schemas[O]||this.refs[O])throw new Error(`schema with key or id "${O}" already exists`)}_compileSchemaEnv(O){if(O.meta?this._compileMetaSchema(O):o.compileSchema.call(this,O),!O.validate)throw new Error("ajv implementation error");return O.validate}_compileMetaSchema(O){const E=this.opts;this.opts=this._metaOpts;try{o.compileSchema.call(this,O)}finally{this.opts=E}}}B.ValidationError=n.default,B.MissingRefError=u.default,e.default=B;function T(z,O,E,F="error"){for(const D in z){const g=D;g in O&&this.logger[F](`${E}: option ${D}. ${z[g]}`)}}function N(z){return z=(0,i.normalizeId)(z),this.schemas[z]||this.refs[z]}function R(){const z=this.opts.schemas;if(z)if(Array.isArray(z))this.addSchema(z);else for(const O in z)this.addSchema(z[O],O)}function J(){for(const z in this.opts.formats){const O=this.opts.formats[z];O&&this.addFormat(z,O)}}function q(z){if(Array.isArray(z)){this.addVocabulary(z);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const O in z){const E=z[O];E.keyword||(E.keyword=O),this.addKeyword(E)}}function G(){const z={...this.opts};for(const O of h)delete z[O];return z}const ee={log(){},warn(){},error(){}};function K(z){if(z===!1)return ee;if(z===void 0)return console;if(z.log&&z.warn&&z.error)return z;throw new Error("logger must implement log, warn and error methods")}const ue=/^[a-z_$][a-z0-9_$:-]*$/i;function oe(z,O){const{RULES:E}=this;if((0,l.eachItem)(z,F=>{if(E.keywords[F])throw new Error(`Keyword ${F} is already defined`);if(!ue.test(F))throw new Error(`Keyword ${F} has invalid name`)}),!!O&&O.$data&&!("code"in O||"validate"in O))throw new Error('$data keyword must have "code" or "validate" function')}function de(z,O,E){var F;const D=O==null?void 0:O.post;if(E&&D)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:g}=this;let P=D?g.post:g.rules.find(({type:w})=>w===E);if(P||(P={type:E,rules:[]},g.rules.push(P)),g.keywords[z]=!0,!O)return;const b={keyword:z,definition:{...O,type:(0,c.getJSONTypes)(O.type),schemaType:(0,c.getJSONTypes)(O.schemaType)}};O.before?he.call(this,P,b,O.before):P.rules.push(b),g.all[z]=b,(F=O.implements)===null||F===void 0||F.forEach(w=>this.addKeyword(w))}function he(z,O,E){const F=z.rules.findIndex(D=>D.keyword===E);F>=0?z.rules.splice(F,0,O):(z.rules.push(O),this.logger.warn(`rule ${E} is not defined`))}function fe(z){let{metaSchema:O}=z;O!==void 0&&(z.$data&&this.opts.$data&&(O=pe(O)),z.validateSchema=this.compile(O,!0))}const ge={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function pe(z){return{anyOf:[z,ge]}}})(p9);var WE={},JE={},zE={};Object.defineProperty(zE,"__esModule",{value:!0});const xte={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};zE.default=xte;var eo={};Object.defineProperty(eo,"__esModule",{value:!0});eo.callRef=eo.getValidate=void 0;const Rte=Ba,Mg=rt,$r=st,Po=nu,Lg=qr,al=we,jte={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:n}=e,{baseId:u,schemaEnv:s,validateName:o,opts:a,self:i}=n,{root:c}=s;if((r==="#"||r==="#/")&&u===c.baseId)return p();const l=Lg.resolveRef.call(i,c,u,r);if(l===void 0)throw new Rte.default(n.opts.uriResolver,u,r);if(l instanceof Lg.SchemaEnv)return d(l);return f(l);function p(){if(s===c)return Rl(e,o,s,s.$async);const h=t.scopeValue("root",{ref:c});return Rl(e,(0,$r._)`${h}.validate`,c,c.$async)}function d(h){const y=Q9(e,h);Rl(e,y,h,h.$async)}function f(h){const y=t.scopeValue("schema",a.code.source===!0?{ref:h,code:(0,$r.stringify)(h)}:{ref:h}),A=t.name("valid"),m=e.subschema({schema:h,dataTypes:[],schemaPath:$r.nil,topSchemaRef:y,errSchemaPath:r},A);e.mergeEvaluated(m),e.ok(A)}}};function Q9(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):(0,$r._)`${r.scopeValue("wrapper",{ref:t})}.validate`}eo.getValidate=Q9;function Rl(e,t,r,n){const{gen:u,it:s}=e,{allErrors:o,schemaEnv:a,opts:i}=s,c=i.passContext?Po.default.this:$r.nil;n?l():p();function l(){if(!a.$async)throw new Error("async schema referenced by sync schema");const h=u.let("valid");u.try(()=>{u.code((0,$r._)`await ${(0,Mg.callValidateCode)(e,t,c)}`),f(t),o||u.assign(h,!0)},y=>{u.if((0,$r._)`!(${y} instanceof ${s.ValidationError})`,()=>u.throw(y)),d(y),o||u.assign(h,!1)}),e.ok(h)}function p(){e.result((0,Mg.callValidateCode)(e,t,c),()=>f(t),()=>d(t))}function d(h){const y=(0,$r._)`${h}.errors`;u.assign(Po.default.vErrors,(0,$r._)`${Po.default.vErrors} === null ? ${y} : ${Po.default.vErrors}.concat(${y})`),u.assign(Po.default.errors,(0,$r._)`${Po.default.vErrors}.length`)}function f(h){var y;if(!s.opts.unevaluated)return;const A=(y=r==null?void 0:r.validate)===null||y===void 0?void 0:y.evaluated;if(s.props!==!0)if(A&&!A.dynamicProps)A.props!==void 0&&(s.props=al.mergeEvaluated.props(u,A.props,s.props));else{const m=u.var("props",(0,$r._)`${h}.evaluated.props`);s.props=al.mergeEvaluated.props(u,m,s.props,$r.Name)}if(s.items!==!0)if(A&&!A.dynamicItems)A.items!==void 0&&(s.items=al.mergeEvaluated.items(u,A.items,s.items));else{const m=u.var("items",(0,$r._)`${h}.evaluated.items`);s.items=al.mergeEvaluated.items(u,m,s.items,$r.Name)}}}eo.callRef=Rl;eo.default=jte;Object.defineProperty(JE,"__esModule",{value:!0});const Mte=zE,Lte=eo,Ute=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",Mte.default,Lte.default];JE.default=Ute;var KE={},XE={};Object.defineProperty(XE,"__esModule",{value:!0});const Cp=st,Wu=Cp.operators,bp={maximum:{okStr:"<=",ok:Wu.LTE,fail:Wu.GT},minimum:{okStr:">=",ok:Wu.GTE,fail:Wu.LT},exclusiveMaximum:{okStr:"<",ok:Wu.LT,fail:Wu.GTE},exclusiveMinimum:{okStr:">",ok:Wu.GT,fail:Wu.LTE}},Gte={message:({keyword:e,schemaCode:t})=>(0,Cp.str)`must be ${bp[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,Cp._)`{comparison: ${bp[e].okStr}, limit: ${t}}`},Vte={keyword:Object.keys(bp),type:"number",schemaType:"number",$data:!0,error:Gte,code(e){const{keyword:t,data:r,schemaCode:n}=e;e.fail$data((0,Cp._)`${r} ${bp[t].fail} ${n} || isNaN(${r})`)}};XE.default=Vte;var YE={};Object.defineProperty(YE,"__esModule",{value:!0});const Ci=st,Hte={message:({schemaCode:e})=>(0,Ci.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,Ci._)`{multipleOf: ${e}}`},Wte={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:Hte,code(e){const{gen:t,data:r,schemaCode:n,it:u}=e,s=u.opts.multipleOfPrecision,o=t.let("res"),a=s?(0,Ci._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${s}`:(0,Ci._)`${o} !== parseInt(${o})`;e.fail$data((0,Ci._)`(${n} === 0 || (${o} = ${r}/${n}, ${a}))`)}};YE.default=Wte;var ZE={},QE={};Object.defineProperty(QE,"__esModule",{value:!0});function ew(e){const t=e.length;let r=0,n=0,u;for(;n=55296&&u<=56319&&n(0,xs._)`{limit: ${e}}`},Xte={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:Kte,code(e){const{keyword:t,data:r,schemaCode:n,it:u}=e,s=t==="maxLength"?xs.operators.GT:xs.operators.LT,o=u.opts.unicode===!1?(0,xs._)`${r}.length`:(0,xs._)`${(0,Jte.useFunc)(e.gen,zte.default)}(${r})`;e.fail$data((0,xs._)`${o} ${s} ${n}`)}};ZE.default=Xte;var e3={};Object.defineProperty(e3,"__esModule",{value:!0});const Yte=rt,Sp=st,Zte={message:({schemaCode:e})=>(0,Sp.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,Sp._)`{pattern: ${e}}`},Qte={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:Zte,code(e){const{data:t,$data:r,schema:n,schemaCode:u,it:s}=e,o=s.opts.unicodeRegExp?"u":"",a=r?(0,Sp._)`(new RegExp(${u}, ${o}))`:(0,Yte.usePattern)(e,n);e.fail$data((0,Sp._)`!${a}.test(${t})`)}};e3.default=Qte;var t3={};Object.defineProperty(t3,"__esModule",{value:!0});const bi=st,ere={message({keyword:e,schemaCode:t}){const r=e==="maxProperties"?"more":"fewer";return(0,bi.str)`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>(0,bi._)`{limit: ${e}}`},tre={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:ere,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxProperties"?bi.operators.GT:bi.operators.LT;e.fail$data((0,bi._)`Object.keys(${r}).length ${u} ${n}`)}};t3.default=tre;var r3={};Object.defineProperty(r3,"__esModule",{value:!0});const za=rt,Si=st,rre=we,nre={message:({params:{missingProperty:e}})=>(0,Si.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,Si._)`{missingProperty: ${e}}`},ure={keyword:"required",type:"object",schemaType:"array",$data:!0,error:nre,code(e){const{gen:t,schema:r,schemaCode:n,data:u,$data:s,it:o}=e,{opts:a}=o;if(!s&&r.length===0)return;const i=r.length>=a.loopRequired;if(o.allErrors?c():l(),a.strictRequired){const f=e.parentSchema.properties,{definedProperties:h}=e.it;for(const y of r)if((f==null?void 0:f[y])===void 0&&!h.has(y)){const A=o.schemaEnv.baseId+o.errSchemaPath,m=`required property "${y}" is not defined at "${A}" (strictRequired)`;(0,rre.checkStrictMode)(o,m,o.opts.strictRequired)}}function c(){if(i||s)e.block$data(Si.nil,p);else for(const f of r)(0,za.checkReportMissingProp)(e,f)}function l(){const f=t.let("missing");if(i||s){const h=t.let("valid",!0);e.block$data(h,()=>d(f,h)),e.ok(h)}else t.if((0,za.checkMissingProp)(e,r,f)),(0,za.reportMissingProp)(e,f),t.else()}function p(){t.forOf("prop",n,f=>{e.setParams({missingProperty:f}),t.if((0,za.noPropertyInData)(t,u,f,a.ownProperties),()=>e.error())})}function d(f,h){e.setParams({missingProperty:f}),t.forOf(f,n,()=>{t.assign(h,(0,za.propertyInData)(t,u,f,a.ownProperties)),t.if((0,Si.not)(h),()=>{e.error(),t.break()})},Si.nil)}}};r3.default=ure;var n3={};Object.defineProperty(n3,"__esModule",{value:!0});const wi=st,sre={message({keyword:e,schemaCode:t}){const r=e==="maxItems"?"more":"fewer";return(0,wi.str)`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>(0,wi._)`{limit: ${e}}`},ore={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:sre,code(e){const{keyword:t,data:r,schemaCode:n}=e,u=t==="maxItems"?wi.operators.GT:wi.operators.LT;e.fail$data((0,wi._)`${r}.length ${u} ${n}`)}};n3.default=ore;var u3={},pc={};Object.defineProperty(pc,"__esModule",{value:!0});const tw=_9;tw.code='require("ajv/dist/runtime/equal").default';pc.default=tw;Object.defineProperty(u3,"__esModule",{value:!0});const Nf=Yt,lr=st,are=we,ire=pc,cre={message:({params:{i:e,j:t}})=>(0,lr.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,lr._)`{i: ${e}, j: ${t}}`},lre={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:cre,code(e){const{gen:t,data:r,$data:n,schema:u,parentSchema:s,schemaCode:o,it:a}=e;if(!n&&!u)return;const i=t.let("valid"),c=s.items?(0,Nf.getSchemaTypes)(s.items):[];e.block$data(i,l,(0,lr._)`${o} === false`),e.ok(i);function l(){const h=t.let("i",(0,lr._)`${r}.length`),y=t.let("j");e.setParams({i:h,j:y}),t.assign(i,!0),t.if((0,lr._)`${h} > 1`,()=>(p()?d:f)(h,y))}function p(){return c.length>0&&!c.some(h=>h==="object"||h==="array")}function d(h,y){const A=t.name("item"),m=(0,Nf.checkDataTypes)(c,A,a.opts.strictNumbers,Nf.DataType.Wrong),v=t.const("indices",(0,lr._)`{}`);t.for((0,lr._)`;${h}--;`,()=>{t.let(A,(0,lr._)`${r}[${h}]`),t.if(m,(0,lr._)`continue`),c.length>1&&t.if((0,lr._)`typeof ${A} == "string"`,(0,lr._)`${A} += "_"`),t.if((0,lr._)`typeof ${v}[${A}] == "number"`,()=>{t.assign(y,(0,lr._)`${v}[${A}]`),e.error(),t.assign(i,!1).break()}).code((0,lr._)`${v}[${A}] = ${h}`)})}function f(h,y){const A=(0,are.useFunc)(t,ire.default),m=t.name("outer");t.label(m).for((0,lr._)`;${h}--;`,()=>t.for((0,lr._)`${y} = ${h}; ${y}--;`,()=>t.if((0,lr._)`${A}(${r}[${h}], ${r}[${y}])`,()=>{e.error(),t.assign(i,!1).break(m)})))}}};u3.default=lre;var s3={};Object.defineProperty(s3,"__esModule",{value:!0});const Ph=st,pre=we,dre=pc,fre={message:"must be equal to constant",params:({schemaCode:e})=>(0,Ph._)`{allowedValue: ${e}}`},Dre={keyword:"const",$data:!0,error:fre,code(e){const{gen:t,data:r,$data:n,schemaCode:u,schema:s}=e;n||s&&typeof s=="object"?e.fail$data((0,Ph._)`!${(0,pre.useFunc)(t,dre.default)}(${r}, ${u})`):e.fail((0,Ph._)`${s} !== ${r}`)}};s3.default=Dre;var o3={};Object.defineProperty(o3,"__esModule",{value:!0});const di=st,hre=we,mre=pc,Ere={message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,di._)`{allowedValues: ${e}}`},yre={keyword:"enum",schemaType:"array",$data:!0,error:Ere,code(e){const{gen:t,data:r,$data:n,schema:u,schemaCode:s,it:o}=e;if(!n&&u.length===0)throw new Error("enum must have non-empty array");const a=u.length>=o.opts.loopEnum;let i;const c=()=>i??(i=(0,hre.useFunc)(t,mre.default));let l;if(a||n)l=t.let("valid"),e.block$data(l,p);else{if(!Array.isArray(u))throw new Error("ajv implementation error");const f=t.const("vSchema",s);l=(0,di.or)(...u.map((h,y)=>d(f,y)))}e.pass(l);function p(){t.assign(l,!1),t.forOf("v",s,f=>t.if((0,di._)`${c()}(${r}, ${f})`,()=>t.assign(l,!0).break()))}function d(f,h){const y=u[h];return typeof y=="object"&&y!==null?(0,di._)`${c()}(${r}, ${f}[${h}])`:(0,di._)`${r} === ${y}`}}};o3.default=yre;Object.defineProperty(KE,"__esModule",{value:!0});const vre=XE,gre=YE,Are=ZE,Fre=e3,Cre=t3,bre=r3,Sre=n3,wre=u3,_re=s3,Bre=o3,Tre=[vre.default,gre.default,Are.default,Fre.default,Cre.default,bre.default,Sre.default,wre.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},_re.default,Bre.default];KE.default=Tre;var a3={},Ta={};Object.defineProperty(Ta,"__esModule",{value:!0});Ta.validateAdditionalItems=void 0;const Rs=st,kh=we,$re={message:({params:{len:e}})=>(0,Rs.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Rs._)`{limit: ${e}}`},Pre={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:$re,code(e){const{parentSchema:t,it:r}=e,{items:n}=t;if(!Array.isArray(n)){(0,kh.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas');return}rw(e,n)}};function rw(e,t){const{gen:r,schema:n,data:u,keyword:s,it:o}=e;o.items=!0;const a=r.const("len",(0,Rs._)`${u}.length`);if(n===!1)e.setParams({len:t.length}),e.pass((0,Rs._)`${a} <= ${t.length}`);else if(typeof n=="object"&&!(0,kh.alwaysValidSchema)(o,n)){const c=r.var("valid",(0,Rs._)`${a} <= ${t.length}`);r.if((0,Rs.not)(c),()=>i(c)),e.ok(c)}function i(c){r.forRange("i",t.length,a,l=>{e.subschema({keyword:s,dataProp:l,dataPropType:kh.Type.Num},c),o.allErrors||r.if((0,Rs.not)(c),()=>r.break())})}}Ta.validateAdditionalItems=rw;Ta.default=Pre;var i3={},$a={};Object.defineProperty($a,"__esModule",{value:!0});$a.validateTuple=void 0;const Ug=st,jl=we,kre=rt,Ore={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return nw(e,"additionalItems",t);r.items=!0,!(0,jl.alwaysValidSchema)(r,t)&&e.ok((0,kre.validateArray)(e))}};function nw(e,t,r=e.schema){const{gen:n,parentSchema:u,data:s,keyword:o,it:a}=e;l(u),a.opts.unevaluated&&r.length&&a.items!==!0&&(a.items=jl.mergeEvaluated.items(n,r.length,a.items));const i=n.name("valid"),c=n.const("len",(0,Ug._)`${s}.length`);r.forEach((p,d)=>{(0,jl.alwaysValidSchema)(a,p)||(n.if((0,Ug._)`${c} > ${d}`,()=>e.subschema({keyword:o,schemaProp:d,dataProp:d},i)),e.ok(i))});function l(p){const{opts:d,errSchemaPath:f}=a,h=r.length,y=h===p.minItems&&(h===p.maxItems||p[t]===!1);if(d.strictTuples&&!y){const A=`"${o}" is ${h}-tuple, but minItems or maxItems/${t} are not specified or different at path "${f}"`;(0,jl.checkStrictMode)(a,A,d.strictTuples)}}}$a.validateTuple=nw;$a.default=Ore;Object.defineProperty(i3,"__esModule",{value:!0});const Ire=$a,Nre={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,Ire.validateTuple)(e,"items")};i3.default=Nre;var c3={};Object.defineProperty(c3,"__esModule",{value:!0});const Gg=st,qre=we,xre=rt,Rre=Ta,jre={message:({params:{len:e}})=>(0,Gg.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,Gg._)`{limit: ${e}}`},Mre={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:jre,code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:u}=r;n.items=!0,!(0,qre.alwaysValidSchema)(n,t)&&(u?(0,Rre.validateAdditionalItems)(e,u):e.ok((0,xre.validateArray)(e)))}};c3.default=Mre;var l3={};Object.defineProperty(l3,"__esModule",{value:!0});const un=st,il=we,Lre={message:({params:{min:e,max:t}})=>t===void 0?(0,un.str)`must contain at least ${e} valid item(s)`:(0,un.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>t===void 0?(0,un._)`{minContains: ${e}}`:(0,un._)`{minContains: ${e}, maxContains: ${t}}`},Ure={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:Lre,code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;let o,a;const{minContains:i,maxContains:c}=n;s.opts.next?(o=i===void 0?1:i,a=c):o=1;const l=t.const("len",(0,un._)`${u}.length`);if(e.setParams({min:o,max:a}),a===void 0&&o===0){(0,il.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(a!==void 0&&o>a){(0,il.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,il.alwaysValidSchema)(s,r)){let y=(0,un._)`${l} >= ${o}`;a!==void 0&&(y=(0,un._)`${y} && ${l} <= ${a}`),e.pass(y);return}s.items=!0;const p=t.name("valid");a===void 0&&o===1?f(p,()=>t.if(p,()=>t.break())):o===0?(t.let(p,!0),a!==void 0&&t.if((0,un._)`${u}.length > 0`,d)):(t.let(p,!1),d()),e.result(p,()=>e.reset());function d(){const y=t.name("_valid"),A=t.let("count",0);f(y,()=>t.if(y,()=>h(A)))}function f(y,A){t.forRange("i",0,l,m=>{e.subschema({keyword:"contains",dataProp:m,dataPropType:il.Type.Num,compositeRule:!0},y),A()})}function h(y){t.code((0,un._)`${y}++`),a===void 0?t.if((0,un._)`${y} >= ${o}`,()=>t.assign(p,!0).break()):(t.if((0,un._)`${y} > ${a}`,()=>t.assign(p,!1).break()),o===1?t.assign(p,!0):t.if((0,un._)`${y} >= ${o}`,()=>t.assign(p,!0)))}}};l3.default=Ure;var uw={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=st,r=we,n=rt;e.error={message:({params:{property:i,depsCount:c,deps:l}})=>{const p=c===1?"property":"properties";return(0,t.str)`must have ${p} ${l} when property ${i} is present`},params:({params:{property:i,depsCount:c,deps:l,missingProperty:p}})=>(0,t._)`{property: ${i}, missingProperty: ${p}, depsCount: ${c}, - deps: ${l}}`};const u={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(i){const[c,l]=s(i);o(i,c),a(i,l)}};function s({schema:i}){const c={},l={};for(const p in i){if(p==="__proto__")continue;const f=Array.isArray(i[p])?c:l;f[p]=i[p]}return[c,l]}function o(i,c=i.schema){const{gen:l,data:p,it:f}=i;if(Object.keys(c).length===0)return;const d=l.let("missing");for(const h in c){const E=c[h];if(E.length===0)continue;const A=(0,n.propertyInData)(l,p,h,f.opts.ownProperties);i.setParams({property:h,depsCount:E.length,deps:E.join(", ")}),f.allErrors?l.if(A,()=>{for(const m of E)(0,n.checkReportMissingProp)(i,m)}):(l.if((0,t._)`${A} && (${(0,n.checkMissingProp)(i,E,d)})`),(0,n.reportMissingProp)(i,d),l.else())}}e.validatePropertyDeps=o;function a(i,c=i.schema){const{gen:l,data:p,keyword:f,it:d}=i,h=l.name("valid");for(const E in c)(0,r.alwaysValidSchema)(d,c[E])||(l.if((0,n.propertyInData)(l,p,E,d.opts.ownProperties),()=>{const A=i.subschema({keyword:f,schemaProp:E},h);i.mergeValidEvaluated(A,h)},()=>l.var(h,!0)),i.ok(h))}e.validateSchemaDeps=a,e.default=u})(h9);var WE={};Object.defineProperty(WE,"__esModule",{value:!0});const m9=pt,nte=yt,ute={message:"property name must be valid",params:({params:e})=>(0,m9._)`{propertyName: ${e.propertyName}}`},ste={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:ute,code(e){const{gen:t,schema:r,data:n,it:u}=e;if((0,nte.alwaysValidSchema)(u,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,m9.not)(s),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(s)}};WE.default=ste;var nf={};Object.defineProperty(nf,"__esModule",{value:!0});const nl=it,$n=pt,ote=lu,ul=yt,ate={message:"must NOT have additional properties",params:({params:e})=>(0,$n._)`{additionalProperty: ${e.additionalProperty}}`},ite={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:ate,code(e){const{gen:t,schema:r,parentSchema:n,data:u,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:i}=o;if(o.props=!0,i.removeAdditional!=="all"&&(0,ul.alwaysValidSchema)(o,r))return;const c=(0,nl.allSchemaProperties)(n.properties),l=(0,nl.allSchemaProperties)(n.patternProperties);p(),e.ok((0,$n._)`${s} === ${ote.default.errors}`);function p(){t.forIn("key",u,A=>{!c.length&&!l.length?h(A):t.if(f(A),()=>h(A))})}function f(A){let m;if(c.length>8){const y=(0,ul.schemaRefOrVal)(o,n.properties,"properties");m=(0,nl.isOwnProperty)(t,y,A)}else c.length?m=(0,$n.or)(...c.map(y=>(0,$n._)`${A} === ${y}`)):m=$n.nil;return l.length&&(m=(0,$n.or)(m,...l.map(y=>(0,$n._)`${(0,nl.usePattern)(e,y)}.test(${A})`))),(0,$n.not)(m)}function d(A){t.code((0,$n._)`delete ${u}[${A}]`)}function h(A){if(i.removeAdditional==="all"||i.removeAdditional&&r===!1){d(A);return}if(r===!1){e.setParams({additionalProperty:A}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,ul.alwaysValidSchema)(o,r)){const m=t.name("valid");i.removeAdditional==="failing"?(E(A,m,!1),t.if((0,$n.not)(m),()=>{e.reset(),d(A)})):(E(A,m),a||t.if((0,$n.not)(m),()=>t.break()))}}function E(A,m,y){const F={keyword:"additionalProperties",dataProp:A,dataPropType:ul.Type.Str};y===!1&&Object.assign(F,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(F,m)}}};nf.default=ite;var JE={};Object.defineProperty(JE,"__esModule",{value:!0});const cte=jn,gg=it,w1=yt,Ag=nf,lte={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Ag.default.code(new cte.KeywordCxt(s,Ag.default,"additionalProperties"));const o=(0,gg.allSchemaProperties)(r);for(const p of o)s.definedProperties.add(p);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=w1.mergeEvaluated.props(t,(0,w1.toHash)(o),s.props));const a=o.filter(p=>!(0,w1.alwaysValidSchema)(s,r[p]));if(a.length===0)return;const i=t.name("valid");for(const p of a)c(p)?l(p):(t.if((0,gg.propertyInData)(t,u,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(i,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(i);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},i)}}};JE.default=lte;var zE={};Object.defineProperty(zE,"__esModule",{value:!0});const Fg=it,sl=pt,Cg=yt,bg=yt,pte={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:u,it:s}=e,{opts:o}=s,a=(0,Fg.allSchemaProperties)(r),i=a.filter(E=>(0,Cg.alwaysValidSchema)(s,r[E]));if(a.length===0||i.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof sl.Name)&&(s.props=(0,bg.evaluatedPropsToName)(t,s.props));const{props:p}=s;f();function f(){for(const E of a)c&&d(E),s.allErrors?h(E):(t.var(l,!0),h(E),t.if(l))}function d(E){for(const A in c)new RegExp(E).test(A)&&(0,Cg.checkStrictMode)(s,`property ${A} matches pattern ${E} (use allowMatchingProperties)`)}function h(E){t.forIn("key",n,A=>{t.if((0,sl._)`${(0,Fg.usePattern)(e,E)}.test(${A})`,()=>{const m=i.includes(E);m||e.subschema({keyword:"patternProperties",schemaProp:E,dataProp:A,dataPropType:bg.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,sl._)`${p}[${A}]`,!0):!m&&!s.allErrors&&t.if((0,sl.not)(l),()=>t.break())})})}}};zE.default=pte;var KE={};Object.defineProperty(KE,"__esModule",{value:!0});const fte=yt,dte={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,fte.alwaysValidSchema)(n,r)){e.fail();return}const u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};KE.default=dte;var XE={};Object.defineProperty(XE,"__esModule",{value:!0});const Dte=it,hte={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:Dte.validateUnion,error:{message:"must match a schema in anyOf"}};XE.default=hte;var YE={};Object.defineProperty(YE,"__esModule",{value:!0});const kl=pt,mte=yt,Ete={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,kl._)`{passingSchemas: ${e.passing}}`},vte={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:Ete,code(e){const{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),a=t.let("passing",null),i=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let f;(0,mte.alwaysValidSchema)(u,l)?t.var(i,!0):f=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},i),p>0&&t.if((0,kl._)`${i} && ${o}`).assign(o,!1).assign(a,(0,kl._)`[${a}, ${p}]`).else(),t.if(i,()=>{t.assign(o,!0),t.assign(a,p),f&&e.mergeEvaluated(f,kl.Name)})})}}};YE.default=vte;var ZE={};Object.defineProperty(ZE,"__esModule",{value:!0});const yte=yt,gte={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const u=t.name("valid");r.forEach((s,o)=>{if((0,yte.alwaysValidSchema)(n,s))return;const a=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(a)})}};ZE.default=gte;var QE={};Object.defineProperty(QE,"__esModule",{value:!0});const yp=pt,E9=yt,Ate={message:({params:e})=>(0,yp.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,yp._)`{failingKeyword: ${e.ifClause}}`},Fte={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:Ate,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,E9.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const u=Sg(n,"then"),s=Sg(n,"else");if(!u&&!s)return;const o=t.let("valid",!0),a=t.name("_valid");if(i(),e.reset(),u&&s){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else u?t.if(a,c("then")):t.if((0,yp.not)(a),c("else"));e.pass(o,()=>e.error(!0));function i(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{const f=e.subschema({keyword:l},a);t.assign(o,a),e.mergeValidEvaluated(f,o),p?t.assign(p,(0,yp._)`${l}`):e.setParams({ifClause:l})}}}};function Sg(e,t){const r=e.schema[t];return r!==void 0&&!(0,E9.alwaysValidSchema)(e,r)}QE.default=Fte;var e3={};Object.defineProperty(e3,"__esModule",{value:!0});const Cte=yt,bte={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,Cte.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};e3.default=bte;Object.defineProperty(UE,"__esModule",{value:!0});const Ste=$a,wte=GE,_te=Pa,Bte=VE,Tte=HE,$te=h9,Pte=WE,Ote=nf,kte=JE,Ite=zE,Nte=KE,qte=XE,xte=YE,Rte=ZE,jte=QE,Mte=e3;function Lte(e=!1){const t=[Nte.default,qte.default,xte.default,Rte.default,jte.default,Mte.default,Pte.default,Ote.default,$te.default,kte.default,Ite.default];return e?t.push(wte.default,Bte.default):t.push(Ste.default,_te.default),t.push(Tte.default),t}UE.default=Lte;var t3={},r3={};Object.defineProperty(r3,"__esModule",{value:!0});const zt=pt,Ute={message:({schemaCode:e})=>(0,zt.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,zt._)`{format: ${e}}`},Gte={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Ute,code(e,t){const{gen:r,data:n,$data:u,schema:s,schemaCode:o,it:a}=e,{opts:i,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!i.validateFormats)return;u?f():d();function f(){const h=r.scopeValue("formats",{ref:p.formats,code:i.code.formats}),E=r.const("fDef",(0,zt._)`${h}[${o}]`),A=r.let("fType"),m=r.let("format");r.if((0,zt._)`typeof ${E} == "object" && !(${E} instanceof RegExp)`,()=>r.assign(A,(0,zt._)`${E}.type || "string"`).assign(m,(0,zt._)`${E}.validate`),()=>r.assign(A,(0,zt._)`"string"`).assign(m,E)),e.fail$data((0,zt.or)(y(),F()));function y(){return i.strictSchema===!1?zt.nil:(0,zt._)`${o} && !${m}`}function F(){const B=l.$async?(0,zt._)`(${E}.async ? await ${m}(${n}) : ${m}(${n}))`:(0,zt._)`${m}(${n})`,P=(0,zt._)`(typeof ${m} == "function" ? ${B} : ${m}.test(${n}))`;return(0,zt._)`${m} && ${m} !== true && ${A} === ${t} && !${P}`}}function d(){const h=p.formats[s];if(!h){y();return}if(h===!0)return;const[E,A,m]=F(h);E===t&&e.pass(B());function y(){if(i.strictSchema===!1){p.logger.warn(P());return}throw new Error(P());function P(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function F(P){const $=P instanceof RegExp?(0,zt.regexpCode)(P):i.code.formats?(0,zt._)`${i.code.formats}${(0,zt.getProperty)(s)}`:void 0,I=r.scopeValue("formats",{key:s,ref:P,code:$});return typeof P=="object"&&!(P instanceof RegExp)?[P.type||"string",P.validate,(0,zt._)`${I}.validate`]:["string",P,I]}function B(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,zt._)`await ${m}(${n})`}return typeof A=="function"?(0,zt._)`${m}(${n})`:(0,zt._)`${m}.test(${n})`}}}};r3.default=Gte;Object.defineProperty(t3,"__esModule",{value:!0});const Vte=r3,Hte=[Vte.default];t3.default=Hte;var Aa={};Object.defineProperty(Aa,"__esModule",{value:!0});Aa.contentVocabulary=Aa.metadataVocabulary=void 0;Aa.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];Aa.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(_E,"__esModule",{value:!0});const Wte=BE,Jte=$E,zte=UE,Kte=t3,wg=Aa,Xte=[Wte.default,Jte.default,(0,zte.default)(),Kte.default,wg.metadataVocabulary,wg.contentVocabulary];_E.default=Xte;var n3={},v9={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.DiscrError=void 0,function(t){t.Tag="tag",t.Mapping="mapping"}(e.DiscrError||(e.DiscrError={}))})(v9);Object.defineProperty(n3,"__esModule",{value:!0});const Ko=pt,Ah=v9,_g=Gr,Yte=yt,Zte={message:({params:{discrError:e,tagName:t}})=>e===Ah.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Ko._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Qte={keyword:"discriminator",type:"object",schemaType:"object",error:Zte,code(e){const{gen:t,data:r,schema:n,parentSchema:u,it:s}=e,{oneOf:o}=u;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const i=t.let("valid",!1),c=t.const("tag",(0,Ko._)`${r}${(0,Ko.getProperty)(a)}`);t.if((0,Ko._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Ah.DiscrError.Tag,tag:c,tagName:a})),e.ok(i);function l(){const d=f();t.if(!1);for(const h in d)t.elseIf((0,Ko._)`${c} === ${h}`),t.assign(i,p(d[h]));t.else(),e.error(!1,{discrError:Ah.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(d){const h=t.name("valid"),E=e.subschema({keyword:"oneOf",schemaProp:d},h);return e.mergeEvaluated(E,Ko.Name),h}function f(){var d;const h={},E=m(u);let A=!0;for(let B=0;Bthis.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}e.exports=t=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=jn;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=pt;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=lc;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var f=pc;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return f.default}})})(hh,hh.exports);var are=hh.exports;const ire="Root",cre="object",lre="Root Element",pre={base64String:{type:"string",pattern:"^[A-Za-z0-9/+=]*$"},tagString:{type:"string",pattern:"^[a-z][a-z0-9]*(:.+)?$"}},fre={id:{type:"string"},metadata:{type:"object",properties:{selectors:{type:"object",additionalProperties:{type:"string"}}},required:["selectors"],additionalProperties:!1},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},enums:{type:"object",properties:{ids:{$ref:"#/definitions/base64String"},wordLike:{$ref:"#/definitions/base64String"},notWordLike:{$ref:"#/definitions/base64String"},scopeBits:{$ref:"#/definitions/base64String"},graftTypes:{$ref:"#/definitions/base64String"}},required:["ids","wordLike","notWordLike","scopeBits","graftTypes"],additionalProperties:!1},docs:{type:"object",propertyNames:{type:"string"},additionalProperties:{type:"object",properties:{sequences:{type:"object",additionalProperties:{type:"object",properties:{type:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{bs:{type:"string"},bg:{type:"string"},c:{type:"string"},is:{type:"string"},os:{type:"string"},nt:{type:"string"}},required:["bs","bg","c","is","os","nt"],additionalProperties:!1}},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},chapters:{type:"object",additionalProperties:{type:"string"}},chapterVerses:{type:"object",additionalProperties:{type:"string"}},tokensPresent:{type:"string"}},required:["blocks","tags"],additionalProperties:!1}},headers:{type:"object",additionalProperties:{type:"string"}},mainId:{type:"string"},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}}},required:["sequences","headers","mainId","tags"],additionalProperties:!1}},additionalProperties:!1},dre=["id","enums","docs","tags"],Dre=!1,hre={title:ire,type:cre,description:lre,definitions:pre,properties:fre,required:dre,additionalProperties:Dre},mre="version 0.1.0",Ere="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/document_structure.json",vre="Document (Structure)",yre="A document, typically corresponding to a single USFM or USX book",gre="object",Are={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},Fre=["schema","metadata"],Cre=!1,bre={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},Sre={$comment:mre,$id:Ere,title:vre,description:yre,type:gre,properties:Are,required:Fre,additionalProperties:Cre,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:bre,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},wre="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/sequence_structure.json",_re="Sequence (Structure)",Bre="A sequence contains a 'flow' of one or more blocks",Tre="object",$re={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}}},Pre=["type"],Ore=!1,kre={$id:wre,title:_re,description:Bre,type:Tre,properties:$re,required:Pre,additionalProperties:Ore},Ire="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/block_structure.json",Nre="Block (Structure)",qre="A block, which represents either a paragraph of text or a graft",xre="object",Rre={type:{type:"string",description:"The type of block",enum:["paragraph","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},jre=["type"],Mre=!1,Lre={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},Ure={$id:Ire,title:Nre,description:qre,type:xre,properties:Rre,required:jre,additionalProperties:Mre,if:{properties:{type:{enum:["paragraph"]}}},then:Lre,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},Gre="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/contentElement_structure.json",Vre="Content Element (Structure)",Hre="A content element, ie some form of (possibly nested) markup",Wre="object",Jre={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},zre=["type"],Kre=!1,Xre={$id:Gre,title:Vre,description:Hre,type:Wre,properties:Jre,required:zre,additionalProperties:Kre},Yre="version 0.2.0",Zre="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_document_constraint.json",Qre="object",ene={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},tne={$comment:Yre,$id:Zre,type:Qre,properties:ene},rne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_sequence_constraint.json",nne="object",une={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},sne={$id:rne,type:nne,properties:une},one="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_block_constraint.json",ane="object",ine={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},cne={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},lne={$id:one,type:ane,properties:ine,if:{properties:{type:{enum:["graft"]}}},then:cne,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},pne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_contentElement_constraint.json",fne="object",dne=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],Dne={$id:pne,type:fne,allOf:dne},hne="version 0.2.0",mne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_document_constraint.json",Ene="object",vne={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sofria_sequence_constraint.json"}}},yne={$comment:hne,$id:mne,type:Ene,properties:vne},gne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_sequence_constraint.json",Ane="object",Fne={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},Cne={$id:gne,type:Ane,properties:Fne},bne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_block_constraint.json",Sne="object",wne={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},_ne={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},Bne={$id:bne,type:Sne,properties:wne,if:{properties:{type:{enum:["graft"]}}},then:_ne,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},Tne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_contentElement_constraint.json",$ne="object",Pne=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["block"]},{required:["preview_text"]}]}},else:{required:["block"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],One={$id:Tne,type:$ne,allOf:Pne},kne="version 0.1.0",Ine="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/document_structure.json",Nne="Document (Structure)",qne="A document, typically corresponding to a single USFM or USX book",xne="object",Rne={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},jne=["schema","metadata"],Mne=!1,Lne={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},Une={$comment:kne,$id:Ine,title:Nne,description:qne,type:xne,properties:Rne,required:jne,additionalProperties:Mne,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:Lne,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},Gne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/sequence_structure.json",Vne="Sequence (Structure)",Hne="A sequence contains a 'flow' of one or more blocks",Wne="object",Jne={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},zne=["type"],Kne=!1,Xne={$id:Gne,title:Vne,description:Hne,type:Wne,properties:Jne,required:zne,additionalProperties:Kne},Yne="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/block_structure.json",Zne="Block (Structure)",Qne="A block, which represents either a paragraph of text or a graft",eue="object",tue={type:{type:"string",description:"The type of block",enum:["paragraph","row","node","lookup","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},rue=["type"],nue=!1,uue={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},sue={$id:Yne,title:Zne,description:Qne,type:eue,properties:tue,required:rue,additionalProperties:nue,if:{properties:{type:{enum:["paragraph","row","node","lookup"]}}},then:uue,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},oue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/contentElement_structure.json",aue="Content Element (Structure)",iue="A content element, ie some form of (possibly nested) markup",cue="object",lue={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},pue=["type"],fue=!1,due={$id:oue,title:aue,description:iue,type:cue,properties:lue,required:pue,additionalProperties:fue},Due="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/hook_structure.json",hue="Hook (Structure)",mue="Hooks, ie typed labels that may be used to link documents",Eue="array",vue={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},yue={$id:Due,title:hue,description:mue,type:Eue,items:vue},gue="version 0.3.0",Aue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_document_constraint.json",Fue="object",Cue={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},bue={$comment:gue,$id:Aue,type:Fue,properties:Cue},Sue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_sequence_constraint.json",wue="object",_ue={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},Bue={$id:Sue,type:wue,properties:_ue},Tue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_block_constraint.json",$ue="object",Pue={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},Oue={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},kue={$id:Tue,type:$ue,properties:Pue,if:{properties:{type:{enum:["graft"]}}},then:Oue,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},Iue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_contentElement_constraint.json",Nue="object",que=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],xue={$id:Iue,type:Nue,allOf:que},Rue="version 0.3.0",jue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_document_constraint.json",Mue="object",Lue={sequence:{$ref:"./sofria_sequence_constraint.json"}},Uue={$comment:Rue,$id:jue,type:Mue,properties:Lue},Gue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_sequence_constraint.json",Vue="object",Hue={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},Wue={$id:Gue,type:Vue,properties:Hue},Jue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_block_constraint.json",zue="object",Kue={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},Xue={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},Yue={$id:Jue,type:zue,properties:Kue,if:{properties:{type:{enum:["graft"]}}},then:Xue,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},Zue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_contentElement_constraint.json",Que="object",ese=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],tse={$id:Zue,type:Que,allOf:ese},rse="version 0.1.0",nse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/document_structure.json",use="Document (Structure)",sse="A document, typically corresponding to a single USFM or USX book",ose="object",ase={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},ise=["schema","metadata"],cse=!1,lse={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},pse={$comment:rse,$id:nse,title:use,description:sse,type:ose,properties:ase,required:ise,additionalProperties:cse,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:lse,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},fse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/sequence_structure.json",dse="Sequence (Structure)",Dse="A sequence contains a 'flow' of one or more blocks",hse="object",mse={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},Ese=["type"],vse=!1,yse={$id:fse,title:dse,description:Dse,type:hse,properties:mse,required:Ese,additionalProperties:vse},gse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/block_structure.json",Ase="Block (Structure)",Fse="A block, which represents either a paragraph of text or a graft",Cse="object",bse={type:{type:"string",description:"The type of block",enum:["paragraph","row","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},Sse=["type"],wse=!1,_se={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},Bse={$id:gse,title:Ase,description:Fse,type:Cse,properties:bse,required:Sse,additionalProperties:wse,if:{properties:{type:{enum:["paragraph","row"]}}},then:_se,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},Tse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/contentElement_structure.json",$se="Content Element (Structure)",Pse="A content element, ie some form of (possibly nested) markup",Ose="object",kse={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"},{type:"number"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},Ise=["type"],Nse=!1,qse={$id:Tse,title:$se,description:Pse,type:Ose,properties:kse,required:Ise,additionalProperties:Nse},xse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/hook_structure.json",Rse="Hook (Structure)",jse="Hooks, ie typed labels that may be used to link documents",Mse="array",Lse={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},Use={$id:xse,title:Rse,description:jse,type:Mse,items:Lse},Gse="version 0.3.0",Vse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_document_constraint.json",Hse="object",Wse={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},Jse={$comment:Gse,$id:Vse,type:Hse,properties:Wse},zse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_sequence_constraint.json",Kse="object",Xse={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},Yse={$id:zse,type:Kse,properties:Xse},Zse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_block_constraint.json",Qse="object",eoe={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},toe={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},roe={$id:Zse,type:Qse,properties:eoe,if:{properties:{type:{enum:["graft"]}}},then:toe,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},noe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_contentElement_constraint.json",uoe="object",soe=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],ooe={$id:noe,type:uoe,allOf:soe},aoe="version 0.3.0",ioe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_document_constraint.json",coe="object",loe={sequence:{$ref:"./sofria_sequence_constraint.json"}},poe={$comment:aoe,$id:ioe,type:coe,properties:loe},foe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_sequence_constraint.json",doe="object",Doe={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},hoe={$id:foe,type:doe,properties:Doe},moe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_block_constraint.json",Eoe="object",voe={type:{type:"string",enum:["paragraph","graft","row"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},yoe={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},goe={$id:moe,type:Eoe,properties:voe,if:{properties:{type:{enum:["graft"]}}},then:yoe,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",enum:["usfm:tr","pk"]}}},else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}}},Aoe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_contentElement_constraint.json",Foe="object",Coe=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses","cell"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],boe={$id:Aoe,type:Foe,allOf:Coe};var gt=are,Soe=hre,_1=Sre,No=kre,qo=Ure,xo=Xre,woe=tne,Bg=sne,Tg=lne,$g=Dne,_oe=yne,Pg=Cne,Og=Bne,kg=One,B1=Une,Ro=Xne,jo=sue,Mo=due,zn=yue,Boe=bue,Ig=Bue,Ng=kue,qg=xue,Toe=Uue,xg=Wue,Rg=Yue,jg=tse,T1=pse,Lo=yse,Uo=Bse,Go=qse,Kn=Use,$oe=Jse,Mg=Yse,Lg=roe,Ug=ooe,Poe=poe,Gg=hoe,Vg=goe,Hg=boe;let Ooe=class{constructor(){this.schema={structure:{},constraint:{},proskomma:{}};for(var[t,r]of[["succinct",{"0.2.0":[{name:"Proskomma Serialized Succinct",validator:new gt().compile(Soe)}]}]])this.schema.proskomma[t]=r;for(var[n,u]of[["document",{"0.2.1":[{name:"Document Structure",validator:new gt().addSchema(xo).addSchema(qo).addSchema(No).compile(_1)}],"0.3.0":[{name:"Document Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(B1)}],"0.4.0":[{name:"Document Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).addSchema(Lo).compile(T1)}]}],["sequence",{"0.2.1":[{name:"Sequence Structure",validator:new gt().addSchema(xo).addSchema(qo).compile(No)}],"0.3.0":[{name:"Sequence Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).compile(Ro)}],"0.4.0":[{name:"Sequence Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).compile(Lo)}]}]])this.schema.structure[n]=u;for(var[s,o]of[["perfDocument",{"0.2.1":[{name:"Document Structure",validator:new gt().addSchema(xo).addSchema(qo).addSchema(No).compile(_1)},{name:"PERF Document",validator:new gt().addSchema($g).addSchema(Tg).addSchema(Bg).compile(woe)}],"0.3.0":[{name:"Document Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(B1)},{name:"PERF Document",validator:new gt().addSchema(zn).addSchema(qg).addSchema(Ng).addSchema(Ig).compile(Boe)}],"0.4.0":[{name:"Document Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).addSchema(Lo).compile(T1)},{name:"PERF Document",validator:new gt().addSchema(Kn).addSchema(Ug).addSchema(Lg).addSchema(Mg).compile($oe)}]}],["perfSequence",{"0.2.1":[{name:"Sequence Structure",validator:new gt().addSchema(xo).addSchema(qo).compile(No)},{name:"PERF Sequence",validator:new gt().addSchema($g).addSchema(Tg).compile(Bg)}],"0.3.0":[{name:"Sequence Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).compile(Ro)},{name:"PERF Sequence",validator:new gt().addSchema(zn).addSchema(qg).addSchema(Ng).compile(Ig)}],"0.4.0":[{name:"Sequence Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).compile(Lo)},{name:"PERF Sequence",validator:new gt().addSchema(Kn).addSchema(Ug).addSchema(Lg).compile(Mg)}]}],["sofriaDocument",{"0.2.1":[{name:"Document Structure",validator:new gt().addSchema(xo).addSchema(qo).addSchema(No).compile(_1)},{name:"SOFRIA Document",validator:new gt().addSchema(kg).addSchema(Og).addSchema(Pg).compile(_oe)}],"0.3.0":[{name:"Document Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(B1)},{name:"SOFRIA Document",validator:new gt().addSchema(zn).addSchema(jg).addSchema(Rg).addSchema(xg).compile(Toe)}],"0.4.0":[{name:"Document Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).addSchema(Lo).compile(T1)},{name:"SOFRIA Document",validator:new gt().addSchema(Kn).addSchema(Hg).addSchema(Vg).addSchema(Gg).compile(Poe)}]}],["sofriaSequence",{"0.2.1":[{name:"Sequence Structure",validator:new gt().addSchema(xo).addSchema(qo).compile(No)},{name:"SOFRIA Sequence",validator:new gt().addSchema(kg).addSchema(Og).compile(Pg)}],"0.3.0":[{name:"Sequence Structure",validator:new gt().addSchema(zn).addSchema(Mo).addSchema(jo).compile(Ro)},{name:"SOFRIA Sequence",validator:new gt().addSchema(zn).addSchema(jg).addSchema(Rg).compile(xg)}],"0.4.0":[{name:"Sequence Structure",validator:new gt().addSchema(Kn).addSchema(Go).addSchema(Uo).compile(Lo)},{name:"SOFRIA Sequence",validator:new gt().addSchema(Kn).addSchema(Hg).addSchema(Vg).compile(Gg)}]}]])this.schema.constraint[s]=o}schemaInfo(){var t={};for(var[r,n]of Object.entries(this.schema)){t[r]={};for(var[u,s]of Object.entries(n)){t[r][u]={};for(var[o,a]of Object.entries(s))t[r][u][o]=a.map(i=>i.name)}}return t}validate(t,r,n,u){if(u===void 0)throw new Error("data argument is missing. Usage: validate(schemaType, schemaKey, schemaVersion, data)");if(u===null)throw new Error("Data argument is null");var s=Object.keys(this.schema);if(!s.includes(t))throw new Error("Schema type must be one of ".concat(s.map(l=>"'".concat(l,"'")).join(", "),", not '").concat(t,"'"));if(!this.schema[t][r])throw new Error("Unknown ".concat(t," schema key ").concat(r));if(!this.schema[t][r][n])throw new Error("Unknown version ".concat(n," for ").concat(t," schema key ").concat(r));var o=this.schema[t][r][n],a;for(var{name:i,validator:c}of o)if(a={validatorName:i,isValid:c(u),errors:c.errors},!a.isValid)break;return{requested:{schemaType:t,schemaKey:r,schemaVersion:n},lastSchema:a.validatorName,isValid:a.isValid,errors:a.errors}}};var koe=Ooe,Ioe=["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt","th","thr","tc","tcr"],Noe=["ms","mr","s","sr","r","qa","sp","sd"],qoe=["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"],xoe=["imt","is","imte"],Roe=["ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex"],joe={characterTags:Ioe,bodyTags:qoe,headingTags:Noe,introHeadingTags:xoe,introBodyTags:Roe},Fh={exports:{}},y9={exports:{}},$1,Wg;function Sr(){if(Wg)return $1;Wg=1;var e=function(t){return t&&t.Math===Math&&t};return $1=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof we=="object"&&we)||e(typeof we=="object"&&we)||function(){return this}()||Function("return this")(),$1}var tr=function(e){try{return!!e()}catch{return!0}},P1,Jg;function uf(){if(Jg)return P1;Jg=1;var e=tr;return P1=!e(function(){var t=(function(){}).bind();return typeof t!="function"||t.hasOwnProperty("prototype")}),P1}var Moe=uf(),g9=Function.prototype,zg=g9.apply,Kg=g9.call,A9=typeof Reflect=="object"&&Reflect.apply||(Moe?Kg.bind(zg):function(){return Kg.apply(zg,arguments)}),O1,Xg;function Xt(){if(Xg)return O1;Xg=1;var e=uf(),t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return O1=e?n:function(u){return function(){return r.apply(u,arguments)}},O1}var k1,Yg;function po(){if(Yg)return k1;Yg=1;var e=Xt(),t=e({}.toString),r=e("".slice);return k1=function(n){return r(t(n),8,-1)},k1}var Loe=po(),Uoe=Xt(),u3=function(e){if(Loe(e)==="Function")return Uoe(e)},I1,Zg;function wr(){if(Zg)return I1;Zg=1;var e=typeof document=="object"&&document.all;return I1=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},I1}var s3={},Goe=tr,un=!Goe(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),Voe=uf(),ol=Function.prototype.call,Gn=Voe?ol.bind(ol):function(){return ol.apply(ol,arguments)},o3={},F9={}.propertyIsEnumerable,C9=Object.getOwnPropertyDescriptor,Hoe=C9&&!F9.call({1:2},1);o3.f=Hoe?function(t){var r=C9(this,t);return!!r&&r.enumerable}:F9;var dc=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},N1,Qg;function a3(){if(Qg)return N1;Qg=1;var e=Xt(),t=tr,r=po(),n=Object,u=e("".split);return N1=t(function(){return!n("z").propertyIsEnumerable(0)})?function(s){return r(s)==="String"?u(s,""):n(s)}:n,N1}var q1,eA;function i3(){return eA||(eA=1,q1=function(e){return e==null}),q1}var x1,tA;function Dc(){if(tA)return x1;tA=1;var e=i3(),t=TypeError;return x1=function(r){if(e(r))throw new t("Can't call method on "+r);return r},x1}var R1,rA;function Ds(){if(rA)return R1;rA=1;var e=a3(),t=Dc();return R1=function(r){return e(t(r))},R1}var j1,nA;function Vn(){if(nA)return j1;nA=1;var e=wr();return j1=function(t){return typeof t=="object"?t!==null:e(t)},j1}var pu={},M1,uA;function Iu(){if(uA)return M1;uA=1;var e=pu,t=Sr(),r=wr(),n=function(u){return r(u)?u:void 0};return M1=function(u,s){return arguments.length<2?n(e[u])||n(t[u]):e[u]&&e[u][s]||t[u]&&t[u][s]},M1}var L1,sA;function mn(){if(sA)return L1;sA=1;var e=Xt();return L1=e({}.isPrototypeOf),L1}var U1,oA;function sf(){return oA||(oA=1,U1=typeof navigator<"u"&&String(navigator.userAgent)||""),U1}var G1,aA;function hc(){if(aA)return G1;aA=1;var e=Sr(),t=sf(),r=e.process,n=e.Deno,u=r&&r.versions||n&&n.version,s=u&&u.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),G1=a,G1}var V1,iA;function Oa(){if(iA)return V1;iA=1;var e=hc(),t=tr,r=Sr(),n=r.String;return V1=!!Object.getOwnPropertySymbols&&!t(function(){var u=Symbol("symbol detection");return!n(u)||!(Object(u)instanceof Symbol)||!Symbol.sham&&e&&e<41}),V1}var H1,cA;function b9(){if(cA)return H1;cA=1;var e=Oa();return H1=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",H1}var Woe=Iu(),Joe=wr(),zoe=mn(),Koe=b9(),Xoe=Object,mc=Koe?function(e){return typeof e=="symbol"}:function(e){var t=Woe("Symbol");return Joe(t)&&zoe(t.prototype,Xoe(e))},W1,lA;function of(){if(lA)return W1;lA=1;var e=String;return W1=function(t){try{return e(t)}catch{return"Object"}},W1}var Yoe=wr(),Zoe=of(),Qoe=TypeError,ka=function(e){if(Yoe(e))return e;throw new Qoe(Zoe(e)+" is not a function")},eae=ka,tae=i3(),c3=function(e,t){var r=e[t];return tae(r)?void 0:eae(r)},J1=Gn,z1=wr(),K1=Vn(),rae=TypeError,nae=function(e,t){var r,n;if(t==="string"&&z1(r=e.toString)&&!K1(n=J1(r,e))||z1(r=e.valueOf)&&!K1(n=J1(r,e))||t!=="string"&&z1(r=e.toString)&&!K1(n=J1(r,e)))return n;throw new rae("Can't convert object to primitive value")},S9={exports:{}},X1,pA;function Ec(){return pA||(pA=1,X1=!0),X1}var fA=Sr(),uae=Object.defineProperty,sae=function(e,t){try{uae(fA,e,{value:t,configurable:!0,writable:!0})}catch{fA[e]=t}return t},oae=Ec(),aae=Sr(),iae=sae,dA="__core-js_shared__",DA=S9.exports=aae[dA]||iae(dA,{});(DA.versions||(DA.versions=[])).push({version:"3.36.1",mode:oae?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"});var l3=S9.exports,Y1,hA;function Ia(){if(hA)return Y1;hA=1;var e=l3;return Y1=function(t,r){return e[t]||(e[t]=r||{})},Y1}var Z1,mA;function Nu(){if(mA)return Z1;mA=1;var e=Dc(),t=Object;return Z1=function(r){return t(e(r))},Z1}var Q1,EA;function Jr(){if(EA)return Q1;EA=1;var e=Xt(),t=Nu(),r=e({}.hasOwnProperty);return Q1=Object.hasOwn||function(u,s){return r(t(u),s)},Q1}var ed,vA;function p3(){if(vA)return ed;vA=1;var e=Xt(),t=0,r=Math.random(),n=e(1 .toString);return ed=function(u){return"Symbol("+(u===void 0?"":u)+")_"+n(++t+r,36)},ed}var td,yA;function pr(){if(yA)return td;yA=1;var e=Sr(),t=Ia(),r=Jr(),n=p3(),u=Oa(),s=b9(),o=e.Symbol,a=t("wks"),i=s?o.for||o:o&&o.withoutSetter||n;return td=function(c){return r(a,c)||(a[c]=u&&r(o,c)?o[c]:i("Symbol."+c)),a[c]},td}var cae=Gn,gA=Vn(),AA=mc,lae=c3,pae=nae,fae=pr(),dae=TypeError,Dae=fae("toPrimitive"),hae=function(e,t){if(!gA(e)||AA(e))return e;var r=lae(e,Dae),n;if(r){if(t===void 0&&(t="default"),n=cae(r,e,t),!gA(n)||AA(n))return n;throw new dae("Can't convert object to primitive value")}return t===void 0&&(t="number"),pae(e,t)},mae=hae,Eae=mc,f3=function(e){var t=mae(e,"string");return Eae(t)?t:t+""},vae=Sr(),FA=Vn(),Ch=vae.document,yae=FA(Ch)&&FA(Ch.createElement),w9=function(e){return yae?Ch.createElement(e):{}},gae=un,Aae=tr,Fae=w9,_9=!gae&&!Aae(function(){return Object.defineProperty(Fae("div"),"a",{get:function(){return 7}}).a!==7}),Cae=un,bae=Gn,Sae=o3,wae=dc,_ae=Ds(),Bae=f3,Tae=Jr(),$ae=_9,CA=Object.getOwnPropertyDescriptor;s3.f=Cae?CA:function(t,r){if(t=_ae(t),r=Bae(r),$ae)try{return CA(t,r)}catch{}if(Tae(t,r))return wae(!bae(Sae.f,t,r),t[r])};var Pae=tr,Oae=wr(),kae=/#|\.prototype\./,vc=function(e,t){var r=Nae[Iae(e)];return r===xae?!0:r===qae?!1:Oae(t)?Pae(t):!!t},Iae=vc.normalize=function(e){return String(e).replace(kae,".").toLowerCase()},Nae=vc.data={},qae=vc.NATIVE="N",xae=vc.POLYFILL="P",Rae=vc,bA=u3,jae=ka,Mae=uf(),Lae=bA(bA.bind),d3=function(e,t){return jae(e),t===void 0?e:Mae?Lae(e,t):function(){return e.apply(t,arguments)}},Hn={},Uae=un,Gae=tr,B9=Uae&&Gae(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),Vae=Vn(),Hae=String,Wae=TypeError,hs=function(e){if(Vae(e))return e;throw new Wae(Hae(e)+" is not an object")},Jae=un,zae=_9,Kae=B9,al=hs,SA=f3,Xae=TypeError,rd=Object.defineProperty,Yae=Object.getOwnPropertyDescriptor,nd="enumerable",ud="configurable",sd="writable";Hn.f=Jae?Kae?function(t,r,n){if(al(t),r=SA(r),al(n),typeof t=="function"&&r==="prototype"&&"value"in n&&sd in n&&!n[sd]){var u=Yae(t,r);u&&u[sd]&&(t[r]=n.value,n={configurable:ud in n?n[ud]:u[ud],enumerable:nd in n?n[nd]:u[nd],writable:!1})}return rd(t,r,n)}:rd:function(t,r,n){if(al(t),r=SA(r),al(n),zae)try{return rd(t,r,n)}catch{}if("get"in n||"set"in n)throw new Xae("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var Zae=un,Qae=Hn,eie=dc,yc=Zae?function(e,t,r){return Qae.f(e,t,eie(1,r))}:function(e,t,r){return e[t]=r,e},Ka=Sr(),tie=A9,rie=u3,nie=wr(),uie=s3.f,sie=Rae,Vo=pu,oie=d3,Ho=yc,wA=Jr(),aie=function(e){var t=function(r,n,u){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,u)}return tie(e,this,arguments)};return t.prototype=e.prototype,t},Mt=function(e,t){var r=e.target,n=e.global,u=e.stat,s=e.proto,o=n?Ka:u?Ka[r]:Ka[r]&&Ka[r].prototype,a=n?Vo:Vo[r]||Ho(Vo,r,{})[r],i=a.prototype,c,l,p,f,d,h,E,A,m;for(f in t)c=sie(n?f:r+(u?".":"#")+f,e.forced),l=!c&&o&&wA(o,f),h=a[f],l&&(e.dontCallGetSet?(m=uie(o,f),E=m&&m.value):E=o[f]),d=l&&E?E:t[f],!(!c&&!s&&typeof h==typeof d)&&(e.bind&&l?A=oie(d,Ka):e.wrap&&l?A=aie(d):s&&nie(d)?A=rie(d):A=d,(e.sham||d&&d.sham||h&&h.sham)&&Ho(A,"sham",!0),Ho(a,f,A),s&&(p=r+"Prototype",wA(Vo,p)||Ho(Vo,p,{}),Ho(Vo[p],f,d),e.real&&i&&(c||!i[f])&&Ho(i,f,d)))},iie=Mt,cie=un,_A=Hn.f;iie({target:"Object",stat:!0,forced:Object.defineProperty!==_A,sham:!cie},{defineProperty:_A});var lie=pu,T9=lie.Object,pie=y9.exports=function(t,r,n){return T9.defineProperty(t,r,n)};T9.defineProperty.sham&&(pie.sham=!0);var fie=y9.exports,die=fie,Die=die,ms=Die,$9={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})($9);var Es=$9.exports,il={exports:{}},BA={},od,TA;function Na(){if(TA)return od;TA=1;var e=po();return od=Array.isArray||function(r){return e(r)==="Array"},od}var ad,$A;function D3(){if($A)return ad;$A=1;var e=pr(),t=e("toStringTag"),r={};return r[t]="z",ad=String(r)==="[object z]",ad}var id,PA;function gc(){if(PA)return id;PA=1;var e=D3(),t=wr(),r=po(),n=pr(),u=n("toStringTag"),s=Object,o=r(function(){return arguments}())==="Arguments",a=function(i,c){try{return i[c]}catch{}};return id=e?r:function(i){var c,l,p;return i===void 0?"Undefined":i===null?"Null":typeof(l=a(c=s(i),u))=="string"?l:o?r(c):(p=r(c))==="Object"&&t(c.callee)?"Arguments":p},id}var cd,OA;function hie(){if(OA)return cd;OA=1;var e=Xt(),t=wr(),r=l3,n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(u){return n(u)}),cd=r.inspectSource,cd}var ld,kA;function h3(){if(kA)return ld;kA=1;var e=Xt(),t=tr,r=wr(),n=gc(),u=Iu(),s=hie(),o=function(){},a=u("Reflect","construct"),i=/^\s*(?:class|function)\b/,c=e(i.exec),l=!i.test(o),p=function(h){if(!r(h))return!1;try{return a(o,[],h),!0}catch{return!1}},f=function(h){if(!r(h))return!1;switch(n(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(i,s(h))}catch{return!0}};return f.sham=!0,ld=!a||t(function(){var d;return p(p.call)||!p(Object)||!p(function(){d=!0})||d})?f:p,ld}var pd,IA;function mie(){if(IA)return pd;IA=1;var e=Math.ceil,t=Math.floor;return pd=Math.trunc||function(n){var u=+n;return(u>0?t:e)(u)},pd}var fd,NA;function m3(){if(NA)return fd;NA=1;var e=mie();return fd=function(t){var r=+t;return r!==r||r===0?0:e(r)},fd}var dd,qA;function P9(){if(qA)return dd;qA=1;var e=m3(),t=Math.max,r=Math.min;return dd=function(n,u){var s=e(n);return s<0?t(s+u,0):r(s,u)},dd}var Dd,xA;function Eie(){if(xA)return Dd;xA=1;var e=m3(),t=Math.min;return Dd=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},Dd}var hd,RA;function vs(){if(RA)return hd;RA=1;var e=Eie();return hd=function(t){return e(t.length)},hd}var md,jA;function E3(){if(jA)return md;jA=1;var e=un,t=Hn,r=dc;return md=function(n,u,s){e?t.f(n,u,r(0,s)):n[u]=s},md}var Ed,MA;function v3(){if(MA)return Ed;MA=1;var e=tr,t=pr(),r=hc(),n=t("species");return Ed=function(u){return r>=51||!e(function(){var s=[],o=s.constructor={};return o[n]=function(){return{foo:1}},s[u](Boolean).foo!==1})},Ed}var vd,LA;function af(){if(LA)return vd;LA=1;var e=Xt();return vd=e([].slice),vd}var UA;function vie(){if(UA)return BA;UA=1;var e=Mt,t=Na(),r=h3(),n=Vn(),u=P9(),s=vs(),o=Ds(),a=E3(),i=pr(),c=v3(),l=af(),p=c("slice"),f=i("species"),d=Array,h=Math.max;return e({target:"Array",proto:!0,forced:!p},{slice:function(A,m){var y=o(this),F=s(y),B=u(A,F),P=u(m===void 0?F:m,F),$,I,U;if(t(y)&&($=y.constructor,r($)&&($===d||t($.prototype))?$=void 0:n($)&&($=$[f],$===null&&($=void 0)),$===d||$===void 0))return l(y,B,P);for(I=new($===void 0?d:$)(h(P-B,0)),U=0;B=d?i?"":void 0:(h=s(p,f),h<55296||h>56319||f+1===d||(E=s(p,f+1))<56320||E>57343?i?u(p,f):h:i?o(p,f,f+2):(h-55296<<10)+(E-56320)+65536)}};return Sd={codeAt:a(!1),charAt:a(!0)},Sd}var wd,YA;function Fie(){if(YA)return wd;YA=1;var e=Sr(),t=wr(),r=e.WeakMap;return wd=t(r)&&/native code/.test(String(r)),wd}var _d,ZA;function cf(){if(ZA)return _d;ZA=1;var e=Ia(),t=p3(),r=e("keys");return _d=function(n){return r[n]||(r[n]=t(n))},_d}var Bd,QA;function lf(){return QA||(QA=1,Bd={}),Bd}var Td,eF;function y3(){if(eF)return Td;eF=1;var e=Fie(),t=Sr(),r=Vn(),n=yc,u=Jr(),s=l3,o=cf(),a=lf(),i="Object already initialized",c=t.TypeError,l=t.WeakMap,p,f,d,h=function(y){return d(y)?f(y):p(y,{})},E=function(y){return function(F){var B;if(!r(F)||(B=f(F)).type!==y)throw new c("Incompatible receiver, "+y+" required");return B}};if(e||s.state){var A=s.state||(s.state=new l);A.get=A.get,A.has=A.has,A.set=A.set,p=function(y,F){if(A.has(y))throw new c(i);return F.facade=y,A.set(y,F),F},f=function(y){return A.get(y)||{}},d=function(y){return A.has(y)}}else{var m=o("state");a[m]=!0,p=function(y,F){if(u(y,m))throw new c(i);return F.facade=y,n(y,m,F),F},f=function(y){return u(y,m)?y[m]:{}},d=function(y){return u(y,m)}}return Td={set:p,get:f,has:d,enforce:h,getterFor:E},Td}var $d,tF;function Cie(){if(tF)return $d;tF=1;var e=un,t=Jr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,u=t(r,"name"),s=u&&(function(){}).name==="something",o=u&&(!e||e&&n(r,"name").configurable);return $d={EXISTS:u,PROPER:s,CONFIGURABLE:o},$d}var Pd={},Od,rF;function k9(){if(rF)return Od;rF=1;var e=Ds(),t=P9(),r=vs(),n=function(u){return function(s,o,a){var i=e(s),c=r(i);if(c===0)return!u&&-1;var l=t(a,c),p;if(u&&o!==o){for(;c>l;)if(p=i[l++],p!==p)return!0}else for(;c>l;l++)if((u||l in i)&&i[l]===o)return u||l||0;return!u&&-1}};return Od={includes:n(!0),indexOf:n(!1)},Od}var kd,nF;function I9(){if(nF)return kd;nF=1;var e=Xt(),t=Jr(),r=Ds(),n=k9().indexOf,u=lf(),s=e([].push);return kd=function(o,a){var i=r(o),c=0,l=[],p;for(p in i)!t(u,p)&&t(i,p)&&s(l,p);for(;a.length>c;)t(i,p=a[c++])&&(~n(l,p)||s(l,p));return l},kd}var Id,uF;function g3(){return uF||(uF=1,Id=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),Id}var Nd,sF;function N9(){if(sF)return Nd;sF=1;var e=I9(),t=g3();return Nd=Object.keys||function(n){return e(n,t)},Nd}var oF;function q9(){if(oF)return Pd;oF=1;var e=un,t=B9,r=Hn,n=hs,u=Ds(),s=N9();return Pd.f=e&&!t?Object.defineProperties:function(a,i){n(a);for(var c=u(i),l=s(i),p=l.length,f=0,d;p>f;)r.f(a,d=l[f++],c[d]);return a},Pd}var qd,aF;function bie(){if(aF)return qd;aF=1;var e=Iu();return qd=e("document","documentElement"),qd}var xd,iF;function pf(){if(iF)return xd;iF=1;var e=hs,t=q9(),r=g3(),n=lf(),u=bie(),s=w9,o=cf(),a=">",i="<",c="prototype",l="script",p=o("IE_PROTO"),f=function(){},d=function(y){return i+l+a+y+i+"/"+l+a},h=function(y){y.write(d("")),y.close();var F=y.parentWindow.Object;return y=null,F},E=function(){var y=s("iframe"),F="java"+l+":",B;return y.style.display="none",u.appendChild(y),y.src=String(F),B=y.contentWindow.document,B.open(),B.write(d("document.F=Object")),B.close(),B.F},A,m=function(){try{A=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&A?h(A):E():h(A);for(var y=r.length;y--;)delete m[c][r[y]];return m()};return n[p]=!0,xd=Object.create||function(F,B){var P;return F!==null?(f[c]=e(F),P=new f,f[c]=null,P[p]=F):P=m(),B===void 0?P:t.f(P,B)},xd}var Rd,cF;function Sie(){if(cF)return Rd;cF=1;var e=tr;return Rd=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),Rd}var jd,lF;function x9(){if(lF)return jd;lF=1;var e=Jr(),t=wr(),r=Nu(),n=cf(),u=Sie(),s=n("IE_PROTO"),o=Object,a=o.prototype;return jd=u?o.getPrototypeOf:function(i){var c=r(i);if(e(c,s))return c[s];var l=c.constructor;return t(l)&&c instanceof l?l.prototype:c instanceof o?a:null},jd}var Md,pF;function ff(){if(pF)return Md;pF=1;var e=yc;return Md=function(t,r,n,u){return u&&u.enumerable?t[r]=n:e(t,r,n),t},Md}var Ld,fF;function R9(){if(fF)return Ld;fF=1;var e=tr,t=wr(),r=Vn(),n=pf(),u=x9(),s=ff(),o=pr(),a=Ec(),i=o("iterator"),c=!1,l,p,f;[].keys&&(f=[].keys(),"next"in f?(p=u(u(f)),p!==Object.prototype&&(l=p)):c=!0);var d=!r(l)||e(function(){var h={};return l[i].call(h)!==h});return d?l={}:a&&(l=n(l)),t(l[i])||s(l,i,function(){return this}),Ld={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:c},Ld}var Ud,dF;function wie(){if(dF)return Ud;dF=1;var e=D3(),t=gc();return Ud=e?{}.toString:function(){return"[object "+t(this)+"]"},Ud}var Gd,DF;function qa(){if(DF)return Gd;DF=1;var e=D3(),t=Hn.f,r=yc,n=Jr(),u=wie(),s=pr(),o=s("toStringTag");return Gd=function(a,i,c,l){var p=c?a:a&&a.prototype;p&&(n(p,o)||t(p,o,{configurable:!0,value:i}),l&&!e&&r(p,"toString",u))},Gd}var Vd,hF;function xa(){return hF||(hF=1,Vd={}),Vd}var Hd,mF;function _ie(){if(mF)return Hd;mF=1;var e=R9().IteratorPrototype,t=pf(),r=dc,n=qa(),u=xa(),s=function(){return this};return Hd=function(o,a,i,c){var l=a+" Iterator";return o.prototype=t(e,{next:r(+!c,i)}),n(o,l,!1,!0),u[l]=s,o},Hd}var Wd,EF;function Bie(){if(EF)return Wd;EF=1;var e=Xt(),t=ka;return Wd=function(r,n,u){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[u]))}catch{}},Wd}var Jd,vF;function Tie(){if(vF)return Jd;vF=1;var e=Vn();return Jd=function(t){return e(t)||t===null},Jd}var zd,yF;function $ie(){if(yF)return zd;yF=1;var e=Tie(),t=String,r=TypeError;return zd=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},zd}var Kd,gF;function Pie(){if(gF)return Kd;gF=1;var e=Bie(),t=Vn(),r=Dc(),n=$ie();return Kd=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,s={},o;try{o=e(Object.prototype,"__proto__","set"),o(s,[]),u=s instanceof Array}catch{}return function(i,c){return r(i),n(c),t(i)&&(u?o(i,c):i.__proto__=c),i}}():void 0),Kd}var Xd,AF;function j9(){if(AF)return Xd;AF=1;var e=Mt,t=Gn,r=Ec(),n=Cie(),u=wr(),s=_ie(),o=x9(),a=Pie(),i=qa(),c=yc,l=ff(),p=pr(),f=xa(),d=R9(),h=n.PROPER,E=n.CONFIGURABLE,A=d.IteratorPrototype,m=d.BUGGY_SAFARI_ITERATORS,y=p("iterator"),F="keys",B="values",P="entries",$=function(){return this};return Xd=function(I,U,j,W,te,Y,oe){s(j,U,W);var ie=function(D){if(D===te&&pe)return pe;if(!m&&D&&D in de)return de[D];switch(D){case F:return function(){return new j(this,D)};case B:return function(){return new j(this,D)};case P:return function(){return new j(this,D)}}return function(){return new j(this)}},fe=U+" Iterator",De=!1,de=I.prototype,Ce=de[y]||de["@@iterator"]||te&&de[te],pe=!m&&Ce||ie(te),Q=U==="Array"&&de.entries||Ce,q,v,C;if(Q&&(q=o(Q.call(new I)),q!==Object.prototype&&q.next&&(!r&&o(q)!==A&&(a?a(q,A):u(q[y])||l(q,y,$)),i(q,fe,!0,!0),r&&(f[fe]=$))),h&&te===B&&Ce&&Ce.name!==B&&(!r&&E?c(de,"name",B):(De=!0,pe=function(){return t(Ce,this)})),te)if(v={values:ie(B),keys:Y?pe:ie(F),entries:ie(P)},oe)for(C in v)(m||De||!(C in de))&&l(de,C,v[C]);else e({target:U,proto:!0,forced:m||De},v);return(!r||oe)&&de[y]!==pe&&l(de,y,pe,{name:te}),f[U]=pe,v},Xd}var Yd,FF;function M9(){return FF||(FF=1,Yd=function(e,t){return{value:e,done:t}}),Yd}var CF;function L9(){if(CF)return zA;CF=1;var e=Aie().charAt,t=gs(),r=y3(),n=j9(),u=M9(),s="String Iterator",o=r.set,a=r.getterFor(s);return n(String,"String",function(i){o(this,{type:s,string:t(i),index:0})},function(){var c=a(this),l=c.string,p=c.index,f;return p>=l.length?u(void 0,!0):(f=e(l,p),c.index+=f.length,u(f,!1))}),zA}var bF={},Zd,SF;function Oie(){if(SF)return Zd;SF=1;var e=Gn,t=hs,r=c3;return Zd=function(n,u,s){var o,a;t(n);try{if(o=r(n,"return"),!o){if(u==="throw")throw s;return s}o=e(o,n)}catch(i){a=!0,o=i}if(u==="throw")throw s;if(a)throw o;return t(o),s},Zd}var Qd,wF;function kie(){if(wF)return Qd;wF=1;var e=hs,t=Oie();return Qd=function(r,n,u,s){try{return s?n(e(u)[0],u[1]):n(u)}catch(o){t(r,"throw",o)}},Qd}var e0,_F;function Iie(){if(_F)return e0;_F=1;var e=pr(),t=xa(),r=e("iterator"),n=Array.prototype;return e0=function(u){return u!==void 0&&(t.Array===u||n[r]===u)},e0}var t0,BF;function A3(){if(BF)return t0;BF=1;var e=gc(),t=c3,r=i3(),n=xa(),u=pr(),s=u("iterator");return t0=function(o){if(!r(o))return t(o,s)||t(o,"@@iterator")||n[e(o)]},t0}var r0,TF;function Nie(){if(TF)return r0;TF=1;var e=Gn,t=ka,r=hs,n=of(),u=A3(),s=TypeError;return r0=function(o,a){var i=arguments.length<2?u(o):a;if(t(i))return r(e(i,o));throw new s(n(o)+" is not iterable")},r0}var n0,$F;function qie(){if($F)return n0;$F=1;var e=d3,t=Gn,r=Nu(),n=kie(),u=Iie(),s=h3(),o=vs(),a=E3(),i=Nie(),c=A3(),l=Array;return n0=function(f){var d=r(f),h=s(this),E=arguments.length,A=E>1?arguments[1]:void 0,m=A!==void 0;m&&(A=e(A,E>2?arguments[2]:void 0));var y=c(d),F=0,B,P,$,I,U,j;if(y&&!(this===l&&u(y)))for(P=h?new this:[],I=i(d,y),U=I.next;!($=t(U,I)).done;F++)j=m?n(I,A,[$.value,F],!0):$.value,a(P,F,j);else for(B=o(d),P=h?new this(B):l(B);B>F;F++)j=m?A(d[F],F):d[F],a(P,F,j);return P.length=F,P},n0}var u0,PF;function xie(){if(PF)return u0;PF=1;var e=pr(),t=e("iterator"),r=!1;try{var n=0,u={next:function(){return{done:!!n++}},return:function(){r=!0}};u[t]=function(){return this},Array.from(u,function(){throw 2})}catch{}return u0=function(s,o){try{if(!o&&!r)return!1}catch{return!1}var a=!1;try{var i={};i[t]=function(){return{next:function(){return{done:a=!0}}}},s(i)}catch{}return a},u0}var OF;function Rie(){if(OF)return bF;OF=1;var e=Mt,t=qie(),r=xie(),n=!r(function(u){Array.from(u)});return e({target:"Array",stat:!0,forced:n},{from:t}),bF}var s0,kF;function jie(){if(kF)return s0;kF=1,L9(),Rie();var e=pu;return s0=e.Array.from,s0}var o0,IF;function U9(){if(IF)return o0;IF=1;var e=jie();return o0=e,o0}var a0,NF;function G9(){return NF||(NF=1,a0=U9()),a0}var qF={},i0,xF;function V9(){if(xF)return i0;xF=1;var e=TypeError,t=9007199254740991;return i0=function(r){if(r>t)throw e("Maximum allowed index exceeded");return r},i0}var c0,RF;function Mie(){if(RF)return c0;RF=1;var e=Na(),t=h3(),r=Vn(),n=pr(),u=n("species"),s=Array;return c0=function(o){var a;return e(o)&&(a=o.constructor,t(a)&&(a===s||e(a.prototype))?a=void 0:r(a)&&(a=a[u],a===null&&(a=void 0))),a===void 0?s:a},c0}var l0,jF;function H9(){if(jF)return l0;jF=1;var e=Mie();return l0=function(t,r){return new(e(t))(r===0?0:r)},l0}var MF;function W9(){if(MF)return qF;MF=1;var e=Mt,t=tr,r=Na(),n=Vn(),u=Nu(),s=vs(),o=V9(),a=E3(),i=H9(),c=v3(),l=pr(),p=hc(),f=l("isConcatSpreadable"),d=p>=51||!t(function(){var A=[];return A[f]=!1,A.concat()[0]!==A}),h=function(A){if(!n(A))return!1;var m=A[f];return m!==void 0?!!m:r(A)},E=!d||!c("concat");return e({target:"Array",proto:!0,arity:1,forced:E},{concat:function(m){var y=u(this),F=i(y,0),B=0,P,$,I,U,j;for(P=-1,I=arguments.length;PU;U++)if((E||U in P)&&(te=P[U],Y=I(te,U,B),i))if(c)W[U]=Y;else if(Y)switch(i){case 3:return!0;case 5:return te;case 6:return U;case 2:o(W,te)}else switch(i){case 4:return!1;case 7:o(W,te)}return d?-1:p||f?f:W}};return v0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},v0}var YF;function Gie(){if(YF)return UF;YF=1;var e=Mt,t=Sr(),r=Gn,n=Xt(),u=Ec(),s=un,o=Oa(),a=tr,i=Jr(),c=mn(),l=hs,p=Ds(),f=f3,d=gs(),h=dc,E=pf(),A=N9(),m=J9(),y=Lie(),F=z9(),B=s3,P=Hn,$=q9(),I=o3,U=ff(),j=Uie(),W=Ia(),te=cf(),Y=lf(),oe=p3(),ie=pr(),fe=K9(),De=Vt(),de=X9(),Ce=qa(),pe=y3(),Q=F3().forEach,q=te("hidden"),v="Symbol",C="prototype",D=pe.set,g=pe.getterFor(v),O=Object[C],b=t.Symbol,w=b&&b[C],x=t.RangeError,k=t.TypeError,G=t.QObject,H=B.f,re=P.f,_e=y.f,Le=I.f,Ue=n([].push),Ge=W("symbols"),be=W("op-symbols"),je=W("wks"),ke=!G||!G[C]||!G[C].findChild,Ie=function(J,ee,ue){var ge=H(O,ee);ge&&delete O[ee],re(J,ee,ue),ge&&J!==O&&re(O,ee,ge)},ce=s&&a(function(){return E(re({},"a",{get:function(){return re(this,"a",{value:7}).a}})).a!==7})?Ie:re,Te=function(J,ee){var ue=Ge[J]=E(w);return D(ue,{type:v,tag:J,description:ee}),s||(ue.description=ee),ue},Z=function(ee,ue,ge){ee===O&&Z(be,ue,ge),l(ee);var Be=f(ue);return l(ge),i(Ge,Be)?(ge.enumerable?(i(ee,q)&&ee[q][Be]&&(ee[q][Be]=!1),ge=E(ge,{enumerable:h(0,!1)})):(i(ee,q)||re(ee,q,h(1,E(null))),ee[q][Be]=!0),ce(ee,Be,ge)):re(ee,Be,ge)},ae=function(ee,ue){l(ee);var ge=p(ue),Be=A(ge).concat(L(ge));return Q(Be,function(qe){(!s||r(N,ge,qe))&&Z(ee,qe,ge[qe])}),ee},le=function(ee,ue){return ue===void 0?E(ee):ae(E(ee),ue)},N=function(ee){var ue=f(ee),ge=r(Le,this,ue);return this===O&&i(Ge,ue)&&!i(be,ue)?!1:ge||!i(this,ue)||!i(Ge,ue)||i(this,q)&&this[q][ue]?ge:!0},S=function(ee,ue){var ge=p(ee),Be=f(ue);if(!(ge===O&&i(Ge,Be)&&!i(be,Be))){var qe=H(ge,Be);return qe&&i(Ge,Be)&&!(i(ge,q)&&ge[q][Be])&&(qe.enumerable=!0),qe}},_=function(ee){var ue=_e(p(ee)),ge=[];return Q(ue,function(Be){!i(Ge,Be)&&!i(Y,Be)&&Ue(ge,Be)}),ge},L=function(J){var ee=J===O,ue=_e(ee?be:p(J)),ge=[];return Q(ue,function(Be){i(Ge,Be)&&(!ee||i(O,Be))&&Ue(ge,Ge[Be])}),ge};return o||(b=function(){if(c(w,this))throw new k("Symbol is not a constructor");var ee=!arguments.length||arguments[0]===void 0?void 0:d(arguments[0]),ue=oe(ee),ge=function(Be){var qe=this===void 0?t:this;qe===O&&r(ge,be,Be),i(qe,q)&&i(qe[q],ue)&&(qe[q][ue]=!1);var Pe=h(1,Be);try{ce(qe,ue,Pe)}catch(rt){if(!(rt instanceof x))throw rt;Ie(qe,ue,Pe)}};return s&&ke&&ce(O,ue,{configurable:!0,set:ge}),Te(ue,ee)},w=b[C],U(w,"toString",function(){return g(this).tag}),U(b,"withoutSetter",function(J){return Te(oe(J),J)}),I.f=N,P.f=Z,$.f=ae,B.f=S,m.f=y.f=_,F.f=L,fe.f=function(J){return Te(ie(J),J)},s&&(j(w,"description",{configurable:!0,get:function(){return g(this).description}}),u||U(O,"propertyIsEnumerable",N,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:b}),Q(A(je),function(J){De(J)}),e({target:v,stat:!0,forced:!o},{useSetter:function(){ke=!0},useSimple:function(){ke=!1}}),e({target:"Object",stat:!0,forced:!o,sham:!s},{create:le,defineProperty:Z,defineProperties:ae,getOwnPropertyDescriptor:S}),e({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:_}),de(),Ce(b,v),Y[q]=!0,UF}var ZF={},y0,QF;function Y9(){if(QF)return y0;QF=1;var e=Oa();return y0=e&&!!Symbol.for&&!!Symbol.keyFor,y0}var eC;function Vie(){if(eC)return ZF;eC=1;var e=Mt,t=Iu(),r=Jr(),n=gs(),u=Ia(),s=Y9(),o=u("string-to-symbol-registry"),a=u("symbol-to-string-registry");return e({target:"Symbol",stat:!0,forced:!s},{for:function(i){var c=n(i);if(r(o,c))return o[c];var l=t("Symbol")(c);return o[c]=l,a[l]=c,l}}),ZF}var tC={},rC;function Hie(){if(rC)return tC;rC=1;var e=Mt,t=Jr(),r=mc,n=of(),u=Ia(),s=Y9(),o=u("symbol-to-string-registry");return e({target:"Symbol",stat:!0,forced:!s},{keyFor:function(i){if(!r(i))throw new TypeError(n(i)+" is not a symbol");if(t(o,i))return o[i]}}),tC}var nC={},g0,uC;function Wie(){if(uC)return g0;uC=1;var e=Xt(),t=Na(),r=wr(),n=po(),u=gs(),s=e([].push);return g0=function(o){if(r(o))return o;if(t(o)){for(var a=o.length,i=[],c=0;c=h.length)return d.target=void 0,o(void 0,!0);switch(d.kind){case"keys":return o(E,!1);case"values":return o(h[E],!1)}return o([E,h[E]],!1)},"values");var f=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!a&&i&&f.name!=="values")try{u(f,"name",{value:"values"})}catch{}return C0}var b0,LC;function fce(){return LC||(LC=1,b0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),b0}var UC;function Q9(){if(UC)return RC;UC=1,Z9();var e=fce(),t=Sr(),r=qa(),n=xa();for(var u in e)r(t[u],u),n[u]=n.Array;return RC}var S0,GC;function ew(){if(GC)return S0;GC=1;var e=lce();return Q9(),S0=e,S0}var w0,VC;function tw(){return VC||(VC=1,w0=ew()),w0}var _0,HC;function dce(){if(HC)return _0;HC=1,Z9(),L9();var e=A3();return _0=e,_0}var B0,WC;function Dce(){if(WC)return B0;WC=1;var e=dce();return Q9(),B0=e,B0}var T0,JC;function hce(){if(JC)return T0;JC=1;var e=Dce();return T0=e,T0}var $0,zC;function mce(){if(zC)return $0;zC=1;var e=hce();return $0=e,$0}var P0,KC;function rw(){return KC||(KC=1,P0=mce()),P0}var O0,XC;function nw(){return XC||(XC=1,O0=rw()),O0}var YC={},ZC;function Ece(){if(ZC)return YC;ZC=1;var e=Mt,t=Na();return e({target:"Array",stat:!0},{isArray:t}),YC}var k0,QC;function vce(){if(QC)return k0;QC=1,Ece();var e=pu;return k0=e.Array.isArray,k0}var I0,eb;function uw(){if(eb)return I0;eb=1;var e=vce();return I0=e,I0}var N0,tb;function sw(){return tb||(tb=1,N0=uw()),N0}var q0={exports:{}},x0={exports:{}},R0,rb;function yce(){if(rb)return R0;rb=1;var e=uw();return R0=e,R0}var j0,nb;function gce(){if(nb)return j0;nb=1;var e=yce();return j0=e,j0}var M0,ub;function Ace(){return ub||(ub=1,M0=gce()),M0}var sb;function Fce(){return sb||(sb=1,function(e){var t=Ace();function r(n){if(t(n))return n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(x0)),x0.exports}var L0={exports:{}},ob={},ab;function Cce(){if(ab)return ob;ab=1;var e=pr(),t=Hn.f,r=e("metadata"),n=Function.prototype;return n[r]===void 0&&t(n,r,{value:null}),ob}var ib={},cb;function bce(){if(cb)return ib;cb=1;var e=Vt();return e("asyncDispose"),ib}var lb={},pb;function Sce(){if(pb)return lb;pb=1;var e=Vt();return e("dispose"),lb}var fb={},db;function wce(){if(db)return fb;db=1;var e=Vt();return e("metadata"),fb}var U0,Db;function _ce(){if(Db)return U0;Db=1;var e=ew();return Cce(),bce(),Sce(),wce(),U0=e,U0}var hb={},G0,mb;function ow(){if(mb)return G0;mb=1;var e=Iu(),t=Xt(),r=e("Symbol"),n=r.keyFor,u=t(r.prototype.valueOf);return G0=r.isRegisteredSymbol||function(o){try{return n(u(o))!==void 0}catch{return!1}},G0}var Eb;function Bce(){if(Eb)return hb;Eb=1;var e=Mt,t=ow();return e({target:"Symbol",stat:!0},{isRegisteredSymbol:t}),hb}var vb={},V0,yb;function aw(){if(yb)return V0;yb=1;for(var e=Ia(),t=Iu(),r=Xt(),n=mc,u=pr(),s=t("Symbol"),o=s.isWellKnownSymbol,a=t("Object","getOwnPropertyNames"),i=r(s.prototype.valueOf),c=e("wks"),l=0,p=a(s),f=p.length;lr.length)&&(n=r.length);for(var u=0,s=new Array(n);u0;)n[i]=n[--i];i!==o++&&(n[i]=a)}else for(var c=t(s/2),l=r(e(n,0,c),u),p=r(e(n,c),u),f=l.length,d=p.length,h=0,E=0;h3)){if(p)return!0;if(d)return d<603;var I="",U,j,W,te;for(U=65;U<76;U++){switch(j=String.fromCharCode(U),U){case 66:case 69:case 70:case 72:W=3;break;case 68:case 71:W=4;break;default:W=2}for(te=0;te<47;te++)h.push({k:j+te,v:W})}for(h.sort(function(Y,oe){return oe.v-Y.v}),te=0;teo(j)?1:-1}};return e({target:"Array",proto:!0,forced:P},{sort:function(U){U!==void 0&&r(U);var j=n(this);if(B)return U===void 0?E(j):E(j,U);var W=[],te=u(j),Y,oe;for(oe=0;oe>>0||(l(c,E)?16:10))}:o,_D}var S4;function Ale(){if(S4)return A4;S4=1;var e=Mt,t=gle();return e({global:!0,forced:parseInt!==t},{parseInt:t}),A4}var BD,w4;function Fle(){if(w4)return BD;w4=1,Ale();var e=pu;return BD=e.parseInt,BD}var TD,_4;function Cle(){if(_4)return TD;_4=1;var e=Fle();return TD=e,TD}var $D,B4;function ble(){return B4||(B4=1,$D=Cle()),$D}var T4={},$4;function Sle(){if($4)return T4;$4=1;var e=Mt,t=u3,r=k9().indexOf,n=df(),u=t([].indexOf),s=!!u&&1/u([1],1,-0)<0,o=s||!n("indexOf");return e({target:"Array",proto:!0,forced:o},{indexOf:function(i){var c=arguments.length>1?arguments[1]:void 0;return s?u(this,i,c)||0:r(this,i,c)}}),T4}var PD,P4;function wle(){if(P4)return PD;P4=1,Sle();var e=ys();return PD=e("Array","indexOf"),PD}var OD,O4;function _le(){if(O4)return OD;O4=1;var e=mn(),t=wle(),r=Array.prototype;return OD=function(n){var u=n.indexOf;return n===r||e(r,n)&&u===r.indexOf?t:u},OD}var kD,k4;function Ble(){if(k4)return kD;k4=1;var e=_le();return kD=e,kD}var ID,I4;function Df(){return I4||(I4=1,ID=Ble()),ID}var N4={},ND,q4;function Tle(){if(q4)return ND;q4=1;var e=F3().forEach,t=df(),r=t("forEach");return ND=r?[].forEach:function(u){return e(this,u,arguments.length>1?arguments[1]:void 0)},ND}var x4;function $le(){if(x4)return N4;x4=1;var e=Mt,t=Tle();return e({target:"Array",proto:!0,forced:[].forEach!==t},{forEach:t}),N4}var qD,R4;function Ple(){if(R4)return qD;R4=1,$le();var e=ys();return qD=e("Array","forEach"),qD}var xD,j4;function Ole(){if(j4)return xD;j4=1;var e=Ple();return xD=e,xD}var RD,M4;function kle(){if(M4)return RD;M4=1;var e=gc(),t=Jr(),r=mn(),n=Ole(),u=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return RD=function(o){var a=o.forEach;return o===u||r(u,o)&&a===u.forEach||t(s,e(o))?n:a},RD}var jD,L4;function lw(){return L4||(L4=1,jD=kle()),jD}var U4={},G4;function Ile(){if(G4)return U4;G4=1;var e=Mt,t=un,r=pf();return e({target:"Object",stat:!0,sham:!t},{create:r}),U4}var MD,V4;function Nle(){if(V4)return MD;V4=1,Ile();var e=pu,t=e.Object;return MD=function(n,u){return t.create(n,u)},MD}var LD,H4;function qle(){if(H4)return LD;H4=1;var e=Nle();return LD=e,LD}var UD,W4;function xle(){return W4||(W4=1,UD=qle()),UD}var GD,J4;function Rle(){if(J4)return GD;J4=1,W9();var e=ys();return GD=e("Array","concat"),GD}var VD,z4;function jle(){if(z4)return VD;z4=1;var e=mn(),t=Rle(),r=Array.prototype;return VD=function(n){var u=n.concat;return n===r||e(r,n)&&u===r.concat?t:u},VD}var HD,K4;function Mle(){if(K4)return HD;K4=1;var e=jle();return HD=e,HD}var WD,X4;function hf(){return X4||(X4=1,WD=Mle()),WD}var Y4;function Lle(){return Y4||(Y4=1,function(e,t){var r=gp(),n=G9(),u=tw(),s=nw(),o=sw(),a=ms,i=Es;a(t,"__esModule",{value:!0}),t.default=void 0;var c=i(iw()),l=i(ile()),p=i(vle()),f=i(gp()),d=i(ble()),h=i(Df()),E=i(lw()),A=i(xle()),m=i(hf());function y(Z,ae){var le=typeof u<"u"&&s(Z)||Z["@@iterator"];if(!le){if(o(Z)||(le=F(Z))||ae&&Z&&typeof Z.length=="number"){le&&(Z=le);var N=0,S=function(){};return{s:S,n:function(){return N>=Z.length?{done:!0}:{done:!1,value:Z[N++]}},e:function(ue){throw ue},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,L=!1,J;return{s:function(){le=le.call(Z)},n:function(){var ue=le.next();return _=ue.done,ue},e:function(ue){L=!0,J=ue},f:function(){try{!_&&le.return!=null&&le.return()}finally{if(L)throw J}}}}function F(Z,ae){var le;if(Z){if(typeof Z=="string")return B(Z,ae);var N=r(le=Object.prototype.toString.call(Z)).call(le,8,-1);if(N==="Object"&&Z.constructor&&(N=Z.constructor.name),N==="Map"||N==="Set")return n(Z);if(N==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(N))return B(Z,ae)}}function B(Z,ae){(ae==null||ae>Z.length)&&(ae=Z.length);for(var le=0,N=new Array(ae);le{for(const m of y)(0,n.checkReportMissingProp)(i,m)}):(l.if((0,t._)`${A} && (${(0,n.checkMissingProp)(i,y,f)})`),(0,n.reportMissingProp)(i,f),l.else())}}e.validatePropertyDeps=o;function a(i,c=i.schema){const{gen:l,data:p,keyword:d,it:f}=i,h=l.name("valid");for(const y in c)(0,r.alwaysValidSchema)(f,c[y])||(l.if((0,n.propertyInData)(l,p,y,f.opts.ownProperties),()=>{const A=i.subschema({keyword:d,schemaProp:y},h);i.mergeValidEvaluated(A,h)},()=>l.var(h,!0)),i.ok(h))}e.validateSchemaDeps=a,e.default=u})(uw);var p3={};Object.defineProperty(p3,"__esModule",{value:!0});const sw=st,Gre=we,Vre={message:"property name must be valid",params:({params:e})=>(0,sw._)`{propertyName: ${e.propertyName}}`},Hre={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:Vre,code(e){const{gen:t,schema:r,data:n,it:u}=e;if((0,Gre.alwaysValidSchema)(u,r))return;const s=t.name("valid");t.forIn("key",n,o=>{e.setParams({propertyName:o}),e.subschema({keyword:"propertyNames",data:o,dataTypes:["string"],propertyName:o,compositeRule:!0},s),t.if((0,sw.not)(s),()=>{e.error(!0),u.allErrors||t.break()})}),e.ok(s)}};p3.default=Hre;var pd={};Object.defineProperty(pd,"__esModule",{value:!0});const cl=rt,An=st,Wre=nu,ll=we,Jre={message:"must NOT have additional properties",params:({params:e})=>(0,An._)`{additionalProperty: ${e.additionalProperty}}`},zre={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:Jre,code(e){const{gen:t,schema:r,parentSchema:n,data:u,errsCount:s,it:o}=e;if(!s)throw new Error("ajv implementation error");const{allErrors:a,opts:i}=o;if(o.props=!0,i.removeAdditional!=="all"&&(0,ll.alwaysValidSchema)(o,r))return;const c=(0,cl.allSchemaProperties)(n.properties),l=(0,cl.allSchemaProperties)(n.patternProperties);p(),e.ok((0,An._)`${s} === ${Wre.default.errors}`);function p(){t.forIn("key",u,A=>{!c.length&&!l.length?h(A):t.if(d(A),()=>h(A))})}function d(A){let m;if(c.length>8){const v=(0,ll.schemaRefOrVal)(o,n.properties,"properties");m=(0,cl.isOwnProperty)(t,v,A)}else c.length?m=(0,An.or)(...c.map(v=>(0,An._)`${A} === ${v}`)):m=An.nil;return l.length&&(m=(0,An.or)(m,...l.map(v=>(0,An._)`${(0,cl.usePattern)(e,v)}.test(${A})`))),(0,An.not)(m)}function f(A){t.code((0,An._)`delete ${u}[${A}]`)}function h(A){if(i.removeAdditional==="all"||i.removeAdditional&&r===!1){f(A);return}if(r===!1){e.setParams({additionalProperty:A}),e.error(),a||t.break();return}if(typeof r=="object"&&!(0,ll.alwaysValidSchema)(o,r)){const m=t.name("valid");i.removeAdditional==="failing"?(y(A,m,!1),t.if((0,An.not)(m),()=>{e.reset(),f(A)})):(y(A,m),a||t.if((0,An.not)(m),()=>t.break()))}}function y(A,m,v){const C={keyword:"additionalProperties",dataProp:A,dataPropType:ll.Type.Str};v===!1&&Object.assign(C,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(C,m)}}};pd.default=zre;var d3={};Object.defineProperty(d3,"__esModule",{value:!0});const Kre=$n,Vg=rt,qf=we,Hg=pd,Xre={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:n,data:u,it:s}=e;s.opts.removeAdditional==="all"&&n.additionalProperties===void 0&&Hg.default.code(new Kre.KeywordCxt(s,Hg.default,"additionalProperties"));const o=(0,Vg.allSchemaProperties)(r);for(const p of o)s.definedProperties.add(p);s.opts.unevaluated&&o.length&&s.props!==!0&&(s.props=qf.mergeEvaluated.props(t,(0,qf.toHash)(o),s.props));const a=o.filter(p=>!(0,qf.alwaysValidSchema)(s,r[p]));if(a.length===0)return;const i=t.name("valid");for(const p of a)c(p)?l(p):(t.if((0,Vg.propertyInData)(t,u,p,s.opts.ownProperties)),l(p),s.allErrors||t.else().var(i,!0),t.endIf()),e.it.definedProperties.add(p),e.ok(i);function c(p){return s.opts.useDefaults&&!s.compositeRule&&r[p].default!==void 0}function l(p){e.subschema({keyword:"properties",schemaProp:p,dataProp:p},i)}}};d3.default=Xre;var f3={};Object.defineProperty(f3,"__esModule",{value:!0});const Wg=rt,pl=st,Jg=we,zg=we,Yre={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:n,parentSchema:u,it:s}=e,{opts:o}=s,a=(0,Wg.allSchemaProperties)(r),i=a.filter(y=>(0,Jg.alwaysValidSchema)(s,r[y]));if(a.length===0||i.length===a.length&&(!s.opts.unevaluated||s.props===!0))return;const c=o.strictSchema&&!o.allowMatchingProperties&&u.properties,l=t.name("valid");s.props!==!0&&!(s.props instanceof pl.Name)&&(s.props=(0,zg.evaluatedPropsToName)(t,s.props));const{props:p}=s;d();function d(){for(const y of a)c&&f(y),s.allErrors?h(y):(t.var(l,!0),h(y),t.if(l))}function f(y){for(const A in c)new RegExp(y).test(A)&&(0,Jg.checkStrictMode)(s,`property ${A} matches pattern ${y} (use allowMatchingProperties)`)}function h(y){t.forIn("key",n,A=>{t.if((0,pl._)`${(0,Wg.usePattern)(e,y)}.test(${A})`,()=>{const m=i.includes(y);m||e.subschema({keyword:"patternProperties",schemaProp:y,dataProp:A,dataPropType:zg.Type.Str},l),s.opts.unevaluated&&p!==!0?t.assign((0,pl._)`${p}[${A}]`,!0):!m&&!s.allErrors&&t.if((0,pl.not)(l),()=>t.break())})})}}};f3.default=Yre;var D3={};Object.defineProperty(D3,"__esModule",{value:!0});const Zre=we,Qre={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:n}=e;if((0,Zre.alwaysValidSchema)(n,r)){e.fail();return}const u=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},u),e.failResult(u,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}};D3.default=Qre;var h3={};Object.defineProperty(h3,"__esModule",{value:!0});const ene=rt,tne={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ene.validateUnion,error:{message:"must match a schema in anyOf"}};h3.default=tne;var m3={};Object.defineProperty(m3,"__esModule",{value:!0});const Ml=st,rne=we,nne={message:"must match exactly one schema in oneOf",params:({params:e})=>(0,Ml._)`{passingSchemas: ${e.passing}}`},une={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:nne,code(e){const{gen:t,schema:r,parentSchema:n,it:u}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(u.opts.discriminator&&n.discriminator)return;const s=r,o=t.let("valid",!1),a=t.let("passing",null),i=t.name("_valid");e.setParams({passing:a}),t.block(c),e.result(o,()=>e.reset(),()=>e.error(!0));function c(){s.forEach((l,p)=>{let d;(0,rne.alwaysValidSchema)(u,l)?t.var(i,!0):d=e.subschema({keyword:"oneOf",schemaProp:p,compositeRule:!0},i),p>0&&t.if((0,Ml._)`${i} && ${o}`).assign(o,!1).assign(a,(0,Ml._)`[${a}, ${p}]`).else(),t.if(i,()=>{t.assign(o,!0),t.assign(a,p),d&&e.mergeEvaluated(d,Ml.Name)})})}}};m3.default=une;var E3={};Object.defineProperty(E3,"__esModule",{value:!0});const sne=we,one={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:n}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const u=t.name("valid");r.forEach((s,o)=>{if((0,sne.alwaysValidSchema)(n,s))return;const a=e.subschema({keyword:"allOf",schemaProp:o},u);e.ok(u),e.mergeEvaluated(a)})}};E3.default=one;var y3={};Object.defineProperty(y3,"__esModule",{value:!0});const wp=st,ow=we,ane={message:({params:e})=>(0,wp.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,wp._)`{failingKeyword: ${e.ifClause}}`},ine={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:ane,code(e){const{gen:t,parentSchema:r,it:n}=e;r.then===void 0&&r.else===void 0&&(0,ow.checkStrictMode)(n,'"if" without "then" and "else" is ignored');const u=Kg(n,"then"),s=Kg(n,"else");if(!u&&!s)return;const o=t.let("valid",!0),a=t.name("_valid");if(i(),e.reset(),u&&s){const l=t.let("ifClause");e.setParams({ifClause:l}),t.if(a,c("then",l),c("else",l))}else u?t.if(a,c("then")):t.if((0,wp.not)(a),c("else"));e.pass(o,()=>e.error(!0));function i(){const l=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},a);e.mergeEvaluated(l)}function c(l,p){return()=>{const d=e.subschema({keyword:l},a);t.assign(o,a),e.mergeValidEvaluated(d,o),p?t.assign(p,(0,wp._)`${l}`):e.setParams({ifClause:l})}}}};function Kg(e,t){const r=e.schema[t];return r!==void 0&&!(0,ow.alwaysValidSchema)(e,r)}y3.default=ine;var v3={};Object.defineProperty(v3,"__esModule",{value:!0});const cne=we,lne={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){t.if===void 0&&(0,cne.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};v3.default=lne;Object.defineProperty(a3,"__esModule",{value:!0});const pne=Ta,dne=i3,fne=$a,Dne=c3,hne=l3,mne=uw,Ene=p3,yne=pd,vne=d3,gne=f3,Ane=D3,Fne=h3,Cne=m3,bne=E3,Sne=y3,wne=v3;function _ne(e=!1){const t=[Ane.default,Fne.default,Cne.default,bne.default,Sne.default,wne.default,Ene.default,yne.default,mne.default,vne.default,gne.default];return e?t.push(dne.default,Dne.default):t.push(pne.default,fne.default),t.push(hne.default),t}a3.default=_ne;var g3={},A3={};Object.defineProperty(A3,"__esModule",{value:!0});const Ht=st,Bne={message:({schemaCode:e})=>(0,Ht.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,Ht._)`{format: ${e}}`},Tne={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:Bne,code(e,t){const{gen:r,data:n,$data:u,schema:s,schemaCode:o,it:a}=e,{opts:i,errSchemaPath:c,schemaEnv:l,self:p}=a;if(!i.validateFormats)return;u?d():f();function d(){const h=r.scopeValue("formats",{ref:p.formats,code:i.code.formats}),y=r.const("fDef",(0,Ht._)`${h}[${o}]`),A=r.let("fType"),m=r.let("format");r.if((0,Ht._)`typeof ${y} == "object" && !(${y} instanceof RegExp)`,()=>r.assign(A,(0,Ht._)`${y}.type || "string"`).assign(m,(0,Ht._)`${y}.validate`),()=>r.assign(A,(0,Ht._)`"string"`).assign(m,y)),e.fail$data((0,Ht.or)(v(),C()));function v(){return i.strictSchema===!1?Ht.nil:(0,Ht._)`${o} && !${m}`}function C(){const B=l.$async?(0,Ht._)`(${y}.async ? await ${m}(${n}) : ${m}(${n}))`:(0,Ht._)`${m}(${n})`,T=(0,Ht._)`(typeof ${m} == "function" ? ${B} : ${m}.test(${n}))`;return(0,Ht._)`${m} && ${m} !== true && ${A} === ${t} && !${T}`}}function f(){const h=p.formats[s];if(!h){v();return}if(h===!0)return;const[y,A,m]=C(h);y===t&&e.pass(B());function v(){if(i.strictSchema===!1){p.logger.warn(T());return}throw new Error(T());function T(){return`unknown format "${s}" ignored in schema at path "${c}"`}}function C(T){const N=T instanceof RegExp?(0,Ht.regexpCode)(T):i.code.formats?(0,Ht._)`${i.code.formats}${(0,Ht.getProperty)(s)}`:void 0,R=r.scopeValue("formats",{key:s,ref:T,code:N});return typeof T=="object"&&!(T instanceof RegExp)?[T.type||"string",T.validate,(0,Ht._)`${R}.validate`]:["string",T,R]}function B(){if(typeof h=="object"&&!(h instanceof RegExp)&&h.async){if(!l.$async)throw new Error("async format in sync schema");return(0,Ht._)`await ${m}(${n})`}return typeof A=="function"?(0,Ht._)`${m}(${n})`:(0,Ht._)`${m}.test(${n})`}}}};A3.default=Tne;Object.defineProperty(g3,"__esModule",{value:!0});const $ne=A3,Pne=[$ne.default];g3.default=Pne;var va={};Object.defineProperty(va,"__esModule",{value:!0});va.contentVocabulary=va.metadataVocabulary=void 0;va.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"];va.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"];Object.defineProperty(WE,"__esModule",{value:!0});const kne=JE,One=KE,Ine=a3,Nne=g3,Xg=va,qne=[kne.default,One.default,(0,Ine.default)(),Nne.default,Xg.metadataVocabulary,Xg.contentVocabulary];WE.default=qne;var F3={},dd={};Object.defineProperty(dd,"__esModule",{value:!0});dd.DiscrError=void 0;var Yg;(function(e){e.Tag="tag",e.Mapping="mapping"})(Yg||(dd.DiscrError=Yg={}));Object.defineProperty(F3,"__esModule",{value:!0});const Wo=st,Oh=dd,Zg=qr,xne=Ba,Rne=we,jne={message:({params:{discrError:e,tagName:t}})=>e===Oh.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>(0,Wo._)`{error: ${e}, tag: ${r}, tagValue: ${t}}`},Mne={keyword:"discriminator",type:"object",schemaType:"object",error:jne,code(e){const{gen:t,data:r,schema:n,parentSchema:u,it:s}=e,{oneOf:o}=u;if(!s.opts.discriminator)throw new Error("discriminator: requires discriminator option");const a=n.propertyName;if(typeof a!="string")throw new Error("discriminator: requires propertyName");if(n.mapping)throw new Error("discriminator: mapping is not supported");if(!o)throw new Error("discriminator: requires oneOf keyword");const i=t.let("valid",!1),c=t.const("tag",(0,Wo._)`${r}${(0,Wo.getProperty)(a)}`);t.if((0,Wo._)`typeof ${c} == "string"`,()=>l(),()=>e.error(!1,{discrError:Oh.DiscrError.Tag,tag:c,tagName:a})),e.ok(i);function l(){const f=d();t.if(!1);for(const h in f)t.elseIf((0,Wo._)`${c} === ${h}`),t.assign(i,p(f[h]));t.else(),e.error(!1,{discrError:Oh.DiscrError.Mapping,tag:c,tagName:a}),t.endIf()}function p(f){const h=t.name("valid"),y=e.subschema({keyword:"oneOf",schemaProp:f},h);return e.mergeEvaluated(y,Wo.Name),h}function d(){var f;const h={},y=m(u);let A=!0;for(let B=0;Bthis.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(u.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(s,o):s;this.addMetaSchema(h,a,!1),this.refs["http://json-schema.org/schema"]=a}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(a)?a:void 0)}}t.Ajv=i,e.exports=t=i,e.exports.Ajv=i,Object.defineProperty(t,"__esModule",{value:!0}),t.default=i;var c=$n;Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return c.KeywordCxt}});var l=st;Object.defineProperty(t,"_",{enumerable:!0,get:function(){return l._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return l.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return l.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return l.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return l.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return l.CodeGen}});var p=lc;Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return p.default}});var d=Ba;Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return d.default}})})(Sh,Sh.exports);var zne=Sh.exports;const Kne="Root",Xne="object",Yne="Root Element",Zne={base64String:{type:"string",pattern:"^[A-Za-z0-9/+=]*$"},tagString:{type:"string",pattern:"^[a-z][a-z0-9]*(:.+)?$"}},Qne={id:{type:"string"},metadata:{type:"object",properties:{selectors:{type:"object",additionalProperties:{type:"string"}}},required:["selectors"],additionalProperties:!1},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},enums:{type:"object",properties:{ids:{$ref:"#/definitions/base64String"},wordLike:{$ref:"#/definitions/base64String"},notWordLike:{$ref:"#/definitions/base64String"},scopeBits:{$ref:"#/definitions/base64String"},graftTypes:{$ref:"#/definitions/base64String"}},required:["ids","wordLike","notWordLike","scopeBits","graftTypes"],additionalProperties:!1},docs:{type:"object",propertyNames:{type:"string"},additionalProperties:{type:"object",properties:{sequences:{type:"object",additionalProperties:{type:"object",properties:{type:{type:"string"},blocks:{type:"array",items:{type:"object",properties:{bs:{type:"string"},bg:{type:"string"},c:{type:"string"},is:{type:"string"},os:{type:"string"},nt:{type:"string"}},required:["bs","bg","c","is","os","nt"],additionalProperties:!1}},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}},chapters:{type:"object",additionalProperties:{type:"string"}},chapterVerses:{type:"object",additionalProperties:{type:"string"}},tokensPresent:{type:"string"}},required:["blocks","tags"],additionalProperties:!1}},headers:{type:"object",additionalProperties:{type:"string"}},mainId:{type:"string"},tags:{type:"array",items:{type:"string",$ref:"#/definitions/tagString"}}},required:["sequences","headers","mainId","tags"],additionalProperties:!1}},additionalProperties:!1},eue=["id","enums","docs","tags"],tue=!1,rue={title:Kne,type:Xne,description:Yne,definitions:Zne,properties:Qne,required:eue,additionalProperties:tue},nue="version 0.1.0",uue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/document_structure.json",sue="Document (Structure)",oue="A document, typically corresponding to a single USFM or USX book",aue="object",iue={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},cue=["schema","metadata"],lue=!1,pue={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},due={$comment:nue,$id:uue,title:sue,description:oue,type:aue,properties:iue,required:cue,additionalProperties:lue,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:pue,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},fue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/sequence_structure.json",Due="Sequence (Structure)",hue="A sequence contains a 'flow' of one or more blocks",mue="object",Eue={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}}},yue=["type"],vue=!1,gue={$id:fue,title:Due,description:hue,type:mue,properties:Eue,required:yue,additionalProperties:vue},Aue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/block_structure.json",Fue="Block (Structure)",Cue="A block, which represents either a paragraph of text or a graft",bue="object",Sue={type:{type:"string",description:"The type of block",enum:["paragraph","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},wue=["type"],_ue=!1,Bue={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},Tue={$id:Aue,title:Fue,description:Cue,type:bue,properties:Sue,required:wue,additionalProperties:_ue,if:{properties:{type:{enum:["paragraph"]}}},then:Bue,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},$ue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_2_1/contentElement_structure.json",Pue="Content Element (Structure)",kue="A content element, ie some form of (possibly nested) markup",Oue="object",Iue={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}}},Nue=["type"],que=!1,xue={$id:$ue,title:Pue,description:kue,type:Oue,properties:Iue,required:Nue,additionalProperties:que},Rue="version 0.2.0",jue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_document_constraint.json",Mue="object",Lue={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},Uue={$comment:Rue,$id:jue,type:Mue,properties:Lue},Gue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_sequence_constraint.json",Vue="object",Hue={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},Wue={$id:Gue,type:Vue,properties:Hue},Jue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_block_constraint.json",zue="object",Kue={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},Xue={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},Yue={$id:Jue,type:zue,properties:Kue,if:{properties:{type:{enum:["graft"]}}},then:Xue,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},Zue="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/perf_contentElement_constraint.json",Que="object",ese=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],tse={$id:Zue,type:Que,allOf:ese},rse="version 0.2.0",nse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_document_constraint.json",use="object",sse={sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sofria_sequence_constraint.json"}}},ose={$comment:rse,$id:nse,type:use,properties:sse},ase="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_sequence_constraint.json",ise="object",cse={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},lse={$id:ase,type:ise,properties:cse},pse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_block_constraint.json",dse="object",fse={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},Dse={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},hse={$id:pse,type:dse,properties:fse,if:{properties:{type:{enum:["graft"]}}},then:Dse,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},mse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_2_1/sofria_contentElement_constraint.json",Ese="object",yse=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["block"]},{required:["preview_text"]}]}},else:{required:["block"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],vse={$id:mse,type:Ese,allOf:yse},gse="version 0.1.0",Ase="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/document_structure.json",Fse="Document (Structure)",Cse="A document, typically corresponding to a single USFM or USX book",bse="object",Sse={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},wse=["schema","metadata"],_se=!1,Bse={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},Tse={$comment:gse,$id:Ase,title:Fse,description:Cse,type:bse,properties:Sse,required:wse,additionalProperties:_se,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:Bse,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},$se="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/sequence_structure.json",Pse="Sequence (Structure)",kse="A sequence contains a 'flow' of one or more blocks",Ose="object",Ise={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},Nse=["type"],qse=!1,xse={$id:$se,title:Pse,description:kse,type:Ose,properties:Ise,required:Nse,additionalProperties:qse},Rse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/block_structure.json",jse="Block (Structure)",Mse="A block, which represents either a paragraph of text or a graft",Lse="object",Use={type:{type:"string",description:"The type of block",enum:["paragraph","row","node","lookup","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},Gse=["type"],Vse=!1,Hse={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},Wse={$id:Rse,title:jse,description:Mse,type:Lse,properties:Use,required:Gse,additionalProperties:Vse,if:{properties:{type:{enum:["paragraph","row","node","lookup"]}}},then:Hse,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},Jse="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/contentElement_structure.json",zse="Content Element (Structure)",Kse="A content element, ie some form of (possibly nested) markup",Xse="object",Yse={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},Zse=["type"],Qse=!1,eoe={$id:Jse,title:zse,description:Kse,type:Xse,properties:Yse,required:Zse,additionalProperties:Qse},toe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_3_0/hook_structure.json",roe="Hook (Structure)",noe="Hooks, ie typed labels that may be used to link documents",uoe="array",soe={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},ooe={$id:toe,title:roe,description:noe,type:uoe,items:soe},aoe="version 0.3.0",ioe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_document_constraint.json",coe="object",loe={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},poe={$comment:aoe,$id:ioe,type:coe,properties:loe},doe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_sequence_constraint.json",foe="object",Doe={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},hoe={$id:doe,type:foe,properties:Doe},moe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_block_constraint.json",Eoe="object",yoe={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},voe={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},goe={$id:moe,type:Eoe,properties:yoe,if:{properties:{type:{enum:["graft"]}}},then:voe,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},Aoe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/perf_contentElement_constraint.json",Foe="object",Coe=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],boe={$id:Aoe,type:Foe,allOf:Coe},Soe="version 0.3.0",woe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_document_constraint.json",_oe="object",Boe={sequence:{$ref:"./sofria_sequence_constraint.json"}},Toe={$comment:Soe,$id:woe,type:_oe,properties:Boe},$oe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_sequence_constraint.json",Poe="object",koe={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},Ooe={$id:$oe,type:Poe,properties:koe},Ioe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_block_constraint.json",Noe="object",qoe={type:{type:"string",enum:["paragraph","graft"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},xoe={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},Roe={$id:Ioe,type:Noe,properties:qoe,if:{properties:{type:{enum:["graft"]}}},then:xoe,else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}},joe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_3_0/sofria_contentElement_constraint.json",Moe="object",Loe=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],Uoe={$id:joe,type:Moe,allOf:Loe},Goe="version 0.1.0",Voe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/document_structure.json",Hoe="Document (Structure)",Woe="A document, typically corresponding to a single USFM or USX book",Joe="object",zoe={schema:{type:"object",properties:{structure:{description:"The basic 'shape' of the content",type:"string",enum:["flat","nested"]},structure_version:{description:"the semantic version of the structure schema",type:"string"},constraints:{type:"array",items:{type:"object",properties:{name:{type:"string",enum:["perf","sofria"]},version:{description:"the semantic version of the constraint schema",type:"string"}},additionalProperties:!1,required:["name","version"]}}},required:["structure","structure_version","constraints"],additionalProperties:!1},metadata:{description:"Metadata describing the document and the translation it belongs to",type:"object",properties:{translation:{type:"object",description:"Metadata concerning the translation to which the document belongs",properties:{tags:{description:"Tags attached to the translation",type:"array",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the translation",additionalProperties:{type:"string"}},selectors:{type:"object",description:"Proskomma selectors for the translation that, together, provide a primary key in the translation store",additionalProperties:{type:"string"}}},additionalProperties:{type:"string"},required:["id"]},document:{type:"object",description:"Metadata concerning the document itself",properties:{tags:{type:"array",description:"Tags attached to the document",items:{type:"string"}},properties:{type:"object",description:"Key/value properties attached to the document",additionalProperties:{type:"string"}},chapters:{type:"string",pattern:"^[1-9][0-9]*(-[1-9][0-9]*)?$"}},additionalProperties:{type:"string"}}},additionalProperties:!1},hooks:{type:"array",$ref:"./hook_structure.json"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./sequence_structure.json"}},sequence:{$ref:"./sequence_structure.json"},main_sequence_id:{type:"string"}},Koe=["schema","metadata"],Xoe=!1,Yoe={required:["sequences","main_sequence_id"],not:{required:["sequence"]}},Zoe={$comment:Goe,$id:Voe,title:Hoe,description:Woe,type:Joe,properties:zoe,required:Koe,additionalProperties:Xoe,if:{properties:{schema:{type:"object",properties:{structure:{enum:["flat"]}}}}},then:Yoe,else:{required:["sequence"],allOf:[{not:{required:["sequences"]}},{not:{required:["main_sequence_id"]}}]}},Qoe="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/sequence_structure.json",eae="Sequence (Structure)",tae="A sequence contains a 'flow' of one or more blocks",rae="object",nae={type:{description:"The type of sequence",type:"string"},preview_text:{description:"An optional field to provide some kind of printable label",type:"string"},blocks:{type:"array",description:"The blocks that, together, represent the 'flow' of the sequence",items:{$ref:"./block_structure.json"}},hooks:{type:"array",$ref:"./hook_structure.json"}},uae=["type"],sae=!1,oae={$id:Qoe,title:eae,description:tae,type:rae,properties:nae,required:uae,additionalProperties:sae},aae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/block_structure.json",iae="Block (Structure)",cae="A block, which represents either a paragraph of text or a graft",lae="object",pae={type:{type:"string",description:"The type of block",enum:["paragraph","row","graft"]},subtype:{description:"A type-specific subtype",type:"string"},target:{description:"The id of the sequence containing graft content",type:"string"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{description:"If present and true, is interpreted as a request for the server to create a new graft",type:"boolean"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"}]}},content:{type:"array",description:"The content of the block",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},dae=["type"],fae=!1,Dae={required:["content"],allOf:[{not:{required:["new"]}},{not:{required:["preview_text"]}},{not:{required:["target"]}}]},hae={$id:aae,title:iae,description:cae,type:lae,properties:pae,required:dae,additionalProperties:fae,if:{properties:{type:{enum:["paragraph","row"]}}},then:Dae,else:{if:{required:["new"],properties:{new:{enum:[!0]}}},then:{allOf:[{oneOf:[{required:["subtype"]},{required:["sequence"]}]},{not:{required:["target"]}},{not:{required:["preview_text"]}},{not:{required:["content"]}}]},else:{oneOf:[{required:["target"]},{required:["sequence"]}]}}},mae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/contentElement_structure.json",Eae="Content Element (Structure)",yae="A content element, ie some form of (possibly nested) markup",vae="object",gae={type:{type:"string",description:"The type of element",enum:["mark","wrapper","start_milestone","end_milestone","graft"]},subtype:{description:"The subtype of the element, which is context-dependent",type:"string"},atts:{type:"object",description:"An object containing USFM attributes or subtype-specific additional information (such as the number of a verse or chapter). The value may be a boolean, a string or an array of strings",additionalProperties:{oneOf:[{type:"array",items:{type:"string"}},{type:"string"},{type:"boolean"},{type:"number"}]}},target:{type:"string",description:"The id of the sequence containing graft content"},sequence:{description:"The sequence containing graft content",$ref:"./sequence_structure.json"},preview_text:{description:"An optional field to provide some kind of printable label for a graft",type:"string"},new:{type:"boolean",description:"If present and true, is interpreted as a request for the server to create a new graft"},content:{type:"array",description:"Nested content within the content element",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},meta_content:{type:"array",description:"Non-Scripture content related to the content element, such as checking data or related resources",items:{oneOf:[{type:"string"},{$ref:"./contentElement_structure.json"}]}},hooks:{type:"array",$ref:"./hook_structure.json"}},Aae=["type"],Fae=!1,Cae={$id:mae,title:Eae,description:yae,type:vae,properties:gae,required:Aae,additionalProperties:Fae},bae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/structure/0_4_0/hook_structure.json",Sae="Hook (Structure)",wae="Hooks, ie typed labels that may be used to link documents",_ae="array",Bae={type:"array",items:[{type:"string",oneOf:[{enum:["bcv_ref","book_ref"]},{pattern:"^x-(app|publisher)-[a-z][a-z0-9]+-\\S{2,256}$"},{pattern:"^x-local-\\S{2,256}$"}]},{type:"string",oneOf:[{enum:["label"]},{pattern:"^\\w{1,255}$"}]}],minItems:2,maxItems:2},Tae={$id:bae,title:Sae,description:wae,type:_ae,items:Bae},$ae="version 0.3.0",Pae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_document_constraint.json",kae="object",Oae={hooks:{type:"array"},sequences:{type:"object",propertyNames:{pattern:"^\\S+$"},additionalProperties:{$ref:"./perf_sequence_constraint.json"}}},Iae={$comment:$ae,$id:Pae,type:kae,properties:Oae},Nae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_sequence_constraint.json",qae="object",xae={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./perf_block_constraint.json"}}},Rae={$id:Nae,type:qae,properties:xae},jae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_block_constraint.json",Mae="object",Lae={type:{type:"string",enum:["paragraph","graft","row","node","lookup"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}},Uae={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},Gae={$id:jae,type:Mae,properties:Lae,if:{properties:{type:{enum:["graft"]}}},then:Uae,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["row:heading","row:body"]}]}}},else:{if:{properties:{type:{enum:["node"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["node"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{id:{type:"string"},parent:{type:"string"},children:{type:"array",items:{type:"string"}}},required:["id"],additionalProperties:!1}}},else:{if:{properties:{type:{enum:["lookup"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["lookup"]},{pattern:"^x-\\S{1,256}$"}]},atts:{type:"object",properties:{primary:{type:"string"},secondary:{type:"array",items:{type:"string"}}},required:["primary"],additionalProperties:!1}}},else:{properties:{subtype:{type:"string",oneOf:[{pattern:"^usfm:"},{pattern:"^x-\\S{1,256}$"}]}}}}}}},Vae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/perf_contentElement_constraint.json",Hae="object",Wae=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./perf_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["target"]},{required:["preview_text"]}]}},else:{required:["target"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter","verses","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],Jae={$id:Vae,type:Hae,allOf:Wae},zae="version 0.3.0",Kae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_document_constraint.json",Xae="object",Yae={sequence:{$ref:"./sofria_sequence_constraint.json"}},Zae={$comment:zae,$id:Kae,type:Xae,properties:Yae},Qae="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_sequence_constraint.json",eie="object",tie={type:{type:"string",enum:["main","introduction","intro_title","intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv","footnote","note_caller","xref","pub_number","alt_number","esb_cat","fig","temp"]},blocks:{type:"array",items:{$ref:"./sofria_block_constraint.json"}}},rie={$id:Qae,type:eie,properties:tie},nie="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_block_constraint.json",uie="object",sie={type:{type:"string",enum:["paragraph","graft","row"]},content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}},oie={properties:{subtype:{enum:["introduction","intro_title","Intro_end_title","title","end_title","heading","remark","sidebar","table","tree","kv"]}}},aie={$id:nie,type:uie,properties:sie,if:{properties:{type:{enum:["graft"]}}},then:oie,else:{if:{properties:{type:{enum:["row"]}}},then:{properties:{subtype:{type:"string",enum:["usfm:tr","pk"]}}},else:{properties:{subtype:{type:"string",pattern:"^usfm:"}}}}},iie="https://github.com/Proskomma/proskomma-json-tools/tree/main/src/schema/constraint/0_4_0/sofria_contentElement_constraint.json",cie="object",lie=[{properties:{content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}},meta_content:{type:"array",items:{oneOf:[{type:"string"},{$ref:"./sofria_contentElement_constraint.json"}]}}}},{if:{properties:{type:{enum:["graft"]}}},then:{properties:{subtype:{enum:["footnote","xref","note_caller"]}},allOf:[{not:{required:["content"]}},{not:{required:["meta_content"]}}],if:{required:["new"],properties:{new:{enum:[!0]}}},then:{not:{anyOf:[{required:["blocks"]},{required:["preview_text"]}]}},else:{required:["sequence"]}}},{if:{properties:{type:{enum:["mark"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["chapter_label","verses_label","alt_chapter","alt_verse","pub_chapter","pub_verse"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["chapter","verses"]}}},then:{type:"object",required:["atts"],properties:{atts:{type:"object",required:["number"],maxProperties:1}}}}},{if:{properties:{type:{enum:["wrapper"]}}},then:{properties:{subtype:{type:"string",oneOf:[{enum:["meta_content","chapter","verses","cell"]},{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},if:{properties:{subtype:{enum:["meta_content"]}}},then:{not:{required:["atts"]}}}},{if:{properties:{type:{enum:["start_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}}}},{if:{properties:{type:{enum:["end_milestone"]}}},then:{properties:{subtype:{type:"string",oneOf:[{pattern:"^[A-Za-z][A-Za-z0-9]*:\\S+$"},{pattern:"^x-\\S+$"}]}},not:{required:["atts"]}}}],pie={$id:iie,type:cie,allOf:lie};var mt=zne,die=rue,xf=due,ko=gue,Oo=Tue,Io=xue,fie=Uue,Qg=Wue,eA=Yue,tA=tse,Die=ose,rA=lse,nA=hse,uA=vse,Rf=Tse,No=xse,qo=Wse,xo=eoe,Mn=ooe,hie=poe,sA=hoe,oA=goe,aA=boe,mie=Toe,iA=Ooe,cA=Roe,lA=Uoe,jf=Zoe,Ro=oae,jo=hae,Mo=Cae,Ln=Tae,Eie=Iae,pA=Rae,dA=Gae,fA=Jae,yie=Zae,DA=rie,hA=aie,mA=pie;let vie=class{constructor(){this.schema={structure:{},constraint:{},proskomma:{}};for(var[t,r]of[["succinct",{"0.2.0":[{name:"Proskomma Serialized Succinct",validator:new mt().compile(die)}]}]])this.schema.proskomma[t]=r;for(var[n,u]of[["document",{"0.2.1":[{name:"Document Structure",validator:new mt().addSchema(Io).addSchema(Oo).addSchema(ko).compile(xf)}],"0.3.0":[{name:"Document Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).addSchema(No).compile(Rf)}],"0.4.0":[{name:"Document Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(jf)}]}],["sequence",{"0.2.1":[{name:"Sequence Structure",validator:new mt().addSchema(Io).addSchema(Oo).compile(ko)}],"0.3.0":[{name:"Sequence Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).compile(No)}],"0.4.0":[{name:"Sequence Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).compile(Ro)}]}]])this.schema.structure[n]=u;for(var[s,o]of[["perfDocument",{"0.2.1":[{name:"Document Structure",validator:new mt().addSchema(Io).addSchema(Oo).addSchema(ko).compile(xf)},{name:"PERF Document",validator:new mt().addSchema(tA).addSchema(eA).addSchema(Qg).compile(fie)}],"0.3.0":[{name:"Document Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).addSchema(No).compile(Rf)},{name:"PERF Document",validator:new mt().addSchema(Mn).addSchema(aA).addSchema(oA).addSchema(sA).compile(hie)}],"0.4.0":[{name:"Document Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(jf)},{name:"PERF Document",validator:new mt().addSchema(Ln).addSchema(fA).addSchema(dA).addSchema(pA).compile(Eie)}]}],["perfSequence",{"0.2.1":[{name:"Sequence Structure",validator:new mt().addSchema(Io).addSchema(Oo).compile(ko)},{name:"PERF Sequence",validator:new mt().addSchema(tA).addSchema(eA).compile(Qg)}],"0.3.0":[{name:"Sequence Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).compile(No)},{name:"PERF Sequence",validator:new mt().addSchema(Mn).addSchema(aA).addSchema(oA).compile(sA)}],"0.4.0":[{name:"Sequence Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).compile(Ro)},{name:"PERF Sequence",validator:new mt().addSchema(Ln).addSchema(fA).addSchema(dA).compile(pA)}]}],["sofriaDocument",{"0.2.1":[{name:"Document Structure",validator:new mt().addSchema(Io).addSchema(Oo).addSchema(ko).compile(xf)},{name:"SOFRIA Document",validator:new mt().addSchema(uA).addSchema(nA).addSchema(rA).compile(Die)}],"0.3.0":[{name:"Document Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).addSchema(No).compile(Rf)},{name:"SOFRIA Document",validator:new mt().addSchema(Mn).addSchema(lA).addSchema(cA).addSchema(iA).compile(mie)}],"0.4.0":[{name:"Document Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).addSchema(Ro).compile(jf)},{name:"SOFRIA Document",validator:new mt().addSchema(Ln).addSchema(mA).addSchema(hA).addSchema(DA).compile(yie)}]}],["sofriaSequence",{"0.2.1":[{name:"Sequence Structure",validator:new mt().addSchema(Io).addSchema(Oo).compile(ko)},{name:"SOFRIA Sequence",validator:new mt().addSchema(uA).addSchema(nA).compile(rA)}],"0.3.0":[{name:"Sequence Structure",validator:new mt().addSchema(Mn).addSchema(xo).addSchema(qo).compile(No)},{name:"SOFRIA Sequence",validator:new mt().addSchema(Mn).addSchema(lA).addSchema(cA).compile(iA)}],"0.4.0":[{name:"Sequence Structure",validator:new mt().addSchema(Ln).addSchema(Mo).addSchema(jo).compile(Ro)},{name:"SOFRIA Sequence",validator:new mt().addSchema(Ln).addSchema(mA).addSchema(hA).compile(DA)}]}]])this.schema.constraint[s]=o}schemaInfo(){var t={};for(var[r,n]of Object.entries(this.schema)){t[r]={};for(var[u,s]of Object.entries(n)){t[r][u]={};for(var[o,a]of Object.entries(s))t[r][u][o]=a.map(i=>i.name)}}return t}validate(t,r,n,u){if(u===void 0)throw new Error("data argument is missing. Usage: validate(schemaType, schemaKey, schemaVersion, data)");if(u===null)throw new Error("Data argument is null");var s=Object.keys(this.schema);if(!s.includes(t))throw new Error("Schema type must be one of ".concat(s.map(l=>"'".concat(l,"'")).join(", "),", not '").concat(t,"'"));if(!this.schema[t][r])throw new Error("Unknown ".concat(t," schema key ").concat(r));if(!this.schema[t][r][n])throw new Error("Unknown version ".concat(n," for ").concat(t," schema key ").concat(r));var o=this.schema[t][r][n],a;for(var{name:i,validator:c}of o)if(a={validatorName:i,isValid:c(u),errors:c.errors},!a.isValid)break;return{requested:{schemaType:t,schemaKey:r,schemaVersion:n},lastSchema:a.validatorName,isValid:a.isValid,errors:a.errors}}};var gie=vie,Aie=["qs","qac","litl","lik","liv","fr","fq","fqa","fk","fl","fw","fp","fv","ft","fdc","fm","xo","xk","xq","xt","xta","xop","xot","xnt","xdc","rq","add","bk","dc","k","nd","ord","pn","png","qt","sig","sls","tl","wj","em","bd","it","bdit","no","sc","sup","ior","iqt","th","thr","tc","tcr"],Fie=["ms","mr","s","sr","r","qa","sp","sd"],Cie=["cd","p","m","po","pr","cls","pmo","pm","pmc","pmr","pi","mi","nb","pc","ph","b","q","qr","qc","qa","qm","qd","lh","li","lf","lim","d"],bie=["imt","is","imte"],Sie=["ip","ipi","im","imi","ipq","imq","ipr","iq","ib","ili","iot","io","iex"],wie={characterTags:Aie,bodyTags:Cie,headingTags:Fie,introHeadingTags:bie,introBodyTags:Sie},Ih={exports:{}},aw={exports:{}},Mf,EA;function hr(){if(EA)return Mf;EA=1;var e=function(t){return t&&t.Math===Math&&t};return Mf=e(typeof globalThis=="object"&&globalThis)||e(typeof window=="object"&&window)||e(typeof self=="object"&&self)||e(typeof Ce=="object"&&Ce)||e(typeof Ce=="object"&&Ce)||function(){return this}()||Function("return this")(),Mf}var Zt=function(e){try{return!!e()}catch{return!0}},_ie=Zt,fd=!_ie(function(){var e=(function(){}).bind();return typeof e!="function"||e.hasOwnProperty("prototype")}),Bie=fd,iw=Function.prototype,yA=iw.apply,vA=iw.call,cw=typeof Reflect=="object"&&Reflect.apply||(Bie?vA.bind(yA):function(){return vA.apply(yA,arguments)}),Lf,gA;function Jt(){if(gA)return Lf;gA=1;var e=fd,t=Function.prototype,r=t.call,n=e&&t.bind.bind(r,r);return Lf=e?n:function(u){return function(){return r.apply(u,arguments)}},Lf}var Uf,AA;function uo(){if(AA)return Uf;AA=1;var e=Jt(),t=e({}.toString),r=e("".slice);return Uf=function(n){return r(t(n),8,-1)},Uf}var Tie=uo(),$ie=Jt(),C3=function(e){if(Tie(e)==="Function")return $ie(e)},Gf,FA;function vr(){if(FA)return Gf;FA=1;var e=typeof document=="object"&&document.all;return Gf=typeof e>"u"&&e!==void 0?function(t){return typeof t=="function"||t===e}:function(t){return typeof t=="function"},Gf}var b3={},Pie=Zt,Kr=!Pie(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}),kie=fd,dl=Function.prototype.call,In=kie?dl.bind(dl):function(){return dl.apply(dl,arguments)},S3={},lw={}.propertyIsEnumerable,pw=Object.getOwnPropertyDescriptor,Oie=pw&&!lw.call({1:2},1);S3.f=Oie?function(t){var r=pw(this,t);return!!r&&r.enumerable}:lw;var dc=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}},Vf,CA;function w3(){if(CA)return Vf;CA=1;var e=Jt(),t=Zt,r=uo(),n=Object,u=e("".split);return Vf=t(function(){return!n("z").propertyIsEnumerable(0)})?function(s){return r(s)==="String"?u(s,""):n(s)}:n,Vf}var Hf,bA;function _3(){return bA||(bA=1,Hf=function(e){return e==null}),Hf}var Wf,SA;function fc(){if(SA)return Wf;SA=1;var e=_3(),t=TypeError;return Wf=function(r){if(e(r))throw new t("Can't call method on "+r);return r},Wf}var Jf,wA;function fs(){if(wA)return Jf;wA=1;var e=w3(),t=fc();return Jf=function(r){return e(t(r))},Jf}var zf,_A;function Nn(){if(_A)return zf;_A=1;var e=vr();return zf=function(t){return typeof t=="object"?t!==null:e(t)},zf}var uu={},Kf,BA;function ku(){if(BA)return Kf;BA=1;var e=uu,t=hr(),r=vr(),n=function(u){return r(u)?u:void 0};return Kf=function(u,s){return arguments.length<2?n(e[u])||n(t[u]):e[u]&&e[u][s]||t[u]&&t[u][s]},Kf}var Xf,TA;function cn(){if(TA)return Xf;TA=1;var e=Jt();return Xf=e({}.isPrototypeOf),Xf}var Yf,$A;function Dc(){if($A)return Yf;$A=1;var e=hr(),t=e.navigator,r=t&&t.userAgent;return Yf=r?String(r):"",Yf}var Zf,PA;function hc(){if(PA)return Zf;PA=1;var e=hr(),t=Dc(),r=e.process,n=e.Deno,u=r&&r.versions||n&&n.version,s=u&&u.v8,o,a;return s&&(o=s.split("."),a=o[0]>0&&o[0]<4?1:+(o[0]+o[1])),!a&&t&&(o=t.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=t.match(/Chrome\/(\d+)/),o&&(a=+o[1]))),Zf=a,Zf}var Qf,kA;function Pa(){if(kA)return Qf;kA=1;var e=hc(),t=Zt,r=hr(),n=r.String;return Qf=!!Object.getOwnPropertySymbols&&!t(function(){var u=Symbol("symbol detection");return!n(u)||!(Object(u)instanceof Symbol)||!Symbol.sham&&e&&e<41}),Qf}var e1,OA;function dw(){if(OA)return e1;OA=1;var e=Pa();return e1=e&&!Symbol.sham&&typeof Symbol.iterator=="symbol",e1}var Iie=ku(),Nie=vr(),qie=cn(),xie=dw(),Rie=Object,mc=xie?function(e){return typeof e=="symbol"}:function(e){var t=Iie("Symbol");return Nie(t)&&qie(t.prototype,Rie(e))},t1,IA;function Dd(){if(IA)return t1;IA=1;var e=String;return t1=function(t){try{return e(t)}catch{return"Object"}},t1}var jie=vr(),Mie=Dd(),Lie=TypeError,ka=function(e){if(jie(e))return e;throw new Lie(Mie(e)+" is not a function")},Uie=ka,Gie=_3(),B3=function(e,t){var r=e[t];return Gie(r)?void 0:Uie(r)},r1=In,n1=vr(),u1=Nn(),Vie=TypeError,Hie=function(e,t){var r,n;if(t==="string"&&n1(r=e.toString)&&!u1(n=r1(r,e))||n1(r=e.valueOf)&&!u1(n=r1(r,e))||t!=="string"&&n1(r=e.toString)&&!u1(n=r1(r,e)))return n;throw new Vie("Can't convert object to primitive value")},fw={exports:{}},s1,NA;function Ec(){return NA||(NA=1,s1=!0),s1}var qA=hr(),Wie=Object.defineProperty,Jie=function(e,t){try{Wie(qA,e,{value:t,configurable:!0,writable:!0})}catch{qA[e]=t}return t},zie=Ec(),Kie=hr(),Xie=Jie,xA="__core-js_shared__",RA=fw.exports=Kie[xA]||Xie(xA,{});(RA.versions||(RA.versions=[])).push({version:"3.38.1",mode:zie?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.38.1/LICENSE",source:"https://github.com/zloirock/core-js"});var T3=fw.exports,o1,jA;function Oa(){if(jA)return o1;jA=1;var e=T3;return o1=function(t,r){return e[t]||(e[t]=r||{})},o1}var a1,MA;function Ou(){if(MA)return a1;MA=1;var e=fc(),t=Object;return a1=function(r){return t(e(r))},a1}var i1,LA;function Mr(){if(LA)return i1;LA=1;var e=Jt(),t=Ou(),r=e({}.hasOwnProperty);return i1=Object.hasOwn||function(u,s){return r(t(u),s)},i1}var c1,UA;function $3(){if(UA)return c1;UA=1;var e=Jt(),t=0,r=Math.random(),n=e(1 .toString);return c1=function(u){return"Symbol("+(u===void 0?"":u)+")_"+n(++t+r,36)},c1}var l1,GA;function ar(){if(GA)return l1;GA=1;var e=hr(),t=Oa(),r=Mr(),n=$3(),u=Pa(),s=dw(),o=e.Symbol,a=t("wks"),i=s?o.for||o:o&&o.withoutSetter||n;return l1=function(c){return r(a,c)||(a[c]=u&&r(o,c)?o[c]:i("Symbol."+c)),a[c]},l1}var Yie=In,VA=Nn(),HA=mc,Zie=B3,Qie=Hie,ece=ar(),tce=TypeError,rce=ece("toPrimitive"),nce=function(e,t){if(!VA(e)||HA(e))return e;var r=Zie(e,rce),n;if(r){if(t===void 0&&(t="default"),n=Yie(r,e,t),!VA(n)||HA(n))return n;throw new tce("Can't convert object to primitive value")}return t===void 0&&(t="number"),Qie(e,t)},uce=nce,sce=mc,P3=function(e){var t=uce(e,"string");return sce(t)?t:t+""},oce=hr(),WA=Nn(),Nh=oce.document,ace=WA(Nh)&&WA(Nh.createElement),Dw=function(e){return ace?Nh.createElement(e):{}},ice=Kr,cce=Zt,lce=Dw,hw=!ice&&!cce(function(){return Object.defineProperty(lce("div"),"a",{get:function(){return 7}}).a!==7}),pce=Kr,dce=In,fce=S3,Dce=dc,hce=fs(),mce=P3,Ece=Mr(),yce=hw,JA=Object.getOwnPropertyDescriptor;b3.f=pce?JA:function(t,r){if(t=hce(t),r=mce(r),yce)try{return JA(t,r)}catch{}if(Ece(t,r))return Dce(!dce(fce.f,t,r),t[r])};var vce=Zt,gce=vr(),Ace=/#|\.prototype\./,yc=function(e,t){var r=Cce[Fce(e)];return r===Sce?!0:r===bce?!1:gce(t)?vce(t):!!t},Fce=yc.normalize=function(e){return String(e).replace(Ace,".").toLowerCase()},Cce=yc.data={},bce=yc.NATIVE="N",Sce=yc.POLYFILL="P",wce=yc,zA=C3,_ce=ka,Bce=fd,Tce=zA(zA.bind),k3=function(e,t){return _ce(e),t===void 0?e:Bce?Tce(e,t):function(){return e.apply(t,arguments)}},qn={},$ce=Kr,Pce=Zt,mw=$ce&&Pce(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42}),kce=Nn(),Oce=String,Ice=TypeError,Ds=function(e){if(kce(e))return e;throw new Ice(Oce(e)+" is not an object")},Nce=Kr,qce=hw,xce=mw,fl=Ds,KA=P3,Rce=TypeError,p1=Object.defineProperty,jce=Object.getOwnPropertyDescriptor,d1="enumerable",f1="configurable",D1="writable";qn.f=Nce?xce?function(t,r,n){if(fl(t),r=KA(r),fl(n),typeof t=="function"&&r==="prototype"&&"value"in n&&D1 in n&&!n[D1]){var u=jce(t,r);u&&u[D1]&&(t[r]=n.value,n={configurable:f1 in n?n[f1]:u[f1],enumerable:d1 in n?n[d1]:u[d1],writable:!1})}return p1(t,r,n)}:p1:function(t,r,n){if(fl(t),r=KA(r),fl(n),qce)try{return p1(t,r,n)}catch{}if("get"in n||"set"in n)throw new Rce("Accessors not supported");return"value"in n&&(t[r]=n.value),t};var Mce=Kr,Lce=qn,Uce=dc,vc=Mce?function(e,t,r){return Lce.f(e,t,Uce(1,r))}:function(e,t,r){return e[t]=r,e},Ka=hr(),Gce=cw,Vce=C3,Hce=vr(),Wce=b3.f,Jce=wce,Lo=uu,zce=k3,Uo=vc,XA=Mr(),Kce=function(e){var t=function(r,n,u){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,u)}return Gce(e,this,arguments)};return t.prototype=e.prototype,t},xt=function(e,t){var r=e.target,n=e.global,u=e.stat,s=e.proto,o=n?Ka:u?Ka[r]:Ka[r]&&Ka[r].prototype,a=n?Lo:Lo[r]||Uo(Lo,r,{})[r],i=a.prototype,c,l,p,d,f,h,y,A,m;for(d in t)c=Jce(n?d:r+(u?".":"#")+d,e.forced),l=!c&&o&&XA(o,d),h=a[d],l&&(e.dontCallGetSet?(m=Wce(o,d),y=m&&m.value):y=o[d]),f=l&&y?y:t[d],!(!c&&!s&&typeof h==typeof f)&&(e.bind&&l?A=zce(f,Ka):e.wrap&&l?A=Kce(f):s&&Hce(f)?A=Vce(f):A=f,(e.sham||f&&f.sham||h&&h.sham)&&Uo(A,"sham",!0),Uo(a,d,A),s&&(p=r+"Prototype",XA(Lo,p)||Uo(Lo,p,{}),Uo(Lo[p],d,f),e.real&&i&&(c||!i[d])&&Uo(i,d,f)))},Xce=xt,Yce=Kr,YA=qn.f;Xce({target:"Object",stat:!0,forced:Object.defineProperty!==YA,sham:!Yce},{defineProperty:YA});var Zce=uu,Ew=Zce.Object,Qce=aw.exports=function(t,r,n){return Ew.defineProperty(t,r,n)};Ew.defineProperty.sham&&(Qce.sham=!0);var ele=aw.exports,tle=ele,rle=tle,hs=rle,yw={exports:{}};(function(e){function t(r){return r&&r.__esModule?r:{default:r}}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports})(yw);var ms=yw.exports,Dl={exports:{}},ZA={},h1,QA;function Ia(){if(QA)return h1;QA=1;var e=uo();return h1=Array.isArray||function(r){return e(r)==="Array"},h1}var m1,eF;function O3(){if(eF)return m1;eF=1;var e=ar(),t=e("toStringTag"),r={};return r[t]="z",m1=String(r)==="[object z]",m1}var E1,tF;function gc(){if(tF)return E1;tF=1;var e=O3(),t=vr(),r=uo(),n=ar(),u=n("toStringTag"),s=Object,o=r(function(){return arguments}())==="Arguments",a=function(i,c){try{return i[c]}catch{}};return E1=e?r:function(i){var c,l,p;return i===void 0?"Undefined":i===null?"Null":typeof(l=a(c=s(i),u))=="string"?l:o?r(c):(p=r(c))==="Object"&&t(c.callee)?"Arguments":p},E1}var y1,rF;function nle(){if(rF)return y1;rF=1;var e=Jt(),t=vr(),r=T3,n=e(Function.toString);return t(r.inspectSource)||(r.inspectSource=function(u){return n(u)}),y1=r.inspectSource,y1}var v1,nF;function I3(){if(nF)return v1;nF=1;var e=Jt(),t=Zt,r=vr(),n=gc(),u=ku(),s=nle(),o=function(){},a=u("Reflect","construct"),i=/^\s*(?:class|function)\b/,c=e(i.exec),l=!i.test(o),p=function(h){if(!r(h))return!1;try{return a(o,[],h),!0}catch{return!1}},d=function(h){if(!r(h))return!1;switch(n(h)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return l||!!c(i,s(h))}catch{return!0}};return d.sham=!0,v1=!a||t(function(){var f;return p(p.call)||!p(Object)||!p(function(){f=!0})||f})?d:p,v1}var g1,uF;function ule(){if(uF)return g1;uF=1;var e=Math.ceil,t=Math.floor;return g1=Math.trunc||function(n){var u=+n;return(u>0?t:e)(u)},g1}var A1,sF;function N3(){if(sF)return A1;sF=1;var e=ule();return A1=function(t){var r=+t;return r!==r||r===0?0:e(r)},A1}var F1,oF;function vw(){if(oF)return F1;oF=1;var e=N3(),t=Math.max,r=Math.min;return F1=function(n,u){var s=e(n);return s<0?t(s+u,0):r(s,u)},F1}var C1,aF;function sle(){if(aF)return C1;aF=1;var e=N3(),t=Math.min;return C1=function(r){var n=e(r);return n>0?t(n,9007199254740991):0},C1}var b1,iF;function Es(){if(iF)return b1;iF=1;var e=sle();return b1=function(t){return e(t.length)},b1}var S1,cF;function q3(){if(cF)return S1;cF=1;var e=Kr,t=qn,r=dc;return S1=function(n,u,s){e?t.f(n,u,r(0,s)):n[u]=s},S1}var w1,lF;function x3(){if(lF)return w1;lF=1;var e=Zt,t=ar(),r=hc(),n=t("species");return w1=function(u){return r>=51||!e(function(){var s=[],o=s.constructor={};return o[n]=function(){return{foo:1}},s[u](Boolean).foo!==1})},w1}var _1,pF;function hd(){if(pF)return _1;pF=1;var e=Jt();return _1=e([].slice),_1}var dF;function ole(){if(dF)return ZA;dF=1;var e=xt,t=Ia(),r=I3(),n=Nn(),u=vw(),s=Es(),o=fs(),a=q3(),i=ar(),c=x3(),l=hd(),p=c("slice"),d=i("species"),f=Array,h=Math.max;return e({target:"Array",proto:!0,forced:!p},{slice:function(A,m){var v=o(this),C=s(v),B=u(A,C),T=u(m===void 0?C:m,C),N,R,J;if(t(v)&&(N=v.constructor,r(N)&&(N===f||t(N.prototype))?N=void 0:n(N)&&(N=N[d],N===null&&(N=void 0)),N===f||N===void 0))return l(v,B,T);for(R=new(N===void 0?f:N)(h(T-B,0)),J=0;B=f?i?"":void 0:(h=s(p,d),h<55296||h>56319||d+1===f||(y=s(p,d+1))<56320||y>57343?i?u(p,d):h:i?o(p,d,d+2):(h-55296<<10)+(y-56320)+65536)}};return I1={codeAt:a(!1),charAt:a(!0)},I1}var N1,AF;function lle(){if(AF)return N1;AF=1;var e=hr(),t=vr(),r=e.WeakMap;return N1=t(r)&&/native code/.test(String(r)),N1}var q1,FF;function md(){if(FF)return q1;FF=1;var e=Oa(),t=$3(),r=e("keys");return q1=function(n){return r[n]||(r[n]=t(n))},q1}var x1,CF;function Ed(){return CF||(CF=1,x1={}),x1}var R1,bF;function R3(){if(bF)return R1;bF=1;var e=lle(),t=hr(),r=Nn(),n=vc,u=Mr(),s=T3,o=md(),a=Ed(),i="Object already initialized",c=t.TypeError,l=t.WeakMap,p,d,f,h=function(v){return f(v)?d(v):p(v,{})},y=function(v){return function(C){var B;if(!r(C)||(B=d(C)).type!==v)throw new c("Incompatible receiver, "+v+" required");return B}};if(e||s.state){var A=s.state||(s.state=new l);A.get=A.get,A.has=A.has,A.set=A.set,p=function(v,C){if(A.has(v))throw new c(i);return C.facade=v,A.set(v,C),C},d=function(v){return A.get(v)||{}},f=function(v){return A.has(v)}}else{var m=o("state");a[m]=!0,p=function(v,C){if(u(v,m))throw new c(i);return C.facade=v,n(v,m,C),C},d=function(v){return u(v,m)?v[m]:{}},f=function(v){return u(v,m)}}return R1={set:p,get:d,has:f,enforce:h,getterFor:y},R1}var j1,SF;function ple(){if(SF)return j1;SF=1;var e=Kr,t=Mr(),r=Function.prototype,n=e&&Object.getOwnPropertyDescriptor,u=t(r,"name"),s=u&&(function(){}).name==="something",o=u&&(!e||e&&n(r,"name").configurable);return j1={EXISTS:u,PROPER:s,CONFIGURABLE:o},j1}var M1={},L1,wF;function Aw(){if(wF)return L1;wF=1;var e=fs(),t=vw(),r=Es(),n=function(u){return function(s,o,a){var i=e(s),c=r(i);if(c===0)return!u&&-1;var l=t(a,c),p;if(u&&o!==o){for(;c>l;)if(p=i[l++],p!==p)return!0}else for(;c>l;l++)if((u||l in i)&&i[l]===o)return u||l||0;return!u&&-1}};return L1={includes:n(!0),indexOf:n(!1)},L1}var U1,_F;function Fw(){if(_F)return U1;_F=1;var e=Jt(),t=Mr(),r=fs(),n=Aw().indexOf,u=Ed(),s=e([].push);return U1=function(o,a){var i=r(o),c=0,l=[],p;for(p in i)!t(u,p)&&t(i,p)&&s(l,p);for(;a.length>c;)t(i,p=a[c++])&&(~n(l,p)||s(l,p));return l},U1}var G1,BF;function j3(){return BF||(BF=1,G1=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]),G1}var V1,TF;function Cw(){if(TF)return V1;TF=1;var e=Fw(),t=j3();return V1=Object.keys||function(n){return e(n,t)},V1}var $F;function bw(){if($F)return M1;$F=1;var e=Kr,t=mw,r=qn,n=Ds,u=fs(),s=Cw();return M1.f=e&&!t?Object.defineProperties:function(a,i){n(a);for(var c=u(i),l=s(i),p=l.length,d=0,f;p>d;)r.f(a,f=l[d++],c[f]);return a},M1}var H1,PF;function dle(){if(PF)return H1;PF=1;var e=ku();return H1=e("document","documentElement"),H1}var W1,kF;function yd(){if(kF)return W1;kF=1;var e=Ds,t=bw(),r=j3(),n=Ed(),u=dle(),s=Dw,o=md(),a=">",i="<",c="prototype",l="script",p=o("IE_PROTO"),d=function(){},f=function(v){return i+l+a+v+i+"/"+l+a},h=function(v){v.write(f("")),v.close();var C=v.parentWindow.Object;return v=null,C},y=function(){var v=s("iframe"),C="java"+l+":",B;return v.style.display="none",u.appendChild(v),v.src=String(C),B=v.contentWindow.document,B.open(),B.write(f("document.F=Object")),B.close(),B.F},A,m=function(){try{A=new ActiveXObject("htmlfile")}catch{}m=typeof document<"u"?document.domain&&A?h(A):y():h(A);for(var v=r.length;v--;)delete m[c][r[v]];return m()};return n[p]=!0,W1=Object.create||function(C,B){var T;return C!==null?(d[c]=e(C),T=new d,d[c]=null,T[p]=C):T=m(),B===void 0?T:t.f(T,B)},W1}var J1,OF;function fle(){if(OF)return J1;OF=1;var e=Zt;return J1=!e(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}),J1}var z1,IF;function Sw(){if(IF)return z1;IF=1;var e=Mr(),t=vr(),r=Ou(),n=md(),u=fle(),s=n("IE_PROTO"),o=Object,a=o.prototype;return z1=u?o.getPrototypeOf:function(i){var c=r(i);if(e(c,s))return c[s];var l=c.constructor;return t(l)&&c instanceof l?l.prototype:c instanceof o?a:null},z1}var K1,NF;function vd(){if(NF)return K1;NF=1;var e=vc;return K1=function(t,r,n,u){return u&&u.enumerable?t[r]=n:e(t,r,n),t},K1}var X1,qF;function ww(){if(qF)return X1;qF=1;var e=Zt,t=vr(),r=Nn(),n=yd(),u=Sw(),s=vd(),o=ar(),a=Ec(),i=o("iterator"),c=!1,l,p,d;[].keys&&(d=[].keys(),"next"in d?(p=u(u(d)),p!==Object.prototype&&(l=p)):c=!0);var f=!r(l)||e(function(){var h={};return l[i].call(h)!==h});return f?l={}:a&&(l=n(l)),t(l[i])||s(l,i,function(){return this}),X1={IteratorPrototype:l,BUGGY_SAFARI_ITERATORS:c},X1}var Y1,xF;function Dle(){if(xF)return Y1;xF=1;var e=O3(),t=gc();return Y1=e?{}.toString:function(){return"[object "+t(this)+"]"},Y1}var Z1,RF;function Na(){if(RF)return Z1;RF=1;var e=O3(),t=qn.f,r=vc,n=Mr(),u=Dle(),s=ar(),o=s("toStringTag");return Z1=function(a,i,c,l){var p=c?a:a&&a.prototype;p&&(n(p,o)||t(p,o,{configurable:!0,value:i}),l&&!e&&r(p,"toString",u))},Z1}var Q1,jF;function qa(){return jF||(jF=1,Q1={}),Q1}var e0,MF;function hle(){if(MF)return e0;MF=1;var e=ww().IteratorPrototype,t=yd(),r=dc,n=Na(),u=qa(),s=function(){return this};return e0=function(o,a,i,c){var l=a+" Iterator";return o.prototype=t(e,{next:r(+!c,i)}),n(o,l,!1,!0),u[l]=s,o},e0}var t0,LF;function mle(){if(LF)return t0;LF=1;var e=Jt(),t=ka;return t0=function(r,n,u){try{return e(t(Object.getOwnPropertyDescriptor(r,n)[u]))}catch{}},t0}var r0,UF;function Ele(){if(UF)return r0;UF=1;var e=Nn();return r0=function(t){return e(t)||t===null},r0}var n0,GF;function yle(){if(GF)return n0;GF=1;var e=Ele(),t=String,r=TypeError;return n0=function(n){if(e(n))return n;throw new r("Can't set "+t(n)+" as a prototype")},n0}var u0,VF;function vle(){if(VF)return u0;VF=1;var e=mle(),t=Nn(),r=fc(),n=yle();return u0=Object.setPrototypeOf||("__proto__"in{}?function(){var u=!1,s={},o;try{o=e(Object.prototype,"__proto__","set"),o(s,[]),u=s instanceof Array}catch{}return function(i,c){return r(i),n(c),t(i)&&(u?o(i,c):i.__proto__=c),i}}():void 0),u0}var s0,HF;function _w(){if(HF)return s0;HF=1;var e=xt,t=In,r=Ec(),n=ple(),u=vr(),s=hle(),o=Sw(),a=vle(),i=Na(),c=vc,l=vd(),p=ar(),d=qa(),f=ww(),h=n.PROPER,y=n.CONFIGURABLE,A=f.IteratorPrototype,m=f.BUGGY_SAFARI_ITERATORS,v=p("iterator"),C="keys",B="values",T="entries",N=function(){return this};return s0=function(R,J,q,G,ee,K,ue){s(q,J,G);var oe=function(D){if(D===ee&&pe)return pe;if(!m&&D&&D in fe)return fe[D];switch(D){case C:return function(){return new q(this,D)};case B:return function(){return new q(this,D)};case T:return function(){return new q(this,D)}}return function(){return new q(this)}},de=J+" Iterator",he=!1,fe=R.prototype,ge=fe[v]||fe["@@iterator"]||ee&&fe[ee],pe=!m&&ge||oe(ee),z=J==="Array"&&fe.entries||ge,O,E,F;if(z&&(O=o(z.call(new R)),O!==Object.prototype&&O.next&&(!r&&o(O)!==A&&(a?a(O,A):u(O[v])||l(O,v,N)),i(O,de,!0,!0),r&&(d[de]=N))),h&&ee===B&&ge&&ge.name!==B&&(!r&&y?c(fe,"name",B):(he=!0,pe=function(){return t(ge,this)})),ee)if(E={values:oe(B),keys:K?pe:oe(C),entries:oe(T)},ue)for(F in E)(m||he||!(F in fe))&&l(fe,F,E[F]);else e({target:J,proto:!0,forced:m||he},E);return(!r||ue)&&fe[v]!==pe&&l(fe,v,pe,{name:ee}),d[J]=pe,E},s0}var o0,WF;function Bw(){return WF||(WF=1,o0=function(e,t){return{value:e,done:t}}),o0}var JF;function Tw(){if(JF)return yF;JF=1;var e=cle().charAt,t=vs(),r=R3(),n=_w(),u=Bw(),s="String Iterator",o=r.set,a=r.getterFor(s);return n(String,"String",function(i){o(this,{type:s,string:t(i),index:0})},function(){var c=a(this),l=c.string,p=c.index,d;return p>=l.length?u(void 0,!0):(d=e(l,p),c.index+=d.length,u(d,!1))}),yF}var zF={},a0,KF;function gle(){if(KF)return a0;KF=1;var e=In,t=Ds,r=B3;return a0=function(n,u,s){var o,a;t(n);try{if(o=r(n,"return"),!o){if(u==="throw")throw s;return s}o=e(o,n)}catch(i){a=!0,o=i}if(u==="throw")throw s;if(a)throw o;return t(o),s},a0}var i0,XF;function Ale(){if(XF)return i0;XF=1;var e=Ds,t=gle();return i0=function(r,n,u,s){try{return s?n(e(u)[0],u[1]):n(u)}catch(o){t(r,"throw",o)}},i0}var c0,YF;function Fle(){if(YF)return c0;YF=1;var e=ar(),t=qa(),r=e("iterator"),n=Array.prototype;return c0=function(u){return u!==void 0&&(t.Array===u||n[r]===u)},c0}var l0,ZF;function M3(){if(ZF)return l0;ZF=1;var e=gc(),t=B3,r=_3(),n=qa(),u=ar(),s=u("iterator");return l0=function(o){if(!r(o))return t(o,s)||t(o,"@@iterator")||n[e(o)]},l0}var p0,QF;function Cle(){if(QF)return p0;QF=1;var e=In,t=ka,r=Ds,n=Dd(),u=M3(),s=TypeError;return p0=function(o,a){var i=arguments.length<2?u(o):a;if(t(i))return r(e(i,o));throw new s(n(o)+" is not iterable")},p0}var d0,eC;function ble(){if(eC)return d0;eC=1;var e=k3,t=In,r=Ou(),n=Ale(),u=Fle(),s=I3(),o=Es(),a=q3(),i=Cle(),c=M3(),l=Array;return d0=function(d){var f=r(d),h=s(this),y=arguments.length,A=y>1?arguments[1]:void 0,m=A!==void 0;m&&(A=e(A,y>2?arguments[2]:void 0));var v=c(f),C=0,B,T,N,R,J,q;if(v&&!(this===l&&u(v)))for(T=h?new this:[],R=i(f,v),J=R.next;!(N=t(J,R)).done;C++)q=m?n(R,A,[N.value,C],!0):N.value,a(T,C,q);else for(B=o(f),T=h?new this(B):l(B);B>C;C++)q=m?A(f[C],C):f[C],a(T,C,q);return T.length=C,T},d0}var f0,tC;function Sle(){if(tC)return f0;tC=1;var e=ar(),t=e("iterator"),r=!1;try{var n=0,u={next:function(){return{done:!!n++}},return:function(){r=!0}};u[t]=function(){return this},Array.from(u,function(){throw 2})}catch{}return f0=function(s,o){try{if(!o&&!r)return!1}catch{return!1}var a=!1;try{var i={};i[t]=function(){return{next:function(){return{done:a=!0}}}},s(i)}catch{}return a},f0}var rC;function wle(){if(rC)return zF;rC=1;var e=xt,t=ble(),r=Sle(),n=!r(function(u){Array.from(u)});return e({target:"Array",stat:!0,forced:n},{from:t}),zF}var D0,nC;function _le(){if(nC)return D0;nC=1,Tw(),wle();var e=uu;return D0=e.Array.from,D0}var h0,uC;function $w(){if(uC)return h0;uC=1;var e=_le();return h0=e,h0}var m0,sC;function Pw(){return sC||(sC=1,m0=$w()),m0}var oC={},E0,aC;function kw(){if(aC)return E0;aC=1;var e=TypeError,t=9007199254740991;return E0=function(r){if(r>t)throw e("Maximum allowed index exceeded");return r},E0}var y0,iC;function Ble(){if(iC)return y0;iC=1;var e=Ia(),t=I3(),r=Nn(),n=ar(),u=n("species"),s=Array;return y0=function(o){var a;return e(o)&&(a=o.constructor,t(a)&&(a===s||e(a.prototype))?a=void 0:r(a)&&(a=a[u],a===null&&(a=void 0))),a===void 0?s:a},y0}var v0,cC;function Ow(){if(cC)return v0;cC=1;var e=Ble();return v0=function(t,r){return new(e(t))(r===0?0:r)},v0}var lC;function Iw(){if(lC)return oC;lC=1;var e=xt,t=Zt,r=Ia(),n=Nn(),u=Ou(),s=Es(),o=kw(),a=q3(),i=Ow(),c=x3(),l=ar(),p=hc(),d=l("isConcatSpreadable"),f=p>=51||!t(function(){var A=[];return A[d]=!1,A.concat()[0]!==A}),h=function(A){if(!n(A))return!1;var m=A[d];return m!==void 0?!!m:r(A)},y=!f||!c("concat");return e({target:"Array",proto:!0,arity:1,forced:y},{concat:function(m){var v=u(this),C=i(v,0),B=0,T,N,R,J,q;for(T=-1,R=arguments.length;TJ;J++)if((y||J in T)&&(ee=T[J],K=R(ee,J,B),i))if(c)G[J]=K;else if(K)switch(i){case 3:return!0;case 5:return ee;case 6:return J;case 2:o(G,ee)}else switch(i){case 4:return!1;case 7:o(G,ee)}return f?-1:p||d?d:G}};return _0={forEach:a(0),map:a(1),filter:a(2),some:a(3),every:a(4),find:a(5),findIndex:a(6),filterReject:a(7)},_0}var AC;function Ple(){if(AC)return dC;AC=1;var e=xt,t=hr(),r=In,n=Jt(),u=Ec(),s=Kr,o=Pa(),a=Zt,i=Mr(),c=cn(),l=Ds,p=fs(),d=P3,f=vs(),h=dc,y=yd(),A=Cw(),m=Nw(),v=Tle(),C=qw(),B=b3,T=qn,N=bw(),R=S3,J=vd(),q=$le(),G=Oa(),ee=md(),K=Ed(),ue=$3(),oe=ar(),de=xw(),he=Rt(),fe=Rw(),ge=Na(),pe=R3(),z=L3().forEach,O=ee("hidden"),E="Symbol",F="prototype",D=pe.set,g=pe.getterFor(E),P=Object[F],b=t.Symbol,w=b&&b[F],I=t.RangeError,$=t.TypeError,M=t.QObject,L=B.f,Y=T.f,be=v.f,Ne=R.f,Ve=n([].push),Me=G("symbols"),Fe=G("op-symbols"),qe=G("wks"),Pe=!M||!M[F]||!M[F].findChild,Be=function(U,X,re){var ve=L(P,X);ve&&delete P[X],Y(U,X,re),ve&&U!==P&&Y(P,X,ve)},le=s&&a(function(){return y(Y({},"a",{get:function(){return Y(this,"a",{value:7}).a}})).a!==7})?Be:Y,Te=function(U,X){var re=Me[U]=y(w);return D(re,{type:E,tag:U,description:X}),s||(re.description=X),re},W=function(X,re,ve){X===P&&W(Fe,re,ve),l(X);var Se=d(re);return l(ve),i(Me,Se)?(ve.enumerable?(i(X,O)&&X[O][Se]&&(X[O][Se]=!1),ve=y(ve,{enumerable:h(0,!1)})):(i(X,O)||Y(X,O,h(1,y(null))),X[O][Se]=!0),le(X,Se,ve)):Y(X,Se,ve)},se=function(X,re){l(X);var ve=p(re),Se=A(ve).concat(x(ve));return z(Se,function(Oe){(!s||r(k,ve,Oe))&&W(X,Oe,ve[Oe])}),X},ce=function(X,re){return re===void 0?y(X):se(y(X),re)},k=function(X){var re=d(X),ve=r(Ne,this,re);return this===P&&i(Me,re)&&!i(Fe,re)?!1:ve||!i(this,re)||!i(Me,re)||i(this,O)&&this[O][re]?ve:!0},S=function(X,re){var ve=p(X),Se=d(re);if(!(ve===P&&i(Me,Se)&&!i(Fe,Se))){var Oe=L(ve,Se);return Oe&&i(Me,Se)&&!(i(ve,O)&&ve[O][Se])&&(Oe.enumerable=!0),Oe}},_=function(X){var re=be(p(X)),ve=[];return z(re,function(Se){!i(Me,Se)&&!i(K,Se)&&Ve(ve,Se)}),ve},x=function(U){var X=U===P,re=be(X?Fe:p(U)),ve=[];return z(re,function(Se){i(Me,Se)&&(!X||i(P,Se))&&Ve(ve,Me[Se])}),ve};return o||(b=function(){if(c(w,this))throw new $("Symbol is not a constructor");var X=!arguments.length||arguments[0]===void 0?void 0:f(arguments[0]),re=ue(X),ve=function(Se){var Oe=this===void 0?t:this;Oe===P&&r(ve,Fe,Se),i(Oe,O)&&i(Oe[O],re)&&(Oe[O][re]=!1);var Ie=h(1,Se);try{le(Oe,re,Ie)}catch(Ke){if(!(Ke instanceof I))throw Ke;Be(Oe,re,Ie)}};return s&&Pe&&le(P,re,{configurable:!0,set:ve}),Te(re,X)},w=b[F],J(w,"toString",function(){return g(this).tag}),J(b,"withoutSetter",function(U){return Te(ue(U),U)}),R.f=k,T.f=W,N.f=se,B.f=S,m.f=v.f=_,C.f=x,de.f=function(U){return Te(oe(U),U)},s&&(q(w,"description",{configurable:!0,get:function(){return g(this).description}}),u||J(P,"propertyIsEnumerable",k,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!o,sham:!o},{Symbol:b}),z(A(qe),function(U){he(U)}),e({target:E,stat:!0,forced:!o},{useSetter:function(){Pe=!0},useSimple:function(){Pe=!1}}),e({target:"Object",stat:!0,forced:!o,sham:!s},{create:ce,defineProperty:W,defineProperties:se,getOwnPropertyDescriptor:S}),e({target:"Object",stat:!0,forced:!o},{getOwnPropertyNames:_}),fe(),ge(b,E),K[O]=!0,dC}var FC={},B0,CC;function jw(){if(CC)return B0;CC=1;var e=Pa();return B0=e&&!!Symbol.for&&!!Symbol.keyFor,B0}var bC;function kle(){if(bC)return FC;bC=1;var e=xt,t=ku(),r=Mr(),n=vs(),u=Oa(),s=jw(),o=u("string-to-symbol-registry"),a=u("symbol-to-string-registry");return e({target:"Symbol",stat:!0,forced:!s},{for:function(i){var c=n(i);if(r(o,c))return o[c];var l=t("Symbol")(c);return o[c]=l,a[l]=c,l}}),FC}var SC={},wC;function Ole(){if(wC)return SC;wC=1;var e=xt,t=Mr(),r=mc,n=Dd(),u=Oa(),s=jw(),o=u("symbol-to-string-registry");return e({target:"Symbol",stat:!0,forced:!s},{keyFor:function(i){if(!r(i))throw new TypeError(n(i)+" is not a symbol");if(t(o,i))return o[i]}}),SC}var _C={},T0,BC;function Ile(){if(BC)return T0;BC=1;var e=Jt(),t=Ia(),r=vr(),n=uo(),u=vs(),s=e([].push);return T0=function(o){if(r(o))return o;if(t(o)){for(var a=o.length,i=[],c=0;c=h.length)return f.target=null,o(void 0,!0);switch(f.kind){case"keys":return o(y,!1);case"values":return o(h[y],!1)}return o([y,h[y]],!1)},"values");var d=r.Arguments=r.Array;if(t("keys"),t("values"),t("entries"),!a&&i&&d.name!=="values")try{u(d,"name",{value:"values"})}catch{}return k0}var O0,pb;function epe(){return pb||(pb=1,O0={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),O0}var db;function Lw(){if(db)return ib;db=1,Mw();var e=epe(),t=hr(),r=Na(),n=qa();for(var u in e)r(t[u],u),n[u]=n.Array;return ib}var I0,fb;function Uw(){if(fb)return I0;fb=1;var e=Zle();return Lw(),I0=e,I0}var N0,Db;function Gw(){return Db||(Db=1,N0=Uw()),N0}var q0,hb;function tpe(){if(hb)return q0;hb=1,Mw(),Tw();var e=M3();return q0=e,q0}var x0,mb;function rpe(){if(mb)return x0;mb=1;var e=tpe();return Lw(),x0=e,x0}var R0,Eb;function npe(){if(Eb)return R0;Eb=1;var e=rpe();return R0=e,R0}var j0,yb;function upe(){if(yb)return j0;yb=1;var e=npe();return j0=e,j0}var M0,vb;function Vw(){return vb||(vb=1,M0=upe()),M0}var L0,gb;function Hw(){return gb||(gb=1,L0=Vw()),L0}var Ab={},Fb;function spe(){if(Fb)return Ab;Fb=1;var e=xt,t=Ia();return e({target:"Array",stat:!0},{isArray:t}),Ab}var U0,Cb;function ope(){if(Cb)return U0;Cb=1,spe();var e=uu;return U0=e.Array.isArray,U0}var G0,bb;function Ww(){if(bb)return G0;bb=1;var e=ope();return G0=e,G0}var V0,Sb;function Jw(){return Sb||(Sb=1,V0=Ww()),V0}var H0={exports:{}},W0={exports:{}},J0,wb;function ape(){if(wb)return J0;wb=1;var e=Ww();return J0=e,J0}var z0,_b;function ipe(){if(_b)return z0;_b=1;var e=ape();return z0=e,z0}var K0,Bb;function cpe(){return Bb||(Bb=1,K0=ipe()),K0}var Tb;function lpe(){return Tb||(Tb=1,function(e){var t=cpe();function r(n){if(t(n))return n}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}(W0)),W0.exports}var X0={exports:{}},$b={},Pb;function ppe(){if(Pb)return $b;Pb=1;var e=ar(),t=qn.f,r=e("metadata"),n=Function.prototype;return n[r]===void 0&&t(n,r,{value:null}),$b}var kb={},Ob;function dpe(){if(Ob)return kb;Ob=1;var e=Rt();return e("asyncDispose"),kb}var Ib={},Nb;function fpe(){if(Nb)return Ib;Nb=1;var e=Rt();return e("dispose"),Ib}var qb={},xb;function Dpe(){if(xb)return qb;xb=1;var e=Rt();return e("metadata"),qb}var Y0,Rb;function hpe(){if(Rb)return Y0;Rb=1;var e=Uw();return ppe(),dpe(),fpe(),Dpe(),Y0=e,Y0}var jb={},Z0,Mb;function zw(){if(Mb)return Z0;Mb=1;var e=ku(),t=Jt(),r=e("Symbol"),n=r.keyFor,u=t(r.prototype.valueOf);return Z0=r.isRegisteredSymbol||function(o){try{return n(u(o))!==void 0}catch{return!1}},Z0}var Lb;function mpe(){if(Lb)return jb;Lb=1;var e=xt,t=zw();return e({target:"Symbol",stat:!0},{isRegisteredSymbol:t}),jb}var Ub={},Q0,Gb;function Kw(){if(Gb)return Q0;Gb=1;for(var e=Oa(),t=ku(),r=Jt(),n=mc,u=ar(),s=t("Symbol"),o=s.isWellKnownSymbol,a=t("Object","getOwnPropertyNames"),i=r(s.prototype.valueOf),c=e("wks"),l=0,p=a(s),d=p.length;lr.length)&&(n=r.length);for(var u=0,s=Array(n);u0;)n[i]=n[--i];i!==o++&&(n[i]=a)}else for(var c=t(s/2),l=r(e(n,0,c),u),p=r(e(n,c),u),d=l.length,f=p.length,h=0,y=0;h3)){if(p)return!0;if(f)return f<603;var R="",J,q,G,ee;for(J=65;J<76;J++){switch(q=String.fromCharCode(J),J){case 66:case 69:case 70:case 72:G=3;break;case 68:case 71:G=4;break;default:G=2}for(ee=0;ee<47;ee++)h.push({k:q+ee,v:G})}for(h.sort(function(K,ue){return ue.v-K.v}),ee=0;eeo(q)?1:-1}};return e({target:"Array",proto:!0,forced:T},{sort:function(J){J!==void 0&&r(J);var q=n(this);if(B)return J===void 0?y(q):y(q,J);var G=[],ee=u(q),K,ue;for(ue=0;ue>>0||(l(c,y)?16:10))}:o,qD}var Y4;function lde(){if(Y4)return J4;Y4=1;var e=xt,t=cde();return e({global:!0,forced:parseInt!==t},{parseInt:t}),J4}var xD,Z4;function pde(){if(Z4)return xD;Z4=1,lde();var e=uu;return xD=e.parseInt,xD}var RD,Q4;function dde(){if(Q4)return RD;Q4=1;var e=pde();return RD=e,RD}var jD,eS;function fde(){return eS||(eS=1,jD=dde()),jD}var tS={},rS;function Dde(){if(rS)return tS;rS=1;var e=xt,t=C3,r=Aw().indexOf,n=gd(),u=t([].indexOf),s=!!u&&1/u([1],1,-0)<0,o=s||!n("indexOf");return e({target:"Array",proto:!0,forced:o},{indexOf:function(i){var c=arguments.length>1?arguments[1]:void 0;return s?u(this,i,c)||0:r(this,i,c)}}),tS}var MD,nS;function hde(){if(nS)return MD;nS=1,Dde();var e=ys();return MD=e("Array","indexOf"),MD}var LD,uS;function mde(){if(uS)return LD;uS=1;var e=cn(),t=hde(),r=Array.prototype;return LD=function(n){var u=n.indexOf;return n===r||e(r,n)&&u===r.indexOf?t:u},LD}var UD,sS;function Ede(){if(sS)return UD;sS=1;var e=mde();return UD=e,UD}var GD,oS;function Ad(){return oS||(oS=1,GD=Ede()),GD}var aS={},VD,iS;function yde(){if(iS)return VD;iS=1;var e=L3().forEach,t=gd(),r=t("forEach");return VD=r?[].forEach:function(u){return e(this,u,arguments.length>1?arguments[1]:void 0)},VD}var cS;function vde(){if(cS)return aS;cS=1;var e=xt,t=yde();return e({target:"Array",proto:!0,forced:[].forEach!==t},{forEach:t}),aS}var HD,lS;function gde(){if(lS)return HD;lS=1,vde();var e=ys();return HD=e("Array","forEach"),HD}var WD,pS;function Ade(){if(pS)return WD;pS=1;var e=gde();return WD=e,WD}var JD,dS;function Fde(){if(dS)return JD;dS=1;var e=gc(),t=Mr(),r=cn(),n=Ade(),u=Array.prototype,s={DOMTokenList:!0,NodeList:!0};return JD=function(o){var a=o.forEach;return o===u||r(u,o)&&a===u.forEach||t(s,e(o))?n:a},JD}var zD,fS;function Zw(){return fS||(fS=1,zD=Fde()),zD}var DS={},hS;function Cde(){if(hS)return DS;hS=1;var e=xt,t=Kr,r=yd();return e({target:"Object",stat:!0,sham:!t},{create:r}),DS}var KD,mS;function bde(){if(mS)return KD;mS=1,Cde();var e=uu,t=e.Object;return KD=function(n,u){return t.create(n,u)},KD}var XD,ES;function Sde(){if(ES)return XD;ES=1;var e=bde();return XD=e,XD}var YD,yS;function wde(){return yS||(yS=1,YD=Sde()),YD}var ZD,vS;function _de(){if(vS)return ZD;vS=1,Iw();var e=ys();return ZD=e("Array","concat"),ZD}var QD,gS;function Bde(){if(gS)return QD;gS=1;var e=cn(),t=_de(),r=Array.prototype;return QD=function(n){var u=n.concat;return n===r||e(r,n)&&u===r.concat?t:u},QD}var e2,AS;function Tde(){if(AS)return e2;AS=1;var e=Bde();return e2=e,e2}var t2,FS;function Fd(){return FS||(FS=1,t2=Tde()),t2}var CS;function $de(){return CS||(CS=1,function(e,t){var r=_p(),n=Pw(),u=Gw(),s=Hw(),o=Jw(),a=hs,i=ms;a(t,"__esModule",{value:!0}),t.default=void 0;var c=i(Xw()),l=i(Ype()),p=i(ade()),d=i(_p()),f=i(fde()),h=i(Ad()),y=i(Zw()),A=i(wde()),m=i(Fd());function v(W,se){var ce=typeof u<"u"&&s(W)||W["@@iterator"];if(!ce){if(o(W)||(ce=C(W))||se){ce&&(W=ce);var k=0,S=function(){};return{s:S,n:function(){return k>=W.length?{done:!0}:{done:!1,value:W[k++]}},e:function(re){throw re},f:S}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var _=!0,x=!1,U;return{s:function(){ce=ce.call(W)},n:function(){var re=ce.next();return _=re.done,re},e:function(re){x=!0,U=re},f:function(){try{!_&&ce.return!=null&&ce.return()}finally{if(x)throw U}}}}function C(W,se){var ce;if(W){if(typeof W=="string")return B(W,se);var k=r(ce=Object.prototype.toString.call(W)).call(ce,8,-1);if(k==="Object"&&W.constructor&&(k=W.constructor.name),k==="Map"||k==="Set")return n(W);if(k==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(k))return B(W,se)}}function B(W,se){(se==null||se>W.length)&&(se=W.length);for(var ce=0,k=new Array(se);ce * Steven Levithan (c) 2007-present MIT License - */var P="xregexp",$={astral:!1,namespacing:!0},I={},U={},j={},W=[],te="default",Y="class",oe={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},ie=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,fe=/()??/.exec("")[1]===void 0,De=(0,l.default)(/x/)!==void 0;function de(Z){var ae=!0;try{if(new RegExp("",Z),Z==="y"){var le=function(){return"gy"}(),N=".a".replace(new RegExp("a",le),".")==="..";N&&(ae=!1)}}catch{ae=!1}return ae}var Ce=de("d"),pe=de("s"),Q=de("u"),q=de("y"),v={d:Ce,g:!0,i:!0,m:!0,s:pe,u:Q,y:q},C=pe?/[^dgimsuy]+/g:/[^dgimuy]+/g;function D(Z,ae,le,N,S){var _;if(Z[P]={captureNames:ae},S)return Z;if(Z.__proto__)Z.__proto__=ce.prototype;else for(var L in ce.prototype)Z[L]=ce.prototype[L];return Z[P].source=le,Z[P].flags=N&&(0,p.default)(_=N.split("")).call(_).join(""),Z}function g(Z){return Z.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function O(Z,ae){var le;if(!ce.isRegExp(Z))throw new TypeError("Type RegExp expected");var N=Z[P]||{},S=x(Z),_="",L="",J=null,ee=null;return ae=ae||{},ae.removeG&&(L+="g"),ae.removeY&&(L+="y"),L&&(S=S.replace(new RegExp("[".concat(L,"]+"),"g"),"")),ae.addG&&(_+="g"),ae.addY&&(_+="y"),_&&(S=g(S+_)),ae.isInternalOnly||(N.source!==void 0&&(J=N.source),(0,l.default)(N)!=null&&(ee=_?g((0,l.default)(N)+_):(0,l.default)(N))),Z=D(new RegExp(ae.source||Z.source,S),k(Z)?(0,f.default)(le=N.captureNames).call(le,0):null,J,ee,ae.isInternalOnly),Z}function b(Z){return(0,d.default)(Z,16)}function w(Z,ae,le){var N=Z.index+Z[0].length,S=Z.input[Z.index-1],_=Z.input[N];return/^[()|]$/.test(S)||/^[()|]$/.test(_)||Z.index===0||N===Z.input.length||/\(\?(?:[:=!]|<[=!])$/.test(Z.input.substring(Z.index-4,Z.index))||H(Z.input,N,le)?"":"(?:)"}function x(Z){return De?(0,l.default)(Z):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(Z))[1]}function k(Z){return!!(Z[P]&&Z[P].captureNames)}function G(Z){return(0,d.default)(Z,10).toString(16)}function H(Z,ae,le){var N=(0,h.default)(le).call(le,"x")!==-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return N.test((0,f.default)(Z).call(Z,ae))}function re(Z,ae){return Object.prototype.toString.call(Z)==="[object ".concat(ae,"]")}function _e(Z){if(Z==null)throw new TypeError("Cannot convert null or undefined to object");return Z}function Le(Z){for(;Z.length<4;)Z="0".concat(Z);return Z}function Ue(Z,ae){if(g(ae)!==ae)throw new SyntaxError("Invalid duplicate regex flag ".concat(ae));Z=Z.replace(/^\(\?([\w$]+)\)/,function(_,L){if(/[dgy]/.test(L))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(_));return ae=g(ae+L),""});var le=y(ae),N;try{for(le.s();!(N=le.n()).done;){var S=N.value;if(!v[S])throw new SyntaxError("Unknown regex flag ".concat(S))}}catch(_){le.e(_)}finally{le.f()}return{pattern:Z,flags:ae}}function Ge(Z){var ae={};return re(Z,"String")?((0,E.default)(ce).call(ce,Z,/[^\s,]+/,function(le){ae[le]=!0}),ae):Z}function be(Z){if(!/^[\w$]$/.test(Z))throw new Error("Flag must be a single character A-Za-z0-9_$");v[Z]=!0}function je(Z,ae,le,N,S){for(var _=W.length,L=Z[le],J=null,ee,ue;_--;)if(ue=W[_],!(ue.leadChar&&ue.leadChar!==L||ue.scope!==N&&ue.scope!=="all"||ue.flag&&(0,h.default)(ae).call(ae,ue.flag)===-1)&&(ee=ce.exec(Z,ue.regex,le,"sticky"),ee)){J={matchLength:ee[0].length,output:ue.handler.call(S,ee,N,ae),reparse:ue.reparse};break}return J}function ke(Z){$.astral=Z}function Ie(Z){$.namespacing=Z}function ce(Z,ae){if(ce.isRegExp(Z)){if(ae!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return O(Z)}if(Z=Z===void 0?"":String(Z),ae=ae===void 0?"":String(ae),ce.isInstalled("astral")&&(0,h.default)(ae).call(ae,"A")===-1&&(ae+="A"),j[Z]||(j[Z]={}),!j[Z][ae]){for(var le={hasNamedCapture:!1,captureNames:[]},N=te,S="",_=0,L,J=Ue(Z,ae),ee=J.pattern,ue=(0,l.default)(J);_")}else if(sn)return"\\".concat(+sn+_);return rt}if(!(re(Z,"Array")&&Z.length))throw new TypeError("Must provide a nonempty array of patterns to merge");var ee=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,ue=[],ge=y(Z),Be;try{for(ge.s();!(Be=ge.n()).done;){var qe=Be.value;ce.isRegExp(qe)?(_=S,L=qe[P]&&qe[P].captureNames||[],ue.push(ce(qe.source).source.replace(ee,J))):ue.push(ce.escape(qe))}}catch(rt){ge.e(rt)}finally{ge.f()}var Pe=N==="none"?"":"|";return ce(ue.join(Pe),ae)},I.exec=function(Z){var ae=this.lastIndex,le=RegExp.prototype.exec.apply(this,arguments);if(le){if(!fe&&le.length>1&&(0,h.default)(le).call(le,"")!==-1){var N,S=O(this,{removeG:!0,isInternalOnly:!0});(0,f.default)(N=String(Z)).call(N,le.index).replace(S,function(){for(var ee=arguments.length,ue=1;uele.index&&(this.lastIndex=le.index)}return this.global||(this.lastIndex=ae),le},I.test=function(Z){return!!I.exec.call(this,Z)},I.match=function(Z){if(!ce.isRegExp(Z))Z=new RegExp(Z);else if(Z.global){var ae=String.prototype.match.apply(this,arguments);return Z.lastIndex=0,ae}return I.exec.call(Z,_e(this))},I.replace=function(Z,ae){var le=ce.isRegExp(Z),N,S,_;return le?(Z[P]&&(S=Z[P].captureNames),N=Z.lastIndex):Z+="",re(ae,"Function")?_=String(this).replace(Z,function(){for(var L=arguments.length,J=new Array(L),ee=0;eeAr)throw new SyntaxError("Backreference to undefined group ".concat(ge));return J[Pe]||""}throw new SyntaxError("Invalid token ".concat(ge))}}),le&&(Z.global?Z.lastIndex=0:Z.lastIndex=N),_},I.split=function(Z,ae){if(!ce.isRegExp(Z))return String.prototype.split.apply(this,arguments);var le=String(this),N=[],S=Z.lastIndex,_=0,L;return ae=(ae===void 0?-1:ae)>>>0,(0,E.default)(ce).call(ce,le,Z,function(J){J.index+J[0].length>_&&(N.push((0,f.default)(le).call(le,_,J.index)),J.length>1&&J.indexae?(0,f.default)(N).call(N,0,ae):N},ce.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,function(Z,ae){if(Z[1]==="B"&&ae===te)return Z[0];throw new SyntaxError("Invalid escape ".concat(Z[0]))},{scope:"all",leadChar:"\\"}),ce.addToken(/\\u{([\dA-Fa-f]+)}/,function(Z,ae,le){var N=b(Z[1]);if(N>1114111)throw new SyntaxError("Invalid Unicode code point ".concat(Z[0]));if(N<=65535)return"\\u".concat(Le(G(N)));if(Q&&(0,h.default)(le).call(le,"u")!==-1)return Z[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")},{scope:"all",leadChar:"\\"}),ce.addToken(/\(\?#[^)]*\)/,w,{leadChar:"("}),ce.addToken(/\s+|#[^\n]*\n?/,w,{flag:"x"}),pe||ce.addToken(/\./,function(){return"[\\s\\S]"},{flag:"s",leadChar:"."}),ce.addToken(/\\k<([^>]+)>/,function(Z){var ae,le,N=isNaN(Z[1])?(0,h.default)(ae=this.captureNames).call(ae,Z[1])+1:+Z[1],S=Z.index+Z[0].length;if(!N||N>this.captureNames.length)throw new SyntaxError("Backreference to undefined group ".concat(Z[0]));return(0,m.default)(le="\\".concat(N)).call(le,S===Z.input.length||isNaN(Z.input[S])?"":"(?:)")},{leadChar:"\\"}),ce.addToken(/\\(\d+)/,function(Z,ae){if(!(ae===te&&/^[1-9]/.test(Z[1])&&+Z[1]<=this.captureNames.length)&&Z[1]!=="0")throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(Z[0]));return Z[0]},{scope:"all",leadChar:"\\"}),ce.addToken(/\(\?P?<((?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])*)>/,function(Z){var ae;if(!ce.isInstalled("namespacing")&&(Z[1]==="length"||Z[1]==="__proto__"))throw new SyntaxError("Cannot use reserved word as capture name ".concat(Z[0]));if((0,h.default)(ae=this.captureNames).call(ae,Z[1])!==-1)throw new SyntaxError("Cannot use same name for multiple groups ".concat(Z[0]));return this.captureNames.push(Z[1]),this.hasNamedCapture=!0,"("},{leadChar:"("}),ce.addToken(/\((?!\?)/,function(Z,ae,le){return(0,h.default)(le).call(le,"n")!==-1?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n",leadChar:"("});var Te=ce;t.default=Te,e.exports=t.default}(il,il.exports)),il.exports}var cl={exports:{}},Z4={},JD,Q4;function Ule(){if(Q4)return JD;Q4=1;var e=ka,t=Nu(),r=a3(),n=vs(),u=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(i,c,l,p){var f=t(i),d=r(f),h=n(f);if(e(c),h===0&&l<2)throw new u(s);var E=a?h-1:0,A=a?-1:1;if(l<2)for(;;){if(E in d){p=d[E],E+=A;break}if(E+=A,a?E<0:h<=E)throw new u(s)}for(;a?E>=0:h>E;E+=A)E in d&&(p=c(p,d[E],E,f));return p}};return JD={left:o(!1),right:o(!0)},JD}var zD,eS;function Gle(){if(eS)return zD;eS=1;var e=Sr(),t=po();return zD=t(e.process)==="process",zD}var tS;function Vle(){if(tS)return Z4;tS=1;var e=Mt,t=Ule().left,r=df(),n=hc(),u=Gle(),s=!u&&n>79&&n<83,o=s||!r("reduce");return e({target:"Array",proto:!0,forced:o},{reduce:function(i){var c=arguments.length;return t(this,i,c,c>1?arguments[1]:void 0)}}),Z4}var KD,rS;function Hle(){if(rS)return KD;rS=1,Vle();var e=ys();return KD=e("Array","reduce"),KD}var XD,nS;function Wle(){if(nS)return XD;nS=1;var e=mn(),t=Hle(),r=Array.prototype;return XD=function(n){var u=n.reduce;return n===r||e(r,n)&&u===r.reduce?t:u},XD}var YD,uS;function Jle(){if(uS)return YD;uS=1;var e=Wle();return YD=e,YD}var ZD,sS;function zle(){return sS||(sS=1,ZD=Jle()),ZD}var oS={},aS;function Kle(){if(aS)return oS;aS=1;var e=Mt,t=F3().map,r=v3(),n=r("map");return e({target:"Array",proto:!0,forced:!n},{map:function(s){return t(this,s,arguments.length>1?arguments[1]:void 0)}}),oS}var QD,iS;function Xle(){if(iS)return QD;iS=1,Kle();var e=ys();return QD=e("Array","map"),QD}var e2,cS;function Yle(){if(cS)return e2;cS=1;var e=mn(),t=Xle(),r=Array.prototype;return e2=function(n){var u=n.map;return n===r||e(r,n)&&u===r.map?t:u},e2}var t2,lS;function Zle(){if(lS)return t2;lS=1;var e=Yle();return t2=e,t2}var r2,pS;function Qle(){return pS||(pS=1,r2=Zle()),r2}var fS;function epe(){return fS||(fS=1,function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(zle()),s=n(Qle()),o=n(Df()),a=n(hf());/*! + */var T="xregexp",N={astral:!1,namespacing:!0},R={},J={},q={},G=[],ee="default",K="class",ue={default:/\\(?:0(?:[0-3][0-7]{0,2}|[4-7][0-7]?)?|[1-9]\d*|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|\(\?(?:[:=!]|<[=!])|[?*+]\?|{\d+(?:,\d*)?}\??|[\s\S]/,class:/\\(?:[0-3][0-7]{0,2}|[4-7][0-7]?|x[\dA-Fa-f]{2}|u(?:[\dA-Fa-f]{4}|{[\dA-Fa-f]+})|c[A-Za-z]|[\s\S])|[\s\S]/},oe=/\$(?:\{([^\}]+)\}|<([^>]+)>|(\d\d?|[\s\S]?))/g,de=/()??/.exec("")[1]===void 0,he=(0,l.default)(/x/)!==void 0;function fe(W){var se=!0;try{if(new RegExp("",W),W==="y"){var ce=function(){return"gy"}(),k=".a".replace(new RegExp("a",ce),".")==="..";k&&(se=!1)}}catch{se=!1}return se}var ge=fe("d"),pe=fe("s"),z=fe("u"),O=fe("y"),E={d:ge,g:!0,i:!0,m:!0,s:pe,u:z,y:O},F=pe?/[^dgimsuy]+/g:/[^dgimuy]+/g;function D(W,se,ce,k,S){var _;if(W[T]={captureNames:se},S)return W;if(W.__proto__)W.__proto__=le.prototype;else for(var x in le.prototype)W[x]=le.prototype[x];return W[T].source=ce,W[T].flags=k&&(0,p.default)(_=k.split("")).call(_).join(""),W}function g(W){return W.replace(/([\s\S])(?=[\s\S]*\1)/g,"")}function P(W,se){var ce;if(!le.isRegExp(W))throw new TypeError("Type RegExp expected");var k=W[T]||{},S=I(W),_="",x="",U=null,X=null;return se=se||{},se.removeG&&(x+="g"),se.removeY&&(x+="y"),x&&(S=S.replace(new RegExp("[".concat(x,"]+"),"g"),"")),se.addG&&(_+="g"),se.addY&&(_+="y"),_&&(S=g(S+_)),se.isInternalOnly||(k.source!==void 0&&(U=k.source),(0,l.default)(k)!=null&&(X=_?g((0,l.default)(k)+_):(0,l.default)(k))),W=D(new RegExp(se.source||W.source,S),$(W)?(0,d.default)(ce=k.captureNames).call(ce,0):null,U,X,se.isInternalOnly),W}function b(W){return(0,f.default)(W,16)}function w(W,se,ce){var k=W.index+W[0].length,S=W.input[W.index-1],_=W.input[k];return/^[()|]$/.test(S)||/^[()|]$/.test(_)||W.index===0||k===W.input.length||/\(\?(?:[:=!]|<[=!])$/.test(W.input.substring(W.index-4,W.index))||L(W.input,k,ce)?"":"(?:)"}function I(W){return he?(0,l.default)(W):/\/([a-z]*)$/i.exec(RegExp.prototype.toString.call(W))[1]}function $(W){return!!(W[T]&&W[T].captureNames)}function M(W){return(0,f.default)(W,10).toString(16)}function L(W,se,ce){var k=(0,h.default)(ce).call(ce,"x")!==-1?/^(?:\s|#[^#\n]*|\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/:/^(?:\(\?#[^)]*\))*(?:[?*+]|{\d+(?:,\d*)?})/;return k.test((0,d.default)(W).call(W,se))}function Y(W,se){return Object.prototype.toString.call(W)==="[object ".concat(se,"]")}function be(W){if(W==null)throw new TypeError("Cannot convert null or undefined to object");return W}function Ne(W){for(;W.length<4;)W="0".concat(W);return W}function Ve(W,se){if(g(se)!==se)throw new SyntaxError("Invalid duplicate regex flag ".concat(se));W=W.replace(/^\(\?([\w$]+)\)/,function(_,x){if(/[dgy]/.test(x))throw new SyntaxError("Cannot use flags dgy in mode modifier ".concat(_));return se=g(se+x),""});var ce=v(se),k;try{for(ce.s();!(k=ce.n()).done;){var S=k.value;if(!E[S])throw new SyntaxError("Unknown regex flag ".concat(S))}}catch(_){ce.e(_)}finally{ce.f()}return{pattern:W,flags:se}}function Me(W){var se={};return Y(W,"String")?((0,y.default)(le).call(le,W,/[^\s,]+/,function(ce){se[ce]=!0}),se):W}function Fe(W){if(!/^[\w$]$/.test(W))throw new Error("Flag must be a single character A-Za-z0-9_$");E[W]=!0}function qe(W,se,ce,k,S){for(var _=G.length,x=W[ce],U=null,X,re;_--;)if(re=G[_],!(re.leadChar&&re.leadChar!==x||re.scope!==k&&re.scope!=="all"||re.flag&&(0,h.default)(se).call(se,re.flag)===-1)&&(X=le.exec(W,re.regex,ce,"sticky"),X)){U={matchLength:X[0].length,output:re.handler.call(S,X,k,se),reparse:re.reparse};break}return U}function Pe(W){N.astral=W}function Be(W){N.namespacing=W}function le(W,se){if(le.isRegExp(W)){if(se!==void 0)throw new TypeError("Cannot supply flags when copying a RegExp");return P(W)}if(W=W===void 0?"":String(W),se=se===void 0?"":String(se),le.isInstalled("astral")&&(0,h.default)(se).call(se,"A")===-1&&(se+="A"),q[W]||(q[W]={}),!q[W][se]){for(var ce={hasNamedCapture:!1,captureNames:[]},k=ee,S="",_=0,x,U=Ve(W,se),X=U.pattern,re=(0,l.default)(U);_")}else if(xn)return"\\".concat(+xn+_);return Ke}if(!(Y(W,"Array")&&W.length))throw new TypeError("Must provide a nonempty array of patterns to merge");var X=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,re=[],ve=v(W),Se;try{for(ve.s();!(Se=ve.n()).done;){var Oe=Se.value;le.isRegExp(Oe)?(_=S,x=Oe[T]&&Oe[T].captureNames||[],re.push(le(Oe.source).source.replace(X,U))):re.push(le.escape(Oe))}}catch(Ke){ve.e(Ke)}finally{ve.f()}var Ie=k==="none"?"":"|";return le(re.join(Ie),se)},R.exec=function(W){var se=this.lastIndex,ce=RegExp.prototype.exec.apply(this,arguments);if(ce){if(!de&&ce.length>1&&(0,h.default)(ce).call(ce,"")!==-1){var k,S=P(this,{removeG:!0,isInternalOnly:!0});(0,d.default)(k=String(W)).call(k,ce.index).replace(S,function(){for(var X=arguments.length,re=1;rece.index&&(this.lastIndex=ce.index)}return this.global||(this.lastIndex=se),ce},R.test=function(W){return!!R.exec.call(this,W)},R.match=function(W){if(!le.isRegExp(W))W=new RegExp(W);else if(W.global){var se=String.prototype.match.apply(this,arguments);return W.lastIndex=0,se}return R.exec.call(W,be(this))},R.replace=function(W,se){var ce=le.isRegExp(W),k,S,_;return ce?(W[T]&&(S=W[T].captureNames),k=W.lastIndex):W+="",Y(se,"Function")?_=String(this).replace(W,function(){for(var x=arguments.length,U=new Array(x),X=0;XCr)throw new SyntaxError("Backreference to undefined group ".concat(ve));return U[Ie]||""}throw new SyntaxError("Invalid token ".concat(ve))}}),ce&&(W.global?W.lastIndex=0:W.lastIndex=k),_},R.split=function(W,se){if(!le.isRegExp(W))return String.prototype.split.apply(this,arguments);var ce=String(this),k=[],S=W.lastIndex,_=0,x;return se=(se===void 0?-1:se)>>>0,(0,y.default)(le).call(le,ce,W,function(U){U.index+U[0].length>_&&(k.push((0,d.default)(ce).call(ce,_,U.index)),U.length>1&&U.indexse?(0,d.default)(k).call(k,0,se):k},le.addToken(/\\([ABCE-RTUVXYZaeg-mopqyz]|c(?![A-Za-z])|u(?![\dA-Fa-f]{4}|{[\dA-Fa-f]+})|x(?![\dA-Fa-f]{2}))/,function(W,se){if(W[1]==="B"&&se===ee)return W[0];throw new SyntaxError("Invalid escape ".concat(W[0]))},{scope:"all",leadChar:"\\"}),le.addToken(/\\u{([\dA-Fa-f]+)}/,function(W,se,ce){var k=b(W[1]);if(k>1114111)throw new SyntaxError("Invalid Unicode code point ".concat(W[0]));if(k<=65535)return"\\u".concat(Ne(M(k)));if(z&&(0,h.default)(ce).call(ce,"u")!==-1)return W[0];throw new SyntaxError("Cannot use Unicode code point above \\u{FFFF} without flag u")},{scope:"all",leadChar:"\\"}),le.addToken(/\(\?#[^)]*\)/,w,{leadChar:"("}),le.addToken(/\s+|#[^\n]*\n?/,w,{flag:"x"}),pe||le.addToken(/\./,function(){return"[\\s\\S]"},{flag:"s",leadChar:"."}),le.addToken(/\\k<([^>]+)>/,function(W){var se,ce,k=isNaN(W[1])?(0,h.default)(se=this.captureNames).call(se,W[1])+1:+W[1],S=W.index+W[0].length;if(!k||k>this.captureNames.length)throw new SyntaxError("Backreference to undefined group ".concat(W[0]));return(0,m.default)(ce="\\".concat(k)).call(ce,S===W.input.length||isNaN(W.input[S])?"":"(?:)")},{leadChar:"\\"}),le.addToken(/\\(\d+)/,function(W,se){if(!(se===ee&&/^[1-9]/.test(W[1])&&+W[1]<=this.captureNames.length)&&W[1]!=="0")throw new SyntaxError("Cannot use octal escape or backreference to undefined group ".concat(W[0]));return W[0]},{scope:"all",leadChar:"\\"}),le.addToken(/\(\?P?<((?:[\$A-Z_a-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])(?:[\$0-9A-Z_a-z\xAA\xB5\xB7\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0300-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u0483-\u0487\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u05D0-\u05EA\u05EF-\u05F2\u0610-\u061A\u0620-\u0669\u066E-\u06D3\u06D5-\u06DC\u06DF-\u06E8\u06EA-\u06FC\u06FF\u0710-\u074A\u074D-\u07B1\u07C0-\u07F5\u07FA\u07FD\u0800-\u082D\u0840-\u085B\u0860-\u086A\u0870-\u0887\u0889-\u088E\u0898-\u08E1\u08E3-\u0963\u0966-\u096F\u0971-\u0983\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BC-\u09C4\u09C7\u09C8\u09CB-\u09CE\u09D7\u09DC\u09DD\u09DF-\u09E3\u09E6-\u09F1\u09FC\u09FE\u0A01-\u0A03\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A59-\u0A5C\u0A5E\u0A66-\u0A75\u0A81-\u0A83\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABC-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AD0\u0AE0-\u0AE3\u0AE6-\u0AEF\u0AF9-\u0AFF\u0B01-\u0B03\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3C-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B5C\u0B5D\u0B5F-\u0B63\u0B66-\u0B6F\u0B71\u0B82\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD0\u0BD7\u0BE6-\u0BEF\u0C00-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3C-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C58-\u0C5A\u0C5D\u0C60-\u0C63\u0C66-\u0C6F\u0C80-\u0C83\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBC-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CDD\u0CDE\u0CE0-\u0CE3\u0CE6-\u0CEF\u0CF1\u0CF2\u0D00-\u0D0C\u0D0E-\u0D10\u0D12-\u0D44\u0D46-\u0D48\u0D4A-\u0D4E\u0D54-\u0D57\u0D5F-\u0D63\u0D66-\u0D6F\u0D7A-\u0D7F\u0D81-\u0D83\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E01-\u0E3A\u0E40-\u0E4E\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EBD\u0EC0-\u0EC4\u0EC6\u0EC8-\u0ECD\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E-\u0F47\u0F49-\u0F6C\u0F71-\u0F84\u0F86-\u0F97\u0F99-\u0FBC\u0FC6\u1000-\u1049\u1050-\u109D\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u135D-\u135F\u1369-\u1371\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1715\u171F-\u1734\u1740-\u1753\u1760-\u176C\u176E-\u1770\u1772\u1773\u1780-\u17D3\u17D7\u17DC\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u1820-\u1878\u1880-\u18AA\u18B0-\u18F5\u1900-\u191E\u1920-\u192B\u1930-\u193B\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A1B\u1A20-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AA7\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B4C\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1BF3\u1C00-\u1C37\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CD0-\u1CD2\u1CD4-\u1CFA\u1D00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u200C\u200D\u203F\u2040\u2054\u2071\u207F\u2090-\u209C\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D7F-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2DE0-\u2DFF\u3005-\u3007\u3021-\u302F\u3031-\u3035\u3038-\u303C\u3041-\u3096\u3099-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66F\uA674-\uA67D\uA67F-\uA6F1\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA827\uA82C\uA840-\uA873\uA880-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F7\uA8FB\uA8FD-\uA92D\uA930-\uA953\uA960-\uA97C\uA980-\uA9C0\uA9CF-\uA9D9\uA9E0-\uA9FE\uAA00-\uAA36\uAA40-\uAA4D\uAA50-\uAA59\uAA60-\uAA76\uAA7A-\uAAC2\uAADB-\uAADD\uAAE0-\uAAEF\uAAF2-\uAAF6\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABEA\uABEC\uABED\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFE70-\uFE74\uFE76-\uFEFC\uFF10-\uFF19\uFF21-\uFF3A\uFF3F\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDDFD\uDE80-\uDE9C\uDEA0-\uDED0\uDEE0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE6\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDD30-\uDD39\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF50\uDF70-\uDF85\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC46\uDC66-\uDC75\uDC7F-\uDCBA\uDCC2\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD00-\uDD34\uDD36-\uDD3F\uDD44-\uDD47\uDD50-\uDD73\uDD76\uDD80-\uDDC4\uDDC9-\uDDCC\uDDCE-\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEEA\uDEF0-\uDEF9\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3B-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC00-\uDC4A\uDC50-\uDC59\uDC5E-\uDC61\uDC80-\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDB5\uDDB8-\uDDC0\uDDD8-\uDDDD\uDE00-\uDE40\uDE44\uDE50-\uDE59\uDE80-\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF39\uDF40-\uDF46]|\uD806[\uDC00-\uDC3A\uDCA0-\uDCE9\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD43\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE1\uDDE3\uDDE4\uDE00-\uDE3E\uDE47\uDE50-\uDE99\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC40\uDC50-\uDC59\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDEF0-\uDEF4\uDF00-\uDF36\uDF40-\uDF43\uDF50-\uDF59\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFE4\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAE\uDEC0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCD0-\uDCD6\uDD00-\uDD4B\uDD50-\uDD59]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]|\uDB40[\uDD00-\uDDEF])*)>/,function(W){var se;if(!le.isInstalled("namespacing")&&(W[1]==="length"||W[1]==="__proto__"))throw new SyntaxError("Cannot use reserved word as capture name ".concat(W[0]));if((0,h.default)(se=this.captureNames).call(se,W[1])!==-1)throw new SyntaxError("Cannot use same name for multiple groups ".concat(W[0]));return this.captureNames.push(W[1]),this.hasNamedCapture=!0,"("},{leadChar:"("}),le.addToken(/\((?!\?)/,function(W,se,ce){return(0,h.default)(ce).call(ce,"n")!==-1?"(?:":(this.captureNames.push(null),"(")},{optionalFlags:"n",leadChar:"("});var Te=le;t.default=Te,e.exports=t.default}(Dl,Dl.exports)),Dl.exports}var hl={exports:{}},bS={},r2,SS;function Pde(){if(SS)return r2;SS=1;var e=ka,t=Ou(),r=w3(),n=Es(),u=TypeError,s="Reduce of empty array with no initial value",o=function(a){return function(i,c,l,p){var d=t(i),f=r(d),h=n(d);if(e(c),h===0&&l<2)throw new u(s);var y=a?h-1:0,A=a?-1:1;if(l<2)for(;;){if(y in f){p=f[y],y+=A;break}if(y+=A,a?y<0:h<=y)throw new u(s)}for(;a?y>=0:h>y;y+=A)y in f&&(p=c(p,f[y],y,d));return p}};return r2={left:o(!1),right:o(!0)},r2}var n2,wS;function kde(){if(wS)return n2;wS=1;var e=hr(),t=Dc(),r=uo(),n=function(u){return t.slice(0,u.length)===u};return n2=function(){return n("Bun/")?"BUN":n("Cloudflare-Workers")?"CLOUDFLARE":n("Deno/")?"DENO":n("Node.js/")?"NODE":e.Bun&&typeof Bun.version=="string"?"BUN":e.Deno&&typeof Deno.version=="object"?"DENO":r(e.process)==="process"?"NODE":e.window&&e.document?"BROWSER":"REST"}(),n2}var u2,_S;function Ode(){if(_S)return u2;_S=1;var e=kde();return u2=e==="NODE",u2}var BS;function Ide(){if(BS)return bS;BS=1;var e=xt,t=Pde().left,r=gd(),n=hc(),u=Ode(),s=!u&&n>79&&n<83,o=s||!r("reduce");return e({target:"Array",proto:!0,forced:o},{reduce:function(i){var c=arguments.length;return t(this,i,c,c>1?arguments[1]:void 0)}}),bS}var s2,TS;function Nde(){if(TS)return s2;TS=1,Ide();var e=ys();return s2=e("Array","reduce"),s2}var o2,$S;function qde(){if($S)return o2;$S=1;var e=cn(),t=Nde(),r=Array.prototype;return o2=function(n){var u=n.reduce;return n===r||e(r,n)&&u===r.reduce?t:u},o2}var a2,PS;function xde(){if(PS)return a2;PS=1;var e=qde();return a2=e,a2}var i2,kS;function Rde(){return kS||(kS=1,i2=xde()),i2}var OS={},IS;function jde(){if(IS)return OS;IS=1;var e=xt,t=L3().map,r=x3(),n=r("map");return e({target:"Array",proto:!0,forced:!n},{map:function(s){return t(this,s,arguments.length>1?arguments[1]:void 0)}}),OS}var c2,NS;function Mde(){if(NS)return c2;NS=1,jde();var e=ys();return c2=e("Array","map"),c2}var l2,qS;function Lde(){if(qS)return l2;qS=1;var e=cn(),t=Mde(),r=Array.prototype;return l2=function(n){var u=n.map;return n===r||e(r,n)&&u===r.map?t:u},l2}var p2,xS;function Ude(){if(xS)return p2;xS=1;var e=Lde();return p2=e,p2}var d2,RS;function Gde(){return RS||(RS=1,d2=Ude()),d2}var jS;function Vde(){return jS||(jS=1,function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Rde()),s=n(Gde()),o=n(Ad()),a=n(Fd());/*! * XRegExp.build 5.1.1 * * Steven Levithan (c) 2012-present MIT License - */var i=function(l){var p="xregexp",f=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,d=l.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,f],"g",{conjunction:"or"});function h(F){var B=/^(?:\(\?:\))*\^/,P=/\$(?:\(\?:\))*$/;return B.test(F)&&P.test(F)&&P.test(F.replace(/\\[\s\S]/g,""))?F.replace(B,"").replace(P,""):F}function E(F,B){var P=B?"x":"";return l.isRegExp(F)?F[p]&&F[p].captureNames?F:l(F.source,P):l(F,P)}function A(F){return F instanceof RegExp?F:l.escape(F)}function m(F,B,P){return F["subpattern".concat(P)]=B,F}function y(F,B,P){var $=B1?I-1:0),j=1;j")):g="(?:",oe=Y;var w=U[C].pattern.replace(f,function(x,k,G){if(k){if(D=U[C].names[Y-oe],++Y,D)return"(?<".concat(D,">")}else if(G)return O=+G-1,U[C].names[O]?"\\k<".concat(U[C].names[O],">"):"\\".concat(+G+oe);return x});return(0,a.default)(b="".concat(g)).call(b,w,")")}if(q){if(D=De[ie],fe[++ie]=++Y,D)return"(?<".concat(D,">")}else if(v)return O=+v-1,De[O]?"\\k<".concat(De[O],">"):"\\".concat(fe[+v]);return Ce});return l(de,P)}};t.default=i,e.exports=t.default}(cl,cl.exports)),cl.exports}var ll={exports:{}},dS;function tpe(){return dS||(dS=1,function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Df()),s=n(hf()),o=n(gp());/*! + */var i=function(l){var p="xregexp",d=/(\()(?!\?)|\\([1-9]\d*)|\\[\s\S]|\[(?:[^\\\]]|\\[\s\S])*\]/g,f=l.union([/\({{([\w$]+)}}\)|{{([\w$]+)}}/,d],"g",{conjunction:"or"});function h(C){var B=/^(?:\(\?:\))*\^/,T=/\$(?:\(\?:\))*$/;return B.test(C)&&T.test(C)&&T.test(C.replace(/\\[\s\S]/g,""))?C.replace(B,"").replace(T,""):C}function y(C,B){var T=B?"x":"";return l.isRegExp(C)?C[p]&&C[p].captureNames?C:l(C.source,T):l(C,T)}function A(C){return C instanceof RegExp?C:l.escape(C)}function m(C,B,T){return C["subpattern".concat(T)]=B,C}function v(C,B,T){var N=B1?R-1:0),q=1;q")):g="(?:",ue=K;var w=J[F].pattern.replace(d,function(I,$,M){if($){if(D=J[F].names[K-ue],++K,D)return"(?<".concat(D,">")}else if(M)return P=+M-1,J[F].names[P]?"\\k<".concat(J[F].names[P],">"):"\\".concat(+M+ue);return I});return(0,a.default)(b="".concat(g)).call(b,w,")")}if(O){if(D=he[oe],de[++oe]=++K,D)return"(?<".concat(D,">")}else if(E)return P=+E-1,he[P]?"\\k<".concat(he[P],">"):"\\".concat(de[+E]);return ge});return l(fe,T)}};t.default=i,e.exports=t.default}(hl,hl.exports)),hl.exports}var ml={exports:{}},MS;function Hde(){return MS||(MS=1,function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Ad()),s=n(Fd()),o=n(_p());/*! * XRegExp.matchRecursive 5.1.1 * * Steven Levithan (c) 2009-present MIT License - */var a=function(c){function l(p,f,d,h){return{name:p,value:f,start:d,end:h}}c.matchRecursive=function(p,f,d,h,E){h=h||"",E=E||{};var A=(0,u.default)(h).call(h,"g")!==-1,m=(0,u.default)(h).call(h,"y")!==-1,y=h.replace(/y/g,"");f=c(f,y),d=c(d,y);var F,B=E,P=B.escapeChar;if(P){var $,I;if(P.length>1)throw new Error("Cannot use more than one escape character");P=c.escape(P),F=new RegExp((0,s.default)($=(0,s.default)(I="(?:".concat(P,"[\\S\\s]|(?:(?!")).call(I,c.union([f,d],"",{conjunction:"or"}).source,")[^")).call($,P,"])+)+"),h.replace(c._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}for(var U=0,j=0,W=0,te=0,Y,oe,ie,fe,De=E.valueNames,de=[];;){if(P&&(W+=(c.exec(p,F,W,"sticky")||[""])[0].length),ie=c.exec(p,f,W),fe=c.exec(p,d,W),ie&&fe&&(ie.index<=fe.index?fe=null:ie=null),ie||fe)j=(ie||fe).index,W=j+(ie||fe)[0].length;else if(!U)break;if(m&&!U&&j>te)break;if(ie)U||(Y=j,oe=W),U+=1;else if(fe&&U){if(U-=1,!U&&(De?(De[0]&&Y>te&&de.push(l(De[0],(0,o.default)(p).call(p,te,Y),te,Y)),De[1]&&de.push(l(De[1],(0,o.default)(p).call(p,Y,oe),Y,oe)),De[2]&&de.push(l(De[2],(0,o.default)(p).call(p,oe,j),oe,j)),De[3]&&de.push(l(De[3],(0,o.default)(p).call(p,j,W),j,W))):de.push((0,o.default)(p).call(p,oe,j)),te=W,!A))break}else{var Ce=E.unbalanced||"error";if(Ce==="skip"||Ce==="skip-lazy")if(fe)fe=null;else{if(Ce==="skip"){var pe=c.exec(p,f,Y,"sticky")[0].length;W=Y+(pe||1)}else W=Y+1;U=0}else if(Ce==="error"){var Q,q=fe?"right":"left",v=fe?j:Y;throw new Error((0,s.default)(Q="Unbalanced ".concat(q," delimiter found in string at position ")).call(Q,v))}else throw new Error("Unsupported value for unbalanced: ".concat(Ce))}j===W&&(W+=1)}return A&&de.length>0&&!m&&De&&De[0]&&p.length>te&&de.push(l(De[0],(0,o.default)(p).call(p,te),te,p.length)),de}};t.default=a,e.exports=t.default}(ll,ll.exports)),ll.exports}var pl={exports:{}},DS;function rpe(){return DS||(DS=1,function(e,t){var r=gp(),n=G9(),u=tw(),s=nw(),o=sw(),a=ms,i=Es;a(t,"__esModule",{value:!0}),t.default=void 0;var c=i(iw()),l=i(lw()),p=i(hf()),f=i(Df());function d(m,y){var F=typeof u<"u"&&s(m)||m["@@iterator"];if(!F){if(o(m)||(F=h(m))||y&&m&&typeof m.length=="number"){F&&(m=F);var B=0,P=function(){};return{s:P,n:function(){return B>=m.length?{done:!0}:{done:!1,value:m[B++]}},e:function(W){throw W},f:P}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. -In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var $=!0,I=!1,U;return{s:function(){F=F.call(m)},n:function(){var W=F.next();return $=W.done,W},e:function(W){I=!0,U=W},f:function(){try{!$&&F.return!=null&&F.return()}finally{if(I)throw U}}}}function h(m,y){var F;if(m){if(typeof m=="string")return E(m,y);var B=r(F=Object.prototype.toString.call(m)).call(F,8,-1);if(B==="Object"&&m.constructor&&(B=m.constructor.name),B==="Map"||B==="Set")return n(m);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return E(m,y)}}function E(m,y){(y==null||y>m.length)&&(y=m.length);for(var F=0,B=new Array(y);F1)throw new Error("Cannot use more than one escape character");T=c.escape(T),C=new RegExp((0,s.default)(N=(0,s.default)(R="(?:".concat(T,"[\\S\\s]|(?:(?!")).call(R,c.union([d,f],"",{conjunction:"or"}).source,")[^")).call(N,T,"])+)+"),h.replace(c._hasNativeFlag("s")?/[^imsu]/g:/[^imu]/g,""))}for(var J=0,q=0,G=0,ee=0,K,ue,oe,de,he=y.valueNames,fe=[];;){if(T&&(G+=(c.exec(p,C,G,"sticky")||[""])[0].length),oe=c.exec(p,d,G),de=c.exec(p,f,G),oe&&de&&(oe.index<=de.index?de=null:oe=null),oe||de)q=(oe||de).index,G=q+(oe||de)[0].length;else if(!J)break;if(m&&!J&&q>ee)break;if(oe)J||(K=q,ue=G),J+=1;else if(de&&J){if(J-=1,!J&&(he?(he[0]&&K>ee&&fe.push(l(he[0],(0,o.default)(p).call(p,ee,K),ee,K)),he[1]&&fe.push(l(he[1],(0,o.default)(p).call(p,K,ue),K,ue)),he[2]&&fe.push(l(he[2],(0,o.default)(p).call(p,ue,q),ue,q)),he[3]&&fe.push(l(he[3],(0,o.default)(p).call(p,q,G),q,G))):fe.push((0,o.default)(p).call(p,ue,q)),ee=G,!A))break}else{var ge=y.unbalanced||"error";if(ge==="skip"||ge==="skip-lazy")if(de)de=null;else{if(ge==="skip"){var pe=c.exec(p,d,K,"sticky")[0].length;G=K+(pe||1)}else G=K+1;J=0}else if(ge==="error"){var z,O=de?"right":"left",E=de?q:K;throw new Error((0,s.default)(z="Unbalanced ".concat(O," delimiter found in string at position ")).call(z,E))}else throw new Error("Unsupported value for unbalanced: ".concat(ge))}q===G&&(G+=1)}return A&&fe.length>0&&!m&&he&&he[0]&&p.length>ee&&fe.push(l(he[0],(0,o.default)(p).call(p,ee),ee,p.length)),fe}};t.default=a,e.exports=t.default}(ml,ml.exports)),ml.exports}var El={exports:{}},LS;function Wde(){return LS||(LS=1,function(e,t){var r=_p(),n=Pw(),u=Gw(),s=Hw(),o=Jw(),a=hs,i=ms;a(t,"__esModule",{value:!0}),t.default=void 0;var c=i(Xw()),l=i(Zw()),p=i(Fd()),d=i(Ad());function f(m,v){var C=typeof u<"u"&&s(m)||m["@@iterator"];if(!C){if(o(m)||(C=h(m))||v){C&&(m=C);var B=0,T=function(){};return{s:T,n:function(){return B>=m.length?{done:!0}:{done:!1,value:m[B++]}},e:function(G){throw G},f:T}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var N=!0,R=!1,J;return{s:function(){C=C.call(m)},n:function(){var G=C.next();return N=G.done,G},e:function(G){R=!0,J=G},f:function(){try{!N&&C.return!=null&&C.return()}finally{if(R)throw J}}}}function h(m,v){var C;if(m){if(typeof m=="string")return y(m,v);var B=r(C=Object.prototype.toString.call(m)).call(C,8,-1);if(B==="Object"&&m.constructor&&(B=m.constructor.name),B==="Map"||B==="Set")return n(m);if(B==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(B))return y(m,v)}}function y(m,v){(v==null||v>m.length)&&(v=m.length);for(var C=0,B=new Array(v);C * Steven Levithan (c) 2008-present MIT License - */var A=function(y){var F={},B={},P=y._dec,$=y._hex,I=y._pad4;function U(ie){return ie.replace(/[- _]+/g,"").toLowerCase()}function j(ie){var fe=/^\\[xu](.+)/.exec(ie);return fe?P(fe[1]):ie.charCodeAt(ie[0]==="\\"?1:0)}function W(ie){var fe="",De=-1;return(0,l.default)(y).call(y,ie,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(de){var Ce=j(de[1]);Ce>De+1&&(fe+="\\u".concat(I($(De+1))),Ce>De+2&&(fe+="-\\u".concat(I($(Ce-1))))),De=j(de[2]||de[1])}),De<65535&&(fe+="\\u".concat(I($(De+1))),De<65534&&(fe+="-\\uFFFF")),fe}function te(ie){var fe="b!";return F[ie][fe]||(F[ie][fe]=W(F[ie].bmp))}function Y(ie,fe){var De=F[ie],de="";if(De.bmp&&!De.isBmpLast){var Ce;de=(0,p.default)(Ce="[".concat(De.bmp,"]")).call(Ce,De.astral?"|":"")}if(De.astral&&(de+=De.astral),De.isBmpLast&&De.bmp){var pe;de+=(0,p.default)(pe="".concat(De.astral?"|":"","[")).call(pe,De.bmp,"]")}return fe?"(?:(?!".concat(de,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-￿]))"):"(?:".concat(de,")")}function oe(ie,fe){var De=fe?"a!":"a=";return F[ie][De]||(F[ie][De]=Y(ie,fe))}y.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,function(ie,fe,De){var de="Invalid double negation ",Ce="Unknown Unicode token ",pe="Unicode token missing data ",Q="Astral mode required for Unicode token ",q="Astral mode does not support Unicode tokens within character classes",v=(0,c.default)(ie,6),C=v[0],D=v[1],g=v[2],O=v[3],b=v[4],w=v[5],x=D==="P"||!!g,k=(0,f.default)(De).call(De,"A")!==-1,G=U(w||b),H=F[G];if(D==="P"&&g)throw new SyntaxError(de+C);if(!F.hasOwnProperty(G))throw new SyntaxError(Ce+C);if(O&&!(B[O]&&B[O][G]))throw new SyntaxError(Ce+C);if(H.inverseOf){if(G=U(H.inverseOf),!F.hasOwnProperty(G)){var re;throw new ReferenceError((0,p.default)(re="".concat(pe+C," -> ")).call(re,H.inverseOf))}H=F[G],x=!x}if(!(H.bmp||k))throw new SyntaxError(Q+C);if(k){if(fe==="class")throw new SyntaxError(q);return oe(G,x)}return fe==="class"?x?te(G):H.bmp:"".concat((x?"[^":"[")+H.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),y.addUnicodeData=function(ie,fe){var De="Unicode token requires name",de="Unicode token has no character data ";fe&&(B[fe]={});var Ce=d(ie),pe;try{for(Ce.s();!(pe=Ce.n()).done;){var Q=pe.value;if(!Q.name)throw new Error(De);if(!(Q.inverseOf||Q.bmp||Q.astral))throw new Error(de+Q.name);var q=U(Q.name);if(F[q]=Q,fe&&(B[fe][q]=!0),Q.alias){var v=U(Q.alias);F[v]=Q,fe&&(B[fe][v]=!0)}}}catch(C){Ce.e(C)}finally{Ce.f()}y.cache.flush("patterns")},y._getUnicodeProperty=function(ie){var fe=U(ie);return F[fe]}};t.default=A,e.exports=t.default}(pl,pl.exports)),pl.exports}var fl={exports:{}},n2,hS;function npe(){return hS||(hS=1,n2=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCBD\uDCC3-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\uFEFF-",astral:"\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCC3-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F\uDC39-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD00-\uDD43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD838[\uDD37-\uDD3D]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF4A\uDF50]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|𝼊|\uD838[\uDD00-\uDD2C\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD30-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C\uDFC0-\uDFD4]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\uD807[\uDFDD-\uDFE0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\uD83C[\uDFFB-\uDFFF]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFDC\uDFE1-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|𞅏|\uD83B[\uDCAC\uDD2E]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}]),n2}var mS;function upe(){return mS||(mS=1,function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(npe());/*! + */var A=function(v){var C={},B={},T=v._dec,N=v._hex,R=v._pad4;function J(oe){return oe.replace(/[- _]+/g,"").toLowerCase()}function q(oe){var de=/^\\[xu](.+)/.exec(oe);return de?T(de[1]):oe.charCodeAt(oe[0]==="\\"?1:0)}function G(oe){var de="",he=-1;return(0,l.default)(v).call(v,oe,/(\\x..|\\u....|\\?[\s\S])(?:-(\\x..|\\u....|\\?[\s\S]))?/,function(fe){var ge=q(fe[1]);ge>he+1&&(de+="\\u".concat(R(N(he+1))),ge>he+2&&(de+="-\\u".concat(R(N(ge-1))))),he=q(fe[2]||fe[1])}),he<65535&&(de+="\\u".concat(R(N(he+1))),he<65534&&(de+="-\\uFFFF")),de}function ee(oe){var de="b!";return C[oe][de]||(C[oe][de]=G(C[oe].bmp))}function K(oe,de){var he=C[oe],fe="";if(he.bmp&&!he.isBmpLast){var ge;fe=(0,p.default)(ge="[".concat(he.bmp,"]")).call(ge,he.astral?"|":"")}if(he.astral&&(fe+=he.astral),he.isBmpLast&&he.bmp){var pe;fe+=(0,p.default)(pe="".concat(he.astral?"|":"","[")).call(pe,he.bmp,"]")}return de?"(?:(?!".concat(fe,")(?:[\uD800-\uDBFF][\uDC00-\uDFFF]|[\0-￿]))"):"(?:".concat(fe,")")}function ue(oe,de){var he=de?"a!":"a=";return C[oe][he]||(C[oe][he]=K(oe,de))}v.addToken(/\\([pP])(?:{(\^?)(?:(\w+)=)?([^}]*)}|([A-Za-z]))/,function(oe,de,he){var fe="Invalid double negation ",ge="Unknown Unicode token ",pe="Unicode token missing data ",z="Astral mode required for Unicode token ",O="Astral mode does not support Unicode tokens within character classes",E=(0,c.default)(oe,6),F=E[0],D=E[1],g=E[2],P=E[3],b=E[4],w=E[5],I=D==="P"||!!g,$=(0,d.default)(he).call(he,"A")!==-1,M=J(w||b),L=C[M];if(D==="P"&&g)throw new SyntaxError(fe+F);if(!C.hasOwnProperty(M))throw new SyntaxError(ge+F);if(P&&!(B[P]&&B[P][M]))throw new SyntaxError(ge+F);if(L.inverseOf){if(M=J(L.inverseOf),!C.hasOwnProperty(M)){var Y;throw new ReferenceError((0,p.default)(Y="".concat(pe+F," -> ")).call(Y,L.inverseOf))}L=C[M],I=!I}if(!(L.bmp||$))throw new SyntaxError(z+F);if($){if(de==="class")throw new SyntaxError(O);return ue(M,I)}return de==="class"?I?ee(M):L.bmp:"".concat((I?"[^":"[")+L.bmp,"]")},{scope:"all",optionalFlags:"A",leadChar:"\\"}),v.addUnicodeData=function(oe,de){var he="Unicode token requires name",fe="Unicode token has no character data ";de&&(B[de]={});var ge=f(oe),pe;try{for(ge.s();!(pe=ge.n()).done;){var z=pe.value;if(!z.name)throw new Error(he);if(!(z.inverseOf||z.bmp||z.astral))throw new Error(fe+z.name);var O=J(z.name);if(C[O]=z,de&&(B[de][O]=!0),z.alias){var E=J(z.alias);C[E]=z,de&&(B[de][E]=!0)}}}catch(F){ge.e(F)}finally{ge.f()}v.cache.flush("patterns")},v._getUnicodeProperty=function(oe){var de=J(oe);return C[de]}};t.default=A,e.exports=t.default}(El,El.exports)),El.exports}var yl={exports:{}},f2,US;function Jde(){return US||(US=1,f2=[{name:"C",alias:"Other",isBmpLast:!0,bmp:"\0--Ÿ­͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-؅؜۝܎܏݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏-ࢗ࣢঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠎᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿​-‏‪-‮⁠-⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽-＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCBD\uDCC3-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA0-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDD73-\uDD7A\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]"},{name:"Cc",alias:"Control",bmp:"\0--Ÿ"},{name:"Cf",alias:"Format",bmp:"­؀-؅؜۝܏࢐࢑࣢᠎​-‏‪-‮⁠-⁤⁦-\uFEFF-",astral:"\uD804[\uDCBD\uDCCD]|\uD80D[\uDC30-\uDC38]|\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Cn",alias:"Unassigned",bmp:"͸͹΀-΃΋΍΢԰՗՘֋֌֐׈-׏׫-׮׵-׿܎݋݌޲-޿߻߼࠮࠯࠿࡜࡝࡟࡫-࡯࢏࢒-ࢗ঄঍঎঑঒঩঱঳-঵঺঻৅৆৉৊৏-৖৘-৛৞৤৥৿਀਄਋-਎਑਒਩਱਴਷਺਻਽੃-੆੉੊੎-੐੒-੘੝੟-੥੷-઀઄઎઒઩઱઴઺઻૆૊૎૏૑-૟૤૥૲-૸଀଄଍଎଑଒଩଱଴଺଻୅୆୉୊୎-୔୘-୛୞୤୥୸-஁஄஋-஍஑஖-஘஛஝஠-஢஥-஧஫-஭஺-஽௃-௅௉௎௏௑-௖௘-௥௻-௿఍఑఩఺఻౅౉౎-౔౗౛౜౞౟౤౥౰-౶಍಑಩಴಺಻೅೉೎-೔೗-೜೟೤೥೰ೳ-೿഍഑൅൉൐-൓൤൥඀඄඗-඙඲඼඾඿෇-෉෋-෎෕෗෠-෥෰෱෵-฀฻-฾๜-຀຃຅຋຤຦຾຿໅໇໎໏໚໛໠-໿཈཭-཰྘྽࿍࿛-࿿჆჈-჌჎჏቉቎቏቗቙቞቟኉኎኏኱኶኷኿዁዆዇዗጑጖጗፛፜፽-፿᎚-᎟᏶᏷᏾᏿᚝-᚟᛹-᛿᜖-᜞᜷-᜿᝔-᝟᝭᝱᝴-᝿៞៟៪-៯៺-៿᠚-᠟᡹-᡿᢫-᢯᣶-᣿᤟᤬-᤯᤼-᤿᥁-᥃᥮᥯᥵-᥿᦬-᦯᧊-᧏᧛-᧝᨜᨝᩟᩽᩾᪊-᪏᪚-᪟᪮᪯᫏-᫿᭍-᭏᭿᯴-᯻᰸-᰺᱊-᱌Ᲊ-᲏᲻᲼᳈-᳏᳻-᳿἖἗἞἟὆὇὎὏὘὚὜὞὾὿᾵῅῔῕῜῰῱῵῿⁥⁲⁳₏₝-₟⃁-⃏⃱-⃿↌-↏␧-␿⑋-⑟⭴⭵⮖⳴-⳸⴦⴨-⴬⴮⴯⵨-⵮⵱-⵾⶗-⶟⶧⶯⶷⶿⷇⷏⷗⷟⹞-⹿⺚⻴-⻿⿖-⿯⿼-⿿぀゗゘㄀-㄄㄰㆏㇤-㇯㈟꒍-꒏꓇-꓏꘬-꘿꛸-꛿Ɤ-꟏꟒꟔Ꟛ-꟱꠭-꠯꠺-꠿꡸-꡿꣆-꣍꣚-꣟꥔-꥞꥽-꥿꧎꧚-꧝꧿꨷-꨿꩎꩏꩚꩛꫃-꫚꫷-꬀꬇꬈꬏꬐꬗-꬟꬧꬯꭬-꭯꯮꯯꯺-꯿힤-힯퟇-퟊퟼-퟿﩮﩯﫚-﫿﬇-﬒﬘-﬜﬷﬽﬿﭂﭅﯃-﯒﶐﶑﷈-﷎﷐-﷯︚-︟﹓﹧﹬-﹯﹵﻽﻾＀﾿-￁￈￉￐￑￘￙￝-￟￧￯-￸￾￿",astral:"\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDCFF\uDD03-\uDD06\uDD34-\uDD36\uDD8F\uDD9D-\uDD9F\uDDA1-\uDDCF\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEFC-\uDEFF\uDF24-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDFC4-\uDFC7\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDD6E\uDD7B\uDD8B\uDD93\uDD96\uDDA2\uDDB2\uDDBA\uDDBD-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDF7F\uDF86\uDFB1\uDFBB-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56\uDC9F-\uDCA6\uDCB0-\uDCDF\uDCF3\uDCF6-\uDCFA\uDD1C-\uDD1E\uDD3A-\uDD3E\uDD40-\uDD7F\uDDB8-\uDDBB\uDDD0\uDDD1\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE49-\uDE4F\uDE59-\uDE5F\uDEA0-\uDEBF\uDEE7-\uDEEA\uDEF7-\uDEFF\uDF36-\uDF38\uDF56\uDF57\uDF73-\uDF77\uDF92-\uDF98\uDF9D-\uDFA8\uDFB0-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCF9\uDD28-\uDD2F\uDD3A-\uDE5F\uDE7F\uDEAA\uDEAE\uDEAF\uDEB2-\uDEFF\uDF28-\uDF2F\uDF5A-\uDF6F\uDF8A-\uDFAF\uDFCC-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC4E-\uDC51\uDC76-\uDC7E\uDCC3-\uDCCC\uDCCE\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD48-\uDD4F\uDD77-\uDD7F\uDDE0\uDDF5-\uDDFF\uDE12\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEAA-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC5C\uDC62-\uDC7F\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDDE-\uDDFF\uDE45-\uDE4F\uDE5A-\uDE5F\uDE6D-\uDE7F\uDEBA-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF47-\uDFFF]|\uD806[\uDC3C-\uDC9F\uDCF3-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD47-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE5-\uDDFF\uDE48-\uDE4F\uDEA3-\uDEAF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC46-\uDC4F\uDC6D-\uDC6F\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF9-\uDFAF\uDFB1-\uDFBF\uDFF2-\uDFFE]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F\uDC75-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80E-\uD810\uD812-\uD819\uD824-\uD82A\uD82D\uD82E\uD830-\uD832\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDB7F][\uDC00-\uDFFF]|\uD80B[\uDC00-\uDF8F\uDFF3-\uDFFF]|\uD80D[\uDC2F\uDC39-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDE6D\uDEBF\uDECA-\uDECF\uDEEE\uDEEF\uDEF6-\uDEFF\uDF46-\uDF4F\uDF5A\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE9B-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82B[\uDC00-\uDFEF\uDFF4\uDFFC\uDFFF]|\uD82C[\uDD23-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A\uDC9B\uDCA4-\uDFFF]|\uD833[\uDC00-\uDEFF\uDF2E\uDF2F\uDF47-\uDF4F\uDFC4-\uDFFF]|\uD834[\uDCF6-\uDCFF\uDD27\uDD28\uDDEB-\uDDFF\uDE46-\uDEDF\uDEF4-\uDEFF\uDF57-\uDF5F\uDF79-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDFCC\uDFCD]|\uD836[\uDE8C-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD837[\uDC00-\uDEFF\uDF1F-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD50-\uDE8F\uDEAF-\uDEBF\uDEFA-\uDEFE\uDF00-\uDFFF]|\uD839[\uDC00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDD5D\uDD60-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCB5-\uDD00\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDEEF\uDEF2-\uDFFF]|\uD83C[\uDC2C-\uDC2F\uDC94-\uDC9F\uDCAF\uDCB0\uDCC0\uDCD0\uDCF6-\uDCFF\uDDAE-\uDDE5\uDE03-\uDE0F\uDE3C-\uDE3F\uDE49-\uDE4F\uDE52-\uDE5F\uDE66-\uDEFF]|\uD83D[\uDED8-\uDEDC\uDEED-\uDEEF\uDEFD-\uDEFF\uDF74-\uDF7F\uDFD9-\uDFDF\uDFEC-\uDFEF\uDFF1-\uDFFF]|\uD83E[\uDC0C-\uDC0F\uDC48-\uDC4F\uDC5A-\uDC5F\uDC88-\uDC8F\uDCAE\uDCAF\uDCB2-\uDCFF\uDE54-\uDE5F\uDE6E\uDE6F\uDE75-\uDE77\uDE7D-\uDE7F\uDE87-\uDE8F\uDEAD-\uDEAF\uDEBB-\uDEBF\uDEC6-\uDECF\uDEDA-\uDEDF\uDEE8-\uDEEF\uDEF7-\uDEFF\uDF93\uDFCB-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86D[\uDF39-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00\uDC02-\uDC1F\uDC80-\uDCFF\uDDF0-\uDFFF]|[\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Co",alias:"Private_Use",bmp:"-",astral:"[\uDB80-\uDBBE\uDBC0-\uDBFE][\uDC00-\uDFFF]|[\uDBBF\uDBFF][\uDC00-\uDFFD]"},{name:"Cs",alias:"Surrogate",bmp:"\uD800-\uDFFF"},{name:"L",alias:"Letter",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〆〱-〵〻〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛥꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"LC",alias:"Cased_Letter",bmp:"A-Za-zµÀ-ÖØ-öø-ƺƼ-ƿDŽ-ʓʕ-ʯͰ-ͳͶͷͻ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՠ-ֈႠ-ჅჇჍა-ჺჽ-ჿᎠ-Ᏽᏸ-ᏽᲀ-ᲈᲐ-ᲺᲽ-Ჿᴀ-ᴫᵫ-ᵷᵹ-ᶚḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℴℹℼ-ℿⅅ-ⅉⅎↃↄⰀ-ⱻⱾ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭꙀ-ꙭꚀ-ꚛꜢ-ꝯꝱ-ꞇꞋ-ꞎꞐ-ꟊꟐꟑꟓꟕ-ꟙꟵꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗA-Za-z",astral:"\uD801[\uDC00-\uDC4F\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2]|\uD806[\uDCA0-\uDCDF]|\uD81B[\uDE40-\uDE7F]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD00-\uDD43]"},{name:"Ll",alias:"Lowercase_Letter",bmp:"a-zµß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʯͱͳͷͻ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᴫᵫ-ᵷᵹ-ᶚḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎↄⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱻⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯꝱ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟺꬰ-ꭚꭠ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Lm",alias:"Modifier_Letter",bmp:"ʰ-ˁˆ-ˑˠ-ˤˬˮʹͺՙـۥۦߴߵߺࠚࠤࠨࣉॱๆໆჼៗᡃᪧᱸ-ᱽᴬ-ᵪᵸᶛ-ᶿⁱⁿₐ-ₜⱼⱽⵯⸯ々〱-〵〻ゝゞー-ヾꀕꓸ-ꓽꘌꙿꚜꚝꜗ-ꜟꝰꞈꟲ-ꟴꟸꟹꧏꧦꩰꫝꫳꫴꭜ-ꭟꭩー゙゚",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD81A[\uDF40-\uDF43]|\uD81B[\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD838[\uDD37-\uDD3D]|𞥋"},{name:"Lo",alias:"Other_Letter",bmp:"ªºƻǀ-ǃʔא-תׯ-ײؠ-ؿف-يٮٯٱ-ۓەۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪࠀ-ࠕࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣈऄ-हऽॐक़-ॡॲ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๅກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛱ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៜᠠ-ᡂᡄ-ᡸᢀ-ᢄᢇ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱷᳩ-ᳬᳮ-ᳳᳵᳶᳺℵ-ℸⴰ-ⵧⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ〆〼ぁ-ゖゟァ-ヺヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꀔꀖ-ꒌꓐ-ꓷꔀ-ꘋꘐ-ꘟꘪꘫꙮꚠ-ꛥꞏꟷꟻ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧠ-ꧤꧧ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩯꩱ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛꫜꫠ-ꫪꫲꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎יִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼヲ-ッア-ンᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC50-\uDC9D\uDD00-\uDD27\uDD30-\uDD63\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDF00-\uDF4A\uDF50]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|𝼊|\uD838[\uDD00-\uDD2C\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Lt",alias:"Titlecase_Letter",bmp:"DžLjNjDzᾈ-ᾏᾘ-ᾟᾨ-ᾯᾼῌῼ"},{name:"Lu",alias:"Uppercase_Letter",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅↃⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]"},{name:"M",alias:"Mark",bmp:"̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣঁ-ঃ়া-ৄেৈো-্ৗৢৣ৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑੰੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣஂா-ூெ-ைொ-்ௗఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣඁ-ඃ්ා-ුූෘ-ෟෲෳัิ-ฺ็-๎ັິ-ຼ່-ໍ༹༘༙༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏႚ-ႝ፝-፟ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤫᤰ-᤻ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼᪰-ᫎᬀ-ᬄ᬴-᭄᭫-᭳ᮀ-ᮂᮡ-ᮭ᯦-᯳ᰤ-᰷᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿⃐-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꙯-꙲ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀ꧥꨩ-ꨶꩃꩌꩍꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"Mc",alias:"Spacing_Mark",bmp:"ःऻा-ीॉ-ौॎॏংঃা-ীেৈোৌৗਃਾ-ੀઃા-ીૉોૌଂଃାୀେୈୋୌୗாிுூெ-ைொ-ௌௗఁ-ఃు-ౄಂಃಾೀ-ೄೇೈೊೋೕೖംഃാ-ീെ-ൈൊ-ൌൗංඃා-ෑෘ-ෟෲෳ༾༿ཿါာေးျြၖၗၢ-ၤၧ-ၭႃႄႇ-ႌႏႚ-ႜ᜕᜴ាើ-ៅះៈᤣ-ᤦᤩ-ᤫᤰᤱᤳ-ᤸᨙᨚᩕᩗᩡᩣᩤᩭ-ᩲᬄᬵᬻᬽ-ᭁᭃ᭄ᮂᮡᮦᮧ᮪ᯧᯪ-ᯬᯮ᯲᯳ᰤ-ᰫᰴᰵ᳡᳷〮〯ꠣꠤꠧꢀꢁꢴ-ꣃꥒ꥓ꦃꦴꦵꦺꦻꦾ-꧀ꨯꨰꨳꨴꩍꩻꩽꫫꫮꫯꫵꯣꯤꯦꯧꯩꯪ꯬",astral:"\uD804[\uDC00\uDC02\uDC82\uDCB0-\uDCB2\uDCB7\uDCB8\uDD2C\uDD45\uDD46\uDD82\uDDB3-\uDDB5\uDDBF\uDDC0\uDDCE\uDE2C-\uDE2E\uDE32\uDE33\uDE35\uDEE0-\uDEE2\uDF02\uDF03\uDF3E\uDF3F\uDF41-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63]|\uD805[\uDC35-\uDC37\uDC40\uDC41\uDC45\uDCB0-\uDCB2\uDCB9\uDCBB-\uDCBE\uDCC1\uDDAF-\uDDB1\uDDB8-\uDDBB\uDDBE\uDE30-\uDE32\uDE3B\uDE3C\uDE3E\uDEAC\uDEAE\uDEAF\uDEB6\uDF20\uDF21\uDF26]|\uD806[\uDC2C-\uDC2E\uDC38\uDD30-\uDD35\uDD37\uDD38\uDD3D\uDD40\uDD42\uDDD1-\uDDD3\uDDDC-\uDDDF\uDDE4\uDE39\uDE57\uDE58\uDE97]|\uD807[\uDC2F\uDC3E\uDCA9\uDCB1\uDCB4\uDD8A-\uDD8E\uDD93\uDD94\uDD96\uDEF5\uDEF6]|\uD81B[\uDF51-\uDF87\uDFF0\uDFF1]|\uD834[\uDD65\uDD66\uDD6D-\uDD72]"},{name:"Me",alias:"Enclosing_Mark",bmp:"҈҉᪾⃝-⃠⃢-⃤꙰-꙲"},{name:"Mn",alias:"Nonspacing_Mark",bmp:"̀-ͯ҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ंऺ़ु-ै्॑-ॗॢॣঁ়ু-ৄ্ৢৣ৾ਁਂ਼ੁੂੇੈੋ-੍ੑੰੱੵઁં઼ુ-ૅેૈ્ૢૣૺ-૿ଁ଼ିୁ-ୄ୍୕ୖୢୣஂீ்ఀఄ఼ా-ీె-ైొ-్ౕౖౢౣಁ಼ಿೆೌ್ೢೣഀഁ഻഼ു-ൄ്ൢൣඁ්ි-ුූัิ-ฺ็-๎ັິ-ຼ່-ໍཱ༹༘༙༵༷-ཾྀ-྄྆྇ྍ-ྗྙ-ྼ࿆ိ-ူဲ-့္်ွှၘၙၞ-ၠၱ-ၴႂႅႆႍႝ፝-፟ᜒ-᜔ᜲᜳᝒᝓᝲᝳ឴឵ិ-ួំ៉-៓៝᠋-᠍᠏ᢅᢆᢩᤠ-ᤢᤧᤨᤲ᤹-᤻ᨘᨗᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽ᪿ-ᫎᬀ-ᬃ᬴ᬶ-ᬺᬼᭂ᭫-᭳ᮀᮁᮢ-ᮥᮨᮩ᮫-ᮭ᯦ᯨᯩᯭᯯ-ᯱᰬ-ᰳᰶ᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〭꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠥꠦ꠬꣄ꣅ꣠-꣱ꣿꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼꦽꧥꨩ-ꨮꨱꨲꨵꨶꩃꩌꩼꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫬꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-︯",astral:"\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDEAB\uDEAC\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC01\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC81\uDCB3-\uDCB6\uDCB9\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD2B\uDD2D-\uDD34\uDD73\uDD80\uDD81\uDDB6-\uDDBE\uDDC9-\uDDCC\uDDCF\uDE2F-\uDE31\uDE34\uDE36\uDE37\uDE3E\uDEDF\uDEE3-\uDEEA\uDF00\uDF01\uDF3B\uDF3C\uDF40\uDF66-\uDF6C\uDF70-\uDF74]|\uD805[\uDC38-\uDC3F\uDC42-\uDC44\uDC46\uDC5E\uDCB3-\uDCB8\uDCBA\uDCBF\uDCC0\uDCC2\uDCC3\uDDB2-\uDDB5\uDDBC\uDDBD\uDDBF\uDDC0\uDDDC\uDDDD\uDE33-\uDE3A\uDE3D\uDE3F\uDE40\uDEAB\uDEAD\uDEB0-\uDEB5\uDEB7\uDF1D-\uDF1F\uDF22-\uDF25\uDF27-\uDF2B]|\uD806[\uDC2F-\uDC37\uDC39\uDC3A\uDD3B\uDD3C\uDD3E\uDD43\uDDD4-\uDDD7\uDDDA\uDDDB\uDDE0\uDE01-\uDE0A\uDE33-\uDE38\uDE3B-\uDE3E\uDE47\uDE51-\uDE56\uDE59-\uDE5B\uDE8A-\uDE96\uDE98\uDE99]|\uD807[\uDC30-\uDC36\uDC38-\uDC3D\uDC3F\uDC92-\uDCA7\uDCAA-\uDCB0\uDCB2\uDCB3\uDCB5\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD90\uDD91\uDD95\uDD97\uDEF3\uDEF4]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF8F-\uDF92\uDFE4]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF]"},{name:"N",alias:"Number",bmp:"0-9²³¹¼-¾٠-٩۰-۹߀-߉०-९০-৯৴-৹੦-੯૦-૯୦-୯୲-୷௦-௲౦-౯౸-౾೦-೯൘-൞൦-൸෦-෯๐-๙໐-໙༠-༳၀-၉႐-႙፩-፼ᛮ-ᛰ០-៩៰-៹᠐-᠙᥆-᥏᧐-᧚᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙⁰⁴-⁹₀-₉⅐-ↂↅ-↉①-⒛⓪-⓿❶-➓⳽〇〡-〩〸-〺㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꘠-꘩ꛦ-ꛯ꠰-꠵꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD800[\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23\uDF41\uDF4A\uDFD1-\uDFD5]|\uD801[\uDCA0-\uDCA9]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDD30-\uDD39\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDDE1-\uDDF4\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF3B]|\uD806[\uDCE0-\uDCF2\uDD50-\uDD59]|\uD807[\uDC50-\uDC6C\uDD50-\uDD59\uDDA0-\uDDA9\uDFC0-\uDFD4]|\uD809[\uDC00-\uDC6E]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDCC7-\uDCCF\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nd",alias:"Decimal_Number",bmp:"0-9٠-٩۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯෦-෯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꧰-꧹꩐-꩙꯰-꯹0-9",astral:"\uD801[\uDCA0-\uDCA9]|\uD803[\uDD30-\uDD39]|\uD804[\uDC66-\uDC6F\uDCF0-\uDCF9\uDD36-\uDD3F\uDDD0-\uDDD9\uDEF0-\uDEF9]|\uD805[\uDC50-\uDC59\uDCD0-\uDCD9\uDE50-\uDE59\uDEC0-\uDEC9\uDF30-\uDF39]|\uD806[\uDCE0-\uDCE9\uDD50-\uDD59]|\uD807[\uDC50-\uDC59\uDD50-\uDD59\uDDA0-\uDDA9]|\uD81A[\uDE60-\uDE69\uDEC0-\uDEC9\uDF50-\uDF59]|\uD835[\uDFCE-\uDFFF]|\uD838[\uDD40-\uDD49\uDEF0-\uDEF9]|\uD83A[\uDD50-\uDD59]|\uD83E[\uDFF0-\uDFF9]"},{name:"Nl",alias:"Letter_Number",bmp:"ᛮ-ᛰⅠ-ↂↅ-ↈ〇〡-〩〸-〺ꛦ-ꛯ",astral:"\uD800[\uDD40-\uDD74\uDF41\uDF4A\uDFD1-\uDFD5]|\uD809[\uDC00-\uDC6E]"},{name:"No",alias:"Other_Number",bmp:"²³¹¼-¾৴-৹୲-୷௰-௲౸-౾൘-൞൰-൸༪-༳፩-፼៰-៹᧚⁰⁴-⁹₀-₉⅐-⅟↉①-⒛⓪-⓿❶-➓⳽㆒-㆕㈠-㈩㉈-㉏㉑-㉟㊀-㊉㊱-㊿꠰-꠵",astral:"\uD800[\uDD07-\uDD33\uDD75-\uDD78\uDD8A\uDD8B\uDEE1-\uDEFB\uDF20-\uDF23]|\uD802[\uDC58-\uDC5F\uDC79-\uDC7F\uDCA7-\uDCAF\uDCFB-\uDCFF\uDD16-\uDD1B\uDDBC\uDDBD\uDDC0-\uDDCF\uDDD2-\uDDFF\uDE40-\uDE48\uDE7D\uDE7E\uDE9D-\uDE9F\uDEEB-\uDEEF\uDF58-\uDF5F\uDF78-\uDF7F\uDFA9-\uDFAF]|\uD803[\uDCFA-\uDCFF\uDE60-\uDE7E\uDF1D-\uDF26\uDF51-\uDF54\uDFC5-\uDFCB]|\uD804[\uDC52-\uDC65\uDDE1-\uDDF4]|\uD805[\uDF3A\uDF3B]|\uD806[\uDCEA-\uDCF2]|\uD807[\uDC5A-\uDC6C\uDFC0-\uDFD4]|\uD81A[\uDF5B-\uDF61]|\uD81B[\uDE80-\uDE96]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD83A[\uDCC7-\uDCCF]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D]|\uD83C[\uDD00-\uDD0C]"},{name:"P",alias:"Punctuation",bmp:"!-#%-\\*,-\\/:;\\?@\\[-\\]_\\{\\}¡§«¶·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔༺-༽྅࿐-࿔࿙࿚၊-၏჻፠-፨᐀᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎⌈-⌋〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰-⹏⹒-⹝、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDEAD\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Pc",alias:"Connector_Punctuation",bmp:"_‿⁀⁔︳︴﹍-﹏_"},{name:"Pd",alias:"Dash_Punctuation",bmp:"\\-֊־᐀᠆‐-―⸗⸚⸺⸻⹀⹝〜〰゠︱︲﹘﹣-",astral:"𐺭"},{name:"Pe",alias:"Close_Punctuation",bmp:"\\)\\]\\}༻༽᚜⁆⁾₎⌉⌋〉❩❫❭❯❱❳❵⟆⟧⟩⟫⟭⟯⦄⦆⦈⦊⦌⦎⦐⦒⦔⦖⦘⧙⧛⧽⸣⸥⸧⸩⹖⹘⹚⹜〉》」』】〕〗〙〛〞〟﴾︘︶︸︺︼︾﹀﹂﹄﹈﹚﹜﹞)]}⦆」"},{name:"Pf",alias:"Final_Punctuation",bmp:"»’”›⸃⸅⸊⸍⸝⸡"},{name:"Pi",alias:"Initial_Punctuation",bmp:"«‘‛“‟‹⸂⸄⸉⸌⸜⸠"},{name:"Po",alias:"Other_Punctuation",bmp:"!-#%-'\\*,\\.\\/:;\\?@\\¡§¶·¿;·՚-՟։׀׃׆׳״؉؊،؍؛؝-؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰৽੶૰౷಄෴๏๚๛༄-༒༔྅࿐-࿔࿙࿚၊-၏჻፠-፨᙮᛫-᛭᜵᜶។-៖៘-៚᠀-᠅᠇-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᭽᭾᯼-᯿᰻-᰿᱾᱿᳀-᳇᳓‖‗†-‧‰-‸※-‾⁁-⁃⁇-⁑⁓⁕-⁞⳹-⳼⳾⳿⵰⸀⸁⸆-⸈⸋⸎-⸖⸘⸙⸛⸞⸟⸪-⸮⸰-⸹⸼-⸿⹁⹃-⹏⹒-⹔、-〃〽・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꣼꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꫰꫱꯫︐-︖︙︰﹅﹆﹉-﹌﹐-﹒﹔-﹗﹟-﹡﹨﹪﹫!-#%-'*,./:;?@\。、・",astral:"\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|𐕯|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD803[\uDF55-\uDF59\uDF86-\uDF89]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDC4B-\uDC4F\uDC5A\uDC5B\uDC5D\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDE60-\uDE6C\uDEB9\uDF3C-\uDF3E]|\uD806[\uDC3B\uDD44-\uDD46\uDDE2\uDE3F-\uDE46\uDE9A-\uDE9C\uDE9E-\uDEA2]|\uD807[\uDC41-\uDC45\uDC70\uDC71\uDEF7\uDEF8\uDFFF]|\uD809[\uDC70-\uDC74]|\uD80B[\uDFF1\uDFF2]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD81B[\uDE97-\uDE9A\uDFE2]|𛲟|\uD836[\uDE87-\uDE8B]|\uD83A[\uDD5E\uDD5F]"},{name:"Ps",alias:"Open_Punctuation",bmp:"\\(\\[\\{༺༼᚛‚„⁅⁽₍⌈⌊〈❨❪❬❮❰❲❴⟅⟦⟨⟪⟬⟮⦃⦅⦇⦉⦋⦍⦏⦑⦓⦕⦗⧘⧚⧼⸢⸤⸦⸨⹂⹕⹗⹙⹛〈《「『【〔〖〘〚〝﴿︗︵︷︹︻︽︿﹁﹃﹇﹙﹛﹝([{⦅「"},{name:"S",alias:"Symbol",bmp:"\\$\\+<->\\^`\\|~¢-¦¨©¬®-±´¸×÷˂-˅˒-˟˥-˫˭˯-˿͵΄΅϶҂֍-֏؆-؈؋؎؏۞۩۽۾߶߾߿࢈৲৳৺৻૱୰௳-௺౿൏൹฿༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭៛᥀᧞-᧿᭡-᭪᭴-᭼᾽᾿-῁῍-῏῝-῟῭-`´῾⁄⁒⁺-⁼₊-₌₠-⃀℀℁℃-℆℈℉℔№-℘℞-℣℥℧℩℮℺℻⅀-⅄⅊-⅍⅏↊↋←-⌇⌌-⌨⌫-␦⑀-⑊⒜-ⓩ─-❧➔-⟄⟇-⟥⟰-⦂⦙-⧗⧜-⧻⧾-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿゛゜㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꜀-꜖꜠꜡꞉꞊꠨-꠫꠶-꠹꩷-꩹꭛꭪꭫﬩﮲-﯂﵀-﵏﷏﷼-﷿﹢﹤-﹦﹩$+<->^`|~¢-₩│-○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|\uD838[\uDD4F\uDEFF]|\uD83B[\uDCAC\uDCB0\uDD2E\uDEF0\uDEF1]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Sc",alias:"Currency_Symbol",bmp:"\\$¢-¥֏؋߾߿৲৳৻૱௹฿៛₠-⃀꠸﷼﹩$¢£¥₩",astral:"\uD807[\uDFDD-\uDFE0]|𞋿|𞲰"},{name:"Sk",alias:"Modifier_Symbol",bmp:"\\^`¨¯´¸˂-˅˒-˟˥-˫˭˯-˿͵΄΅࢈᾽᾿-῁῍-῏῝-῟῭-`´῾゛゜꜀-꜖꜠꜡꞉꞊꭛꭪꭫﮲-﯂^` ̄",astral:"\uD83C[\uDFFB-\uDFFF]"},{name:"Sm",alias:"Math_Symbol",bmp:"\\+<->\\|~¬±×÷϶؆-؈⁄⁒⁺-⁼₊-₌℘⅀-⅄⅋←-↔↚↛↠↣↦↮⇎⇏⇒⇔⇴-⋿⌠⌡⍼⎛-⎳⏜-⏡▷◁◸-◿♯⟀-⟄⟇-⟥⟰-⟿⤀-⦂⦙-⧗⧜-⧻⧾-⫿⬰-⭄⭇-⭌﬩﹢﹤-﹦+<->|~¬←-↓",astral:"\uD835[\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3]|\uD83B[\uDEF0\uDEF1]"},{name:"So",alias:"Other_Symbol",bmp:"¦©®°҂֍֎؎؏۞۩۽۾߶৺୰௳-௸௺౿൏൹༁-༃༓༕-༗༚-༟༴༶༸྾-࿅࿇-࿌࿎࿏࿕-࿘႞႟᎐-᎙᙭᥀᧞-᧿᭡-᭪᭴-᭼℀℁℃-℆℈℉℔№℗℞-℣℥℧℩℮℺℻⅊⅌⅍⅏↊↋↕-↙↜-↟↡↢↤↥↧-↭↯-⇍⇐⇑⇓⇕-⇳⌀-⌇⌌-⌟⌢-⌨⌫-⍻⍽-⎚⎴-⏛⏢-␦⑀-⑊⒜-ⓩ─-▶▸-◀◂-◷☀-♮♰-❧➔-➿⠀-⣿⬀-⬯⭅⭆⭍-⭳⭶-⮕⮗-⯿⳥-⳪⹐⹑⺀-⺙⺛-⻳⼀-⿕⿰-⿻〄〒〓〠〶〷〾〿㆐㆑㆖-㆟㇀-㇣㈀-㈞㈪-㉇㉐㉠-㉿㊊-㊰㋀-㏿䷀-䷿꒐-꓆꠨-꠫꠶꠷꠹꩷-꩹﵀-﵏﷏﷽-﷿¦│■○�",astral:"\uD800[\uDD37-\uDD3F\uDD79-\uDD89\uDD8C-\uDD8E\uDD90-\uDD9C\uDDA0\uDDD0-\uDDFC]|\uD802[\uDC77\uDC78\uDEC8]|𑜿|\uD807[\uDFD5-\uDFDC\uDFE1-\uDFF1]|\uD81A[\uDF3C-\uDF3F\uDF45]|𛲜|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD64\uDD6A-\uDD6C\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDE00-\uDE41\uDE45\uDF00-\uDF56]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85\uDE86]|𞅏|\uD83B[\uDCAC\uDD2E]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD0D-\uDDAD\uDDE6-\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFA]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA]"},{name:"Z",alias:"Separator",bmp:"    - \u2028\u2029   "},{name:"Zl",alias:"Line_Separator",bmp:"\u2028"},{name:"Zp",alias:"Paragraph_Separator",bmp:"\u2029"},{name:"Zs",alias:"Space_Separator",bmp:"    -    "}]),f2}var GS;function zde(){return GS||(GS=1,function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Jde());/*! * XRegExp Unicode Categories 5.1.1 * * Steven Levithan (c) 2010-present MIT License * Unicode data by Mathias Bynens - */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");a.addUnicodeData(u.default)};t.default=s,e.exports=t.default}(fl,fl.exports)),fl.exports}var dl={exports:{}},u2,ES;function spe(){return ES||(ES=1,u2=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC45\uDC71-\uDC75\uDC82-\uDCB8\uDCC2\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD47\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDCE\uDDCF\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDEB8\uDF00-\uDF1A\uDF1D-\uDF2A\uDF40-\uDF46]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B\uDD3C\uDD3F-\uDD42\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDDF\uDDE1\uDDE3\uDDE4\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE97\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\uD800-\uDBFF][\uDC00-\uDFFF]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\uFEFFᅠ￰-￸",astral:"\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDF80\uDF83-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]"},{name:"White_Space",bmp:" -\r …   - \u2028\u2029   "}]),u2}var vS;function ope(){return vS||(vS=1,function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(spe());/*! + */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Categories");a.addUnicodeData(u.default)};t.default=s,e.exports=t.default}(yl,yl.exports)),yl.exports}var vl={exports:{}},D2,VS;function Kde(){return VS||(VS=1,D2=[{name:"ASCII",bmp:"\0-"},{name:"Alphabetic",bmp:"A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͅͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈְ-ׇֽֿׁׂׅׄא-תׯ-ײؐ-ؚؠ-ٗٙ-ٟٮ-ۓە-ۜۡ-ۭۨ-ۯۺ-ۼۿܐ-ܿݍ-ޱߊ-ߪߴߵߺࠀ-ࠗࠚ-ࠬࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉࣔ-ࣣࣟ-ࣰࣩ-ऻऽ-ौॎ-ॐॕ-ॣॱ-ঃঅ-ঌএঐও-নপ-রলশ-হঽ-ৄেৈোৌৎৗড়ঢ়য়-ৣৰৱৼਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਾ-ੂੇੈੋੌੑਖ਼-ੜਫ਼ੰ-ੵઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽ-ૅે-ૉોૌૐૠ-ૣૹ-ૼଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽ-ୄେୈୋୌୖୗଡ଼ଢ଼ୟ-ୣୱஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-ௌௐௗఀ-ఃఅ-ఌఎ-ఐఒ-నప-హఽ-ౄె-ైొ-ౌౕౖౘ-ౚౝౠ-ౣಀ-ಃಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽ-ೄೆ-ೈೊ-ೌೕೖೝೞೠ-ೣೱೲഀ-ഌഎ-ഐഒ-ഺഽ-ൄെ-ൈൊ-ൌൎൔ-ൗൟ-ൣൺ-ൿඁ-ඃඅ-ඖක-නඳ-රලව-ෆා-ුූෘ-ෟෲෳก-ฺเ-ๆํກຂຄຆ-ຊຌ-ຣລວ-ູົ-ຽເ-ໄໆໍໜ-ໟༀཀ-ཇཉ-ཬཱ-ཱྀྈ-ྗྙ-ྼက-ံးျ-ဿၐ-ႏႚ-ႝႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜓᜟ-ᜳᝀ-ᝓᝠ-ᝬᝮ-ᝰᝲᝳក-ឳា-ៈៗៜᠠ-ᡸᢀ-ᢪᢰ-ᣵᤀ-ᤞᤠ-ᤫᤰ-ᤸᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨛᨠ-ᩞᩡ-ᩴᪧᪿᫀᫌ-ᫎᬀ-ᬳᬵ-ᭃᭅ-ᭌᮀ-ᮩᮬ-ᮯᮺ-ᯥᯧ-ᯱᰀ-ᰶᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿᷧ-ᷴḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⷠ-ⷿⸯ々-〇〡-〩〱-〵〸-〼ぁ-ゖゝ-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙴ-ꙻꙿ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠅꠇ-ꠧꡀ-ꡳꢀ-ꣃꣅꣲ-ꣷꣻꣽ-ꣿꤊ-ꤪꤰ-ꥒꥠ-ꥼꦀ-ꦲꦴ-ꦿꧏꧠ-ꧯꧺ-ꧾꨀ-ꨶꩀ-ꩍꩠ-ꩶꩺ-ꪾꫀꫂꫛ-ꫝꫠ-ꫯꫲ-ꫵꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯪ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD40-\uDD74\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF4A\uDF50-\uDF7A\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD27\uDE80-\uDEA9\uDEAB\uDEAC\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC00-\uDC45\uDC71-\uDC75\uDC82-\uDCB8\uDCC2\uDCD0-\uDCE8\uDD00-\uDD32\uDD44-\uDD47\uDD50-\uDD72\uDD76\uDD80-\uDDBF\uDDC1-\uDDC4\uDDCE\uDDCF\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE34\uDE37\uDE3E\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEE8\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D-\uDF44\uDF47\uDF48\uDF4B\uDF4C\uDF50\uDF57\uDF5D-\uDF63]|\uD805[\uDC00-\uDC41\uDC43-\uDC45\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCC1\uDCC4\uDCC5\uDCC7\uDD80-\uDDB5\uDDB8-\uDDBE\uDDD8-\uDDDD\uDE00-\uDE3E\uDE40\uDE44\uDE80-\uDEB5\uDEB8\uDF00-\uDF1A\uDF1D-\uDF2A\uDF40-\uDF46]|\uD806[\uDC00-\uDC38\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B\uDD3C\uDD3F-\uDD42\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDDF\uDDE1\uDDE3\uDDE4\uDE00-\uDE32\uDE35-\uDE3E\uDE50-\uDE97\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC3E\uDC40\uDC72-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD41\uDD43\uDD46\uDD47\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD96\uDD98\uDEE0-\uDEF6\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F\uDFE0\uDFE1\uDFE3\uDFF0\uDFF1]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9E]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD47\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Any",isBmpLast:!0,bmp:"\0-￿",astral:"[\uD800-\uDBFF][\uDC00-\uDFFF]"},{name:"Default_Ignorable_Code_Point",bmp:"­͏؜ᅟᅠ឴឵᠋-᠏​-‏‪-‮⁠-ㅤ︀-️\uFEFFᅠ￰-￸",astral:"\uD82F[\uDCA0-\uDCA3]|\uD834[\uDD73-\uDD7A]|[\uDB40-\uDB43][\uDC00-\uDFFF]"},{name:"Lowercase",bmp:"a-zªµºß-öø-ÿāăąćĉċčďđēĕėęěĝğġģĥħĩīĭįıijĵķĸĺļľŀłńņňʼnŋōŏőœŕŗřśŝşšţťŧũūŭůűųŵŷźżž-ƀƃƅƈƌƍƒƕƙ-ƛƞơƣƥƨƪƫƭưƴƶƹƺƽ-ƿdžljnjǎǐǒǔǖǘǚǜǝǟǡǣǥǧǩǫǭǯǰdzǵǹǻǽǿȁȃȅȇȉȋȍȏȑȓȕȗșțȝȟȡȣȥȧȩȫȭȯȱȳ-ȹȼȿɀɂɇɉɋɍɏ-ʓʕ-ʸˀˁˠ-ˤͅͱͳͷͺ-ͽΐά-ώϐϑϕ-ϗϙϛϝϟϡϣϥϧϩϫϭϯ-ϳϵϸϻϼа-џѡѣѥѧѩѫѭѯѱѳѵѷѹѻѽѿҁҋҍҏґғҕҗҙқҝҟҡңҥҧҩҫҭүұҳҵҷҹһҽҿӂӄӆӈӊӌӎӏӑӓӕӗәӛӝӟӡӣӥӧөӫӭӯӱӳӵӷӹӻӽӿԁԃԅԇԉԋԍԏԑԓԕԗԙԛԝԟԡԣԥԧԩԫԭԯՠ-ֈა-ჺჽ-ჿᏸ-ᏽᲀ-ᲈᴀ-ᶿḁḃḅḇḉḋḍḏḑḓḕḗḙḛḝḟḡḣḥḧḩḫḭḯḱḳḵḷḹḻḽḿṁṃṅṇṉṋṍṏṑṓṕṗṙṛṝṟṡṣṥṧṩṫṭṯṱṳṵṷṹṻṽṿẁẃẅẇẉẋẍẏẑẓẕ-ẝẟạảấầẩẫậắằẳẵặẹẻẽếềểễệỉịọỏốồổỗộớờởỡợụủứừửữựỳỵỷỹỻỽỿ-ἇἐ-ἕἠ-ἧἰ-ἷὀ-ὅὐ-ὗὠ-ὧὰ-ώᾀ-ᾇᾐ-ᾗᾠ-ᾧᾰ-ᾴᾶᾷιῂ-ῄῆῇῐ-ΐῖῗῠ-ῧῲ-ῴῶῷⁱⁿₐ-ₜℊℎℏℓℯℴℹℼℽⅆ-ⅉⅎⅰ-ⅿↄⓐ-ⓩⰰ-ⱟⱡⱥⱦⱨⱪⱬⱱⱳⱴⱶ-ⱽⲁⲃⲅⲇⲉⲋⲍⲏⲑⲓⲕⲗⲙⲛⲝⲟⲡⲣⲥⲧⲩⲫⲭⲯⲱⲳⲵⲷⲹⲻⲽⲿⳁⳃⳅⳇⳉⳋⳍⳏⳑⳓⳕⳗⳙⳛⳝⳟⳡⳣⳤⳬⳮⳳⴀ-ⴥⴧⴭꙁꙃꙅꙇꙉꙋꙍꙏꙑꙓꙕꙗꙙꙛꙝꙟꙡꙣꙥꙧꙩꙫꙭꚁꚃꚅꚇꚉꚋꚍꚏꚑꚓꚕꚗꚙꚛ-ꚝꜣꜥꜧꜩꜫꜭꜯ-ꜱꜳꜵꜷꜹꜻꜽꜿꝁꝃꝅꝇꝉꝋꝍꝏꝑꝓꝕꝗꝙꝛꝝꝟꝡꝣꝥꝧꝩꝫꝭꝯ-ꝸꝺꝼꝿꞁꞃꞅꞇꞌꞎꞑꞓ-ꞕꞗꞙꞛꞝꞟꞡꞣꞥꞧꞩꞯꞵꞷꞹꞻꞽꞿꟁꟃꟈꟊꟑꟓꟕꟗꟙꟶꟸ-ꟺꬰ-ꭚꭜ-ꭨꭰ-ꮿff-stﬓ-ﬗa-z",astral:"\uD801[\uDC28-\uDC4F\uDCD8-\uDCFB\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDF80\uDF83-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD803[\uDCC0-\uDCF2]|\uD806[\uDCC0-\uDCDF]|\uD81B[\uDE60-\uDE7F]|\uD835[\uDC1A-\uDC33\uDC4E-\uDC54\uDC56-\uDC67\uDC82-\uDC9B\uDCB6-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDCEA-\uDD03\uDD1E-\uDD37\uDD52-\uDD6B\uDD86-\uDD9F\uDDBA-\uDDD3\uDDEE-\uDE07\uDE22-\uDE3B\uDE56-\uDE6F\uDE8A-\uDEA5\uDEC2-\uDEDA\uDEDC-\uDEE1\uDEFC-\uDF14\uDF16-\uDF1B\uDF36-\uDF4E\uDF50-\uDF55\uDF70-\uDF88\uDF8A-\uDF8F\uDFAA-\uDFC2\uDFC4-\uDFC9\uDFCB]|\uD837[\uDF00-\uDF09\uDF0B-\uDF1E]|\uD83A[\uDD22-\uDD43]"},{name:"Noncharacter_Code_Point",bmp:"﷐-﷯￾￿",astral:"[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]"},{name:"Uppercase",bmp:"A-ZÀ-ÖØ-ÞĀĂĄĆĈĊČĎĐĒĔĖĘĚĜĞĠĢĤĦĨĪĬĮİIJĴĶĹĻĽĿŁŃŅŇŊŌŎŐŒŔŖŘŚŜŞŠŢŤŦŨŪŬŮŰŲŴŶŸŹŻŽƁƂƄƆƇƉ-ƋƎ-ƑƓƔƖ-ƘƜƝƟƠƢƤƦƧƩƬƮƯƱ-ƳƵƷƸƼDŽLJNJǍǏǑǓǕǗǙǛǞǠǢǤǦǨǪǬǮDZǴǶ-ǸǺǼǾȀȂȄȆȈȊȌȎȐȒȔȖȘȚȜȞȠȢȤȦȨȪȬȮȰȲȺȻȽȾɁɃ-ɆɈɊɌɎͰͲͶͿΆΈ-ΊΌΎΏΑ-ΡΣ-ΫϏϒ-ϔϘϚϜϞϠϢϤϦϨϪϬϮϴϷϹϺϽ-ЯѠѢѤѦѨѪѬѮѰѲѴѶѸѺѼѾҀҊҌҎҐҒҔҖҘҚҜҞҠҢҤҦҨҪҬҮҰҲҴҶҸҺҼҾӀӁӃӅӇӉӋӍӐӒӔӖӘӚӜӞӠӢӤӦӨӪӬӮӰӲӴӶӸӺӼӾԀԂԄԆԈԊԌԎԐԒԔԖԘԚԜԞԠԢԤԦԨԪԬԮԱ-ՖႠ-ჅჇჍᎠ-ᏵᲐ-ᲺᲽ-ᲿḀḂḄḆḈḊḌḎḐḒḔḖḘḚḜḞḠḢḤḦḨḪḬḮḰḲḴḶḸḺḼḾṀṂṄṆṈṊṌṎṐṒṔṖṘṚṜṞṠṢṤṦṨṪṬṮṰṲṴṶṸṺṼṾẀẂẄẆẈẊẌẎẐẒẔẞẠẢẤẦẨẪẬẮẰẲẴẶẸẺẼẾỀỂỄỆỈỊỌỎỐỒỔỖỘỚỜỞỠỢỤỦỨỪỬỮỰỲỴỶỸỺỼỾἈ-ἏἘ-ἝἨ-ἯἸ-ἿὈ-ὍὙὛὝὟὨ-ὯᾸ-ΆῈ-ΉῘ-ΊῨ-ῬῸ-Ώℂℇℋ-ℍℐ-ℒℕℙ-ℝℤΩℨK-ℭℰ-ℳℾℿⅅⅠ-ⅯↃⒶ-ⓏⰀ-ⰯⱠⱢ-ⱤⱧⱩⱫⱭ-ⱰⱲⱵⱾ-ⲀⲂⲄⲆⲈⲊⲌⲎⲐⲒⲔⲖⲘⲚⲜⲞⲠⲢⲤⲦⲨⲪⲬⲮⲰⲲⲴⲶⲸⲺⲼⲾⳀⳂⳄⳆⳈⳊⳌⳎⳐⳒⳔⳖⳘⳚⳜⳞⳠⳢⳫⳭⳲꙀꙂꙄꙆꙈꙊꙌꙎꙐꙒꙔꙖꙘꙚꙜꙞꙠꙢꙤꙦꙨꙪꙬꚀꚂꚄꚆꚈꚊꚌꚎꚐꚒꚔꚖꚘꚚꜢꜤꜦꜨꜪꜬꜮꜲꜴꜶꜸꜺꜼꜾꝀꝂꝄꝆꝈꝊꝌꝎꝐꝒꝔꝖꝘꝚꝜꝞꝠꝢꝤꝦꝨꝪꝬꝮꝹꝻꝽꝾꞀꞂꞄꞆꞋꞍꞐꞒꞖꞘꞚꞜꞞꞠꞢꞤꞦꞨꞪ-ꞮꞰ-ꞴꞶꞸꞺꞼꞾꟀꟂꟄ-ꟇꟉꟐꟖꟘꟵA-Z",astral:"\uD801[\uDC00-\uDC27\uDCB0-\uDCD3\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95]|\uD803[\uDC80-\uDCB2]|\uD806[\uDCA0-\uDCBF]|\uD81B[\uDE40-\uDE5F]|\uD835[\uDC00-\uDC19\uDC34-\uDC4D\uDC68-\uDC81\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB5\uDCD0-\uDCE9\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD38\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD6C-\uDD85\uDDA0-\uDDB9\uDDD4-\uDDED\uDE08-\uDE21\uDE3C-\uDE55\uDE70-\uDE89\uDEA8-\uDEC0\uDEE2-\uDEFA\uDF1C-\uDF34\uDF56-\uDF6E\uDF90-\uDFA8\uDFCA]|\uD83A[\uDD00-\uDD21]|\uD83C[\uDD30-\uDD49\uDD50-\uDD69\uDD70-\uDD89]"},{name:"White_Space",bmp:" -\r …   - \u2028\u2029   "}]),D2}var HS;function Xde(){return HS||(HS=1,function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Kde());/*! * XRegExp Unicode Properties 5.1.1 * * Steven Levithan (c) 2012-present MIT License * Unicode data by Mathias Bynens - */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var i=u.default;i.push({name:"Assigned",inverseOf:"Cn"}),a.addUnicodeData(i)};t.default=s,e.exports=t.default}(dl,dl.exports)),dl.exports}var Dl={exports:{}},s2,yS;function ape(){return yS||(yS=1,s2=[{name:"Adlam",astral:"\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]"},{name:"Ahom",astral:"\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF46]"},{name:"Anatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\uD802[\uDF00-\uDF35\uDF39-\uDF3F]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\uD81A[\uDC00-\uDE38]"},{name:"Bassa_Vah",astral:"\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\uD804[\uDC00-\uDC4D\uDC52-\uDC75\uDC7F]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\uD806[\uDEB0-\uDEBF]"},{name:"Carian",astral:"\uD800[\uDEA0-\uDED0]"},{name:"Caucasian_Albanian",astral:"\uD801[\uDD30-\uDD63\uDD6F]"},{name:"Chakma",astral:"\uD804[\uDD00-\uDD34\uDD36-\uDD47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\uD803[\uDFB0-\uDFCB]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\uFEFF!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9C\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4\uDD01-\uDD3D]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDDAD\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA\uDFF0-\uDFF9]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]"},{name:"Cypriot",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]"},{name:"Cypro_Minoan",astral:"\uD80B[\uDF90-\uDFF2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\uD801[\uDC00-\uDC4F]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD46\uDD50-\uDD59]"},{name:"Dogra",astral:"\uD806[\uDC00-\uDC3B]"},{name:"Duployan",astral:"\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]"},{name:"Egyptian_Hieroglyphs",astral:"\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E\uDC30-\uDC38]"},{name:"Elbasan",astral:"\uD801[\uDD00-\uDD27]"},{name:"Elymaic",astral:"\uD803[\uDFE0-\uDFF6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]"},{name:"Gothic",astral:"\uD800[\uDF30-\uDF4A]"},{name:"Grantha",astral:"\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\uD803[\uDD00-\uDD27\uDD30-\uDD39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\uD82C[\uDC01-\uDD1F\uDD50-\uDD52]|🈀"},{name:"Imperial_Aramaic",astral:"\uD802[\uDC40-\uDC55\uDC57-\uDC5F]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\uD800[\uDDFD\uDEE0]|𑌻|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]"},{name:"Inscriptional_Pahlavi",astral:"\uD802[\uDF60-\uDF72\uDF78-\uDF7F]"},{name:"Inscriptional_Parthian",astral:"\uD802[\uDF40-\uDF55\uDF58-\uDF5F]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\uD804[\uDC80-\uDCC2\uDCCD]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD64-\uDD67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]"},{name:"Khitan_Small_Script",astral:"𖿤|\uD822[\uDF00-\uDFFF]|\uD823[\uDC00-\uDCD5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\uD804[\uDE00-\uDE11\uDE13-\uDE3E]"},{name:"Khudawadi",astral:"\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]"},{name:"Linear_B",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\uD800[\uDE80-\uDE9C]"},{name:"Lydian",astral:"\uD802[\uDD20-\uDD39\uDD3F]"},{name:"Mahajani",astral:"\uD804[\uDD50-\uDD76]"},{name:"Makasar",astral:"\uD807[\uDEE0-\uDEF8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]"},{name:"Marchen",astral:"\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]"},{name:"Masaram_Gondi",astral:"\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]"},{name:"Medefaidrin",astral:"\uD81B[\uDE40-\uDE9A]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]"},{name:"Meroitic_Cursive",astral:"\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]"},{name:"Meroitic_Hieroglyphs",astral:"\uD802[\uDD80-\uDD9F]"},{name:"Miao",astral:"\uD81B[\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F]"},{name:"Modi",astral:"\uD805[\uDE00-\uDE44\uDE50-\uDE59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\uD805[\uDE60-\uDE6C]"},{name:"Mro",astral:"\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]"},{name:"Multani",astral:"\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]"},{name:"Nandinagari",astral:"\uD806[\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\uD805[\uDC00-\uDC5B\uDC5D-\uDC61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\uD82C[\uDD70-\uDEFB]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\uD838[\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDD4F]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]"},{name:"Old_Italic",astral:"\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]"},{name:"Old_North_Arabian",astral:"\uD802[\uDE80-\uDE9F]"},{name:"Old_Permic",astral:"\uD800[\uDF50-\uDF7A]"},{name:"Old_Persian",astral:"\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]"},{name:"Old_Sogdian",astral:"\uD803[\uDF00-\uDF27]"},{name:"Old_South_Arabian",astral:"\uD802[\uDE60-\uDE7F]"},{name:"Old_Turkic",astral:"\uD803[\uDC00-\uDC48]"},{name:"Old_Uyghur",astral:"\uD803[\uDF70-\uDF89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]"},{name:"Osmanya",astral:"\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]"},{name:"Pahawh_Hmong",astral:"\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]"},{name:"Palmyrene",astral:"\uD802[\uDC60-\uDC7F]"},{name:"Pau_Cin_Hau",astral:"\uD806[\uDEC0-\uDEF8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\uD802[\uDD00-\uDD1B\uDD1F]"},{name:"Psalter_Pahlavi",astral:"\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\uD804[\uDD80-\uDDDF]"},{name:"Shavian",astral:"\uD801[\uDC50-\uDC7F]"},{name:"Siddham",astral:"\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]"},{name:"SignWriting",astral:"\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\uD804[\uDDE1-\uDDF4]"},{name:"Sogdian",astral:"\uD803[\uDF30-\uDF59]"},{name:"Sora_Sompeng",astral:"\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]"},{name:"Soyombo",astral:"\uD806[\uDE50-\uDEA2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\uD805[\uDE80-\uDEB9\uDEC0-\uDEC9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\uD807[\uDFC0-\uDFF1\uDFFF]"},{name:"Tangsa",astral:"\uD81A[\uDE70-\uDEBE\uDEC0-\uDEC9]"},{name:"Tangut",astral:"𖿠|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEFF]|\uD823[\uDD00-\uDD08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]"},{name:"Toto",astral:"\uD838[\uDE90-\uDEAE]"},{name:"Ugaritic",astral:"\uD800[\uDF80-\uDF9D\uDF9F]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\uD801[\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]"},{name:"Wancho",astral:"\uD838[\uDEC0-\uDEF9\uDEFF]"},{name:"Warang_Citi",astral:"\uD806[\uDCA0-\uDCF2\uDCFF]"},{name:"Yezidi",astral:"\uD803[\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\uD806[\uDE00-\uDE47]"}]),s2}var gS;function ipe(){return gS||(gS=1,function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(ape());/*! + */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Properties");var i=u.default;i.push({name:"Assigned",inverseOf:"Cn"}),a.addUnicodeData(i)};t.default=s,e.exports=t.default}(vl,vl.exports)),vl.exports}var gl={exports:{}},h2,WS;function Yde(){return WS||(WS=1,h2=[{name:"Adlam",astral:"\uD83A[\uDD00-\uDD4B\uDD50-\uDD59\uDD5E\uDD5F]"},{name:"Ahom",astral:"\uD805[\uDF00-\uDF1A\uDF1D-\uDF2B\uDF30-\uDF46]"},{name:"Anatolian_Hieroglyphs",astral:"\uD811[\uDC00-\uDE46]"},{name:"Arabic",bmp:"؀-؄؆-؋؍-ؚ؜-؞ؠ-ؿف-يٖ-ٯٱ-ۜ۞-ۿݐ-ݿࡰ-ࢎ࢐࢑࢘-ࣣ࣡-ࣿﭐ-﯂ﯓ-ﴽ﵀-ﶏﶒ-ﷇ﷏ﷰ-﷿ﹰ-ﹴﹶ-ﻼ",astral:"\uD803[\uDE60-\uDE7E]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB\uDEF0\uDEF1]"},{name:"Armenian",bmp:"Ա-Ֆՙ-֊֍-֏ﬓ-ﬗ"},{name:"Avestan",astral:"\uD802[\uDF00-\uDF35\uDF39-\uDF3F]"},{name:"Balinese",bmp:"ᬀ-ᭌ᭐-᭾"},{name:"Bamum",bmp:"ꚠ-꛷",astral:"\uD81A[\uDC00-\uDE38]"},{name:"Bassa_Vah",astral:"\uD81A[\uDED0-\uDEED\uDEF0-\uDEF5]"},{name:"Batak",bmp:"ᯀ-᯳᯼-᯿"},{name:"Bengali",bmp:"ঀ-ঃঅ-ঌএঐও-নপ-রলশ-হ়-ৄেৈো-ৎৗড়ঢ়য়-ৣ০-৾"},{name:"Bhaiksuki",astral:"\uD807[\uDC00-\uDC08\uDC0A-\uDC36\uDC38-\uDC45\uDC50-\uDC6C]"},{name:"Bopomofo",bmp:"˪˫ㄅ-ㄯㆠ-ㆿ"},{name:"Brahmi",astral:"\uD804[\uDC00-\uDC4D\uDC52-\uDC75\uDC7F]"},{name:"Braille",bmp:"⠀-⣿"},{name:"Buginese",bmp:"ᨀ-ᨛ᨞᨟"},{name:"Buhid",bmp:"ᝀ-ᝓ"},{name:"Canadian_Aboriginal",bmp:"᐀-ᙿᢰ-ᣵ",astral:"\uD806[\uDEB0-\uDEBF]"},{name:"Carian",astral:"\uD800[\uDEA0-\uDED0]"},{name:"Caucasian_Albanian",astral:"\uD801[\uDD30-\uDD63\uDD6F]"},{name:"Chakma",astral:"\uD804[\uDD00-\uDD34\uDD36-\uDD47]"},{name:"Cham",bmp:"ꨀ-ꨶꩀ-ꩍ꩐-꩙꩜-꩟"},{name:"Cherokee",bmp:"Ꭰ-Ᏽᏸ-ᏽꭰ-ꮿ"},{name:"Chorasmian",astral:"\uD803[\uDFB0-\uDFCB]"},{name:"Common",bmp:"\0-@\\[-`\\{-©«-¹»-¿×÷ʹ-˟˥-˩ˬ-˿ʹ;΅·؅،؛؟ـ۝࣢।॥฿࿕-࿘჻᛫-᛭᜵᜶᠂᠃᠅᳓᳡ᳩ-ᳬᳮ-ᳳᳵ-᳷ᳺ -​‎-⁤⁦-⁰⁴-⁾₀-₎₠-⃀℀-℥℧-℩ℬ-ℱℳ-⅍⅏-⅟↉-↋←-␦⑀-⑊①-⟿⤀-⭳⭶-⮕⮗-⯿⸀-⹝⿰-⿻ -〄〆〈-〠〰-〷〼-〿゛゜゠・ー㆐-㆟㇀-㇣㈠-㉟㉿-㋏㋿㍘-㏿䷀-䷿꜀-꜡ꞈ-꞊꠰-꠹꤮ꧏ꭛꭪꭫﴾﴿︐-︙︰-﹒﹔-﹦﹨-﹫\uFEFF!-@[-`{-・ー゙゚¢-₩│-○-�",astral:"\uD800[\uDD00-\uDD02\uDD07-\uDD33\uDD37-\uDD3F\uDD90-\uDD9C\uDDD0-\uDDFC\uDEE1-\uDEFB]|\uD82F[\uDCA0-\uDCA3]|\uD833[\uDF50-\uDFC3]|\uD834[\uDC00-\uDCF5\uDD00-\uDD26\uDD29-\uDD66\uDD6A-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDDEA\uDEE0-\uDEF3\uDF00-\uDF56\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDFCB\uDFCE-\uDFFF]|\uD83B[\uDC71-\uDCB4\uDD01-\uDD3D]|\uD83C[\uDC00-\uDC2B\uDC30-\uDC93\uDCA0-\uDCAE\uDCB1-\uDCBF\uDCC1-\uDCCF\uDCD1-\uDCF5\uDD00-\uDDAD\uDDE6-\uDDFF\uDE01\uDE02\uDE10-\uDE3B\uDE40-\uDE48\uDE50\uDE51\uDE60-\uDE65\uDF00-\uDFFF]|\uD83D[\uDC00-\uDED7\uDEDD-\uDEEC\uDEF0-\uDEFC\uDF00-\uDF73\uDF80-\uDFD8\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDC00-\uDC0B\uDC10-\uDC47\uDC50-\uDC59\uDC60-\uDC87\uDC90-\uDCAD\uDCB0\uDCB1\uDD00-\uDE53\uDE60-\uDE6D\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6\uDF00-\uDF92\uDF94-\uDFCA\uDFF0-\uDFF9]|\uDB40[\uDC01\uDC20-\uDC7F]"},{name:"Coptic",bmp:"Ϣ-ϯⲀ-ⳳ⳹-⳿"},{name:"Cuneiform",astral:"\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC70-\uDC74\uDC80-\uDD43]"},{name:"Cypriot",astral:"\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F]"},{name:"Cypro_Minoan",astral:"\uD80B[\uDF90-\uDFF2]"},{name:"Cyrillic",bmp:"Ѐ-҄҇-ԯᲀ-ᲈᴫᵸⷠ-ⷿꙀ-ꚟ︮︯"},{name:"Deseret",astral:"\uD801[\uDC00-\uDC4F]"},{name:"Devanagari",bmp:"ऀ-ॐॕ-ॣ०-ॿ꣠-ꣿ"},{name:"Dives_Akuru",astral:"\uD806[\uDD00-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD35\uDD37\uDD38\uDD3B-\uDD46\uDD50-\uDD59]"},{name:"Dogra",astral:"\uD806[\uDC00-\uDC3B]"},{name:"Duployan",astral:"\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99\uDC9C-\uDC9F]"},{name:"Egyptian_Hieroglyphs",astral:"\uD80C[\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E\uDC30-\uDC38]"},{name:"Elbasan",astral:"\uD801[\uDD00-\uDD27]"},{name:"Elymaic",astral:"\uD803[\uDFE0-\uDFF6]"},{name:"Ethiopic",bmp:"ሀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚ፝-፼ᎀ-᎙ⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮ",astral:"\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]"},{name:"Georgian",bmp:"Ⴀ-ჅჇჍა-ჺჼ-ჿᲐ-ᲺᲽ-Ჿⴀ-ⴥⴧⴭ"},{name:"Glagolitic",bmp:"Ⰰ-ⱟ",astral:"\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A]"},{name:"Gothic",astral:"\uD800[\uDF30-\uDF4A]"},{name:"Grantha",astral:"\uD804[\uDF00-\uDF03\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3C-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF50\uDF57\uDF5D-\uDF63\uDF66-\uDF6C\uDF70-\uDF74]"},{name:"Greek",bmp:"Ͱ-ͳ͵-ͷͺ-ͽͿ΄ΆΈ-ΊΌΎ-ΡΣ-ϡϰ-Ͽᴦ-ᴪᵝ-ᵡᵦ-ᵪᶿἀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ῄῆ-ΐῖ-Ί῝-`ῲ-ῴῶ-῾Ωꭥ",astral:"\uD800[\uDD40-\uDD8E\uDDA0]|\uD834[\uDE00-\uDE45]"},{name:"Gujarati",bmp:"ઁ-ઃઅ-ઍએ-ઑઓ-નપ-રલળવ-હ઼-ૅે-ૉો-્ૐૠ-ૣ૦-૱ૹ-૿"},{name:"Gunjala_Gondi",astral:"\uD807[\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD8E\uDD90\uDD91\uDD93-\uDD98\uDDA0-\uDDA9]"},{name:"Gurmukhi",bmp:"ਁ-ਃਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹ਼ਾ-ੂੇੈੋ-੍ੑਖ਼-ੜਫ਼੦-੶"},{name:"Han",bmp:"⺀-⺙⺛-⻳⼀-⿕々〇〡-〩〸-〻㐀-䶿一-鿿豈-舘並-龎",astral:"\uD81B[\uDFE2\uDFE3\uDFF0\uDFF1]|[\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A]"},{name:"Hangul",bmp:"ᄀ-ᇿ〮〯ㄱ-ㆎ㈀-㈞㉠-㉾ꥠ-ꥼ가-힣ힰ-ퟆퟋ-ퟻᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ"},{name:"Hanifi_Rohingya",astral:"\uD803[\uDD00-\uDD27\uDD30-\uDD39]"},{name:"Hanunoo",bmp:"ᜠ-᜴"},{name:"Hatran",astral:"\uD802[\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDCFF]"},{name:"Hebrew",bmp:"֑-ׇא-תׯ-״יִ-זּטּ-לּמּנּסּףּפּצּ-ﭏ"},{name:"Hiragana",bmp:"ぁ-ゖゝ-ゟ",astral:"\uD82C[\uDC01-\uDD1F\uDD50-\uDD52]|🈀"},{name:"Imperial_Aramaic",astral:"\uD802[\uDC40-\uDC55\uDC57-\uDC5F]"},{name:"Inherited",bmp:"̀-ًͯ҅҆-ٰٕ॑-॔᪰-ᫎ᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸᳹᷀-᷿‌‍⃐-〪⃰-゙゚〭︀-️︠-︭",astral:"\uD800[\uDDFD\uDEE0]|𑌻|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD67-\uDD69\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD]|\uDB40[\uDD00-\uDDEF]"},{name:"Inscriptional_Pahlavi",astral:"\uD802[\uDF60-\uDF72\uDF78-\uDF7F]"},{name:"Inscriptional_Parthian",astral:"\uD802[\uDF40-\uDF55\uDF58-\uDF5F]"},{name:"Javanese",bmp:"ꦀ-꧍꧐-꧙꧞꧟"},{name:"Kaithi",astral:"\uD804[\uDC80-\uDCC2\uDCCD]"},{name:"Kannada",bmp:"ಀ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹ಼-ೄೆ-ೈೊ-್ೕೖೝೞೠ-ೣ೦-೯ೱೲ"},{name:"Katakana",bmp:"ァ-ヺヽ-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ッア-ン",astral:"\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00\uDD20-\uDD22\uDD64-\uDD67]"},{name:"Kayah_Li",bmp:"꤀-꤭꤯"},{name:"Kharoshthi",astral:"\uD802[\uDE00-\uDE03\uDE05\uDE06\uDE0C-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE38-\uDE3A\uDE3F-\uDE48\uDE50-\uDE58]"},{name:"Khitan_Small_Script",astral:"𖿤|\uD822[\uDF00-\uDFFF]|\uD823[\uDC00-\uDCD5]"},{name:"Khmer",bmp:"ក-៝០-៩៰-៹᧠-᧿"},{name:"Khojki",astral:"\uD804[\uDE00-\uDE11\uDE13-\uDE3E]"},{name:"Khudawadi",astral:"\uD804[\uDEB0-\uDEEA\uDEF0-\uDEF9]"},{name:"Lao",bmp:"ກຂຄຆ-ຊຌ-ຣລວ-ຽເ-ໄໆ່-ໍ໐-໙ໜ-ໟ"},{name:"Latin",bmp:"A-Za-zªºÀ-ÖØ-öø-ʸˠ-ˤᴀ-ᴥᴬ-ᵜᵢ-ᵥᵫ-ᵷᵹ-ᶾḀ-ỿⁱⁿₐ-ₜKÅℲⅎⅠ-ↈⱠ-ⱿꜢ-ꞇꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꟿꬰ-ꭚꭜ-ꭤꭦ-ꭩff-stA-Za-z",astral:"\uD801[\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD837[\uDF00-\uDF1E]"},{name:"Lepcha",bmp:"ᰀ-᰷᰻-᱉ᱍ-ᱏ"},{name:"Limbu",bmp:"ᤀ-ᤞᤠ-ᤫᤰ-᤻᥀᥄-᥏"},{name:"Linear_A",astral:"\uD801[\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67]"},{name:"Linear_B",astral:"\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA]"},{name:"Lisu",bmp:"ꓐ-꓿",astral:"𑾰"},{name:"Lycian",astral:"\uD800[\uDE80-\uDE9C]"},{name:"Lydian",astral:"\uD802[\uDD20-\uDD39\uDD3F]"},{name:"Mahajani",astral:"\uD804[\uDD50-\uDD76]"},{name:"Makasar",astral:"\uD807[\uDEE0-\uDEF8]"},{name:"Malayalam",bmp:"ഀ-ഌഎ-ഐഒ-ൄെ-ൈൊ-൏ൔ-ൣ൦-ൿ"},{name:"Mandaic",bmp:"ࡀ-࡛࡞"},{name:"Manichaean",astral:"\uD802[\uDEC0-\uDEE6\uDEEB-\uDEF6]"},{name:"Marchen",astral:"\uD807[\uDC70-\uDC8F\uDC92-\uDCA7\uDCA9-\uDCB6]"},{name:"Masaram_Gondi",astral:"\uD807[\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD47\uDD50-\uDD59]"},{name:"Medefaidrin",astral:"\uD81B[\uDE40-\uDE9A]"},{name:"Meetei_Mayek",bmp:"ꫠ-꫶ꯀ-꯭꯰-꯹"},{name:"Mende_Kikakui",astral:"\uD83A[\uDC00-\uDCC4\uDCC7-\uDCD6]"},{name:"Meroitic_Cursive",astral:"\uD802[\uDDA0-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDDFF]"},{name:"Meroitic_Hieroglyphs",astral:"\uD802[\uDD80-\uDD9F]"},{name:"Miao",astral:"\uD81B[\uDF00-\uDF4A\uDF4F-\uDF87\uDF8F-\uDF9F]"},{name:"Modi",astral:"\uD805[\uDE00-\uDE44\uDE50-\uDE59]"},{name:"Mongolian",bmp:"᠀᠁᠄᠆-᠙ᠠ-ᡸᢀ-ᢪ",astral:"\uD805[\uDE60-\uDE6C]"},{name:"Mro",astral:"\uD81A[\uDE40-\uDE5E\uDE60-\uDE69\uDE6E\uDE6F]"},{name:"Multani",astral:"\uD804[\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA9]"},{name:"Myanmar",bmp:"က-႟ꧠ-ꧾꩠ-ꩿ"},{name:"Nabataean",astral:"\uD802[\uDC80-\uDC9E\uDCA7-\uDCAF]"},{name:"Nandinagari",astral:"\uD806[\uDDA0-\uDDA7\uDDAA-\uDDD7\uDDDA-\uDDE4]"},{name:"New_Tai_Lue",bmp:"ᦀ-ᦫᦰ-ᧉ᧐-᧚᧞᧟"},{name:"Newa",astral:"\uD805[\uDC00-\uDC5B\uDC5D-\uDC61]"},{name:"Nko",bmp:"߀-ߺ߽-߿"},{name:"Nushu",astral:"𖿡|\uD82C[\uDD70-\uDEFB]"},{name:"Nyiakeng_Puachue_Hmong",astral:"\uD838[\uDD00-\uDD2C\uDD30-\uDD3D\uDD40-\uDD49\uDD4E\uDD4F]"},{name:"Ogham",bmp:" -᚜"},{name:"Ol_Chiki",bmp:"᱐-᱿"},{name:"Old_Hungarian",astral:"\uD803[\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDCFF]"},{name:"Old_Italic",astral:"\uD800[\uDF00-\uDF23\uDF2D-\uDF2F]"},{name:"Old_North_Arabian",astral:"\uD802[\uDE80-\uDE9F]"},{name:"Old_Permic",astral:"\uD800[\uDF50-\uDF7A]"},{name:"Old_Persian",astral:"\uD800[\uDFA0-\uDFC3\uDFC8-\uDFD5]"},{name:"Old_Sogdian",astral:"\uD803[\uDF00-\uDF27]"},{name:"Old_South_Arabian",astral:"\uD802[\uDE60-\uDE7F]"},{name:"Old_Turkic",astral:"\uD803[\uDC00-\uDC48]"},{name:"Old_Uyghur",astral:"\uD803[\uDF70-\uDF89]"},{name:"Oriya",bmp:"ଁ-ଃଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହ଼-ୄେୈୋ-୍୕-ୗଡ଼ଢ଼ୟ-ୣ୦-୷"},{name:"Osage",astral:"\uD801[\uDCB0-\uDCD3\uDCD8-\uDCFB]"},{name:"Osmanya",astral:"\uD801[\uDC80-\uDC9D\uDCA0-\uDCA9]"},{name:"Pahawh_Hmong",astral:"\uD81A[\uDF00-\uDF45\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]"},{name:"Palmyrene",astral:"\uD802[\uDC60-\uDC7F]"},{name:"Pau_Cin_Hau",astral:"\uD806[\uDEC0-\uDEF8]"},{name:"Phags_Pa",bmp:"ꡀ-꡷"},{name:"Phoenician",astral:"\uD802[\uDD00-\uDD1B\uDD1F]"},{name:"Psalter_Pahlavi",astral:"\uD802[\uDF80-\uDF91\uDF99-\uDF9C\uDFA9-\uDFAF]"},{name:"Rejang",bmp:"ꤰ-꥓꥟"},{name:"Runic",bmp:"ᚠ-ᛪᛮ-ᛸ"},{name:"Samaritan",bmp:"ࠀ-࠭࠰-࠾"},{name:"Saurashtra",bmp:"ꢀ-ꣅ꣎-꣙"},{name:"Sharada",astral:"\uD804[\uDD80-\uDDDF]"},{name:"Shavian",astral:"\uD801[\uDC50-\uDC7F]"},{name:"Siddham",astral:"\uD805[\uDD80-\uDDB5\uDDB8-\uDDDD]"},{name:"SignWriting",astral:"\uD836[\uDC00-\uDE8B\uDE9B-\uDE9F\uDEA1-\uDEAF]"},{name:"Sinhala",bmp:"ඁ-ඃඅ-ඖක-නඳ-රලව-ෆ්ා-ුූෘ-ෟ෦-෯ෲ-෴",astral:"\uD804[\uDDE1-\uDDF4]"},{name:"Sogdian",astral:"\uD803[\uDF30-\uDF59]"},{name:"Sora_Sompeng",astral:"\uD804[\uDCD0-\uDCE8\uDCF0-\uDCF9]"},{name:"Soyombo",astral:"\uD806[\uDE50-\uDEA2]"},{name:"Sundanese",bmp:"ᮀ-ᮿ᳀-᳇"},{name:"Syloti_Nagri",bmp:"ꠀ-꠬"},{name:"Syriac",bmp:"܀-܍܏-݊ݍ-ݏࡠ-ࡪ"},{name:"Tagalog",bmp:"ᜀ-᜕ᜟ"},{name:"Tagbanwa",bmp:"ᝠ-ᝬᝮ-ᝰᝲᝳ"},{name:"Tai_Le",bmp:"ᥐ-ᥭᥰ-ᥴ"},{name:"Tai_Tham",bmp:"ᨠ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪠-᪭"},{name:"Tai_Viet",bmp:"ꪀ-ꫂꫛ-꫟"},{name:"Takri",astral:"\uD805[\uDE80-\uDEB9\uDEC0-\uDEC9]"},{name:"Tamil",bmp:"ஂஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹா-ூெ-ைொ-்ௐௗ௦-௺",astral:"\uD807[\uDFC0-\uDFF1\uDFFF]"},{name:"Tangsa",astral:"\uD81A[\uDE70-\uDEBE\uDEC0-\uDEC9]"},{name:"Tangut",astral:"𖿠|[\uD81C-\uD820][\uDC00-\uDFFF]|\uD821[\uDC00-\uDFF7]|\uD822[\uDC00-\uDEFF]|\uD823[\uDD00-\uDD08]"},{name:"Telugu",bmp:"ఀ-ఌఎ-ఐఒ-నప-హ఼-ౄె-ైొ-్ౕౖౘ-ౚౝౠ-ౣ౦-౯౷-౿"},{name:"Thaana",bmp:"ހ-ޱ"},{name:"Thai",bmp:"ก-ฺเ-๛"},{name:"Tibetan",bmp:"ༀ-ཇཉ-ཬཱ-ྗྙ-ྼ྾-࿌࿎-࿔࿙࿚"},{name:"Tifinagh",bmp:"ⴰ-ⵧⵯ⵰⵿"},{name:"Tirhuta",astral:"\uD805[\uDC80-\uDCC7\uDCD0-\uDCD9]"},{name:"Toto",astral:"\uD838[\uDE90-\uDEAE]"},{name:"Ugaritic",astral:"\uD800[\uDF80-\uDF9D\uDF9F]"},{name:"Vai",bmp:"ꔀ-ꘫ"},{name:"Vithkuqi",astral:"\uD801[\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC]"},{name:"Wancho",astral:"\uD838[\uDEC0-\uDEF9\uDEFF]"},{name:"Warang_Citi",astral:"\uD806[\uDCA0-\uDCF2\uDCFF]"},{name:"Yezidi",astral:"\uD803[\uDE80-\uDEA9\uDEAB-\uDEAD\uDEB0\uDEB1]"},{name:"Yi",bmp:"ꀀ-ꒌ꒐-꓆"},{name:"Zanabazar_Square",astral:"\uD806[\uDE00-\uDE47]"}]),h2}var JS;function Zde(){return JS||(JS=1,function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Yde());/*! * XRegExp Unicode Scripts 5.1.1 * * Steven Levithan (c) 2010-present MIT License * Unicode data by Mathias Bynens - */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");a.addUnicodeData(u.default,"Script")};t.default=s,e.exports=t.default}(Dl,Dl.exports)),Dl.exports}(function(e,t){var r=ms,n=Es;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n(Lle()),s=n(epe()),o=n(tpe()),a=n(rpe()),i=n(upe()),c=n(ope()),l=n(ipe());(0,s.default)(u.default),(0,o.default)(u.default),(0,a.default)(u.default),(0,i.default)(u.default),(0,c.default)(u.default),(0,l.default)(u.default);var p=u.default;t.default=p,e.exports=t.default})(Fh,Fh.exports);var mf=Fh.exports,AS=cpe(mf);function cpe(e){return e&&e.__esModule?e:{default:e}}var lpe={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.verseContent=[],t.chapter=null,t.verses=null,r.cv={}}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{element:u}=t.sequences[0];u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,n.cv[r.chapter]={},n.cv[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,n.cv[r.chapter][r.verses]={})}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{chapter:u,verses:s}=r,{text:o}=t.sequences[0].element,a=(0,AS.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=AS.default.match(o,a,"all");for(var c of i){var l,p;(p=(l=n.cv[u][s])[c])!==null&&p!==void 0||(l[c]=0),n.cv[u][s][c]+=1}}}]},pw={verseWordsActions:lpe},FS=ppe(mf);function ppe(e){return e&&e.__esModule?e:{default:e}}function CS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function hl(e){for(var t=1;t!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.lastWord="",t.waitingMarkup=[],t.currentOccurrences={},t.PendingStartMilestones=[],r.stripped={},r.unalignedWords={},!0}}],startMilestone:[{description:"Ignore zaln startMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n),r.PendingStartMilestones.push(n)}}],endMilestone:[{description:"Ignore zaln endMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r,output:n,config:u}=e,{chapter:s,verses:o,lastWord:a}=r,{verseWords:i}=u,c=["after",a,r.currentOccurrences[a],i[s][o][a]].join("--"),l=hl({},t.sequences[0].element);l.subtype=l.subType,delete l.subType;var p={chapter:s,verses:o,occurrence:r.currentOccurrences[a],occurrences:i[s][o][a],position:"after",word:a,payload:l,startMilestone:r.PendingStartMilestones.shift()};return n.stripped[r.chapter][r.verses][c]?n.stripped[r.chapter][r.verses][c].push(p):n.stripped[r.chapter][r.verses][c]=[p],!1}}],startWrapper:[{description:"Ignore w startWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e,n=hl({},t.sequences[0].element);n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n)}}],endWrapper:[{description:"Ignore w endWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n,config:u}=e;try{var s=t.sequences[0];if(s.type!=="main")return!0;var o=s.element.text,a=(0,FS.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=FS.default.match(o,a,"all"),{chapter:c,verses:l}=r,{verseWords:p}=u;for(var f of i){var d,h;if((h=(d=r.currentOccurrences)[f])!==null&&h!==void 0||(d[f]=0),r.currentOccurrences[f]++,!r.PendingStartMilestones.length&&r.waitingMarkup.length){var E,A,m,y;(A=(E=n.unalignedWords)[c])!==null&&A!==void 0||(E[c]={}),(y=(m=n.unalignedWords[c])[l])!==null&&y!==void 0||(m[l]=[]),n.unalignedWords[c][l].push({word:f,occurrence:r.currentOccurrences[f],totalOccurrences:p[c][l][f]})}for(;r.waitingMarkup.length;){var F=r.waitingMarkup.shift(),B=["before",f,r.currentOccurrences[f],p[c][l][f]].join("--"),P={chapter:c,verses:l,occurrence:r.currentOccurrences[f],occurrences:p[c][l][f],position:"before",word:f,payload:hl(hl({},F),F.subtype==="usfm:w"&&{content:[f]})};n.stripped[r.chapter][r.verses][B]?n.stripped[r.chapter][r.verses][B].push(P):n.stripped[r.chapter][r.verses][B]=[P]}r.lastWord=f}}catch($){throw console.error($),$}return!0}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;try{var u=t.sequences[0].element;u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter]={},n.stripped[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter][r.verses]={})}catch(s){throw console.error(s),s}return!0}}]},fw={stripMarkupActions:hpe},Ks=mpe(mf);function mpe(e){return e&&e.__esModule?e:{default:e}}var dw=[["printable","wordLike",(0,Ks.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")],["printable","lineSpace",(0,Ks.default)("([\\p{Separator} ]{1,127})")],["printable","punctuation",(0,Ks.default)("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",(0,Ks.default)("(.)")]],Epe=Ks.default.union(dw.map(e=>e[2])),vpe={type:"end_milestone",subtype:"usfm:zaln"},ype={startDocument:[{description:"setup",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.currentOccurrences={},r.unalignedWords={},!0}}],text:[{description:"add-to-text",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;try{let m=function(){for(;h.length;)n.outputContentStack[0].push(h.shift())};var s=r.sequences[0];if(s.type!=="main")return!0;var o=r.sequences[0].element.text,a=Ks.default.match(o,Epe,"all"),{chapter:i,verses:c}=n;if(!c)return!0;var{totalOccurrences:l,strippedAlignment:p}=t,f={opened:null},d=y=>{var{subtype:F,content:B=[],atts:P={}}=y;return Object.keys(P).length>0?{type:"wrapper",subtype:F,content:B,atts:P}:{type:"wrapper",subtype:F,content:B}},h=[],E=function(F){var B,P,$,I=(B=Ks.default.match(F,dw[0][2],"all"))===null||B===void 0?void 0:B.length;if(!I)return h.push(F),1;($=(P=n.currentOccurrences)[F])!==null&&$!==void 0||(P[F]=0),n.currentOccurrences[F]++;var U=Ce=>[Ce,F,n.currentOccurrences[F],l[i][c][F]].join("--"),j=p[i][c],W=!1,te=j[U("after")],Y=j[U("before")];if(Y!=null&&Y.length&&m(),te!=null&&te.length&&!f.opened&&(te.map(Ce=>{var{startMilestone:pe}=Ce;return n.outputContentStack[0].push(pe)}),W=!0),Y==null||Y.forEach(Ce=>{var{payload:pe}=Ce;pe.type!=="start_milestone"&&n.outputContentStack[0].push(pe),pe.type==="start_milestone"&&!W&&(n.outputContentStack[0].push(pe),f.opened=!0)}),te==null||te.forEach(Ce=>{var{payload:pe}=Ce;f.opened=!1,n.outputContentStack[0].push(pe)}),!(Y!=null&&Y.length)){var oe,ie,fe,De;f.opened&&(n.outputContentStack[0].push(vpe),f.opened=!1),m(),(ie=(oe=u.unalignedWords)[i])!==null&&ie!==void 0||(oe[i]={}),(De=(fe=u.unalignedWords[i])[c])!==null&&De!==void 0||(fe[c]=[]),u.unalignedWords[n.chapter][n.verses].push({word:F,occurrence:n.currentOccurrences[F],totalOccurrences:l[i][c][F]});var de=d({subtype:"usfm:w",content:[F]});n.outputContentStack[0].push(de)}};for(var A of a)E(A);return m(),!1}catch(m){throw console.error(m),m}}}],mark:[{description:"mark-chapters",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.chapter=s.atts.number,n.verses=0,!0}},{description:"mark-verses",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="verses"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.verses=s.atts.number,n.currentOccurrences={},!0}}]},Dw={mergeAlignmentActions:ype},{verseWordsActions:gpe}=pw,{stripMarkupActions:Ape}=fw,{mergeAlignmentActions:Fpe}=Dw,Cpe={verseWordsActions:gpe,stripMarkupActions:Ape,mergeAlignmentActions:Fpe};let bpe=class{constructor(t){if(!t)throw new Error("Must provide a constructor object to constructor");this.description=t.description?t.description:(()=>{throw new Error("Must provide a description in constructor object")})(),this.test=t.test||(()=>!0),this.action=t.action||(()=>null)}};var Spe=bpe,bS=Spe;let wpe=class hw{constructor(t){if(this.constructor===hw)throw new Error("Abstract class ProskommaRender cannot be instantiated - make as subclass!");var r=t.actions||{};this.debugLevel=t.debugLevel||0,this.actions={};for(var n of["startDocument","endDocument","startSequence","startTable","endTable","endSequence","unresolvedBlockGraft","blockGraft","startParagraph","endParagraph","startRow","endRow","startCell","endCell","metaContent","mark","unresolvedInlineGraft","inlineGraft","startWrapper","endWrapper","startMilestone","endMilestone","startVerses","endVerses","startChapter","endChapter","text"])r[n]?this.actions[n]=r[n].map(u=>new bS(u)):this.actions[n]=[]}addRenderActionObject(t,r){if(!this.actions[t])throw new Error("Unknown event '".concat(t));this.actions[t].push(r)}addRenderAction(t,r){this.addRenderActionObject(t,new bS(r))}describeRenderActions(t){if(!this.actions[t])throw new Error("Unknown event '".concat(t));var r=["**Actions for ".concat(t,`** + */var s=function(a){if(!a.addUnicodeData)throw new ReferenceError("Unicode Base must be loaded before Unicode Scripts");a.addUnicodeData(u.default,"Script")};t.default=s,e.exports=t.default}(gl,gl.exports)),gl.exports}(function(e,t){var r=hs,n=ms;r(t,"__esModule",{value:!0}),t.default=void 0;var u=n($de()),s=n(Vde()),o=n(Hde()),a=n(Wde()),i=n(zde()),c=n(Xde()),l=n(Zde());(0,s.default)(u.default),(0,o.default)(u.default),(0,a.default)(u.default),(0,i.default)(u.default),(0,c.default)(u.default),(0,l.default)(u.default);var p=u.default;t.default=p,e.exports=t.default})(Ih,Ih.exports);var Cd=Ih.exports,zS=Qde(Cd);function Qde(e){return e&&e.__esModule?e:{default:e}}var efe={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.verseContent=[],t.chapter=null,t.verses=null,r.cv={}}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{element:u}=t.sequences[0];u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,n.cv[r.chapter]={},n.cv[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,n.cv[r.chapter][r.verses]={})}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e,{chapter:u,verses:s}=r,{text:o}=t.sequences[0].element,a=(0,zS.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=zS.default.match(o,a,"all");for(var c of i){var l,p;(p=(l=n.cv[u][s])[c])!==null&&p!==void 0||(l[c]=0),n.cv[u][s][c]+=1}}}]},Qw={verseWordsActions:efe},KS=tfe(Cd);function tfe(e){return e&&e.__esModule?e:{default:e}}function XS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Al(e){for(var t=1;t!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.lastWord="",t.waitingMarkup=[],t.currentOccurrences={},t.PendingStartMilestones=[],r.stripped={},r.unalignedWords={},!0}}],startMilestone:[{description:"Ignore zaln startMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n),r.PendingStartMilestones.push(n)}}],endMilestone:[{description:"Ignore zaln endMilestone events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r,output:n,config:u}=e,{chapter:s,verses:o,lastWord:a}=r,{verseWords:i}=u,c=["after",a,r.currentOccurrences[a],i[s][o][a]].join("--"),l=Al({},t.sequences[0].element);l.subtype=l.subType,delete l.subType;var p={chapter:s,verses:o,occurrence:r.currentOccurrences[a],occurrences:i[s][o][a],position:"after",word:a,payload:l,startMilestone:r.PendingStartMilestones.shift()};return n.stripped[r.chapter][r.verses][c]?n.stripped[r.chapter][r.verses][c].push(p):n.stripped[r.chapter][r.verses][c]=[p],!1}}],startWrapper:[{description:"Ignore w startWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e,n=Al({},t.sequences[0].element);n.subtype=n.subType,delete n.subType,r.waitingMarkup.push(n)}}],endWrapper:[{description:"Ignore w endWrapper events",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{}}],text:[{description:"Log occurrences",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n,config:u}=e;try{var s=t.sequences[0];if(s.type!=="main")return!0;var o=s.element.text,a=(0,KS.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})"),i=KS.default.match(o,a,"all"),{chapter:c,verses:l}=r,{verseWords:p}=u;for(var d of i){var f,h;if((h=(f=r.currentOccurrences)[d])!==null&&h!==void 0||(f[d]=0),r.currentOccurrences[d]++,!r.PendingStartMilestones.length&&r.waitingMarkup.length){var y,A,m,v;(A=(y=n.unalignedWords)[c])!==null&&A!==void 0||(y[c]={}),(v=(m=n.unalignedWords[c])[l])!==null&&v!==void 0||(m[l]=[]),n.unalignedWords[c][l].push({word:d,occurrence:r.currentOccurrences[d],totalOccurrences:p[c][l][d]})}for(;r.waitingMarkup.length;){var C=r.waitingMarkup.shift(),B=["before",d,r.currentOccurrences[d],p[c][l][d]].join("--"),T={chapter:c,verses:l,occurrence:r.currentOccurrences[d],occurrences:p[c][l][d],position:"before",word:d,payload:Al(Al({},C),C.subtype==="usfm:w"&&{content:[d]})};n.stripped[r.chapter][r.verses][B]?n.stripped[r.chapter][r.verses][B].push(T):n.stripped[r.chapter][r.verses][B]=[T]}r.lastWord=d}}catch(N){throw console.error(N),N}return!0}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;try{var u=t.sequences[0].element;u.subType==="chapter"?(r.chapter=u.atts.number,r.verses=0,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter]={},n.stripped[r.chapter][r.verses]={}):u.subType==="verses"&&(r.verses=u.atts.number,r.lastWord="",r.currentOccurrences={},n.stripped[r.chapter][r.verses]={})}catch(s){throw console.error(s),s}return!0}}]},e_={stripMarkupActions:sfe},Us=ofe(Cd);function ofe(e){return e&&e.__esModule?e:{default:e}}var t_=[["printable","wordLike",(0,Us.default)("([\\p{Letter}\\p{Number}\\p{Mark}\\u2060]{1,127})")],["printable","lineSpace",(0,Us.default)("([\\p{Separator} ]{1,127})")],["printable","punctuation",(0,Us.default)("([\\p{Punctuation}\\p{Math_Symbol}\\p{Currency_Symbol}\\p{Modifier_Symbol}\\p{Other_Symbol}])")],["bad","unknown",(0,Us.default)("(.)")]],afe=Us.default.union(t_.map(e=>e[2])),ife={type:"end_milestone",subtype:"usfm:zaln"},cfe={startDocument:[{description:"setup",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;return t.chapter=null,t.verses=null,t.currentOccurrences={},r.unalignedWords={},!0}}],text:[{description:"add-to-text",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;try{let m=function(){for(;h.length;)n.outputContentStack[0].push(h.shift())};var s=r.sequences[0];if(s.type!=="main")return!0;var o=r.sequences[0].element.text,a=Us.default.match(o,afe,"all"),{chapter:i,verses:c}=n;if(!c)return!0;var{totalOccurrences:l,strippedAlignment:p}=t,d={opened:null},f=v=>{var{subtype:C,content:B=[],atts:T={}}=v;return Object.keys(T).length>0?{type:"wrapper",subtype:C,content:B,atts:T}:{type:"wrapper",subtype:C,content:B}},h=[],y=function(C){var B,T,N,R=(B=Us.default.match(C,t_[0][2],"all"))===null||B===void 0?void 0:B.length;if(!R)return h.push(C),1;(N=(T=n.currentOccurrences)[C])!==null&&N!==void 0||(T[C]=0),n.currentOccurrences[C]++;var J=ge=>[ge,C,n.currentOccurrences[C],l[i][c][C]].join("--"),q=p[i][c],G=!1,ee=q[J("after")],K=q[J("before")];if(K!=null&&K.length&&m(),ee!=null&&ee.length&&!d.opened&&(ee.map(ge=>{var{startMilestone:pe}=ge;return n.outputContentStack[0].push(pe)}),G=!0),K==null||K.forEach(ge=>{var{payload:pe}=ge;pe.type!=="start_milestone"&&n.outputContentStack[0].push(pe),pe.type==="start_milestone"&&!G&&(n.outputContentStack[0].push(pe),d.opened=!0)}),ee==null||ee.forEach(ge=>{var{payload:pe}=ge;d.opened=!1,n.outputContentStack[0].push(pe)}),!(K!=null&&K.length)){var ue,oe,de,he;d.opened&&(n.outputContentStack[0].push(ife),d.opened=!1),m(),(oe=(ue=u.unalignedWords)[i])!==null&&oe!==void 0||(ue[i]={}),(he=(de=u.unalignedWords[i])[c])!==null&&he!==void 0||(de[c]=[]),u.unalignedWords[n.chapter][n.verses].push({word:C,occurrence:n.currentOccurrences[C],totalOccurrences:l[i][c][C]});var fe=f({subtype:"usfm:w",content:[C]});n.outputContentStack[0].push(fe)}};for(var A of a)y(A);return m(),!1}catch(m){throw console.error(m),m}}}],mark:[{description:"mark-chapters",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.chapter=s.atts.number,n.verses=0,!0}},{description:"mark-verses",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="verses"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;return n.verses=s.atts.number,n.currentOccurrences={},!0}}]},r_={mergeAlignmentActions:cfe},{verseWordsActions:lfe}=Qw,{stripMarkupActions:pfe}=e_,{mergeAlignmentActions:dfe}=r_,ffe={verseWordsActions:lfe,stripMarkupActions:pfe,mergeAlignmentActions:dfe};let Dfe=class{constructor(t){if(!t)throw new Error("Must provide a constructor object to constructor");this.description=t.description?t.description:(()=>{throw new Error("Must provide a description in constructor object")})(),this.test=t.test||(()=>!0),this.action=t.action||(()=>null)}};var hfe=Dfe,YS=hfe;let mfe=class n_{constructor(t){if(this.constructor===n_)throw new Error("Abstract class ProskommaRender cannot be instantiated - make as subclass!");var r=t.actions||{};this.debugLevel=t.debugLevel||0,this.actions={};for(var n of["startDocument","endDocument","startSequence","startTable","endTable","endSequence","unresolvedBlockGraft","blockGraft","startParagraph","endParagraph","startRow","endRow","startCell","endCell","metaContent","mark","unresolvedInlineGraft","inlineGraft","startWrapper","endWrapper","startMilestone","endMilestone","startVerses","endVerses","startChapter","endChapter","text"])r[n]?this.actions[n]=r[n].map(u=>new YS(u)):this.actions[n]=[]}addRenderActionObject(t,r){if(!this.actions[t])throw new Error("Unknown event '".concat(t));this.actions[t].push(r)}addRenderAction(t,r){this.addRenderActionObject(t,new YS(r))}describeRenderActions(t){if(!this.actions[t])throw new Error("Unknown event '".concat(t));var r=["**Actions for ".concat(t,`** `)];for(var n of this.actions[t])r.push("IF ".concat(n.test.toString(),":")),r.push(" DO ".concat(n.description));return r.join(` -`)}renderDocument(t){var{docId:r,config:n,output:u}=t,s={},o={};return this.renderDocument1({docId:r,config:n,context:s,workspace:o,output:u}),u}renderDocument1(t){throw new Error("Define renderDocument1() in subclass")}renderEvent(t,r){var n=r.context;if(this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length),"EVENT ").concat(t)),!this.actions[t])throw new Error("Unknown event '".concat(t));var u=!1;for(var s of this.actions[t]){var o=!1;try{o=s.test(r)}catch(c){var a="Exception from test of action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c);throw new Error(a)}if(o){u=!0,this.debugLevel>0&&console.log("".concat(" ".repeat(n.sequences.length)," ").concat(t," action: ").concat(s.description));var i=!1;try{i=s.action(r)}catch(c){throw new Error("Exception from action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c))}if(!i)break}}if(["unresolvedBlockGraft","unresolvedInlineGraft"].includes(t)&&this.actions[t].length===0)throw new Error("No action for ".concat(t," graft event in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: add an action or fix your data!"));!u&&this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length)," No matching action"))}};var Ac=wpe,_pe=Ac;let Bpe=class extends _pe{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata,mainSequenceId:this.srcJson.main_sequence_id,nSequences:Object.keys(this.srcJson.sequences).length},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,this.srcJson.main_sequence_id),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.srcJson.sequences[r];if(!u)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(u,r)),this.renderEvent("startSequence",t);for(var[s,o]of u.blocks.entries())n.sequences[0].block={type:o.type,subType:o.subtype,blockN:s,wrappers:[]},o.type==="graft"?o.target&&!this.srcJson.sequences[o.target]?(n.sequences[0].block.target=o.target,this.renderEvent("unresolvedBlockGraft",t)):(n.sequences[0].block.target=o.target,n.sequences[0].block.isNew=o.new||!1,this.renderEvent("blockGraft",t)):o.type==="row"?(this.renderEvent("startRow",t),this.renderContent(o.content,t),this.renderEvent("endRow",t)):(this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete n.sequences[0].block;this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.target&&(s.target=t.target),t.type==="graft"&&(s.isNew=t.new||!1),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft"){if(t.target&&t.target&&!this.srcJson.sequences[t.target]){this.renderEvent("unresolvedInlineGraft",r);return}this.renderEvent("inlineGraft",r),n(s)}else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var As=Bpe,Tpe=$pe(As);function $pe(e){return e&&e.__esModule?e:{default:e}}var{verseWordsActions:Ppe}=pw,Ope=function(t){var{perf:r}=t,n=new Tpe.default({srcJson:r,actions:Ppe}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},kpe={name:"verseWords",type:"Transform",description:"PERF=>JSON: Counts words occurrences",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"verseWords",type:"json"}],code:Ope},Ipe={verseWords:kpe},Npe=e=>{var t={};for(var r of e)for(var n of Object.keys(r))t[n]?t[n].push(...r[n]):t[n]=r[n];return t},Ef=Npe,qpe={startDocument:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf={},u.perf.schema=r.document.schema,u.perf.metadata=r.document.metadata,u.perf.sequences={}}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf.sequences[r.sequences[0].id]={type:r.sequences[0].type,blocks:[]},n.outputSequence=u.perf.sequences[r.sequences[0].id],r.sequences[0].type==="main"&&(u.perf.main_sequence_id=r.sequences[0].id)}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;r.sequences.length>1&&(n.outputSequence=u.perf.sequences[r.sequences[1].id])}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type,subtype:t.subType};t.target&&(r.target=t.target,e.context.renderer.renderSequenceId(e,r.target)),t.isNew&&(r.new=t.isNew),e.workspace.outputSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].block,o={type:s.type,subtype:s.subType,content:[]};n.outputSequence.blocks.push(o),n.currentContent=o.content,n.outputBlock=n.outputSequence.blocks[n.outputSequence.blocks.length-1],n.outputContentStack=[n.outputBlock.content]}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.currentContent=s.metaContent;var o=n.outputContentStack[1][n.outputContentStack[1].length-1];o.meta_content=[],n.outputContentStack.unshift(o.meta_content),r.renderer.renderContent(n.currentContent,e),n.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType};if(t.target){r.target=t.target;var n=e.workspace.outputContentStack[0];e.context.renderer.renderSequenceId(e,t.target),e.workspace.outputContentStack[0]=n}t.isNew&&(r.new=t.isNew),e.workspace.outputContentStack[0].push(r)}}],startRow:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};r.outputSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.outputSequence.blocks[r.outputSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content]}}],endRow:[{description:"identity",test:()=>!0,action:e=>{}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType,content:[]};"atts"in s&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o),n.outputContentStack.unshift(o.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};n.outputContentStack[0].push(o)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.outputContentStack[0].push(s.text)}}]},Fc={identityActions:qpe},xpe=mw(As),Rpe=mw(Ef);function mw(e){return e&&e.__esModule?e:{default:e}}var{identityActions:jpe}=Fc,{stripMarkupActions:Mpe}=fw,Lpe=function(t){var{perf:r,verseWords:n}=t,u=new xpe.default({srcJson:r,actions:(0,Rpe.default)([Mpe,jpe])}),s={};return u.renderDocument({docId:"",config:{verseWords:n},output:s}),{perf:s.perf,strippedAlignment:s.stripped,unalignedWords:s.unalignedWords}},Upe={name:"stripAlignment",type:"Transform",description:"PERF=>PERF: Strips alignment markup",inputs:[{name:"perf",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],code:Lpe},Gpe={stripAlignment:Upe},Vpe=Ew(As),Hpe=Ew(Ef);function Ew(e){return e&&e.__esModule?e:{default:e}}var{identityActions:Wpe}=Fc,{mergeAlignmentActions:Jpe}=Dw,zpe=function(t){var{perf:r,verseWords:n,strippedAlignment:u}=t,s=new Vpe.default({srcJson:r,actions:(0,Hpe.default)([Jpe,Wpe])}),o={};return s.renderDocument({docId:"",config:{totalOccurrences:n,strippedAlignment:u},output:o}),{perf:o.perf,unalignedWords:o.unalignedWords}},Kpe={name:"mergeAlignment",type:"Transform",description:"PERF=>PERF adds report to verses",inputs:[{name:"perf",type:"json",source:""},{name:"strippedAlignment",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],code:zpe},Xpe={mergeAlignment:Kpe},{verseWords:Ype}=Ipe,{stripAlignment:Zpe}=Gpe,{mergeAlignment:Qpe}=Xpe,efe={verseWords:Ype,stripAlignment:Zpe,mergeAlignment:Qpe},tfe=Cpe,rfe=efe,nfe={transforms:rfe,renderActions:tfe},ufe={},vw=function(t){var{usfm:r,selectors:n,proskomma:u}=t;u.importDocuments(n,"usfm",[r]);var s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0],o=s.id,a=s.docSetId;u.gqlQuerySync('mutation { deleteDocument(docSetId: "'.concat(a,'", documentId: "').concat(o,'") }'));var i=JSON.parse(s.perf);return{perf:i}},sfe={name:"usfmToPerf",type:"Transform",description:"USFM=>PERF: Conversion via Proskomma",inputs:[{name:"usfm",type:"text",source:""},{name:"selectors",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:vw},ofe={usfmToPerf:sfe,usfmToPerfCode:vw},{usfmToPerf:afe,usfmToPerfCode:ife}=ofe,cfe={usfmToPerf:afe,usfmToPerfCode:ife},lfe=ufe,pfe=cfe,ffe={transforms:pfe,renderActions:lfe};function SS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function dfe(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.sofria={},u.paras=[],u.sofria.schema=r.document.schema,u.sofria.metadata=r.document.metadata,u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.chapter=null,n.verses=null,n.cachedChapter=null,n.cachedVerses=null}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentSequence==null&&(r.currentSequence={}),r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.currentSequence.type==="main"&&(t.chapter=null,t.verses=null),r.paras==null?r.paras=t.currentSequence.blocks:t.currentSequence.type==="main"&&(r.paras=r.paras.concat(t.currentSequence.blocks)),t.currentSequence=null}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],startRow:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endRow:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.currentContent=n.metaContent;var u=r.outputContentStack[1][r.outputContentStack[1].length-1];u.meta_content=[],r.outputContentStack.unshift(u.meta_content),t.renderer.renderContent(r.currentContent,e),r.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType,sequence:{}},n=e.workspace.currentSequence,u=[...e.workspace.outputContentStack];e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.outputContentStack=u,e.workspace.currentSequence=n,e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?(r.chapter=n.atts.number,r.cachedChapter=r.chapter):n.subType==="verses"&&(r.verses=n.atts.number,r.cachedVerses=r.verses);var u={type:n.type,subtype:n.subType,content:[]};if("atts"in n&&(u.atts=dfe({},n.atts)),r.outputContentStack.length===0)throw new Error("outputContentStack is empty before pushing to its first element, near ".concat(t.document.metadata.document.bookCode," ").concat(r.cachedChapter,":").concat(r.cachedVerses));r.outputContentStack[0].push(u),r.outputContentStack.unshift(u.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?r.chapter=null:n.subType==="verses"&&(r.verses=null),r.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};r.outputContentStack[0].push(u)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.outputContentStack&&r.outputContentStack[0].push(n.text)}}]},yw={identityActions:Efe},{identityActions:vfe}=yw,yfe={identityActions:vfe},{identityActions:gfe}=yw,Afe=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:gfe}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},Ffe={name:"identity",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:Afe},Cfe={identity:Ffe},{identity:bfe}=Cfe,Sfe={identity:bfe},wfe=yfe,_fe=Sfe,Bfe={transforms:_fe,renderActions:wfe},Tfe={startDocument:[{description:"Set up word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.words={}}}],text:[{description:"Split strings and add words to word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;for(var s of r.sequences[0].element.text.split(/[\s:;,.]+/).filter(o=>o.length>0))s=s.toLowerCase(),s in n.words?n.words[s]+=1:n.words[s]=1}}],endDocument:[{description:"Sort words",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.words=[...Object.entries(n.words)].sort((s,o)=>o[1]-s[1])}}]},gw={wordCountActions:Tfe},wS=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),$fe={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.blockRecords=[],r.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(wS(t))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(wS(t))}}],mark:[{description:"Add chapter number to block record",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.blockRecords[n.blockRecords.length-1].perfChapter=r.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;for(var[n,u]of Object.entries(t.blockRecords))if(u.perfChapter){for(var s=n,o=!1;s>0&&!o;)t.blockRecords[s-1].type==="paragraph"||t.blockRecords[s-1].subType==="title"?o=!0:s--;r.report[s.toString()]=u.perfChapter}}}]},Aw={calculateUsfmChapterPositionsActions:$fe},Nr=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,Pfe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r==null&&(r={});var n="\\".concat(t,"-s |");for(var[u,s]of Object.entries(r))u==="x-morph"&&typeof s!="string"?n=n+Nr(u)+'="'+s.join(",")+'" ':n=n+Nr(u)+'="'+s+'" ';return n+"\\*"},Ofe=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;r==null&&(r={});var u="|";for(var[s,o]of Object.entries(r))u=u+Nr(s)+'="'+o+'" ';return u=u+"\\",n&&(u=u+"+"),u+t+"*"},kfe={startDocument:[{description:"Set up environment",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits=[""],r.nestedWrapper=0;for(var[n,u]of Object.entries(t.document.metadata.document).filter(s=>!["tags","properties","bookCode","cl"].includes(s[0])))r.usfmBits.push("\\".concat(Nr(n)," ").concat(u,` +`)}renderDocument(t){var{docId:r,config:n,output:u}=t,s={},o={};return this.renderDocument1({docId:r,config:n,context:s,workspace:o,output:u}),u}renderDocument1(t){throw new Error("Define renderDocument1() in subclass")}renderEvent(t,r){var n=r.context;if(this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length),"EVENT ").concat(t)),!this.actions[t])throw new Error("Unknown event '".concat(t));var u=!1;for(var s of this.actions[t]){var o=!1;try{o=s.test(r)}catch(c){var a="Exception from test of action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c);throw new Error(a)}if(o){u=!0,this.debugLevel>0&&console.log("".concat(" ".repeat(n.sequences.length)," ").concat(t," action: ").concat(s.description));var i=!1;try{i=s.action(r)}catch(c){throw new Error("Exception from action '".concat(s.description,"' for event ").concat(t," in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: ").concat(c))}if(!i)break}}if(["unresolvedBlockGraft","unresolvedInlineGraft"].includes(t)&&this.actions[t].length===0)throw new Error("No action for ".concat(t," graft event in ").concat(n.sequences.length>0?n.sequences[0].type:"no"," sequence: add an action or fix your data!"));!u&&this.debugLevel>1&&console.log("".concat(" ".repeat(n.sequences.length)," No matching action"))}};var Ac=mfe,Efe=Ac;let yfe=class extends Efe{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata,mainSequenceId:this.srcJson.main_sequence_id,nSequences:Object.keys(this.srcJson.sequences).length},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,this.srcJson.main_sequence_id),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.srcJson.sequences[r];if(!u)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(u,r)),this.renderEvent("startSequence",t);for(var[s,o]of u.blocks.entries())n.sequences[0].block={type:o.type,subType:o.subtype,blockN:s,wrappers:[]},o.type==="graft"?o.target&&!this.srcJson.sequences[o.target]?(n.sequences[0].block.target=o.target,this.renderEvent("unresolvedBlockGraft",t)):(n.sequences[0].block.target=o.target,n.sequences[0].block.isNew=o.new||!1,this.renderEvent("blockGraft",t)):o.type==="row"?(this.renderEvent("startRow",t),this.renderContent(o.content,t),this.renderEvent("endRow",t)):(this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete n.sequences[0].block;this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.target&&(s.target=t.target),t.type==="graft"&&(s.isNew=t.new||!1),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft"){if(t.target&&t.target&&!this.srcJson.sequences[t.target]){this.renderEvent("unresolvedInlineGraft",r);return}this.renderEvent("inlineGraft",r),n(s)}else if(s.type==="wrapper")u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var gs=yfe,vfe=gfe(gs);function gfe(e){return e&&e.__esModule?e:{default:e}}var{verseWordsActions:Afe}=Qw,Ffe=function(t){var{perf:r}=t,n=new vfe.default({srcJson:r,actions:Afe}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},Cfe={name:"verseWords",type:"Transform",description:"PERF=>JSON: Counts words occurrences",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"verseWords",type:"json"}],code:Ffe},bfe={verseWords:Cfe},Sfe=e=>{var t={};for(var r of e)for(var n of Object.keys(r))t[n]?t[n].push(...r[n]):t[n]=r[n];return t},bd=Sfe,wfe={startDocument:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf={},u.perf.schema=r.document.schema,u.perf.metadata=r.document.metadata,u.perf.sequences={}}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.perf.sequences[r.sequences[0].id]={type:r.sequences[0].type,blocks:[]},n.outputSequence=u.perf.sequences[r.sequences[0].id],r.sequences[0].type==="main"&&(u.perf.main_sequence_id=r.sequences[0].id)}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;r.sequences.length>1&&(n.outputSequence=u.perf.sequences[r.sequences[1].id])}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type,subtype:t.subType};t.target&&(r.target=t.target,e.context.renderer.renderSequenceId(e,r.target)),t.isNew&&(r.new=t.isNew),e.workspace.outputSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].block,o={type:s.type,subtype:s.subType,content:[]};n.outputSequence.blocks.push(o),n.currentContent=o.content,n.outputBlock=n.outputSequence.blocks[n.outputSequence.blocks.length-1],n.outputContentStack=[n.outputBlock.content]}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.currentContent=s.metaContent;var o=n.outputContentStack[1][n.outputContentStack[1].length-1];o.meta_content=[],n.outputContentStack.unshift(o.meta_content),r.renderer.renderContent(n.currentContent,e),n.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType};if(t.target){r.target=t.target;var n=e.workspace.outputContentStack[0];e.context.renderer.renderSequenceId(e,t.target),e.workspace.outputContentStack[0]=n}t.isNew&&(r.new=t.isNew),e.workspace.outputContentStack[0].push(r)}}],startRow:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};r.outputSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.outputSequence.blocks[r.outputSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content]}}],endRow:[{description:"identity",test:()=>!0,action:e=>{}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType,content:[]};"atts"in s&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o),n.outputContentStack.unshift(o.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};s.atts&&typeof s.atts=="object"&&Object.keys(s.atts).length!==0&&(o.atts=s.atts),n.outputContentStack[0].push(o)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element,o={type:s.type,subtype:s.subType};n.outputContentStack[0].push(o)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;n.outputContentStack[0].push(s.text)}}]},Fc={identityActions:wfe},_fe=u_(gs),Bfe=u_(bd);function u_(e){return e&&e.__esModule?e:{default:e}}var{identityActions:Tfe}=Fc,{stripMarkupActions:$fe}=e_,Pfe=function(t){var{perf:r,verseWords:n}=t,u=new _fe.default({srcJson:r,actions:(0,Bfe.default)([$fe,Tfe])}),s={};return u.renderDocument({docId:"",config:{verseWords:n},output:s}),{perf:s.perf,strippedAlignment:s.stripped,unalignedWords:s.unalignedWords}},kfe={name:"stripAlignment",type:"Transform",description:"PERF=>PERF: Strips alignment markup",inputs:[{name:"perf",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],code:Pfe},Ofe={stripAlignment:kfe},Ife=s_(gs),Nfe=s_(bd);function s_(e){return e&&e.__esModule?e:{default:e}}var{identityActions:qfe}=Fc,{mergeAlignmentActions:xfe}=r_,Rfe=function(t){var{perf:r,verseWords:n,strippedAlignment:u}=t,s=new Ife.default({srcJson:r,actions:(0,Nfe.default)([xfe,qfe])}),o={};return s.renderDocument({docId:"",config:{totalOccurrences:n,strippedAlignment:u},output:o}),{perf:o.perf,unalignedWords:o.unalignedWords}},jfe={name:"mergeAlignment",type:"Transform",description:"PERF=>PERF adds report to verses",inputs:[{name:"perf",type:"json",source:""},{name:"strippedAlignment",type:"json",source:""},{name:"verseWords",type:"json",source:""}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],code:Rfe},Mfe={mergeAlignment:jfe},{verseWords:Lfe}=bfe,{stripAlignment:Ufe}=Ofe,{mergeAlignment:Gfe}=Mfe,Vfe={verseWords:Lfe,stripAlignment:Ufe,mergeAlignment:Gfe},Hfe=ffe,Wfe=Vfe,Jfe={transforms:Wfe,renderActions:Hfe},zfe={},o_=function(t){var{usfm:r,selectors:n,proskomma:u}=t;u.importDocuments(n,"usfm",[r]);var s=u.gqlQuerySync("{documents {id docSetId perf} }").data.documents[0],o=s.id,a=s.docSetId;u.gqlQuerySync('mutation { deleteDocument(docSetId: "'.concat(a,'", documentId: "').concat(o,'") }'));var i=JSON.parse(s.perf);return{perf:i}},Kfe={name:"usfmToPerf",type:"Transform",description:"USFM=>PERF: Conversion via Proskomma",inputs:[{name:"usfm",type:"text",source:""},{name:"selectors",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:o_},Xfe={usfmToPerf:Kfe,usfmToPerfCode:o_},{usfmToPerf:Yfe,usfmToPerfCode:Zfe}=Xfe,Qfe={usfmToPerf:Yfe,usfmToPerfCode:Zfe},e1e=zfe,t1e=Qfe,r1e={transforms:t1e,renderActions:e1e};function ZS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function n1e(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.sofria={},u.paras=[],u.sofria.schema=r.document.schema,u.sofria.metadata=r.document.metadata,u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.chapter=null,n.verses=null,n.cachedChapter=null,n.cachedVerses=null}}],endDocument:[{description:"identity",test:()=>!0,action:e=>{}}],startSequence:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentSequence==null&&(r.currentSequence={}),r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"identity",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.currentSequence.type==="main"&&(t.chapter=null,t.verses=null),r.paras==null?r.paras=t.currentSequence.blocks:t.currentSequence.type==="main"&&(r.paras=r.paras.concat(t.currentSequence.blocks)),t.currentSequence=null}}],blockGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].block,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}],startParagraph:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endParagraph:[{description:"identity",test:()=>!0,action:e=>{}}],startRow:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block,u={type:n.type,subtype:n.subType,content:[]};if(r.currentSequence.blocks.push(u),r.currentContent=u.content,r.outputBlock=r.currentSequence.blocks[r.currentSequence.blocks.length-1],r.outputContentStack=[r.outputBlock.content],r.currentSequence.type==="main"){for(var s of["chapter","verses"])if(r[s]){var o={type:"wrapper",subtype:s,content:[],atts:{number:r[s]}};r.outputContentStack[0].push(o),r.outputContentStack.unshift(o.content)}}}}],endRow:[{description:"identity",test:()=>!0,action:e=>{}}],metaContent:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.currentContent=n.metaContent;var u=r.outputContentStack[1][r.outputContentStack[1].length-1];u.meta_content=[],r.outputContentStack.unshift(u.meta_content),t.renderer.renderContent(r.currentContent,e),r.outputContentStack.shift()}}],mark:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],inlineGraft:[{description:"identity",test:()=>!0,action:e=>{var t=e.context.sequences[0].element,r={type:t.type,subtype:t.subType,sequence:{}},n=e.workspace.currentSequence,u=[...e.workspace.outputContentStack];e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e),e.workspace.outputContentStack=u,e.workspace.currentSequence=n,e.workspace.outputContentStack[0].push(r)}}],startWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?(r.chapter=n.atts.number,r.cachedChapter=r.chapter):n.subType==="verses"&&(r.verses=n.atts.number,r.cachedVerses=r.verses);var u={type:n.type,subtype:n.subType,content:[]};if("atts"in n&&(u.atts=n1e({},n.atts)),r.outputContentStack.length===0)throw new Error("outputContentStack is empty before pushing to its first element, near ".concat(t.document.metadata.document.bookCode," ").concat(r.cachedChapter,":").concat(r.cachedVerses));r.outputContentStack[0].push(u),r.outputContentStack.unshift(u.content)}}],endWrapper:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="chapter"?r.chapter=null:n.subType==="verses"&&(r.verses=null),r.outputContentStack.shift()}}],startMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};n.atts&&(u.atts=n.atts),r.outputContentStack[0].push(u)}}],endMilestone:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u={type:n.type,subtype:n.subType};r.outputContentStack[0].push(u)}}],text:[{description:"identity",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;r.outputContentStack&&r.outputContentStack[0].push(n.text)}}]},a_={identityActions:a1e},{identityActions:i1e}=a_,c1e={identityActions:i1e},{identityActions:l1e}=a_,p1e=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:l1e}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},d1e={name:"identity",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:p1e},f1e={identity:d1e},{identity:D1e}=f1e,h1e={identity:D1e},m1e=c1e,E1e=h1e,y1e={transforms:E1e,renderActions:m1e},v1e={startDocument:[{description:"Set up word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.words={}}}],text:[{description:"Split strings and add words to word object",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;for(var s of r.sequences[0].element.text.split(/[\s:;,.]+/).filter(o=>o.length>0))s=s.toLowerCase(),s in n.words?n.words[s]+=1:n.words[s]=1}}],endDocument:[{description:"Sort words",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;u.words=[...Object.entries(n.words)].sort((s,o)=>o[1]-s[1])}}]},i_={wordCountActions:v1e},QS=e=>({type:e.sequences[0].block.type,subType:e.sequences[0].block.subType,pos:e.sequences[0].block.blockN,perfChapter:null}),g1e={startDocument:[{description:"Set up storage",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;t.blockRecords=[],r.report={}}}],startParagraph:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(QS(t))}}],blockGraft:[{description:"Set up block record",test:()=>!0,action:e=>{var{context:t,workspace:r,output:n}=e;r.blockRecords.push(QS(t))}}],mark:[{description:"Add chapter number to block record",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="chapter"},action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.blockRecords[n.blockRecords.length-1].perfChapter=r.sequences[0].element.atts.number}}],endDocument:[{description:"Populate report",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;for(var[n,u]of Object.entries(t.blockRecords))if(u.perfChapter){for(var s=n,o=!1;s>0&&!o;)t.blockRecords[s-1].type==="paragraph"||t.blockRecords[s-1].subType==="title"?o=!0:s--;r.report[s.toString()]=u.perfChapter}}}]},c_={calculateUsfmChapterPositionsActions:g1e},Br=e=>["toc","toca","mt","imt","s","ms","mte","sd"].includes(e)?e+"1":e,A1e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};r==null&&(r={});var n="\\".concat(t,"-s |");for(var[u,s]of Object.entries(r))u==="x-morph"&&typeof s!="string"?n=n+Br(u)+'="'+s.join(",")+'" ':n=n+Br(u)+'="'+s+'" ';return n+"\\*"},F1e=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;r==null&&(r={});var u="|";for(var[s,o]of Object.entries(r))u=u+Br(s)+'="'+o+'" ';return u=u+"\\",n&&(u=u+"+"),u+t+"*"},C1e={startDocument:[{description:"Set up environment",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits=[""],r.nestedWrapper=0;for(var[n,u]of Object.entries(t.document.metadata.document).filter(s=>!["tags","properties","bookCode","cl"].includes(s[0])))r.usfmBits.push("\\".concat(Br(n)," ").concat(u,` `))}}],blockGraft:[{description:"Follow block grafts",test:e=>{var{context:t}=e;return["title","heading","introduction"].includes(t.sequences[0].block.subType)},action:e=>{var t=e.context.sequences[0],r=e.config.report[t.block.blockN.toString()],n=t.block.target;r&&t.type==="main"&&e.workspace.usfmBits.push(` \\c `.concat(r,` -`)),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0];r.usfmBits.push("\\".concat(Nr(u.block.subType.split(":")[1])," "))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0],s=n.report[u.block.blockN.toString()];s&&u.type==="main"&&r.usfmBits.push(` +`)),n&&e.context.renderer.renderSequenceId(e,n)}}],inlineGraft:[{description:"Follow inline grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].element.target;t&&e.context.renderer.renderSequenceId(e,t)}}],startParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0];r.usfmBits.push("\\".concat(Br(u.block.subType.split(":")[1])," "))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0}},{description:"Output paragraph tag (main)",test:()=>!0,action:e=>{var{context:t,workspace:r,config:n}=e;r.nestedWrapper=0;var u=t.sequences[0],s=n.report[u.block.blockN.toString()];s&&u.type==="main"&&r.usfmBits.push(` \\c `.concat(s,` `)),r.usfmBits.push(` -\\`.concat(Nr(u.block.subType.split(":")[1]),` -`))}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e,u=t.sequences[0];r.usfmBits.push("\\".concat(Nr(u.block.subType.split(":")[1]),"*"))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{}},{description:"Output nl",test:()=>!0,action:e=>{var{workspace:t}=e;t.usfmBits.push(` -`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u=Pfe(Nr(n.subType.split(":")[1]),n.atts);r.usfmBits.push(u)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push("\\".concat(Nr(t.sequences[0].element.subType.split(":")[1]),"-e\\*"))}}],text:[{description:"Output text",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.text;r.usfmBits.push(n)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="verses"&&r.usfmBits.push(` +\\`.concat(Br(u.block.subType.split(":")[1]),` +`))}}],endParagraph:[{description:"Output footnote paragraph tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"&&t.sequences[0].type==="footnote"||t.sequences[0].block.subType==="usfm:x"&&t.sequences[0].type==="xref"},action:e=>{var{context:t,workspace:r,config:n}=e,u=t.sequences[0];r.usfmBits.push("\\".concat(Br(u.block.subType.split(":")[1]),"*"))}},{description:"Output footnote note_caller tag (footnote)",test:e=>{var{context:t}=e;return t.sequences[0].block.subType==="usfm:f"||t.sequences[0].block.subType==="usfm:x"},action:e=>{}},{description:"Output nl",test:()=>!0,action:e=>{var{workspace:t}=e;t.usfmBits.push(` +`)}}],startMilestone:[{description:"Output start milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element,u=A1e(Br(n.subType.split(":")[1]),n.atts);r.usfmBits.push(u)}}],endMilestone:[{description:"Output end milestone",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push("\\".concat(Br(t.sequences[0].element.subType.split(":")[1]),"-e\\*"))}}],text:[{description:"Output text",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.text;r.usfmBits.push(n)}}],mark:[{description:"Output chapter or verses",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element;n.subType==="verses"&&r.usfmBits.push(` \\v `.concat(n.atts.number,` `))}}],endSequence:[{description:"Output \\cl",test:e=>{var{context:t}=e;return t.document.metadata.document.cl&&t.sequences[0].type==="title"},action:e=>{var{context:t,workspace:r}=e;r.usfmBits.push(` \\cl `.concat(t.document.metadata.document.cl,` -`))}}],startWrapper:[{description:"Output start tag",test:()=>!0,action:e=>{var{workspace:t,context:r}=e,n=r.sequences[0];t.nestedWrapper>0?t.usfmBits.push("\\+".concat(Nr(n.element.subType.split(":")[1])," ")):t.usfmBits.push("\\".concat(Nr(n.element.subType.split(":")[1])," ")),t.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:e=>{var{context:t}=e;return!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(t.sequences[0].element.subType.split(":")[1])},action:e=>{var{workspace:t,context:r}=e;t.nestedWrapper-=1;var n=r.sequences[0],u=n.element.subType.split(":")[1],s=t.nestedWrapper>0;if(u==="w"){var o=Ofe(Nr(u),n.element.atts,s);t.usfmBits.push(o)}else s?t.usfmBits.push("\\+".concat(Nr(n.element.subType.split(":")[1]),"*")):t.usfmBits.push("\\".concat(Nr(n.element.subType.split(":")[1]),"*"))}},{description:"Do NOT output end tag",test:()=>!0,action:e=>{var{workspace:t}=e;t.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;r.usfm=t.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` -`)}}]},Fw={perfToUsfmActions:kfe},{wordCountActions:Ife}=gw,{calculateUsfmChapterPositionsActions:Nfe}=Aw,{perfToUsfmActions:qfe}=Fw,xfe={wordCountActions:Ife,perfToUsfmActions:qfe,calculateUsfmChapterPositionsActions:Nfe},Rfe=jfe(As);function jfe(e){return e&&e.__esModule?e:{default:e}}var{wordCountActions:Mfe}=gw,Lfe=function(t){var{perf:r}=t,n=new Rfe.default({srcJson:r,actions:Mfe}),u={};return n.renderDocument({docId:"",config:{},output:u}),{report:u.report}},Ufe={name:"wordCount",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:Lfe},Gfe={wordCount:Ufe},Vfe=Hfe(As);function Hfe(e){return e&&e.__esModule?e:{default:e}}var{calculateUsfmChapterPositionsActions:Wfe}=Aw,Jfe=function(t){var{perf:r}=t,n=new Vfe.default({srcJson:r,actions:Wfe}),u={};return n.renderDocument({docId:"",config:{maxLength:60},output:u}),{report:u.report}},zfe={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:Jfe},Kfe={calculateUsfmChapterPositions:zfe},Xfe=Yfe(As);function Yfe(e){return e&&e.__esModule?e:{default:e}}var{perfToUsfmActions:Zfe}=Fw,Qfe=function(t){var{perf:r,report:n}=t,u=new Xfe.default({srcJson:r,actions:Zfe}),s={};return u.renderDocument({docId:"",config:{report:n},output:s}),{usfm:s.usfm}},e1e={name:"perfToUsfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:Qfe},t1e={perfToUsfm:e1e},{wordCount:r1e}=Gfe,{calculateUsfmChapterPositions:n1e}=Kfe,{perfToUsfm:u1e}=t1e,s1e={wordCount:r1e,perfToUsfm:u1e,calculateUsfmChapterPositions:n1e},o1e=xfe,a1e=s1e,i1e={transforms:a1e,renderActions:o1e},c1e={startMilestone:[{description:"Ignore startMilestone events",test:()=>!0,action:()=>{}}],endMilestone:[{description:"Ignore endMilestone events",test:()=>!0,action:()=>{}}],startWrapper:[{description:"Ignore startWrapper events",test:()=>!0,action:()=>{}}],endWrapper:[{description:"Ignore endWrapper events",test:()=>!0,action:()=>{}}],blockGraft:[{description:"Ignore blockGraft events, except for title (\\mt)",test:e=>e.context.sequences[0].block.subType!=="title",action:e=>{}}],inlineGraft:[{description:"Ignore inlineGraft events",test:()=>!0,action:()=>{}}],mark:[{description:"Ignore mark events, except for chapter and verses",test:e=>{var{context:t}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)},action:()=>{}}]},Cw={justTheBibleActions:c1e},{identityActions:l1e}=Fc,{justTheBibleActions:p1e}=Cw,f1e={identityActions:l1e,justTheBibleActions:p1e},{identityActions:d1e}=Fc,D1e=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:d1e}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},h1e={name:"identityTransform",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:D1e},m1e={identity:h1e},E1e=bw(As),v1e=bw(Ef);function bw(e){return e&&e.__esModule?e:{default:e}}var{identityActions:y1e}=Fc,{justTheBibleActions:g1e}=Cw,A1e=function(t){var{perf:r}=t,n=new E1e.default({srcJson:r,actions:(0,v1e.default)([g1e,y1e])}),u={};return n.renderDocument({docId:"",config:{},output:u}),{perf:u.perf}},F1e={name:"justTheBible",type:"Transform",description:"PERF=>PERF: Strips most markup",documentation:"This transform removes milestones, wrappers and most marks. It has been used in several pipelines. It may also be stripping metaContent.",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:A1e},C1e={justTheBible:F1e};const cr={},Sw=e=>{let t=typeof e;return t==="number"||t==="string"||t==="boolean"||t==="undefined"||t==="bigint"||t==="symbol"||e===null},Cc=e=>{if(Sw(e)||!(e instanceof Object))return"primitive";const t=e.constructor&&e.constructor.name&&e.constructor.name.toLowerCase();if(typeof t=="string"&&t.length&&cr[t])return t;let r;for(const n in cr)if(r=cr[n].type,!r||e instanceof r)return n;return"unknown"},b1e=(e,t,r)=>Array.prototype.push.call(e,r),S1e=e=>{const t=[];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},w1e=e=>{const t=[...e];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},_1e=(e,t,r)=>{const n=e.length;for(let u=0;u{Object.assign(cr,{array:{type:Array,mayDeepCopy:!0,addElement:b1e,makeEmpty:S1e,makeShallow:w1e,iterate:_1e}})},T1e=()=>{Object.assign(cr,{date:{type:Date,makeShallow:e=>new Date(e.getTime())}})},$1e=()=>{Object.assign(cr,{regexp:{type:RegExp,makeShallow:e=>new RegExp(e)}})},P1e=()=>{Object.assign(cr,{function:{type:Function,makeShallow:e=>e}})},O1e=()=>{Object.assign(cr,{error:{type:Error,makeShallow:e=>{const t=new Error(e.message);return t.stack=e.stack,t}}})},k1e=e=>{let t=typeof we<"u"&&we[e]||typeof window<"u"&&window[e]||typeof WorkerGlobalScope<"u"&&WorkerGlobalScope[e];typeof t<"u"&&(cr[e.toLowerCase()]={type:t,makeShallow:r=>t.from(r)})},I1e=()=>{["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].forEach(t=>k1e(t))},N1e=()=>{typeof ArrayBuffer<"u"&&Object.assign(cr,{arraybuffer:{type:ArrayBuffer,makeShallow:e=>e.slice(0)}})},q1e=()=>{typeof Map>"u"||Object.assign(cr,{map:{type:Map,mayDeepCopy:!0,addElement:(e,t,r)=>e.set(t,r),makeEmpty:()=>new Map,makeShallow:e=>new Map(e),iterate:(e,t,r)=>{e.forEach((n,u)=>{const s={key:u,value:n,type:Cc(n)};r(s)})}}})},x1e=()=>{typeof Set>"u"||Object.assign(cr,{set:{type:Set,mayDeepCopy:!0,addElement:(e,t,r)=>e.add(r),makeEmpty:()=>new Set,makeShallow:e=>new Set(e),iterate:(e,t,r)=>{e.forEach(n=>{const u={key:null,value:n,type:Cc(n)};r(u)})}}})},R1e=()=>{typeof WeakSet>"u"||Object.assign(cr,{weakset:{type:WeakSet,makeShallow:e=>e}})},j1e=()=>{typeof WeakMap>"u"||Object.assign(cr,{weakmap:{type:WeakMap,makeShallow:e=>e}})},M1e=()=>{typeof Buffer>"u"||Object.assign(cr,{buffer:{type:Buffer,makeShallow:e=>Buffer.from(e)}})},L1e=(e,t,r,n=void 0)=>{n?Object.defineProperty(e,t,n):e[t]=r},U1e=e=>{const t={};return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},G1e=e=>{const t=Object.assign({},e);return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},V1e=(e,t,r)=>{const n=t?Object.getOwnPropertyNames(e):Object.keys(e),u=n.length;for(let s=0;s{Object.assign(cr,{object:{type:Object,mayDeepCopy:!0,addElement:L1e,makeEmpty:U1e,makeShallow:G1e,iterate:V1e}})},W1e=()=>{Object.assign(cr,{unknown:{makeShallow:e=>e},primitive:{makeShallow:e=>e}})};B1e();T1e();$1e();P1e();O1e();I1e();N1e();q1e();x1e();R1e();j1e();M1e();H1e();W1e();function J1e(e){return cr[e]}var z1e=[Sw,Cc,J1e];const[K1e,X1e,bh]=z1e,Sh={goDeep:!0,includeNonEnumerable:!1,detectCircular:!0,maxDepth:20};function Y1e(e){Object.keys(Sh).forEach(t=>{e[t]===void 0&&(e[t]=Sh[t])})}class Z1e{constructor(){this._seenMap=new WeakMap}setAsCopied(t,r){t instanceof Object&&this._seenMap.set(t,r)}wasCopied(t){return t instanceof Object&&this._seenMap.has(t)}getCopy(t){return this._seenMap.get(t)}}function Q1e(e,t,r){const{options:n,watcher:u}=r;let s;return t.mayDeepCopy?(s=t.makeEmpty(e),n.detectCircular&&u.setAsCopied(e,s)):s=t.makeShallow(e),s}function ede(e,t){if(e>=t)throw`Error max depth of ${t} levels exceeded, possible circular reference`}const ww=(e,t,r)=>{const{destObject:n,srcType:u,watcher:s,options:o}=t,a=o.detectCircular;ede(++r,o.maxDepth);const i=bh(u);if(!i.mayDeepCopy)return;const c=i.addElement;i.iterate(e,o.includeNonEnumerable,l=>{const p=l.value,f=l.type,d=bh(f);let h,E=!1;a&&s.wasCopied(p)?(h=s.getCopy(p),E=!0):h=Q1e(p,d,{options:o,watcher:s}),c(n,l.key,h,l.descriptor),d.mayDeepCopy&&!E&&ww(p,{destObject:h,srcType:f,watcher:s,options:o},r)})};function tde(e,t=Sh){if(Y1e(t),K1e(e))return e;const r=X1e(e),n=bh(r);if(!t.goDeep||!n.mayDeepCopy)return n.makeShallow(e);const u=t.detectCircular?new Z1e:null;let s=n.makeEmpty(e);return t.detectCircular&&u.setAsCopied(e,s),ww(e,{destObject:s,srcType:r,watcher:u,options:t},0),s}var rde=tde,nde=ude(rde);function ude(e){return e&&e.__esModule?e:{default:e}}var Ap=e=>{var t=[];for(var r of e)typeof r=="string"?t.length>0&&typeof t[t.length-1]=="string"?t[t.length-1]+=r:t.push(r):(r.content&&(r.content=Ap(r.content)),r.metaContent&&(r.metaContent=Ap(r.content)),t.push(r));return t},sde=e=>{var t=(0,nde.default)(e);for(var r of Object.values(t.sequences))for(var n of r.blocks)n.content&&(n.content=Ap(n.content)),n.metaContent&&(n.metaContent=Ap(n.metaContent));return t},_w=function(t){var{perf:r}=t;return{perf:sde(r)}},ode={name:"mergePerfText",type:"Transform",description:"PERF=>PERF: Merge consecutive text strings",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:_w},ade={mergePerfText:ode,mergePerfTextCode:_w},{identity:ide}=m1e,{justTheBible:cde}=C1e,{mergePerfText:lde,mergePerfTextCode:pde}=ade,fde={identity:ide,justTheBible:cde,mergePerfText:lde,mergePerfTextCode:pde},dde=f1e,Dde=fde,hde={transforms:Dde,renderActions:dde};function _S(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function BS(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;if(t.displayPartOfText!=null&&!["begin","continue"].includes(t.displayPartOfText.state))throw new Error("state must be typeof string and one of begin or continue");n.settings=BS(BS({},yde),t),n.webParas=[],n.currentIndex=0,u.sofria={},u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.paraContentStack=[],n.footnoteNo=1,n.bookCode=r.document.metadata.document.bookCode,n.chapter=0}}],startSequence:[{description:"startSequence",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1,r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"endSequence",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentSequence.type==="footnote"&&n.footnoteNo++,n.currentSequence={}}}],startTable:[{description:"Initialise table",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1,r.paraContentStack=[{subType:"table",content:[]}]}}],endTable:[{description:"Add completed table to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.webParas.push(t.renderers.table(n.paraContentStack[0].content))}}],startRow:[{description:"Initialise content stack",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block;r.currentIndex+=1,r.paraContentStack.unshift({subType:n.subType,content:[]})}}],endRow:[{description:"Add completed table to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e,u=n.paraContentStack.shift();n.paraContentStack[0].content.push(t.renderers.row(u.content,n.currentIndex))}}],blockGraft:[{description:"Process block grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].block;if(t.subType!=="remark"&&!(["title","endTitle"].includes(t.subType)&&!e.workspace.settings.showTitles)&&!(["heading"].includes(t.subType)&&!e.workspace.settings.showHeadings)&&!(["introduction"].includes(t.subType)&&!e.workspace.settings.showIntroductions)){var r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence;var u=e.workspace.paraContentStack;e.context.renderer.renderSequence(e),e.workspace.paraContentStack=u,e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}}],inlineGraft:[{description:"inlineGraft",test:e=>{var{context:t,workspace:r}=e;return t.sequences[0].element.subType!=="note_caller"&&!(["footnote"].includes(t.sequences[0].element.subType)&&!r.settings.showFootnotes)&&!(["xref"].includes(t.sequences[0].element.subType)&&!r.settings.showXrefs)},action:e=>{var t=e.context.sequences[0].element,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence,u=[...e.workspace.paraContentStack],s=e.workspace.webParas;e.workspace.webParas=[],e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e);var o=e.workspace.webParas;e.workspace.webParas=s,e.workspace.paraContentStack=u,e.workspace.paraContentStack[0].content.push(o),e.workspace.currentSequence=n}}}],startParagraph:[{description:"Initialise content stack",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentIndex+=1;var u=r.sequences[0].block;n.paraContentStack=[{subType:u.subType,content:[]}]}}],endParagraph:[{description:"Add completed para to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.webParas.push(t.renderers.paragraph(n.settings.showParaStyles||["footnote","xref"].includes(r.sequences[0].type)?n.paraContentStack[0].subType:"usfm:m",n.paraContentStack[0].content,n.footnoteNo,n.currentIndex))}}],startWrapper:[{description:"Skip usfm:w outside main sequence",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"&&t.sequences[0].type!=="main"},action:()=>{}},{description:"Handle standard w attributes",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1;var n=t.sequences[0].element.atts,u={};for(var[s,o]of Object.entries(n))["strong","lemma","gloss"].includes(s)&&(u[s]=o);return r.paraContentStack.unshift({atts:u,content:[]}),!1}},{description:"Push to paraContent Stack",test:e=>{var{context:t,workspace:r}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)&&r.settings.showCharacterMarkup},action:e=>{var{context:t,workspace:r}=e,n={subType:t.sequences[0].element.subType,content:[]};t.sequences[0].element.subType==="cell"&&(n.atts=t.sequences[0].element.atts),r.currentIndex+=1,r.paraContentStack.unshift(n)}}],endWrapper:[{description:"Skip usfm:w outside main sequence",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"&&t.sequences[0].type!=="main"},action:()=>{}},{description:"Handle standard w attributes",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();return r.paraContentStack[0].content.push(t.renderers.wWrapper(r.settings.showWordAtts?n.atts:{},n.content,r.currentIndex)),!1}},{description:"Collapse one level of paraContent Stack",test:e=>{var{context:t,workspace:r}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)&&r.settings.showCharacterMarkup},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();r.paraContentStack[0].content.push(t.renderers.wrapper(n.subType==="cell"?n.atts:{},n.subType,n.content,r.currentIndex))}}],startMilestone:[{description:"Handle zaln word-like atts",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.atts,u={};for(var[s,o]of Object.entries(n))["x-strong","x-lemma","x-morph","x-content"].includes(s)&&(u[s.split("-")[1]]=o);return r.currentIndex+=1,r.paraContentStack.unshift({atts:u,content:[]}),!1}}],endMilestone:[{description:"Handle zaln word-like atts",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();return r.paraContentStack[0].content.push(t.renderers.wWrapper(r.settings.showWordAtts?n.atts:{},n.content.join(""))),!1}}],text:[{description:"Push text to para",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e,u=r.sequences[0].element;u.text.split(" ").map((s,o)=>{n.currentIndex+=1;var a=t.renderers.text(o===u.text.split(" ").length-1?s:s+" ",n.currentIndex);n.paraContentStack[0].content.push(a)})}}],mark:[{description:"Show chapter/verse markers",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentIndex+=1;var u=r.sequences[0].element;if(u.subType==="chapter_label"&&n.settings.showChapterLabels)n.chapter=u.atts.number,n.paraContentStack[0].content.push(t.renderers.chapter_label(u.atts.number,n.currentIndex));else if(u.subType==="verses_label"&&n.settings.showVersesLabels){var s=[];t.selectedBcvNotes.length>0&&(s=[n.bookCode,n.chapter,u.atts.number]),n.paraContentStack[0].content.push(t.renderers.verses_label(u.atts.number,s,t.bcvNotesCallback,n.currentIndex))}}}],endDocument:[{description:"Build JSX",test:()=>!0,action:e=>{var{config:t,workspace:r,output:n}=e;n.paras=t.renderers.mergeParas(r.webParas)}}]},Ade={sofria2WebActions:gde},{sofria2WebActions:Fde}=Ade,Cde={sofria2WebActions:Fde},bde={paras:{default:{fontSize:"medium",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:b":{height:"1em"},"usfm:d":{fontStyle:"italic"},"usfm:f":{fontSize:"small"},"usfm:hangingGraft":{},"usfm:imt":{fontWeight:"bold",fontStyle:"italic",fontSize:"xx-large",textAlign:"center"},"usfm:imt2":{fontWeight:"bold",fontStyle:"italic",fontSize:"x-large",textAlign:"center"},"usfm:imt3":{fontWeight:"bold",fontStyle:"italic",fontSize:"large",textAlign:"center"},"usfm:ip":{textIndent:"1.5em"},"usfm:ipi":{paddingLeft:"1.5em",textIndent:"1.5em"},"usfm:io":{paddingLeft:"1.5em"},"usfm:iot":{fontWeight:"bold",fontSize:"large"},"usfm:is":{fontStyle:"italic",fontSize:"xx-large"},"usfm:is2":{fontStyle:"italic",fontSize:"x-large"},"usfm:is3":{fontStyle:"italic",fontSize:"large"},"usfm:li":{listStyleType:"disc",paddingLeft:"3em",textIndent:"-1.5em"},"usfm:li2":{listStyleType:"disc",paddingLeft:"4.5em",textIndent:"-1.5em"},"usfm:li3":{listStyleType:"disc",paddingLeft:"6em",textIndent:"-1.5em"},"usfm:m":{},"usfm:mi":{paddingLeft:"1.5em"},"usfm:mr":{fontSize:"large",fontStyle:"italic"},"usfm:ms":{fontSize:"large",fontWeight:"bold"},"usfm:ms2":{fontWeight:"bold"},"usfm:mt":{fontWeight:"bold",fontStyle:"italic",fontSize:"xx-large",textAlign:"center"},"usfm:mt2":{fontWeight:"bold",fontStyle:"italic",fontSize:"x-large",textAlign:"center"},"usfm:mt3":{fontWeight:"bold",fontStyle:"italic",fontSize:"large",textAlign:"center"},"usfm:nb":{},"usfm:p":{textIndent:"1.5em"},"usfm:pc":{textAlign:"center"},"usfm:pi":{paddingLeft:"1.5em",textIndent:"1.5em"},"usfm:pi2":{paddingLeft:"3em",textIndent:"1.5em"},"usfm:pi3":{paddingLeft:"4.5em",textIndent:"1.5em"},"usfm:q":{paddingLeft:"1.5em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q2":{paddingLeft:"3em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q3":{paddingLeft:"4.5em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q4":{paddingLeft:"6em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:qa":{fontWeight:"bold",fontSize:"x-large"},"usfm:qr":{textAlign:"right"},"usfm:r":{fontWeight:"bold"},"usfm:s":{fontStyle:"italic",fontSize:"xx-large"},"usfm:s2":{fontStyle:"italic",fontSize:"x-large"},"usfm:s3":{fontStyle:"italic",fontSize:"large"},"usfm:sr":{fontSize:"large"},"usfm:tr":{},"usfm:x":{fontSize:"small"}},marks:{default:{},chapter_label:{float:"left",fontSize:"xx-large",marginRight:"0.5em"},verses_label:{fontWeight:"bold",fontSize:"small",verticalAlign:"super",marginRight:"0.5em"}},wrappers:{default:{},"usfm:add":{fontStyle:"italic"},"usfm:bd":{fontWeight:"bold"},"usfm:bdit":{fontWeight:"bold",fontStyle:"italic"},"usfm:bk":{fontWeight:"bold"},chapter:{},"usfm:fl":{},"usfm:fm":{},"usfm:fq":{fontStyle:"italic"},"usfm:fqa":{fontStyle:"italic"},"usfm:fr":{fontWeight:"bold"},"usfm:ft":{},"usfm:it":{fontStyle:"italic"},"usfm:nd":{fontWeight:"bold",fontSize:"smaller",textTransform:"uppercase"},"usfm:qs":{float:"right",fontStyle:"italic"},"usfm:sc":{fontSize:"smaller",textTransform:"uppercase"},"usfm:tl":{fontStyle:"italic"},verses:{},"usfm:wj":{color:"#D00"},"usfm:xk":{},"usfm:xo":{fontWeight:"bold"},"usfm:xt":{}}},Sde=e=>{for(var t in e){var r="/* ".concat(t,` CSS format : */ +`))}}],startWrapper:[{description:"Output start tag",test:()=>!0,action:e=>{var{workspace:t,context:r}=e,n=r.sequences[0];t.nestedWrapper>0?t.usfmBits.push("\\+".concat(Br(n.element.subType.split(":")[1])," ")):t.usfmBits.push("\\".concat(Br(n.element.subType.split(":")[1])," ")),t.nestedWrapper+=1}}],endWrapper:[{description:"Output end tag",test:e=>{var{context:t}=e;return!["fr","fq","fqa","fk","fl","fw","fp","ft","xo","xk","xq","xt","xta"].includes(t.sequences[0].element.subType.split(":")[1])},action:e=>{var{workspace:t,context:r}=e;t.nestedWrapper-=1;var n=r.sequences[0],u=n.element.subType.split(":")[1],s=t.nestedWrapper>0;if(u==="w"){var o=F1e(Br(u),n.element.atts,s);t.usfmBits.push(o)}else s?t.usfmBits.push("\\+".concat(Br(n.element.subType.split(":")[1]),"*")):t.usfmBits.push("\\".concat(Br(n.element.subType.split(":")[1]),"*"))}},{description:"Do NOT output end tag",test:()=>!0,action:e=>{var{workspace:t}=e;t.nestedWrapper-=1}}],endDocument:[{description:"Build output",test:()=>!0,action:e=>{var{workspace:t,output:r}=e;r.usfm=t.usfmBits.join("").replace(/(\s*)\n(\s*)/gm,` +`)}}]},l_={perfToUsfmActions:C1e},{wordCountActions:b1e}=i_,{calculateUsfmChapterPositionsActions:S1e}=c_,{perfToUsfmActions:w1e}=l_,_1e={wordCountActions:b1e,perfToUsfmActions:w1e,calculateUsfmChapterPositionsActions:S1e},B1e=T1e(gs);function T1e(e){return e&&e.__esModule?e:{default:e}}var{wordCountActions:$1e}=i_,P1e=function(t){var{perf:r}=t,n=new B1e.default({srcJson:r,actions:$1e}),u={};return n.renderDocument({docId:"",config:{},output:u}),{report:u.report}},k1e={name:"wordCount",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:P1e},O1e={wordCount:k1e},I1e=N1e(gs);function N1e(e){return e&&e.__esModule?e:{default:e}}var{calculateUsfmChapterPositionsActions:q1e}=c_,x1e=function(t){var{perf:r}=t,n=new I1e.default({srcJson:r,actions:q1e}),u={};return n.renderDocument({docId:"",config:{maxLength:60},output:u}),{report:u.report}},R1e={name:"calculateUsfmChapterPositions",type:"Transform",description:"PERF=>JSON: Generates positions for inserting chapter numbers into USFM",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"report",type:"json"}],code:x1e},j1e={calculateUsfmChapterPositions:R1e},M1e=L1e(gs);function L1e(e){return e&&e.__esModule?e:{default:e}}var{perfToUsfmActions:U1e}=l_,G1e=function(t){var{perf:r,report:n}=t,u=new M1e.default({srcJson:r,actions:U1e}),s={};return u.renderDocument({docId:"",config:{report:n},output:s}),{usfm:s.usfm}},V1e={name:"perfToUsfm",type:"Transform",description:"PERF=>USFM",inputs:[{name:"perf",type:"json",source:""},{name:"report",type:"json",source:""}],outputs:[{name:"usfm",type:"text"}],code:G1e},H1e={perfToUsfm:V1e},{wordCount:W1e}=O1e,{calculateUsfmChapterPositions:J1e}=j1e,{perfToUsfm:z1e}=H1e,K1e={wordCount:W1e,perfToUsfm:z1e,calculateUsfmChapterPositions:J1e},X1e=_1e,Y1e=K1e,Z1e={transforms:Y1e,renderActions:X1e},Q1e={startMilestone:[{description:"Ignore startMilestone events",test:()=>!0,action:()=>{}}],endMilestone:[{description:"Ignore endMilestone events",test:()=>!0,action:()=>{}}],startWrapper:[{description:"Ignore startWrapper events",test:()=>!0,action:()=>{}}],endWrapper:[{description:"Ignore endWrapper events",test:()=>!0,action:()=>{}}],blockGraft:[{description:"Ignore blockGraft events, except for title (\\mt)",test:e=>e.context.sequences[0].block.subType!=="title",action:e=>{}}],inlineGraft:[{description:"Ignore inlineGraft events",test:()=>!0,action:()=>{}}],mark:[{description:"Ignore mark events, except for chapter and verses",test:e=>{var{context:t}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)},action:()=>{}}]},p_={justTheBibleActions:Q1e},{identityActions:e0e}=Fc,{justTheBibleActions:t0e}=p_,r0e={identityActions:e0e,justTheBibleActions:t0e},{identityActions:n0e}=Fc,u0e=function(t){var{perf:r}=t,n=new PerfRenderFromJson({srcJson:r,actions:n0e}),u={};return n.renderDocument({docId:"",config:{},output:u}),{verseWords:u.cv}},s0e={name:"identityTransform",type:"Transform",description:"identity operation",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:u0e},o0e={identity:s0e},a0e=d_(gs),i0e=d_(bd);function d_(e){return e&&e.__esModule?e:{default:e}}var{identityActions:c0e}=Fc,{justTheBibleActions:l0e}=p_,p0e=function(t){var{perf:r}=t,n=new a0e.default({srcJson:r,actions:(0,i0e.default)([l0e,c0e])}),u={};return n.renderDocument({docId:"",config:{},output:u}),{perf:u.perf}},d0e={name:"justTheBible",type:"Transform",description:"PERF=>PERF: Strips most markup",documentation:"This transform removes milestones, wrappers and most marks. It has been used in several pipelines. It may also be stripping metaContent.",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:p0e},f0e={justTheBible:d0e};const sr={},f_=e=>{let t=typeof e;return t==="number"||t==="string"||t==="boolean"||t==="undefined"||t==="bigint"||t==="symbol"||e===null},Cc=e=>{if(f_(e)||!(e instanceof Object))return"primitive";const t=e.constructor&&e.constructor.name&&e.constructor.name.toLowerCase();if(typeof t=="string"&&t.length&&sr[t])return t;let r;for(const n in sr)if(r=sr[n].type,!r||e instanceof r)return n;return"unknown"},D0e=(e,t,r)=>Array.prototype.push.call(e,r),h0e=e=>{const t=[];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},m0e=e=>{const t=[...e];return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},E0e=(e,t,r)=>{const n=e.length;for(let u=0;u{Object.assign(sr,{array:{type:Array,mayDeepCopy:!0,addElement:D0e,makeEmpty:h0e,makeShallow:m0e,iterate:E0e}})},v0e=()=>{Object.assign(sr,{date:{type:Date,makeShallow:e=>new Date(e.getTime())}})},g0e=()=>{Object.assign(sr,{regexp:{type:RegExp,makeShallow:e=>new RegExp(e)}})},A0e=()=>{Object.assign(sr,{function:{type:Function,makeShallow:e=>e}})},F0e=()=>{Object.assign(sr,{error:{type:Error,makeShallow:e=>{const t=new Error(e.message);return t.stack=e.stack,t}}})},C0e=e=>{let t=typeof Ce<"u"&&Ce[e]||typeof window<"u"&&window[e]||typeof WorkerGlobalScope<"u"&&WorkerGlobalScope[e];typeof t<"u"&&(sr[e.toLowerCase()]={type:t,makeShallow:r=>t.from(r)})},b0e=()=>{["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"].forEach(t=>C0e(t))},S0e=()=>{typeof ArrayBuffer<"u"&&Object.assign(sr,{arraybuffer:{type:ArrayBuffer,makeShallow:e=>e.slice(0)}})},w0e=()=>{typeof Map>"u"||Object.assign(sr,{map:{type:Map,mayDeepCopy:!0,addElement:(e,t,r)=>e.set(t,r),makeEmpty:()=>new Map,makeShallow:e=>new Map(e),iterate:(e,t,r)=>{e.forEach((n,u)=>{const s={key:u,value:n,type:Cc(n)};r(s)})}}})},_0e=()=>{typeof Set>"u"||Object.assign(sr,{set:{type:Set,mayDeepCopy:!0,addElement:(e,t,r)=>e.add(r),makeEmpty:()=>new Set,makeShallow:e=>new Set(e),iterate:(e,t,r)=>{e.forEach(n=>{const u={key:null,value:n,type:Cc(n)};r(u)})}}})},B0e=()=>{typeof WeakSet>"u"||Object.assign(sr,{weakset:{type:WeakSet,makeShallow:e=>e}})},T0e=()=>{typeof WeakMap>"u"||Object.assign(sr,{weakmap:{type:WeakMap,makeShallow:e=>e}})},$0e=()=>{typeof Buffer>"u"||Object.assign(sr,{buffer:{type:Buffer,makeShallow:e=>Buffer.from(e)}})},P0e=(e,t,r,n=void 0)=>{n?Object.defineProperty(e,t,n):e[t]=r},k0e=e=>{const t={};return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},O0e=e=>{const t=Object.assign({},e);return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),t},I0e=(e,t,r)=>{const n=t?Object.getOwnPropertyNames(e):Object.keys(e),u=n.length;for(let s=0;s{Object.assign(sr,{object:{type:Object,mayDeepCopy:!0,addElement:P0e,makeEmpty:k0e,makeShallow:O0e,iterate:I0e}})},q0e=()=>{Object.assign(sr,{unknown:{makeShallow:e=>e},primitive:{makeShallow:e=>e}})};y0e();v0e();g0e();A0e();F0e();b0e();S0e();w0e();_0e();B0e();T0e();$0e();N0e();q0e();function x0e(e){return sr[e]}var R0e=[f_,Cc,x0e];const[j0e,M0e,qh]=R0e,xh={goDeep:!0,includeNonEnumerable:!1,detectCircular:!0,maxDepth:20};function L0e(e){Object.keys(xh).forEach(t=>{e[t]===void 0&&(e[t]=xh[t])})}class U0e{constructor(){this._seenMap=new WeakMap}setAsCopied(t,r){t instanceof Object&&this._seenMap.set(t,r)}wasCopied(t){return t instanceof Object&&this._seenMap.has(t)}getCopy(t){return this._seenMap.get(t)}}function G0e(e,t,r){const{options:n,watcher:u}=r;let s;return t.mayDeepCopy?(s=t.makeEmpty(e),n.detectCircular&&u.setAsCopied(e,s)):s=t.makeShallow(e),s}function V0e(e,t){if(e>=t)throw`Error max depth of ${t} levels exceeded, possible circular reference`}const D_=(e,t,r)=>{const{destObject:n,srcType:u,watcher:s,options:o}=t,a=o.detectCircular;V0e(++r,o.maxDepth);const i=qh(u);if(!i.mayDeepCopy)return;const c=i.addElement;i.iterate(e,o.includeNonEnumerable,l=>{const p=l.value,d=l.type,f=qh(d);let h,y=!1;a&&s.wasCopied(p)?(h=s.getCopy(p),y=!0):h=G0e(p,f,{options:o,watcher:s}),c(n,l.key,h,l.descriptor),f.mayDeepCopy&&!y&&D_(p,{destObject:h,srcType:d,watcher:s,options:o},r)})};function H0e(e,t=xh){if(L0e(t),j0e(e))return e;const r=M0e(e),n=qh(r);if(!t.goDeep||!n.mayDeepCopy)return n.makeShallow(e);const u=t.detectCircular?new U0e:null;let s=n.makeEmpty(e);return t.detectCircular&&u.setAsCopied(e,s),D_(e,{destObject:s,srcType:r,watcher:u,options:t},0),s}var W0e=H0e,J0e=z0e(W0e);function z0e(e){return e&&e.__esModule?e:{default:e}}var Bp=e=>{var t=[];for(var r of e)typeof r=="string"?t.length>0&&typeof t[t.length-1]=="string"?t[t.length-1]+=r:t.push(r):(r.content&&(r.content=Bp(r.content)),r.metaContent&&(r.metaContent=Bp(r.content)),t.push(r));return t},K0e=e=>{var t=(0,J0e.default)(e);for(var r of Object.values(t.sequences))for(var n of r.blocks)n.content&&(n.content=Bp(n.content)),n.metaContent&&(n.metaContent=Bp(n.metaContent));return t},h_=function(t){var{perf:r}=t;return{perf:K0e(r)}},X0e={name:"mergePerfText",type:"Transform",description:"PERF=>PERF: Merge consecutive text strings",inputs:[{name:"perf",type:"json",source:""}],outputs:[{name:"perf",type:"json"}],code:h_},Y0e={mergePerfText:X0e,mergePerfTextCode:h_},{identity:Z0e}=o0e,{justTheBible:Q0e}=f0e,{mergePerfText:eDe,mergePerfTextCode:tDe}=Y0e,rDe={identity:Z0e,justTheBible:Q0e,mergePerfText:eDe,mergePerfTextCode:tDe},nDe=r0e,uDe=rDe,sDe={transforms:uDe,renderActions:nDe};function e8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function t8(e){for(var t=1;t!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;if(t.displayPartOfText!=null&&!["begin","continue"].includes(t.displayPartOfText.state))throw new Error("state must be typeof string and one of begin or continue");n.settings=t8(t8({},cDe),t),n.webParas=[],n.currentIndex=0,u.sofria={},u.sofria.sequence={},n.currentSequence=u.sofria.sequence,n.paraContentStack=[],n.footnoteNo=1,n.bookCode=r.document.metadata.document.bookCode,n.chapter=0}}],startSequence:[{description:"startSequence",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1,r.currentSequence.type=t.sequences[0].type,r.currentSequence.blocks=[]}}],endSequence:[{description:"endSequence",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentSequence.type==="footnote"&&n.footnoteNo++,n.currentSequence={}}}],startTable:[{description:"Initialise table",test:()=>!0,action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1,r.paraContentStack=[{subType:"table",content:[]}]}}],endTable:[{description:"Add completed table to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.webParas.push(t.renderers.table(n.paraContentStack[0].content))}}],startRow:[{description:"Initialise content stack",test:()=>!0,action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].block;r.currentIndex+=1,r.paraContentStack.unshift({subType:n.subType,content:[]})}}],endRow:[{description:"Add completed table to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e,u=n.paraContentStack.shift();n.paraContentStack[0].content.push(t.renderers.row(u.content,n.currentIndex))}}],blockGraft:[{description:"Process block grafts",test:()=>!0,action:e=>{var t=e.context.sequences[0].block;if(t.subType!=="remark"&&!(["title","endTitle"].includes(t.subType)&&!e.workspace.settings.showTitles)&&!(["heading"].includes(t.subType)&&!e.workspace.settings.showHeadings)&&!(["introduction"].includes(t.subType)&&!e.workspace.settings.showIntroductions)){var r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence;e.workspace.currentSequence=r.sequence;var u=e.workspace.paraContentStack;e.context.renderer.renderSequence(e),e.workspace.paraContentStack=u,e.workspace.currentSequence=n}e.workspace.currentSequence.blocks.push(r)}}}],inlineGraft:[{description:"inlineGraft",test:e=>{var{context:t,workspace:r}=e;return t.sequences[0].element.subType!=="note_caller"&&!(["footnote"].includes(t.sequences[0].element.subType)&&!r.settings.showFootnotes)&&!(["xref"].includes(t.sequences[0].element.subType)&&!r.settings.showXrefs)},action:e=>{var t=e.context.sequences[0].element,r={type:t.type};if(t.sequence){r.sequence={};var n=e.workspace.currentSequence,u=[...e.workspace.paraContentStack],s=e.workspace.webParas;e.workspace.webParas=[],e.workspace.currentSequence=r.sequence,e.context.renderer.renderSequence(e);var o=e.workspace.webParas;e.workspace.webParas=s,e.workspace.paraContentStack=u,e.workspace.paraContentStack[0].content.push(o),e.workspace.currentSequence=n}}}],startParagraph:[{description:"Initialise content stack",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentIndex+=1;var u=r.sequences[0].block;n.paraContentStack=[{subType:u.subType,content:[]}]}}],endParagraph:[{description:"Add completed para to webParas",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.webParas.push(t.renderers.paragraph(n.settings.showParaStyles||["footnote","xref"].includes(r.sequences[0].type)?n.paraContentStack[0].subType:"usfm:m",n.paraContentStack[0].content,n.footnoteNo,n.currentIndex))}}],startWrapper:[{description:"Skip usfm:w outside main sequence",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"&&t.sequences[0].type!=="main"},action:()=>{}},{description:"Handle standard w attributes",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{context:t,workspace:r}=e;r.currentIndex+=1;var n=t.sequences[0].element.atts,u={};for(var[s,o]of Object.entries(n))["strong","lemma","gloss"].includes(s)&&(u[s]=o);return r.paraContentStack.unshift({atts:u,content:[]}),!1}},{description:"Push to paraContent Stack",test:e=>{var{context:t,workspace:r}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)&&r.settings.showCharacterMarkup},action:e=>{var{context:t,workspace:r}=e,n={subType:t.sequences[0].element.subType,content:[]};t.sequences[0].element.subType==="cell"&&(n.atts=t.sequences[0].element.atts),r.currentIndex+=1,r.paraContentStack.unshift(n)}}],endWrapper:[{description:"Skip usfm:w outside main sequence",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"&&t.sequences[0].type!=="main"},action:()=>{}},{description:"Handle standard w attributes",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:w"},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();return r.paraContentStack[0].content.push(t.renderers.wWrapper(r.settings.showWordAtts?n.atts:{},n.content,r.currentIndex)),!1}},{description:"Collapse one level of paraContent Stack",test:e=>{var{context:t,workspace:r}=e;return!["chapter","verses"].includes(t.sequences[0].element.subType)&&r.settings.showCharacterMarkup},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();r.paraContentStack[0].content.push(t.renderers.wrapper(n.subType==="cell"?n.atts:{},n.subType,n.content,r.currentIndex))}}],startMilestone:[{description:"Handle zaln word-like atts",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{context:t,workspace:r}=e,n=t.sequences[0].element.atts,u={};for(var[s,o]of Object.entries(n))["x-strong","x-lemma","x-morph","x-content"].includes(s)&&(u[s.split("-")[1]]=o);return r.currentIndex+=1,r.paraContentStack.unshift({atts:u,content:[]}),!1}}],endMilestone:[{description:"Handle zaln word-like atts",test:e=>{var{context:t}=e;return t.sequences[0].element.subType==="usfm:zaln"},action:e=>{var{config:t,workspace:r}=e,n=r.paraContentStack.shift();return r.paraContentStack[0].content.push(t.renderers.wWrapper(r.settings.showWordAtts?n.atts:{},n.content.join(""))),!1}}],text:[{description:"Push text to para",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e,u=r.sequences[0].element;u.text.split(" ").map((s,o)=>{n.currentIndex+=1;var a=t.renderers.text(o===u.text.split(" ").length-1?s:s+" ",n.currentIndex);n.paraContentStack[0].content.push(a)})}}],mark:[{description:"Show chapter/verse markers",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n}=e;n.currentIndex+=1;var u=r.sequences[0].element;if(u.subType==="chapter_label"&&n.settings.showChapterLabels)n.chapter=u.atts.number,n.paraContentStack[0].content.push(t.renderers.chapter_label(u.atts.number,n.currentIndex));else if(u.subType==="verses_label"&&n.settings.showVersesLabels){var s=[];t.selectedBcvNotes.length>0&&(s=[n.bookCode,n.chapter,u.atts.number]),n.paraContentStack[0].content.push(t.renderers.verses_label(u.atts.number,s,t.bcvNotesCallback,n.currentIndex))}}}],endDocument:[{description:"Build JSX",test:()=>!0,action:e=>{var{config:t,workspace:r,output:n}=e;n.paras=t.renderers.mergeParas(r.webParas)}}]},pDe={sofria2WebActions:lDe},{sofria2WebActions:dDe}=pDe,fDe={sofria2WebActions:dDe},DDe={paras:{default:{fontSize:"medium",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:b":{height:"1em"},"usfm:d":{fontStyle:"italic"},"usfm:f":{fontSize:"small"},"usfm:hangingGraft":{},"usfm:imt":{fontWeight:"bold",fontStyle:"italic",fontSize:"xx-large",textAlign:"center"},"usfm:imt2":{fontWeight:"bold",fontStyle:"italic",fontSize:"x-large",textAlign:"center"},"usfm:imt3":{fontWeight:"bold",fontStyle:"italic",fontSize:"large",textAlign:"center"},"usfm:ip":{textIndent:"1.5em"},"usfm:ipi":{paddingLeft:"1.5em",textIndent:"1.5em"},"usfm:io":{paddingLeft:"1.5em"},"usfm:iot":{fontWeight:"bold",fontSize:"large"},"usfm:is":{fontStyle:"italic",fontSize:"xx-large"},"usfm:is2":{fontStyle:"italic",fontSize:"x-large"},"usfm:is3":{fontStyle:"italic",fontSize:"large"},"usfm:li":{listStyleType:"disc",paddingLeft:"3em",textIndent:"-1.5em"},"usfm:li2":{listStyleType:"disc",paddingLeft:"4.5em",textIndent:"-1.5em"},"usfm:li3":{listStyleType:"disc",paddingLeft:"6em",textIndent:"-1.5em"},"usfm:m":{},"usfm:mi":{paddingLeft:"1.5em"},"usfm:mr":{fontSize:"large",fontStyle:"italic"},"usfm:ms":{fontSize:"large",fontWeight:"bold"},"usfm:ms2":{fontWeight:"bold"},"usfm:mt":{fontWeight:"bold",fontStyle:"italic",fontSize:"xx-large",textAlign:"center"},"usfm:mt2":{fontWeight:"bold",fontStyle:"italic",fontSize:"x-large",textAlign:"center"},"usfm:mt3":{fontWeight:"bold",fontStyle:"italic",fontSize:"large",textAlign:"center"},"usfm:nb":{},"usfm:p":{textIndent:"1.5em"},"usfm:pc":{textAlign:"center"},"usfm:pi":{paddingLeft:"1.5em",textIndent:"1.5em"},"usfm:pi2":{paddingLeft:"3em",textIndent:"1.5em"},"usfm:pi3":{paddingLeft:"4.5em",textIndent:"1.5em"},"usfm:q":{paddingLeft:"1.5em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q2":{paddingLeft:"3em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q3":{paddingLeft:"4.5em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:q4":{paddingLeft:"6em",marginTop:"0.5ex",marginBottom:"0.5ex"},"usfm:qa":{fontWeight:"bold",fontSize:"x-large"},"usfm:qr":{textAlign:"right"},"usfm:r":{fontWeight:"bold"},"usfm:s":{fontStyle:"italic",fontSize:"xx-large"},"usfm:s2":{fontStyle:"italic",fontSize:"x-large"},"usfm:s3":{fontStyle:"italic",fontSize:"large"},"usfm:sr":{fontSize:"large"},"usfm:tr":{},"usfm:x":{fontSize:"small"}},marks:{default:{},chapter_label:{float:"left",fontSize:"xx-large",marginRight:"0.5em"},verses_label:{fontWeight:"bold",fontSize:"small",verticalAlign:"super",marginRight:"0.5em"}},wrappers:{default:{},"usfm:add":{fontStyle:"italic"},"usfm:bd":{fontWeight:"bold"},"usfm:bdit":{fontWeight:"bold",fontStyle:"italic"},"usfm:bk":{fontWeight:"bold"},chapter:{},"usfm:fl":{},"usfm:fm":{},"usfm:fq":{fontStyle:"italic"},"usfm:fqa":{fontStyle:"italic"},"usfm:fr":{fontWeight:"bold"},"usfm:ft":{},"usfm:it":{fontStyle:"italic"},"usfm:nd":{fontWeight:"bold",fontSize:"smaller",textTransform:"uppercase"},"usfm:qs":{float:"right",fontStyle:"italic"},"usfm:sc":{fontSize:"smaller",textTransform:"uppercase"},"usfm:tl":{fontStyle:"italic"},verses:{},"usfm:wj":{color:"#D00"},"usfm:xk":{},"usfm:xo":{fontWeight:"bold"},"usfm:xt":{}}},hDe=e=>{for(var t in e){var r="/* ".concat(t,` CSS format : */ `);for(var n in e[t]){if(n.includes(":")){var u=n.replace(":","_");r+=" .".concat(t,"_").concat(u.replace(/([A-Z])/g,"_$1").toLowerCase(),` { `)}else r+=" .".concat(t,"_").concat(n.replace(/([A-Z])/g,"_$1").toLowerCase(),` { `);var s=e[t][n];for(var o in s)for(var a in o)if(o[a]===o[a].toUpperCase()){var i=o.replace(/([A-Z])/g,"-$1").toLowerCase();r+=" ".concat(i,": ").concat(s[o],`; `)}r+=` } -`}console.log(r)}};function wde(e){var t=e,r=Object.keys(t);return r.map(n=>{var u=Object.keys(t[n]);u.map(s=>{var o=Object.keys(t[n][s]);o.map(a=>{if(a==="float"&&t[n][s][a]==="left"&&(t[n][s].textAlign="left",delete t[n][s][a]),a==="verticalAlign"&&t[n][s][a]==="super"&&(t[n][s][a]="top"),a==="textIndent"){if(t[n][s][a].includes("em")){var i=t[n][s][a];i.replace("em",""),t[n][s].marginLeft=parseFloat(i)*16,delete t[n][s][a]}delete t[n][s][a]}if(t[n][s][a]==="medium"&&(t[n][s][a]=16),t[n][s][a]==="x-small"&&(t[n][s][a]=10),t[n][s][a]==="xx-small"&&(t[n][s][a]=9),t[n][s][a]==="small"&&(t[n][s][a]=13.333),t[n][s][a]==="large"&&(t[n][s][a]=18),t[n][s][a]==="x-large"&&(t[n][s][a]=24),t[n][s][a]==="xx-large"&&(t[n][s][a]=32),typeof t[n][s][a]=="string"){if(t[n][s][a].includes("em")){var c=t[n][s][a];c.replace("em",""),t[n][s][a]=parseFloat(c)*16;return}if(t[n][s][a].includes("ex")){var l=t[n][s][a];l.replace("ex",""),t[n][s][a]=parseFloat(l);return}}})})}),t}var Bw={styles:bde,StyleAsCSS:Sde,ConvertCssToReactNativeStyle:wde};function TS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function $S(e){for(var t=1;te.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())),Ya=(e,t)=>{if(!Xa[e])throw new Error("Unknown style type '".concat(e,"'"));if(!Xa[e][t])return console.log("No styles for ".concat(e,"/").concat(t)),Xa[e].default;var r=$S($S({},Xa[e].default),Xa[e][t]),n=[];return Object.entries(r).forEach(u=>{var[s,o]=u;n.push("".concat($de(s),": ").concat(o))}),n.join("; ")};function Pde(e){return`{var u=Object.keys(t[n]);u.map(s=>{var o=Object.keys(t[n][s]);o.map(a=>{if(a==="float"&&t[n][s][a]==="left"&&(t[n][s].textAlign="left",delete t[n][s][a]),a==="verticalAlign"&&t[n][s][a]==="super"&&(t[n][s][a]="top"),a==="textIndent"){if(t[n][s][a].includes("em")){var i=t[n][s][a];i.replace("em",""),t[n][s].marginLeft=parseFloat(i)*16,delete t[n][s][a]}delete t[n][s][a]}if(t[n][s][a]==="medium"&&(t[n][s][a]=16),t[n][s][a]==="x-small"&&(t[n][s][a]=10),t[n][s][a]==="xx-small"&&(t[n][s][a]=9),t[n][s][a]==="small"&&(t[n][s][a]=13.333),t[n][s][a]==="large"&&(t[n][s][a]=18),t[n][s][a]==="x-large"&&(t[n][s][a]=24),t[n][s][a]==="xx-large"&&(t[n][s][a]=32),typeof t[n][s][a]=="string"){if(t[n][s][a].includes("em")){var c=t[n][s][a];c.replace("em",""),t[n][s][a]=parseFloat(c)*16;return}if(t[n][s][a].includes("ex")){var l=t[n][s][a];l.replace("ex",""),t[n][s][a]=parseFloat(l);return}}})})}),t}var m_={styles:DDe,StyleAsCSS:hDe,ConvertCssToReactNativeStyle:mDe};function r8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function n8(e){for(var t=1;te.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())),Ya=(e,t)=>{if(!Xa[e])throw new Error("Unknown style type '".concat(e,"'"));if(!Xa[e][t])return console.log("No styles for ".concat(e,"/").concat(t)),Xa[e].default;var r=n8(n8({},Xa[e].default),Xa[e][t]),n=[];return Object.entries(r).forEach(u=>{var[s,o]=u;n.push("".concat(gDe(s),": ").concat(o))}),n.join("; ")};function ADe(e){return` `.concat(e.children,` - `)}var Ode={text:e=>"".concat(e),chapter_label:e=>'').concat(e,""),verses_label:e=>'').concat(e,""),paragraph:(e,t,r)=>["usfm:f","usfm:x"].includes(e)?Pde({style:Ya("paras",e),linkText:e==="usfm:f"?r:"*",children:t.join("")}):'

').concat(t.join(""),"

"),wrapper:(e,t,r)=>t==="cell"?e.role==="body"?"').concat(r.join(""),""):"').concat(r.join(""),""):'').concat(r,""),wWrapper:(e,t)=>Object.keys(e).length===0?t:``)}var FDe={text:e=>"".concat(e),chapter_label:e=>'').concat(e,""),verses_label:e=>'').concat(e,""),paragraph:(e,t,r)=>["usfm:f","usfm:x"].includes(e)?ADe({style:Ya("paras",e),linkText:e==="usfm:f"?r:"*",children:t.join("")}):'

').concat(t.join(""),"

"),wrapper:(e,t,r)=>t==="cell"?e.role==="body"?"').concat(r.join(""),""):"').concat(r.join(""),""):'').concat(r,""),wWrapper:(e,t)=>Object.keys(e).length===0?t:` {`.concat(r[0]," = ").concat(r[1],`} `)).join(""),""),mergeParas:e=>e.join(` -`),row:e=>"".concat(e.join(""),""),table:e=>"".concat(e.join(" "),"
")},kde={renderers:Ode},Ide=Cde,Nde=Bw,qde=kde,xde={renderStyles:Nde,renderActions:Ide,sofria2html:qde},Rde=nfe,jde=ffe,Mde=Bfe,Lde=i1e,Ude=hde,Gde=xde,Tw={xToPerf:jde,perfToX:Lde,sofriaToSofria:Mde,alignment:Rde,perfToPerf:Ude,sofria2web:Gde};const Vde=[{id:0,type:"Inputs",inputs:{usfm:"text",selectors:"json"}},{id:2,title:"USFM to PERF",name:"usfmToPerf",type:"Transform",inputs:[{name:"usfm",type:"text",source:"Input usfm"},{name:"selectors",type:"json",source:"Input selectors"}],outputs:[{name:"perf",type:"json"}],description:"USFM=>PERF: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 2 perf"}]}],Hde=[{id:0,type:"Inputs",inputs:{perf:"json",strippedAlignment:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"strippedAlignment",type:"json",source:"Input strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:3,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],Wde=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:3,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"strippedAlignment",type:"json",source:"Transform 2 strippedAlignment"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],Jde=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perfToUsfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],zde=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Simplify Input PERF",name:"justTheBible",transformName:"justTheBible",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"perf",type:"json"}]},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 1 perf"}]}];var Kde=bc(Vde),Xde=bc(Hde),Yde=bc(Wde),Zde=bc(Jde),Qde=bc(zde);function bc(e){return e&&e.__esModule?e:{default:e}}var $w={usfmToPerfPipeline:Kde.default,mergeAlignmentPipeline:Xde.default,stripAlignmentPipeline:Yde.default,perfToUsfmPipeline:Zde.default,justTheBiblePipeline:Qde.default};function PS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function OS(e){for(var t=1;t"".concat(e.join(""),""),table:e=>"".concat(e.join(" "),"
")},CDe={renderers:FDe},bDe=fDe,SDe=m_,wDe=CDe,_De={renderStyles:SDe,renderActions:bDe,sofria2html:wDe},BDe=Jfe,TDe=r1e,$De=y1e,PDe=Z1e,kDe=sDe,ODe=_De,E_={xToPerf:TDe,perfToX:PDe,sofriaToSofria:$De,alignment:BDe,perfToPerf:kDe,sofria2web:ODe};const IDe=[{id:0,type:"Inputs",inputs:{usfm:"text",selectors:"json"}},{id:2,title:"USFM to PERF",name:"usfmToPerf",type:"Transform",inputs:[{name:"usfm",type:"text",source:"Input usfm"},{name:"selectors",type:"json",source:"Input selectors"}],outputs:[{name:"perf",type:"json"}],description:"USFM=>PERF: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 2 perf"}]}],NDe=[{id:0,type:"Inputs",inputs:{perf:"json",strippedAlignment:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"strippedAlignment",type:"json",source:"Input strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:3,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],qDe=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Count stripped perf words",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:2,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 1 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:3,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 2 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 3 perf"},{name:"strippedAlignment",type:"json",source:"Transform 2 strippedAlignment"},{name:"unalignedWords",type:"json",source:"Transform 2 unalignedWords"}]}],xDe=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Generate report",name:"calculateUsfmChapterPositions",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"report",type:"json"}],description:"Generate report from perf to calculate the position of the chapters"},{id:2,title:"PERF to USFM",name:"perfToUsfm",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"report",type:"json",source:"Transform 1 report"}],outputs:[{name:"usfm",type:"text"}],description:"PERF=>USFM: Conversion via Proskomma"},{id:999,type:"Outputs",outputs:[{name:"usfm",type:"text",source:"Transform 2 usfm"}]}],RDe=[{id:0,type:"Inputs",inputs:{perf:"json"}},{id:1,title:"Simplify Input PERF",name:"justTheBible",transformName:"justTheBible",type:"Transform",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"perf",type:"json"}]},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 1 perf"}]}];var jDe=bc(IDe),MDe=bc(NDe),LDe=bc(qDe),UDe=bc(xDe),GDe=bc(RDe);function bc(e){return e&&e.__esModule?e:{default:e}}var y_={usfmToPerfPipeline:jDe.default,mergeAlignmentPipeline:MDe.default,stripAlignmentPipeline:LDe.default,perfToUsfmPipeline:UDe.default,justTheBiblePipeline:GDe.default};function u8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function s8(e){for(var t=1;t1&&arguments[1]!==void 0?arguments[1]:"perf",n=t.filter(E=>E.type==="Transform");if(n.length===0)throw new Error("No Transform steps found in report steps");var u=Object.keys(n).map(E=>n[E].name);if(r==="sofria"){var s=null;for(var[o,a]of Object.entries(this.namespaces))if(o==="sofriaToSofria"){a.transforms?s=Object.entries(a.transforms):s=Object.entries(a);for(var[i,c]of s)u.includes(i)&&(this.transforms[i]=c)}}else{var l=null;for(var[p,f]of Object.entries(this.namespaces))if(p!=="sofriaToSofria"){f.transforms?l=Object.entries(f.transforms):l=Object.entries(f);for(var[d,h]of l)u.includes(d)&&(this.transforms[d]=h)}}}evaluateSteps(t){var{specSteps:r,inputValues:n}=t;this.verbose&&console.log("** Evaluate **");var u=r.filter(j=>j.type==="Inputs")[0];if(!u)throw new Error("No Inputs step found in report steps");var s=r.filter(j=>j.type==="Outputs")[0];if(!s)throw new Error("No Outputs step found in report steps");var o=r.filter(j=>j.type==="Transform");if(o.length===0)throw new Error("No Transform steps found in report steps");var a={},i={};for(var c of Object.values(o)){a[c.id]={};for(var l of c.inputs)a[c.id][l.name]=null;i[c.id]={};for(var p of c.outputs)i[c.id][p]=null}for(var[f,d]of Object.entries(n))for(var h of o)for(var E of h.inputs)E.source==="Input ".concat(f)&&(this.verbose&&console.log("Copying Input ".concat(f," to Transform ").concat(h.id," ").concat(E.name," input")),a[h.id][E.name]=d);for(var A=!0;A;){A=!1;for(var m of o)if(Object.values(a[m.id]).filter(j=>!j).length===0&&Object.values(i[m.id]).filter(j=>!j).length>0){this.verbose&&console.log("Evaluating Transform ".concat(m.id));try{i[m.id]=this.transforms[m.name].code(OS(OS({},a[m.id]),{},{proskomma:this.getProskomma()}))}catch(j){var y="Error evaluating Transform ".concat(m.id," (name=").concat(m.name,", type=").concat(typeof m.code,"): ").concat(j);throw new Error(y)}for(var F of o)for(var B of F.inputs)for(var P of Object.keys(i[m.id]))B.source==="Transform ".concat(m.id," ").concat(P)&&(this.verbose&&console.log("Copying Transform ".concat(m.id," ").concat(P," output to Transform ").concat(F.id," ").concat(B.name," input")),a[F.id][B.name]=i[m.id][P]);A=!0}}var $={};for(var I of s.outputs){var U=I.source.split(" ")[1];this.verbose&&console.log("Copying Transform ".concat(U," ").concat(I.name," to Output ").concat(I.name)),$[I.name]=i[U][I.name]}return this.verbose&&console.log("****"),$}};var a0e=o0e;function IS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function NS(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let f0e=class extends p0e{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync('{document(id: "'.concat(r,'") {docSetId mainSequence { id } nSequences sequences {id} headers { key value } } }')),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;i.data.document.sequences.map(m=>m.id);var f={};for(var d of i.data.document.headers)f[d.key]=d.value;var h=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),E={};for(var A of h.data.docSet.selectors)E[A.key]=A.value;u.document={id:r,schema:{structure:"flat",structure_version:"0.2.1",constraints:[{name:"perf",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:E,properties:{},tags:[]},document:NS(NS({},f),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,l),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:xs(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.pk.gqlQuerySync('{document(id: "'.concat(n.document.id,'") {sequence(id:"').concat(r,'") {id type nBlocks } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(s,r)),this.renderEvent("startSequence",t);for(var o=0,a=0;a1&&arguments[1]!==void 0?arguments[1]:"perf",n=t.filter(y=>y.type==="Transform");if(n.length===0)throw new Error("No Transform steps found in report steps");var u=Object.keys(n).map(y=>n[y].name);if(r==="sofria"){var s=null;for(var[o,a]of Object.entries(this.namespaces))if(o==="sofriaToSofria"){a.transforms?s=Object.entries(a.transforms):s=Object.entries(a);for(var[i,c]of s)u.includes(i)&&(this.transforms[i]=c)}}else{var l=null;for(var[p,d]of Object.entries(this.namespaces))if(p!=="sofriaToSofria"){d.transforms?l=Object.entries(d.transforms):l=Object.entries(d);for(var[f,h]of l)u.includes(f)&&(this.transforms[f]=h)}}}evaluateSteps(t){var{specSteps:r,inputValues:n}=t;this.verbose&&console.log("** Evaluate **");var u=r.filter(q=>q.type==="Inputs")[0];if(!u)throw new Error("No Inputs step found in report steps");var s=r.filter(q=>q.type==="Outputs")[0];if(!s)throw new Error("No Outputs step found in report steps");var o=r.filter(q=>q.type==="Transform");if(o.length===0)throw new Error("No Transform steps found in report steps");var a={},i={};for(var c of Object.values(o)){a[c.id]={};for(var l of c.inputs)a[c.id][l.name]=null;i[c.id]={};for(var p of c.outputs)i[c.id][p]=null}for(var[d,f]of Object.entries(n))for(var h of o)for(var y of h.inputs)y.source==="Input ".concat(d)&&(this.verbose&&console.log("Copying Input ".concat(d," to Transform ").concat(h.id," ").concat(y.name," input")),a[h.id][y.name]=f);for(var A=!0;A;){A=!1;for(var m of o)if(Object.values(a[m.id]).filter(q=>!q).length===0&&Object.values(i[m.id]).filter(q=>!q).length>0){this.verbose&&console.log("Evaluating Transform ".concat(m.id));try{i[m.id]=this.transforms[m.name].code(s8(s8({},a[m.id]),{},{proskomma:this.getProskomma()}))}catch(q){var v="Error evaluating Transform ".concat(m.id," (name=").concat(m.name,", type=").concat(typeof m.code,"): ").concat(q);throw new Error(v)}for(var C of o)for(var B of C.inputs)for(var T of Object.keys(i[m.id]))B.source==="Transform ".concat(m.id," ").concat(T)&&(this.verbose&&console.log("Copying Transform ".concat(m.id," ").concat(T," output to Transform ").concat(C.id," ").concat(B.name," input")),a[C.id][B.name]=i[m.id][T]);A=!0}}var N={};for(var R of s.outputs){var J=R.source.split(" ")[1];this.verbose&&console.log("Copying Transform ".concat(J," ").concat(R.name," to Output ").concat(R.name)),N[R.name]=i[J][R.name]}return this.verbose&&console.log("****"),N}};var YDe=XDe;function a8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function i8(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let r2e=class extends t2e{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync('{document(id: "'.concat(r,'") {docSetId mainSequence { id } nSequences sequences {id} headers { key value } } }')),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;i.data.document.sequences.map(m=>m.id);var d={};for(var f of i.data.document.headers)d[f.key]=f.value;var h=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),y={};for(var A of h.data.docSet.selectors)y[A.key]=A.value;u.document={id:r,schema:{structure:"flat",structure_version:"0.2.1",constraints:[{name:"perf",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:y,properties:{},tags:[]},document:i8(i8({},d),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequenceId(a,l),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:$s(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequenceId(t,r){var n=t.context,u=this.pk.gqlQuerySync('{document(id: "'.concat(n.document.id,'") {sequence(id:"').concat(r,'") {id type nBlocks } } }')),s=u.data.document.sequence;if(!s)throw new Error("Sequence '".concat(r,"' not found in renderSequenceId()"));n.sequences.unshift(this.sequenceContext(s,r)),this.renderEvent("startSequence",t);for(var o=0,a=0;a{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.sequence&&(s.sequence=this.sequenceContext(t.sequence)),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")r.workspace.inTable&&(r.workspace.tableHasContent=!0),this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft")this.cachedSequences.unshift(t.sequence),this.renderEvent("inlineGraft",r),this.cachedSequences.shift(),n(s);else if(s.type==="wrapper")s.subType==="chapter"&&(r.workspace.chapterCurent?r.workspace.chapterCurent!=s.atts.number&&(r.workspace.changingChapter=!0):r.workspace.chapterCurent=s.atts.number),r.workspace.changingChapter&&r.workspace.inTable&&r.workspace.tableHasContent&&s.subType==="chapter"&&(this.renderEvent("endRow",r),this.renderEvent("endTable",r),r.workspace.inTable=!1,r.workspace.tableHasContent=!1,r.workspace.skipEndRow=!0,r.workspace.changingChapter=!1),u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var m0e=h0e;function qS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function xS(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let A0e=class extends g0e{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null,this.cachedSequenceIds=[],this.sequences=null,this.currentCV={chapter:null,verses:null}}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync(`{ + }`)),c=i.data.document.sequence.blocks[0];for(var l of c.bg)n.sequences[0].block={type:"graft",subType:$s(l.subType),blockN:o},n.sequences[0].block.target=l.payload,n.sequences[0].block.isNew=!1,this.renderEvent("blockGraft",t),o++;var p=c.bs.payload.split("/"),d=void 0;p[1]&&["tr","zrow"].includes(p[1])?d=p[1]==="tr"?"usfm:tr":"pk":p[1]?d="usfm:".concat(p[1]):d=p[0],n.sequences[0].block={type:["usfm:tr","pk"].includes(d)?"row":"paragraph",subType:d,blockN:o,wrappers:[]},d==="row"?this.renderEvent("startRow",t):this.renderEvent("startParagraph",t),this._tokens=[],this.renderContent(c.items,t),this._tokens=[],d==="row"?this.renderEvent("endRow",t):this.renderEvent("endParagraph",t),delete n.sequences[0].block,o++}this.renderEvent("endSequence",t),n.sequences.shift()}renderContent(t,r){for(var n of t)this.renderItem(n,r);this.maybeRenderText(r)}renderItem(t,r){if(t.type==="scope"&&t.payload.startsWith("attribute")){var n=t.payload.split("/");t.subType==="start"?(this._container||(this._container={direction:"start",subType:"usfm:w",type:"wrapper",atts:{}}),n[3]in this._container.atts?this._container.atts[n[3]].push(n[5]):this._container.atts[n[3]]=[n[5]]):this._container||(this._container={direction:"end",subType:"usfm:".concat($s(n[2]))},n[1]==="milestone"?this._container.type="end_milestone":(this._container.type="wrapper",this._container.atts={}))}else if(this._container&&(this.maybeRenderText(r),this.renderContainer(r)),t.type==="token")this._tokens.push(t.payload.replace(/\s+/g," "));else if(t.type==="graft"){this.maybeRenderText(r);var u={type:"graft",subType:$s(t.subType),target:t.payload,isNew:!1};r.context.sequences[0].element=u,this.renderEvent("inlineGraft",r),delete r.context.sequences[0].element}else{this.maybeRenderText(r);var s=t.payload.split("/");if(["chapter","verses","pubChapter","pubVerse","altChapter","altVerse"].includes(s[0])){if(t.subType==="start"){var o={type:"mark",subType:$s(s[0]),atts:{number:s[1]}};r.context.sequences[0].element=o,this.renderEvent("mark",r),delete r.context.sequences[0].element}}else if(s[0]==="span"){var a={type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}};r.context.sequences[0].element=a,t.subType==="start"?(r.context.sequences[0].block.wrappers.unshift(a.subType),this.renderEvent("startWrapper",r)):(this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift()),delete r.context.sequences[0].element}else if(s[0]==="spanWithAtts")t.subType==="start"&&(this._container={direction:"start",type:"wrapper",subType:"usfm:".concat(s[1]),atts:{}});else if(s[0]==="cell"){var i={direction:"start",type:"wrapper",subType:s[0],atts:{role:s[1],alignment:s[2],nCols:parseInt(s[3])}};r.context.sequences[0].element=i,t.subType==="start"?(r.context.sequences[0].block.wrappers.unshift(i.subType),this.renderEvent("startWrapper",r)):(this.renderEvent("endWrapper",r),r.context.sequences[0].block.wrappers.shift()),delete r.context.sequences[0].element}else if(s[0]==="milestone"&&t.subType==="start")if(s[1]==="ts"){var c={type:"mark",subType:"usfm:".concat($s(s[1])),atts:{}};r.context.sequences[0].element=c,this.renderEvent("mark",r),delete r.context.sequences[0].element}else this._container={type:"start_milestone",subType:"usfm:".concat($s(s[1])),atts:{}}}}maybeRenderText(t){if(this._tokens.length!==0){var r={type:"text",text:this._tokens.join("")};t.context.sequences[0].element=r,this._tokens=[],this.renderEvent("text",t),delete t.context.sequences[0].element}}renderContainer(t){if(this._container.type==="wrapper"){var r=this._container.direction;delete this._container.direction,r==="start"?(t.context.sequences[0].element=this._container,t.context.sequences[0].block.wrappers.unshift(this._container.subType),this.renderEvent("startWrapper",t),delete t.context.sequences[0].element):(t.context.sequences[0].element=this._container,this.renderEvent("endWrapper",t),t.context.sequences[0].block.wrappers.shift(),delete t.context.sequences[0].element)}else this._container.type==="start_milestone"?(t.context.sequences[0].element=this._container,this.renderEvent("startMilestone",t),delete t.context.sequences[0].element):this._container.type==="end_milestone"&&(t.context.sequences[0].element=this._container,this.renderEvent("endMilestone",t),delete t.context.sequences[0].element);this._container=null}};var n2e=r2e,u2e=Ac;let s2e=class extends u2e{constructor(t){if(super(t),!t.srcJson)throw new Error("Must provide srcJson");this.srcJson=t.srcJson,this.cachedSequences=[]}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this,u.document={id:r,schema:this.srcJson.schema,metadata:this.srcJson.metadata},u.sequences=[],this.renderEvent("startDocument",a),this.renderSequence(a,this.srcJson.sequence),this.renderEvent("endDocument",a)}sequenceContext(t){return{type:t.type,nBlocks:t.blocks.length,milestones:new Set([])}}renderSequence(t,r){var n;if(r)n=r;else{if(this.cachedSequences.length===0)throw new Error("No sequence provided and no sequences cached");n=this.cachedSequences[0]}var u=t.context;u.sequences.unshift(n),this.renderEvent("startSequence",t);for(var[s,o]of n.blocks.entries())u.sequences[0].block={type:o.type,subType:o.subtype,blockN:s,wrappers:[]},o.type==="graft"?(u.sequences[0].block.sequence=this.sequenceContext(o.sequence),this.cachedSequences.unshift(o.sequence),this.renderEvent("blockGraft",t),this.cachedSequences.shift()):o.type==="row"?(t.workspace.inTable||(this.renderEvent("startTable",t),t.workspace.inTable=!0),this.renderEvent("startRow",t),this.renderContent(o.content,t),t.workspace.skipEndRow?t.workspace.skipEndRow=!1:this.renderEvent("endRow",t)):(t.workspace.inTable&&u.sequences[0].type.includes("main")&&(this.renderEvent("endTable",t),t.workspace.inTable=!1),this.renderEvent("startParagraph",t),this.renderContent(o.content,t),this.renderEvent("endParagraph",t)),delete u.sequences[0].block;t.workspace.inTable&&u.sequences[0].type.includes("main")&&(this.renderEvent("endTable",t),t.workspace.inTable=!1,t.workspace.tableHasContent=!1,t.workspace.skipEndRow=!1,t.workspace.changingChapter=!1),this.renderEvent("endSequence",t),this.cachedSequence=null,u.sequences.shift()}renderContent(t,r){for(var n of t)this.renderElement(n,r)}renderElement(t,r){var n=o=>{t.meta_content&&(o.metaContent=t.meta_content,this.renderEvent("metaContent",r))},u=r.context,s={type:t.type||"text"};if(t.subtype&&(s.subType=t.subtype),t.atts?s.atts=t.atts:s.type!=="end_milestone"&&s.type!=="meta_content"&&(s.atts={}),t.sequence&&(s.sequence=this.sequenceContext(t.sequence)),s.type==="text"&&(s.text=t),u.sequences[0].element=s,s.type==="text")r.workspace.inTable&&(r.workspace.tableHasContent=!0),this.renderEvent("text",r),n(s);else if(s.type==="mark")this.renderEvent("mark",r),n(s);else if(s.type==="start_milestone")this.renderEvent("startMilestone",r),n(s);else if(s.type==="end_milestone")this.renderEvent("endMilestone",r),n(s);else if(s.type==="graft")this.cachedSequences.unshift(t.sequence),this.renderEvent("inlineGraft",r),this.cachedSequences.shift(),n(s);else if(s.type==="wrapper")s.subType==="chapter"&&(r.workspace.chapterCurent?r.workspace.chapterCurent!=s.atts.number&&(r.workspace.changingChapter=!0):r.workspace.chapterCurent=s.atts.number),r.workspace.changingChapter&&r.workspace.inTable&&r.workspace.tableHasContent&&s.subType==="chapter"&&(this.renderEvent("endRow",r),this.renderEvent("endTable",r),r.workspace.inTable=!1,r.workspace.tableHasContent=!1,r.workspace.skipEndRow=!0,r.workspace.changingChapter=!1),u.sequences[0].block.wrappers.unshift(s.subType),this.renderEvent("startWrapper",r),this.renderContent(t.content,r),u.sequences[0].element=s,n(s),this.renderEvent("endWrapper",r),u.sequences[0].block.wrappers.shift();else throw new Error("Unexpected element type '".concat(s.type));delete u.sequences[0].element}};var o2e=s2e;function c8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function l8(e){for(var t=1;t{var t=[];for(var r of e.split(""))r.toUpperCase()===r&&r.toLowerCase()!==r?t.push("_".concat(r.toLowerCase())):t.push(r);return t.join("")};let p2e=class extends l2e{constructor(t){if(super(t),!t.proskomma)throw new Error("No Proskomma");this.pk=t.proskomma,this._tokens=[],this._container=null,this.cachedSequenceIds=[],this.sequences=null,this.currentCV={chapter:null,verses:null}}renderDocument1(t){var{docId:r,config:n,context:u,workspace:s,output:o}=t,a={config:n,context:u,workspace:s,output:o};u.renderer=this;var i=this.pk.gqlQuerySync(`{ document(id: "`.concat(r,`") { docSetId mainSequence { id } @@ -4906,16 +4906,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho value } } - }`)),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;this.sequences={},a.nbBlock||(a.config.nbBlock=1e4);for(var f of i.data.document.sequences)this.sequences[f.id]=f;var d={};for(var h of i.data.document.headers)d[h.key]=h.value;var E=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),A={};for(var m of E.data.docSet.selectors)A[m.key]=m.value;if(u.document={id:r,schema:{structure:"nested",structure_version:"0.2.1",constraints:[{name:"sofria",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:A,properties:{},tags:[]},document:xS(xS({},d),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},n.chapters&&(s.chapters?s.chapters.length===0&&(s.chapters=n.chapters):s.chapters=n.chapters),s.chapters&&(u.document.metadata.document.properties.chapters=s.chapters[0]),u.sequences=[{}],n.displayPartOfText!=null&&!["begin","continue"].includes(n.displayPartOfText.state))throw new Error("state must be typeof string and one of ['begin','continue']");a.config.displayPartOfText!=null?a.config.displayPartOfText.state==="begin"&&this.renderEvent("startDocument",a):this.renderEvent("startDocument",a),this.cachedSequenceIds.unshift(l),this.renderSequence(a),this.cachedSequenceIds.shift(),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:zu(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequence(t){var r=t.context,n=this.cachedSequenceIds[0],u=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {sequence(id:"').concat(n,'") {type} } }')).data.document.sequence.type,s={},o=null,a=null,i=[];u==="main"&&t.workspace.blockId&&(i=t.workspace.blockId);var c=0;if(u==="main"){if(t.workspace.chapters)for(;t.workspace.chapters.length!=0;){if(o=t.workspace.chapters.pop(),o&&(a=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {cIndex(chapter: ').concat(o,`) { + }`)),c=i.data.document.docSetId,l=i.data.document.mainSequence.id,p=i.data.document.nSequences;this.sequences={},a.nbBlock||(a.config.nbBlock=1e4);for(var d of i.data.document.sequences)this.sequences[d.id]=d;var f={};for(var h of i.data.document.headers)f[h.key]=h.value;var y=this.pk.gqlQuerySync('{docSet(id: "'.concat(c,'") {selectors {key value}}}')),A={};for(var m of y.data.docSet.selectors)A[m.key]=m.value;if(u.document={id:r,schema:{structure:"nested",structure_version:"0.2.1",constraints:[{name:"sofria",version:"0.2.1"}]},metadata:{translation:{id:c,selectors:A,properties:{},tags:[]},document:l8(l8({},f),{},{properties:{},tags:[]})},mainSequenceId:l,nSequences:p},n.chapters&&(s.chapters?s.chapters.length===0&&(s.chapters=n.chapters):s.chapters=n.chapters),s.chapters&&(u.document.metadata.document.properties.chapters=s.chapters[0]),u.sequences=[{}],n.displayPartOfText!=null&&!["begin","continue"].includes(n.displayPartOfText.state))throw new Error("state must be typeof string and one of ['begin','continue']");a.config.displayPartOfText!=null?a.config.displayPartOfText.state==="begin"&&this.renderEvent("startDocument",a):this.renderEvent("startDocument",a),this.cachedSequenceIds.unshift(l),this.renderSequence(a),this.cachedSequenceIds.shift(),this.renderEvent("endDocument",a)}sequenceContext(t,r){return{id:r,type:Ju(t.type),nBlocks:t.nBlocks,milestones:new Set([])}}renderSequence(t){var r=t.context,n=this.cachedSequenceIds[0],u=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {sequence(id:"').concat(n,'") {type} } }')).data.document.sequence.type,s={},o=null,a=null,i=[];u==="main"&&t.workspace.blockId&&(i=t.workspace.blockId);var c=0;if(u==="main"){if(t.workspace.chapters)for(;t.workspace.chapters.length!=0;){if(o=t.workspace.chapters.pop(),o&&(a=this.pk.gqlQuerySync('{document(id: "'.concat(r.document.id,'") {cIndex(chapter: ').concat(o,`) { startBlock endBlock - }}}`))),o&&a)for(var l=a.data.document.cIndex.startBlock;lY-te),t.nbBlock||(t.nbBlock=null),t.config.nbBlock||(t.config.nbBlock=i.length)}else for(var f=0;f0){var y=t.config.excludeScopeTypes.map(te=>'"'.concat(te,'"'));m=this.pk.gqlQuerySync(`{ + }}}`))),o&&a)for(var l=a.data.document.cIndex.startBlock;lK-ee),t.nbBlock||(t.nbBlock=null),t.config.nbBlock||(t.config.nbBlock=i.length)}else for(var d=0;d0){var v=t.config.excludeScopeTypes.map(ee=>'"'.concat(ee,'"'));m=this.pk.gqlQuerySync(`{ document(id: "`.concat(r.document.id,`") { sequence(id:"`).concat(n,`") { blocks(positions:`).concat(A,`) { bg {subType payload} bs {payload} - items (excludeScopeTypes : [`).concat(y,`] ) {type subType payload} + items (excludeScopeTypes : [`).concat(v,`] ) {type subType payload} } } } @@ -4939,7 +4939,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho } } } - }`));var F=m.data.document.sequence.blocks[0];for(var B of F.bg)r.sequences[0].block={type:"graft",subType:zu(B.subType),blockN:h,sequence:this.sequences[B.payload]},this.cachedSequenceIds.unshift(B.payload),this.renderEvent("blockGraft",t),this.cachedSequenceIds.shift(),h++;var P=F.bs.payload.split("/"),$=void 0;if(P[1]&&["tr","zrow"].includes(P[1])?$=P[1]==="tr"?"usfm:tr":"pk":P[1]?$="usfm:".concat(P[1]):$=P[0],r.sequences[0].block={type:["usfm:tr","pk"].includes($)?"row":"paragraph",subType:$,blockN:h,wrappers:[]},r.sequences[0].block.type==="row"?(t.workspace.inTable||(this.renderEvent("startTable",t),t.workspace.inTable=!0),this.renderEvent("startRow",t)):(t.workspace.inTable&&r.sequences[0].type.includes("main")&&(this.renderEvent("endTable",t),t.workspace.tableHasContent=!1,t.workspace.inTable=!1,t.workspace.skipEndRow=!1),this.renderEvent("startParagraph",t)),this._tokens=[],u==="main"&&this.currentCV.chapter){var I={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=I,t.context.sequences[0].block.wrappers.unshift(I.subType),this.renderEvent("startWrapper",t)}if(u==="main"&&this.currentCV.verses){var U={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=U,t.context.sequences[0].block.wrappers.unshift(U.subType),this.renderEvent("startWrapper",t)}if(this.renderContent(F.items,t),this._tokens=[],u==="main"&&this.currentCV.verses){var j={type:"wrapper",subType:"verses",atts:{number:this.currentCV.verses}};t.context.sequences[0].element=j,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}if(u==="main"&&this.currentCV.chapter){var W={type:"wrapper",subType:"chapter",atts:{number:this.currentCV.chapter}};t.context.sequences[0].element=W,t.context.sequences[0].block.wrappers.shift(),this.renderEvent("endWrapper",t)}r.sequences[0].block.type==="row"&&!t.workspace.skipEndRow?this.renderEvent("endRow",t):t.workspace.skipEndRow&&r.sequences[0].block.type==="row"?t.workspace.skipEndRow=!1:this.renderEvent("endParagraph",t),delete r.sequences[0].block,h++}t.workspace.inTable&&r.sequences[0].type.includes("main")&&(this.renderEvent("endTable",t),t.workspace.tableHasContent=!1,t.workspace.inTable=!1,t.workspace.skipEndRow=!1),this.renderEvent("endSequence",t),u==="main"&&(t.workspace.blockId=i),r.sequences.shift()}renderContent(t,r){for(var n=0;n!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.chapter=null,n.verses=null,n.matches=new Set([]),n.chunks=[],t.regex&&(n.regex=new RegExp(t.toSearch,t.regexFlags))}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;s.subType==="chapter"?(o2(n,t),n.chapter=s.atts.number,n.chunks=[]):s.subType==="verses"&&(o2(n,t),n.verses=s.atts.number,n.chunks=[])}}],text:[{description:"Add matching verses to set",test:e=>{var{context:t,workspace:r}=e;return r.chapter&&r.verses},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element.text;n.chunks.push(s)}}],endDocument:[{description:"Sort matches",test:()=>!0,action:e=>{var t,r,n,{config:u,context:s,workspace:o,output:a}=e;a.bookCode=(s==null||(t=s.document)===null||t===void 0||(r=t.metadata)===null||r===void 0||(n=r.document)===null||n===void 0?void 0:n.bookCode)||"",a.searchTerms=Array.isArray(u.toSearch)?u.toSearch.join(" "):u.toSearch,a.options=[],u.ignoreCase&&a.options.push("ignoreCase"),u.andLogic&&a.options.push("andLogic"),u.orLogic&&a.options.push("orLogic"),u.partialMatch&&a.options.push("partialMatch"),u.regex&&a.options.push("regex"),o2(o,u),a.matches=Array.from(o.matches).sort((i,c)=>i.chapter*1e3+i.verses-(c.chapter*1e3+c.verses))}}]},z0e=function(t,r){var n={chapter:t.chapter,verses:t.verses,content:[]},u=r.toSearch,s=jS(jS({},r),{},{andLogic:!1}),o=t.chunks.join(""),a=b3.default.split(o,Pw);for(var i of a)if(i){var c=Ow(s,i,u,t);c?n.content.push({type:"wrapper",subtype:"x-search-match",content:[i]}):n.content.push(i)}t.matches.add(n)};function Ow(e,t,r,n){if(e.regex)return n.regex.test(t);var u=Array.isArray(r);if(e.ignoreCase&&(t=t.toLowerCase(),u?r=r.map(l=>l.toLowerCase()):r=r.toLowerCase()),u||(r=[r]),!e.partialMatch){var s=b3.default.split(t,Pw);t=s}var o=!0,a=!1;for(var i of r){var c=t.includes(i);c?a=!0:o=!1}return e.andLogic?o:a}var o2=function(t,r){if(t.chunks.length){var n=t.chunks.join(""),u=r.toSearch,s=Ow(r,n,u,t);s&&z0e(t,r)}},K0e=function(t){var{perf:r,searchString:n,ignoreCase:u="1",logic:s="",regex:o="0",partialMatch:a="0"}=t,i=new U0e.PerfRenderFromJson({srcJson:r,actions:J0e}),c={},l=u.trim()==="1";s=s.trim().substring(0,1).toUpperCase();var p=s==="A",f=s==="O",d=a&&a.trim()==="1",h=o.trim()==="1",E=n.trim();if(!h&&(E.includes("?")||E.includes("*"))){var A=E.replaceAll("?","\\S{1}");A=A.replaceAll("*","\\S*"),d||(A="\\b"+A+"\\b"),E="/"+A+"/"}var m="";if(E.startsWith("/")&&E.includes("/",2)){h=!0;var y=E.split("/");E=y[1],m=y[2],l&&!m.includes("i")&&(m+="i")}else(p||f)&&E&&(E=E.split(" "));return i.renderDocument({docId:"",config:{toSearch:E,ignoreCase:l,andLogic:p,orLogic:f,partialMatch:d,regex:h,regexFlags:m},output:c}),{matches:c}},X0e={name:"wordSearch",type:"Transform",description:"PERF=>JSON: Searches for a word",inputs:[{name:"perf",type:"json",source:""},{name:"searchString",type:"text",source:""},{name:"ignoreCase",type:"text",source:""},{name:"regex",type:"text",source:""},{name:"logic",type:"text",source:""},{name:"partial",type:"text",source:""}],outputs:[{name:"matches",type:"json"}],code:K0e},Y0e=X0e;Af.default=Y0e;Object.defineProperty(gf,"__esModule",{value:!0});gf.default=void 0;var Z0e=Q0e(Af);function Q0e(e){return e&&e.__esModule?e:{default:e}}var eDe={wordSearch:Z0e.default};gf.default=eDe;var kw={exports:{}};(function(e,t){(function(r,n){e.exports=n(C3)})(we,function(r){const n=[{id:0,type:"Inputs",inputs:{perf:"json",params:"json"}},{id:4,title:"Transform 4",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:6,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 4 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:9,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 6 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:20,title:"findAndReplace",name:"findAndReplace",type:"Transform",transformName:"findAndReplace",inputs:[{name:"perf",type:"json",source:"Transform 9 perf"},{name:"params",type:"json",source:"Input params"}],outputs:[{name:"perf",type:"json"},{name:"results",type:"json"}],description:"Search the given phrase or regex"},{id:12,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 20 perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:13,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 20 perf"},{name:"strippedAlignment",type:"json",source:"Transform 6 strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 12 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:17,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 13 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 17 perf"},{name:"unalignedWords",type:"json",source:"Transform 13 unalignedWords"},{name:"results",type:"json",source:"Transform 20 results"}]}];function u(h){return(h instanceof RegExp?h.source:h).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(h){if(h instanceof RegExp)return h;if(typeof h!="string")throw new Error("Arg `source` shoud be of type string or RegExp");const E=h.match(/\/(.+)\/(?=(\w*$))/);return E!=null&&E[1]?{source:E[1],flags:E[2]}:{source:h}}function o(h){return h.toUpperCase()===h&&h.toLowerCase()!==h}function a({source:h,target:E,replacement:A="",replacementKeys:m=[],metadata:y,config:{filterCtxMatch:F=Y=>Y,filterCtxReplacement:B=Y=>Y,buildResultKey:P,ctxLen:$=0,xregexp:I,isRegex:U=!1,isCaseMatched:j=!0,isWordMatched:W=!1,isCasePreserved:te=!1}={}}){const Y=["g"];j||Y.push("i");const oe=typeof U=="boolean"?U:U==="true";!oe&&E instanceof RegExp&&console.warn("isRegex is set to false but target of type RegExp given.");const ie=I instanceof Function,fe=ie?I:function(b,w=""){return new RegExp(b,w)},De=ie?"p{Letter}\\p{Number}":"\\w\\d",de=ie?"\\p{Uppercase_Letter}":"[A-Z]";function Ce({regexp:b,isWordMatched:w}){const{source:x,flags:k}=b;return fe(w?`(^|[^${De}])(${x})(?=[^${De}]|$)`:`()(${x})`,k)}const pe=oe?s(E):{source:u(E),flags:null},Q=pe.flags?[...new Set([...pe.flags,...Y])]:Y,q=fe(pe.source,Q.join("")),v=Ce({regexp:q,isWordMatched:W});let C=0,D=0;const g=[],O=E!==""?h.replace(v,function(...b){const x=typeof b[b.length-1]=="object"?b.pop():void 0,k=b.pop(),G=b.pop(),H=b.shift(),re=b.shift(),_e=G+re.length,Le=b.shift(),Ge=function(){if(typeof A=="function")return A({index:D,match:Le,groups:b,position:_e,source:k,namedGroups:x});if(typeof A=="string")return A;throw new Error("Replacement param should be of type string or function.")}(),je=((_,L)=>te?o(_)?L.toUpperCase():new RegExp(fe(de)).test(_[0])?L[0].toUpperCase()+L.slice(1):L:L)(Le,Le.replace(q,Ge)),ke=P?P(D):D;if(D++,m==="all"||m.includes(ke))return re+je;const Ie=k.slice(_e-$,_e),ce=k.slice(_e+Le.length,_e+Le.length+$),Te=k.slice(0,_e),Z=k.slice(_e+Le.length,-1),ae=F?F(Le):Le,le=B?B(je):je,N=P?P(C):C,S={match:ae,replacement:le,context:{before:Ie,after:ce},extContext:{before:Te,after:Z},resultKey:N,metadata:{source:k,match:Le,searchIndex:C,position:_e,groups:b,namedGroups:x,...y}};return g.push(S),C++,H}):h;return{results:g,replaced:O}}const i={startDocument:[{description:"setup",test:()=>!0,action:h=>{const{workspace:E,output:A,context:m}=h;return E.bookCode=m.document.metadata.document.bookCode,E.chapter=null,E.verses=null,A.results=[],!0}}],text:[{description:"add-to-text",test:()=>!0,action:({config:h,context:E,workspace:A,output:m})=>{try{const{target:y,replacement:F,replacementKeys:B=[],config:P={}}=h,$=E.sequences[0].element.text,{chapter:I,verses:U,bookCode:j}=A,{results:W,replaced:te}=a({source:$,target:y,replacement:F,replacementKeys:B,metadata:{chapter:I,verses:U,bookCode:j},config:{buildResultKey:Y=>`${Y}-${j}-${I}-${U}`,...P}});return m.results.push(...W),A.outputContentStack[0].push(te),!U}catch(y){throw console.error(y),y}}}],mark:[{description:"mark-chapters",test:({context:h})=>h.sequences[0].element.subType==="chapter",action:({context:h,workspace:E})=>{const A=h.sequences[0].element;return E.chapter=A.atts.number,E.verses=0,!0}},{description:"mark-verses",test:({context:h})=>h.sequences[0].element.subType==="verses",action:({context:h,workspace:E})=>{const A=h.sequences[0].element;return E.verses=A.atts.number,!0}}]};return Object.freeze(Object.defineProperty({__proto__:null,pipelines:{findAndReplace:n},transforms:{findAndReplace:{name:"findAndReplace",type:"Transform",description:"Search and replace text in stripped perf",inputs:[{name:"perf",type:"json",source:""},{name:"params",type:"json",source:""}],outputs:[{name:"results",type:"json"}],code:function({perf:h,params:E}){const A=new r.PerfRenderFromJson({srcJson:h,actions:r.mergeActions([i,r.render.perfToPerf.renderActions.identityActions])}),m={};return A.renderDocument({docId:"",config:{...E},output:m}),{perf:m.perf,results:m.results}}}}},Symbol.toStringTag,{value:"Module"}))})})(kw);var tDe=kw.exports,rDe=nDe;function pa(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function nDe(e){if(e=e||{},e.circles)return uDe(e);return e.proto?n:r;function t(u,s){for(var o=Object.keys(u),a=new Array(o.length),i=0;i!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e;n.chapter=null,n.verses=null,n.matches=new Set([]),n.chunks=[],t.regex&&(n.regex=new RegExp(t.toSearch,t.regexFlags))}}],mark:[{description:"Update CV state",test:()=>!0,action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element;s.subType==="chapter"?(m2(n,t),n.chapter=s.atts.number,n.chunks=[]):s.subType==="verses"&&(m2(n,t),n.verses=s.atts.number,n.chunks=[])}}],text:[{description:"Add matching verses to set",test:e=>{var{context:t,workspace:r}=e;return r.chapter&&r.verses},action:e=>{var{config:t,context:r,workspace:n,output:u}=e,s=r.sequences[0].element.text;n.chunks.push(s)}}],endDocument:[{description:"Sort matches",test:()=>!0,action:e=>{var t,r,n,{config:u,context:s,workspace:o,output:a}=e;a.bookCode=(s==null||(t=s.document)===null||t===void 0||(r=t.metadata)===null||r===void 0||(n=r.document)===null||n===void 0?void 0:n.bookCode)||"",a.searchTerms=Array.isArray(u.toSearch)?u.toSearch.join(" "):u.toSearch,a.options=[],u.ignoreCase&&a.options.push("ignoreCase"),u.andLogic&&a.options.push("andLogic"),u.orLogic&&a.options.push("orLogic"),u.partialMatch&&a.options.push("partialMatch"),u.regex&&a.options.push("regex"),m2(o,u),a.matches=Array.from(o.matches).sort((i,c)=>i.chapter*1e3+i.verses-(c.chapter*1e3+c.verses))}}]},R2e=function(t,r){var n={chapter:t.chapter,verses:t.verses,content:[]},u=r.toSearch,s=d8(d8({},r),{},{andLogic:!1}),o=t.chunks.join(""),a=G3.default.split(o,v_);for(var i of a)if(i){var c=g_(s,i,u,t);c?n.content.push({type:"wrapper",subtype:"x-search-match",content:[i]}):n.content.push(i)}t.matches.add(n)};function g_(e,t,r,n){if(e.regex)return n.regex.test(t);var u=Array.isArray(r);if(e.ignoreCase&&(t=t.toLowerCase(),u?r=r.map(l=>l.toLowerCase()):r=r.toLowerCase()),u||(r=[r]),!e.partialMatch){var s=G3.default.split(t,v_);t=s}var o=!0,a=!1;for(var i of r){var c=t.includes(i);c?a=!0:o=!1}return e.andLogic?o:a}var m2=function(t,r){if(t.chunks.length){var n=t.chunks.join(""),u=r.toSearch,s=g_(r,n,u,t);s&&R2e(t,r)}},j2e=function(t){var{perf:r,searchString:n,ignoreCase:u="1",logic:s="",regex:o="0",partialMatch:a="0"}=t,i=new k2e.PerfRenderFromJson({srcJson:r,actions:x2e}),c={},l=u.trim()==="1";s=s.trim().substring(0,1).toUpperCase();var p=s==="A",d=s==="O",f=a&&a.trim()==="1",h=o.trim()==="1",y=n.trim();if(!h&&(y.includes("?")||y.includes("*"))){var A=y.replaceAll("?","\\S{1}");A=A.replaceAll("*","\\S*"),f||(A="\\b"+A+"\\b"),y="/"+A+"/"}var m="";if(y.startsWith("/")&&y.includes("/",2)){h=!0;var v=y.split("/");y=v[1],m=v[2],l&&!m.includes("i")&&(m+="i")}else(p||d)&&y&&(y=y.split(" "));return i.renderDocument({docId:"",config:{toSearch:y,ignoreCase:l,andLogic:p,orLogic:d,partialMatch:f,regex:h,regexFlags:m},output:c}),{matches:c}},M2e={name:"wordSearch",type:"Transform",description:"PERF=>JSON: Searches for a word",inputs:[{name:"perf",type:"json",source:""},{name:"searchString",type:"text",source:""},{name:"ignoreCase",type:"text",source:""},{name:"regex",type:"text",source:""},{name:"logic",type:"text",source:""},{name:"partial",type:"text",source:""}],outputs:[{name:"matches",type:"json"}],code:j2e},L2e=M2e;Bd.default=L2e;Object.defineProperty(_d,"__esModule",{value:!0});_d.default=void 0;var U2e=G2e(Bd);function G2e(e){return e&&e.__esModule?e:{default:e}}var V2e={wordSearch:U2e.default};_d.default=V2e;var A_={exports:{}};(function(e,t){(function(r,n){e.exports=n(U3)})(Ce,function(r){const n=[{id:0,type:"Inputs",inputs:{perf:"json",params:"json"}},{id:4,title:"Transform 4",name:"verseWords",type:"Transform",transformName:"verseWords",inputs:[{name:"perf",type:"json",source:"Input perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:6,title:"Strip Alignment",name:"stripAlignment",type:"Transform",transformName:"stripAlignment",inputs:[{name:"perf",type:"json",source:"Input perf"},{name:"verseWords",type:"json",source:"Transform 4 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"strippedAlignment",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF: Strips alignment markup"},{id:9,title:"Merge stripped perf",name:"mergePerfText",type:"Transform",transformName:"mergePerfText",inputs:[{name:"perf",type:"json",source:"Transform 6 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:20,title:"findAndReplace",name:"findAndReplace",type:"Transform",transformName:"findAndReplace",inputs:[{name:"perf",type:"json",source:"Transform 9 perf"},{name:"params",type:"json",source:"Input params"}],outputs:[{name:"perf",type:"json"},{name:"results",type:"json"}],description:"Search the given phrase or regex"},{id:12,title:"Count stripped perf words",name:"verseWords",transformName:"verseWords",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 20 perf"}],outputs:[{name:"verseWords",type:"json"}],description:"PERF=>JSON: Counts words occurrences"},{id:13,title:"Merge Back Into Stripped (roundtrip)",name:"mergeAlignment",transformName:"mergeAlignment",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 20 perf"},{name:"strippedAlignment",type:"json",source:"Transform 6 strippedAlignment"},{name:"verseWords",type:"json",source:"Transform 12 verseWords"}],outputs:[{name:"perf",type:"json"},{name:"unalignedWords",type:"json"}],description:"PERF=>PERF adds report to verses"},{id:17,title:"Merge Merged PERF Text",name:"mergePerfText",transformName:"mergePerfText",type:"Transform",inputs:[{name:"perf",type:"json",source:"Transform 13 perf"}],outputs:[{name:"perf",type:"json"}],description:"PERF=>PERF: Merge consecutive text strings"},{id:999,type:"Outputs",outputs:[{name:"perf",type:"json",source:"Transform 17 perf"},{name:"unalignedWords",type:"json",source:"Transform 13 unalignedWords"},{name:"results",type:"json",source:"Transform 20 results"}]}];function u(h){return(h instanceof RegExp?h.source:h).replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function s(h){if(h instanceof RegExp)return h;if(typeof h!="string")throw new Error("Arg `source` shoud be of type string or RegExp");const y=h.match(/\/(.+)\/(?=(\w*$))/);return y!=null&&y[1]?{source:y[1],flags:y[2]}:{source:h}}function o(h){return h.toUpperCase()===h&&h.toLowerCase()!==h}function a({source:h,target:y,replacement:A="",replacementKeys:m=[],metadata:v,config:{filterCtxMatch:C=K=>K,filterCtxReplacement:B=K=>K,buildResultKey:T,ctxLen:N=0,xregexp:R,isRegex:J=!1,isCaseMatched:q=!0,isWordMatched:G=!1,isCasePreserved:ee=!1}={}}){const K=["g"];q||K.push("i");const ue=typeof J=="boolean"?J:J==="true";!ue&&y instanceof RegExp&&console.warn("isRegex is set to false but target of type RegExp given.");const oe=R instanceof Function,de=oe?R:function(b,w=""){return new RegExp(b,w)},he=oe?"p{Letter}\\p{Number}":"\\w\\d",fe=oe?"\\p{Uppercase_Letter}":"[A-Z]";function ge({regexp:b,isWordMatched:w}){const{source:I,flags:$}=b;return de(w?`(^|[^${he}])(${I})(?=[^${he}]|$)`:`()(${I})`,$)}const pe=ue?s(y):{source:u(y),flags:null},z=pe.flags?[...new Set([...pe.flags,...K])]:K,O=de(pe.source,z.join("")),E=ge({regexp:O,isWordMatched:G});let F=0,D=0;const g=[],P=y!==""?h.replace(E,function(...b){const I=typeof b[b.length-1]=="object"?b.pop():void 0,$=b.pop(),M=b.pop(),L=b.shift(),Y=b.shift(),be=M+Y.length,Ne=b.shift(),Me=function(){if(typeof A=="function")return A({index:D,match:Ne,groups:b,position:be,source:$,namedGroups:I});if(typeof A=="string")return A;throw new Error("Replacement param should be of type string or function.")}(),qe=((_,x)=>ee?o(_)?x.toUpperCase():new RegExp(de(fe)).test(_[0])?x[0].toUpperCase()+x.slice(1):x:x)(Ne,Ne.replace(O,Me)),Pe=T?T(D):D;if(D++,m==="all"||m.includes(Pe))return Y+qe;const Be=$.slice(be-N,be),le=$.slice(be+Ne.length,be+Ne.length+N),Te=$.slice(0,be),W=$.slice(be+Ne.length,-1),se=C?C(Ne):Ne,ce=B?B(qe):qe,k=T?T(F):F,S={match:se,replacement:ce,context:{before:Be,after:le},extContext:{before:Te,after:W},resultKey:k,metadata:{source:$,match:Ne,searchIndex:F,position:be,groups:b,namedGroups:I,...v}};return g.push(S),F++,L}):h;return{results:g,replaced:P}}const i={startDocument:[{description:"setup",test:()=>!0,action:h=>{const{workspace:y,output:A,context:m}=h;return y.bookCode=m.document.metadata.document.bookCode,y.chapter=null,y.verses=null,A.results=[],!0}}],text:[{description:"add-to-text",test:()=>!0,action:({config:h,context:y,workspace:A,output:m})=>{try{const{target:v,replacement:C,replacementKeys:B=[],config:T={}}=h,N=y.sequences[0].element.text,{chapter:R,verses:J,bookCode:q}=A,{results:G,replaced:ee}=a({source:N,target:v,replacement:C,replacementKeys:B,metadata:{chapter:R,verses:J,bookCode:q},config:{buildResultKey:K=>`${K}-${q}-${R}-${J}`,...T}});return m.results.push(...G),A.outputContentStack[0].push(ee),!J}catch(v){throw console.error(v),v}}}],mark:[{description:"mark-chapters",test:({context:h})=>h.sequences[0].element.subType==="chapter",action:({context:h,workspace:y})=>{const A=h.sequences[0].element;return y.chapter=A.atts.number,y.verses=0,!0}},{description:"mark-verses",test:({context:h})=>h.sequences[0].element.subType==="verses",action:({context:h,workspace:y})=>{const A=h.sequences[0].element;return y.verses=A.atts.number,!0}}]};return Object.freeze(Object.defineProperty({__proto__:null,pipelines:{findAndReplace:n},transforms:{findAndReplace:{name:"findAndReplace",type:"Transform",description:"Search and replace text in stripped perf",inputs:[{name:"perf",type:"json",source:""},{name:"params",type:"json",source:""}],outputs:[{name:"results",type:"json"}],code:function({perf:h,params:y}){const A=new r.PerfRenderFromJson({srcJson:h,actions:r.mergeActions([i,r.render.perfToPerf.renderActions.identityActions])}),m={};return A.renderDocument({docId:"",config:{...y},output:m}),{perf:m.perf,results:m.results}}}}},Symbol.toStringTag,{value:"Module"}))})})(A_);var H2e=A_.exports,W2e=J2e;function ca(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}function J2e(e){if(e=e||{},e.circles)return z2e(e);const t=new Map;if(t.set(Date,o=>new Date(o)),t.set(Map,(o,a)=>new Map(n(Array.from(o),a))),t.set(Set,(o,a)=>new Set(n(Array.from(o),a))),e.constructorHandlers)for(const o of e.constructorHandlers)t.set(o[0],o[1]);let r=null;return e.proto?s:u;function n(o,a){const i=Object.keys(o),c=new Array(i.length);for(let l=0;lnew Date(i)),n.set(Map,(i,c)=>new Map(s(Array.from(i),c))),n.set(Set,(i,c)=>new Set(s(Array.from(i),c))),e.constructorHandlers)for(const i of e.constructorHandlers)n.set(i[0],i[1]);let u=null;return e.proto?a:o;function s(i,c){const l=Object.keys(i),p=new Array(l.length);for(let d=0;d ** @@ -4961,14 +4961,14 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho ** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE ** SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -*/(function(e){(function(t,r,n){e.exports=n(t),e.exports.default=e.exports})(we,"UUID",function(){var t=function(v,C,D,g,O,b){for(var w=function(k,G){var H=k.toString(16);return H.length<2&&(H="0"+H),G&&(H=H.toUpperCase()),H},x=C;x<=D;x++)O[b++]=w(v[x],g);return O},r=function(v,C,D,g,O){for(var b=C;b<=D;b+=2)g[O++]=parseInt(v.substr(b,2),16)},n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],s=function(v,C){if(C%4!==0)throw new Error("z85_encode: invalid input length (multiple of 4 expected)");for(var D="",g=0,O=0;g=1;){var w=Math.floor(O/b)%85;D+=n[w],b/=85}O=0}return D},o=function(v,C){var D=v.length;if(D%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof C>"u"&&(C=new Array(D*4/5));for(var g=0,O=0,b=0;g=u.length)break;if(b=b*85+u[w],g%5===0){for(var x=16777216;x>=1;)C[O++]=Math.trunc(b/x%256),x/=256;b=0}}return C},a=function(v,C){var D={ibits:8,obits:8,obigendian:!0};for(var g in C)typeof D[g]<"u"&&(D[g]=C[g]);for(var O=[],b=0,w,x,k=0,G,H=0,re=v.length;k===0&&(x=v.charCodeAt(b++)),w=x>>D.ibits-(k+8)&255,k=(k+8)%D.ibits,D.obigendian?H===0?G=w<=re)););return O},i=function(v,C){var D={ibits:32,ibigendian:!0};for(var g in C)typeof D[g]<"u"&&(D[g]=C[g]);var O="",b=4294967295;D.ibits<32&&(b=(1<>D.ibits-8-G&255):O+=String.fromCharCode(k>>G&255);return O},c=8,l=8,p=256,f=function(v,C,D,g,O,b,w,x){return[x,w,b,O,g,D,C,v]},d=function(){return f(0,0,0,0,0,0,0,0)},h=function(v){return v.slice(0)},E=function(v){for(var C=d(),D=0;D=0;D--)C*=p,C+=v[D];return Math.floor(C)},m=function(v,C){for(var D=0,g=0;g=0;b--)D[b+1]=D[b];for(D[0]=v[0],b=0;bc*l)throw new Error("ui64_ror: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g>>b|D[g+1]<>>b&(1<c*l)throw new Error("ui64_rol: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g0;g--)D[g+O]=(D[g]<>>l-b)&(1<=0;g--)D[g]=0;for(g=0;g>16)+(C>>16)+(D>>16);return g<<16|D&65535},te=function(v,C){return v<>>32-C&4294967295},Y=function(v,C){function D(ke,Ie,ce,Te){return ke<20?Ie&ce|~Ie&Te:ke<40?Ie^ce^Te:ke<60?Ie&ce|Ie&Te|ce&Te:Ie^ce^Te}function g(ke){return ke<20?1518500249:ke<40?1859775393:ke<60?-1894007588:-899497514}v[C>>5]|=128<<24-C%32,v[(C+64>>9<<4)+15]=C;for(var O=Array(80),b=1732584193,w=-271733879,x=-1732584194,k=271733878,G=-1009589776,H=0;H>5]|=128<>>9<<4)+14]=C;for(var x=1732584193,k=-271733879,G=-1732584194,H=271733878,re=0;re>>0):typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.getRandomValues=="function"?(C=new Uint32Array(2),window.crypto.getRandomValues(C),v=P(E(C[0]>>>0),I(E(C[1]>>>0),32))):typeof globalThis=="object"&&typeof globalThis.crypto=="object"&&typeof globalThis.crypto.getRandomValues=="function"?(C=new Uint32Array(2),globalThis.crypto.getRandomValues(C),v=P(E(C[0]>>>0),I(E(C[1]>>>0),32))):(v=E(Math.random()*4294967295>>>0),P(v,I(E(new Date().getTime()),32))),P(this.state,v),this.next()};De.prototype.next=function(){var v=h(this.state);F(this.state,this.mul),m(this.state,this.inc);var C=h(v);I(C,18),j(C,v),I(C,27);var D=h(v);I(D,59),B(C,this.mask);var g=A(D),O=h(C);return U(O,32-g),I(C,g),j(C,O),A(C)},De.prototype.reseed=function(v){if(typeof v!="string")throw new Error("UUID: PCG: seed: invalid argument (string expected)");for(var C=Y(a(v,{ibits:8,obits:32,obigendian:!0}),v.length*8),D=0;D>>0))};var de=new De;De.reseed=function(v){de.reseed(v)};var Ce=function(v,C){for(var D=[],g=0;g=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(var v=0;v<16;v++)this[v]=0}};return typeof Uint8Array<"u"?q.prototype=new Uint8Array(16):Buffer?q.prototype=Buffer.alloc(16):q.prototype=new Array(16),q.prototype.constructor=q,q.prototype.make=function(v){var C,D=this;if(v===1){var g=new Date,O=g.getTime();O!==pe?Q=0:Q++,pe=O;var b=E(O);y(b,1e3*10),m(b,f(1,178,29,210,19,129,64,0)),Q>0&&m(b,E(Q));var w;w=$(b,8),D[3]=w&255,w=$(b,8),D[2]=w&255,w=$(b,8),D[1]=w&255,w=$(b,8),D[0]=w&255,w=$(b,8),D[5]=w&255,w=$(b,8),D[4]=w&255,w=$(b,8),D[7]=w&255,w=$(b,8),D[6]=w&15;var x=Ce(2,255);D[8]=x[0],D[9]=x[1];var k=Ce(6,255);for(k[0]|=1,k[0]|=2,C=0;C<6;C++)D[10+C]=k[C]}else if(v===4){var G=Ce(16,255);for(C=0;C<16;C++)this[C]=G[C]}else if(v===3||v===5){var H="",re=typeof arguments[1]=="object"&&arguments[1]instanceof q?arguments[1]:new q().parse(arguments[1]);for(C=0;C<16;C++)H+=String.fromCharCode(re[C]);H+=arguments[2];var _e=v===3?fe(H):oe(H);for(C=0;C<16;C++)D[C]=_e.charCodeAt(C)}else throw new Error("UUID: make: invalid version");return D[6]&=15,D[6]|=v<<4,D[8]&=63,D[8]|=128,D},q.prototype.format=function(v){var C,D;return v==="z85"?C=s(this,16):v==="b16"?(D=Array(32),t(this,0,15,!0,D,0),C=D.join("")):(v===void 0||v==="std")&&(D=new Array(36),t(this,0,3,!1,D,0),D[8]="-",t(this,4,5,!1,D,9),D[13]="-",t(this,6,7,!1,D,14),D[18]="-",t(this,8,9,!1,D,19),D[23]="-",t(this,10,15,!1,D,24),C=D.join("")),C},q.prototype.toString=function(v){return this.format(v)},q.prototype.toJSON=function(){return this.format("std")},q.prototype.parse=function(v,C){if(typeof v!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(C==="z85")o(v,this);else if(C==="b16")r(v,0,35,this,0);else if(C===void 0||C==="std"){var D={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(D[v]!==void 0)v=D[v];else if(!v.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');r(v,0,7,this,0),r(v,9,12,this,4),r(v,14,17,this,6),r(v,19,22,this,8),r(v,24,35,this,10)}return this},q.prototype.export=function(){for(var v=Array(16),C=0;C<16;C++)v[C]=this[C];return v},q.prototype.import=function(v){if(!(typeof v=="object"&&v instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(v.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(var C=0;C<16;C++){if(typeof v[C]!="number")throw new Error("UUID: import: invalid array element #"+C+" (type Number expected)");if(!(isFinite(v[C])&&Math.floor(v[C])===v[C]))throw new Error("UUID: import: invalid array element #"+C+" (Number with integer value expected)");if(!(v[C]>=0&&v[C]<=255))throw new Error("UUID: import: invalid array element #"+C+" (Number with integer value in range 0...255 expected)");this[C]=v[C]}return this},q.prototype.compare=function(v){if(typeof v!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(v instanceof q))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(var C=0;C<16;C++){if(this[C]v[C])return 1}return 0},q.prototype.equal=function(v){return this.compare(v)===0},q.prototype.fold=function(v){if(typeof v>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(v<1||v>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");for(var C=16/Math.pow(2,v),D=new Array(C),g=0;g>(-2*A&6)));return F},p=function(h){h=String(h),/[^\0-\xFF]/.test(h)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var E=h.length%3,A="",m=-1,y,F,B,P,$=h.length-E;++m<$;)y=h.charCodeAt(m)<<16,F=h.charCodeAt(++m)<<8,B=h.charCodeAt(++m),P=y+F+B,A+=i.charAt(P>>18&63)+i.charAt(P>>12&63)+i.charAt(P>>6&63)+i.charAt(P&63);return E==2?(y=h.charCodeAt(m)<<8,F=h.charCodeAt(++m),P=y+F,A+=i.charAt(P>>10)+i.charAt(P>>4&63)+i.charAt(P<<2&63)+"="):E==1&&(P=h.charCodeAt(m),A+=i.charAt(P>>2)+i.charAt(P<<4&63)+"=="),A},f={encode:p,decode:l,version:"1.0.0"};if(n&&!n.nodeType)if(u)u.exports=f;else for(var d in f)f.hasOwnProperty(d)&&(n[d]=f[d]);else r.base64=f})(we)})(Fp,Fp.exports);var w3=Fp.exports;Object.defineProperty(jr,"__esModule",{value:!0});jr.validateParams=jr.removeAttribute=jr.getPathValue=jr.generateId=jr.findObject=jr.findNewGraft=void 0;var oDe=Nw(S3),aDe=Nw(w3);function Nw(e){return e&&e.__esModule?e:{default:e}}var iDe=(e,t,r)=>{var n=new Set(e),u=Object.keys(t).filter(s=>!n.has(s));if(u.length>0)throw new Error("".concat(r,". Expected one of: [").concat([...n].join(", "),"], But got: [").concat(u.join(", "),"]"))};jr.validateParams=iDe;var cDe=(e,t)=>{var r,n,u;if(typeof e!="object"||e===null)return e;r=Array.isArray(e)?[]:{};for(u in e)u==t&&Object.keys(e[u]).length===0||(n=e[u],r[u]=removeAtts(n));return r};jr.removeAttribute=cDe;var lDe=e=>{var{object:t,path:r}=e;return r.split("/").reduce((n,u)=>(n=n[u],n),t)};jr.getPathValue=lDe;var pDe=()=>aDe.default.encode(new oDe.default(4)).substring(0,12);jr.generateId=pDe;var fDe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,u=[],s=function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!a||typeof a!="object"||(a[r]===n&&u.push(a),Object.keys(a).forEach(function(i){o(a[i])}))};return s(t),u};jr.findObject=fDe;var dDe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=[],u=function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!o||typeof o!="object"||(o.type==="graft"&&o.new&&(n.push(o),r(o)),o.blocks&&o.blocks.forEach(function(a){s(a)}),o.content&&o.content.forEach(function(a){s(a)}))};return u(t),n};jr.findNewGraft=dDe;Object.defineProperty(Qp,"__esModule",{value:!0});Qp.default=void 0;var a2=C3,ml=Ff(vf),El=Ff(gf),MS=Ff(tDe),i2=Ff(sDe),hu=jr,DDe=["proskomma","docSetId","options"],hDe=["hs"],mDe=["perf"],EDe=["writePipeline","cloning","insertSequences"],vDe=["sequences"];function Ff(e){return e&&e.__esModule?e:{default:e}}function LS(e,t,r,n,u,s,o){try{var a=e[s](o),i=a.value}catch(c){r(c);return}a.done?t(i):Promise.resolve(i).then(n,u)}function wn(e){return function(){var t=this,r=arguments;return new Promise(function(n,u){var s=e.apply(t,r);function o(i){LS(s,n,u,o,a,"next",i)}function a(i){LS(s,n,u,o,a,"throw",i)}o(void 0)})}}function US(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Ut(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function FDe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var vl={WRITE_PERF:"writePerf",READ_PERF:"readPerf",LOAD_PERF:"loadPerf",UNDO_PERF:"undoPerf",REDO_PERF:"redoPerf"};class CDe{constructor(t){var{proskomma:r=null,docSetId:n,options:u={}}=t,s=Za(t,DDe);if((0,hu.validateParams)(["proskomma","docSetId","options"],s,"Unexpected arg in constructor"),(0,hu.validateParams)(["historySize","pipelines","transforms"],u,"Unexpected option in constructor"),!n)throw new Error("docSetId is required");this._observers=[];var o='{ docSet(id: "'.concat(n,'") { id } }'),{data:a}=(r==null?void 0:r.gqlQuerySync(o))||{};if(r&&!(a!=null&&a.docSet))throw new Error("Provided docSetId is not present in the Proskomma instance.");var{hs:i}=u,c=Za(u,hDe),l=i?i+1:11;this.options=Ut({historySize:l},c),this.proskomma=r,this.pipelineHandler=new a2.PipelineHandler({pipelines:ml.default||u.pipelines?Ut(Ut(Ut({},ml.default),u.pipelines),MS.default.pipelines):null,transforms:El.default||u.transforms?Ut(Ut(Ut({},El.default),u.transforms),MS.default.transforms):null,proskomma:r}),this.docSetId=n,this.saved={},this.history={},this.validator=new a2.Validator,this.backend=r?"proskomma":"standalone"}unobserve(t){this._observers=this._observers.filter(r=>r!==t)}observe(t){return this._observers.push(t),()=>this.unobserve(t)}notifyObservers(){for(var t=arguments.length,r=new Array(t),n=0;n{u(...r)})}instanciatePipelineHandler(t){var{pipelines:r,transforms:n}=t;new a2.PipelineHandler({pipelines:ml.default||r?Ut(Ut({},ml.default),r):null,transforms:El.default||n?Ut(Ut({},El.default),n):null})}getBookData(t){var r=this.history[t];return r==null?void 0:r.stack[r.cursor]}getDocument(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.getBookData(t),u=n==null?void 0:n.perfDocument;if(u)return r?(0,i2.default)(u):Ut({},u)}getDocuments(){return Object.keys(this.history).reduce((t,r)=>(t[r]=this.getDocument(r),t),{})}savePerf(t){this.saved[t]=this.getBookData(t)}canSavePerf(t){return this.saved[t]!==this.getBookData(t)}setBookHistory(t){var r,n;return(n=(r=this.history)[t])!==null&&n!==void 0||(r[t]={stack:[],cursor:0}),this.history[t]}getBookHistory(t){var r,n=(r=this.history[t])!==null&&r!==void 0?r:this.setBookHistory(t);return n}clearPerf(){this.history={}}addDocument(t){var r,{bookCode:n,perfDocument:u,clone:s=!0}=t,{stack:o,cursor:a}=this.getBookHistory(n);return(r=o[a])!==null&&r!==void 0||(o[a]={}),o[a].perfDocument=s?(0,i2.default)(u):u,u}setPipelineData(t,r){var n,{stack:u,cursor:s}=this.getBookHistory(t);(n=u[s])!==null&&n!==void 0||(u[s]={});var o=u[s].pipelineData;r&&(u[s].pipelineData=Ut(Ut({},o),r))}getPipelineData(t){var r=this.getBookData(t);return r==null?void 0:r.pipelineData}getPipelineHandler(){return this.pipelineHandler}runPipeline(t){var r=this;return wn(function*(){var{bookCode:n,pipelineName:u,perfDocument:s}=t;if(!u)return{perf:s};var o=r.getPipelineData(n),[a]=r.pipelineHandler.pipelines[u],{inputs:i}=a,c=o?Object.keys(o).reduce((h,E)=>(E in i&&(h[E]=o[E]),h),{}):void 0,l=Ut({perf:s},c),p=yield r.pipelineHandler.runPipeline(u,l),{perf:f}=p,d=Za(p,mDe);return{perf:f,pipelineData:d}})()}loadPerf(t,r,n){var u=this;return wn(function*(){var s,o=(s=n.cloning)!==null&&s!==void 0?s:!0,{writePipeline:a,readPipeline:i}=n,{perf:c,pipelineData:l}=yield u.runPipeline({bookCode:t,pipelineName:a,perfDocument:r}),p=u.validator.validate("constraint","perfDocument","0.3.0",c);if(!p.isValid)throw new Error("writePerf is schema invalid: ".concat(JSON.stringify(p.errors)));u.setPipelineData(t,l);var f=u.addDocument({bookCode:t,perfDocument:c,clone:o});if(p=u.validator.validate("constraint","perfDocument","0.3.0",f),!p.isValid)throw new Error("savedPerf is schema invalid: ".concat(JSON.stringify(p.errors)));var{perf:d,pipelineData:h}=yield u.runPipeline({bookCode:t,pipelineName:i,perfDocument:f});if(p=u.validator.validate("constraint","perfDocument","0.3.0",d),!p.isValid){var E=p.errors.map(A=>{var m=(0,hu.getPathValue)({object:d,path:A.instancePath});return Ut(Ut({},A),{},{value:JSON.stringify(m,null,2)})});throw new Error("readPerf is schema invalid: ".concat(JSON.stringify(E)))}return u.setPipelineData(t,h),u.savePerf(t),u.notifyObservers({action:vl.LOAD_PERF,data:d}),d})()}sideloadPerf(t,r){var n=arguments,u=this;return wn(function*(){var s=n.length>2&&n[2]!==void 0?n[2]:{};if((0,hu.validateParams)(["writePipeline","readPipeline","cloning"],s,"Unexpected option in sideloadPerf"),u.backend==="proskomma")throw"Can't call sideloadPerf in proskomma mode";if(!t||!r)throw"sideloadPerf requires 2 arguments (bookCode, perfDocument)";var o=u.validator.validate("constraint","perfDocument","0.3.0",r);if(!o.isValid)throw`perfJSON is not valid. -`.concat(JSON.stringify(o,null,2));return yield u.loadPerf(t,r,s)})()}fetchPerf(t){var r=arguments,n=this;return wn(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};if((0,hu.validateParams)(["writePipeline","readPipeline","cloning"],u,"Unexpected option in fetchPerf"),n.backend==="standalone")throw"Can't call fetchPerf in standalone mode";if(!t)throw new Error("fetchPerf requires argument (bookCode)");if(t.length>3||!/^[A-Z0-9]{3}$/.test(t))throw new Error('Invalid bookCode: "'.concat(t,'". Only three characters (uppercase letters [A-Z] or numbers [0-9]) allowed.'));var s='{docSet(id: "'.concat(n.docSetId,'") { document(bookCode: "').concat(t,'") { perf } } }'),{data:o}=n.proskomma.gqlQuerySync(s),a=o.docSet.document.perf;if(!a)throw new Error('No document with bookCode="'.concat(t,'" found.'));var i=JSON.parse(a);return yield n.loadPerf(t,i,u)})()}readPerf(t){var r=arguments,n=this;return wn(function*(){var u,s=r.length>1&&r[1]!==void 0?r[1]:{};(0,hu.validateParams)(["readPipeline","cloning"],s,"Unexpected option in readPerf");var o=(u=s.cloning)!==null&&u!==void 0?u:!0;if(!n.history[t]&&n.backend==="proskomma")return n.fetchPerf(t,s);if(!n.history[t]&&n.backend==="standalone")throw'No document with bookCode="'.concat(t,'" found in memory. Use sideloadPerf() to load the document.');var a=n.getDocument(t,o),{readPipeline:i}=s,{perf:c,pipelineData:l}=yield n.runPipeline({bookCode:t,pipelineName:i,perfDocument:a});return n.setPipelineData(t,l),c})()}writePerf(t,r,n){var u=arguments,s=this;return wn(function*(){var o=u.length>3&&u[3]!==void 0?u[3]:{};(0,hu.validateParams)(["writePipeline","readPipeline","cloning","insertSequences"],o,"Unexpected option in writePerf");var{writePipeline:a,cloning:i,insertSequences:c}=o,l=Za(o,EDe),p=i??!0,f=s.getDocument(t,!1);if(!f)throw"document not found: ".concat(t);if(!f.sequences[r])throw"PERF sequence id not found: ".concat(t,", ").concat(r);var d=s.validator.validate("constraint","perfSequence","0.3.0",n);if(!d.isValid)throw"PERF sequence ".concat(r," for ").concat(t," is not valid: ").concat(JSON.stringify(d));var h={};c&&(0,hu.findNewGraft)(n,$=>{var I=(0,hu.generateId)();h[I]={type:$.subtype,blocks:[]},$.target=I,delete $.new});var{sequences:E}=f,A=Za(f,vDe),m=Ut(Ut({},E),{},{[r]:p?(0,i2.default)(n):n});A.sequences=m;var{perf:y,pipelineData:F}=yield s.runPipeline({bookCode:t,pipelineName:a,perfDocument:A});y.sequences=Ut(Ut(Ut({},E),h),{},{[r]:y.sequences[r]});var B=s.history[t];B.stack=B.stack.slice(B.cursor),B.stack.unshift({perfDocument:y}),B.cursor=0,s.setPipelineData(t,F),B.stack.length>s.options.historySize&&B.stack.pop();var P=yield s.readPerf(t,l);return s.notifyObservers({action:vl.WRITE_PERF,data:P}),P})()}undoPerf(t,r){var n=this;return wn(function*(){if(n.canUndo(t)){var u=n.history[t];++u.cursor;var s=yield n.readPerf(t,r);return n.notifyObservers({action:vl.UNDO_PERF,data:s}),s}return null})()}redoPerf(t,r){var n=this;return wn(function*(){if(n.canRedo(t)){var u=n.history[t];--u.cursor;var s=yield n.readPerf(t,r);return n.notifyObservers({action:vl.REDO_PERF,data:s}),s}return null})()}canUndo(t){var r=this.history[t];return!(!r||r.cursor+1===r.stack.length)}canRedo(t){var r=this.history[t];return!(!r||r.cursor===0)}checkPerfSequence(t){var r=0,n=0,u=t==null?void 0:t.blocks.reduce((s,o)=>{var{content:a}=o;if(Array.isArray(a))for(var i of a)i.type==="mark"&&i.subtype==="verses"&&(n++,n.toString()!==i.atts.number&&(s.push("Verse ".concat(i.atts.number," is out of order, expected ").concat(n)),n=Number(i.atts.number))),i.type==="mark"&&i.subtype==="chapter"&&(r++,r.toString()!==i.atts.number&&(s.push("Chapter ".concat(i.atts.number," is out of order, expected ").concat(r)),r=Number(i.atts.number)),n=0);return s},[]);return u}localBookCodes(){return Object.keys(this.history)}bookHeaders(){var t,r,n={},u='{ docSet(id: "'.concat(this.docSetId,'") { documents { headers { key value } } } }'),{data:s}=((t=this.proskomma)===null||t===void 0?void 0:t.gqlQuerySync(u))||{},o=(s==null||(r=s.docSet)===null||r===void 0?void 0:r.documents)||this.getDocuments();for(var a of o){var i=null,c={};for(var l of a.headers)l.key==="bookCode"?i=l.value:c[l.key]=l.value;i&&(n[i]=c)}return n}readUsfm(t,r){var n=this;return wn(function*(){var u=yield n.readPerf(t,r);n.pipelineHandler===null&&n.instanciatePipelineHandler();var s=yield n.pipelineHandler.runPipeline("perfToUsfmPipeline",{perf:u});return s.usfm})()}makeDocumentReport(t,r,n){var u=this;return wn(function*(){if(!u.localBookCodes().includes(t))throw new Error("bookCode '".concat(t,"' is not available locally"));return u.pipelineHandler===null&&u.instanciatePipelineHandler(),n.perf=u.getDocument(t),yield u.pipelineHandler.runPipeline(r,n)})()}makeDocumentsReport(t,r){var n=this;return wn(function*(){var u=n.localBookCodes(),s={};for(var o of u){var a=yield n.makeDocumentReport(o,t,r);s[a.matches.bookCode]=a}return s})()}}var bDe=CDe;Qp.default=bDe;var Cf={},bf={};Object.defineProperty(bf,"__esModule",{value:!0});bf.default=void 0;var SDe={"*":{"*":{tagName:"span"},sequence:{tagName:"section"}},paragraph:{"*":{tagName:"p"}},mark:{"*":{tagName:"span"},chapter:e=>{var{atts:t}=e;return{classList:["mark","chapter","chapter-".concat(t.number)],id:"chapter-".concat(t.number)}}},graft:{heading:{tagName:"div"},title:{tagName:"div"},introduction:{tagName:"div"}}};bf.default=SDe;var Mr={};Object.defineProperty(Mr,"__esModule",{value:!0});Mr.mapHtml=Mr.handleSubtypeNS=Mr.handleNewGrafts=Mr.handleAtts=Mr.generateId=Mr.createElement=void 0;var wDe=qw(S3),_De=qw(w3);function qw(e){return e&&e.__esModule?e:{default:e}}function GS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function VS(e){for(var t=1;tObject.keys(e).reduce((t,r)=>e[r]!==void 0&&e[r]!==null?t+=" ".concat(r,'="').concat(e[r],'"'):t,""),$De=e=>Object.keys(e).reduce((t,r)=>e[r]?t+=" data-".concat(r,'="').concat(e[r],'"'):t,""),PDe=e=>e&&Array.isArray(e)?' class="'.concat(e.join(" "),'"'):' class="'.concat(e,'"'),ODe=e=>{var{classList:t,id:r,attributes:n,dataset:u}=e;return"".concat(PDe(t)).concat(r&&' id="'.concat(r,'"')).concat($De(u)).concat(TDe(n))},kDe=e=>{var{tagName:t="div",id:r="",classList:n="",dataset:u={},children:s="",attributes:o={}}=e;return"<".concat(t||"div").concat(ODe({classList:n,id:r,attributes:o,dataset:u}),">").concat(s,"")};Mr.createElement=kDe;var IDe=e=>{var t,r,n,u,{props:s,htmlMap:o}=e,{type:a,subtype:i}=s,c=(d,h)=>[...d?[d]:[],...h?[h.replace(":"," ")]:[]];if(!o)return{classList:c(a,i)};var l=[(t=o[a])===null||t===void 0?void 0:t[i],(r=o["*"])===null||r===void 0?void 0:r[i],(n=o[a])===null||n===void 0?void 0:n["*"],(u=o["*"])===null||u===void 0?void 0:u["*"]],p=d=>d&&(Array.isArray(d)?d:[d]),f=l.reduce((d,h)=>{var E=h||{},{classList:A,tagName:m,id:y,attributes:F}=typeof E=="function"?E(s):E;return d.classList=d.classList.concat(p(A)||[]),d.attributes=VS(VS({},d.attributes),F),!d.tagName&&m&&(d.tagName=m),!d.id&&y&&(d.id=y),d},{classList:[],tagName:"",attributes:{}});return{classList:f.classList.length?[...new Set(f.classList)]:c(a,i),tagName:f.tagName,id:f.id,attributes:f.attributes}};Mr.mapHtml=IDe;var NDe=e=>e?Object.keys(e).reduce((t,r)=>(t["atts-".concat(r)]=typeof e[r]=="object"?e[r].join(","):e[r],t),{}):{};Mr.handleAtts=NDe;var qDe=e=>{var t=e.split(":");return t.length>1?{"subtype-ns":t[0],subtype:t[1]}:{subtype:e}};Mr.handleSubtypeNS=qDe;var xw=()=>_De.default.encode(new wDe.default(4)).substring(0,12);Mr.generateId=xw;var xDe=e=>{var t={};return e.forEach(r=>{var n=xw();t[n]={type:r.subtype,blocks:r.content||[]},r.target=n,delete r.content,delete r.new}),t};Mr.handleNewGrafts=xDe;Object.defineProperty(Cf,"__esModule",{value:!0});Cf.default=void 0;var RDe=UDe(bf),_n=Mr,jDe=["type","subtype","content","meta_content","atts"],MDe=["type","subtype","atts","content"],LDe=["blocks"];function UDe(e){return e&&e.__esModule?e:{default:e}}function HS(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Xn(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VDe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function HDe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:RDe.default,n=c=>{var l;return(l=c==null?void 0:c.reduce((p,f)=>p+=typeof f=="string"?f:s(f),""))!==null&&l!==void 0?l:""},u=(c,l)=>c?(0,_n.createElement)({tagName:"span",classList:[l],children:c==null?void 0:c.reduce((p,f)=>typeof f=="string"?p+=f:p+=s(f),"")}):"",s=c=>{var{type:l,subtype:p,content:f,meta_content:d,atts:h}=c,E=c2(c,jDe),A=(0,_n.handleAtts)(h),m=(0,_n.handleSubtypeNS)(p),{classList:y,tagName:F,id:B,attributes:P}=(0,_n.mapHtml)({props:Xn({type:l,subtype:p,atts:h},E),htmlMap:r}),$=I=>{var U={markHtml:()=>["chapter","verses"].includes(p)?h.number:"",wrapperHtml:()=>n(I)+u(d,"meta-content")},j=U["".concat(l,"Html")];return typeof j=="function"?j():""};return(0,_n.createElement)({tagName:F,id:B,classList:y,attributes:P,dataset:Xn(Xn(Xn({type:l},m),A),E),children:$(f)})},o=c=>{var{type:l,subtype:p,atts:f,content:d}=c,h=c2(c,MDe),E=(0,_n.handleAtts)(f),A=(0,_n.handleSubtypeNS)(p),{classList:m,tagName:y,id:F,attributes:B}=(0,_n.mapHtml)({props:Xn({type:l,subtype:p,atts:f},h),htmlMap:r});return(0,_n.createElement)({tagName:y,id:F,classList:m,attributes:B,dataset:Xn(Xn(Xn({type:l},A),E),h),children:n(d)})},a=(c,l)=>{var{blocks:p}=c,f=c2(c,LDe),{classList:d,tagName:h,attributes:E}=(0,_n.mapHtml)({props:Xn(Xn({},f),{},{subtype:"sequence"}),htmlMap:r});return(0,_n.createElement)({tagName:h,id:"".concat(l),classList:d,dataset:f,attributes:E,children:p==null?void 0:p.reduce((A,m)=>A+=o(m),"")})},i=e.sequences[t];return a(i,t)}var WDe=HDe;Cf.default=WDe;var Sf={},Er={},wf={},Ra={},Cp={exports:{}};/*! https://mths.be/he v1.2.0 by @mathias | MIT license */Cp.exports;(function(e,t){(function(r){var n=t,u=e&&e.exports==n&&e,s=typeof we=="object"&&we;(s.global===s||s.window===s)&&(r=s);var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[\x01-\x7F]/g,i=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,l={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot"," ":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr",ª:"ordf",á:"aacute",Á:"Aacute",à:"agrave",À:"Agrave",ă:"abreve",Ă:"Abreve",â:"acirc",Â:"Acirc",å:"aring",Å:"angst",ä:"auml",Ä:"Auml",ã:"atilde",Ã:"Atilde",ą:"aogon",Ą:"Aogon",ā:"amacr",Ā:"Amacr",æ:"aelig",Æ:"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf",ℬ:"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf",ℭ:"Cfr","𝒞":"Cscr",ℂ:"Copf",ć:"cacute",Ć:"Cacute",ĉ:"ccirc",Ĉ:"Ccirc",č:"ccaron",Č:"Ccaron",ċ:"cdot",Ċ:"Cdot",ç:"ccedil",Ç:"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf",ď:"dcaron",Ď:"Dcaron",đ:"dstrok",Đ:"Dstrok",ð:"eth",Ð:"ETH","ⅇ":"ee",ℯ:"escr","𝔢":"efr","𝕖":"eopf",ℰ:"Escr","𝔈":"Efr","𝔼":"Eopf",é:"eacute",É:"Eacute",è:"egrave",È:"Egrave",ê:"ecirc",Ê:"Ecirc",ě:"ecaron",Ě:"Ecaron",ë:"euml",Ë:"Euml",ė:"edot",Ė:"Edot",ę:"eogon",Ę:"Eogon",ē:"emacr",Ē:"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf",ℱ:"Fscr",ff:"fflig",ffi:"ffilig",ffl:"ffllig",fi:"filig",fj:"fjlig",fl:"fllig",ƒ:"fnof",ℊ:"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr",ǵ:"gacute",ğ:"gbreve",Ğ:"Gbreve",ĝ:"gcirc",Ĝ:"Gcirc",ġ:"gdot",Ġ:"Gdot",Ģ:"Gcedil","𝔥":"hfr",ℎ:"planckh","𝒽":"hscr","𝕙":"hopf",ℋ:"Hscr",ℌ:"Hfr",ℍ:"Hopf",ĥ:"hcirc",Ĥ:"Hcirc",ℏ:"hbar",ħ:"hstrok",Ħ:"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf",ℐ:"Iscr",ℑ:"Im",í:"iacute",Í:"Iacute",ì:"igrave",Ì:"Igrave",î:"icirc",Î:"Icirc",ï:"iuml",Ï:"Iuml",ĩ:"itilde",Ĩ:"Itilde",İ:"Idot",į:"iogon",Į:"Iogon",ī:"imacr",Ī:"Imacr",ij:"ijlig",IJ:"IJlig",ı:"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf",ĵ:"jcirc",Ĵ:"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr",ķ:"kcedil",Ķ:"Kcedil","𝔩":"lfr","𝓁":"lscr",ℓ:"ell","𝕝":"lopf",ℒ:"Lscr","𝔏":"Lfr","𝕃":"Lopf",ĺ:"lacute",Ĺ:"Lacute",ľ:"lcaron",Ľ:"Lcaron",ļ:"lcedil",Ļ:"Lcedil",ł:"lstrok",Ł:"Lstrok",ŀ:"lmidot",Ŀ:"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf",ℳ:"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr",ℕ:"Nopf","𝒩":"Nscr","𝔑":"Nfr",ń:"nacute",Ń:"Nacute",ň:"ncaron",Ň:"Ncaron",ñ:"ntilde",Ñ:"Ntilde",ņ:"ncedil",Ņ:"Ncedil","№":"numero",ŋ:"eng",Ŋ:"ENG","𝕠":"oopf","𝔬":"ofr",ℴ:"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf",º:"ordm",ó:"oacute",Ó:"Oacute",ò:"ograve",Ò:"Ograve",ô:"ocirc",Ô:"Ocirc",ö:"ouml",Ö:"Ouml",ő:"odblac",Ő:"Odblac",õ:"otilde",Õ:"Otilde",ø:"oslash",Ø:"Oslash",ō:"omacr",Ō:"Omacr",œ:"oelig",Œ:"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf",ℙ:"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr",ℚ:"Qopf",ĸ:"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr",ℛ:"Rscr",ℜ:"Re",ℝ:"Ropf",ŕ:"racute",Ŕ:"Racute",ř:"rcaron",Ř:"Rcaron",ŗ:"rcedil",Ŗ:"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS",ś:"sacute",Ś:"Sacute",ŝ:"scirc",Ŝ:"Scirc",š:"scaron",Š:"Scaron",ş:"scedil",Ş:"Scedil",ß:"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf",ť:"tcaron",Ť:"Tcaron",ţ:"tcedil",Ţ:"Tcedil","™":"trade",ŧ:"tstrok",Ŧ:"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr",ú:"uacute",Ú:"Uacute",ù:"ugrave",Ù:"Ugrave",ŭ:"ubreve",Ŭ:"Ubreve",û:"ucirc",Û:"Ucirc",ů:"uring",Ů:"Uring",ü:"uuml",Ü:"Uuml",ű:"udblac",Ű:"Udblac",ũ:"utilde",Ũ:"Utilde",ų:"uogon",Ų:"Uogon",ū:"umacr",Ū:"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr",ŵ:"wcirc",Ŵ:"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf",ý:"yacute",Ý:"Yacute",ŷ:"ycirc",Ŷ:"Ycirc",ÿ:"yuml",Ÿ:"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf",ℨ:"Zfr",ℤ:"Zopf","𝒵":"Zscr",ź:"zacute",Ź:"Zacute",ž:"zcaron",Ž:"Zcaron",ż:"zdot",Ż:"Zdot",Ƶ:"imped",þ:"thorn",Þ:"THORN",ʼn:"napos",α:"alpha",Α:"Alpha",β:"beta",Β:"Beta",γ:"gamma",Γ:"Gamma",δ:"delta",Δ:"Delta",ε:"epsi","ϵ":"epsiv",Ε:"Epsilon",ϝ:"gammad",Ϝ:"Gammad",ζ:"zeta",Ζ:"Zeta",η:"eta",Η:"Eta",θ:"theta",ϑ:"thetav",Θ:"Theta",ι:"iota",Ι:"Iota",κ:"kappa",ϰ:"kappav",Κ:"Kappa",λ:"lambda",Λ:"Lambda",μ:"mu",µ:"micro",Μ:"Mu",ν:"nu",Ν:"Nu",ξ:"xi",Ξ:"Xi",ο:"omicron",Ο:"Omicron",π:"pi",ϖ:"piv",Π:"Pi",ρ:"rho",ϱ:"rhov",Ρ:"Rho",σ:"sigma",Σ:"Sigma",ς:"sigmaf",τ:"tau",Τ:"Tau",υ:"upsi",Υ:"Upsilon",ϒ:"Upsi",φ:"phi",ϕ:"phiv",Φ:"Phi",χ:"chi",Χ:"Chi",ψ:"psi",Ψ:"Psi",ω:"omega",Ω:"ohm",а:"acy",А:"Acy",б:"bcy",Б:"Bcy",в:"vcy",В:"Vcy",г:"gcy",Г:"Gcy",ѓ:"gjcy",Ѓ:"GJcy",д:"dcy",Д:"Dcy",ђ:"djcy",Ђ:"DJcy",е:"iecy",Е:"IEcy",ё:"iocy",Ё:"IOcy",є:"jukcy",Є:"Jukcy",ж:"zhcy",Ж:"ZHcy",з:"zcy",З:"Zcy",ѕ:"dscy",Ѕ:"DScy",и:"icy",И:"Icy",і:"iukcy",І:"Iukcy",ї:"yicy",Ї:"YIcy",й:"jcy",Й:"Jcy",ј:"jsercy",Ј:"Jsercy",к:"kcy",К:"Kcy",ќ:"kjcy",Ќ:"KJcy",л:"lcy",Л:"Lcy",љ:"ljcy",Љ:"LJcy",м:"mcy",М:"Mcy",н:"ncy",Н:"Ncy",њ:"njcy",Њ:"NJcy",о:"ocy",О:"Ocy",п:"pcy",П:"Pcy",р:"rcy",Р:"Rcy",с:"scy",С:"Scy",т:"tcy",Т:"Tcy",ћ:"tshcy",Ћ:"TSHcy",у:"ucy",У:"Ucy",ў:"ubrcy",Ў:"Ubrcy",ф:"fcy",Ф:"Fcy",х:"khcy",Х:"KHcy",ц:"tscy",Ц:"TScy",ч:"chcy",Ч:"CHcy",џ:"dzcy",Џ:"DZcy",ш:"shcy",Ш:"SHcy",щ:"shchcy",Щ:"SHCHcy",ъ:"hardcy",Ъ:"HARDcy",ы:"ycy",Ы:"Ycy",ь:"softcy",Ь:"SOFTcy",э:"ecy",Э:"Ecy",ю:"yucy",Ю:"YUcy",я:"yacy",Я:"YAcy",ℵ:"aleph",ℶ:"beth",ℷ:"gimel",ℸ:"daleth"},p=/["&'<>`]/g,f={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},d=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,E=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,A={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` -`,nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},m={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},y={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},F=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],B=String.fromCharCode,P={},$=P.hasOwnProperty,I=function(pe,Q){return $.call(pe,Q)},U=function(pe,Q){for(var q=-1,v=pe.length;++q=55296&&pe<=57343||pe>1114111?(Q&&oe("character reference outside the permissible Unicode range"),"�"):I(y,pe)?(Q&&oe("disallowed character reference"),y[pe]):(Q&&U(F,pe)&&oe("disallowed character reference"),pe>65535&&(pe-=65536,q+=B(pe>>>10&1023|55296),pe=56320|pe&1023),q+=B(pe),q)},te=function(pe){return"&#x"+pe.toString(16).toUpperCase()+";"},Y=function(pe){return"&#"+pe+";"},oe=function(pe){throw Error("Parse error: "+pe)},ie=function(pe,Q){Q=j(Q,ie.options);var q=Q.strict;q&&h.test(pe)&&oe("forbidden code point");var v=Q.encodeEverything,C=Q.useNamedReferences,D=Q.allowUnsafeSymbols,g=Q.decimal?Y:te,O=function(b){return g(b.charCodeAt(0))};return v?(pe=pe.replace(a,function(b){return C&&I(l,b)?"&"+l[b]+";":O(b)}),C&&(pe=pe.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),C&&(pe=pe.replace(c,function(b){return"&"+l[b]+";"}))):C?(D||(pe=pe.replace(p,function(b){return"&"+l[b]+";"})),pe=pe.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),pe=pe.replace(c,function(b){return"&"+l[b]+";"})):D||(pe=pe.replace(p,O)),pe.replace(o,function(b){var w=b.charCodeAt(0),x=b.charCodeAt(1),k=(w-55296)*1024+x-56320+65536;return g(k)}).replace(i,O)};ie.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var fe=function(pe,Q){Q=j(Q,fe.options);var q=Q.strict;return q&&d.test(pe)&&oe("malformed character reference"),pe.replace(E,function(v,C,D,g,O,b,w,x,k){var G,H,re,_e,Le,Ue;return C?(Le=C,A[Le]):D?(Le=D,Ue=g,Ue&&Q.isAttributeValue?(q&&Ue=="="&&oe("`&` did not start a character reference"),v):(q&&oe("named character reference was not terminated by a semicolon"),m[Le]+(Ue||""))):O?(re=O,H=b,q&&!H&&oe("character reference was not terminated by a semicolon"),G=parseInt(re,10),W(G,q)):w?(_e=w,H=x,q&&!H&&oe("character reference was not terminated by a semicolon"),G=parseInt(_e,16),W(G,q)):(q&&oe("named character reference was not terminated by a semicolon"),v)})};fe.options={isAttributeValue:!1,strict:!1};var De=function(pe){return pe.replace(p,function(Q){return f[Q]})},de={version:"1.2.0",encode:ie,decode:fe,escape:De,unescape:fe};if(n&&!n.nodeType)if(u)u.exports=de;else for(var Ce in de)I(de,Ce)&&(n[Ce]=de[Ce]);else r.he=de})(we)})(Cp,Cp.exports);var _3=Cp.exports;Object.defineProperty(Ra,"__esModule",{value:!0});var WS=_3,JDe=function(){function e(t,r){t===void 0&&(t=null),this.parentNode=t,this.childNodes=[],Object.defineProperty(this,"range",{enumerable:!1,writable:!0,configurable:!0,value:r??[-1,-1]})}return e.prototype.remove=function(){var t=this;if(this.parentNode){var r=this.parentNode.childNodes;this.parentNode.childNodes=r.filter(function(n){return t!==n}),this.parentNode=null}return this},Object.defineProperty(e.prototype,"innerText",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{get:function(){return(0,WS.decode)(this.rawText)},set:function(t){this.rawText=(0,WS.encode)(t)},enumerable:!1,configurable:!0}),e}();Ra.default=JDe;var fo={};Object.defineProperty(fo,"__esModule",{value:!0});var wh;(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE"})(wh||(wh={}));fo.default=wh;var zDe=we&&we.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Rw=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(wf,"__esModule",{value:!0});var KDe=Rw(Ra),XDe=Rw(fo),YDe=function(e){zDe(t,e);function t(r,n,u){var s=e.call(this,n,u)||this;return s.rawText=r,s.nodeType=XDe.default.COMMENT_NODE,s}return t.prototype.clone=function(){return new t(this.rawText,null)},Object.defineProperty(t.prototype,"text",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"")},t}(KDe.default);wf.default=YDe;var Pu={},jw={},Mw={},Zr={},Do={},Sc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Sc);var Dt={},ho=we&&we.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),wi=we&&we.__assign||function(){return wi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(B3);Dt.NodeWithChildren=Bf;var Vw=function(e){ho(t,e);function t(r){return e.call(this,Gt.ElementType.Root,r)||this}return t}(Bf);Dt.Document=Vw;var Hw=function(e){ho(t,e);function t(r,n,u,s){u===void 0&&(u=[]),s===void 0&&(s=r==="script"?Gt.ElementType.Script:r==="style"?Gt.ElementType.Style:Gt.ElementType.Tag);var o=e.call(this,s,u)||this;return o.name=r,o.attribs=n,o}return Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var u,s;return{name:n,value:r.attribs[n],namespace:(u=r["x-attribsNamespace"])===null||u===void 0?void 0:u[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(Bf);Dt.Element=Hw;function Ww(e){return(0,Gt.isTag)(e)}Dt.isTag=Ww;function Jw(e){return e.type===Gt.ElementType.CDATA}Dt.isCDATA=Jw;function zw(e){return e.type===Gt.ElementType.Text}Dt.isText=zw;function Kw(e){return e.type===Gt.ElementType.Comment}Dt.isComment=Kw;function Xw(e){return e.type===Gt.ElementType.Directive}Dt.isDirective=Xw;function Yw(e){return e.type===Gt.ElementType.Root}Dt.isDocument=Yw;function QDe(e){return Object.prototype.hasOwnProperty.call(e,"children")}Dt.hasChildren=QDe;function T3(e,t){t===void 0&&(t=!1);var r;if(zw(e))r=new Lw(e.data);else if(Kw(e))r=new Uw(e.data);else if(Ww(e)){var n=t?l2(e.children):[],u=new Hw(e.name,wi({},e.attribs),n);n.forEach(function(i){return i.parent=u}),e.namespace!=null&&(u.namespace=e.namespace),e["x-attribsNamespace"]&&(u["x-attribsNamespace"]=wi({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(u["x-attribsPrefix"]=wi({},e["x-attribsPrefix"])),r=u}else if(Jw(e)){var n=t?l2(e.children):[],s=new Bf(Gt.ElementType.CDATA,n);n.forEach(function(c){return c.parent=s}),r=s}else if(Yw(e)){var n=t?l2(e.children):[],o=new Vw(n);n.forEach(function(c){return c.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(Xw(e)){var a=new Gw(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),r=a}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}Dt.cloneNode=T3;function l2(e){for(var t=e.map(function(n){return T3(n,!0)}),r=1;r",uJe=">",sJe="Í",oJe="í",aJe="Î",iJe="î",cJe="¡",lJe="Ì",pJe="ì",fJe="¿",dJe="Ï",DJe="ï",hJe="«",mJe="<",EJe="<",vJe="¯",yJe="µ",gJe="·",AJe=" ",FJe="¬",CJe="Ñ",bJe="ñ",SJe="Ó",wJe="ó",_Je="Ô",BJe="ô",TJe="Ò",$Je="ò",PJe="ª",OJe="º",kJe="Ø",IJe="ø",NJe="Õ",qJe="õ",xJe="Ö",RJe="ö",jJe="¶",MJe="±",LJe="£",UJe='"',GJe='"',VJe="»",HJe="®",WJe="®",JJe="§",zJe="­",KJe="¹",XJe="²",YJe="³",ZJe="ß",QJe="Þ",eze="þ",tze="×",rze="Ú",nze="ú",uze="Û",sze="û",oze="Ù",aze="ù",ize="¨",cze="Ü",lze="ü",pze="Ý",fze="ý",dze="¥",Dze="ÿ",hze={Aacute:EWe,aacute:vWe,Acirc:yWe,acirc:gWe,acute:AWe,AElig:FWe,aelig:CWe,Agrave:bWe,agrave:SWe,amp:wWe,AMP:_We,Aring:BWe,aring:TWe,Atilde:$We,atilde:PWe,Auml:OWe,auml:kWe,brvbar:IWe,Ccedil:NWe,ccedil:qWe,cedil:xWe,cent:RWe,copy:jWe,COPY:MWe,curren:LWe,deg:UWe,divide:GWe,Eacute:VWe,eacute:HWe,Ecirc:WWe,ecirc:JWe,Egrave:zWe,egrave:KWe,ETH:XWe,eth:YWe,Euml:ZWe,euml:QWe,frac12:eJe,frac14:tJe,frac34:rJe,gt:nJe,GT:uJe,Iacute:sJe,iacute:oJe,Icirc:aJe,icirc:iJe,iexcl:cJe,Igrave:lJe,igrave:pJe,iquest:fJe,Iuml:dJe,iuml:DJe,laquo:hJe,lt:mJe,LT:EJe,macr:vJe,micro:yJe,middot:gJe,nbsp:AJe,not:FJe,Ntilde:CJe,ntilde:bJe,Oacute:SJe,oacute:wJe,Ocirc:_Je,ocirc:BJe,Ograve:TJe,ograve:$Je,ordf:PJe,ordm:OJe,Oslash:kJe,oslash:IJe,Otilde:NJe,otilde:qJe,Ouml:xJe,ouml:RJe,para:jJe,plusmn:MJe,pound:LJe,quot:UJe,QUOT:GJe,raquo:VJe,reg:HJe,REG:WJe,sect:JJe,shy:zJe,sup1:KJe,sup2:XJe,sup3:YJe,szlig:ZJe,THORN:QJe,thorn:eze,times:tze,Uacute:rze,uacute:nze,Ucirc:uze,ucirc:sze,Ugrave:oze,ugrave:aze,uml:ize,Uuml:cze,uuml:lze,Yacute:pze,yacute:fze,yen:dze,yuml:Dze},mze="&",Eze="'",vze=">",yze="<",gze='"',e_={amp:mze,apos:Eze,gt:vze,lt:yze,quot:gze};var P3={};const Aze={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var Fze=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P3,"__esModule",{value:!0});var JS=Fze(Aze),Cze=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function bze(e){return e>=55296&&e<=57343||e>1114111?"�":(e in JS.default&&(e=JS.default[e]),Cze(e))}P3.default=bze;var Tf=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Bu,"__esModule",{value:!0});Bu.decodeHTML=Bu.decodeHTMLStrict=Bu.decodeXML=void 0;var _h=Tf(Qw),Sze=Tf(hze),wze=Tf(e_),zS=Tf(P3),_ze=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Bu.decodeXML=t_(wze.default);Bu.decodeHTMLStrict=t_(_h.default);function t_(e){var t=r_(e);return function(r){return String(r).replace(_ze,t)}}var KS=function(e,t){return e1?Pze(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}function Oze(e,t){return function(r){return r.replace(t,function(n){return e[n]}).replace(i_,$f)}}var c_=new RegExp(s_.source+"|"+i_.source,"g");function kze(e){return e.replace(c_,$f)}Qr.escape=kze;function Ize(e){return e.replace(s_,$f)}Qr.escapeUTF8=Ize;function l_(e){return function(t){return t.replace(c_,function(r){return e[r]||$f(r)})}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Bu,r=Qr;function n(i,c){return(!c||c<=0?t.decodeXML:t.decodeHTML)(i)}e.decode=n;function u(i,c){return(!c||c<=0?t.decodeXML:t.decodeHTMLStrict)(i)}e.decodeStrict=u;function s(i,c){return(!c||c<=0?r.encodeXML:r.encodeHTML)(i)}e.encode=s;var o=Qr;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var a=Bu;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})})(Zw);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.attributeNames=Fa.elementNames=void 0;Fa.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);Fa.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]]);var ea=we&&we.__assign||function(){return ea=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&(n+=k3(e.children,t)),(t.xmlMode||!XS.has(e.name))&&(n+="")),n}function Vze(e){return"<"+e.data+">"}function Hze(e,t){var r=e.data||"";return t.decodeEntities!==!1&&!(!t.xmlMode&&e.parent&&Rze.has(e.parent.name))&&(r=p_.encodeXML(r)),r}function Wze(e){return""}function Jze(e){return""}var zze=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Zr,"__esModule",{value:!0});Zr.innerText=Zr.textContent=Zr.getText=Zr.getInnerHTML=Zr.getOuterHTML=void 0;var su=Do,Kze=zze($3),Xze=Sc;function d_(e,t){return(0,Kze.default)(e,t)}Zr.getOuterHTML=d_;function Yze(e,t){return(0,su.hasChildren)(e)?e.children.map(function(r){return d_(r,t)}).join(""):""}Zr.getInnerHTML=Yze;function Il(e){return Array.isArray(e)?e.map(Il).join(""):(0,su.isTag)(e)?e.name==="br"?` -`:Il(e.children):(0,su.isCDATA)(e)?Il(e.children):(0,su.isText)(e)?e.data:""}Zr.getText=Il;function Bh(e){return Array.isArray(e)?e.map(Bh).join(""):(0,su.hasChildren)(e)&&!(0,su.isComment)(e)?Bh(e.children):(0,su.isText)(e)?e.data:""}Zr.textContent=Bh;function Th(e){return Array.isArray(e)?e.map(Th).join(""):(0,su.hasChildren)(e)&&(e.type===Xze.ElementType.Tag||(0,su.isCDATA)(e))?Th(e.children):(0,su.isText)(e)?e.data:""}Zr.innerText=Th;var sr={};Object.defineProperty(sr,"__esModule",{value:!0});sr.prevElementSibling=sr.nextElementSibling=sr.getName=sr.hasAttrib=sr.getAttributeValue=sr.getSiblings=sr.getParent=sr.getChildren=void 0;var D_=Do,Zze=[];function h_(e){var t;return(t=e.children)!==null&&t!==void 0?t:Zze}sr.getChildren=h_;function m_(e){return e.parent||null}sr.getParent=m_;function Qze(e){var t,r,n=m_(e);if(n!=null)return h_(n);for(var u=[e],s=e.prev,o=e.next;s!=null;)u.unshift(s),t=s,s=t.prev;for(;o!=null;)u.push(o),r=o,o=r.next;return u}sr.getSiblings=Qze;function eKe(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}sr.getAttributeValue=eKe;function tKe(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}sr.hasAttrib=tKe;function rKe(e){return e.name}sr.getName=rKe;function nKe(e){for(var t,r=e.next;r!==null&&!(0,D_.isTag)(r);)t=r,r=t.next;return r}sr.nextElementSibling=nKe;function uKe(e){for(var t,r=e.prev;r!==null&&!(0,D_.isTag)(r);)t=r,r=t.prev;return r}sr.prevElementSibling=uKe;var Lr={};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.prepend=Lr.prependChild=Lr.append=Lr.appendChild=Lr.replaceElement=Lr.removeElement=void 0;function wc(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Lr.removeElement=wc;function sKe(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var u=t.parent=e.parent;if(u){var s=u.children;s[s.lastIndexOf(e)]=t}}Lr.replaceElement=sKe;function oKe(e,t){if(wc(t),t.next=null,t.parent=e,e.children.push(t)>1){var r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}Lr.appendChild=oKe;function aKe(e,t){wc(t);var r=e.parent,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){var u=r.children;u.splice(u.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}Lr.append=aKe;function iKe(e,t){if(wc(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var r=e.children[1];r.prev=t,t.next=r}else t.next=null}Lr.prependChild=iKe;function cKe(e,t){wc(t);var r=e.parent;if(r){var n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}Lr.prepend=cKe;var Tr={};Object.defineProperty(Tr,"__esModule",{value:!0});Tr.findAll=Tr.existsOne=Tr.findOne=Tr.findOneChild=Tr.find=Tr.filter=void 0;var Ui=Do;function lKe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),Array.isArray(t)||(t=[t]),I3(e,t,r,n)}Tr.filter=lKe;function I3(e,t,r,n){for(var u=[],s=0,o=t;s0){var i=I3(e,a.children,r,n);if(u.push.apply(u,i),n-=i.length,n<=0)break}}return u}Tr.find=I3;function pKe(e,t){return t.find(e)}Tr.findOneChild=pKe;function E_(e,t,r){r===void 0&&(r=!0);for(var n=null,u=0;u0&&(n=E_(e,s.children));else continue}return n}Tr.findOne=E_;function v_(e,t){return t.some(function(r){return(0,Ui.isTag)(r)&&(e(r)||r.children.length>0&&v_(e,r.children))})}Tr.existsOne=v_;function fKe(e,t){for(var r,n=[],u=t.filter(Ui.isTag),s;s=u.shift();){var o=(r=s.children)===null||r===void 0?void 0:r.filter(Ui.isTag);o&&o.length>0&&u.unshift.apply(u,o),e(s)&&n.push(s)}return n}Tr.findAll=fKe;var en={};Object.defineProperty(en,"__esModule",{value:!0});en.getElementsByTagType=en.getElementsByTagName=en.getElementById=en.getElements=en.testElement=void 0;var Ws=Do,Pf=Tr,bp={tag_name:function(e){return typeof e=="function"?function(t){return(0,Ws.isTag)(t)&&e(t.name)}:e==="*"?Ws.isTag:function(t){return(0,Ws.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,Ws.isText)(t)&&e(t.data)}:function(t){return(0,Ws.isText)(t)&&t.data===e}}};function y_(e,t){return typeof t=="function"?function(r){return(0,Ws.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,Ws.isTag)(r)&&r.attribs[e]===t}}function dKe(e,t){return function(r){return e(r)||t(r)}}function g_(e){var t=Object.keys(e).map(function(r){var n=e[r];return Object.prototype.hasOwnProperty.call(bp,r)?bp[r](n):y_(r,n)});return t.length===0?null:t.reduce(dKe)}function DKe(e,t){var r=g_(e);return r?r(t):!0}en.testElement=DKe;function hKe(e,t,r,n){n===void 0&&(n=1/0);var u=g_(e);return u?(0,Pf.filter)(u,t,r,n):[]}en.getElements=hKe;function mKe(e,t,r){return r===void 0&&(r=!0),Array.isArray(t)||(t=[t]),(0,Pf.findOne)(y_("id",e),t,r)}en.getElementById=mKe;function EKe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,Pf.filter)(bp.tag_name(e),t,r,n)}en.getElementsByTagName=EKe;function vKe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,Pf.filter)(bp.tag_type(e),t,r,n)}en.getElementsByTagType=vKe;var os={};Object.defineProperty(os,"__esModule",{value:!0});os.uniqueSort=os.compareDocumentPosition=os.removeSubsets=void 0;var YS=Do;function yKe(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}os.removeSubsets=yKe;function A_(e,t){var r=[],n=[];if(e===t)return 0;for(var u=(0,YS.hasChildren)(e)?e:e.parent;u;)r.unshift(u),u=u.parent;for(u=(0,YS.hasChildren)(t)?t:t.parent;u;)n.unshift(u),u=u.parent;for(var s=Math.min(r.length,n.length),o=0;oi.indexOf(l)?a===t?20:4:a===e?10:2}os.compareDocumentPosition=A_;function gKe(e){return e=e.filter(function(t,r,n){return!n.includes(t,r+1)}),e.sort(function(t,r){var n=A_(t,r);return n&2?-1:n&4?1:0}),e}os.uniqueSort=gKe;var Of={};Object.defineProperty(Of,"__esModule",{value:!0});Of.getFeed=void 0;var AKe=Zr,_c=en;function FKe(e){var t=Sp(_Ke,e);return t?t.name==="feed"?CKe(t):bKe(t):null}Of.getFeed=FKe;function CKe(e){var t,r=e.children,n={type:"atom",items:(0,_c.getElementsByTagName)("entry",r).map(function(o){var a,i=o.children,c={media:F_(i)};Rr(c,"id","id",i),Rr(c,"title","title",i);var l=(a=Sp("link",i))===null||a===void 0?void 0:a.attribs.href;l&&(c.link=l);var p=Xs("summary",i)||Xs("content",i);p&&(c.description=p);var f=Xs("updated",i);return f&&(c.pubDate=new Date(f)),c})};Rr(n,"id","id",r),Rr(n,"title","title",r);var u=(t=Sp("link",r))===null||t===void 0?void 0:t.attribs.href;u&&(n.link=u),Rr(n,"description","subtitle",r);var s=Xs("updated",r);return s&&(n.updated=new Date(s)),Rr(n,"author","email",r,!0),n}function bKe(e){var t,r,n=(r=(t=Sp("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],u={type:e.name.substr(0,3),id:"",items:(0,_c.getElementsByTagName)("item",e.children).map(function(o){var a=o.children,i={media:F_(a)};Rr(i,"id","guid",a),Rr(i,"title","title",a),Rr(i,"link","link",a),Rr(i,"description","description",a);var c=Xs("pubDate",a);return c&&(i.pubDate=new Date(c)),i})};Rr(u,"title","title",n),Rr(u,"link","link",n),Rr(u,"description","description",n);var s=Xs("lastBuildDate",n);return s&&(u.updated=new Date(s)),Rr(u,"author","managingEditor",n,!0),u}var SKe=["url","type","lang"],wKe=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function F_(e){return(0,_c.getElementsByTagName)("media:content",e).map(function(t){for(var r=t.attribs,n={medium:r.medium,isDefault:!!r.isDefault},u=0,s=SKe;u>10|55296,n&1023|56320)}function Qa(e){return e.replace(TKe,kKe)}function p2(e){return e===39||e===34}function QS(e){return e===32||e===9||e===10||e===12||e===13}function IKe(e){const t=[],r=b_(t,`${e}`,0);if(r0&&r0&&C_(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function c(f){if(n.length>0&&n[n.length-1].type===ht.Descendant){n[n.length-1].type=f;return}i(),n.push({type:f})}function l(f,d){n.push({type:ht.Attribute,name:f,action:d,value:u(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===ht.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(s(0),t.length===r)return r;e:for(;re.charCodeAt(0))),e8=new Set(w_.map(e=>e.charCodeAt(0))),ta=new Set([...w_,"~","^","$","*","+","!","|",":","[","]"," ","."].map(e=>e.charCodeAt(0)));function __(e){return e.map(t=>t.map(qKe).join("")).join(", ")}function qKe(e,t,r){switch(e.type){case ht.Child:return t===0?"> ":" > ";case ht.Parent:return t===0?"< ":" < ";case ht.Sibling:return t===0?"~ ":" ~ ";case ht.Adjacent:return t===0?"+ ":" + ";case ht.Descendant:return" ";case ht.ColumnCombinator:return t===0?"|| ":" || ";case ht.Universal:return e.namespace==="*"&&t+10?n+e.slice(r):e}const RKe=Object.freeze(Object.defineProperty({__proto__:null,get AttributeAction(){return Ot},IgnoreCaseMode:BKe,get SelectorType(){return ht},isTraversal:C_,parse:IKe,stringify:__},Symbol.toStringTag,{value:"Module"})),kf=D8(RKe);var N3={},If={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isTraversal=e.procedure=void 0,e.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,"column-combinator":-1,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1};function t(r){return e.procedure[r.type]<0}e.isTraversal=t})(If);Object.defineProperty(N3,"__esModule",{value:!0});var r8=kf,jKe=If,n8={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function MKe(e){for(var t=e.map(T_),r=1;r=0&&n>=1);else if(e.type===r8.SelectorType.Pseudo)if(!e.data)t=3;else if(e.name==="has"||e.name==="contains")t=0;else if(Array.isArray(e.data)){t=0;for(var r=0;rt&&(t=n)}e.data.length>1&&t>0&&(t-=1)}else t=1;return t}var Nf={},qf={};Object.defineProperty(qf,"__esModule",{value:!0});qf.attributeRules=void 0;var yl=mo,LKe=/[-[\]{}()*+?.,\\^$|#\s]/g;function u8(e){return e.replace(LKe,"\\$&")}var UKe=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Rs(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&UKe.has(e.name)}qf.attributeRules={equals:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;return Rs(t,r)?(s=s.toLowerCase(),function(o){var a=n.getAttributeValue(o,u);return a!=null&&a.length===s.length&&a.toLowerCase()===s&&e(o)}):function(o){return n.getAttributeValue(o,u)===s&&e(o)}},hyphen:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=s.length;return Rs(t,r)?(s=s.toLowerCase(),function(i){var c=n.getAttributeValue(i,u);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o).toLowerCase()===s&&e(i)}):function(i){var c=n.getAttributeValue(i,u);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o)===s&&e(i)}},element:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;if(/\s/.test(s))return yl.falseFunc;var o=new RegExp("(?:^|\\s)".concat(u8(s),"(?:$|\\s)"),Rs(t,r)?"i":"");return function(i){var c=n.getAttributeValue(i,u);return c!=null&&c.length>=s.length&&o.test(c)&&e(i)}},exists:function(e,t,r){var n=t.name,u=r.adapter;return function(s){return u.hasAttrib(s,n)&&e(s)}},start:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=s.length;return o===0?yl.falseFunc:Rs(t,r)?(s=s.toLowerCase(),function(a){var i=n.getAttributeValue(a,u);return i!=null&&i.length>=o&&i.substr(0,o).toLowerCase()===s&&e(a)}):function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.startsWith(s))&&e(a)}},end:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=-s.length;return o===0?yl.falseFunc:Rs(t,r)?(s=s.toLowerCase(),function(a){var i;return((i=n.getAttributeValue(a,u))===null||i===void 0?void 0:i.substr(o).toLowerCase())===s&&e(a)}):function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.endsWith(s))&&e(a)}},any:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;if(s==="")return yl.falseFunc;if(Rs(t,r)){var o=new RegExp(u8(s),"i");return function(i){var c=n.getAttributeValue(i,u);return c!=null&&c.length>=s.length&&o.test(c)&&e(i)}}return function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.includes(s))&&e(a)}},not:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;return s===""?function(o){return!!n.getAttributeValue(o,u)&&e(o)}:Rs(t,r)?(s=s.toLowerCase(),function(o){var a=n.getAttributeValue(o,u);return(a==null||a.length!==s.length||a.toLowerCase()!==s)&&e(o)}):function(o){return n.getAttributeValue(o,u)!==s&&e(o)}}};var q3={},$_={},P_={},xf={};Object.defineProperty(xf,"__esModule",{value:!0});xf.parse=void 0;var GKe=new Set([9,10,12,13,32]),s8=48,VKe=57;function HKe(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];var t=0,r=0,n=s(),u=o();if(t=s8&&e.charCodeAt(t)<=VKe;)c=c*10+(e.charCodeAt(t)-s8),t++;return t===i?null:c}function a(){for(;t=r};var n=Math.abs(t),u=(r%n+n)%n;return t>1?function(s){return s>=r&&s%n===u}:function(s){return s<=r&&s%n===u}}Ca.compile=JKe;function zKe(e){var t=e[0],r=e[1]-1,n=0;if(t<0){var u=-t,s=(r%u+u)%u;return function(){var o=s+u*n++;return o>r?null:o}}return t===0?r<0?function(){return null}:function(){return n++===0?r:null}:(r<0&&(r+=t*Math.ceil(-r/t)),function(){return t*n+++r})}Ca.generate=zKe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequence=e.generate=e.compile=e.parse=void 0;var t=xf;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var r=Ca;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return r.compile}}),Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return r.generate}});function n(s){return(0,r.compile)((0,t.parse)(s))}e.default=n;function u(s){return(0,r.generate)((0,t.parse)(s))}e.sequence=u})(P_);(function(e){var t=we&&we.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.filters=void 0;var r=t(P_),n=mo;function u(o,a){return function(i){var c=a.getParent(i);return c!=null&&a.isTag(c)&&o(i)}}e.filters={contains:function(o,a,i){var c=i.adapter;return function(p){return o(p)&&c.getText(p).includes(a)}},icontains:function(o,a,i){var c=i.adapter,l=a.toLowerCase();return function(f){return o(f)&&c.getText(f).toLowerCase().includes(l)}},"nth-child":function(o,a,i){var c=i.adapter,l=i.equals,p=(0,r.default)(a);return p===n.falseFunc?n.falseFunc:p===n.trueFunc?u(o,c):function(d){for(var h=c.getSiblings(d),E=0,A=0;A=0&&!l(d,h[A]);A--)c.isTag(h[A])&&E++;return p(E)&&o(d)}},"nth-of-type":function(o,a,i){var c=i.adapter,l=i.equals,p=(0,r.default)(a);return p===n.falseFunc?n.falseFunc:p===n.trueFunc?u(o,c):function(d){for(var h=c.getSiblings(d),E=0,A=0;A=0;A--){var m=h[A];if(l(d,m))break;c.isTag(m)&&c.getName(m)===c.getName(d)&&E++}return p(E)&&o(d)}},root:function(o,a,i){var c=i.adapter;return function(l){var p=c.getParent(l);return(p==null||!c.isTag(p))&&o(l)}},scope:function(o,a,i,c){var l=i.equals;return!c||c.length===0?e.filters.root(o,a,i):c.length===1?function(p){return l(c[0],p)&&o(p)}:function(p){return c.includes(p)&&o(p)}},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")};function s(o){return function(i,c,l){var p=l.adapter,f=p[o];return typeof f!="function"?n.falseFunc:function(h){return f(h)&&i(h)}}}})($_);var ba={};Object.defineProperty(ba,"__esModule",{value:!0});ba.verifyPseudoArgs=ba.pseudos=void 0;ba.pseudos={empty:function(e,t){var r=t.adapter;return!r.getChildren(e).some(function(n){return r.isTag(n)||r.getText(n)!==""})},"first-child":function(e,t){var r=t.adapter,n=t.equals,u=r.getSiblings(e).find(function(s){return r.isTag(s)});return u!=null&&n(e,u)},"last-child":function(e,t){for(var r=t.adapter,n=t.equals,u=r.getSiblings(e),s=u.length-1;s>=0;s--){if(n(e,u[s]))return!0;if(r.isTag(u[s]))break}return!1},"first-of-type":function(e,t){for(var r=t.adapter,n=t.equals,u=r.getSiblings(e),s=r.getName(e),o=0;o=0;o--){var a=u[o];if(n(e,a))return!0;if(r.isTag(a)&&r.getName(a)===s)break}return!1},"only-of-type":function(e,t){var r=t.adapter,n=t.equals,u=r.getName(e);return r.getSiblings(e).every(function(s){return n(e,s)||!r.isTag(s)||r.getName(s)!==u})},"only-child":function(e,t){var r=t.adapter,n=t.equals;return r.getSiblings(e).every(function(u){return n(e,u)||!r.isTag(u)})}};function KKe(e,t,r){if(r===null){if(e.length>2)throw new Error("pseudo-selector :".concat(t," requires an argument"))}else if(e.length===2)throw new Error("pseudo-selector :".concat(t," doesn't have any arguments"))}ba.verifyPseudoArgs=KKe;var Rf={};Object.defineProperty(Rf,"__esModule",{value:!0});Rf.aliases=void 0;Rf.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( +*/(function(e){(function(t,r,n){e.exports=n(t),e.exports.default=e.exports})(Ce,"UUID",function(){var t=function(E,F,D,g,P,b){for(var w=function($,M){var L=$.toString(16);return L.length<2&&(L="0"+L),M&&(L=L.toUpperCase()),L},I=F;I<=D;I++)P[b++]=w(E[I],g);return P},r=function(E,F,D,g,P){for(var b=F;b<=D;b+=2)g[P++]=parseInt(E.substr(b,2),16)},n="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ.-:+=^!/*?&<>()[]{}@%$#".split(""),u=[0,68,0,84,83,82,72,0,75,76,70,65,0,63,62,69,0,1,2,3,4,5,6,7,8,9,64,0,73,66,74,71,81,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,77,0,78,67,0,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,79,0,80,0,0],s=function(E,F){for(var D="",g=0,P=0;g=1;){var w=Math.floor(P/b)%85;D+=n[w],b/=85}P=0}return D},o=function(E,F){var D=E.length;if(D%5!==0)throw new Error("z85_decode: invalid input length (multiple of 5 expected)");typeof F>"u"&&(F=new Array(D*4/5));for(var g=0,P=0,b=0;g=u.length)break;if(b=b*85+u[w],g%5===0){for(var I=16777216;I>=1;)F[P++]=Math.trunc(b/I%256),I/=256;b=0}}return F},a=function(E,F){var D={ibits:8,obits:8,obigendian:!0};for(var g in F)typeof D[g]<"u"&&(D[g]=F[g]);for(var P=[],b=0,w,I,$=0,M,L=0,Y=E.length;$===0&&(I=E.charCodeAt(b++)),w=I>>D.ibits-($+8)&255,$=($+8)%D.ibits,D.obigendian?L===0?M=w<=Y)););return P},i=function(E,F){var D={ibits:32,ibigendian:!0};for(var g in F)typeof D[g]<"u"&&(D[g]=F[g]);var P="",b=4294967295;D.ibits<32&&(b=(1<>D.ibits-8-M&255):P+=String.fromCharCode($>>M&255);return P},c=8,l=8,p=256,d=function(E,F,D,g,P,b,w,I){return[I,w,b,P,g,D,F,E]},f=function(){return d(0,0,0,0,0,0,0,0)},h=function(E){return E.slice(0)},y=function(E){for(var F=f(),D=0;D=0;D--)F*=p,F+=E[D];return Math.floor(F)},m=function(E,F){for(var D=0,g=0;g=0;b--)D[b+1]=D[b];for(D[0]=E[0],b=0;bc*l)throw new Error("ui64_ror: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g>>b|D[g+1]<>>b&(1<c*l)throw new Error("ui64_rol: invalid number of bits to shift");var D=new Array(c+c),g;for(g=0;g0;g--)D[g+P]=(D[g]<>>l-b)&(1<=0;g--)D[g]=0;for(g=0;g>16)+(F>>16)+(D>>16);return g<<16|D&65535},ee=function(E,F){return E<>>32-F&4294967295},K=function(E,F){function D(Pe,Be,le,Te){return Pe<20?Be&le|~Be&Te:Pe<40?Be^le^Te:Pe<60?Be&le|Be&Te|le&Te:Be^le^Te}function g(Pe){return Pe<20?1518500249:Pe<40?1859775393:Pe<60?-1894007588:-899497514}E[F>>5]|=128<<24-F%32,E[(F+64>>9<<4)+15]=F;for(var P=Array(80),b=1732584193,w=-271733879,I=-1732584194,$=271733878,M=-1009589776,L=0;L>5]|=128<>>9<<4)+14]=F;for(var I=1732584193,$=-271733879,M=-1732584194,L=271733878,Y=0;Y>>0):typeof window=="object"&&typeof window.crypto=="object"&&typeof window.crypto.getRandomValues=="function"?(F=new Uint32Array(2),window.crypto.getRandomValues(F),E=T(y(F[0]>>>0),R(y(F[1]>>>0),32))):typeof globalThis=="object"&&typeof globalThis.crypto=="object"&&typeof globalThis.crypto.getRandomValues=="function"?(F=new Uint32Array(2),globalThis.crypto.getRandomValues(F),E=T(y(F[0]>>>0),R(y(F[1]>>>0),32))):(E=y(Math.random()*4294967295>>>0),T(E,R(y(new Date().getTime()),32))),T(this.state,E),this.next()};he.prototype.next=function(){var E=h(this.state);C(this.state,this.mul),m(this.state,this.inc);var F=h(E);R(F,18),q(F,E),R(F,27);var D=h(E);R(D,59),B(F,this.mask);var g=A(D),P=h(F);return J(P,32-g),R(F,g),q(F,P),A(F)},he.prototype.reseed=function(E){if(typeof E!="string")throw new Error("UUID: PCG: seed: invalid argument (string expected)");for(var F=K(a(E,{ibits:8,obits:32,obigendian:!0}),E.length*8),D=0;D>>0))};var fe=new he;he.reseed=function(E){fe.reseed(E)};var ge=function(E,F){for(var D=[],g=0;g=1&&typeof arguments[0]=="number")this.make.apply(this,arguments);else{if(arguments.length>=1)throw new Error("UUID: constructor: invalid arguments");for(var E=0;E<16;E++)this[E]=0}};return typeof Uint8Array<"u"?O.prototype=new Uint8Array(16):Buffer?O.prototype=Buffer.alloc(16):O.prototype=new Array(16),O.prototype.constructor=O,O.prototype.make=function(E){var F,D=this;if(E===1){var g=new Date,P=g.getTime();P!==pe?z=0:z++,pe=P;var b=y(P);v(b,1e3*10),m(b,d(1,178,29,210,19,129,64,0)),z>0&&m(b,y(z));var w;w=N(b,8),D[3]=w&255,w=N(b,8),D[2]=w&255,w=N(b,8),D[1]=w&255,w=N(b,8),D[0]=w&255,w=N(b,8),D[5]=w&255,w=N(b,8),D[4]=w&255,w=N(b,8),D[7]=w&255,w=N(b,8),D[6]=w&15;var I=ge(2,255);D[8]=I[0],D[9]=I[1];var $=ge(6,255);for($[0]|=1,$[0]|=2,F=0;F<6;F++)D[10+F]=$[F]}else if(E===4){var M=ge(16,255);for(F=0;F<16;F++)this[F]=M[F]}else if(E===3||E===5){var L="",Y=typeof arguments[1]=="object"&&arguments[1]instanceof O?arguments[1]:new O().parse(arguments[1]);for(F=0;F<16;F++)L+=String.fromCharCode(Y[F]);L+=arguments[2];var be=E===3?de(L):ue(L);for(F=0;F<16;F++)D[F]=be.charCodeAt(F)}else throw new Error("UUID: make: invalid version");return D[6]&=15,D[6]|=E<<4,D[8]&=63,D[8]|=128,D},O.prototype.format=function(E){var F,D;return E==="z85"?F=s(this,16):E==="b16"?(D=Array(32),t(this,0,15,!0,D,0),F=D.join("")):(E===void 0||E==="std")&&(D=new Array(36),t(this,0,3,!1,D,0),D[8]="-",t(this,4,5,!1,D,9),D[13]="-",t(this,6,7,!1,D,14),D[18]="-",t(this,8,9,!1,D,19),D[23]="-",t(this,10,15,!1,D,24),F=D.join("")),F},O.prototype.toString=function(E){return this.format(E)},O.prototype.toJSON=function(){return this.format("std")},O.prototype.parse=function(E,F){if(typeof E!="string")throw new Error("UUID: parse: invalid argument (type string expected)");if(F==="z85")o(E,this);else if(F==="b16")r(E,0,35,this,0);else if(F===void 0||F==="std"){var D={nil:"00000000-0000-0000-0000-000000000000","ns:DNS":"6ba7b810-9dad-11d1-80b4-00c04fd430c8","ns:URL":"6ba7b811-9dad-11d1-80b4-00c04fd430c8","ns:OID":"6ba7b812-9dad-11d1-80b4-00c04fd430c8","ns:X500":"6ba7b814-9dad-11d1-80b4-00c04fd430c8"};if(D[E]!==void 0)E=D[E];else if(!E.match(/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/))throw new Error('UUID: parse: invalid string representation (expected "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx")');r(E,0,7,this,0),r(E,9,12,this,4),r(E,14,17,this,6),r(E,19,22,this,8),r(E,24,35,this,10)}return this},O.prototype.export=function(){for(var E=Array(16),F=0;F<16;F++)E[F]=this[F];return E},O.prototype.import=function(E){if(!(typeof E=="object"&&E instanceof Array))throw new Error("UUID: import: invalid argument (type Array expected)");if(E.length!==16)throw new Error("UUID: import: invalid argument (Array of length 16 expected)");for(var F=0;F<16;F++){if(typeof E[F]!="number")throw new Error("UUID: import: invalid array element #"+F+" (type Number expected)");if(!(isFinite(E[F])&&Math.floor(E[F])===E[F]))throw new Error("UUID: import: invalid array element #"+F+" (Number with integer value expected)");if(!(E[F]>=0&&E[F]<=255))throw new Error("UUID: import: invalid array element #"+F+" (Number with integer value in range 0...255 expected)");this[F]=E[F]}return this},O.prototype.compare=function(E){if(typeof E!="object")throw new Error("UUID: compare: invalid argument (type UUID expected)");if(!(E instanceof O))throw new Error("UUID: compare: invalid argument (type UUID expected)");for(var F=0;F<16;F++){if(this[F]E[F])return 1}return 0},O.prototype.equal=function(E){return this.compare(E)===0},O.prototype.fold=function(E){if(typeof E>"u")throw new Error("UUID: fold: invalid argument (number of fold operations expected)");if(E<1||E>4)throw new Error("UUID: fold: invalid argument (1-4 fold operations expected)");for(var F=16/Math.pow(2,E),D=new Array(F),g=0;g>(-2*A&6)));return C},p=function(h){h=String(h),/[^\0-\xFF]/.test(h)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var y=h.length%3,A="",m=-1,v,C,B,T,N=h.length-y;++m>18&63)+i.charAt(T>>12&63)+i.charAt(T>>6&63)+i.charAt(T&63);return y==2?(v=h.charCodeAt(m)<<8,C=h.charCodeAt(++m),T=v+C,A+=i.charAt(T>>10)+i.charAt(T>>4&63)+i.charAt(T<<2&63)+"="):y==1&&(T=h.charCodeAt(m),A+=i.charAt(T>>2)+i.charAt(T<<4&63)+"=="),A},d={encode:p,decode:l,version:"1.0.0"};if(n&&!n.nodeType)if(u)u.exports=d;else for(var f in d)d.hasOwnProperty(f)&&(n[f]=d[f]);else r.base64=d})(Ce)})(Tp,Tp.exports);var H3=Tp.exports;Object.defineProperty(kr,"__esModule",{value:!0});kr.validateParams=kr.removeAttribute=kr.getPathValue=kr.generateId=kr.findObject=kr.findNewGraft=void 0;var X2e=C_(V3),Y2e=C_(H3);function C_(e){return e&&e.__esModule?e:{default:e}}var Z2e=(e,t,r)=>{var n=new Set(e),u=Object.keys(t).filter(s=>!n.has(s));if(u.length>0)throw new Error("".concat(r,". Expected one of: [").concat([...n].join(", "),"], But got: [").concat(u.join(", "),"]"))};kr.validateParams=Z2e;var Q2e=(e,t)=>{var r,n,u;if(typeof e!="object"||e===null)return e;r=Array.isArray(e)?[]:{};for(u in e)u==t&&Object.keys(e[u]).length===0||(n=e[u],r[u]=removeAtts(n));return r};kr.removeAttribute=Q2e;var ehe=e=>{var{object:t,path:r}=e;return r.split("/").reduce((n,u)=>(n=n[u],n),t)};kr.getPathValue=ehe;var the=()=>Y2e.default.encode(new X2e.default(4)).substring(0,12);kr.generateId=the;var rhe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=arguments.length>2?arguments[2]:void 0,u=[],s=function o(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!a||typeof a!="object"||(a[r]===n&&u.push(a),Object.keys(a).forEach(function(i){o(a[i])}))};return s(t),u};kr.findObject=rhe;var nhe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=arguments.length>1?arguments[1]:void 0,n=[],u=function s(){var o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};!o||typeof o!="object"||(o.type==="graft"&&o.new&&(n.push(o),r(o)),o.blocks&&o.blocks.forEach(function(a){s(a)}),o.content&&o.content.forEach(function(a){s(a)}))};return u(t),n};kr.findNewGraft=nhe;Object.defineProperty(od,"__esModule",{value:!0});od.default=void 0;var E2=U3,Fl=Td(Sd),Cl=Td(_d),f8=Td(H2e),y2=Td(K2e),du=kr,uhe=["proskomma","docSetId","options"],she=["hs"],ohe=["perf"],ahe=["writePipeline","cloning","insertSequences"],ihe=["sequences"];function Td(e){return e&&e.__esModule?e:{default:e}}function D8(e,t,r,n,u,s,o){try{var a=e[s](o),i=a.value}catch(c){r(c);return}a.done?t(i):Promise.resolve(i).then(n,u)}function En(e){return function(){var t=this,r=arguments;return new Promise(function(n,u){var s=e.apply(t,r);function o(i){D8(s,n,u,o,a,"next",i)}function a(i){D8(s,n,u,o,a,"throw",i)}o(void 0)})}}function h8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Lt(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function dhe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var bl={WRITE_PERF:"writePerf",READ_PERF:"readPerf",LOAD_PERF:"loadPerf",UNDO_PERF:"undoPerf",REDO_PERF:"redoPerf"};class fhe{constructor(t){var{proskomma:r=null,docSetId:n,options:u={}}=t,s=Za(t,uhe);if((0,du.validateParams)(["proskomma","docSetId","options"],s,"Unexpected arg in constructor"),(0,du.validateParams)(["historySize","pipelines","transforms"],u,"Unexpected option in constructor"),!n)throw new Error("docSetId is required");this._observers=[];var o='{ docSet(id: "'.concat(n,'") { id } }'),{data:a}=(r==null?void 0:r.gqlQuerySync(o))||{};if(r&&!(a!=null&&a.docSet))throw new Error("Provided docSetId is not present in the Proskomma instance.");var{hs:i}=u,c=Za(u,she),l=i?i+1:11;this.options=Lt({historySize:l},c),this.proskomma=r,this.pipelineHandler=new E2.PipelineHandler({pipelines:Fl.default||u.pipelines?Lt(Lt(Lt({},Fl.default),u.pipelines),f8.default.pipelines):null,transforms:Cl.default||u.transforms?Lt(Lt(Lt({},Cl.default),u.transforms),f8.default.transforms):null,proskomma:r}),this.docSetId=n,this.saved={},this.history={},this.validator=new E2.Validator,this.backend=r?"proskomma":"standalone"}unobserve(t){this._observers=this._observers.filter(r=>r!==t)}observe(t){return this._observers.push(t),()=>this.unobserve(t)}notifyObservers(){for(var t=arguments.length,r=new Array(t),n=0;n{u(...r)})}instanciatePipelineHandler(t){var{pipelines:r,transforms:n}=t;new E2.PipelineHandler({pipelines:Fl.default||r?Lt(Lt({},Fl.default),r):null,transforms:Cl.default||n?Lt(Lt({},Cl.default),n):null})}getBookData(t){var r=this.history[t];return r==null?void 0:r.stack[r.cursor]}getDocument(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,n=this.getBookData(t),u=n==null?void 0:n.perfDocument;if(u)return r?(0,y2.default)(u):Lt({},u)}getDocuments(){return Object.keys(this.history).reduce((t,r)=>(t[r]=this.getDocument(r),t),{})}savePerf(t){this.saved[t]=this.getBookData(t)}canSavePerf(t){return this.saved[t]!==this.getBookData(t)}setBookHistory(t){var r,n;return(n=(r=this.history)[t])!==null&&n!==void 0||(r[t]={stack:[],cursor:0}),this.history[t]}getBookHistory(t){var r,n=(r=this.history[t])!==null&&r!==void 0?r:this.setBookHistory(t);return n}clearPerf(){this.history={}}addDocument(t){var r,{bookCode:n,perfDocument:u,clone:s=!0}=t,{stack:o,cursor:a}=this.getBookHistory(n);return(r=o[a])!==null&&r!==void 0||(o[a]={}),o[a].perfDocument=s?(0,y2.default)(u):u,u}setPipelineData(t,r){var n,{stack:u,cursor:s}=this.getBookHistory(t);(n=u[s])!==null&&n!==void 0||(u[s]={});var o=u[s].pipelineData;r&&(u[s].pipelineData=Lt(Lt({},o),r))}getPipelineData(t){var r=this.getBookData(t);return r==null?void 0:r.pipelineData}getPipelineHandler(){return this.pipelineHandler}runPipeline(t){var r=this;return En(function*(){var{bookCode:n,pipelineName:u,perfDocument:s}=t;if(!u)return{perf:s};var o=r.getPipelineData(n),[a]=r.pipelineHandler.pipelines[u],{inputs:i}=a,c=o?Object.keys(o).reduce((h,y)=>(y in i&&(h[y]=o[y]),h),{}):void 0,l=Lt({perf:s},c),p=yield r.pipelineHandler.runPipeline(u,l),{perf:d}=p,f=Za(p,ohe);return{perf:d,pipelineData:f}})()}loadPerf(t,r,n){var u=this;return En(function*(){var s,o=(s=n.cloning)!==null&&s!==void 0?s:!0,{writePipeline:a,readPipeline:i}=n,{perf:c,pipelineData:l}=yield u.runPipeline({bookCode:t,pipelineName:a,perfDocument:r}),p=u.validator.validate("constraint","perfDocument","0.3.0",c);if(!p.isValid)throw new Error("writePerf is schema invalid: ".concat(JSON.stringify(p.errors)));u.setPipelineData(t,l);var d=u.addDocument({bookCode:t,perfDocument:c,clone:o});if(p=u.validator.validate("constraint","perfDocument","0.3.0",d),!p.isValid)throw new Error("savedPerf is schema invalid: ".concat(JSON.stringify(p.errors)));var{perf:f,pipelineData:h}=yield u.runPipeline({bookCode:t,pipelineName:i,perfDocument:d});if(p=u.validator.validate("constraint","perfDocument","0.3.0",f),!p.isValid){var y=p.errors.map(A=>{var m=(0,du.getPathValue)({object:f,path:A.instancePath});return Lt(Lt({},A),{},{value:JSON.stringify(m,null,2)})});throw new Error("readPerf is schema invalid: ".concat(JSON.stringify(y)))}return u.setPipelineData(t,h),u.savePerf(t),u.notifyObservers({action:bl.LOAD_PERF,data:f}),f})()}sideloadPerf(t,r){var n=arguments,u=this;return En(function*(){var s=n.length>2&&n[2]!==void 0?n[2]:{};if((0,du.validateParams)(["writePipeline","readPipeline","cloning"],s,"Unexpected option in sideloadPerf"),u.backend==="proskomma")throw"Can't call sideloadPerf in proskomma mode";if(!t||!r)throw"sideloadPerf requires 2 arguments (bookCode, perfDocument)";var o=u.validator.validate("constraint","perfDocument","0.3.0",r);if(!o.isValid)throw`perfJSON is not valid. +`.concat(JSON.stringify(o,null,2));return yield u.loadPerf(t,r,s)})()}fetchPerf(t){var r=arguments,n=this;return En(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};if((0,du.validateParams)(["writePipeline","readPipeline","cloning"],u,"Unexpected option in fetchPerf"),n.backend==="standalone")throw"Can't call fetchPerf in standalone mode";if(!t)throw new Error("fetchPerf requires argument (bookCode)");if(t.length>3||!/^[A-Z0-9]{3}$/.test(t))throw new Error('Invalid bookCode: "'.concat(t,'". Only three characters (uppercase letters [A-Z] or numbers [0-9]) allowed.'));var s='{docSet(id: "'.concat(n.docSetId,'") { document(bookCode: "').concat(t,'") { perf } } }'),{data:o}=n.proskomma.gqlQuerySync(s),a=o.docSet.document.perf;if(!a)throw new Error('No document with bookCode="'.concat(t,'" found.'));var i=JSON.parse(a);return yield n.loadPerf(t,i,u)})()}readPerf(t){var r=arguments,n=this;return En(function*(){var u,s=r.length>1&&r[1]!==void 0?r[1]:{};(0,du.validateParams)(["readPipeline","cloning"],s,"Unexpected option in readPerf");var o=(u=s.cloning)!==null&&u!==void 0?u:!0;if(!n.history[t]&&n.backend==="proskomma")return n.fetchPerf(t,s);if(!n.history[t]&&n.backend==="standalone")throw'No document with bookCode="'.concat(t,'" found in memory. Use sideloadPerf() to load the document.');var a=n.getDocument(t,o),{readPipeline:i}=s,{perf:c,pipelineData:l}=yield n.runPipeline({bookCode:t,pipelineName:i,perfDocument:a});return n.setPipelineData(t,l),c})()}writePerf(t,r,n){var u=arguments,s=this;return En(function*(){var o=u.length>3&&u[3]!==void 0?u[3]:{};(0,du.validateParams)(["writePipeline","readPipeline","cloning","insertSequences"],o,"Unexpected option in writePerf");var{writePipeline:a,cloning:i,insertSequences:c}=o,l=Za(o,ahe),p=i??!0,d=s.getDocument(t,!1);if(!d)throw"document not found: ".concat(t);if(!d.sequences[r])throw"PERF sequence id not found: ".concat(t,", ").concat(r);var f=s.validator.validate("constraint","perfSequence","0.3.0",n);if(!f.isValid)throw"PERF sequence ".concat(r," for ").concat(t," is not valid: ").concat(JSON.stringify(f));var h={};c&&(0,du.findNewGraft)(n,N=>{var R=(0,du.generateId)();h[R]={type:N.subtype,blocks:[]},N.target=R,delete N.new});var{sequences:y}=d,A=Za(d,ihe),m=Lt(Lt({},y),{},{[r]:p?(0,y2.default)(n):n});A.sequences=m;var{perf:v,pipelineData:C}=yield s.runPipeline({bookCode:t,pipelineName:a,perfDocument:A});v.sequences=Lt(Lt(Lt({},y),h),{},{[r]:v.sequences[r]});var B=s.history[t];B.stack=B.stack.slice(B.cursor),B.stack.unshift({perfDocument:v}),B.cursor=0,s.setPipelineData(t,C),B.stack.length>s.options.historySize&&B.stack.pop();var T=yield s.readPerf(t,l);return s.notifyObservers({action:bl.WRITE_PERF,data:T}),T})()}undoPerf(t,r){var n=this;return En(function*(){if(n.canUndo(t)){var u=n.history[t];++u.cursor;var s=yield n.readPerf(t,r);return n.notifyObservers({action:bl.UNDO_PERF,data:s}),s}return null})()}redoPerf(t,r){var n=this;return En(function*(){if(n.canRedo(t)){var u=n.history[t];--u.cursor;var s=yield n.readPerf(t,r);return n.notifyObservers({action:bl.REDO_PERF,data:s}),s}return null})()}canUndo(t){var r=this.history[t];return!(!r||r.cursor+1===r.stack.length)}canRedo(t){var r=this.history[t];return!(!r||r.cursor===0)}checkPerfSequence(t){var r=0,n=0,u=t==null?void 0:t.blocks.reduce((s,o)=>{var{content:a}=o;if(Array.isArray(a))for(var i of a)i.type==="mark"&&i.subtype==="verses"&&(n++,n.toString()!==i.atts.number&&(s.push("Verse ".concat(i.atts.number," is out of order, expected ").concat(n)),n=Number(i.atts.number))),i.type==="mark"&&i.subtype==="chapter"&&(r++,r.toString()!==i.atts.number&&(s.push("Chapter ".concat(i.atts.number," is out of order, expected ").concat(r)),r=Number(i.atts.number)),n=0);return s},[]);return u}localBookCodes(){return Object.keys(this.history)}bookHeaders(){var t,r,n={},u='{ docSet(id: "'.concat(this.docSetId,'") { documents { headers { key value } } } }'),{data:s}=((t=this.proskomma)===null||t===void 0?void 0:t.gqlQuerySync(u))||{},o=(s==null||(r=s.docSet)===null||r===void 0?void 0:r.documents)||this.getDocuments();for(var a of o){var i=null,c={};for(var l of a.headers)l.key==="bookCode"?i=l.value:c[l.key]=l.value;i&&(n[i]=c)}return n}readUsfm(t,r){var n=this;return En(function*(){var u=yield n.readPerf(t,r);n.pipelineHandler===null&&n.instanciatePipelineHandler();var s=yield n.pipelineHandler.runPipeline("perfToUsfmPipeline",{perf:u});return s.usfm})()}makeDocumentReport(t,r,n){var u=this;return En(function*(){if(!u.localBookCodes().includes(t))throw new Error("bookCode '".concat(t,"' is not available locally"));return u.pipelineHandler===null&&u.instanciatePipelineHandler(),n.perf=u.getDocument(t),yield u.pipelineHandler.runPipeline(r,n)})()}makeDocumentsReport(t,r){var n=this;return En(function*(){var u=n.localBookCodes(),s={};for(var o of u){var a=yield n.makeDocumentReport(o,t,r);s[a.matches.bookCode]=a}return s})()}}var Dhe=fhe;od.default=Dhe;var $d={},Pd={};Object.defineProperty(Pd,"__esModule",{value:!0});Pd.default=void 0;var hhe={"*":{"*":{tagName:"span"},sequence:{tagName:"section"}},paragraph:{"*":{tagName:"p"}},mark:{"*":{tagName:"span"},chapter:e=>{var{atts:t}=e;return{classList:["mark","chapter","chapter-".concat(t.number)],id:"chapter-".concat(t.number)}}},graft:{heading:{tagName:"div"},title:{tagName:"div"},introduction:{tagName:"div"}}};Pd.default=hhe;var Or={};Object.defineProperty(Or,"__esModule",{value:!0});Or.mapHtml=Or.handleSubtypeNS=Or.handleNewGrafts=Or.handleAtts=Or.generateId=Or.createElement=void 0;var mhe=b_(V3),Ehe=b_(H3);function b_(e){return e&&e.__esModule?e:{default:e}}function m8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function E8(e){for(var t=1;tObject.keys(e).reduce((t,r)=>e[r]!==void 0&&e[r]!==null?t+=" ".concat(r,'="').concat(e[r],'"'):t,""),ghe=e=>Object.keys(e).reduce((t,r)=>e[r]?t+=" data-".concat(r,'="').concat(e[r],'"'):t,""),Ahe=e=>e&&Array.isArray(e)?' class="'.concat(e.join(" "),'"'):' class="'.concat(e,'"'),Fhe=e=>{var{classList:t,id:r,attributes:n,dataset:u}=e;return"".concat(Ahe(t)).concat(r&&' id="'.concat(r,'"')).concat(ghe(u)).concat(vhe(n))},Che=e=>{var{tagName:t="div",id:r="",classList:n="",dataset:u={},children:s="",attributes:o={}}=e;return"<".concat(t||"div").concat(Fhe({classList:n,id:r,attributes:o,dataset:u}),">").concat(s,"")};Or.createElement=Che;var bhe=e=>{var t,r,n,u,{props:s,htmlMap:o}=e,{type:a,subtype:i}=s,c=(f,h)=>[...f?[f]:[],...h?[h.replace(":"," ")]:[]];if(!o)return{classList:c(a,i)};var l=[(t=o[a])===null||t===void 0?void 0:t[i],(r=o["*"])===null||r===void 0?void 0:r[i],(n=o[a])===null||n===void 0?void 0:n["*"],(u=o["*"])===null||u===void 0?void 0:u["*"]],p=f=>f&&(Array.isArray(f)?f:[f]),d=l.reduce((f,h)=>{var y=h||{},{classList:A,tagName:m,id:v,attributes:C}=typeof y=="function"?y(s):y;return f.classList=f.classList.concat(p(A)||[]),f.attributes=E8(E8({},f.attributes),C),!f.tagName&&m&&(f.tagName=m),!f.id&&v&&(f.id=v),f},{classList:[],tagName:"",attributes:{}});return{classList:d.classList.length?[...new Set(d.classList)]:c(a,i),tagName:d.tagName,id:d.id,attributes:d.attributes}};Or.mapHtml=bhe;var She=e=>e?Object.keys(e).reduce((t,r)=>(t["atts-".concat(r)]=typeof e[r]=="object"?e[r].join(","):e[r],t),{}):{};Or.handleAtts=She;var whe=e=>{var t=e.split(":");return t.length>1?{"subtype-ns":t[0],subtype:t[1]}:{subtype:e}};Or.handleSubtypeNS=whe;var S_=()=>Ehe.default.encode(new mhe.default(4)).substring(0,12);Or.generateId=S_;var _he=e=>{var t={};return e.forEach(r=>{var n=S_();t[n]={type:r.subtype,blocks:r.content||[]},r.target=n,delete r.content,delete r.new}),t};Or.handleNewGrafts=_he;Object.defineProperty($d,"__esModule",{value:!0});$d.default=void 0;var Bhe=khe(Pd),yn=Or,The=["type","subtype","content","meta_content","atts"],$he=["type","subtype","atts","content"],Phe=["blocks"];function khe(e){return e&&e.__esModule?e:{default:e}}function y8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function Un(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function Ihe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}function Nhe(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bhe.default,n=c=>{var l;return(l=c==null?void 0:c.reduce((p,d)=>p+=typeof d=="string"?d:s(d),""))!==null&&l!==void 0?l:""},u=(c,l)=>c?(0,yn.createElement)({tagName:"span",classList:[l],children:c==null?void 0:c.reduce((p,d)=>typeof d=="string"?p+=d:p+=s(d),"")}):"",s=c=>{var{type:l,subtype:p,content:d,meta_content:f,atts:h}=c,y=v2(c,The),A=(0,yn.handleAtts)(h),m=(0,yn.handleSubtypeNS)(p),{classList:v,tagName:C,id:B,attributes:T}=(0,yn.mapHtml)({props:Un({type:l,subtype:p,atts:h},y),htmlMap:r}),N=R=>{var J={markHtml:()=>["chapter","verses"].includes(p)?h.number:"",wrapperHtml:()=>n(R)+u(f,"meta-content")},q=J["".concat(l,"Html")];return typeof q=="function"?q():""};return(0,yn.createElement)({tagName:C,id:B,classList:v,attributes:T,dataset:Un(Un(Un({type:l},m),A),y),children:N(d)})},o=c=>{var{type:l,subtype:p,atts:d,content:f}=c,h=v2(c,$he),y=(0,yn.handleAtts)(d),A=(0,yn.handleSubtypeNS)(p),{classList:m,tagName:v,id:C,attributes:B}=(0,yn.mapHtml)({props:Un({type:l,subtype:p,atts:d},h),htmlMap:r});return(0,yn.createElement)({tagName:v,id:C,classList:m,attributes:B,dataset:Un(Un(Un({type:l},A),y),h),children:n(f)})},a=(c,l)=>{var{blocks:p}=c,d=v2(c,Phe),{classList:f,tagName:h,attributes:y}=(0,yn.mapHtml)({props:Un(Un({},d),{},{subtype:"sequence"}),htmlMap:r});return(0,yn.createElement)({tagName:h,id:"".concat(l),classList:f,dataset:d,attributes:y,children:p==null?void 0:p.reduce((A,m)=>A+=o(m),"")})},i=e.sequences[t];return a(i,t)}var qhe=Nhe;$d.default=qhe;var kd={},pr={},Od={},xa={},$p={exports:{}};/*! https://mths.be/he v1.2.0 by @mathias | MIT license */$p.exports;(function(e,t){(function(r){var n=t,u=e&&e.exports==n&&e,s=typeof Ce=="object"&&Ce;(s.global===s||s.window===s)&&(r=s);var o=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,a=/[\x01-\x7F]/g,i=/[\x01-\t\x0B\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,c=/<\u20D2|=\u20E5|>\u20D2|\u205F\u200A|\u219D\u0338|\u2202\u0338|\u2220\u20D2|\u2229\uFE00|\u222A\uFE00|\u223C\u20D2|\u223D\u0331|\u223E\u0333|\u2242\u0338|\u224B\u0338|\u224D\u20D2|\u224E\u0338|\u224F\u0338|\u2250\u0338|\u2261\u20E5|\u2264\u20D2|\u2265\u20D2|\u2266\u0338|\u2267\u0338|\u2268\uFE00|\u2269\uFE00|\u226A\u0338|\u226A\u20D2|\u226B\u0338|\u226B\u20D2|\u227F\u0338|\u2282\u20D2|\u2283\u20D2|\u228A\uFE00|\u228B\uFE00|\u228F\u0338|\u2290\u0338|\u2293\uFE00|\u2294\uFE00|\u22B4\u20D2|\u22B5\u20D2|\u22D8\u0338|\u22D9\u0338|\u22DA\uFE00|\u22DB\uFE00|\u22F5\u0338|\u22F9\u0338|\u2933\u0338|\u29CF\u0338|\u29D0\u0338|\u2A6D\u0338|\u2A70\u0338|\u2A7D\u0338|\u2A7E\u0338|\u2AA1\u0338|\u2AA2\u0338|\u2AAC\uFE00|\u2AAD\uFE00|\u2AAF\u0338|\u2AB0\u0338|\u2AC5\u0338|\u2AC6\u0338|\u2ACB\uFE00|\u2ACC\uFE00|\u2AFD\u20E5|[\xA0-\u0113\u0116-\u0122\u0124-\u012B\u012E-\u014D\u0150-\u017E\u0192\u01B5\u01F5\u0237\u02C6\u02C7\u02D8-\u02DD\u0311\u0391-\u03A1\u03A3-\u03A9\u03B1-\u03C9\u03D1\u03D2\u03D5\u03D6\u03DC\u03DD\u03F0\u03F1\u03F5\u03F6\u0401-\u040C\u040E-\u044F\u0451-\u045C\u045E\u045F\u2002-\u2005\u2007-\u2010\u2013-\u2016\u2018-\u201A\u201C-\u201E\u2020-\u2022\u2025\u2026\u2030-\u2035\u2039\u203A\u203E\u2041\u2043\u2044\u204F\u2057\u205F-\u2063\u20AC\u20DB\u20DC\u2102\u2105\u210A-\u2113\u2115-\u211E\u2122\u2124\u2127-\u2129\u212C\u212D\u212F-\u2131\u2133-\u2138\u2145-\u2148\u2153-\u215E\u2190-\u219B\u219D-\u21A7\u21A9-\u21AE\u21B0-\u21B3\u21B5-\u21B7\u21BA-\u21DB\u21DD\u21E4\u21E5\u21F5\u21FD-\u2205\u2207-\u2209\u220B\u220C\u220F-\u2214\u2216-\u2218\u221A\u221D-\u2238\u223A-\u2257\u2259\u225A\u225C\u225F-\u2262\u2264-\u228B\u228D-\u229B\u229D-\u22A5\u22A7-\u22B0\u22B2-\u22BB\u22BD-\u22DB\u22DE-\u22E3\u22E6-\u22F7\u22F9-\u22FE\u2305\u2306\u2308-\u2310\u2312\u2313\u2315\u2316\u231C-\u231F\u2322\u2323\u232D\u232E\u2336\u233D\u233F\u237C\u23B0\u23B1\u23B4-\u23B6\u23DC-\u23DF\u23E2\u23E7\u2423\u24C8\u2500\u2502\u250C\u2510\u2514\u2518\u251C\u2524\u252C\u2534\u253C\u2550-\u256C\u2580\u2584\u2588\u2591-\u2593\u25A1\u25AA\u25AB\u25AD\u25AE\u25B1\u25B3-\u25B5\u25B8\u25B9\u25BD-\u25BF\u25C2\u25C3\u25CA\u25CB\u25EC\u25EF\u25F8-\u25FC\u2605\u2606\u260E\u2640\u2642\u2660\u2663\u2665\u2666\u266A\u266D-\u266F\u2713\u2717\u2720\u2736\u2758\u2772\u2773\u27C8\u27C9\u27E6-\u27ED\u27F5-\u27FA\u27FC\u27FF\u2902-\u2905\u290C-\u2913\u2916\u2919-\u2920\u2923-\u292A\u2933\u2935-\u2939\u293C\u293D\u2945\u2948-\u294B\u294E-\u2976\u2978\u2979\u297B-\u297F\u2985\u2986\u298B-\u2996\u299A\u299C\u299D\u29A4-\u29B7\u29B9\u29BB\u29BC\u29BE-\u29C5\u29C9\u29CD-\u29D0\u29DC-\u29DE\u29E3-\u29E5\u29EB\u29F4\u29F6\u2A00-\u2A02\u2A04\u2A06\u2A0C\u2A0D\u2A10-\u2A17\u2A22-\u2A27\u2A29\u2A2A\u2A2D-\u2A31\u2A33-\u2A3C\u2A3F\u2A40\u2A42-\u2A4D\u2A50\u2A53-\u2A58\u2A5A-\u2A5D\u2A5F\u2A66\u2A6A\u2A6D-\u2A75\u2A77-\u2A9A\u2A9D-\u2AA2\u2AA4-\u2AB0\u2AB3-\u2AC8\u2ACB\u2ACC\u2ACF-\u2ADB\u2AE4\u2AE6-\u2AE9\u2AEB-\u2AF3\u2AFD\uFB00-\uFB04]|\uD835[\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDCCF\uDD04\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDD6B]/g,l={"­":"shy","‌":"zwnj","‍":"zwj","‎":"lrm","⁣":"ic","⁢":"it","⁡":"af","‏":"rlm","​":"ZeroWidthSpace","⁠":"NoBreak","̑":"DownBreve","⃛":"tdot","⃜":"DotDot"," ":"Tab","\n":"NewLine"," ":"puncsp"," ":"MediumSpace"," ":"thinsp"," ":"hairsp"," ":"emsp13"," ":"ensp"," ":"emsp14"," ":"emsp"," ":"numsp"," ":"nbsp","  ":"ThickSpace","‾":"oline",_:"lowbar","‐":"dash","–":"ndash","—":"mdash","―":"horbar",",":"comma",";":"semi","⁏":"bsemi",":":"colon","⩴":"Colone","!":"excl","¡":"iexcl","?":"quest","¿":"iquest",".":"period","‥":"nldr","…":"mldr","·":"middot","'":"apos","‘":"lsquo","’":"rsquo","‚":"sbquo","‹":"lsaquo","›":"rsaquo",'"':"quot","“":"ldquo","”":"rdquo","„":"bdquo","«":"laquo","»":"raquo","(":"lpar",")":"rpar","[":"lsqb","]":"rsqb","{":"lcub","}":"rcub","⌈":"lceil","⌉":"rceil","⌊":"lfloor","⌋":"rfloor","⦅":"lopar","⦆":"ropar","⦋":"lbrke","⦌":"rbrke","⦍":"lbrkslu","⦎":"rbrksld","⦏":"lbrksld","⦐":"rbrkslu","⦑":"langd","⦒":"rangd","⦓":"lparlt","⦔":"rpargt","⦕":"gtlPar","⦖":"ltrPar","⟦":"lobrk","⟧":"robrk","⟨":"lang","⟩":"rang","⟪":"Lang","⟫":"Rang","⟬":"loang","⟭":"roang","❲":"lbbrk","❳":"rbbrk","‖":"Vert","§":"sect","¶":"para","@":"commat","*":"ast","/":"sol",undefined:null,"&":"amp","#":"num","%":"percnt","‰":"permil","‱":"pertenk","†":"dagger","‡":"Dagger","•":"bull","⁃":"hybull","′":"prime","″":"Prime","‴":"tprime","⁗":"qprime","‵":"bprime","⁁":"caret","`":"grave","´":"acute","˜":"tilde","^":"Hat","¯":"macr","˘":"breve","˙":"dot","¨":"die","˚":"ring","˝":"dblac","¸":"cedil","˛":"ogon","ˆ":"circ","ˇ":"caron","°":"deg","©":"copy","®":"reg","℗":"copysr","℘":"wp","℞":"rx","℧":"mho","℩":"iiota","←":"larr","↚":"nlarr","→":"rarr","↛":"nrarr","↑":"uarr","↓":"darr","↔":"harr","↮":"nharr","↕":"varr","↖":"nwarr","↗":"nearr","↘":"searr","↙":"swarr","↝":"rarrw","↝̸":"nrarrw","↞":"Larr","↟":"Uarr","↠":"Rarr","↡":"Darr","↢":"larrtl","↣":"rarrtl","↤":"mapstoleft","↥":"mapstoup","↦":"map","↧":"mapstodown","↩":"larrhk","↪":"rarrhk","↫":"larrlp","↬":"rarrlp","↭":"harrw","↰":"lsh","↱":"rsh","↲":"ldsh","↳":"rdsh","↵":"crarr","↶":"cularr","↷":"curarr","↺":"olarr","↻":"orarr","↼":"lharu","↽":"lhard","↾":"uharr","↿":"uharl","⇀":"rharu","⇁":"rhard","⇂":"dharr","⇃":"dharl","⇄":"rlarr","⇅":"udarr","⇆":"lrarr","⇇":"llarr","⇈":"uuarr","⇉":"rrarr","⇊":"ddarr","⇋":"lrhar","⇌":"rlhar","⇐":"lArr","⇍":"nlArr","⇑":"uArr","⇒":"rArr","⇏":"nrArr","⇓":"dArr","⇔":"iff","⇎":"nhArr","⇕":"vArr","⇖":"nwArr","⇗":"neArr","⇘":"seArr","⇙":"swArr","⇚":"lAarr","⇛":"rAarr","⇝":"zigrarr","⇤":"larrb","⇥":"rarrb","⇵":"duarr","⇽":"loarr","⇾":"roarr","⇿":"hoarr","∀":"forall","∁":"comp","∂":"part","∂̸":"npart","∃":"exist","∄":"nexist","∅":"empty","∇":"Del","∈":"in","∉":"notin","∋":"ni","∌":"notni","϶":"bepsi","∏":"prod","∐":"coprod","∑":"sum","+":"plus","±":"pm","÷":"div","×":"times","<":"lt","≮":"nlt","<⃒":"nvlt","=":"equals","≠":"ne","=⃥":"bne","⩵":"Equal",">":"gt","≯":"ngt",">⃒":"nvgt","¬":"not","|":"vert","¦":"brvbar","−":"minus","∓":"mp","∔":"plusdo","⁄":"frasl","∖":"setmn","∗":"lowast","∘":"compfn","√":"Sqrt","∝":"prop","∞":"infin","∟":"angrt","∠":"ang","∠⃒":"nang","∡":"angmsd","∢":"angsph","∣":"mid","∤":"nmid","∥":"par","∦":"npar","∧":"and","∨":"or","∩":"cap","∩︀":"caps","∪":"cup","∪︀":"cups","∫":"int","∬":"Int","∭":"tint","⨌":"qint","∮":"oint","∯":"Conint","∰":"Cconint","∱":"cwint","∲":"cwconint","∳":"awconint","∴":"there4","∵":"becaus","∶":"ratio","∷":"Colon","∸":"minusd","∺":"mDDot","∻":"homtht","∼":"sim","≁":"nsim","∼⃒":"nvsim","∽":"bsim","∽̱":"race","∾":"ac","∾̳":"acE","∿":"acd","≀":"wr","≂":"esim","≂̸":"nesim","≃":"sime","≄":"nsime","≅":"cong","≇":"ncong","≆":"simne","≈":"ap","≉":"nap","≊":"ape","≋":"apid","≋̸":"napid","≌":"bcong","≍":"CupCap","≭":"NotCupCap","≍⃒":"nvap","≎":"bump","≎̸":"nbump","≏":"bumpe","≏̸":"nbumpe","≐":"doteq","≐̸":"nedot","≑":"eDot","≒":"efDot","≓":"erDot","≔":"colone","≕":"ecolon","≖":"ecir","≗":"cire","≙":"wedgeq","≚":"veeeq","≜":"trie","≟":"equest","≡":"equiv","≢":"nequiv","≡⃥":"bnequiv","≤":"le","≰":"nle","≤⃒":"nvle","≥":"ge","≱":"nge","≥⃒":"nvge","≦":"lE","≦̸":"nlE","≧":"gE","≧̸":"ngE","≨︀":"lvnE","≨":"lnE","≩":"gnE","≩︀":"gvnE","≪":"ll","≪̸":"nLtv","≪⃒":"nLt","≫":"gg","≫̸":"nGtv","≫⃒":"nGt","≬":"twixt","≲":"lsim","≴":"nlsim","≳":"gsim","≵":"ngsim","≶":"lg","≸":"ntlg","≷":"gl","≹":"ntgl","≺":"pr","⊀":"npr","≻":"sc","⊁":"nsc","≼":"prcue","⋠":"nprcue","≽":"sccue","⋡":"nsccue","≾":"prsim","≿":"scsim","≿̸":"NotSucceedsTilde","⊂":"sub","⊄":"nsub","⊂⃒":"vnsub","⊃":"sup","⊅":"nsup","⊃⃒":"vnsup","⊆":"sube","⊈":"nsube","⊇":"supe","⊉":"nsupe","⊊︀":"vsubne","⊊":"subne","⊋︀":"vsupne","⊋":"supne","⊍":"cupdot","⊎":"uplus","⊏":"sqsub","⊏̸":"NotSquareSubset","⊐":"sqsup","⊐̸":"NotSquareSuperset","⊑":"sqsube","⋢":"nsqsube","⊒":"sqsupe","⋣":"nsqsupe","⊓":"sqcap","⊓︀":"sqcaps","⊔":"sqcup","⊔︀":"sqcups","⊕":"oplus","⊖":"ominus","⊗":"otimes","⊘":"osol","⊙":"odot","⊚":"ocir","⊛":"oast","⊝":"odash","⊞":"plusb","⊟":"minusb","⊠":"timesb","⊡":"sdotb","⊢":"vdash","⊬":"nvdash","⊣":"dashv","⊤":"top","⊥":"bot","⊧":"models","⊨":"vDash","⊭":"nvDash","⊩":"Vdash","⊮":"nVdash","⊪":"Vvdash","⊫":"VDash","⊯":"nVDash","⊰":"prurel","⊲":"vltri","⋪":"nltri","⊳":"vrtri","⋫":"nrtri","⊴":"ltrie","⋬":"nltrie","⊴⃒":"nvltrie","⊵":"rtrie","⋭":"nrtrie","⊵⃒":"nvrtrie","⊶":"origof","⊷":"imof","⊸":"mumap","⊹":"hercon","⊺":"intcal","⊻":"veebar","⊽":"barvee","⊾":"angrtvb","⊿":"lrtri","⋀":"Wedge","⋁":"Vee","⋂":"xcap","⋃":"xcup","⋄":"diam","⋅":"sdot","⋆":"Star","⋇":"divonx","⋈":"bowtie","⋉":"ltimes","⋊":"rtimes","⋋":"lthree","⋌":"rthree","⋍":"bsime","⋎":"cuvee","⋏":"cuwed","⋐":"Sub","⋑":"Sup","⋒":"Cap","⋓":"Cup","⋔":"fork","⋕":"epar","⋖":"ltdot","⋗":"gtdot","⋘":"Ll","⋘̸":"nLl","⋙":"Gg","⋙̸":"nGg","⋚︀":"lesg","⋚":"leg","⋛":"gel","⋛︀":"gesl","⋞":"cuepr","⋟":"cuesc","⋦":"lnsim","⋧":"gnsim","⋨":"prnsim","⋩":"scnsim","⋮":"vellip","⋯":"ctdot","⋰":"utdot","⋱":"dtdot","⋲":"disin","⋳":"isinsv","⋴":"isins","⋵":"isindot","⋵̸":"notindot","⋶":"notinvc","⋷":"notinvb","⋹":"isinE","⋹̸":"notinE","⋺":"nisd","⋻":"xnis","⋼":"nis","⋽":"notnivc","⋾":"notnivb","⌅":"barwed","⌆":"Barwed","⌌":"drcrop","⌍":"dlcrop","⌎":"urcrop","⌏":"ulcrop","⌐":"bnot","⌒":"profline","⌓":"profsurf","⌕":"telrec","⌖":"target","⌜":"ulcorn","⌝":"urcorn","⌞":"dlcorn","⌟":"drcorn","⌢":"frown","⌣":"smile","⌭":"cylcty","⌮":"profalar","⌶":"topbot","⌽":"ovbar","⌿":"solbar","⍼":"angzarr","⎰":"lmoust","⎱":"rmoust","⎴":"tbrk","⎵":"bbrk","⎶":"bbrktbrk","⏜":"OverParenthesis","⏝":"UnderParenthesis","⏞":"OverBrace","⏟":"UnderBrace","⏢":"trpezium","⏧":"elinters","␣":"blank","─":"boxh","│":"boxv","┌":"boxdr","┐":"boxdl","└":"boxur","┘":"boxul","├":"boxvr","┤":"boxvl","┬":"boxhd","┴":"boxhu","┼":"boxvh","═":"boxH","║":"boxV","╒":"boxdR","╓":"boxDr","╔":"boxDR","╕":"boxdL","╖":"boxDl","╗":"boxDL","╘":"boxuR","╙":"boxUr","╚":"boxUR","╛":"boxuL","╜":"boxUl","╝":"boxUL","╞":"boxvR","╟":"boxVr","╠":"boxVR","╡":"boxvL","╢":"boxVl","╣":"boxVL","╤":"boxHd","╥":"boxhD","╦":"boxHD","╧":"boxHu","╨":"boxhU","╩":"boxHU","╪":"boxvH","╫":"boxVh","╬":"boxVH","▀":"uhblk","▄":"lhblk","█":"block","░":"blk14","▒":"blk12","▓":"blk34","□":"squ","▪":"squf","▫":"EmptyVerySmallSquare","▭":"rect","▮":"marker","▱":"fltns","△":"xutri","▴":"utrif","▵":"utri","▸":"rtrif","▹":"rtri","▽":"xdtri","▾":"dtrif","▿":"dtri","◂":"ltrif","◃":"ltri","◊":"loz","○":"cir","◬":"tridot","◯":"xcirc","◸":"ultri","◹":"urtri","◺":"lltri","◻":"EmptySmallSquare","◼":"FilledSmallSquare","★":"starf","☆":"star","☎":"phone","♀":"female","♂":"male","♠":"spades","♣":"clubs","♥":"hearts","♦":"diams","♪":"sung","✓":"check","✗":"cross","✠":"malt","✶":"sext","❘":"VerticalSeparator","⟈":"bsolhsub","⟉":"suphsol","⟵":"xlarr","⟶":"xrarr","⟷":"xharr","⟸":"xlArr","⟹":"xrArr","⟺":"xhArr","⟼":"xmap","⟿":"dzigrarr","⤂":"nvlArr","⤃":"nvrArr","⤄":"nvHarr","⤅":"Map","⤌":"lbarr","⤍":"rbarr","⤎":"lBarr","⤏":"rBarr","⤐":"RBarr","⤑":"DDotrahd","⤒":"UpArrowBar","⤓":"DownArrowBar","⤖":"Rarrtl","⤙":"latail","⤚":"ratail","⤛":"lAtail","⤜":"rAtail","⤝":"larrfs","⤞":"rarrfs","⤟":"larrbfs","⤠":"rarrbfs","⤣":"nwarhk","⤤":"nearhk","⤥":"searhk","⤦":"swarhk","⤧":"nwnear","⤨":"toea","⤩":"tosa","⤪":"swnwar","⤳":"rarrc","⤳̸":"nrarrc","⤵":"cudarrr","⤶":"ldca","⤷":"rdca","⤸":"cudarrl","⤹":"larrpl","⤼":"curarrm","⤽":"cularrp","⥅":"rarrpl","⥈":"harrcir","⥉":"Uarrocir","⥊":"lurdshar","⥋":"ldrushar","⥎":"LeftRightVector","⥏":"RightUpDownVector","⥐":"DownLeftRightVector","⥑":"LeftUpDownVector","⥒":"LeftVectorBar","⥓":"RightVectorBar","⥔":"RightUpVectorBar","⥕":"RightDownVectorBar","⥖":"DownLeftVectorBar","⥗":"DownRightVectorBar","⥘":"LeftUpVectorBar","⥙":"LeftDownVectorBar","⥚":"LeftTeeVector","⥛":"RightTeeVector","⥜":"RightUpTeeVector","⥝":"RightDownTeeVector","⥞":"DownLeftTeeVector","⥟":"DownRightTeeVector","⥠":"LeftUpTeeVector","⥡":"LeftDownTeeVector","⥢":"lHar","⥣":"uHar","⥤":"rHar","⥥":"dHar","⥦":"luruhar","⥧":"ldrdhar","⥨":"ruluhar","⥩":"rdldhar","⥪":"lharul","⥫":"llhard","⥬":"rharul","⥭":"lrhard","⥮":"udhar","⥯":"duhar","⥰":"RoundImplies","⥱":"erarr","⥲":"simrarr","⥳":"larrsim","⥴":"rarrsim","⥵":"rarrap","⥶":"ltlarr","⥸":"gtrarr","⥹":"subrarr","⥻":"suplarr","⥼":"lfisht","⥽":"rfisht","⥾":"ufisht","⥿":"dfisht","⦚":"vzigzag","⦜":"vangrt","⦝":"angrtvbd","⦤":"ange","⦥":"range","⦦":"dwangle","⦧":"uwangle","⦨":"angmsdaa","⦩":"angmsdab","⦪":"angmsdac","⦫":"angmsdad","⦬":"angmsdae","⦭":"angmsdaf","⦮":"angmsdag","⦯":"angmsdah","⦰":"bemptyv","⦱":"demptyv","⦲":"cemptyv","⦳":"raemptyv","⦴":"laemptyv","⦵":"ohbar","⦶":"omid","⦷":"opar","⦹":"operp","⦻":"olcross","⦼":"odsold","⦾":"olcir","⦿":"ofcir","⧀":"olt","⧁":"ogt","⧂":"cirscir","⧃":"cirE","⧄":"solb","⧅":"bsolb","⧉":"boxbox","⧍":"trisb","⧎":"rtriltri","⧏":"LeftTriangleBar","⧏̸":"NotLeftTriangleBar","⧐":"RightTriangleBar","⧐̸":"NotRightTriangleBar","⧜":"iinfin","⧝":"infintie","⧞":"nvinfin","⧣":"eparsl","⧤":"smeparsl","⧥":"eqvparsl","⧫":"lozf","⧴":"RuleDelayed","⧶":"dsol","⨀":"xodot","⨁":"xoplus","⨂":"xotime","⨄":"xuplus","⨆":"xsqcup","⨍":"fpartint","⨐":"cirfnint","⨑":"awint","⨒":"rppolint","⨓":"scpolint","⨔":"npolint","⨕":"pointint","⨖":"quatint","⨗":"intlarhk","⨢":"pluscir","⨣":"plusacir","⨤":"simplus","⨥":"plusdu","⨦":"plussim","⨧":"plustwo","⨩":"mcomma","⨪":"minusdu","⨭":"loplus","⨮":"roplus","⨯":"Cross","⨰":"timesd","⨱":"timesbar","⨳":"smashp","⨴":"lotimes","⨵":"rotimes","⨶":"otimesas","⨷":"Otimes","⨸":"odiv","⨹":"triplus","⨺":"triminus","⨻":"tritime","⨼":"iprod","⨿":"amalg","⩀":"capdot","⩂":"ncup","⩃":"ncap","⩄":"capand","⩅":"cupor","⩆":"cupcap","⩇":"capcup","⩈":"cupbrcap","⩉":"capbrcup","⩊":"cupcup","⩋":"capcap","⩌":"ccups","⩍":"ccaps","⩐":"ccupssm","⩓":"And","⩔":"Or","⩕":"andand","⩖":"oror","⩗":"orslope","⩘":"andslope","⩚":"andv","⩛":"orv","⩜":"andd","⩝":"ord","⩟":"wedbar","⩦":"sdote","⩪":"simdot","⩭":"congdot","⩭̸":"ncongdot","⩮":"easter","⩯":"apacir","⩰":"apE","⩰̸":"napE","⩱":"eplus","⩲":"pluse","⩳":"Esim","⩷":"eDDot","⩸":"equivDD","⩹":"ltcir","⩺":"gtcir","⩻":"ltquest","⩼":"gtquest","⩽":"les","⩽̸":"nles","⩾":"ges","⩾̸":"nges","⩿":"lesdot","⪀":"gesdot","⪁":"lesdoto","⪂":"gesdoto","⪃":"lesdotor","⪄":"gesdotol","⪅":"lap","⪆":"gap","⪇":"lne","⪈":"gne","⪉":"lnap","⪊":"gnap","⪋":"lEg","⪌":"gEl","⪍":"lsime","⪎":"gsime","⪏":"lsimg","⪐":"gsiml","⪑":"lgE","⪒":"glE","⪓":"lesges","⪔":"gesles","⪕":"els","⪖":"egs","⪗":"elsdot","⪘":"egsdot","⪙":"el","⪚":"eg","⪝":"siml","⪞":"simg","⪟":"simlE","⪠":"simgE","⪡":"LessLess","⪡̸":"NotNestedLessLess","⪢":"GreaterGreater","⪢̸":"NotNestedGreaterGreater","⪤":"glj","⪥":"gla","⪦":"ltcc","⪧":"gtcc","⪨":"lescc","⪩":"gescc","⪪":"smt","⪫":"lat","⪬":"smte","⪬︀":"smtes","⪭":"late","⪭︀":"lates","⪮":"bumpE","⪯":"pre","⪯̸":"npre","⪰":"sce","⪰̸":"nsce","⪳":"prE","⪴":"scE","⪵":"prnE","⪶":"scnE","⪷":"prap","⪸":"scap","⪹":"prnap","⪺":"scnap","⪻":"Pr","⪼":"Sc","⪽":"subdot","⪾":"supdot","⪿":"subplus","⫀":"supplus","⫁":"submult","⫂":"supmult","⫃":"subedot","⫄":"supedot","⫅":"subE","⫅̸":"nsubE","⫆":"supE","⫆̸":"nsupE","⫇":"subsim","⫈":"supsim","⫋︀":"vsubnE","⫋":"subnE","⫌︀":"vsupnE","⫌":"supnE","⫏":"csub","⫐":"csup","⫑":"csube","⫒":"csupe","⫓":"subsup","⫔":"supsub","⫕":"subsub","⫖":"supsup","⫗":"suphsub","⫘":"supdsub","⫙":"forkv","⫚":"topfork","⫛":"mlcp","⫤":"Dashv","⫦":"Vdashl","⫧":"Barv","⫨":"vBar","⫩":"vBarv","⫫":"Vbar","⫬":"Not","⫭":"bNot","⫮":"rnmid","⫯":"cirmid","⫰":"midcir","⫱":"topcir","⫲":"nhpar","⫳":"parsim","⫽":"parsl","⫽⃥":"nparsl","♭":"flat","♮":"natur","♯":"sharp","¤":"curren","¢":"cent",$:"dollar","£":"pound","¥":"yen","€":"euro","¹":"sup1","½":"half","⅓":"frac13","¼":"frac14","⅕":"frac15","⅙":"frac16","⅛":"frac18","²":"sup2","⅔":"frac23","⅖":"frac25","³":"sup3","¾":"frac34","⅗":"frac35","⅜":"frac38","⅘":"frac45","⅚":"frac56","⅝":"frac58","⅞":"frac78","𝒶":"ascr","𝕒":"aopf","𝔞":"afr","𝔸":"Aopf","𝔄":"Afr","𝒜":"Ascr",ª:"ordf",á:"aacute",Á:"Aacute",à:"agrave",À:"Agrave",ă:"abreve",Ă:"Abreve",â:"acirc",Â:"Acirc",å:"aring",Å:"angst",ä:"auml",Ä:"Auml",ã:"atilde",Ã:"Atilde",ą:"aogon",Ą:"Aogon",ā:"amacr",Ā:"Amacr",æ:"aelig",Æ:"AElig","𝒷":"bscr","𝕓":"bopf","𝔟":"bfr","𝔹":"Bopf",ℬ:"Bscr","𝔅":"Bfr","𝔠":"cfr","𝒸":"cscr","𝕔":"copf",ℭ:"Cfr","𝒞":"Cscr",ℂ:"Copf",ć:"cacute",Ć:"Cacute",ĉ:"ccirc",Ĉ:"Ccirc",č:"ccaron",Č:"Ccaron",ċ:"cdot",Ċ:"Cdot",ç:"ccedil",Ç:"Ccedil","℅":"incare","𝔡":"dfr","ⅆ":"dd","𝕕":"dopf","𝒹":"dscr","𝒟":"Dscr","𝔇":"Dfr","ⅅ":"DD","𝔻":"Dopf",ď:"dcaron",Ď:"Dcaron",đ:"dstrok",Đ:"Dstrok",ð:"eth",Ð:"ETH","ⅇ":"ee",ℯ:"escr","𝔢":"efr","𝕖":"eopf",ℰ:"Escr","𝔈":"Efr","𝔼":"Eopf",é:"eacute",É:"Eacute",è:"egrave",È:"Egrave",ê:"ecirc",Ê:"Ecirc",ě:"ecaron",Ě:"Ecaron",ë:"euml",Ë:"Euml",ė:"edot",Ė:"Edot",ę:"eogon",Ę:"Eogon",ē:"emacr",Ē:"Emacr","𝔣":"ffr","𝕗":"fopf","𝒻":"fscr","𝔉":"Ffr","𝔽":"Fopf",ℱ:"Fscr",ff:"fflig",ffi:"ffilig",ffl:"ffllig",fi:"filig",fj:"fjlig",fl:"fllig",ƒ:"fnof",ℊ:"gscr","𝕘":"gopf","𝔤":"gfr","𝒢":"Gscr","𝔾":"Gopf","𝔊":"Gfr",ǵ:"gacute",ğ:"gbreve",Ğ:"Gbreve",ĝ:"gcirc",Ĝ:"Gcirc",ġ:"gdot",Ġ:"Gdot",Ģ:"Gcedil","𝔥":"hfr",ℎ:"planckh","𝒽":"hscr","𝕙":"hopf",ℋ:"Hscr",ℌ:"Hfr",ℍ:"Hopf",ĥ:"hcirc",Ĥ:"Hcirc",ℏ:"hbar",ħ:"hstrok",Ħ:"Hstrok","𝕚":"iopf","𝔦":"ifr","𝒾":"iscr","ⅈ":"ii","𝕀":"Iopf",ℐ:"Iscr",ℑ:"Im",í:"iacute",Í:"Iacute",ì:"igrave",Ì:"Igrave",î:"icirc",Î:"Icirc",ï:"iuml",Ï:"Iuml",ĩ:"itilde",Ĩ:"Itilde",İ:"Idot",į:"iogon",Į:"Iogon",ī:"imacr",Ī:"Imacr",ij:"ijlig",IJ:"IJlig",ı:"imath","𝒿":"jscr","𝕛":"jopf","𝔧":"jfr","𝒥":"Jscr","𝔍":"Jfr","𝕁":"Jopf",ĵ:"jcirc",Ĵ:"Jcirc","ȷ":"jmath","𝕜":"kopf","𝓀":"kscr","𝔨":"kfr","𝒦":"Kscr","𝕂":"Kopf","𝔎":"Kfr",ķ:"kcedil",Ķ:"Kcedil","𝔩":"lfr","𝓁":"lscr",ℓ:"ell","𝕝":"lopf",ℒ:"Lscr","𝔏":"Lfr","𝕃":"Lopf",ĺ:"lacute",Ĺ:"Lacute",ľ:"lcaron",Ľ:"Lcaron",ļ:"lcedil",Ļ:"Lcedil",ł:"lstrok",Ł:"Lstrok",ŀ:"lmidot",Ŀ:"Lmidot","𝔪":"mfr","𝕞":"mopf","𝓂":"mscr","𝔐":"Mfr","𝕄":"Mopf",ℳ:"Mscr","𝔫":"nfr","𝕟":"nopf","𝓃":"nscr",ℕ:"Nopf","𝒩":"Nscr","𝔑":"Nfr",ń:"nacute",Ń:"Nacute",ň:"ncaron",Ň:"Ncaron",ñ:"ntilde",Ñ:"Ntilde",ņ:"ncedil",Ņ:"Ncedil","№":"numero",ŋ:"eng",Ŋ:"ENG","𝕠":"oopf","𝔬":"ofr",ℴ:"oscr","𝒪":"Oscr","𝔒":"Ofr","𝕆":"Oopf",º:"ordm",ó:"oacute",Ó:"Oacute",ò:"ograve",Ò:"Ograve",ô:"ocirc",Ô:"Ocirc",ö:"ouml",Ö:"Ouml",ő:"odblac",Ő:"Odblac",õ:"otilde",Õ:"Otilde",ø:"oslash",Ø:"Oslash",ō:"omacr",Ō:"Omacr",œ:"oelig",Œ:"OElig","𝔭":"pfr","𝓅":"pscr","𝕡":"popf",ℙ:"Popf","𝔓":"Pfr","𝒫":"Pscr","𝕢":"qopf","𝔮":"qfr","𝓆":"qscr","𝒬":"Qscr","𝔔":"Qfr",ℚ:"Qopf",ĸ:"kgreen","𝔯":"rfr","𝕣":"ropf","𝓇":"rscr",ℛ:"Rscr",ℜ:"Re",ℝ:"Ropf",ŕ:"racute",Ŕ:"Racute",ř:"rcaron",Ř:"Rcaron",ŗ:"rcedil",Ŗ:"Rcedil","𝕤":"sopf","𝓈":"sscr","𝔰":"sfr","𝕊":"Sopf","𝔖":"Sfr","𝒮":"Sscr","Ⓢ":"oS",ś:"sacute",Ś:"Sacute",ŝ:"scirc",Ŝ:"Scirc",š:"scaron",Š:"Scaron",ş:"scedil",Ş:"Scedil",ß:"szlig","𝔱":"tfr","𝓉":"tscr","𝕥":"topf","𝒯":"Tscr","𝔗":"Tfr","𝕋":"Topf",ť:"tcaron",Ť:"Tcaron",ţ:"tcedil",Ţ:"Tcedil","™":"trade",ŧ:"tstrok",Ŧ:"Tstrok","𝓊":"uscr","𝕦":"uopf","𝔲":"ufr","𝕌":"Uopf","𝔘":"Ufr","𝒰":"Uscr",ú:"uacute",Ú:"Uacute",ù:"ugrave",Ù:"Ugrave",ŭ:"ubreve",Ŭ:"Ubreve",û:"ucirc",Û:"Ucirc",ů:"uring",Ů:"Uring",ü:"uuml",Ü:"Uuml",ű:"udblac",Ű:"Udblac",ũ:"utilde",Ũ:"Utilde",ų:"uogon",Ų:"Uogon",ū:"umacr",Ū:"Umacr","𝔳":"vfr","𝕧":"vopf","𝓋":"vscr","𝔙":"Vfr","𝕍":"Vopf","𝒱":"Vscr","𝕨":"wopf","𝓌":"wscr","𝔴":"wfr","𝒲":"Wscr","𝕎":"Wopf","𝔚":"Wfr",ŵ:"wcirc",Ŵ:"Wcirc","𝔵":"xfr","𝓍":"xscr","𝕩":"xopf","𝕏":"Xopf","𝔛":"Xfr","𝒳":"Xscr","𝔶":"yfr","𝓎":"yscr","𝕪":"yopf","𝒴":"Yscr","𝔜":"Yfr","𝕐":"Yopf",ý:"yacute",Ý:"Yacute",ŷ:"ycirc",Ŷ:"Ycirc",ÿ:"yuml",Ÿ:"Yuml","𝓏":"zscr","𝔷":"zfr","𝕫":"zopf",ℨ:"Zfr",ℤ:"Zopf","𝒵":"Zscr",ź:"zacute",Ź:"Zacute",ž:"zcaron",Ž:"Zcaron",ż:"zdot",Ż:"Zdot",Ƶ:"imped",þ:"thorn",Þ:"THORN",ʼn:"napos",α:"alpha",Α:"Alpha",β:"beta",Β:"Beta",γ:"gamma",Γ:"Gamma",δ:"delta",Δ:"Delta",ε:"epsi","ϵ":"epsiv",Ε:"Epsilon",ϝ:"gammad",Ϝ:"Gammad",ζ:"zeta",Ζ:"Zeta",η:"eta",Η:"Eta",θ:"theta",ϑ:"thetav",Θ:"Theta",ι:"iota",Ι:"Iota",κ:"kappa",ϰ:"kappav",Κ:"Kappa",λ:"lambda",Λ:"Lambda",μ:"mu",µ:"micro",Μ:"Mu",ν:"nu",Ν:"Nu",ξ:"xi",Ξ:"Xi",ο:"omicron",Ο:"Omicron",π:"pi",ϖ:"piv",Π:"Pi",ρ:"rho",ϱ:"rhov",Ρ:"Rho",σ:"sigma",Σ:"Sigma",ς:"sigmaf",τ:"tau",Τ:"Tau",υ:"upsi",Υ:"Upsilon",ϒ:"Upsi",φ:"phi",ϕ:"phiv",Φ:"Phi",χ:"chi",Χ:"Chi",ψ:"psi",Ψ:"Psi",ω:"omega",Ω:"ohm",а:"acy",А:"Acy",б:"bcy",Б:"Bcy",в:"vcy",В:"Vcy",г:"gcy",Г:"Gcy",ѓ:"gjcy",Ѓ:"GJcy",д:"dcy",Д:"Dcy",ђ:"djcy",Ђ:"DJcy",е:"iecy",Е:"IEcy",ё:"iocy",Ё:"IOcy",є:"jukcy",Є:"Jukcy",ж:"zhcy",Ж:"ZHcy",з:"zcy",З:"Zcy",ѕ:"dscy",Ѕ:"DScy",и:"icy",И:"Icy",і:"iukcy",І:"Iukcy",ї:"yicy",Ї:"YIcy",й:"jcy",Й:"Jcy",ј:"jsercy",Ј:"Jsercy",к:"kcy",К:"Kcy",ќ:"kjcy",Ќ:"KJcy",л:"lcy",Л:"Lcy",љ:"ljcy",Љ:"LJcy",м:"mcy",М:"Mcy",н:"ncy",Н:"Ncy",њ:"njcy",Њ:"NJcy",о:"ocy",О:"Ocy",п:"pcy",П:"Pcy",р:"rcy",Р:"Rcy",с:"scy",С:"Scy",т:"tcy",Т:"Tcy",ћ:"tshcy",Ћ:"TSHcy",у:"ucy",У:"Ucy",ў:"ubrcy",Ў:"Ubrcy",ф:"fcy",Ф:"Fcy",х:"khcy",Х:"KHcy",ц:"tscy",Ц:"TScy",ч:"chcy",Ч:"CHcy",џ:"dzcy",Џ:"DZcy",ш:"shcy",Ш:"SHcy",щ:"shchcy",Щ:"SHCHcy",ъ:"hardcy",Ъ:"HARDcy",ы:"ycy",Ы:"Ycy",ь:"softcy",Ь:"SOFTcy",э:"ecy",Э:"Ecy",ю:"yucy",Ю:"YUcy",я:"yacy",Я:"YAcy",ℵ:"aleph",ℶ:"beth",ℷ:"gimel",ℸ:"daleth"},p=/["&'<>`]/g,d={'"':""","&":"&","'":"'","<":"<",">":">","`":"`"},f=/&#(?:[xX][^a-fA-F0-9]|[^0-9xX])/,h=/[\0-\x08\x0B\x0E-\x1F\x7F-\x9F\uFDD0-\uFDEF\uFFFE\uFFFF]|[\uD83F\uD87F\uD8BF\uD8FF\uD93F\uD97F\uD9BF\uD9FF\uDA3F\uDA7F\uDABF\uDAFF\uDB3F\uDB7F\uDBBF\uDBFF][\uDFFE\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,y=/&(CounterClockwiseContourIntegral|DoubleLongLeftRightArrow|ClockwiseContourIntegral|NotNestedGreaterGreater|NotSquareSupersetEqual|DiacriticalDoubleAcute|NotRightTriangleEqual|NotSucceedsSlantEqual|NotPrecedesSlantEqual|CloseCurlyDoubleQuote|NegativeVeryThinSpace|DoubleContourIntegral|FilledVerySmallSquare|CapitalDifferentialD|OpenCurlyDoubleQuote|EmptyVerySmallSquare|NestedGreaterGreater|DoubleLongRightArrow|NotLeftTriangleEqual|NotGreaterSlantEqual|ReverseUpEquilibrium|DoubleLeftRightArrow|NotSquareSubsetEqual|NotDoubleVerticalBar|RightArrowLeftArrow|NotGreaterFullEqual|NotRightTriangleBar|SquareSupersetEqual|DownLeftRightVector|DoubleLongLeftArrow|leftrightsquigarrow|LeftArrowRightArrow|NegativeMediumSpace|blacktriangleright|RightDownVectorBar|PrecedesSlantEqual|RightDoubleBracket|SucceedsSlantEqual|NotLeftTriangleBar|RightTriangleEqual|SquareIntersection|RightDownTeeVector|ReverseEquilibrium|NegativeThickSpace|longleftrightarrow|Longleftrightarrow|LongLeftRightArrow|DownRightTeeVector|DownRightVectorBar|GreaterSlantEqual|SquareSubsetEqual|LeftDownVectorBar|LeftDoubleBracket|VerticalSeparator|rightleftharpoons|NotGreaterGreater|NotSquareSuperset|blacktriangleleft|blacktriangledown|NegativeThinSpace|LeftDownTeeVector|NotLessSlantEqual|leftrightharpoons|DoubleUpDownArrow|DoubleVerticalBar|LeftTriangleEqual|FilledSmallSquare|twoheadrightarrow|NotNestedLessLess|DownLeftTeeVector|DownLeftVectorBar|RightAngleBracket|NotTildeFullEqual|NotReverseElement|RightUpDownVector|DiacriticalTilde|NotSucceedsTilde|circlearrowright|NotPrecedesEqual|rightharpoondown|DoubleRightArrow|NotSucceedsEqual|NonBreakingSpace|NotRightTriangle|LessEqualGreater|RightUpTeeVector|LeftAngleBracket|GreaterFullEqual|DownArrowUpArrow|RightUpVectorBar|twoheadleftarrow|GreaterEqualLess|downharpoonright|RightTriangleBar|ntrianglerighteq|NotSupersetEqual|LeftUpDownVector|DiacriticalAcute|rightrightarrows|vartriangleright|UpArrowDownArrow|DiacriticalGrave|UnderParenthesis|EmptySmallSquare|LeftUpVectorBar|leftrightarrows|DownRightVector|downharpoonleft|trianglerighteq|ShortRightArrow|OverParenthesis|DoubleLeftArrow|DoubleDownArrow|NotSquareSubset|bigtriangledown|ntrianglelefteq|UpperRightArrow|curvearrowright|vartriangleleft|NotLeftTriangle|nleftrightarrow|LowerRightArrow|NotHumpDownHump|NotGreaterTilde|rightthreetimes|LeftUpTeeVector|NotGreaterEqual|straightepsilon|LeftTriangleBar|rightsquigarrow|ContourIntegral|rightleftarrows|CloseCurlyQuote|RightDownVector|LeftRightVector|nLeftrightarrow|leftharpoondown|circlearrowleft|SquareSuperset|OpenCurlyQuote|hookrightarrow|HorizontalLine|DiacriticalDot|NotLessGreater|ntriangleright|DoubleRightTee|InvisibleComma|InvisibleTimes|LowerLeftArrow|DownLeftVector|NotSubsetEqual|curvearrowleft|trianglelefteq|NotVerticalBar|TildeFullEqual|downdownarrows|NotGreaterLess|RightTeeVector|ZeroWidthSpace|looparrowright|LongRightArrow|doublebarwedge|ShortLeftArrow|ShortDownArrow|RightVectorBar|GreaterGreater|ReverseElement|rightharpoonup|LessSlantEqual|leftthreetimes|upharpoonright|rightarrowtail|LeftDownVector|Longrightarrow|NestedLessLess|UpperLeftArrow|nshortparallel|leftleftarrows|leftrightarrow|Leftrightarrow|LeftRightArrow|longrightarrow|upharpoonleft|RightArrowBar|ApplyFunction|LeftTeeVector|leftarrowtail|NotEqualTilde|varsubsetneqq|varsupsetneqq|RightTeeArrow|SucceedsEqual|SucceedsTilde|LeftVectorBar|SupersetEqual|hookleftarrow|DifferentialD|VerticalTilde|VeryThinSpace|blacktriangle|bigtriangleup|LessFullEqual|divideontimes|leftharpoonup|UpEquilibrium|ntriangleleft|RightTriangle|measuredangle|shortparallel|longleftarrow|Longleftarrow|LongLeftArrow|DoubleLeftTee|Poincareplane|PrecedesEqual|triangleright|DoubleUpArrow|RightUpVector|fallingdotseq|looparrowleft|PrecedesTilde|NotTildeEqual|NotTildeTilde|smallsetminus|Proportional|triangleleft|triangledown|UnderBracket|NotHumpEqual|exponentiale|ExponentialE|NotLessTilde|HilbertSpace|RightCeiling|blacklozenge|varsupsetneq|HumpDownHump|GreaterEqual|VerticalLine|LeftTeeArrow|NotLessEqual|DownTeeArrow|LeftTriangle|varsubsetneq|Intersection|NotCongruent|DownArrowBar|LeftUpVector|LeftArrowBar|risingdotseq|GreaterTilde|RoundImplies|SquareSubset|ShortUpArrow|NotSuperset|quaternions|precnapprox|backepsilon|preccurlyeq|OverBracket|blacksquare|MediumSpace|VerticalBar|circledcirc|circleddash|CircleMinus|CircleTimes|LessGreater|curlyeqprec|curlyeqsucc|diamondsuit|UpDownArrow|Updownarrow|RuleDelayed|Rrightarrow|updownarrow|RightVector|nRightarrow|nrightarrow|eqslantless|LeftCeiling|Equilibrium|SmallCircle|expectation|NotSucceeds|thickapprox|GreaterLess|SquareUnion|NotPrecedes|NotLessLess|straightphi|succnapprox|succcurlyeq|SubsetEqual|sqsupseteq|Proportion|Laplacetrf|ImaginaryI|supsetneqq|NotGreater|gtreqqless|NotElement|ThickSpace|TildeEqual|TildeTilde|Fouriertrf|rmoustache|EqualTilde|eqslantgtr|UnderBrace|LeftVector|UpArrowBar|nLeftarrow|nsubseteqq|subsetneqq|nsupseteqq|nleftarrow|succapprox|lessapprox|UpTeeArrow|upuparrows|curlywedge|lesseqqgtr|varepsilon|varnothing|RightFloor|complement|CirclePlus|sqsubseteq|Lleftarrow|circledast|RightArrow|Rightarrow|rightarrow|lmoustache|Bernoullis|precapprox|mapstoleft|mapstodown|longmapsto|dotsquare|downarrow|DoubleDot|nsubseteq|supsetneq|leftarrow|nsupseteq|subsetneq|ThinSpace|ngeqslant|subseteqq|HumpEqual|NotSubset|triangleq|NotCupCap|lesseqgtr|heartsuit|TripleDot|Leftarrow|Coproduct|Congruent|varpropto|complexes|gvertneqq|LeftArrow|LessTilde|supseteqq|MinusPlus|CircleDot|nleqslant|NotExists|gtreqless|nparallel|UnionPlus|LeftFloor|checkmark|CenterDot|centerdot|Mellintrf|gtrapprox|bigotimes|OverBrace|spadesuit|therefore|pitchfork|rationals|PlusMinus|Backslash|Therefore|DownBreve|backsimeq|backprime|DownArrow|nshortmid|Downarrow|lvertneqq|eqvparsl|imagline|imagpart|infintie|integers|Integral|intercal|LessLess|Uarrocir|intlarhk|sqsupset|angmsdaf|sqsubset|llcorner|vartheta|cupbrcap|lnapprox|Superset|SuchThat|succnsim|succneqq|angmsdag|biguplus|curlyvee|trpezium|Succeeds|NotTilde|bigwedge|angmsdah|angrtvbd|triminus|cwconint|fpartint|lrcorner|smeparsl|subseteq|urcorner|lurdshar|laemptyv|DDotrahd|approxeq|ldrushar|awconint|mapstoup|backcong|shortmid|triangle|geqslant|gesdotol|timesbar|circledR|circledS|setminus|multimap|naturals|scpolint|ncongdot|RightTee|boxminus|gnapprox|boxtimes|andslope|thicksim|angmsdaa|varsigma|cirfnint|rtriltri|angmsdab|rppolint|angmsdac|barwedge|drbkarow|clubsuit|thetasym|bsolhsub|capbrcup|dzigrarr|doteqdot|DotEqual|dotminus|UnderBar|NotEqual|realpart|otimesas|ulcorner|hksearow|hkswarow|parallel|PartialD|elinters|emptyset|plusacir|bbrktbrk|angmsdad|pointint|bigoplus|angmsdae|Precedes|bigsqcup|varkappa|notindot|supseteq|precneqq|precnsim|profalar|profline|profsurf|leqslant|lesdotor|raemptyv|subplus|notnivb|notnivc|subrarr|zigrarr|vzigzag|submult|subedot|Element|between|cirscir|larrbfs|larrsim|lotimes|lbrksld|lbrkslu|lozenge|ldrdhar|dbkarow|bigcirc|epsilon|simrarr|simplus|ltquest|Epsilon|luruhar|gtquest|maltese|npolint|eqcolon|npreceq|bigodot|ddagger|gtrless|bnequiv|harrcir|ddotseq|equivDD|backsim|demptyv|nsqsube|nsqsupe|Upsilon|nsubset|upsilon|minusdu|nsucceq|swarrow|nsupset|coloneq|searrow|boxplus|napprox|natural|asympeq|alefsym|congdot|nearrow|bigstar|diamond|supplus|tritime|LeftTee|nvinfin|triplus|NewLine|nvltrie|nvrtrie|nwarrow|nexists|Diamond|ruluhar|Implies|supmult|angzarr|suplarr|suphsub|questeq|because|digamma|Because|olcross|bemptyv|omicron|Omicron|rotimes|NoBreak|intprod|angrtvb|orderof|uwangle|suphsol|lesdoto|orslope|DownTee|realine|cudarrl|rdldhar|OverBar|supedot|lessdot|supdsub|topfork|succsim|rbrkslu|rbrksld|pertenk|cudarrr|isindot|planckh|lessgtr|pluscir|gesdoto|plussim|plustwo|lesssim|cularrp|rarrsim|Cayleys|notinva|notinvb|notinvc|UpArrow|Uparrow|uparrow|NotLess|dwangle|precsim|Product|curarrm|Cconint|dotplus|rarrbfs|ccupssm|Cedilla|cemptyv|notniva|quatint|frac35|frac38|frac45|frac56|frac58|frac78|tridot|xoplus|gacute|gammad|Gammad|lfisht|lfloor|bigcup|sqsupe|gbreve|Gbreve|lharul|sqsube|sqcups|Gcedil|apacir|llhard|lmidot|Lmidot|lmoust|andand|sqcaps|approx|Abreve|spades|circeq|tprime|divide|topcir|Assign|topbot|gesdot|divonx|xuplus|timesd|gesles|atilde|solbar|SOFTcy|loplus|timesb|lowast|lowbar|dlcorn|dlcrop|softcy|dollar|lparlt|thksim|lrhard|Atilde|lsaquo|smashp|bigvee|thinsp|wreath|bkarow|lsquor|lstrok|Lstrok|lthree|ltimes|ltlarr|DotDot|simdot|ltrPar|weierp|xsqcup|angmsd|sigmav|sigmaf|zeetrf|Zcaron|zcaron|mapsto|vsupne|thetav|cirmid|marker|mcomma|Zacute|vsubnE|there4|gtlPar|vsubne|bottom|gtrarr|SHCHcy|shchcy|midast|midcir|middot|minusb|minusd|gtrdot|bowtie|sfrown|mnplus|models|colone|seswar|Colone|mstpos|searhk|gtrsim|nacute|Nacute|boxbox|telrec|hairsp|Tcedil|nbumpe|scnsim|ncaron|Ncaron|ncedil|Ncedil|hamilt|Scedil|nearhk|hardcy|HARDcy|tcedil|Tcaron|commat|nequiv|nesear|tcaron|target|hearts|nexist|varrho|scedil|Scaron|scaron|hellip|Sacute|sacute|hercon|swnwar|compfn|rtimes|rthree|rsquor|rsaquo|zacute|wedgeq|homtht|barvee|barwed|Barwed|rpargt|horbar|conint|swarhk|roplus|nltrie|hslash|hstrok|Hstrok|rmoust|Conint|bprime|hybull|hyphen|iacute|Iacute|supsup|supsub|supsim|varphi|coprod|brvbar|agrave|Supset|supset|igrave|Igrave|notinE|Agrave|iiiint|iinfin|copysr|wedbar|Verbar|vangrt|becaus|incare|verbar|inodot|bullet|drcorn|intcal|drcrop|cularr|vellip|Utilde|bumpeq|cupcap|dstrok|Dstrok|CupCap|cupcup|cupdot|eacute|Eacute|supdot|iquest|easter|ecaron|Ecaron|ecolon|isinsv|utilde|itilde|Itilde|curarr|succeq|Bumpeq|cacute|ulcrop|nparsl|Cacute|nprcue|egrave|Egrave|nrarrc|nrarrw|subsup|subsub|nrtrie|jsercy|nsccue|Jsercy|kappav|kcedil|Kcedil|subsim|ulcorn|nsimeq|egsdot|veebar|kgreen|capand|elsdot|Subset|subset|curren|aacute|lacute|Lacute|emptyv|ntilde|Ntilde|lagran|lambda|Lambda|capcap|Ugrave|langle|subdot|emsp13|numero|emsp14|nvdash|nvDash|nVdash|nVDash|ugrave|ufisht|nvHarr|larrfs|nvlArr|larrhk|larrlp|larrpl|nvrArr|Udblac|nwarhk|larrtl|nwnear|oacute|Oacute|latail|lAtail|sstarf|lbrace|odblac|Odblac|lbrack|udblac|odsold|eparsl|lcaron|Lcaron|ograve|Ograve|lcedil|Lcedil|Aacute|ssmile|ssetmn|squarf|ldquor|capcup|ominus|cylcty|rharul|eqcirc|dagger|rfloor|rfisht|Dagger|daleth|equals|origof|capdot|equest|dcaron|Dcaron|rdquor|oslash|Oslash|otilde|Otilde|otimes|Otimes|urcrop|Ubreve|ubreve|Yacute|Uacute|uacute|Rcedil|rcedil|urcorn|parsim|Rcaron|Vdashl|rcaron|Tstrok|percnt|period|permil|Exists|yacute|rbrack|rbrace|phmmat|ccaron|Ccaron|planck|ccedil|plankv|tstrok|female|plusdo|plusdu|ffilig|plusmn|ffllig|Ccedil|rAtail|dfisht|bernou|ratail|Rarrtl|rarrtl|angsph|rarrpl|rarrlp|rarrhk|xwedge|xotime|forall|ForAll|Vvdash|vsupnE|preceq|bigcap|frac12|frac13|frac14|primes|rarrfs|prnsim|frac15|Square|frac16|square|lesdot|frac18|frac23|propto|prurel|rarrap|rangle|puncsp|frac25|Racute|qprime|racute|lesges|frac34|abreve|AElig|eqsim|utdot|setmn|urtri|Equal|Uring|seArr|uring|searr|dashv|Dashv|mumap|nabla|iogon|Iogon|sdote|sdotb|scsim|napid|napos|equiv|natur|Acirc|dblac|erarr|nbump|iprod|erDot|ucirc|awint|esdot|angrt|ncong|isinE|scnap|Scirc|scirc|ndash|isins|Ubrcy|nearr|neArr|isinv|nedot|ubrcy|acute|Ycirc|iukcy|Iukcy|xutri|nesim|caret|jcirc|Jcirc|caron|twixt|ddarr|sccue|exist|jmath|sbquo|ngeqq|angst|ccaps|lceil|ngsim|UpTee|delta|Delta|rtrif|nharr|nhArr|nhpar|rtrie|jukcy|Jukcy|kappa|rsquo|Kappa|nlarr|nlArr|TSHcy|rrarr|aogon|Aogon|fflig|xrarr|tshcy|ccirc|nleqq|filig|upsih|nless|dharl|nlsim|fjlig|ropar|nltri|dharr|robrk|roarr|fllig|fltns|roang|rnmid|subnE|subne|lAarr|trisb|Ccirc|acirc|ccups|blank|VDash|forkv|Vdash|langd|cedil|blk12|blk14|laquo|strns|diams|notin|vDash|larrb|blk34|block|disin|uplus|vdash|vBarv|aelig|starf|Wedge|check|xrArr|lates|lbarr|lBarr|notni|lbbrk|bcong|frasl|lbrke|frown|vrtri|vprop|vnsup|gamma|Gamma|wedge|xodot|bdquo|srarr|doteq|ldquo|boxdl|boxdL|gcirc|Gcirc|boxDl|boxDL|boxdr|boxdR|boxDr|TRADE|trade|rlhar|boxDR|vnsub|npart|vltri|rlarr|boxhd|boxhD|nprec|gescc|nrarr|nrArr|boxHd|boxHD|boxhu|boxhU|nrtri|boxHu|clubs|boxHU|times|colon|Colon|gimel|xlArr|Tilde|nsime|tilde|nsmid|nspar|THORN|thorn|xlarr|nsube|nsubE|thkap|xhArr|comma|nsucc|boxul|boxuL|nsupe|nsupE|gneqq|gnsim|boxUl|boxUL|grave|boxur|boxuR|boxUr|boxUR|lescc|angle|bepsi|boxvh|varpi|boxvH|numsp|Theta|gsime|gsiml|theta|boxVh|boxVH|boxvl|gtcir|gtdot|boxvL|boxVl|boxVL|crarr|cross|Cross|nvsim|boxvr|nwarr|nwArr|sqsup|dtdot|Uogon|lhard|lharu|dtrif|ocirc|Ocirc|lhblk|duarr|odash|sqsub|Hacek|sqcup|llarr|duhar|oelig|OElig|ofcir|boxvR|uogon|lltri|boxVr|csube|uuarr|ohbar|csupe|ctdot|olarr|olcir|harrw|oline|sqcap|omacr|Omacr|omega|Omega|boxVR|aleph|lneqq|lnsim|loang|loarr|rharu|lobrk|hcirc|operp|oplus|rhard|Hcirc|orarr|Union|order|ecirc|Ecirc|cuepr|szlig|cuesc|breve|reals|eDDot|Breve|hoarr|lopar|utrif|rdquo|Umacr|umacr|efDot|swArr|ultri|alpha|rceil|ovbar|swarr|Wcirc|wcirc|smtes|smile|bsemi|lrarr|aring|parsl|lrhar|bsime|uhblk|lrtri|cupor|Aring|uharr|uharl|slarr|rbrke|bsolb|lsime|rbbrk|RBarr|lsimg|phone|rBarr|rbarr|icirc|lsquo|Icirc|emacr|Emacr|ratio|simne|plusb|simlE|simgE|simeq|pluse|ltcir|ltdot|empty|xharr|xdtri|iexcl|Alpha|ltrie|rarrw|pound|ltrif|xcirc|bumpe|prcue|bumpE|asymp|amacr|cuvee|Sigma|sigma|iiint|udhar|iiota|ijlig|IJlig|supnE|imacr|Imacr|prime|Prime|image|prnap|eogon|Eogon|rarrc|mdash|mDDot|cuwed|imath|supne|imped|Amacr|udarr|prsim|micro|rarrb|cwint|raquo|infin|eplus|range|rangd|Ucirc|radic|minus|amalg|veeeq|rAarr|epsiv|ycirc|quest|sharp|quot|zwnj|Qscr|race|qscr|Qopf|qopf|qint|rang|Rang|Zscr|zscr|Zopf|zopf|rarr|rArr|Rarr|Pscr|pscr|prop|prod|prnE|prec|ZHcy|zhcy|prap|Zeta|zeta|Popf|popf|Zdot|plus|zdot|Yuml|yuml|phiv|YUcy|yucy|Yscr|yscr|perp|Yopf|yopf|part|para|YIcy|Ouml|rcub|yicy|YAcy|rdca|ouml|osol|Oscr|rdsh|yacy|real|oscr|xvee|andd|rect|andv|Xscr|oror|ordm|ordf|xscr|ange|aopf|Aopf|rHar|Xopf|opar|Oopf|xopf|xnis|rhov|oopf|omid|xmap|oint|apid|apos|ogon|ascr|Ascr|odot|odiv|xcup|xcap|ocir|oast|nvlt|nvle|nvgt|nvge|nvap|Wscr|wscr|auml|ntlg|ntgl|nsup|nsub|nsim|Nscr|nscr|nsce|Wopf|ring|npre|wopf|npar|Auml|Barv|bbrk|Nopf|nopf|nmid|nLtv|beta|ropf|Ropf|Beta|beth|nles|rpar|nleq|bnot|bNot|nldr|NJcy|rscr|Rscr|Vscr|vscr|rsqb|njcy|bopf|nisd|Bopf|rtri|Vopf|nGtv|ngtr|vopf|boxh|boxH|boxv|nges|ngeq|boxV|bscr|scap|Bscr|bsim|Vert|vert|bsol|bull|bump|caps|cdot|ncup|scnE|ncap|nbsp|napE|Cdot|cent|sdot|Vbar|nang|vBar|chcy|Mscr|mscr|sect|semi|CHcy|Mopf|mopf|sext|circ|cire|mldr|mlcp|cirE|comp|shcy|SHcy|vArr|varr|cong|copf|Copf|copy|COPY|malt|male|macr|lvnE|cscr|ltri|sime|ltcc|simg|Cscr|siml|csub|Uuml|lsqb|lsim|uuml|csup|Lscr|lscr|utri|smid|lpar|cups|smte|lozf|darr|Lopf|Uscr|solb|lopf|sopf|Sopf|lneq|uscr|spar|dArr|lnap|Darr|dash|Sqrt|LJcy|ljcy|lHar|dHar|Upsi|upsi|diam|lesg|djcy|DJcy|leqq|dopf|Dopf|dscr|Dscr|dscy|ldsh|ldca|squf|DScy|sscr|Sscr|dsol|lcub|late|star|Star|Uopf|Larr|lArr|larr|uopf|dtri|dzcy|sube|subE|Lang|lang|Kscr|kscr|Kopf|kopf|KJcy|kjcy|KHcy|khcy|DZcy|ecir|edot|eDot|Jscr|jscr|succ|Jopf|jopf|Edot|uHar|emsp|ensp|Iuml|iuml|eopf|isin|Iscr|iscr|Eopf|epar|sung|epsi|escr|sup1|sup2|sup3|Iota|iota|supe|supE|Iopf|iopf|IOcy|iocy|Escr|esim|Esim|imof|Uarr|QUOT|uArr|uarr|euml|IEcy|iecy|Idot|Euml|euro|excl|Hscr|hscr|Hopf|hopf|TScy|tscy|Tscr|hbar|tscr|flat|tbrk|fnof|hArr|harr|half|fopf|Fopf|tdot|gvnE|fork|trie|gtcc|fscr|Fscr|gdot|gsim|Gscr|gscr|Gopf|gopf|gneq|Gdot|tosa|gnap|Topf|topf|geqq|toea|GJcy|gjcy|tint|gesl|mid|Sfr|ggg|top|ges|gla|glE|glj|geq|gne|gEl|gel|gnE|Gcy|gcy|gap|Tfr|tfr|Tcy|tcy|Hat|Tau|Ffr|tau|Tab|hfr|Hfr|ffr|Fcy|fcy|icy|Icy|iff|ETH|eth|ifr|Ifr|Eta|eta|int|Int|Sup|sup|ucy|Ucy|Sum|sum|jcy|ENG|ufr|Ufr|eng|Jcy|jfr|els|ell|egs|Efr|efr|Jfr|uml|kcy|Kcy|Ecy|ecy|kfr|Kfr|lap|Sub|sub|lat|lcy|Lcy|leg|Dot|dot|lEg|leq|les|squ|div|die|lfr|Lfr|lgE|Dfr|dfr|Del|deg|Dcy|dcy|lne|lnE|sol|loz|smt|Cup|lrm|cup|lsh|Lsh|sim|shy|map|Map|mcy|Mcy|mfr|Mfr|mho|gfr|Gfr|sfr|cir|Chi|chi|nap|Cfr|vcy|Vcy|cfr|Scy|scy|ncy|Ncy|vee|Vee|Cap|cap|nfr|scE|sce|Nfr|nge|ngE|nGg|vfr|Vfr|ngt|bot|nGt|nis|niv|Rsh|rsh|nle|nlE|bne|Bfr|bfr|nLl|nlt|nLt|Bcy|bcy|not|Not|rlm|wfr|Wfr|npr|nsc|num|ocy|ast|Ocy|ofr|xfr|Xfr|Ofr|ogt|ohm|apE|olt|Rho|ape|rho|Rfr|rfr|ord|REG|ang|reg|orv|And|and|AMP|Rcy|amp|Afr|ycy|Ycy|yen|yfr|Yfr|rcy|par|pcy|Pcy|pfr|Pfr|phi|Phi|afr|Acy|acy|zcy|Zcy|piv|acE|acd|zfr|Zfr|pre|prE|psi|Psi|qfr|Qfr|zwj|Or|ge|Gg|gt|gg|el|oS|lt|Lt|LT|Re|lg|gl|eg|ne|Im|it|le|DD|wp|wr|nu|Nu|dd|lE|Sc|sc|pi|Pi|ee|af|ll|Ll|rx|gE|xi|pm|Xi|ic|pr|Pr|in|ni|mp|mu|ac|Mu|or|ap|Gt|GT|ii);|&(Aacute|Agrave|Atilde|Ccedil|Eacute|Egrave|Iacute|Igrave|Ntilde|Oacute|Ograve|Oslash|Otilde|Uacute|Ugrave|Yacute|aacute|agrave|atilde|brvbar|ccedil|curren|divide|eacute|egrave|frac12|frac14|frac34|iacute|igrave|iquest|middot|ntilde|oacute|ograve|oslash|otilde|plusmn|uacute|ugrave|yacute|AElig|Acirc|Aring|Ecirc|Icirc|Ocirc|THORN|Ucirc|acirc|acute|aelig|aring|cedil|ecirc|icirc|iexcl|laquo|micro|ocirc|pound|raquo|szlig|thorn|times|ucirc|Auml|COPY|Euml|Iuml|Ouml|QUOT|Uuml|auml|cent|copy|euml|iuml|macr|nbsp|ordf|ordm|ouml|para|quot|sect|sup1|sup2|sup3|uuml|yuml|AMP|ETH|REG|amp|deg|eth|not|reg|shy|uml|yen|GT|LT|gt|lt)(?!;)([=a-zA-Z0-9]?)|&#([0-9]+)(;?)|&#[xX]([a-fA-F0-9]+)(;?)|&([0-9a-zA-Z]+)/g,A={aacute:"á",Aacute:"Á",abreve:"ă",Abreve:"Ă",ac:"∾",acd:"∿",acE:"∾̳",acirc:"â",Acirc:"Â",acute:"´",acy:"а",Acy:"А",aelig:"æ",AElig:"Æ",af:"⁡",afr:"𝔞",Afr:"𝔄",agrave:"à",Agrave:"À",alefsym:"ℵ",aleph:"ℵ",alpha:"α",Alpha:"Α",amacr:"ā",Amacr:"Ā",amalg:"⨿",amp:"&",AMP:"&",and:"∧",And:"⩓",andand:"⩕",andd:"⩜",andslope:"⩘",andv:"⩚",ang:"∠",ange:"⦤",angle:"∠",angmsd:"∡",angmsdaa:"⦨",angmsdab:"⦩",angmsdac:"⦪",angmsdad:"⦫",angmsdae:"⦬",angmsdaf:"⦭",angmsdag:"⦮",angmsdah:"⦯",angrt:"∟",angrtvb:"⊾",angrtvbd:"⦝",angsph:"∢",angst:"Å",angzarr:"⍼",aogon:"ą",Aogon:"Ą",aopf:"𝕒",Aopf:"𝔸",ap:"≈",apacir:"⩯",ape:"≊",apE:"⩰",apid:"≋",apos:"'",ApplyFunction:"⁡",approx:"≈",approxeq:"≊",aring:"å",Aring:"Å",ascr:"𝒶",Ascr:"𝒜",Assign:"≔",ast:"*",asymp:"≈",asympeq:"≍",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",awconint:"∳",awint:"⨑",backcong:"≌",backepsilon:"϶",backprime:"‵",backsim:"∽",backsimeq:"⋍",Backslash:"∖",Barv:"⫧",barvee:"⊽",barwed:"⌅",Barwed:"⌆",barwedge:"⌅",bbrk:"⎵",bbrktbrk:"⎶",bcong:"≌",bcy:"б",Bcy:"Б",bdquo:"„",becaus:"∵",because:"∵",Because:"∵",bemptyv:"⦰",bepsi:"϶",bernou:"ℬ",Bernoullis:"ℬ",beta:"β",Beta:"Β",beth:"ℶ",between:"≬",bfr:"𝔟",Bfr:"𝔅",bigcap:"⋂",bigcirc:"◯",bigcup:"⋃",bigodot:"⨀",bigoplus:"⨁",bigotimes:"⨂",bigsqcup:"⨆",bigstar:"★",bigtriangledown:"▽",bigtriangleup:"△",biguplus:"⨄",bigvee:"⋁",bigwedge:"⋀",bkarow:"⤍",blacklozenge:"⧫",blacksquare:"▪",blacktriangle:"▴",blacktriangledown:"▾",blacktriangleleft:"◂",blacktriangleright:"▸",blank:"␣",blk12:"▒",blk14:"░",blk34:"▓",block:"█",bne:"=⃥",bnequiv:"≡⃥",bnot:"⌐",bNot:"⫭",bopf:"𝕓",Bopf:"𝔹",bot:"⊥",bottom:"⊥",bowtie:"⋈",boxbox:"⧉",boxdl:"┐",boxdL:"╕",boxDl:"╖",boxDL:"╗",boxdr:"┌",boxdR:"╒",boxDr:"╓",boxDR:"╔",boxh:"─",boxH:"═",boxhd:"┬",boxhD:"╥",boxHd:"╤",boxHD:"╦",boxhu:"┴",boxhU:"╨",boxHu:"╧",boxHU:"╩",boxminus:"⊟",boxplus:"⊞",boxtimes:"⊠",boxul:"┘",boxuL:"╛",boxUl:"╜",boxUL:"╝",boxur:"└",boxuR:"╘",boxUr:"╙",boxUR:"╚",boxv:"│",boxV:"║",boxvh:"┼",boxvH:"╪",boxVh:"╫",boxVH:"╬",boxvl:"┤",boxvL:"╡",boxVl:"╢",boxVL:"╣",boxvr:"├",boxvR:"╞",boxVr:"╟",boxVR:"╠",bprime:"‵",breve:"˘",Breve:"˘",brvbar:"¦",bscr:"𝒷",Bscr:"ℬ",bsemi:"⁏",bsim:"∽",bsime:"⋍",bsol:"\\",bsolb:"⧅",bsolhsub:"⟈",bull:"•",bullet:"•",bump:"≎",bumpe:"≏",bumpE:"⪮",bumpeq:"≏",Bumpeq:"≎",cacute:"ć",Cacute:"Ć",cap:"∩",Cap:"⋒",capand:"⩄",capbrcup:"⩉",capcap:"⩋",capcup:"⩇",capdot:"⩀",CapitalDifferentialD:"ⅅ",caps:"∩︀",caret:"⁁",caron:"ˇ",Cayleys:"ℭ",ccaps:"⩍",ccaron:"č",Ccaron:"Č",ccedil:"ç",Ccedil:"Ç",ccirc:"ĉ",Ccirc:"Ĉ",Cconint:"∰",ccups:"⩌",ccupssm:"⩐",cdot:"ċ",Cdot:"Ċ",cedil:"¸",Cedilla:"¸",cemptyv:"⦲",cent:"¢",centerdot:"·",CenterDot:"·",cfr:"𝔠",Cfr:"ℭ",chcy:"ч",CHcy:"Ч",check:"✓",checkmark:"✓",chi:"χ",Chi:"Χ",cir:"○",circ:"ˆ",circeq:"≗",circlearrowleft:"↺",circlearrowright:"↻",circledast:"⊛",circledcirc:"⊚",circleddash:"⊝",CircleDot:"⊙",circledR:"®",circledS:"Ⓢ",CircleMinus:"⊖",CirclePlus:"⊕",CircleTimes:"⊗",cire:"≗",cirE:"⧃",cirfnint:"⨐",cirmid:"⫯",cirscir:"⧂",ClockwiseContourIntegral:"∲",CloseCurlyDoubleQuote:"”",CloseCurlyQuote:"’",clubs:"♣",clubsuit:"♣",colon:":",Colon:"∷",colone:"≔",Colone:"⩴",coloneq:"≔",comma:",",commat:"@",comp:"∁",compfn:"∘",complement:"∁",complexes:"ℂ",cong:"≅",congdot:"⩭",Congruent:"≡",conint:"∮",Conint:"∯",ContourIntegral:"∮",copf:"𝕔",Copf:"ℂ",coprod:"∐",Coproduct:"∐",copy:"©",COPY:"©",copysr:"℗",CounterClockwiseContourIntegral:"∳",crarr:"↵",cross:"✗",Cross:"⨯",cscr:"𝒸",Cscr:"𝒞",csub:"⫏",csube:"⫑",csup:"⫐",csupe:"⫒",ctdot:"⋯",cudarrl:"⤸",cudarrr:"⤵",cuepr:"⋞",cuesc:"⋟",cularr:"↶",cularrp:"⤽",cup:"∪",Cup:"⋓",cupbrcap:"⩈",cupcap:"⩆",CupCap:"≍",cupcup:"⩊",cupdot:"⊍",cupor:"⩅",cups:"∪︀",curarr:"↷",curarrm:"⤼",curlyeqprec:"⋞",curlyeqsucc:"⋟",curlyvee:"⋎",curlywedge:"⋏",curren:"¤",curvearrowleft:"↶",curvearrowright:"↷",cuvee:"⋎",cuwed:"⋏",cwconint:"∲",cwint:"∱",cylcty:"⌭",dagger:"†",Dagger:"‡",daleth:"ℸ",darr:"↓",dArr:"⇓",Darr:"↡",dash:"‐",dashv:"⊣",Dashv:"⫤",dbkarow:"⤏",dblac:"˝",dcaron:"ď",Dcaron:"Ď",dcy:"д",Dcy:"Д",dd:"ⅆ",DD:"ⅅ",ddagger:"‡",ddarr:"⇊",DDotrahd:"⤑",ddotseq:"⩷",deg:"°",Del:"∇",delta:"δ",Delta:"Δ",demptyv:"⦱",dfisht:"⥿",dfr:"𝔡",Dfr:"𝔇",dHar:"⥥",dharl:"⇃",dharr:"⇂",DiacriticalAcute:"´",DiacriticalDot:"˙",DiacriticalDoubleAcute:"˝",DiacriticalGrave:"`",DiacriticalTilde:"˜",diam:"⋄",diamond:"⋄",Diamond:"⋄",diamondsuit:"♦",diams:"♦",die:"¨",DifferentialD:"ⅆ",digamma:"ϝ",disin:"⋲",div:"÷",divide:"÷",divideontimes:"⋇",divonx:"⋇",djcy:"ђ",DJcy:"Ђ",dlcorn:"⌞",dlcrop:"⌍",dollar:"$",dopf:"𝕕",Dopf:"𝔻",dot:"˙",Dot:"¨",DotDot:"⃜",doteq:"≐",doteqdot:"≑",DotEqual:"≐",dotminus:"∸",dotplus:"∔",dotsquare:"⊡",doublebarwedge:"⌆",DoubleContourIntegral:"∯",DoubleDot:"¨",DoubleDownArrow:"⇓",DoubleLeftArrow:"⇐",DoubleLeftRightArrow:"⇔",DoubleLeftTee:"⫤",DoubleLongLeftArrow:"⟸",DoubleLongLeftRightArrow:"⟺",DoubleLongRightArrow:"⟹",DoubleRightArrow:"⇒",DoubleRightTee:"⊨",DoubleUpArrow:"⇑",DoubleUpDownArrow:"⇕",DoubleVerticalBar:"∥",downarrow:"↓",Downarrow:"⇓",DownArrow:"↓",DownArrowBar:"⤓",DownArrowUpArrow:"⇵",DownBreve:"̑",downdownarrows:"⇊",downharpoonleft:"⇃",downharpoonright:"⇂",DownLeftRightVector:"⥐",DownLeftTeeVector:"⥞",DownLeftVector:"↽",DownLeftVectorBar:"⥖",DownRightTeeVector:"⥟",DownRightVector:"⇁",DownRightVectorBar:"⥗",DownTee:"⊤",DownTeeArrow:"↧",drbkarow:"⤐",drcorn:"⌟",drcrop:"⌌",dscr:"𝒹",Dscr:"𝒟",dscy:"ѕ",DScy:"Ѕ",dsol:"⧶",dstrok:"đ",Dstrok:"Đ",dtdot:"⋱",dtri:"▿",dtrif:"▾",duarr:"⇵",duhar:"⥯",dwangle:"⦦",dzcy:"џ",DZcy:"Џ",dzigrarr:"⟿",eacute:"é",Eacute:"É",easter:"⩮",ecaron:"ě",Ecaron:"Ě",ecir:"≖",ecirc:"ê",Ecirc:"Ê",ecolon:"≕",ecy:"э",Ecy:"Э",eDDot:"⩷",edot:"ė",eDot:"≑",Edot:"Ė",ee:"ⅇ",efDot:"≒",efr:"𝔢",Efr:"𝔈",eg:"⪚",egrave:"è",Egrave:"È",egs:"⪖",egsdot:"⪘",el:"⪙",Element:"∈",elinters:"⏧",ell:"ℓ",els:"⪕",elsdot:"⪗",emacr:"ē",Emacr:"Ē",empty:"∅",emptyset:"∅",EmptySmallSquare:"◻",emptyv:"∅",EmptyVerySmallSquare:"▫",emsp:" ",emsp13:" ",emsp14:" ",eng:"ŋ",ENG:"Ŋ",ensp:" ",eogon:"ę",Eogon:"Ę",eopf:"𝕖",Eopf:"𝔼",epar:"⋕",eparsl:"⧣",eplus:"⩱",epsi:"ε",epsilon:"ε",Epsilon:"Ε",epsiv:"ϵ",eqcirc:"≖",eqcolon:"≕",eqsim:"≂",eqslantgtr:"⪖",eqslantless:"⪕",Equal:"⩵",equals:"=",EqualTilde:"≂",equest:"≟",Equilibrium:"⇌",equiv:"≡",equivDD:"⩸",eqvparsl:"⧥",erarr:"⥱",erDot:"≓",escr:"ℯ",Escr:"ℰ",esdot:"≐",esim:"≂",Esim:"⩳",eta:"η",Eta:"Η",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",euro:"€",excl:"!",exist:"∃",Exists:"∃",expectation:"ℰ",exponentiale:"ⅇ",ExponentialE:"ⅇ",fallingdotseq:"≒",fcy:"ф",Fcy:"Ф",female:"♀",ffilig:"ffi",fflig:"ff",ffllig:"ffl",ffr:"𝔣",Ffr:"𝔉",filig:"fi",FilledSmallSquare:"◼",FilledVerySmallSquare:"▪",fjlig:"fj",flat:"♭",fllig:"fl",fltns:"▱",fnof:"ƒ",fopf:"𝕗",Fopf:"𝔽",forall:"∀",ForAll:"∀",fork:"⋔",forkv:"⫙",Fouriertrf:"ℱ",fpartint:"⨍",frac12:"½",frac13:"⅓",frac14:"¼",frac15:"⅕",frac16:"⅙",frac18:"⅛",frac23:"⅔",frac25:"⅖",frac34:"¾",frac35:"⅗",frac38:"⅜",frac45:"⅘",frac56:"⅚",frac58:"⅝",frac78:"⅞",frasl:"⁄",frown:"⌢",fscr:"𝒻",Fscr:"ℱ",gacute:"ǵ",gamma:"γ",Gamma:"Γ",gammad:"ϝ",Gammad:"Ϝ",gap:"⪆",gbreve:"ğ",Gbreve:"Ğ",Gcedil:"Ģ",gcirc:"ĝ",Gcirc:"Ĝ",gcy:"г",Gcy:"Г",gdot:"ġ",Gdot:"Ġ",ge:"≥",gE:"≧",gel:"⋛",gEl:"⪌",geq:"≥",geqq:"≧",geqslant:"⩾",ges:"⩾",gescc:"⪩",gesdot:"⪀",gesdoto:"⪂",gesdotol:"⪄",gesl:"⋛︀",gesles:"⪔",gfr:"𝔤",Gfr:"𝔊",gg:"≫",Gg:"⋙",ggg:"⋙",gimel:"ℷ",gjcy:"ѓ",GJcy:"Ѓ",gl:"≷",gla:"⪥",glE:"⪒",glj:"⪤",gnap:"⪊",gnapprox:"⪊",gne:"⪈",gnE:"≩",gneq:"⪈",gneqq:"≩",gnsim:"⋧",gopf:"𝕘",Gopf:"𝔾",grave:"`",GreaterEqual:"≥",GreaterEqualLess:"⋛",GreaterFullEqual:"≧",GreaterGreater:"⪢",GreaterLess:"≷",GreaterSlantEqual:"⩾",GreaterTilde:"≳",gscr:"ℊ",Gscr:"𝒢",gsim:"≳",gsime:"⪎",gsiml:"⪐",gt:">",Gt:"≫",GT:">",gtcc:"⪧",gtcir:"⩺",gtdot:"⋗",gtlPar:"⦕",gtquest:"⩼",gtrapprox:"⪆",gtrarr:"⥸",gtrdot:"⋗",gtreqless:"⋛",gtreqqless:"⪌",gtrless:"≷",gtrsim:"≳",gvertneqq:"≩︀",gvnE:"≩︀",Hacek:"ˇ",hairsp:" ",half:"½",hamilt:"ℋ",hardcy:"ъ",HARDcy:"Ъ",harr:"↔",hArr:"⇔",harrcir:"⥈",harrw:"↭",Hat:"^",hbar:"ℏ",hcirc:"ĥ",Hcirc:"Ĥ",hearts:"♥",heartsuit:"♥",hellip:"…",hercon:"⊹",hfr:"𝔥",Hfr:"ℌ",HilbertSpace:"ℋ",hksearow:"⤥",hkswarow:"⤦",hoarr:"⇿",homtht:"∻",hookleftarrow:"↩",hookrightarrow:"↪",hopf:"𝕙",Hopf:"ℍ",horbar:"―",HorizontalLine:"─",hscr:"𝒽",Hscr:"ℋ",hslash:"ℏ",hstrok:"ħ",Hstrok:"Ħ",HumpDownHump:"≎",HumpEqual:"≏",hybull:"⁃",hyphen:"‐",iacute:"í",Iacute:"Í",ic:"⁣",icirc:"î",Icirc:"Î",icy:"и",Icy:"И",Idot:"İ",iecy:"е",IEcy:"Е",iexcl:"¡",iff:"⇔",ifr:"𝔦",Ifr:"ℑ",igrave:"ì",Igrave:"Ì",ii:"ⅈ",iiiint:"⨌",iiint:"∭",iinfin:"⧜",iiota:"℩",ijlig:"ij",IJlig:"IJ",Im:"ℑ",imacr:"ī",Imacr:"Ī",image:"ℑ",ImaginaryI:"ⅈ",imagline:"ℐ",imagpart:"ℑ",imath:"ı",imof:"⊷",imped:"Ƶ",Implies:"⇒",in:"∈",incare:"℅",infin:"∞",infintie:"⧝",inodot:"ı",int:"∫",Int:"∬",intcal:"⊺",integers:"ℤ",Integral:"∫",intercal:"⊺",Intersection:"⋂",intlarhk:"⨗",intprod:"⨼",InvisibleComma:"⁣",InvisibleTimes:"⁢",iocy:"ё",IOcy:"Ё",iogon:"į",Iogon:"Į",iopf:"𝕚",Iopf:"𝕀",iota:"ι",Iota:"Ι",iprod:"⨼",iquest:"¿",iscr:"𝒾",Iscr:"ℐ",isin:"∈",isindot:"⋵",isinE:"⋹",isins:"⋴",isinsv:"⋳",isinv:"∈",it:"⁢",itilde:"ĩ",Itilde:"Ĩ",iukcy:"і",Iukcy:"І",iuml:"ï",Iuml:"Ï",jcirc:"ĵ",Jcirc:"Ĵ",jcy:"й",Jcy:"Й",jfr:"𝔧",Jfr:"𝔍",jmath:"ȷ",jopf:"𝕛",Jopf:"𝕁",jscr:"𝒿",Jscr:"𝒥",jsercy:"ј",Jsercy:"Ј",jukcy:"є",Jukcy:"Є",kappa:"κ",Kappa:"Κ",kappav:"ϰ",kcedil:"ķ",Kcedil:"Ķ",kcy:"к",Kcy:"К",kfr:"𝔨",Kfr:"𝔎",kgreen:"ĸ",khcy:"х",KHcy:"Х",kjcy:"ќ",KJcy:"Ќ",kopf:"𝕜",Kopf:"𝕂",kscr:"𝓀",Kscr:"𝒦",lAarr:"⇚",lacute:"ĺ",Lacute:"Ĺ",laemptyv:"⦴",lagran:"ℒ",lambda:"λ",Lambda:"Λ",lang:"⟨",Lang:"⟪",langd:"⦑",langle:"⟨",lap:"⪅",Laplacetrf:"ℒ",laquo:"«",larr:"←",lArr:"⇐",Larr:"↞",larrb:"⇤",larrbfs:"⤟",larrfs:"⤝",larrhk:"↩",larrlp:"↫",larrpl:"⤹",larrsim:"⥳",larrtl:"↢",lat:"⪫",latail:"⤙",lAtail:"⤛",late:"⪭",lates:"⪭︀",lbarr:"⤌",lBarr:"⤎",lbbrk:"❲",lbrace:"{",lbrack:"[",lbrke:"⦋",lbrksld:"⦏",lbrkslu:"⦍",lcaron:"ľ",Lcaron:"Ľ",lcedil:"ļ",Lcedil:"Ļ",lceil:"⌈",lcub:"{",lcy:"л",Lcy:"Л",ldca:"⤶",ldquo:"“",ldquor:"„",ldrdhar:"⥧",ldrushar:"⥋",ldsh:"↲",le:"≤",lE:"≦",LeftAngleBracket:"⟨",leftarrow:"←",Leftarrow:"⇐",LeftArrow:"←",LeftArrowBar:"⇤",LeftArrowRightArrow:"⇆",leftarrowtail:"↢",LeftCeiling:"⌈",LeftDoubleBracket:"⟦",LeftDownTeeVector:"⥡",LeftDownVector:"⇃",LeftDownVectorBar:"⥙",LeftFloor:"⌊",leftharpoondown:"↽",leftharpoonup:"↼",leftleftarrows:"⇇",leftrightarrow:"↔",Leftrightarrow:"⇔",LeftRightArrow:"↔",leftrightarrows:"⇆",leftrightharpoons:"⇋",leftrightsquigarrow:"↭",LeftRightVector:"⥎",LeftTee:"⊣",LeftTeeArrow:"↤",LeftTeeVector:"⥚",leftthreetimes:"⋋",LeftTriangle:"⊲",LeftTriangleBar:"⧏",LeftTriangleEqual:"⊴",LeftUpDownVector:"⥑",LeftUpTeeVector:"⥠",LeftUpVector:"↿",LeftUpVectorBar:"⥘",LeftVector:"↼",LeftVectorBar:"⥒",leg:"⋚",lEg:"⪋",leq:"≤",leqq:"≦",leqslant:"⩽",les:"⩽",lescc:"⪨",lesdot:"⩿",lesdoto:"⪁",lesdotor:"⪃",lesg:"⋚︀",lesges:"⪓",lessapprox:"⪅",lessdot:"⋖",lesseqgtr:"⋚",lesseqqgtr:"⪋",LessEqualGreater:"⋚",LessFullEqual:"≦",LessGreater:"≶",lessgtr:"≶",LessLess:"⪡",lesssim:"≲",LessSlantEqual:"⩽",LessTilde:"≲",lfisht:"⥼",lfloor:"⌊",lfr:"𝔩",Lfr:"𝔏",lg:"≶",lgE:"⪑",lHar:"⥢",lhard:"↽",lharu:"↼",lharul:"⥪",lhblk:"▄",ljcy:"љ",LJcy:"Љ",ll:"≪",Ll:"⋘",llarr:"⇇",llcorner:"⌞",Lleftarrow:"⇚",llhard:"⥫",lltri:"◺",lmidot:"ŀ",Lmidot:"Ŀ",lmoust:"⎰",lmoustache:"⎰",lnap:"⪉",lnapprox:"⪉",lne:"⪇",lnE:"≨",lneq:"⪇",lneqq:"≨",lnsim:"⋦",loang:"⟬",loarr:"⇽",lobrk:"⟦",longleftarrow:"⟵",Longleftarrow:"⟸",LongLeftArrow:"⟵",longleftrightarrow:"⟷",Longleftrightarrow:"⟺",LongLeftRightArrow:"⟷",longmapsto:"⟼",longrightarrow:"⟶",Longrightarrow:"⟹",LongRightArrow:"⟶",looparrowleft:"↫",looparrowright:"↬",lopar:"⦅",lopf:"𝕝",Lopf:"𝕃",loplus:"⨭",lotimes:"⨴",lowast:"∗",lowbar:"_",LowerLeftArrow:"↙",LowerRightArrow:"↘",loz:"◊",lozenge:"◊",lozf:"⧫",lpar:"(",lparlt:"⦓",lrarr:"⇆",lrcorner:"⌟",lrhar:"⇋",lrhard:"⥭",lrm:"‎",lrtri:"⊿",lsaquo:"‹",lscr:"𝓁",Lscr:"ℒ",lsh:"↰",Lsh:"↰",lsim:"≲",lsime:"⪍",lsimg:"⪏",lsqb:"[",lsquo:"‘",lsquor:"‚",lstrok:"ł",Lstrok:"Ł",lt:"<",Lt:"≪",LT:"<",ltcc:"⪦",ltcir:"⩹",ltdot:"⋖",lthree:"⋋",ltimes:"⋉",ltlarr:"⥶",ltquest:"⩻",ltri:"◃",ltrie:"⊴",ltrif:"◂",ltrPar:"⦖",lurdshar:"⥊",luruhar:"⥦",lvertneqq:"≨︀",lvnE:"≨︀",macr:"¯",male:"♂",malt:"✠",maltese:"✠",map:"↦",Map:"⤅",mapsto:"↦",mapstodown:"↧",mapstoleft:"↤",mapstoup:"↥",marker:"▮",mcomma:"⨩",mcy:"м",Mcy:"М",mdash:"—",mDDot:"∺",measuredangle:"∡",MediumSpace:" ",Mellintrf:"ℳ",mfr:"𝔪",Mfr:"𝔐",mho:"℧",micro:"µ",mid:"∣",midast:"*",midcir:"⫰",middot:"·",minus:"−",minusb:"⊟",minusd:"∸",minusdu:"⨪",MinusPlus:"∓",mlcp:"⫛",mldr:"…",mnplus:"∓",models:"⊧",mopf:"𝕞",Mopf:"𝕄",mp:"∓",mscr:"𝓂",Mscr:"ℳ",mstpos:"∾",mu:"μ",Mu:"Μ",multimap:"⊸",mumap:"⊸",nabla:"∇",nacute:"ń",Nacute:"Ń",nang:"∠⃒",nap:"≉",napE:"⩰̸",napid:"≋̸",napos:"ʼn",napprox:"≉",natur:"♮",natural:"♮",naturals:"ℕ",nbsp:" ",nbump:"≎̸",nbumpe:"≏̸",ncap:"⩃",ncaron:"ň",Ncaron:"Ň",ncedil:"ņ",Ncedil:"Ņ",ncong:"≇",ncongdot:"⩭̸",ncup:"⩂",ncy:"н",Ncy:"Н",ndash:"–",ne:"≠",nearhk:"⤤",nearr:"↗",neArr:"⇗",nearrow:"↗",nedot:"≐̸",NegativeMediumSpace:"​",NegativeThickSpace:"​",NegativeThinSpace:"​",NegativeVeryThinSpace:"​",nequiv:"≢",nesear:"⤨",nesim:"≂̸",NestedGreaterGreater:"≫",NestedLessLess:"≪",NewLine:` +`,nexist:"∄",nexists:"∄",nfr:"𝔫",Nfr:"𝔑",nge:"≱",ngE:"≧̸",ngeq:"≱",ngeqq:"≧̸",ngeqslant:"⩾̸",nges:"⩾̸",nGg:"⋙̸",ngsim:"≵",ngt:"≯",nGt:"≫⃒",ngtr:"≯",nGtv:"≫̸",nharr:"↮",nhArr:"⇎",nhpar:"⫲",ni:"∋",nis:"⋼",nisd:"⋺",niv:"∋",njcy:"њ",NJcy:"Њ",nlarr:"↚",nlArr:"⇍",nldr:"‥",nle:"≰",nlE:"≦̸",nleftarrow:"↚",nLeftarrow:"⇍",nleftrightarrow:"↮",nLeftrightarrow:"⇎",nleq:"≰",nleqq:"≦̸",nleqslant:"⩽̸",nles:"⩽̸",nless:"≮",nLl:"⋘̸",nlsim:"≴",nlt:"≮",nLt:"≪⃒",nltri:"⋪",nltrie:"⋬",nLtv:"≪̸",nmid:"∤",NoBreak:"⁠",NonBreakingSpace:" ",nopf:"𝕟",Nopf:"ℕ",not:"¬",Not:"⫬",NotCongruent:"≢",NotCupCap:"≭",NotDoubleVerticalBar:"∦",NotElement:"∉",NotEqual:"≠",NotEqualTilde:"≂̸",NotExists:"∄",NotGreater:"≯",NotGreaterEqual:"≱",NotGreaterFullEqual:"≧̸",NotGreaterGreater:"≫̸",NotGreaterLess:"≹",NotGreaterSlantEqual:"⩾̸",NotGreaterTilde:"≵",NotHumpDownHump:"≎̸",NotHumpEqual:"≏̸",notin:"∉",notindot:"⋵̸",notinE:"⋹̸",notinva:"∉",notinvb:"⋷",notinvc:"⋶",NotLeftTriangle:"⋪",NotLeftTriangleBar:"⧏̸",NotLeftTriangleEqual:"⋬",NotLess:"≮",NotLessEqual:"≰",NotLessGreater:"≸",NotLessLess:"≪̸",NotLessSlantEqual:"⩽̸",NotLessTilde:"≴",NotNestedGreaterGreater:"⪢̸",NotNestedLessLess:"⪡̸",notni:"∌",notniva:"∌",notnivb:"⋾",notnivc:"⋽",NotPrecedes:"⊀",NotPrecedesEqual:"⪯̸",NotPrecedesSlantEqual:"⋠",NotReverseElement:"∌",NotRightTriangle:"⋫",NotRightTriangleBar:"⧐̸",NotRightTriangleEqual:"⋭",NotSquareSubset:"⊏̸",NotSquareSubsetEqual:"⋢",NotSquareSuperset:"⊐̸",NotSquareSupersetEqual:"⋣",NotSubset:"⊂⃒",NotSubsetEqual:"⊈",NotSucceeds:"⊁",NotSucceedsEqual:"⪰̸",NotSucceedsSlantEqual:"⋡",NotSucceedsTilde:"≿̸",NotSuperset:"⊃⃒",NotSupersetEqual:"⊉",NotTilde:"≁",NotTildeEqual:"≄",NotTildeFullEqual:"≇",NotTildeTilde:"≉",NotVerticalBar:"∤",npar:"∦",nparallel:"∦",nparsl:"⫽⃥",npart:"∂̸",npolint:"⨔",npr:"⊀",nprcue:"⋠",npre:"⪯̸",nprec:"⊀",npreceq:"⪯̸",nrarr:"↛",nrArr:"⇏",nrarrc:"⤳̸",nrarrw:"↝̸",nrightarrow:"↛",nRightarrow:"⇏",nrtri:"⋫",nrtrie:"⋭",nsc:"⊁",nsccue:"⋡",nsce:"⪰̸",nscr:"𝓃",Nscr:"𝒩",nshortmid:"∤",nshortparallel:"∦",nsim:"≁",nsime:"≄",nsimeq:"≄",nsmid:"∤",nspar:"∦",nsqsube:"⋢",nsqsupe:"⋣",nsub:"⊄",nsube:"⊈",nsubE:"⫅̸",nsubset:"⊂⃒",nsubseteq:"⊈",nsubseteqq:"⫅̸",nsucc:"⊁",nsucceq:"⪰̸",nsup:"⊅",nsupe:"⊉",nsupE:"⫆̸",nsupset:"⊃⃒",nsupseteq:"⊉",nsupseteqq:"⫆̸",ntgl:"≹",ntilde:"ñ",Ntilde:"Ñ",ntlg:"≸",ntriangleleft:"⋪",ntrianglelefteq:"⋬",ntriangleright:"⋫",ntrianglerighteq:"⋭",nu:"ν",Nu:"Ν",num:"#",numero:"№",numsp:" ",nvap:"≍⃒",nvdash:"⊬",nvDash:"⊭",nVdash:"⊮",nVDash:"⊯",nvge:"≥⃒",nvgt:">⃒",nvHarr:"⤄",nvinfin:"⧞",nvlArr:"⤂",nvle:"≤⃒",nvlt:"<⃒",nvltrie:"⊴⃒",nvrArr:"⤃",nvrtrie:"⊵⃒",nvsim:"∼⃒",nwarhk:"⤣",nwarr:"↖",nwArr:"⇖",nwarrow:"↖",nwnear:"⤧",oacute:"ó",Oacute:"Ó",oast:"⊛",ocir:"⊚",ocirc:"ô",Ocirc:"Ô",ocy:"о",Ocy:"О",odash:"⊝",odblac:"ő",Odblac:"Ő",odiv:"⨸",odot:"⊙",odsold:"⦼",oelig:"œ",OElig:"Œ",ofcir:"⦿",ofr:"𝔬",Ofr:"𝔒",ogon:"˛",ograve:"ò",Ograve:"Ò",ogt:"⧁",ohbar:"⦵",ohm:"Ω",oint:"∮",olarr:"↺",olcir:"⦾",olcross:"⦻",oline:"‾",olt:"⧀",omacr:"ō",Omacr:"Ō",omega:"ω",Omega:"Ω",omicron:"ο",Omicron:"Ο",omid:"⦶",ominus:"⊖",oopf:"𝕠",Oopf:"𝕆",opar:"⦷",OpenCurlyDoubleQuote:"“",OpenCurlyQuote:"‘",operp:"⦹",oplus:"⊕",or:"∨",Or:"⩔",orarr:"↻",ord:"⩝",order:"ℴ",orderof:"ℴ",ordf:"ª",ordm:"º",origof:"⊶",oror:"⩖",orslope:"⩗",orv:"⩛",oS:"Ⓢ",oscr:"ℴ",Oscr:"𝒪",oslash:"ø",Oslash:"Ø",osol:"⊘",otilde:"õ",Otilde:"Õ",otimes:"⊗",Otimes:"⨷",otimesas:"⨶",ouml:"ö",Ouml:"Ö",ovbar:"⌽",OverBar:"‾",OverBrace:"⏞",OverBracket:"⎴",OverParenthesis:"⏜",par:"∥",para:"¶",parallel:"∥",parsim:"⫳",parsl:"⫽",part:"∂",PartialD:"∂",pcy:"п",Pcy:"П",percnt:"%",period:".",permil:"‰",perp:"⊥",pertenk:"‱",pfr:"𝔭",Pfr:"𝔓",phi:"φ",Phi:"Φ",phiv:"ϕ",phmmat:"ℳ",phone:"☎",pi:"π",Pi:"Π",pitchfork:"⋔",piv:"ϖ",planck:"ℏ",planckh:"ℎ",plankv:"ℏ",plus:"+",plusacir:"⨣",plusb:"⊞",pluscir:"⨢",plusdo:"∔",plusdu:"⨥",pluse:"⩲",PlusMinus:"±",plusmn:"±",plussim:"⨦",plustwo:"⨧",pm:"±",Poincareplane:"ℌ",pointint:"⨕",popf:"𝕡",Popf:"ℙ",pound:"£",pr:"≺",Pr:"⪻",prap:"⪷",prcue:"≼",pre:"⪯",prE:"⪳",prec:"≺",precapprox:"⪷",preccurlyeq:"≼",Precedes:"≺",PrecedesEqual:"⪯",PrecedesSlantEqual:"≼",PrecedesTilde:"≾",preceq:"⪯",precnapprox:"⪹",precneqq:"⪵",precnsim:"⋨",precsim:"≾",prime:"′",Prime:"″",primes:"ℙ",prnap:"⪹",prnE:"⪵",prnsim:"⋨",prod:"∏",Product:"∏",profalar:"⌮",profline:"⌒",profsurf:"⌓",prop:"∝",Proportion:"∷",Proportional:"∝",propto:"∝",prsim:"≾",prurel:"⊰",pscr:"𝓅",Pscr:"𝒫",psi:"ψ",Psi:"Ψ",puncsp:" ",qfr:"𝔮",Qfr:"𝔔",qint:"⨌",qopf:"𝕢",Qopf:"ℚ",qprime:"⁗",qscr:"𝓆",Qscr:"𝒬",quaternions:"ℍ",quatint:"⨖",quest:"?",questeq:"≟",quot:'"',QUOT:'"',rAarr:"⇛",race:"∽̱",racute:"ŕ",Racute:"Ŕ",radic:"√",raemptyv:"⦳",rang:"⟩",Rang:"⟫",rangd:"⦒",range:"⦥",rangle:"⟩",raquo:"»",rarr:"→",rArr:"⇒",Rarr:"↠",rarrap:"⥵",rarrb:"⇥",rarrbfs:"⤠",rarrc:"⤳",rarrfs:"⤞",rarrhk:"↪",rarrlp:"↬",rarrpl:"⥅",rarrsim:"⥴",rarrtl:"↣",Rarrtl:"⤖",rarrw:"↝",ratail:"⤚",rAtail:"⤜",ratio:"∶",rationals:"ℚ",rbarr:"⤍",rBarr:"⤏",RBarr:"⤐",rbbrk:"❳",rbrace:"}",rbrack:"]",rbrke:"⦌",rbrksld:"⦎",rbrkslu:"⦐",rcaron:"ř",Rcaron:"Ř",rcedil:"ŗ",Rcedil:"Ŗ",rceil:"⌉",rcub:"}",rcy:"р",Rcy:"Р",rdca:"⤷",rdldhar:"⥩",rdquo:"”",rdquor:"”",rdsh:"↳",Re:"ℜ",real:"ℜ",realine:"ℛ",realpart:"ℜ",reals:"ℝ",rect:"▭",reg:"®",REG:"®",ReverseElement:"∋",ReverseEquilibrium:"⇋",ReverseUpEquilibrium:"⥯",rfisht:"⥽",rfloor:"⌋",rfr:"𝔯",Rfr:"ℜ",rHar:"⥤",rhard:"⇁",rharu:"⇀",rharul:"⥬",rho:"ρ",Rho:"Ρ",rhov:"ϱ",RightAngleBracket:"⟩",rightarrow:"→",Rightarrow:"⇒",RightArrow:"→",RightArrowBar:"⇥",RightArrowLeftArrow:"⇄",rightarrowtail:"↣",RightCeiling:"⌉",RightDoubleBracket:"⟧",RightDownTeeVector:"⥝",RightDownVector:"⇂",RightDownVectorBar:"⥕",RightFloor:"⌋",rightharpoondown:"⇁",rightharpoonup:"⇀",rightleftarrows:"⇄",rightleftharpoons:"⇌",rightrightarrows:"⇉",rightsquigarrow:"↝",RightTee:"⊢",RightTeeArrow:"↦",RightTeeVector:"⥛",rightthreetimes:"⋌",RightTriangle:"⊳",RightTriangleBar:"⧐",RightTriangleEqual:"⊵",RightUpDownVector:"⥏",RightUpTeeVector:"⥜",RightUpVector:"↾",RightUpVectorBar:"⥔",RightVector:"⇀",RightVectorBar:"⥓",ring:"˚",risingdotseq:"≓",rlarr:"⇄",rlhar:"⇌",rlm:"‏",rmoust:"⎱",rmoustache:"⎱",rnmid:"⫮",roang:"⟭",roarr:"⇾",robrk:"⟧",ropar:"⦆",ropf:"𝕣",Ropf:"ℝ",roplus:"⨮",rotimes:"⨵",RoundImplies:"⥰",rpar:")",rpargt:"⦔",rppolint:"⨒",rrarr:"⇉",Rrightarrow:"⇛",rsaquo:"›",rscr:"𝓇",Rscr:"ℛ",rsh:"↱",Rsh:"↱",rsqb:"]",rsquo:"’",rsquor:"’",rthree:"⋌",rtimes:"⋊",rtri:"▹",rtrie:"⊵",rtrif:"▸",rtriltri:"⧎",RuleDelayed:"⧴",ruluhar:"⥨",rx:"℞",sacute:"ś",Sacute:"Ś",sbquo:"‚",sc:"≻",Sc:"⪼",scap:"⪸",scaron:"š",Scaron:"Š",sccue:"≽",sce:"⪰",scE:"⪴",scedil:"ş",Scedil:"Ş",scirc:"ŝ",Scirc:"Ŝ",scnap:"⪺",scnE:"⪶",scnsim:"⋩",scpolint:"⨓",scsim:"≿",scy:"с",Scy:"С",sdot:"⋅",sdotb:"⊡",sdote:"⩦",searhk:"⤥",searr:"↘",seArr:"⇘",searrow:"↘",sect:"§",semi:";",seswar:"⤩",setminus:"∖",setmn:"∖",sext:"✶",sfr:"𝔰",Sfr:"𝔖",sfrown:"⌢",sharp:"♯",shchcy:"щ",SHCHcy:"Щ",shcy:"ш",SHcy:"Ш",ShortDownArrow:"↓",ShortLeftArrow:"←",shortmid:"∣",shortparallel:"∥",ShortRightArrow:"→",ShortUpArrow:"↑",shy:"­",sigma:"σ",Sigma:"Σ",sigmaf:"ς",sigmav:"ς",sim:"∼",simdot:"⩪",sime:"≃",simeq:"≃",simg:"⪞",simgE:"⪠",siml:"⪝",simlE:"⪟",simne:"≆",simplus:"⨤",simrarr:"⥲",slarr:"←",SmallCircle:"∘",smallsetminus:"∖",smashp:"⨳",smeparsl:"⧤",smid:"∣",smile:"⌣",smt:"⪪",smte:"⪬",smtes:"⪬︀",softcy:"ь",SOFTcy:"Ь",sol:"/",solb:"⧄",solbar:"⌿",sopf:"𝕤",Sopf:"𝕊",spades:"♠",spadesuit:"♠",spar:"∥",sqcap:"⊓",sqcaps:"⊓︀",sqcup:"⊔",sqcups:"⊔︀",Sqrt:"√",sqsub:"⊏",sqsube:"⊑",sqsubset:"⊏",sqsubseteq:"⊑",sqsup:"⊐",sqsupe:"⊒",sqsupset:"⊐",sqsupseteq:"⊒",squ:"□",square:"□",Square:"□",SquareIntersection:"⊓",SquareSubset:"⊏",SquareSubsetEqual:"⊑",SquareSuperset:"⊐",SquareSupersetEqual:"⊒",SquareUnion:"⊔",squarf:"▪",squf:"▪",srarr:"→",sscr:"𝓈",Sscr:"𝒮",ssetmn:"∖",ssmile:"⌣",sstarf:"⋆",star:"☆",Star:"⋆",starf:"★",straightepsilon:"ϵ",straightphi:"ϕ",strns:"¯",sub:"⊂",Sub:"⋐",subdot:"⪽",sube:"⊆",subE:"⫅",subedot:"⫃",submult:"⫁",subne:"⊊",subnE:"⫋",subplus:"⪿",subrarr:"⥹",subset:"⊂",Subset:"⋐",subseteq:"⊆",subseteqq:"⫅",SubsetEqual:"⊆",subsetneq:"⊊",subsetneqq:"⫋",subsim:"⫇",subsub:"⫕",subsup:"⫓",succ:"≻",succapprox:"⪸",succcurlyeq:"≽",Succeeds:"≻",SucceedsEqual:"⪰",SucceedsSlantEqual:"≽",SucceedsTilde:"≿",succeq:"⪰",succnapprox:"⪺",succneqq:"⪶",succnsim:"⋩",succsim:"≿",SuchThat:"∋",sum:"∑",Sum:"∑",sung:"♪",sup:"⊃",Sup:"⋑",sup1:"¹",sup2:"²",sup3:"³",supdot:"⪾",supdsub:"⫘",supe:"⊇",supE:"⫆",supedot:"⫄",Superset:"⊃",SupersetEqual:"⊇",suphsol:"⟉",suphsub:"⫗",suplarr:"⥻",supmult:"⫂",supne:"⊋",supnE:"⫌",supplus:"⫀",supset:"⊃",Supset:"⋑",supseteq:"⊇",supseteqq:"⫆",supsetneq:"⊋",supsetneqq:"⫌",supsim:"⫈",supsub:"⫔",supsup:"⫖",swarhk:"⤦",swarr:"↙",swArr:"⇙",swarrow:"↙",swnwar:"⤪",szlig:"ß",Tab:" ",target:"⌖",tau:"τ",Tau:"Τ",tbrk:"⎴",tcaron:"ť",Tcaron:"Ť",tcedil:"ţ",Tcedil:"Ţ",tcy:"т",Tcy:"Т",tdot:"⃛",telrec:"⌕",tfr:"𝔱",Tfr:"𝔗",there4:"∴",therefore:"∴",Therefore:"∴",theta:"θ",Theta:"Θ",thetasym:"ϑ",thetav:"ϑ",thickapprox:"≈",thicksim:"∼",ThickSpace:"  ",thinsp:" ",ThinSpace:" ",thkap:"≈",thksim:"∼",thorn:"þ",THORN:"Þ",tilde:"˜",Tilde:"∼",TildeEqual:"≃",TildeFullEqual:"≅",TildeTilde:"≈",times:"×",timesb:"⊠",timesbar:"⨱",timesd:"⨰",tint:"∭",toea:"⤨",top:"⊤",topbot:"⌶",topcir:"⫱",topf:"𝕥",Topf:"𝕋",topfork:"⫚",tosa:"⤩",tprime:"‴",trade:"™",TRADE:"™",triangle:"▵",triangledown:"▿",triangleleft:"◃",trianglelefteq:"⊴",triangleq:"≜",triangleright:"▹",trianglerighteq:"⊵",tridot:"◬",trie:"≜",triminus:"⨺",TripleDot:"⃛",triplus:"⨹",trisb:"⧍",tritime:"⨻",trpezium:"⏢",tscr:"𝓉",Tscr:"𝒯",tscy:"ц",TScy:"Ц",tshcy:"ћ",TSHcy:"Ћ",tstrok:"ŧ",Tstrok:"Ŧ",twixt:"≬",twoheadleftarrow:"↞",twoheadrightarrow:"↠",uacute:"ú",Uacute:"Ú",uarr:"↑",uArr:"⇑",Uarr:"↟",Uarrocir:"⥉",ubrcy:"ў",Ubrcy:"Ў",ubreve:"ŭ",Ubreve:"Ŭ",ucirc:"û",Ucirc:"Û",ucy:"у",Ucy:"У",udarr:"⇅",udblac:"ű",Udblac:"Ű",udhar:"⥮",ufisht:"⥾",ufr:"𝔲",Ufr:"𝔘",ugrave:"ù",Ugrave:"Ù",uHar:"⥣",uharl:"↿",uharr:"↾",uhblk:"▀",ulcorn:"⌜",ulcorner:"⌜",ulcrop:"⌏",ultri:"◸",umacr:"ū",Umacr:"Ū",uml:"¨",UnderBar:"_",UnderBrace:"⏟",UnderBracket:"⎵",UnderParenthesis:"⏝",Union:"⋃",UnionPlus:"⊎",uogon:"ų",Uogon:"Ų",uopf:"𝕦",Uopf:"𝕌",uparrow:"↑",Uparrow:"⇑",UpArrow:"↑",UpArrowBar:"⤒",UpArrowDownArrow:"⇅",updownarrow:"↕",Updownarrow:"⇕",UpDownArrow:"↕",UpEquilibrium:"⥮",upharpoonleft:"↿",upharpoonright:"↾",uplus:"⊎",UpperLeftArrow:"↖",UpperRightArrow:"↗",upsi:"υ",Upsi:"ϒ",upsih:"ϒ",upsilon:"υ",Upsilon:"Υ",UpTee:"⊥",UpTeeArrow:"↥",upuparrows:"⇈",urcorn:"⌝",urcorner:"⌝",urcrop:"⌎",uring:"ů",Uring:"Ů",urtri:"◹",uscr:"𝓊",Uscr:"𝒰",utdot:"⋰",utilde:"ũ",Utilde:"Ũ",utri:"▵",utrif:"▴",uuarr:"⇈",uuml:"ü",Uuml:"Ü",uwangle:"⦧",vangrt:"⦜",varepsilon:"ϵ",varkappa:"ϰ",varnothing:"∅",varphi:"ϕ",varpi:"ϖ",varpropto:"∝",varr:"↕",vArr:"⇕",varrho:"ϱ",varsigma:"ς",varsubsetneq:"⊊︀",varsubsetneqq:"⫋︀",varsupsetneq:"⊋︀",varsupsetneqq:"⫌︀",vartheta:"ϑ",vartriangleleft:"⊲",vartriangleright:"⊳",vBar:"⫨",Vbar:"⫫",vBarv:"⫩",vcy:"в",Vcy:"В",vdash:"⊢",vDash:"⊨",Vdash:"⊩",VDash:"⊫",Vdashl:"⫦",vee:"∨",Vee:"⋁",veebar:"⊻",veeeq:"≚",vellip:"⋮",verbar:"|",Verbar:"‖",vert:"|",Vert:"‖",VerticalBar:"∣",VerticalLine:"|",VerticalSeparator:"❘",VerticalTilde:"≀",VeryThinSpace:" ",vfr:"𝔳",Vfr:"𝔙",vltri:"⊲",vnsub:"⊂⃒",vnsup:"⊃⃒",vopf:"𝕧",Vopf:"𝕍",vprop:"∝",vrtri:"⊳",vscr:"𝓋",Vscr:"𝒱",vsubne:"⊊︀",vsubnE:"⫋︀",vsupne:"⊋︀",vsupnE:"⫌︀",Vvdash:"⊪",vzigzag:"⦚",wcirc:"ŵ",Wcirc:"Ŵ",wedbar:"⩟",wedge:"∧",Wedge:"⋀",wedgeq:"≙",weierp:"℘",wfr:"𝔴",Wfr:"𝔚",wopf:"𝕨",Wopf:"𝕎",wp:"℘",wr:"≀",wreath:"≀",wscr:"𝓌",Wscr:"𝒲",xcap:"⋂",xcirc:"◯",xcup:"⋃",xdtri:"▽",xfr:"𝔵",Xfr:"𝔛",xharr:"⟷",xhArr:"⟺",xi:"ξ",Xi:"Ξ",xlarr:"⟵",xlArr:"⟸",xmap:"⟼",xnis:"⋻",xodot:"⨀",xopf:"𝕩",Xopf:"𝕏",xoplus:"⨁",xotime:"⨂",xrarr:"⟶",xrArr:"⟹",xscr:"𝓍",Xscr:"𝒳",xsqcup:"⨆",xuplus:"⨄",xutri:"△",xvee:"⋁",xwedge:"⋀",yacute:"ý",Yacute:"Ý",yacy:"я",YAcy:"Я",ycirc:"ŷ",Ycirc:"Ŷ",ycy:"ы",Ycy:"Ы",yen:"¥",yfr:"𝔶",Yfr:"𝔜",yicy:"ї",YIcy:"Ї",yopf:"𝕪",Yopf:"𝕐",yscr:"𝓎",Yscr:"𝒴",yucy:"ю",YUcy:"Ю",yuml:"ÿ",Yuml:"Ÿ",zacute:"ź",Zacute:"Ź",zcaron:"ž",Zcaron:"Ž",zcy:"з",Zcy:"З",zdot:"ż",Zdot:"Ż",zeetrf:"ℨ",ZeroWidthSpace:"​",zeta:"ζ",Zeta:"Ζ",zfr:"𝔷",Zfr:"ℨ",zhcy:"ж",ZHcy:"Ж",zigrarr:"⇝",zopf:"𝕫",Zopf:"ℤ",zscr:"𝓏",Zscr:"𝒵",zwj:"‍",zwnj:"‌"},m={aacute:"á",Aacute:"Á",acirc:"â",Acirc:"Â",acute:"´",aelig:"æ",AElig:"Æ",agrave:"à",Agrave:"À",amp:"&",AMP:"&",aring:"å",Aring:"Å",atilde:"ã",Atilde:"Ã",auml:"ä",Auml:"Ä",brvbar:"¦",ccedil:"ç",Ccedil:"Ç",cedil:"¸",cent:"¢",copy:"©",COPY:"©",curren:"¤",deg:"°",divide:"÷",eacute:"é",Eacute:"É",ecirc:"ê",Ecirc:"Ê",egrave:"è",Egrave:"È",eth:"ð",ETH:"Ð",euml:"ë",Euml:"Ë",frac12:"½",frac14:"¼",frac34:"¾",gt:">",GT:">",iacute:"í",Iacute:"Í",icirc:"î",Icirc:"Î",iexcl:"¡",igrave:"ì",Igrave:"Ì",iquest:"¿",iuml:"ï",Iuml:"Ï",laquo:"«",lt:"<",LT:"<",macr:"¯",micro:"µ",middot:"·",nbsp:" ",not:"¬",ntilde:"ñ",Ntilde:"Ñ",oacute:"ó",Oacute:"Ó",ocirc:"ô",Ocirc:"Ô",ograve:"ò",Ograve:"Ò",ordf:"ª",ordm:"º",oslash:"ø",Oslash:"Ø",otilde:"õ",Otilde:"Õ",ouml:"ö",Ouml:"Ö",para:"¶",plusmn:"±",pound:"£",quot:'"',QUOT:'"',raquo:"»",reg:"®",REG:"®",sect:"§",shy:"­",sup1:"¹",sup2:"²",sup3:"³",szlig:"ß",thorn:"þ",THORN:"Þ",times:"×",uacute:"ú",Uacute:"Ú",ucirc:"û",Ucirc:"Û",ugrave:"ù",Ugrave:"Ù",uml:"¨",uuml:"ü",Uuml:"Ü",yacute:"ý",Yacute:"Ý",yen:"¥",yuml:"ÿ"},v={0:"�",128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},C=[1,2,3,4,5,6,7,8,11,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,64976,64977,64978,64979,64980,64981,64982,64983,64984,64985,64986,64987,64988,64989,64990,64991,64992,64993,64994,64995,64996,64997,64998,64999,65e3,65001,65002,65003,65004,65005,65006,65007,65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111],B=String.fromCharCode,T={},N=T.hasOwnProperty,R=function(pe,z){return N.call(pe,z)},J=function(pe,z){for(var O=-1,E=pe.length;++O=55296&&pe<=57343||pe>1114111?(z&&ue("character reference outside the permissible Unicode range"),"�"):R(v,pe)?(z&&ue("disallowed character reference"),v[pe]):(z&&J(C,pe)&&ue("disallowed character reference"),pe>65535&&(pe-=65536,O+=B(pe>>>10&1023|55296),pe=56320|pe&1023),O+=B(pe),O)},ee=function(pe){return"&#x"+pe.toString(16).toUpperCase()+";"},K=function(pe){return"&#"+pe+";"},ue=function(pe){throw Error("Parse error: "+pe)},oe=function(pe,z){z=q(z,oe.options);var O=z.strict;O&&h.test(pe)&&ue("forbidden code point");var E=z.encodeEverything,F=z.useNamedReferences,D=z.allowUnsafeSymbols,g=z.decimal?K:ee,P=function(b){return g(b.charCodeAt(0))};return E?(pe=pe.replace(a,function(b){return F&&R(l,b)?"&"+l[b]+";":P(b)}),F&&(pe=pe.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒").replace(/fj/g,"fj")),F&&(pe=pe.replace(c,function(b){return"&"+l[b]+";"}))):F?(D||(pe=pe.replace(p,function(b){return"&"+l[b]+";"})),pe=pe.replace(/>\u20D2/g,">⃒").replace(/<\u20D2/g,"<⃒"),pe=pe.replace(c,function(b){return"&"+l[b]+";"})):D||(pe=pe.replace(p,P)),pe.replace(o,function(b){var w=b.charCodeAt(0),I=b.charCodeAt(1),$=(w-55296)*1024+I-56320+65536;return g($)}).replace(i,P)};oe.options={allowUnsafeSymbols:!1,encodeEverything:!1,strict:!1,useNamedReferences:!1,decimal:!1};var de=function(pe,z){z=q(z,de.options);var O=z.strict;return O&&f.test(pe)&&ue("malformed character reference"),pe.replace(y,function(E,F,D,g,P,b,w,I,$){var M,L,Y,be,Ne,Ve;return F?(Ne=F,A[Ne]):D?(Ne=D,Ve=g,Ve&&z.isAttributeValue?(O&&Ve=="="&&ue("`&` did not start a character reference"),E):(O&&ue("named character reference was not terminated by a semicolon"),m[Ne]+(Ve||""))):P?(Y=P,L=b,O&&!L&&ue("character reference was not terminated by a semicolon"),M=parseInt(Y,10),G(M,O)):w?(be=w,L=I,O&&!L&&ue("character reference was not terminated by a semicolon"),M=parseInt(be,16),G(M,O)):(O&&ue("named character reference was not terminated by a semicolon"),E)})};de.options={isAttributeValue:!1,strict:!1};var he=function(pe){return pe.replace(p,function(z){return d[z]})},fe={version:"1.2.0",encode:oe,decode:de,escape:he,unescape:de};if(n&&!n.nodeType)if(u)u.exports=fe;else for(var ge in fe)R(fe,ge)&&(n[ge]=fe[ge]);else r.he=fe})(Ce)})($p,$p.exports);var W3=$p.exports;Object.defineProperty(xa,"__esModule",{value:!0});var v8=W3,xhe=function(){function e(t,r){t===void 0&&(t=null),this.parentNode=t,this.childNodes=[],Object.defineProperty(this,"range",{enumerable:!1,writable:!0,configurable:!0,value:r??[-1,-1]})}return e.prototype.remove=function(){var t=this;if(this.parentNode){var r=this.parentNode.childNodes;this.parentNode.childNodes=r.filter(function(n){return t!==n}),this.parentNode=null}return this},Object.defineProperty(e.prototype,"innerText",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"textContent",{get:function(){return(0,v8.decode)(this.rawText)},set:function(t){this.rawText=(0,v8.encode)(t)},enumerable:!1,configurable:!0}),e}();xa.default=xhe;var so={};Object.defineProperty(so,"__esModule",{value:!0});var Rh;(function(e){e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE"})(Rh||(Rh={}));so.default=Rh;var Rhe=Ce&&Ce.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),w_=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Od,"__esModule",{value:!0});var jhe=w_(xa),Mhe=w_(so),Lhe=function(e){Rhe(t,e);function t(r,n,u){var s=e.call(this,n,u)||this;return s.rawText=r,s.nodeType=Mhe.default.COMMENT_NODE,s}return t.prototype.clone=function(){return new t(this.rawText,null)},Object.defineProperty(t.prototype,"text",{get:function(){return this.rawText},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return"")},t}(jhe.default);Od.default=Lhe;var Tu={},__={},B_={},Gr={},oo={},Sc={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.Doctype=e.CDATA=e.Tag=e.Style=e.Script=e.Comment=e.Directive=e.Text=e.Root=e.isTag=e.ElementType=void 0;var t;(function(n){n.Root="root",n.Text="text",n.Directive="directive",n.Comment="comment",n.Script="script",n.Style="style",n.Tag="tag",n.CDATA="cdata",n.Doctype="doctype"})(t=e.ElementType||(e.ElementType={}));function r(n){return n.type===t.Tag||n.type===t.Script||n.type===t.Style}e.isTag=r,e.Root=t.Root,e.Text=t.Text,e.Directive=t.Directive,e.Comment=t.Comment,e.Script=t.Script,e.Style=t.Style,e.Tag=t.Tag,e.CDATA=t.CDATA,e.Doctype=t.Doctype})(Sc);var lt={},ao=Ce&&Ce.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_i=Ce&&Ce.__assign||function(){return _i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0?this.children[this.children.length-1]:null},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){return this.children},set:function(r){this.children=r},enumerable:!1,configurable:!0}),t}(J3);lt.NodeWithChildren=Nd;var k_=function(e){ao(t,e);function t(r){return e.call(this,Ut.ElementType.Root,r)||this}return t}(Nd);lt.Document=k_;var O_=function(e){ao(t,e);function t(r,n,u,s){u===void 0&&(u=[]),s===void 0&&(s=r==="script"?Ut.ElementType.Script:r==="style"?Ut.ElementType.Style:Ut.ElementType.Tag);var o=e.call(this,s,u)||this;return o.name=r,o.attribs=n,o}return Object.defineProperty(t.prototype,"tagName",{get:function(){return this.name},set:function(r){this.name=r},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"attributes",{get:function(){var r=this;return Object.keys(this.attribs).map(function(n){var u,s;return{name:n,value:r.attribs[n],namespace:(u=r["x-attribsNamespace"])===null||u===void 0?void 0:u[n],prefix:(s=r["x-attribsPrefix"])===null||s===void 0?void 0:s[n]}})},enumerable:!1,configurable:!0}),t}(Nd);lt.Element=O_;function I_(e){return(0,Ut.isTag)(e)}lt.isTag=I_;function N_(e){return e.type===Ut.ElementType.CDATA}lt.isCDATA=N_;function q_(e){return e.type===Ut.ElementType.Text}lt.isText=q_;function x_(e){return e.type===Ut.ElementType.Comment}lt.isComment=x_;function R_(e){return e.type===Ut.ElementType.Directive}lt.isDirective=R_;function j_(e){return e.type===Ut.ElementType.Root}lt.isDocument=j_;function Ghe(e){return Object.prototype.hasOwnProperty.call(e,"children")}lt.hasChildren=Ghe;function z3(e,t){t===void 0&&(t=!1);var r;if(q_(e))r=new T_(e.data);else if(x_(e))r=new $_(e.data);else if(I_(e)){var n=t?g2(e.children):[],u=new O_(e.name,_i({},e.attribs),n);n.forEach(function(i){return i.parent=u}),e.namespace!=null&&(u.namespace=e.namespace),e["x-attribsNamespace"]&&(u["x-attribsNamespace"]=_i({},e["x-attribsNamespace"])),e["x-attribsPrefix"]&&(u["x-attribsPrefix"]=_i({},e["x-attribsPrefix"])),r=u}else if(N_(e)){var n=t?g2(e.children):[],s=new Nd(Ut.ElementType.CDATA,n);n.forEach(function(c){return c.parent=s}),r=s}else if(j_(e)){var n=t?g2(e.children):[],o=new k_(n);n.forEach(function(c){return c.parent=o}),e["x-mode"]&&(o["x-mode"]=e["x-mode"]),r=o}else if(R_(e)){var a=new P_(e.name,e.data);e["x-name"]!=null&&(a["x-name"]=e["x-name"],a["x-publicId"]=e["x-publicId"],a["x-systemId"]=e["x-systemId"]),r=a}else throw new Error("Not implemented yet: ".concat(e.type));return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}lt.cloneNode=z3;function g2(e){for(var t=e.map(function(n){return z3(n,!0)}),r=1;r",zze=">",Kze="Í",Xze="í",Yze="Î",Zze="î",Qze="¡",eKe="Ì",tKe="ì",rKe="¿",nKe="Ï",uKe="ï",sKe="«",oKe="<",aKe="<",iKe="¯",cKe="µ",lKe="·",pKe=" ",dKe="¬",fKe="Ñ",DKe="ñ",hKe="Ó",mKe="ó",EKe="Ô",yKe="ô",vKe="Ò",gKe="ò",AKe="ª",FKe="º",CKe="Ø",bKe="ø",SKe="Õ",wKe="õ",_Ke="Ö",BKe="ö",TKe="¶",$Ke="±",PKe="£",kKe='"',OKe='"',IKe="»",NKe="®",qKe="®",xKe="§",RKe="­",jKe="¹",MKe="²",LKe="³",UKe="ß",GKe="Þ",VKe="þ",HKe="×",WKe="Ú",JKe="ú",zKe="Û",KKe="û",XKe="Ù",YKe="ù",ZKe="¨",QKe="Ü",eXe="ü",tXe="Ý",rXe="ý",nXe="¥",uXe="ÿ",sXe={Aacute:aze,aacute:ize,Acirc:cze,acirc:lze,acute:pze,AElig:dze,aelig:fze,Agrave:Dze,agrave:hze,amp:mze,AMP:Eze,Aring:yze,aring:vze,Atilde:gze,atilde:Aze,Auml:Fze,auml:Cze,brvbar:bze,Ccedil:Sze,ccedil:wze,cedil:_ze,cent:Bze,copy:Tze,COPY:$ze,curren:Pze,deg:kze,divide:Oze,Eacute:Ize,eacute:Nze,Ecirc:qze,ecirc:xze,Egrave:Rze,egrave:jze,ETH:Mze,eth:Lze,Euml:Uze,euml:Gze,frac12:Vze,frac14:Hze,frac34:Wze,gt:Jze,GT:zze,Iacute:Kze,iacute:Xze,Icirc:Yze,icirc:Zze,iexcl:Qze,Igrave:eKe,igrave:tKe,iquest:rKe,Iuml:nKe,iuml:uKe,laquo:sKe,lt:oKe,LT:aKe,macr:iKe,micro:cKe,middot:lKe,nbsp:pKe,not:dKe,Ntilde:fKe,ntilde:DKe,Oacute:hKe,oacute:mKe,Ocirc:EKe,ocirc:yKe,Ograve:vKe,ograve:gKe,ordf:AKe,ordm:FKe,Oslash:CKe,oslash:bKe,Otilde:SKe,otilde:wKe,Ouml:_Ke,ouml:BKe,para:TKe,plusmn:$Ke,pound:PKe,quot:kKe,QUOT:OKe,raquo:IKe,reg:NKe,REG:qKe,sect:xKe,shy:RKe,sup1:jKe,sup2:MKe,sup3:LKe,szlig:UKe,THORN:GKe,thorn:VKe,times:HKe,Uacute:WKe,uacute:JKe,Ucirc:zKe,ucirc:KKe,Ugrave:XKe,ugrave:YKe,uml:ZKe,Uuml:QKe,uuml:eXe,Yacute:tXe,yacute:rXe,yen:nXe,yuml:uXe},oXe="&",aXe="'",iXe=">",cXe="<",lXe='"',U_={amp:oXe,apos:aXe,gt:iXe,lt:cXe,quot:lXe};var X3={};const pXe={0:65533,128:8364,130:8218,131:402,132:8222,133:8230,134:8224,135:8225,136:710,137:8240,138:352,139:8249,140:338,142:381,145:8216,146:8217,147:8220,148:8221,149:8226,150:8211,151:8212,152:732,153:8482,154:353,155:8250,156:339,158:382,159:376};var dXe=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X3,"__esModule",{value:!0});var g8=dXe(pXe),fXe=String.fromCodePoint||function(e){var t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t};function DXe(e){return e>=55296&&e<=57343||e>1114111?"�":(e in g8.default&&(e=g8.default[e]),fXe(e))}X3.default=DXe;var qd=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Su,"__esModule",{value:!0});Su.decodeHTML=Su.decodeHTMLStrict=Su.decodeXML=void 0;var jh=qd(L_),hXe=qd(sXe),mXe=qd(U_),A8=qd(X3),EXe=/&(?:[a-zA-Z0-9]+|#[xX][\da-fA-F]+|#\d+);/g;Su.decodeXML=G_(mXe.default);Su.decodeHTMLStrict=G_(jh.default);function G_(e){var t=V_(e);return function(r){return String(r).replace(EXe,t)}}var F8=function(e,t){return e1?AXe(e):e.charCodeAt(0)).toString(16).toUpperCase()+";"}function FXe(e,t){return function(r){return r.replace(t,function(n){return e[n]}).replace(X_,xd)}}var Y_=new RegExp(J_.source+"|"+X_.source,"g");function CXe(e){return e.replace(Y_,xd)}Vr.escape=CXe;function bXe(e){return e.replace(J_,xd)}Vr.escapeUTF8=bXe;function Z_(e){return function(t){return t.replace(Y_,function(r){return e[r]||xd(r)})}}(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.decodeXMLStrict=e.decodeHTML5Strict=e.decodeHTML4Strict=e.decodeHTML5=e.decodeHTML4=e.decodeHTMLStrict=e.decodeHTML=e.decodeXML=e.encodeHTML5=e.encodeHTML4=e.escapeUTF8=e.escape=e.encodeNonAsciiHTML=e.encodeHTML=e.encodeXML=e.encode=e.decodeStrict=e.decode=void 0;var t=Su,r=Vr;function n(i,c){return(!c||c<=0?t.decodeXML:t.decodeHTML)(i)}e.decode=n;function u(i,c){return(!c||c<=0?t.decodeXML:t.decodeHTMLStrict)(i)}e.decodeStrict=u;function s(i,c){return(!c||c<=0?r.encodeXML:r.encodeHTML)(i)}e.encode=s;var o=Vr;Object.defineProperty(e,"encodeXML",{enumerable:!0,get:function(){return o.encodeXML}}),Object.defineProperty(e,"encodeHTML",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeNonAsciiHTML",{enumerable:!0,get:function(){return o.encodeNonAsciiHTML}}),Object.defineProperty(e,"escape",{enumerable:!0,get:function(){return o.escape}}),Object.defineProperty(e,"escapeUTF8",{enumerable:!0,get:function(){return o.escapeUTF8}}),Object.defineProperty(e,"encodeHTML4",{enumerable:!0,get:function(){return o.encodeHTML}}),Object.defineProperty(e,"encodeHTML5",{enumerable:!0,get:function(){return o.encodeHTML}});var a=Su;Object.defineProperty(e,"decodeXML",{enumerable:!0,get:function(){return a.decodeXML}}),Object.defineProperty(e,"decodeHTML",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTMLStrict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML4",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML5",{enumerable:!0,get:function(){return a.decodeHTML}}),Object.defineProperty(e,"decodeHTML4Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeHTML5Strict",{enumerable:!0,get:function(){return a.decodeHTMLStrict}}),Object.defineProperty(e,"decodeXMLStrict",{enumerable:!0,get:function(){return a.decodeXML}})})(M_);var ga={};Object.defineProperty(ga,"__esModule",{value:!0});ga.attributeNames=ga.elementNames=void 0;ga.elementNames=new Map([["altglyph","altGlyph"],["altglyphdef","altGlyphDef"],["altglyphitem","altGlyphItem"],["animatecolor","animateColor"],["animatemotion","animateMotion"],["animatetransform","animateTransform"],["clippath","clipPath"],["feblend","feBlend"],["fecolormatrix","feColorMatrix"],["fecomponenttransfer","feComponentTransfer"],["fecomposite","feComposite"],["feconvolvematrix","feConvolveMatrix"],["fediffuselighting","feDiffuseLighting"],["fedisplacementmap","feDisplacementMap"],["fedistantlight","feDistantLight"],["fedropshadow","feDropShadow"],["feflood","feFlood"],["fefunca","feFuncA"],["fefuncb","feFuncB"],["fefuncg","feFuncG"],["fefuncr","feFuncR"],["fegaussianblur","feGaussianBlur"],["feimage","feImage"],["femerge","feMerge"],["femergenode","feMergeNode"],["femorphology","feMorphology"],["feoffset","feOffset"],["fepointlight","fePointLight"],["fespecularlighting","feSpecularLighting"],["fespotlight","feSpotLight"],["fetile","feTile"],["feturbulence","feTurbulence"],["foreignobject","foreignObject"],["glyphref","glyphRef"],["lineargradient","linearGradient"],["radialgradient","radialGradient"],["textpath","textPath"]]);ga.attributeNames=new Map([["definitionurl","definitionURL"],["attributename","attributeName"],["attributetype","attributeType"],["basefrequency","baseFrequency"],["baseprofile","baseProfile"],["calcmode","calcMode"],["clippathunits","clipPathUnits"],["diffuseconstant","diffuseConstant"],["edgemode","edgeMode"],["filterunits","filterUnits"],["glyphref","glyphRef"],["gradienttransform","gradientTransform"],["gradientunits","gradientUnits"],["kernelmatrix","kernelMatrix"],["kernelunitlength","kernelUnitLength"],["keypoints","keyPoints"],["keysplines","keySplines"],["keytimes","keyTimes"],["lengthadjust","lengthAdjust"],["limitingconeangle","limitingConeAngle"],["markerheight","markerHeight"],["markerunits","markerUnits"],["markerwidth","markerWidth"],["maskcontentunits","maskContentUnits"],["maskunits","maskUnits"],["numoctaves","numOctaves"],["pathlength","pathLength"],["patterncontentunits","patternContentUnits"],["patterntransform","patternTransform"],["patternunits","patternUnits"],["pointsatx","pointsAtX"],["pointsaty","pointsAtY"],["pointsatz","pointsAtZ"],["preservealpha","preserveAlpha"],["preserveaspectratio","preserveAspectRatio"],["primitiveunits","primitiveUnits"],["refx","refX"],["refy","refY"],["repeatcount","repeatCount"],["repeatdur","repeatDur"],["requiredextensions","requiredExtensions"],["requiredfeatures","requiredFeatures"],["specularconstant","specularConstant"],["specularexponent","specularExponent"],["spreadmethod","spreadMethod"],["startoffset","startOffset"],["stddeviation","stdDeviation"],["stitchtiles","stitchTiles"],["surfacescale","surfaceScale"],["systemlanguage","systemLanguage"],["tablevalues","tableValues"],["targetx","targetX"],["targety","targetY"],["textlength","textLength"],["viewbox","viewBox"],["viewtarget","viewTarget"],["xchannelselector","xChannelSelector"],["ychannelselector","yChannelSelector"],["zoomandpan","zoomAndPan"]]);var Yo=Ce&&Ce.__assign||function(){return Yo=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&(n+=Z3(e.children,t)),(t.xmlMode||!C8.has(e.name))&&(n+="")),n}function IXe(e){return"<"+e.data+">"}function NXe(e,t){var r=e.data||"";return t.decodeEntities!==!1&&!(!t.xmlMode&&e.parent&&BXe.has(e.parent.name))&&(r=Q_.encodeXML(r)),r}function qXe(e){return""}function xXe(e){return""}var RXe=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Gr,"__esModule",{value:!0});Gr.innerText=Gr.textContent=Gr.getText=Gr.getInnerHTML=Gr.getOuterHTML=void 0;var Zn=oo,jXe=RXe(K3),MXe=Sc;function tB(e,t){return(0,jXe.default)(e,t)}Gr.getOuterHTML=tB;function LXe(e,t){return(0,Zn.hasChildren)(e)?e.children.map(function(r){return tB(r,t)}).join(""):""}Gr.getInnerHTML=LXe;function Ll(e){return Array.isArray(e)?e.map(Ll).join(""):(0,Zn.isTag)(e)?e.name==="br"?` +`:Ll(e.children):(0,Zn.isCDATA)(e)?Ll(e.children):(0,Zn.isText)(e)?e.data:""}Gr.getText=Ll;function Mh(e){return Array.isArray(e)?e.map(Mh).join(""):(0,Zn.hasChildren)(e)&&!(0,Zn.isComment)(e)?Mh(e.children):(0,Zn.isText)(e)?e.data:""}Gr.textContent=Mh;function Lh(e){return Array.isArray(e)?e.map(Lh).join(""):(0,Zn.hasChildren)(e)&&(e.type===MXe.ElementType.Tag||(0,Zn.isCDATA)(e))?Lh(e.children):(0,Zn.isText)(e)?e.data:""}Gr.innerText=Lh;var tr={};Object.defineProperty(tr,"__esModule",{value:!0});tr.prevElementSibling=tr.nextElementSibling=tr.getName=tr.hasAttrib=tr.getAttributeValue=tr.getSiblings=tr.getParent=tr.getChildren=void 0;var rB=oo,UXe=[];function nB(e){var t;return(t=e.children)!==null&&t!==void 0?t:UXe}tr.getChildren=nB;function uB(e){return e.parent||null}tr.getParent=uB;function GXe(e){var t,r,n=uB(e);if(n!=null)return nB(n);for(var u=[e],s=e.prev,o=e.next;s!=null;)u.unshift(s),t=s,s=t.prev;for(;o!=null;)u.push(o),r=o,o=r.next;return u}tr.getSiblings=GXe;function VXe(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}tr.getAttributeValue=VXe;function HXe(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}tr.hasAttrib=HXe;function WXe(e){return e.name}tr.getName=WXe;function JXe(e){for(var t,r=e.next;r!==null&&!(0,rB.isTag)(r);)t=r,r=t.next;return r}tr.nextElementSibling=JXe;function zXe(e){for(var t,r=e.prev;r!==null&&!(0,rB.isTag)(r);)t=r,r=t.prev;return r}tr.prevElementSibling=zXe;var Ir={};Object.defineProperty(Ir,"__esModule",{value:!0});Ir.prepend=Ir.prependChild=Ir.append=Ir.appendChild=Ir.replaceElement=Ir.removeElement=void 0;function wc(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){var t=e.parent.children;t.splice(t.lastIndexOf(e),1)}}Ir.removeElement=wc;function KXe(e,t){var r=t.prev=e.prev;r&&(r.next=t);var n=t.next=e.next;n&&(n.prev=t);var u=t.parent=e.parent;if(u){var s=u.children;s[s.lastIndexOf(e)]=t}}Ir.replaceElement=KXe;function XXe(e,t){if(wc(t),t.next=null,t.parent=e,e.children.push(t)>1){var r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}Ir.appendChild=XXe;function YXe(e,t){wc(t);var r=e.parent,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){var u=r.children;u.splice(u.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}Ir.append=YXe;function ZXe(e,t){if(wc(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){var r=e.children[1];r.prev=t,t.next=r}else t.next=null}Ir.prependChild=ZXe;function QXe(e,t){wc(t);var r=e.parent;if(r){var n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}Ir.prepend=QXe;var Fr={};Object.defineProperty(Fr,"__esModule",{value:!0});Fr.findAll=Fr.existsOne=Fr.findOne=Fr.findOneChild=Fr.find=Fr.filter=void 0;var Gi=oo;function eYe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),Array.isArray(t)||(t=[t]),Q3(e,t,r,n)}Fr.filter=eYe;function Q3(e,t,r,n){for(var u=[],s=0,o=t;s0){var i=Q3(e,a.children,r,n);if(u.push.apply(u,i),n-=i.length,n<=0)break}}return u}Fr.find=Q3;function tYe(e,t){return t.find(e)}Fr.findOneChild=tYe;function sB(e,t,r){r===void 0&&(r=!0);for(var n=null,u=0;u0&&(n=sB(e,s.children));else continue}return n}Fr.findOne=sB;function oB(e,t){return t.some(function(r){return(0,Gi.isTag)(r)&&(e(r)||r.children.length>0&&oB(e,r.children))})}Fr.existsOne=oB;function rYe(e,t){for(var r,n=[],u=t.filter(Gi.isTag),s;s=u.shift();){var o=(r=s.children)===null||r===void 0?void 0:r.filter(Gi.isTag);o&&o.length>0&&u.unshift.apply(u,o),e(s)&&n.push(s)}return n}Fr.findAll=rYe;var Hr={};Object.defineProperty(Hr,"__esModule",{value:!0});Hr.getElementsByTagType=Hr.getElementsByTagName=Hr.getElementById=Hr.getElements=Hr.testElement=void 0;var js=oo,Rd=Fr,Pp={tag_name:function(e){return typeof e=="function"?function(t){return(0,js.isTag)(t)&&e(t.name)}:e==="*"?js.isTag:function(t){return(0,js.isTag)(t)&&t.name===e}},tag_type:function(e){return typeof e=="function"?function(t){return e(t.type)}:function(t){return t.type===e}},tag_contains:function(e){return typeof e=="function"?function(t){return(0,js.isText)(t)&&e(t.data)}:function(t){return(0,js.isText)(t)&&t.data===e}}};function aB(e,t){return typeof t=="function"?function(r){return(0,js.isTag)(r)&&t(r.attribs[e])}:function(r){return(0,js.isTag)(r)&&r.attribs[e]===t}}function nYe(e,t){return function(r){return e(r)||t(r)}}function iB(e){var t=Object.keys(e).map(function(r){var n=e[r];return Object.prototype.hasOwnProperty.call(Pp,r)?Pp[r](n):aB(r,n)});return t.length===0?null:t.reduce(nYe)}function uYe(e,t){var r=iB(e);return r?r(t):!0}Hr.testElement=uYe;function sYe(e,t,r,n){n===void 0&&(n=1/0);var u=iB(e);return u?(0,Rd.filter)(u,t,r,n):[]}Hr.getElements=sYe;function oYe(e,t,r){return r===void 0&&(r=!0),Array.isArray(t)||(t=[t]),(0,Rd.findOne)(aB("id",e),t,r)}Hr.getElementById=oYe;function aYe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,Rd.filter)(Pp.tag_name(e),t,r,n)}Hr.getElementsByTagName=aYe;function iYe(e,t,r,n){return r===void 0&&(r=!0),n===void 0&&(n=1/0),(0,Rd.filter)(Pp.tag_type(e),t,r,n)}Hr.getElementsByTagType=iYe;var ss={};Object.defineProperty(ss,"__esModule",{value:!0});ss.uniqueSort=ss.compareDocumentPosition=ss.removeSubsets=void 0;var b8=oo;function cYe(e){for(var t=e.length;--t>=0;){var r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(var n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}ss.removeSubsets=cYe;function cB(e,t){var r=[],n=[];if(e===t)return 0;for(var u=(0,b8.hasChildren)(e)?e:e.parent;u;)r.unshift(u),u=u.parent;for(u=(0,b8.hasChildren)(t)?t:t.parent;u;)n.unshift(u),u=u.parent;for(var s=Math.min(r.length,n.length),o=0;oi.indexOf(l)?a===t?20:4:a===e?10:2}ss.compareDocumentPosition=cB;function lYe(e){return e=e.filter(function(t,r,n){return!n.includes(t,r+1)}),e.sort(function(t,r){var n=cB(t,r);return n&2?-1:n&4?1:0}),e}ss.uniqueSort=lYe;var jd={};Object.defineProperty(jd,"__esModule",{value:!0});jd.getFeed=void 0;var pYe=Gr,_c=Hr;function dYe(e){var t=kp(EYe,e);return t?t.name==="feed"?fYe(t):DYe(t):null}jd.getFeed=dYe;function fYe(e){var t,r=e.children,n={type:"atom",items:(0,_c.getElementsByTagName)("entry",r).map(function(o){var a,i=o.children,c={media:lB(i)};Pr(c,"id","id",i),Pr(c,"title","title",i);var l=(a=kp("link",i))===null||a===void 0?void 0:a.attribs.href;l&&(c.link=l);var p=Gs("summary",i)||Gs("content",i);p&&(c.description=p);var d=Gs("updated",i);return d&&(c.pubDate=new Date(d)),c})};Pr(n,"id","id",r),Pr(n,"title","title",r);var u=(t=kp("link",r))===null||t===void 0?void 0:t.attribs.href;u&&(n.link=u),Pr(n,"description","subtitle",r);var s=Gs("updated",r);return s&&(n.updated=new Date(s)),Pr(n,"author","email",r,!0),n}function DYe(e){var t,r,n=(r=(t=kp("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],u={type:e.name.substr(0,3),id:"",items:(0,_c.getElementsByTagName)("item",e.children).map(function(o){var a=o.children,i={media:lB(a)};Pr(i,"id","guid",a),Pr(i,"title","title",a),Pr(i,"link","link",a),Pr(i,"description","description",a);var c=Gs("pubDate",a);return c&&(i.pubDate=new Date(c)),i})};Pr(u,"title","title",n),Pr(u,"link","link",n),Pr(u,"description","description",n);var s=Gs("lastBuildDate",n);return s&&(u.updated=new Date(s)),Pr(u,"author","managingEditor",n,!0),u}var hYe=["url","type","lang"],mYe=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"];function lB(e){return(0,_c.getElementsByTagName)("media:content",e).map(function(t){for(var r=t.attribs,n={medium:r.medium,isDefault:!!r.isDefault},u=0,s=hYe;u>10|55296,n&1023|56320)}function Qa(e){return e.replace(vYe,CYe)}function A2(e){return e===39||e===34}function w8(e){return e===32||e===9||e===10||e===12||e===13}function bYe(e){const t=[],r=dB(t,`${e}`,0);if(r0&&r0&&pB(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function c(d){if(n.length>0&&n[n.length-1].type===pt.Descendant){n[n.length-1].type=d;return}i(),n.push({type:d})}function l(d,f){n.push({type:pt.Attribute,name:d,action:f,value:u(1),namespace:null,ignoreCase:"quirks"})}function p(){if(n.length&&n[n.length-1].type===pt.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(s(0),t.length===r)return r;e:for(;re.charCodeAt(0))),_8=new Set(DB.map(e=>e.charCodeAt(0))),Zo=new Set([...DB,"~","^","$","*","+","!","|",":","[","]"," ","."].map(e=>e.charCodeAt(0)));function hB(e){return e.map(t=>t.map(wYe).join("")).join(", ")}function wYe(e,t,r){switch(e.type){case pt.Child:return t===0?"> ":" > ";case pt.Parent:return t===0?"< ":" < ";case pt.Sibling:return t===0?"~ ":" ~ ";case pt.Adjacent:return t===0?"+ ":" + ";case pt.Descendant:return" ";case pt.ColumnCombinator:return t===0?"|| ":" || ";case pt.Universal:return e.namespace==="*"&&t+10?n+e.slice(r):e}const BYe=Object.freeze(Object.defineProperty({__proto__:null,get AttributeAction(){return Tt},IgnoreCaseMode:yYe,get SelectorType(){return pt},isTraversal:pB,parse:bYe,stringify:hB},Symbol.toStringTag,{value:"Module"})),Md=L8(BYe);var ey={},Ld={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.isTraversal=e.procedure=void 0,e.procedure={universal:50,tag:30,attribute:1,pseudo:0,"pseudo-element":0,"column-combinator":-1,descendant:-1,child:-1,parent:-1,sibling:-1,adjacent:-1,_flexibleDescendant:-1};function t(r){return e.procedure[r.type]<0}e.isTraversal=t})(Ld);Object.defineProperty(ey,"__esModule",{value:!0});var T8=Md,TYe=Ld,$8={exists:10,equals:8,not:7,start:6,end:6,any:5,hyphen:4,element:4};function $Ye(e){for(var t=e.map(EB),r=1;r=0&&n>=1);else if(e.type===T8.SelectorType.Pseudo)if(!e.data)t=3;else if(e.name==="has"||e.name==="contains")t=0;else if(Array.isArray(e.data)){t=0;for(var r=0;rt&&(t=n)}e.data.length>1&&t>0&&(t-=1)}else t=1;return t}var Ud={},Gd={};Object.defineProperty(Gd,"__esModule",{value:!0});Gd.attributeRules=void 0;var Sl=io,PYe=/[-[\]{}()*+?.,\\^$|#\s]/g;function P8(e){return e.replace(PYe,"\\$&")}var kYe=new Set(["accept","accept-charset","align","alink","axis","bgcolor","charset","checked","clear","codetype","color","compact","declare","defer","dir","direction","disabled","enctype","face","frame","hreflang","http-equiv","lang","language","link","media","method","multiple","nohref","noresize","noshade","nowrap","readonly","rel","rev","rules","scope","scrolling","selected","shape","target","text","type","valign","valuetype","vlink"]);function Ps(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&kYe.has(e.name)}Gd.attributeRules={equals:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;return Ps(t,r)?(s=s.toLowerCase(),function(o){var a=n.getAttributeValue(o,u);return a!=null&&a.length===s.length&&a.toLowerCase()===s&&e(o)}):function(o){return n.getAttributeValue(o,u)===s&&e(o)}},hyphen:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=s.length;return Ps(t,r)?(s=s.toLowerCase(),function(i){var c=n.getAttributeValue(i,u);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o).toLowerCase()===s&&e(i)}):function(i){var c=n.getAttributeValue(i,u);return c!=null&&(c.length===o||c.charAt(o)==="-")&&c.substr(0,o)===s&&e(i)}},element:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;if(/\s/.test(s))return Sl.falseFunc;var o=new RegExp("(?:^|\\s)".concat(P8(s),"(?:$|\\s)"),Ps(t,r)?"i":"");return function(i){var c=n.getAttributeValue(i,u);return c!=null&&c.length>=s.length&&o.test(c)&&e(i)}},exists:function(e,t,r){var n=t.name,u=r.adapter;return function(s){return u.hasAttrib(s,n)&&e(s)}},start:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=s.length;return o===0?Sl.falseFunc:Ps(t,r)?(s=s.toLowerCase(),function(a){var i=n.getAttributeValue(a,u);return i!=null&&i.length>=o&&i.substr(0,o).toLowerCase()===s&&e(a)}):function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.startsWith(s))&&e(a)}},end:function(e,t,r){var n=r.adapter,u=t.name,s=t.value,o=-s.length;return o===0?Sl.falseFunc:Ps(t,r)?(s=s.toLowerCase(),function(a){var i;return((i=n.getAttributeValue(a,u))===null||i===void 0?void 0:i.substr(o).toLowerCase())===s&&e(a)}):function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.endsWith(s))&&e(a)}},any:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;if(s==="")return Sl.falseFunc;if(Ps(t,r)){var o=new RegExp(P8(s),"i");return function(i){var c=n.getAttributeValue(i,u);return c!=null&&c.length>=s.length&&o.test(c)&&e(i)}}return function(a){var i;return!!(!((i=n.getAttributeValue(a,u))===null||i===void 0)&&i.includes(s))&&e(a)}},not:function(e,t,r){var n=r.adapter,u=t.name,s=t.value;return s===""?function(o){return!!n.getAttributeValue(o,u)&&e(o)}:Ps(t,r)?(s=s.toLowerCase(),function(o){var a=n.getAttributeValue(o,u);return(a==null||a.length!==s.length||a.toLowerCase()!==s)&&e(o)}):function(o){return n.getAttributeValue(o,u)!==s&&e(o)}}};var ty={},yB={},vB={},Vd={};Object.defineProperty(Vd,"__esModule",{value:!0});Vd.parse=void 0;var OYe=new Set([9,10,12,13,32]),k8=48,IYe=57;function NYe(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];var t=0,r=0,n=s(),u=o();if(t=k8&&e.charCodeAt(t)<=IYe;)c=c*10+(e.charCodeAt(t)-k8),t++;return t===i?null:c}function a(){for(;t=r};var n=Math.abs(t),u=(r%n+n)%n;return t>1?function(s){return s>=r&&s%n===u}:function(s){return s<=r&&s%n===u}}Aa.compile=xYe;function RYe(e){var t=e[0],r=e[1]-1,n=0;if(t<0){var u=-t,s=(r%u+u)%u;return function(){var o=s+u*n++;return o>r?null:o}}return t===0?r<0?function(){return null}:function(){return n++===0?r:null}:(r<0&&(r+=t*Math.ceil(-r/t)),function(){return t*n+++r})}Aa.generate=RYe;(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.sequence=e.generate=e.compile=e.parse=void 0;var t=Vd;Object.defineProperty(e,"parse",{enumerable:!0,get:function(){return t.parse}});var r=Aa;Object.defineProperty(e,"compile",{enumerable:!0,get:function(){return r.compile}}),Object.defineProperty(e,"generate",{enumerable:!0,get:function(){return r.generate}});function n(s){return(0,r.compile)((0,t.parse)(s))}e.default=n;function u(s){return(0,r.generate)((0,t.parse)(s))}e.sequence=u})(vB);(function(e){var t=Ce&&Ce.__importDefault||function(o){return o&&o.__esModule?o:{default:o}};Object.defineProperty(e,"__esModule",{value:!0}),e.filters=void 0;var r=t(vB),n=io;function u(o,a){return function(i){var c=a.getParent(i);return c!=null&&a.isTag(c)&&o(i)}}e.filters={contains:function(o,a,i){var c=i.adapter;return function(p){return o(p)&&c.getText(p).includes(a)}},icontains:function(o,a,i){var c=i.adapter,l=a.toLowerCase();return function(d){return o(d)&&c.getText(d).toLowerCase().includes(l)}},"nth-child":function(o,a,i){var c=i.adapter,l=i.equals,p=(0,r.default)(a);return p===n.falseFunc?n.falseFunc:p===n.trueFunc?u(o,c):function(f){for(var h=c.getSiblings(f),y=0,A=0;A=0&&!l(f,h[A]);A--)c.isTag(h[A])&&y++;return p(y)&&o(f)}},"nth-of-type":function(o,a,i){var c=i.adapter,l=i.equals,p=(0,r.default)(a);return p===n.falseFunc?n.falseFunc:p===n.trueFunc?u(o,c):function(f){for(var h=c.getSiblings(f),y=0,A=0;A=0;A--){var m=h[A];if(l(f,m))break;c.isTag(m)&&c.getName(m)===c.getName(f)&&y++}return p(y)&&o(f)}},root:function(o,a,i){var c=i.adapter;return function(l){var p=c.getParent(l);return(p==null||!c.isTag(p))&&o(l)}},scope:function(o,a,i,c){var l=i.equals;return!c||c.length===0?e.filters.root(o,a,i):c.length===1?function(p){return l(c[0],p)&&o(p)}:function(p){return c.includes(p)&&o(p)}},hover:s("isHovered"),visited:s("isVisited"),active:s("isActive")};function s(o){return function(i,c,l){var p=l.adapter,d=p[o];return typeof d!="function"?n.falseFunc:function(h){return d(h)&&i(h)}}}})(yB);var Fa={};Object.defineProperty(Fa,"__esModule",{value:!0});Fa.verifyPseudoArgs=Fa.pseudos=void 0;Fa.pseudos={empty:function(e,t){var r=t.adapter;return!r.getChildren(e).some(function(n){return r.isTag(n)||r.getText(n)!==""})},"first-child":function(e,t){var r=t.adapter,n=t.equals,u=r.getSiblings(e).find(function(s){return r.isTag(s)});return u!=null&&n(e,u)},"last-child":function(e,t){for(var r=t.adapter,n=t.equals,u=r.getSiblings(e),s=u.length-1;s>=0;s--){if(n(e,u[s]))return!0;if(r.isTag(u[s]))break}return!1},"first-of-type":function(e,t){for(var r=t.adapter,n=t.equals,u=r.getSiblings(e),s=r.getName(e),o=0;o=0;o--){var a=u[o];if(n(e,a))return!0;if(r.isTag(a)&&r.getName(a)===s)break}return!1},"only-of-type":function(e,t){var r=t.adapter,n=t.equals,u=r.getName(e);return r.getSiblings(e).every(function(s){return n(e,s)||!r.isTag(s)||r.getName(s)!==u})},"only-child":function(e,t){var r=t.adapter,n=t.equals;return r.getSiblings(e).every(function(u){return n(e,u)||!r.isTag(u)})}};function jYe(e,t,r){if(r===null){if(e.length>2)throw new Error("pseudo-selector :".concat(t," requires an argument"))}else if(e.length===2)throw new Error("pseudo-selector :".concat(t," doesn't have any arguments"))}Fa.verifyPseudoArgs=jYe;var Hd={};Object.defineProperty(Hd,"__esModule",{value:!0});Hd.aliases=void 0;Hd.aliases={"any-link":":is(a, area, link)[href]",link:":any-link:not(:visited)",disabled:`:is( :is(button, input, select, textarea, optgroup, option)[disabled], optgroup[disabled] > option, fieldset[disabled]:not(fieldset[disabled] legend:first-of-type *) - )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var jf={};(function(e){var t=we&&we.__spreadArray||function(a,i,c){if(c||arguments.length===2)for(var l=0,p=i.length,f;l"u")return function(l){for(var p=l;p=s.getParent(p);)if(s.isTag(p)&&e(p))return!0;return!1};var i=new WeakSet;return function(l){for(var p=l;p=s.getParent(p);)if(!i.has(p)){if(s.isTag(p)&&e(p))return!0;i.add(p)}return!1}}case"_flexibleDescendant":return function(l){var p=l;do if(s.isTag(p)&&e(p))return!0;while(p=s.getParent(p));return!1};case Bn.SelectorType.Parent:return function(l){return s.getChildren(l).some(function(p){return s.isTag(p)&&e(p)})};case Bn.SelectorType.Child:return function(l){var p=s.getParent(l);return p!=null&&s.isTag(p)&&e(p)};case Bn.SelectorType.Sibling:return function(l){for(var p=s.getSiblings(l),f=0;f0&&(0,tXe.isTraversal)(a[0])&&a[0].type!=="descendant"))if(u&&!a.some(I_))a.unshift(uXe);else continue;a.unshift(oXe)}}function R3(e,t,r){var n;e=e.filter(function(i){return i.length>0}),e.forEach(eXe.default),r=(n=t.context)!==null&&n!==void 0?n:r;var u=Array.isArray(r),s=r&&(Array.isArray(r)?r:[r]);aXe(e,t,s);var o=!1,a=e.map(function(i){if(i.length>=2){var c=i[0],l=i[1];c.type!=="pseudo"||c.name!=="scope"||(u&&l.type==="descendant"?i[1]=sXe:(l.type==="adjacent"||l.type==="sibling")&&(o=!0))}return iXe(i,t,s)}).reduce(cXe,ts.falseFunc);return a.shouldTestNextSiblings=o,a}as.compileToken=R3;function iXe(e,t,r){var n;return e.reduce(function(u,s){return u===ts.falseFunc?ts.falseFunc:(0,rXe.compileGeneralSelector)(u,s,t,r,R3)},(n=t.rootFunc)!==null&&n!==void 0?n:ts.trueFunc)}function cXe(e,t){return t===ts.falseFunc||e===ts.trueFunc?e:e===ts.falseFunc||t===ts.trueFunc?t:function(n){return e(n)||t(n)}}(function(e){var t=we&&we.__createBinding||(Object.create?function(m,y,F,B){B===void 0&&(B=F);var P=Object.getOwnPropertyDescriptor(y,F);(!P||("get"in P?!y.__esModule:P.writable||P.configurable))&&(P={enumerable:!0,get:function(){return y[F]}}),Object.defineProperty(m,B,P)}:function(m,y,F,B){B===void 0&&(B=F),m[B]=y[F]}),r=we&&we.__setModuleDefault||(Object.create?function(m,y){Object.defineProperty(m,"default",{enumerable:!0,value:y})}:function(m,y){m.default=y}),n=we&&we.__importStar||function(m){if(m&&m.__esModule)return m;var y={};if(m!=null)for(var F in m)F!=="default"&&Object.prototype.hasOwnProperty.call(m,F)&&t(y,m,F);return r(y,m),y};Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=e.pseudos=e.filters=e.is=e.selectOne=e.selectAll=e.prepareContext=e._compileToken=e._compileUnsafe=e.compile=void 0;var u=n(Mw),s=mo,o=as,a=jf,i=function(m,y){return m===y},c={adapter:u,equals:i};function l(m){var y,F,B,P,$=m??c;return(y=$.adapter)!==null&&y!==void 0||($.adapter=u),(F=$.equals)!==null&&F!==void 0||($.equals=(P=(B=$.adapter)===null||B===void 0?void 0:B.equals)!==null&&P!==void 0?P:i),$}function p(m){return function(F,B,P){var $=l(B);return m(F,$,P)}}e.compile=p(o.compile),e._compileUnsafe=p(o.compileUnsafe),e._compileToken=p(o.compileToken);function f(m){return function(F,B,P){var $=l(P);typeof F!="function"&&(F=(0,o.compileUnsafe)(F,$,B));var I=d(B,$.adapter,F.shouldTestNextSiblings);return m(F,I,$)}}function d(m,y,F){return F===void 0&&(F=!1),F&&(m=h(m,y)),Array.isArray(m)?y.removeSubsets(m):y.getChildren(m)}e.prepareContext=d;function h(m,y){for(var F=Array.isArray(m)?m.slice(0):[m],B=F.length,P=0;P-1;){for(r=n=e[t],e[t]=null,u=!0;n;){if(e.indexOf(n)>-1){u=!1,e.splice(t,1);break}n=L3(n)}u&&(e[t]=r)}return e}function q_(e,t){return t.some(function(r){return Mf(r)?e(r)||q_(e,Bc(r)):!1})}function mXe(e){var t=L3(e);return t&&Bc(t)}function EXe(e,t){return N_(e,t)!==void 0}function x_(e,t){for(var r=null,n=0,u=t.length;n0&&(r=x_(e,o))}}return r}function R_(e,t){for(var r=[],n=0,u=t.length;n"):"<".concat(t).concat(r,">").concat(n,"")},e.prototype.isVoidElement=function(t){return this.voidTags.has(t)},e}();U3.default=vXe;var Lf={},yXe=we&&we.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j_=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Lf,"__esModule",{value:!0});var gXe=_3,AXe=j_(Ra),FXe=j_(fo),CXe=function(e){yXe(t,e);function t(r,n,u){var s=e.call(this,n,u)||this;return s.nodeType=FXe.default.TEXT_NODE,s._rawText=r,s}return t.prototype.clone=function(){return new t(this._rawText,null)},Object.defineProperty(t.prototype,"rawText",{get:function(){return this._rawText},set:function(r){this._rawText=r,this._trimmedRawText=void 0,this._trimmedText=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedRawText",{get:function(){return this._trimmedRawText!==void 0?this._trimmedRawText:(this._trimmedRawText=a8(this.rawText),this._trimmedRawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedText",{get:function(){return this._trimmedText!==void 0?this._trimmedText:(this._trimmedText=a8(this.text),this._trimmedText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return(0,gXe.decode)(this.rawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.rawText},t}(AXe.default);Lf.default=CXe;function a8(e){for(var t=0,r,n;t>=0&&t0&&/[^\S\r\n]/.test(e[r-1]),s=n0&&n.push(r=[]),s.childNodes.forEach(u),r.length>0&&n.push(r=[])):s.childNodes.forEach(u);else if(s.nodeType===Yn.default.TEXT_NODE)if(s.isWhitespace)r.prependWhitespace=!0;else{var o=s.trimmedText;r.prependWhitespace&&(o=" ".concat(o),r.prependWhitespace=!1),r.push(o)}}return u(this),n.map(function(s){return s.join("").replace(/\s{2,}/g," ")}).join(` -`).replace(/\s+$/,"")},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var r=this.rawTagName;if(r){var n=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.voidTag.formatNode(r,n,this.innerHTML)}return this.innerHTML},Object.defineProperty(t.prototype,"innerHTML",{get:function(){return this.childNodes.map(function(r){return r.toString()}).join("")},set:function(r){var n=Xo(r),u=n.childNodes.length?n.childNodes:[new na.default(r,this)];vu(u,this),vu(this.childNodes,null),this.childNodes=u},enumerable:!1,configurable:!0}),t.prototype.set_content=function(r,n){if(n===void 0&&(n={}),r instanceof D2.default)r=[r];else if(typeof r=="string"){var u=Xo(r,n);r=u.childNodes.length?u.childNodes:[new na.default(r,this)]}return vu(this.childNodes,null),vu(r,this),this.childNodes=r,this},t.prototype.replaceWith=function(){for(var r=this,n=[],u=0;u-1&&(u.rawText=u.rawText.substr(0,s),this.childNodes.length=n+1)}}return this},Object.defineProperty(t.prototype,"structure",{get:function(){var r=[],n=0;function u(o){r.push(" ".repeat(n)+o)}function s(o){var a=o.id?"#".concat(o.id):"",i=o.classList.length?".".concat(o.classList.value.join(".")):"";u("".concat(o.rawTagName).concat(a).concat(i)),n++,o.childNodes.forEach(function(c){c.nodeType===Yn.default.ELEMENT_NODE?s(c):c.nodeType===Yn.default.TEXT_NODE&&(c.isWhitespace||u("#text"))}),n--}return s(this),r.join(` -`)},enumerable:!1,configurable:!0}),t.prototype.removeWhitespace=function(){var r=this,n=0;return this.childNodes.forEach(function(u){if(u.nodeType===Yn.default.TEXT_NODE){if(u.isWhitespace)return;u.rawText=u.trimmedRawText}else u.nodeType===Yn.default.ELEMENT_NODE&&u.removeWhitespace();r.childNodes[n++]=u}),this.childNodes.length=n,this},t.prototype.querySelectorAll=function(r){return(0,f2.selectAll)(r,this,{xmlMode:!0,adapter:d2.default})},t.prototype.querySelector=function(r){return(0,f2.selectOne)(r,this,{xmlMode:!0,adapter:d2.default})},t.prototype.getElementsByTagName=function(r){for(var n=r.toUpperCase(),u=[],s=[],o=this,a=0;a!==void 0;){var i=void 0;do i=o.childNodes[a++];while(a0&&(s.push(a),o=i,a=0))}return u},t.prototype.getElementById=function(r){for(var n=[],u=this,s=0;s!==void 0;){var o=void 0;do o=u.childNodes[s++];while(s0&&(n.push(s),u=o,s=0)}}return null},t.prototype.closest=function(r){var n=new Map,u=this,s=null;function o(i,c){for(var l=null,p=0,f=c.length;p0;){var u=r[--n];if(this===u)return r[n-1]||null}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousElementSibling",{get:function(){if(this.parentNode){for(var r=this.parentNode.childNodes,n=r.length,u=!1;n>0;){var s=r[--n];if(u){if(s instanceof t)return s||null}else this===s&&(u=!0)}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return Xo(this.toString()).firstChild},t}(D2.default);Pu.default=Ph;var Eu=/|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g,IXe=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi,NXe={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},i8={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},c8={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},ri="documentfragmentcontainer";function L_(e,t){var r,n;t===void 0&&(t={lowerCaseTagName:!1,comment:!1});var u=new M_.default((r=t==null?void 0:t.voidTag)===null||r===void 0?void 0:r.closingSlash,(n=t==null?void 0:t.voidTag)===null||n===void 0?void 0:n.tags),s=t.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},o=Object.keys(s),a=o.map(function(g){return new RegExp("^".concat(g,"$"),"i")}),i=o.filter(function(g){return s[g]}).map(function(g){return new RegExp("^".concat(g,"$"),"i")});function c(g){return i.some(function(O){return O.test(g)})}function l(g){return a.some(function(O){return O.test(g)})}var p=function(g,O){return[g-B,O-B]},f=new Ph(null,{},"",null,[0,e.length],u),d=f,h=[f],E=-1,A=void 0,m;e="<".concat(ri,">").concat(e,"");for(var y=t.lowerCaseTagName,F=e.length-(ri.length+2),B=ri.length+2;m=Eu.exec(e);){var P=m[0],$=m[1],I=m[2],U=m[3],j=m[4],W=P.length,te=Eu.lastIndex-W,Y=Eu.lastIndex;if(E>-1&&E+W"),C=y?e.toLocaleLowerCase().indexOf(v,Eu.lastIndex):e.indexOf(v,Eu.lastIndex),D=C===-1?F:C;if(c(I)){var oe=e.substring(Q,D);oe.length>0&&/\S/.test(oe)&&d.appendChild(new na.default(oe,d,p(Q,D)))}C===-1?E=Eu.lastIndex=e.length+1:(E=Eu.lastIndex=C+v.length,$="/")}}if($||j||NXe[I])for(;;)if((I==="a"||I==="A")&&(A=void 0),d.rawTagName===I){d.range[1]=p(-1,Math.max(E,Y))[1],h.pop(),d=(0,ra.default)(h);break}else{var pe=d.tagName;if(c8[pe]&&c8[pe][I]){h.pop(),d=(0,ra.default)(h);continue}break}}}return h}Pu.base_parse=L_;function Xo(e,t){t===void 0&&(t={lowerCaseTagName:!1,comment:!1});for(var r=L_(e,t),n=r[0],u=function(){var s=r.pop(),o=(0,ra.default)(r);s.parentNode&&s.parentNode.parentNode&&(s.parentNode===o&&s.tagName===o.tagName?t.parseNoneClosedTags!==!0&&(o.removeChild(s),s.childNodes.forEach(function(a){o.parentNode.appendChild(a)}),r.pop()):t.parseNoneClosedTags!==!0&&(o.removeChild(s),s.childNodes.forEach(function(a){o.appendChild(a)})))};r.length>1;)u();return n}Pu.parse=Xo;function vu(e,t){return e.map(function(r){return r.parentNode=t,r})}var U_={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Pu;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.parse}})})(U_);var G3={};Object.defineProperty(G3,"__esModule",{value:!0});var qXe=Pu;function xXe(e,t){t===void 0&&(t={lowerCaseTagName:!1,comment:!1});var r=(0,qXe.base_parse)(e,t);return r.length===1}G3.default=xXe;var Eo=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Er,"__esModule",{value:!0});Er.NodeType=Er.TextNode=Er.Node=Er.valid=Er.CommentNode=Er.HTMLElement=Er.parse=void 0;var G_=Eo(wf);Er.CommentNode=G_.default;var V_=Eo(Pu);Er.HTMLElement=V_.default;var H_=Eo(Ra);Er.Node=H_.default;var W_=Eo(Lf);Er.TextNode=W_.default;var J_=Eo(fo);Er.NodeType=J_.default;var z_=Eo(U_),K_=Eo(G3);Er.valid=K_.default;function qu(e,t){return t===void 0&&(t={lowerCaseTagName:!1,comment:!1}),(0,z_.default)(e,t)}Er.default=qu;Er.parse=qu;qu.parse=z_.default;qu.HTMLElement=V_.default;qu.CommentNode=G_.default;qu.valid=K_.default;qu.Node=H_.default;qu.TextNode=W_.default;qu.NodeType=J_.default;Object.defineProperty(Sf,"__esModule",{value:!0});Sf.default=void 0;var RXe=Er,jXe=X_(S3),MXe=X_(w3),LXe=["subtype-ns","subtype"];function X_(e){return e&&e.__esModule?e:{default:e}}function l8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function io(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function VXe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var HXe=1,WXe=3,Y_=[],JXe=()=>MXe.default.encode(new jXe.default(4)).substring(0,12),zXe=e=>{var t={};return e.forEach(r=>{var n=JXe();t[n]={type:r.subtype,blocks:r.content||[]},r.target=n,delete r.content,delete r.new}),t},KXe=e=>{var t=e.attributes;return t.length?[...t].reduce((r,n)=>(r[n.name]=n.value,r),{}):typeof t=="object"&&t},XXe=e=>e.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())),YXe=e=>Object.keys(e).reduce((t,r)=>{var n=XXe(r);return t[n]=e[r],t},{}),ZXe=e=>e==="true"?!0:e==="false"?!1:e,QXe=function(t){var r=Object.keys(t).reduce((n,u)=>(n[u]=ZXe(t[u]),n),{});return r},Z_=e=>{var t=r=>{var n=r.dataset;if(n)return YXe(n);var u=KXe(r);return u&&Object.keys(u).reduce((s,o)=>{var a=o.match(new RegExp("(?<=data-).+"));return a&&(s[a]=u[o]),s},{})};return QXe(t(e))},eYe=e=>{var t=Z_(e),{"subtype-ns":r,subtype:n}=t,u=GXe(t,LXe),s={subtype:r?"".concat(r,":").concat(n):n},o=u&&Object.keys(u).reduce((a,i)=>{var c=i.match(new RegExp("(?<=atts-).+"));return c?(a.atts||(a.atts={}),a.atts[c]=u[i]):a[i]=u[i],a},{});return io(io({},o),s)},p8=e=>{var t=[];for(var r of e.childNodes){if(r.nodeType===WXe){t.push(r.textContent);continue}r.getAttribute("class")!=="meta-content"&&t.push(V3(r))}return t},tYe=e=>{if(e.hasAttribute("data-atts-number"))return{};var t=e.querySelector(":scope > .meta-content");return io({content:p8(e)||[]},t&&{meta_content:p8(t)||[]})},V3=e=>{var t=eYe(e),r=["paragraph"].includes(t.type)&&{content:[]},n=io(io({},t),e.childNodes.length?tYe(e):r);return t.type==="graft"&&t.new&&Y_.push(n),n},rYe=e=>Array.from(e,t=>V3(t)),nYe=e=>e.reduce((t,r)=>(r.nodeType!==HXe||t.push(V3(r)),t),[]),uYe=e=>typeof e.children=="object"?rYe(e.children):nYe(e.childNodes),sYe=e=>typeof DOMParser=="function"?new DOMParser().parseFromString(e,"text/html"):(0,RXe.parse)(e);function oYe(e,t){var r=sYe(e.sequencesHtml[t]),n=r.getElementById(t),u=Z_(n),s=io(io({},u),{},{blocks:uYe(n)}),o=zXe(Y_);return{perfSequence:s,newSequences:o}}var aYe=oYe;Sf.default=aYe;Object.defineProperty(yE,"__esModule",{value:!0});var Q_=yE.default=void 0,iYe=H3(Qp),cYe=H3(Cf),lYe=H3(Sf);function H3(e){return e&&e.__esModule?e:{default:e}}function f8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function yu(e){for(var t=1;t(n[u]=(0,cYe.default)(t,u,this.htmlMap),n),{});return{docSetId:this.docSetId,mainSequenceId:t.main_sequence_id,schema:t.schema,metadata:t.metadata,sequencesHtml:r}}readHtml(t){var r=arguments,n=this;return gl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.readPerf(t,yu(yu({},u),{},{cloning:!1})))})()}undoHtml(t){var r=arguments,n=this;return gl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.undoPerf(t,yu(yu({},u),{},{cloning:!1})))})()}redoHtml(t){var r=arguments,n=this;return gl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.redoPerf(t,yu(yu({},u),{},{cloning:!1})))})()}writeHtml(t,r,n){var u=arguments,s=this;return gl(function*(){var o=u.length>3&&u[3]!==void 0?u[3]:{},{writePipeline:a,readPipeline:i,insertSequences:c}=o,{perfSequence:l,newSequences:p}=(0,lYe.default)(n,r),f=s.history[t],d=Object.entries(p),h=!!d.length;if(h){d.forEach(A=>{var[m,y]=A,F=s.validator.validate("constraint","perfSequence","0.3.0",y);if(!F.isValid)throw"PERF sequence ".concat(m," for ").concat(t," is not valid: ").concat(JSON.stringify(F))});var E=yu({},s.getDocument(t,!1));E.sequences=yu(yu({},E.sequences),p),f.stack.unshift({perfDocument:E})}try{yield s.writePerf(t,r,l,{writePipeline:a,cloning:!1})}catch(A){throw h&&f.stack.shift(),new Error(A.message)}return h&&f.stack.splice(1,1),yield s.readHtml(t,{readPipeline:i})})()}}var dYe=fYe;Q_=yE.default=dYe;function DYe({perf:e,bookId:t}){const[r,n]=Et.useState(),[u,s]=Et.useState(!1),[o,a]=Et.useState(),i=g7(()=>new Q_({proskomma:void 0,docSetId:"xxxXXX",htmlMap:el,options:{historySize:100}}),[]);fp(()=>{async function A(){await i.sideloadPerf(t,e),s(!0)}i&&t&&e&&A()},[i,e,t]),fp(()=>{i&&t&&u&&el&&i.readHtml(t,{cloning:!1},el).then(A=>{n(A)})},[i,t,u]);const c=async A=>{const m=await(i==null?void 0:i.readUsfm(A));a(m),i==null||i.readHtml(A,{cloning:!1},el).then(y=>{n(y)})},l=async()=>{const A=await(i==null?void 0:i.undoHtml(t));n(A)},p=async()=>{const A=await(i==null?void 0:i.redoHtml(t));n(A)},f=(i==null?void 0:i.canUndo)&&(i==null?void 0:i.canUndo(t))||!1,d=(i==null?void 0:i.canRedo)&&(i==null?void 0:i.canRedo(t))||!1;return{htmlPerf:r,setHtmlPerf:n,ready:u,actions:{exportUsfm:c,undo:l,redo:p},state:{bookId:t,htmlPerf:r,canUndo:f,canRedo:d,usfmText:o}}}const hYe=(e,t)=>{const r=document.getElementById(`ch${e}v${t}`);r==null||r.scrollIntoView({behavior:"smooth"})};function mYe(){const[e,t]=Et.useState(""),{perf:r,id:n,docSetId:u,chapter:s}=KK({scrollToChapter:hYe,bookCode:e,setBookCode:t}),{state:o,actions:a}=Et.useContext(m8),{htmlPerf:i,ready:c,state:l,actions:p}=DYe({perf:r,bookId:n,docSetId:u});Et.useEffect(()=>{Oh.setMessageListeners(d=>{switch(d.data.type){case h8.SCROLL_TO_CHAPTER:{console.log("scroll to chapter received",d.data.payload);const h=document.getElementById(`ch-${d.data.payload.chapter}`);h==null||h.scrollIntoView({behavior:"smooth"}),console.log("chapterElement",h)}break}})},[s]),fp(()=>{i&&i.mainSequenceId!==o.sequenceIds[0]&&a.setSequenceIds([i==null?void 0:i.mainSequenceId])},[i,o.sequenceIds,n]);const f={...o,...l,...a,...p,htmlPerf:i,ready:c};return xt.jsx("div",{className:"layout",children:xt.jsx("div",{className:"flex m-3 gap-2",children:xt.jsx(hZ,{...f})})})}function EYe(){return xt.jsx("div",{className:"App",children:xt.jsx(AB,{children:xt.jsx(yB,{children:xt.jsx(mYe,{})})})})}gB.render(xt.jsx(Gi.StrictMode,{children:xt.jsx(EYe,{})}),document.getElementById("root")); + )`,enabled:":not(:disabled)",checked:":is(:is(input[type=radio], input[type=checkbox])[checked], option:selected)",required:":is(input, select, textarea)[required]",optional:":is(input, select, textarea):not([required])",selected:"option:is([selected], select:not([multiple]):not(:has(> option[selected])) > :first-of-type)",checkbox:"[type=checkbox]",file:"[type=file]",password:"[type=password]",radio:"[type=radio]",reset:"[type=reset]",image:"[type=image]",submit:"[type=submit]",parent:":not(:empty)",header:":is(h1, h2, h3, h4, h5, h6)",button:":is(button, input[type=button])",input:":is(input, textarea, select, button)",text:"input:is(:not([type!='']), [type=text])"};var Wd={};(function(e){var t=Ce&&Ce.__spreadArray||function(a,i,c){if(c||arguments.length===2)for(var l=0,p=i.length,d;l"u")return function(l){for(var p=l;p=s.getParent(p);)if(s.isTag(p)&&e(p))return!0;return!1};var i=new WeakSet;return function(l){for(var p=l;p=s.getParent(p);)if(!i.has(p)){if(s.isTag(p)&&e(p))return!0;i.add(p)}return!1}}case"_flexibleDescendant":return function(l){var p=l;do if(s.isTag(p)&&e(p))return!0;while(p=s.getParent(p));return!1};case vn.SelectorType.Parent:return function(l){return s.getChildren(l).some(function(p){return s.isTag(p)&&e(p)})};case vn.SelectorType.Child:return function(l){var p=s.getParent(l);return p!=null&&s.isTag(p)&&e(p)};case vn.SelectorType.Sibling:return function(l){for(var p=s.getSiblings(l),d=0;d0&&(0,HYe.isTraversal)(a[0])&&a[0].type!=="descendant"))if(u&&!a.some(FB))a.unshift(zYe);else continue;a.unshift(XYe)}}function ny(e,t,r){var n;e=e.filter(function(i){return i.length>0}),e.forEach(VYe.default),r=(n=t.context)!==null&&n!==void 0?n:r;var u=Array.isArray(r),s=r&&(Array.isArray(r)?r:[r]);YYe(e,t,s);var o=!1,a=e.map(function(i){if(i.length>=2){var c=i[0],l=i[1];c.type!=="pseudo"||c.name!=="scope"||(u&&l.type==="descendant"?i[1]=KYe:(l.type==="adjacent"||l.type==="sibling")&&(o=!0))}return ZYe(i,t,s)}).reduce(QYe,es.falseFunc);return a.shouldTestNextSiblings=o,a}os.compileToken=ny;function ZYe(e,t,r){var n;return e.reduce(function(u,s){return u===es.falseFunc?es.falseFunc:(0,WYe.compileGeneralSelector)(u,s,t,r,ny)},(n=t.rootFunc)!==null&&n!==void 0?n:es.trueFunc)}function QYe(e,t){return t===es.falseFunc||e===es.trueFunc?e:e===es.falseFunc||t===es.trueFunc?t:function(n){return e(n)||t(n)}}(function(e){var t=Ce&&Ce.__createBinding||(Object.create?function(m,v,C,B){B===void 0&&(B=C);var T=Object.getOwnPropertyDescriptor(v,C);(!T||("get"in T?!v.__esModule:T.writable||T.configurable))&&(T={enumerable:!0,get:function(){return v[C]}}),Object.defineProperty(m,B,T)}:function(m,v,C,B){B===void 0&&(B=C),m[B]=v[C]}),r=Ce&&Ce.__setModuleDefault||(Object.create?function(m,v){Object.defineProperty(m,"default",{enumerable:!0,value:v})}:function(m,v){m.default=v}),n=Ce&&Ce.__importStar||function(m){if(m&&m.__esModule)return m;var v={};if(m!=null)for(var C in m)C!=="default"&&Object.prototype.hasOwnProperty.call(m,C)&&t(v,m,C);return r(v,m),v};Object.defineProperty(e,"__esModule",{value:!0}),e.aliases=e.pseudos=e.filters=e.is=e.selectOne=e.selectAll=e.prepareContext=e._compileToken=e._compileUnsafe=e.compile=void 0;var u=n(B_),s=io,o=os,a=Wd,i=function(m,v){return m===v},c={adapter:u,equals:i};function l(m){var v,C,B,T,N=m??c;return(v=N.adapter)!==null&&v!==void 0||(N.adapter=u),(C=N.equals)!==null&&C!==void 0||(N.equals=(T=(B=N.adapter)===null||B===void 0?void 0:B.equals)!==null&&T!==void 0?T:i),N}function p(m){return function(C,B,T){var N=l(B);return m(C,N,T)}}e.compile=p(o.compile),e._compileUnsafe=p(o.compileUnsafe),e._compileToken=p(o.compileToken);function d(m){return function(C,B,T){var N=l(T);typeof C!="function"&&(C=(0,o.compileUnsafe)(C,N,B));var R=f(B,N.adapter,C.shouldTestNextSiblings);return m(C,R,N)}}function f(m,v,C){return C===void 0&&(C=!1),C&&(m=h(m,v)),Array.isArray(m)?v.removeSubsets(m):v.getChildren(m)}e.prepareContext=f;function h(m,v){for(var C=Array.isArray(m)?m.slice(0):[m],B=C.length,T=0;T-1;){for(r=n=e[t],e[t]=null,u=!0;n;){if(e.indexOf(n)>-1){u=!1,e.splice(t,1);break}n=oy(n)}u&&(e[t]=r)}return e}function bB(e,t){return t.some(function(r){return Jd(r)?e(r)||bB(e,Bc(r)):!1})}function oZe(e){var t=oy(e);return t&&Bc(t)}function aZe(e,t){return CB(e,t)!==void 0}function SB(e,t){for(var r=null,n=0,u=t.length;n0&&(r=SB(e,o))}}return r}function wB(e,t){for(var r=[],n=0,u=t.length;n"):"<".concat(t).concat(r,">").concat(n,"")},e.prototype.isVoidElement=function(t){return this.voidTags.has(t)},e}();ay.default=iZe;var zd={},cZe=Ce&&Ce.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,u){n.__proto__=u}||function(n,u){for(var s in u)Object.prototype.hasOwnProperty.call(u,s)&&(n[s]=u[s])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),_B=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(zd,"__esModule",{value:!0});var lZe=W3,pZe=_B(xa),dZe=_B(so),fZe=function(e){cZe(t,e);function t(r,n,u){var s=e.call(this,n,u)||this;return s.nodeType=dZe.default.TEXT_NODE,s._rawText=r,s}return t.prototype.clone=function(){return new t(this._rawText,null)},Object.defineProperty(t.prototype,"rawText",{get:function(){return this._rawText},set:function(r){this._rawText=r,this._trimmedRawText=void 0,this._trimmedText=void 0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedRawText",{get:function(){return this._trimmedRawText!==void 0?this._trimmedRawText:(this._trimmedRawText=I8(this.rawText),this._trimmedRawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"trimmedText",{get:function(){return this._trimmedText!==void 0?this._trimmedText:(this._trimmedText=I8(this.text),this._trimmedText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"text",{get:function(){return(0,lZe.decode)(this.rawText)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isWhitespace",{get:function(){return/^(\s| )*$/.test(this.rawText)},enumerable:!1,configurable:!0}),t.prototype.toString=function(){return this.rawText},t}(pZe.default);zd.default=fZe;function I8(e){for(var t=0,r,n;t>=0&&t0&&/[^\S\r\n]/.test(e[r-1]),s=n0&&n.push(r=[]),s.childNodes.forEach(u),r.length>0&&n.push(r=[])):s.childNodes.forEach(u);else if(s.nodeType===Gn.default.TEXT_NODE)if(s.isWhitespace)r.prependWhitespace=!0;else{var o=s.trimmedText;r.prependWhitespace&&(o=" ".concat(o),r.prependWhitespace=!1),r.push(o)}}return u(this),n.map(function(s){return s.join("").replace(/\s{2,}/g," ")}).join(` +`).replace(/\s+$/,"")},enumerable:!1,configurable:!0}),t.prototype.toString=function(){var r=this.rawTagName;if(r){var n=this.rawAttrs?" ".concat(this.rawAttrs):"";return this.voidTag.formatNode(r,n,this.innerHTML)}return this.innerHTML},Object.defineProperty(t.prototype,"innerHTML",{get:function(){return this.childNodes.map(function(r){return r.toString()}).join("")},set:function(r){var n=Jo(r),u=n.childNodes.length?n.childNodes:[new ea.default(r,this)];hu(u,this),hu(this.childNodes,null),this.childNodes=u},enumerable:!1,configurable:!0}),t.prototype.set_content=function(r,n){if(n===void 0&&(n={}),r instanceof b2.default)r=[r];else if(typeof r=="string"){var u=Jo(r,n);r=u.childNodes.length?u.childNodes:[new ea.default(r,this)]}return hu(this.childNodes,null),hu(r,this),this.childNodes=r,this},t.prototype.replaceWith=function(){for(var r=this,n=[],u=0;u-1&&(u.rawText=u.rawText.substr(0,s),this.childNodes.length=n+1)}}return this},Object.defineProperty(t.prototype,"structure",{get:function(){var r=[],n=0;function u(o){r.push(" ".repeat(n)+o)}function s(o){var a=o.id?"#".concat(o.id):"",i=o.classList.length?".".concat(o.classList.value.join(".")):"";u("".concat(o.rawTagName).concat(a).concat(i)),n++,o.childNodes.forEach(function(c){c.nodeType===Gn.default.ELEMENT_NODE?s(c):c.nodeType===Gn.default.TEXT_NODE&&(c.isWhitespace||u("#text"))}),n--}return s(this),r.join(` +`)},enumerable:!1,configurable:!0}),t.prototype.removeWhitespace=function(){var r=this,n=0;return this.childNodes.forEach(function(u){if(u.nodeType===Gn.default.TEXT_NODE){if(u.isWhitespace)return;u.rawText=u.trimmedRawText}else u.nodeType===Gn.default.ELEMENT_NODE&&u.removeWhitespace();r.childNodes[n++]=u}),this.childNodes.length=n,this},t.prototype.querySelectorAll=function(r){return(0,F2.selectAll)(r,this,{xmlMode:!0,adapter:C2.default})},t.prototype.querySelector=function(r){return(0,F2.selectOne)(r,this,{xmlMode:!0,adapter:C2.default})},t.prototype.getElementsByTagName=function(r){for(var n=r.toUpperCase(),u=[],s=[],o=this,a=0;a!==void 0;){var i=void 0;do i=o.childNodes[a++];while(a0&&(s.push(a),o=i,a=0))}return u},t.prototype.getElementById=function(r){for(var n=[],u=this,s=0;s!==void 0;){var o=void 0;do o=u.childNodes[s++];while(s0&&(n.push(s),u=o,s=0)}}return null},t.prototype.closest=function(r){var n=new Map,u=this,s=null;function o(i,c){for(var l=null,p=0,d=c.length;p0;){var u=r[--n];if(this===u)return r[n-1]||null}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"previousElementSibling",{get:function(){if(this.parentNode){for(var r=this.parentNode.childNodes,n=r.length,u=!1;n>0;){var s=r[--n];if(u){if(s instanceof t)return s||null}else this===s&&(u=!0)}return null}},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classNames",{get:function(){return this.classList.toString()},enumerable:!1,configurable:!0}),t.prototype.clone=function(){return Jo(this.toString()).firstChild},t}(b2.default);Tu.default=Gh;var Du=/|<(\/?)([a-zA-Z][-.:0-9_a-zA-Z]*)((?:\s+[^>]*?(?:(?:'[^']*')|(?:"[^"]*"))?)*)\s*(\/?)>/g,bZe=/(?:^|\s)(id|class)\s*=\s*((?:'[^']*')|(?:"[^"]*")|\S+)/gi,SZe={area:!0,AREA:!0,base:!0,BASE:!0,br:!0,BR:!0,col:!0,COL:!0,hr:!0,HR:!0,img:!0,IMG:!0,input:!0,INPUT:!0,link:!0,LINK:!0,meta:!0,META:!0,source:!0,SOURCE:!0,embed:!0,EMBED:!0,param:!0,PARAM:!0,track:!0,TRACK:!0,wbr:!0,WBR:!0},N8={li:{li:!0,LI:!0},LI:{li:!0,LI:!0},p:{p:!0,div:!0,P:!0,DIV:!0},P:{p:!0,div:!0,P:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},td:{td:!0,th:!0,TD:!0,TH:!0},TD:{td:!0,th:!0,TD:!0,TH:!0},th:{td:!0,th:!0,TD:!0,TH:!0},TH:{td:!0,th:!0,TD:!0,TH:!0},h1:{h1:!0,H1:!0},H1:{h1:!0,H1:!0},h2:{h2:!0,H2:!0},H2:{h2:!0,H2:!0},h3:{h3:!0,H3:!0},H3:{h3:!0,H3:!0},h4:{h4:!0,H4:!0},H4:{h4:!0,H4:!0},h5:{h5:!0,H5:!0},H5:{h5:!0,H5:!0},h6:{h6:!0,H6:!0},H6:{h6:!0,H6:!0}},q8={li:{ul:!0,ol:!0,UL:!0,OL:!0},LI:{ul:!0,ol:!0,UL:!0,OL:!0},a:{div:!0,DIV:!0},A:{div:!0,DIV:!0},b:{div:!0,DIV:!0},B:{div:!0,DIV:!0},i:{div:!0,DIV:!0},I:{div:!0,DIV:!0},p:{div:!0,DIV:!0},P:{div:!0,DIV:!0},td:{tr:!0,table:!0,TR:!0,TABLE:!0},TD:{tr:!0,table:!0,TR:!0,TABLE:!0},th:{tr:!0,table:!0,TR:!0,TABLE:!0},TH:{tr:!0,table:!0,TR:!0,TABLE:!0}},ri="documentfragmentcontainer";function TB(e,t){var r,n;t===void 0&&(t={lowerCaseTagName:!1,comment:!1});var u=new BB.default((r=t==null?void 0:t.voidTag)===null||r===void 0?void 0:r.closingSlash,(n=t==null?void 0:t.voidTag)===null||n===void 0?void 0:n.tags),s=t.blockTextElements||{script:!0,noscript:!0,style:!0,pre:!0},o=Object.keys(s),a=o.map(function(g){return new RegExp("^".concat(g,"$"),"i")}),i=o.filter(function(g){return s[g]}).map(function(g){return new RegExp("^".concat(g,"$"),"i")});function c(g){return i.some(function(P){return P.test(g)})}function l(g){return a.some(function(P){return P.test(g)})}var p=function(g,P){return[g-B,P-B]},d=new Gh(null,{},"",null,[0,e.length],u),f=d,h=[d],y=-1,A=void 0,m;e="<".concat(ri,">").concat(e,"");for(var v=t.lowerCaseTagName,C=e.length-(ri.length+2),B=ri.length+2;m=Du.exec(e);){var T=m[0],N=m[1],R=m[2],J=m[3],q=m[4],G=T.length,ee=Du.lastIndex-G,K=Du.lastIndex;if(y>-1&&y+G"),F=v?e.toLocaleLowerCase().indexOf(E,Du.lastIndex):e.indexOf(E,Du.lastIndex),D=F===-1?C:F;if(c(R)){var ue=e.substring(z,D);ue.length>0&&/\S/.test(ue)&&f.appendChild(new ea.default(ue,f,p(z,D)))}F===-1?y=Du.lastIndex=e.length+1:(y=Du.lastIndex=F+E.length,N="/")}}if(N||q||SZe[R])for(;;)if((R==="a"||R==="A")&&(A=void 0),f.rawTagName===R){f.range[1]=p(-1,Math.max(y,K))[1],h.pop(),f=(0,Qo.default)(h);break}else{var pe=f.tagName;if(q8[pe]&&q8[pe][R]){h.pop(),f=(0,Qo.default)(h);continue}break}}}return h}Tu.base_parse=TB;function Jo(e,t){t===void 0&&(t={lowerCaseTagName:!1,comment:!1});for(var r=TB(e,t),n=r[0],u=function(){var s=r.pop(),o=(0,Qo.default)(r);s.parentNode&&s.parentNode.parentNode&&(s.parentNode===o&&s.tagName===o.tagName?t.parseNoneClosedTags!==!0&&(o.removeChild(s),s.childNodes.forEach(function(a){o.parentNode.appendChild(a)}),r.pop()):t.parseNoneClosedTags!==!0&&(o.removeChild(s),s.childNodes.forEach(function(a){o.appendChild(a)})))};r.length>1;)u();return n}Tu.parse=Jo;function hu(e,t){return e.map(function(r){return r.parentNode=t,r})}var $B={};(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=Tu;Object.defineProperty(e,"default",{enumerable:!0,get:function(){return t.parse}})})($B);var iy={};Object.defineProperty(iy,"__esModule",{value:!0});var wZe=Tu;function _Ze(e,t){t===void 0&&(t={lowerCaseTagName:!1,comment:!1});var r=(0,wZe.base_parse)(e,t);return r.length===1}iy.default=_Ze;var co=Ce&&Ce.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(pr,"__esModule",{value:!0});pr.NodeType=pr.TextNode=pr.Node=pr.valid=pr.CommentNode=pr.HTMLElement=pr.parse=void 0;var PB=co(Od);pr.CommentNode=PB.default;var kB=co(Tu);pr.HTMLElement=kB.default;var OB=co(xa);pr.Node=OB.default;var IB=co(zd);pr.TextNode=IB.default;var NB=co(so);pr.NodeType=NB.default;var qB=co($B),xB=co(iy);pr.valid=xB.default;function Iu(e,t){return t===void 0&&(t={lowerCaseTagName:!1,comment:!1}),(0,qB.default)(e,t)}pr.default=Iu;pr.parse=Iu;Iu.parse=qB.default;Iu.HTMLElement=kB.default;Iu.CommentNode=PB.default;Iu.valid=xB.default;Iu.Node=OB.default;Iu.TextNode=IB.default;Iu.NodeType=NB.default;Object.defineProperty(kd,"__esModule",{value:!0});kd.default=void 0;var BZe=pr,TZe=RB(V3),$Ze=RB(H3),PZe=["subtype-ns","subtype"];function RB(e){return e&&e.__esModule?e:{default:e}}function x8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function to(e){for(var t=1;t=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}function IZe(e,t){if(e==null)return{};var r={},n=Object.keys(e),u,s;for(s=0;s=0)&&(r[u]=e[u]);return r}var NZe=1,qZe=3,jB=[],xZe=()=>$Ze.default.encode(new TZe.default(4)).substring(0,12),RZe=e=>{var t={};return e.forEach(r=>{var n=xZe();t[n]={type:r.subtype,blocks:r.content||[]},r.target=n,delete r.content,delete r.new}),t},jZe=e=>{var t=e.attributes;return t.length?[...t].reduce((r,n)=>(r[n.name]=n.value,r),{}):typeof t=="object"&&t},MZe=e=>e.replace(/[A-Z]/g,t=>"-".concat(t.toLowerCase())),LZe=e=>Object.keys(e).reduce((t,r)=>{var n=MZe(r);return t[n]=e[r],t},{}),UZe=e=>e==="true"?!0:e==="false"?!1:e,GZe=function(t){var r=Object.keys(t).reduce((n,u)=>(n[u]=UZe(t[u]),n),{});return r},MB=e=>{var t=r=>{var n=r.dataset;if(n)return LZe(n);var u=jZe(r);return u&&Object.keys(u).reduce((s,o)=>{var a=o.match(new RegExp("(?<=data-).+"));return a&&(s[a]=u[o]),s},{})};return GZe(t(e))},VZe=e=>{var t=MB(e),{"subtype-ns":r,subtype:n}=t,u=OZe(t,PZe),s={subtype:r?"".concat(r,":").concat(n):n},o=u&&Object.keys(u).reduce((a,i)=>{var c=i.match(new RegExp("(?<=atts-).+"));return c?(a.atts||(a.atts={}),a.atts[c]=u[i]):a[i]=u[i],a},{});return to(to({},o),s)},R8=e=>{var t=[];for(var r of e.childNodes){if(r.nodeType===qZe){t.push(r.textContent);continue}r.getAttribute("class")!=="meta-content"&&t.push(cy(r))}return t},HZe=e=>{if(e.hasAttribute("data-atts-number"))return{};var t=e.querySelector(":scope > .meta-content");return to({content:R8(e)||[]},t&&{meta_content:R8(t)||[]})},cy=e=>{var t=VZe(e),r=["paragraph"].includes(t.type)&&{content:[]},n=to(to({},t),e.childNodes.length?HZe(e):r);return t.type==="graft"&&t.new&&jB.push(n),n},WZe=e=>Array.from(e,t=>cy(t)),JZe=e=>e.reduce((t,r)=>(r.nodeType!==NZe||t.push(cy(r)),t),[]),zZe=e=>typeof e.children=="object"?WZe(e.children):JZe(e.childNodes),KZe=e=>typeof DOMParser=="function"?new DOMParser().parseFromString(e,"text/html"):(0,BZe.parse)(e);function XZe(e,t){var r=KZe(e.sequencesHtml[t]),n=r.getElementById(t),u=MB(n),s=to(to({},u),{},{blocks:zZe(n)}),o=RZe(jB);return{perfSequence:s,newSequences:o}}var YZe=XZe;kd.default=YZe;Object.defineProperty(PE,"__esModule",{value:!0});var LB=PE.default=void 0,ZZe=ly(od),QZe=ly($d),eQe=ly(kd);function ly(e){return e&&e.__esModule?e:{default:e}}function j8(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(e,u).enumerable})),r.push.apply(r,n)}return r}function mu(e){for(var t=1;t(n[u]=(0,QZe.default)(t,u,this.htmlMap),n),{});return{docSetId:this.docSetId,mainSequenceId:t.main_sequence_id,schema:t.schema,metadata:t.metadata,sequencesHtml:r}}readHtml(t){var r=arguments,n=this;return wl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.readPerf(t,mu(mu({},u),{},{cloning:!1})))})()}undoHtml(t){var r=arguments,n=this;return wl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.undoPerf(t,mu(mu({},u),{},{cloning:!1})))})()}redoHtml(t){var r=arguments,n=this;return wl(function*(){var u=r.length>1&&r[1]!==void 0?r[1]:{};return n._outputHtml(yield n.redoPerf(t,mu(mu({},u),{},{cloning:!1})))})()}writeHtml(t,r,n){var u=arguments,s=this;return wl(function*(){var o=u.length>3&&u[3]!==void 0?u[3]:{},{writePipeline:a,readPipeline:i,insertSequences:c}=o,{perfSequence:l,newSequences:p}=(0,eQe.default)(n,r),d=s.history[t],f=Object.entries(p),h=!!f.length;if(h){f.forEach(A=>{var[m,v]=A,C=s.validator.validate("constraint","perfSequence","0.3.0",v);if(!C.isValid)throw"PERF sequence ".concat(m," for ").concat(t," is not valid: ").concat(JSON.stringify(C))});var y=mu({},s.getDocument(t,!1));y.sequences=mu(mu({},y.sequences),p),d.stack.unshift({perfDocument:y})}try{yield s.writePerf(t,r,l,{writePipeline:a,cloning:!1})}catch(A){throw h&&d.stack.shift(),new Error(A.message)}return h&&d.stack.splice(1,1),yield s.readHtml(t,{readPipeline:i})})()}}var nQe=rQe;LB=PE.default=nQe;function uQe({perf:e,bookId:t}){const[r,n]=ft.useState(),[u,s]=ft.useState(!1),[o,a]=ft.useState(),i=J7(()=>new LB({proskomma:void 0,docSetId:"xxxXXX",htmlMap:sl,options:{historySize:100}}),[]);vp(()=>{async function A(){await i.sideloadPerf(t,e),s(!0)}i&&t&&e&&A()},[i,e,t]),vp(()=>{i&&t&&u&&sl&&i.readHtml(t,{cloning:!1},sl).then(A=>{n(A)})},[i,t,u]);const c=async A=>{const m=await(i==null?void 0:i.readUsfm(A));a(m),i==null||i.readHtml(A,{cloning:!1},sl).then(v=>{n(v)})},l=async()=>{const A=await(i==null?void 0:i.undoHtml(t));n(A)},p=async()=>{const A=await(i==null?void 0:i.redoHtml(t));n(A)},d=(i==null?void 0:i.canUndo)&&(i==null?void 0:i.canUndo(t))||!1,f=(i==null?void 0:i.canRedo)&&(i==null?void 0:i.canRedo(t))||!1;return{htmlPerf:r,setHtmlPerf:n,ready:u,actions:{exportUsfm:c,undo:l,redo:p},state:{bookId:t,htmlPerf:r,canUndo:d,canRedo:f,usfmText:o}}}const sQe=(e,t)=>{const r=document.getElementById(`ch${e}v${t}`);r==null||r.scrollIntoView({behavior:"smooth"})};function oQe(){const[e,t]=ft.useState(""),{perf:r,id:n,docSetId:u,chapter:s}=xX({scrollToChapter:sQe,bookCode:e,setBookCode:t}),{state:o,actions:a}=ft.useContext(G8),{htmlPerf:i,ready:c,state:l,actions:p}=uQe({perf:r,bookId:n,docSetId:u});ft.useEffect(()=>{Vh.setMessageListeners(f=>{switch(f.data.type){case U8.SCROLL_TO_CHAPTER:{console.log("scroll to chapter received",f.data.payload);const h=document.getElementById(`ch-${f.data.payload.chapter}`);h==null||h.scrollIntoView({behavior:"smooth"}),console.log("chapterElement",h)}break}})},[s]),vp(()=>{i&&i.mainSequenceId!==o.sequenceIds[0]&&a.setSequenceIds([i==null?void 0:i.mainSequenceId])},[i,o.sequenceIds,n]);const d={...o,...l,...a,...p,htmlPerf:i,ready:c};return It.jsx("div",{className:"layout",children:It.jsx("div",{className:"flex m-3 gap-2",children:It.jsx(nQ,{...d})})})}function aQe(){return It.jsx("div",{className:"App",children:It.jsx(cT,{children:It.jsx(aT,{children:It.jsx(oQe,{})})})})}iT.render(It.jsx(Vi.StrictMode,{children:It.jsx(aQe,{})}),document.getElementById("root")); diff --git a/webviews/usfm-viewer/build/assets/views/BibleNavigator.js b/webviews/usfm-viewer/build/assets/views/BibleNavigator.js index 756c7e71..abe28013 100644 --- a/webviews/usfm-viewer/build/assets/views/BibleNavigator.js +++ b/webviews/usfm-viewer/build/assets/views/BibleNavigator.js @@ -1 +1 @@ -var Je=(t,e,s)=>{if(!e.has(t))throw TypeError("Cannot "+s)};var i=(t,e,s)=>(Je(t,e,"read from private field"),s?s.call(t):e.get(t)),d=(t,e,s)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,s)},r=(t,e,s,n)=>(Je(t,e,"write to private field"),n?n.call(t,s):e.set(t,s),s);var ye=(t,e,s,n)=>({set _(a){r(t,e,a,s)},get _(){return i(t,e,n)}}),y=(t,e,s)=>(Je(t,e,"access private method"),s);import{r as L,d as je,j as J,v as me,M as le,e as We,R as Xe,a as Ye}from"../App.js";function et(t){const e=tt[t];return console.log({book:t,bookData:e}),{chapters:Object.keys(e.chapters),chapterCount:e.chapterCount}}const tt={GEN:{chapterCount:50,chapterVerseCountPairings:{1:31,2:25,3:24,4:26,5:32,6:22,7:24,8:22,9:29,10:32,11:32,12:20,13:18,14:24,15:21,16:16,17:27,18:33,19:38,20:18,21:34,22:24,23:20,24:67,25:34,26:35,27:46,28:22,29:35,30:43,31:54,32:33,33:20,34:31,35:29,36:43,37:36,38:30,39:23,40:23,41:57,42:38,43:34,44:34,45:28,46:34,47:31,48:22,49:33,50:26},name:"Genesis",abbr:"GEN",ord:"01",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Gen",usfm_end:"GEN 50:26",next:{book:{name:"Exodus",id:"Exod"}},abbreviations:["Gen.","Ge.","Gn."],chapters:{1:31,2:25,3:24,4:26,5:32,6:22,7:24,8:22,9:29,10:32,11:32,12:20,13:18,14:24,15:21,16:16,17:27,18:33,19:38,20:18,21:34,22:24,23:20,24:67,25:34,26:35,27:46,28:22,29:35,30:43,31:55,32:32,33:20,34:31,35:29,36:43,37:36,38:30,39:23,40:23,41:57,42:38,43:34,44:34,45:28,46:34,47:31,48:22,49:33,50:26}},EXO:{chapterCount:40,chapterVerseCountPairings:{1:22,2:25,3:22,4:31,5:23,6:30,7:29,8:28,9:35,10:29,11:10,12:51,13:22,14:31,15:27,16:36,17:16,18:27,19:25,20:26,21:37,22:30,23:33,24:18,25:40,26:37,27:21,28:43,29:46,30:38,31:18,32:35,33:23,34:35,35:35,36:38,37:29,38:31,39:43,40:38},name:"Exodus",abbr:"EXO",ord:"02",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Exod",usfm_end:"EXO 40:38",next:{book:{name:"Leviticus",id:"Lev"}},previous:{book:{name:"Genesis",id:"Gen"}},abbreviations:["Ex.","Exod.","Exo."],chapters:{1:22,2:25,3:22,4:31,5:23,6:30,7:25,8:32,9:35,10:29,11:10,12:51,13:22,14:31,15:27,16:36,17:16,18:27,19:25,20:26,21:36,22:31,23:33,24:18,25:40,26:37,27:21,28:43,29:46,30:38,31:18,32:35,33:23,34:35,35:35,36:38,37:29,38:31,39:43,40:38}},LEV:{chapterCount:27,chapterVerseCountPairings:{1:17,2:16,3:17,4:35,5:26,6:23,7:38,8:36,9:24,10:20,11:47,12:8,13:59,14:57,15:33,16:34,17:16,18:30,19:37,20:27,21:24,22:33,23:44,24:23,25:55,26:46,27:34},name:"Leviticus",abbr:"LEV",ord:"03",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Lev",usfm_end:"LEV 27:34",next:{book:{name:"Numbers",id:"Num"}},previous:{book:{name:"Exodus",id:"Exod"}},abbreviations:["Lev.","Le.","Lv."],chapters:{1:17,2:16,3:17,4:35,5:19,6:30,7:38,8:36,9:24,10:20,11:47,12:8,13:59,14:57,15:33,16:34,17:16,18:30,19:37,20:27,21:24,22:33,23:44,24:23,25:55,26:46,27:34}},NUM:{chapterCount:36,chapterVerseCountPairings:{1:54,2:34,3:51,4:49,5:31,6:27,7:89,8:26,9:23,10:36,11:35,12:16,13:33,14:45,15:41,16:35,17:28,18:32,19:22,20:29,21:35,22:41,23:30,24:25,25:19,26:65,27:23,28:31,29:39,30:17,31:54,32:42,33:56,34:29,35:34,36:13},name:"Numbers",abbr:"NUM",ord:"04",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Num",usfm_end:"NUM 36:13",next:{book:{name:"Deuteronomy",id:"Deut"}},previous:{book:{name:"Leviticus",id:"Lev"}},abbreviations:["Num.","Nu.","Nm.","Nb."],chapters:{1:54,2:34,3:51,4:49,5:31,6:27,7:89,8:26,9:23,10:36,11:35,12:16,13:33,14:45,15:41,16:50,17:13,18:32,19:22,20:29,21:35,22:41,23:30,24:25,25:18,26:65,27:23,28:31,29:40,30:16,31:54,32:42,33:56,34:29,35:34,36:13}},DEU:{chapterCount:34,chapterVerseCountPairings:{1:46,2:37,3:29,4:49,5:33,6:25,7:26,8:20,9:29,10:22,11:32,12:31,13:19,14:29,15:23,16:22,17:20,18:22,19:21,20:20,21:23,22:29,23:26,24:22,25:19,26:19,27:26,28:69,29:28,30:20,31:30,32:52,33:29,34:12},name:"Deuteronomy",abbr:"DEU",ord:"05",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Deut",usfm_end:"DEU 34:12",next:{book:{name:"Joshua",id:"Josh"}},previous:{book:{name:"Numbers",id:"Num"}},abbreviations:["Deut.","De.","Dt."],chapters:{1:46,2:37,3:29,4:49,5:33,6:25,7:26,8:20,9:29,10:22,11:32,12:32,13:18,14:29,15:23,16:22,17:20,18:22,19:21,20:20,21:23,22:30,23:25,24:22,25:19,26:19,27:26,28:68,29:29,30:20,31:30,32:52,33:29,34:12}},JOS:{chapterCount:24,chapterVerseCountPairings:{1:18,2:24,3:17,4:24,5:15,6:27,7:26,8:35,9:27,10:43,11:23,12:24,13:33,14:15,15:63,16:10,17:18,18:28,19:51,20:9,21:45,22:34,23:16,24:33},name:"Joshua",abbr:"JOS",ord:"06",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Josh",usfm_end:"JOS 24:33",next:{book:{name:"Judges",id:"Judg"}},previous:{book:{name:"Deuteronomy",id:"Deut"}},abbreviations:["Josh.","Jos.","Jsh."],chapters:{1:18,2:24,3:17,4:24,5:15,6:27,7:26,8:35,9:27,10:43,11:23,12:24,13:33,14:15,15:63,16:10,17:18,18:28,19:51,20:9,21:45,22:34,23:16,24:33}},JDG:{chapterCount:21,chapterVerseCountPairings:{1:36,2:23,3:31,4:24,5:31,6:40,7:25,8:35,9:57,10:18,11:40,12:15,13:25,14:20,15:20,16:31,17:13,18:31,19:30,20:48,21:25},name:"Judges",abbr:"JDG",ord:"07",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Judg",usfm_end:"JDG 21:25",next:{book:{name:"Ruth",id:"Ruth"}},previous:{book:{name:"Joshua",id:"Josh"}},abbreviations:["Judg.","Jdg.","Jg.","Jdgs."],chapters:{1:36,2:23,3:31,4:24,5:31,6:40,7:25,8:35,9:57,10:18,11:40,12:15,13:25,14:20,15:20,16:31,17:13,18:31,19:30,20:48,21:25}},RUT:{chapterCount:4,chapterVerseCountPairings:{1:22,2:23,3:18,4:22},name:"Ruth",abbr:"RUT",ord:"08",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ruth",usfm_end:"RUT 4:22",next:{book:{name:"1 Samuel",id:"1Sam"}},previous:{book:{name:"Judges",id:"Judg"}},abbreviations:["Ruth","Rth.","Ru."],chapters:{1:22,2:23,3:18,4:22}},"1SA":{chapterCount:31,chapterVerseCountPairings:{1:28,2:36,3:21,4:22,5:12,6:21,7:17,8:22,9:27,10:27,11:15,12:25,13:23,14:52,15:35,16:23,17:58,18:30,19:24,20:42,21:16,22:23,23:28,24:23,25:44,26:25,27:12,28:25,29:11,30:31,31:13},name:"1 Samuel",abbr:"1SA",ord:"09",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Sam",usfm_end:"1SA 31:13",next:{book:{name:"2 Samuel",id:"2Sam"}},previous:{book:{name:"Ruth",id:"Ruth"}},abbreviations:["1 Sam.","1 Sm.","1 Sa.","1 S.","I Sam.","I Sa.","1Sam.","1Sa.","1S.","1st Samuel","1st Sam.","First Samuel","First Sam."],chapters:{1:28,2:36,3:21,4:22,5:12,6:21,7:17,8:22,9:27,10:27,11:15,12:25,13:23,14:52,15:35,16:23,17:58,18:30,19:24,20:42,21:15,22:23,23:29,24:22,25:44,26:25,27:12,28:25,29:11,30:31,31:13}},"2SA":{chapterCount:24,chapterVerseCountPairings:{1:27,2:32,3:39,4:12,5:25,6:23,7:29,8:18,9:13,10:19,11:27,12:31,13:39,14:33,15:37,16:23,17:29,18:32,19:44,20:26,21:22,22:51,23:39,24:25},name:"2 Samuel",abbr:"2SA",ord:"10",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Sam",usfm_end:"2SA 24:25",next:{book:{name:"1 Kings",id:"1Kgs"}},previous:{book:{name:"1 Samuel",id:"1Sam"}},abbreviations:["2 Sam.","2 Sm.","2 Sa.","2 S.","II Sam.","II Sa.","2Sam.","2Sa.","2S.","2nd Samuel","2nd Sam.","Second Samuel","Second Sam."],chapters:{1:27,2:32,3:39,4:12,5:25,6:23,7:29,8:18,9:13,10:19,11:27,12:31,13:39,14:33,15:37,16:23,17:29,18:33,19:43,20:26,21:22,22:51,23:39,24:25}},"1KI":{chapterCount:22,chapterVerseCountPairings:{1:53,2:46,3:28,4:20,5:32,6:38,7:51,8:66,9:28,10:29,11:43,12:33,13:34,14:31,15:34,16:34,17:24,18:46,19:21,20:43,21:29,22:54},name:"1 Kings",abbr:"1KI",ord:"11",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Kgs",usfm_end:"1KI 22:53",next:{book:{name:"2 Kings",id:"2Kgs"}},previous:{book:{name:"2 Samuel",id:"2Sam"}},abbreviations:["1 Kings","1 Kgs","1 Ki","1Kgs","1Kin","1Ki","1K","I Kgs","I Ki","1st Kings","1st Kgs","First Kings","First Kgs"],chapters:{1:53,2:46,3:28,4:34,5:18,6:38,7:51,8:66,9:28,10:29,11:43,12:33,13:34,14:31,15:34,16:34,17:24,18:46,19:21,20:43,21:29,22:53}},"2KI":{chapterCount:25,chapterVerseCountPairings:{1:18,2:25,3:27,4:44,5:27,6:33,7:20,8:29,9:37,10:36,11:20,12:22,13:25,14:29,15:38,16:20,17:41,18:37,19:37,20:21,21:26,22:20,23:37,24:20,25:30},name:"2 Kings",abbr:"2KI",ord:"12",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Kgs",usfm_end:"2KI 25:30",next:{book:{name:"1 Chronicles",id:"1Chr"}},previous:{book:{name:"1 Kings",id:"1Kgs"}},abbreviations:["2 Kings","2 Kgs.","2 Ki.","2Kgs.","2Kin.","2Ki.","2K.","II Kgs.","II Ki.","2nd Kings","2nd Kgs.","Second Kings","Second Kgs."],chapters:{1:18,2:25,3:27,4:44,5:27,6:33,7:20,8:29,9:37,10:36,11:21,12:21,13:25,14:29,15:38,16:20,17:41,18:37,19:37,20:21,21:26,22:20,23:37,24:20,25:30}},"1CH":{chapterCount:29,chapterVerseCountPairings:{1:54,2:55,3:24,4:43,5:41,6:66,7:40,8:40,9:44,10:14,11:47,12:41,13:14,14:17,15:29,16:43,17:27,18:17,19:19,20:8,21:30,22:19,23:32,24:31,25:31,26:32,27:34,28:21,29:30},name:"1 Chronicles",abbr:"1CH",ord:"13",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Chr",usfm_end:"1CH 29:30",next:{book:{name:"2 Chronicles",id:"2Chr"}},previous:{book:{name:"2 Kings",id:"2Kgs"}},abbreviations:["1 Chron.","1 Chr.","1 Ch.","1Chron.","1Chr.","1Ch.","I Chron.","I Chr.","I Ch.","1st Chronicles","1st Chron.","First Chronicles","First Chron."],chapters:{1:54,2:55,3:24,4:43,5:26,6:81,7:40,8:40,9:44,10:14,11:47,12:40,13:14,14:17,15:29,16:43,17:27,18:17,19:19,20:8,21:30,22:19,23:32,24:31,25:31,26:32,27:34,28:21,29:30}},"2CH":{chapterCount:36,chapterVerseCountPairings:{1:18,2:17,3:17,4:22,5:14,6:42,7:22,8:18,9:31,10:19,11:23,12:16,13:23,14:14,15:19,16:14,17:19,18:34,19:11,20:37,21:20,22:12,23:21,24:27,25:28,26:23,27:9,28:27,29:36,30:27,31:21,32:33,33:25,34:33,35:27,36:23},name:"2 Chronicles",abbr:"2CH",ord:"14",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Chr",usfm_end:"2CH 36:23",next:{book:{name:"Ezra",id:"Ezra"}},previous:{book:{name:"1 Chronicles",id:"1Chr"}},abbreviations:["2 Chron.","2 Chr.","2 Ch.","2Chron.","2Chr.","2Ch.","II Chron.","II Chr.","II Ch.","2nd Chronicles","2nd Chron.","Second Chronicles","Second Chron."],chapters:{1:17,2:18,3:17,4:22,5:14,6:42,7:22,8:18,9:31,10:19,11:23,12:16,13:22,14:15,15:19,16:14,17:19,18:34,19:11,20:37,21:20,22:12,23:21,24:27,25:28,26:23,27:9,28:27,29:36,30:27,31:21,32:33,33:25,34:33,35:27,36:23}},EZR:{chapterCount:10,chapterVerseCountPairings:{1:11,2:70,3:13,4:24,5:17,6:22,7:28,8:36,9:15,10:44},name:"Ezra",abbr:"EZR",ord:"15",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ezra",usfm_end:"EZR 10:44",next:{book:{name:"Nehemiah",id:"Neh"}},previous:{book:{name:"2 Chronicles",id:"2Chr"}},abbreviations:["Ezra","Ezr.","Ez."],chapters:{1:11,2:70,3:13,4:24,5:17,6:22,7:28,8:36,9:15,10:44}},NEH:{chapterCount:13,chapterVerseCountPairings:{1:11,2:20,3:38,4:17,5:19,6:19,7:72,8:18,9:37,10:40,11:36,12:47,13:31},name:"Nehemiah",abbr:"NEH",ord:"16",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Neh",usfm_end:"NEH 13:31",next:{book:{name:"Esther",id:"Esth"}},previous:{book:{name:"Ezra",id:"Ezra"}},abbreviations:["Neh.","Ne."],chapters:{1:11,2:20,3:32,4:23,5:19,6:19,7:73,8:18,9:38,10:39,11:36,12:47,13:31}},EST:{chapterCount:10,chapterVerseCountPairings:{1:22,2:23,3:15,4:17,5:14,6:14,7:10,8:17,9:32,10:3},name:"Esther",abbr:"EST",ord:"17",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Esth",usfm_end:"EST 10:3",next:{book:{name:"Job",id:"Job"}},previous:{book:{name:"Nehemiah",id:"Neh"}},abbreviations:["Est.","Esth.","Es."],chapters:{1:22,2:23,3:15,4:17,5:14,6:14,7:10,8:17,9:32,10:3}},JOB:{chapterCount:42,chapterVerseCountPairings:{1:22,2:13,3:26,4:21,5:27,6:30,7:21,8:22,9:35,10:22,11:20,12:25,13:28,14:22,15:35,16:22,17:16,18:21,19:29,20:29,21:34,22:30,23:17,24:25,25:6,26:14,27:23,28:28,29:25,30:31,31:40,32:22,33:33,34:37,35:16,36:33,37:24,38:41,39:30,40:32,41:26,42:17},name:"Job",abbr:"JOB",ord:"18",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Job",usfm_end:"JOB 42:17",next:{book:{name:"Psalms",id:"Ps"}},previous:{book:{name:"Esther",id:"Esth"}},abbreviations:["Job","Jb."],chapters:{1:22,2:13,3:26,4:21,5:27,6:30,7:21,8:22,9:35,10:22,11:20,12:25,13:28,14:22,15:35,16:22,17:16,18:21,19:29,20:29,21:34,22:30,23:17,24:25,25:6,26:14,27:23,28:28,29:25,30:31,31:40,32:22,33:33,34:37,35:16,36:33,37:24,38:41,39:30,40:24,41:34,42:17}},PSA:{chapterCount:150,chapterVerseCountPairings:{1:6,2:12,3:9,4:9,5:13,6:11,7:18,8:10,9:21,10:18,11:7,12:9,13:6,14:7,15:5,16:11,17:15,18:51,19:15,20:10,21:14,22:32,23:6,24:10,25:22,26:12,27:14,28:9,29:11,30:13,31:25,32:11,33:22,34:23,35:28,36:13,37:40,38:23,39:14,40:18,41:14,42:12,43:5,44:27,45:18,46:12,47:10,48:15,49:21,50:23,51:21,52:11,53:7,54:9,55:24,56:14,57:12,58:12,59:18,60:14,61:9,62:13,63:12,64:11,65:14,66:20,67:8,68:36,69:37,70:6,71:24,72:20,73:28,74:23,75:11,76:13,77:21,78:72,79:13,80:20,81:17,82:8,83:19,84:13,85:14,86:17,87:7,88:19,89:53,90:17,91:16,92:16,93:5,94:23,95:11,96:13,97:12,98:9,99:9,100:5,101:8,102:29,103:22,104:35,105:45,106:48,107:43,108:14,109:31,110:7,111:10,112:10,113:9,114:8,115:18,116:19,117:2,118:29,119:176,120:7,121:8,122:9,123:4,124:8,125:5,126:6,127:5,128:6,129:8,130:8,131:3,132:18,133:3,134:3,135:21,136:26,137:9,138:8,139:24,140:14,141:10,142:8,143:12,144:15,145:21,146:10,147:20,148:14,149:9,150:6},name:"Psalms",abbr:"PSA",ord:"19",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ps",usfm_end:"PSA 150:6",next:{book:{name:"Proverbs",id:"Prov"}},previous:{book:{name:"Job",id:"Job"}},abbreviations:["Ps.","Psalm","Pslm.","Psa.","Psm.","Pss."],chapters:{1:6,2:12,3:8,4:8,5:12,6:10,7:17,8:9,9:20,10:18,11:7,12:8,13:6,14:7,15:5,16:11,17:15,18:50,19:14,20:9,21:13,22:31,23:6,24:10,25:22,26:12,27:14,28:9,29:11,30:12,31:24,32:11,33:22,34:22,35:28,36:12,37:40,38:22,39:13,40:17,41:13,42:11,43:5,44:26,45:17,46:11,47:9,48:14,49:20,50:23,51:19,52:9,53:6,54:7,55:23,56:13,57:11,58:11,59:17,60:12,61:8,62:12,63:11,64:10,65:13,66:20,67:7,68:35,69:36,70:5,71:24,72:20,73:28,74:23,75:10,76:12,77:20,78:72,79:13,80:19,81:16,82:8,83:18,84:12,85:13,86:17,87:7,88:18,89:52,90:17,91:16,92:15,93:5,94:23,95:11,96:13,97:12,98:9,99:9,100:5,101:8,102:28,103:22,104:35,105:45,106:48,107:43,108:13,109:31,110:7,111:10,112:10,113:9,114:8,115:18,116:19,117:2,118:29,119:176,120:7,121:8,122:9,123:4,124:8,125:5,126:6,127:5,128:6,129:8,130:8,131:3,132:18,133:3,134:3,135:21,136:26,137:9,138:8,139:24,140:13,141:10,142:7,143:12,144:15,145:21,146:10,147:20,148:14,149:9,150:6}},PRO:{chapterCount:31,chapterVerseCountPairings:{1:33,2:22,3:35,4:27,5:23,6:35,7:27,8:36,9:18,10:32,11:31,12:28,13:25,14:35,15:33,16:33,17:28,18:24,19:29,20:30,21:31,22:29,23:35,24:34,25:28,26:28,27:27,28:28,29:27,30:33,31:31},name:"Proverbs",abbr:"PRO",ord:"20",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Prov",usfm_end:"PRO 31:31",next:{book:{name:"Ecclesiastes",id:"Eccl"}},previous:{book:{name:"Psalms",id:"Ps"}},abbreviations:["Prov","Pro.","Prv.","Pr."],chapters:{1:33,2:22,3:35,4:27,5:23,6:35,7:27,8:36,9:18,10:32,11:31,12:28,13:25,14:35,15:33,16:33,17:28,18:24,19:29,20:30,21:31,22:29,23:35,24:34,25:28,26:28,27:27,28:28,29:27,30:33,31:31}},ECC:{chapterCount:12,chapterVerseCountPairings:{1:18,2:26,3:22,4:17,5:19,6:12,7:29,8:17,9:18,10:20,11:10,12:14},name:"Ecclesiastes",abbr:"ECC",ord:"21",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Eccl",usfm_end:"ECC 12:14",next:{book:{name:"Song of Solomon",id:"Song"}},previous:{book:{name:"Proverbs",id:"Prov"}},abbreviations:["Eccles.","Eccle.","Ecc.","Ec.","Qoh."],chapters:{1:18,2:26,3:22,4:16,5:20,6:12,7:29,8:17,9:18,10:20,11:10,12:14}},SNG:{chapterCount:8,chapterVerseCountPairings:{1:17,2:17,3:11,4:16,5:16,6:12,7:14,8:14},name:"Song of Solomon",abbr:"SNG",ord:"22",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Song",usfm_end:"SNG 8:14",next:{book:{name:"Isaiah",id:"Isa"}},previous:{book:{name:"Ecclesiastes",id:"Eccl"}},abbreviations:["Song","Song of Songs","SOS.","So.","Canticle of Canticles","Canticles","Cant."],chapters:{1:17,2:17,3:11,4:16,5:16,6:13,7:13,8:14}},ISA:{chapterCount:66,chapterVerseCountPairings:{1:31,2:22,3:26,4:6,5:30,6:13,7:25,8:23,9:20,10:34,11:16,12:6,13:22,14:32,15:9,16:14,17:14,18:7,19:25,20:6,21:17,22:25,23:18,24:23,25:12,26:21,27:13,28:29,29:24,30:33,31:9,32:20,33:24,34:17,35:10,36:22,37:38,38:22,39:8,40:31,41:29,42:25,43:28,44:28,45:25,46:13,47:15,48:22,49:26,50:11,51:23,52:15,53:12,54:17,55:13,56:12,57:21,58:14,59:21,60:22,61:11,62:12,63:19,64:11,65:25,66:24},name:"Isaiah",abbr:"ISA",ord:"23",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Isa",usfm_end:"ISA 66:24",next:{book:{name:"Jeremiah",id:"Jer"}},previous:{book:{name:"Song of Solomon",id:"Song"}},abbreviations:["Isa.","Is."],chapters:{1:31,2:22,3:26,4:6,5:30,6:13,7:25,8:22,9:21,10:34,11:16,12:6,13:22,14:32,15:9,16:14,17:14,18:7,19:25,20:6,21:17,22:25,23:18,24:23,25:12,26:21,27:13,28:29,29:24,30:33,31:9,32:20,33:24,34:17,35:10,36:22,37:38,38:22,39:8,40:31,41:29,42:25,43:28,44:28,45:25,46:13,47:15,48:22,49:26,50:11,51:23,52:15,53:12,54:17,55:13,56:12,57:21,58:14,59:21,60:22,61:11,62:12,63:19,64:12,65:25,66:24}},JER:{chapterCount:52,chapterVerseCountPairings:{1:19,2:37,3:25,4:31,5:31,6:30,7:34,8:23,9:25,10:25,11:23,12:17,13:27,14:22,15:21,16:21,17:27,18:23,19:15,20:18,21:14,22:30,23:40,24:10,25:38,26:24,27:22,28:17,29:32,30:24,31:40,32:44,33:26,34:22,35:19,36:32,37:21,38:28,39:18,40:16,41:18,42:22,43:13,44:30,45:5,46:28,47:7,48:47,49:39,50:46,51:64,52:34},name:"Jeremiah",abbr:"JER",ord:"24",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Jer",usfm_end:"JER 52:34",next:{book:{name:"Lamentations",id:"Lam"}},previous:{book:{name:"Isaiah",id:"Isa"}},abbreviations:["Jer.","Je.","Jr."],chapters:{1:19,2:37,3:25,4:31,5:31,6:30,7:34,8:22,9:26,10:25,11:23,12:17,13:27,14:22,15:21,16:21,17:27,18:23,19:15,20:18,21:14,22:30,23:40,24:10,25:38,26:24,27:22,28:17,29:32,30:24,31:40,32:44,33:26,34:22,35:19,36:32,37:21,38:28,39:18,40:16,41:18,42:22,43:13,44:30,45:5,46:28,47:7,48:47,49:39,50:46,51:64,52:34}},LAM:{chapterCount:5,chapterVerseCountPairings:{1:22,2:22,3:66,4:22,5:22},name:"Lamentations",abbr:"LAM",ord:"25",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Lam",usfm_end:"LAM 5:22",next:{book:{name:"Ezekiel",id:"Ezek"}},previous:{book:{name:"Jeremiah",id:"Jer"}},abbreviations:["Lam.","La."],chapters:{1:22,2:22,3:66,4:22,5:22}},EZK:{chapterCount:48,chapterVerseCountPairings:{1:28,2:10,3:27,4:17,5:17,6:14,7:27,8:18,9:11,10:22,11:25,12:28,13:23,14:23,15:8,16:63,17:24,18:32,19:14,20:44,21:37,22:31,23:49,24:27,25:17,26:21,27:36,28:26,29:21,30:26,31:18,32:32,33:33,34:31,35:15,36:38,37:28,38:23,39:29,40:49,41:26,42:20,43:27,44:31,45:25,46:24,47:23,48:35},name:"Ezekiel",abbr:"EZK",ord:"26",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ezek",usfm_end:"EZK 48:35",next:{book:{name:"Daniel",id:"Dan"}},previous:{book:{name:"Lamentations",id:"Lam"}},abbreviations:["Ezek.","Eze.","Ezk."],chapters:{1:28,2:10,3:27,4:17,5:17,6:14,7:27,8:18,9:11,10:22,11:25,12:28,13:23,14:23,15:8,16:63,17:24,18:32,19:14,20:49,21:32,22:31,23:49,24:27,25:17,26:21,27:36,28:26,29:21,30:26,31:18,32:32,33:33,34:31,35:15,36:38,37:28,38:23,39:29,40:49,41:26,42:20,43:27,44:31,45:25,46:24,47:23,48:35}},DAN:{chapterCount:12,chapterVerseCountPairings:{1:21,2:49,3:33,4:34,5:30,6:29,7:28,8:27,9:27,10:21,11:45,12:13},name:"Daniel",abbr:"DAN",ord:"27",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Dan",usfm_end:"DAN 12:13",next:{book:{name:"Hosea",id:"Hos"}},previous:{book:{name:"Ezekiel",id:"Ezek"}},abbreviations:["Dan.","Da.","Dn."],chapters:{1:21,2:49,3:30,4:37,5:31,6:28,7:28,8:27,9:27,10:21,11:45,12:13}},HOS:{chapterCount:14,chapterVerseCountPairings:{1:9,2:25,3:5,4:19,5:15,6:11,7:16,8:14,9:17,10:15,11:11,12:15,13:15,14:10},name:"Hosea",abbr:"HOS",ord:"28",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hos",usfm_end:"HOS 14:9",next:{book:{name:"Joel",id:"Joel"}},previous:{book:{name:"Daniel",id:"Dan"}},abbreviations:["Hos.","Ho."],chapters:{1:11,2:23,3:5,4:19,5:15,6:11,7:16,8:14,9:17,10:15,11:12,12:14,13:16,14:9}},JOL:{chapterCount:4,chapterVerseCountPairings:{1:20,2:27,3:5,4:21},name:"Joel",abbr:"JOL",ord:"29",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Joel",usfm_end:"JOL 3:21",next:{book:{name:"Amos",id:"Amos"}},previous:{book:{name:"Hosea",id:"Hos"}},abbreviations:["Joel","Jl."],chapters:{1:20,2:32,3:21}},AMO:{chapterCount:9,chapterVerseCountPairings:{1:15,2:16,3:15,4:13,5:27,6:14,7:17,8:14,9:15},name:"Amos",abbr:"AMO",ord:"30",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Amos",usfm_end:"AMO 9:15",next:{book:{name:"Obadiah",id:"Obad"}},previous:{book:{name:"Joel",id:"Joel"}},abbreviations:["Amos","Am."],chapters:{1:15,2:16,3:15,4:13,5:27,6:14,7:17,8:14,9:15}},OBA:{chapterCount:1,chapterVerseCountPairings:{1:21},name:"Obadiah",abbr:"OBA",ord:"31",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Obad",usfm_end:"OBA 1:21",next:{book:{name:"Jonah",id:"Jonah"}},previous:{book:{name:"Amos",id:"Amos"}},abbreviations:["Obad.","Ob."],chapters:{1:21}},JON:{chapterCount:4,chapterVerseCountPairings:{1:16,2:11,3:10,4:11},name:"Jonah",abbr:"JON",ord:"32",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Jonah",usfm_end:"JON 4:11",next:{book:{name:"Micah",id:"Mic"}},previous:{book:{name:"Obadiah",id:"Obad"}},abbreviations:["Jonah","Jnh.","Jon."],chapters:{1:17,2:10,3:10,4:11}},MIC:{chapterCount:7,chapterVerseCountPairings:{1:16,2:13,3:12,4:14,5:14,6:16,7:20},name:"Micah",abbr:"MIC",ord:"33",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Mic",usfm_end:"MIC 7:20",next:{book:{name:"Nahum",id:"Nah"}},previous:{book:{name:"Jonah",id:"Jonah"}},abbreviations:["Mic.","Mc."],chapters:{1:16,2:13,3:12,4:13,5:15,6:16,7:20}},NAM:{chapterCount:3,chapterVerseCountPairings:{1:14,2:14,3:19},name:"Nahum",abbr:"NAM",ord:"34",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Nah",usfm_end:"NAM 3:19",next:{book:{name:"Habakkuk",id:"Hab"}},previous:{book:{name:"Micah",id:"Mic"}},abbreviations:["Nah.","Na."],chapters:{1:15,2:13,3:19}},HAB:{chapterCount:3,chapterVerseCountPairings:{1:17,2:20,3:19},name:"Habakkuk",abbr:"HAB",ord:"35",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hab",usfm_end:"HAB 3:19",next:{book:{name:"Zephaniah",id:"Zeph"}},previous:{book:{name:"Nahum",id:"Nah"}},abbreviations:["Hab.","Hb."],chapters:{1:17,2:20,3:19}},ZEP:{chapterCount:3,chapterVerseCountPairings:{1:18,2:15,3:20},name:"Zephaniah",abbr:"ZEP",ord:"36",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Zeph",usfm_end:"ZEP 3:20",next:{book:{name:"Haggai",id:"Hag"}},previous:{book:{name:"Habakkuk",id:"Hab"}},abbreviations:["Zeph.","Zep.","Zp."],chapters:{1:18,2:15,3:20}},HAG:{chapterCount:2,chapterVerseCountPairings:{1:15,2:23},name:"Haggai",abbr:"HAG",ord:"37",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hag",usfm_end:"HAG 2:23",next:{book:{name:"Zechariah",id:"Zech"}},previous:{book:{name:"Zephaniah",id:"Zeph"}},abbreviations:["Hag.","Hg."],chapters:{1:15,2:23}},ZEC:{chapterCount:14,chapterVerseCountPairings:{1:17,2:17,3:10,4:14,5:11,6:15,7:14,8:23,9:17,10:12,11:17,12:14,13:9,14:21},name:"Zechariah",abbr:"ZEC",ord:"38",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Zech",usfm_end:"ZEC 14:21",next:{book:{name:"Malachi",id:"Mal"}},previous:{book:{name:"Haggai",id:"Hag"}},abbreviations:["Zech.","Zec.","Zc."],chapters:{1:21,2:13,3:10,4:14,5:11,6:15,7:14,8:23,9:17,10:12,11:17,12:14,13:9,14:21}},MAL:{chapterCount:3,chapterVerseCountPairings:{1:14,2:17,3:24},name:"Malachi",abbr:"MAL",ord:"39",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Mal",usfm_end:"MAL 4:6",next:{book:{name:"Tobit",id:"Tob"}},previous:{book:{name:"Zechariah",id:"Zech"}},abbreviations:["Mal.","Ml."],chapters:{1:14,2:17,3:18,4:6}},MAT:{chapterCount:28,chapterVerseCountPairings:{1:25,2:23,3:17,4:25,5:48,6:34,7:29,8:34,9:38,10:42,11:30,12:50,13:58,14:36,15:39,16:28,17:27,18:35,19:30,20:34,21:46,22:46,23:39,24:51,25:46,26:75,27:66,28:20},name:"Matthew",abbr:"MAT",ord:"40",book_group_id:"0",testament:"NT",id:"Matt",usfm_end:"MAT 28:20",next:{book:{name:"Mark",id:"Mark"}},previous:{book:{name:"2 Maccabees",id:"2Macc"}},abbreviations:["Matt.","Mt."],chapters:{1:25,2:23,3:17,4:25,5:48,6:34,7:29,8:34,9:38,10:42,11:30,12:50,13:58,14:36,15:39,16:28,17:27,18:35,19:30,20:34,21:46,22:46,23:39,24:51,25:46,26:75,27:66,28:20}},MRK:{chapterCount:16,chapterVerseCountPairings:{1:45,2:28,3:35,4:41,5:43,6:56,7:37,8:38,9:50,10:52,11:33,12:44,13:37,14:72,15:47,16:20},name:"Mark",abbr:"MRK",ord:"41",book_group_id:"0",testament:"NT",id:"Mark",usfm_end:"MRK 16:20",next:{book:{name:"Luke",id:"Luke"}},previous:{book:{name:"Matthew",id:"Matt"}},abbreviations:["Mark","Mrk","Mar","Mk","Mr"],chapters:{1:45,2:28,3:35,4:41,5:43,6:56,7:37,8:38,9:50,10:52,11:33,12:44,13:37,14:72,15:47,16:20}},LUK:{chapterCount:24,chapterVerseCountPairings:{1:80,2:52,3:38,4:44,5:39,6:49,7:50,8:56,9:62,10:42,11:54,12:59,13:35,14:35,15:32,16:31,17:37,18:43,19:48,20:47,21:38,22:71,23:56,24:53},name:"Luke",abbr:"LUK",ord:"42",book_group_id:"0",testament:"NT",id:"Luke",usfm_end:"LUK 24:53",next:{book:{name:"John",id:"John"}},previous:{book:{name:"Mark",id:"Mark"}},abbreviations:["Luke","Luk","Lk"],chapters:{1:80,2:52,3:38,4:44,5:39,6:49,7:50,8:56,9:62,10:42,11:54,12:59,13:35,14:35,15:32,16:31,17:37,18:43,19:48,20:47,21:38,22:71,23:56,24:53}},JHN:{chapterCount:21,chapterVerseCountPairings:{1:51,2:25,3:36,4:54,5:47,6:71,7:53,8:59,9:41,10:42,11:57,12:50,13:38,14:31,15:27,16:33,17:26,18:40,19:42,20:31,21:25},name:"John",abbr:"JHN",ord:"43",book_group_id:"0",testament:"NT",id:"John",usfm_end:"JHN 21:25",next:{book:{name:"Acts",id:"Acts"}},previous:{book:{name:"Luke",id:"Luke"}},abbreviations:["John","Joh","Jhn","Jn"],chapters:{1:51,2:25,3:36,4:54,5:47,6:71,7:53,8:59,9:41,10:42,11:57,12:50,13:38,14:31,15:27,16:33,17:26,18:40,19:42,20:31,21:25}},ACT:{chapterCount:28,chapterVerseCountPairings:{1:26,2:47,3:26,4:37,5:42,6:15,7:60,8:40,9:43,10:48,11:30,12:25,13:52,14:28,15:41,16:40,17:34,18:28,19:40,20:38,21:40,22:30,23:35,24:27,25:27,26:32,27:44,28:31},name:"Acts",abbr:"ACT",ord:"44",book_group_id:"0",testament:"NT",id:"Acts",usfm_end:"ACT 28:31",next:{book:{name:"Romans",id:"Rom"}},previous:{book:{name:"John",id:"John"}},abbreviations:["Acts","Act","Ac"],chapters:{1:26,2:47,3:26,4:37,5:42,6:15,7:60,8:40,9:43,10:48,11:30,12:25,13:52,14:28,15:41,16:40,17:34,18:28,19:41,20:38,21:40,22:30,23:35,24:27,25:27,26:32,27:44,28:31}},ROM:{chapterCount:16,chapterVerseCountPairings:{1:32,2:29,3:31,4:25,5:21,6:23,7:25,8:39,9:33,10:21,11:36,12:21,13:14,14:23,15:33,16:27},name:"Romans",abbr:"ROM",ord:"45",book_group_id:"0",testament:"NT",id:"Rom",usfm_end:"ROM 16:27",next:{book:{name:"1 Corinthians",id:"1Cor"}},previous:{book:{name:"Acts",id:"Acts"}},abbreviations:["Rom.","Ro.","Rm."],chapters:{1:32,2:29,3:31,4:25,5:21,6:23,7:25,8:39,9:33,10:21,11:36,12:21,13:14,14:23,15:33,16:27}},"1CO":{chapterCount:16,chapterVerseCountPairings:{1:31,2:16,3:23,4:21,5:13,6:20,7:40,8:13,9:27,10:33,11:34,12:31,13:13,14:40,15:58,16:24},name:"1 Corinthians",abbr:"1CO",ord:"46",book_group_id:"0",testament:"NT",id:"1Cor",usfm_end:"1CO 16:24",next:{book:{name:"2 Corinthians",id:"2Cor"}},previous:{book:{name:"Romans",id:"Rom"}},abbreviations:["1 Cor.","1 Co.","I Cor.","I Co.","1Cor.","1Co.","I Corinthians","1Corinthians","1st Corinthians","First Corinthians"],chapters:{1:31,2:16,3:23,4:21,5:13,6:20,7:40,8:13,9:27,10:33,11:34,12:31,13:13,14:40,15:58,16:24}},"2CO":{chapterCount:13,chapterVerseCountPairings:{1:24,2:17,3:18,4:18,5:21,6:18,7:16,8:24,9:15,10:18,11:33,12:21,13:13},name:"2 Corinthians",abbr:"2CO",ord:"47",book_group_id:"0",testament:"NT",id:"2Cor",usfm_end:"2CO 13:14",next:{book:{name:"Galatians",id:"Gal"}},previous:{book:{name:"1 Corinthians",id:"1Cor"}},abbreviations:["2 Cor.","2 Co.","II Cor.","II Co.","2Cor.","2Co.","II Corinthians","2Corinthians","2nd Corinthians","Second Corinthians"],chapters:{1:24,2:17,3:18,4:18,5:21,6:18,7:16,8:24,9:15,10:18,11:33,12:21,13:14}},GAL:{chapterCount:6,chapterVerseCountPairings:{1:24,2:21,3:29,4:31,5:26,6:18},name:"Galatians",abbr:"GAL",ord:"48",book_group_id:"0",testament:"NT",id:"Gal",usfm_end:"GAL 6:18",next:{book:{name:"Ephesians",id:"Eph"}},previous:{book:{name:"2 Corinthians",id:"2Cor"}},abbreviations:["Gal.","Ga."],chapters:{1:24,2:21,3:29,4:31,5:26,6:18}},EPH:{chapterCount:6,chapterVerseCountPairings:{1:23,2:22,3:21,4:32,5:33,6:24},name:"Ephesians",abbr:"EPH",ord:"49",book_group_id:"0",testament:"NT",id:"Eph",usfm_end:"EPH 6:24",next:{book:{name:"Philippians",id:"Phil"}},previous:{book:{name:"Galatians",id:"Gal"}},abbreviations:["Eph.","Ephes."],chapters:{1:23,2:22,3:21,4:32,5:33,6:24}},PHP:{chapterCount:4,chapterVerseCountPairings:{1:30,2:30,3:21,4:23},name:"Philippians",abbr:"PHP",ord:"50",book_group_id:"0",testament:"NT",id:"Phil",usfm_end:"PHP 4:23",next:{book:{name:"Colossians",id:"Col"}},previous:{book:{name:"Ephesians",id:"Eph"}},abbreviations:["Phil.","Php.","Pp."],chapters:{1:30,2:30,3:21,4:23}},COL:{chapterCount:4,chapterVerseCountPairings:{1:29,2:23,3:25,4:18},name:"Colossians",abbr:"COL",ord:"51",book_group_id:"0",testament:"NT",id:"Col",usfm_end:"COL 4:18",next:{book:{name:"1 Thessalonians",id:"1Thess"}},previous:{book:{name:"Philippians",id:"Phil"}},abbreviations:["Col.","Co."],chapters:{1:29,2:23,3:25,4:18}},"1TH":{chapterCount:5,chapterVerseCountPairings:{1:10,2:20,3:13,4:18,5:28},name:"1 Thessalonians",abbr:"1TH",ord:"52",book_group_id:"0",testament:"NT",id:"1Thess",usfm_end:"1TH 5:28",next:{book:{name:"2 Thessalonians",id:"2Thess"}},previous:{book:{name:"Colossians",id:"Col"}},abbreviations:["1 Thess.","1 Thes.","1 Th.","I Thessalonians","I Thess.","I Thes.","I Th.","1Thessalonians","1Thess.","1Thes.","1Th.","1st Thessalonians","1st Thess.","First Thessalonians","First Thess."],chapters:{1:10,2:20,3:13,4:18,5:28}},"2TH":{chapterCount:3,chapterVerseCountPairings:{1:12,2:17,3:18},name:"2 Thessalonians",abbr:"2TH",ord:"53",book_group_id:"0",testament:"NT",id:"2Thess",usfm_end:"2TH 3:18",next:{book:{name:"1 Timothy",id:"1Tim"}},previous:{book:{name:"1 Thessalonians",id:"1Thess"}},abbreviations:["2 Thess.","2 Thes.","II Thessalonians","II Thess.","II Thes.","II Th.","2Thessalonians","2Thess.","2Thes.","2Th.","2nd Thessalonians","2nd Thess.","Second Thessalonians","Second Thess."],chapters:{1:12,2:17,3:18}},"1TI":{chapterCount:6,chapterVerseCountPairings:{1:20,2:15,3:16,4:16,5:25,6:21},name:"1 Timothy",abbr:"1TI",ord:"54",book_group_id:"0",testament:"NT",id:"1Tim",usfm_end:"1TI 6:21",next:{book:{name:"2 Timothy",id:"2Tim"}},previous:{book:{name:"2 Thessalonians",id:"2Thess"}},abbreviations:["1 Tim.","1 Ti.","I Timothy","I Tim.","I Ti.","1Timothy","1Tim.","1Ti.","1st Timothy","1st Tim.","First Timothy","First Tim."],chapters:{1:20,2:15,3:16,4:16,5:25,6:21}},"2TI":{chapterCount:4,chapterVerseCountPairings:{1:18,2:26,3:17,4:22},name:"2 Timothy",abbr:"2TI",ord:"55",book_group_id:"0",testament:"NT",id:"2Tim",usfm_end:"2TI 4:22",next:{book:{name:"Titus",id:"Titus"}},previous:{book:{name:"1 Timothy",id:"1Tim"}},abbreviations:["2 Tim.","2 Ti.","II Timothy","II Tim.","II Ti.","2Timothy","2Tim.","2Ti.","2nd Timothy","2nd Tim.","Second Timothy","Second Tim."],chapters:{1:18,2:26,3:17,4:22}},TIT:{chapterCount:3,chapterVerseCountPairings:{1:16,2:15,3:15},name:"Titus",abbr:"TIT",ord:"56",book_group_id:"0",testament:"NT",id:"Titus",usfm_end:"TIT 3:15",next:{book:{name:"Philemon",id:"Phlm"}},previous:{book:{name:"2 Timothy",id:"2Tim"}},abbreviations:["Titus","Tit","ti"],chapters:{1:16,2:15,3:15}},PHM:{chapterCount:1,chapterVerseCountPairings:{1:25},name:"Philemon",abbr:"PHM",ord:"57",book_group_id:"0",testament:"NT",id:"Phlm",usfm_end:"PHM 1:25",next:{book:{name:"Hebrews",id:"Heb"}},previous:{book:{name:"Titus",id:"Titus"}},abbreviations:["Philem.","Phm.","Pm."],chapters:{1:25}},HEB:{chapterCount:13,chapterVerseCountPairings:{1:14,2:18,3:19,4:16,5:14,6:20,7:28,8:13,9:28,10:39,11:40,12:29,13:25},name:"Hebrews",abbr:"HEB",ord:"58",book_group_id:"0",testament:"NT",id:"Heb",usfm_end:"HEB 13:25",next:{book:{name:"James",id:"Jas"}},previous:{book:{name:"Philemon",id:"Phlm"}},abbreviations:["Heb."],chapters:{1:14,2:18,3:19,4:16,5:14,6:20,7:28,8:13,9:28,10:39,11:40,12:29,13:25}},JAS:{chapterCount:5,chapterVerseCountPairings:{1:27,2:26,3:18,4:17,5:20},name:"James",abbr:"JAS",ord:"59",book_group_id:"0",testament:"NT",id:"Jas",usfm_end:"JAS 5:20",next:{book:{name:"1 Peter",id:"1Pet"}},previous:{book:{name:"Hebrews",id:"Heb"}},abbreviations:["James","Jas","Jm"],chapters:{1:27,2:26,3:18,4:17,5:20}},"1PE":{chapterCount:5,chapterVerseCountPairings:{1:25,2:25,3:22,4:19,5:14},name:"1 Peter",abbr:"1PE",ord:"60",book_group_id:"0",testament:"NT",id:"1Pet",usfm_end:"1PE 5:14",next:{book:{name:"2 Peter",id:"2Pet"}},previous:{book:{name:"James",id:"Jas"}},abbreviations:["1 Pet.","1 Pe.","1 Pt.","1 P.","I Pet.","I Pt.","I Pe.","1Peter","1Pet.","1Pe.","1Pt.","1P.","I Peter","1st Peter","First Peter"],chapters:{1:25,2:25,3:22,4:19,5:14}},"2PE":{chapterCount:3,chapterVerseCountPairings:{1:21,2:22,3:18},name:"2 Peter",abbr:"2PE",ord:"61",book_group_id:"0",testament:"NT",id:"2Pet",usfm_end:"2PE 3:18",next:{book:{name:"1 John",id:"1John"}},previous:{book:{name:"1 Peter",id:"1Pet"}},abbreviations:["2 Pet.","2 Pe.","2 Pt.","2 P.","II Peter","II Pet.","II Pt.","II Pe.","2Peter","2Pet.","2Pe.","2Pt.","2P.","2nd Peter","Second Peter"],chapters:{1:21,2:22,3:18}},"1JN":{chapterCount:5,chapterVerseCountPairings:{1:10,2:29,3:24,4:21,5:21},name:"1 John",abbr:"1JN",ord:"62",book_group_id:"0",testament:"NT",id:"1John",usfm_end:"1JN 5:21",next:{book:{name:"2 John",id:"2John"}},previous:{book:{name:"2 Peter",id:"2Pet"}},abbreviations:["1 John","1 Jhn.","1 Jn.","1 J.","1John","1Jhn.","1Joh.","1Jn.","1Jo.","1J.","I John","I Jhn.","I Joh.","I Jn.","I Jo.","1st John","First John"],chapters:{1:10,2:29,3:24,4:21,5:21}},"2JN":{chapterCount:1,chapterVerseCountPairings:{1:13},name:"2 John",abbr:"2JN",ord:"63",book_group_id:"0",testament:"NT",id:"2John",usfm_end:"2JN 1:13",next:{book:{name:"3 John",id:"3John"}},previous:{book:{name:"1 John",id:"1John"}},abbreviations:["2 John","2 Jhn.","2 Jn.","2 J.","2John","2Jhn.","2Joh.","2Jn.","2Jo.","2J.","II John","II Jhn.","II Joh.","II Jn.","II Jo.","2nd John","Second John"],chapters:{1:13}},"3JN":{chapterCount:1,chapterVerseCountPairings:{1:15},name:"3 John",abbr:"3JN",ord:"64",book_group_id:"0",testament:"NT",id:"3John",usfm_end:"3JN 1:14",next:{book:{name:"Jude",id:"Jude"}},previous:{book:{name:"2 John",id:"2John"}},abbreviations:["3 John","3 Jhn.","3 Jn.","3 J.","3John","3Jhn.","3Joh.","3Jn.","3Jo.","3J.","III John","III Jhn.","III Joh.","III Jn.","III Jo.","3rd John","Third John"],chapters:{1:14}},JUD:{chapterCount:1,chapterVerseCountPairings:{1:25},name:"Jude",abbr:"JUD",ord:"65",book_group_id:"0",testament:"NT",id:"Jude",usfm_end:"JUD 1:25",next:{book:{name:"Revelation",id:"Rev"}},previous:{book:{name:"3 John",id:"3John"}},abbreviations:["Jude","Jud.","Jd."],chapters:{1:25}},REV:{chapterCount:22,chapterVerseCountPairings:{1:20,2:29,3:22,4:11,5:14,6:17,7:17,8:13,9:21,10:11,11:19,12:18,13:18,14:20,15:8,16:21,17:18,18:24,19:21,20:15,21:27,22:21},name:"Revelation",abbr:"REV",ord:"66",book_group_id:"0",testament:"NT",id:"Rev",usfm_end:"REV 22:21",previous:{book:{name:"Jude",id:"Jude"}},abbreviations:["Rev","Re","The Revelation"],chapters:{1:20,2:29,3:22,4:11,5:14,6:17,7:17,8:13,9:21,10:11,11:19,12:17,13:18,14:20,15:8,16:21,17:18,18:24,19:21,20:15,21:27,22:21}}},st=({onSelectChapter:t})=>{const{state:{bookChapters:e}}=L.useContext(je);return J.jsx("div",{className:"grid [200px]:grid-cols-3 [400px]:grid-cols-4 gap-4 p-2",children:e.map((s,n)=>J.jsx("div",{children:J.jsx("div",{className:"cursor-pointer hover:text-blue-500",onClick:()=>t(s),children:s})},n))})},nt=({onBookClick:t,bookList:e})=>{const{state:{selectedBook:s,showChapterList:n},actions:a}=L.useContext(je),{setSelectedBook:u,setBookChapters:b,setSelectedChapter:m,setShowChapterList:g}=a,v=f=>{console.log({chapter:f}),m(parseInt(f)),me.postMessage({type:le.UPDATE_CHAPTER,payload:{chapter:f}})},p=f=>{t(f),u(f.fileName);const{chapters:h}=et(f.book);console.log({chapters:h}),b(h),g(o=>!o)};return L.useEffect(()=>{g(!0)},[s]),J.jsx("div",{className:"space-y-2",children:J.jsx("div",{className:"space-y-2 ",children:e&&e.length>0&&e.map((f,h)=>J.jsxs("div",{children:[J.jsx("div",{className:"cursor-pointer text-left hover:text-blue-500 rounded border border-gray-300 p-2",onClick:()=>p(f),children:f.book}),s&&s===f.fileName&&n&&J.jsx(st,{onSelectChapter:v})]},h))})})};var Se={},Ae=We;Se.createRoot=Ae.createRoot,Se.hydrateRoot=Ae.hydrateRoot;var _e=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Te=typeof window>"u"||"Deno"in window;function w(){}function it(t,e){return typeof t=="function"?t(e):t}function at(t){return typeof t=="number"&&t>=0&&t!==1/0}function rt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ne(t,e){const{type:s="all",exact:n,fetchStatus:a,predicate:u,queryKey:b,stale:m}=t;if(b){if(n){if(e.queryHash!==Me(b,e.options))return!1}else if(!pe(e.queryKey,b))return!1}if(s!=="all"){const g=e.isActive();if(s==="active"&&!g||s==="inactive"&&g)return!1}return!(typeof m=="boolean"&&e.isStale()!==m||typeof a<"u"&&a!==e.state.fetchStatus||u&&!u(e))}function Re(t,e){const{exact:s,status:n,predicate:a,mutationKey:u}=t;if(u){if(!e.options.mutationKey)return!1;if(s){if(be(e.options.mutationKey)!==be(u))return!1}else if(!pe(e.options.mutationKey,u))return!1}return!(n&&e.state.status!==n||a&&!a(e))}function Me(t,e){return((e==null?void 0:e.queryKeyHashFn)||be)(t)}function be(t){return JSON.stringify(t,(e,s)=>Oe(s)?Object.keys(s).sort().reduce((n,a)=>(n[a]=s[a],n),{}):s)}function pe(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(s=>!pe(t[s],e[s])):!1}function Be(t,e){if(t===e)return t;const s=we(t)&&we(e);if(s||Oe(t)&&Oe(e)){const n=s?t:Object.keys(t),a=n.length,u=s?e:Object.keys(e),b=u.length,m=s?[]:{};let g=0;for(let v=0;v"u")return!0;const s=e.prototype;return!(!He(s)||!s.hasOwnProperty("isPrototypeOf"))}function He(t){return Object.prototype.toString.call(t)==="[object Object]"}function ot(t){return new Promise(e=>{setTimeout(e,t)})}function ut(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Be(t,e):e}function ht(t,e,s=0){const n=[...t,e];return s&&n.length>s?n.slice(1):n}function dt(t,e,s=0){const n=[e,...t];return s&&n.length>s?n.slice(0,-1):n}var W,Q,te,De,ct=(De=class extends _e{constructor(){super();d(this,W,void 0);d(this,Q,void 0);d(this,te,void 0);r(this,te,e=>{if(!Te&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){i(this,Q)||this.setEventListener(i(this,te))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,Q))==null||e.call(this),r(this,Q,void 0))}setEventListener(e){var s;r(this,te,e),(s=i(this,Q))==null||s.call(this),r(this,Q,e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()}))}setFocused(e){i(this,W)!==e&&(r(this,W,e),this.onFocus())}onFocus(){this.listeners.forEach(e=>{e()})}isFocused(){var e;return typeof i(this,W)=="boolean"?i(this,W):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},W=new WeakMap,Q=new WeakMap,te=new WeakMap,De),Ie=new ct,se,q,ne,Ke,lt=(Ke=class extends _e{constructor(){super();d(this,se,!0);d(this,q,void 0);d(this,ne,void 0);r(this,ne,e=>{if(!Te&&window.addEventListener){const s=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",n)}}})}onSubscribe(){i(this,q)||this.setEventListener(i(this,ne))}onUnsubscribe(){var e;this.hasListeners()||((e=i(this,q))==null||e.call(this),r(this,q,void 0))}setEventListener(e){var s;r(this,ne,e),(s=i(this,q))==null||s.call(this),r(this,q,e(this.setOnline.bind(this)))}setOnline(e){i(this,se)!==e&&(r(this,se,e),this.listeners.forEach(n=>{n(e)}))}isOnline(){return i(this,se)}},se=new WeakMap,q=new WeakMap,ne=new WeakMap,Ke),Pe=new lt;function mt(t){return Math.min(1e3*2**t,3e4)}function xe(t){return(t??"online")==="online"?Pe.isOnline():!0}var Ze=class{constructor(t){this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Ee(t){return t instanceof Ze}function ze(t){let e=!1,s=0,n=!1,a,u,b;const m=new Promise((l,c)=>{u=l,b=c}),g=l=>{var c;n||(o(new Ze(l)),(c=t.abort)==null||c.call(t))},v=()=>{e=!0},p=()=>{e=!1},f=()=>!Ie.isFocused()||t.networkMode!=="always"&&!Pe.isOnline(),h=l=>{var c;n||(n=!0,(c=t.onSuccess)==null||c.call(t,l),a==null||a(),u(l))},o=l=>{var c;n||(n=!0,(c=t.onError)==null||c.call(t,l),a==null||a(),b(l))},P=()=>new Promise(l=>{var c;a=O=>{const C=n||!f();return C&&l(O),C},(c=t.onPause)==null||c.call(t)}).then(()=>{var l;a=void 0,n||(l=t.onContinue)==null||l.call(t)}),E=()=>{if(n)return;let l;try{l=t.fn()}catch(c){l=Promise.reject(c)}Promise.resolve(l).then(h).catch(c=>{var F;if(n)return;const O=t.retry??(Te?0:3),C=t.retryDelay??mt,I=typeof C=="function"?C(s,c):C,x=O===!0||typeof O=="number"&&s{if(f())return P()}).then(()=>{e?o(c):E()})})};return xe(t.networkMode)?E():P().then(E),{promise:m,cancel:g,continue:()=>(a==null?void 0:a())?m:Promise.resolve(),cancelRetry:v,continueRetry:p}}function bt(){let t=[],e=0,s=h=>{h()},n=h=>{h()},a=h=>setTimeout(h,0);const u=h=>{a=h},b=h=>{let o;e++;try{o=h()}finally{e--,e||v()}return o},m=h=>{e?t.push(h):a(()=>{s(h)})},g=h=>(...o)=>{m(()=>{h(...o)})},v=()=>{const h=t;t=[],h.length&&a(()=>{n(()=>{h.forEach(o=>{s(o)})})})};return{batch:b,batchCalls:g,schedule:m,setNotifyFunction:h=>{s=h},setBatchNotifyFunction:h=>{n=h},setScheduler:u}}var S=bt(),X,Ve,$e=(Ve=class{constructor(){d(this,X,void 0)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),at(this.gcTime)&&r(this,X,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Te?1/0:5*60*1e3))}clearGcTimeout(){i(this,X)&&(clearTimeout(i(this,X)),r(this,X,void 0))}},X=new WeakMap,Ve),ie,ae,A,j,N,T,fe,Y,re,ke,H,U,Le,pt=(Le=class extends $e{constructor(e){super();d(this,re);d(this,H);d(this,ie,void 0);d(this,ae,void 0);d(this,A,void 0);d(this,j,void 0);d(this,N,void 0);d(this,T,void 0);d(this,fe,void 0);d(this,Y,void 0);r(this,Y,!1),r(this,fe,e.defaultOptions),y(this,re,ke).call(this,e.options),r(this,T,[]),r(this,A,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,r(this,ie,e.state||ft(this.options)),this.state=i(this,ie),this.scheduleGc()}get meta(){return this.options.meta}optionalRemove(){!i(this,T).length&&this.state.fetchStatus==="idle"&&i(this,A).remove(this)}setData(e,s){const n=ut(this.state.data,e,this.options);return y(this,H,U).call(this,{data:n,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),n}setState(e,s){y(this,H,U).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var n;const s=i(this,j);return(n=i(this,N))==null||n.cancel(e),s?s.then(w).catch(w):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(i(this,ie))}isActive(){return i(this,T).some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||i(this,T).some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!rt(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=i(this,T).find(n=>n.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=i(this,N))==null||s.continue()}onOnline(){var s;const e=i(this,T).find(n=>n.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=i(this,N))==null||s.continue()}addObserver(e){i(this,T).includes(e)||(i(this,T).push(e),this.clearGcTimeout(),i(this,A).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){i(this,T).includes(e)&&(r(this,T,i(this,T).filter(s=>s!==e)),i(this,T).length||(i(this,N)&&(i(this,Y)?i(this,N).cancel({revert:!0}):i(this,N).cancelRetry()),this.scheduleGc()),i(this,A).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return i(this,T).length}invalidate(){this.state.isInvalidated||y(this,H,U).call(this,{type:"invalidate"})}fetch(e,s){var v,p,f,h;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(i(this,j))return(v=i(this,N))==null||v.continueRetry(),i(this,j)}if(e&&y(this,re,ke).call(this,e),!this.options.queryFn){const o=i(this,T).find(P=>P.options.queryFn);o&&y(this,re,ke).call(this,o.options)}const n=new AbortController,a={queryKey:this.queryKey,meta:this.meta},u=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(r(this,Y,!0),n.signal)})};u(a);const b=()=>this.options.queryFn?(r(this,Y,!1),this.options.persister?this.options.persister(this.options.queryFn,a,this):this.options.queryFn(a)):Promise.reject(new Error(`Missing queryFn: '${this.options.queryHash}'`)),m={fetchOptions:s,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:b};u(m),(p=this.options.behavior)==null||p.onFetch(m,this),r(this,ae,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=m.fetchOptions)==null?void 0:f.meta))&&y(this,H,U).call(this,{type:"fetch",meta:(h=m.fetchOptions)==null?void 0:h.meta});const g=o=>{var P,E,l,c;Ee(o)&&o.silent||y(this,H,U).call(this,{type:"error",error:o}),Ee(o)||((E=(P=i(this,A).config).onError)==null||E.call(P,o,this),(c=(l=i(this,A).config).onSettled)==null||c.call(l,this.state.data,o,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return r(this,N,ze({fn:m.fetchFn,abort:n.abort.bind(n),onSuccess:o=>{var P,E,l,c;if(typeof o>"u"){g(new Error(`${this.queryHash} data is undefined`));return}this.setData(o),(E=(P=i(this,A).config).onSuccess)==null||E.call(P,o,this),(c=(l=i(this,A).config).onSettled)==null||c.call(l,o,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:g,onFail:(o,P)=>{y(this,H,U).call(this,{type:"failed",failureCount:o,error:P})},onPause:()=>{y(this,H,U).call(this,{type:"pause"})},onContinue:()=>{y(this,H,U).call(this,{type:"continue"})},retry:m.options.retry,retryDelay:m.options.retryDelay,networkMode:m.options.networkMode})),r(this,j,i(this,N).promise),i(this,j)}},ie=new WeakMap,ae=new WeakMap,A=new WeakMap,j=new WeakMap,N=new WeakMap,T=new WeakMap,fe=new WeakMap,Y=new WeakMap,re=new WeakSet,ke=function(e){this.options={...i(this,fe),...e},this.updateGcTime(this.options.gcTime)},H=new WeakSet,U=function(e){const s=n=>{switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:e.meta??null,fetchStatus:xe(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"pending"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return Ee(a)&&a.revert&&i(this,ae)?{...i(this,ae),fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=s(this.state),S.batch(()=>{i(this,T).forEach(n=>{n.onQueryUpdate()}),i(this,A).notify({query:this,type:"updated",action:e})})},Le);function ft(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=typeof e<"u",n=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var D,Ue,gt=(Ue=class extends _e{constructor(e={}){super();d(this,D,void 0);this.config=e,r(this,D,new Map)}build(e,s,n){const a=s.queryKey,u=s.queryHash??Me(a,s);let b=this.get(u);return b||(b=new pt({cache:this,queryKey:a,queryHash:u,options:e.defaultQueryOptions(s),state:n,defaultOptions:e.getQueryDefaults(a)}),this.add(b)),b}add(e){i(this,D).has(e.queryHash)||(i(this,D).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=i(this,D).get(e.queryHash);s&&(e.destroy(),s===e&&i(this,D).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){S.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return i(this,D).get(e)}getAll(){return[...i(this,D).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(n=>Ne(s,n))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(n=>Ne(e,n)):s}notify(e){S.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){S.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){S.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},D=new WeakMap,Ue),K,ge,M,oe,V,G,Ge,Ct=(Ge=class extends $e{constructor(e){super();d(this,V);d(this,K,void 0);d(this,ge,void 0);d(this,M,void 0);d(this,oe,void 0);this.mutationId=e.mutationId,r(this,ge,e.defaultOptions),r(this,M,e.mutationCache),r(this,K,[]),this.state=e.state||vt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...i(this,ge),...e},this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){i(this,K).includes(e)||(i(this,K).push(e),this.clearGcTimeout(),i(this,M).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){r(this,K,i(this,K).filter(s=>s!==e)),this.scheduleGc(),i(this,M).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){i(this,K).length||(this.state.status==="pending"?this.scheduleGc():i(this,M).remove(this))}continue(){var e;return((e=i(this,oe))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var a,u,b,m,g,v,p,f,h,o,P,E,l,c,O,C,I,x,F,ve;const s=()=>(r(this,oe,ze({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(_,$)=>{y(this,V,G).call(this,{type:"failed",failureCount:_,error:$})},onPause:()=>{y(this,V,G).call(this,{type:"pause"})},onContinue:()=>{y(this,V,G).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode})),i(this,oe).promise),n=this.state.status==="pending";try{if(!n){y(this,V,G).call(this,{type:"pending",variables:e}),await((u=(a=i(this,M).config).onMutate)==null?void 0:u.call(a,e,this));const $=await((m=(b=this.options).onMutate)==null?void 0:m.call(b,e));$!==this.state.context&&y(this,V,G).call(this,{type:"pending",context:$,variables:e})}const _=await s();return await((v=(g=i(this,M).config).onSuccess)==null?void 0:v.call(g,_,e,this.state.context,this)),await((f=(p=this.options).onSuccess)==null?void 0:f.call(p,_,e,this.state.context)),await((o=(h=i(this,M).config).onSettled)==null?void 0:o.call(h,_,null,this.state.variables,this.state.context,this)),await((E=(P=this.options).onSettled)==null?void 0:E.call(P,_,null,e,this.state.context)),y(this,V,G).call(this,{type:"success",data:_}),_}catch(_){try{throw await((c=(l=i(this,M).config).onError)==null?void 0:c.call(l,_,e,this.state.context,this)),await((C=(O=this.options).onError)==null?void 0:C.call(O,_,e,this.state.context)),await((x=(I=i(this,M).config).onSettled)==null?void 0:x.call(I,void 0,_,this.state.variables,this.state.context,this)),await((ve=(F=this.options).onSettled)==null?void 0:ve.call(F,void 0,_,e,this.state.context)),_}finally{y(this,V,G).call(this,{type:"error",error:_})}}}},K=new WeakMap,ge=new WeakMap,M=new WeakMap,oe=new WeakMap,V=new WeakSet,G=function(e){const s=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"pending":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!xe(this.options.networkMode),status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),S.batch(()=>{i(this,K).forEach(n=>{n.onMutationUpdate(e)}),i(this,M).notify({mutation:this,type:"updated",action:e})})},Ge);function vt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var R,Ce,ee,Qe,yt=(Qe=class extends _e{constructor(e={}){super();d(this,R,void 0);d(this,Ce,void 0);d(this,ee,void 0);this.config=e,r(this,R,[]),r(this,Ce,0)}build(e,s,n){const a=new Ct({mutationCache:this,mutationId:++ye(this,Ce)._,options:e.defaultMutationOptions(s),state:n});return this.add(a),a}add(e){i(this,R).push(e),this.notify({type:"added",mutation:e})}remove(e){r(this,R,i(this,R).filter(s=>s!==e)),this.notify({type:"removed",mutation:e})}clear(){S.batch(()=>{i(this,R).forEach(e=>{this.remove(e)})})}getAll(){return i(this,R)}find(e){const s={exact:!0,...e};return i(this,R).find(n=>Re(s,n))}findAll(e={}){return i(this,R).filter(s=>Re(e,s))}notify(e){S.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){return r(this,ee,(i(this,ee)??Promise.resolve()).then(()=>{const e=i(this,R).filter(s=>s.state.isPaused);return S.batch(()=>e.reduce((s,n)=>s.then(()=>n.continue().catch(w)),Promise.resolve()))}).then(()=>{r(this,ee,void 0)})),i(this,ee)}},R=new WeakMap,Ce=new WeakMap,ee=new WeakMap,Qe);function kt(t){return{onFetch:(e,s)=>{const n=async()=>{var P,E,l,c,O;const a=e.options,u=(l=(E=(P=e.fetchOptions)==null?void 0:P.meta)==null?void 0:E.fetchMore)==null?void 0:l.direction,b=((c=e.state.data)==null?void 0:c.pages)||[],m=((O=e.state.data)==null?void 0:O.pageParams)||[],g={pages:[],pageParams:[]};let v=!1;const p=C=>{Object.defineProperty(C,"signal",{enumerable:!0,get:()=>(e.signal.aborted?v=!0:e.signal.addEventListener("abort",()=>{v=!0}),e.signal)})},f=e.options.queryFn||(()=>Promise.reject(new Error(`Missing queryFn: '${e.options.queryHash}'`))),h=async(C,I,x)=>{if(v)return Promise.reject();if(I==null&&C.pages.length)return Promise.resolve(C);const F={queryKey:e.queryKey,pageParam:I,direction:x?"backward":"forward",meta:e.options.meta};p(F);const ve=await f(F),{maxPages:_}=e.options,$=x?dt:ht;return{pages:$(C.pages,ve,_),pageParams:$(C.pageParams,I,_)}};let o;if(u&&b.length){const C=u==="backward",I=C?Pt:Fe,x={pages:b,pageParams:m},F=I(a,x);o=await h(x,F,C)}else{o=await h(g,m[0]??a.initialPageParam);const C=t??b.length;for(let I=1;I{var a,u;return(u=(a=e.options).persister)==null?void 0:u.call(a,n,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=n}}}function Fe(t,{pages:e,pageParams:s}){const n=e.length-1;return t.getNextPageParam(e[n],e,s[n],s)}function Pt(t,{pages:e,pageParams:s}){var n;return(n=t.getPreviousPageParam)==null?void 0:n.call(t,e[0],e,s[0],s)}var k,B,Z,ue,he,z,de,ce,qe,_t=(qe=class{constructor(t={}){d(this,k,void 0);d(this,B,void 0);d(this,Z,void 0);d(this,ue,void 0);d(this,he,void 0);d(this,z,void 0);d(this,de,void 0);d(this,ce,void 0);r(this,k,t.queryCache||new gt),r(this,B,t.mutationCache||new yt),r(this,Z,t.defaultOptions||{}),r(this,ue,new Map),r(this,he,new Map),r(this,z,0)}mount(){ye(this,z)._++,i(this,z)===1&&(r(this,de,Ie.subscribe(()=>{Ie.isFocused()&&(this.resumePausedMutations(),i(this,k).onFocus())})),r(this,ce,Pe.subscribe(()=>{Pe.isOnline()&&(this.resumePausedMutations(),i(this,k).onOnline())})))}unmount(){var t,e;ye(this,z)._--,i(this,z)===0&&((t=i(this,de))==null||t.call(this),r(this,de,void 0),(e=i(this,ce))==null||e.call(this),r(this,ce,void 0))}isFetching(t){return i(this,k).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return i(this,B).findAll({...t,status:"pending"}).length}getQueryData(t){var e;return(e=i(this,k).find({queryKey:t}))==null?void 0:e.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);return e!==void 0?Promise.resolve(e):this.fetchQuery(t)}getQueriesData(t){return this.getQueryCache().findAll(t).map(({queryKey:e,state:s})=>{const n=s.data;return[e,n]})}setQueryData(t,e,s){const n=i(this,k).find({queryKey:t}),a=n==null?void 0:n.state.data,u=it(e,a);if(typeof u>"u")return;const b=this.defaultQueryOptions({queryKey:t});return i(this,k).build(this,b).setData(u,{...s,manual:!0})}setQueriesData(t,e,s){return S.batch(()=>this.getQueryCache().findAll(t).map(({queryKey:n})=>[n,this.setQueryData(n,e,s)]))}getQueryState(t){var e;return(e=i(this,k).find({queryKey:t}))==null?void 0:e.state}removeQueries(t){const e=i(this,k);S.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=i(this,k),n={type:"active",...t};return S.batch(()=>(s.findAll(t).forEach(a=>{a.reset()}),this.refetchQueries(n,e)))}cancelQueries(t={},e={}){const s={revert:!0,...e},n=S.batch(()=>i(this,k).findAll(t).map(a=>a.cancel(s)));return Promise.all(n).then(w).catch(w)}invalidateQueries(t={},e={}){return S.batch(()=>{if(i(this,k).findAll(t).forEach(n=>{n.invalidate()}),t.refetchType==="none")return Promise.resolve();const s={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(s,e)})}refetchQueries(t={},e){const s={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},n=S.batch(()=>i(this,k).findAll(t).filter(a=>!a.isDisabled()).map(a=>{let u=a.fetch(void 0,s);return s.throwOnError||(u=u.catch(w)),a.state.fetchStatus==="paused"?Promise.resolve():u}));return Promise.all(n).then(w)}fetchQuery(t){const e=this.defaultQueryOptions(t);typeof e.retry>"u"&&(e.retry=!1);const s=i(this,k).build(this,e);return s.isStaleByTime(e.staleTime)?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(w).catch(w)}fetchInfiniteQuery(t){return t.behavior=kt(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(w).catch(w)}resumePausedMutations(){return i(this,B).resumePausedMutations()}getQueryCache(){return i(this,k)}getMutationCache(){return i(this,B)}getDefaultOptions(){return i(this,Z)}setDefaultOptions(t){r(this,Z,t)}setQueryDefaults(t,e){i(this,ue).set(be(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...i(this,ue).values()];let s={};return e.forEach(n=>{pe(t,n.queryKey)&&(s={...s,...n.defaultOptions})}),s}setMutationDefaults(t,e){i(this,he).set(be(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...i(this,he).values()];let s={};return e.forEach(n=>{pe(t,n.mutationKey)&&(s={...s,...n.defaultOptions})}),s}defaultQueryOptions(t){if(t!=null&&t._defaulted)return t;const e={...i(this,Z).queries,...(t==null?void 0:t.queryKey)&&this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Me(e.queryKey,e)),typeof e.refetchOnReconnect>"u"&&(e.refetchOnReconnect=e.networkMode!=="always"),typeof e.throwOnError>"u"&&(e.throwOnError=!!e.suspense),typeof e.networkMode>"u"&&e.persister&&(e.networkMode="offlineFirst"),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...i(this,Z).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){i(this,k).clear(),i(this,B).clear()}},k=new WeakMap,B=new WeakMap,Z=new WeakMap,ue=new WeakMap,he=new WeakMap,z=new WeakMap,de=new WeakMap,ce=new WeakMap,qe),Tt=L.createContext(void 0),Jt=({client:t,children:e})=>(L.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),L.createElement(Tt.Provider,{value:t},e));const Et=new _t,St=({children:t})=>(L.useEffect(()=>{me.setMessageListeners(e=>{console.log("providers:",e)})},[]),J.jsx(Jt,{client:Et,children:t})),Ot=t=>{Se.createRoot(document.getElementById("root")).render(J.jsx(Xe.StrictMode,{children:J.jsx(St,{children:t})}))},It=()=>{const[t,e]=L.useState(void 0);L.useEffect(()=>{},[t]);const s=n=>{me.postMessage({type:le.OPEN_USFM_FILE,payload:{...n}})};return L.useEffect(()=>{me.setMessageListeners(n=>{switch(n.data.type){case le.BOOKS_IN_WORKSPACE_RESPONSE:e(n.data.payload),console.log("URI message received.",n.data.payload);break;case le.SCROLL_TO_CHAPTER:console.log("scroll to chapter received",n.data.payload);break}}),me.postMessage({type:le.SEND_BOOKS_IN_WORKSPACE,payload:"usfmExplorer"})},[]),J.jsx(Ye,{children:J.jsx("div",{className:"p-4",children:J.jsx("div",{className:"space-y-4",children:J.jsx(nt,{onBookClick:s,bookList:t})})})})};Ot(J.jsx(It,{})); +var Je=t=>{throw TypeError(t)};var ye=(t,e,s)=>e.has(t)||Je("Cannot "+s);var r=(t,e,s)=>(ye(t,e,"read from private field"),s?s.call(t):e.get(t)),c=(t,e,s)=>e.has(t)?Je("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),u=(t,e,s,i)=>(ye(t,e,"write to private field"),i?i.call(t,s):e.set(t,s),s),T=(t,e,s)=>(ye(t,e,"access private method"),s);var pe=(t,e,s,i)=>({set _(n){u(t,e,n,s)},get _(){return r(t,e,i)}});import{r as L,d as Le,j as _,v as de,M as he,e as We,R as Xe,a as $e}from"../App.js";function Ye(t){const e=et[t];return console.log({book:t,bookData:e}),{chapters:Object.keys(e.chapters),chapterCount:e.chapterCount}}const et={GEN:{chapterCount:50,chapterVerseCountPairings:{1:31,2:25,3:24,4:26,5:32,6:22,7:24,8:22,9:29,10:32,11:32,12:20,13:18,14:24,15:21,16:16,17:27,18:33,19:38,20:18,21:34,22:24,23:20,24:67,25:34,26:35,27:46,28:22,29:35,30:43,31:54,32:33,33:20,34:31,35:29,36:43,37:36,38:30,39:23,40:23,41:57,42:38,43:34,44:34,45:28,46:34,47:31,48:22,49:33,50:26},name:"Genesis",abbr:"GEN",ord:"01",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Gen",usfm_end:"GEN 50:26",next:{book:{name:"Exodus",id:"Exod"}},abbreviations:["Gen.","Ge.","Gn."],chapters:{1:31,2:25,3:24,4:26,5:32,6:22,7:24,8:22,9:29,10:32,11:32,12:20,13:18,14:24,15:21,16:16,17:27,18:33,19:38,20:18,21:34,22:24,23:20,24:67,25:34,26:35,27:46,28:22,29:35,30:43,31:55,32:32,33:20,34:31,35:29,36:43,37:36,38:30,39:23,40:23,41:57,42:38,43:34,44:34,45:28,46:34,47:31,48:22,49:33,50:26}},EXO:{chapterCount:40,chapterVerseCountPairings:{1:22,2:25,3:22,4:31,5:23,6:30,7:29,8:28,9:35,10:29,11:10,12:51,13:22,14:31,15:27,16:36,17:16,18:27,19:25,20:26,21:37,22:30,23:33,24:18,25:40,26:37,27:21,28:43,29:46,30:38,31:18,32:35,33:23,34:35,35:35,36:38,37:29,38:31,39:43,40:38},name:"Exodus",abbr:"EXO",ord:"02",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Exod",usfm_end:"EXO 40:38",next:{book:{name:"Leviticus",id:"Lev"}},previous:{book:{name:"Genesis",id:"Gen"}},abbreviations:["Ex.","Exod.","Exo."],chapters:{1:22,2:25,3:22,4:31,5:23,6:30,7:25,8:32,9:35,10:29,11:10,12:51,13:22,14:31,15:27,16:36,17:16,18:27,19:25,20:26,21:36,22:31,23:33,24:18,25:40,26:37,27:21,28:43,29:46,30:38,31:18,32:35,33:23,34:35,35:35,36:38,37:29,38:31,39:43,40:38}},LEV:{chapterCount:27,chapterVerseCountPairings:{1:17,2:16,3:17,4:35,5:26,6:23,7:38,8:36,9:24,10:20,11:47,12:8,13:59,14:57,15:33,16:34,17:16,18:30,19:37,20:27,21:24,22:33,23:44,24:23,25:55,26:46,27:34},name:"Leviticus",abbr:"LEV",ord:"03",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Lev",usfm_end:"LEV 27:34",next:{book:{name:"Numbers",id:"Num"}},previous:{book:{name:"Exodus",id:"Exod"}},abbreviations:["Lev.","Le.","Lv."],chapters:{1:17,2:16,3:17,4:35,5:19,6:30,7:38,8:36,9:24,10:20,11:47,12:8,13:59,14:57,15:33,16:34,17:16,18:30,19:37,20:27,21:24,22:33,23:44,24:23,25:55,26:46,27:34}},NUM:{chapterCount:36,chapterVerseCountPairings:{1:54,2:34,3:51,4:49,5:31,6:27,7:89,8:26,9:23,10:36,11:35,12:16,13:33,14:45,15:41,16:35,17:28,18:32,19:22,20:29,21:35,22:41,23:30,24:25,25:19,26:65,27:23,28:31,29:39,30:17,31:54,32:42,33:56,34:29,35:34,36:13},name:"Numbers",abbr:"NUM",ord:"04",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Num",usfm_end:"NUM 36:13",next:{book:{name:"Deuteronomy",id:"Deut"}},previous:{book:{name:"Leviticus",id:"Lev"}},abbreviations:["Num.","Nu.","Nm.","Nb."],chapters:{1:54,2:34,3:51,4:49,5:31,6:27,7:89,8:26,9:23,10:36,11:35,12:16,13:33,14:45,15:41,16:50,17:13,18:32,19:22,20:29,21:35,22:41,23:30,24:25,25:18,26:65,27:23,28:31,29:40,30:16,31:54,32:42,33:56,34:29,35:34,36:13}},DEU:{chapterCount:34,chapterVerseCountPairings:{1:46,2:37,3:29,4:49,5:33,6:25,7:26,8:20,9:29,10:22,11:32,12:31,13:19,14:29,15:23,16:22,17:20,18:22,19:21,20:20,21:23,22:29,23:26,24:22,25:19,26:19,27:26,28:69,29:28,30:20,31:30,32:52,33:29,34:12},name:"Deuteronomy",abbr:"DEU",ord:"05",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Deut",usfm_end:"DEU 34:12",next:{book:{name:"Joshua",id:"Josh"}},previous:{book:{name:"Numbers",id:"Num"}},abbreviations:["Deut.","De.","Dt."],chapters:{1:46,2:37,3:29,4:49,5:33,6:25,7:26,8:20,9:29,10:22,11:32,12:32,13:18,14:29,15:23,16:22,17:20,18:22,19:21,20:20,21:23,22:30,23:25,24:22,25:19,26:19,27:26,28:68,29:29,30:20,31:30,32:52,33:29,34:12}},JOS:{chapterCount:24,chapterVerseCountPairings:{1:18,2:24,3:17,4:24,5:15,6:27,7:26,8:35,9:27,10:43,11:23,12:24,13:33,14:15,15:63,16:10,17:18,18:28,19:51,20:9,21:45,22:34,23:16,24:33},name:"Joshua",abbr:"JOS",ord:"06",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Josh",usfm_end:"JOS 24:33",next:{book:{name:"Judges",id:"Judg"}},previous:{book:{name:"Deuteronomy",id:"Deut"}},abbreviations:["Josh.","Jos.","Jsh."],chapters:{1:18,2:24,3:17,4:24,5:15,6:27,7:26,8:35,9:27,10:43,11:23,12:24,13:33,14:15,15:63,16:10,17:18,18:28,19:51,20:9,21:45,22:34,23:16,24:33}},JDG:{chapterCount:21,chapterVerseCountPairings:{1:36,2:23,3:31,4:24,5:31,6:40,7:25,8:35,9:57,10:18,11:40,12:15,13:25,14:20,15:20,16:31,17:13,18:31,19:30,20:48,21:25},name:"Judges",abbr:"JDG",ord:"07",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Judg",usfm_end:"JDG 21:25",next:{book:{name:"Ruth",id:"Ruth"}},previous:{book:{name:"Joshua",id:"Josh"}},abbreviations:["Judg.","Jdg.","Jg.","Jdgs."],chapters:{1:36,2:23,3:31,4:24,5:31,6:40,7:25,8:35,9:57,10:18,11:40,12:15,13:25,14:20,15:20,16:31,17:13,18:31,19:30,20:48,21:25}},RUT:{chapterCount:4,chapterVerseCountPairings:{1:22,2:23,3:18,4:22},name:"Ruth",abbr:"RUT",ord:"08",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ruth",usfm_end:"RUT 4:22",next:{book:{name:"1 Samuel",id:"1Sam"}},previous:{book:{name:"Judges",id:"Judg"}},abbreviations:["Ruth","Rth.","Ru."],chapters:{1:22,2:23,3:18,4:22}},"1SA":{chapterCount:31,chapterVerseCountPairings:{1:28,2:36,3:21,4:22,5:12,6:21,7:17,8:22,9:27,10:27,11:15,12:25,13:23,14:52,15:35,16:23,17:58,18:30,19:24,20:42,21:16,22:23,23:28,24:23,25:44,26:25,27:12,28:25,29:11,30:31,31:13},name:"1 Samuel",abbr:"1SA",ord:"09",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Sam",usfm_end:"1SA 31:13",next:{book:{name:"2 Samuel",id:"2Sam"}},previous:{book:{name:"Ruth",id:"Ruth"}},abbreviations:["1 Sam.","1 Sm.","1 Sa.","1 S.","I Sam.","I Sa.","1Sam.","1Sa.","1S.","1st Samuel","1st Sam.","First Samuel","First Sam."],chapters:{1:28,2:36,3:21,4:22,5:12,6:21,7:17,8:22,9:27,10:27,11:15,12:25,13:23,14:52,15:35,16:23,17:58,18:30,19:24,20:42,21:15,22:23,23:29,24:22,25:44,26:25,27:12,28:25,29:11,30:31,31:13}},"2SA":{chapterCount:24,chapterVerseCountPairings:{1:27,2:32,3:39,4:12,5:25,6:23,7:29,8:18,9:13,10:19,11:27,12:31,13:39,14:33,15:37,16:23,17:29,18:32,19:44,20:26,21:22,22:51,23:39,24:25},name:"2 Samuel",abbr:"2SA",ord:"10",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Sam",usfm_end:"2SA 24:25",next:{book:{name:"1 Kings",id:"1Kgs"}},previous:{book:{name:"1 Samuel",id:"1Sam"}},abbreviations:["2 Sam.","2 Sm.","2 Sa.","2 S.","II Sam.","II Sa.","2Sam.","2Sa.","2S.","2nd Samuel","2nd Sam.","Second Samuel","Second Sam."],chapters:{1:27,2:32,3:39,4:12,5:25,6:23,7:29,8:18,9:13,10:19,11:27,12:31,13:39,14:33,15:37,16:23,17:29,18:33,19:43,20:26,21:22,22:51,23:39,24:25}},"1KI":{chapterCount:22,chapterVerseCountPairings:{1:53,2:46,3:28,4:20,5:32,6:38,7:51,8:66,9:28,10:29,11:43,12:33,13:34,14:31,15:34,16:34,17:24,18:46,19:21,20:43,21:29,22:54},name:"1 Kings",abbr:"1KI",ord:"11",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Kgs",usfm_end:"1KI 22:53",next:{book:{name:"2 Kings",id:"2Kgs"}},previous:{book:{name:"2 Samuel",id:"2Sam"}},abbreviations:["1 Kings","1 Kgs","1 Ki","1Kgs","1Kin","1Ki","1K","I Kgs","I Ki","1st Kings","1st Kgs","First Kings","First Kgs"],chapters:{1:53,2:46,3:28,4:34,5:18,6:38,7:51,8:66,9:28,10:29,11:43,12:33,13:34,14:31,15:34,16:34,17:24,18:46,19:21,20:43,21:29,22:53}},"2KI":{chapterCount:25,chapterVerseCountPairings:{1:18,2:25,3:27,4:44,5:27,6:33,7:20,8:29,9:37,10:36,11:20,12:22,13:25,14:29,15:38,16:20,17:41,18:37,19:37,20:21,21:26,22:20,23:37,24:20,25:30},name:"2 Kings",abbr:"2KI",ord:"12",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Kgs",usfm_end:"2KI 25:30",next:{book:{name:"1 Chronicles",id:"1Chr"}},previous:{book:{name:"1 Kings",id:"1Kgs"}},abbreviations:["2 Kings","2 Kgs.","2 Ki.","2Kgs.","2Kin.","2Ki.","2K.","II Kgs.","II Ki.","2nd Kings","2nd Kgs.","Second Kings","Second Kgs."],chapters:{1:18,2:25,3:27,4:44,5:27,6:33,7:20,8:29,9:37,10:36,11:21,12:21,13:25,14:29,15:38,16:20,17:41,18:37,19:37,20:21,21:26,22:20,23:37,24:20,25:30}},"1CH":{chapterCount:29,chapterVerseCountPairings:{1:54,2:55,3:24,4:43,5:41,6:66,7:40,8:40,9:44,10:14,11:47,12:41,13:14,14:17,15:29,16:43,17:27,18:17,19:19,20:8,21:30,22:19,23:32,24:31,25:31,26:32,27:34,28:21,29:30},name:"1 Chronicles",abbr:"1CH",ord:"13",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"1Chr",usfm_end:"1CH 29:30",next:{book:{name:"2 Chronicles",id:"2Chr"}},previous:{book:{name:"2 Kings",id:"2Kgs"}},abbreviations:["1 Chron.","1 Chr.","1 Ch.","1Chron.","1Chr.","1Ch.","I Chron.","I Chr.","I Ch.","1st Chronicles","1st Chron.","First Chronicles","First Chron."],chapters:{1:54,2:55,3:24,4:43,5:26,6:81,7:40,8:40,9:44,10:14,11:47,12:40,13:14,14:17,15:29,16:43,17:27,18:17,19:19,20:8,21:30,22:19,23:32,24:31,25:31,26:32,27:34,28:21,29:30}},"2CH":{chapterCount:36,chapterVerseCountPairings:{1:18,2:17,3:17,4:22,5:14,6:42,7:22,8:18,9:31,10:19,11:23,12:16,13:23,14:14,15:19,16:14,17:19,18:34,19:11,20:37,21:20,22:12,23:21,24:27,25:28,26:23,27:9,28:27,29:36,30:27,31:21,32:33,33:25,34:33,35:27,36:23},name:"2 Chronicles",abbr:"2CH",ord:"14",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"2Chr",usfm_end:"2CH 36:23",next:{book:{name:"Ezra",id:"Ezra"}},previous:{book:{name:"1 Chronicles",id:"1Chr"}},abbreviations:["2 Chron.","2 Chr.","2 Ch.","2Chron.","2Chr.","2Ch.","II Chron.","II Chr.","II Ch.","2nd Chronicles","2nd Chron.","Second Chronicles","Second Chron."],chapters:{1:17,2:18,3:17,4:22,5:14,6:42,7:22,8:18,9:31,10:19,11:23,12:16,13:22,14:15,15:19,16:14,17:19,18:34,19:11,20:37,21:20,22:12,23:21,24:27,25:28,26:23,27:9,28:27,29:36,30:27,31:21,32:33,33:25,34:33,35:27,36:23}},EZR:{chapterCount:10,chapterVerseCountPairings:{1:11,2:70,3:13,4:24,5:17,6:22,7:28,8:36,9:15,10:44},name:"Ezra",abbr:"EZR",ord:"15",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ezra",usfm_end:"EZR 10:44",next:{book:{name:"Nehemiah",id:"Neh"}},previous:{book:{name:"2 Chronicles",id:"2Chr"}},abbreviations:["Ezra","Ezr.","Ez."],chapters:{1:11,2:70,3:13,4:24,5:17,6:22,7:28,8:36,9:15,10:44}},NEH:{chapterCount:13,chapterVerseCountPairings:{1:11,2:20,3:38,4:17,5:19,6:19,7:72,8:18,9:37,10:40,11:36,12:47,13:31},name:"Nehemiah",abbr:"NEH",ord:"16",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Neh",usfm_end:"NEH 13:31",next:{book:{name:"Esther",id:"Esth"}},previous:{book:{name:"Ezra",id:"Ezra"}},abbreviations:["Neh.","Ne."],chapters:{1:11,2:20,3:32,4:23,5:19,6:19,7:73,8:18,9:38,10:39,11:36,12:47,13:31}},EST:{chapterCount:10,chapterVerseCountPairings:{1:22,2:23,3:15,4:17,5:14,6:14,7:10,8:17,9:32,10:3},name:"Esther",abbr:"EST",ord:"17",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Esth",usfm_end:"EST 10:3",next:{book:{name:"Job",id:"Job"}},previous:{book:{name:"Nehemiah",id:"Neh"}},abbreviations:["Est.","Esth.","Es."],chapters:{1:22,2:23,3:15,4:17,5:14,6:14,7:10,8:17,9:32,10:3}},JOB:{chapterCount:42,chapterVerseCountPairings:{1:22,2:13,3:26,4:21,5:27,6:30,7:21,8:22,9:35,10:22,11:20,12:25,13:28,14:22,15:35,16:22,17:16,18:21,19:29,20:29,21:34,22:30,23:17,24:25,25:6,26:14,27:23,28:28,29:25,30:31,31:40,32:22,33:33,34:37,35:16,36:33,37:24,38:41,39:30,40:32,41:26,42:17},name:"Job",abbr:"JOB",ord:"18",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Job",usfm_end:"JOB 42:17",next:{book:{name:"Psalms",id:"Ps"}},previous:{book:{name:"Esther",id:"Esth"}},abbreviations:["Job","Jb."],chapters:{1:22,2:13,3:26,4:21,5:27,6:30,7:21,8:22,9:35,10:22,11:20,12:25,13:28,14:22,15:35,16:22,17:16,18:21,19:29,20:29,21:34,22:30,23:17,24:25,25:6,26:14,27:23,28:28,29:25,30:31,31:40,32:22,33:33,34:37,35:16,36:33,37:24,38:41,39:30,40:24,41:34,42:17}},PSA:{chapterCount:150,chapterVerseCountPairings:{1:6,2:12,3:9,4:9,5:13,6:11,7:18,8:10,9:21,10:18,11:7,12:9,13:6,14:7,15:5,16:11,17:15,18:51,19:15,20:10,21:14,22:32,23:6,24:10,25:22,26:12,27:14,28:9,29:11,30:13,31:25,32:11,33:22,34:23,35:28,36:13,37:40,38:23,39:14,40:18,41:14,42:12,43:5,44:27,45:18,46:12,47:10,48:15,49:21,50:23,51:21,52:11,53:7,54:9,55:24,56:14,57:12,58:12,59:18,60:14,61:9,62:13,63:12,64:11,65:14,66:20,67:8,68:36,69:37,70:6,71:24,72:20,73:28,74:23,75:11,76:13,77:21,78:72,79:13,80:20,81:17,82:8,83:19,84:13,85:14,86:17,87:7,88:19,89:53,90:17,91:16,92:16,93:5,94:23,95:11,96:13,97:12,98:9,99:9,100:5,101:8,102:29,103:22,104:35,105:45,106:48,107:43,108:14,109:31,110:7,111:10,112:10,113:9,114:8,115:18,116:19,117:2,118:29,119:176,120:7,121:8,122:9,123:4,124:8,125:5,126:6,127:5,128:6,129:8,130:8,131:3,132:18,133:3,134:3,135:21,136:26,137:9,138:8,139:24,140:14,141:10,142:8,143:12,144:15,145:21,146:10,147:20,148:14,149:9,150:6},name:"Psalms",abbr:"PSA",ord:"19",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ps",usfm_end:"PSA 150:6",next:{book:{name:"Proverbs",id:"Prov"}},previous:{book:{name:"Job",id:"Job"}},abbreviations:["Ps.","Psalm","Pslm.","Psa.","Psm.","Pss."],chapters:{1:6,2:12,3:8,4:8,5:12,6:10,7:17,8:9,9:20,10:18,11:7,12:8,13:6,14:7,15:5,16:11,17:15,18:50,19:14,20:9,21:13,22:31,23:6,24:10,25:22,26:12,27:14,28:9,29:11,30:12,31:24,32:11,33:22,34:22,35:28,36:12,37:40,38:22,39:13,40:17,41:13,42:11,43:5,44:26,45:17,46:11,47:9,48:14,49:20,50:23,51:19,52:9,53:6,54:7,55:23,56:13,57:11,58:11,59:17,60:12,61:8,62:12,63:11,64:10,65:13,66:20,67:7,68:35,69:36,70:5,71:24,72:20,73:28,74:23,75:10,76:12,77:20,78:72,79:13,80:19,81:16,82:8,83:18,84:12,85:13,86:17,87:7,88:18,89:52,90:17,91:16,92:15,93:5,94:23,95:11,96:13,97:12,98:9,99:9,100:5,101:8,102:28,103:22,104:35,105:45,106:48,107:43,108:13,109:31,110:7,111:10,112:10,113:9,114:8,115:18,116:19,117:2,118:29,119:176,120:7,121:8,122:9,123:4,124:8,125:5,126:6,127:5,128:6,129:8,130:8,131:3,132:18,133:3,134:3,135:21,136:26,137:9,138:8,139:24,140:13,141:10,142:7,143:12,144:15,145:21,146:10,147:20,148:14,149:9,150:6}},PRO:{chapterCount:31,chapterVerseCountPairings:{1:33,2:22,3:35,4:27,5:23,6:35,7:27,8:36,9:18,10:32,11:31,12:28,13:25,14:35,15:33,16:33,17:28,18:24,19:29,20:30,21:31,22:29,23:35,24:34,25:28,26:28,27:27,28:28,29:27,30:33,31:31},name:"Proverbs",abbr:"PRO",ord:"20",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Prov",usfm_end:"PRO 31:31",next:{book:{name:"Ecclesiastes",id:"Eccl"}},previous:{book:{name:"Psalms",id:"Ps"}},abbreviations:["Prov","Pro.","Prv.","Pr."],chapters:{1:33,2:22,3:35,4:27,5:23,6:35,7:27,8:36,9:18,10:32,11:31,12:28,13:25,14:35,15:33,16:33,17:28,18:24,19:29,20:30,21:31,22:29,23:35,24:34,25:28,26:28,27:27,28:28,29:27,30:33,31:31}},ECC:{chapterCount:12,chapterVerseCountPairings:{1:18,2:26,3:22,4:17,5:19,6:12,7:29,8:17,9:18,10:20,11:10,12:14},name:"Ecclesiastes",abbr:"ECC",ord:"21",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Eccl",usfm_end:"ECC 12:14",next:{book:{name:"Song of Solomon",id:"Song"}},previous:{book:{name:"Proverbs",id:"Prov"}},abbreviations:["Eccles.","Eccle.","Ecc.","Ec.","Qoh."],chapters:{1:18,2:26,3:22,4:16,5:20,6:12,7:29,8:17,9:18,10:20,11:10,12:14}},SNG:{chapterCount:8,chapterVerseCountPairings:{1:17,2:17,3:11,4:16,5:16,6:12,7:14,8:14},name:"Song of Solomon",abbr:"SNG",ord:"22",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Song",usfm_end:"SNG 8:14",next:{book:{name:"Isaiah",id:"Isa"}},previous:{book:{name:"Ecclesiastes",id:"Eccl"}},abbreviations:["Song","Song of Songs","SOS.","So.","Canticle of Canticles","Canticles","Cant."],chapters:{1:17,2:17,3:11,4:16,5:16,6:13,7:13,8:14}},ISA:{chapterCount:66,chapterVerseCountPairings:{1:31,2:22,3:26,4:6,5:30,6:13,7:25,8:23,9:20,10:34,11:16,12:6,13:22,14:32,15:9,16:14,17:14,18:7,19:25,20:6,21:17,22:25,23:18,24:23,25:12,26:21,27:13,28:29,29:24,30:33,31:9,32:20,33:24,34:17,35:10,36:22,37:38,38:22,39:8,40:31,41:29,42:25,43:28,44:28,45:25,46:13,47:15,48:22,49:26,50:11,51:23,52:15,53:12,54:17,55:13,56:12,57:21,58:14,59:21,60:22,61:11,62:12,63:19,64:11,65:25,66:24},name:"Isaiah",abbr:"ISA",ord:"23",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Isa",usfm_end:"ISA 66:24",next:{book:{name:"Jeremiah",id:"Jer"}},previous:{book:{name:"Song of Solomon",id:"Song"}},abbreviations:["Isa.","Is."],chapters:{1:31,2:22,3:26,4:6,5:30,6:13,7:25,8:22,9:21,10:34,11:16,12:6,13:22,14:32,15:9,16:14,17:14,18:7,19:25,20:6,21:17,22:25,23:18,24:23,25:12,26:21,27:13,28:29,29:24,30:33,31:9,32:20,33:24,34:17,35:10,36:22,37:38,38:22,39:8,40:31,41:29,42:25,43:28,44:28,45:25,46:13,47:15,48:22,49:26,50:11,51:23,52:15,53:12,54:17,55:13,56:12,57:21,58:14,59:21,60:22,61:11,62:12,63:19,64:12,65:25,66:24}},JER:{chapterCount:52,chapterVerseCountPairings:{1:19,2:37,3:25,4:31,5:31,6:30,7:34,8:23,9:25,10:25,11:23,12:17,13:27,14:22,15:21,16:21,17:27,18:23,19:15,20:18,21:14,22:30,23:40,24:10,25:38,26:24,27:22,28:17,29:32,30:24,31:40,32:44,33:26,34:22,35:19,36:32,37:21,38:28,39:18,40:16,41:18,42:22,43:13,44:30,45:5,46:28,47:7,48:47,49:39,50:46,51:64,52:34},name:"Jeremiah",abbr:"JER",ord:"24",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Jer",usfm_end:"JER 52:34",next:{book:{name:"Lamentations",id:"Lam"}},previous:{book:{name:"Isaiah",id:"Isa"}},abbreviations:["Jer.","Je.","Jr."],chapters:{1:19,2:37,3:25,4:31,5:31,6:30,7:34,8:22,9:26,10:25,11:23,12:17,13:27,14:22,15:21,16:21,17:27,18:23,19:15,20:18,21:14,22:30,23:40,24:10,25:38,26:24,27:22,28:17,29:32,30:24,31:40,32:44,33:26,34:22,35:19,36:32,37:21,38:28,39:18,40:16,41:18,42:22,43:13,44:30,45:5,46:28,47:7,48:47,49:39,50:46,51:64,52:34}},LAM:{chapterCount:5,chapterVerseCountPairings:{1:22,2:22,3:66,4:22,5:22},name:"Lamentations",abbr:"LAM",ord:"25",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Lam",usfm_end:"LAM 5:22",next:{book:{name:"Ezekiel",id:"Ezek"}},previous:{book:{name:"Jeremiah",id:"Jer"}},abbreviations:["Lam.","La."],chapters:{1:22,2:22,3:66,4:22,5:22}},EZK:{chapterCount:48,chapterVerseCountPairings:{1:28,2:10,3:27,4:17,5:17,6:14,7:27,8:18,9:11,10:22,11:25,12:28,13:23,14:23,15:8,16:63,17:24,18:32,19:14,20:44,21:37,22:31,23:49,24:27,25:17,26:21,27:36,28:26,29:21,30:26,31:18,32:32,33:33,34:31,35:15,36:38,37:28,38:23,39:29,40:49,41:26,42:20,43:27,44:31,45:25,46:24,47:23,48:35},name:"Ezekiel",abbr:"EZK",ord:"26",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Ezek",usfm_end:"EZK 48:35",next:{book:{name:"Daniel",id:"Dan"}},previous:{book:{name:"Lamentations",id:"Lam"}},abbreviations:["Ezek.","Eze.","Ezk."],chapters:{1:28,2:10,3:27,4:17,5:17,6:14,7:27,8:18,9:11,10:22,11:25,12:28,13:23,14:23,15:8,16:63,17:24,18:32,19:14,20:49,21:32,22:31,23:49,24:27,25:17,26:21,27:36,28:26,29:21,30:26,31:18,32:32,33:33,34:31,35:15,36:38,37:28,38:23,39:29,40:49,41:26,42:20,43:27,44:31,45:25,46:24,47:23,48:35}},DAN:{chapterCount:12,chapterVerseCountPairings:{1:21,2:49,3:33,4:34,5:30,6:29,7:28,8:27,9:27,10:21,11:45,12:13},name:"Daniel",abbr:"DAN",ord:"27",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Dan",usfm_end:"DAN 12:13",next:{book:{name:"Hosea",id:"Hos"}},previous:{book:{name:"Ezekiel",id:"Ezek"}},abbreviations:["Dan.","Da.","Dn."],chapters:{1:21,2:49,3:30,4:37,5:31,6:28,7:28,8:27,9:27,10:21,11:45,12:13}},HOS:{chapterCount:14,chapterVerseCountPairings:{1:9,2:25,3:5,4:19,5:15,6:11,7:16,8:14,9:17,10:15,11:11,12:15,13:15,14:10},name:"Hosea",abbr:"HOS",ord:"28",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hos",usfm_end:"HOS 14:9",next:{book:{name:"Joel",id:"Joel"}},previous:{book:{name:"Daniel",id:"Dan"}},abbreviations:["Hos.","Ho."],chapters:{1:11,2:23,3:5,4:19,5:15,6:11,7:16,8:14,9:17,10:15,11:12,12:14,13:16,14:9}},JOL:{chapterCount:4,chapterVerseCountPairings:{1:20,2:27,3:5,4:21},name:"Joel",abbr:"JOL",ord:"29",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Joel",usfm_end:"JOL 3:21",next:{book:{name:"Amos",id:"Amos"}},previous:{book:{name:"Hosea",id:"Hos"}},abbreviations:["Joel","Jl."],chapters:{1:20,2:32,3:21}},AMO:{chapterCount:9,chapterVerseCountPairings:{1:15,2:16,3:15,4:13,5:27,6:14,7:17,8:14,9:15},name:"Amos",abbr:"AMO",ord:"30",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Amos",usfm_end:"AMO 9:15",next:{book:{name:"Obadiah",id:"Obad"}},previous:{book:{name:"Joel",id:"Joel"}},abbreviations:["Amos","Am."],chapters:{1:15,2:16,3:15,4:13,5:27,6:14,7:17,8:14,9:15}},OBA:{chapterCount:1,chapterVerseCountPairings:{1:21},name:"Obadiah",abbr:"OBA",ord:"31",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Obad",usfm_end:"OBA 1:21",next:{book:{name:"Jonah",id:"Jonah"}},previous:{book:{name:"Amos",id:"Amos"}},abbreviations:["Obad.","Ob."],chapters:{1:21}},JON:{chapterCount:4,chapterVerseCountPairings:{1:16,2:11,3:10,4:11},name:"Jonah",abbr:"JON",ord:"32",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Jonah",usfm_end:"JON 4:11",next:{book:{name:"Micah",id:"Mic"}},previous:{book:{name:"Obadiah",id:"Obad"}},abbreviations:["Jonah","Jnh.","Jon."],chapters:{1:17,2:10,3:10,4:11}},MIC:{chapterCount:7,chapterVerseCountPairings:{1:16,2:13,3:12,4:14,5:14,6:16,7:20},name:"Micah",abbr:"MIC",ord:"33",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Mic",usfm_end:"MIC 7:20",next:{book:{name:"Nahum",id:"Nah"}},previous:{book:{name:"Jonah",id:"Jonah"}},abbreviations:["Mic.","Mc."],chapters:{1:16,2:13,3:12,4:13,5:15,6:16,7:20}},NAM:{chapterCount:3,chapterVerseCountPairings:{1:14,2:14,3:19},name:"Nahum",abbr:"NAM",ord:"34",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Nah",usfm_end:"NAM 3:19",next:{book:{name:"Habakkuk",id:"Hab"}},previous:{book:{name:"Micah",id:"Mic"}},abbreviations:["Nah.","Na."],chapters:{1:15,2:13,3:19}},HAB:{chapterCount:3,chapterVerseCountPairings:{1:17,2:20,3:19},name:"Habakkuk",abbr:"HAB",ord:"35",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hab",usfm_end:"HAB 3:19",next:{book:{name:"Zephaniah",id:"Zeph"}},previous:{book:{name:"Nahum",id:"Nah"}},abbreviations:["Hab.","Hb."],chapters:{1:17,2:20,3:19}},ZEP:{chapterCount:3,chapterVerseCountPairings:{1:18,2:15,3:20},name:"Zephaniah",abbr:"ZEP",ord:"36",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Zeph",usfm_end:"ZEP 3:20",next:{book:{name:"Haggai",id:"Hag"}},previous:{book:{name:"Habakkuk",id:"Hab"}},abbreviations:["Zeph.","Zep.","Zp."],chapters:{1:18,2:15,3:20}},HAG:{chapterCount:2,chapterVerseCountPairings:{1:15,2:23},name:"Haggai",abbr:"HAG",ord:"37",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Hag",usfm_end:"HAG 2:23",next:{book:{name:"Zechariah",id:"Zech"}},previous:{book:{name:"Zephaniah",id:"Zeph"}},abbreviations:["Hag.","Hg."],chapters:{1:15,2:23}},ZEC:{chapterCount:14,chapterVerseCountPairings:{1:17,2:17,3:10,4:14,5:11,6:15,7:14,8:23,9:17,10:12,11:17,12:14,13:9,14:21},name:"Zechariah",abbr:"ZEC",ord:"38",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Zech",usfm_end:"ZEC 14:21",next:{book:{name:"Malachi",id:"Mal"}},previous:{book:{name:"Haggai",id:"Hag"}},abbreviations:["Zech.","Zec.","Zc."],chapters:{1:21,2:13,3:10,4:14,5:11,6:15,7:14,8:23,9:17,10:12,11:17,12:14,13:9,14:21}},MAL:{chapterCount:3,chapterVerseCountPairings:{1:14,2:17,3:24},name:"Malachi",abbr:"MAL",ord:"39",book_group_id:"0",testament:"OT",language_direction:"rtl",id:"Mal",usfm_end:"MAL 4:6",next:{book:{name:"Tobit",id:"Tob"}},previous:{book:{name:"Zechariah",id:"Zech"}},abbreviations:["Mal.","Ml."],chapters:{1:14,2:17,3:18,4:6}},MAT:{chapterCount:28,chapterVerseCountPairings:{1:25,2:23,3:17,4:25,5:48,6:34,7:29,8:34,9:38,10:42,11:30,12:50,13:58,14:36,15:39,16:28,17:27,18:35,19:30,20:34,21:46,22:46,23:39,24:51,25:46,26:75,27:66,28:20},name:"Matthew",abbr:"MAT",ord:"40",book_group_id:"0",testament:"NT",id:"Matt",usfm_end:"MAT 28:20",next:{book:{name:"Mark",id:"Mark"}},previous:{book:{name:"2 Maccabees",id:"2Macc"}},abbreviations:["Matt.","Mt."],chapters:{1:25,2:23,3:17,4:25,5:48,6:34,7:29,8:34,9:38,10:42,11:30,12:50,13:58,14:36,15:39,16:28,17:27,18:35,19:30,20:34,21:46,22:46,23:39,24:51,25:46,26:75,27:66,28:20}},MRK:{chapterCount:16,chapterVerseCountPairings:{1:45,2:28,3:35,4:41,5:43,6:56,7:37,8:38,9:50,10:52,11:33,12:44,13:37,14:72,15:47,16:20},name:"Mark",abbr:"MRK",ord:"41",book_group_id:"0",testament:"NT",id:"Mark",usfm_end:"MRK 16:20",next:{book:{name:"Luke",id:"Luke"}},previous:{book:{name:"Matthew",id:"Matt"}},abbreviations:["Mark","Mrk","Mar","Mk","Mr"],chapters:{1:45,2:28,3:35,4:41,5:43,6:56,7:37,8:38,9:50,10:52,11:33,12:44,13:37,14:72,15:47,16:20}},LUK:{chapterCount:24,chapterVerseCountPairings:{1:80,2:52,3:38,4:44,5:39,6:49,7:50,8:56,9:62,10:42,11:54,12:59,13:35,14:35,15:32,16:31,17:37,18:43,19:48,20:47,21:38,22:71,23:56,24:53},name:"Luke",abbr:"LUK",ord:"42",book_group_id:"0",testament:"NT",id:"Luke",usfm_end:"LUK 24:53",next:{book:{name:"John",id:"John"}},previous:{book:{name:"Mark",id:"Mark"}},abbreviations:["Luke","Luk","Lk"],chapters:{1:80,2:52,3:38,4:44,5:39,6:49,7:50,8:56,9:62,10:42,11:54,12:59,13:35,14:35,15:32,16:31,17:37,18:43,19:48,20:47,21:38,22:71,23:56,24:53}},JHN:{chapterCount:21,chapterVerseCountPairings:{1:51,2:25,3:36,4:54,5:47,6:71,7:53,8:59,9:41,10:42,11:57,12:50,13:38,14:31,15:27,16:33,17:26,18:40,19:42,20:31,21:25},name:"John",abbr:"JHN",ord:"43",book_group_id:"0",testament:"NT",id:"John",usfm_end:"JHN 21:25",next:{book:{name:"Acts",id:"Acts"}},previous:{book:{name:"Luke",id:"Luke"}},abbreviations:["John","Joh","Jhn","Jn"],chapters:{1:51,2:25,3:36,4:54,5:47,6:71,7:53,8:59,9:41,10:42,11:57,12:50,13:38,14:31,15:27,16:33,17:26,18:40,19:42,20:31,21:25}},ACT:{chapterCount:28,chapterVerseCountPairings:{1:26,2:47,3:26,4:37,5:42,6:15,7:60,8:40,9:43,10:48,11:30,12:25,13:52,14:28,15:41,16:40,17:34,18:28,19:40,20:38,21:40,22:30,23:35,24:27,25:27,26:32,27:44,28:31},name:"Acts",abbr:"ACT",ord:"44",book_group_id:"0",testament:"NT",id:"Acts",usfm_end:"ACT 28:31",next:{book:{name:"Romans",id:"Rom"}},previous:{book:{name:"John",id:"John"}},abbreviations:["Acts","Act","Ac"],chapters:{1:26,2:47,3:26,4:37,5:42,6:15,7:60,8:40,9:43,10:48,11:30,12:25,13:52,14:28,15:41,16:40,17:34,18:28,19:41,20:38,21:40,22:30,23:35,24:27,25:27,26:32,27:44,28:31}},ROM:{chapterCount:16,chapterVerseCountPairings:{1:32,2:29,3:31,4:25,5:21,6:23,7:25,8:39,9:33,10:21,11:36,12:21,13:14,14:23,15:33,16:27},name:"Romans",abbr:"ROM",ord:"45",book_group_id:"0",testament:"NT",id:"Rom",usfm_end:"ROM 16:27",next:{book:{name:"1 Corinthians",id:"1Cor"}},previous:{book:{name:"Acts",id:"Acts"}},abbreviations:["Rom.","Ro.","Rm."],chapters:{1:32,2:29,3:31,4:25,5:21,6:23,7:25,8:39,9:33,10:21,11:36,12:21,13:14,14:23,15:33,16:27}},"1CO":{chapterCount:16,chapterVerseCountPairings:{1:31,2:16,3:23,4:21,5:13,6:20,7:40,8:13,9:27,10:33,11:34,12:31,13:13,14:40,15:58,16:24},name:"1 Corinthians",abbr:"1CO",ord:"46",book_group_id:"0",testament:"NT",id:"1Cor",usfm_end:"1CO 16:24",next:{book:{name:"2 Corinthians",id:"2Cor"}},previous:{book:{name:"Romans",id:"Rom"}},abbreviations:["1 Cor.","1 Co.","I Cor.","I Co.","1Cor.","1Co.","I Corinthians","1Corinthians","1st Corinthians","First Corinthians"],chapters:{1:31,2:16,3:23,4:21,5:13,6:20,7:40,8:13,9:27,10:33,11:34,12:31,13:13,14:40,15:58,16:24}},"2CO":{chapterCount:13,chapterVerseCountPairings:{1:24,2:17,3:18,4:18,5:21,6:18,7:16,8:24,9:15,10:18,11:33,12:21,13:13},name:"2 Corinthians",abbr:"2CO",ord:"47",book_group_id:"0",testament:"NT",id:"2Cor",usfm_end:"2CO 13:14",next:{book:{name:"Galatians",id:"Gal"}},previous:{book:{name:"1 Corinthians",id:"1Cor"}},abbreviations:["2 Cor.","2 Co.","II Cor.","II Co.","2Cor.","2Co.","II Corinthians","2Corinthians","2nd Corinthians","Second Corinthians"],chapters:{1:24,2:17,3:18,4:18,5:21,6:18,7:16,8:24,9:15,10:18,11:33,12:21,13:14}},GAL:{chapterCount:6,chapterVerseCountPairings:{1:24,2:21,3:29,4:31,5:26,6:18},name:"Galatians",abbr:"GAL",ord:"48",book_group_id:"0",testament:"NT",id:"Gal",usfm_end:"GAL 6:18",next:{book:{name:"Ephesians",id:"Eph"}},previous:{book:{name:"2 Corinthians",id:"2Cor"}},abbreviations:["Gal.","Ga."],chapters:{1:24,2:21,3:29,4:31,5:26,6:18}},EPH:{chapterCount:6,chapterVerseCountPairings:{1:23,2:22,3:21,4:32,5:33,6:24},name:"Ephesians",abbr:"EPH",ord:"49",book_group_id:"0",testament:"NT",id:"Eph",usfm_end:"EPH 6:24",next:{book:{name:"Philippians",id:"Phil"}},previous:{book:{name:"Galatians",id:"Gal"}},abbreviations:["Eph.","Ephes."],chapters:{1:23,2:22,3:21,4:32,5:33,6:24}},PHP:{chapterCount:4,chapterVerseCountPairings:{1:30,2:30,3:21,4:23},name:"Philippians",abbr:"PHP",ord:"50",book_group_id:"0",testament:"NT",id:"Phil",usfm_end:"PHP 4:23",next:{book:{name:"Colossians",id:"Col"}},previous:{book:{name:"Ephesians",id:"Eph"}},abbreviations:["Phil.","Php.","Pp."],chapters:{1:30,2:30,3:21,4:23}},COL:{chapterCount:4,chapterVerseCountPairings:{1:29,2:23,3:25,4:18},name:"Colossians",abbr:"COL",ord:"51",book_group_id:"0",testament:"NT",id:"Col",usfm_end:"COL 4:18",next:{book:{name:"1 Thessalonians",id:"1Thess"}},previous:{book:{name:"Philippians",id:"Phil"}},abbreviations:["Col.","Co."],chapters:{1:29,2:23,3:25,4:18}},"1TH":{chapterCount:5,chapterVerseCountPairings:{1:10,2:20,3:13,4:18,5:28},name:"1 Thessalonians",abbr:"1TH",ord:"52",book_group_id:"0",testament:"NT",id:"1Thess",usfm_end:"1TH 5:28",next:{book:{name:"2 Thessalonians",id:"2Thess"}},previous:{book:{name:"Colossians",id:"Col"}},abbreviations:["1 Thess.","1 Thes.","1 Th.","I Thessalonians","I Thess.","I Thes.","I Th.","1Thessalonians","1Thess.","1Thes.","1Th.","1st Thessalonians","1st Thess.","First Thessalonians","First Thess."],chapters:{1:10,2:20,3:13,4:18,5:28}},"2TH":{chapterCount:3,chapterVerseCountPairings:{1:12,2:17,3:18},name:"2 Thessalonians",abbr:"2TH",ord:"53",book_group_id:"0",testament:"NT",id:"2Thess",usfm_end:"2TH 3:18",next:{book:{name:"1 Timothy",id:"1Tim"}},previous:{book:{name:"1 Thessalonians",id:"1Thess"}},abbreviations:["2 Thess.","2 Thes.","II Thessalonians","II Thess.","II Thes.","II Th.","2Thessalonians","2Thess.","2Thes.","2Th.","2nd Thessalonians","2nd Thess.","Second Thessalonians","Second Thess."],chapters:{1:12,2:17,3:18}},"1TI":{chapterCount:6,chapterVerseCountPairings:{1:20,2:15,3:16,4:16,5:25,6:21},name:"1 Timothy",abbr:"1TI",ord:"54",book_group_id:"0",testament:"NT",id:"1Tim",usfm_end:"1TI 6:21",next:{book:{name:"2 Timothy",id:"2Tim"}},previous:{book:{name:"2 Thessalonians",id:"2Thess"}},abbreviations:["1 Tim.","1 Ti.","I Timothy","I Tim.","I Ti.","1Timothy","1Tim.","1Ti.","1st Timothy","1st Tim.","First Timothy","First Tim."],chapters:{1:20,2:15,3:16,4:16,5:25,6:21}},"2TI":{chapterCount:4,chapterVerseCountPairings:{1:18,2:26,3:17,4:22},name:"2 Timothy",abbr:"2TI",ord:"55",book_group_id:"0",testament:"NT",id:"2Tim",usfm_end:"2TI 4:22",next:{book:{name:"Titus",id:"Titus"}},previous:{book:{name:"1 Timothy",id:"1Tim"}},abbreviations:["2 Tim.","2 Ti.","II Timothy","II Tim.","II Ti.","2Timothy","2Tim.","2Ti.","2nd Timothy","2nd Tim.","Second Timothy","Second Tim."],chapters:{1:18,2:26,3:17,4:22}},TIT:{chapterCount:3,chapterVerseCountPairings:{1:16,2:15,3:15},name:"Titus",abbr:"TIT",ord:"56",book_group_id:"0",testament:"NT",id:"Titus",usfm_end:"TIT 3:15",next:{book:{name:"Philemon",id:"Phlm"}},previous:{book:{name:"2 Timothy",id:"2Tim"}},abbreviations:["Titus","Tit","ti"],chapters:{1:16,2:15,3:15}},PHM:{chapterCount:1,chapterVerseCountPairings:{1:25},name:"Philemon",abbr:"PHM",ord:"57",book_group_id:"0",testament:"NT",id:"Phlm",usfm_end:"PHM 1:25",next:{book:{name:"Hebrews",id:"Heb"}},previous:{book:{name:"Titus",id:"Titus"}},abbreviations:["Philem.","Phm.","Pm."],chapters:{1:25}},HEB:{chapterCount:13,chapterVerseCountPairings:{1:14,2:18,3:19,4:16,5:14,6:20,7:28,8:13,9:28,10:39,11:40,12:29,13:25},name:"Hebrews",abbr:"HEB",ord:"58",book_group_id:"0",testament:"NT",id:"Heb",usfm_end:"HEB 13:25",next:{book:{name:"James",id:"Jas"}},previous:{book:{name:"Philemon",id:"Phlm"}},abbreviations:["Heb."],chapters:{1:14,2:18,3:19,4:16,5:14,6:20,7:28,8:13,9:28,10:39,11:40,12:29,13:25}},JAS:{chapterCount:5,chapterVerseCountPairings:{1:27,2:26,3:18,4:17,5:20},name:"James",abbr:"JAS",ord:"59",book_group_id:"0",testament:"NT",id:"Jas",usfm_end:"JAS 5:20",next:{book:{name:"1 Peter",id:"1Pet"}},previous:{book:{name:"Hebrews",id:"Heb"}},abbreviations:["James","Jas","Jm"],chapters:{1:27,2:26,3:18,4:17,5:20}},"1PE":{chapterCount:5,chapterVerseCountPairings:{1:25,2:25,3:22,4:19,5:14},name:"1 Peter",abbr:"1PE",ord:"60",book_group_id:"0",testament:"NT",id:"1Pet",usfm_end:"1PE 5:14",next:{book:{name:"2 Peter",id:"2Pet"}},previous:{book:{name:"James",id:"Jas"}},abbreviations:["1 Pet.","1 Pe.","1 Pt.","1 P.","I Pet.","I Pt.","I Pe.","1Peter","1Pet.","1Pe.","1Pt.","1P.","I Peter","1st Peter","First Peter"],chapters:{1:25,2:25,3:22,4:19,5:14}},"2PE":{chapterCount:3,chapterVerseCountPairings:{1:21,2:22,3:18},name:"2 Peter",abbr:"2PE",ord:"61",book_group_id:"0",testament:"NT",id:"2Pet",usfm_end:"2PE 3:18",next:{book:{name:"1 John",id:"1John"}},previous:{book:{name:"1 Peter",id:"1Pet"}},abbreviations:["2 Pet.","2 Pe.","2 Pt.","2 P.","II Peter","II Pet.","II Pt.","II Pe.","2Peter","2Pet.","2Pe.","2Pt.","2P.","2nd Peter","Second Peter"],chapters:{1:21,2:22,3:18}},"1JN":{chapterCount:5,chapterVerseCountPairings:{1:10,2:29,3:24,4:21,5:21},name:"1 John",abbr:"1JN",ord:"62",book_group_id:"0",testament:"NT",id:"1John",usfm_end:"1JN 5:21",next:{book:{name:"2 John",id:"2John"}},previous:{book:{name:"2 Peter",id:"2Pet"}},abbreviations:["1 John","1 Jhn.","1 Jn.","1 J.","1John","1Jhn.","1Joh.","1Jn.","1Jo.","1J.","I John","I Jhn.","I Joh.","I Jn.","I Jo.","1st John","First John"],chapters:{1:10,2:29,3:24,4:21,5:21}},"2JN":{chapterCount:1,chapterVerseCountPairings:{1:13},name:"2 John",abbr:"2JN",ord:"63",book_group_id:"0",testament:"NT",id:"2John",usfm_end:"2JN 1:13",next:{book:{name:"3 John",id:"3John"}},previous:{book:{name:"1 John",id:"1John"}},abbreviations:["2 John","2 Jhn.","2 Jn.","2 J.","2John","2Jhn.","2Joh.","2Jn.","2Jo.","2J.","II John","II Jhn.","II Joh.","II Jn.","II Jo.","2nd John","Second John"],chapters:{1:13}},"3JN":{chapterCount:1,chapterVerseCountPairings:{1:15},name:"3 John",abbr:"3JN",ord:"64",book_group_id:"0",testament:"NT",id:"3John",usfm_end:"3JN 1:14",next:{book:{name:"Jude",id:"Jude"}},previous:{book:{name:"2 John",id:"2John"}},abbreviations:["3 John","3 Jhn.","3 Jn.","3 J.","3John","3Jhn.","3Joh.","3Jn.","3Jo.","3J.","III John","III Jhn.","III Joh.","III Jn.","III Jo.","3rd John","Third John"],chapters:{1:14}},JUD:{chapterCount:1,chapterVerseCountPairings:{1:25},name:"Jude",abbr:"JUD",ord:"65",book_group_id:"0",testament:"NT",id:"Jude",usfm_end:"JUD 1:25",next:{book:{name:"Revelation",id:"Rev"}},previous:{book:{name:"3 John",id:"3John"}},abbreviations:["Jude","Jud.","Jd."],chapters:{1:25}},REV:{chapterCount:22,chapterVerseCountPairings:{1:20,2:29,3:22,4:11,5:14,6:17,7:17,8:13,9:21,10:11,11:19,12:18,13:18,14:20,15:8,16:21,17:18,18:24,19:21,20:15,21:27,22:21},name:"Revelation",abbr:"REV",ord:"66",book_group_id:"0",testament:"NT",id:"Rev",usfm_end:"REV 22:21",previous:{book:{name:"Jude",id:"Jude"}},abbreviations:["Rev","Re","The Revelation"],chapters:{1:20,2:29,3:22,4:11,5:14,6:17,7:17,8:13,9:21,10:11,11:19,12:17,13:18,14:20,15:8,16:21,17:18,18:24,19:21,20:15,21:27,22:21}}},tt=({onSelectChapter:t})=>{const{state:{bookChapters:e}}=L.useContext(Le);return _.jsx("div",{className:"grid [200px]:grid-cols-3 [400px]:grid-cols-4 gap-4 p-2",children:e.map((s,i)=>_.jsx("div",{children:_.jsx("div",{className:"cursor-pointer hover:text-blue-500",onClick:()=>t(s),children:s})},i))})},st=({onBookClick:t,bookList:e})=>{const{state:{selectedBook:s,showChapterList:i},actions:n}=L.useContext(Le),{setSelectedBook:h,setBookChapters:d,setSelectedChapter:l,setShowChapterList:C}=n,P=o=>{console.log({chapter:o}),l(parseInt(o)),de.postMessage({type:he.UPDATE_CHAPTER,payload:{chapter:o}})},f=o=>{t(o),h(o.fileName);const{chapters:a}=Ye(o.book);console.log({chapters:a}),d(a),C(m=>!m)};return L.useEffect(()=>{C(!0)},[s]),_.jsx("div",{className:"space-y-2",children:_.jsx("div",{className:"space-y-2 ",children:e&&e.length>0&&e.map((o,a)=>_.jsxs("div",{children:[_.jsx("div",{className:"cursor-pointer text-left hover:text-blue-500 rounded border border-gray-300 p-2",onClick:()=>f(o),children:o.book}),s&&s===o.fileName&&i&&_.jsx(tt,{onSelectChapter:P})]},a))})})};var ke={},Se=We;ke.createRoot=Se.createRoot,ke.hydrateRoot=Se.hydrateRoot;var Ce=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ve=typeof window>"u"||"Deno"in globalThis;function R(){}function it(t,e){return typeof t=="function"?t(e):t}function rt(t){return typeof t=="number"&&t>=0&&t!==1/0}function nt(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Ee(t,e){return typeof t=="function"?t(e):t}function at(t,e){return typeof t=="function"?t(e):t}function Oe(t,e){const{type:s="all",exact:i,fetchStatus:n,predicate:h,queryKey:d,stale:l}=t;if(d){if(i){if(e.queryHash!==Te(d,e.options))return!1}else if(!le(e.queryKey,d))return!1}if(s!=="all"){const C=e.isActive();if(s==="active"&&!C||s==="inactive"&&C)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||n&&n!==e.state.fetchStatus||h&&!h(e))}function Ie(t,e){const{exact:s,status:i,predicate:n,mutationKey:h}=t;if(h){if(!e.options.mutationKey)return!1;if(s){if(ce(e.options.mutationKey)!==ce(h))return!1}else if(!le(e.options.mutationKey,h))return!1}return!(i&&e.state.status!==i||n&&!n(e))}function Te(t,e){return((e==null?void 0:e.queryKeyHashFn)||ce)(t)}function ce(t){return JSON.stringify(t,(e,s)=>_e(s)?Object.keys(s).sort().reduce((i,n)=>(i[n]=s[n],i),{}):s)}function le(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(s=>!le(t[s],e[s])):!1}function Qe(t,e){if(t===e)return t;const s=xe(t)&&xe(e);if(s||_e(t)&&_e(e)){const i=s?t:Object.keys(t),n=i.length,h=s?e:Object.keys(e),d=h.length,l=s?[]:{};let C=0;for(let P=0;P{setTimeout(e,t)})}function ut(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?Qe(t,e):e}function ht(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function dt(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}var qe=Symbol();function Ge(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===qe?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var z,q,ee,Ne,ct=(Ne=class extends Ce{constructor(){super();c(this,z);c(this,q);c(this,ee);u(this,ee,e=>{if(!ve&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){r(this,q)||this.setEventListener(r(this,ee))}onUnsubscribe(){var e;this.hasListeners()||((e=r(this,q))==null||e.call(this),u(this,q,void 0))}setEventListener(e){var s;u(this,ee,e),(s=r(this,q))==null||s.call(this),u(this,q,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){r(this,z)!==e&&(u(this,z,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof r(this,z)=="boolean"?r(this,z):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},z=new WeakMap,q=new WeakMap,ee=new WeakMap,Ne),je=new ct,te,G,se,Re,lt=(Re=class extends Ce{constructor(){super();c(this,te,!0);c(this,G);c(this,se);u(this,se,e=>{if(!ve&&window.addEventListener){const s=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",i)}}})}onSubscribe(){r(this,G)||this.setEventListener(r(this,se))}onUnsubscribe(){var e;this.hasListeners()||((e=r(this,G))==null||e.call(this),u(this,G,void 0))}setEventListener(e){var s;u(this,se,e),(s=r(this,G))==null||s.call(this),u(this,G,e(this.setOnline.bind(this)))}setOnline(e){r(this,te)!==e&&(u(this,te,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return r(this,te)}},te=new WeakMap,G=new WeakMap,se=new WeakMap,Re),ge=new lt;function mt(t){return Math.min(1e3*2**t,3e4)}function Ue(t){return(t??"online")==="online"?ge.isOnline():!0}var Be=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function Pe(t){return t instanceof Be}function Ze(t){let e=!1,s=0,i=!1,n,h,d;const l=new Promise((b,v)=>{h=b,d=v}),C=b=>{var v;i||(S(new Be(b)),(v=t.abort)==null||v.call(t))},P=()=>{e=!0},f=()=>{e=!1},o=()=>je.isFocused()&&(t.networkMode==="always"||ge.isOnline())&&t.canRun(),a=()=>Ue(t.networkMode)&&t.canRun(),m=b=>{var v;i||(i=!0,(v=t.onSuccess)==null||v.call(t,b),n==null||n(),h(b))},S=b=>{var v;i||(i=!0,(v=t.onError)==null||v.call(t,b),n==null||n(),d(b))},x=()=>new Promise(b=>{var v;n=p=>{(i||o())&&b(p)},(v=t.onPause)==null||v.call(t)}).then(()=>{var b;n=void 0,i||(b=t.onContinue)==null||b.call(t)}),N=()=>{if(i)return;let b;const v=s===0?t.initialPromise:void 0;try{b=v??t.fn()}catch(p){b=Promise.reject(p)}Promise.resolve(b).then(m).catch(p=>{var y;if(i)return;const k=t.retry??(ve?0:3),E=t.retryDelay??mt,K=typeof E=="function"?E(s,p):E,Y=k===!0||typeof k=="number"&&so()?void 0:x()).then(()=>{e?S(p):N()})})};return{promise:l,cancel:C,continue:()=>(n==null||n(),l),cancelRetry:P,continueRetry:f,canStart:a,start:()=>(a()?N():x().then(N),l)}}function bt(){let t=[],e=0,s=a=>{a()},i=a=>{a()},n=a=>setTimeout(a,0);const h=a=>{n=a},d=a=>{let m;e++;try{m=a()}finally{e--,e||P()}return m},l=a=>{e?t.push(a):n(()=>{s(a)})},C=a=>(...m)=>{l(()=>{a(...m)})},P=()=>{const a=t;t=[],a.length&&n(()=>{i(()=>{a.forEach(m=>{s(m)})})})};return{batch:d,batchCalls:C,schedule:l,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{i=a},setScheduler:h}}var I=bt(),W,we,ze=(we=class{constructor(){c(this,W)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),rt(this.gcTime)&&u(this,W,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(ve?1/0:5*60*1e3))}clearGcTimeout(){r(this,W)&&(clearTimeout(r(this,W)),u(this,W,void 0))}},W=new WeakMap,we),ie,re,A,J,me,X,w,V,He,pt=(He=class extends ze{constructor(e){super();c(this,w);c(this,ie);c(this,re);c(this,A);c(this,J);c(this,me);c(this,X);u(this,X,!1),u(this,me,e.defaultOptions),this.setOptions(e.options),this.observers=[],u(this,A,e.cache),this.queryKey=e.queryKey,this.queryHash=e.queryHash,u(this,ie,gt(this.options)),this.state=e.state??r(this,ie),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=r(this,J))==null?void 0:e.promise}setOptions(e){this.options={...r(this,me),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&r(this,A).remove(this)}setData(e,s){const i=ut(this.state.data,e,this.options);return T(this,w,V).call(this,{data:i,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),i}setState(e,s){T(this,w,V).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var i,n;const s=(i=r(this,J))==null?void 0:i.promise;return(n=r(this,J))==null||n.cancel(e),s?s.then(R).catch(R):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(r(this,ie))}isActive(){return this.observers.some(e=>at(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!nt(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=r(this,J))==null||s.continue()}onOnline(){var s;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=r(this,J))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),r(this,A).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(r(this,J)&&(r(this,X)?r(this,J).cancel({revert:!0}):r(this,J).cancelRetry()),this.scheduleGc()),r(this,A).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||T(this,w,V).call(this,{type:"invalidate"})}fetch(e,s){var C,P,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(r(this,J))return r(this,J).continueRetry(),r(this,J).promise}if(e&&this.setOptions(e),!this.options.queryFn){const o=this.observers.find(a=>a.options.queryFn);o&&this.setOptions(o.options)}const i=new AbortController,n=o=>{Object.defineProperty(o,"signal",{enumerable:!0,get:()=>(u(this,X,!0),i.signal)})},h=()=>{const o=Ge(this.options,s),a={queryKey:this.queryKey,meta:this.meta};return n(a),u(this,X,!1),this.options.persister?this.options.persister(o,a,this):o(a)},d={fetchOptions:s,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:h};n(d),(C=this.options.behavior)==null||C.onFetch(d,this),u(this,re,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((P=d.fetchOptions)==null?void 0:P.meta))&&T(this,w,V).call(this,{type:"fetch",meta:(f=d.fetchOptions)==null?void 0:f.meta});const l=o=>{var a,m,S,x;Pe(o)&&o.silent||T(this,w,V).call(this,{type:"error",error:o}),Pe(o)||((m=(a=r(this,A).config).onError)==null||m.call(a,o,this),(x=(S=r(this,A).config).onSettled)==null||x.call(S,this.state.data,o,this)),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return u(this,J,Ze({initialPromise:s==null?void 0:s.initialPromise,fn:d.fetchFn,abort:i.abort.bind(i),onSuccess:o=>{var a,m,S,x;if(o===void 0){l(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(o)}catch(N){l(N);return}(m=(a=r(this,A).config).onSuccess)==null||m.call(a,o,this),(x=(S=r(this,A).config).onSettled)==null||x.call(S,o,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:l,onFail:(o,a)=>{T(this,w,V).call(this,{type:"failed",failureCount:o,error:a})},onPause:()=>{T(this,w,V).call(this,{type:"pause"})},onContinue:()=>{T(this,w,V).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0})),r(this,J).start()}},ie=new WeakMap,re=new WeakMap,A=new WeakMap,J=new WeakMap,me=new WeakMap,X=new WeakMap,w=new WeakSet,V=function(e){const s=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...ft(i.data,this.options),fetchMeta:e.meta??null};case"success":return{...i,data:e.data,dataUpdateCount:i.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const n=e.error;return Pe(n)&&n.revert&&r(this,re)?{...r(this,re),fetchStatus:"idle"}:{...i,error:n,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:n,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=s(this.state),I.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),r(this,A).notify({query:this,type:"updated",action:e})})},He);function ft(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Ue(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function gt(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var H,Fe,Ct=(Fe=class extends Ce{constructor(e={}){super();c(this,H);this.config=e,u(this,H,new Map)}build(e,s,i){const n=s.queryKey,h=s.queryHash??Te(n,s);let d=this.get(h);return d||(d=new pt({cache:this,queryKey:n,queryHash:h,options:e.defaultQueryOptions(s),state:i,defaultOptions:e.getQueryDefaults(n)}),this.add(d)),d}add(e){r(this,H).has(e.queryHash)||(r(this,H).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const s=r(this,H).get(e.queryHash);s&&(e.destroy(),s===e&&r(this,H).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){I.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return r(this,H).get(e)}getAll(){return[...r(this,H).values()]}find(e){const s={exact:!0,...e};return this.getAll().find(i=>Oe(s,i))}findAll(e={}){const s=this.getAll();return Object.keys(e).length>0?s.filter(i=>Oe(e,i)):s}notify(e){I.batch(()=>{this.listeners.forEach(s=>{s(e)})})}onFocus(){I.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},H=new WeakMap,Fe),F,O,$,D,Q,De,vt=(De=class extends ze{constructor(e){super();c(this,D);c(this,F);c(this,O);c(this,$);this.mutationId=e.mutationId,u(this,O,e.mutationCache),u(this,F,[]),this.state=e.state||yt(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){r(this,F).includes(e)||(r(this,F).push(e),this.clearGcTimeout(),r(this,O).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){u(this,F,r(this,F).filter(s=>s!==e)),this.scheduleGc(),r(this,O).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){r(this,F).length||(this.state.status==="pending"?this.scheduleGc():r(this,O).remove(this))}continue(){var e;return((e=r(this,$))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var n,h,d,l,C,P,f,o,a,m,S,x,N,b,v,p,k,E,K,Y;u(this,$,Ze({fn:()=>this.options.mutationFn?this.options.mutationFn(e):Promise.reject(new Error("No mutationFn found")),onFail:(y,Z)=>{T(this,D,Q).call(this,{type:"failed",failureCount:y,error:Z})},onPause:()=>{T(this,D,Q).call(this,{type:"pause"})},onContinue:()=>{T(this,D,Q).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>r(this,O).canRun(this)}));const s=this.state.status==="pending",i=!r(this,$).canStart();try{if(!s){T(this,D,Q).call(this,{type:"pending",variables:e,isPaused:i}),await((h=(n=r(this,O).config).onMutate)==null?void 0:h.call(n,e,this));const Z=await((l=(d=this.options).onMutate)==null?void 0:l.call(d,e));Z!==this.state.context&&T(this,D,Q).call(this,{type:"pending",context:Z,variables:e,isPaused:i})}const y=await r(this,$).start();return await((P=(C=r(this,O).config).onSuccess)==null?void 0:P.call(C,y,e,this.state.context,this)),await((o=(f=this.options).onSuccess)==null?void 0:o.call(f,y,e,this.state.context)),await((m=(a=r(this,O).config).onSettled)==null?void 0:m.call(a,y,null,this.state.variables,this.state.context,this)),await((x=(S=this.options).onSettled)==null?void 0:x.call(S,y,null,e,this.state.context)),T(this,D,Q).call(this,{type:"success",data:y}),y}catch(y){try{throw await((b=(N=r(this,O).config).onError)==null?void 0:b.call(N,y,e,this.state.context,this)),await((p=(v=this.options).onError)==null?void 0:p.call(v,y,e,this.state.context)),await((E=(k=r(this,O).config).onSettled)==null?void 0:E.call(k,void 0,y,this.state.variables,this.state.context,this)),await((Y=(K=this.options).onSettled)==null?void 0:Y.call(K,void 0,y,e,this.state.context)),y}finally{T(this,D,Q).call(this,{type:"error",error:y})}}finally{r(this,O).runNext(this)}}},F=new WeakMap,O=new WeakMap,$=new WeakMap,D=new WeakSet,Q=function(e){const s=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=s(this.state),I.batch(()=>{r(this,F).forEach(i=>{i.onMutationUpdate(e)}),r(this,O).notify({mutation:this,type:"updated",action:e})})},De);function yt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var M,be,Ke,Pt=(Ke=class extends Ce{constructor(e={}){super();c(this,M);c(this,be);this.config=e,u(this,M,new Map),u(this,be,Date.now())}build(e,s,i){const n=new vt({mutationCache:this,mutationId:++pe(this,be)._,options:e.defaultMutationOptions(s),state:i});return this.add(n),n}add(e){const s=fe(e),i=r(this,M).get(s)??[];i.push(e),r(this,M).set(s,i),this.notify({type:"added",mutation:e})}remove(e){var i;const s=fe(e);if(r(this,M).has(s)){const n=(i=r(this,M).get(s))==null?void 0:i.filter(h=>h!==e);n&&(n.length===0?r(this,M).delete(s):r(this,M).set(s,n))}this.notify({type:"removed",mutation:e})}canRun(e){var i;const s=(i=r(this,M).get(fe(e)))==null?void 0:i.find(n=>n.state.status==="pending");return!s||s===e}runNext(e){var i;const s=(i=r(this,M).get(fe(e)))==null?void 0:i.find(n=>n!==e&&n.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}clear(){I.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}getAll(){return[...r(this,M).values()].flat()}find(e){const s={exact:!0,...e};return this.getAll().find(i=>Ie(s,i))}findAll(e={}){return this.getAll().filter(s=>Ie(e,s))}notify(e){I.batch(()=>{this.listeners.forEach(s=>{s(e)})})}resumePausedMutations(){const e=this.getAll().filter(s=>s.state.isPaused);return I.batch(()=>Promise.all(e.map(s=>s.continue().catch(R))))}},M=new WeakMap,be=new WeakMap,Ke);function fe(t){var e;return((e=t.options.scope)==null?void 0:e.id)??String(t.mutationId)}function kt(t){return{onFetch:(e,s)=>{const i=async()=>{var S,x,N,b,v;const n=e.options,h=(N=(x=(S=e.fetchOptions)==null?void 0:S.meta)==null?void 0:x.fetchMore)==null?void 0:N.direction,d=((b=e.state.data)==null?void 0:b.pages)||[],l=((v=e.state.data)==null?void 0:v.pageParams)||[],C={pages:[],pageParams:[]};let P=!1;const f=p=>{Object.defineProperty(p,"signal",{enumerable:!0,get:()=>(e.signal.aborted?P=!0:e.signal.addEventListener("abort",()=>{P=!0}),e.signal)})},o=Ge(e.options,e.fetchOptions),a=async(p,k,E)=>{if(P)return Promise.reject();if(k==null&&p.pages.length)return Promise.resolve(p);const K={queryKey:e.queryKey,pageParam:k,direction:E?"backward":"forward",meta:e.options.meta};f(K);const Y=await o(K),{maxPages:y}=e.options,Z=E?dt:ht;return{pages:Z(p.pages,Y,y),pageParams:Z(p.pageParams,k,y)}};let m;if(h&&d.length){const p=h==="backward",k=p?_t:Ae,E={pages:d,pageParams:l},K=k(n,E);m=await a(E,K,p)}else{m=await a(C,l[0]??n.initialPageParam);const p=t??d.length;for(let k=1;k{var n,h;return(h=(n=e.options).persister)==null?void 0:h.call(n,i,{queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s)}:e.fetchFn=i}}}function Ae(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function _t(t,{pages:e,pageParams:s}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,s[0],s):void 0}var g,j,U,ne,ae,B,oe,ue,Ve,Tt=(Ve=class{constructor(t={}){c(this,g);c(this,j);c(this,U);c(this,ne);c(this,ae);c(this,B);c(this,oe);c(this,ue);u(this,g,t.queryCache||new Ct),u(this,j,t.mutationCache||new Pt),u(this,U,t.defaultOptions||{}),u(this,ne,new Map),u(this,ae,new Map),u(this,B,0)}mount(){pe(this,B)._++,r(this,B)===1&&(u(this,oe,je.subscribe(async t=>{t&&(await this.resumePausedMutations(),r(this,g).onFocus())})),u(this,ue,ge.subscribe(async t=>{t&&(await this.resumePausedMutations(),r(this,g).onOnline())})))}unmount(){var t,e;pe(this,B)._--,r(this,B)===0&&((t=r(this,oe))==null||t.call(this),u(this,oe,void 0),(e=r(this,ue))==null||e.call(this),u(this,ue,void 0))}isFetching(t){return r(this,g).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return r(this,j).findAll({...t,status:"pending"}).length}getQueryData(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=r(this,g).get(e.queryHash))==null?void 0:s.state.data}ensureQueryData(t){const e=this.getQueryData(t.queryKey);if(e===void 0)return this.fetchQuery(t);{const s=this.defaultQueryOptions(t),i=r(this,g).build(this,s);return t.revalidateIfStale&&i.isStaleByTime(Ee(s.staleTime,i))&&this.prefetchQuery(s),Promise.resolve(e)}}getQueriesData(t){return r(this,g).findAll(t).map(({queryKey:e,state:s})=>{const i=s.data;return[e,i]})}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),n=r(this,g).get(i.queryHash),h=n==null?void 0:n.state.data,d=it(e,h);if(d!==void 0)return r(this,g).build(this,i).setData(d,{...s,manual:!0})}setQueriesData(t,e,s){return I.batch(()=>r(this,g).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,s)]))}getQueryState(t){var s;const e=this.defaultQueryOptions({queryKey:t});return(s=r(this,g).get(e.queryHash))==null?void 0:s.state}removeQueries(t){const e=r(this,g);I.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=r(this,g),i={type:"active",...t};return I.batch(()=>(s.findAll(t).forEach(n=>{n.reset()}),this.refetchQueries(i,e)))}cancelQueries(t={},e={}){const s={revert:!0,...e},i=I.batch(()=>r(this,g).findAll(t).map(n=>n.cancel(s)));return Promise.all(i).then(R).catch(R)}invalidateQueries(t={},e={}){return I.batch(()=>{if(r(this,g).findAll(t).forEach(i=>{i.invalidate()}),t.refetchType==="none")return Promise.resolve();const s={...t,type:t.refetchType??t.type??"active"};return this.refetchQueries(s,e)})}refetchQueries(t={},e){const s={...e,cancelRefetch:(e==null?void 0:e.cancelRefetch)??!0},i=I.batch(()=>r(this,g).findAll(t).filter(n=>!n.isDisabled()).map(n=>{let h=n.fetch(void 0,s);return s.throwOnError||(h=h.catch(R)),n.state.fetchStatus==="paused"?Promise.resolve():h}));return Promise.all(i).then(R)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=r(this,g).build(this,e);return s.isStaleByTime(Ee(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(R).catch(R)}fetchInfiniteQuery(t){return t.behavior=kt(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(R).catch(R)}resumePausedMutations(){return ge.isOnline()?r(this,j).resumePausedMutations():Promise.resolve()}getQueryCache(){return r(this,g)}getMutationCache(){return r(this,j)}getDefaultOptions(){return r(this,U)}setDefaultOptions(t){u(this,U,t)}setQueryDefaults(t,e){r(this,ne).set(ce(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...r(this,ne).values()];let s={};return e.forEach(i=>{le(t,i.queryKey)&&(s={...s,...i.defaultOptions})}),s}setMutationDefaults(t,e){r(this,ae).set(ce(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...r(this,ae).values()];let s={};return e.forEach(i=>{le(t,i.mutationKey)&&(s={...s,...i.defaultOptions})}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...r(this,U).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=Te(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.enabled!==!0&&e.queryFn===qe&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...r(this,U).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){r(this,g).clear(),r(this,j).clear()}},g=new WeakMap,j=new WeakMap,U=new WeakMap,ne=new WeakMap,ae=new WeakMap,B=new WeakMap,oe=new WeakMap,ue=new WeakMap,Ve),Jt=L.createContext(void 0),St=({client:t,children:e})=>(L.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),_.jsx(Jt.Provider,{value:t,children:e}));const Et=new Tt,Ot=({children:t})=>(L.useEffect(()=>{de.setMessageListeners(e=>{console.log("providers:",e)})},[]),_.jsx(St,{client:Et,children:t})),It=t=>{ke.createRoot(document.getElementById("root")).render(_.jsx(Xe.StrictMode,{children:_.jsx(Ot,{children:t})}))},xt=()=>{const[t,e]=L.useState(void 0);L.useEffect(()=>{},[t]);const s=i=>{de.postMessage({type:he.OPEN_USFM_FILE,payload:{...i}})};return L.useEffect(()=>{de.setMessageListeners(i=>{switch(i.data.type){case he.BOOKS_IN_WORKSPACE_RESPONSE:e(i.data.payload),console.log("URI message received.",i.data.payload);break;case he.SCROLL_TO_CHAPTER:console.log("scroll to chapter received",i.data.payload);break}}),de.postMessage({type:he.SEND_BOOKS_IN_WORKSPACE,payload:"usfmExplorer"})},[]),_.jsx($e,{children:_.jsx("div",{className:"p-4",children:_.jsx("div",{className:"space-y-4",children:_.jsx(st,{onBookClick:s,bookList:t})})})})};It(_.jsx(xt,{}));