reactive-md 0.3.1 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/CHANGELOG-ch.md +113 -0
  2. package/CHANGELOG.md +113 -53
  3. package/CONTRIBUTING-ch.md +62 -0
  4. package/CONTRIBUTING.md +64 -65
  5. package/LICENSE +21 -21
  6. package/README-ch.md +123 -0
  7. package/README-en.md +147 -0
  8. package/README.md +96 -38
  9. package/SECURITY-ch.md +80 -0
  10. package/SECURITY.md +58 -49
  11. package/THIRD_PARTY_NOTICES.md +85 -1
  12. package/bin/reactive-md.mjs +40 -0
  13. package/cli/args.mjs +181 -0
  14. package/cli/assets.mjs +390 -0
  15. package/cli/build.mjs +268 -0
  16. package/cli/document.mjs +130 -0
  17. package/cli/errors.mjs +61 -0
  18. package/cli/fs-utils.mjs +133 -0
  19. package/cli/glob.mjs +203 -0
  20. package/cli/help.mjs +138 -0
  21. package/cli/lint.mjs +177 -0
  22. package/cli/main.mjs +55 -0
  23. package/cli/migrate.mjs +368 -0
  24. package/cli/package.mjs +209 -0
  25. package/dist-library/reactive-md-react.js +3525 -1651
  26. package/dist-library/reactive-md.css +1 -1
  27. package/dist-library/reactive-md.js +1798 -4
  28. package/dist-library/runtime-D3QTVYaz.js +15410 -0
  29. package/dist-library/types/index.d.ts +1 -0
  30. package/dist-library/types/local/LocalDocumentView.d.ts +66 -3
  31. package/dist-library/types/local/authoring.d.ts +63 -0
  32. package/dist-library/types/local/collection-functions.d.ts +4 -0
  33. package/dist-library/types/local/colors.d.ts +2 -0
  34. package/dist-library/types/local/computations.d.ts +53 -0
  35. package/dist-library/types/local/data-functions.d.ts +22 -0
  36. package/dist-library/types/local/data-table.d.ts +65 -0
  37. package/dist-library/types/local/dates.d.ts +2 -0
  38. package/dist-library/types/local/dependencies.d.ts +31 -0
  39. package/dist-library/types/local/diagnostics.d.ts +1450 -0
  40. package/dist-library/types/local/expression.d.ts +13 -3
  41. package/dist-library/types/local/formatting.d.ts +41 -0
  42. package/dist-library/types/local/heading-anchors.d.ts +13 -2
  43. package/dist-library/types/local/i18n.d.ts +18 -0
  44. package/dist-library/types/local/index.d.ts +18 -1
  45. package/dist-library/types/local/limits.d.ts +32 -1
  46. package/dist-library/types/local/locale.d.ts +1 -0
  47. package/dist-library/types/local/math.d.ts +6 -1
  48. package/dist-library/types/local/parser.d.ts +10 -4
  49. package/dist-library/types/local/render-types.d.ts +5 -1
  50. package/dist-library/types/local/retention.d.ts +23 -0
  51. package/dist-library/types/local/schema.d.ts +25 -3
  52. package/dist-library/types/local/source-migration.d.ts +35 -0
  53. package/dist-library/types/local/state.d.ts +80 -0
  54. package/dist-library/types/local/text-length.d.ts +13 -0
  55. package/dist-library/types/local/theme.d.ts +30 -0
  56. package/dist-library/types/local/types.d.ts +112 -4
  57. package/dist-library/types/local/validation.d.ts +32 -0
  58. package/dist-library/types/local/version.d.ts +1 -1
  59. package/dist-library/types/local/worker.d.ts +82 -0
  60. package/dist-library/types/react/index.d.ts +4 -1
  61. package/dist-library/types/shareable.d.ts +64 -0
  62. package/dist-standalone/reactive-md-standalone.css +2 -0
  63. package/dist-standalone/reactive-md-standalone.js +57 -0
  64. package/docs/author-tools-ch.md +56 -0
  65. package/docs/author-tools-en.md +56 -0
  66. package/docs/compatibility-ch.md +103 -0
  67. package/docs/compatibility-en.md +103 -0
  68. package/docs/{component-development.md → component-development-ch.md} +210 -206
  69. package/docs/component-development-en.md +210 -0
  70. package/docs/{component-protocol.md → component-protocol-ch.md} +710 -685
  71. package/docs/component-protocol-en.md +710 -0
  72. package/docs/computations-formatting-ch.md +87 -0
  73. package/docs/computations-formatting-en.md +87 -0
  74. package/docs/constraints-collections-ch.md +84 -0
  75. package/docs/constraints-collections-en.md +84 -0
  76. package/docs/diagnostics-counting-ch.md +84 -0
  77. package/docs/diagnostics-counting-en.md +84 -0
  78. package/docs/local-components-v2-ch.md +138 -0
  79. package/docs/local-components-v2-en.md +104 -0
  80. package/docs/{local-guide.md → local-guide-ch.md} +28 -8
  81. package/docs/local-guide-en.md +961 -0
  82. package/docs/local-integration-ch.md +363 -0
  83. package/docs/local-integration-en.md +363 -0
  84. package/docs/{local-interaction-syntax.md → local-interaction-syntax-ch.md} +66 -20
  85. package/docs/local-interaction-syntax-en.md +483 -0
  86. package/docs/{performance.md → performance-ch.md} +12 -3
  87. package/docs/performance-en.md +76 -0
  88. package/docs/release-0.4.0-ch.md +89 -0
  89. package/docs/release-0.4.0-en.md +89 -0
  90. package/docs/release-0.4.1-ch.md +23 -0
  91. package/docs/release-0.4.1-en.md +23 -0
  92. package/docs/releasing-ch.md +101 -0
  93. package/docs/releasing-en.md +101 -0
  94. package/docs/shareable-export-ch.md +205 -0
  95. package/docs/shareable-export-en.md +207 -0
  96. package/docs/source-versioning-ch.md +159 -0
  97. package/docs/source-versioning-en.md +159 -0
  98. package/docs/theme-protocol-ch.md +107 -0
  99. package/docs/theme-protocol-en.md +107 -0
  100. package/examples/conformance/README.md +33 -31
  101. package/examples/conformance/component-protocol-1.json +482 -194
  102. package/examples/conformance/component-protocol-1.schema.json +76 -76
  103. package/examples/conformance/history/v0.3.1/catalog.reactive.md +20 -0
  104. package/examples/conformance/history/v0.3.1/charts.reactive.md +73 -0
  105. package/examples/conformance/history/v0.3.1/checklist.reactive.md +32 -0
  106. package/examples/conformance/history/v0.3.1/comparison.reactive.md +47 -0
  107. package/examples/conformance/history/v0.3.1/components.reactive.md +44 -0
  108. package/examples/conformance/history/v0.3.1/counter.reactive.md +7 -0
  109. package/examples/conformance/history/v0.3.1/diagnostics.reactive.md +54 -0
  110. package/examples/conformance/history/v0.3.1/diagram.reactive.md +44 -0
  111. package/examples/conformance/history/v0.3.1/gallery.reactive.md +61 -0
  112. package/examples/conformance/history/v0.3.1/local-draft-1.json +50 -0
  113. package/examples/conformance/history/v0.3.1/parameters.reactive.md +36 -0
  114. package/examples/conformance/history/v0.3.1/planning.reactive.md +24 -0
  115. package/examples/conformance/history/v0.3.1/pricing.reactive.md +20 -0
  116. package/examples/conformance/history/v0.3.1/provenance.json +72 -0
  117. package/examples/conformance/local-draft-2.json +212 -0
  118. package/examples/integration/README.md +45 -29
  119. package/examples/integration/core/index.mjs +32 -19
  120. package/examples/integration/core/package.json +7 -7
  121. package/examples/integration/react/index.html +12 -12
  122. package/examples/integration/react/main.jsx +21 -21
  123. package/examples/integration/react/package.json +9 -9
  124. package/examples/integration/worker/index.html +19 -0
  125. package/examples/integration/worker/main.js +61 -0
  126. package/examples/integration/worker/package.json +13 -0
  127. package/examples/integration/worker/worker.js +3 -0
  128. package/examples/local/README.md +64 -58
  129. package/examples/local/catalog.reactive.md +20 -20
  130. package/examples/local/charts.reactive.md +34 -34
  131. package/examples/local/checklist.reactive.md +32 -32
  132. package/examples/local/comparison.reactive.md +47 -47
  133. package/examples/local/components.reactive.md +44 -44
  134. package/examples/local/counter.reactive.md +7 -7
  135. package/examples/local/diagnostics.reactive.md +54 -54
  136. package/examples/local/diagram.reactive.md +44 -44
  137. package/examples/local/gallery.reactive.md +61 -61
  138. package/examples/local/parameters.reactive.md +36 -36
  139. package/examples/local/planning.reactive.md +24 -24
  140. package/examples/local/pricing.reactive.md +20 -20
  141. package/examples/local/recipes/invoice-zh.reactive.md +36 -0
  142. package/examples/local/recipes/invoice.reactive.md +36 -0
  143. package/examples/local/recipes/workshop-zh.reactive.md +33 -0
  144. package/examples/local/recipes/workshop.reactive.md +33 -0
  145. package/examples/local/showcase/README.md +25 -0
  146. package/examples/local/showcase/explore.reactive.md +102 -0
  147. package/examples/local/showcase/flow.reactive.md +86 -0
  148. package/examples/local/showcase/forms.reactive.md +126 -0
  149. package/examples/local/showcase/functions.reactive.md +119 -0
  150. package/examples/local/showcase/layout.reactive.md +100 -0
  151. package/examples/local/showcase/statistics.reactive.md +108 -0
  152. package/examples/local/showcase/tasks.reactive.md +89 -0
  153. package/examples/local/showcase/zh/explore.reactive.md +102 -0
  154. package/examples/local/showcase/zh/flow.reactive.md +86 -0
  155. package/examples/local/showcase/zh/forms.reactive.md +126 -0
  156. package/examples/local/showcase/zh/functions.reactive.md +119 -0
  157. package/examples/local/showcase/zh/layout.reactive.md +100 -0
  158. package/examples/local/showcase/zh/statistics.reactive.md +108 -0
  159. package/examples/local/showcase/zh/tasks.reactive.md +89 -0
  160. package/examples/local/zh/catalog.reactive.md +20 -0
  161. package/examples/local/zh/charts.reactive.md +73 -0
  162. package/examples/local/zh/checklist.reactive.md +32 -0
  163. package/examples/local/zh/comparison.reactive.md +47 -0
  164. package/examples/local/zh/components.reactive.md +44 -0
  165. package/examples/local/zh/counter.reactive.md +7 -0
  166. package/examples/local/zh/diagnostics.reactive.md +54 -0
  167. package/examples/local/zh/diagram.reactive.md +44 -0
  168. package/examples/local/zh/gallery.reactive.md +61 -0
  169. package/examples/local/zh/parameters.reactive.md +36 -0
  170. package/examples/local/zh/planning.reactive.md +24 -0
  171. package/examples/local/zh/pricing.reactive.md +20 -0
  172. package/package.json +91 -77
  173. package/README.en.md +0 -76
  174. package/dist-library/runtime-CPzMEMcW.js +0 -11111
  175. package/docs/compatibility.md +0 -68
  176. package/docs/local-integration.md +0 -218
  177. package/docs/releasing.md +0 -92
@@ -0,0 +1,57 @@
1
+ var ReactiveMD=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.getPrototypeOf,o=Object.prototype.hasOwnProperty,s=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t,t.exports),e=null),t.exports),c=(e,t)=>{let r={};for(var i in e)n(r,i,{get:e[i],enumerable:!0});return t||n(r,Symbol.toStringTag,{value:`Module`}),r},l=(e,t,a,s)=>{if(t&&typeof t==`object`||typeof t==`function`)for(var c=i(t),l=0,u=c.length,d;l<u;l++)d=c[l],!o.call(e,d)&&d!==a&&n(e,d,{get:(e=>t[e]).bind(null,d),enumerable:!(s=r(t,d))||s.enumerable});return e},u=(e,r,i)=>(i=e==null?{}:t(a(e)),l(r||!e||!e.__esModule||!o.call(e,`default`)?n(i,`default`,{value:e,enumerable:!0}):i,e)),d=s((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),f=s(((e,t)=>{t.exports=d()})),p=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function ee(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,ee(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),ee(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=ee(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=ee(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return ee(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return ee(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function te(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var F=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function ne(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,F)}catch(e){F(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function re(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else ne(re.bind(null,e))}var ie={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ie,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=re,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:te}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=ne,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.1`})),m=s(((e,t)=>{t.exports=p()})),h=s((e=>{var t=m();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),g=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=h()})),_=s((e=>{var t=f(),n=m(),r=g();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(o(e)!==e)throw Error(i(188))}function u(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return l(a),e;if(s===r)return l(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,u=a.child;u;){if(u===n){c=!0,n=a,r=s;break}if(u===r){c=!0,r=a,n=s;break}u=u.sibling}if(!c){for(u=s.child;u;){if(u===n){c=!0,n=s,r=a;break}if(u===r){c=!0,r=s,n=a;break}u=u.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function d(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=d(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function h(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function _(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function v(e){var t=[null,null],n=h(e);return n===null||y(t,e,n.child,{foundSelf:!1}),t}function y(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&y(e,t,n.child,r))return!0;n=n.sibling}return!1}function b(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var x=null,S=null;function C(e,t,n){return e===n||e===t&&(x=e,!0)}function w(e,t,n){return e===n?(S=e,!1):e===t&&(S!==null&&(x=e),!0)}function T(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function E(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var D=Object.assign,O=Symbol.for(`react.element`),k=Symbol.for(`react.transitional.element`),A=Symbol.for(`react.portal`),j=Symbol.for(`react.fragment`),M=Symbol.for(`react.strict_mode`),N=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),P=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),F=Symbol.for(`react.suspense`),ne=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),ae=Symbol.for(`react.activity`),oe=Symbol.for(`react.legacy_hidden`),se=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case j:return`Fragment`;case N:return`Profiler`;case M:return`StrictMode`;case F:return`Suspense`;case ne:return`SuspenseList`;case ae:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case A:return`Portal`;case P:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case ie:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,I=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,L=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,he={pending:!1,data:null,method:null,action:null},ge=[],_e=-1;function ve(e){return{current:e}}function ye(e){0>_e||(e.current=ge[_e],ge[_e]=null,_e--)}function be(e,t){_e++,ge[_e]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?fp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=fp(t),e=pp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){var t=e.memoizedState;t!==null&&(sh._currentValue=t.memoizedState,be(we,e)),t=xe.current;var n=pp(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function Oe(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),sh._currentValue=he)}var ke,Ae;function je(e){if(ke===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);ke=t&&t[1]||``,Ae=-1<e.stack.indexOf(`
2
+ at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
3
+ `+ke+e+Ae}var Me=!1;function Ne(e,t){if(!e||Me)return``;Me=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
4
+ `),l=s.split(`
5
+ `);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
6
+ `+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{Me=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?je(n):``}function Pe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je(`Lazy`);case 13:return e.child!==t&&t!==null?je(`Suspense Fallback`):je(`Suspense`);case 19:return je(`SuspenseList`);case 0:case 15:return Ne(e.type,!1);case 11:return Ne(e.type.render,!1);case 1:return Ne(e.type,!0);case 31:return je(`Activity`);case 30:return je(`ViewTransition`);default:return``}}function Fe(e){try{var t=``,n=null;do t+=Pe(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
7
+ Error generating stack: `+e.message+`
8
+ `+e.stack}}var Ie=Object.prototype.hasOwnProperty,Le=t.unstable_scheduleCallback,Re=t.unstable_cancelCallback,ze=t.unstable_shouldYield,Be=t.unstable_requestPaint,Ve=t.unstable_now,He=t.unstable_getCurrentPriorityLevel,Ue=t.unstable_ImmediatePriority,We=t.unstable_UserBlockingPriority,Ge=t.unstable_NormalPriority,Ke=t.unstable_LowPriority,qe=t.unstable_IdlePriority,Je=t.log,Ye=t.unstable_setDisableYieldValue,Xe=null,Ze=null;function Qe(e){if(typeof Je==`function`&&Ye(e),Ze&&typeof Ze.setStrictMode==`function`)try{Ze.setStrictMode(Xe,e)}catch{}}var $e=Math.clz32?Math.clz32:nt,et=Math.log,tt=Math.LN2;function nt(e){return e>>>=0,e===0?32:31-(et(e)/tt|0)|0}var R=256,rt=262144,it=4194304;function at(e){var t=e&42;if(t!==0)return t;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:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ot(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=at(n))):i=at(o):i=at(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=at(n))):i=at(o)):i=at(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function st(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ct(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-$e(n),i=1<<r;t|=e[r],n&=~i}return t}function lt(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32: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 t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ut(){var e=it;return it<<=1,!(it&62914560)&&(it=4194304),e}function dt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ft(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function pt(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-$e(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&mt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function mt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-$e(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ht(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-$e(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function gt(e,t){var n=t&-t;return n=n&42?1:_t(n),(n&(e.suspendedLanes|t))===0?n:0}function _t(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function vt(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function yt(){var e=L.p;return e===0?(e=window.event,e===void 0?32:Ch(e.type)):e}function bt(e,t){var n=L.p;try{return L.p=e,t()}finally{L.p=n}}var xt=Math.random().toString(36).slice(2),St=`__reactFiber$`+xt,Ct=`__reactProps$`+xt,wt=`__reactContainer$`+xt,Tt=`__reactEvents$`+xt,Et=`__reactListeners$`+xt,Dt=`__reactHandles$`+xt,Ot=`__reactResources$`+xt,kt=`__reactMarker$`+xt,At=`__reactLoad$`+xt;function z(e){delete e[St],delete e[Ct],delete e[Et],delete e[Dt]}function jt(e){var t;if(t=e[St])return t;for(var n=e.parentNode;n;){if(t=n[wt]||n[St]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=pm(e);e!==null;){if(n=e[St])return n;e=pm(e)}return t}e=n,n=e.parentNode}return null}function Mt(e){if(e=e[St]||e[wt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Nt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Pt(e){var t=e[Ot];return t||=e[Ot]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Ft(e){e[kt]=!0}function It(e){e[At]=void 0}var Lt=new Set,Rt={};function zt(e,t){Bt(e,t),Bt(e+`Capture`,t)}function Bt(e,t){for(Rt[e]=t,e=0;e<t.length;e++)Lt.add(t[e])}var Vt=RegExp(`^[: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]*$`),Ht={},Ut={};function Wt(e){return Ie.call(Ut,e)?!0:Ie.call(Ht,e)?!1:Vt.test(e)?Ut[e]=!0:(Ht[e]=!0,!1)}var Gt=!1;function Kt(){var e=Gt;return Gt=!1,e}function qt(e,t,n){if(Wt(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Jt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function Yt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Xt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Zt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Qt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function $t(e){if(!e._valueTracker){var t=Zt(e)?`checked`:`value`;e._valueTracker=Qt(e,t,``+e[t])}}function en(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Zt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var tn=/[\n"\\]/g;function nn(e){return e.replace(tn,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function B(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Xt(t)):e.value!==``+Xt(t)&&(e.value=``+Xt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):an(e,Xt(n)):o===`number`&&e.value==t?an(e,Xt(e.value)):an(e,Xt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Xt(s):e.removeAttribute(`name`)}function rn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){$t(e);return}n=n==null?``:``+Xt(n),t=t==null?n:``+Xt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),$t(e)}function an(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function on(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Xt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function sn(e,t,n){t!=null&&(t=``+Xt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Xt(n)}function cn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Xt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),$t(e)}function ln(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var un=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function dn(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||un.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function fn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Gt=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(dn(e,a,r),Gt=!0)}else for(var o in t)t.hasOwnProperty(o)&&dn(e,o,t[o])}function pn(e){if(e.indexOf(`-`)===-1)return!1;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 mn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),hn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function gn(e){return hn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function _n(){}var vn=null;function yn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bn=null,xn=null;function Sn(e){var t=Mt(e);if(t&&(e=t.stateNode)){var n=e[Ct]||null;a:switch(e=t.stateNode,t.type){case`input`:if(B(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+nn(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[Ct]||null;if(!a)throw Error(i(90));B(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&en(r)}break a;case`textarea`:sn(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&on(e,!!n.multiple,t,!1)}}}var Cn=!1;function wn(e,t,n){if(Cn)return e(t,n);Cn=!0;try{return e(t)}finally{if(Cn=!1,(bn!==null||xn!==null)&&(Vd(),bn&&(t=bn,e=xn,xn=bn=null,Sn(t),e)))for(t=0;t<e.length;t++)Sn(e[t])}}function Tn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Ct]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var En=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,Dn=!1;if(En)try{var On={};Object.defineProperty(On,"passive",{get:function(){Dn=!0}}),window.addEventListener(`test`,On,On),window.removeEventListener(`test`,On,On)}catch{Dn=!1}var kn=null,An=null,jn=null;function Mn(){if(jn)return jn;var e,t=An,n=t.length,r,i=`value`in kn?kn.value:kn.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return jn=i.slice(e,1<r?1-r:void 0)}function Nn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Pn(){return!0}function Fn(){return!1}function In(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Pn:Fn,this.isPropagationStopped=Fn,this}return D(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Pn)},persist:function(){},isPersistent:Pn}),t}var Ln={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rn=In(Ln),zn=D({},Ln,{view:0,detail:0}),Bn=In(zn),Vn,Hn,Un,Wn=D({},zn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:tr,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Un&&(Un&&e.type===`mousemove`?(Vn=e.screenX-Un.screenX,Hn=e.screenY-Un.screenY):Hn=Vn=0,Un=e),Vn)},movementY:function(e){return`movementY`in e?e.movementY:Hn}}),Gn=In(Wn),Kn=In(D({},Wn,{dataTransfer:0})),qn=In(D({},zn,{relatedTarget:0})),Jn=In(D({},Ln,{animationName:0,elapsedTime:0,pseudoElement:0})),Yn=In(D({},Ln,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Xn=In(D({},Ln,{data:0})),Zn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Qn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},$n={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function er(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=$n[e])?!!t[e]:!1}function tr(){return er}var nr=In(D({},zn,{key:function(e){if(e.key){var t=Zn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Nn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Qn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:tr,charCode:function(e){return e.type===`keypress`?Nn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Nn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),rr=In(D({},Wn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),ir=In(D({},Ln,{submitter:0})),ar=In(D({},zn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:tr})),or=In(D({},Ln,{propertyName:0,elapsedTime:0,pseudoElement:0})),sr=In(D({},Wn,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),cr=In(D({},Ln,{newState:0,oldState:0,source:0})),lr=[9,13,27,32],ur=En&&`CompositionEvent`in window,dr=null;En&&`documentMode`in document&&(dr=document.documentMode);var fr=En&&`TextEvent`in window&&!dr,pr=En&&(!ur||dr&&8<dr&&11>=dr),mr=` `,hr=!1;function gr(e,t){switch(e){case`keyup`:return lr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function _r(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var vr=!1;function yr(e,t){switch(e){case`compositionend`:return _r(t);case`keypress`:return t.which===32?(hr=!0,mr):null;case`textInput`:return e=t.data,e===mr&&hr?null:e;default:return null}}function br(e,t){if(vr)return e===`compositionend`||!ur&&gr(e,t)?(e=Mn(),jn=An=kn=null,vr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return pr&&t.locale!==`ko`?null:t.data;default:return null}}var xr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Sr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!xr[e.type]:t===`textarea`}function Cr(e,t,n,r){bn?xn?xn.push(r):xn=[r]:bn=r,t=Xf(t,`onChange`),0<t.length&&(n=new Rn(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var wr=null,Tr=null;function Er(e){Wf(e,0)}function Dr(e){if(en(Nt(e)))return e}function Or(e,t){if(e===`change`)return t}var kr=!1;if(En){var Ar;if(En){var jr=`oninput`in document;if(!jr){var Mr=document.createElement(`div`);Mr.setAttribute(`oninput`,`return;`),jr=typeof Mr.oninput==`function`}Ar=jr}else Ar=!1;kr=Ar&&(!document.documentMode||9<document.documentMode)}function Nr(){wr&&(wr.detachEvent(`onpropertychange`,Pr),Tr=wr=null)}function Pr(e){if(e.propertyName===`value`&&Dr(Tr)){var t=[];Cr(t,Tr,e,yn(e)),wn(Er,t)}}function Fr(e,t,n){e===`focusin`?(Nr(),wr=t,Tr=n,wr.attachEvent(`onpropertychange`,Pr)):e===`focusout`&&Nr()}function Ir(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Dr(Tr)}function Lr(e,t){if(e===`click`)return Dr(t)}function Rr(e,t){if(e===`input`||e===`change`)return Dr(t)}function zr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Br=typeof Object.is==`function`?Object.is:zr;function Vr(e,t){if(Br(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Ie.call(t,i)||!Br(e[i],t[i]))return!1}return!0}function Hr(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Wr(e,t){var n=Ur(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Ur(n)}}function Gr(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gr(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Hr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Hr(e.document)}return t}function qr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Jr=En&&`documentMode`in document&&11>=document.documentMode,Yr=null,Xr=null,Zr=null,Qr=!1;function $r(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Qr||Yr==null||Yr!==Hr(r)||(r=Yr,`selectionStart`in r&&qr(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}),Zr&&Vr(Zr,r)||(Zr=r,r=Xf(Xr,`onSelect`),0<r.length&&(t=new Rn(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Yr)))}function ei(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var ti={animationend:ei(`Animation`,`AnimationEnd`),animationiteration:ei(`Animation`,`AnimationIteration`),animationstart:ei(`Animation`,`AnimationStart`),transitionrun:ei(`Transition`,`TransitionRun`),transitionstart:ei(`Transition`,`TransitionStart`),transitioncancel:ei(`Transition`,`TransitionCancel`),transitionend:ei(`Transition`,`TransitionEnd`)},ni={},ri={};En&&(ri=document.createElement(`div`).style,`AnimationEvent`in window||(delete ti.animationend.animation,delete ti.animationiteration.animation,delete ti.animationstart.animation),`TransitionEvent`in window||delete ti.transitionend.transition);function ii(e){if(ni[e])return ni[e];if(!ti[e])return e;var t=ti[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ri)return ni[e]=t[n];return e}var ai=ii(`animationend`),oi=ii(`animationiteration`),si=ii(`animationstart`),ci=ii(`transitionrun`),li=ii(`transitionstart`),ui=ii(`transitioncancel`),di=ii(`transitionend`),fi=new Map,pi=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);pi.push(`scrollEnd`);function mi(e,t){fi.set(e,t),zt(t,[e])}var V=0;function hi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Sd.identifierPrefix;var n=V++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function H(e){if(e==null||typeof e==`string`)return e;var t=null,n=Ad;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function gi(e,t){return e=H(e),t=H(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},vi=[],U=0,yi=0;function bi(){for(var e=U,t=yi=U=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&wi(n,i,a)}}function xi(e,t,n,r){vi[U++]=e,vi[U++]=t,vi[U++]=n,vi[U++]=r,yi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Si(e,t,n,r){return xi(e,t,n,r),Ti(e)}function Ci(e,t){return xi(e,null,null,t),Ti(e)}function wi(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-$e(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ti(e){if(50<jd)throw jd=0,Md=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Ei={};function Di(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,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 Oi(e,t,n,r){return new Di(e,t,n,r)}function ki(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Ai(e,t){var n=e.alternate;return n===null?(n=Oi(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ji(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Mi(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)ki(r)&&(s=1);else if(typeof r==`string`)s=$(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case ae:return e=Oi(31,n,t,a),e.elementType=ae,e.lanes=o,e;case j:return Ni(n.children,a,o,t);case M:s=8,a|=24;break;case N:return e=Oi(12,n,t,a|2),e.elementType=N,e.lanes=o,e;case F:return e=Oi(13,n,t,a),e.elementType=F,e.lanes=o,e;case ne:return e=Oi(19,n,t,a),e.elementType=ne,e.lanes=o,e;case oe:case ce:return e=a|32,e=Oi(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case P:s=10;break a;case ee:s=9;break a;case te:s=11;break a;case re:s=14;break a;case ie:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=Oi(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Ni(e,t,n,r){return e=Oi(7,e,r,t),e.lanes=n,e}function Pi(e,t,n){return e=Oi(6,e,null,t),e.lanes=n,e}function Fi(e){var t=Oi(18,null,null,0);return t.stateNode=e,t}function Ii(e,t,n){return t=Oi(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Li=new WeakMap;function Ri(e,t){if(typeof e==`object`&&e){var n=Li.get(e);return n===void 0?(t={value:e,source:t,stack:Fe(t)},Li.set(e,t),t):n}return{value:e,source:t,stack:Fe(t)}}var zi=[],Bi=0,Vi=null,Hi=0,Ui=[],Wi=0,Gi=null,Ki=1,qi=``;function Ji(e,t){zi[Bi++]=Hi,zi[Bi++]=Vi,Vi=e,Hi=t}function Yi(e,t,n){Ui[Wi++]=Ki,Ui[Wi++]=qi,Ui[Wi++]=Gi,Gi=e;var r=Ki;e=qi;var i=32-$e(r)-1;r&=~(1<<i),n+=1;var a=32-$e(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Ki=1<<32-$e(t)+i|n<<i|r,qi=a+e}else Ki=1<<a|n<<i|r,qi=e}function Xi(e){e.return!==null&&(Ji(e,1),Yi(e,1,0))}function Zi(e){for(;e===Vi;)Vi=zi[--Bi],zi[Bi]=null,Hi=zi[--Bi],zi[Bi]=null;for(;e===Gi;)Gi=Ui[--Wi],Ui[Wi]=null,qi=Ui[--Wi],Ui[Wi]=null,Ki=Ui[--Wi],Ui[Wi]=null}function Qi(e,t){Ui[Wi++]=Ki,Ui[Wi++]=qi,Ui[Wi++]=Gi,Ki=t.id,qi=t.overflow,Gi=e}var $i=null,ea=null,W=!1,ta=null,na=!1,ra=Error(i(519));function ia(e){throw ua(Ri(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),ra}function aa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[St]=e,t[Ct]=r,n){case`dialog`:Y(`cancel`,t),Y(`close`,t);break;case`iframe`:case`object`:case`embed`:Y(`load`,t);break;case`video`:case`audio`:for(n=0;n<Hf.length;n++)Y(Hf[n],t);break;case`source`:Y(`error`,t);break;case`img`:case`image`:case`link`:Y(`error`,t),Y(`load`,t);break;case`details`:Y(`toggle`,t);break;case`input`:Y(`invalid`,t),rn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Y(`invalid`,t);break;case`textarea`:Y(`invalid`,t),cn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||np(t.textContent,n)?(r.popover!=null&&(Y(`beforetoggle`,t),Y(`toggle`,t)),r.onScroll!=null&&Y(`scroll`,t),r.onScrollEnd!=null&&Y(`scrollend`,t),r.onClick!=null&&(t.onclick=_n),t=!0):t=!1,t||ia(e,!0)}function oa(e){for($i=e.return;$i;)switch($i.tag){case 5:case 31:case 13:na=!1;return;case 27:case 3:na=!0;return;default:$i=$i.return}}function sa(e){if(e!==$i)return!1;if(!W)return oa(e),W=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||mp(e.type,e.memoizedProps)),n=!n),n&&ea&&ia(e),oa(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ea=fm(e)}else t===27?(t=ea,Cp(e.type)?(e=dm,dm=null,ea=e):ea=t):ea=$i?um(e.stateNode.nextSibling):null;return!0}function ca(){ea=$i=null,W=!1}function la(){var e=ta;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ta=null),e}function ua(e){ta===null?ta=[e]:ta.push(e)}var da=ve(null),fa=null,pa=null;function ma(e,t,n){be(da,t._currentValue),t._currentValue=n}function ha(e){e._currentValue=da.current,ye(da)}function ga(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function _a(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),ga(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),ga(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),ga(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function va(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Br(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[sh]:e.push(sh))}a=a.return}return e!==null&&_a(t,e,n,r),t.flags|=262144,e!==null}function ya(e){for(e=e.firstContext;e!==null;){if(!Br(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ba(e){fa=e,pa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function xa(e){return Ca(fa,e)}function Sa(e,t){return fa===null&&ba(e),Ca(e,t)}function Ca(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},pa===null){if(e===null)throw Error(i(308));pa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else pa=pa.next=t;return n}var wa=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ta=t.unstable_scheduleCallback,Ea=t.unstable_NormalPriority,Da={$$typeof:P,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Oa(){return{controller:new wa,data:new Map,refCount:0}}function ka(e){e.refCount--,e.refCount===0&&Ta(Ea,function(){e.controller.abort()})}function Aa(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var ja=null;function Ma(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Na=null,Pa=0,Fa=0,Ia=null;function La(e,t){if(Na===null){var n=Na=[];Pa=0,Fa=Lf(),Ia={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Pa++,t.then(Ra,Ra),t}function Ra(){if(--Pa===0&&(ja=null,Na!==null)){Ia!==null&&(Ia.status=`fulfilled`);var e=Na;Na=null,Fa=0,Ia=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function za(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Ba=I.S;I.S=function(e,t){if(vd=Ve(),typeof t==`object`&&t&&typeof t.then==`function`&&La(e,t),ja!==null)for(var n=Cf;n!==null;)Aa(n,ja),n=n.next;if(n=e.types,n!==null){for(var r=Cf;r!==null;)Aa(r,n),r=r.next;if(Fa!==0){r=ja,r===null&&(r=ja=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Ba!==null&&Ba(e,t)};var Va=ve(null);function Ha(){var e=Va.current;return e===null?td.pooledCache:e}function Ua(e,t){t===null?be(Va,Va.current):be(Va,t.pool)}function Wa(){var e=Ha();return e===null?null:{parent:Da._currentValue,pool:e}}var Ga=Error(i(460)),Ka=Error(i(474)),qa=Error(i(542)),Ja={then:function(){}};function Ya(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Xa(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(_n,_n),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,eo(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(_n,_n);else{if(e=td,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,eo(e),e}throw Qa=t,Ga}}function Za(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Qa=e,Ga):e}}var Qa=null;function $a(){if(Qa===null)throw Error(i(459));var e=Qa;return Qa=null,e}function eo(e){if(e===Ga||e===qa)throw Error(i(483))}var to=null,no=0;function ro(e){var t=no;return no+=1,to===null&&(to=[]),Xa(to,e,t)}function io(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ao(e,t){throw t.$$typeof===O?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function oo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=Ai(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Pi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===j?(e=d(e,t,n.props.children,r,n.key),io(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ie&&Za(i)===t.type)?(t=a(t,n.props),io(t,n),t.return=e,t):(t=Mi(n.type,n.key,n.props,null,e.mode,r),io(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Ii(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Ni(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Pi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case k:return n=Mi(t.type,t.key,t.props,null,e.mode,n),io(n,t),n.return=e,n;case A:return t=Ii(t,e.mode,n),t.return=e,t;case ie:return t=Za(t),f(e,t,n)}if(me(t)||de(t))return t=Ni(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,ro(t),n);if(t.$$typeof===P)return f(e,Sa(e,t),n);ao(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case k:return n.key===i?l(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case ie:return n=Za(n),p(e,t,n,r)}if(me(n)||de(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,ro(n),r);if(n.$$typeof===P)return p(e,t,Sa(e,n),r);ao(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case k:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case A:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ie:return r=Za(r),m(e,t,n,r,i)}if(me(r)||de(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,ro(r),i);if(r.$$typeof===P)return m(e,t,n,Sa(t,r),i);ao(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),W&&Ji(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return W&&Ji(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),W&&Ji(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),W&&Ji(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return W&&Ji(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),W&&Ji(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===j&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case k:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===j){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),io(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ie&&Za(l)===r.type){n(e,r.sibling),c=a(r,o.props),io(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===j?(c=Ni(o.props.children,e.mode,c,o.key),io(c,o),c.return=e,e=c):(c=Mi(o.type,o.key,o.props,null,e.mode,c),io(c,o),c.return=e,e=c)}return s(e);case A:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Ii(o,e.mode,c),c.return=e,e=c}return s(e);case ie:return o=Za(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,ro(o),c);if(o.$$typeof===P)return _(e,r,Sa(e,o),c);ao(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Pi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{no=0;var i=_(e,t,n,r);return to=null,i}catch(t){if(t===Ga||t===qa)throw t;var a=Oi(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var so=oo(!0),co=oo(!1),lo=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function po(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ed&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ti(e),wi(e,null,n),t}return xi(e,r,t,n),Ti(e)}function ho(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}function go(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var _o=!1;function vo(){if(_o){var e=Ia;if(e!==null)throw e}}function yo(e,t,n,r){_o=!1;var i=e.updateQueue;lo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(q&f)===f:(r&f)===f){f!==0&&f===Fa&&(_o=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=D({},d,f);break a;case 2:lo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function bo(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function xo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bo(n[e],t)}var So=ve(null),Co=ve(0);function wo(e,t){e=sd,be(Co,e),be(So,t),sd=e|t.baseLanes}function To(){be(Co,sd),be(So,So.current)}function Eo(){sd=Co.current,ye(So),ye(Co)}var Do=ve(null),Oo=null;function ko(e){var t=e.alternate;be(Po,Po.current&1),be(Do,e),Oo===null&&(t===null||So.current!==null||t.memoizedState!==null)&&(Oo=e)}function Ao(e){be(Po,Po.current),be(Do,e),Oo===null&&(Oo=e)}function jo(e){e.tag===22?(be(Po,Po.current),be(Do,e),Oo===null&&(Oo=e)):Mo()}function Mo(){be(Po,Po.current),be(Do,Do.current)}function No(e){ye(Do),Oo===e&&(Oo=null),ye(Po)}var Po=ve(0);function Fo(e,t){be(Do,Do.current),be(Po,t)}function Io(e){ye(Po),ye(Do),Oo===e&&(Oo=null)}function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||sm(n)||cm(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ro=0,G=null,zo=null,Bo=null,Vo=!1,Ho=!1,Uo=!1,Wo=0,Go=0,Ko=null,qo=0;function Jo(){throw Error(i(321))}function Yo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Br(e[n],t[n]))return!1;return!0}function Xo(e,t,n,r,i,a){return Ro=a,G=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,I.H=e===null||e.memoizedState===null?pc:mc,Uo=!1,a=n(r,i),Uo=!1,Ho&&(a=Qo(t,n,r,i)),Zo(e),a}function Zo(e){I.H=fc;var t=zo!==null&&zo.next!==null;if(Ro=0,Bo=zo=G=null,Vo=!1,Go=0,Ko=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&ya(e)&&(jc=!0))}function Qo(e,t,n,r){G=e;var a=0;do{if(Ho&&(Ko=null),Go=0,Ho=!1,25<=a)throw Error(i(301));if(a+=1,Bo=zo=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}I.H=hc,o=t(n,r)}while(Ho);return o}function $o(){var e=I.H,t=e.useState()[0];return t=typeof t.then==`function`?os(t):t,e=e.useState()[0],(zo===null?null:zo.memoizedState)!==e&&(G.flags|=1024),t}function es(){var e=Wo!==0;return Wo=0,e}function ts(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ns(e){if(Vo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Vo=!1}Ro=0,Bo=zo=G=null,Ho=!1,Go=Wo=0,Ko=null}function rs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e,Bo}function is(){if(zo===null){var e=G.alternate;e=e===null?null:e.memoizedState}else e=zo.next;var t=Bo===null?G.memoizedState:Bo.next;if(t!==null)Bo=t,zo=e;else{if(e===null)throw G.alternate===null?Error(i(467)):Error(i(310));zo=e,e={memoizedState:zo.memoizedState,baseState:zo.baseState,baseQueue:zo.baseQueue,queue:zo.queue,next:null},Bo===null?G.memoizedState=Bo=e:Bo=Bo.next=e}return Bo}function as(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function os(e){var t=Go;return Go+=1,Ko===null&&(Ko=[]),e=Xa(Ko,e,t),t=G,(Bo===null?t.memoizedState:Bo.next)===null&&(t=t.alternate,I.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return os(e);if(e.$$typeof===le)return;if(e.$$typeof===P)return xa(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=G.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=G.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=as(),G.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=se;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(is(),zo,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Ro&f)===f:(q&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Fa&&(d=!0);else if((Ro&p)===p){u=u.next,p===Fa&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,G.lanes|=p,ld|=p;f=u.action,Uo&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,G.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Br(o,e.memoizedState)&&(jc=!0,d&&(n=Ia,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=is(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Br(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=G,a=is(),o=W;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Br((zo||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||Bo!==null&&!!(Bo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,td===null)throw Error(i(349));o||Ro&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=G.updateQueue,t===null?(t=as(),G.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Br(e,n)}catch{return!0}}function vs(e){var t=Ci(e,2);t!==null&&Id(t,e,2)}function ys(e){var t=rs();if(typeof e==`function`){var n=e;if(e=n(),Uo){Qe(!0);try{n()}finally{Qe(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,zo,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};I.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=I.T,o={};o.types=a===null?null:a.types,I.T=o;try{var s=n(i,r),c=I.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),I.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(W){var n=td.formState;if(n!==null){a:{var r=G;if(W){if(ea){b:{for(var i=ea,a=na;i.nodeType!==8;)if(!a||(i=um(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ea=um(i.nextSibling),r=i.data===`F!`;break a}}ia(r)}r=!1}r&&(t=n[0])}}return n=rs(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,G,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,G,!1,r.queue),r=rs(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,G,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(is(),zo,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=os(t)}catch(e){throw e===Ga?qa:e}else r=t;t=is();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(G.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=is(),n=zo;if(n!==null)return As(t,n,e);is(),t=t.memoizedState,n=is();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=G.updateQueue,t===null&&(t=as(),G.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return is().memoizedState}function Fs(e,t,n,r){var i=rs();G.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=is();r=r===void 0?null:r;var a=i.memoizedState.inst;zo!==null&&r!==null&&Yo(r,zo.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(G.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){G.flags|=4;var t=G.updateQueue;if(t===null)t=as(),G.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=is().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(ed&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Yo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=is();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Yo(t,r[1]))return r[0];if(r=e(),Uo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Ro&1073741824&&!(q&261930)?e.memoizedState=t:(e.memoizedState=n,e=Pd(),G.lanes|=e,ld|=e,n)}function Ys(e,t,n,r){return Br(n,t)?n:So.current===null?!(Ro&106)||Ro&1073741824&&!(q&261930)?(jc=!0,e.memoizedState=n):(e=Pd(),G.lanes|=e,ld|=e,t):(e=Js(e,n,r),Br(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=L.p;L.p=a!==0&&8>a?a:8;var o=I.T,s={};s.types=o===null?null:o.types,I.T=s,cc(e,!1,t,n);try{var c=i(),l=I.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,za(c,r),Nd(e)):sc(e,t,r,Nd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Nd())}finally{L.p=a,o!==null&&s.types!==null&&(o.types=s.types),I.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,he,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:he,baseState:he,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:he},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Nd())}function tc(){return xa(sh)}function nc(){return is().memoizedState}function rc(){return is().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Nd();e=po(n);var r=mo(t,e,n);r!==null&&(Id(r,t,n),ho(r,t,n)),t={cache:Oa()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Nd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Si(e,t,n,r),n!==null&&(Id(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Nd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Br(s,o))return xi(e,t,i,0),td===null&&bi(),!1}catch{}if(n=Si(e,t,i,r),n!==null)return Id(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:Lf(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Si(e,n,r,2),t!==null&&Id(t,e,2)}function lc(e){var t=e.alternate;return e===G||t!==null&&t===G}function uc(e,t){Ho=Vo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ht(e,n)}}var fc={readContext:xa,use:ss,useCallback:Jo,useContext:Jo,useEffect:Jo,useImperativeHandle:Jo,useLayoutEffect:Jo,useInsertionEffect:Jo,useMemo:Jo,useReducer:Jo,useRef:Jo,useState:Jo,useDebugValue:Jo,useDeferredValue:Jo,useTransition:Jo,useSyncExternalStore:Jo,useId:Jo,useHostTransitionStatus:Jo,useFormState:Jo,useActionState:Jo,useOptimistic:Jo,useMemoCache:Jo,useCacheRefresh:Jo,useEffectEvent:Jo},pc={readContext:xa,use:ss,useCallback:function(e,t){return rs().memoizedState=[e,t===void 0?null:t],e},useContext:xa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=rs();t=t===void 0?null:t;var r=e();if(Uo){Qe(!0);try{e()}finally{Qe(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=rs();if(n!==void 0){var i=n(t);if(Uo){Qe(!0);try{n(t)}finally{Qe(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,G,e),[r.memoizedState,e]},useRef:function(e){var t=rs();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,G,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(rs(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,G,e.queue,!0,!1),rs().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=G,a=rs();if(W){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),td===null)throw Error(i(349));q&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=rs(),t=td.identifierPrefix;if(W){var n=qi,r=Ki;n=(r&~(1<<32-$e(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Wo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=qo++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=rs();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,G,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return rs().memoizedState=ic.bind(null,G)},useEffectEvent:function(e){var t=rs(),n={impl:e};return t.memoizedState=n,function(){if(ed&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(is(),zo.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(is(),zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:xa,use:ss,useCallback:Ks,useContext:xa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=is();return zo===null?Js(n,e,t):Ys(n,zo.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=is().memoizedState;return[typeof e==`boolean`?e:os(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=is();return zo===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,zo,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:D({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Nd(),i=po(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Id(t,e,r),ho(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Nd(),r=po(n);r.tag=2,t!=null&&(r.callback=t),t=mo(e,r,n),t!==null&&(Id(t,e,n),ho(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!Vr(n,r)||!Vr(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=D({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){_i(e)}function Sc(e){console.error(e)}function Cc(e){_i(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=po(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=po(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&va(t,n,a,!0),n=Do.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Oo===null?Jd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),_f(e,r,a)),!1;case 22:return n.flags|=65536,r===Ja?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),_f(e,r,a)),!1}throw Error(i(435,n.tag))}return _f(e,r,a),Jd(),!1}if(W)return t=Do.current,t===null?(r!==ra&&(t=Error(i(423),{cause:r}),ua(Ri(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=Ri(r,n),a=Ec(e.stateNode,r,a),go(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==ra&&(e=Error(i(422),{cause:r}),ua(Ri(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=Ri(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=Ri(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),go(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),go(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?co(t,null,n,r):so(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return ba(t),r=Xo(e,t,n,o,a,i),s=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&s&&Xi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!ki(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Mi(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Vr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=Ai(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Vr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ua(t,a===null?null:a.cachePool),a===null?To():wo(t,a),jo(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ua(t,null),To(),Mo()):(Ua(t,a.cachePool),wo(t,a),Mo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ha();return a=a===null?null:{parent:Da._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ua(t,null),To(),jo(t),e!==null&&va(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return so(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,No(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(W){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(Ao(t),(e=ea)?(e=om(e,na),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi===null?null:{id:Ki,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Fi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(Ao(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||va(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(So.current===null){if(r=td,r!==null&&(s=gt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,Ci(e,s),Id(r,e,s),Ac;Jd()}t=Bc(e,t,n)}else e=o.treeContext,ea=um(s.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=Ai(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return ba(t),n=Xo(e,t,n,r,void 0,i),r=es(),e!==null&&!jc?(ts(e,t,i),sl(e,t,i)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return ba(t),t.updateQueue=null,n=Qo(t,r,n,i),Zo(e),r=es(),e!==null&&!jc?(ts(e,t,a),sl(e,t,a)):(W&&r&&Xi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(ba(t),t.stateNode===null){var a=Ei,o=n.contextType;typeof o==`object`&&o&&(a=xa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},uo(t),o=n.contextType,a.context=typeof o==`object`&&o?xa(o):Ei,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),yo(t,r,a,i),vo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Ei,typeof u==`object`&&u&&(o=xa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),lo=!1;var f=t.memoizedState;a.state=f,yo(t,r,a,i),vo(),l=t.memoizedState,s||f!==l||lo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=lo||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,fo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Ei,typeof l==`object`&&l&&(c=xa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),lo=!1,f=t.memoizedState,a.state=f,yo(t,r,a,i),vo();var p=t.memoizedState;o!==d||f!==p||lo||e!==null&&e.dependencies!==null&&ya(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=lo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ya(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=so(t,e.child,null,i),t.child=so(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return ca(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Wa()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(Po.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(W){if(i?ko(t):Mo(),(e=ea)?(e=om(e,na),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Gi===null?null:{id:Ki,overflow:qi},retryLane:536870912,hydrationErrors:null},n=Fi(e),n.return=t,t.child=n,$i=t,ea=null)):e=null,e===null)throw ia(t);return t.lanes=cm(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(Mo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Ni(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(ko(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(Mo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=Ai(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Ni(i,a,n,null),i.flags|=2):i=Ai(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Wa():(s=Da._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(ko(t),n=e.child,e=n.sibling,n=Ai(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=Oi(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return so(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(ko(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(Mo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Ni(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,so(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(Mo(),t.child=e.child,t.flags|=128,null);if(ko(t),cm(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,ua({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||va(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(So.current!==null)return $c(e,t,c);if(r=td,r!==null&&(a=gt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,Ci(e,a),Id(r,e,a),Ac;return sm(o)||Jd(),$c(e,t,c)}return sm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ea=um(o.nextSibling),$i=t,W=!0,ta=null,na=!1,e!==null&&Qi(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),ga(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Lo(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=Po.current;if(t.flags&128)return Fo(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Fo(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=W?Hi:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return ma(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(va(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=Ai(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Ai(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ya(e)))}function ll(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ma(t,Da,e.memoizedState.cache),ca();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ma(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Ao(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return ko(t),t.flags|=128,null;r=va(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(ko(t),e=sl(e,t,n),e===null?null:e.sibling)}ko(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(va(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Fo(t,Po.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ma(t,Da,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,W&&t.flags&1048576&&Yi(t,Hi,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Za(t.elementType),t.type=e,typeof e==`function`)ki(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===te){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===re){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===P){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=pe(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,fo(e,t),yo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ma(t,Da,r),r!==o.cache&&_a(t,[Da],n,!0),vo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=Ri(Error(i(424)),t),ua(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ea=um(e.firstChild),$i=t,W=!0,ta=null,na=!0,n=co(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ca(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Pm(t.type,null,t.pendingProps,null))?t.memoizedState=n:W||(t.stateNode=Q(t.type,t.pendingProps,Ce.current,t)):t.memoizedState=Pm(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&W&&(r=t.stateNode=gm(t.type,t.pendingProps,Ce.current),$i=t,na=!0,a=ea,Cp(t.type)?(dm=a,ea=um(r.firstChild)):ea=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&W&&((a=r=ea)&&(r=im(r,t.type,t.pendingProps,na),r===null?a=!1:(t.stateNode=r,$i=t,ea=um(r.firstChild),na=!1,a=!0)),a||ia(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,mp(a,o)?r=null:s!==null&&mp(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Xo(e,t,$o,null,null,n),sh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&W&&((e=n=ea)&&(n=am(n,t.pendingProps,na),n===null?e=!1:(t.stateNode=n,$i=t,ea=null,e=!0)),e||ia(t)),null;case 13:return Xc(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,ba(t),a=xa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return ba(t),r=xa(Da),e===null?(a=Ha(),a===null&&(a=td,o=Oa(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},uo(t),ma(t,Da,a)):((e.lanes&n)!==0&&(fo(e,t),yo(t,null,null,n),vo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ma(t,Da,r),r!==a.cache&&_a(t,[Da],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ma(t,Da,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:W&&Xi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Jm(t,r):Jm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Gd())e.flags|=8192;else throw Qa=Ja,Ka}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Ym(t)){if(Gd())e.flags|=8192;else throw Qa=Ja,Ka}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ut(),e.lanes|=t,pd|=t)}function hl(e,t){if(!W)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(Zi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ha(Da),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(sa(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,la())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(Oe(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=xe.current,sa(t)?aa(t,e):(e=gm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=xe.current,sa(t))aa(t,o);else{var s=dp(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[St]=t,o[Ct]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(ap(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,sa(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=$i,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[St]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||np(e.nodeValue,n)),e||ia(t,!0)}else e=dp(e).createTextNode(r),e[St]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=sa(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[St]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(No(t),t):(No(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=sa(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[St]=t}else ca(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=la(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(No(t),t):(No(t),null)}return No(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return Ee(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ha(t.type),gl(t),null;case 19:if(Io(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Lo(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ji(n,e),n=n.sibling;return Fo(t,Po.current&1|2),W&&Ji(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Ve()>yd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Lo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!W)return gl(t),null}else 2*Ve()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Ve(),e.sibling=null,o=Po.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||W?Fo(t,o):(n=o,be(Do,t),be(Po,n),Oo===null&&(Oo=t)),W&&Ji(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return No(t),Eo(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Va),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ha(Da),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(Zi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ha(Da),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(No(t),t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(No(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ca()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Io(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ee(),null;case 10:return ha(t.type),null;case 22:case 23:return No(t),Eo(),e!==null&&ye(Va),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ha(Da),null;case 25:return null;default:return null}}function yl(e,t){switch(Zi(t),t.tag){case 3:ha(Da),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&No(t);break;case 13:No(t);break;case 19:Io(t);break;case 10:ha(t.type);break;case 22:case 23:No(t),Eo(),e!==null&&ye(Va);break;case 24:ha(Da)}}function bl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){gf(t,t.return,e)}}function xl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){gf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){gf(t,t.return,e)}}function Sl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{xo(t,n)}catch(t){gf(e,e.return,t)}}}function Cl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){gf(e,t,n)}}function wl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=hi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Fp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Ip(e);p(e.child,!1,$p,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){gf(e,t,n)}}function Tl(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){gf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){gf(e,t,n)}else n.current=null}}function El(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)tm(e.stateNode,t[n])}function Dl(e){for(var t=e.return;t!==null&&(Al(t)&&tm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function Ol(e){for(var t=e.return;t!==null&&(Al(t)&&nm(e.stateNode,t.stateNode),!kl(t));)t=t.return}function kl(e){return e.tag===5||e.tag===3||e.tag===27}function Al(e){return e&&e.tag===7&&e.stateNode!==null}function jl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){gf(e,e.return,t)}}function Ml(e,t,n){try{var r=e.stateNode;sp(r,e.type,n,t),r[Ct]=t}catch(t){gf(e,e.return,t)}}function Nl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cp(e.type)||e.tag===4}function Pl(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||Nl(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.tag===27&&Cp(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Fl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=_n)),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Cp(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Fl(e,t,n,r),e=e.sibling;e!==null;)Fl(e,t,n,r),e=e.sibling}function Il(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),El(e,r),Gt=!0;else if(i!==4&&(i===27&&(El(e,r),r=null,Cp(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Il(e,t,n,r),e=e.sibling;e!==null;)Il(e,t,n,r),e=e.sibling}function Ll(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);ap(t,r,n),t[St]=e,t[Ct]=n}catch(t){gf(e,e.return,t)}}var Rl=!1,zl=null;function Bl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Rl=!0)}var Vl=null;function Hl(){var e=Vl;return Vl=null,e}var Ul=0;function Wl(e,t,n,r,i){return Ul=0,Gl(e.child,t,n,r,i)}function Gl(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=kp(o);r.push(s),s.view&&(a=!0)}else a||kp(o).view&&(a=!0);Rl=!0,Ep(o,Ul===0?t:t+`_`+Ul,n),Ul++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Gl(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Kl(e,t){for(;e!==null;)e.tag===5?Dp(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Kl(e.child,t),e=e.sibling}function ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(ql(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=gi(t.default,t.share),t!==`none`&&(Wl(e,n,t,null,!1)||Kl(e.child,!1))}e=e.sibling}}function Jl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=hi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?ql(e):Wl(e,i,a,null,!1)?(ql(e),n.paired||t||Fd(e,r.onEnter)):Kl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e,t),e=e.sibling;else ql(e)}function Yl(e){if(zl!==null&&zl.size!==0){var t=zl;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=gi(n.default,n.share);if(a!==`none`&&(Wl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Fd(e,n.onShare)):Kl(e.child,!1)),t.delete(r),t.size===0)break}}}Yl(e)}e=e.sibling}}}function Xl(e){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode),r=zl===null?void 0:zl.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Wl(e,n,i,null,!1)?r===void 0?Fd(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,zl.delete(n),Fd(e,t.onShare)):Kl(e.child,!1)),zl!==null&&Yl(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Xl(e),e=e.sibling;else zl!==null&&Yl(e)}function Zl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=hi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Wl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Zl(e);e=e.sibling}}function Ql(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Kl(e.child,!1))}Ql(e)}e=e.sibling}}function $l(e){if(e.tag===30)e.stateNode.paired=null,Kl(e.child,!1),Ql(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)$l(e),e=e.sibling;else Ql(e)}function eu(e){for(e=e.child;e!==null;)e.tag===30?Kl(e.child,!1):e.subtreeFlags&33554432&&eu(e),e=e.sibling}function tu(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Ul<a.length){var l=a[Ul],u=kp(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&Ep(c,Ul===0?n:n+`_`+Ul,i),s&&e.flags&4||(Vl===null&&(Vl=[]),Vl.push(c,Ul===0?r:r+`_`+Ul,t.memoizedProps)),Ul++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:tu(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function nu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=hi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Ap)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Ul=0,i=tu(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Fd(e,n.onUpdate))}else e.subtreeFlags&33554432&&nu(e,t);e=e.sibling}}var ru=!1,iu=!1,au=!1,ou=!1,su=typeof WeakSet==`function`?WeakSet:Set,cu=null,lu=!1,uu=!1,du=!1,fu=!1;function pu(e,t,n){if(e=e.containerInfo,lp=gh,e=Kr(e),qr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(up={focusedElem:e,selectionRange:r},gh=!1,n=(n&335544064)===n,cu=t,t=n?9270:1024;cu!==null;){if(e=cu,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Xl(r[a]);if(e.alternate===null&&e.flags&2)n&&Bl(e),mu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Xl(r),mu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Bl(e),mu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,cu=r):(n&&Zl(e),mu(n))}}zl=null}function mu(e){for(;cu!==null;){var t=cu,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){gf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)rm(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:rm(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=hi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Wl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,cu=r;break}cu=t.return}}function hu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Fu(e,n),r&4&&bl(5,n);break;case 1:if(Fu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){gf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){gf(n,n.return,e)}}}r&64&&Sl(n),r&512&&wl(n,n.return);break;case 3:if(Fu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{xo(e,t)}catch(e){gf(n,n.return,e)}}break;case 27:t===null&&r&4&&Ll(n);case 26:case 5:Fu(e,n),t===null&&r&4&&jl(n),r&512&&wl(n,n.return);break;case 12:Fu(e,n);break;case 31:Fu(e,n),r&4&&wu(e,n);break;case 13:Fu(e,n),r&4&&Tu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=bf.bind(null,n),lm(e,n))));break;case 22:if(r=n.memoizedState!==null||ru,!r){var a=t!==null&&t.memoizedState!==null||iu;t=ru,i=iu,ru=r,(iu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Lu(e,n,r)):Fu(e,n),ru=t,iu=i}break;case 30:Fu(e,n),r&512&&wl(n,n.return);break;case 7:r&512&&wl(n,n.return);default:Fu(e,n)}}function gu(e,t){for(e=e.child;e!==null;)_u(e,t),e=e.sibling}function _u(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){gf(e,e.return,t)}vu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Gt=!0}catch(t){gf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Tp(s,!0):Tp(e.stateNode,!1)}catch(t){gf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&gu(e,t);break;default:gu(e,t)}}function vu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:_u(n,r);break a;case 22:n.memoizedState===null&&vu(n,r);break a;default:vu(n,r)}}e=e.sibling}}function yu(e){var t=e.alternate;t!==null&&(e.alternate=null,yu(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&z(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var bu=null,xu=!1;function Su(e,t,n){for(n=n.child;n!==null;)Cu(e,t,n),n=n.sibling}function Cu(e,t,n){if(Ze&&typeof Ze.onCommitFiberUnmount==`function`)try{Ze.onCommitFiberUnmount(Xe,n)}catch{}switch(n.tag){case 26:iu||Tl(n,t),Su(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!iu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:iu||Tl(n,t),Ol(n);var r=bu,i=xu;Cp(n.type)&&(bu=n.stateNode,xu=!1),Su(e,t,n),_m(n.stateNode,n.type,n.memoizedProps),bu=r,xu=i;break;case 5:iu||Tl(n,t),Ol(n);case 6:if(n.tag===6&&Ol(n),r=bu,i=xu,bu=null,Su(e,t,n),bu=r,xu=i,bu!==null){if(xu)try{(bu.nodeType===9?bu.body:bu.nodeName===`HTML`?bu.ownerDocument.body:bu).removeChild(n.stateNode),Gt=!0}catch(e){gf(n,t,e)}else try{bu.removeChild(n.stateNode),Gt=!0}catch(e){gf(n,t,e)}}break;case 18:bu!==null&&(xu?(e=bu,wp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Hh(e)):wp(bu,n.stateNode));break;case 4:r=bu,i=xu,bu=n.stateNode.containerInfo,xu=!0,Su(e,t,n),bu=r,xu=i;break;case 0:case 11:case 14:case 15:xl(2,n,t),iu||xl(4,n,t),Su(e,t,n);break;case 1:iu||(Tl(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Cl(n,t,r)),Su(e,t,n);break;case 21:Su(e,t,n);break;case 22:iu=(r=iu)||n.memoizedState!==null,Su(e,t,n),iu=r;break;case 30:Tl(n,t),Su(e,t,n);break;case 7:iu||Tl(n,t),Su(e,t,n);break;default:Su(e,t,n)}}function wu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Hh(e)}catch(e){gf(t,t.return,e)}}}function Tu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Hh(e)}catch(e){gf(t,t.return,e)}}function Eu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new su),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new su),t;default:throw Error(i(435,e.tag))}}function Du(e,t){var n=Eu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=xf.bind(null,e,t);t.then(r,r)}})}function Ou(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Cp(l.type)){bu=l.stateNode,xu=!1;break a}break;case 5:bu=l.stateNode,xu=!1;break a;case 3:case 4:bu=l.stateNode.containerInfo,xu=!0;break a}l=l.return}if(bu===null)throw Error(i(160));Cu(s,c,o),bu=null,xu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Au(t,e,n),t=t.sibling}var ku=null;function Au(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Ou(t,e,n),ju(e),a&4&&(xl(3,e,e.return),bl(3,e),xl(5,e,e.return));break;case 1:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&64&&ru&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=ku,Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(ru)e.stateNode=Q(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[kt]||r[St]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),ap(r,t,n),r[St]=e,Ft(r),t=r;break a;case`link`:if(o=Km(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Km(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),ap(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[St]=e,Ft(r),t=r}e.stateNode=t}}else ru||qm(o,e.type,e.stateNode)}else e.stateNode=Vm(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Ml(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||iu||t.parentNode.removeChild(t)):a.count--,n===null?ru||qm(o,e.type,e.stateNode):Vm(o,n,e.memoizedProps))}break;case 27:Ou(t,e,n),ju(e),a&512&&(iu||r===null||Tl(r,r.return)),r!==null&&a&4&&Ml(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=au,au=!1,Ou(t,e,n),au=o,ju(e),a&512&&(iu||r===null||Tl(r,r.return)),e.flags&32){t=e.stateNode;try{ln(t,``),Gt=!0}catch(t){gf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Ml(e,t,r===null?t:r.memoizedProps)),a&1024&&(ou=!0);break;case 6:if(Ou(t,e,n),ju(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Gt=!0}catch(t){gf(e,e.return,t)}}break;case 3:if(Gt=!1,Gm=null,o=ku,ku=xm(t.containerInfo),Ou(t,e,n),ku=o,ju(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Hh(t.containerInfo)}catch(t){gf(e,e.return,t)}ou&&(ou=!1,Mu(e)),Gt=!1;break;case 4:a=au,au=ru,r=Kt(),o=ku,ku=xm(e.stateNode.containerInfo),Ou(t,e,n),ju(e),ku=o,Gt&&uu&&(du=!0),Gt=r,au=a;break;case 12:Ou(t,e,n),ju(e);break;case 31:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 13:Ou(t,e,n),ju(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=Ve()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=ru,l=iu,u=au;ru=c||o,au=u||o,iu=l||s,Ou(t,e,n),iu=l,au=u,ru=c,ju(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||ru||iu||(t=s||iu,n=ru,r=iu,ru=o||ru,iu=t,Iu(e,2),ru=n,iu=r),!o&&au||gu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Du(e,n))));break;case 19:Ou(t,e,n),ju(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Du(e,t)));break;case 30:a&512&&(iu||r===null||Tl(r,r.return)),a=Kt(),o=uu,s=(n&335544064)===n,c=e.memoizedProps,uu=s&&gi(c.default,c.update)!==`none`,Ou(t,e,n),ju(e),s&&r!==null&&Gt&&(e.flags|=4),uu=o,Gt=a;break;case 21:break;case 7:a&512&&(iu||r===null||Tl(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Ou(t,e,n),ju(e)}}function ju(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(Nl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Al(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(kl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Il(e,Pl(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(ln(l,``),n.flags&=-33),Il(e,Pl(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Fl(e,Pl(e),u,s);break;default:throw Error(i(161))}}catch(t){gf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Mu(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Mu(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,gh=!0,t.reset(),gh=!1),e=e.sibling}}function Nu(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Pu(t,e),t=t.sibling;else nu(t,!1)}function Pu(e,t){var n=e.alternate;if(n===null)Jl(e,!1);else switch(e.tag){case 3:if(fu=lu=!1,Hl(),Nu(t,e),!lu&&!du){if(e=Vl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Dp(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),fu=!0}Vl=null;break;case 5:Nu(t,e);break;case 4:r=lu,lu=!1,Nu(t,e),lu&&(du=!0),lu=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?Nu(t,e):Jl(e,!1));break;case 30:r=lu,i=Hl(),lu=!1,Nu(t,e),lu&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=hi(a,o),o=hi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Ul=0,t=tu(e,n,t,o,s,a,!0),Ul!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Fd(e,e.memoizedProps.onUpdate),Vl=i):i!==null&&(i.push.apply(i,Vl),Vl=i),lu=e.flags&32?!0:r;break;default:Nu(t,e)}}function Fu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)hu(e,t.alternate,t),t=t.sibling}function Iu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:xl(4,n,n.return),Iu(n,r);break;case 1:Tl(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Cl(n,n.return,i),Iu(n,r);break;case 27:r&2&&_m(n.stateNode,n.type,n.memoizedProps);case 5:Tl(n,n.return),n.tag!==5&&n.tag!==27||Ol(n),Iu(n,r);break;case 6:Ol(n);break;case 26:Tl(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||iu||i.parentNode.removeChild(i),Iu(n,r);break;case 22:n.memoizedState===null&&Iu(n,r);break;case 30:Tl(n,n.return),Iu(n,r);break;case 7:Tl(n,n.return);default:Iu(n,r)}e=e.sibling}}function Lu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Lu(i,a,n),bl(4,a);break;case 1:if(Lu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){gf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)bo(l[i],c)}catch(e){gf(r,r.return,e)}}s&&o&64&&Sl(a),wl(a,a.return);break;case 27:n&2&&Ll(a);case 5:a.tag!==5&&a.tag!==27||Dl(a),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 6:Dl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||ru||qm(xm(c.ownerDocument),a.type,c),Lu(i,a,n),s&&r===null&&o&4&&jl(a),wl(a,a.return);break;case 12:Lu(i,a,n);break;case 31:Lu(i,a,n),s&&o&4&&wu(i,a);break;case 13:Lu(i,a,n),s&&o&4&&Tu(i,a);break;case 22:a.memoizedState===null&&Lu(i,a,n),wl(a,a.return);break;case 30:Lu(i,a,n),wl(a,a.return);break;case 7:wl(a,a.return);default:Lu(i,a,n)}t=t.sibling}}function Ru(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ka(n))}function zu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ka(e))}function Bu(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)Vu(e,t,n,r),t=t.sibling;else i&&eu(t)}function Vu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&$l(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Bu(e,t,n,r),a&2048&&bl(9,t);break;case 1:Bu(e,t,n,r);break;case 3:Bu(e,t,n,r),i&&fu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&ka(a)));break;case 12:if(a&2048){Bu(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){gf(t,t.return,e)}}else Bu(e,t,n,r);break;case 31:Bu(e,t,n,r);break;case 13:Bu(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&$l(t),o._visibility&2?Bu(e,t,n,r):(o._visibility|=2,Hu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&$l(s),o._visibility&2?Bu(e,t,n,r):Uu(e,t)),a&2048&&Ru(s,t);break;case 24:Bu(e,t,n,r),a&2048&&zu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Kl(a.child,!0),Kl(t.child,!0))),Bu(e,t,n,r);break;default:Bu(e,t,n,r)}}function Hu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Hu(a,o,s,c,i),bl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Hu(a,o,s,c,i)):u._visibility&2?Hu(a,o,s,c,i):Uu(a,o),i&&l&2048&&Ru(o.alternate,o);break;case 24:Hu(a,o,s,c,i),i&&l&2048&&zu(o.alternate,o);break;default:Hu(a,o,s,c,i)}t=t.sibling}}function Uu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Uu(n,r),i&2048&&Ru(r.alternate,r);break;case 24:Uu(n,r),i&2048&&zu(r.alternate,r);break;default:Uu(n,r)}t=t.sibling}}var Wu=8192;function Gu(e,t,n){if(e.subtreeFlags&Wu)for(e=e.child;e!==null;)Ku(e,t,n),e=e.sibling}function Ku(e,t,n){switch(e.tag){case 26:Gu(e,t,n),e.flags&Wu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&Zm(n,e)):Qm(n,ku,e.memoizedState,e.memoizedProps));break;case 5:Gu(e,t,n),e.flags&Wu&&(e=e.stateNode,(t&335544128)===t&&Zm(n,e));break;case 3:case 4:var r=ku;ku=xm(e.stateNode.containerInfo),Gu(e,t,n),ku=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Wu,Wu=16777216,Gu(e,t,n),Wu=r):Gu(e,t,n));break;case 30:if((e.flags&Wu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,zl===null&&(zl=new Map),zl.set(r,i)}Gu(e,t,n);break;default:Gu(e,t,n)}}function qu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Yu(e),e=e.sibling}function Yu(e){switch(e.tag){case 0:case 11:case 15:Ju(e),e.flags&2048&&xl(9,e,e.return);break;case 3:Ju(e);break;case 12:Ju(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Xu(e)):Ju(e);break;default:Ju(e)}}function Xu(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];cu=r,Zu(r,e)}qu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:xl(8,t,t.return),Xu(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Xu(t));break;default:Xu(t)}e=e.sibling}}function Zu(e,t){for(;cu!==null;){var n=cu;switch(n.tag){case 0:case 11:case 15:xl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:ka(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,cu=r;else a:for(n=e;cu!==null;){r=cu;var i=r.sibling,a=r.return;if(yu(r),r===n){cu=null;break a}if(i!==null){i.return=a,cu=i;break a}cu=a}}}var Qu={getCacheForType:function(e){var t=xa(Da),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return xa(Da).controller.signal}},$u=typeof WeakMap==`function`?WeakMap:Map,ed=0,td=null,K=null,q=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,J=0,Sd=null,Cd=null,wd=0,Td=0,Ed=null,Dd=null,Od=null,kd=null,Ad=null,jd=0,Md=null;function Nd(){return ed&2&&q!==0?q&-q:I.T===null?yt():Lf()}function Pd(){if(fd===0){if(!(q&536870912)||W){var e=rt;rt<<=1,!(rt&3932160)&&(rt=262144),fd=e}else fd=536870912}return e=Do.current,e!==null&&(e.flags|=32),fd}function Fd(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Fp(hi(e.memoizedProps,n))),kd===null&&(kd=[]),kd.push(t.bind(null,r))}}function Id(e,t,n){(e===td&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Ud(e,0),Bd(e,q,fd,!1)),ft(e,n),ed&2&&e===td||(e===td&&(!(ed&2)&&(ud|=n),cd===4&&Bd(e,q,fd,!1)),kf(e))}function Ld(e,t,n){if(ed&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||st(e,t),a=r?Zd(e,t):Yd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Bd(e,t,0,!1);break}if(n=e.current.alternate,o&&!zd(n))a=Yd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Ud(c,s).flags|=256),s=Yd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Ud(e,0),Bd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Bd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-Ve(),10<a)){if(Bd(r,t,fd,!id),ot(r,0,!0)!==0)break a;wd=t,r.timeoutHandle=_p(Rd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}Rd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);kf(e)}function Rd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:_n},zl=null,Ku(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=nh.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-Ve():(a&4194048)===a?vd-Ve():0,m=eh(d,m),m!==null)?(wd=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Bd(e,a,o,!l)):af(e,t,a,n,r,i,o,s,c,l,u,d)}function zd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Br(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Bd(e,t,n,r){t=ct(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-$e(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&mt(e,n,t)}function Vd(){return ed&6?!0:(Af(0,!1),!1)}function Hd(){if(K!==null){if(nd===0)var e=K.return;else e=K,pa=fa=null,ns(e),to=null,no=0,e=K;for(;e!==null;)yl(e.alternate,e),e=e.return;K=null}}function Ud(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,vp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),wd=0,Hd(),td=e,K=n=Ai(e.current,null),q=t,nd=0,rd=null,id=!1,ad=st(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=ct(e,t),bi(),n}function Wd(e,t){G=null,I.H=fc,t===Ga||t===qa?(t=$a(),nd=3):t===Ka?(t=$a(),nd=4):nd=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,K===null&&(cd=1,wc(e,Ri(t,e.current)))}function Gd(){var e=Do.current;return e===null?!0:(q&4194048)===q?Oo===null:(q&62914560)===q||q&536870912?e===Oo:!1}function Kd(){var e=I.H;return I.H=fc,e===null?fc:e}function qd(){var e=I.A;return I.A=Qu,e}function Jd(){cd=4,id||(q&4194048)!==q&&Do.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||td===null||Bd(td,q,fd,!1)}function Yd(e,t,n){var r=ed;ed|=2;var i=Kd(),a=qd();(td!==e||q!==t)&&(bd=null,Ud(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&K!==null){var s=K,c=rd;switch(nd){case 8:Hd(),o=6;break a;case 3:case 2:case 9:case 6:Do.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,tf(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,tf(e,s,c,l)}}Xd(),o=cd;break}catch(t){Wd(e,t)}while(1);return t&&e.shellSuspendCounter++,pa=fa=null,ed=r,I.H=i,I.A=a,K===null&&(td=null,q=0,bi()),o}function Xd(){for(;K!==null;)$d(K)}function Zd(e,t){var n=ed;ed|=2;var r=Kd(),a=qd();td!==e||q!==t?(bd=null,yd=Ve()+500,Ud(e,t)):ad=st(e,t);a:do try{if(nd!==0&&K!==null){t=K;var o=rd;b:switch(nd){case 1:nd=0,rd=null,tf(e,t,o,1);break;case 2:case 9:if(Ya(o)){nd=0,rd=null,ef(t);break}t=function(){nd!==2&&nd!==9||td!==e||(nd=7),kf(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:Ya(o)?(nd=0,rd=null,ef(t)):(nd=0,rd=null,tf(e,t,o,7));break;case 5:var s=null;switch(K.tag){case 26:s=K.memoizedState;case 5:case 27:var c=K;if(s?Ym(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)K=l;else{var u=c.return;u===null?K=null:(K=u,nf(u))}break b}}nd=0,rd=null,tf(e,t,o,5);break;case 6:nd=0,rd=null,tf(e,t,o,6);break;case 8:Hd(),cd=6;break a;default:throw Error(i(462))}}Qd();break}catch(t){Wd(e,t)}while(1);return pa=fa=null,I.H=r,I.A=a,ed=n,K===null?(td=null,q=0,bi(),cd):0}function Qd(){for(;K!==null&&!ze();)$d(K)}function $d(e){var t=ul(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?nf(e):K=t}function ef(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,q);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,q);break;case 5:ns(t);var r=t;r===$i&&(W?(oa(r),r.tag===5&&r.stateNode!=null&&(ea=r.stateNode)):(oa(r),W=!0));default:yl(n,t),t=K=ji(t,sd),t=ul(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?nf(e):K=t}function tf(e,t,n,r){pa=fa=null,ns(t),to=null,no=0;var i=t.return;try{if(kc(e,i,t,n,q)){cd=1,wc(e,Ri(n,e.current)),K=null;return}}catch(t){if(i!==null)throw K=i,t;cd=1,wc(e,Ri(n,e.current)),K=null;return}t.flags&32768?(W||r===1?e=!0:ad||q&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=Do.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,id);return}e=t.return;var n=_l(t.alternate,t,sd);if(n!==null){K=n;return}if(t=t.sibling,t!==null){K=t;return}K=t=e}while(t!==null);cd===0&&(cd=5)}function rf(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,K=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){K=e;return}K=e=n}while(e!==null);cd=6,K=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do pf();while(J!==0);if(ed&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===td&&(K=td=null,q=0),Cd=t,Sd=e,wd=n,Ed=a,Dd=r,of(e,t,n,s,c,l,f)}}function of(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Td=s,s|=yi,pt(e,n,s,r,i,a),kd=null,(n&335544064)===n?(Ad=Ma(e),r=10262):(Ad=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,Sf(Ge,function(){return mf(),null})):(e.callbackNode=null,e.callbackPriority=0),Rl=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=I.T,I.T=null,i=L.p,L.p=2,a=ed,ed|=4;try{pu(e,t,n)}finally{ed=a,L.p=i,I.T=r}}J=1,Rl?Od=Np(o,e.containerInfo,Ad,lf,uf,cf,df,mf,sf,null,null):(lf(),uf(),df())}function sf(e){if(J!==0){var t=Sd.onRecoverableError;t(e,{componentStack:null})}}function cf(){J===3&&(J=0,Pu(Cd,Sd),J=4)}function lf(){if(J===1){J=0;var e=Sd,t=Cd,n=wd,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=I.T,I.T=null;var i=L.p;L.p=2;var a=ed;ed|=4;try{uu=du=!1,Au(t,e,n),n=up;var o=Kr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Gr(s.ownerDocument.documentElement,s)){if(c!==null&&qr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Wr(s,h),v=Wr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}gh=!!lp,up=lp=null}finally{ed=a,L.p=i,I.T=r}}e.current=t,J=2}}function uf(){if(J===2){J=0;var e=Sd,t=Cd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=I.T,I.T=null;var r=L.p;L.p=2;var i=ed;ed|=4;try{hu(e,t.alternate,t)}finally{ed=i,L.p=r,I.T=n}}J=3}}function df(){if(J===4||J===3){J=0;var e=Od;Od=null,Be();var t=Sd,n=Cd,r=wd,i=Dd,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?J=5:(J=0,Cd=Sd=null,ff(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),vt(r),n=n.stateNode,Ze&&typeof Ze.onCommitFiberRoot==`function`)try{Ze.onCommitFiberRoot(Xe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=I.T,a=L.p,L.p=2,I.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{I.T=n,L.p=a}}if(i=kd,o=Ad,Ad=null,i!==null&&(kd=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);wd&3&&pf(),kf(t),a=t.pendingLanes,r&261930&&a&42?t===Md?jd++:(jd=0,Md=t):(jd=0,Md=null),Af(0,!1)}}function ff(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ka(t)))}function pf(){return Od!==null&&(Od.skipTransition(),Od=null),lf(),uf(),df(),mf()}function mf(){if(J!==5)return!1;var e=Sd,t=Td;Td=0;var n=vt(wd),r=I.T,a=L.p;try{L.p=32>n?32:n,I.T=null,n=Ed,Ed=null;var o=Sd,s=wd;if(J=0,Cd=Sd=null,wd=0,ed&6)throw Error(i(331));var c=ed;if(ed|=4,Yu(o.current),Vu(o,o.current,s,n),ed=c,Af(0,!1),Ze&&typeof Ze.onPostCommitFiberRoot==`function`)try{Ze.onPostCommitFiberRoot(Xe,o)}catch{}return!0}finally{L.p=a,I.T=r,ff(e,t)}}function hf(e,t,n){t=Ri(n,t),t=Ec(e.stateNode,t,2),e=mo(e,t,2),e!==null&&(ft(e,2),kf(e))}function gf(e,t,n){if(e.tag===3)hf(e,e,n);else for(;t!==null;){if(t.tag===3){hf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=Ri(n,e),n=Dc(2),r=mo(t,n,2),r!==null&&(Oc(n,r,t,e),ft(r,2),kf(r));break}}t=t.return}}function _f(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new $u;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=vf.bind(null,e,t,n),t.then(e,e))}function vf(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,td===e&&(q&n)===n&&(cd===4||cd===3&&(q&62914560)===q&&300>Ve()-_d?ed&2?dd|=n:Ud(e,0):dd|=n,pd===q&&(pd=0)),kf(e)}function yf(e,t){t===0&&(t=ut()),e=Ci(e,t),e!==null&&(ft(e,t),kf(e))}function bf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),yf(e,n)}function xf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),yf(e,n)}function Sf(e,t){return Le(e,t)}var Cf=null,wf=null,Tf=!1,Ef=!1,Df=!1,Of=0;function kf(e){e!==wf&&e.next===null&&(wf===null?Cf=wf=e:wf=wf.next=e),Ef=!0,Tf||(Tf=!0,If())}function Af(e,t){if(!Df&&Ef){Df=!0;do for(var n=!1,r=Cf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-$e(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Ff(r,a))}else a=q,a=ot(r,r===td?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||st(r,a)||(n=!0,Ff(r,a))}r=r.next}while(n);Df=!1}}function jf(){Mf()}function Mf(){Ef=Tf=!1;var e=0;Of!==0&&gp()&&(e=Of);for(var t=Ve(),n=null,r=Cf;r!==null;){var i=r.next,a=Nf(r,t);a===0?(r.next=null,n===null?Cf=i:n.next=i,i===null&&(wf=n)):(n=r,(e!==0||a&3)&&(Ef=!0)),r=i}J!==0&&J!==5||Af(e,!1),Of!==0&&(Of=0)}function Nf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-$e(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=lt(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=td,n=q,n=ot(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Re(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||st(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Re(r),vt(n)){case 2:case 8:n=We;break;case 32:n=Ge;break;case 268435456:n=qe;break;default:n=Ge}return r=Pf.bind(null,e),n=Le(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Re(r),e.callbackPriority=2,e.callbackNode=null,2}function Pf(e,t){if(J!==0&&J!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(pf()&&e.callbackNode!==n)return null;var r=q;return r=ot(e,e===td?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Ld(e,r,t),Nf(e,Ve()),e.callbackNode!=null&&e.callbackNode===n?Pf.bind(null,e):null)}function Ff(e,t){if(pf())return null;Ld(e,t,!0)}function If(){xp(function(){ed&6?Le(Ue,jf):Mf()})}function Lf(){if(Of===0){var e=Fa;e===0&&(e=R,R<<=1,!(R&261888)&&(R=256)),Of=e}return Of}function Rf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:gn(e)}function zf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Rf((i[Ct]||null).action),o=r.submitter;o&&(t=(t=o[Ct]||null)?Rf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Rn(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Of!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var Bf=0;Bf<pi.length;Bf++){var Vf=pi[Bf];mi(Vf.toLowerCase(),`on`+(Vf[0].toUpperCase()+Vf.slice(1)))}mi(ai,`onAnimationEnd`),mi(oi,`onAnimationIteration`),mi(si,`onAnimationStart`),mi(`dblclick`,`onDoubleClick`),mi(`focusin`,`onFocus`),mi(`focusout`,`onBlur`),mi(ci,`onTransitionRun`),mi(li,`onTransitionStart`),mi(ui,`onTransitionCancel`),mi(di,`onTransitionEnd`),Bt(`onMouseEnter`,[`mouseout`,`mouseover`]),Bt(`onMouseLeave`,[`mouseout`,`mouseover`]),Bt(`onPointerEnter`,[`pointerout`,`pointerover`]),Bt(`onPointerLeave`,[`pointerout`,`pointerover`]),zt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),zt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),zt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),zt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),zt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Hf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Uf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Hf));function Wf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}}}}function Y(e,t){var n=t[Tt];n===void 0&&(n=t[Tt]=new Set);var r=e+`__bubble`;n.has(r)||(X(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),X(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Lt.forEach(function(t){t!==`selectionchange`&&(Uf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function X(e,t,n,r){switch(Ch(t)){case 2:var i=_h;break;case 8:i=vh;break;default:i=yh}n=i.bind(null,t,n,e),i=void 0,!Dn||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Jf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=jt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}wn(function(){var r=a,i=yn(n),s=[];a:{var c=fi.get(e);if(c!==void 0){var l=Rn,u=e;switch(e){case`keypress`:if(Nn(n)===0)break a;case`keydown`:case`keyup`:l=nr;break;case`focusin`:u=`focus`,l=qn;break;case`focusout`:u=`blur`,l=qn;break;case`beforeblur`:case`afterblur`:l=qn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Gn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Kn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=ar;break;case ai:case oi:case si:l=Jn;break;case di:l=or;break;case`scroll`:case`scrollend`:l=Bn;break;case`wheel`:l=sr;break;case`copy`:case`cut`:case`paste`:l=Yn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=rr;break;case`submit`:l=ir;break;case`toggle`:case`beforetoggle`:l=cr}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=Tn(m,p),g!=null&&d.push(Yf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==vn&&(u=n.relatedTarget||n.fromElement)&&(jt(u)||u[wt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?jt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Gn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=rr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:Nt(c),h=l==null?u:Nt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,jt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?E(c,l,Zf):null,c!==null&&Qf(s,u,c,d,!1),l!==null&&f!==null&&Qf(s,f,l,d,!0)))}a:{if(c=r?Nt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Or;else if(Sr(c)){if(kr)_=Rr;else{_=Ir;var v=Fr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&pn(r.elementType)&&(_=Or):_=Lr;if(_&&=_(e,r)){Cr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?Nt(r):window,e){case`focusin`:(Sr(v)||v.contentEditable===`true`)&&(Yr=v,Xr=r,Zr=null);break;case`focusout`:Zr=Xr=Yr=null;break;case`mousedown`:Qr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Qr=!1,$r(s,n,i);break;case`selectionchange`:if(Jr)break;case`keydown`:case`keyup`:$r(s,n,i)}var y;if(ur)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else vr?gr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(pr&&n.locale!==`ko`&&(vr||b!==`onCompositionStart`?b===`onCompositionEnd`&&vr&&(y=Mn()):(kn=i,An=`value`in kn?kn.value:kn.textContent,vr=!0)),v=Xf(r,b),0<v.length&&(b=new Xn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=_r(n),y!==null&&(b.data=y)))),(y=fr?yr(e,n):br(e,n))&&(b=Xf(r,`onBeforeInput`),0<b.length&&(v=new Xn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),zf(s,e,r,n,i)}Wf(s,t)})}function Yf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=Tn(e,n),i!=null&&r.unshift(Yf(e,i,a)),i=Tn(e,t),i!=null&&r.push(Yf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Zf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Qf(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=Tn(n,a),l!=null&&o.unshift(Yf(n,l,c))):i||(l=Tn(n,a),l!=null&&o.push(Yf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var $f=/\r\n?/g,ep=/\u0000|\uFFFD/g;function tp(e){return(typeof e==`string`?e:``+e).replace($f,`
9
+ `).replace(ep,``)}function np(e,t){return t=tp(t),tp(e)===t}function rp(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&ln(e,``+r);else return;break;case`className`:Jt(e,`class`,r);break;case`tabIndex`:Jt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Jt(e,n,r);break;case`style`:fn(e,r,o);return;case`data`:if(t!==`object`){Jt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&rp(e,t,`name`,a.name,a,null),rp(e,t,`formEncType`,a.formEncType,a,null),rp(e,t,`formMethod`,a.formMethod,a,null),rp(e,t,`formTarget`,a.formTarget,a,null)):(rp(e,t,`encType`,a.encType,a,null),rp(e,t,`method`,a.method,a,null),rp(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=gn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=_n);return;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=gn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Y(`beforetoggle`,e),Y(`toggle`,e),qt(e,`popover`,r);break;case`xlinkActuate`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:Yt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:Yt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:qt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=mn.get(n)||n,qt(e,n,r);else return}Gt=!0}function ip(e,t,n,r,a,o){switch(n){case`style`:fn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)ln(e,r);else if(typeof r==`number`||typeof r==`bigint`)ln(e,``+r);else return;break;case`onScroll`:r!=null&&Y(`scroll`,e);return;case`onScrollEnd`:r!=null&&Y(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=_n);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!Rt.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[Ct]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Gt=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):qt(e,n,r)}return}Gt=!0}function ap(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Y(`error`,e),Y(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:rp(e,t,o,s,n,null)}}a&&rp(e,t,`srcSet`,n.srcSet,n,null),r&&rp(e,t,`src`,n.src,n,null);return;case`input`:Y(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:rp(e,t,r,d,n,null)}}rn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Y(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:rp(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&on(e,!!r,n,!0):on(e,!!r,t,!1);return;case`textarea`:for(s in Y(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:rp(e,t,s,c,n,null)}cn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:rp(e,t,l,r,n,null)}return;case`dialog`:Y(`beforetoggle`,e),Y(`toggle`,e),Y(`cancel`,e),Y(`close`,e);break;case`iframe`:case`object`:Y(`load`,e);break;case`video`:case`audio`:for(r=0;r<Hf.length;r++)Y(Hf[r],e);break;case`image`:Y(`error`,e),Y(`load`,e);break;case`details`:Y(`toggle`,e);break;case`embed`:case`source`:case`link`:Y(`error`,e),Y(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:rp(e,t,u,r,n,null)}return;default:if(pn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ip(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&rp(e,t,c,r,n,null))}var op={};function sp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||rp(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Gt=!0),o=m;break;case`name`:m!==f&&(Gt=!0),a=m;break;case`checked`:m!==f&&(Gt=!0),u=m;break;case`defaultChecked`:m!==f&&(Gt=!0),d=m;break;case`value`:m!==f&&(Gt=!0),s=m;break;case`defaultValue`:m!==f&&(Gt=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&rp(e,t,p,m,r,f)}}B(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||rp(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Gt=!0),p=o;break;case`defaultValue`:o!==l&&(Gt=!0),c=o;break;case`multiple`:o!==l&&(Gt=!0),s=o;default:o!==l&&rp(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?on(e,!!n,n?[]:``,!1):on(e,!!n,t,!0)):on(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:rp(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Gt=!0),p=a;break;case`defaultValue`:a!==o&&(Gt=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&rp(e,t,s,a,r,o)}sn(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:rp(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Gt=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:rp(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&rp(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:rp(e,t,u,p,r,m)}return;default:if(pn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ip(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ip(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&rp(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||rp(e,t,f,p,r,m)}function cp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Z(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&cp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&cp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var lp=null,up=null;function dp(e){return e.nodeType===9?e:e.ownerDocument}function fp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function pp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function Q(e,t,n,r){return n=dp(n).createElement(e),n[St]=r,n[Ct]=t,ap(n,e,t),Ft(n),n}function mp(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var hp=null;function gp(){var e=window.event;return e&&e.type===`popstate`?e!==hp&&(hp=e,!0):(hp=null,!1)}var _p=typeof setTimeout==`function`?setTimeout:void 0,vp=typeof clearTimeout==`function`?clearTimeout:void 0,yp=typeof Promise==`function`?Promise:void 0,bp=typeof requestAnimationFrame==`function`?requestAnimationFrame:_p,xp=typeof queueMicrotask==`function`?queueMicrotask:yp===void 0?_p:function(e){return yp.resolve(null).then(e).catch(Sp)};function Sp(e){setTimeout(function(){throw e})}function Cp(e){return e===`head`}function wp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Hh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)vm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,vm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[kt]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&vm(e.ownerDocument.body)}n=i}while(n);Hh(t)}function Tp(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function Ep(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Dp(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function Op(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function kp(e){return Op(e.getBoundingClientRect(),getComputedStyle(e),e)}function Ap(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return Op(t,n,e)}function jp(e){return e.documentElement.clientHeight}function Mp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Np(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(jp(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=Xm(f),u>$m){s.length=o;break}f=new Promise(Mp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Pp(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Pp.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:D({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Pp.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Pp.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Fp(e){return{name:e,group:new Pp(`group`,e),imagePair:new Pp(`image-pair`,e),old:new Pp(`old`,e),new:new Pp(`new`,e)}}function Ip(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Ip.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Vp(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=zp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,Lp,e,s,r)}this._eventListeners=a}};function Lp(e,t,n,r){return b(e).addEventListener(t,n,r),!1}Ip.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Vp(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=zp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Rp,e,n,i),r.splice(t,1),a!==null&&a()}};function Rp(e,t,n,r){return b(e).removeEventListener(t,n,r),!1}function zp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Bp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Vp(e,t,n,r){if(e.length===0)return-1;r=Bp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Bp(a.optionsOrUseCapture)===r)return i}return-1}Ip.prototype.dispatchEvent=function(e){var t=h(this._fragmentFiber);if(t===null)return!0;t=b(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,zp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Ip.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Hp,e,void 0,void 0)};function Hp(e,t){return e.tag!==6&&(e=b(e),mm(e,t))}Ip.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Up,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Hp(t[n],e);n--);};function Up(e,t){return t.push(e),!1}Ip.prototype.blur=function(){var e=h(this._fragmentFiber);e!==null&&(e=b(e),e=dp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Wp,e,void 0,void 0))};function Wp(e,t){return e.tag!==6&&(e=b(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Ip.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,Gp,e,void 0,void 0)};function Gp(e,t){return e.tag===6||(e=b(e),t.observe(e)),!1}Ip.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0);for(var n=t=0;n<qp.length;n++){var r=qp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):qp[t++]=r}qp.length=t}};function Kp(e,t){return e.tag===6||(e=b(e),t.unobserve(e)),!1}var qp=[],Jp=!1;function Yp(e,t,n){qp.push({fragmentInstance:e,observer:t,instance:n}),Jp||(Jp=!0,hm(function(){Jp=!1;var e=qp;qp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Ip.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Xp,e,void 0,void 0),e};function Xp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=b(e),t.push.apply(t,e.getClientRects());return!1}Ip.prototype.getRootNode=function(e){var t=h(this._fragmentFiber);return t===null?this:b(t).getRootNode(e)},Ip.prototype.compareDocumentPosition=function(e){var t=h(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Up,n,void 0,void 0);var r=b(t);if(n.length===0){if(n=r,_(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=v(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=b(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=b(n[0]),i=b(n[n.length-1]);var a=_(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||Zp(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function Zp(e,t,n,r,i){var a=jt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=h(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=E(n,a,T),t===null?t=!1:(p(t,!0,C,a,n),a=x,x=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=E(r,a,T),t===null?t=!1:(p(t,!0,w,a,r),a=x,S=x=null,t=a!==null)),t):!1}function Qp(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Ip.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Up,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=v(this._fragmentFiber);if(r=n?r[1]||r[0]||h(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=b(r),Qp(e,n);return}if(r=b(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=b(a),Qp(a,n)):b(a).scrollIntoView(e),r+=n?-1:1}};function $p(e,t){return e=b(e),em(e,t),!1}function em(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function tm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<qp.length;i++){var a=qp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(qp[r++]=a)}qp.length=r,n.observe(e)}),em(e,t))}function nm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,zp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Yp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function rm(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:rm(n),z(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function im(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[kt])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=um(e.nextSibling),e===null)break}return null}function am(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=um(e.nextSibling),e===null))return null;return e}function om(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=um(e.nextSibling),e===null))return null;return e}function sm(e){return e.data===`$?`||e.data===`$~`}function cm(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function lm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function um(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var dm=null;function fm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return um(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function pm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function mm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function hm(e){bp(function(){bp(function(t){return e(t)})})}function gm(e,t,n){switch(t=dp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function _m(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&rp(e,t,r,null,op,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===_n&&(e.onclick=null),z(e)}function vm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);z(e)}var ym=new Map,bm=new Set;function xm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var Sm=L.d;L.d={f:Cm,r:wm,D:Dm,C:Om,L:km,m:Am,X:Mm,S:jm,M:Nm};function Cm(){var e=Sm.f(),t=Vd();return e||t}function wm(e){var t=Mt(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):Sm.r(e)}var Tm=typeof document>`u`?null:document;function Em(e,t,n){var r=Tm;if(r&&typeof t==`string`&&t){var i=nn(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),bm.has(i)||(bm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),ap(t,`link`,e),Ft(t),r.head.appendChild(t)))}}function Dm(e){Sm.D(e),Em(`dns-prefetch`,e,null)}function Om(e,t){Sm.C(e,t),Em(`preconnect`,e,t)}function km(e,t,n){Sm.L(e,t,n);var r=Tm;if(r&&e&&t){var i=`link[rel="preload"][as="`+nn(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+nn(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+nn(n.imageSizes)+`"]`)):i+=`[href="`+nn(e)+`"]`;var a=i;switch(t){case`style`:a=Fm(e);break;case`script`:a=zm(e)}if(!(ym.has(a)||(e=D({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),ym.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Im(a))||t===`script`&&r.querySelector(Bm(a))))){var o=r.createElement(`link`);ap(o,`link`,e),t===`style`&&(o[At]=!0,o.onload=o.onerror=function(){It(o)}),Ft(o),r.head.appendChild(o)}}}function Am(e,t){Sm.m(e,t);var n=Tm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+nn(r)+`"][href="`+nn(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=zm(e)}if(!ym.has(a)&&(e=D({rel:`modulepreload`,href:e},t),ym.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Bm(a)))return}r=n.createElement(`link`),ap(r,`link`,e),Ft(r),n.head.appendChild(r)}}}function jm(e,t,n){Sm.S(e,t,n);var r=Tm;if(r&&e){var i=Pt(r).hoistableStyles,a=Fm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Im(a)))s.loading=5;else{e=D({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=ym.get(a))&&Um(e,n);var c=o=r.createElement(`link`);Ft(c),ap(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Hm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Mm(e,t){Sm.X(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Nm(e,t){Sm.M(e,t);var n=Tm;if(n&&e){var r=Pt(n).hoistableScripts,i=zm(e),a=r.get(i);a||(a=n.querySelector(Bm(i)),a||(e=D({src:e,async:!0,type:`module`},t),(t=ym.get(i))&&Wm(e,t),a=n.createElement(`script`),Ft(a),ap(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Pm(e,t,n,r){var a=(a=Ce.current)?xm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Fm(n.href),t=Pt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Fm(n.href);var o=Pt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Im(e)))?o._p||(s.instance=o,s.state.loading=5):(o=ym.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},ym.set(e,o)),Rm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=zm(n),t=Pt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Fm(e){return`href="`+nn(e)+`"`}function Im(e){return`link[rel="stylesheet"][`+e+`]`}function Lm(e){return D({},e,{"data-precedence":e.precedence,precedence:null})}function Rm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[At]){r.loading=1;return}}else t=e.createElement(`link`),t[At]=!0,t.onload=t.onerror=It.bind(null,t),ap(t,`link`,n),Ft(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function zm(e){return`[src="`+nn(e)+`"]`}function Bm(e){return`script[async]`+e}function Vm(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+nn(n.href)+`"]`);if(r)return t.instance=r,Ft(r),r;var a=D({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Ft(r),ap(r,`style`,a),Hm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Fm(n.href);var o=e.querySelector(Im(a));if(o)return t.state.loading|=4,t.instance=o,Ft(o),o;r=Lm(n),(a=ym.get(a))&&Um(r,a),o=(e.ownerDocument||e).createElement(`link`),Ft(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),ap(o,`link`,r),t.state.loading|=4,Hm(o,n.precedence,e),t.instance=o;case`script`:return o=zm(n.src),(a=e.querySelector(Bm(o)))?(t.instance=a,Ft(a),a):(r=n,(a=ym.get(o))&&(r=D({},n),Wm(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Ft(a),ap(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Hm(r,n.precedence,e));return t.instance}function Hm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Um(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Wm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var Gm=null;function Km(e,t,n){if(Gm===null){var r=new Map,i=Gm=new Map;i.set(n,r)}else i=Gm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[kt]||a[St]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function qm(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function $(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Jm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Ym(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function Xm(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function Zm(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=Xm(t),e.suspenseyImages.push(t)),e=rh.bind(e),t.decode().then(e,e))}function Qm(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Fm(r.href),a=t.querySelector(Im(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=nh.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Ft(a);return}a=t.ownerDocument||t,r=Lm(r),(i=ym.get(i))&&Um(r,i),a=a.createElement(`link`),Ft(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),ap(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=nh.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var $m=0;function eh(e,t){return e.stylesheets&&e.count===0&&ah(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&$m===0&&($m=62500*Z());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ah(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>$m?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function th(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ah(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function nh(){this.count--,th(this)}function rh(){this.imgCount--,th(this)}var ih=null;function ah(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ih=new Map,t.forEach(oh,e),ih=null,nh.call(e))}function oh(e,t){if(!(t.state.loading&4)){var n=ih.get(e);if(n)var r=n.get(null);else{n=new Map,ih.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=nh.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var sh={$$typeof:P,Provider:null,Consumer:null,_currentValue:he,_currentValue2:he,_threadCount:0};function ch(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=dt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=dt(0),this.hiddenUpdates=dt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function lh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new ch(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=Oi(3,null,null,t),e.current=a,a.stateNode=e,t=Oa(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},uo(a),e}function uh(e){return e?(e=Ei,e):Ei}function dh(e,t,n,r,i,a){i=uh(i),r.context===null?r.context=i:r.pendingContext=i,r=po(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=mo(e,r,t),n!==null&&(Id(n,e,t),ho(n,e,t))}function fh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function ph(e,t){fh(e,t),(e=e.alternate)&&fh(e,t)}function mh(e){if(e.tag===13||e.tag===31){var t=Ci(e,67108864);t!==null&&Id(t,e,67108864),ph(e,67108864)}}function hh(e){if(e.tag===13||e.tag===31){var t=Nd();t=_t(t);var n=Ci(e,t);n!==null&&Id(n,e,t),ph(e,t)}}var gh=!0;function _h(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=2,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function vh(e,t,n,r){var i=I.T;I.T=null;var a=L.p;try{L.p=8,yh(e,t,n,r)}finally{L.p=a,I.T=i}}function yh(e,t,n,r){if(gh){var i=bh(r);if(i===null)Jf(e,t,r,xh,n),Mh(e,r);else if(Ph(i,e,t,n,r))r.stopPropagation();else if(Mh(e,r),t&4&&-1<jh.indexOf(e)){for(;i!==null;){var a=Mt(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=at(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-$e(o);s.entanglements[1]|=c,o&=~c}kf(a),!(ed&6)&&(yd=Ve()+500,Af(0,!1))}}break;case 31:case 13:s=Ci(a,2),s!==null&&Id(s,a,2),Vd(),ph(a,2)}if(a=bh(r),a===null&&Jf(e,t,r,xh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Jf(e,t,r,null,n)}}function bh(e){return e=yn(e),Sh(e)}var xh=null;function Sh(e){if(xh=null,e=jt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=c(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return xh=e,null}function Ch(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(He()){case Ue:return 2;case We:return 8;case Ge:case Ke:return 32;case qe:return 268435456;default:return 32}default:return 32}}var wh=!1,Th=null,Eh=null,Dh=null,Oh=new Map,kh=new Map,Ah=[],jh=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Mh(e,t){switch(e){case`focusin`:case`focusout`:Th=null;break;case`dragenter`:case`dragleave`:Eh=null;break;case`mouseover`:case`mouseout`:Dh=null;break;case`pointerover`:case`pointerout`:Oh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:kh.delete(t.pointerId)}}function Nh(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=Mt(t),t!==null&&mh(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Ph(e,t,n,r,i){switch(t){case`focusin`:return Th=Nh(Th,e,t,n,r,i),!0;case`dragenter`:return Eh=Nh(Eh,e,t,n,r,i),!0;case`mouseover`:return Dh=Nh(Dh,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return Oh.set(a,Nh(Oh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,kh.set(a,Nh(kh.get(a)||null,e,t,n,r,i)),!0}return!1}function Fh(e){var t=jt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(n)});return}}else if(t===31){if(t=c(n),t!==null){e.blockedOn=t,bt(e.priority,function(){hh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Ih(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=bh(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);vn=r,n.target.dispatchEvent(r),vn=null}else return t=Mt(n),t!==null&&mh(t),e.blockedOn=n,!1;t.shift()}return!0}function Lh(e,t,n){Ih(e)&&n.delete(t)}function Rh(){wh=!1,Th!==null&&Ih(Th)&&(Th=null),Eh!==null&&Ih(Eh)&&(Eh=null),Dh!==null&&Ih(Dh)&&(Dh=null),Oh.forEach(Lh),kh.forEach(Lh)}function zh(e,n){e.blockedOn===n&&(e.blockedOn=null,wh||(wh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Rh)))}var Bh=null;function Vh(e){Bh!==e&&(Bh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Bh===e&&(Bh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Sh(r||n)===null)continue;break}var a=Mt(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Hh(e){function t(t){return zh(t,e)}Th!==null&&zh(Th,e),Eh!==null&&zh(Eh,e),Dh!==null&&zh(Dh,e),Oh.forEach(t),kh.forEach(t);for(var n=0;n<Ah.length;n++){var r=Ah[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Ah.length&&(n=Ah[0],n.blockedOn===null);)Fh(n),n.blockedOn===null&&Ah.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[Ct]||null;if(typeof a==`function`)o||Vh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Ct]||null)s=o.formAction;else if(Sh(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Vh(n)}}}function Uh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function Wh(e){this._internalRoot=e}Gh.prototype.render=Wh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;dh(n,Nd(),e,t,null,null)},Gh.prototype.unmount=Wh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;dh(e.current,2,null,e,null,null),Vd(),t[wt]=null}};function Gh(e){this._internalRoot=e}Gh.prototype.unstable_scheduleHydration=function(e){if(e){var t=yt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Ah.length&&t!==0&&t<Ah[n].priority;n++);Ah.splice(n,0,e),n===0&&Fh(e)}};var Kh=n.version;if(Kh!==`19.3.1`)throw Error(i(527,Kh,`19.3.1`));L.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=u(t),e=e===null?null:d(e),e=e===null?null:e.stateNode,e};var qh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:I,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Jh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Jh.isDisabled&&Jh.supportsFiber)try{Xe=Jh.inject(qh),Ze=Jh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=lh(e,1,!1,null,null,n,r,null,o,s,c,Uh),e[wt]=t.current,qf(e),new Wh(t)},e.hydrateRoot=function(e,t,n){if(!a(e))throw Error(i(299));var r=!1,o=``,s=xc,c=Sc,l=Cc,u=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(c=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(u=n.formState)),t=lh(e,1,!0,t,n??null,r,o,u,s,c,l,Uh),t.context=uh(null),n=t.current,r=Nd(),r=_t(r),o=po(r),o.callback=null,mo(n,o,r),n=r,t.current.lanes=n,ft(t,n),kf(t),e[wt]=t.current,qf(e),new Gh(t)}})),v=s(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=_()})),y=m(),b=v(),x=e=>e.attrs?.bind??`@${e.id}`,S=1e6,C=1e4,w=1e5,T=1e4,E=1e5,D=2e3,O=2e4,k=2e6,A=1e3,j=2e3,M=1e4;function N(e){if(e.length>254||/\s/.test(e))return!1;let t=e.indexOf(`@`);if(t<1||t!==e.lastIndexOf(`@`))return!1;let n=e.lastIndexOf(`.`);return n>t+1&&n<e.length-1}var ee=class extends Error{code;constructor(e,t){super(t),this.name=`LocalFunctionError`,this.code=e}},P=[`en-US`,`zh-CN`,`de-DE`,`fr-FR`,`ja-JP`],te=new Set(P),F=/^[A-Z]{3}$/,ne=20;function re(e){throw new ee(`expression-domain`,e)}function ie(e,t){if(e.length>1e5)throw new ee(`expression-budget`,`${t} exceeds the ${w}-character limit.`);return e}function ae(e){return te.has(e)||re(`Unsupported locale "${e}"; expected one of ${P.join(`, `)}.`),e}function oe(e,t){return(!Number.isInteger(e)||e<0||e>ne)&&re(`${t} digits must be an integer from 0 to ${ne}.`),e}function se(e){if(!Number.isFinite(e))throw new ee(`expression-number`,`Value must be a finite number.`);return e}function ce(e){return e===0?0:e}function le(e,t){let n=se(e);return n===0||Math.abs(n)<.5*10**-t?0:n}function ue(e,t){let n=se(e);return n===0||Math.abs(n)<.5*10**-(t+2)?0:n}function de(e,t,n,r,i){let a;try{a=new Intl.NumberFormat(e,t)}catch{a=void 0}return a===void 0&&re(i),ie(a.format(n),r)}function fe(e,t=2,n=`en-US`,r=!0){let i=ae(n),a=oe(t,`formatNumber`);return typeof r!=`boolean`&&re(`formatNumber grouping must be a boolean.`),e===null?``:de(i,{useGrouping:r,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},le(e,a),`Formatted number`,`Cannot format a number for locale "${i}".`)}function pe(e,t=0,n=`en-US`){let r=ae(n),i=oe(t,`formatPercent`);return e===null?``:de(r,{style:`percent`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},ue(e,i),`Formatted percentage`,`Cannot format a percentage for locale "${r}".`)}function me(e,t=2,n=`en-US`){let r=ae(n),i=oe(t,`formatScientific`);return e===null?``:de(r,{notation:`scientific`,minimumFractionDigits:i,maximumFractionDigits:i,roundingMode:`halfExpand`},ce(se(e)),`Formatted number`,`Cannot format a number for locale "${r}".`)}function I(e,t=`USD`,n=2,r=`en-US`){let i=ae(r);F.test(t)||re(`Currency "${t}" must be a three-letter uppercase code such as "USD".`);let a=oe(n,`formatCurrency`);return e===null?``:de(i,{style:`currency`,currency:t,minimumFractionDigits:a,maximumFractionDigits:a,roundingMode:`halfExpand`},le(e,a),`Formatted currency`,`Currency code "${t}" is not accepted by Intl.`)}function L(){throw new ee(`expression-number`,`The result is not a finite number.`)}function he(e){if(!Number.isFinite(e))throw new ee(`expression-value`,`Numeric array members must be finite numbers.`);return e}function ge(e){let t=0;for(let n of e)t+=he(n);return Number.isFinite(t)||L(),t}function _e(e){if(e.length===0)return null;let t=ge(e)/e.length;return Number.isFinite(t)||L(),t}function ve(e){if(e.length===0)return null;let t=he(e[0]);for(let n=1;n<e.length;n+=1){let r=he(e[n]);r<t&&(t=r)}return t}function ye(e){if(e.length===0)return null;let t=he(e[0]);for(let n=1;n<e.length;n+=1){let r=he(e[n]);r>t&&(t=r)}return t}function be(e){let t=/^(\d{4})-(\d{2})-(\d{2})$/.exec(e);if(!t)return null;let n=Number(t[1]),r=Number(t[2]),i=Number(t[3]);if(n<1||r<1||r>12||i<1||i>31)return null;let a=new Date(0);return a.setUTCFullYear(n,r-1,i),a.getUTCFullYear()===n&&a.getUTCMonth()===r-1&&a.getUTCDate()===i?a.getTime():null}function xe(e){throw new ee(`expression-domain`,e)}function Se(e){return ie(e.trim(),`trim result`)}function Ce(e){return ie(e.toLowerCase(),`lower result`)}function we(e){return ie(e.toUpperCase(),`upper result`)}function Te(e,t){return e.startsWith(t)}function Ee(e,t){return e.endsWith(t)}function De(e,t,n){t.length===0&&xe(`replace search text must not be empty.`);let r=n.length-t.length;if(r>0){let n=0,i=0;for(;;){let r=e.indexOf(t,i);if(r<0)break;n+=1,i=r+t.length}if(e.length+n*r>1e5)throw new ee(`expression-budget`,`replace result would exceed the ${w}-character limit.`)}let i=``,a=0;for(;;){let r=e.indexOf(t,a);if(r<0)break;i+=e.slice(a,r),i+=n,a=r+t.length}return i+=e.slice(a),ie(i,`replace result`)}function Oe(e,t){return e<0?Math.max(t+e,0):Math.min(e,t)}function ke(e,t,n){Number.isInteger(t)||xe(`slice start must be an integer.`),n!==void 0&&!Number.isInteger(n)&&xe(`slice end must be an integer.`);let r=Array.from(e),i=r.length,a=Oe(t,i),o=n===void 0?i:Oe(n,i);return o<=a?``:ie(r.slice(a,o).join(``),`slice result`)}var Ae=new Map([[`days`,864e5],[`hours`,36e5],[`minutes`,6e4],[`seconds`,1e3],[`milliseconds`,1]]),je=`days, hours, minutes, seconds or milliseconds`;function Me(e){let t=be(e);if(t===null)throw new ee(`expression-domain`,`Date "${e}" must be a valid YYYY-MM-DD calendar date in years 0001-9999.`);return t}function Ne(e,t){let n=Me(e),r=Me(t);return n===r?0:n<r?-1:1}function Pe(e,t,n=`days`){let r=Ae.get(n);return r===void 0&&xe(`dateDiff unit must be ${je}.`),(Me(e)-Me(t))/r}var Fe=16,Ie=256,Le=2e3;function Re(e){if(typeof e==`string`)return e.length>Ie?`${e.slice(0,255)}…`:e;if(typeof e==`number`)return Number.isFinite(e)?e:String(e);if(typeof e==`boolean`||e===null)return e;if(e===void 0)return``;try{let t=JSON.stringify(e)??String(e);return t.length>Ie?`${t.slice(0,255)}…`:t}catch{return String(e).slice(0,Ie)}}function ze(e){let t=Object.entries(e);if(t.length===0)return;let n={},r=0,i=0;for(let[e,a]of t){if(i>=Fe)break;if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(e))continue;let t;try{t=Re(a)}catch{t=``}let o=typeof t==`string`?t.length:String(t).length;if(r+o>Le)break;n[e]=t,r+=o,i+=1}return i>0?n:void 0}function Be(e,t){let n=t?ze(t):void 0;return n?{key:e,params:n}:{key:e}}var Ve={"local.version.unsupported":{en:`This reader accepts {supported}; migrate {declared} or use a compatible reader.`,zh:`此阅读器支持 {supported};请迁移 {declared} 或使用兼容的阅读器。`},"local.version.malformed":{en:`Use <!-- reactive-md: local-draft-2 --> on one line.`,zh:`请在单独一行使用 <!-- reactive-md: local-draft-2 -->。`},"local.version.duplicate":{en:`Only one source syntax declaration is allowed.`,zh:`源码只能声明一次语法版本。`},"local.version.placement":{en:`The syntax declaration must be on its own line before the theme and document body.`,zh:`语法版本声明必须独占一行,位于主题声明和正文之前。`},"local.upgrade.from-version":{en:`Cannot migrate from {from}: {detail}.`,zh:`无法从 {from} 迁移:{detail}。`},"local.upgrade.reserved-binding":{en:`Binding {name} becomes reserved in local-draft-2; rename it with a compatible old editor before migration.`,zh:`绑定 {name} 在 local-draft-2 中成为保留名;迁移前请用兼容旧版本的编辑器重命名。`},"local.upgrade.tag":{en:`Tag {name} was inert in local-draft-1 and becomes active in local-draft-2; preserve it as literal code before migration.`,zh:`标签 {name} 在 local-draft-1 中不执行,在 local-draft-2 中会激活;迁移前请将其保留为代码原文。`},"local.upgrade.text-length":{en:`Text length constraints change from UTF-16 units to Unicode code points; explicitly accept this semantic change before migration.`,zh:`文本长度约束从 UTF-16 单元改为 Unicode 码点计数;迁移前须明确接受这一语义变化。`},"local.upgrade.expression":{en:`This expression uses array syntax or a function introduced in local-draft-2; it is outside automatic draft-1 migration.`,zh:`此表达式使用了 local-draft-2 新增的数组语法或函数,不属于 draft-1 自动迁移范围。`},"local.upgrade.version-missing":{en:`The source has no syntax declaration; migration will pin {version}.`,zh:`源码尚未声明语法版本;迁移将固定为 {version}。`},"parse.sourceType":{en:`Document source must be a string.`,zh:`文档源必须是字符串。`},"parse.markdownFailed":{en:`Cannot parse the Markdown document.`,zh:`无法解析 Markdown 文档。`},"parse.failed":{en:`Cannot parse document: {detail}`,zh:`无法解析文档:{detail}`},"budget.document":{en:`Document exceeds the {limit}-character limit.`,zh:`文档超过 {limit} 个字符的上限。`},"budget.syntaxNodes":{en:`Syntax nodes exceed the limit of {limit}.`,zh:`语法节点数量超过上限 {limit}。`},"budget.nesting":{en:`Component nesting exceeds the {limit}-level limit.`,zh:`组件嵌套超过 {limit} 层上限。`},"options.notObject":{en:`Compile options must be an object.`,zh:`编译选项必须是对象。`},"options.limitsNotObject":{en:`Compile option limits must be an object.`,zh:`编译选项 limits 必须是对象。`},"options.maxSyntaxNodes":{en:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,zh:`编译选项 limits.maxSyntaxNodes 必须是正安全整数。`},"theme.expression":{en:`Theme names must be static text, not expressions.`,zh:`主题名称必须是静态文本,不能是表达式。`},"theme.nameRequired":{en:`A theme declaration requires a quoted name attribute.`,zh:`主题声明需要一个带引号的 name 属性。`},"theme.attributeOnly":{en:`Theme declarations only accept a quoted name attribute.`,zh:`主题声明只接受带引号的 name 属性。`},"theme.nameInvalid":{en:`Theme name "{name}" must use lowercase letters, digits and single hyphens (maximum {limit} characters).`,zh:`主题名称“{name}”只能使用小写字母、数字和单个连字符(最多 {limit} 个字符)。`},"theme.malformedMissingClose":{en:`Theme declaration is missing >.`,zh:`主题声明缺少 >。`},"theme.malformedClosing":{en:`A theme declaration cannot be a closing tag.`,zh:`主题声明不能是结束标签。`},"theme.malformedStandalone":{en:`A theme declaration must be on its own line before the document content.`,zh:`主题声明必须单独占一行并位于文档内容之前。`},"theme.duplicateDeclaration":{en:`Only one theme declaration is allowed before the document content; this declaration is ignored.`,zh:`文档内容之前只允许一个主题声明;此声明将被忽略。`},"theme.late":{en:`Theme declarations after document content are ignored.`,zh:`文档内容之后的主题声明将被忽略。`},"theme.nested":{en:`Theme declarations inside document content are ignored.`,zh:`文档内容内部的主题声明将被忽略。`},"theme.invalidDeclaration":{en:`Invalid theme declaration.`,zh:`无效的主题声明。`},"attribute.lowercase":{en:`Attribute names must use lowercase kebab-case.`,zh:`属性名必须使用小写 kebab-case。`},"budget.attributeName":{en:`Attribute name exceeds the {limit}-character limit.`,zh:`属性名超过 {limit} 个字符的上限。`},"attribute.nameInvalid":{en:`Attribute name {name} must use lowercase kebab-case.`,zh:`属性名 {name} 必须使用小写 kebab-case。`},"attribute.valueQuoted":{en:`Attribute {name} value must be quoted.`,zh:`属性 {name} 的值必须加引号。`},"attribute.valueUnclosed":{en:`Attribute {name} is missing a closing quote.`,zh:`属性 {name} 缺少结束引号。`},"attribute.duplicate":{en:`Duplicate attribute {name}.`,zh:`重复的属性 {name}。`},"attribute.separator":{en:`Attributes must be separated by whitespace.`,zh:`属性之间必须用空白分隔。`},"budget.tagName":{en:`Tag name exceeds the {limit}-character limit.`,zh:`标签名超过 {limit} 个字符的上限。`},"tag.missingClose":{en:`Tag {name} is missing >.`,zh:`标签 {name} 缺少 >。`},"tag.closingAttributes":{en:`Closing tag </{name}> cannot have attributes.`,zh:`结束标签 </{name}> 不能带属性。`},"tag.nameInvalid":{en:`Tag name {name} must use lowercase kebab-case.`,zh:`标签名 {name} 必须使用小写 kebab-case。`},"tag.unclosedPaired":{en:`<{name}> is missing </{name}>.`,zh:`<{name}> 缺少 </{name}>。`},"tag.mismatchRoot":{en:`Closing tag </{name}> does not match the document root.`,zh:`结束标签 </{name}> 与文档根不匹配。`},"tag.mismatchParent":{en:`Closing tag </{name}> does not match <{parent}>.`,zh:`结束标签 </{name}> 与 <{parent}> 不匹配。`},"tag.requiresClose":{en:`<{name}> requires a closing tag.`,zh:`<{name}> 需要结束标签。`},"footnote.unsupported":{en:`Footnotes are not part of the local interaction syntax and are shown as source.`,zh:`脚注不属于本地交互语法,将按源文本显示。`},"interpolation.unclosed":{en:`Interpolation is missing }}.`,zh:`插值缺少 }}。`},"math.unclosed":{en:`Formula is missing its closing delimiter.`,zh:`公式缺少结束定界符。`},"math.whitespace":{en:`Inline math cannot start or end with whitespace.`,zh:`行内公式不能以空白开头或结尾。`},"budget.math":{en:`Formula exceeds the {limit}-character limit.`,zh:`公式超过 {limit} 个字符的上限。`},"html.raw":{en:`Raw HTML is not part of the local interaction syntax.`,zh:`原始 HTML 不属于本地交互语法。`},"component.unknownSuggestion":{en:`Unknown component <{name}>. Did you mean <{suggestion}>?`,zh:`未知组件 <{name}>。是否想使用 <{suggestion}>?`},"component.unknownPlain":{en:`Unknown component <{name}>. This mode only accepts local interaction components.`,zh:`未知组件 <{name}>。此模式只接受本地交互组件。`},"legacy.fence":{en:`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,zh:`旧版 reactive-md 配置围栏(state/data/computed/actions 等)不属于本地交互语法;请在宿主中显式选择旧版模式。`},"attribute.unknownSuggestion":{en:`Component <{component}> does not support attribute {name}. Did you mean {suggestion}?`,zh:`组件 <{component}> 不支持属性 {name}。是否想使用 {suggestion}?`},"attribute.unknownPlain":{en:`Component <{component}> does not support attribute {name}.`,zh:`组件 <{component}> 不支持属性 {name}。`},"budget.attribute":{en:`Attribute {name} on component <{component}> exceeds the {limit}-character limit.`,zh:`组件 <{component}> 的属性 {name} 超过 {limit} 个字符的上限。`},"attribute.color":{en:`Attribute {name} on component <{component}> must be a standard CSS named color or #RGB/#RRGGBB, got "{value}".`,zh:`组件 <{component}> 的属性 {name} 必须是标准 CSS 命名颜色或 #RGB/#RRGGBB,当前为“{value}”。`},"attribute.required":{en:`Component <{component}> is missing required attribute {name}.`,zh:`组件 <{component}> 缺少必需属性 {name}。`},"label.requiredMissing":{en:`Component <{name}> requires a label.`,zh:`组件 <{name}> 需要 label。`},"label.requiredEmpty":{en:`Component <{name}> label cannot be empty.`,zh:`组件 <{name}> 的 label 不能为空。`},"attribute.static":{en:`Attribute {name} is static and cannot contain interpolations.`,zh:`属性 {name} 是静态的,不能包含插值。`},"expression.emptyAttribute":{en:`Attribute {name} interpolation cannot be empty.`,zh:`属性 {name} 的插值不能为空。`},"expression.emptyInterpolation":{en:`Interpolation expression cannot be empty.`,zh:`插值表达式不能为空。`},"attribute.numberInvalid":{en:`Attribute {name} requires a number, got "{value}".`,zh:`属性 {name} 需要数字,当前为“{value}”。`},"attribute.numberInterpolationInvalid":{en:`Attribute {name} requires a number or a full number interpolation, got "{value}".`,zh:`属性 {name} 需要数字或完整的数字插值,当前为“{value}”。`},"attribute.integer":{en:`Attribute {name} requires an integer.`,zh:`属性 {name} 需要整数。`},"attribute.positive":{en:`Attribute {name} requires a positive number.`,zh:`属性 {name} 需要正数。`},"attribute.rangeMin":{en:`Attribute {name} must be at least {min}.`,zh:`属性 {name} 必须至少为 {min}。`},"attribute.rangeMax":{en:`Attribute {name} must be at most {max}.`,zh:`属性 {name} 必须至多为 {max}。`},"attribute.booleanInvalid":{en:`Attribute {name} requires true or false.`,zh:`属性 {name} 需要 true 或 false。`},"attribute.booleanInterpolationInvalid":{en:`Attribute {name} requires true or false, or a full boolean interpolation.`,zh:`属性 {name} 需要 true 或 false,或完整的布尔插值。`},"attribute.enumInvalid":{en:`Attribute {name} must be one of {values}, got "{value}".`,zh:`属性 {name} 必须是 {values} 之一,当前为“{value}”。`},"attribute.dateLower":{en:`Date lower bound {value} is not a valid YYYY-MM-DD.`,zh:`日期下界 {value} 不是有效的 YYYY-MM-DD。`},"attribute.dateUpper":{en:`Date upper bound {value} is not a valid YYYY-MM-DD.`,zh:`日期上界 {value} 不是有效的 YYYY-MM-DD。`},"constraint.componentMinMax":{en:`Component <{name}> min cannot exceed max.`,zh:`组件 <{name}> 的 min 不能大于 max。`},"constraint.componentStep":{en:`Component <{name}> step must be greater than 0.`,zh:`组件 <{name}> 的 step 必须大于 0。`},"constraint.lengthRange":{en:`max-length cannot be less than min-length.`,zh:`max-length 不能小于 min-length。`},"constraint.dateOrder":{en:`Date min cannot be later than max.`,zh:`日期 min 不能晚于 max。`},"constraint.progressRange":{en:`progress value must be between 0 and {max}, got {value}.`,zh:`progress 的 value 必须在 0 到 {max} 之间,当前为 {value}。`},"constraint.plotRange":{en:`plot min must be less than max.`,zh:`plot 的 min 必须小于 max。`},"constraint.timerDuration":{en:`timer duration must be a positive whole number of seconds.`,zh:`timer 的 duration 必须是正整数秒。`},"constraint.rangeSliderOrder":{en:`range-slider min cannot exceed max.`,zh:`range-slider 的 min 不能大于 max。`},"constraint.rangeSliderStep":{en:`range-slider step must be a finite positive number.`,zh:`range-slider 的 step 必须是有限正数。`},"constraint.coordinateOrder":{en:`coordinate {axis}-min cannot exceed {axis}-max.`,zh:`coordinate 的 {axis}-min 不能大于 {axis}-max。`},"constraint.coordinateStep":{en:`coordinate step must be a finite positive number.`,zh:`coordinate 的 step 必须是有限正数。`},"constraint.multiSelectMax":{en:`multi-select max-selected must be a nonnegative whole number.`,zh:`multi-select 的 max-selected 必须是非负整数。`},"constraint.quizTolerance":{en:`<quiz> tolerance must be a nonnegative finite number.`,zh:`<quiz> 的 tolerance 必须是非负有限数。`},"selection.keyNeedsKey":{en:`<{component}> {name} requires a key attribute naming the selection column.`,zh:`<{component}> 的 {name} 需要 key 属性来指定选择列。`},"structure.parent":{en:`<{name}> can only appear directly inside {parents}.`,zh:`<{name}> 只能直接位于 {parents} 内。`},"structure.noBody":{en:`<{name}> does not accept body content.`,zh:`<{name}> 不接受正文内容。`},"structure.inlineOnly":{en:`<{name}> only accepts inline Markdown.`,zh:`<{name}> 只接受行内 Markdown。`},"structure.noNestedComponents":{en:`The body of <{name}> cannot contain other interactive components.`,zh:`<{name}> 的正文不能包含其他交互组件。`},"structure.accordionNeedsDisclosure":{en:`<accordion> requires at least one <disclosure>.`,zh:`<accordion> 至少需要一个 <disclosure>。`},"structure.accordionOnly":{en:`<accordion> can only contain <disclosure>.`,zh:`<accordion> 只能包含 <disclosure>。`},"structure.gridNeedsCard":{en:`<grid> requires at least one <card>.`,zh:`<grid> 至少需要一个 <card>。`},"structure.gridOnlyCard":{en:`Direct children of <grid> must be <card>.`,zh:`<grid> 的直接子元素必须是 <card>。`},"structure.exactlyOneTable":{en:`The body of <{name}> must be exactly one Markdown table.`,zh:`<{name}> 的正文必须恰好是一个 Markdown 表格。`},"structure.plotNeedsFormula":{en:`<plot> requires at least one $$...$$ formula block.`,zh:`<plot> 至少需要一个 $$...$$ 公式块。`},"structure.plotOnlyFormulas":{en:`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,zh:`<plot> 的正文只能包含空行和 $$...$$ 公式块。`},"structure.nodeNoComponents":{en:`The description of <node> cannot contain interactive components.`,zh:`<node> 的描述不能包含交互组件。`},"structure.optionsNeeded":{en:`<{name}> requires at least one <option value="...">.`,zh:`<{name}> 至少需要一个 <option value="...">。`},"structure.optionsOnly":{en:`<{name}> can only contain <option>.`,zh:`<{name}> 只能包含 <option>。`},"budget.options":{en:`<{name}> options exceed the limit of {limit}.`,zh:`<{name}> 的选项数量超过上限 {limit}。`},"option.valueRequired":{en:`<option> requires a non-empty value.`,zh:`<option> 需要非空 value。`},"option.valueComma":{en:`<multi-select> option values cannot contain commas: "{value}".`,zh:`<multi-select> 的选项值不能包含逗号:“{value}”。`},"option.valueDuplicate":{en:`Option values in <{name}> must be unique; duplicate value "{value}".`,zh:`<{name}> 的选项值必须唯一;重复值“{value}”。`},"structure.optionNoComponents":{en:`The body of <option> cannot contain interactive components.`,zh:`<option> 的正文不能包含交互组件。`},"structure.tabsNeedsTab":{en:`<tabs> requires at least one <tab>.`,zh:`<tabs> 至少需要一个 <tab>。`},"structure.tabsOnly":{en:`<tabs> can only contain <tab>.`,zh:`<tabs> 只能包含 <tab>。`},"tab.valueDuplicate":{en:`Tab values in <tabs> must be unique; duplicate value "{value}".`,zh:`<tabs> 的标签值必须唯一;重复值“{value}”。`},"structure.stepsNeedsStep":{en:`<steps> requires at least one <step>.`,zh:`<steps> 至少需要一个 <step>。`},"structure.stepsOnly":{en:`<steps> can only contain <step>.`,zh:`<steps> 只能包含 <step>。`},"step.valueDuplicate":{en:`Step values in <steps> must be unique; duplicate value "{value}".`,zh:`<steps> 的步骤值必须唯一;重复值“{value}”。`},"quiz.answerRequired":{en:`<quiz> requires a non-empty answer.`,zh:`<quiz> 需要非空 answer。`},"structure.quizNumericNoBody":{en:`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,zh:`数值型 <quiz> 不能有正文内容;基于选项的测验请使用 type="choice"。`},"quiz.answerNumeric":{en:`A numeric <quiz> answer must be a finite number.`,zh:`数值型 <quiz> 的 answer 必须是有限数字。`},"quiz.answerNotOption":{en:`<quiz> answer "{answer}" is not one of the option values: {options}.`,zh:`<quiz> 的 answer“{answer}”不在选项值中:{options}。`},"diagram.needsNode":{en:`<diagram> requires at least one <node>.`,zh:`<diagram> 至少需要一个 <node>。`},"structure.diagramOnly":{en:`<diagram> can only contain <node> and <edge>.`,zh:`<diagram> 只能包含 <node> 和 <edge>。`},"diagram.nodeInvalid":{en:`Node ID "{id}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,zh:`节点 ID“{id}”只能包含字母、数字、下划线和连字符,且不能以数字开头。`},"diagram.nodeDuplicate":{en:`Duplicate node ID "{id}".`,zh:`重复的节点 ID“{id}”。`},"diagram.edgeFromUnknown":{en:`Edge from references unknown node "{id}".`,zh:`连线起点引用了未知节点“{id}”。`},"diagram.edgeToUnknown":{en:`Edge to references unknown node "{id}".`,zh:`连线终点引用了未知节点“{id}”。`},"diagram.edgeDuplicate":{en:`Duplicate edge: {from} → {to}{label}.`,zh:`重复的连线:{from} → {to}{label}。`},"checklist.bodySingle":{en:`The body of <checklist> must be exactly one single-level Markdown task list.`,zh:`<checklist> 的正文必须恰好是一个单层 Markdown 任务列表。`},"checklist.needsItem":{en:`<checklist> requires at least one task list item.`,zh:`<checklist> 至少需要一个任务列表项。`},"budget.checklistItems":{en:`<checklist> items exceed the limit of {limit}.`,zh:`<checklist> 的任务项数量超过上限 {limit}。`},"checklist.taskOnly":{en:`<checklist> can only contain task list items (- [ ] / - [x]).`,zh:`<checklist> 只能包含任务列表项(- [ ] / - [x])。`},"checklist.noNested":{en:`<checklist> does not support nested lists.`,zh:`<checklist> 不支持嵌套列表。`},"checklist.noComponents":{en:`<checklist> items cannot contain interactive components.`,zh:`<checklist> 的任务项不能包含交互组件。`},"budget.identifier":{en:`Parameter name exceeds the {limit}-character limit.`,zh:`参数名超过 {limit} 个字符的上限。`},"binding.nameInvalid":{en:`Parameter name "{name}" must match [A-Za-z_][A-Za-z0-9_]*.`,zh:`参数名“{name}”必须匹配 [A-Za-z_][A-Za-z0-9_]*。`},"binding.reserved":{en:`Parameter name "{name}" is reserved; choose another name.`,zh:`参数名“{name}”是保留名称;请换一个名称。`},"binding.typeConflict":{en:`Parameter "{key}" is already declared as {kind} by <{first}> and cannot also bind <{second}>.`,zh:`参数“{key}”已由 <{first}> 声明为 {kind},不能再绑定 <{second}>。`},"binding.exclusive":{en:`Parameter "{key}" of <{first}> can only be owned by one component and cannot be shared with <{second}>.`,zh:`<{first}> 的参数“{key}”只能由一个组件拥有,不能与 <{second}> 共享。`},"binding.slotExclusive":{en:`Parameter "{key}" of the {slot} slot of <{name}> is exclusive and cannot be shared with another control.`,zh:`<{name}> 的 {slot} 槽参数“{key}”是独占的,不能与另一个控件共享。`},"binding.constraintConflict":{en:`Parameter "{key}" must use the same numeric range and step: <{first}> has {firstConstraints}, <{second}> has {secondConstraints}.`,zh:`参数“{key}”必须使用相同的数值范围和步长:<{first}> 为 {firstConstraints},<{second}> 为 {secondConstraints}。`},"binding.optionConflict":{en:`Parameter "{key}" must use the same option set in the same order.`,zh:`参数“{key}”必须使用相同顺序的同一组选项。`},"initial.duplicate":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total).`,zh:`参数“{key}”有多个显式初值(共 {count} 个)。`},"initial.duplicatePeers":{en:`Parameter "{key}" has multiple explicit initial values ({count} in total; see also line {lines}).`,zh:`参数“{key}”有多个显式初值(共 {count} 个;另见第 {lines} 行)。`},"initial.rangeNoStep":{en:`Parameter "{key}" has no valid step value within range [{min}, {max}].`,zh:`参数“{key}”在范围 [{min}, {max}] 内没有有效的步长值。`},"initial.cannotDerive":{en:`Cannot derive a default initial value for <{name}> parameter "{key}".`,zh:`无法为 <{name}> 的参数“{key}”推导默认初值。`},"initial.typeFiniteNumber":{en:`Initial value of parameter "{key}" must be a finite number.`,zh:`参数“{key}”的初值必须是有限数字。`},"initial.belowMin":{en:`Initial value {value} of parameter "{key}" is below the minimum {min}.`,zh:`参数“{key}”的初值 {value} 小于最小值 {min}。`},"initial.aboveMax":{en:`Initial value {value} of parameter "{key}" exceeds the maximum {max}.`,zh:`参数“{key}”的初值 {value} 超过最大值 {max}。`},"initial.offStep":{en:`Initial value {value} of parameter "{key}" is not on step {step} (based at {base}).`,zh:`参数“{key}”的初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.typeBoolean":{en:`Initial value of parameter "{key}" must be a boolean.`,zh:`参数“{key}”的初值必须是布尔值。`},"initial.notAmongOptions":{en:`Initial value "{value}" of parameter "{key}" is not among the available values {options}.`,zh:`参数“{key}”的初值“{value}”不在可用值 {options} 中。`},"initial.typeWrong":{en:`Initial value of parameter "{name}" has the wrong type.`,zh:`参数“{name}”的初值类型不正确。`},"initial.dateInvalid":{en:`Initial date "{value}" is not a valid YYYY-MM-DD.`,zh:`初值日期“{value}”不是有效的 YYYY-MM-DD。`},"initial.notAvailableOption":{en:`Initial value "{value}" is not an available option: {options}.`,zh:`初值“{value}”不是可用选项:{options}。`},"initial.multiSelectOption":{en:`Initial value "{value}" of parameter "{key}" is not an option of <multi-select>.`,zh:`参数“{key}”的初值“{value}”不是 <multi-select> 的选项。`},"initial.rangeSliderOrder":{en:`<range-slider> start {start} cannot be greater than end {end}.`,zh:`<range-slider> 的 start {start} 不能大于 end {end}。`},"initial.slotBelowMin":{en:`Initial value {value} of <{name}> {slot} is below the minimum {min}.`,zh:`<{name}> 的 {slot} 初值 {value} 小于最小值 {min}。`},"initial.slotAboveMax":{en:`Initial value {value} of <{name}> {slot} exceeds the maximum {max}.`,zh:`<{name}> 的 {slot} 初值 {value} 超过最大值 {max}。`},"initial.slotOffStep":{en:`Initial value {value} of <{name}> {slot} is not on step {step} (based at {base}).`,zh:`<{name}> 的 {slot} 初值 {value} 不在步长 {step} 上(基准 {base})。`},"initial.lengthBelow":{en:`Initial value of parameter "{key}" has length {length}, below the minimum length {min} required by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},小于 <{name}> 要求的最小长度 {min}。`},"initial.lengthAbove":{en:`Initial value of parameter "{key}" has length {length}, exceeding the maximum length {max} allowed by <{name}>.`,zh:`参数“{key}”的初值长度为 {length},超过 <{name}> 允许的最大长度 {max}。`},"initial.email":{en:`Initial value of parameter "{key}" is not a valid email address.`,zh:`参数“{key}”的初值不是有效的电子邮件地址。`},"initial.dateBelow":{en:`Initial value {value} of parameter "{key}" is earlier than the minimum date {min} of <date>.`,zh:`参数“{key}”的初值 {value} 早于 <date> 的最小日期 {min}。`},"initial.dateAbove":{en:`Initial value {value} of parameter "{key}" is later than the maximum date {max} of <date>.`,zh:`参数“{key}”的初值 {value} 晚于 <date> 的最大日期 {max}。`},"initial.multiSelectExceeds":{en:`Initial values of <multi-select> exceed max-selected {max}.`,zh:`<multi-select> 的初值数量超过 max-selected {max}。`},"expression.error":{en:`Expression error: {detail}`,zh:`表达式错误:{detail}`},"binding.unknownSuggestion":{en:`Reference to undeclared parameter {name}. Did you mean {suggestion}?`,zh:`引用了未声明的参数 {name}。是否想使用 {suggestion}?`},"binding.unknownPlain":{en:`Reference to undeclared parameter {name}.`,zh:`引用了未声明的参数 {name}。`},"type.number":{en:`Expected a number here, but the expression evaluates to {kind}.`,zh:`此处需要数字,但表达式结果为 {kind}。`},"type.boolean":{en:`Expected a boolean here, but the expression evaluates to {kind}.`,zh:`此处需要布尔值,但表达式结果为 {kind}。`},"type.string":{en:`Expected a string here, but the expression evaluates to {kind}.`,zh:`此处需要字符串,但表达式结果为 {kind}。`},"type.arrayNoDisplay":{en:`Arrays cannot be displayed directly; convert them first with a function such as len.`,zh:`数组不能直接显示;请先用 len 等函数转换。`},"attribute.whenInterpolation":{en:`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,zh:`if 的 when 属性必须是完整的布尔插值,例如 when="{{ seats >= 5 }}"。`},"anchor.idInvalid":{en:`Anchor id "{id}" must match [A-Za-z_][A-Za-z0-9_-]*.`,zh:`锚点 id“{id}”必须匹配 [A-Za-z_][A-Za-z0-9_-]*。`},"anchor.duplicate":{en:`Duplicate anchor id "{id}".`,zh:`重复的锚点 id“{id}”。`},"anchor.headingCollision":{en:`Anchor id "{id}" collides with an automatic heading target.`,zh:`锚点 id“{id}”与自动标题目标冲突。`},"jump.empty":{en:`<jump> target cannot be empty.`,zh:`<jump> 的目标不能为空。`},"jump.badTarget":{en:`<jump> target "{target}" must be a bare heading slug or anchor id without "#" or whitespace.`,zh:`<jump> 的目标“{target}”必须是不含“#”或空白的标题 slug 或锚点 id。`},"jump.unresolved":{en:`<jump> target "{target}" does not resolve to a heading or explicit anchor in this document.`,zh:`<jump> 的目标“{target}”无法解析到本文档中的标题或显式锚点。`},"budget.plotCurves":{en:`<plot> supports at most {limit} curves, but has {count}.`,zh:`<plot> 最多支持 {limit} 条曲线,当前有 {count} 条。`},"budget.plotPoints":{en:`The document's total plot sample count exceeds the limit of {limit}.`,zh:`文档的绘图采样点总数超过上限 {limit}。`},"math.formulaShape":{en:`<plot> formulas must be written explicitly as y = expression.`,zh:`<plot> 的公式必须显式写成 y = expression。`},"math.computeFailed":{en:`Cannot compute plot formula: {detail}`,zh:`无法计算绘图公式(错误代码 {code}):{detail}`},"math.bindingUnknown":{en:`Plot formula references undeclared parameter "{name}".`,zh:`绘图公式引用了未声明的参数“{name}”。`},"math.bindingType":{en:`Plot parameter "{name}" must be a number, but is {kind}.`,zh:`绘图参数“{name}”必须是数字,但当前为 {kind}。`},"table.missingHeader":{en:`The table for <{name}> is missing a header.`,zh:`<{name}> 的表格缺少表头。`},"table.headerInterpolation":{en:`Table headers cannot contain interpolations.`,zh:`表格表头不能包含插值。`},"table.headerEmpty":{en:`Table headers cannot be empty.`,zh:`表格表头不能为空。`},"table.headerDuplicate":{en:`Duplicate table header "{name}".`,zh:`重复的表格表头“{name}”。`},"table.rowColumnMismatch":{en:`Table row has a different column count: header has {header} columns, this row has {row}.`,zh:`表格行的列数不一致:表头有 {header} 列,此行有 {row} 列。`},"chart.numericExpression":{en:`Chart column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`图表列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"timeline.numericExpression":{en:`Timeline column "{name}" requires a number in row {row}, but the expression evaluates to {kind}.`,zh:`时间线列“{name}”第 {row} 行需要数字,但表达式结果为 {kind}。`},"chart.numericPlain":{en:`Chart column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`图表列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"timeline.numericPlain":{en:`Timeline column "{name}" requires a plain number in row {row}, got "{value}".`,zh:`时间线列“{name}”第 {row} 行需要普通数字,当前为“{value}”。`},"selection.keyEmpty":{en:`<{component}> key cannot be empty.`,zh:`<{component}> 的 key 不能为空。`},"selection.keyMissingColumn":{en:`<{component}> key column "{name}" does not exist in its table.`,zh:`<{component}> 的 key 列“{name}”在表格中不存在。`},"selection.keyInterpolation":{en:`<{component}> key column "{name}" must contain static text; row {row} contains an interpolation.`,zh:`<{component}> 的 key 列“{name}”必须包含静态文本;第 {row} 行包含插值。`},"selection.keyEmptyCell":{en:`<{component}> key column "{name}" cannot be empty in row {row}.`,zh:`<{component}> 的 key 列“{name}”在第 {row} 行不能为空。`},"selection.keyDuplicate":{en:`<{component}> key column "{name}" must be unique; duplicate value "{value}".`,zh:`<{component}> 的 key 列“{name}”必须唯一;重复值“{value}”。`},"initial.selectionNotValue":{en:`Initial selection "{value}" of <{component}> is not a value of key column "{name}".`,zh:`<{component}> 的初始选择“{value}”不是 key 列“{name}”中的值。`},"chart.columnComma":{en:`Chart column names cannot contain commas: "{name}".`,zh:`图表列名不能包含逗号:“{name}”。`},"chart.xMissing":{en:`Chart x column "{name}" does not exist.`,zh:`图表 x 列“{name}”不存在。`},"chart.yRequired":{en:`Chart y requires a column name.`,zh:`图表 y 需要列名。`},"chart.yMissing":{en:`Chart y column "{name}" does not exist.`,zh:`图表 y 列“{name}”不存在。`},"chart.needsNumeric":{en:`Chart requires at least one numeric column.`,zh:`图表至少需要一个数值列。`},"chart.scatterXMissing":{en:`Scatter chart x column "{name}" does not exist.`,zh:`散点图的 x 列“{name}”不存在。`},"chart.scatterNeedsNumeric":{en:`Scatter chart requires at least one numeric column.`,zh:`散点图至少需要一个数值列。`},"chart.donutNeedsColumns":{en:`Donut chart requires a label column and a value column.`,zh:`环形图需要一个标签列和一个数值列。`},"chart.donutYOne":{en:`Donut chart y can only specify one numeric column.`,zh:`环形图的 y 只能指定一个数值列。`},"chart.donutNeedY":{en:`A donut chart with more than two columns must use y to specify the single numeric column.`,zh:`超过两列的环形图必须用 y 指定唯一的数值列。`},"chart.negative":{en:`Donut chart values cannot be negative; row {row} is {value}.`,zh:`环形图的数值不能为负;第 {row} 行为 {value}。`},"timeline.headerMissing":{en:`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,zh:`时间线需要 Task、Start、Duration 列,或 事项、开始、时长 列,并可选 Notes 或 说明。`},"timeline.columnUnsupported":{en:`Timeline does not support column "{name}".`,zh:`时间线不支持列“{name}”。`},"timeline.negative":{en:`Timeline column "{name}" cannot be negative in row {row}.`,zh:`时间线列“{name}”在第 {row} 行不能为负。`},"runtime.bindingNoWritable":{en:`This component has no writable binding state.`,zh:`此组件没有可写的绑定状态。`},"runtime.bindingNeedsSlot":{en:`This multi-slot component requires a slot such as start/end or x/y.`,zh:`此多槽组件需要 start/end 或 x/y 之类的槽位。`},"runtime.bindingUnknownSlot":{en:`This component has no writable slot "{slot}".`,zh:`此组件没有可写的槽位“{slot}”。`},"runtime.bindingNoMultiSlot":{en:`This component does not support multiple slots.`,zh:`此组件不支持多个槽位。`},"runtime.dateInvalid":{en:`Date must be a valid YYYY-MM-DD or an empty string.`,zh:`日期必须是有效的 YYYY-MM-DD 或空字符串。`},"runtime.dateRequired":{en:`This date is required.`,zh:`此日期为必填项。`},"runtime.dateEarlier":{en:`Date cannot be earlier than {min}.`,zh:`日期不能早于 {min}。`},"runtime.dateLater":{en:`Date cannot be later than {max}.`,zh:`日期不能晚于 {max}。`},"runtime.fieldRequired":{en:`This field is required.`,zh:`此字段为必填项。`},"runtime.minLength":{en:`At least {min} characters.`,zh:`至少 {min} 个字符。`},"runtime.maxLength":{en:`At most {max} characters.`,zh:`至多 {max} 个字符。`},"runtime.emailLength":{en:`Email address cannot exceed {limit} characters.`,zh:`电子邮件地址不能超过 {limit} 个字符。`},"runtime.emailInvalid":{en:`Enter a valid email address.`,zh:`请输入有效的电子邮件地址。`},"runtime.finiteNumber":{en:`Parameter "{name}" requires a finite number.`,zh:`参数“{name}”需要有限数字。`},"runtime.min":{en:`Parameter "{name}" must be at least {min}.`,zh:`参数“{name}”必须至少为 {min}。`},"runtime.max":{en:`Parameter "{name}" must be at most {max}.`,zh:`参数“{name}”必须至多为 {max}。`},"runtime.step":{en:`Parameter "{name}" must be a multiple of step {step} (base {base}).`,zh:`参数“{name}”必须是步长 {step} 的倍数(基准 {base})。`},"runtime.boolean":{en:`Parameter "{name}" requires a boolean.`,zh:`参数“{name}”需要布尔值。`},"runtime.string":{en:`Parameter "{name}" requires a string.`,zh:`参数“{name}”需要字符串。`},"runtime.array":{en:`Parameter "{name}" requires an array of strings.`,zh:`参数“{name}”需要字符串数组。`},"runtime.arrayMembers":{en:`Parameter "{name}" members must be strings.`,zh:`参数“{name}”的成员必须是字符串。`},"runtime.checklistOption":{en:`Checklist item "{value}" does not exist.`,zh:`清单项“{value}”不存在。`},"runtime.maxItems":{en:`Parameter "{name}" allows at most {max} selected values.`,zh:`参数“{name}”最多允许选择 {max} 个值。`},"runtime.unsupportedType":{en:`Parameter "{name}" has an unsupported value type.`,zh:`参数“{name}”的值类型不受支持。`},"runtime.option":{en:`Value "{value}" is not among the options: {options}.`,zh:`值“{value}”不在选项中:{options}。`},"runtime.budget":{en:`Parameter "{name}": {detail}`,zh:`参数“{name}”:{detail}`},"runtime.rangeOrder":{en:`The range start cannot be greater than its end.`,zh:`范围起点不能大于终点。`},"budget.string":{en:`String exceeds the {limit}-character limit.`,zh:`字符串超过 {limit} 个字符的上限。`},"budget.array":{en:`Array exceeds the {limit}-item limit.`,zh:`数组超过 {limit} 个项的上限。`},"budget.arrayMember":{en:`Array member exceeds the {limit}-character limit.`,zh:`数组成员超过 {limit} 个字符的上限。`},"budget.arrayContents":{en:`Array contents exceed the {limit}-character limit.`,zh:`数组内容超过 {limit} 个字符的上限。`},"theme.missing":{en:`Theme "{name}" is not registered by the host; using the default theme.`,zh:`宿主未注册主题“{name}”;将使用默认主题。`},"theme.registryUnreadable":{en:`The host theme registry could not be read; using the default theme.`,zh:`无法读取宿主主题注册表;将使用默认主题。`},"theme.invalidDefinition":{en:`The selected theme "{name}" is not a valid definition; using the default theme.`,zh:`所选主题“{name}”不是有效定义;将使用默认主题。`},"theme.duplicateRegistration":{en:`Theme "{name}" is registered more than once; using the default theme.`,zh:`主题“{name}”被多次注册;将使用默认主题。`},"theme.protocol":{en:`Theme "{name}" does not support the {protocol} protocol; using the default theme.`,zh:`主题“{name}”不支持 {protocol} 协议;将使用默认主题。`},"theme.modes":{en:`Theme "{name}" must supply both light and dark color schemes; using the default theme.`,zh:`主题“{name}”必须同时提供浅色和深色配色;将使用默认主题。`},"theme.selectedUnreadable":{en:`The selected theme "{name}" could not be read; using the default theme.`,zh:`所选主题“{name}”无法读取;将使用默认主题。`},"error.expression-syntax":{en:`Check expression operators, parentheses and arguments.`,zh:`表达式语法不正确,请检查运算符、括号或参数是否完整。`},"error.expression-index":{en:`An array index must be a finite safe integer.`,zh:`数组索引必须为有限的安全整数。`},"error.expression-cycle":{en:`Named calculations contain a dependency cycle.`,zh:`命名计算中存在循环依赖。`},"error.array.homogeneous":{en:`Array elements must all be strings or all be numbers.`,zh:`数组元素必须全部为字符串或全部为数字。`},"error.array.finite":{en:`Array members must be finite numbers.`,zh:`数字数组元素必须为有限数值。`},"error.array.members":{en:`Array members must be strings or finite numbers.`,zh:`数组元素必须为字符串或有限数值。`},"error.expression-number":{en:`A numeric literal must be finite and valid.`,zh:`数字字面量无效,必须是有限数值。`},"error.expression-string":{en:`Check the string quotes and escape sequences.`,zh:`字符串格式不正确,请检查引号和转义。`},"error.expression-budget":{en:`The expression exceeded a resource budget.`,zh:`表达式超过长度、节点、深度或求值步数预算,请简化表达式。`},"error.expression-assignment":{en:`Assignment is not allowed in expressions.`,zh:`表达式不能执行赋值,请使用比较运算符。`},"error.expression-property":{en:`Property access is not allowed.`,zh:`表达式不支持属性访问,请直接引用绑定名称。`},"error.expression-empty":{en:`An expression is required.`,zh:`此处需要非空表达式。`},"error.expression-unknown-function":{en:`Use a supported built-in function.`,zh:`函数不受支持,请使用语言内置函数。`},"error.expression-arity":{en:`Check the function argument count.`,zh:`函数参数数量不正确。`},"error.expression-forbidden-name":{en:`The name is forbidden.`,zh:`此名称属于禁止访问的名称,请使用已声明的绑定。`},"error.expression-type":{en:`Operand or argument types do not match.`,zh:`操作数或函数参数的类型不匹配,请检查绑定类型。`},"error.expression-unknown-name":{en:`The binding is not declared.`,zh:`引用了未声明的绑定。`},"error.expression-value":{en:`The binding value is not supported.`,zh:`绑定值不符合表达式支持的类型或数值范围。`},"error.expression-eval":{en:`The expression cannot be evaluated.`,zh:`表达式无法求值,请检查输入和运算条件。`},"error.expression-domain":{en:`A value lies outside the function domain.`,zh:`参数超出函数定义域。`},"error.expression-divide-by-zero":{en:`Division by zero is undefined.`,zh:`除数不能为零。`},"error.expression-interpolation":{en:`Check interpolation delimiters and content.`,zh:`插值格式不正确,请检查分隔符和表达式内容。`},"error.latex-budget":{en:`The formula exceeded a resource budget.`,zh:`公式超过长度、记号、节点、深度或计算步数预算,请简化公式。`},"error.latex-syntax":{en:`Check formula syntax and delimiters.`,zh:`公式语法不正确,请检查命令、括号和分隔符。`},"error.latex-empty":{en:`A formula is required.`,zh:`公式不能为空。`},"error.latex-relation":{en:`Check the formula relation.`,zh:`公式中的关系式不符合计算语法。`},"error.latex-number":{en:`A formula number must be finite.`,zh:`公式中的数字必须是有限数值。`},"error.latex-name":{en:`Use a valid formula parameter name.`,zh:`公式参数名称无效,请使用合法绑定名。`},"error.latex-unsupported":{en:`The LaTeX structure is not computable.`,zh:`此 LaTeX 结构不支持计算,请改用支持的函数和运算。`},"error.latex-variable":{en:`A numeric formula parameter is missing or invalid.`,zh:`公式引用的参数缺失或不是有限数字。`},"error.latex-type":{en:`A formula parameter has the wrong type.`,zh:`公式参数类型不正确,计算参数必须为数字。`},"error.latex-divide-by-zero":{en:`Division by zero is undefined.`,zh:`公式中的除数不能为零。`},"error.latex-domain":{en:`A formula value lies outside the function domain.`,zh:`公式参数超出函数定义域。`},"error.latex-undefined":{en:`The formula is undefined at this point.`,zh:`公式在此点没有有限定义值。`},"error.latex-plot-range":{en:`Plot bounds must be finite and increasing.`,zh:`绘图区间必须由有限数值构成,且最小值小于最大值。`},"error.latex-plot-samples":{en:`The sample count must be an integer from 2 to 2000.`,zh:`采样点数必须为 2 至 2000 的整数。`}},He=`local.parse,local.budget,local.options.invalid,local.theme.expression,local.theme.name,local.theme.attribute,local.theme.malformed,local.theme.duplicate,local.theme.late,local.theme.nested,local.attribute,local.attribute.name,local.attribute.duplicate,local.budget.name,local.budget.math,local.tag.unclosed,local.tag.closing,local.tag.name,local.tag.mismatch,local.tag.shape,local.footnote.unsupported,local.interpolation,local.math.unclosed,local.math.whitespace,local.component.unknown,local.html`.split(`,`),Ue=`local.budget.data-table.cells,local.budget.data-table.columns,local.budget.data-table.rows,local.computation.budget,local.computation.const,local.computation.cycle,local.computation.duplicate,local.computation.expression,local.computation.name,local.computation.placement,local.computation.reserved,local.computation.unknown,local.computation.value,local.data-table.column,local.data-table.key,local.data-table.rows,local.data-table.value,local.validation.budget,local.validation.expression,local.validation.failed,local.validation.fields,local.validation.placement,local.validation.when,local.parse,local.legacy,local.component.unknown,local.attribute.unknown,local.budget.attribute,local.attribute.color,local.attribute.required,local.label.required,local.attribute.static,local.expression.empty,local.expression.invalid,local.attribute.type,local.attribute.range,local.constraint,local.selection.key,local.structure.parent,local.structure.children,local.budget.array,local.option.value,local.tab.value,local.step.value,local.quiz.answer,local.diagram.node,local.diagram.edge,local.checklist.body,local.budget.identifier,local.binding.name,local.binding.reserved,local.binding.type,local.binding.exclusive,local.binding.constraint,local.binding.option,local.initial.duplicate,local.initial.length,local.initial.email,local.initial.range,local.initial.option,local.initial.type,local.initial.date,local.initial,local.initial.step,local.binding.unknown,local.type,local.interpolation,local.attribute.interpolation,local.anchor.id,local.anchor.duplicate,local.jump.target,local.budget.plot.curves,local.budget.plot.points,local.math.formula,local.math,local.math.binding,local.table.header,local.table.row,local.chart.numeric,local.chart.column,local.chart.negative,local.timeline.header,local.timeline.value`.split(`,`),We=[`local.runtime.binding`,`local.runtime.value`],Ge=[`local.theme.name`,`local.theme.missing`,`local.theme.manifest`,`local.theme.duplicate`,`local.theme.protocol`,`local.theme.modes`],Ke=[`expression-index`,`expression-cycle`,`expression-syntax`,`expression-number`,`expression-string`,`expression-budget`,`expression-assignment`,`expression-property`,`expression-empty`,`expression-unknown-function`,`expression-arity`,`expression-forbidden-name`,`expression-type`,`expression-unknown-name`,`expression-value`,`expression-eval`,`expression-domain`,`expression-divide-by-zero`,`expression-interpolation`],qe=[`latex-budget`,`latex-syntax`,`latex-empty`,`latex-relation`,`latex-number`,`latex-name`,`latex-unsupported`,`latex-variable`,`latex-type`,`latex-divide-by-zero`,`latex-domain`,`latex-undefined`,`latex-plot-range`,`latex-plot-samples`],Je=[`local.version.unsupported`,`local.version.malformed`,`local.version.duplicate`,`local.version.placement`,`local.upgrade.from-version`,`local.upgrade.reserved-binding`,`local.upgrade.tag`,`local.upgrade.text-length`,`local.upgrade.expression`,`local.upgrade.version-missing`,...He,...Ue,...We,...Ge];Object.freeze(Array.from(new Set([...Je,...Ke,...Ke.map(e=>`local.expression.${e}`),...qe])));var Ye={"local.options.invalid.object":`options.notObject`,"local.options.invalid.limits":`options.limitsNotObject`,"local.options.invalid.max-syntax-nodes":`options.maxSyntaxNodes`,"local.budget.document":`budget.document`,"local.budget.nodes":`budget.syntaxNodes`,"local.budget.nesting":`budget.nesting`,"local.budget.name.attribute":`budget.attributeName`,"local.budget.name.tag":`budget.tagName`,"local.budget.math":`budget.math`,"local.budget.attribute":`budget.attribute`,"local.budget.array.options":`budget.options`,"local.budget.array.checklist":`budget.checklistItems`,"local.budget.identifier":`budget.identifier`,"local.budget.plot.curves":`budget.plotCurves`,"local.budget.plot.points":`budget.plotPoints`,"local.budget.value.string":`budget.string`,"local.budget.value.array":`budget.array`,"local.budget.value.array-member":`budget.arrayMember`,"local.budget.value.array-contents":`budget.arrayContents`,"local.parse.source":`parse.sourceType`,"local.parse.markdown":`parse.markdownFailed`,"local.parse.document":`parse.failed`,"local.legacy":`legacy.fence`,"local.theme.expression":`theme.expression`,"local.theme.name.missing":`theme.nameRequired`,"local.theme.attribute":`theme.attributeOnly`,"local.theme.name.invalid":`theme.nameInvalid`,"local.theme.name":`theme.nameInvalid`,"local.theme.malformed.unclosed":`theme.malformedMissingClose`,"local.theme.malformed.closing":`theme.malformedClosing`,"local.theme.malformed.placement":`theme.malformedStandalone`,"local.theme.duplicate.declaration":`theme.duplicateDeclaration`,"local.theme.duplicate":`theme.duplicateRegistration`,"local.theme.late":`theme.late`,"local.theme.nested":`theme.nested`,"local.theme.invalid":`theme.invalidDeclaration`,"local.theme.missing":`theme.missing`,"local.theme.manifest.unreadable":`theme.registryUnreadable`,"local.theme.manifest.definition":`theme.invalidDefinition`,"local.theme.manifest.selected":`theme.selectedUnreadable`,"local.theme.protocol":`theme.protocol`,"local.theme.modes":`theme.modes`,"local.tag.missing-close":`tag.missingClose`,"local.tag.unclosed.open":`tag.missingClose`,"local.tag.unclosed.pair":`tag.unclosedPaired`,"local.tag.closing":`tag.closingAttributes`,"local.tag.name":`tag.nameInvalid`,"local.tag.mismatch.root":`tag.mismatchRoot`,"local.tag.mismatch.parent":`tag.mismatchParent`,"local.tag.shape":`tag.requiresClose`,"local.interpolation.unclosed":`interpolation.unclosed`,"local.math.unclosed":`math.unclosed`,"local.math.whitespace":`math.whitespace`,"local.footnote.unsupported":`footnote.unsupported`,"local.html":`html.raw`,"local.component.unknown.suggestion":`component.unknownSuggestion`,"local.component.unknown":`component.unknownPlain`,"local.attribute.format":`attribute.lowercase`,"local.attribute.name":`attribute.nameInvalid`,"local.attribute.value-quoted":`attribute.valueQuoted`,"local.attribute.closing-quote":`attribute.valueUnclosed`,"local.attribute.duplicate":`attribute.duplicate`,"local.attribute.separator":`attribute.separator`,"local.attribute.unknown.suggestion":`attribute.unknownSuggestion`,"local.attribute.unknown":`attribute.unknownPlain`,"local.attribute.color":`attribute.color`,"local.attribute.required":`attribute.required`,"local.attribute.static":`attribute.static`,"local.attribute.type.number":`attribute.numberInvalid`,"local.attribute.type.number-interpolation":`attribute.numberInterpolationInvalid`,"local.attribute.type.integer":`attribute.integer`,"local.attribute.type.positive":`attribute.positive`,"local.attribute.type.boolean":`attribute.booleanInvalid`,"local.attribute.type.boolean-interpolation":`attribute.booleanInterpolationInvalid`,"local.attribute.type.enum":`attribute.enumInvalid`,"local.attribute.type.date-lower":`attribute.dateLower`,"local.attribute.type.date-upper":`attribute.dateUpper`,"local.attribute.range.min":`attribute.rangeMin`,"local.attribute.range.max":`attribute.rangeMax`,"local.attribute.interpolation":`attribute.whenInterpolation`,"local.label.required.missing":`label.requiredMissing`,"local.label.required.empty":`label.requiredEmpty`,"local.expression.empty.attribute":`expression.emptyAttribute`,"local.expression.empty":`expression.emptyInterpolation`,"local.expression.error":`expression.error`,"local.constraint.number-min-max":`constraint.componentMinMax`,"local.constraint.number-step":`constraint.componentStep`,"local.constraint.length-order":`constraint.lengthRange`,"local.constraint.date-order":`constraint.dateOrder`,"local.constraint.progress-range":`constraint.progressRange`,"local.constraint.plot-range":`constraint.plotRange`,"local.constraint.timer-duration":`constraint.timerDuration`,"local.constraint.range-slider-min-max":`constraint.rangeSliderOrder`,"local.constraint.range-slider-step":`constraint.rangeSliderStep`,"local.constraint.coordinate-axis":`constraint.coordinateOrder`,"local.constraint.coordinate-step":`constraint.coordinateStep`,"local.constraint.multi-select":`constraint.multiSelectMax`,"local.constraint.quiz-tolerance":`constraint.quizTolerance`,"local.selection.key.required":`selection.keyNeedsKey`,"local.selection.key.empty":`selection.keyEmpty`,"local.selection.key.missing-column":`selection.keyMissingColumn`,"local.selection.key.interpolation":`selection.keyInterpolation`,"local.selection.key.empty-cell":`selection.keyEmptyCell`,"local.selection.key.duplicate":`selection.keyDuplicate`,"local.selection.key.initial":`initial.selectionNotValue`,"local.structure.parent":`structure.parent`,"local.structure.no-body":`structure.noBody`,"local.structure.inline-only":`structure.inlineOnly`,"local.structure.no-nested-components":`structure.noNestedComponents`,"local.structure.accordion.needs-disclosure":`structure.accordionNeedsDisclosure`,"local.structure.accordion.only-disclosure":`structure.accordionOnly`,"local.structure.grid.needs-card":`structure.gridNeedsCard`,"local.structure.grid.only-card":`structure.gridOnlyCard`,"local.structure.table.single":`structure.exactlyOneTable`,"local.structure.plot.needs-formula":`structure.plotNeedsFormula`,"local.structure.plot.only-formulas":`structure.plotOnlyFormulas`,"local.structure.node.no-components":`structure.nodeNoComponents`,"local.structure.options.needed":`structure.optionsNeeded`,"local.structure.options.only":`structure.optionsOnly`,"local.structure.option.no-components":`structure.optionNoComponents`,"local.structure.tabs.needs-tab":`structure.tabsNeedsTab`,"local.structure.tabs.only-tab":`structure.tabsOnly`,"local.structure.steps.needs-step":`structure.stepsNeedsStep`,"local.structure.steps.only-step":`structure.stepsOnly`,"local.structure.quiz.numeric-no-body":`structure.quizNumericNoBody`,"local.structure.diagram.only":`structure.diagramOnly`,"local.option.value.required":`option.valueRequired`,"local.option.value.comma":`option.valueComma`,"local.option.value.duplicate":`option.valueDuplicate`,"local.tab.value.duplicate":`tab.valueDuplicate`,"local.step.value.duplicate":`step.valueDuplicate`,"local.quiz.answer.required":`quiz.answerRequired`,"local.quiz.answer.numeric":`quiz.answerNumeric`,"local.quiz.answer.not-option":`quiz.answerNotOption`,"local.diagram.node.required":`diagram.needsNode`,"local.diagram.node.invalid":`diagram.nodeInvalid`,"local.diagram.node.duplicate":`diagram.nodeDuplicate`,"local.diagram.edge.from":`diagram.edgeFromUnknown`,"local.diagram.edge.to":`diagram.edgeToUnknown`,"local.diagram.edge.duplicate":`diagram.edgeDuplicate`,"local.checklist.body.single":`checklist.bodySingle`,"local.checklist.body.item-required":`checklist.needsItem`,"local.checklist.body.items-limit":`budget.checklistItems`,"local.checklist.body.task-only":`checklist.taskOnly`,"local.checklist.body.no-nested":`checklist.noNested`,"local.checklist.body.no-components":`checklist.noComponents`,"local.binding.name":`binding.nameInvalid`,"local.binding.reserved":`binding.reserved`,"local.binding.type":`binding.typeConflict`,"local.binding.exclusive":`binding.exclusive`,"local.binding.exclusive.slot":`binding.slotExclusive`,"local.binding.constraint":`binding.constraintConflict`,"local.binding.option":`binding.optionConflict`,"local.binding.unknown.suggestion":`binding.unknownSuggestion`,"local.binding.unknown":`binding.unknownPlain`,"local.initial.duplicate":`initial.duplicate`,"local.initial.duplicate-peers":`initial.duplicatePeers`,"local.initial.no-step":`initial.rangeNoStep`,"local.initial.cannot-derive":`initial.cannotDerive`,"local.initial.type.number":`initial.typeFiniteNumber`,"local.initial.type.boolean":`initial.typeBoolean`,"local.initial.type":`initial.typeWrong`,"local.initial.range.min":`initial.belowMin`,"local.initial.range.max":`initial.aboveMax`,"local.initial.range.step":`initial.offStep`,"local.initial.value.options":`initial.notAmongOptions`,"local.initial.date":`initial.dateInvalid`,"local.initial.value.option":`initial.notAvailableOption`,"local.initial.option.multi-select":`initial.multiSelectOption`,"local.initial.range-slider":`initial.rangeSliderOrder`,"local.initial.slot.min":`initial.slotBelowMin`,"local.initial.slot.max":`initial.slotAboveMax`,"local.initial.slot.step":`initial.slotOffStep`,"local.initial.length.min":`initial.lengthBelow`,"local.initial.length.max":`initial.lengthAbove`,"local.initial.email":`initial.email`,"local.initial.date.min":`initial.dateBelow`,"local.initial.date.max":`initial.dateAbove`,"local.initial.multi-select":`initial.multiSelectExceeds`,"local.type.number":`type.number`,"local.type.boolean":`type.boolean`,"local.type.string":`type.string`,"local.type.array":`type.arrayNoDisplay`,"local.anchor.id":`anchor.idInvalid`,"local.anchor.duplicate":`anchor.duplicate`,"local.anchor.heading-collision":`anchor.headingCollision`,"local.jump.empty":`jump.empty`,"local.jump.bad-target":`jump.badTarget`,"local.jump.unresolved":`jump.unresolved`,"local.math.formula.shape":`math.formulaShape`,"local.math.compute":`math.computeFailed`,"local.math.binding.unknown":`math.bindingUnknown`,"local.math.binding.type":`math.bindingType`,"local.table.header.missing":`table.missingHeader`,"local.table.header.interpolation":`table.headerInterpolation`,"local.table.header.empty":`table.headerEmpty`,"local.table.header.duplicate":`table.headerDuplicate`,"local.table.row.mismatch":`table.rowColumnMismatch`,"local.chart.numeric.expression":`chart.numericExpression`,"local.timeline.numeric.expression":`timeline.numericExpression`,"local.chart.numeric.plain":`chart.numericPlain`,"local.timeline.numeric.plain":`timeline.numericPlain`,"local.chart.column.comma":`chart.columnComma`,"local.chart.column.x-missing":`chart.xMissing`,"local.chart.column.y-required":`chart.yRequired`,"local.chart.column.y-missing":`chart.yMissing`,"local.chart.column.needs-numeric":`chart.needsNumeric`,"local.chart.column.scatter-x-missing":`chart.scatterXMissing`,"local.chart.column.scatter-needs-numeric":`chart.scatterNeedsNumeric`,"local.chart.column.donut-columns":`chart.donutNeedsColumns`,"local.chart.column.donut-y":`chart.donutYOne`,"local.chart.column.donut-need-y":`chart.donutNeedY`,"local.chart.negative":`chart.negative`,"local.timeline.header.missing":`timeline.headerMissing`,"local.timeline.header.column":`timeline.columnUnsupported`,"local.timeline.value.negative":`timeline.negative`,"local.runtime.binding.no-writable":`runtime.bindingNoWritable`,"local.runtime.binding.needs-slot":`runtime.bindingNeedsSlot`,"local.runtime.binding.unknown-slot":`runtime.bindingUnknownSlot`,"local.runtime.binding.no-multi-slot":`runtime.bindingNoMultiSlot`,"local.runtime.value.date-invalid":`runtime.dateInvalid`,"local.runtime.value.date-required":`runtime.dateRequired`,"local.runtime.value.date-earlier":`runtime.dateEarlier`,"local.runtime.value.date-later":`runtime.dateLater`,"local.runtime.value.field-required":`runtime.fieldRequired`,"local.runtime.value.min-length":`runtime.minLength`,"local.runtime.value.max-length":`runtime.maxLength`,"local.runtime.value.email-length":`runtime.emailLength`,"local.runtime.value.email-invalid":`runtime.emailInvalid`,"local.runtime.value.finite-number":`runtime.finiteNumber`,"local.runtime.value.min":`runtime.min`,"local.runtime.value.max":`runtime.max`,"local.runtime.value.step":`runtime.step`,"local.runtime.value.boolean":`runtime.boolean`,"local.runtime.value.string":`runtime.string`,"local.runtime.value.array":`runtime.array`,"local.runtime.value.array-members":`runtime.arrayMembers`,"local.runtime.value.checklist-option":`runtime.checklistOption`,"local.runtime.value.max-items":`runtime.maxItems`,"local.runtime.value.unsupported-type":`runtime.unsupportedType`,"local.runtime.value.option":`runtime.option`,"local.runtime.value.budget":`runtime.budget`,"local.runtime.value.range-order":`runtime.rangeOrder`};Object.freeze([...Object.keys(Ye),...Object.keys(Ve).filter(e=>e.startsWith(`error.`))].sort());function Xe(e){if(Object.hasOwn(Ye,e))return Ye[e];if(Object.hasOwn(Ve,e))return e}function Ze(e,t=`en`){let n=Xe(e);if(n)return Ve[n][t===`zh`?`zh`:`en`]}function Qe(e,t){return t?e.replace(/\{([A-Za-z_][A-Za-z0-9_]*)\}/g,(e,n)=>{let r=t[n];return r===void 0?``:String(r)}):e}function $e(e,t=`en`,n){let r=Ze(e,t);return r===void 0?``:Qe(r,n)}function et(e){return $e(e.key,`en`,e.params)}function tt(e,t=`en`){let n=typeof e.messageKey==`string`?e.messageKey:void 0,r=n===void 0?void 0:Ze(n,t),i=e.params;if(t===`zh`&&i){let e=n===void 0?void 0:Xe(n);if(e===`expression.error`||e===`math.computeFailed`){let e=typeof i.code==`string`?Ze(`error.${i.code}`,`zh`):void 0;if(e){let t=typeof i.near==`string`&&i.near?` 相关源码:${i.near}`:``;i={...i,detail:e+t}}}else if(e===`runtime.budget`&&typeof i.detailKey==`string`){let e=Ze(i.detailKey,`zh`);e&&(i={...i,detail:Qe(e,i)})}}let a=r===void 0?typeof e.message==`string`?e.message:String(e.message??``):Qe(r,i),o=typeof a==`string`?a:String(a??``);return o.length>2e3?`${o.slice(0,D-1)}…`:o}function nt(e){if(typeof e!=`string`)return 0;let t=0;for(let n of e)t+=1;return t}var R=class extends Error{offset;code;constructor(e,t,n=0){super(t),this.name=`LocalExpressionError`,this.code=e,this.offset=n}},rt=`abs.sqrt.floor.ceil.round.min.max.pow.sin.cos.tan.asin.acos.atan.exp.log.len.contains.clamp.sum.average.minOf.maxOf.formatNumber.formatPercent.formatScientific.formatCurrency.trim.lower.upper.startsWith.endsWith.replace.slice.dateCompare.dateDiff`.split(`.`),it=new Set(rt),at=new Map([[`pi`,Math.PI],[`e`,Math.E]]),ot=new Set([`__proto__`,`prototype`,`constructor`]),st=new Set([`string`,`number`,`boolean`,`null`,`array`,`number-array`]),ct=new Set([...rt,`x`,`y`,`pi`,`e`,`true`,`false`,`null`,...ot]),lt=4e3,ut=2e3,dt=100,ft=200,pt=1e4,mt=250,ht=w,gt=w,_t=500;function vt(e){if(e.length>1e4)return{code:`expression-budget`,...Be(`local.budget.value.array`,{limit:T}),message:`Array exceeds the ${T}-item limit.`};let t=null,n=0;for(let r of e)if(typeof r==`string`){if(t===`number`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`string`,r.length>1e5)return{code:`expression-budget`,...Be(`local.budget.value.array-member`,{limit:w}),message:`Array member exceeds the ${w}-character limit.`};if(n+=r.length,n>1e5)return{code:`expression-budget`,...Be(`local.budget.value.array-contents`,{limit:E}),message:`Array contents exceed the ${E}-character limit.`}}else if(typeof r==`number`){if(t===`string`)return{code:`expression-value`,key:`error.array.homogeneous`,message:`Array elements must all be strings or all be numbers.`};if(t=`number`,!Number.isFinite(r))return{code:`expression-value`,key:`error.array.finite`,message:`Array members must be finite numbers.`}}else return{code:`expression-value`,key:`error.array.members`,message:`Array members must be strings or finite numbers.`};return null}function yt(e){if(typeof e==`string`)return e.length>1e5?Be(`local.budget.value.string`,{limit:w}):null;if(Array.isArray(e)){let t=vt(e);return t?Be(t.key,t.params):null}return null}function bt(e){let t=yt(e);return t?et(t):null}var xt=/^(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?/,St=/[A-Za-z_]/,Ct=/[A-Za-z0-9_]/;function wt(e){let t=[],n=0;for(;n<e.length;){let r=e[n];if(/\s/.test(r)){n+=1;continue}if(r>=`0`&&r<=`9`||r===`.`&&/[0-9]/.test(e[n+1]??``)){let r=xt.exec(e.slice(n));if(!r)throw new R(`expression-syntax`,`Invalid number.`,n);let i=r[0],a=Number(i);if(!Number.isFinite(a))throw new R(`expression-number`,`Number must be finite: ${i}.`,n);t.push({kind:`number`,value:i,start:n,number:a}),n+=i.length;continue}if(r===`"`||r===`'`){let i=n,a=r,o=``,s=n+1,c=!1;for(;s<e.length;){let t=e[s];if(t===a){c=!0,s+=1;break}if(t===`
10
+ `||t===`\r`)throw new R(`expression-string`,`String literals cannot span lines.`,i);if(t===`\\`){let t=e[s+1];if(t===void 0)break;switch(t){case`\\`:o+=`\\`;break;case`'`:o+=`'`;break;case`"`:o+=`"`;break;case`n`:o+=`
11
+ `;break;case`t`:o+=` `;break;default:throw new R(`expression-string`,`Unsupported escape \\${t}.`,s)}s+=2}else o+=t,s+=1}if(!c)throw new R(`expression-string`,`Unterminated string literal.`,i);if(o.length>ht)throw new R(`expression-budget`,`String literal exceeds the length limit.`,i);t.push({kind:`string`,value:o,start:i}),n=s;continue}if(St.test(r)){let r=n+1;for(;r<e.length&&Ct.test(e[r]);)r+=1;t.push({kind:`ident`,value:e.slice(n,r),start:n}),n=r;continue}let i=e.slice(n,n+2);if(e.startsWith(`!==`,n)||e.startsWith(`===`,n))throw new R(`expression-syntax`,`Unsupported operator ${e.slice(n,n+3)}.`,n);if(i===`==`||i===`!=`||i===`<=`||i===`>=`||i===`&&`||i===`||`)t.push({kind:`punct`,value:i,start:n}),n+=2;else if(`+-*/%()!<>?:,[]`.includes(r))t.push({kind:`punct`,value:r,start:n}),n+=1;else throw r===`=`?new R(`expression-assignment`,`Assignments are not supported.`,n):r===`.`?new R(`expression-property`,`Property access is not supported.`,n):r===`&`||r===`|`?new R(`expression-syntax`,`Use ${r}${r} for logical operations.`,n):new R(`expression-syntax`,`Unrecognized character "${r}".`,n)}return t.push({kind:`eof`,value:``,start:e.length}),t}var Tt={abs:[1,1],sqrt:[1,1],floor:[1,1],ceil:[1,1],round:[1,1],min:[1,2**53-1],max:[1,2**53-1],pow:[2,2],sin:[1,1],cos:[1,1],tan:[1,1],asin:[1,1],acos:[1,1],atan:[1,1],exp:[1,1],log:[1,1],len:[1,1],contains:[2,2],clamp:[3,3],sum:[1,1],average:[1,1],minOf:[1,1],maxOf:[1,1],formatNumber:[1,4],formatPercent:[1,3],formatScientific:[1,3],formatCurrency:[1,4],trim:[1,1],lower:[1,1],upper:[1,1],startsWith:[2,2],endsWith:[2,2],replace:[3,3],slice:[2,3],dateCompare:[2,2],dateDiff:[2,3]};function Et(e){let t=0,n=[{node:e,depth:1}];for(;n.length>0;){let{node:e,depth:r}=n.pop();switch(r>t&&(t=r),e.kind){case`unary`:n.push({node:e.operand,depth:r+1});break;case`binary`:n.push({node:e.left,depth:r+1}),n.push({node:e.right,depth:r+1});break;case`conditional`:n.push({node:e.test,depth:r+1}),n.push({node:e.consequent,depth:r+1}),n.push({node:e.alternate,depth:r+1});break;case`call`:for(let t of e.args)n.push({node:t,depth:r+1});break;case`array`:for(let t of e.elements)n.push({node:t,depth:r+1});break;case`index`:n.push({node:e.target,depth:r+1}),n.push({node:e.index,depth:r+1})}}return t}var Dt=class{tokens;position=0;nodeCount=0;dependencyNames=[];dependencySet=new Set;constructor(e){this.tokens=wt(e)}get dependencies(){return this.dependencyNames}parse(){if(this.peek().kind===`eof`)throw new R(`expression-empty`,`Expression is empty.`,0);let e=this.parseConditional(0),t=this.peek();if(t.kind!==`eof`)throw new R(`expression-syntax`,`Unexpected content "${t.value}".`,t.start);if(Et(e)>ft)throw new R(`expression-budget`,`Expression is nested too deeply.`,e.start);return e}peek(){return this.tokens[this.position]}next(){let e=this.tokens[this.position];return this.position+=1,e}isPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}expect(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new R(`expression-syntax`,`Missing "${e}".`,t.start);return this.next()}node(e,t,n){if(this.nodeCount+=1,this.nodeCount>ut)throw new R(`expression-budget`,`Expression is too complex.`,n);if(t>dt)throw new R(`expression-budget`,`Expression is nested too deeply.`,n);return e}parseConditional(e){let t=this.parseOr(e);if(!this.isPunct(`?`))return t;let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`:`);let i=this.parseConditional(e+1);return this.node({kind:`conditional`,test:t,consequent:r,alternate:i,start:n},e,n)}parseOr(e){let t=this.parseAnd(e);for(;this.isPunct(`||`);){let n=t.start;this.next();let r=this.parseAnd(e);t=this.node({kind:`binary`,operator:`||`,left:t,right:r,start:n},e,n)}return t}parseAnd(e){let t=this.parseEquality(e);for(;this.isPunct(`&&`);){let n=t.start;this.next();let r=this.parseEquality(e);t=this.node({kind:`binary`,operator:`&&`,left:t,right:r,start:n},e,n)}return t}parseEquality(e){let t=this.parseRelational(e);for(;this.isPunct(`==`)||this.isPunct(`!=`);){let n=t.start,r=this.next().value,i=this.parseRelational(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseRelational(e){let t=this.parseAdditive(e);for(;this.isPunct(`<`)||this.isPunct(`<=`)||this.isPunct(`>`)||this.isPunct(`>=`);){let n=t.start,r=this.next().value,i=this.parseAdditive(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseAdditive(e){let t=this.parseMultiplicative(e);for(;this.isPunct(`+`)||this.isPunct(`-`);){let n=t.start,r=this.next().value,i=this.parseMultiplicative(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseMultiplicative(e){let t=this.parseUnary(e);for(;this.isPunct(`*`)||this.isPunct(`/`)||this.isPunct(`%`);){let n=t.start,r=this.next().value,i=this.parseUnary(e);t=this.node({kind:`binary`,operator:r,left:t,right:i,start:n},e,n)}return t}parseUnary(e){let t=this.peek();if(t.kind===`punct`&&(t.value===`-`||t.value===`+`||t.value===`!`)){this.next();let n=this.parseUnary(e+1);return this.node({kind:`unary`,operator:t.value,operand:n,start:t.start},e,t.start)}return this.parsePrimary(e)}parsePrimary(e){let t=this.parseAtom(e);for(;this.isPunct(`[`);){let n=t.start;this.next();let r=this.parseConditional(e+1);this.expect(`]`),t=this.node({kind:`index`,target:t,index:r,start:n},e,n)}return t}parseAtom(e){let t=this.peek();if(t.kind===`number`)return this.next(),this.node({kind:`literal`,value:t.number,start:t.start},e,t.start);if(t.kind===`string`)return this.next(),this.node({kind:`literal`,value:t.value,start:t.start},e,t.start);if(t.kind===`ident`){this.next();let n=t.value;if(this.isPunct(`(`)){if(!it.has(n))throw new R(`expression-unknown-function`,`Unknown function "${n}".`,t.start);this.next();let r=[];if(!this.isPunct(`)`))for(r.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),r.push(this.parseConditional(e+1));this.expect(`)`);let[i,a]=Tt[n];if(r.length<i||r.length>a)throw new R(`expression-arity`,`Function ${n} expects ${i===a?`${i} ${i===1?`argument`:`arguments`}`:i===1?`at least one argument`:`${i}–${a} arguments`}.`,t.start);return this.node({kind:`call`,name:n,args:r,start:t.start},e,t.start)}if(n===`true`||n===`false`)return this.node({kind:`literal`,value:n===`true`,start:t.start},e,t.start);if(n===`null`)return this.node({kind:`literal`,value:null,start:t.start},e,t.start);let r=at.get(n);if(r!==void 0)return this.node({kind:`literal`,value:r,start:t.start},e,t.start);if(ot.has(n))throw new R(`expression-forbidden-name`,`Name "${n}" is not allowed.`,t.start);if(it.has(n))throw new R(`expression-syntax`,`Function ${n} must be called with parentheses.`,t.start);return this.dependencySet.has(n)||(this.dependencySet.add(n),this.dependencyNames.push(n)),this.node({kind:`reference`,name:n,start:t.start},e,t.start)}if(t.kind===`punct`&&t.value===`(`){this.next();let t=this.parseConditional(e+1);return this.expect(`)`),t}if(t.kind===`punct`&&t.value===`[`){this.next();let n=[];if(!this.isPunct(`]`))for(n.push(this.parseConditional(e+1));this.isPunct(`,`);)this.next(),n.push(this.parseConditional(e+1));return this.expect(`]`),this.node({kind:`array`,elements:n,start:t.start},e,t.start)}throw new R(`expression-syntax`,`Expected an expression.`,t.start)}};function Ot(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number array`}}function kt(e){return e===null?`null`:Array.isArray(e)?`array`:typeof e==`boolean`?`boolean`:typeof e==`number`?`number`:`string`}function At(e,t){throw new R(`expression-type`,e,t)}function z(e,t,n,r){e!==t&&At(`${r}, got ${Ot(e)}.`,n)}function jt(e,t){return e===t?e:e===`null`?t:t===`null`?e:null}function Mt(e,t){switch(e.kind){case`literal`:return kt(e.value);case`reference`:{if(typeof t!=`object`||!t||!Object.prototype.hasOwnProperty.call(t,e.name))throw new R(`expression-unknown-name`,`Variable "${e.name}" is not declared.`,e.start);let n=t[e.name];if(typeof n!=`string`||!st.has(n))throw new R(`expression-value`,`Variable "${e.name}" has an invalid type.`,e.start);return n}case`unary`:{let n=Mt(e.operand,t);return e.operator===`!`?(z(n,`boolean`,e.start,`Logical not requires a boolean`),`boolean`):(z(n,`number`,e.start,`Unary ${e.operator} requires a number`),`number`)}case`binary`:{let n=Mt(e.left,t),r=Mt(e.right,t);switch(e.operator){case`+`:return n===`number`&&r===`number`?`number`:n===`string`&&r===`string`?`string`:At(`Operator "+" requires two numbers or two strings, got ${Ot(n)} and ${Ot(r)}.`,e.start);case`-`:case`*`:case`/`:case`%`:return z(n,`number`,e.start,`Operator "${e.operator}" requires a number`),z(r,`number`,e.start,`Operator "${e.operator}" requires a number`),`number`;case`<`:case`<=`:case`>`:case`>=`:return n===`number`&&r===`number`||n===`string`&&r===`string`?`boolean`:At(`Comparison operator "${e.operator}" requires two numbers or two strings, got ${Ot(n)} and ${Ot(r)}.`,e.start);case`==`:case`!=`:return n!==r&&n!==`null`&&r!==`null`?At(`Equality comparison requires matching types, got ${Ot(n)} and ${Ot(r)}.`,e.start):`boolean`;case`&&`:case`||`:return z(n,`boolean`,e.start,`Logical operators require booleans`),z(r,`boolean`,e.start,`Logical operators require booleans`),`boolean`}break}case`array`:{if(e.elements.length===0)return`number-array`;let n=null;for(let r of e.elements){let e=Mt(r,t);if(e!==`string`&&e!==`number`)return At(`Array literals require string or number elements, got ${Ot(e)}.`,r.start);if(n===null)n=e;else if(n!==e)return At(`Array literals require elements of one type, got ${Ot(n)} and ${Ot(e)}.`,r.start)}return n===`string`?`array`:`number-array`}case`index`:{let n=Mt(e.target,t);return z(Mt(e.index,t),`number`,e.start,`Array index must be a number`),n===`array`?`string`:n===`number-array`?`number`:At(`Index access requires an array, got ${Ot(n)}.`,e.start)}case`conditional`:{z(Mt(e.test,t),`boolean`,e.start,`Conditional test must be a boolean`);let n=Mt(e.consequent,t),r=Mt(e.alternate,t);if(n===`array`&&e.alternate.kind===`array`&&e.alternate.elements.length===0||r===`array`&&e.consequent.kind===`array`&&e.consequent.elements.length===0)return`array`;let i=jt(n,r);return i===null?At(`Conditional branches must have matching types or one null, got ${Ot(n)} and ${Ot(r)}.`,e.start):i}case`call`:{let n=e.args.map(e=>Mt(e,t));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:return z(n[0],`number`,e.start,`Function ${e.name} requires a number`),`number`;case`min`:case`max`:case`pow`:case`clamp`:for(let t of n)z(t,`number`,e.start,`Function ${e.name} requires a number`);return`number`;case`len`:return n[0]!==`string`&&n[0]!==`array`&&n[0]!==`number-array`&&At(`Function len requires a string or array, got ${Ot(n[0])}.`,e.start),`number`;case`contains`:if(n[0]===`number-array`)return z(n[1],`number`,e.start,`Function contains requires a numeric member`),`boolean`;if(n[0]===`string`||n[0]===`array`)return z(n[1],`string`,e.start,`Function contains requires a string member`),`boolean`;At(`Function contains requires a string or array, got ${Ot(n[0])}.`,e.start);break;case`sum`:case`average`:case`minOf`:case`maxOf`:return z(n[0],`number-array`,e.start,`Function ${e.name} requires a numeric array`),`number`;case`formatNumber`:case`formatPercent`:case`formatScientific`:return n[0]!==`number`&&n[0]!==`null`&&At(`Function ${e.name} requires a number or null, got ${Ot(n[0])}.`,e.start),n[1]!==void 0&&z(n[1],`number`,e.start,`Function ${e.name} requires numeric fraction digits`),n[2]!==void 0&&z(n[2],`string`,e.start,`Function ${e.name} requires a string locale`),e.name===`formatNumber`&&n[3]!==void 0&&z(n[3],`boolean`,e.start,`Function formatNumber requires a boolean grouping flag`),`string`;case`formatCurrency`:return n[0]!==`number`&&n[0]!==`null`&&At(`Function formatCurrency requires a number or null, got ${Ot(n[0])}.`,e.start),n[1]!==void 0&&z(n[1],`string`,e.start,`Function formatCurrency requires a string currency code`),n[2]!==void 0&&z(n[2],`number`,e.start,`Function formatCurrency requires numeric fraction digits`),n[3]!==void 0&&z(n[3],`string`,e.start,`Function formatCurrency requires a string locale`),`string`;case`trim`:case`lower`:case`upper`:return z(n[0],`string`,e.start,`Function ${e.name} requires a string`),`string`;case`startsWith`:case`endsWith`:return z(n[0],`string`,e.start,`Function ${e.name} requires a string`),z(n[1],`string`,e.start,`Function ${e.name} requires a string search value`),`boolean`;case`replace`:return z(n[0],`string`,e.start,`Function replace requires a string`),z(n[1],`string`,e.start,`Function replace requires a string search value`),z(n[2],`string`,e.start,`Function replace requires a string replacement`),`string`;case`slice`:return z(n[0],`string`,e.start,`Function slice requires a string`),z(n[1],`number`,e.start,`Function slice requires a numeric start index`),n[2]!==void 0&&z(n[2],`number`,e.start,`Function slice requires a numeric end index`),`string`;case`dateCompare`:return z(n[0],`string`,e.start,`Function dateCompare requires a date string`),z(n[1],`string`,e.start,`Function dateCompare requires a date string`),`number`;case`dateDiff`:return z(n[0],`string`,e.start,`Function dateDiff requires a date string`),z(n[1],`string`,e.start,`Function dateDiff requires a date string`),n[2]!==void 0&&z(n[2],`string`,e.start,`Function dateDiff requires a string unit`),`number`}break}}throw new R(`expression-type`,`Unsupported expression.`,0)}function Nt(e,t,n=`expression-eval`){throw new R(n,e,t)}function Pt(e){if(typeof e!=`object`||!e||Array.isArray(e))throw new R(`expression-value`,`Expression environment must be an object.`,0)}function Ft(e,t,n){if(e===null)return null;if(typeof e==`string`){let r=bt(e);if(r)throw new R(`expression-budget`,`Variable "${t}": ${r}`,n);return e}if(typeof e==`boolean`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new R(`expression-value`,`Variable "${t}" must be a finite number.`,n);return e}if(Array.isArray(e)){let r=vt(e);if(r)throw new R(r.code,`Variable "${t}": ${r.message}`,n);return e}throw new R(`expression-value`,`Variable "${t}" has an invalid value type.`,n)}function It(e,t,n){return Pt(e),Object.prototype.hasOwnProperty.call(e,t)||Nt(`Variable "${t}" is not declared.`,n,`expression-unknown-name`),Ft(e[t],t,n)}function Lt(e,t,n=`Expected a number`){return typeof e==`number`&&Number.isFinite(e)||Nt(`${n}.`,t,`expression-type`),e}function Rt(e,t,n=`Expected a boolean`){return typeof e!=`boolean`&&Nt(`${n}.`,t,`expression-type`),e}function zt(e,t,n=`Expected a string`){return typeof e!=`string`&&Nt(`${n}.`,t,`expression-type`),e}function Bt(e,t,n){Array.isArray(e)||Nt(`${n}.`,t,`expression-type`);for(let r of e)typeof r==`number`&&Number.isFinite(r)||Nt(`${n}.`,t,`expression-type`);return e}function Vt(e,t){let n=vt(e);return n&&Nt(n.message,t,n.code),e}function Ht(e,t){try{return t()}catch(t){throw t instanceof ee?new R(t.code,t.message,e):t}}function Ut(e,t){return Number.isNaN(e)&&Nt(`The result is undefined.`,t,`expression-domain`),Number.isFinite(e)||Nt(`The result is not a finite number.`,t,`expression-number`),e}function Wt(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=n[e].codePointAt(0),i=r[e].codePointAt(0);if(t!==i)return t<i?-1:1}return n.length===r.length?0:n.length<r.length?-1:1}function Gt(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n+=1)if(e[n]!==t[n])return!1;return!0}return!1}function Kt(e,t){return qt(e,t,{steps:0},1)}function qt(e,t,n,r){switch(n.steps+=1,n.steps>pt&&Nt(`Expression evaluation exceeded the step limit.`,e.start,`expression-budget`),r>mt&&Nt(`Expression evaluation is nested too deeply.`,e.start,`expression-budget`),e.kind){case`literal`:return e.value;case`reference`:return It(t,e.name,e.start);case`unary`:{let i=qt(e.operand,t,n,r+1);if(e.operator===`!`)return!Rt(i,e.start,`Logical not requires a boolean`);let a=Lt(i,e.start,`Unary ${e.operator} requires a number`);return Ut(e.operator===`-`?-a:a,e.start)}case`binary`:{if(e.operator===`&&`||e.operator===`||`){let i=Rt(qt(e.left,t,n,r+1),e.start,`Logical operators require booleans`);return e.operator===`&&`&&!i?!1:e.operator===`||`&&i?!0:Rt(qt(e.right,t,n,r+1),e.start,`Logical operators require booleans`)}let i=qt(e.left,t,n,r+1),a=qt(e.right,t,n,r+1);switch(e.operator){case`+`:if(typeof i==`number`&&typeof a==`number`)return Ut(i+a,e.start);if(typeof i==`string`&&typeof a==`string`){let t=i+a;return t.length>ht&&Nt(`String result exceeds the length limit.`,e.start,`expression-budget`),t}Nt(`Operator "+" requires two numbers or two strings.`,e.start,`expression-type`);case`-`:case`*`:case`/`:case`%`:{let t=Lt(i,e.start,`Operator "${e.operator}" requires a number`),n=Lt(a,e.start,`Operator "${e.operator}" requires a number`);return(e.operator===`/`||e.operator===`%`)&&n===0&&Nt(`Division by zero.`,e.start,`expression-divide-by-zero`),Ut(e.operator===`-`?t-n:e.operator===`*`?t*n:e.operator===`/`?t/n:t%n,e.start)}case`==`:case`!=`:{let t=kt(i),n=kt(a);t!==n&&t!==`null`&&n!==`null`&&Nt(`Equality comparison requires matching types.`,e.start,`expression-type`);let r=Gt(i,a);return e.operator===`==`?r:!r}case`<`:case`<=`:case`>`:case`>=`:{let t;return typeof i==`number`&&typeof a==`number`?t=i===a?0:i<a?-1:1:typeof i==`string`&&typeof a==`string`?t=Wt(i,a):Nt(`Comparison operator "${e.operator}" requires two numbers or two strings.`,e.start,`expression-type`),e.operator===`<`?t<0:e.operator===`<=`?t<=0:e.operator===`>`?t>0:t>=0}}break}case`conditional`:return qt(Rt(qt(e.test,t,n,r+1),e.start,`Conditional test must be a boolean`)?e.consequent:e.alternate,t,n,r+1);case`array`:{let i=[];for(let a of e.elements)i.push(qt(a,t,n,r+1));return Vt(i,e.start)}case`index`:{let i=qt(e.target,t,n,r+1),a=Lt(qt(e.index,t,n,r+1),e.start,`Array index must be a number`);return Number.isSafeInteger(a)||Nt(`Array index must be a finite integer.`,e.start,`expression-index`),Array.isArray(i)||Nt(`Index access requires an array.`,e.start,`expression-type`),a<0||a>=i.length?null:i[a]}case`call`:{let i=e.args.map(e=>qt(e,t,n,r+1));switch(e.name){case`abs`:case`sqrt`:case`floor`:case`ceil`:case`round`:case`sin`:case`cos`:case`tan`:case`asin`:case`acos`:case`atan`:case`exp`:case`log`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);e.name===`sqrt`&&t<0&&Nt(`sqrt requires a non-negative argument.`,e.start,`expression-domain`),e.name===`log`&&t<=0&&Nt(`log requires a positive argument.`,e.start,`expression-domain`),(e.name===`asin`||e.name===`acos`)&&(t<-1||t>1)&&Nt(`${e.name} requires an argument between -1 and 1.`,e.start,`expression-domain`);let n;switch(e.name){case`abs`:n=Math.abs(t);break;case`sqrt`:n=Math.sqrt(t);break;case`floor`:n=Math.floor(t);break;case`ceil`:n=Math.ceil(t);break;case`round`:n=Math.round(t);break;case`sin`:n=Math.sin(t);break;case`cos`:n=Math.cos(t);break;case`tan`:n=Math.tan(t);break;case`asin`:n=Math.asin(t);break;case`acos`:n=Math.acos(t);break;case`atan`:n=Math.atan(t);break;case`exp`:n=Math.exp(t);break;default:n=Math.log(t)}return Ut(n,e.start)}case`min`:case`max`:{let t=Lt(i[0],e.start,`Function ${e.name} requires a number`);for(let n=1;n<i.length;n+=1){let r=Lt(i[n],e.start,`Function ${e.name} requires a number`);t=e.name===`min`?Math.min(t,r):Math.max(t,r)}return Ut(t,e.start)}case`pow`:return Ut(Lt(i[0],e.start,`Function pow requires a number`)**+Lt(i[1],e.start,`Function pow requires a number`),e.start);case`clamp`:{let t=Lt(i[0],e.start,`Function clamp requires a number`),n=Lt(i[1],e.start,`Function clamp requires a number`),r=Lt(i[2],e.start,`Function clamp requires a number`);return n>r&&Nt(`clamp lower bound cannot exceed upper bound.`,e.start,`expression-domain`),Ut(Math.min(r,Math.max(n,t)),e.start)}case`len`:{let t=i[0];if(typeof t==`string`)return nt(t);if(Array.isArray(t))return t.length;Nt(`Function len requires a string or array.`,e.start,`expression-type`)}case`contains`:{let t=i[0],n=i[1];if(typeof t==`string`)return t.includes(zt(n,e.start,`Function contains requires a string member`));if(Array.isArray(t)){if(typeof n==`string`){for(let n of t)typeof n!=`string`&&Nt(`Function contains requires a string member for a string array.`,e.start,`expression-type`);return t.includes(n)}if(typeof n==`number`&&Number.isFinite(n)){for(let n of t)typeof n!=`number`&&Nt(`Function contains requires a numeric member for a numeric array.`,e.start,`expression-type`);return t.includes(n)}Nt(`Function contains requires a string or numeric member.`,e.start,`expression-type`)}Nt(`Function contains requires a string or array.`,e.start,`expression-type`)}case`sum`:{let t=Bt(i[0],e.start,`Function sum requires a numeric array`);return Ht(e.start,()=>ge(t))}case`average`:{let t=Bt(i[0],e.start,`Function average requires a numeric array`);return Ht(e.start,()=>_e(t))}case`minOf`:{let t=Bt(i[0],e.start,`Function minOf requires a numeric array`);return Ht(e.start,()=>ve(t))}case`maxOf`:{let t=Bt(i[0],e.start,`Function maxOf requires a numeric array`);return Ht(e.start,()=>ye(t))}case`formatNumber`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatNumber requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatNumber requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatNumber requires a string locale`),a=i[3]===void 0||Rt(i[3],e.start,`Function formatNumber requires a boolean grouping flag`);return Ht(e.start,()=>fe(t,n,r,a))}case`formatPercent`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatPercent requires a number or null`),n=i[1]===void 0?0:Lt(i[1],e.start,`Function formatPercent requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatPercent requires a string locale`);return Ht(e.start,()=>pe(t,n,r))}case`formatScientific`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatScientific requires a number or null`),n=i[1]===void 0?2:Lt(i[1],e.start,`Function formatScientific requires numeric fraction digits`),r=i[2]===void 0?`en-US`:zt(i[2],e.start,`Function formatScientific requires a string locale`);return Ht(e.start,()=>me(t,n,r))}case`formatCurrency`:{let t=i[0]===null?null:Lt(i[0],e.start,`Function formatCurrency requires a number or null`),n=i[1]===void 0?`USD`:zt(i[1],e.start,`Function formatCurrency requires a string currency code`),r=i[2]===void 0?2:Lt(i[2],e.start,`Function formatCurrency requires numeric fraction digits`),a=i[3]===void 0?`en-US`:zt(i[3],e.start,`Function formatCurrency requires a string locale`);return Ht(e.start,()=>I(t,n,r,a))}case`trim`:return Ht(e.start,()=>Se(zt(i[0],e.start,`Function trim requires a string`)));case`lower`:return Ht(e.start,()=>Ce(zt(i[0],e.start,`Function lower requires a string`)));case`upper`:return Ht(e.start,()=>we(zt(i[0],e.start,`Function upper requires a string`)));case`startsWith`:return Ht(e.start,()=>Te(zt(i[0],e.start,`Function startsWith requires a string`),zt(i[1],e.start,`Function startsWith requires a string search value`)));case`endsWith`:return Ht(e.start,()=>Ee(zt(i[0],e.start,`Function endsWith requires a string`),zt(i[1],e.start,`Function endsWith requires a string search value`)));case`replace`:{let t=zt(i[0],e.start,`Function replace requires a string`),n=zt(i[1],e.start,`Function replace requires a string search value`),r=zt(i[2],e.start,`Function replace requires a string replacement`);return Ht(e.start,()=>De(t,n,r))}case`slice`:{let t=zt(i[0],e.start,`Function slice requires a string`),n=Lt(i[1],e.start,`Function slice requires a numeric start index`),r=i[2]===void 0?void 0:Lt(i[2],e.start,`Function slice requires a numeric end index`);return Ht(e.start,()=>ke(t,n,r))}case`dateCompare`:{let t=zt(i[0],e.start,`Function dateCompare requires a date string`),n=zt(i[1],e.start,`Function dateCompare requires a date string`);return Ht(e.start,()=>Ne(t,n))}case`dateDiff`:{let t=zt(i[0],e.start,`Function dateDiff requires a date string`),n=zt(i[1],e.start,`Function dateDiff requires a date string`),r=i[2]===void 0?`days`:zt(i[2],e.start,`Function dateDiff requires a string unit`);return Ht(e.start,()=>Pe(t,n,r))}}break}}throw new R(`expression-eval`,`Unsupported expression.`,0)}var Jt=new Map;function Yt(e){if(typeof e!=`string`)throw new R(`expression-syntax`,`Expression must be a string.`,0);if(e.length>lt)throw new R(`expression-budget`,`Expression exceeds the ${lt}-character limit.`,0);let t=Jt.get(e);if(t)return t;let n=new Dt(e),r=n.parse(),i=[...n.dependencies],a=Object.freeze({source:e,dependencies:i,evaluate(e){return Kt(r,e)},inferType(e){return Mt(r,e)}});if(Jt.size>=_t){let e=Jt.keys().next().value;e!==void 0&&Jt.delete(e)}return Jt.set(e,a),a}function Xt(e){if(e.length>gt)throw new R(`expression-budget`,`Interpolation template exceeds the length limit.`,0);let t=[],n=0;for(;;){let r=e.indexOf(`{{`,n);if(r<0){n<e.length&&t.push({kind:`text`,value:e.slice(n)});break}r>n&&t.push({kind:`text`,value:e.slice(n,r)});let i=r+2,a=``,o=!1;for(;i<e.length;){let t=e[i];if(a!==``){if(t===`\\`){i+=2;continue}t===a&&(a=``),i+=1}else if(t===`"`||t===`'`)a=t,i+=1;else{if(t===`{`&&e[i+1]===`{`)throw new R(`expression-interpolation`,`Interpolations cannot be nested.`,i);if(t===`}`&&e[i+1]===`}`){o=!0;break}i+=1}}if(!o)throw new R(`expression-interpolation`,`Interpolation is missing }}.`,r);let s=e.slice(r+2,i);if(s.trim()===``)throw new R(`expression-empty`,`Interpolation expression is empty.`,r+2);t.push({kind:`expression`,source:s,start:r+2}),n=i+2}return t}function Zt(e){try{return Yt(e.source)}catch(t){throw t instanceof R?new R(t.code,t.message,e.start+t.offset):t}}function Qt(e,t,n){try{return e.evaluate(t)}catch(e){throw e instanceof R?new R(e.code,e.message,n+e.offset):e}}function $t(e,t){if(e===null)return``;if(typeof e==`string`)return e;if(typeof e==`number`){if(!Number.isFinite(e))throw new R(`expression-value`,`Cannot display a non-finite number.`,t);return String(e)}if(typeof e==`boolean`)return e?`true`:`false`;throw Array.isArray(e)?new R(`expression-type`,`Cannot insert an array as text; convert it with a function such as len first.`,t):new R(`expression-type`,`Cannot display this value as text.`,t)}function en(e,t){let n=[],r=0;for(let i of e){let e;if(e=i.kind===`text`?i.value:$t(Qt(Zt(i),t,i.start),i.start),r+=e.length,r>ht)throw new R(`expression-budget`,`Interpolation result exceeds the length limit.`,0);n.push(e)}return n.join(``)}function tn(e,t){if(typeof e!=`string`)throw new R(`expression-interpolation`,`Interpolation template must be a string.`,0);if(e.length>gt)throw new R(`expression-budget`,`Interpolation template exceeds the ${gt}-character limit.`,0);return e.includes(`{{`)?en(Xt(e),t):e}function nn(e){if(typeof e!=`string`)throw new R(`expression-interpolation`,`Interpolation template must be a string.`,0);let t=new Set;for(let n of Xt(e))if(n.kind===`expression`)for(let e of Zt(n).dependencies)t.add(e);return[...t]}var B=class extends Error{code;offset;constructor(e,t,n=0){super(t),this.name=`LatexError`,this.code=e,this.offset=n}},rn=5e4,an=2e4,on=5e3,sn=120,cn=2e4,ln=1e3,un=2e3,dn=5,fn=1e6,pn=new Set([`quad`,`qquad`,`enspace`,`thinspace`,`medspace`,`thickspace`,`negthinspace`,`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),mn={alpha:`alpha`,beta:`beta`,gamma:`gamma`,theta:`theta`,omega:`omega`,lambda:`lambda`,mu:`mu`,sigma:`sigma`},hn=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`]),gn={"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`};function _n(e){let t=[],n=0,r=(e,n,r)=>{if(t.length>=an)throw new B(`latex-budget`,`Math input contains too many tokens.`,r);t.push({kind:e,value:n,offset:r})};for(;n<e.length;){let t=e[n];if(t===` `||t===` `||t===`\r`||t===`
12
+ `)n+=1;else if(t===`%`)for(;n<e.length&&e[n]!==`
13
+ `;)n+=1;else if(t===`\\`){if(n+1>=e.length)throw new B(`latex-syntax`,`Formula ends with a lone backslash.`,n);let t=e[n+1];if(t===`\\`){r(`command`,`newline`,n),n+=2;continue}if(/[A-Za-z]/.test(t)){let t=n+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;let i=e.slice(n+1,t);pn.has(i)||r(`command`,i,n),n=t;continue}if(t===` `||t===`,`||t===`;`||t===`:`||t===`!`){n+=2;continue}let i=gn[t];if(i){r(`command`,i,n),n+=2;continue}r(`command`,t,n),n+=2}else if(t>=`0`&&t<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else if(t===`.`&&e[n+1]>=`0`&&e[n+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(n));r(`number`,t[0],n),n+=t[0].length}else/[A-Za-z]/.test(t)?(r(`letter`,t,n),n+=1):(r(`punct`,t,n),n+=1)}return r(`eof`,``,e.length),t}function vn(e){return Object.prototype.hasOwnProperty.call(mn,e)}function yn(e){switch(e.kind){case`number`:case`letter`:return!0;case`punct`:return e.value===`(`||e.value===`{`||e.value===`[`||e.value===`|`;case`command`:{let t=e.value;return hn.has(t)||vn(t)?!0:t===`frac`||t===`dfrac`||t===`tfrac`||t===`sqrt`||t===`left`||t===`pi`||t===`mathrm`||t===`begin`||t===`lvert`||t===`vert`||t===`lbrace`}default:return!1}}function bn(e){if(e.kind===`punct`)return e.value===`=`?`eq`:e.value===`<`?`lt`:e.value===`>`?`gt`:null;if(e.kind===`command`){if(e.value===`ne`||e.value===`neq`)return`ne`;if(e.value===`le`||e.value===`leq`)return`le`;if(e.value===`ge`||e.value===`geq`)return`ge`}return null}var xn=class{tokens;source;pos=0;nodes=0;constructor(e,t){this.source=e,this.tokens=t}parseDocument(){if(this.peek().kind===`eof`)throw new B(`latex-empty`,`Formula is empty.`,0);if(this.atLetter(`y`)&&this.atPunctAt(1,`=`)&&(this.pos+=2),this.peek().kind===`eof`)throw new B(`latex-empty`,`Missing expression after y.`,this.peek().offset);let e=this.parseAdditive(0),t=this.peek();if(t.kind!==`eof`)throw bn(t)||t.kind===`punct`&&t.value===`=`?new B(`latex-relation`,`Plots support only explicit y = f(x) equations.`,t.offset):new B(`latex-syntax`,`Unexpected token "${this.raw(t)}".`,t.offset);return e}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atPunctAt(e,t){let n=this.peek(e);return n.kind===`punct`&&n.value===t}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}atLetter(e){let t=this.peek();return t.kind===`letter`&&t.value===e}expectPunct(e){let t=this.peek();if(t.kind!==`punct`||t.value!==e)throw new B(`latex-syntax`,`Missing "${e}".`,t.offset);return this.take()}raw(e){return e.kind===`eof`?`end of input`:e.kind===`command`?`\\${e.value}`:this.source.slice(e.offset,e.offset+Math.max(1,e.value.length))}make(e,t,n){if(this.nodes+=1,this.nodes>on)throw new B(`latex-budget`,`Formula is too complex.`,t);if(n>sn)throw new B(`latex-budget`,`Formula is nested too deeply.`,t);return e}parseAdditive(e){let t=this.parseMultiplicative(e+1,!1);for(;;){let n=this.peek();if(n.kind!==`punct`||n.value!==`+`&&n.value!==`-`)break;let r=this.take().value,i=this.parseMultiplicative(e+1,!1);t=this.make({kind:`binary`,op:r,left:t,right:i,offset:n.offset},n.offset,e)}return t}parseMultiplicative(e,t){let n=this.parseUnary(e+1,t);for(;;){let r=this.peek();if(r.kind===`punct`&&r.value===`/`){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`/`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(r.kind===`punct`&&r.value===`*`||r.kind===`command`&&(r.value===`cdot`||r.value===`times`)){this.take();let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e);continue}if(t&&r.kind===`command`&&hn.has(r.value)||!yn(r))break;let i=this.parseUnary(e+1,t);n=this.make({kind:`binary`,op:`*`,left:n,right:i,offset:r.offset},r.offset,e)}return n}parseUnary(e,t){let n=this.peek();if(n.kind===`punct`&&(n.value===`+`||n.value===`-`)){this.take();let r=this.parseUnary(e+1,t);return n.value===`+`?r:this.make({kind:`unary`,op:`-`,operand:r,offset:n.offset},n.offset,e)}return this.parsePower(e,t)}parsePower(e,t){let n=this.parseAtom(e+1,t),r=this.peek();if(r.kind===`punct`&&r.value===`^`){this.take();let t=this.parseScriptArgument(e+1);return this.make({kind:`binary`,op:`^`,left:n,right:t,offset:r.offset},r.offset,e)}return n}parseScriptArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.atPunct(`+`)||this.atPunct(`-`)){let t=this.take(),n=this.parseUnary(e+1,!1);return t.value===`+`?n:this.make({kind:`unary`,op:`-`,operand:n,offset:t.offset},t.offset,e)}return this.parseUnary(e+1,!1)}parseAtom(e,t){let n=this.peek();if(n.kind===`number`){this.take();let t=Number(n.value);if(!Number.isFinite(t))throw new B(`latex-number`,`Number "${n.value}" is not finite.`,n.offset);return this.make({kind:`number`,value:t,offset:n.offset},n.offset,e)}if(n.kind===`letter`)return this.take(),this.variable(n.value,n.offset,e);if(n.kind===`punct`){if(n.value===`(`)return this.parseParenthesized(e);if(n.value===`{`)return this.parseBraceGroup(e);if(n.value===`[`)return this.parseBracketGroup(e);if(n.value===`|`)return this.parsePlainAbs(e,n.offset);throw new B(`latex-syntax`,`Cannot start an expression with "${n.value}".`,n.offset)}if(n.kind===`command`){let t=n.value;if(t===`frac`||t===`dfrac`||t===`tfrac`){this.take();let t=this.parseArgument(e+1),r=this.parseArgument(e+1);return this.make({kind:`binary`,op:`/`,left:t,right:r,offset:n.offset},n.offset,e)}if(t===`sqrt`){this.take();let t=null;this.atPunct(`[`)&&(this.take(),t=this.parseAdditive(e+1),this.expectPunct(`]`));let r=this.parseArgument(e+1);return this.make({kind:`call`,name:`sqrt`,args:[r],base:t,power:null,offset:n.offset},n.offset,e)}if(t===`left`)return this.parseLeft(e);if(hn.has(t))return this.parseFunction(t,e);if(t===`pi`)return this.take(),this.make({kind:`constant`,value:`pi`,offset:n.offset},n.offset,e);if(vn(t))return this.take(),this.variable(mn[t],n.offset,e);if(t===`mathrm`){this.take();let t=this.readRawGroup();if(!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t.raw))throw new B(`latex-name`,`\\mathrm requires a valid parameter name.`,t.offset);return this.variable(t.raw,n.offset,e)}if(t===`begin`)return this.parseCases(e);if(t===`lvert`||t===`vert`)return this.parseCommandAbs(e,n.offset);throw t===`right`?new B(`latex-syntax`,`\\right has no matching \\left.`,n.offset):t===`text`?new B(`latex-unsupported`,`\\text is only allowed as the otherwise condition of a piecewise function.`,n.offset):new B(`latex-unsupported`,`Command \\${t} is not supported for computation.`,n.offset)}throw new B(`latex-syntax`,`Expression is incomplete.`,n.offset)}parseArgument(e){if(this.atPunct(`{`))return this.parseBraceGroup(e+1);if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`Command is missing an argument.`,this.peek().offset);return this.parseUnary(e+1,!1)}parseParenthesized(e){let t=this.expectPunct(`(`);if(this.atPunct(`)`))throw new B(`latex-syntax`,`Missing expression inside parentheses.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`)`),n}parseBraceGroup(e){let t=this.expectPunct(`{`);if(this.atPunct(`}`))throw new B(`latex-syntax`,`Missing expression inside braces.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`}`),n}parseBracketGroup(e){let t=this.expectPunct(`[`);if(this.atPunct(`]`))throw new B(`latex-syntax`,`Missing expression inside brackets.`,t.offset);let n=this.parseAdditive(e+1);return this.expectPunct(`]`),n}parsePlainAbs(e,t){if(this.take(),this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atPunct(`|`))this.take();else if(this.atCommand(`rvert`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseCommandAbs(e,t){if(this.take(),this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))throw new B(`latex-syntax`,`Absolute value is missing its contents.`,t);let n=this.parseAdditive(e+1);if(this.atCommand(`rvert`)||this.atCommand(`vert`)||this.atPunct(`|`))this.take();else throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t);return this.make({kind:`abs`,value:n,offset:t},t,e)}parseLeft(e){let t=this.take(),n=this.readDelimiter(),r=this.parseAdditive(e+1);if(!this.atCommand(`right`))throw new B(`latex-syntax`,`\\left has no matching \\right.`,t.offset);this.take();let i=this.readDelimiter();if(n===`|`&&i!==`|`)throw new B(`latex-syntax`,`Unpaired absolute value bar.`,t.offset);return n===`|`?this.make({kind:`abs`,value:r,offset:t.offset},t.offset,e):r}readDelimiter(){let e=this.peek();if(e.kind===`punct`&&(e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`||e.value===`.`))return this.take(),e.value;if(e.kind===`command`&&(e.value===`lbrace`||e.value===`rbrace`||e.value===`lvert`||e.value===`rvert`||e.value===`vert`||e.value===`Vert`))return this.take(),e.value===`lbrace`||e.value===`rbrace`?`{`:e.value===`lvert`||e.value===`rvert`||e.value===`vert`?`|`:`Vert`;throw new B(`latex-syntax`,`Missing delimiter after \\left/\\right.`,e.offset)}variable(e,t,n){if(e===`y`)throw new B(`latex-name`,`y is the plot output marker and cannot appear in the expression.`,t);return e===`e`||e===`pi`?this.make({kind:`constant`,value:e,offset:t},t,n):this.make({kind:`variable`,name:e,offset:t},t,n)}parseFunction(e,t){let n=this.take().offset,r=null,i=null;e===`log`&&this.atPunct(`_`)&&(this.take(),r=this.parseScriptArgument(t+1)),this.atPunct(`^`)&&(this.take(),i=this.parseScriptArgument(t+1));let a=[];if((e===`min`||e===`max`)&&this.atPunct(`(`)){if(this.take(),this.atPunct(`)`))throw new B(`latex-syntax`,`\\${e} requires at least one argument.`,n);for(a.push(this.parseAdditive(t+1));this.atPunct(`,`);)this.take(),a.push(this.parseAdditive(t+1));this.expectPunct(`)`)}else a.push(this.parseFunctionArgument(t+1));return this.make({kind:`call`,name:e,args:a,base:r,power:i,offset:n},n,t)}parseFunctionArgument(e){if(this.atPunct(`(`)){this.take();let t=this.parseAdditive(e+1);return this.expectPunct(`)`),t}return this.parseMultiplicative(e+1,!0)}parseCases(e){let t=this.take(),n=this.readRawGroup();if(n.raw.trim()!==`cases`)throw new B(`latex-unsupported`,`Environment "${n.raw.trim()}" is not supported.`,n.offset);let r=[];for(;!this.atCommand(`end`);){if(this.peek().kind===`eof`)throw new B(`latex-syntax`,`cases environment is missing \\end{cases}.`,t.offset);if(this.atCommand(`newline`)){this.take();continue}let n=this.parseAdditive(e+1);this.atPunct(`,`)&&this.take();let i=null;if(this.atPunct(`&`)&&(this.take(),i=this.parseCaseCondition(e+1),this.atPunct(`,`)&&this.take()),r.push({value:n,when:i}),this.atCommand(`newline`)){this.take();continue}if(this.atCommand(`end`))break;let a=this.peek();throw new B(`latex-syntax`,`Unexpected "${this.raw(a)}" after a cases branch.`,a.offset)}let i=this.take();if(this.readRawGroup().raw.trim()!==`cases`)throw new B(`latex-syntax`,`\\begin{cases} must be closed with \\end{cases}.`,i.offset);if(r.length===0)throw new B(`latex-syntax`,`cases environment has no branches.`,t.offset);return this.make({kind:`cases`,branches:r,offset:t.offset},t.offset,e)}parseCaseCondition(e){if(this.atCommand(`text`)){let e=this.take(),t=this.readRawGroup();if(t.raw.trim()!==`otherwise`)throw new B(`latex-unsupported`,`Unsupported piecewise condition text "${t.raw.trim()}".`,e.offset);return null}let t=this.parseAdditive(e+1),n=this.peek(),r=bn(n);if(!r)throw new B(`latex-syntax`,`Piecewise condition requires one comparison.`,n.offset);return this.take(),{op:r,left:t,right:this.parseAdditive(e+1)}}readRawGroup(){let e=this.expectPunct(`{`),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)throw new B(`latex-syntax`,`Unclosed brace.`,e.offset);let r=this.tokens[n];return this.pos=n+1,{raw:this.source.slice(e.offset+1,r.offset),offset:e.offset+1}}};function Sn(e,t){switch(e.kind){case`variable`:e.name!==`x`&&t.add(e.name);return;case`number`:case`constant`:return;case`unary`:Sn(e.operand,t);return;case`binary`:Sn(e.left,t),Sn(e.right,t);return;case`abs`:Sn(e.value,t);return;case`call`:e.base&&Sn(e.base,t),e.power&&Sn(e.power,t);for(let n of e.args)Sn(n,t);return;case`cases`:for(let n of e.branches)Sn(n.value,t),n.when&&(Sn(n.when.left,t),Sn(n.when.right,t));return}}function Cn(e,t,n){throw new B(e,t,n)}function wn(e,t){return Number.isFinite(e)||Cn(`latex-number`,`Result is not finite.`,t),e}function Tn(e,t,n){if(e===`x`)return t.x;let r=t.env[e];return r===void 0&&!Object.prototype.hasOwnProperty.call(t.env,e)&&Cn(`latex-variable`,`Parameter "${e}" is not declared.`,n),typeof r==`number`&&Number.isFinite(r)||Cn(`latex-type`,`Parameter "${e}" must be a finite number.`,n),r}function En(e,t,n){return e===0&&t<0&&Cn(`latex-divide-by-zero`,`Negative powers of zero are undefined.`,n),e<0&&!Number.isInteger(t)&&Cn(`latex-domain`,`A negative base with a non-integer exponent is not real.`,n),wn(e**+t,n)}function Dn(e,t,n){let r=t??2;return(!Number.isFinite(r)||r<=0)&&Cn(`latex-domain`,`Root index must be positive.`,n),e<0?(Number.isInteger(r)&&r%2!=0||Cn(`latex-domain`,`A negative number has no real even root.`,n),wn(r===3?-Math.cbrt(-e):-((-e)**(1/r)),n)):wn(e**(1/r),n)}function On(e,t){let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`eq`:return n===r;case`ne`:return n!==r;case`lt`:return n<r;case`le`:return n<=r;case`gt`:return n>r;case`ge`:return n>=r;default:return!1}}function kn(e,t){let n=e.args.map(e=>An(e,t)),r=0;switch(e.name){case`sin`:r=Math.sin(n[0]);break;case`cos`:r=Math.cos(n[0]);break;case`tan`:Math.abs(Math.cos(n[0]))<1e-15&&Cn(`latex-domain`,`tan is undefined at this point.`,e.offset),r=Math.tan(n[0]);break;case`arcsin`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arcsin argument must be in [-1, 1].`,e.offset),r=Math.asin(n[0]);break;case`arccos`:(n[0]<-1||n[0]>1)&&Cn(`latex-domain`,`arccos argument must be in [-1, 1].`,e.offset),r=Math.acos(n[0]);break;case`arctan`:r=Math.atan(n[0]);break;case`exp`:r=Math.exp(n[0]);break;case`ln`:n[0]<=0&&Cn(`latex-domain`,`ln argument must be positive.`,e.offset),r=Math.log(n[0]);break;case`log`:{let i=e.base?An(e.base,t):10;(i<=0||i===1)&&Cn(`latex-domain`,`Logarithm base must be positive and not equal to 1.`,e.offset),n[0]<=0&&Cn(`latex-domain`,`Logarithm argument must be positive.`,e.offset),r=Math.log(n[0])/Math.log(i);break}case`min`:r=Math.min(...n);break;case`max`:r=Math.max(...n);break;case`sqrt`:r=Dn(n[0],e.base?An(e.base,t):null,e.offset);break;default:Cn(`latex-unsupported`,`Unsupported function.`,e.offset)}return e.power&&(r=En(r,An(e.power,t),e.offset)),wn(r,e.offset)}function An(e,t){let n=e.offset;t.steps+=1,t.depth+=1;try{switch(t.steps>t.limit&&Cn(`latex-budget`,`Math evaluation exceeded its budget.`,n),t.depth>ln&&Cn(`latex-budget`,`Math evaluation is nested too deeply.`,n),e.kind){case`number`:return e.value;case`constant`:return e.value===`pi`?Math.PI:Math.E;case`variable`:return Tn(e.name,t,e.offset);case`unary`:{let n=An(e.operand,t);return e.op===`-`?-n:n}case`binary`:{let n=An(e.left,t),r=An(e.right,t);switch(e.op){case`+`:return wn(n+r,e.offset);case`-`:return wn(n-r,e.offset);case`*`:return wn(n*r,e.offset);case`/`:return r===0&&Cn(`latex-divide-by-zero`,`Division by zero.`,e.offset),wn(n/r,e.offset);case`^`:return En(n,r,e.offset)}break}case`abs`:return wn(Math.abs(An(e.value,t)),e.offset);case`call`:return kn(e,t);case`cases`:for(let n of e.branches)if(n.when===null||On(n.when,t))return An(n.value,t);Cn(`latex-undefined`,`No piecewise branch matched.`,e.offset)}Cn(`latex-unsupported`,`Cannot compute this math structure.`,n)}finally{--t.depth}}var jn=new Map;function Mn(e){if(typeof e!=`string`)throw new B(`latex-syntax`,`Math source must be a string.`,0);if(e.length>rn)throw new B(`latex-budget`,`Formula exceeds the length limit.`,rn);let t=jn.get(e);if(t)return t;let n=new xn(e,_n(e)).parseDocument(),r=new Set;Sn(n,r);let i={source:e,dependencies:[...r],evaluate(e,t,r){if(typeof e!=`number`||!Number.isFinite(e))throw new B(`latex-variable`,`Plot input x must be a finite number.`,0);let i={x:e,env:t??{},steps:r?.steps??0,limit:r?.limit??cn,depth:0};try{return An(n,i)}finally{r&&(r.steps=i.steps)}}};return jn.size>=512&&jn.clear(),jn.set(e,i),i}function Nn(e,t,n,r){try{return e.evaluate(t,n,r)}catch(e){if(e instanceof B){if(e.code===`latex-budget`)throw e;return null}throw e}}function Pn(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t);return t[Math.floor(t.length/2)]}function Fn(e,t,n,r,i,a){let o=n-e;if(!(o>0))return!1;let s=0,c=0;for(let i=1;i<=dn;i+=1){let l=1<<i,u=o/l,d=t,f=0;for(let t=1;t<=l;t+=1){let i=t===l?n:e+t*u,o=t===l?r:a(i);if(o===null)return!0;let s=Math.abs(o-d)/u;s>f&&(f=s),d=o}i===2&&(s=f),c=f}return c>Math.max(s*6,i*12,1e-9)}function In(e,t,n,r,i=200,a){if(!Number.isFinite(n)||!Number.isFinite(r))throw new B(`latex-plot-range`,`Plot min/max must be finite numbers.`,0);if(!(n<r))throw new B(`latex-plot-range`,`Plot min must be less than max.`,0);if(!Number.isInteger(i)||i<2||i>un)throw new B(`latex-plot-samples`,`Sample count must be an integer between 2 and ${un}.`,0);let o={steps:0,limit:Math.max(fn,i*1024)},s=n=>{let r=o.limit-o.steps,i=a?Number.isFinite(a.limit)&&Number.isFinite(a.steps)?a.limit-a.steps:0:1/0,s={steps:0,limit:Math.max(0,Math.min(r,i))};try{return Nn(e,n,t,s)}finally{o.steps+=s.steps,a&&(a.steps=Number.isFinite(a.steps)?a.steps+s.steps:s.steps)}},c=(r-n)/(i-1),l=[];for(let e=0;e<i;e+=1){let t=e===i-1?r:n+e*c;l.push({x:t,y:s(t)})}let u=l.map(e=>e.y).filter(e=>e!==null).map(e=>Math.abs(e)),d=Math.max(1e-9,Pn(u)*8);for(let e=1;e<l.length-1;e+=1){let t=l[e-1].y,n=l[e].y,r=l[e+1].y;t!==null&&n!==null&&r!==null&&Math.abs(n)>Math.max(1,Math.abs(t),Math.abs(r))*100&&Math.abs(n)>d&&(l[e]={x:l[e].x,y:null})}let f=l.length-1,p=l[f].y,m=f>0?l[f-1].y:null;p!==null&&m!==null&&Math.abs(p)>Math.max(1,Math.abs(m))*100&&Math.abs(p)>d&&(p=null,l[f]={x:l[f].x,y:null});let h=[],g=[];for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1];if(t.y===null||n.y===null)continue;let r=Math.abs(n.y-t.y);h.push(r);let i=n.x-t.x;i>0&&g.push(r/i)}let _=Pn(h),v=Pn(g);for(let e=0;e<l.length-1;e+=1){let t=l[e],n=l[e+1],r=t.y,i=n.y;if(r===null||i===null)continue;let a=()=>{l[e+1]={x:n.x,y:null}},o=s(t.x+(n.x-t.x)/2);if(o===null){a();continue}let c=Math.abs(i-r);(Math.abs(o-(r+i)/2)>Math.max(c*.25,_*.4,1e-9)||c>Math.max(_*16,1e-9))&&Fn(t.x,r,n.x,i,v,e=>s(e))&&a()}return{points:l,endpoint:p}}var Ln=new Map,Rn=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]),zn=new WeakMap,Bn=new WeakMap;function Vn(e){let t=e.snapshot().revision,n=Bn.get(e);if(n?.revision===t)return n.tokens;let r=new Map,i=t=>{let n=e.resetToken(t);for(let e of t.children??[])n+=i(e);return r.set(t.id,n),n};for(let t of e.document.nodes)i(t);return Bn.set(e,{revision:t,tokens:r}),r}function Hn(e,t){for(let n of t)e.add(n)}function Un(e){let t=zn.get(e);if(t!==void 0)return t;let n=e.dependencies;if(n!==void 0){let t=new Map(Object.entries(n));return zn.set(e,t),t}let r=new Map,i=t=>{let n=new Set,a=!1;if(t.attrs!==void 0)for(let e of Object.values(t.attrs))try{Hn(n,nn(e))}catch{a=!0;break}if(!a){if(t.type===`interpolation`)try{Hn(n,Yt(t.value??``).dependencies)}catch{a=!0}else if(t.type===`math`)try{Hn(n,Mn(t.value??``).dependencies)}catch{a=!0}else if(t.name!==void 0){if(t.name===`table`||t.name===`chart`)(t.attrs?.key??``).trim()!==``&&n.add(x(t));else if(t.name===`diagram`)n.add(x(t));else if(t.name===`plot`)for(let e of t.children??[]){if(e.type!==`inlineMath`)continue;let t=(e.value??``).trim();if(/^y\s*=/u.test(t))try{Hn(n,Mn(t).dependencies)}catch{}}else if(!Rn.has(t.name)){n.add(x(t));let r=e.bindingSlots?.[t.id];if(r!==void 0)for(let e of Object.values(r))n.add(e)}}}let o=!1;for(let e of t.children??[]){let t=i(e);t===null?o=!0:Hn(n,t)}let s=a||o?null:[...n];return r.set(t.id,s),s};for(let t of e.nodes)i(t);return zn.set(e,r),r}function Wn(e){if(e.dependencies!==void 0)return;let t=Un(e),n=Object.create(null);for(let[e,r]of t)n[e]=r===null?null:Object.freeze([...r]);e.dependencies=Object.freeze(n)}var Gn=new Set(`aliceblue.antiquewhite.aqua.aquamarine.azure.beige.bisque.black.blanchedalmond.blue.blueviolet.brown.burlywood.cadetblue.chartreuse.chocolate.coral.cornflowerblue.cornsilk.crimson.cyan.darkblue.darkcyan.darkgoldenrod.darkgray.darkgreen.darkgrey.darkkhaki.darkmagenta.darkolivegreen.darkorange.darkorchid.darkred.darksalmon.darkseagreen.darkslateblue.darkslategray.darkslategrey.darkturquoise.darkviolet.deeppink.deepskyblue.dimgray.dimgrey.dodgerblue.firebrick.floralwhite.forestgreen.fuchsia.gainsboro.ghostwhite.gold.goldenrod.gray.green.greenyellow.grey.honeydew.hotpink.indianred.indigo.ivory.khaki.lavender.lavenderblush.lawngreen.lemonchiffon.lightblue.lightcoral.lightcyan.lightgoldenrodyellow.lightgray.lightgreen.lightgrey.lightpink.lightsalmon.lightseagreen.lightskyblue.lightslategray.lightslategrey.lightsteelblue.lightyellow.lime.limegreen.linen.magenta.maroon.mediumaquamarine.mediumblue.mediumorchid.mediumpurple.mediumseagreen.mediumslateblue.mediumspringgreen.mediumturquoise.mediumvioletred.midnightblue.mintcream.mistyrose.moccasin.navajowhite.navy.oldlace.olive.olivedrab.orange.orangered.orchid.palegoldenrod.palegreen.paleturquoise.palevioletred.papayawhip.peachpuff.peru.pink.plum.powderblue.purple.rebeccapurple.red.rosybrown.royalblue.saddlebrown.salmon.sandybrown.seagreen.seashell.sienna.silver.skyblue.slateblue.slategray.slategrey.snow.springgreen.steelblue.tan.teal.thistle.tomato.turquoise.violet.wheat.white.whitesmoke.yellow.yellowgreen`.split(`.`)),Kn=/^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6})$/;function qn(e){return typeof e==`string`?Kn.test(e)||Gn.has(e.toLowerCase()):!1}function Jn(e,t,n,r=`local.expression`){t instanceof R?e(`${r}.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e(`${r}.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function Yn(e){return e instanceof R?e:new R(`expression-eval`,e instanceof Error?e.message:String(e),0)}function Xn(e,t){let n=new Set(e),r=new Map,i=new Map;for(let t of e)r.set(t,0);for(let a of e)for(let e of t(a)){if(!n.has(e))continue;r.set(a,(r.get(a)??0)+1);let t=i.get(e);t?t.push(a):i.set(e,[a])}let a=[];for(let t of e)(r.get(t)??0)===0&&a.push(t);let o=[];for(let e=0;e<a.length;e+=1){let t=a[e];o.push(t);for(let e of i.get(t)??[]){let t=(r.get(e)??0)-1;r.set(e,t),t===0&&a.push(e)}}let s=new Set(o);return{order:o,cyclic:e.filter(e=>!s.has(e))}}function Zn(e){let t=Object.keys(e),n=new Set(t);return Xn(t,t=>{let r=e[t];return r?r.dependencies.filter(e=>n.has(e)):[]})}function Qn(e,t,n){let r=new Map,i=new Map,a=new Map,o=[],s=new Set;for(let t of e)a.has(t.name)||(a.set(t.name,t),o.push(t.name));let c=new Set(o);for(let e of o){let t=a.get(e),o;try{o=Yt(t.source)}catch(r){Jn(n,r,t.expressionOffset),s.add(e);continue}r.set(e,o),i.set(e,[...o.dependencies])}for(let e of o)if(!s.has(e)){for(let r of i.get(e)??[])if(!(c.has(r)||Object.hasOwn(t,r))){n(`local.computation.unknown`,`Reference to undeclared parameter ${r} in computation "${e}".`,a.get(e).expressionOffset+Math.max(0,a.get(e).source.indexOf(r))),s.add(e);break}}let l=new Set;for(let e of o){if(s.has(e))continue;let r=a.get(e);if(r.kind===`const`)for(let o of i.get(e)??[]){let i=c.has(o)?a.get(o).kind:null;Object.hasOwn(t,o)?(n(`local.computation.const`,`Constant "${e}" cannot depend on control parameter "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e)):i===`computed`&&(n(`local.computation.const`,`Constant "${e}" cannot depend on computed value "${o}".`,r.expressionOffset+Math.max(0,r.source.indexOf(o))),l.add(e))}}let{order:u,cyclic:d}=Xn(o,e=>i.get(e)??[]);if(d.length>0){let e=new Set(d),t=[],r=new Map,o=d[0];for(;!r.has(o);){r.set(o,t.length),t.push(o);let n=(i.get(o)??[]).find(t=>e.has(t));if(n===void 0)break;o=n}let c=r.has(o)?t.slice(r.get(o)):[d[0]],l=c.slice(0,12).join(` → `)+(c.length>12?` → …`:` → ${c[0]}`);for(let e of c.slice(0,100)){let t=a.get(e);n(`local.computation.cycle`,`Computation "${e}" is part of a dependency cycle: ${l}.`,t.range.start,t.range.end)}for(let e of d)s.add(e)}for(let e of u)if(!s.has(e)&&!(a.get(e).kind!==`const`||l.has(e))&&(i.get(e)??[]).some(e=>c.has(e)?a.get(e).kind===`const`&&l.has(e):!1)){let t=a.get(e);n(`local.computation.const`,`Constant "${e}" indirectly depends on a value that is not a constant.`,t.expressionOffset),l.add(e)}let f={},p={...t};for(let e of u){if(s.has(e))continue;let t=a.get(e);if((i.get(e)??[]).some(e=>s.has(e))){s.add(e);continue}let o=r.get(e);try{let t=o.inferType(p);f[e]=t,p[e]=t}catch(r){Jn(n,r,t.expressionOffset),s.add(e)}}let m={},h={};for(let e of u){if(s.has(e)||a.get(e).kind!==`const`||l.has(e))continue;let t=a.get(e),i=r.get(e);try{let r=i.evaluate(h),a=bt(r);if(a){n(`local.computation.budget`,`Constant "${e}": ${a}`,t.expressionOffset),s.add(e);continue}m[e]=Array.isArray(r)?r.slice():r,h[e]=m[e]}catch(r){let i=Yn(r);n(`local.computation.expression`,`Constant "${e}" cannot be evaluated: ${i.message}`,t.expressionOffset+(Number.isFinite(i.offset)?i.offset:0)),s.add(e)}}let g={};for(let e of o){let t=a.get(e);if(s.has(e)||f[e]===void 0)continue;let n={name:e,kind:t.kind,source:t.source,dependencies:[...i.get(e)??[]],type:f[e],nodeId:t.nodeId,range:{...t.range}};t.kind===`const`&&Object.hasOwn(m,e)&&(n.value=m[e]),g[e]=n}return{computations:g,kinds:f,order:u.filter(e=>!s.has(e)),expressions:r,constValues:m}}function $n(e,t,n,r,i){let a={},o=new Map,s={};for(let[e,t]of Object.entries(r))s[e]=t;for(let[e,t]of Object.entries(i))a[e]=t,s[e]=t;for(let r of t){let t=e[r];if(!t||t.kind===`const`)continue;let i=n.get(r);if(i)try{let e=i.evaluate(s),t=bt(e);if(t)throw new R(`expression-budget`,t,0);a[r]=e,s[r]=e}catch(e){let t=Yn(e);o.set(r,t),Object.defineProperty(s,r,{enumerable:!0,configurable:!0,get(){throw t}})}}return{values:a,errors:o}}function er(e,t){return(e??[]).map(e=>{switch(e.type){case`text`:case`inlineCode`:case`inlineMath`:case`fallback`:return e.value??``;case`image`:return e.alt??``;case`break`:return` `;case`interpolation`:try{let n=Yt(e.value??``).evaluate(t);return Array.isArray(n)?`Cannot compute`:n===null?``:String(n)}catch{return`Cannot compute`}default:return er(e.children,t)}}).join(``)}function tr(e){return e.trim().toLowerCase().replace(/[^\p{L}\p{N}\p{M}\s_-]/gu,``).replace(/\s+/g,`-`)||`section`}function nr(e){if(e.type!==`component`||e.name!==`anchor`)return;let t=e.attrs?.id;if(typeof t==`string`&&t.length!==0)return/^[A-Za-z_][A-Za-z0-9_-]*$/.test(t)?t:void 0}function rr(e,t,n=!0){let r=e.initialState;if(e.computations){let t={},n=new Map;for(let[r,i]of Object.entries(e.computations)){i.kind===`const`&&Object.hasOwn(i,`value`)&&(t[r]=i.value);try{n.set(r,Yt(i.source))}catch{}}let{order:i}=Zn(e.computations),a=$n(e.computations,i,n,r,t);r={...r,...a.values}}let i=new Map,a=new Map,o=new Map,s=new Map;function c(e){let n=e,r=s.get(e)??0;for(;o.has(n);)r+=1,n=`${e}-${r}`;s.set(e,r);let i=`${t}-${n}`;return o.set(n,i),{slug:n,id:i}}function l(e){for(let t of e){if(t.type===`heading`){let e=tr(er(t.children,r));i.set(t,c(e).id)}else if(n){let e=nr(t);e&&a.set(t,c(e).id)}t.children&&l(t.children)}}l(e.nodes);function u(e){if(e.length===0)return;let t=o.get(e);if(t)return t;try{return o.get(decodeURIComponent(e))}catch{return}}return{ids:i,anchorIds:a,targetId(e){return u(e)},resolve(e){if(!e.startsWith(`#`))return e;let t=u(e.slice(1));return t?`#${t}`:e}}}function ir(e){if(e)throw e}var ar=s(((e,t)=>{var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,i=Object.defineProperty,a=Object.getOwnPropertyDescriptor,o=function(e){return typeof Array.isArray==`function`?Array.isArray(e):r.call(e)===`[object Array]`},s=function(e){if(!e||r.call(e)!==`[object Object]`)return!1;var t=n.call(e,`constructor`),i=e.constructor&&e.constructor.prototype&&n.call(e.constructor.prototype,`isPrototypeOf`);if(e.constructor&&!t&&!i)return!1;for(var a in e);return a===void 0||n.call(e,a)},c=function(e,t){i&&t.name===`__proto__`?i(e,t.name,{enumerable:!0,configurable:!0,value:t.newValue,writable:!0}):e[t.name]=t.newValue},l=function(e,t){if(t===`__proto__`){if(!n.call(e,t))return;if(a)return a(e,t).value}return e[t]};t.exports=function e(){var t,n,r,i,a,u,d=arguments[0],f=1,p=arguments.length,m=!1;for(typeof d==`boolean`&&(m=d,d=arguments[1]||{},f=2),(d==null||typeof d!=`object`&&typeof d!=`function`)&&(d={});f<p;++f)if(t=arguments[f],t!=null)for(n in t)r=l(d,n),i=l(t,n),d!==i&&(m&&i&&(s(i)||(a=o(i)))?(a?(a=!1,u=r&&o(r)?r:[]):u=r&&s(r)?r:{},c(d,{name:n,newValue:e(m,u,i)})):i!==void 0&&c(d,{name:n,newValue:i}));return d}}));function or(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function sr(){let e=[],t={run:n,use:r};return t;function n(...t){let n=-1,r=t.pop();if(typeof r!=`function`)throw TypeError(`Expected function as last argument, not `+r);i(null,...t);function i(a,...o){let s=e[++n],c=-1;if(a)r(a);else{for(;++c<t.length;)(o[c]===null||o[c]===void 0)&&(o[c]=t[c]);t=o,s?cr(s,i)(...o):r(null,...o)}}}function r(n){if(typeof n!=`function`)throw TypeError("Expected `middelware` to be a function, not "+n);return e.push(n),t}}function cr(e,t){let n;return r;function r(...t){let r=e.length>t.length,o;r&&t.push(i);try{o=e.apply(this,t)}catch(e){let t=e;if(r&&n)throw t;return i(t)}r||(o&&o.then&&typeof o.then==`function`?o.then(a,i):o instanceof Error?i(o):a(o))}function i(e,...r){n||(n=!0,t(e,...r))}function a(e){i(null,e)}}function lr(e){return!e||typeof e!=`object`?``:`position`in e||`type`in e?dr(e.position):`start`in e||`end`in e?dr(e):`line`in e||`column`in e?ur(e):``}function ur(e){return fr(e&&e.line)+`:`+fr(e&&e.column)}function dr(e){return ur(e&&e.start)+`-`+ur(e&&e.end)}function fr(e){return e&&typeof e==`number`?e:1}var pr=class extends Error{constructor(e,t,n){super(),typeof t==`string`&&(n=t,t=void 0);let r=``,i={},a=!1;if(t&&(i=`line`in t&&`column`in t||`start`in t&&`end`in t?{place:t}:`type`in t?{ancestors:[t],place:t.position}:{...t}),typeof e==`string`?r=e:!i.cause&&e&&(a=!0,r=e.message,i.cause=e),!i.ruleId&&!i.source&&typeof n==`string`){let e=n.indexOf(`:`);e===-1?i.ruleId=n:(i.source=n.slice(0,e),i.ruleId=n.slice(e+1))}if(!i.place&&i.ancestors&&i.ancestors){let e=i.ancestors[i.ancestors.length-1];e&&(i.place=e.position)}let o=i.place&&`start`in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file=``,this.message=r,this.line=o?o.line:void 0,this.name=lr(i.place)||`1:1`,this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=a&&i.cause&&typeof i.cause.stack==`string`?i.cause.stack:``,this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};pr.prototype.file=``,pr.prototype.name=``,pr.prototype.reason=``,pr.prototype.message=``,pr.prototype.stack=``,pr.prototype.column=void 0,pr.prototype.line=void 0,pr.prototype.ancestors=void 0,pr.prototype.cause=void 0,pr.prototype.fatal=void 0,pr.prototype.place=void 0,pr.prototype.ruleId=void 0,pr.prototype.source=void 0;var mr={basename:hr,dirname:gr,extname:_r,join:vr,sep:`/`};function hr(e,t){if(t!==void 0&&typeof t!=`string`)throw TypeError(`"ext" argument must be a string`);xr(e);let n=0,r=-1,i=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else r<0&&(a=!0,r=i+1);return r<0?``:e.slice(n,r)}if(t===e)return``;let o=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(a){n=i+1;break}}else o<0&&(a=!0,o=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(r=i):(s=-1,r=o));return n===r?r=o:r<0&&(r=e.length),e.slice(n,r)}function gr(e){if(xr(e),e.length===0)return`.`;let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||=!0;return t<0?e.codePointAt(0)===47?`/`:`.`:t===1&&e.codePointAt(0)===47?`//`:e.slice(0,t)}function _r(e){xr(e);let t=e.length,n=-1,r=0,i=-1,a=0,o;for(;t--;){let s=e.codePointAt(t);if(s===47){if(o){r=t+1;break}}else n<0&&(o=!0,n=t+1),s===46?i<0?i=t:a!==1&&(a=1):i>-1&&(a=-1)}return i<0||n<0||a===0||a===1&&i===n-1&&i===r+1?``:e.slice(i,n)}function vr(...e){let t=-1,n;for(;++t<e.length;)xr(e[t]),e[t]&&(n=n===void 0?e[t]:n+`/`+e[t]);return n===void 0?`.`:yr(n)}function yr(e){xr(e);let t=e.codePointAt(0)===47,n=br(e,!t);return n.length===0&&!t&&(n=`.`),n.length>0&&e.codePointAt(e.length-1)===47&&(n+=`/`),t?`/`+n:n}function br(e,t){let n=``,r=0,i=-1,a=0,o=-1,s,c;for(;++o<=e.length;){if(o<e.length)s=e.codePointAt(o);else if(s===47)break;else s=47;if(s===47){if(i!==o-1&&a!==1){if(i!==o-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf(`/`),c!==n.length-1){c<0?(n=``,r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf(`/`)),i=o,a=0;continue}}else if(n.length>0){n=``,r=0,i=o,a=0;continue}}t&&(n=n.length>0?n+`/..`:`..`,r=2)}else n.length>0?n+=`/`+e.slice(i+1,o):n=e.slice(i+1,o),r=o-i-1}i=o,a=0}else s===46&&a>-1?a++:a=-1}return n}function xr(e){if(typeof e!=`string`)throw TypeError(`Path must be a string. Received `+JSON.stringify(e))}var Sr={cwd:Cr};function Cr(){return`/`}function wr(e){return!!(typeof e==`object`&&e&&`href`in e&&e.href&&`protocol`in e&&e.protocol&&e.auth===void 0)}function Tr(e){if(typeof e==`string`)e=new URL(e);else if(!wr(e)){let t=TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code=`ERR_INVALID_ARG_TYPE`,t}if(e.protocol!==`file:`){let e=TypeError(`The URL must be of scheme file`);throw e.code=`ERR_INVALID_URL_SCHEME`,e}return Er(e)}function Er(e){if(e.hostname!==``){let e=TypeError(`File URL host must be "localhost" or empty on darwin`);throw e.code=`ERR_INVALID_FILE_URL_HOST`,e}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let e=t.codePointAt(n+2);if(e===70||e===102){let e=TypeError(`File URL path must not include encoded / characters`);throw e.code=`ERR_INVALID_FILE_URL_PATH`,e}}return decodeURIComponent(t)}var Dr=[`history`,`path`,`basename`,`stem`,`extname`,`dirname`],Or=class{constructor(e){let t;t=e?wr(e)?{path:e}:typeof e==`string`||Mr(e)?{value:e}:e:{},this.cwd=`cwd`in t?``:Sr.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let n=-1;for(;++n<Dr.length;){let e=Dr[n];e in t&&t[e]!==void 0&&t[e]!==null&&(this[e]=e===`history`?[...t[e]]:t[e])}let r;for(r in t)Dr.includes(r)||(this[r]=t[r])}get basename(){return typeof this.path==`string`?mr.basename(this.path):void 0}set basename(e){Ar(e,`basename`),kr(e,`basename`),this.path=mr.join(this.dirname||``,e)}get dirname(){return typeof this.path==`string`?mr.dirname(this.path):void 0}set dirname(e){jr(this.basename,`dirname`),this.path=mr.join(e||``,this.basename)}get extname(){return typeof this.path==`string`?mr.extname(this.path):void 0}set extname(e){if(kr(e,`extname`),jr(this.dirname,`extname`),e){if(e.codePointAt(0)!==46)throw Error("`extname` must start with `.`");if(e.includes(`.`,1))throw Error("`extname` cannot contain multiple dots")}this.path=mr.join(this.dirname,this.stem+(e||``))}get path(){return this.history[this.history.length-1]}set path(e){wr(e)&&(e=Tr(e)),Ar(e,`path`),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path==`string`?mr.basename(this.path,this.extname):void 0}set stem(e){Ar(e,`stem`),kr(e,`stem`),this.path=mr.join(this.dirname||``,e+(this.extname||``))}fail(e,t,n){let r=this.message(e,t,n);throw r.fatal=!0,r}info(e,t,n){let r=this.message(e,t,n);return r.fatal=void 0,r}message(e,t,n){let r=new pr(e,t,n);return this.path&&(r.name=this.path+`:`+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?``:typeof this.value==`string`?this.value:new TextDecoder(e||void 0).decode(this.value)}};function kr(e,t){if(e&&e.includes(mr.sep))throw Error("`"+t+"` cannot be a path: did not expect `"+mr.sep+"`")}function Ar(e,t){if(!e)throw Error("`"+t+"` cannot be empty")}function jr(e,t){if(!e)throw Error("Setting `"+t+"` requires `path` to be set too")}function Mr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Nr=(function(e){let t=this.constructor.prototype,n=t[e],r=function(){return n.apply(r,arguments)};return Object.setPrototypeOf(r,t),r}),Pr=u(ar(),1),Fr={}.hasOwnProperty,Ir=new class e extends Nr{constructor(){super(`copy`),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=sr()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let e=this.attachers[n];t.use(...e)}return t.data((0,Pr.default)(!0,{},this.namespace)),t}data(e,t){return typeof e==`string`?arguments.length===2?(zr(`data`,this.frozen),this.namespace[e]=t,this):Fr.call(this.namespace,e)&&this.namespace[e]||void 0:e?(zr(`data`,this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;let e=this;for(;++this.freezeIndex<this.attachers.length;){let[t,...n]=this.attachers[this.freezeIndex];if(n[0]===!1)continue;n[0]===!0&&(n[0]=void 0);let r=t.call(e,...n);typeof r==`function`&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=1/0,this}parse(e){this.freeze();let t=Hr(e),n=this.parser||this.Parser;return Lr(`parse`,n),n(String(t),t)}process(e,t){let n=this;return this.freeze(),Lr(`process`,this.parser||this.Parser),Rr(`process`,this.compiler||this.Compiler),t?r(void 0,t):new Promise(r);function r(r,i){let a=Hr(e),o=n.parse(a);n.run(o,a,function(e,t,r){if(e||!t||!r)return s(e);let i=t,a=n.stringify(i,r);Wr(a)?r.value=a:r.result=a,s(e,r)});function s(e,n){e||!n?i(e):r?r(n):t(void 0,n)}}}processSync(e){let t=!1,n;return this.freeze(),Lr(`processSync`,this.parser||this.Parser),Rr(`processSync`,this.compiler||this.Compiler),this.process(e,r),Vr(`processSync`,`process`,t),n;function r(e,r){t=!0,ir(e),n=r}}run(e,t,n){Br(e),this.freeze();let r=this.transformers;return!n&&typeof t==`function`&&(n=t,t=void 0),n?i(void 0,n):new Promise(i);function i(i,a){let o=Hr(t);r.run(e,o,s);function s(t,r,o){let s=r||e;t?a(t):i?i(s):n(void 0,s,o)}}}runSync(e,t){let n=!1,r;return this.run(e,t,i),Vr(`runSync`,`run`,n),r;function i(e,t){ir(e),r=t,n=!0}}stringify(e,t){this.freeze();let n=Hr(t),r=this.compiler||this.Compiler;return Rr(`stringify`,r),Br(e),r(e,n)}use(e,...t){let n=this.attachers,r=this.namespace;if(zr(`use`,this.frozen),e!=null){if(typeof e==`function`)s(e,t);else if(typeof e==`object`)Array.isArray(e)?o(e):a(e);else throw TypeError("Expected usable value, not `"+e+"`")}return this;function i(e){if(typeof e==`function`)s(e,[]);else if(typeof e==`object`){if(Array.isArray(e)){let[t,...n]=e;s(t,n)}else a(e)}else throw TypeError("Expected usable value, not `"+e+"`")}function a(e){if(!(`plugins`in e)&&!(`settings`in e))throw Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(e.plugins),e.settings&&(r.settings=(0,Pr.default)(!0,r.settings,e.settings))}function o(e){let t=-1;if(e!=null){if(Array.isArray(e))for(;++t<e.length;){let n=e[t];i(n)}else throw TypeError("Expected a list of plugins, not `"+e+"`")}}function s(e,t){let r=-1,i=-1;for(;++r<n.length;)if(n[r][0]===e){i=r;break}if(i===-1)n.push([e,...t]);else if(t.length>0){let[r,...a]=t,o=n[i][1];or(o)&&or(r)&&(r=(0,Pr.default)(!0,o,r)),n[i]=[e,r,...a]}}}}().freeze();function Lr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `parser`")}function Rr(e,t){if(typeof t!=`function`)throw TypeError("Cannot `"+e+"` without `compiler`")}function zr(e,t){if(t)throw Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Br(e){if(!or(e)||typeof e.type!=`string`)throw TypeError("Expected node, got `"+e+"`")}function Vr(e,t,n){if(!n)throw Error("`"+e+"` finished async. Use `"+t+"` instead")}function Hr(e){return Ur(e)?e:new Or(e)}function Ur(e){return!!(e&&typeof e==`object`&&`message`in e&&`messages`in e)}function Wr(e){return typeof e==`string`||Gr(e)}function Gr(e){return!!(e&&typeof e==`object`&&`byteLength`in e&&`byteOffset`in e)}var Kr={};function qr(e,t){let n=t||Kr;return Jr(e,typeof n.includeImageAlt!=`boolean`||n.includeImageAlt,typeof n.includeHtml!=`boolean`||n.includeHtml)}function Jr(e,t,n){if(Xr(e)){if(`value`in e)return e.type===`html`&&!n?``:e.value;if(t&&`alt`in e&&e.alt)return e.alt;if(`children`in e)return Yr(e.children,t,n)}return Array.isArray(e)?Yr(e,t,n):``}function Yr(e,t,n){let r=[],i=-1;for(;++i<e.length;)r[i]=Jr(e[i],t,n);return r.join(``)}function Xr(e){return!!(e&&typeof e==`object`)}var Zr={AElig:`Æ`,AMP:`&`,Aacute:`Á`,Abreve:`Ă`,Acirc:`Â`,Acy:`А`,Afr:`𝔄`,Agrave:`À`,Alpha:`Α`,Amacr:`Ā`,And:`⩓`,Aogon:`Ą`,Aopf:`𝔸`,ApplyFunction:`⁡`,Aring:`Å`,Ascr:`𝒜`,Assign:`≔`,Atilde:`Ã`,Auml:`Ä`,Backslash:`∖`,Barv:`⫧`,Barwed:`⌆`,Bcy:`Б`,Because:`∵`,Bernoullis:`ℬ`,Beta:`Β`,Bfr:`𝔅`,Bopf:`𝔹`,Breve:`˘`,Bscr:`ℬ`,Bumpeq:`≎`,CHcy:`Ч`,COPY:`©`,Cacute:`Ć`,Cap:`⋒`,CapitalDifferentialD:`ⅅ`,Cayleys:`ℭ`,Ccaron:`Č`,Ccedil:`Ç`,Ccirc:`Ĉ`,Cconint:`∰`,Cdot:`Ċ`,Cedilla:`¸`,CenterDot:`·`,Cfr:`ℭ`,Chi:`Χ`,CircleDot:`⊙`,CircleMinus:`⊖`,CirclePlus:`⊕`,CircleTimes:`⊗`,ClockwiseContourIntegral:`∲`,CloseCurlyDoubleQuote:`”`,CloseCurlyQuote:`’`,Colon:`∷`,Colone:`⩴`,Congruent:`≡`,Conint:`∯`,ContourIntegral:`∮`,Copf:`ℂ`,Coproduct:`∐`,CounterClockwiseContourIntegral:`∳`,Cross:`⨯`,Cscr:`𝒞`,Cup:`⋓`,CupCap:`≍`,DD:`ⅅ`,DDotrahd:`⤑`,DJcy:`Ђ`,DScy:`Ѕ`,DZcy:`Џ`,Dagger:`‡`,Darr:`↡`,Dashv:`⫤`,Dcaron:`Ď`,Dcy:`Д`,Del:`∇`,Delta:`Δ`,Dfr:`𝔇`,DiacriticalAcute:`´`,DiacriticalDot:`˙`,DiacriticalDoubleAcute:`˝`,DiacriticalGrave:"`",DiacriticalTilde:`˜`,Diamond:`⋄`,DifferentialD:`ⅆ`,Dopf:`𝔻`,Dot:`¨`,DotDot:`⃜`,DotEqual:`≐`,DoubleContourIntegral:`∯`,DoubleDot:`¨`,DoubleDownArrow:`⇓`,DoubleLeftArrow:`⇐`,DoubleLeftRightArrow:`⇔`,DoubleLeftTee:`⫤`,DoubleLongLeftArrow:`⟸`,DoubleLongLeftRightArrow:`⟺`,DoubleLongRightArrow:`⟹`,DoubleRightArrow:`⇒`,DoubleRightTee:`⊨`,DoubleUpArrow:`⇑`,DoubleUpDownArrow:`⇕`,DoubleVerticalBar:`∥`,DownArrow:`↓`,DownArrowBar:`⤓`,DownArrowUpArrow:`⇵`,DownBreve:`̑`,DownLeftRightVector:`⥐`,DownLeftTeeVector:`⥞`,DownLeftVector:`↽`,DownLeftVectorBar:`⥖`,DownRightTeeVector:`⥟`,DownRightVector:`⇁`,DownRightVectorBar:`⥗`,DownTee:`⊤`,DownTeeArrow:`↧`,Downarrow:`⇓`,Dscr:`𝒟`,Dstrok:`Đ`,ENG:`Ŋ`,ETH:`Ð`,Eacute:`É`,Ecaron:`Ě`,Ecirc:`Ê`,Ecy:`Э`,Edot:`Ė`,Efr:`𝔈`,Egrave:`È`,Element:`∈`,Emacr:`Ē`,EmptySmallSquare:`◻`,EmptyVerySmallSquare:`▫`,Eogon:`Ę`,Eopf:`𝔼`,Epsilon:`Ε`,Equal:`⩵`,EqualTilde:`≂`,Equilibrium:`⇌`,Escr:`ℰ`,Esim:`⩳`,Eta:`Η`,Euml:`Ë`,Exists:`∃`,ExponentialE:`ⅇ`,Fcy:`Ф`,Ffr:`𝔉`,FilledSmallSquare:`◼`,FilledVerySmallSquare:`▪`,Fopf:`𝔽`,ForAll:`∀`,Fouriertrf:`ℱ`,Fscr:`ℱ`,GJcy:`Ѓ`,GT:`>`,Gamma:`Γ`,Gammad:`Ϝ`,Gbreve:`Ğ`,Gcedil:`Ģ`,Gcirc:`Ĝ`,Gcy:`Г`,Gdot:`Ġ`,Gfr:`𝔊`,Gg:`⋙`,Gopf:`𝔾`,GreaterEqual:`≥`,GreaterEqualLess:`⋛`,GreaterFullEqual:`≧`,GreaterGreater:`⪢`,GreaterLess:`≷`,GreaterSlantEqual:`⩾`,GreaterTilde:`≳`,Gscr:`𝒢`,Gt:`≫`,HARDcy:`Ъ`,Hacek:`ˇ`,Hat:`^`,Hcirc:`Ĥ`,Hfr:`ℌ`,HilbertSpace:`ℋ`,Hopf:`ℍ`,HorizontalLine:`─`,Hscr:`ℋ`,Hstrok:`Ħ`,HumpDownHump:`≎`,HumpEqual:`≏`,IEcy:`Е`,IJlig:`IJ`,IOcy:`Ё`,Iacute:`Í`,Icirc:`Î`,Icy:`И`,Idot:`İ`,Ifr:`ℑ`,Igrave:`Ì`,Im:`ℑ`,Imacr:`Ī`,ImaginaryI:`ⅈ`,Implies:`⇒`,Int:`∬`,Integral:`∫`,Intersection:`⋂`,InvisibleComma:`⁣`,InvisibleTimes:`⁢`,Iogon:`Į`,Iopf:`𝕀`,Iota:`Ι`,Iscr:`ℐ`,Itilde:`Ĩ`,Iukcy:`І`,Iuml:`Ï`,Jcirc:`Ĵ`,Jcy:`Й`,Jfr:`𝔍`,Jopf:`𝕁`,Jscr:`𝒥`,Jsercy:`Ј`,Jukcy:`Є`,KHcy:`Х`,KJcy:`Ќ`,Kappa:`Κ`,Kcedil:`Ķ`,Kcy:`К`,Kfr:`𝔎`,Kopf:`𝕂`,Kscr:`𝒦`,LJcy:`Љ`,LT:`<`,Lacute:`Ĺ`,Lambda:`Λ`,Lang:`⟪`,Laplacetrf:`ℒ`,Larr:`↞`,Lcaron:`Ľ`,Lcedil:`Ļ`,Lcy:`Л`,LeftAngleBracket:`⟨`,LeftArrow:`←`,LeftArrowBar:`⇤`,LeftArrowRightArrow:`⇆`,LeftCeiling:`⌈`,LeftDoubleBracket:`⟦`,LeftDownTeeVector:`⥡`,LeftDownVector:`⇃`,LeftDownVectorBar:`⥙`,LeftFloor:`⌊`,LeftRightArrow:`↔`,LeftRightVector:`⥎`,LeftTee:`⊣`,LeftTeeArrow:`↤`,LeftTeeVector:`⥚`,LeftTriangle:`⊲`,LeftTriangleBar:`⧏`,LeftTriangleEqual:`⊴`,LeftUpDownVector:`⥑`,LeftUpTeeVector:`⥠`,LeftUpVector:`↿`,LeftUpVectorBar:`⥘`,LeftVector:`↼`,LeftVectorBar:`⥒`,Leftarrow:`⇐`,Leftrightarrow:`⇔`,LessEqualGreater:`⋚`,LessFullEqual:`≦`,LessGreater:`≶`,LessLess:`⪡`,LessSlantEqual:`⩽`,LessTilde:`≲`,Lfr:`𝔏`,Ll:`⋘`,Lleftarrow:`⇚`,Lmidot:`Ŀ`,LongLeftArrow:`⟵`,LongLeftRightArrow:`⟷`,LongRightArrow:`⟶`,Longleftarrow:`⟸`,Longleftrightarrow:`⟺`,Longrightarrow:`⟹`,Lopf:`𝕃`,LowerLeftArrow:`↙`,LowerRightArrow:`↘`,Lscr:`ℒ`,Lsh:`↰`,Lstrok:`Ł`,Lt:`≪`,Map:`⤅`,Mcy:`М`,MediumSpace:` `,Mellintrf:`ℳ`,Mfr:`𝔐`,MinusPlus:`∓`,Mopf:`𝕄`,Mscr:`ℳ`,Mu:`Μ`,NJcy:`Њ`,Nacute:`Ń`,Ncaron:`Ň`,Ncedil:`Ņ`,Ncy:`Н`,NegativeMediumSpace:`​`,NegativeThickSpace:`​`,NegativeThinSpace:`​`,NegativeVeryThinSpace:`​`,NestedGreaterGreater:`≫`,NestedLessLess:`≪`,NewLine:`
14
+ `,Nfr:`𝔑`,NoBreak:`⁠`,NonBreakingSpace:`\xA0`,Nopf:`ℕ`,Not:`⫬`,NotCongruent:`≢`,NotCupCap:`≭`,NotDoubleVerticalBar:`∦`,NotElement:`∉`,NotEqual:`≠`,NotEqualTilde:`≂̸`,NotExists:`∄`,NotGreater:`≯`,NotGreaterEqual:`≱`,NotGreaterFullEqual:`≧̸`,NotGreaterGreater:`≫̸`,NotGreaterLess:`≹`,NotGreaterSlantEqual:`⩾̸`,NotGreaterTilde:`≵`,NotHumpDownHump:`≎̸`,NotHumpEqual:`≏̸`,NotLeftTriangle:`⋪`,NotLeftTriangleBar:`⧏̸`,NotLeftTriangleEqual:`⋬`,NotLess:`≮`,NotLessEqual:`≰`,NotLessGreater:`≸`,NotLessLess:`≪̸`,NotLessSlantEqual:`⩽̸`,NotLessTilde:`≴`,NotNestedGreaterGreater:`⪢̸`,NotNestedLessLess:`⪡̸`,NotPrecedes:`⊀`,NotPrecedesEqual:`⪯̸`,NotPrecedesSlantEqual:`⋠`,NotReverseElement:`∌`,NotRightTriangle:`⋫`,NotRightTriangleBar:`⧐̸`,NotRightTriangleEqual:`⋭`,NotSquareSubset:`⊏̸`,NotSquareSubsetEqual:`⋢`,NotSquareSuperset:`⊐̸`,NotSquareSupersetEqual:`⋣`,NotSubset:`⊂⃒`,NotSubsetEqual:`⊈`,NotSucceeds:`⊁`,NotSucceedsEqual:`⪰̸`,NotSucceedsSlantEqual:`⋡`,NotSucceedsTilde:`≿̸`,NotSuperset:`⊃⃒`,NotSupersetEqual:`⊉`,NotTilde:`≁`,NotTildeEqual:`≄`,NotTildeFullEqual:`≇`,NotTildeTilde:`≉`,NotVerticalBar:`∤`,Nscr:`𝒩`,Ntilde:`Ñ`,Nu:`Ν`,OElig:`Œ`,Oacute:`Ó`,Ocirc:`Ô`,Ocy:`О`,Odblac:`Ő`,Ofr:`𝔒`,Ograve:`Ò`,Omacr:`Ō`,Omega:`Ω`,Omicron:`Ο`,Oopf:`𝕆`,OpenCurlyDoubleQuote:`“`,OpenCurlyQuote:`‘`,Or:`⩔`,Oscr:`𝒪`,Oslash:`Ø`,Otilde:`Õ`,Otimes:`⨷`,Ouml:`Ö`,OverBar:`‾`,OverBrace:`⏞`,OverBracket:`⎴`,OverParenthesis:`⏜`,PartialD:`∂`,Pcy:`П`,Pfr:`𝔓`,Phi:`Φ`,Pi:`Π`,PlusMinus:`±`,Poincareplane:`ℌ`,Popf:`ℙ`,Pr:`⪻`,Precedes:`≺`,PrecedesEqual:`⪯`,PrecedesSlantEqual:`≼`,PrecedesTilde:`≾`,Prime:`″`,Product:`∏`,Proportion:`∷`,Proportional:`∝`,Pscr:`𝒫`,Psi:`Ψ`,QUOT:`"`,Qfr:`𝔔`,Qopf:`ℚ`,Qscr:`𝒬`,RBarr:`⤐`,REG:`®`,Racute:`Ŕ`,Rang:`⟫`,Rarr:`↠`,Rarrtl:`⤖`,Rcaron:`Ř`,Rcedil:`Ŗ`,Rcy:`Р`,Re:`ℜ`,ReverseElement:`∋`,ReverseEquilibrium:`⇋`,ReverseUpEquilibrium:`⥯`,Rfr:`ℜ`,Rho:`Ρ`,RightAngleBracket:`⟩`,RightArrow:`→`,RightArrowBar:`⇥`,RightArrowLeftArrow:`⇄`,RightCeiling:`⌉`,RightDoubleBracket:`⟧`,RightDownTeeVector:`⥝`,RightDownVector:`⇂`,RightDownVectorBar:`⥕`,RightFloor:`⌋`,RightTee:`⊢`,RightTeeArrow:`↦`,RightTeeVector:`⥛`,RightTriangle:`⊳`,RightTriangleBar:`⧐`,RightTriangleEqual:`⊵`,RightUpDownVector:`⥏`,RightUpTeeVector:`⥜`,RightUpVector:`↾`,RightUpVectorBar:`⥔`,RightVector:`⇀`,RightVectorBar:`⥓`,Rightarrow:`⇒`,Ropf:`ℝ`,RoundImplies:`⥰`,Rrightarrow:`⇛`,Rscr:`ℛ`,Rsh:`↱`,RuleDelayed:`⧴`,SHCHcy:`Щ`,SHcy:`Ш`,SOFTcy:`Ь`,Sacute:`Ś`,Sc:`⪼`,Scaron:`Š`,Scedil:`Ş`,Scirc:`Ŝ`,Scy:`С`,Sfr:`𝔖`,ShortDownArrow:`↓`,ShortLeftArrow:`←`,ShortRightArrow:`→`,ShortUpArrow:`↑`,Sigma:`Σ`,SmallCircle:`∘`,Sopf:`𝕊`,Sqrt:`√`,Square:`□`,SquareIntersection:`⊓`,SquareSubset:`⊏`,SquareSubsetEqual:`⊑`,SquareSuperset:`⊐`,SquareSupersetEqual:`⊒`,SquareUnion:`⊔`,Sscr:`𝒮`,Star:`⋆`,Sub:`⋐`,Subset:`⋐`,SubsetEqual:`⊆`,Succeeds:`≻`,SucceedsEqual:`⪰`,SucceedsSlantEqual:`≽`,SucceedsTilde:`≿`,SuchThat:`∋`,Sum:`∑`,Sup:`⋑`,Superset:`⊃`,SupersetEqual:`⊇`,Supset:`⋑`,THORN:`Þ`,TRADE:`™`,TSHcy:`Ћ`,TScy:`Ц`,Tab:` `,Tau:`Τ`,Tcaron:`Ť`,Tcedil:`Ţ`,Tcy:`Т`,Tfr:`𝔗`,Therefore:`∴`,Theta:`Θ`,ThickSpace:`  `,ThinSpace:` `,Tilde:`∼`,TildeEqual:`≃`,TildeFullEqual:`≅`,TildeTilde:`≈`,Topf:`𝕋`,TripleDot:`⃛`,Tscr:`𝒯`,Tstrok:`Ŧ`,Uacute:`Ú`,Uarr:`↟`,Uarrocir:`⥉`,Ubrcy:`Ў`,Ubreve:`Ŭ`,Ucirc:`Û`,Ucy:`У`,Udblac:`Ű`,Ufr:`𝔘`,Ugrave:`Ù`,Umacr:`Ū`,UnderBar:`_`,UnderBrace:`⏟`,UnderBracket:`⎵`,UnderParenthesis:`⏝`,Union:`⋃`,UnionPlus:`⊎`,Uogon:`Ų`,Uopf:`𝕌`,UpArrow:`↑`,UpArrowBar:`⤒`,UpArrowDownArrow:`⇅`,UpDownArrow:`↕`,UpEquilibrium:`⥮`,UpTee:`⊥`,UpTeeArrow:`↥`,Uparrow:`⇑`,Updownarrow:`⇕`,UpperLeftArrow:`↖`,UpperRightArrow:`↗`,Upsi:`ϒ`,Upsilon:`Υ`,Uring:`Ů`,Uscr:`𝒰`,Utilde:`Ũ`,Uuml:`Ü`,VDash:`⊫`,Vbar:`⫫`,Vcy:`В`,Vdash:`⊩`,Vdashl:`⫦`,Vee:`⋁`,Verbar:`‖`,Vert:`‖`,VerticalBar:`∣`,VerticalLine:`|`,VerticalSeparator:`❘`,VerticalTilde:`≀`,VeryThinSpace:` `,Vfr:`𝔙`,Vopf:`𝕍`,Vscr:`𝒱`,Vvdash:`⊪`,Wcirc:`Ŵ`,Wedge:`⋀`,Wfr:`𝔚`,Wopf:`𝕎`,Wscr:`𝒲`,Xfr:`𝔛`,Xi:`Ξ`,Xopf:`𝕏`,Xscr:`𝒳`,YAcy:`Я`,YIcy:`Ї`,YUcy:`Ю`,Yacute:`Ý`,Ycirc:`Ŷ`,Ycy:`Ы`,Yfr:`𝔜`,Yopf:`𝕐`,Yscr:`𝒴`,Yuml:`Ÿ`,ZHcy:`Ж`,Zacute:`Ź`,Zcaron:`Ž`,Zcy:`З`,Zdot:`Ż`,ZeroWidthSpace:`​`,Zeta:`Ζ`,Zfr:`ℨ`,Zopf:`ℤ`,Zscr:`𝒵`,aacute:`á`,abreve:`ă`,ac:`∾`,acE:`∾̳`,acd:`∿`,acirc:`â`,acute:`´`,acy:`а`,aelig:`æ`,af:`⁡`,afr:`𝔞`,agrave:`à`,alefsym:`ℵ`,aleph:`ℵ`,alpha:`α`,amacr:`ā`,amalg:`⨿`,amp:`&`,and:`∧`,andand:`⩕`,andd:`⩜`,andslope:`⩘`,andv:`⩚`,ang:`∠`,ange:`⦤`,angle:`∠`,angmsd:`∡`,angmsdaa:`⦨`,angmsdab:`⦩`,angmsdac:`⦪`,angmsdad:`⦫`,angmsdae:`⦬`,angmsdaf:`⦭`,angmsdag:`⦮`,angmsdah:`⦯`,angrt:`∟`,angrtvb:`⊾`,angrtvbd:`⦝`,angsph:`∢`,angst:`Å`,angzarr:`⍼`,aogon:`ą`,aopf:`𝕒`,ap:`≈`,apE:`⩰`,apacir:`⩯`,ape:`≊`,apid:`≋`,apos:`'`,approx:`≈`,approxeq:`≊`,aring:`å`,ascr:`𝒶`,ast:`*`,asymp:`≈`,asympeq:`≍`,atilde:`ã`,auml:`ä`,awconint:`∳`,awint:`⨑`,bNot:`⫭`,backcong:`≌`,backepsilon:`϶`,backprime:`‵`,backsim:`∽`,backsimeq:`⋍`,barvee:`⊽`,barwed:`⌅`,barwedge:`⌅`,bbrk:`⎵`,bbrktbrk:`⎶`,bcong:`≌`,bcy:`б`,bdquo:`„`,becaus:`∵`,because:`∵`,bemptyv:`⦰`,bepsi:`϶`,bernou:`ℬ`,beta:`β`,beth:`ℶ`,between:`≬`,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:`⌐`,bopf:`𝕓`,bot:`⊥`,bottom:`⊥`,bowtie:`⋈`,boxDL:`╗`,boxDR:`╔`,boxDl:`╖`,boxDr:`╓`,boxH:`═`,boxHD:`╦`,boxHU:`╩`,boxHd:`╤`,boxHu:`╧`,boxUL:`╝`,boxUR:`╚`,boxUl:`╜`,boxUr:`╙`,boxV:`║`,boxVH:`╬`,boxVL:`╣`,boxVR:`╠`,boxVh:`╫`,boxVl:`╢`,boxVr:`╟`,boxbox:`⧉`,boxdL:`╕`,boxdR:`╒`,boxdl:`┐`,boxdr:`┌`,boxh:`─`,boxhD:`╥`,boxhU:`╨`,boxhd:`┬`,boxhu:`┴`,boxminus:`⊟`,boxplus:`⊞`,boxtimes:`⊠`,boxuL:`╛`,boxuR:`╘`,boxul:`┘`,boxur:`└`,boxv:`│`,boxvH:`╪`,boxvL:`╡`,boxvR:`╞`,boxvh:`┼`,boxvl:`┤`,boxvr:`├`,bprime:`‵`,breve:`˘`,brvbar:`¦`,bscr:`𝒷`,bsemi:`⁏`,bsim:`∽`,bsime:`⋍`,bsol:`\\`,bsolb:`⧅`,bsolhsub:`⟈`,bull:`•`,bullet:`•`,bump:`≎`,bumpE:`⪮`,bumpe:`≏`,bumpeq:`≏`,cacute:`ć`,cap:`∩`,capand:`⩄`,capbrcup:`⩉`,capcap:`⩋`,capcup:`⩇`,capdot:`⩀`,caps:`∩︀`,caret:`⁁`,caron:`ˇ`,ccaps:`⩍`,ccaron:`č`,ccedil:`ç`,ccirc:`ĉ`,ccups:`⩌`,ccupssm:`⩐`,cdot:`ċ`,cedil:`¸`,cemptyv:`⦲`,cent:`¢`,centerdot:`·`,cfr:`𝔠`,chcy:`ч`,check:`✓`,checkmark:`✓`,chi:`χ`,cir:`○`,cirE:`⧃`,circ:`ˆ`,circeq:`≗`,circlearrowleft:`↺`,circlearrowright:`↻`,circledR:`®`,circledS:`Ⓢ`,circledast:`⊛`,circledcirc:`⊚`,circleddash:`⊝`,cire:`≗`,cirfnint:`⨐`,cirmid:`⫯`,cirscir:`⧂`,clubs:`♣`,clubsuit:`♣`,colon:`:`,colone:`≔`,coloneq:`≔`,comma:`,`,commat:`@`,comp:`∁`,compfn:`∘`,complement:`∁`,complexes:`ℂ`,cong:`≅`,congdot:`⩭`,conint:`∮`,copf:`𝕔`,coprod:`∐`,copy:`©`,copysr:`℗`,crarr:`↵`,cross:`✗`,cscr:`𝒸`,csub:`⫏`,csube:`⫑`,csup:`⫐`,csupe:`⫒`,ctdot:`⋯`,cudarrl:`⤸`,cudarrr:`⤵`,cuepr:`⋞`,cuesc:`⋟`,cularr:`↶`,cularrp:`⤽`,cup:`∪`,cupbrcap:`⩈`,cupcap:`⩆`,cupcup:`⩊`,cupdot:`⊍`,cupor:`⩅`,cups:`∪︀`,curarr:`↷`,curarrm:`⤼`,curlyeqprec:`⋞`,curlyeqsucc:`⋟`,curlyvee:`⋎`,curlywedge:`⋏`,curren:`¤`,curvearrowleft:`↶`,curvearrowright:`↷`,cuvee:`⋎`,cuwed:`⋏`,cwconint:`∲`,cwint:`∱`,cylcty:`⌭`,dArr:`⇓`,dHar:`⥥`,dagger:`†`,daleth:`ℸ`,darr:`↓`,dash:`‐`,dashv:`⊣`,dbkarow:`⤏`,dblac:`˝`,dcaron:`ď`,dcy:`д`,dd:`ⅆ`,ddagger:`‡`,ddarr:`⇊`,ddotseq:`⩷`,deg:`°`,delta:`δ`,demptyv:`⦱`,dfisht:`⥿`,dfr:`𝔡`,dharl:`⇃`,dharr:`⇂`,diam:`⋄`,diamond:`⋄`,diamondsuit:`♦`,diams:`♦`,die:`¨`,digamma:`ϝ`,disin:`⋲`,div:`÷`,divide:`÷`,divideontimes:`⋇`,divonx:`⋇`,djcy:`ђ`,dlcorn:`⌞`,dlcrop:`⌍`,dollar:`$`,dopf:`𝕕`,dot:`˙`,doteq:`≐`,doteqdot:`≑`,dotminus:`∸`,dotplus:`∔`,dotsquare:`⊡`,doublebarwedge:`⌆`,downarrow:`↓`,downdownarrows:`⇊`,downharpoonleft:`⇃`,downharpoonright:`⇂`,drbkarow:`⤐`,drcorn:`⌟`,drcrop:`⌌`,dscr:`𝒹`,dscy:`ѕ`,dsol:`⧶`,dstrok:`đ`,dtdot:`⋱`,dtri:`▿`,dtrif:`▾`,duarr:`⇵`,duhar:`⥯`,dwangle:`⦦`,dzcy:`џ`,dzigrarr:`⟿`,eDDot:`⩷`,eDot:`≑`,eacute:`é`,easter:`⩮`,ecaron:`ě`,ecir:`≖`,ecirc:`ê`,ecolon:`≕`,ecy:`э`,edot:`ė`,ee:`ⅇ`,efDot:`≒`,efr:`𝔢`,eg:`⪚`,egrave:`è`,egs:`⪖`,egsdot:`⪘`,el:`⪙`,elinters:`⏧`,ell:`ℓ`,els:`⪕`,elsdot:`⪗`,emacr:`ē`,empty:`∅`,emptyset:`∅`,emptyv:`∅`,emsp13:` `,emsp14:` `,emsp:` `,eng:`ŋ`,ensp:` `,eogon:`ę`,eopf:`𝕖`,epar:`⋕`,eparsl:`⧣`,eplus:`⩱`,epsi:`ε`,epsilon:`ε`,epsiv:`ϵ`,eqcirc:`≖`,eqcolon:`≕`,eqsim:`≂`,eqslantgtr:`⪖`,eqslantless:`⪕`,equals:`=`,equest:`≟`,equiv:`≡`,equivDD:`⩸`,eqvparsl:`⧥`,erDot:`≓`,erarr:`⥱`,escr:`ℯ`,esdot:`≐`,esim:`≂`,eta:`η`,eth:`ð`,euml:`ë`,euro:`€`,excl:`!`,exist:`∃`,expectation:`ℰ`,exponentiale:`ⅇ`,fallingdotseq:`≒`,fcy:`ф`,female:`♀`,ffilig:`ffi`,fflig:`ff`,ffllig:`ffl`,ffr:`𝔣`,filig:`fi`,fjlig:`fj`,flat:`♭`,fllig:`fl`,fltns:`▱`,fnof:`ƒ`,fopf:`𝕗`,forall:`∀`,fork:`⋔`,forkv:`⫙`,fpartint:`⨍`,frac12:`½`,frac13:`⅓`,frac14:`¼`,frac15:`⅕`,frac16:`⅙`,frac18:`⅛`,frac23:`⅔`,frac25:`⅖`,frac34:`¾`,frac35:`⅗`,frac38:`⅜`,frac45:`⅘`,frac56:`⅚`,frac58:`⅝`,frac78:`⅞`,frasl:`⁄`,frown:`⌢`,fscr:`𝒻`,gE:`≧`,gEl:`⪌`,gacute:`ǵ`,gamma:`γ`,gammad:`ϝ`,gap:`⪆`,gbreve:`ğ`,gcirc:`ĝ`,gcy:`г`,gdot:`ġ`,ge:`≥`,gel:`⋛`,geq:`≥`,geqq:`≧`,geqslant:`⩾`,ges:`⩾`,gescc:`⪩`,gesdot:`⪀`,gesdoto:`⪂`,gesdotol:`⪄`,gesl:`⋛︀`,gesles:`⪔`,gfr:`𝔤`,gg:`≫`,ggg:`⋙`,gimel:`ℷ`,gjcy:`ѓ`,gl:`≷`,glE:`⪒`,gla:`⪥`,glj:`⪤`,gnE:`≩`,gnap:`⪊`,gnapprox:`⪊`,gne:`⪈`,gneq:`⪈`,gneqq:`≩`,gnsim:`⋧`,gopf:`𝕘`,grave:"`",gscr:`ℊ`,gsim:`≳`,gsime:`⪎`,gsiml:`⪐`,gt:`>`,gtcc:`⪧`,gtcir:`⩺`,gtdot:`⋗`,gtlPar:`⦕`,gtquest:`⩼`,gtrapprox:`⪆`,gtrarr:`⥸`,gtrdot:`⋗`,gtreqless:`⋛`,gtreqqless:`⪌`,gtrless:`≷`,gtrsim:`≳`,gvertneqq:`≩︀`,gvnE:`≩︀`,hArr:`⇔`,hairsp:` `,half:`½`,hamilt:`ℋ`,hardcy:`ъ`,harr:`↔`,harrcir:`⥈`,harrw:`↭`,hbar:`ℏ`,hcirc:`ĥ`,hearts:`♥`,heartsuit:`♥`,hellip:`…`,hercon:`⊹`,hfr:`𝔥`,hksearow:`⤥`,hkswarow:`⤦`,hoarr:`⇿`,homtht:`∻`,hookleftarrow:`↩`,hookrightarrow:`↪`,hopf:`𝕙`,horbar:`―`,hscr:`𝒽`,hslash:`ℏ`,hstrok:`ħ`,hybull:`⁃`,hyphen:`‐`,iacute:`í`,ic:`⁣`,icirc:`î`,icy:`и`,iecy:`е`,iexcl:`¡`,iff:`⇔`,ifr:`𝔦`,igrave:`ì`,ii:`ⅈ`,iiiint:`⨌`,iiint:`∭`,iinfin:`⧜`,iiota:`℩`,ijlig:`ij`,imacr:`ī`,image:`ℑ`,imagline:`ℐ`,imagpart:`ℑ`,imath:`ı`,imof:`⊷`,imped:`Ƶ`,in:`∈`,incare:`℅`,infin:`∞`,infintie:`⧝`,inodot:`ı`,int:`∫`,intcal:`⊺`,integers:`ℤ`,intercal:`⊺`,intlarhk:`⨗`,intprod:`⨼`,iocy:`ё`,iogon:`į`,iopf:`𝕚`,iota:`ι`,iprod:`⨼`,iquest:`¿`,iscr:`𝒾`,isin:`∈`,isinE:`⋹`,isindot:`⋵`,isins:`⋴`,isinsv:`⋳`,isinv:`∈`,it:`⁢`,itilde:`ĩ`,iukcy:`і`,iuml:`ï`,jcirc:`ĵ`,jcy:`й`,jfr:`𝔧`,jmath:`ȷ`,jopf:`𝕛`,jscr:`𝒿`,jsercy:`ј`,jukcy:`є`,kappa:`κ`,kappav:`ϰ`,kcedil:`ķ`,kcy:`к`,kfr:`𝔨`,kgreen:`ĸ`,khcy:`х`,kjcy:`ќ`,kopf:`𝕜`,kscr:`𝓀`,lAarr:`⇚`,lArr:`⇐`,lAtail:`⤛`,lBarr:`⤎`,lE:`≦`,lEg:`⪋`,lHar:`⥢`,lacute:`ĺ`,laemptyv:`⦴`,lagran:`ℒ`,lambda:`λ`,lang:`⟨`,langd:`⦑`,langle:`⟨`,lap:`⪅`,laquo:`«`,larr:`←`,larrb:`⇤`,larrbfs:`⤟`,larrfs:`⤝`,larrhk:`↩`,larrlp:`↫`,larrpl:`⤹`,larrsim:`⥳`,larrtl:`↢`,lat:`⪫`,latail:`⤙`,late:`⪭`,lates:`⪭︀`,lbarr:`⤌`,lbbrk:`❲`,lbrace:`{`,lbrack:`[`,lbrke:`⦋`,lbrksld:`⦏`,lbrkslu:`⦍`,lcaron:`ľ`,lcedil:`ļ`,lceil:`⌈`,lcub:`{`,lcy:`л`,ldca:`⤶`,ldquo:`“`,ldquor:`„`,ldrdhar:`⥧`,ldrushar:`⥋`,ldsh:`↲`,le:`≤`,leftarrow:`←`,leftarrowtail:`↢`,leftharpoondown:`↽`,leftharpoonup:`↼`,leftleftarrows:`⇇`,leftrightarrow:`↔`,leftrightarrows:`⇆`,leftrightharpoons:`⇋`,leftrightsquigarrow:`↭`,leftthreetimes:`⋋`,leg:`⋚`,leq:`≤`,leqq:`≦`,leqslant:`⩽`,les:`⩽`,lescc:`⪨`,lesdot:`⩿`,lesdoto:`⪁`,lesdotor:`⪃`,lesg:`⋚︀`,lesges:`⪓`,lessapprox:`⪅`,lessdot:`⋖`,lesseqgtr:`⋚`,lesseqqgtr:`⪋`,lessgtr:`≶`,lesssim:`≲`,lfisht:`⥼`,lfloor:`⌊`,lfr:`𝔩`,lg:`≶`,lgE:`⪑`,lhard:`↽`,lharu:`↼`,lharul:`⥪`,lhblk:`▄`,ljcy:`љ`,ll:`≪`,llarr:`⇇`,llcorner:`⌞`,llhard:`⥫`,lltri:`◺`,lmidot:`ŀ`,lmoust:`⎰`,lmoustache:`⎰`,lnE:`≨`,lnap:`⪉`,lnapprox:`⪉`,lne:`⪇`,lneq:`⪇`,lneqq:`≨`,lnsim:`⋦`,loang:`⟬`,loarr:`⇽`,lobrk:`⟦`,longleftarrow:`⟵`,longleftrightarrow:`⟷`,longmapsto:`⟼`,longrightarrow:`⟶`,looparrowleft:`↫`,looparrowright:`↬`,lopar:`⦅`,lopf:`𝕝`,loplus:`⨭`,lotimes:`⨴`,lowast:`∗`,lowbar:`_`,loz:`◊`,lozenge:`◊`,lozf:`⧫`,lpar:`(`,lparlt:`⦓`,lrarr:`⇆`,lrcorner:`⌟`,lrhar:`⇋`,lrhard:`⥭`,lrm:`‎`,lrtri:`⊿`,lsaquo:`‹`,lscr:`𝓁`,lsh:`↰`,lsim:`≲`,lsime:`⪍`,lsimg:`⪏`,lsqb:`[`,lsquo:`‘`,lsquor:`‚`,lstrok:`ł`,lt:`<`,ltcc:`⪦`,ltcir:`⩹`,ltdot:`⋖`,lthree:`⋋`,ltimes:`⋉`,ltlarr:`⥶`,ltquest:`⩻`,ltrPar:`⦖`,ltri:`◃`,ltrie:`⊴`,ltrif:`◂`,lurdshar:`⥊`,luruhar:`⥦`,lvertneqq:`≨︀`,lvnE:`≨︀`,mDDot:`∺`,macr:`¯`,male:`♂`,malt:`✠`,maltese:`✠`,map:`↦`,mapsto:`↦`,mapstodown:`↧`,mapstoleft:`↤`,mapstoup:`↥`,marker:`▮`,mcomma:`⨩`,mcy:`м`,mdash:`—`,measuredangle:`∡`,mfr:`𝔪`,mho:`℧`,micro:`µ`,mid:`∣`,midast:`*`,midcir:`⫰`,middot:`·`,minus:`−`,minusb:`⊟`,minusd:`∸`,minusdu:`⨪`,mlcp:`⫛`,mldr:`…`,mnplus:`∓`,models:`⊧`,mopf:`𝕞`,mp:`∓`,mscr:`𝓂`,mstpos:`∾`,mu:`μ`,multimap:`⊸`,mumap:`⊸`,nGg:`⋙̸`,nGt:`≫⃒`,nGtv:`≫̸`,nLeftarrow:`⇍`,nLeftrightarrow:`⇎`,nLl:`⋘̸`,nLt:`≪⃒`,nLtv:`≪̸`,nRightarrow:`⇏`,nVDash:`⊯`,nVdash:`⊮`,nabla:`∇`,nacute:`ń`,nang:`∠⃒`,nap:`≉`,napE:`⩰̸`,napid:`≋̸`,napos:`ʼn`,napprox:`≉`,natur:`♮`,natural:`♮`,naturals:`ℕ`,nbsp:`\xA0`,nbump:`≎̸`,nbumpe:`≏̸`,ncap:`⩃`,ncaron:`ň`,ncedil:`ņ`,ncong:`≇`,ncongdot:`⩭̸`,ncup:`⩂`,ncy:`н`,ndash:`–`,ne:`≠`,neArr:`⇗`,nearhk:`⤤`,nearr:`↗`,nearrow:`↗`,nedot:`≐̸`,nequiv:`≢`,nesear:`⤨`,nesim:`≂̸`,nexist:`∄`,nexists:`∄`,nfr:`𝔫`,ngE:`≧̸`,nge:`≱`,ngeq:`≱`,ngeqq:`≧̸`,ngeqslant:`⩾̸`,nges:`⩾̸`,ngsim:`≵`,ngt:`≯`,ngtr:`≯`,nhArr:`⇎`,nharr:`↮`,nhpar:`⫲`,ni:`∋`,nis:`⋼`,nisd:`⋺`,niv:`∋`,njcy:`њ`,nlArr:`⇍`,nlE:`≦̸`,nlarr:`↚`,nldr:`‥`,nle:`≰`,nleftarrow:`↚`,nleftrightarrow:`↮`,nleq:`≰`,nleqq:`≦̸`,nleqslant:`⩽̸`,nles:`⩽̸`,nless:`≮`,nlsim:`≴`,nlt:`≮`,nltri:`⋪`,nltrie:`⋬`,nmid:`∤`,nopf:`𝕟`,not:`¬`,notin:`∉`,notinE:`⋹̸`,notindot:`⋵̸`,notinva:`∉`,notinvb:`⋷`,notinvc:`⋶`,notni:`∌`,notniva:`∌`,notnivb:`⋾`,notnivc:`⋽`,npar:`∦`,nparallel:`∦`,nparsl:`⫽⃥`,npart:`∂̸`,npolint:`⨔`,npr:`⊀`,nprcue:`⋠`,npre:`⪯̸`,nprec:`⊀`,npreceq:`⪯̸`,nrArr:`⇏`,nrarr:`↛`,nrarrc:`⤳̸`,nrarrw:`↝̸`,nrightarrow:`↛`,nrtri:`⋫`,nrtrie:`⋭`,nsc:`⊁`,nsccue:`⋡`,nsce:`⪰̸`,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:`ñ`,ntlg:`≸`,ntriangleleft:`⋪`,ntrianglelefteq:`⋬`,ntriangleright:`⋫`,ntrianglerighteq:`⋭`,nu:`ν`,num:`#`,numero:`№`,numsp:` `,nvDash:`⊭`,nvHarr:`⤄`,nvap:`≍⃒`,nvdash:`⊬`,nvge:`≥⃒`,nvgt:`>⃒`,nvinfin:`⧞`,nvlArr:`⤂`,nvle:`≤⃒`,nvlt:`<⃒`,nvltrie:`⊴⃒`,nvrArr:`⤃`,nvrtrie:`⊵⃒`,nvsim:`∼⃒`,nwArr:`⇖`,nwarhk:`⤣`,nwarr:`↖`,nwarrow:`↖`,nwnear:`⤧`,oS:`Ⓢ`,oacute:`ó`,oast:`⊛`,ocir:`⊚`,ocirc:`ô`,ocy:`о`,odash:`⊝`,odblac:`ő`,odiv:`⨸`,odot:`⊙`,odsold:`⦼`,oelig:`œ`,ofcir:`⦿`,ofr:`𝔬`,ogon:`˛`,ograve:`ò`,ogt:`⧁`,ohbar:`⦵`,ohm:`Ω`,oint:`∮`,olarr:`↺`,olcir:`⦾`,olcross:`⦻`,oline:`‾`,olt:`⧀`,omacr:`ō`,omega:`ω`,omicron:`ο`,omid:`⦶`,ominus:`⊖`,oopf:`𝕠`,opar:`⦷`,operp:`⦹`,oplus:`⊕`,or:`∨`,orarr:`↻`,ord:`⩝`,order:`ℴ`,orderof:`ℴ`,ordf:`ª`,ordm:`º`,origof:`⊶`,oror:`⩖`,orslope:`⩗`,orv:`⩛`,oscr:`ℴ`,oslash:`ø`,osol:`⊘`,otilde:`õ`,otimes:`⊗`,otimesas:`⨶`,ouml:`ö`,ovbar:`⌽`,par:`∥`,para:`¶`,parallel:`∥`,parsim:`⫳`,parsl:`⫽`,part:`∂`,pcy:`п`,percnt:`%`,period:`.`,permil:`‰`,perp:`⊥`,pertenk:`‱`,pfr:`𝔭`,phi:`φ`,phiv:`ϕ`,phmmat:`ℳ`,phone:`☎`,pi:`π`,pitchfork:`⋔`,piv:`ϖ`,planck:`ℏ`,planckh:`ℎ`,plankv:`ℏ`,plus:`+`,plusacir:`⨣`,plusb:`⊞`,pluscir:`⨢`,plusdo:`∔`,plusdu:`⨥`,pluse:`⩲`,plusmn:`±`,plussim:`⨦`,plustwo:`⨧`,pm:`±`,pointint:`⨕`,popf:`𝕡`,pound:`£`,pr:`≺`,prE:`⪳`,prap:`⪷`,prcue:`≼`,pre:`⪯`,prec:`≺`,precapprox:`⪷`,preccurlyeq:`≼`,preceq:`⪯`,precnapprox:`⪹`,precneqq:`⪵`,precnsim:`⋨`,precsim:`≾`,prime:`′`,primes:`ℙ`,prnE:`⪵`,prnap:`⪹`,prnsim:`⋨`,prod:`∏`,profalar:`⌮`,profline:`⌒`,profsurf:`⌓`,prop:`∝`,propto:`∝`,prsim:`≾`,prurel:`⊰`,pscr:`𝓅`,psi:`ψ`,puncsp:` `,qfr:`𝔮`,qint:`⨌`,qopf:`𝕢`,qprime:`⁗`,qscr:`𝓆`,quaternions:`ℍ`,quatint:`⨖`,quest:`?`,questeq:`≟`,quot:`"`,rAarr:`⇛`,rArr:`⇒`,rAtail:`⤜`,rBarr:`⤏`,rHar:`⥤`,race:`∽̱`,racute:`ŕ`,radic:`√`,raemptyv:`⦳`,rang:`⟩`,rangd:`⦒`,range:`⦥`,rangle:`⟩`,raquo:`»`,rarr:`→`,rarrap:`⥵`,rarrb:`⇥`,rarrbfs:`⤠`,rarrc:`⤳`,rarrfs:`⤞`,rarrhk:`↪`,rarrlp:`↬`,rarrpl:`⥅`,rarrsim:`⥴`,rarrtl:`↣`,rarrw:`↝`,ratail:`⤚`,ratio:`∶`,rationals:`ℚ`,rbarr:`⤍`,rbbrk:`❳`,rbrace:`}`,rbrack:`]`,rbrke:`⦌`,rbrksld:`⦎`,rbrkslu:`⦐`,rcaron:`ř`,rcedil:`ŗ`,rceil:`⌉`,rcub:`}`,rcy:`р`,rdca:`⤷`,rdldhar:`⥩`,rdquo:`”`,rdquor:`”`,rdsh:`↳`,real:`ℜ`,realine:`ℛ`,realpart:`ℜ`,reals:`ℝ`,rect:`▭`,reg:`®`,rfisht:`⥽`,rfloor:`⌋`,rfr:`𝔯`,rhard:`⇁`,rharu:`⇀`,rharul:`⥬`,rho:`ρ`,rhov:`ϱ`,rightarrow:`→`,rightarrowtail:`↣`,rightharpoondown:`⇁`,rightharpoonup:`⇀`,rightleftarrows:`⇄`,rightleftharpoons:`⇌`,rightrightarrows:`⇉`,rightsquigarrow:`↝`,rightthreetimes:`⋌`,ring:`˚`,risingdotseq:`≓`,rlarr:`⇄`,rlhar:`⇌`,rlm:`‏`,rmoust:`⎱`,rmoustache:`⎱`,rnmid:`⫮`,roang:`⟭`,roarr:`⇾`,robrk:`⟧`,ropar:`⦆`,ropf:`𝕣`,roplus:`⨮`,rotimes:`⨵`,rpar:`)`,rpargt:`⦔`,rppolint:`⨒`,rrarr:`⇉`,rsaquo:`›`,rscr:`𝓇`,rsh:`↱`,rsqb:`]`,rsquo:`’`,rsquor:`’`,rthree:`⋌`,rtimes:`⋊`,rtri:`▹`,rtrie:`⊵`,rtrif:`▸`,rtriltri:`⧎`,ruluhar:`⥨`,rx:`℞`,sacute:`ś`,sbquo:`‚`,sc:`≻`,scE:`⪴`,scap:`⪸`,scaron:`š`,sccue:`≽`,sce:`⪰`,scedil:`ş`,scirc:`ŝ`,scnE:`⪶`,scnap:`⪺`,scnsim:`⋩`,scpolint:`⨓`,scsim:`≿`,scy:`с`,sdot:`⋅`,sdotb:`⊡`,sdote:`⩦`,seArr:`⇘`,searhk:`⤥`,searr:`↘`,searrow:`↘`,sect:`§`,semi:`;`,seswar:`⤩`,setminus:`∖`,setmn:`∖`,sext:`✶`,sfr:`𝔰`,sfrown:`⌢`,sharp:`♯`,shchcy:`щ`,shcy:`ш`,shortmid:`∣`,shortparallel:`∥`,shy:`­`,sigma:`σ`,sigmaf:`ς`,sigmav:`ς`,sim:`∼`,simdot:`⩪`,sime:`≃`,simeq:`≃`,simg:`⪞`,simgE:`⪠`,siml:`⪝`,simlE:`⪟`,simne:`≆`,simplus:`⨤`,simrarr:`⥲`,slarr:`←`,smallsetminus:`∖`,smashp:`⨳`,smeparsl:`⧤`,smid:`∣`,smile:`⌣`,smt:`⪪`,smte:`⪬`,smtes:`⪬︀`,softcy:`ь`,sol:`/`,solb:`⧄`,solbar:`⌿`,sopf:`𝕤`,spades:`♠`,spadesuit:`♠`,spar:`∥`,sqcap:`⊓`,sqcaps:`⊓︀`,sqcup:`⊔`,sqcups:`⊔︀`,sqsub:`⊏`,sqsube:`⊑`,sqsubset:`⊏`,sqsubseteq:`⊑`,sqsup:`⊐`,sqsupe:`⊒`,sqsupset:`⊐`,sqsupseteq:`⊒`,squ:`□`,square:`□`,squarf:`▪`,squf:`▪`,srarr:`→`,sscr:`𝓈`,ssetmn:`∖`,ssmile:`⌣`,sstarf:`⋆`,star:`☆`,starf:`★`,straightepsilon:`ϵ`,straightphi:`ϕ`,strns:`¯`,sub:`⊂`,subE:`⫅`,subdot:`⪽`,sube:`⊆`,subedot:`⫃`,submult:`⫁`,subnE:`⫋`,subne:`⊊`,subplus:`⪿`,subrarr:`⥹`,subset:`⊂`,subseteq:`⊆`,subseteqq:`⫅`,subsetneq:`⊊`,subsetneqq:`⫋`,subsim:`⫇`,subsub:`⫕`,subsup:`⫓`,succ:`≻`,succapprox:`⪸`,succcurlyeq:`≽`,succeq:`⪰`,succnapprox:`⪺`,succneqq:`⪶`,succnsim:`⋩`,succsim:`≿`,sum:`∑`,sung:`♪`,sup1:`¹`,sup2:`²`,sup3:`³`,sup:`⊃`,supE:`⫆`,supdot:`⪾`,supdsub:`⫘`,supe:`⊇`,supedot:`⫄`,suphsol:`⟉`,suphsub:`⫗`,suplarr:`⥻`,supmult:`⫂`,supnE:`⫌`,supne:`⊋`,supplus:`⫀`,supset:`⊃`,supseteq:`⊇`,supseteqq:`⫆`,supsetneq:`⊋`,supsetneqq:`⫌`,supsim:`⫈`,supsub:`⫔`,supsup:`⫖`,swArr:`⇙`,swarhk:`⤦`,swarr:`↙`,swarrow:`↙`,swnwar:`⤪`,szlig:`ß`,target:`⌖`,tau:`τ`,tbrk:`⎴`,tcaron:`ť`,tcedil:`ţ`,tcy:`т`,tdot:`⃛`,telrec:`⌕`,tfr:`𝔱`,there4:`∴`,therefore:`∴`,theta:`θ`,thetasym:`ϑ`,thetav:`ϑ`,thickapprox:`≈`,thicksim:`∼`,thinsp:` `,thkap:`≈`,thksim:`∼`,thorn:`þ`,tilde:`˜`,times:`×`,timesb:`⊠`,timesbar:`⨱`,timesd:`⨰`,tint:`∭`,toea:`⤨`,top:`⊤`,topbot:`⌶`,topcir:`⫱`,topf:`𝕥`,topfork:`⫚`,tosa:`⤩`,tprime:`‴`,trade:`™`,triangle:`▵`,triangledown:`▿`,triangleleft:`◃`,trianglelefteq:`⊴`,triangleq:`≜`,triangleright:`▹`,trianglerighteq:`⊵`,tridot:`◬`,trie:`≜`,triminus:`⨺`,triplus:`⨹`,trisb:`⧍`,tritime:`⨻`,trpezium:`⏢`,tscr:`𝓉`,tscy:`ц`,tshcy:`ћ`,tstrok:`ŧ`,twixt:`≬`,twoheadleftarrow:`↞`,twoheadrightarrow:`↠`,uArr:`⇑`,uHar:`⥣`,uacute:`ú`,uarr:`↑`,ubrcy:`ў`,ubreve:`ŭ`,ucirc:`û`,ucy:`у`,udarr:`⇅`,udblac:`ű`,udhar:`⥮`,ufisht:`⥾`,ufr:`𝔲`,ugrave:`ù`,uharl:`↿`,uharr:`↾`,uhblk:`▀`,ulcorn:`⌜`,ulcorner:`⌜`,ulcrop:`⌏`,ultri:`◸`,umacr:`ū`,uml:`¨`,uogon:`ų`,uopf:`𝕦`,uparrow:`↑`,updownarrow:`↕`,upharpoonleft:`↿`,upharpoonright:`↾`,uplus:`⊎`,upsi:`υ`,upsih:`ϒ`,upsilon:`υ`,upuparrows:`⇈`,urcorn:`⌝`,urcorner:`⌝`,urcrop:`⌎`,uring:`ů`,urtri:`◹`,uscr:`𝓊`,utdot:`⋰`,utilde:`ũ`,utri:`▵`,utrif:`▴`,uuarr:`⇈`,uuml:`ü`,uwangle:`⦧`,vArr:`⇕`,vBar:`⫨`,vBarv:`⫩`,vDash:`⊨`,vangrt:`⦜`,varepsilon:`ϵ`,varkappa:`ϰ`,varnothing:`∅`,varphi:`ϕ`,varpi:`ϖ`,varpropto:`∝`,varr:`↕`,varrho:`ϱ`,varsigma:`ς`,varsubsetneq:`⊊︀`,varsubsetneqq:`⫋︀`,varsupsetneq:`⊋︀`,varsupsetneqq:`⫌︀`,vartheta:`ϑ`,vartriangleleft:`⊲`,vartriangleright:`⊳`,vcy:`в`,vdash:`⊢`,vee:`∨`,veebar:`⊻`,veeeq:`≚`,vellip:`⋮`,verbar:`|`,vert:`|`,vfr:`𝔳`,vltri:`⊲`,vnsub:`⊂⃒`,vnsup:`⊃⃒`,vopf:`𝕧`,vprop:`∝`,vrtri:`⊳`,vscr:`𝓋`,vsubnE:`⫋︀`,vsubne:`⊊︀`,vsupnE:`⫌︀`,vsupne:`⊋︀`,vzigzag:`⦚`,wcirc:`ŵ`,wedbar:`⩟`,wedge:`∧`,wedgeq:`≙`,weierp:`℘`,wfr:`𝔴`,wopf:`𝕨`,wp:`℘`,wr:`≀`,wreath:`≀`,wscr:`𝓌`,xcap:`⋂`,xcirc:`◯`,xcup:`⋃`,xdtri:`▽`,xfr:`𝔵`,xhArr:`⟺`,xharr:`⟷`,xi:`ξ`,xlArr:`⟸`,xlarr:`⟵`,xmap:`⟼`,xnis:`⋻`,xodot:`⨀`,xopf:`𝕩`,xoplus:`⨁`,xotime:`⨂`,xrArr:`⟹`,xrarr:`⟶`,xscr:`𝓍`,xsqcup:`⨆`,xuplus:`⨄`,xutri:`△`,xvee:`⋁`,xwedge:`⋀`,yacute:`ý`,yacy:`я`,ycirc:`ŷ`,ycy:`ы`,yen:`¥`,yfr:`𝔶`,yicy:`ї`,yopf:`𝕪`,yscr:`𝓎`,yucy:`ю`,yuml:`ÿ`,zacute:`ź`,zcaron:`ž`,zcy:`з`,zdot:`ż`,zeetrf:`ℨ`,zeta:`ζ`,zfr:`𝔷`,zhcy:`ж`,zigrarr:`⇝`,zopf:`𝕫`,zscr:`𝓏`,zwj:`‍`,zwnj:`‌`},Qr={}.hasOwnProperty;function $r(e){return Qr.call(Zr,e)?Zr[e]:!1}function ei(e,t,n,r){let i=e.length,a=0,o;if(t=t<0?-t>i?0:i+t:t>i?i:t,n=n>0?n:0,r.length<1e4)o=Array.from(r),o.unshift(t,n),e.splice(...o);else for(n&&e.splice(t,n);a<r.length;)o=r.slice(a,a+1e4),o.unshift(t,0),e.splice(...o),a+=1e4,t+=1e4}function ti(e,t){return e.length>0?(ei(e,e.length,0,t),e):t}var ni={}.hasOwnProperty;function ri(e){let t={},n=-1;for(;++n<e.length;)ii(t,e[n]);return t}function ii(e,t){let n;for(n in t){let r=(ni.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],a;if(i)for(a in i){ni.call(r,a)||(r[a]=[]);let e=i[a];ai(r[a],Array.isArray(e)?e:e?[e]:[])}}}function ai(e,t){let n=-1,r=[];for(;++n<t.length;)(t[n].add===`after`?e:r).push(t[n]);ei(e,0,0,r)}function oi(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)==65535||(n&65535)==65534||n>1114111?`�`:String.fromCodePoint(n)}function si(e){return e.replace(/[\t\n\r ]+/g,` `).replace(/^ | $/g,``).toLowerCase().toUpperCase()}var ci=vi(/[A-Za-z]/),li=vi(/[\dA-Za-z]/),ui=vi(/[#-'*+\--9=?A-Z^-~]/);function di(e){return e!==null&&(e<32||e===127)}var fi=vi(/\d/),pi=vi(/[\dA-Fa-f]/),mi=vi(/[!-/:-@[-`{-~]/);function V(e){return e!==null&&e<-2}function hi(e){return e!==null&&(e<0||e===32)}function H(e){return e===-2||e===-1||e===32}var gi=vi(/\p{P}|\p{S}/u),_i=vi(/\s/);function vi(e){return t;function t(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function U(e,t,n,r){let i=r?r-1:1/0,a=0;return o;function o(r){return H(r)?(e.enter(n),s(r)):t(r)}function s(r){return H(r)&&a++<i?(e.consume(r),s):(e.exit(n),t(r))}}function yi(e,t,n,r,i,a){let o=0;return s;function s(t){return a>0&&H(t)?(e.enter(r),c(t)):l(t)}function c(t){return H(t)&&o<a?(e.consume(t),o++,c):(e.exit(r),l(t))}function l(e){return o>=i?t(e):n(e)}}var bi={tokenize:xi};function xi(e){let t=e.attempt(this.parser.constructs.contentInitial,r,i),n;return t;function r(n){if(n===null)e.consume(n);else return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}function i(t){return e.enter(`paragraph`),a(t)}function a(t){let r=e.enter(`chunkText`,{contentType:`text`,previous:n});return n&&(n.next=r),n=r,o(t)}function o(t){if(t===null)e.exit(`chunkText`),e.exit(`paragraph`),e.consume(t);else return V(t)?(e.consume(t),e.exit(`chunkText`),a):(e.consume(t),o)}}var Si=class{constructor(){this.index=new Map,this.map=[]}add(e,t,n){Ci(this,e,t,n,!1)}addBefore(e,t,n){Ci(this,e,t,n,!0)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Ci(e,t,n,r,i){if(n===0&&r.length===0)return;let a=e.index.get(t);if(a){a[1]+=n,i?(r.push(...a[2]),a[2]=r):a[2].push(...r);return}let o=[t,n,r];e.map.push(o),e.index.set(t,o)}var wi={tokenize:Ei},Ti={tokenize:Di};function Ei(e){let t=this,n=[],r=0,i,a,o;return s;function s(i){if(r<n.length){let a=n[r];return t.containerState=a[1],e.attempt(a[0].continuation,c,l)(i)}return l(i)}function c(e){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&v();let n=t.events.length,a=n,o;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){o=t.events[a][1].end;break}_(r);let s=n;for(;s<t.events.length;)t.events[s][1].end={...o},s++;let c=new Si;return c.add(a+1,0,t.events.slice(n)),c.add(n,s-n,[]),c.consume(t.events),l(e)}return s(e)}function l(a){if(r===n.length){if(!i)return f(a);if(i.currentConstruct&&i.currentConstruct.concrete)return m(a);t.interrupt=!(!i.currentConstruct||i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Ti,u,d)(a)}function u(e){return i&&v(),_(r),f(e)}function d(e){return t.parser.lazy[t.now().line]=r!==n.length,o=t.now().offset,m(e)}function f(n){return t.containerState={},e.attempt(Ti,p,m)(n)}function p(e){return r++,n.push([t.currentConstruct,t.containerState]),f(e)}function m(n){if(n===null)i&&v(),_(0),e.consume(n);else return i||=t.parser.flow(t.now()),e.enter(`chunkFlow`,{_tokenizer:i,contentType:`flow`,previous:a}),h(n)}function h(n){if(n===null)g(e.exit(`chunkFlow`),!0),_(0),e.consume(n);else return V(n)?(e.consume(n),g(e.exit(`chunkFlow`)),r=0,t.interrupt=void 0,s):(e.consume(n),h)}function g(e,n){let s=t.sliceStream(e);if(n&&s.push(null),e.previous=a,a&&(a.next=e),a=e,i.defineSkip(e.start),i.write(s),t.parser.lazy[e.start.line]){let e=i.events.length;for(;e--;)if(i.events[e][1].start.offset<o&&(!i.events[e][1].end||i.events[e][1].end.offset>o))return;let n=t.events.length,a=n,s,c;for(;a--;)if(t.events[a][0]===`exit`&&t.events[a][1].type===`chunkFlow`){if(s){c=t.events[a][1].end;break}s=!0}for(_(r),e=n;e<t.events.length;)t.events[e][1].end={...c},e++;let l=new Si;l.add(a+1,0,t.events.slice(n)),l.add(n,e-n,[]),l.consume(t.events)}}function _(r){let i=n.length;for(;i-->r;){let r=n[i];t.containerState=r[1],r[0].exit.call(t,e)}n.length=r}function v(){i.write([null]),a=void 0,i=void 0,t.containerState._closeFlow=void 0}}function Di(e,t,n){return U(e,e.attempt(this.parser.constructs.document,t,n),`linePrefix`,this.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)}function Oi(e){if(e===null||hi(e)||_i(e))return 1;if(gi(e))return 2}function ki(e,t,n){let r=[],i=-1;for(;++i<e.length;){let a=e[i].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}var Ai={name:`attention`,resolveAll:ji,tokenize:Mi};function ji(e,t){let n=-1,r;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`attentionSequence`&&e[n][1]._close){let i=n;for(;i--;)if(e[i][0]===`exit`&&e[i][1].type===`attentionSequence`&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[i][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;let a=e[i][1].end.offset-e[i][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1,o={...e[i][1].end},s={...e[n][1].start};Ni(o,-a),Ni(s,a);let c={type:a>1?`strongSequence`:`emphasisSequence`,start:o,end:{...e[i][1].end}},l={type:a>1?`strongSequence`:`emphasisSequence`,start:{...e[n][1].start},end:s},u={type:a>1?`strongText`:`emphasisText`,start:{...e[i][1].end},end:{...e[n][1].start}},d={type:a>1?`strong`:`emphasis`,start:{...c.start},end:{...l.end}};e[i][1].end={...c.start},e[n][1].start={...l.end},r=[],e[i][1].end.offset-e[i][1].start.offset&&(r=ti(r,[[`enter`,e[i][1],t],[`exit`,e[i][1],t]])),r=ti(r,[[`enter`,d,t],[`enter`,c,t],[`exit`,c,t],[`enter`,u,t]]),r=ti(r,ki(t.parser.constructs.insideSpan.null,e.slice(i+1,n),t)),r=ti(r,[[`exit`,u,t],[`enter`,l,t],[`exit`,l,t],[`exit`,d,t]]);let f=0;e[n][1].end.offset-e[n][1].start.offset&&(f=2,r=ti(r,[[`enter`,e[n][1],t],[`exit`,e[n][1],t]])),ei(e,i-1,n-i+3,r),n=i+r.length-f-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`attentionSequence`&&(e[n][1].type=`data`);return e}function Mi(e,t){let n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Oi(r),a;return o;function o(t){return a=t,e.enter(`attentionSequence`),s(t)}function s(o){if(o===a)return e.consume(o),s;let c=e.exit(`attentionSequence`),l=Oi(o),u=!l||l===2&&i||n.includes(o)&&o!==42&&o!==95,d=!i||i===2&&l||n.includes(r)&&r!==42&&r!==95;return c._open=!!(a===42?u:u&&(i||!d)),c._close=!!(a===42?d:d&&(l||!u)),t(o)}}function Ni(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var Pi={name:`autolink`,tokenize:Fi};function Fi(e,t,n){let r=0;return i;function i(t){return e.enter(`autolink`),e.enter(`autolinkMarker`),e.consume(t),e.exit(`autolinkMarker`),e.enter(`autolinkProtocol`),a}function a(t){return ci(t)?(e.consume(t),o):t===64?n(t):l(t)}function o(e){return e===43||e===45||e===46||li(e)?(r=1,s(e)):l(e)}function s(t){return t===58?(e.consume(t),r=0,c):(t===43||t===45||t===46||li(t))&&r++<32?(e.consume(t),s):(r=0,l(t))}function c(r){return r===62?(e.exit(`autolinkProtocol`),e.enter(`autolinkMarker`),e.consume(r),e.exit(`autolinkMarker`),e.exit(`autolink`),t):r===null||r===32||r===60||di(r)?n(r):(e.consume(r),c)}function l(t){return t===64?(e.consume(t),u):ui(t)?(e.consume(t),l):n(t)}function u(e){return li(e)?d(e):n(e)}function d(n){return n===46?(e.consume(n),r=0,u):n===62?(e.exit(`autolinkProtocol`).type=`autolinkEmail`,e.enter(`autolinkMarker`),e.consume(n),e.exit(`autolinkMarker`),e.exit(`autolink`),t):f(n)}function f(t){if((t===45||li(t))&&r++<63){let n=t===45?f:d;return e.consume(t),n}return n(t)}}var Ii={partial:!0,tokenize:Li};function Li(e,t,n){return r;function r(t){return H(t)?U(e,i,`linePrefix`)(t):i(t)}function i(e){return e===null||V(e)?t(e):n(e)}}var Ri={continuation:{tokenize:Bi},exit:Vi,name:`blockQuote`,tokenize:zi};function zi(e,t,n){let r=this;return i;function i(t){if(t===62){let n=r.containerState;return n.open||=(e.enter(`blockQuote`,{_container:!0}),!0),e.enter(`blockQuotePrefix`),e.enter(`blockQuoteMarker`),e.consume(t),e.exit(`blockQuoteMarker`),a}return n(t)}function a(n){return H(n)?(e.enter(`blockQuotePrefixWhitespace`),e.consume(n),e.exit(`blockQuotePrefixWhitespace`),e.exit(`blockQuotePrefix`),t):(e.exit(`blockQuotePrefix`),t(n))}}function Bi(e,t,n){let r=this;return i;function i(t){return H(t)?U(e,a,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):a(t)}function a(r){return e.attempt(Ri,t,n)(r)}}function Vi(e){e.exit(`blockQuote`)}var Hi={name:`characterEscape`,tokenize:Ui};function Ui(e,t,n){return r;function r(t){return e.enter(`characterEscape`),e.enter(`escapeMarker`),e.consume(t),e.exit(`escapeMarker`),i}function i(r){return mi(r)?(e.enter(`characterEscapeValue`),e.consume(r),e.exit(`characterEscapeValue`),e.exit(`characterEscape`),t):n(r)}}var Wi={name:`characterReference`,tokenize:Gi};function Gi(e,t,n){let r=this,i=0,a,o;return s;function s(t){return e.enter(`characterReference`),e.enter(`characterReferenceMarker`),e.consume(t),e.exit(`characterReferenceMarker`),c}function c(t){return t===35?(e.enter(`characterReferenceMarkerNumeric`),e.consume(t),e.exit(`characterReferenceMarkerNumeric`),l):(e.enter(`characterReferenceValue`),a=31,o=li,u(t))}function l(t){return t===88||t===120?(e.enter(`characterReferenceMarkerHexadecimal`),e.consume(t),e.exit(`characterReferenceMarkerHexadecimal`),e.enter(`characterReferenceValue`),a=6,o=pi,u):(e.enter(`characterReferenceValue`),a=7,o=fi,u(t))}function u(s){if(s===59&&i){let i=e.exit(`characterReferenceValue`);return o===li&&!$r(r.sliceSerialize(i))?n(s):(e.enter(`characterReferenceMarker`),e.consume(s),e.exit(`characterReferenceMarker`),e.exit(`characterReference`),t)}return o(s)&&i++<a?(e.consume(s),u):n(s)}}var Ki={partial:!0,tokenize:qi};function qi(e,t,n){let r=this;return i;function i(t){return t===null?n(t):(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),a)}function a(e){return r.parser.lazy[r.now().line]?n(e):t(e)}}var Ji={concrete:!0,name:`codeFenced`,tokenize:Yi};function Yi(e,t,n){let r=this,i={partial:!0,tokenize:x},a=0,o=0,s;return c;function c(e){return l(e)}function l(t){let n=r.events[r.events.length-1];return a=n&&n[1].type===`linePrefix`?n[2].sliceSerialize(n[1],!0).length:0,s=t,e.enter(`codeFenced`),e.enter(`codeFencedFence`),e.enter(`codeFencedFenceSequence`),u(t)}function u(t){return t===s?(o++,e.consume(t),u):o<3?n(t):(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t))}function d(n){return n===null||V(n)?(e.exit(`codeFencedFence`),r.interrupt?t(n):e.check(Ki,h,b)(n)):(e.enter(`codeFencedFenceInfo`),e.enter(`chunkString`,{contentType:`string`}),f(n))}function f(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),d(t)):H(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceInfo`),U(e,p,`whitespace`)(t)):t===96&&t===s?n(t):(e.consume(t),f)}function p(t){return t===null||V(t)?d(t):(e.enter(`codeFencedFenceMeta`),e.enter(`chunkString`,{contentType:`string`}),m(t))}function m(t){return t===null||V(t)?(e.exit(`chunkString`),e.exit(`codeFencedFenceMeta`),d(t)):t===96&&t===s?n(t):(e.consume(t),m)}function h(t){return e.attempt(i,b,g)(t)}function g(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),_}function _(t){return a>0&&H(t)?U(e,v,`linePrefix`,a+1)(t):v(t)}function v(t){return t===null||V(t)?e.check(Ki,h,b)(t):(e.enter(`codeFlowValue`),y(t))}function y(t){return t===null||V(t)?(e.exit(`codeFlowValue`),v(t)):(e.consume(t),y)}function b(n){return e.exit(`codeFenced`),t(n)}function x(e,t,n){let i=0;return a;function a(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c}function c(t){return e.enter(`codeFencedFence`),H(t)?U(e,l,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):l(t)}function l(t){return t===s?(e.enter(`codeFencedFenceSequence`),u(t)):n(t)}function u(t){return t===s?(i++,e.consume(t),u):i>=o?(e.exit(`codeFencedFenceSequence`),H(t)?U(e,d,`whitespace`)(t):d(t)):n(t)}function d(r){return r===null||V(r)?(e.exit(`codeFencedFence`),t(r)):n(r)}}}var Xi={name:`codeIndented`,tokenize:Qi},Zi={partial:!0,tokenize:$i};function Qi(e,t,n){return r;function r(t){return e.enter(`codeIndented`),yi(e,i,n,`linePrefix`,4,4)(t)}function i(t){return t===null?o(t):V(t)?e.attempt(Zi,i,o)(t):(e.enter(`codeFlowValue`),a(t))}function a(t){return t===null||V(t)?(e.exit(`codeFlowValue`),i(t)):(e.consume(t),a)}function o(n){return e.exit(`codeIndented`),t(n)}}function $i(e,t,n){let r=this;return i;function i(o){return r.parser.lazy[r.now().line]?n(o):V(o)?(e.enter(`lineEnding`),e.consume(o),e.exit(`lineEnding`),i):yi(e,t,a,`linePrefix`,4,4)(o)}function a(e){return V(e)?i(e):n(e)}}var ea={name:`codeText`,previous:ta,resolve:W,tokenize:na};function W(e){let t=e.length-4,n=3,r,i;if((e[n][1].type===`lineEnding`||e[n][1].type===`space`)&&(e[t][1].type===`lineEnding`||e[t][1].type===`space`)){for(r=n;++r<t;)if(e[r][1].type===`codeTextData`){e[n][1].type=`codeTextPadding`,e[t][1].type=`codeTextPadding`,n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!==`lineEnding`&&(i=r):(r===t||e[r][1].type===`lineEnding`)&&(e[i][1].type=`codeTextData`,r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ta(e){return e!==96||this.events[this.events.length-1][1].type===`characterEscape`}function na(e,t,n){let r=0,i,a;return o;function o(t){return e.enter(`codeText`),e.enter(`codeTextSequence`),s(t)}function s(t){return t===96?(e.consume(t),r++,s):(e.exit(`codeTextSequence`),c(t))}function c(t){return t===null?n(t):t===32?(e.enter(`space`),e.consume(t),e.exit(`space`),c):t===96?(a=e.enter(`codeTextSequence`),i=0,u(t)):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),c):(e.enter(`codeTextData`),l(t))}function l(t){return t===null||t===32||t===96||V(t)?(e.exit(`codeTextData`),c(t)):(e.consume(t),l)}function u(n){return n===96?(e.consume(n),i++,u):i===r?(e.exit(`codeTextSequence`),e.exit(`codeText`),t(n)):(a.type=`codeTextData`,l(n))}}var ra=class{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,t){let n=t??1/0;return n<this.left.length?this.left.slice(e,n):e>this.left.length?this.right.slice(this.right.length-n+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-n+this.left.length).reverse())}splice(e,t,n){let r=t||0;this.setCursor(Math.trunc(e));let i=this.right.splice(this.right.length-r,1/0);return n&&ia(this.left,n),i.reverse()}pop(){return this.setCursor(1/0),this.left.pop()}push(e){this.setCursor(1/0),this.left.push(e)}pushMany(e){this.setCursor(1/0),ia(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),ia(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0)){if(e<this.left.length){let t=this.left.splice(e,1/0);ia(this.right,t.reverse())}else{let t=this.right.splice(this.left.length+this.right.length-e,1/0);ia(this.left,t.reverse())}}}};function ia(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function aa(e){let t={},n=-1,r,i,a,o,s,c,l,u=new ra(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(r=u.get(n),n&&r[1].type===`chunkFlow`&&u.get(n-1)[1].type===`listItemPrefix`&&(c=r[1]._tokenizer.events,a=0,a<c.length&&c[a][1].type===`lineEndingBlank`&&(a+=2),a<c.length&&c[a][1].type===`content`))for(;++a<c.length&&c[a][1].type!==`content`;)c[a][1].type===`chunkText`&&(c[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]===`enter`)r[1].contentType&&(Object.assign(t,oa(u,n)),n=t[n],l=!0);else if(r[1]._container){for(a=n,i=void 0;a--;)if(o=u.get(a),o[1].type===`lineEnding`||o[1].type===`lineEndingBlank`)o[0]===`enter`&&(i&&(u.get(i)[1].type=`lineEndingBlank`),o[1].type=`lineEnding`,i=a);else if(o[1].type!==`linePrefix`&&o[1].type!==`listItemIndent`)break;i&&(r[1].end={...u.get(i)[1].start},s=u.slice(i,n),s.unshift(r),u.splice(i,n-i+1,s))}}return ei(e,0,1/0,u.slice(0)),!l}function oa(e,t){let n=e.get(t)[1],r=e.get(t)[2],i=t-1,a=[],o=n._tokenizer;o||(o=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));let s=o.events,c=[],l={},u,d,f=-1,p=n,m=0,h=0,g=[h];for(;p;){for(;e.get(++i)[1]!==p;);a.push(i),p._tokenizer||(u=r.sliceStream(p),p.next||u.push(null),d&&o.defineSkip(p.start),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(u),p._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),d=p,p=p.next}for(p=n;++f<s.length;)s[f][0]===`exit`&&s[f-1][0]===`enter`&&s[f][1].type===s[f-1][1].type&&s[f][1].start.line!==s[f][1].end.line&&(h=f+1,g.push(h),p._tokenizer=void 0,p.previous=void 0,p=p.next);for(o.events=[],p?(p._tokenizer=void 0,p.previous=void 0):g.pop(),f=g.length;f--;){let t=s.slice(g[f],g[f+1]),n=a.pop();c.push([n,n+t.length-1]),e.splice(n,2,t)}for(c.reverse(),f=-1;++f<c.length;)l[m+c[f][0]]=m+c[f][1],m+=c[f][1]-c[f][0]-1;return l}var sa={resolve:la,tokenize:ua},ca={partial:!0,tokenize:da};function la(e){return aa(e),e}function ua(e,t){let n;return r;function r(t){return e.enter(`content`),n=e.enter(`chunkContent`,{contentType:`content`}),i(t)}function i(t){return t===null?a(t):V(t)?e.check(ca,o,a)(t):(e.consume(t),i)}function a(n){return e.exit(`chunkContent`),e.exit(`content`),t(n)}function o(t){return e.consume(t),e.exit(`chunkContent`),n.next=e.enter(`chunkContent`,{contentType:`content`,previous:n}),n=n.next,i}}function da(e,t,n){let r=this;return i;function i(t){return e.exit(`chunkContent`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,a,`linePrefix`)}function a(i){if(i===null||V(i))return n(i);let a=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes(`codeIndented`)&&a&&a[1].type===`linePrefix`&&a[2].sliceSerialize(a[1],!0).length>=4?t(i):e.interrupt(r.parser.constructs.flow,n,t)(i)}}function fa(e,t,n,r,i,a,o,s,c){let l=c||1/0,u=0;return d;function d(t){return t===60?(e.enter(r),e.enter(i),e.enter(a),e.consume(t),e.exit(a),f):t===null||t===32||t===41||di(t)?n(t):(e.enter(r),e.enter(o),e.enter(s),e.enter(`chunkString`,{contentType:`string`}),h(t))}function f(n){return n===62?(e.enter(a),e.consume(n),e.exit(a),e.exit(i),e.exit(r),t):(e.enter(s),e.enter(`chunkString`,{contentType:`string`}),p(n))}function p(t){return t===62?(e.exit(`chunkString`),e.exit(s),f(t)):t===null||t===60||V(t)?n(t):(e.consume(t),t===92?m:p)}function m(t){return t===60||t===62||t===92?(e.consume(t),p):p(t)}function h(i){return!u&&(i===null||i===41||hi(i))?(e.exit(`chunkString`),e.exit(s),e.exit(o),e.exit(r),t(i)):u<l&&i===40?(e.consume(i),u++,h):i===41?(e.consume(i),u--,h):i===null||i===32||i===40||di(i)?n(i):(e.consume(i),i===92?g:h)}function g(t){return t===40||t===41||t===92?(e.consume(t),h):h(t)}}function pa(e,t,n,r,i,a){let o=this,s=0,c;return l;function l(t){return e.enter(r),e.enter(i),e.consume(t),e.exit(i),e.enter(a),u}function u(l){return s>999||l===null||l===91||l===93&&!c||l===94&&!s&&`_hiddenFootnoteSupport`in o.parser.constructs?n(l):l===93?(e.exit(a),e.enter(i),e.consume(l),e.exit(i),e.exit(r),t):V(l)?(e.enter(`lineEnding`),e.consume(l),e.exit(`lineEnding`),u):(e.enter(`chunkString`,{contentType:`string`}),d(l))}function d(t){return t===null||t===91||t===93||V(t)||s++>999?(e.exit(`chunkString`),u(t)):(e.consume(t),c||=!H(t),t===92?f:d)}function f(t){return t===91||t===92||t===93?(e.consume(t),s++,d):d(t)}}function ma(e,t,n,r,i,a){let o;return s;function s(t){return t===34||t===39||t===40?(e.enter(r),e.enter(i),e.consume(t),e.exit(i),o=t===40?41:t,c):n(t)}function c(n){return n===o?(e.enter(i),e.consume(n),e.exit(i),e.exit(r),t):(e.enter(a),l(n))}function l(t){return t===o?(e.exit(a),c(o)):t===null?n(t):V(t)?(e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),U(e,l,`linePrefix`)):(e.enter(`chunkString`,{contentType:`string`}),u(t))}function u(t){return t===o||t===null||V(t)?(e.exit(`chunkString`),l(t)):(e.consume(t),t===92?d:u)}function d(t){return t===o||t===92?(e.consume(t),u):u(t)}}function ha(e,t){let n;return r;function r(i){return V(i)?(e.enter(`lineEnding`),e.consume(i),e.exit(`lineEnding`),n=!0,r):H(i)?U(e,r,n?`linePrefix`:`lineSuffix`)(i):t(i)}}var ga={name:`definition`,tokenize:va},_a={partial:!0,tokenize:ya};function va(e,t,n){let r=this,i;return a;function a(t){return e.enter(`definition`),o(t)}function o(t){return pa.call(r,e,s,n,`definitionLabel`,`definitionLabelMarker`,`definitionLabelString`)(t)}function s(t){return i=si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),c):n(t)}function c(t){return hi(t)?ha(e,l)(t):l(t)}function l(t){return fa(e,u,n,`definitionDestination`,`definitionDestinationLiteral`,`definitionDestinationLiteralMarker`,`definitionDestinationRaw`,`definitionDestinationString`)(t)}function u(t){return e.attempt(_a,d,d)(t)}function d(t){return H(t)?U(e,f,`whitespace`)(t):f(t)}function f(a){return a===null||V(a)?(e.exit(`definition`),r.parser.defined.push(i),t(a)):n(a)}}function ya(e,t,n){return r;function r(t){return hi(t)?ha(e,i)(t):n(t)}function i(t){return ma(e,a,n,`definitionTitle`,`definitionTitleMarker`,`definitionTitleString`)(t)}function a(t){return H(t)?U(e,o,`whitespace`)(t):o(t)}function o(e){return e===null||V(e)?t(e):n(e)}}var ba={name:`hardBreakEscape`,tokenize:xa};function xa(e,t,n){return r;function r(t){return e.enter(`hardBreakEscape`),e.consume(t),i}function i(r){return V(r)?(e.exit(`hardBreakEscape`),t(r)):n(r)}}var Sa={name:`headingAtx`,resolve:Ca,tokenize:wa};function Ca(e,t){let n=e.length-2,r=3;if(e[r][1].type===`whitespace`&&(r+=2),n-2>r&&e[n][1].type===`whitespace`&&(n-=2),e[n][1].type===`atxHeadingSequence`&&(r===n-1||n-4>r&&e[n-2][1].type===`whitespace`)&&(n-=r+1===n?2:4),n>r){let i={type:`atxHeadingText`,start:e[r][1].start,end:e[n][1].end},a={type:`chunkText`,start:e[r][1].start,end:e[n][1].end,contentType:`text`};ei(e,r,n-r+1,[[`enter`,i,t],[`enter`,a,t],[`exit`,a,t],[`exit`,i,t]])}return e}function wa(e,t,n){let r=0;return i;function i(t){return e.enter(`atxHeading`),a(t)}function a(t){return e.enter(`atxHeadingSequence`),o(t)}function o(t){return t===35&&r++<6?(e.consume(t),o):t===null||hi(t)?(e.exit(`atxHeadingSequence`),s(t)):n(t)}function s(n){return n===35?(e.enter(`atxHeadingSequence`),c(n)):n===null||V(n)?(e.exit(`atxHeading`),t(n)):H(n)?U(e,s,`whitespace`)(n):(e.enter(`atxHeadingText`),l(n))}function c(t){return t===35?(e.consume(t),c):(e.exit(`atxHeadingSequence`),s(t))}function l(t){return t===null||t===35||hi(t)?(e.exit(`atxHeadingText`),s(t)):(e.consume(t),l)}}var Ta=`address.article.aside.base.basefont.blockquote.body.caption.center.col.colgroup.dd.details.dialog.dir.div.dl.dt.fieldset.figcaption.figure.footer.form.frame.frameset.h1.h2.h3.h4.h5.h6.head.header.hr.html.iframe.legend.li.link.main.menu.menuitem.nav.noframes.ol.optgroup.option.p.param.search.section.summary.table.tbody.td.tfoot.th.thead.title.tr.track.ul`.split(`.`),Ea=[`pre`,`script`,`style`,`textarea`],Da={concrete:!0,name:`htmlFlow`,resolveTo:ka,tokenize:Aa},Oa={partial:!0,tokenize:ja};function ka(e){let t=e.length;for(;t--&&(e[t][0]!==`enter`||e[t][1].type!==`htmlFlow`););return t>1&&e[t-2][1].type===`linePrefix`&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Aa(e,t,n){let r=this,i,a,o,s,c;return l;function l(e){return u(e)}function u(t){return e.enter(`htmlFlow`),e.enter(`htmlFlowData`),e.consume(t),d}function d(s){return s===33?(e.consume(s),f):s===47?(e.consume(s),a=!0,h):s===63?(e.consume(s),i=3,r.interrupt?t:te):ci(s)?(e.consume(s),o=String.fromCharCode(s),g):n(s)}function f(a){return a===45?(e.consume(a),i=2,p):a===91?(e.consume(a),i=5,s=0,m):ci(a)?(e.consume(a),i=4,r.interrupt?t:te):n(a)}function p(i){return i===45?(e.consume(i),r.interrupt?t:te):n(i)}function m(i){return i===`CDATA[`.charCodeAt(s++)?(e.consume(i),s===6?r.interrupt?t:O:m):n(i)}function h(t){return ci(t)?(e.consume(t),o=String.fromCharCode(t),g):n(t)}function g(s){if(s===null||s===47||s===62||hi(s)){let c=s===47,l=o.toLowerCase();return!c&&!a&&Ea.includes(l)?(i=1,r.interrupt?t(s):O(s)):Ta.includes(o.toLowerCase())?(i=6,c?(e.consume(s),_):r.interrupt?t(s):O(s)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(s):a?v(s):y(s))}return s===45||li(s)?(e.consume(s),o+=String.fromCharCode(s),g):n(s)}function _(i){return i===62?(e.consume(i),r.interrupt?t:O):n(i)}function v(t){return H(t)?(e.consume(t),v):E(t)}function y(t){return t===47?(e.consume(t),E):t===58||t===95||ci(t)?(e.consume(t),b):H(t)?(e.consume(t),y):E(t)}function b(t){return t===45||t===46||t===58||t===95||li(t)?(e.consume(t),b):x(t)}function x(t){return t===61?(e.consume(t),S):H(t)?(e.consume(t),x):y(t)}function S(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),c=t,C):H(t)?(e.consume(t),S):w(t)}function C(t){return t===c?(e.consume(t),c=null,T):t===null||V(t)?n(t):(e.consume(t),C)}function w(t){return t===null||t===34||t===39||t===47||t===60||t===61||t===62||t===96||hi(t)?x(t):(e.consume(t),w)}function T(e){return e===47||e===62||H(e)?y(e):n(e)}function E(t){return t===62?(e.consume(t),D):n(t)}function D(t){return t===null||V(t)?O(t):H(t)?(e.consume(t),D):n(t)}function O(t){return t===45&&i===2?(e.consume(t),M):t===60&&i===1?(e.consume(t),N):t===62&&i===4?(e.consume(t),F):t===63&&i===3?(e.consume(t),te):t===93&&i===5?(e.consume(t),P):V(t)&&(i===6||i===7)?(e.exit(`htmlFlowData`),e.check(Oa,ne,k)(t)):t===null||V(t)?(e.exit(`htmlFlowData`),k(t)):(e.consume(t),O)}function k(t){return e.check(Ki,A,ne)(t)}function A(t){return e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),j}function j(t){return t===null||V(t)?k(t):(e.enter(`htmlFlowData`),O(t))}function M(t){return t===45?(e.consume(t),te):O(t)}function N(t){return t===47?(e.consume(t),o=``,ee):O(t)}function ee(t){if(t===62){let n=o.toLowerCase();return Ea.includes(n)?(e.consume(t),F):O(t)}return ci(t)&&o.length<8?(e.consume(t),o+=String.fromCharCode(t),ee):O(t)}function P(t){return t===93?(e.consume(t),te):O(t)}function te(t){return t===62?(e.consume(t),F):t===45&&i===2?(e.consume(t),te):O(t)}function F(t){return t===null||V(t)?(e.exit(`htmlFlowData`),ne(t)):(e.consume(t),F)}function ne(n){return e.exit(`htmlFlow`),t(n)}}function ja(e,t,n){return r;function r(r){return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),e.attempt(Ii,t,n)}}var Ma={name:`htmlText`,tokenize:Na};function Na(e,t,n){let r=this,i,a,o;return s;function s(t){return e.enter(`htmlText`),e.enter(`htmlTextData`),e.consume(t),c}function c(t){return t===33?(e.consume(t),l):t===47?(e.consume(t),x):t===63?(e.consume(t),y):ci(t)?(e.consume(t),w):n(t)}function l(t){return t===45?(e.consume(t),u):t===91?(e.consume(t),a=0,m):ci(t)?(e.consume(t),v):n(t)}function u(t){return t===45?(e.consume(t),p):n(t)}function d(t){return t===null?n(t):t===45?(e.consume(t),f):V(t)?(o=d,N(t)):(e.consume(t),d)}function f(t){return t===45?(e.consume(t),p):d(t)}function p(e){return e===62?M(e):e===45?f(e):d(e)}function m(t){return t===`CDATA[`.charCodeAt(a++)?(e.consume(t),a===6?h:m):n(t)}function h(t){return t===null?n(t):t===93?(e.consume(t),g):V(t)?(o=h,N(t)):(e.consume(t),h)}function g(t){return t===93?(e.consume(t),_):h(t)}function _(t){return t===62?M(t):t===93?(e.consume(t),_):h(t)}function v(t){return t===null||t===62?M(t):V(t)?(o=v,N(t)):(e.consume(t),v)}function y(t){return t===null?n(t):t===63?(e.consume(t),b):V(t)?(o=y,N(t)):(e.consume(t),y)}function b(e){return e===62?M(e):y(e)}function x(t){return ci(t)?(e.consume(t),S):n(t)}function S(t){return t===45||li(t)?(e.consume(t),S):C(t)}function C(t){return V(t)?(o=C,N(t)):H(t)?(e.consume(t),C):M(t)}function w(t){return t===45||li(t)?(e.consume(t),w):t===47||t===62||hi(t)?T(t):n(t)}function T(t){return t===47?(e.consume(t),M):t===58||t===95||ci(t)?(e.consume(t),E):V(t)?(o=T,N(t)):H(t)?(e.consume(t),T):M(t)}function E(t){return t===45||t===46||t===58||t===95||li(t)?(e.consume(t),E):D(t)}function D(t){return t===61?(e.consume(t),O):V(t)?(o=D,N(t)):H(t)?(e.consume(t),D):T(t)}function O(t){return t===null||t===60||t===61||t===62||t===96?n(t):t===34||t===39?(e.consume(t),i=t,k):V(t)?(o=O,N(t)):H(t)?(e.consume(t),O):(e.consume(t),A)}function k(t){return t===i?(e.consume(t),i=void 0,j):t===null?n(t):V(t)?(o=k,N(t)):(e.consume(t),k)}function A(t){return t===null||t===34||t===39||t===60||t===61||t===96?n(t):t===47||t===62||hi(t)?T(t):(e.consume(t),A)}function j(e){return e===47||e===62||hi(e)?T(e):n(e)}function M(r){return r===62?(e.consume(r),e.exit(`htmlTextData`),e.exit(`htmlText`),t):n(r)}function N(t){return e.exit(`htmlTextData`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),ee}function ee(t){return H(t)?U(e,P,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):P(t)}function P(t){return e.enter(`htmlTextData`),o(t)}}var Pa={name:`labelEnd`,resolveAll:Ra,resolveTo:za,tokenize:Ba},Fa={tokenize:Va},Ia={tokenize:Ha},La={tokenize:Ua};function Ra(e){let t=-1,n=[];for(;++t<e.length;){let r=e[t][1];if(n.push(e[t]),r.type===`labelImage`||r.type===`labelLink`||r.type===`labelEnd`){let e=r.type===`labelImage`?4:2;r.type=`data`,t+=e}}return e.length!==n.length&&ei(e,0,e.length,n),e}function za(e,t){let n=e.length,r=0,i,a,o;for(;n--;){let t=e[n][1];if(i){if(t.type===`link`||t.type===`labelLink`&&t._inactive)break;e[n][0]===`enter`&&t.type===`labelLink`&&(t._inactive=!0)}else if(a){if(e[n][0]===`enter`&&(t.type===`labelImage`||t.type===`labelLink`)&&!t._balanced&&(i=n,t.type!==`labelLink`)){r=2;break}}else t.type===`labelEnd`&&(a=n)}let s={type:e[i][1].type===`labelLink`?`link`:`image`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}},c={type:`label`,start:{...e[i][1].start},end:{...e[a][1].end}},l={type:`labelText`,start:{...e[i+r+2][1].end},end:{...e[a-2][1].start}};return o=[[`enter`,s,t],[`enter`,c,t]],o=ti(o,e.slice(i+1,i+r+3)),o=ti(o,[[`enter`,l,t]]),o=ti(o,ki(t.parser.constructs.insideSpan.null,e.slice(i+r+4,a-3),t)),o=ti(o,[[`exit`,l,t],e[a-2],e[a-1],[`exit`,c,t]]),o=ti(o,e.slice(a+1)),o=ti(o,[[`exit`,s,t]]),ei(e,i,e.length,o),e}function Ba(e,t,n){let r=this,i=r._labelStarts,a,o;if(i){for(;i.length>0&&i[i.length-1]._balanced;)i.pop();a=i[i.length-1]}return s;function s(t){return a?a._inactive?d(t):(o=r.parser.defined.includes(si(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter(`labelEnd`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),e.exit(`labelEnd`),c):n(t)}function c(t){return t===40?e.attempt(Fa,u,o?u:d)(t):t===91?e.attempt(Ia,u,o?l:d)(t):o?u(t):d(t)}function l(t){return e.attempt(La,u,d)(t)}function u(e){return i.pop(),t(e)}function d(e){return a._balanced=!0,n(e)}}function Va(e,t,n){return r;function r(t){return e.enter(`resource`),e.enter(`resourceMarker`),e.consume(t),e.exit(`resourceMarker`),i}function i(t){return hi(t)?ha(e,a)(t):a(t)}function a(t){return t===41?u(t):fa(e,o,s,`resourceDestination`,`resourceDestinationLiteral`,`resourceDestinationLiteralMarker`,`resourceDestinationRaw`,`resourceDestinationString`,32)(t)}function o(t){return hi(t)?ha(e,c)(t):u(t)}function s(e){return n(e)}function c(t){return t===34||t===39||t===40?ma(e,l,n,`resourceTitle`,`resourceTitleMarker`,`resourceTitleString`)(t):u(t)}function l(t){return hi(t)?ha(e,u)(t):u(t)}function u(r){return r===41?(e.enter(`resourceMarker`),e.consume(r),e.exit(`resourceMarker`),e.exit(`resource`),t):n(r)}}function Ha(e,t,n){let r=this;return i;function i(t){return pa.call(r,e,a,o,`reference`,`referenceMarker`,`referenceString`)(t)}function a(e){return r.parser.defined.includes(si(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(e):n(e)}function o(e){return n(e)}}function Ua(e,t,n){return r;function r(t){return e.enter(`reference`),e.enter(`referenceMarker`),e.consume(t),e.exit(`referenceMarker`),i}function i(r){return r===93?(e.enter(`referenceMarker`),e.consume(r),e.exit(`referenceMarker`),e.exit(`reference`),t):n(r)}}var Wa={name:`labelStartImage`,resolveAll:Pa.resolveAll,tokenize:Ga};function Ga(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelImage`),e.enter(`labelImageMarker`),e.consume(t),e.exit(`labelImageMarker`),o}function o(t){return t===91?(e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelImage`),s):n(t)}function s(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ka={name:`labelStartLink`,resolveAll:Pa.resolveAll,tokenize:qa};function qa(e,t,n){let r=this,i;return a;function a(t){return e.enter(`labelLink`),e.enter(`labelMarker`),e.consume(t),e.exit(`labelMarker`),i=e.exit(`labelLink`),o}function o(e){return e===94&&`_hiddenFootnoteSupport`in r.parser.constructs?n(e):(r._labelStarts=r._labelStarts||[],r._labelStarts.push(i),t(e))}}var Ja={name:`lineEnding`,tokenize:Ya};function Ya(e,t){return n;function n(n){return e.enter(`lineEnding`),e.consume(n),e.exit(`lineEnding`),U(e,t,`linePrefix`)}}var Xa={name:`thematicBreak`,tokenize:Za};function Za(e,t,n){let r=0,i;return a;function a(t){return e.enter(`thematicBreak`),o(t)}function o(e){return i=e,s(e)}function s(a){return a===i?(e.enter(`thematicBreakSequence`),c(a)):r>=3&&(a===null||V(a))?(e.exit(`thematicBreak`),t(a)):n(a)}function c(t){return t===i?(e.consume(t),r++,c):(e.exit(`thematicBreakSequence`),H(t)?U(e,s,`whitespace`)(t):s(t))}}var Qa={continuation:{tokenize:no},exit:io,name:`list`,tokenize:to},$a={partial:!0,tokenize:ao},eo={partial:!0,tokenize:ro};function to(e,t,n){let r=this,i=r.events[r.events.length-1],a=i&&i[1].type===`linePrefix`?i[2].sliceSerialize(i[1],!0).length:0,o=0;return s;function s(t){let i=r.containerState.type||(t===42||t===43||t===45?`listUnordered`:`listOrdered`);if(i===`listUnordered`?!r.containerState.marker||t===r.containerState.marker:fi(t)){if(r.containerState.type||(r.containerState.type=i,e.enter(i,{_container:!0})),i===`listUnordered`)return e.enter(`listItemPrefix`),t===42||t===45?e.check(Xa,n,l)(t):l(t);if(!r.interrupt||t===49)return e.enter(`listItemPrefix`),e.enter(`listItemValue`),c(t)}return n(t)}function c(t){return fi(t)&&++o<10?(e.consume(t),c):(!r.interrupt||o<2)&&(r.containerState.marker?t===r.containerState.marker:t===41||t===46)?(e.exit(`listItemValue`),l(t)):n(t)}function l(t){return e.enter(`listItemMarker`),e.consume(t),e.exit(`listItemMarker`),r.containerState.marker=r.containerState.marker||t,e.check(Ii,r.interrupt?n:u,e.attempt($a,f,d))}function u(e){return r.containerState.initialBlankLine=!0,a++,f(e)}function d(t){return H(t)?(e.enter(`listItemPrefixWhitespace`),e.consume(t),e.exit(`listItemPrefixWhitespace`),f):n(t)}function f(n){return r.containerState.size=a+r.sliceSerialize(e.exit(`listItemPrefix`),!0).length,t(n)}}function no(e,t,n){let r=this;return r.containerState._closeFlow=void 0,e.check(Ii,i,a);function i(n){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,U(e,t,`listItemIndent`,r.containerState.size+1)(n)}function a(n){return r.containerState.furtherBlankLines||!H(n)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,o(n)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(eo,t,o)(n))}function o(i){return r.containerState._closeFlow=!0,r.interrupt=void 0,U(e,e.attempt(Qa,t,n),`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(i)}}function ro(e,t,n){let r=this;return U(e,i,`listItemIndent`,r.containerState.size+1);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`listItemIndent`&&i[2].sliceSerialize(i[1],!0).length===r.containerState.size?t(e):n(e)}}function io(e){e.exit(this.containerState.type)}function ao(e,t,n){let r=this;return U(e,i,`listItemPrefixWhitespace`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:5);function i(e){let i=r.events[r.events.length-1];return!H(e)&&i&&i[1].type===`listItemPrefixWhitespace`?t(e):n(e)}}var oo={name:`setextUnderline`,resolveTo:so,tokenize:co};function so(e,t){let n=new Si,r=e.length,i,a,o;for(;r--;)if(e[r][0]===`enter`){if(e[r][1].type===`content`){i=r;break}e[r][1].type===`paragraph`&&(a=r)}else e[r][1].type===`content`&&n.add(r,1,[]),!o&&e[r][1].type===`definition`&&(o=r);let s={type:`setextHeading`,start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[a][1].type=`setextHeadingText`,o?(n.add(a,0,[[`enter`,s,t]]),n.add(o+1,0,[[`exit`,e[i][1],t]]),e[i][1].end={...e[o][1].end}):e[i][1]=s,n.add(e.length,0,[[`exit`,s,t]]),n.consume(e),e}function co(e,t,n){let r=this,i;return a;function a(t){let a=r.events.length,s;for(;a--;)if(r.events[a][1].type!==`lineEnding`&&r.events[a][1].type!==`linePrefix`&&r.events[a][1].type!==`content`){s=r.events[a][1].type===`paragraph`;break}return!r.parser.lazy[r.now().line]&&(r.interrupt||s)?(e.enter(`setextHeadingLine`),i=t,o(t)):n(t)}function o(t){return e.enter(`setextHeadingLineSequence`),s(t)}function s(t){return t===i?(e.consume(t),s):(e.exit(`setextHeadingLineSequence`),H(t)?U(e,c,`lineSuffix`)(t):c(t))}function c(r){return r===null||V(r)?(e.exit(`setextHeadingLine`),t(r)):n(r)}}var lo={tokenize:uo};function uo(e){let t=this,n=e.attempt(Ii,r,e.attempt(this.parser.constructs.flowInitial,i,U(e,e.attempt(this.parser.constructs.flow,i,e.attempt(sa,i)),`linePrefix`)));return n;function r(r){if(r===null)e.consume(r);else return e.enter(`lineEndingBlank`),e.consume(r),e.exit(`lineEndingBlank`),t.currentConstruct=void 0,n}function i(r){if(r===null)e.consume(r);else return e.enter(`lineEnding`),e.consume(r),e.exit(`lineEnding`),t.currentConstruct=void 0,n}}var fo={resolveAll:go()},po=ho(`string`),mo=ho(`text`);function ho(e){return{resolveAll:go(e===`text`?_o:void 0),tokenize:t};function t(t){let n=this,r=this.parser.constructs[e],i=t.attempt(r,a,o);return a;function a(e){return c(e)?i(e):o(e)}function o(e){if(e===null)t.consume(e);else return t.enter(`data`),t.consume(e),s}function s(e){return c(e)?(t.exit(`data`),i(e)):(t.consume(e),s)}function c(e){if(e===null)return!0;let t=r[e],i=-1;if(t)for(;++i<t.length;){let e=t[i];if(!e.previous||e.previous.call(n,n.previous))return!0}return!1}}}function go(e){return t;function t(t,n){let r=-1,i;for(;++r<=t.length;)i===void 0?t[r]&&t[r][1].type===`data`&&(i=r,r++):t[r]&&t[r][1].type===`data`||(r!==i+2&&(t[i][1].end=t[r-1][1].end,t.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(t,n):t}}function _o(e,t){let n=new Si,r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type===`lineEnding`)&&e[r-1][1].type===`data`){let i=e[r-1][1],a=t.sliceStream(i),o=a.length,s=-1,c=0,l;for(;o--;){let e=a[o];if(typeof e==`string`){for(s=e.length;e.charCodeAt(s-1)===32;)c++,s--;if(s)break;s=-1}else if(e===-2)l=!0,c++;else if(e!==-1){o++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(c=0),c){let a={type:r===e.length||l||c<2?`lineSuffix`:`hardBreakTrailing`,start:{_bufferIndex:o?s:i.start._bufferIndex+s,_index:i.start._index+o,line:i.end.line,column:i.end.column-c,offset:i.end.offset-c},end:{...i.end}};i.end={...a.start},i.start.offset===i.end.offset?Object.assign(i,a):n.add(r,0,[[`enter`,a,t],[`exit`,a,t]])}r++}return n.consume(e),e}var vo=c({attentionMarkers:()=>Eo,contentInitial:()=>bo,disable:()=>Do,document:()=>yo,flow:()=>So,flowInitial:()=>xo,insideSpan:()=>To,string:()=>Co,text:()=>wo}),yo={42:Qa,43:Qa,45:Qa,48:Qa,49:Qa,50:Qa,51:Qa,52:Qa,53:Qa,54:Qa,55:Qa,56:Qa,57:Qa,62:Ri},bo={91:ga},xo={[-2]:Xi,[-1]:Xi,32:Xi},So={35:Sa,42:Xa,45:[oo,Xa],60:Da,61:oo,95:Xa,96:Ji,126:Ji},Co={38:Wi,92:Hi},wo={[-5]:Ja,[-4]:Ja,[-3]:Ja,33:Wa,38:Wi,42:Ai,60:[Pi,Ma],91:Ka,92:[ba,Hi],93:Pa,95:Ai,96:ea},To={null:[Ai,fo]},Eo={null:[42,95]},Do={null:[]};function Oo(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},a=[],o=[],s=[],c={attempt:C(x),check:C(S),consume:v,enter:y,exit:b,interrupt:C(S,{interrupt:!0})},l={code:null,containerState:{},defineSkip:h,events:[],now:m,parser:e,previous:null,sliceSerialize:f,sliceStream:p,write:d},u=t.tokenize.call(l,c);return t.resolveAll&&a.push(t),l;function d(e){return o=ti(o,e),g(),o[o.length-1]===null?(w(t,0),l.events=ki(a,l.events,l),l.events):[]}function f(e,t){return Ao(p(e),t)}function p(e){return ko(o,e)}function m(){let{_bufferIndex:e,_index:t,line:n,column:i,offset:a}=r;return{_bufferIndex:e,_index:t,line:n,column:i,offset:a}}function h(e){i[e.line]=e.column,E()}function g(){for(;r._index<o.length;){let e=o[r._index];if(typeof e==`string`){let t=r._index;for(r._bufferIndex<0&&(r._bufferIndex=0);r._index===t&&r._bufferIndex<e.length;)_(e.charCodeAt(r._bufferIndex))}else _(e)}}function _(e){u=u(e)}function v(e){V(e)?(r.line++,r.column=1,r.offset+=e===-3?2:1,E()):e!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===o[r._index].length&&(r._bufferIndex=-1,r._index++)),l.previous=e}function y(e,t){let n=t||{};return n.type=e,n.start=m(),l.events.push([`enter`,n,l]),s.push(n),n}function b(e){let t=s.pop();return t.end=m(),l.events.push([`exit`,t,l]),t}function x(e,t){w(e,t.from)}function S(e,t){t.restore()}function C(e,t){return n;function n(n,r,i){let a,o,s,u;return Array.isArray(n)?f(n):`tokenize`in n?f([n]):d(n);function d(e){return t;function t(t){let n=t!==null&&e[t],r=t!==null&&e.null;return f([...Array.isArray(n)?n:n?[n]:[],...Array.isArray(r)?r:r?[r]:[]])(t)}}function f(e){return a=e,o=0,e.length===0?i:p(e[o])}function p(e){return n;function n(n){return u=T(),s=e,e.partial||(l.currentConstruct=e),e.name&&l.parser.constructs.disable.null.includes(e.name)?h(n):e.tokenize.call(t?Object.assign(Object.create(l),t):l,c,m,h)(n)}}function m(t){return e(s,u),r}function h(e){return u.restore(),++o<a.length?p(a[o]):i}}}function w(e,t){e.resolveAll&&!a.includes(e)&&a.push(e),e.resolve&&ei(l.events,t,l.events.length-t,e.resolve(l.events.slice(t),l)),e.resolveTo&&(l.events=e.resolveTo(l.events,l))}function T(){let e=m(),t=l.previous,n=l.currentConstruct,i=l.events.length,a=Array.from(s);return{from:i,restore:o};function o(){r=e,l.previous=t,l.currentConstruct=n,l.events.length=i,s=a,E()}}function E(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function ko(e,t){let n=t.start._index,r=t.start._bufferIndex,i=t.end._index,a=t.end._bufferIndex,o;if(n===i)o=[e[n].slice(r,a)];else{if(o=e.slice(n,i),r>-1){let e=o[0];typeof e==`string`?o[0]=e.slice(r):o.shift()}a>0&&o.push(e[i].slice(0,a))}return o}function Ao(e,t){let n=-1,r=[],i;for(;++n<e.length;){let a=e[n],o;if(typeof a==`string`)o=a;else switch(a){case-5:o=`\r`;break;case-4:o=`
15
+ `;break;case-3:o=`\r
16
+ `;break;case-2:o=t?` `:` `;break;case-1:if(!t&&i)continue;o=` `;break;default:o=String.fromCharCode(a)}i=a===-2,r.push(o)}return r.join(``)}function jo(e){let t={constructs:ri([vo,...(e||{}).extensions||[]]),content:n(bi),defined:[],document:n(wi),flow:n(lo),lazy:{},string:n(po),text:n(mo)};return t;function n(e){return n;function n(n){return Oo(t,e,n)}}}function Mo(e){for(;!aa(e););return e}var No=/[\0\t\n\r]/g;function Po(){let e=1,t=``,n=!0,r;return i;function i(i,a,o){i=t+(typeof i==`string`?i.toString():new TextDecoder(a||void 0).decode(i));let s=[],c=0;for(t=``,n&&=(i.charCodeAt(0)===65279&&c++,void 0);c<i.length;){No.lastIndex=c;let n=No.exec(i),a=n&&n.index!==void 0?n.index:i.length,o=i.charCodeAt(a);if(!n){t=i.slice(c);break}if(o===10&&c===a&&r)s.push(-3),r=void 0;else switch(r&&=(s.push(-5),void 0),c<a&&(s.push(i.slice(c,a)),e+=a-c),o){case 0:s.push(65533),e++;break;case 9:{let t=Math.ceil(e/4)*4;for(s.push(-2);e++<t;)s.push(-1);break}case 10:s.push(-4),e=1;break;default:r=!0,e=1}c=a+1}return o&&(r&&s.push(-5),t&&s.push(t),s.push(null)),s}}var Fo=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Io(e){return e.replace(Fo,Lo)}function Lo(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let e=n.charCodeAt(1),t=e===120||e===88;return oi(n.slice(t?2:1),t?16:10)}return $r(n)||e}var Ro={}.hasOwnProperty;function G(e,t,n){return t&&typeof t==`object`&&(n=t,t=void 0),zo(n)(Mo(jo(n).document().write(Po()(e,t,!0))))}function zo(e){let t={afterExit:[],beforeEnter:[],transforms:[],canContainEols:[`emphasis`,`fragment`,`heading`,`paragraph`,`strong`],enter:{autolink:o(ve),autolinkProtocol:E,autolinkEmail:E,atxHeading:o(L),blockQuote:o(de),characterEscape:E,characterReference:E,codeFenced:o(fe),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:o(fe,s),codeText:o(pe,s),codeTextData:E,data:E,codeFlowValue:E,definition:o(me),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:o(I),hardBreakEscape:o(he),hardBreakTrailing:o(he),htmlFlow:o(ge,s),htmlFlowData:E,htmlText:o(ge,s),htmlTextData:E,image:o(_e),label:s,link:o(ve),listItem:o(be),listItemValue:p,listOrdered:o(ye,f),listUnordered:o(ye),paragraph:o(xe),reference:ie,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:o(L),strong:o(Se),thematicBreak:o(we)},exit:{atxHeading:l(),atxHeadingSequence:S,autolink:l(),autolinkEmail:ue,autolinkProtocol:le,blockQuote:l(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:oe,characterReferenceMarkerNumeric:oe,characterReferenceValue:se,characterReference:ce,codeFenced:l(_),codeFencedFence:g,codeFencedFenceInfo:m,codeFencedFenceMeta:h,codeFlowValue:D,codeIndented:l(v),codeText:l(M),codeTextData:D,data:D,definition:l(),definitionDestinationString:x,definitionLabelString:y,definitionTitleString:b,emphasis:l(),hardBreakEscape:l(k),hardBreakTrailing:l(k),htmlFlow:l(A),htmlFlowData:D,htmlText:l(j),htmlTextData:D,image:l(ee),label:te,labelText:P,lineEnding:O,link:l(N),listItem:l(),listOrdered:l(),listUnordered:l(),paragraph:l(),referenceString:ae,resourceDestinationString:F,resourceTitleString:ne,resource:re,setextHeading:l(T),setextHeadingLineSequence:w,setextHeadingText:C,strong:l(),thematicBreak:l()}};Vo(t,(e||{}).mdastExtensions||[]);let n={};return r;function r(e){let r={type:`root`,children:[],position:void 0},o={stack:[r],tokenStack:[],config:t,enter:c,exit:u,buffer:s,resume:d,data:n},l=[],f=[],p=-1;for(;++p<e.length;)f.push(e[p]),(e[p][1].type===`listOrdered`||e[p][1].type===`listUnordered`)&&(e[p][0]===`enter`?l.push(f.length-1):a(f,l.pop()));for(e=f,p=-1;++p<e.length;){let n=t[e[p][0]];e[p][0]===`enter`&&t.beforeEnter.length>0&&i(t.beforeEnter,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),Ro.call(n,e[p][1].type)&&n[e[p][1].type].call({...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1]),e[p][0]===`exit`&&t.afterExit.length>0&&i(t.afterExit,{...o,sliceSerialize:e[p][2].sliceSerialize},e[p][1])}if(o.tokenStack.length>0){let e=o.tokenStack[o.tokenStack.length-1];(e[1]||Uo).call(o,void 0,e[0])}for(r.position={start:Bo(e.length>0?e[0][1].start:{line:1,column:1,offset:0}),end:Bo(e.length>0?e[e.length-2][1].end:{line:1,column:1,offset:0})},p=-1;++p<t.transforms.length;)r=t.transforms[p](r)||r;return r}function i(e,t,n){let r=-1;for(;++r<e.length;)e[r].call(t,n)}function a(e,t){let n=e.length-1,r=t-1,i=-1,a=!1,o,s,c,l,u=[];for(;++r<=n;){let t=e[r];switch(t[1].type){case`listUnordered`:case`listOrdered`:case`blockQuote`:t[0]===`enter`?i++:i--,l=void 0;break;case`lineEndingBlank`:t[0]===`enter`&&(o&&!l&&!i&&!c&&(c=r),l=void 0);break;case`linePrefix`:case`listItemValue`:case`listItemMarker`:case`listItemPrefix`:case`listItemPrefixWhitespace`:break;default:l=void 0}if(!i&&t[0]===`enter`&&t[1].type===`listItemPrefix`||i===-1&&t[0]===`exit`&&(t[1].type===`listUnordered`||t[1].type===`listOrdered`)){if(o){let n=r;for(s=void 0;n--;){let t=e[n];if(t[1].type===`lineEnding`||t[1].type===`lineEndingBlank`){if(t[0]===`exit`)continue;s&&(e[s][1].type=`lineEndingBlank`,a=!0),t[1].type=`lineEnding`,s=n}else if(t[1].type!==`linePrefix`&&t[1].type!==`blockQuotePrefix`&&t[1].type!==`blockQuotePrefixWhitespace`&&t[1].type!==`blockQuoteMarker`&&t[1].type!==`listItemIndent`)break}c&&(!s||c<s)&&(o._spread=!0),o.end=Object.assign({},s?e[s][1].start:t[1].end),u.push({at:s||r,event:[`exit`,o,t[2]]})}if(t[1].type===`listItemPrefix`){let e={type:`listItem`,_spread:!1,start:Object.assign({},t[1].start),end:void 0};o=e,u.push({at:r,event:[`enter`,e,t[2]]}),c=void 0,l=!0}}}let d=e.splice(t),f=0;for(r=-1;++r<d.length;){for(;f<u.length&&u[f].at===t+r;)e.push(u[f++].event);e.push(d[r])}e[t][1]._spread=a}function o(e,t){return n;function n(n){c.call(this,e(n),n),t&&t.call(this,n)}}function s(){this.stack.push({type:`fragment`,children:[]})}function c(e,t,n){this.stack[this.stack.length-1].children.push(e),this.stack.push(e),this.tokenStack.push([t,n||void 0]),e.position={start:Bo(t.start),end:void 0}}function l(e){return t;function t(t){e&&e.call(this,t),u.call(this,t)}}function u(e,t){let n=this.stack.pop(),r=this.tokenStack.pop();if(!r)throw Error("Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+`): it’s not open`);r[0].type!==e.type&&(t?t.call(this,e,r[0]):(r[1]||Uo).call(this,e,r[0])),n.position.end=Bo(e.end)}function d(){return qr(this.stack.pop())}function f(){this.data.expectingFirstListItemValue=!0}function p(e){if(this.data.expectingFirstListItemValue){let t=this.stack[this.stack.length-2];t.start=Number.parseInt(this.sliceSerialize(e),10),this.data.expectingFirstListItemValue=void 0}}function m(){let e=this.resume(),t=this.stack[this.stack.length-1];t.lang=e}function h(){let e=this.resume(),t=this.stack[this.stack.length-1];t.meta=e}function g(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,``),this.data.flowCodeInside=void 0}function v(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e.replace(/(\r?\n|\r)$/g,``)}function y(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=si(this.sliceSerialize(e)).toLowerCase()}function b(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function x(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function S(e){let t=this.stack[this.stack.length-1];t.depth||=this.sliceSerialize(e).length}function C(){this.data.setextHeadingSlurpLineEnding=!0}function w(e){let t=this.stack[this.stack.length-1];t.depth=this.sliceSerialize(e).codePointAt(0)===61?1:2}function T(){this.data.setextHeadingSlurpLineEnding=void 0}function E(e){let t=this.stack[this.stack.length-1].children,n=t[t.length-1];n&&n.type===`text`||(n=Ce(),n.position={start:Bo(e.start),end:void 0},t.push(n)),this.stack.push(n)}function D(e){let t=this.stack.pop();t.value+=this.sliceSerialize(e),t.position.end=Bo(e.end)}function O(e){let n=this.stack[this.stack.length-1];if(this.data.atHardBreak){let t=n.children[n.children.length-1];t.position.end=Bo(e.end),this.data.atHardBreak=void 0}else!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(n.type)&&(E.call(this,e),D.call(this,e))}function k(){this.data.atHardBreak=!0}function A(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function j(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function M(){let e=this.resume(),t=this.stack[this.stack.length-1];t.value=e}function N(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function ee(){let e=this.stack[this.stack.length-1];if(this.data.inReference){let t=this.data.referenceType||`shortcut`;e.type+=`Reference`,e.referenceType=t,delete e.url,delete e.title}else delete e.identifier,delete e.label;this.data.referenceType=void 0}function P(e){let t=this.sliceSerialize(e),n=this.stack[this.stack.length-2];n.label=Io(t),n.identifier=si(t).toLowerCase()}function te(){let e=this.stack[this.stack.length-1],t=this.resume(),n=this.stack[this.stack.length-1];this.data.inReference=!0,n.type===`link`?n.children=e.children:n.alt=t}function F(){let e=this.resume(),t=this.stack[this.stack.length-1];t.url=e}function ne(){let e=this.resume(),t=this.stack[this.stack.length-1];t.title=e}function re(){this.data.inReference=void 0}function ie(){this.data.referenceType=`collapsed`}function ae(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.label=t,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),this.data.referenceType=`full`}function oe(e){this.data.characterReferenceType=e.type}function se(e){let t=this.sliceSerialize(e),n=this.data.characterReferenceType,r;n?(r=oi(t,n===`characterReferenceMarkerNumeric`?10:16),this.data.characterReferenceType=void 0):r=$r(t);let i=this.stack[this.stack.length-1];i.value+=r}function ce(e){let t=this.stack.pop();t.position.end=Bo(e.end)}function le(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=this.sliceSerialize(e)}function ue(e){D.call(this,e);let t=this.stack[this.stack.length-1];t.url=`mailto:`+this.sliceSerialize(e)}function de(){return{type:`blockquote`,children:[],position:void 0}}function fe(){return{type:`code`,lang:null,meta:null,value:``,position:void 0}}function pe(){return{type:`inlineCode`,value:``,position:void 0}}function me(){return{type:`definition`,identifier:``,label:null,title:null,url:``,position:void 0}}function I(){return{type:`emphasis`,children:[],position:void 0}}function L(){return{type:`heading`,depth:0,children:[],position:void 0}}function he(){return{type:`break`,position:void 0}}function ge(){return{type:`html`,value:``,position:void 0}}function _e(){return{type:`image`,title:null,url:``,alt:null,position:void 0}}function ve(){return{type:`link`,title:null,url:``,children:[],position:void 0}}function ye(e){return{type:`list`,ordered:e.type===`listOrdered`,start:null,spread:e._spread,children:[],position:void 0}}function be(e){return{type:`listItem`,spread:e._spread,checked:null,children:[],position:void 0}}function xe(){return{type:`paragraph`,children:[],position:void 0}}function Se(){return{type:`strong`,children:[],position:void 0}}function Ce(){return{type:`text`,value:``,position:void 0}}function we(){return{type:`thematicBreak`,position:void 0}}}function Bo(e){return{line:e.line,column:e.column,offset:e.offset}}function Vo(e,t){let n=-1;for(;++n<t.length;){let r=t[n];Array.isArray(r)?Vo(e,r):Ho(e,r)}}function Ho(e,t){let n;for(n in t)if(Ro.call(t,n))switch(n){case`canContainEols`:{let r=t[n];r&&e[n].push(...r);break}case`transforms`:{let r=t[n];r&&e[n].push(...r);break}case`afterExit`:case`beforeEnter`:{let r=t[n];r&&e[n].push(r);break}case`enter`:case`exit`:{let r=t[n];r&&Object.assign(e[n],r);break}}}function Uo(e,t){throw Error(e?"Cannot close `"+e.type+"` ("+lr({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+lr({start:t.start,end:t.end})+`) is open`:"Cannot close document, a token (`"+t.type+"`, "+lr({start:t.start,end:t.end})+`) is still open`)}function Wo(e){let t=this;t.parser=n;function n(n){return G(n,{...t.data(`settings`),...e,extensions:t.data(`micromarkExtensions`)||[],mdastExtensions:t.data(`fromMarkdownExtensions`)||[]})}}function Go(e,t){let n=String(e);if(typeof t!=`string`)throw TypeError(`Expected character`);let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function Ko(e){if(typeof e!=`string`)throw TypeError(`Expected a string`);return e.replace(/[|\\{}()[\]^$+*?.]/g,`\\$&`).replace(/-/g,`\\x2d`)}var qo=(function(e){if(e==null)return Qo;if(typeof e==`function`)return Zo(e);if(typeof e==`object`)return Array.isArray(e)?Jo(e):Yo(e);if(typeof e==`string`)return Xo(e);throw Error(`Expected function, string, or object as test`)});function Jo(e){let t=[],n=-1;for(;++n<e.length;)t[n]=qo(e[n]);return Zo(r);function r(...e){let n=-1;for(;++n<t.length;)if(t[n].apply(this,e))return!0;return!1}}function Yo(e){let t=e;return Zo(n);function n(n){let r=n,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function Xo(e){return Zo(t);function t(t){return t&&t.type===e}}function Zo(e){return t;function t(t,n,r){return!!($o(t)&&e.call(this,t,typeof n==`number`?n:void 0,r||void 0))}}function Qo(){return!0}function $o(e){return typeof e==`object`&&!!e&&`type`in e}function es(e){return e}var ts=[];function ns(e,t,n,r){let i;typeof t==`function`&&typeof n!=`function`?(r=n,n=t):i=t;let a=qo(i),o=r?-1:1;s(e,void 0,[])();function s(e,i,c){let l=e&&typeof e==`object`?e:{};if(typeof l.type==`string`){let t=typeof l.tagName==`string`?l.tagName:typeof l.name==`string`?l.name:void 0;Object.defineProperty(u,"name",{value:`node (`+es(e.type+(t?`<`+t+`>`:``))+`)`})}return u;function u(){let l=ts,u,d,f;if((!t||a(e,i,c[c.length-1]||void 0))&&(l=rs(n(e,c)),l[0]===!1))return l;if(`children`in e&&e.children){let t=e;if(t.children&&l[0]!==`skip`)for(d=(r?t.children.length:-1)+o,f=c.concat(t);d>-1&&d<t.children.length;){let e=t.children[d];if(u=s(e,d,f)(),u[0]===!1)return u;d=typeof u[1]==`number`?u[1]:d+o}}return l}}}function rs(e){return Array.isArray(e)?e:typeof e==`number`?[!0,e]:e==null?ts:[e]}function is(e,t,n){let r=qo((n||{}).ignore||[]),i=as(t),a=-1;for(;++a<i.length;)ns(e,`text`,o);function o(e,t){let n=-1,i;for(;++n<t.length;){let e=t[n],a=i?i.children:void 0;if(r(e,a?a.indexOf(e):void 0,i))return;i=e}if(i)return s(e,t)}function s(e,t){let n=t[t.length-1],r=i[a][0],o=i[a][1],s=0,c=n.children.indexOf(e),l=!1,u=[];r.lastIndex=0;let d=r.exec(e.value);for(;d;){let n=d.index,i={index:d.index,input:d.input,stack:[...t,e]},a=o(...d,i);if(typeof a==`string`&&(a=a.length>0?{type:`text`,value:a}:void 0),a===!1)r.lastIndex=n+1;else{if(s!==n&&f({type:`text`,value:e.value.slice(s,n)}),Array.isArray(a))for(let e of a)f(e);else a&&f(a);s=n+d[0].length,l=!0}if(!r.global)break;d=r.exec(e.value)}return l?(s<e.value.length&&f({type:`text`,value:e.value.slice(s)}),n.children.splice(c,1,...u)):u=[e],c+u.length;function f(e){let t=u[u.length-1];t&&t.type===`text`&&e.type===`text`?t.value+=e.value:u.push(e)}}}function as(e){if(!Array.isArray(e))throw TypeError(`Expected find and replace tuple or list of tuples`);let t=[],n=!e[0]||Array.isArray(e[0])?e:[e],r=-1;for(;++r<n.length;){let e=n[r];t.push([os(e[0]),ss(e[1])])}return t}function os(e){return typeof e==`string`?new RegExp(Ko(e),`g`):e}function ss(e){return typeof e==`function`?e:function(){return e}}var cs=`phrasing`,ls=[`autolink`,`link`,`image`,`label`];function us(){return{transforms:[vs],enter:{literalAutolink:fs,literalAutolinkEmail:ps,literalAutolinkHttp:ps,literalAutolinkWww:ps},exit:{literalAutolink:_s,literalAutolinkEmail:gs,literalAutolinkHttp:ms,literalAutolinkWww:hs}}}function ds(){return{unsafe:[{character:`@`,before:`[+\\-.\\w]`,after:`[\\-.\\w]`,inConstruct:cs,notInConstruct:ls},{character:`.`,before:`[Ww]`,after:`[\\-.\\w]`,inConstruct:cs,notInConstruct:ls},{character:`:`,before:`[ps]`,after:`\\/`,inConstruct:cs,notInConstruct:ls}]}}function fs(e){this.enter({type:`link`,title:null,url:``,children:[]},e)}function ps(e){this.config.enter.autolinkProtocol.call(this,e)}function ms(e){this.config.exit.autolinkProtocol.call(this,e)}function hs(e){this.config.exit.data.call(this,e);let t=this.stack[this.stack.length-1];t.type,t.url=`http://`+this.sliceSerialize(e)}function gs(e){this.config.exit.autolinkEmail.call(this,e)}function _s(e){this.exit(e)}function vs(e){is(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ys],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,bs]],{ignore:[`link`,`linkReference`]})}function ys(e,t,n,r,i){let a=``;if(!Cs(i)||(/^w/i.test(t)&&(n=t+n,t=``,a=`http://`),!xs(n)))return!1;let o=Ss(n+r);if(!o[0])return!1;let s={type:`link`,title:null,url:a+t+o[0],children:[{type:`text`,value:t+o[0]}]};return o[1]?[s,{type:`text`,value:o[1]}]:s}function bs(e,t,n,r){return!Cs(r,!0)||/[-\d_]$/.test(n)?!1:{type:`link`,title:null,url:`mailto:`+t+`@`+n,children:[{type:`text`,value:t+`@`+n}]}}function xs(e){let t=e.split(`.`);return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Ss(e){let t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(`)`),i=Go(e,`(`),a=Go(e,`)`);for(;r!==-1&&i>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(`)`),a++;return[e,n]}function Cs(e,t){let n=e.input.charCodeAt(e.index-1);return(e.index===0||_i(n)||gi(n))&&(!t||n!==47)}Ns.peek=Ms;function ws(){this.buffer()}function Ts(e){this.enter({type:`footnoteReference`,identifier:``,label:``},e)}function Es(){this.buffer()}function Ds(e){this.enter({type:`footnoteDefinition`,identifier:``,label:``,children:[]},e)}function Os(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function ks(e){this.exit(e)}function As(e){let t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=si(this.sliceSerialize(e)).toLowerCase(),n.label=t}function js(e){this.exit(e)}function Ms(){return`[`}function Ns(e,t,n,r){let i=n.createTracker(r),a=i.move(`[^`),o=n.enter(`footnoteReference`),s=n.enter(`reference`);return a+=i.move(n.safe(n.associationId(e),{after:`]`,before:a})),s(),o(),a+=i.move(`]`),a}function Ps(){return{enter:{gfmFootnoteCallString:ws,gfmFootnoteCall:Ts,gfmFootnoteDefinitionLabelString:Es,gfmFootnoteDefinition:Ds},exit:{gfmFootnoteCallString:Os,gfmFootnoteCall:ks,gfmFootnoteDefinitionLabelString:As,gfmFootnoteDefinition:js}}}function Fs(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Ns},unsafe:[{character:`[`,inConstruct:[`label`,`phrasing`,`reference`]}]};function n(e,n,r,i){let a=r.createTracker(i),o=a.move(`[^`),s=r.enter(`footnoteDefinition`),c=r.enter(`label`);return o+=a.move(r.safe(r.associationId(e),{before:o,after:`]`})),c(),o+=a.move(`]:`),e.children&&e.children.length>0&&(a.shift(4),o+=a.move((t?`
17
+ `:` `)+r.indentLines(r.containerFlow(e,a.current()),t?Ls:Is))),s(),o}}function Is(e,t,n){return t===0?e:Ls(e,t,n)}function Ls(e,t,n){return(n?``:` `)+e}var Rs=[`autolink`,`destinationLiteral`,`destinationRaw`,`reference`,`titleQuote`,`titleApostrophe`];Us.attention=Ws,Us.peek=Gs;function zs(){return{canContainEols:[`delete`],enter:{strikethrough:Vs},exit:{strikethrough:Hs}}}function Bs(){return{handlers:{delete:Us},unsafe:[{character:`~`,inConstruct:`phrasing`,notInConstruct:Rs}]}}function Vs(e){this.enter({type:`delete`,children:[],position:void 0},e)}function Hs(e){this.exit(e)}function Us(e,t,n,r){let i=n.createTracker(r),a=n.stack.includes(`strikethrough`)?`~`:`~~`,o=n.enter(`strikethrough`),s=i.move(a);return s+=n.containerPhrasing(e,{...i.current(),before:s,after:`~`}),s+=i.move(a),o(),s}function Ws(){return{construct:`strikethrough`,markers:[`~`],sizes:[2,1]}}function Gs(){return`~`}function Ks(e){return e.length}function qs(e,t){let n=t||{},r=(n.align||[]).concat(),i=n.stringLength||Ks,a=[],o=[],s=[],c=[],l=0,u=-1;for(;++u<e.length;){let t=[],r=[],a=-1;for(e[u].length>l&&(l=e[u].length);++a<e[u].length;){let o=Js(e[u][a]);if(n.alignDelimiters!==!1){let e=i(o);r[a]=e,(c[a]===void 0||e>c[a])&&(c[a]=e)}t.push(o)}o[u]=t,s[u]=r}let d=-1;if(typeof r==`object`&&`length`in r)for(;++d<l;)a[d]=Ys(r[d]);else{let e=Ys(r);for(;++d<l;)a[d]=e}d=-1;let f=[],p=[];for(;++d<l;){let e=a[d],t=``,r=``;e===99?(t=`:`,r=`:`):e===108?t=`:`:e===114&&(r=`:`);let i=n.alignDelimiters===!1?1:Math.max(1,c[d]-t.length-r.length),o=t+`-`.repeat(i)+r;n.alignDelimiters!==!1&&(i=t.length+i+r.length,i>c[d]&&(c[d]=i),p[d]=i),f[d]=o}o.splice(1,0,f),s.splice(1,0,p),u=-1;let m=[];for(;++u<o.length;){let e=o[u],t=s[u];d=-1;let r=[];for(;++d<l;){let i=e[d]||``,o=``,s=``;if(n.alignDelimiters!==!1){let e=c[d]-(t[d]||0),n=a[d];n===114?o=` `.repeat(e):n===99?e%2?(o=` `.repeat(e/2+.5),s=` `.repeat(e/2-.5)):(o=` `.repeat(e/2),s=o):s=` `.repeat(e)}n.delimiterStart!==!1&&!d&&r.push(`|`),n.padding===!1||n.alignDelimiters===!1&&i===``||n.delimiterStart===!1&&!d||r.push(` `),n.alignDelimiters!==!1&&r.push(o),r.push(i),n.alignDelimiters!==!1&&r.push(s),n.padding!==!1&&r.push(` `),(n.delimiterEnd!==!1||d!==l-1)&&r.push(`|`)}m.push(n.delimiterEnd===!1?r.join(``).replace(/ +$/,``):r.join(``))}return m.join(`
18
+ `)}function Js(e){return e==null?``:String(e)}function Ys(e){let t=typeof e==`string`?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}var Xs=qo([`break`,`delete`,`emphasis`,`footnote`,`footnoteReference`,`image`,`imageReference`,`inlineCode`,`inlineMath`,`link`,`linkReference`,`mdxJsxTextElement`,`mdxTextExpression`,`strong`,`text`,`textDirective`]);function Zs(e,t,n,r){let i=n.enter(`blockquote`),a=n.createTracker(r);a.move(`> `),a.shift(2);let o=n.indentLines(n.containerFlow(e,a.current()),Qs);return i(),o}function Qs(e,t,n){return`>`+(n?``:` `)+e}function $s(e,t){return ec(e,t.inConstruct,!0)&&!ec(e,t.notInConstruct,!1)}function ec(e,t,n){if(typeof t==`string`&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function tc(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;){let e=n.unsafe[i];if(e.character===`
19
+ `&&!e.before&&!e.after&&$s(n.stack,e))return/[\t ]/.test(r.before)?``:` `}return`\\
20
+ `}function nc(e,t){let n=String(e),r=n.indexOf(t),i=r,a=0,o=0;if(typeof t!=`string`)throw TypeError(`Expected substring`);for(;r!==-1;)r===i?++a>o&&(o=a):a=1,i=r+t.length,r=n.indexOf(t,i);return o}function rc(e,t){return!(t.options.fences!==!1||!e.value||e.lang||!/[^\n\r ]/.test(e.value)||/^[\t ]*(?:[\n\r]|$)|(?:^|[\n\r])[\t ]*$/.test(e.value))}function ic(e){let t=e.options.fence||"`";if(t!=="`"&&t!==`~`)throw Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ac(e,t,n,r){let i=ic(n),a=e.value||``;if(rc(e,n)){let e=n.enter(`codeIndented`),t=n.indentLines(a,oc);return e(),t}let o=n.createTracker(r),s=i.repeat(Math.max(nc(a,i)+1,3)),c=n.enter(`codeFenced`),l=i==="`"?`GraveAccent`:`Tilde`,u=o.move(s);if(e.lang){let t=n.enter(`codeFencedLang${l}`);u+=o.move(n.safe(e.lang,{before:u,after:` `,encode:["`"],...o.current()})),t()}if(e.lang&&e.meta){let t=n.enter(`codeFencedMeta${l}`);u+=o.move(` `),u+=o.move(n.safe(e.meta,{before:u,after:`
21
+ `,encode:["`"],...o.current()})),t()}return u+=o.move(`
22
+ `),a&&(u+=o.move(a+`
23
+ `)),u+=o.move(s),c(),u}function oc(e,t,n){return(n?``:` `)+e}function sc(e){let t=e.options.quote||`"`;if(t!==`"`&&t!==`'`)throw Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function cc(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`definition`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`[`);return l+=c.move(n.safe(n.associationId(e),{before:l,after:`]`,...c.current()})),l+=c.move(`]: `),s(),!e.url||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`
24
+ `,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),o(),l}function lc(e){let t=e.options.emphasis||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}uc.attention=dc,uc.peek=fc;function uc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function dc(e,t){return{construct:`emphasis`,markers:lc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[1]}}function fc(e,t,n){return n.options.emphasis||`*`}function pc(e){return`&#x`+e.toString(16).toUpperCase()+`;`}function mc(e,t,n,r){let i,a,o;typeof t==`function`&&typeof n!=`function`?(a=void 0,o=t,i=n):(a=t,o=n,i=r),ns(e,a,s,i);function s(e,t){let n=t[t.length-1],r=n?n.children.indexOf(e):void 0;return o(e,r,n)}}function hc(e,t){let n=!1;return mc(e,function(e){if(`value`in e&&/\r?\n|\r/.test(e.value)||e.type===`break`)return n=!0,!1}),!!((!e.depth||e.depth<3)&&qr(e)&&(t.options.setext||n))}function gc(e,t,n,r){let i=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(hc(e,n)){let t=n.enter(`headingSetext`),r=n.enter(`phrasing`),o=n.containerPhrasing(e,{...a.current(),before:`
25
+ `,after:`
26
+ `});return r(),t(),o+`
27
+ `+(i===1?`=`:`-`).repeat(o.length-(Math.max(o.lastIndexOf(`\r`),o.lastIndexOf(`
28
+ `))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
29
+ `,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=pc(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}_c.peek=vc;function _c(e){return e.value||``}function vc(){return`<`}yc.peek=bc;function yc(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function bc(){return`!`}xc.peek=Sc;function xc(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Sc(){return`!`}Cc.peek=wc;function Cc(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function wc(){return"`"}function Tc(e,t){let n=qr(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Ec.peek=Dc;function Ec(e,t,n,r){let i=sc(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(Tc(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Dc(e,t,n){return Tc(e,n)?`<`:`[`}Oc.peek=kc;function Oc(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function kc(){return`[`}function Ac(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function jc(e){let t=Ac(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Mc(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function Nc(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Pc(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Mc(n):Ac(n),s=e.ordered?o===`.`?`)`:`.`:jc(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if(o!==`*`&&o!==`-`||!t||t.children&&t.children[0]||n.stack[n.stack.length-1]!==`list`||n.stack[n.stack.length-2]!==`listItem`||n.stack[n.stack.length-3]!==`list`||n.stack[n.stack.length-4]!==`listItem`||n.indexStack[n.indexStack.length-1]!==0||n.indexStack[n.indexStack.length-2]!==0||n.indexStack[n.indexStack.length-3]!==0||(c=!0),Nc(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Fc(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Ic(e,t,n,r){let i=Fc(n),a=n.bulletCurrent||Ac(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Lc(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Rc(e,t,n,r){if(!e.children.some(function(e){return Xs(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function zc(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Bc.attention=Vc,Bc.peek=Hc;function Bc(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function Vc(e,t){return{construct:`strong`,markers:zc(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Hc(e,t,n){return n.options.strong||`*`}function Uc(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Wc(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Gc(e,t,n){let r=(Nc(n)+(n.options.ruleSpaces?` `:``)).repeat(Wc(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Kc={blockquote:Zs,break:tc,code:ac,definition:cc,emphasis:uc,hardBreak:tc,heading:gc,html:_c,image:yc,imageReference:xc,inlineCode:Cc,link:Ec,linkReference:Oc,list:Pc,listItem:Ic,paragraph:Lc,root:Rc,strong:Bc,text:Uc,thematicBreak:Gc};function qc(){return{enter:{table:Jc,tableData:Qc,tableHeader:Qc,tableRow:Xc},exit:{codeText:$c,table:Yc,tableData:Zc,tableHeader:Zc,tableRow:Zc}}}function Jc(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function Yc(e){this.exit(e),this.data.inTable=void 0}function Xc(e){this.enter({type:`tableRow`,children:[]},e)}function Zc(e){this.exit(e)}function Qc(e){this.enter({type:`tableCell`,children:[]},e)}function $c(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,el));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function el(e,t){return t===`|`?t:e}function tl(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
30
+ `,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
31
+ `))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return qs(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Kc.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function nl(){return{exit:{taskListCheckValueChecked:il,taskListCheckValueUnchecked:il,paragraph:al}}}function rl(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:ol}}}function il(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function al(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function ol(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Kc.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function sl(){return[us(),Ps(),zs(),qc(),nl()]}function cl(e){return{extensions:[ds(),Fs(e),Bs(),tl(e),rl()]}}var ll={tokenize:Cl,partial:!0},ul={tokenize:wl,partial:!0},dl={tokenize:Tl,partial:!0},fl={tokenize:El,partial:!0},pl={tokenize:Dl,partial:!0},ml={name:`wwwAutolink`,tokenize:xl,previous:Ol},hl={name:`protocolAutolink`,tokenize:Sl,previous:kl},gl={name:`emailAutolink`,tokenize:bl,previous:Al},_l={};function vl(){return{text:_l}}for(var yl=48;yl<123;)_l[yl]=gl,yl++,yl===58?yl=65:yl===91&&(yl=97);_l[43]=gl,_l[45]=gl,_l[46]=gl,_l[95]=gl,_l[72]=[gl,hl],_l[104]=[gl,hl],_l[87]=[gl,ml],_l[119]=[gl,ml];function bl(e,t,n){let r=this,i,a;return o;function o(t){return!jl(t)||!Al.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return jl(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(pl,u,l)(t):t===45||t===95||li(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&ci(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function xl(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Ol.call(r,r.previous)||Ml(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(ll,e.attempt(ul,e.attempt(dl,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Sl(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&kl.call(r,r.previous)&&!Ml(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(ci(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||di(t)||hi(t)||_i(t)||gi(t)?n(t):e.attempt(ul,e.attempt(dl,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function Cl(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function wl(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(fl,c,s)(t):t===null||hi(t)||_i(t)||t!==45&&gi(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function Tl(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(fl,t,a)(o):o===null||hi(o)||_i(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function El(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||hi(o)||_i(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||hi(e)||_i(e)?t(e):r(e)}function a(e){return ci(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):ci(t)?(e.consume(t),o):n(t)}}function Dl(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return li(e)?n(e):t(e)}}function Ol(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||hi(e)}function kl(e){return!ci(e)}function Al(e){return!(e===47||jl(e))}function jl(e){return e===43||e===45||e===46||e===95||li(e)}function Ml(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var Nl={tokenize:Vl,partial:!0};function Pl(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Rl,continuation:{tokenize:zl},exit:Bl}},text:{91:{name:`gfmFootnoteCall`,tokenize:Ll},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Fl,resolveTo:Il}}}}function Fl(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=si(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Il(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Ll(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||hi(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(si(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return hi(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Rl(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||hi(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=si(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return hi(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),U(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function zl(e,t,n){return e.check(Ii,t,e.attempt(Nl,t,n))}function Bl(e){e.exit(`gfmFootnoteDefinition`)}function Vl(e,t,n){let r=this;return U(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Hl(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&ei(o,o.length,0,ki(s,e.slice(r+1,n),t)),ei(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),ei(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Oi(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Oi(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Ul=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Wl(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Wl(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Gl(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Kl(){return{flow:{null:{name:`table`,tokenize:ql,resolveAll:Jl}}}}function ql(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):V(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):H(t)?U(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||hi(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,H(t)?U(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return H(t)?U(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||V(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return H(t)?U(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||V(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||V(n)?(e.exit(`tableRow`),t(n)):H(n)?U(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||hi(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function Jl(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Ul;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(Xl(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=Yl(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=Yl(f,t,o,i,n,d)):(o[0]=o[1],d=Yl(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&Xl(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Gl(t.events,n))}return e}function Yl(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},Zl(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=Zl(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=Zl(t.events,n[2]),a=Zl(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},Zl(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function Xl(e,t,n,r,i){let a=[],o=Zl(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function Zl(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var Ql={name:`tasklistCheck`,tokenize:eu};function $l(){return{text:{91:Ql}}}function eu(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return hi(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return V(r)?t(r):H(r)?e.check({tokenize:tu},t,n)(r):n(r)}}function tu(e,t,n){return U(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function nu(e){return ri([vl(),Pl(),Hl(e),Kl(),$l()])}var ru={};function iu(e){let t=this,n=e||ru,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(nu(n)),a.push(sl()),o.push(cl(n))}var au=`local-draft-2`,ou={kind:`string`,static:!0},su={kind:`string`,static:!0},cu={kind:`number`,static:!0},lu={kind:`boolean`,static:!0},uu={kind:`boolean`,dynamic:!0,default:!1},du={kind:`string`},fu={kind:`string`,static:!0},pu={kind:`string`},mu={kind:`string`},hu=()=>({kind:`string`,static:!0,color:!0}),gu=(e={})=>({kind:`number`,...e}),_u=[{name:`input`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,type:{kind:`enum`,static:!0,values:[`text`,`email`],default:`text`},placeholder:{kind:`string`},required:{kind:`boolean`,default:!1},"min-length":gu({integer:!0,min:0,default:0}),"max-length":gu({integer:!0,min:0}),disabled:uu}},{name:`textarea`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`text`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,placeholder:{kind:`string`},rows:gu({integer:!0,positive:!0,default:4}),required:{kind:`boolean`,default:!1},"min-length":gu({integer:!0,min:0,default:0}),"max-length":gu({integer:!0,min:0}),disabled:uu}},{name:`number`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:du,bind:ou,initial:cu,min:gu(),max:gu(),step:gu({positive:!0,default:1}),disabled:uu}},{name:`slider`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`min`,props:{label:du,bind:ou,initial:cu,min:gu({default:0}),max:gu({default:100}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`range-slider`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`start`,bind:`bind-start`,initial:`initial-start`,kind:`number`,family:`number`,exclusive:!0,initialRule:`min`},{name:`end`,bind:`bind-end`,initial:`initial-end`,kind:`number`,family:`number`,exclusive:!0,initialRule:`max-step`}],props:{label:du,"bind-start":ou,"bind-end":ou,"initial-start":cu,"initial-end":cu,min:gu({default:0}),max:gu({default:100}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`coordinate`,form:`leaf`,childRule:`none`,label:`required`,slots:[{name:`x`,bind:`bind-x`,initial:`initial-x`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`},{name:`y`,bind:`bind-y`,initial:`initial-y`,kind:`number`,family:`number`,exclusive:!0,initialRule:`nearest-zero`}],props:{label:du,"bind-x":ou,"bind-y":ou,"initial-x":cu,"initial-y":cu,"x-min":gu({default:-5}),"x-max":gu({default:5}),"y-min":gu({default:-5}),"y-max":gu({default:5}),step:gu({positive:!0,default:1}),disabled:uu,color:hu()}},{name:`toggle`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:du,bind:ou,initial:lu,disabled:uu,color:hu()}},{name:`checkbox`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`boolean`,required:!1,family:`boolean`},initialRule:`false`,props:{label:du,bind:ou,initial:lu,disabled:uu,color:hu()}},{name:`date`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`string`,required:!1,family:`date`},initialRule:`empty`,props:{label:du,bind:ou,initial:su,min:{kind:`string`,static:!0},max:{kind:`string`,static:!0},required:{kind:`boolean`,default:!1},disabled:uu}},{name:`select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`choices`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`radio-group`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`string`,required:!1,family:`choice`},initialRule:`first-option`,props:{label:du,bind:ou,initial:su,disabled:uu,color:hu()}},{name:`multi-select`,form:`container`,childRule:`options`,label:`required`,binding:{kind:`array`,required:!1,family:`multi-select`,exclusive:!0},initialRule:`empty-array`,props:{label:du,bind:ou,initial:su,"max-selected":gu({integer:!0,min:0}),disabled:uu,color:hu()}},{name:`option`,form:`container`,childRule:`inline`,label:`none`,parent:[`select`,`choices`,`radio-group`,`multi-select`,`quiz`],props:{value:{kind:`string`,static:!0,required:!0}}},{name:`counter`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`number`},initialRule:`nearest-zero`,props:{label:du,bind:ou,initial:cu,min:gu({default:0}),max:gu(),step:gu({positive:!0,default:1}),disabled:uu}},{name:`timer`,form:`leaf`,childRule:`none`,label:`required`,binding:{kind:`number`,required:!1,family:`timer`,exclusive:!0},initialRule:`duration`,props:{label:du,bind:ou,duration:gu({integer:!0,positive:!0,default:60})}},{name:`checklist`,form:`container`,childRule:`content`,label:`required`,binding:{kind:`array`,required:!1,family:`checklist`,exclusive:!0},initialRule:`checked`,props:{label:du,bind:ou,disabled:uu,color:hu()}},{name:`progress`,form:`leaf`,childRule:`none`,label:`required`,props:{label:du,value:{kind:`number`,dynamic:!0,required:!0},max:gu({positive:!0,default:100}),color:hu()}},{name:`jump`,form:`inline`,childRule:`inline`,label:`none`,props:{to:{kind:`string`,static:!0,required:!0},appearance:{kind:`enum`,static:!0,values:[`link`,`button`],default:`link`},color:hu()}},{name:`anchor`,form:`leaf`,childRule:`none`,label:`none`,props:{id:{kind:`string`,static:!0,required:!0}}},{name:`text`,form:`inline`,childRule:`inline`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`section`,form:`container`,childRule:`any`,label:`none`,props:{color:{kind:`string`,static:!0,required:!0,color:!0}}},{name:`quiz`,form:`container`,childRule:`quiz`,label:`required`,props:{type:{kind:`enum`,static:!0,values:[`choice`,`number`],default:`choice`},label:du,answer:{kind:`string`,static:!0,required:!0},explanation:{kind:`string`},tolerance:gu({min:0,default:0}),disabled:uu}},{name:`panel`,form:`container`,childRule:`any`,label:`none`,props:{title:mu,reset:{kind:`boolean`,default:!0}}},{name:`card`,form:`container`,childRule:`any`,label:`none`,props:{title:mu}},{name:`grid`,form:`container`,childRule:`cards`,label:`none`,props:{columns:gu({integer:!0,min:1,max:4,default:2})}},{name:`tabs`,form:`container`,childRule:`tabs`,label:`optional`,binding:{kind:`string`,required:!1,family:`tabs`,exclusive:!0},initialRule:`first-tab`,props:{label:pu,bind:ou,initial:su}},{name:`tab`,form:`container`,childRule:`any`,label:`required`,parent:[`tabs`],props:{label:du,value:{kind:`string`,static:!0}}},{name:`steps`,form:`container`,childRule:`steps`,label:`optional`,binding:{kind:`string`,required:!1,family:`steps`,exclusive:!0},initialRule:`first-step`,props:{label:pu,bind:ou,initial:su}},{name:`step`,form:`container`,childRule:`any`,label:`required`,parent:[`steps`],props:{label:du,value:{kind:`string`,static:!0}}},{name:`accordion`,form:`container`,childRule:`disclosures`,label:`optional`,props:{label:pu}},{name:`disclosure`,form:`container`,childRule:`any`,label:`required`,parent:[`accordion`],props:{label:du,open:{kind:`boolean`,default:!1}}},{name:`if`,form:`container`,childRule:`any`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0}}},{name:`alert`,form:`container`,childRule:`any`,label:`none`,props:{title:mu,tone:{kind:`enum`,dynamic:!0,values:[`info`,`success`,`warning`],default:`info`}}},{name:`badge`,form:`inline`,childRule:`inline`,label:`none`,props:{tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`},color:hu()}},{name:`tooltip`,form:`inline`,childRule:`inline`,label:`none`,props:{text:{kind:`string`,required:!0}}},{name:`computed`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`const`,form:`leaf`,childRule:`none`,label:`none`,props:{name:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`validation`,form:`leaf`,childRule:`none`,label:`none`,props:{when:{kind:`boolean`,dynamic:!0,required:!0},message:{kind:`string`,required:!0},fields:{kind:`string`,static:!0,required:!0}}},{name:`data-table`,form:`container`,childRule:`columns`,label:`required`,props:{label:fu,rows:{kind:`string`,required:!0},key:{kind:`string`,required:!0},"max-rows":gu({integer:!0,positive:!0,max:A,default:100})}},{name:`column`,form:`leaf`,childRule:`none`,label:`none`,parent:[`data-table`],props:{label:{kind:`string`,static:!0,required:!0},value:{kind:`string`,required:!0}}},{name:`table`,form:`container`,childRule:`table`,label:`optional`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{label:pu,searchable:{kind:`boolean`,default:!0},sortable:{kind:`boolean`,default:!0},"page-size":gu({integer:!0,positive:!0,default:10}),bind:ou,key:{kind:`string`,static:!0},initial:su}},{name:`chart`,form:`container`,childRule:`table`,label:`none`,binding:{kind:`string`,required:!1,family:`selection`},initialRule:`none`,props:{kind:{kind:`enum`,static:!0,values:[`bar`,`line`,`area`,`scatter`,`donut`],default:`bar`},title:mu,x:{kind:`string`,static:!0},y:{kind:`string`,static:!0},"x-label":{kind:`string`},"y-label":{kind:`string`},bind:ou,key:{kind:`string`,static:!0},initial:su}},{name:`plot`,form:`container`,childRule:`plot`,label:`optional`,props:{label:pu,min:{kind:`number`,dynamic:!0,default:-10},max:{kind:`number`,dynamic:!0,default:10},samples:gu({integer:!0,min:2,max:2e3,static:!0,default:200}),"x-label":{kind:`string`,default:`x`},"y-label":{kind:`string`,default:`y`}}},{name:`timeline`,form:`container`,childRule:`table`,label:`none`,props:{title:mu,unit:{kind:`string`,default:`minutes`}}},{name:`diagram`,form:`container`,childRule:`diagram`,label:`optional`,binding:{kind:`string`,required:!1,family:`diagram`,exclusive:!0},initialRule:`first-node`,props:{label:pu,bind:ou,initial:su,direction:{kind:`enum`,static:!0,values:[`right`,`down`],default:`right`}}},{name:`node`,form:`container`,childRule:`content`,label:`required`,parent:[`diagram`],props:{id:{kind:`string`,static:!0,required:!0},label:du,tone:{kind:`enum`,dynamic:!0,values:[`neutral`,`success`,`warning`],default:`neutral`}}},{name:`edge`,form:`leaf`,childRule:`none`,label:`none`,parent:[`diagram`],props:{from:{kind:`string`,static:!0,required:!0},to:{kind:`string`,static:!0,required:!0},label:pu}}],vu=Object.freeze(Object.fromEntries(_u.map(e=>[e.name,Object.freeze(e)]))),yu=Object.freeze(_u.map(e=>e.name)),bu=Object.freeze({leaf:Object.freeze(_u.filter(e=>e.form===`leaf`).map(e=>e.name)),inline:Object.freeze(_u.filter(e=>e.form===`inline`).map(e=>e.name)),container:Object.freeze(_u.filter(e=>e.form===`container`).map(e=>e.name))});function xu(e){return bu[e]}function Su(e){return Object.hasOwn(vu,e)?vu[e]:void 0}function Cu(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function wu(e,t){let n,r=1/0;for(let i of t){let t=Cu(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function Tu(e){return wu(e,yu)}function Eu(e,t){return wu(t,Object.keys(e.props))}var Du=`reactive-md-theme-1`,Ou=Object.freeze({name:`default`,protocol:Du,colorSchemes:Object.freeze([`light`,`dark`])}),ku=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Au=64;function ju(e){return typeof e==`string`&&e.length>0&&e.length<=Au&&ku.test(e)}function Mu(e,t){let n=typeof t==`string`?t.length:1/0;if(!e||typeof e.start!=`number`||typeof e.end!=`number`||!Number.isFinite(e.start)||!Number.isFinite(e.end))return{start:0,end:0};let r=Math.max(0,Math.min(n,Math.floor(e.start)));return{start:r,end:Math.max(r,Math.min(n,Math.floor(e.end)))}}function Nu(e,t){if(typeof e!=`string`||e.length===0)return{line:1,column:1};let n=Math.min(t,e.length),r=1,i=0;for(let t=0;t<n;t+=1)e[t]===`
32
+ `&&(r+=1,i=t+1);return{line:r,column:t-i+1}}function Pu(e,t,n,r){let i=Mu(n,r),{line:a,column:o}=Nu(r,i.start);return{code:e,message:et(t),severity:`warning`,range:i,line:a,column:o,messageKey:t.key,...t.params?{params:t.params}:{}}}function Fu(e,t,n,r){let i=(e,t)=>({name:Ou.name,diagnostics:[Pu(e,t,n,r)]}),a=e;if(a==null||a===``)return{name:Ou.name,diagnostics:[]};if(!ju(a))return i(`local.theme.name`,Be(`local.theme.name`,{name:String(a),limit:Au}));let o=a;if(o===Ou.name)return{name:Ou.name,diagnostics:[]};if(!Array.isArray(t))return i(`local.theme.missing`,Be(`local.theme.missing`,{name:o}));let s=0,c=null;try{for(let e of t)typeof e==`object`&&e&&!Array.isArray(e)&&e.name===o&&(s+=1,c=e)}catch{return i(`local.theme.manifest`,Be(`local.theme.manifest.unreadable`))}if(s===0)return i(`local.theme.missing`,Be(`local.theme.missing`,{name:o}));if(s>1)return i(`local.theme.duplicate`,Be(`local.theme.duplicate`,{name:o}));try{let e=c;if(!e||typeof e!=`object`)return i(`local.theme.manifest`,Be(`local.theme.manifest.definition`,{name:o}));if(e.protocol!==`reactive-md-theme-1`)return i(`local.theme.protocol`,Be(`local.theme.protocol`,{name:o,protocol:Du}));let t=e.colorSchemes;if(!Array.isArray(t)||!t.includes(`light`)||!t.includes(`dark`))return i(`local.theme.modes`,Be(`local.theme.modes`,{name:o}))}catch{return i(`local.theme.manifest`,Be(`local.theme.manifest.selected`,{name:o}))}return{name:o,diagnostics:[]}}var Iu=new Set(xu(`leaf`)),Lu=new Set([...xu(`container`),...xu(`inline`)]),Ru=new Set(xu(`inline`)),zu=new Set([...Iu,...Lu]),Bu=``,Vu=``,Hu=/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/,Uu=Hu,Wu=128,Gu=Math.min(5e4,w),Ku=100,qu=Ir().use(Wo).use(iu),Ju=class extends Error{code;start;end;key;params;constructor(e,t,n,r,i=e,a){super(t),this.code=e,this.start=n,this.end=r,this.key=i,this.params=a,this.name=`LocalBudgetError`}};function Yu(e){if(e===void 0)return C;if(typeof e!=`object`||!e||Array.isArray(e))return{message:`Compile options must be an object.`,key:`local.options.invalid.object`};let t=e.limits;if(t===void 0)return C;if(typeof t!=`object`||!t||Array.isArray(t))return{message:`Compile option limits must be an object.`,key:`local.options.invalid.limits`};let n=t.maxSyntaxNodes;return n===void 0?C:typeof n!=`number`||!Number.isSafeInteger(n)||n<1?{message:`Compile option limits.maxSyntaxNodes must be a positive safe integer.`,key:`local.options.invalid.max-syntax-nodes`}:n}function Xu(e,t){let n=[];if(typeof e!=`string`||e.length>1e6){let t=typeof e==`string`?Be(`local.budget.document`,{limit:S}):Be(`local.parse.source`);return{nodes:[],diagnostics:[{code:typeof e==`string`?`local.budget`:`local.parse`,message:typeof e==`string`?`Document exceeds the ${S}-character limit.`:`Document source must be a string.`,severity:`error`,range:{start:0,end:typeof e==`string`&&e.length?1:0},line:1,column:1,messageKey:t.key,...t.params?{params:t.params}:{}}]}}let r=Yu(t);if(typeof r!=`number`)return{nodes:[],diagnostics:[{code:`local.options.invalid`,message:r.message,severity:`error`,range:{start:0,end:0},line:1,column:1,messageKey:r.key}]};let i=[0];for(let t=0;t<e.length;t+=1)e[t]===`
33
+ `&&i.push(t+1);let a=0,o=0,s=0,c=new Set(e.match(RegExp(`[0-9]+`,`g`))??[]),l=[],u=[],d=+(e.charCodeAt(0)===65279),f=e=>{if(e.type===`code`)l.push({start:e.position.start.offset+d,end:e.position.end.offset+d});else if(e.type===`footnoteReference`||e.type===`footnoteDefinition`){let t=e.position?.start?.offset,n=e.position?.end?.offset;Number.isInteger(t)&&Number.isInteger(n)&&n>t&&u.push({start:t+d,end:n+d,block:e.type===`footnoteDefinition`})}for(let t of e.children??[])f(t)};try{f(qu.parse(e.slice(d)))}catch{return v(`local.parse`,`Cannot parse the Markdown document.`,0,void 0,{key:`local.parse.markdown`}),{nodes:[],diagnostics:n}}u.sort((e,t)=>e.start-t.start||t.end-e.end);let p=[];for(let e of u){let t=p[p.length-1];t&&e.start<t.end?(e.end>t.end&&(t.end=e.end),t.block=t.block||e.block):p.push({...e})}let m=e=>{let t=0,n=l.length-1;for(;t<=n;){let r=t+n>>1,i=l[r];if(e<i.start)n=r-1;else if(e>=i.end)t=r+1;else return i.end}return null},h=0,g=(e,t,n,i={})=>{if(o>=r)throw new Ju(`local.budget`,`Syntax nodes exceed the limit of ${r}.`,t,n,`local.budget.nodes`,{limit:r});return o+=1,{type:e,id:`local-${a++}`,range:{start:t,end:n},...i}};function _(t,r,a,o,s=o+1,c){if(n.length>=100){if(a===`warning`)return;let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let l=Math.max(0,Math.min(e.length,o)),u=Math.max(l,Math.min(e.length,Math.max(l,s))),d=0,f=i.length-1;for(;d<f;){let e=Math.ceil((d+f)/2);i[e]<=l?d=e:f=e-1}let p=d+1,m=r.length>2e3?`${r.slice(0,D-1)}…`:r,h=Be(c?.key??t,c?.params);n.push({code:t,message:m,severity:a,range:{start:l,end:u},line:p,column:l-i[d]+1,messageKey:h.key,...h.params?{params:h.params}:{}})}function v(e,t,n,r=n+1,i){_(e,t,`error`,n,r,i)}function y(e,t,n,r=n+1,i){_(e,t,`warning`,n,r,i)}let b,x,C=0,w=0,T,E=0;function O(t){let n=e.startsWith(`</theme`,t),r=!n&&e.startsWith(`<theme`,t);if(!n&&!r)return!1;let i=e[t+(n?7:6)];return i!==void 0&&(i===`>`||i===`/`||/\s/.test(i))}function k(t,n){let r=/^<(\/?)theme(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=t+r[0].length,a=e.indexOf(`
34
+ `,i),o=a<0?n:Math.min(n,a),s=``,c=i;for(;c<o;c+=1){let t=e[c];if(s)t===s&&(s=``);else if(t===`"`||t===`'`)s=t;else if(t===`>`)break}let l=!!r[1];if(c>=o){let n=o;return{start:t,end:n,rest:e.slice(i,n),closing:l,selfClosing:!1,unclosed:!0}}let u=e.slice(i,c);return{start:t,end:c+1,rest:u,closing:l,selfClosing:/\/\s*$/.test(u),unclosed:!1}}function A(t,n){let r=t;for(;r<n;){let t=e[r];if(t.charCodeAt(0)===65279||t===` `||t===` `||t===`\r`||t===`
35
+ `)r+=1;else if(e.startsWith(`<!--`,r)){let t=e.indexOf(`-->`,r+4);if(t<0||t+3>n)return-1;r=t+3}else break}return r}function j(t){if(t.unclosed)return!1;let n=t.end;for(;n<e.length&&(e[n]===` `||e[n]===` `||e[n]===`\r`);)n+=1;return n>=e.length||e[n]===`
36
+ `}function M(e){if(/\{\{|\}\}/.test(e))return{code:`local.theme.expression`,key:`local.theme.expression`,message:`Theme names must be static text, not expressions.`};let t=e.replace(/\/\s*$/,``),n=/^\s*name\s*=\s*(?:"([^"]*)"|'([^']*)')\s*$/.exec(t);if(!n)return/\bname\s*=/.test(t)?{code:`local.theme.attribute`,key:`local.theme.attribute`,message:`Theme declarations only accept a quoted name attribute.`}:{code:`local.theme.name`,key:`local.theme.name.missing`,message:`A theme declaration requires a quoted name attribute.`};let r=n[1]??n[2]??``;return ju(r)?{name:r}:{code:`local.theme.name`,key:`local.theme.name.invalid`,params:{name:r,limit:64},message:`Theme name "${r}" must use lowercase letters, digits and single hyphens (maximum 64 characters).`}}function N(e){return e.replace(/&(quot|apos|amp|lt|gt);/g,(e,t)=>({quot:`"`,apos:`'`,amp:`&`,lt:`<`,gt:`>`})[t])}function ee(e,t){let n=Object.create(null),r=0;for(;r<e.length;){for(;r<e.length&&/\s/.test(e[r]);)r++;if(r>=e.length||e[r]===`/`)break;let i=r,a=/^[A-Za-z][A-Za-z0-9_-]*/.exec(e.slice(r));if(!a){for(v(`local.attribute`,`Attribute names must use lowercase kebab-case.`,t+r,void 0,{key:`local.attribute.format`});r<e.length&&!/\s/.test(e[r]);)r++;continue}let o=a[0];for(r+=o.length,o.length>Wu?v(`local.budget.name`,`Attribute name exceeds the ${Wu}-character limit.`,t+i,t+r,{key:`local.budget.name.attribute`,params:{limit:Wu}}):Uu.test(o)||v(`local.attribute.name`,`Attribute name ${o} must use lowercase kebab-case.`,t+i,t+r,{key:`local.attribute.name`,params:{name:o}});r<e.length&&/\s/.test(e[r]);)r++;let s=`true`;if(e[r]===`=`){for(r++;r<e.length&&/\s/.test(e[r]);)r++;let n=e[r++];if(n!==`"`&&n!==`'`){v(`local.attribute`,`Attribute ${o} value must be quoted.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.value-quoted`,params:{name:o}});break}let i=e.indexOf(n,r);if(i<0){v(`local.attribute`,`Attribute ${o} is missing a closing quote.`,t+Math.max(0,r-1),void 0,{key:`local.attribute.closing-quote`,params:{name:o}});break}s=N(e.slice(r,i)),r=i+1}if(Object.hasOwn(n,o)?v(`local.attribute.duplicate`,`Duplicate attribute ${o}.`,t+i,t+r,{key:`local.attribute.duplicate`,params:{name:o}}):n[o]=s,r<e.length&&!/\s|\//.test(e[r])){v(`local.attribute`,`Attributes must be separated by whitespace.`,t+r,void 0,{key:`local.attribute.separator`});break}}return n}function P(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=``,a=t+r[0].length;for(;a<n;a++){let t=e[a];if(i)t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`>`)break}if(a>=n)return v(`local.tag.unclosed`,`Tag ${r[2]} is missing >.`,t,n,{key:`local.tag.unclosed.open`,params:{name:r[2]}}),null;let o=r[2];o.length>Wu&&v(`local.budget.name`,`Tag name exceeds the ${Wu}-character limit.`,t,t+1+o.length,{key:`local.budget.name.tag`,params:{limit:Wu}});let s=e.slice(t+r[0].length,a);return r[1]?(s.trim()&&v(`local.tag.closing`,`Closing tag </${o}> cannot have attributes.`,t,a+1,{key:`local.tag.closing`,params:{name:o}}),{name:o,closing:!0,self:!1,start:t,end:a+1,attrs:{}}):(Hu.test(o)||v(`local.tag.name`,`Tag name ${o} must use lowercase kebab-case.`,t,t+1+o.length,{key:`local.tag.name`,params:{name:o}}),{name:o,closing:!1,self:/\/\s*$/.test(s),start:t,end:a+1,attrs:ee(s,t+r[0].length)})}function te(t,n){let r=/^<(\/?)([A-Za-z][A-Za-z0-9_-]*)(?=[\s/>])/.exec(e.slice(t,n));if(!r)return null;let i=``,a=t+r[0].length;for(;a<n;a++){let t=e[a];if(i)t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`>`)break}if(a>=n)return null;let o=e.slice(t+r[0].length,a);return{name:r[2],closing:!!r[1],self:!r[1]&&/\/\s*$/.test(o),end:a+1}}function F(t){let n=e.lastIndexOf(`
37
+ `,t-1)+1;return/^[ \t]*$/.test(e.slice(n,t))}let ne=/^ {0,3}$/,re=/^[ \t]*$/;function ie(t,n,r){let i=e[t];if(i===`\\`)return Math.min(n,t+2);if(i!=="`"&&i!==`~`)return null;let a=e.lastIndexOf(`
38
+ `,t-1)+1;if((r?re:ne).test(e.slice(a,t))){let i=/^(`{3,}|~{3,})[^\n]*(?:\n|$)/.exec(e.slice(t,n));if(i){let a=RegExp(`^${r?`[ \\t]*`:` {0,3}`}${i[1][0]}{${i[1].length},}[ \\t]*\\r?$`,`gm`);a.lastIndex=t+i[0].length;let o=a.exec(e);return o&&o.index<n?Math.min(n,o.index+o[0].length):n}}if(i==="`"){let r=/^`+/.exec(e.slice(t,n))[0],i=e.indexOf(r,t+r.length);for(;i>=0&&i<n;){if(e[i-1]!=="`"&&e[i+r.length]!=="`")return i+r.length;i=e.indexOf(r,i+r.length)}return t+r.length}return null}function ae(t,n,r,i){let a=1;for(let o=t;o<r;){if(!i){let e=m(o);if(e!==null&&e>o){o=Math.min(e,r);continue}}let t=ie(o,r,i);if(t!==null)o=t;else if(e.startsWith(`<!--`,o)){let t=e.indexOf(`-->`,o+4);o=t<0||t+3>r?r:t+3}else{if(e[o]===`<`){let e=te(o,r);if(e){if(e.name===n){if(e.closing){if(--a,a===0)return{start:o,end:e.end}}else e.self||(a+=1)}o=e.end;continue}}o++}}return null}function oe(t,n){let r=``;for(let i=t+2;i<n-1;i++){let t=e[i];if(r)t===`\\`?i++:t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`}`&&e[i+1]===`}`)return i+2}return-1}function se(t,n){let r=1/0,i=``,a=0,o=t;for(;o<n;){let t=e.indexOf(`
39
+ `,o),s=t<0||t>n?n:t,c=e.slice(o,s);if(e.lastIndexOf(`
40
+ `,o-1)+1===o){if(i)RegExp(`^[ \\t]*${i}{${a},}[ \\t]*\\r?$`).test(c)&&(i=``);else{let e=/^([ \t]*)(`{3,}|~{3,})/.exec(c);e?(r=Math.min(r,e[1].length),i=e[2][0],a=e[2].length):c.trim()!==``&&(r=Math.min(r,/^[ \t]*/.exec(c)[0].length))}}if(s>=n)break;o=s+1}return Number.isFinite(r)?r:0}function ce(t,n,r,i=t,a=t,o=0){let s=[];if(o>Ku)return v(`local.budget`,`Component nesting exceeds the 100-level limit.`,i,a,{key:`local.budget.nesting`,params:{limit:Ku}}),{tokens:s,end:n,contentEnd:t,indent:0};let c=p;if(r){let i=ae(t,r,n,!0)?.start??n,a=se(t,i),o=``,s=[];for(let n=t;n<i;){if(n===0||e[n-1]===`
41
+ `){let t=0;for(;t<a&&n<i&&/[ \t]/.test(e[n]);)n++,t++}if(n>=i)break;s.push(n),o+=e[n++]}s.push(i);let l=[],u=e=>{if(e.type===`footnoteReference`||e.type===`footnoteDefinition`)l.push({start:s[e.position.start.offset],end:s[e.position.end.offset],block:e.type===`footnoteDefinition`});else for(let t of e.children??[])u(t)};u(qu.parse(o)),c=[...p.filter(e=>e.start>=t&&e.end<=i),...l].sort((e,t)=>e.start-t.start||t.end-e.end)}let u=0;for(let i=t;i<n;){if(r===void 0){for(;l[h]?.end<=i;)h++;let e=l[h];if(e&&e.start<=i){i=e.end;continue}}for(;c[u]?.end<=i;)u++;let a=c[u];if(a&&a.start<=i){a.start===i&&(s.push({start:i,end:a.end,block:a.block,node:g(`fallback`,i,a.end,{value:e.slice(i,a.end)})}),y(`local.footnote.unsupported`,`Footnotes are not part of the local interaction syntax and are shown as source.`,i,a.end,{key:`local.footnote.unsupported`})),i=a.end;continue}let d=ie(i,n,r!==void 0);if(d!==null)i=d;else if(e.startsWith(`<!--`,i)){let t=e.indexOf(`-->`,i+4),a=t<0?n:Math.min(n,t+3),o=e.slice(i,a);if(/^<!--\s*reactive-md(?=[\s:]|-->|$)/i.test(o)){E+=1;let n=e.lastIndexOf(`
42
+ `,i-1)+1,s=e.indexOf(`
43
+ `,a),c=/^\s*$/.test(e.slice(n,i))&&/^\s*$/.test(e.slice(a,s<0?e.length:s)),l=/^<!--[ \t]*reactive-md:[ \t]*(local-draft-[1-9][0-9]*)[ \t]*-->$/.exec(o);E>1?v(`local.version.duplicate`,`Only one source syntax declaration is allowed.`,i,a):!l||t<0||/[\r\n]/.test(o)?v(`local.version.malformed`,`Use <!-- reactive-md: local-draft-2 --> on one line.`,i,a):(T={version:l[1],range:{start:i,end:a}},r!==void 0||!c||A(0,i)!==i?v(`local.version.placement`,`The syntax declaration must be on its own line before the theme and document body.`,i,a):l[1]!==`local-draft-2`&&v(`local.version.unsupported`,`This reader accepts ${au}; migrate ${l[1]} or use a compatible reader.`,i,a,{key:`local.version.unsupported`,params:{declared:l[1],supported:au}}))}s.push({start:i,end:a,node:g(`comment`,i,a)}),i=a}else if(e.startsWith(`{{`,i)){let t=oe(i,n);if(t<0){v(`local.interpolation`,`Interpolation is missing }}.`,i,n,{key:`local.interpolation.unclosed`}),i+=2;continue}s.push({start:i,end:t,node:g(`interpolation`,i,t,{value:e.slice(i+2,t-2).trim()})}),i=t}else if(e[i]===`$`){let t=e[i+1]===`$`,r=t?`$$`:`$`,a=i+r.length;for(;a<n;a++)if(e[a]===`\\`)a++;else if(!t&&e[a]===`
44
+ `||e.startsWith(r,a))break;if(a>=n||!e.startsWith(r,a)){v(`local.math.unclosed`,`Formula is missing its closing delimiter.`,i,void 0,{key:`local.math.unclosed`}),i+=r.length;continue}let o=e.slice(i+r.length,a);t||o&&!/^\s|\s$/.test(o)||v(`local.math.whitespace`,`Inline math cannot start or end with whitespace.`,i,a+1,{key:`local.math.whitespace`}),o.length>Gu&&(v(`local.budget.math`,`Formula exceeds the ${Gu}-character limit.`,i,a+r.length,{key:`local.budget.math`,params:{limit:Gu}}),o=o.slice(0,Gu));let c=a+r.length;s.push({start:i,end:c,node:g(t?`math`:`inlineMath`,i,c,{value:o})}),i=c}else{if(e[i]===`<`){let a=O(i)?k(i,n):null;if(a){if(r===void 0&&A(w,i)===i){if(C+=1,C===1&&(x={start:a.start,end:a.end}),a.unclosed)y(`local.theme.malformed`,`Theme declaration is missing >.`,i,a.end,{key:`local.theme.malformed.unclosed`});else if(a.closing)y(`local.theme.malformed`,`A theme declaration cannot be a closing tag.`,i,a.end,{key:`local.theme.malformed.closing`});else if(!j(a))y(`local.theme.malformed`,`A theme declaration must be on its own line before the document content.`,i,a.end,{key:`local.theme.malformed.placement`});else if(C>1)y(`local.theme.duplicate`,`Only one theme declaration is allowed before the document content; this declaration is ignored.`,i,a.end,{key:`local.theme.duplicate.declaration`});else{let e=M(a.rest);e.code?y(e.code,e.message??`Invalid theme declaration.`,i,a.end,{key:e.key??e.code,...e.params?{params:e.params}:{}}):b=e.name}w=a.end,s.push({start:i,end:a.end,block:!0,node:g(`comment`,i,a.end)}),i=a.end;continue}let t=r===void 0?`local.theme.late`:`local.theme.nested`;y(t,r===void 0?`Theme declarations after document content are ignored.`:`Theme declarations inside document content are ignored.`,i,a.end,{key:t}),s.push({start:i,end:a.end,block:!1,node:g(`fallback`,i,a.end,{value:e.slice(i,a.end)})}),i=a.end;continue}let c=te(i,n);if(c&&!c.closing&&Hu.test(c.name)&&c.name.length<=Wu&&!zu.has(c.name)){let t=c.self?c.end:ae(c.end,c.name,n,r!==void 0)?.end??null;if(t===null){v(`local.tag.unclosed`,`<${c.name}> is missing </${c.name}>.`,i,c.end,{key:`local.tag.unclosed.pair`,params:{name:c.name}}),i=c.end;continue}let a=Tu(c.name);y(`local.component.unknown`,`Unknown component <${c.name}>. ${a?`Did you mean <${a}>?`:`This mode only accepts local interaction components.`}`,i,t,{key:a?`local.component.unknown.suggestion`:`local.component.unknown`,params:a?{name:c.name,suggestion:a}:{name:c.name}}),s.push({start:i,end:t,block:F(i),node:g(`fallback`,i,t,{value:e.slice(i,t)})}),i=t;continue}let l=P(i,n);if(l){if(l.closing){if(l.name===r)return{tokens:s,end:l.end,contentEnd:i,indent:se(t,i)};v(`local.tag.mismatch`,`Closing tag </${l.name}> does not match ${r?`<${r}>`:`the document root`}.`,i,l.end,{key:r?`local.tag.mismatch.parent`:`local.tag.mismatch.root`,params:r?{name:l.name,parent:r}:{name:l.name}}),i=l.end;continue}let e=Iu.has(l.name)||l.self;if(l.self&&Lu.has(l.name)&&v(`local.tag.shape`,`<${l.name}> requires a closing tag.`,i,l.end,{key:`local.tag.shape`,params:{name:l.name}}),e){s.push({start:i,end:l.end,node:g(`component`,i,l.end,{name:l.name,attrs:l.attrs,children:[]})}),i=l.end;continue}let a=ce(l.end,n,l.name,i,l.end,o+1),c=le(l.end,a.contentEnd,a.tokens,Ru.has(l.name)?0:a.indent),u=g(`component`,i,a.end,{name:l.name,attrs:l.attrs,children:Ru.has(l.name)&&c.length===1&&c[0].type===`paragraph`?c[0].children??[]:c});s.push({start:i,end:a.end,node:u}),i=a.end;continue}}i++}}return r&&v(`local.tag.unclosed`,`<${r}> is missing </${r}>.`,i,Math.min(e.length,Math.max(a,i+1)),{key:`local.tag.unclosed.pair`,params:{name:r}}),{tokens:s,end:n,contentEnd:n,indent:r?se(t,n):0}}function le(t,n,r,i=0){let a=``,o=t,l=[],u=new Map,d=new Map;function f(t){let n=e.lastIndexOf(`
45
+ `,t-1)+1,r=d.get(n);if(r===void 0){for(r=0;r<i&&(e[n+r]===` `||e[n+r]===` `);)r++;d.set(n,r)}return{lineStart:n,skip:r}}function p(e,t,n){if(n&&t===0&&e.charCodeAt(0)===65279&&(e=e.slice(1),t+=1),n&&i>0)for(let n=0;n<e.length;n++){let r=t+n,{lineStart:i,skip:o}=f(r);r<i+o||(a+=e[n],l.push(r))}else{a+=e;for(let r=0;r<e.length;r++)l.push(n?t+r:t)}}for(let t of r){p(e.slice(o,t.start),o,!0);let n;do n=Bu+s+++Vu;while(c.has(n));let r=t.block??(t.node.type===`math`||t.node.type===`component`&&!Ru.has(t.node.name));r&&p(`
46
+
47
+ `,t.start,!1);let i=a.length;p(`![${n}](rmd-internal:placeholder)`,t.start,!1),u.set(i,{marker:n,end:a.length,node:t.node}),r&&p(`
48
+
49
+ `,t.end,!1),o=t.end}p(e.slice(o,n),o,!0),l.push(n);let m=qu.parse(a);function h(e){for(let t of e)t.type===`interpolation`&&t.value!==void 0&&(t.value=t.value.replace(/\\\|/g,`|`)),t.children&&h(t.children)}function _(r){let i=l[r.position?.start?.offset??0]??t,o=l[r.position?.end?.offset??a.length]??n;if(r.type===`image`){let e=u.get(r.position?.start?.offset);if(e&&r.position.end.offset===e.end&&r.url===`rmd-internal:placeholder`&&r.alt===e.marker)return u.delete(r.position.start.offset),e.node.type===`comment`?[]:[e.node]}if(r.type===`text`)return r.value?[g(`text`,i,o,{value:r.value})]:[];if(r.type===`footnoteReference`||r.type===`footnoteDefinition`)return y(`local.footnote.unsupported`,`Footnotes are not part of the local interaction syntax and are shown as source.`,i,o,{key:`local.footnote.unsupported`}),[g(`fallback`,i,o,{value:e.slice(i,o)})];let s=r.children?.flatMap(_);if(r.type===`paragraph`&&s?.length===1&&(s[0].type===`math`||s[0].type===`fallback`||s[0].type===`component`&&!Ru.has(s[0].name)))return s;if(r.type===`paragraph`&&!s?.length)return[];if(r.type===`html`)return v(`local.html`,`Raw HTML is not part of the local interaction syntax.`,i,o,{key:`local.html`}),[];let c=g(r.type,i,o);for(let e of[`value`,`depth`,`ordered`,`start`,`checked`,`url`,`title`,`alt`,`lang`,`align`])r[e]!==void 0&&(c[e]=r[e]);return s&&(c.children=s),r.type===`table`&&c.children&&h(c.children),[c]}return m.children.flatMap(_)}try{let t=ce(0,e.length);return{nodes:le(0,e.length,t.tokens),diagnostics:n,...T?{versionDeclaration:T}:{},...b===void 0?{}:{theme:b},...x?{themeRange:x}:{}}}catch(e){return e instanceof Ju?(v(e.code,e.message,e.start,e.end,{key:e.key,params:e.params}),{nodes:[],diagnostics:n}):(v(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{nodes:[],diagnostics:n})}}var Zu=`local.validation.failed`,Qu=`local.validation.expression`,$u=`Validation failed.`;function ed(e){return e.length>2e3?`${e.slice(0,D-1)}…`:e}function td(e){let t=e.trim();return t?t.split(/\s+/):[]}function K(e){let t=[0];for(let n=0;n<e.length;n+=1)e[n]===`
50
+ `&&t.push(n+1);return t}function q(e){if(!e||typeof e!=`object`)return!1;let t=e,n=t.range;return typeof t.expression==`string`&&typeof t.message==`string`&&Array.isArray(t.fields)&&!!n&&Number.isFinite(n.start)&&Number.isFinite(n.end)}function nd(e,t,n,r,i){let a=e.length,o=Math.max(0,Math.min(a,Math.trunc(n.start))),s=Math.max(o+1,Math.min(a,Math.trunc(n.end))),c=0,l=Math.max(0,t.length-1);for(;c<l;){let e=Math.ceil((c+l)/2);t[e]<=o?c=e:l=e-1}return{code:r,message:i,severity:`error`,range:{start:o,end:s},line:c+1,column:o-t[c]+1}}var rd=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,id=/^[A-Za-z_][A-Za-z0-9_]*$/,ad=1e-9,od=128,sd=4,cd=3,ld=new Set([`x`,`y`,`true`,`false`,`null`,`pi`,`e`]);function ud(e){let t=e.trim();if(!rd.test(t))return null;let n=Number(t);return Number.isFinite(n)?n:null}function dd(e){return e===``||be(e)!==null}function fd(e){return Array.isArray(e)?e.slice():e}function pd(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=ad*Math.max(1,Math.abs(r))}function md(e,t,n){let r=e??0,i=e===void 0?-1/0:Math.ceil((e-r)/n),a=t===void 0?1/0:Math.floor((t-r)/n);if(i>a)return null;let o=-r/n,s=null;for(let e of[Math.floor(o),Math.ceil(o)]){let t=Math.min(a,Math.max(i,e));if(!Number.isFinite(t))continue;if(s===null){s=t;continue}let o=r+t*n,c=r+s*n;(Math.abs(o)<Math.abs(c)||Math.abs(o)===Math.abs(c)&&o<c)&&(s=t)}if(s===null)return null;let c=r+s*n;return e!==void 0&&c<e||t!==void 0&&c>t?null:c}function hd(e){let t=[],n=[];for(let r=0;r<e.length;){if(e[r]===`\\`&&e.startsWith(`{{`,r+1)){r+=3;continue}if(!e.startsWith(`{{`,r)){r++;continue}let i=``,a=r+2;for(;a<e.length-1;a++){let t=e[a];if(i)t===`\\`?a++:t===i&&(i=``);else if(t===`"`||t===`'`)i=t;else if(t===`}`&&e[a+1]===`}`)break}if(a>=e.length-1){n.push(r);break}let o=e.slice(r+2,a),s=o.length-o.trimStart().length;t.push({expression:o.trim(),start:r+2+s,end:a}),r=a+2}return{segments:t,unterminated:n}}function gd(e){let t=/^\s*\{\{([\s\S]*)\}\}\s*$/.exec(e);if(!t)return null;let n=t[1],r=n.length-n.trimStart().length,i=e.indexOf(`{{`);return{expression:n.trim(),start:i+2+r}}function _d(e){return e.type===`comment`||e.type===`text`&&!(e.value??``).trim()||e.type===`paragraph`&&!e.children?.length&&!(e.value??``).trim()}function vd(e){return(e??[]).filter(e=>!_d(e))}function yd(e){return e.type===`text`||e.type===`inlineCode`||e.type===`fallback`?e.value??``:e.type===`interpolation`?`\0`:e.type===`break`?` `:(e.children??[]).map(yd).join(``)}function bd(e){return e.type===`interpolation`||(e.children??[]).some(bd)}function xd(e){return e.type===`component`||(e.children??[]).some(xd)}function J(e){switch(e){case`string`:return`string`;case`number`:return`number`;case`boolean`:return`boolean`;case`null`:return`null`;case`array`:return`array`;case`number-array`:return`number-array`}}function Sd(e,t){if(typeof e!=`string`||e.length>1e6)return{ok:!1,diagnostics:Xu(e,t).diagnostics};let n=[],r=[0];for(let t=0;t<e.length;t+=1)e[t]===`
51
+ `&&r.push(t+1);let i=(t,i,a,o=a+1,s)=>{if(n.length>=100){let e=n.length-1;for(;e>=0&&n[e].severity!==`warning`;)--e;if(e<0)return;n.splice(e,1)}let c=Math.max(0,Math.min(e.length,a)),l=Math.max(c,Math.min(e.length,Math.max(c,o))),u=0,d=r.length-1;for(;u<d;){let e=Math.ceil((u+d)/2);r[e]<=c?u=e:d=e-1}let f=Be(s?.key??t,s?.params);n.push({code:t,message:i.length>2e3?`${i.slice(0,D-1)}…`:i,severity:`error`,range:{start:c,end:l},line:u+1,column:c-r[u]+1,messageKey:f.key,...f.params?{params:f.params}:{}})},a;try{a=Xu(e,t)}catch(e){return i(`local.parse`,`Cannot parse document: ${e instanceof Error?e.message:String(e)}`,0,void 0,{key:`local.parse.document`,params:{detail:e instanceof Error?e.message:String(e)}}),{ok:!1,diagnostics:n}}if(n.push(...a.diagnostics),n.some(e=>e.severity===`error`&&e.code.startsWith(`local.version.`)))return{ok:!1,diagnostics:n.filter(e=>e.code.startsWith(`local.version.`))};for(let e of Cd(a.nodes))i(`local.legacy`,`Legacy reactive-md configuration fences (state/data/computed/actions, etc.) are not part of the local interaction syntax; select legacy mode explicitly in the host.`,e.range.start,e.range.end,{key:`local.legacy`});let o={source:e,lineStarts:r,nodes:a.nodes,report:i,entries:[],attrs:new Map,options:new Map,tabs:new Map,steps:new Map,selections:new Map,diagramNodes:new Map,checklists:new Map,tables:new Map,tableShapes:new Map,bindingSlots:Object.create(null),bindingKinds:{},computationKinds:{},computations:{},expressionKinds:new Map};wd(a.nodes,null,o.entries,o);for(let e of o.entries)o.attrs.set(e.node.id,Dd(e,o)),Ad(e,o);for(let e of o.entries)Md(e,o);Of(o);let s=Bd(o);o.bindingKinds=Vd(s),af(o),cf(o),hf(o);let c=gf(o);bf(o),Tf(o);let l={};for(let[e,t]of Object.entries(s))l[e]=fd(t.initial);if(lf(o,s,l),n.sort((e,t)=>e.range.start-t.range.start||e.range.end-t.range.end),n.some(e=>e.severity===`error`))return{ok:!1,diagnostics:n};let u=tf(o),d=Object.keys(o.computations),f={syntax:`local`,source:e,syntaxVersion:au,...a.versionDeclaration?{versionDeclaration:a.versionDeclaration}:{},nodes:sf(a.nodes),initialState:l,bindings:s,theme:a.theme??Ou.name,...a.themeRange?{themeRange:a.themeRange}:{},...u?{bindingSlots:u}:{},...d.length?{computations:o.computations}:{},...c.length?{validations:c}:{}};return Wn(f),Df(f,o.tableShapes),{ok:!0,document:f,diagnostics:n}}function Cd(e){let t=[],n=e=>{for(let r of e)r.type===`code`&&(r.lang??``).trim().toLowerCase()===`reactive-md`&&t.push(r),r.children&&n(r.children)};return n(e),t}function wd(e,t,n,r){for(let i of e){let e=t;if(i.type===`component`&&i.name){let a=Su(i.name);if(a){let r={node:i,name:i.name,schema:a,parent:t};n.push(r),e=r}else{let e=i.name.length<=od?Tu(i.name):void 0;r.report(`local.component.unknown`,`Unknown component <${i.name}>. ${e?`Did you mean <${e}>?`:`This mode only accepts local interaction components.`}`,i.range.start,i.range.end,{key:e?`local.component.unknown.suggestion`:`local.component.unknown`,params:e?{name:i.name,suggestion:e}:{name:i.name}})}}i.children&&wd(i.children,e,n,r)}}function Td(e,t,n){let r=``,i=t;for(;i<n;i+=1){let t=e[i];if(r)t===r&&(r=``);else if(t===`"`||t===`'`)r=t;else if(t===`>`){i+=1;break}}return e.slice(t,i)}function Ed(e,t,n){if(n.length>od)return t.node.range.start;let r=Td(e.source,t.node.range.start,t.node.range.end),i=RegExp(`(?:^|[\\s"'/])${n.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}(?=\\s|=|/|>)`).exec(r);return i?t.node.range.start+i.index+(i[0].length-n.length):t.node.range.start}function Dd(e,t){let n={},r=e.node.attrs??{};for(let[i,a]of Object.entries(r)){let r=e.schema.props[i],o=Ed(t,e,i);if(!r){let n=i.length<=od?Eu(e.schema,i):void 0;t.report(`local.attribute.unknown`,`Component <${e.name}> does not support attribute ${i}.${n?` Did you mean ${n}?`:``}`,o,o+i.length,{key:n?`local.attribute.unknown.suggestion`:`local.attribute.unknown`,params:n?{component:e.name,name:i,suggestion:n}:{component:e.name,name:i}});continue}let s={raw:a,offset:o,dynamic:!1};if(r.kind===`string`&&a.length>1e5&&(t.report(`local.budget.attribute`,`Attribute ${i} on component <${e.name}> exceeds the ${w}-character limit.`,o,o+i.length,{key:`local.budget.attribute`,params:{name:i,component:e.name,limit:w}}),s.raw=a.slice(0,w)),Od(e,i,r,s,t),r.color){let n=hd(s.raw);n.segments.length||n.unterminated.length||qn(s.raw)||t.report(`local.attribute.color`,`Attribute ${i} on component <${e.name}> must be a standard CSS named color or #RGB/#RRGGBB, got "${s.raw}".`,o,o+i.length,{key:`local.attribute.color`,params:{name:i,component:e.name,value:s.raw}})}n[i]=s}for(let[r,i]of Object.entries(e.schema.props))i.required&&!Object.hasOwn(n,r)&&t.report(`local.attribute.required`,`Component <${e.name}> is missing required attribute ${r}.`,e.node.range.start,e.node.range.end,{key:`local.attribute.required`,params:{component:e.name,name:r}});return e.schema.label===`required`&&(Object.hasOwn(n,`label`)?String(n.label.raw).trim()||t.report(`local.label.required`,`Component <${e.name}> label cannot be empty.`,n.label.offset,void 0,{key:`local.label.required.empty`,params:{component:e.name}}):t.report(`local.label.required`,`Component <${e.name}> requires a label.`,e.node.range.start,e.node.range.end,{key:`local.label.required.missing`,params:{component:e.name}})),n}function Od(e,t,n,r,i){if(n.kind===`string`){if(n.static){let e=hd(r.raw);(e.segments.length||e.unterminated.length)&&i.report(`local.attribute.static`,`Attribute ${t} is static and cannot contain interpolations.`,r.offset,r.offset+r.raw.length,{key:`local.attribute.static`,params:{name:t}})}r.value=r.raw;return}if(n.kind===`number`){let e=n.dynamic?gd(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let a=ud(r.raw);if(a===null){i.report(`local.attribute.type`,`Attribute ${t} requires a number${n.dynamic?` or a full number interpolation`:``}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.number-interpolation`:`local.attribute.type.number`,params:{name:t,value:r.raw}});return}n.integer&&!Number.isInteger(a)&&i.report(`local.attribute.type`,`Attribute ${t} requires an integer.`,r.offset,void 0,{key:`local.attribute.type.integer`,params:{name:t}}),n.positive&&!(a>0)&&i.report(`local.attribute.type`,`Attribute ${t} requires a positive number.`,r.offset,void 0,{key:`local.attribute.type.positive`,params:{name:t}}),n.min!==void 0&&a<n.min&&i.report(`local.attribute.range`,`Attribute ${t} must be at least ${n.min}.`,r.offset,void 0,{key:`local.attribute.range.min`,params:{name:t,min:n.min}}),n.max!==void 0&&a>n.max&&i.report(`local.attribute.range`,`Attribute ${t} must be at most ${n.max}.`,r.offset,void 0,{key:`local.attribute.range.max`,params:{name:t,max:n.max}}),r.value=a;return}if(n.kind===`boolean`){let e=n.dynamic?gd(r.raw):null;if(e){r.dynamic=!0,r.expression=e.expression,r.expressionOffset=r.offset+e.start,e.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}if(r.raw===`true`||r.raw===`false`){r.value=r.raw===`true`;return}i.report(`local.attribute.type`,`Attribute ${t} requires true or false${n.dynamic?`, or a full boolean interpolation`:``}.`,r.offset,r.offset+r.raw.length,{key:n.dynamic?`local.attribute.type.boolean-interpolation`:`local.attribute.type.boolean`,params:{name:t}});return}let a=n.dynamic?gd(r.raw):null;if(a){r.dynamic=!0,r.expression=a.expression,r.expressionOffset=r.offset+a.start,a.expression||i.report(`local.expression.empty`,`Attribute ${t} interpolation cannot be empty.`,r.expressionOffset,void 0,{key:`local.expression.empty.attribute`,params:{name:t}});return}let o=n.values??[];o.includes(r.raw)?r.value=r.raw:i.report(`local.attribute.type`,`Attribute ${t} must be one of ${o.join(` / `)}, got "${r.raw}".`,r.offset,r.offset+r.raw.length,{key:`local.attribute.type.enum`,params:{name:t,values:o.join(` / `),value:r.raw}})}function kd(e,t,n){let r=t[n];if(r)return!r.dynamic&&typeof r.value==`number`?r.value:void 0;let i=e.schema.props[n]?.default;return typeof i==`number`?i:void 0}function Ad(e,t){let n=t.attrs.get(e.node.id)??{},r=t.report;if(e.name===`number`||e.name===`slider`||e.name===`counter`){let t=kd(e,n,`min`),i=kd(e,n,`max`),a=kd(e,n,`step`);t!==void 0&&i!==void 0&&t>i&&r(`local.constraint`,`Component <${e.name}> min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.number-min-max`,params:{component:e.name}}),a!==void 0&&!(a>0)&&r(`local.constraint`,`Component <${e.name}> step must be greater than 0.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.number-step`,params:{component:e.name}})}if(e.name===`input`||e.name===`textarea`){let t=kd(e,n,`min-length`)??0,i=kd(e,n,`max-length`);i!==void 0&&i<t&&r(`local.constraint`,`max-length cannot be less than min-length.`,n[`max-length`]?.offset??e.node.range.start,void 0,{key:`local.constraint.length-order`})}if(e.name===`date`){let t=typeof n.min?.value==`string`?n.min.value:void 0,i=typeof n.max?.value==`string`?n.max.value:void 0;t!==void 0&&!dd(t)&&r(`local.attribute.type`,`Date lower bound ${t} is not a valid YYYY-MM-DD.`,n.min?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-lower`,params:{value:t}}),i!==void 0&&!dd(i)&&r(`local.attribute.type`,`Date upper bound ${i} is not a valid YYYY-MM-DD.`,n.max?.offset??e.node.range.start,void 0,{key:`local.attribute.type.date-upper`,params:{value:i}}),t&&i&&t>i&&r(`local.constraint`,`Date min cannot be later than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.date-order`})}if(e.name===`progress`){let t=kd(e,n,`max`)??100,i=n.value;i&&!i.dynamic&&typeof i.value==`number`&&(i.value<0||i.value>t)&&r(`local.constraint`,`progress value must be between 0 and ${t}, got ${i.value}.`,i.offset,void 0,{key:`local.constraint.progress-range`,params:{max:t,value:i.value}})}if(e.name===`plot`){let t=kd(e,n,`min`),i=kd(e,n,`max`);t!==void 0&&i!==void 0&&!(t<i)&&r(`local.constraint`,`plot min must be less than max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.plot-range`})}if(e.name===`timer`){let t=kd(e,n,`duration`)??60;(!Number.isInteger(t)||t<=0)&&r(`local.constraint`,`timer duration must be a positive whole number of seconds.`,n.duration?.offset??e.node.range.start,void 0,{key:`local.constraint.timer-duration`})}if(e.name===`range-slider`){let t=kd(e,n,`min`)??0,i=kd(e,n,`max`)??100,a=kd(e,n,`step`)??1;t<=i||r(`local.constraint`,`range-slider min cannot exceed max.`,n.min?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-min-max`}),a>0&&Number.isFinite(a)||r(`local.constraint`,`range-slider step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.range-slider-step`})}if(e.name===`coordinate`){for(let t of[`x`,`y`])(kd(e,n,`${t}-min`)??-5)<=(kd(e,n,`${t}-max`)??5)||r(`local.constraint`,`coordinate ${t}-min cannot exceed ${t}-max.`,n[`${t}-min`]?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-axis`,params:{axis:t}});let t=kd(e,n,`step`)??1;t>0&&Number.isFinite(t)||r(`local.constraint`,`coordinate step must be a finite positive number.`,n.step?.offset??e.node.range.start,void 0,{key:`local.constraint.coordinate-step`})}if(e.name===`multi-select`){let t=kd(e,n,`max-selected`);t!==void 0&&(!Number.isInteger(t)||t<0)&&r(`local.constraint`,`multi-select max-selected must be a nonnegative whole number.`,n[`max-selected`]?.offset??e.node.range.start,void 0,{key:`local.constraint.multi-select`})}if((e.name===`table`||e.name===`chart`)&&!Object.hasOwn(n,`key`))for(let t of[`bind`,`initial`])Object.hasOwn(n,t)&&r(`local.selection.key`,`<${e.name}> ${t} requires a key attribute naming the selection column.`,n[t].offset,void 0,{key:`local.selection.key.required`,params:{component:e.name,name:t}})}function jd(e){return(e.node.children??[]).filter(e=>e.type===`component`&&!!e.name).map(t=>({node:t,name:t.name,schema:Su(t.name),parent:e})).filter(e=>!!e.schema)}function Md(e,t){let n=t.attrs.get(e.node.id)??{},r=vd(e.node.children),i=t.report,a=e.schema.childRule;switch(e.schema.parent&&(e.parent&&e.schema.parent.includes(e.parent.name)||i(`local.structure.parent`,`<${e.name}> can only appear directly inside ${e.schema.parent.map(e=>`<${e}>`).join(` or `)}.`,e.node.range.start,e.node.range.end,{key:`local.structure.parent`,params:{name:e.name,parents:e.schema.parent.map(e=>`<${e}>`).join(` / `)}})),a){case`none`:r.length&&i(`local.structure.children`,`<${e.name}> does not accept body content.`,r[0].range.start,r[0].range.end,{key:`local.structure.no-body`,params:{name:e.name}});break;case`inline`:if(e.name===`text`||e.name===`jump`){let t=new Set([`text`,`emphasis`,`strong`,`delete`,`link`,`image`,`inlineCode`,`inlineMath`,`interpolation`,`break`,`comment`,`fallback`]),n=e=>t.has(e.type)&&(e.children??[]).every(n);(r.length===1&&r[0].type===`paragraph`?r[0].children??[]:r).every(n)||i(`local.structure.children`,`<${e.name}> only accepts inline Markdown.`,e.node.range.start,e.node.range.end,{key:`local.structure.inline-only`,params:{name:e.name}})}for(let t of r)xd(t)&&i(`local.structure.children`,`The body of <${e.name}> cannot contain other interactive components.`,t.range.start,t.range.end,{key:`local.structure.no-nested-components`,params:{name:e.name}});break;case`content`:e.name===`node`&&Nd(e,t);break;case`any`:break;case`options`:Pd(e,t,n);break;case`tabs`:Fd(e,t);break;case`disclosures`:{let t=jd(e),n=t.filter(e=>e.name===`disclosure`);if(n.length||i(`local.structure.children`,`<accordion> requires at least one <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.needs-disclosure`}),n.length!==t.length)for(let e of t)e.name!==`disclosure`&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<accordion> can only contain <disclosure>.`,e.node.range.start,e.node.range.end,{key:`local.structure.accordion.only-disclosure`});break}case`cards`:{let t=jd(e),n=t.filter(e=>e.name===`card`);if(n.length||i(`local.structure.children`,`<grid> requires at least one <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.needs-card`}),n.length!==t.length)for(let e of t)e.name!==`card`&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`Direct children of <grid> must be <card>.`,e.node.range.start,e.node.range.end,{key:`local.structure.grid.only-card`});break}case`diagram`:Rd(e,t);break;case`table`:{let n=r.filter(e=>e.type===`table`);(n.length!==1||r.length!==1)&&i(`local.structure.children`,`The body of <${e.name}> must be exactly one Markdown table.`,e.node.range.start,e.node.range.end,{key:`local.structure.table.single`,params:{name:e.name}}),n.length?t.tables.set(e.node.id,n[0]):e.name===`table`&&r.length===1&&t.tables.set(e.node.id,r[0]);break}case`plot`:r.filter(e=>e.type===`math`).length||i(`local.structure.children`,`<plot> requires at least one $$...$$ formula block.`,e.node.range.start,e.node.range.end,{key:`local.structure.plot.needs-formula`});for(let e of r)e.type!==`math`&&i(`local.structure.children`,`The body of <plot> can only contain blank lines and $$...$$ formula blocks.`,e.range.start,e.range.end,{key:`local.structure.plot.only-formulas`});break;case`steps`:Id(e,t);break;case`quiz`:Ld(e,t,n);break;case`columns`:{let t=jd(e),n=t.filter(e=>e.name===`column`);n.length||i(`local.structure.children`,`<data-table> requires at least one <column>.`,e.node.range.start,e.node.range.end),n.length>20&&i(`local.budget.data-table.columns`,`<data-table> supports at most 20 columns, but has ${n.length}.`,e.node.range.start,e.node.range.end);for(let e of t)e.name!==`column`&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);r.some(e=>e.type!==`component`)&&i(`local.structure.children`,`<data-table> can only contain <column>.`,e.node.range.start,e.node.range.end);break}}}function Nd(e,t){let n=e=>{for(let r of e)r.type===`component`?t.report(`local.structure.children`,`The description of <node> cannot contain interactive components.`,r.range.start,r.range.end,{key:`local.structure.node.no-components`}):r.children&&n(r.children)};n(e.node.children??[])}function Pd(e,t,n){let r=jd(e),i=r.filter(e=>e.name===`option`);i.length||t.report(`local.structure.children`,`<${e.name}> requires at least one <option value="...">.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.needed`,params:{name:e.name}});for(let n of r)n.name!==`option`&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,n.node.range.start,n.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<${e.name}> can only contain <option>.`,e.node.range.start,e.node.range.end,{key:`local.structure.options.only`,params:{name:e.name}}),i.length>1e4&&t.report(`local.budget.array`,`<${e.name}> options exceed the limit of ${T}.`,e.node.range.start,e.node.range.end,{key:`local.budget.array.options`,params:{name:e.name,limit:T}});let a=[];for(let n of i){let r=t.attrs.get(n.node.id)??{},i=typeof r.value?.value==`string`?r.value.value:``;i?e.name===`multi-select`&&i.includes(`,`)?t.report(`local.option.value`,`<multi-select> option values cannot contain commas: "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.comma`,params:{value:i}}):a.includes(i)?t.report(`local.option.value`,`Option values in <${e.name}> must be unique; duplicate value "${i}".`,n.node.range.start,n.node.range.end,{key:`local.option.value.duplicate`,params:{name:e.name,value:i}}):((n.node.children??[]).some(xd)&&t.report(`local.structure.children`,`The body of <option> cannot contain interactive components.`,n.node.range.start,n.node.range.end,{key:`local.structure.option.no-components`}),a.push(i)):t.report(`local.option.value`,`<option> requires a non-empty value.`,n.node.range.start,n.node.range.end,{key:`local.option.value.required`})}t.options.set(e.node.id,a)}function Fd(e,t){let n=jd(e),r=n.filter(e=>e.name===`tab`);r.length||t.report(`local.structure.children`,`<tabs> requires at least one <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.needs-tab`});for(let e of n)e.name!==`tab`&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<tabs> can only contain <tab>.`,e.node.range.start,e.node.range.end,{key:`local.structure.tabs.only-tab`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`tab-${n+1}`;i.includes(a)?t.report(`local.tab.value`,`Tab values in <tabs> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.tab.value.duplicate`,params:{value:a}}):i.push(a)}),t.tabs.set(e.node.id,i)}function Id(e,t){let n=jd(e),r=n.filter(e=>e.name===`step`);r.length||t.report(`local.structure.children`,`<steps> requires at least one <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.needs-step`});for(let e of n)e.name!==`step`&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<steps> can only contain <step>.`,e.node.range.start,e.node.range.end,{key:`local.structure.steps.only-step`});let i=[];r.forEach((e,n)=>{let r=t.attrs.get(e.node.id)??{},a=(typeof r.value?.value==`string`?r.value.value.trim():``)||`step-${n+1}`;i.includes(a)?t.report(`local.step.value`,`Step values in <steps> must be unique; duplicate value "${a}".`,e.node.range.start,e.node.range.end,{key:`local.step.value.duplicate`,params:{value:a}}):i.push(a)}),t.steps.set(e.node.id,i)}function Ld(e,t,n){let r=typeof n.type?.value==`string`?n.type.value:`choice`,i=typeof n.answer?.value==`string`?n.answer.value:``;if(i.trim()||t.report(`local.quiz.answer`,`<quiz> requires a non-empty answer.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.required`}),r===`number`){vd(e.node.children).length&&t.report(`local.structure.children`,`A numeric <quiz> cannot have body content; use type="choice" for option-based quizzes.`,e.node.range.start,e.node.range.end,{key:`local.structure.quiz.numeric-no-body`}),i.trim()&&ud(i)===null&&t.report(`local.quiz.answer`,`A numeric <quiz> answer must be a finite number.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.numeric`});let r=kd(e,n,`tolerance`);r!==void 0&&(!Number.isFinite(r)||r<0)&&t.report(`local.constraint`,`<quiz> tolerance must be a nonnegative finite number.`,n.tolerance?.offset??e.node.range.start,void 0,{key:`local.constraint.quiz-tolerance`});return}Pd(e,t,n);let a=t.options.get(e.node.id)??[];i.trim()&&a.length&&!a.includes(i)&&t.report(`local.quiz.answer`,`<quiz> answer "${i}" is not one of the option values: ${a.join(`, `)}.`,n.answer?.offset??e.node.range.start,void 0,{key:`local.quiz.answer.not-option`,params:{answer:i,options:a.join(`, `)}})}function Rd(e,t){let n=jd(e),r=n.filter(e=>e.name===`node`),i=n.filter(e=>e.name===`edge`);r.length||t.report(`local.diagram.node`,`<diagram> requires at least one <node>.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.required`});for(let e of n)e.name!==`node`&&e.name!==`edge`&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});vd(e.node.children).some(e=>e.type!==`component`)&&t.report(`local.structure.children`,`<diagram> can only contain <node> and <edge>.`,e.node.range.start,e.node.range.end,{key:`local.structure.diagram.only`});let a=[];for(let e of r){let n=t.attrs.get(e.node.id)??{},r=typeof n.id?.value==`string`?n.id.value:``;r&&(/^[A-Za-z_][A-Za-z0-9_-]*$/.test(r)||t.report(`local.diagram.node`,`Node ID "${r}" may only contain letters, digits, underscores and hyphens, and cannot start with a digit.`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.invalid`,params:{id:r}}),a.includes(r)?t.report(`local.diagram.node`,`Duplicate node ID "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.node.duplicate`,params:{id:r}}):a.push(r))}t.diagramNodes.set(e.node.id,a);let o=new Set;for(let e of i){let n=t.attrs.get(e.node.id)??{},r=typeof n.from?.value==`string`?n.from.value:``,i=typeof n.to?.value==`string`?n.to.value:``,s=typeof n.label?.value==`string`?n.label.value:``;r&&!a.includes(r)&&t.report(`local.diagram.edge`,`Edge from references unknown node "${r}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.from`,params:{id:r}}),i&&!a.includes(i)&&t.report(`local.diagram.edge`,`Edge to references unknown node "${i}".`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.to`,params:{id:i}});let c=`${r}\u0000${i}\u0000${s}`;o.has(c)&&t.report(`local.diagram.edge`,`Duplicate edge: ${r} → ${i}${s?` (${s})`:``}.`,e.node.range.start,e.node.range.end,{key:`local.diagram.edge.duplicate`,params:{from:r,to:i,label:s?` (${s})`:``}}),o.add(c)}}function zd(e,t){let n=t.checklists.get(e.node.id);if(n)return n;let r=vd(e.node.children),i=r.filter(e=>e.type===`list`);(r.length!==1||i.length!==1)&&t.report(`local.checklist.body`,`The body of <checklist> must be exactly one single-level Markdown task list.`,e.node.range.start,e.node.range.end,{key:`local.checklist.body.single`});let a=i[0],o=[],s=[];if(!a)return t.checklists.set(e.node.id,{ids:o,checked:s}),{ids:o,checked:s};let c=a.children??[];c.length||t.report(`local.checklist.body`,`<checklist> requires at least one task list item.`,a.range.start,a.range.end,{key:`local.checklist.body.item-required`}),c.length>1e4&&t.report(`local.budget.array`,`<checklist> items exceed the limit of ${T}.`,a.range.start,a.range.end,{key:`local.checklist.body.items-limit`,params:{limit:T}}),c.slice(0,T).forEach((e,n)=>{if(e.type!==`listItem`||e.checked===null||e.checked===void 0){t.report(`local.checklist.body`,`<checklist> can only contain task list items (- [ ] / - [x]).`,e.range.start,e.range.end,{key:`local.checklist.body.task-only`});return}(e.children??[]).some(e=>e.type===`list`)&&t.report(`local.checklist.body`,`<checklist> does not support nested lists.`,e.range.start,e.range.end,{key:`local.checklist.body.no-nested`}),xd(e)&&t.report(`local.checklist.body`,`<checklist> items cannot contain interactive components.`,e.range.start,e.range.end,{key:`local.checklist.body.no-components`});let r=`item-${n+1}`;o.push(r),e.checked&&s.push(r)});let l={ids:o,checked:s};return t.checklists.set(e.node.id,l),l}function Bd(e){let t=new Map;for(let n of e.entries){if(!n.schema.binding)continue;let r=e.attrs.get(n.node.id)??{};if((n.name===`table`||n.name===`chart`)&&!Object.hasOwn(r,`key`))continue;let i=typeof r.bind?.value==`string`?r.bind.value:``,a=i||`@${n.node.id}`;r.bind&&(i.length>od?(e.report(`local.budget.identifier`,`Parameter name exceeds the ${od}-character limit.`,r.bind.offset??n.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:od}}),a=`@${n.node.id}`):id.test(i)?(ct.has(i)||ld.has(i))&&(e.report(`local.binding.reserved`,`Parameter name "${i}" is reserved; choose another name.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:i}}),a=`@${n.node.id}`):(e.report(`local.binding.name`,`Parameter name "${i}" must match [A-Za-z_][A-Za-z0-9_]*.`,r.bind.offset??n.node.range.start,void 0,{key:`local.binding.name`,params:{name:i}}),a=`@${n.node.id}`));let o=t.get(a);o?o.members.push({entry:n,attrs:r}):t.set(a,{key:a,schema:n.schema,members:[{entry:n,attrs:r}]})}let n={};for(let r of t.values()){let t=Ud(r,e);t&&(n[r.key]=t)}return Qd(e,n),n}function Vd(e){let t={};for(let[n,r]of Object.entries(e))n.startsWith(`@`)||(t[n]=r.type);return t}function Hd(e,t,n){return n===`timer`?{min:0,max:kd(e,t,`duration`)??60,step:1}:{min:kd(e,t,`min`),max:kd(e,t,`max`),step:kd(e,t,`step`)??1}}function Ud(e,t){let n=e.members[0],r=n.entry.schema.binding;if(!r)return null;let i=r.family;for(let a of e.members.slice(1))a.entry.schema.binding?.family!==i&&t.report(`local.binding.type`,`Parameter "${e.key}" is already declared as ${J(r.kind)} by <${n.entry.name}> and cannot also bind <${a.entry.name}>.`,a.entry.node.range.start,a.entry.node.range.end,{key:`local.binding.type`,params:{key:e.key,kind:J(r.kind),first:n.entry.name,second:a.entry.name}});if(r.exclusive&&e.members.length>1)for(let r of e.members.slice(1))t.report(`local.binding.exclusive`,`Parameter "${e.key}" of <${n.entry.name}> can only be owned by one component and cannot be shared with <${r.entry.name}>.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.exclusive`,params:{key:e.key,first:n.entry.name,second:r.entry.name}});let a=qd(n.entry,t,i),o;if(r.kind===`number`){o=Hd(n.entry,n.attrs,i);for(let r of e.members.slice(1)){let a=Hd(r.entry,r.attrs,i);(a.min!==o.min||a.max!==o.max||a.step!==o.step)&&t.report(`local.binding.constraint`,`Parameter "${e.key}" must use the same numeric range and step: <${n.entry.name}> has ${Wd(o)}, <${r.entry.name}> has ${Wd(a)}.`,r.entry.node.range.start,r.entry.node.range.end,{key:`local.binding.constraint`,params:{key:e.key,first:n.entry.name,second:r.entry.name,firstConstraints:Wd(o),secondConstraints:Wd(a)}})}}if(i===`choice`||i===`selection`)for(let n of e.members.slice(1))qd(n.entry,t,i).join(`\0`)!==a.join(`\0`)&&t.report(`local.binding.option`,`Parameter "${e.key}" must use the same option set in the same order.`,n.entry.node.range.start,n.entry.node.range.end,{key:`local.binding.option`,params:{key:e.key}});let s=i===`multi-select`?kd(n.entry,n.attrs,`max-selected`):void 0,c=e.members.filter(e=>Object.hasOwn(e.attrs,`initial`)),l;if(c.length>1){let n=c.map(e=>Gd(t,e.attrs.initial.offset)),r=Math.min(c.length,sd);for(let i=0;i<r;i+=1){let r=[];for(let e=1;e<n.length&&r.length<cd;e+=1)r.push(n[(i+e)%n.length]);t.report(`local.initial.duplicate`,`Parameter "${e.key}" has multiple explicit initial values (${c.length} in total${r.length?`; see also line ${r.join(`, `)}`:``}).`,c[i].attrs.initial.offset,void 0,r.length?{key:`local.initial.duplicate-peers`,params:{key:e.key,count:c.length,lines:r.join(`, `)}}:{key:`local.initial.duplicate`,params:{key:e.key,count:c.length}})}}l=i===`multi-select`?c.length?Jd(c[0],a,s,t):[]:c.length>0?Yd(c[0],t,i,a):Xd(n,t,i,a,o),i===`checklist`&&!Array.isArray(l)&&(l=[]),r.kind!==`array`&&Zd(e,n,l,i,a,o,t),(i===`text`||i===`date`)&&Kd(e,l,t);let u={name:e.key,nodeIds:e.members.map(e=>e.entry.node.id),type:r.kind,initial:fd(l),owner:n.entry.node.id};return o&&(o.min!==void 0&&(u.min=o.min),o.max!==void 0&&(u.max=o.max),u.step=o.step),a.length&&(u.options=[...a]),i===`multi-select`&&(u.maxItems=s??a.length),u}function Wd(e){return`[${e.min===void 0?`-∞`:String(e.min)}, ${e.max===void 0?`∞`:String(e.max)}] / ${e.step}`}function Gd(e,t){let n=Math.max(0,Math.min(e.source.length,t)),r=0,i=e.lineStarts.length-1;for(;r<i;){let t=Math.ceil((r+i)/2);e.lineStarts[t]<=n?r=t:i=t-1}return r+1}function Kd(e,t,n){if(typeof t!=`string`||t===``)return;let r=e.members[0],i=r.attrs.initial?.offset??r.entry.node.range.start,a=nt(t);for(let r of e.members){let{entry:o,attrs:s}=r;if(o.name===`input`||o.name===`textarea`){let r=kd(o,s,`min-length`)??0,c=kd(o,s,`max-length`);a<r&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, below the minimum length ${r} required by <${o.name}>.`,i,void 0,{key:`local.initial.length.min`,params:{key:e.key,length:a,min:r,name:o.name}}),c!==void 0&&a>c&&n.report(`local.initial.length`,`Initial value of parameter "${e.key}" has length ${a}, exceeding the maximum length ${c} allowed by <${o.name}>.`,i,void 0,{key:`local.initial.length.max`,params:{key:e.key,length:a,max:c,name:o.name}}),o.name===`input`&&(typeof s.type?.value==`string`?s.type.value:`text`)===`email`&&!N(t)&&n.report(`local.initial.email`,`Initial value of parameter "${e.key}" is not a valid email address.`,i,void 0,{key:`local.initial.email`,params:{key:e.key}})}else if(o.name===`date`&&dd(t)){let r=typeof s.min?.value==`string`&&dd(s.min.value)?s.min.value:void 0,a=typeof s.max?.value==`string`&&dd(s.max.value)?s.max.value:void 0;r&&t<r&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is earlier than the minimum date ${r} of <date>.`,i,void 0,{key:`local.initial.date.min`,params:{key:e.key,value:t,min:r}}),a&&t>a&&n.report(`local.initial.range`,`Initial value ${t} of parameter "${e.key}" is later than the maximum date ${a} of <date>.`,i,void 0,{key:`local.initial.date.max`,params:{key:e.key,value:t,max:a}})}}}function qd(e,t,n){switch(n){case`choice`:case`multi-select`:return t.options.get(e.node.id)??[];case`tabs`:return t.tabs.get(e.node.id)??[];case`steps`:return t.steps.get(e.node.id)??[];case`selection`:return t.selections.get(e.node.id)??[``];case`diagram`:return t.diagramNodes.get(e.node.id)??[];case`checklist`:return zd(e,t).ids;default:return[]}}function Jd(e,t,n,r){let i=e.attrs.initial;if(!i)return[];let a=typeof i.value==`string`?i.value:String(i.value??``),o=[];for(let n of a.split(`,`).map(e=>e.trim()).filter(Boolean))t.includes(n)?o.includes(n)||o.push(n):r.report(`local.initial.option`,`Initial value "${n}" of parameter "${e.entry.node.id}" is not an option of <multi-select>.`,i.offset,void 0,{key:`local.initial.option.multi-select`,params:{key:e.entry.node.id,value:n}});return n!==void 0&&o.length>n&&r.report(`local.initial.range`,`Initial values of <multi-select> exceed max-selected ${n}.`,i.offset,void 0,{key:`local.initial.multi-select`,params:{max:n}}),t.filter(e=>o.includes(e))}function Yd(e,t,n,r){let i=e.attrs.initial;if(!i)return Xd(e,t,n,r,void 0);let a=e.entry;if(n===`number`&&typeof i.value==`number`||n===`boolean`&&typeof i.value==`boolean`)return i.value;if(n===`number`||n===`boolean`)return t.report(`local.initial.type`,`Initial value of parameter "${a.node.id}" has the wrong type.`,i.offset,void 0,{key:`local.initial.type`,params:{name:a.node.id}}),n===`number`&&0;let o=typeof i.value==`string`?i.value:String(i.value??``);return n===`date`&&!dd(o)&&t.report(`local.initial.date`,`Initial date "${o}" is not a valid YYYY-MM-DD.`,i.offset,void 0,{key:`local.initial.date`,params:{value:o}}),n===`choice`&&r.length&&!r.includes(o)&&t.report(`local.initial.option`,`Initial value "${o}" is not an available option: ${r.join(`, `)}.`,i.offset,void 0,{key:`local.initial.value.option`,params:{value:o,options:r.join(`, `)}}),o}function Xd(e,t,n,r,i){let a=e.entry;switch(n){case`text`:case`date`:return``;case`boolean`:return!1;case`choice`:return r[0]??``;case`tabs`:case`steps`:case`diagram`:return r[0]??``;case`selection`:return``;case`multi-select`:return[];case`timer`:return(i??Hd(a,e.attrs,n)).max??60;case`checklist`:return[...zd(a,t).checked];case`number`:{let r=i??Hd(a,e.attrs,n);if(a.schema.initialRule===`min`)return r.min??0;let o=md(r.min,r.max,r.step);return o===null?(t.report(`local.initial.range`,`Parameter "${a.node.id}" has no valid step value within range [${r.min??`-∞`}, ${r.max??`∞`}].`,a.node.range.start,a.node.range.end,{key:`local.initial.no-step`,params:{key:a.node.id,min:r.min??`-∞`,max:r.max??`∞`}}),0):o}}return t.report(`local.initial`,`Cannot derive a default initial value for <${a.name}> parameter "${a.node.id}".`,a.node.range.start,a.node.range.end,{key:`local.initial.cannot-derive`,params:{name:a.name,key:a.node.id}}),``}function Zd(e,t,n,r,i,a,o){let s=e.key;if(r===`number`){if(typeof n!=`number`||!Number.isFinite(n)){o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a finite number.`,t.entry.node.range.start,void 0,{key:`local.initial.type.number`,params:{key:s}});return}let e=a??Hd(t.entry,t.attrs,r);e.min!==void 0&&n<e.min&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" is below the minimum ${e.min}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.min`,params:{value:n,key:s,min:e.min}}),e.max!==void 0&&n>e.max&&o.report(`local.initial.range`,`Initial value ${n} of parameter "${s}" exceeds the maximum ${e.max}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.max`,params:{value:n,key:s,max:e.max}});let i=e.min??0;n>=(e.min??-1/0)&&n<=(e.max??1/0)&&!pd(n,i,e.step)&&o.report(`local.initial.step`,`Initial value ${n} of parameter "${s}" is not on step ${e.step} (based at ${e.min??0}).`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.range.step`,params:{value:n,key:s,step:e.step,base:e.min??0}})}else r===`boolean`&&typeof n!=`boolean`&&o.report(`local.initial.type`,`Initial value of parameter "${s}" must be a boolean.`,t.entry.node.range.start,void 0,{key:`local.initial.type.boolean`,params:{key:s}}),(r===`choice`||r===`tabs`||r===`steps`||r===`diagram`||r===`selection`)&&i.length&&!i.includes(String(n))&&o.report(`local.initial.option`,`Initial value "${String(n)}" of parameter "${s}" is not among the available values ${i.join(`, `)}.`,t.attrs.initial?.offset??t.entry.node.range.start,void 0,{key:`local.initial.value.options`,params:{value:String(n),key:s,options:i.join(`, `)}})}function Qd(e,t){let n=new Set(Object.keys(t));for(let r of e.entries){let i=r.schema.slots;if(!i?.length)continue;let a=e.attrs.get(r.node.id)??{},o=Object.create(null),s=new Map;for(let c of i){let i=a[c.bind],l;if(i){let t=typeof i.value==`string`?i.value:``;t.length>od?e.report(`local.budget.identifier`,`Parameter name exceeds the ${od}-character limit.`,i.offset??r.node.range.start,void 0,{key:`local.budget.identifier`,params:{limit:od}}):id.test(t)?ct.has(t)||ld.has(t)?e.report(`local.binding.reserved`,`Parameter name "${t}" is reserved; choose another name.`,i.offset??r.node.range.start,void 0,{key:`local.binding.reserved`,params:{name:t}}):l=t:e.report(`local.binding.name`,`Parameter name "${t}" must match [A-Za-z_][A-Za-z0-9_]*.`,i.offset??r.node.range.start,void 0,{key:`local.binding.name`,params:{name:t}})}let u=l??`@${r.node.id}:${c.name}`;l&&n.has(l)&&(e.report(`local.binding.exclusive`,`Parameter "${l}" of the ${c.name} slot of <${r.name}> is exclusive and cannot be shared with another control.`,i?.offset??r.node.range.start,void 0,{key:`local.binding.exclusive.slot`,params:{key:l,slot:c.name,name:r.name}}),u=`@${r.node.id}:${c.name}`),n.add(u);let d=$d(r,a,c.name),f=ef(r,a,c,d,e),p={name:u,nodeIds:[r.node.id],type:c.kind,initial:f,owner:r.node.id};d.min!==void 0&&(p.min=d.min),d.max!==void 0&&(p.max=d.max),p.step=d.step,t[u]=p,o[c.name]=u,s.set(c.name,u)}let c=s.get(`start`),l=s.get(`end`);if(c&&l){let n=t[c].initial,i=t[l].initial;typeof n==`number`&&typeof i==`number`&&n>i&&e.report(`local.initial.range`,`<range-slider> start ${n} cannot be greater than end ${i}.`,r.node.range.start,r.node.range.end,{key:`local.initial.range-slider`,params:{start:n,end:i}})}e.bindingSlots[r.node.id]=o}}function $d(e,t,n){return e.name===`coordinate`?{min:kd(e,t,`${n}-min`)??-5,max:kd(e,t,`${n}-max`)??5,step:kd(e,t,`step`)??1}:{min:kd(e,t,`min`)??0,max:kd(e,t,`max`)??100,step:kd(e,t,`step`)??1}}function ef(e,t,n,r,i){let a=r.min??0,o=t[n.initial];if(o&&typeof o.value==`number`){let t=o.value;return r.min!==void 0&&t<r.min&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} is below the minimum ${r.min}.`,o.offset,void 0,{key:`local.initial.slot.min`,params:{value:t,name:e.name,slot:n.initial,min:r.min}}),r.max!==void 0&&t>r.max&&i.report(`local.initial.range`,`Initial value ${t} of <${e.name}> ${n.initial} exceeds the maximum ${r.max}.`,o.offset,void 0,{key:`local.initial.slot.max`,params:{value:t,name:e.name,slot:n.initial,max:r.max}}),pd(t,a,r.step)||i.report(`local.initial.step`,`Initial value ${t} of <${e.name}> ${n.initial} is not on step ${r.step} (based at ${a}).`,o.offset,void 0,{key:`local.initial.slot.step`,params:{value:t,name:e.name,slot:n.initial,step:r.step,base:a}}),t}if(n.initialRule===`max-step`){let e=(r.max??a)-a,t=a+Math.max(0,Math.floor(e/r.step+ad))*r.step;return Math.min(r.max??t,Math.max(r.min??t,t))}return n.initialRule===`min`?r.min??0:md(r.min,r.max,r.step)??0}function tf(e){return Object.keys(e.bindingSlots).length?e.bindingSlots:void 0}function nf(e,t){let n=e.source.lastIndexOf(`
52
+ `,t.range.start-1)+1,r=e.source.indexOf(`
53
+ `,t.range.end),i=r<0?e.source.length:r;return e.source.slice(n,t.range.start).trim()===``&&e.source.slice(t.range.end,i).trim()===``}function rf(e,t,n){let r=Td(e.source,t.node.range.start,t.node.range.end),i=/(?:^|[\s"'/])value\s*=\s*(["'])/.exec(r);if(!i)return t.node.range.start;let a=t.node.range.start+i.index+i[0].length;return Math.min(t.node.range.end,a+n)}function af(e){let t=[],n=new Map,r=new Set(e.nodes);for(let i of e.entries){if(i.name!==`computed`&&i.name!==`const`)continue;let a=i.name,o=i.node;if(!r.has(o)||!nf(e,o)){e.report(`local.computation.placement`,`<${a}> declarations must be standalone tags at the document top level.`,o.range.start,o.range.end);continue}let s=e.attrs.get(o.id)??{},c=s.name,l=typeof c?.value==`string`?c.value:``;if(!c||!l)continue;if(l.length>od){e.report(`local.budget.identifier`,`Computation name exceeds the ${od}-character limit.`,c.offset);continue}if(!id.test(l)){e.report(`local.computation.name`,`Computation name "${l}" must match [A-Za-z_][A-Za-z0-9_]*.`,c.offset);continue}if(ct.has(l)||ld.has(l)){e.report(`local.computation.reserved`,`Computation name "${l}" is reserved; choose another name.`,c.offset);continue}if(Object.hasOwn(e.bindingKinds,l)){e.report(`local.computation.duplicate`,`Computation name "${l}" conflicts with a control parameter of the same name.`,c.offset);continue}if(n.has(l)){e.report(`local.computation.duplicate`,`Computation name "${l}" is declared more than once.`,c.offset);continue}n.set(l,a);let u=s.value;if(!u)continue;let d=gd(u.raw);d?d.expression?t.push({name:l,kind:a,source:d.expression,expressionOffset:rf(e,i,d.start),nodeId:o.id,range:{...o.range}}):e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,u.offset):e.report(`local.computation.value`,`The value of <${a}> must be exactly one {{ expression }} interpolation.`,u.offset,u.offset+u.raw.length)}let i=Qn(t,e.bindingKinds,e.report);e.computations=i.computations,e.computationKinds=i.kinds}function of(e){return Object.keys(e.computationKinds).length?{...e.bindingKinds,...e.computationKinds}:e.bindingKinds}function sf(e){let t=[];for(let n of e)(n.type!==`component`||n.name!==`computed`&&n.name!==`const`)&&(n.children&&=sf(n.children),t.push(n));return t}function cf(e){let t=of(e),n=Object.keys(t),r=(t,n)=>{t instanceof R?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0),void 0,{key:`local.expression.error`,params:{detail:t.message,code:t.code||`invalid`,near:e.source.slice(Math.max(n,n+t.offset-16),n+t.offset+24)}}):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n,void 0,{key:`local.expression.error`,params:{detail:t instanceof Error?t.message:String(t),code:`invalid`}})},i=(i,a,o)=>{if(!i.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,a,void 0,{key:`local.expression.empty`}),null;let s=null;try{s=Yt(i)}catch(e){return r(e,a),null}if(!s)return null;let c=!1;for(let r of s.dependencies)if(!Object.hasOwn(t,r)){let t=_f(r,n);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${r}.${t?` Did you mean ${t}?`:``}`,a+Math.max(0,i.indexOf(r)),void 0,t?{key:`local.binding.unknown.suggestion`,params:{name:r,suggestion:t}}:{key:`local.binding.unknown`,params:{name:r}}),c=!0}if(c)return null;let l;try{l=s.inferType(t)}catch(e){return r(e,a),null}return o===`number`&&l!==`number`?e.report(`local.type`,`Expected a number here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.number`,params:{kind:J(l)}}):o===`boolean`&&l!==`boolean`?e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.boolean`,params:{kind:J(l)}}):o===`string`&&l!==`string`?e.report(`local.type`,`Expected a string here, but the expression evaluates to ${J(l)}.`,a,void 0,{key:`local.type.string`,params:{kind:J(l)}}):o===`text`&&(l===`array`||l===`number-array`)&&e.report(`local.type`,`Arrays cannot be displayed directly; convert them first with a function such as len.`,a,void 0,{key:`local.type.array`}),l},a=t=>{for(let n of t){if(n.type===`interpolation`){let t=e.source.slice(n.range.start+2,Math.max(n.range.start+2,n.range.end-2)),r=n.value??``,a=Math.max(0,t.indexOf(r)),o=n.range.start+2+a;e.expressionKinds.set(n.id,i(r,o,`text`))}n.children&&a(n.children)}};a(e.nodes);for(let t of e.entries){if(t.name===`computed`||t.name===`const`)continue;let n=e.attrs.get(t.node.id)??{};for(let[r,a]of Object.entries(n)){let n=t.schema.props[r];if(n&&!n.static&&(t.name!==`data-table`||r!==`rows`&&r!==`key`)&&(t.name!==`column`||r!==`value`)&&(t.name!==`validation`||r!==`when`)){if(n.kind===`string`){let t=hd(a.raw);for(let n of t.unterminated)e.report(`local.interpolation`,`Interpolation is missing }}.`,a.offset+n,void 0,{key:`local.interpolation.unclosed`});for(let e of t.segments)i(e.expression,a.offset+e.start,`text`)}else a.dynamic&&(n.kind===`number`?i(a.expression??``,a.expressionOffset??a.offset,`number`):n.kind===`boolean`?i(a.expression??``,a.expressionOffset??a.offset,`boolean`):n.kind===`enum`&&i(a.expression??``,a.expressionOffset??a.offset,`string`))}}if(t.name===`if`){let t=n.when;t&&!t.dynamic&&e.report(`local.attribute.interpolation`,`The when attribute of if must be a full boolean interpolation, e.g. when="{{ seats >= 5 }}".`,t.offset,void 0,{key:`local.attribute.interpolation`})}}}function lf(e,t,n){let r={syntax:`local`,source:e.source,nodes:e.nodes,initialState:n,bindings:t,...Object.keys(e.computations).length?{computations:e.computations}:{}},i=`__local_core_check__`,a=rr(r,i,!1),o=new Set,s=e=>{for(let t of e){if(t.type===`heading`){let e=a.ids.get(t);e&&e.startsWith(`${i}-`)&&o.add(e.slice(21))}t.children&&s(t.children)}};s(e.nodes);let c=new Set;for(let t of e.entries){if(t.name!==`anchor`)continue;let n=(e.attrs.get(t.node.id)??{}).id;if(!n)continue;let r=typeof n.value==`string`?n.value:``;!r||!uf.test(r)?e.report(`local.anchor.id`,`Anchor id "${r}" must match [A-Za-z_][A-Za-z0-9_-]*.`,n.offset,void 0,{key:`local.anchor.id`,params:{id:r}}):(c.has(r)?e.report(`local.anchor.duplicate`,`Duplicate anchor id "${r}".`,n.offset,void 0,{key:`local.anchor.duplicate`,params:{id:r}}):c.add(r),o.has(r)&&e.report(`local.anchor.duplicate`,`Anchor id "${r}" collides with an automatic heading target.`,n.offset,void 0,{key:`local.anchor.heading-collision`,params:{id:r}}))}for(let t of e.entries){if(t.name!==`jump`)continue;let n=(e.attrs.get(t.node.id)??{}).to;if(!n)continue;let r=typeof n.value==`string`?n.value:``;r?r.startsWith(`#`)||/\s/.test(r)?e.report(`local.jump.target`,`<jump> target "${r}" must be a bare heading slug or anchor id without "#" or whitespace.`,n.offset,void 0,{key:`local.jump.bad-target`,params:{target:r}}):!c.has(r)&&!o.has(r)&&e.report(`local.jump.target`,`<jump> target "${r}" does not resolve to a heading or explicit anchor in this document.`,n.offset,void 0,{key:`local.jump.unresolved`,params:{target:r}}):e.report(`local.jump.target`,`<jump> target cannot be empty.`,n.offset,void 0,{key:`local.jump.empty`})}}var uf=/^[A-Za-z_][A-Za-z0-9_-]*$/;function df(e,t,n){t instanceof R?e.report(`local.expression.${t.code||`invalid`}`,`Expression error: ${t.message}`,n+(Number.isFinite(t.offset)?t.offset:0)):e.report(`local.expression.invalid`,`Expression error: ${t instanceof Error?t.message:String(t)}`,n)}function ff(e,t,n,r,i){if(!t.trim())return e.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,n),null;let a;try{a=Yt(t)}catch(t){return df(e,t,n),null}let o=Object.keys(r),s=!1;for(let i of a.dependencies)if(!Object.hasOwn(r,i)){let r=_f(i,o);e.report(`local.binding.unknown`,`Reference to undeclared parameter ${i}.${r?` Did you mean ${r}?`:``}`,n+Math.max(0,t.indexOf(i))),s=!0}if(s||!i)return{compiled:a,kind:null};let c;try{c=a.inferType(r)}catch(t){return df(e,t,n),null}return{compiled:a,kind:c}}function pf(e,t,n,r,i){if(!e)return null;let a=gd(e.raw);return a?a.expression?{expression:a.expression,base:e.offset+a.start}:(i.report(`local.expression.empty`,`Interpolation expression cannot be empty.`,e.offset+a.start),null):(i.report(t,`<${n}> ${r} must be exactly one {{ expression }} interpolation.`,e.offset,e.offset+e.raw.length),null)}function mf(e){let t=e[`max-rows`];return t&&!t.dynamic&&typeof t.value==`number`&&Number.isInteger(t.value)&&t.value>0&&t.value<=1e3?t.value:100}function hf(e){let t=e.entries.filter(e=>e.name===`data-table`);if(!t.length)return;let n=of(e),r=0,i=0,a=!1,o=!1;for(let s of t){let t=e.attrs.get(s.node.id)??{},c=vd(s.node.children).filter(e=>e.type===`component`&&e.name===`column`),l=mf(t),u=Math.min(c.length,20);r+=l,i+=l*u,!a&&r>2e3&&(a=!0,e.report(`local.budget.data-table.rows`,`The document's generated row budget exceeds ${j}; max-rows summed over every <data-table> must stay within it.`,s.node.range.start,s.node.range.end)),!o&&i>1e4&&(o=!0,e.report(`local.budget.data-table.cells`,`The document's generated cell budget exceeds ${M}; max-rows multiplied by columns, summed over every <data-table>, must stay within it.`,s.node.range.start,s.node.range.end));let d=pf(t.rows,`local.data-table.rows`,`data-table`,`rows`,e),f=`string`,p=!1;if(d){let t=ff(e,d.expression,d.base,n,!0);t?.kind===`array`?(f=`string`,p=!0):t?.kind===`number-array`?(f=`number`,p=!0):t&&t.kind!==null&&e.report(`local.data-table.rows`,`<data-table> rows must evaluate to an array, but the expression evaluates to ${J(t.kind)}.`,d.base)}let m={...n,item:f,index:`number`},h=pf(t.key,`local.data-table.key`,`data-table`,`key`,e);if(h){let t=ff(e,h.expression,h.base,m,p);if(t){let r=t.compiled.dependencies;r.includes(`item`)||e.report(`local.data-table.key`,`<data-table> key must depend on item.`,h.base);for(let t of r)t!==`item`&&(t===`index`?e.report(`local.data-table.key`,`<data-table> key cannot depend on index; use a stable item identifier.`,h.base):Object.hasOwn(n,t)&&e.report(`local.data-table.key`,`<data-table> key cannot depend on global parameter "${t}"; it must be derived from item only.`,h.base));t.kind!==null&&t.kind!==`string`&&t.kind!==`number`&&e.report(`local.data-table.key`,`<data-table> key must evaluate to a string or number, got ${J(t.kind)}.`,h.base)}}for(let t of c){let n=e.attrs.get(t.id)??{},r=n.label;r&&!String(r.value??``).trim()&&e.report(`local.data-table.column`,`<column> label cannot be empty.`,r.offset);let i=pf(n.value,`local.data-table.value`,`column`,`value`,e);if(!i)continue;let a=ff(e,i.expression,i.base,m,p);a&&(a.kind===`array`||a.kind===`number-array`)&&e.report(`local.data-table.value`,`<column> value must be a scalar string, number, boolean or null, got ${J(a.kind)}.`,i.base)}}}function gf(e){let t=[],n=0,r=!1,i=Object.keys(e.bindingKinds),a=of(e);for(let o of e.entries){if(o.name!==`validation`)continue;n+=1;let s=o.node;if(n>100){r||(r=!0,e.report(`local.validation.budget`,`The document declares more than 100 validation rules; rules in hidden regions count too.`,s.range.start,s.range.end));continue}o.parent&&(o.parent.schema.form!==`container`||o.parent.name===`data-table`)&&e.report(`local.validation.placement`,`<validation> can appear in normal prose or a container, but not inside inline content or a data table.`,s.range.start,s.range.end);let c=e.attrs.get(s.id)??{},l=``,u=[],d=c.when;if(d){let t=gd(d.raw);if(!t)e.report(`local.validation.when`,`<validation> when must be exactly one {{ boolean }} interpolation.`,d.offset,d.offset+d.raw.length);else if(t.expression){l=t.expression;let n=ff(e,l,d.offset+t.start,a,!0);n&&(u=[...n.compiled.dependencies],n.kind!==null&&n.kind!==`boolean`&&e.report(`local.type`,`Expected a boolean here, but the expression evaluates to ${J(n.kind)}.`,d.offset+t.start))}}let f=c.fields,p=f?td(f.raw):[];f&&!p.length&&e.report(`local.validation.fields`,`<validation> requires at least one field name.`,f.offset,f.offset+f.raw.length);let m=new Set;for(let t of p)if(m.has(t))e.report(`local.validation.fields`,`Duplicate field "${t}" in <validation> fields.`,f?.offset??s.range.start);else if(m.add(t),!Object.hasOwn(e.bindingKinds,t)){let n=_f(t,i);e.report(`local.validation.fields`,`Field "${t}" is not a public writable parameter.${n?` Did you mean ${n}?`:``}`,f?.offset??s.range.start)}l&&t.push({nodeId:s.id,expression:l,dependencies:u,message:typeof c.message?.value==`string`?c.message.value:``,fields:[...m],range:{...s.range}})}return t}function _f(e,t){if(e.length>od)return;let n,r=1/0;for(let i of t){let t=vf(e,i);t<r&&(n=i,r=t)}return r<=2?n:void 0}function vf(e,t){let n=Array.from({length:t.length+1},(e,t)=>t);for(let r=1;r<=e.length;r++){let i=n[0];n[0]=r;for(let a=1;a<=t.length;a++){let o=n[a];n[a]=Math.min(n[a]+1,n[a-1]+1,i+(e[r-1]===t[a-1]?0:1)),i=o}}return n[t.length]}function yf(e,t){let n=e.schema.props.samples?.default,r=typeof n==`number`?n:200;return kd(e,t,`samples`)??r}function bf(e){let t=of(e),n=0,r=!1;for(let i of e.entries){if(i.name!==`plot`)continue;let a=e.attrs.get(i.node.id)??{},o=vd(i.node.children).filter(e=>e.type===`math`),s=yf(i,a);o.length>16&&e.report(`local.budget.plot.curves`,`<plot> supports at most 16 curves, but has ${o.length}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.curves`,params:{limit:16,count:o.length}});let c=o.length*s,l=n+c;if(!r&&l>2e4&&(e.report(`local.budget.plot.points`,`The document's total plot sample count exceeds the limit of ${O}.`,i.node.range.start,i.node.range.end,{key:`local.budget.plot.points`,params:{limit:O}}),r=!0),n=Math.min(O+1,l),!(o.length>16||r))for(let n of o){let r=(n.value??``).trim();if(!/^y\s*=/u.test(r)){e.report(`local.math.formula`,`<plot> formulas must be written explicitly as y = expression.`,n.range.start,n.range.end,{key:`local.math.formula.shape`});continue}let i=null;try{i=Mn(r)}catch(t){e.report(`local.math`,`Cannot compute plot formula: ${t instanceof Error?t.message:String(t)}`,n.range.start,n.range.end,{key:`local.math.compute`,params:{detail:t instanceof Error?t.message:String(t),code:t&&typeof t==`object`&&`code`in t&&typeof t.code==`string`?t.code:`latex-syntax`,near:r.slice(0,120)}})}if(i)for(let r of i.dependencies)r!==`x`&&r!==`y`&&(Object.hasOwn(t,r)?t[r]!==`number`&&e.report(`local.math.binding`,`Plot parameter "${r}" must be a number, but is ${J(t[r])}.`,n.range.start,n.range.end,{key:`local.math.binding.type`,params:{name:r,kind:J(t[r])}}):e.report(`local.math.binding`,`Plot formula references undeclared parameter "${r}".`,n.range.start,n.range.end,{key:`local.math.binding.unknown`,params:{name:r}}))}}}function xf(e,t,n){let r=(e.children??[]).filter(e=>e.type===`tableRow`);if(!r.length)return t.report(`local.table.header`,`The table for <${n.name}> is missing a header.`,e.range.start,e.range.end,{key:`local.table.header.missing`,params:{name:n.name}}),null;let i=r[0].children??[],a=[];for(let e of i){if(bd(e))return t.report(`local.table.header`,`Table headers cannot contain interpolations.`,e.range.start,e.range.end,{key:`local.table.header.interpolation`}),null;let n=yd(e).trim();if(!n)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;if(a.includes(n))return t.report(`local.table.header`,`Duplicate table header "${n}".`,e.range.start,e.range.end,{key:`local.table.header.duplicate`,params:{name:n}}),null;a.push(n)}if(!a.length)return t.report(`local.table.header`,`Table headers cannot be empty.`,e.range.start,e.range.end,{key:`local.table.header.empty`}),null;let o=[];for(let e of r.slice(1)){let n=e.children??[];n.length===a.length?o.push(n):t.report(`local.table.row`,`Table row has a different column count: header has ${a.length} columns, this row has ${n.length}.`,e.range.start,e.range.end,{key:`local.table.row.mismatch`,params:{header:a.length,row:n.length}})}return{header:a,rows:o}}function Sf(e,t){let n=vd(e.children);if(n.length===1&&n[0].type===`interpolation`){let e=t.expressionKinds.get(n[0].id);if(e===`number`||e===null)return!0;if(e!==void 0)return!1}let r=yd(e).trim();return r?ud(r)!==null:!1}function Cf(e,t,n,r,i){let a=e.header[t];e.rows.forEach((e,i)=>{let o=e[t];if(!o)return;let s=vd(o.children);if(s.length===1&&s[0].type===`interpolation`){let e=n.expressionKinds.get(s[0].id);e!=null&&e!==`number`&&n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a number in row ${i+1}, but the expression evaluates to ${J(e)}.`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.expression`:`local.chart.numeric.expression`,params:{name:a,row:i+1,kind:J(e)}})}else Sf(o,n)||n.report(`local.chart.numeric`,`${r.name===`timeline`?`Timeline`:`Chart`} column "${a}" requires a plain number in row ${i+1}, got "${yd(o).trim()||`empty`}".`,o.range.start,o.range.end,{key:r.name===`timeline`?`local.timeline.numeric.plain`:`local.chart.numeric.plain`,params:{name:a,row:i+1,value:yd(o).trim()||`empty`}})})}function wf(e,t){return e.indexOf(t)}function Tf(e){for(let t of e.entries){if(t.name===`table`){Ef(t,e);continue}if(t.name!==`chart`&&t.name!==`timeline`)continue;let n=Ef(t,e);n&&(t.name===`chart`?kf(t,n,e):Af(t,n,e))}}function Ef(e,t){if(t.tableShapes.has(e.node.id))return t.tableShapes.get(e.node.id)??null;let n=t.tables.get(e.node.id),r=n?xf(n,t,e):null;return t.tableShapes.set(e.node.id,r),r}function Df(e,t){if(t.size===0)return;let n=Object.create(null),r=0;for(let[e,i]of t)i&&(n[e]=Object.freeze({header:Object.freeze([...i.header]),rowIds:Object.freeze(i.rows.map(e=>Object.freeze(e.map(e=>e.id))))}),r+=1);r!==0&&(e.tableShapes=Object.freeze(n))}function Of(e){for(let t of e.entries){if(t.name!==`table`&&t.name!==`chart`)continue;let n=e.attrs.get(t.node.id)??{},r=n.key;if(!r)continue;let i=typeof r.value==`string`?r.value.trim():``;if(!i){e.report(`local.selection.key`,`<${t.name}> key cannot be empty.`,r.offset,void 0,{key:`local.selection.key.empty`,params:{component:t.name}}),e.selections.set(t.node.id,[``]);continue}let a=Ef(t,e);if(!a){e.selections.set(t.node.id,[``]);continue}let o=wf(a.header,i);if(o<0){e.report(`local.selection.key`,`<${t.name}> key column "${i}" does not exist in its table.`,r.offset,void 0,{key:`local.selection.key.missing-column`,params:{component:t.name,name:i}}),e.selections.set(t.node.id,[``]);continue}let s=[],c=new Set;a.rows.forEach((n,r)=>{let a=n[o];if(!a)return;if(bd(a)){e.report(`local.selection.key`,`<${t.name}> key column "${i}" must contain static text; row ${r+1} contains an interpolation.`,a.range.start,a.range.end,{key:`local.selection.key.interpolation`,params:{component:t.name,name:i,row:r+1}});return}let l=yd(a).trim();l?c.has(l)?e.report(`local.selection.key`,`<${t.name}> key column "${i}" must be unique; duplicate value "${l}".`,a.range.start,a.range.end,{key:`local.selection.key.duplicate`,params:{component:t.name,name:i,value:l}}):(c.add(l),s.push(l)):e.report(`local.selection.key`,`<${t.name}> key column "${i}" cannot be empty in row ${r+1}.`,a.range.start,a.range.end,{key:`local.selection.key.empty-cell`,params:{component:t.name,name:i,row:r+1}})}),e.selections.set(t.node.id,[``,...s]);let l=n.initial;l&&typeof l.value==`string`&&l.value!==``&&!s.includes(l.value)&&e.report(`local.initial.option`,`Initial selection "${l.value}" of <${t.name}> is not a value of key column "${i}".`,l.offset,void 0,{key:`local.selection.key.initial`,params:{value:l.value,component:t.name,name:i}})}}function kf(e,t,n){let r=n.attrs.get(e.node.id)??{},i=typeof r.kind?.value==`string`?r.kind.value:`bar`,a=t.header;for(let t of a)t.includes(`,`)&&n.report(`local.chart.column`,`Chart column names cannot contain commas: "${t}".`,e.node.range.start,e.node.range.end,{key:`local.chart.column.comma`,params:{name:t}});let o=typeof r.x?.value==`string`?r.x.value.trim():``,s=typeof r.y?.value==`string`?r.y.value.trim():``;o&&wf(a,o)<0&&n.report(`local.chart.column`,`Chart x column "${o}" does not exist.`,r.x?.offset??e.node.range.start,void 0,{key:`local.chart.column.x-missing`,params:{name:o}});let c=[];if(s){c=s.split(`,`).map(e=>e.trim()).filter(Boolean),c.length||n.report(`local.chart.column`,`Chart y requires a column name.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-required`});for(let t of c)wf(a,t)<0&&n.report(`local.chart.column`,`Chart y column "${t}" does not exist.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.y-missing`,params:{name:t}})}let l=[];if(i===`bar`||i===`line`||i===`area`){let t=o?Math.max(0,wf(a,o)):0;l=c.length?c.map(e=>wf(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==t),l.length||n.report(`local.chart.column`,`Chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.needs-numeric`})}else if(i===`scatter`){let r=o?wf(a,o):0;r<0?n.report(`local.chart.column`,`Scatter chart x column "${o}" does not exist.`,e.node.range.start,void 0,{key:`local.chart.column.scatter-x-missing`,params:{name:o}}):Cf(t,r,n,e,`x`),l=c.length?c.map(e=>wf(a,e)).filter(e=>e>=0):a.map((e,t)=>t).filter(e=>e!==r),l.length||n.report(`local.chart.column`,`Scatter chart requires at least one numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.scatter-needs-numeric`})}else if(i===`donut`){if(a.length<2){n.report(`local.chart.column`,`Donut chart requires a label column and a value column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-columns`});return}if(c.length===1){let e=wf(a,c[0]);e>=0&&(l=[e])}else c.length>1?n.report(`local.chart.column`,`Donut chart y can only specify one numeric column.`,r.y?.offset??e.node.range.start,void 0,{key:`local.chart.column.donut-y`}):a.length>2?n.report(`local.chart.column`,`A donut chart with more than two columns must use y to specify the single numeric column.`,e.node.range.start,e.node.range.end,{key:`local.chart.column.donut-need-y`}):l=[1]}l=[...new Set(l)];for(let r of l)Cf(t,r,n,e,`y`);if(i===`donut`)for(let e of l)t.rows.forEach((t,r)=>{let i=t[e];if(!i||vd(i.children).length)return;let a=ud(yd(i).trim());a!==null&&a<0&&n.report(`local.chart.negative`,`Donut chart values cannot be negative; row ${r+1} is ${a}.`,i.range.start,i.range.end,{key:`local.chart.negative`,params:{row:r+1,value:a}})})}function Af(e,t,n){let r=[{title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},{title:`事项`,start:`开始`,duration:`时长`,notes:`说明`}].find(e=>t.header.includes(e.title)&&t.header.includes(e.start)&&t.header.includes(e.duration));if(!r){n.report(`local.timeline.header`,`Timeline requires either Task, Start and Duration columns or 事项, 开始 and 时长 columns, with optional Notes or 说明.`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.missing`});return}let i=new Set(Object.values(r));for(let r of t.header)i.has(r)||n.report(`local.timeline.header`,`Timeline does not support column "${r}".`,e.node.range.start,e.node.range.end,{key:`local.timeline.header.column`,params:{name:r}});for(let i of[r.start,r.duration]){let r=wf(t.header,i);r>=0&&Cf(t,r,n,e,i)}let a=wf(t.header,r.start),o=wf(t.header,r.duration);t.rows.forEach((e,r)=>{for(let i of[a,o]){if(i<0)continue;let a=e[i];if(!a||vd(a.children).length)continue;let o=ud(yd(a).trim());o!==null&&o<0&&n.report(`local.timeline.value`,`Timeline column "${t.header[i]}" cannot be negative in row ${r+1}.`,a.range.start,a.range.end,{key:`local.timeline.value.negative`,params:{name:t.header[i],row:r+1}})}})}var jf=1e-9,Mf=200;function Nf(e){return Array.isArray(e)?e.slice():e}function Pf(e){return{...e,range:{...e.range}}}function Ff(e,t){return Array.isArray(e)||Array.isArray(t)?!Array.isArray(e)||!Array.isArray(t)||e.length!==t.length?!1:e.every((e,n)=>e===t[n]):e===t}function If(e){return e===``||be(e)!==null}function Lf(e,t,n){let r=(e-t)/n;return Math.abs(r-Math.round(r))<=jf*Math.max(1,Math.abs(r))}function Rf(e){for(let[t,n]of Object.entries(e))Array.isArray(n)&&!Object.isFrozen(n)&&(e[t]=Object.freeze([...n]));return Object.freeze(e)}function zf(e,t,n,r){let i=Math.max(0,Math.min(e.source.length,t.range.start)),a=e.source.slice(0,i).split(`
54
+ `);return{code:n,message:et(r),severity:`error`,range:{start:i,end:Math.max(i+1,Math.min(e.source.length,t.range.end))},line:a.length,column:(a.at(-1)??``).length+1,messageKey:r.key,...r.params?{params:r.params}:{}}}function Bf(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function Vf(e,t){return e.attrs?.[t]}function Hf(e,t){let n=Vf(e,t);if(n===`true`)return!0;if(n===`false`)return!1}function Uf(e,t){let n=Vf(e,t);if(n===void 0)return;let r=Number(n);return Number.isFinite(r)?r:void 0}function Wf(e){return nt(e)}function Y(e,t){return{ok:!1,detail:Be(e,t)}}function Gf(e,t){if(e.name===`date`){if(!If(t))return Y(`local.runtime.value.date-invalid`);if(t===``&&Hf(e,`required`)===!0)return Y(`local.runtime.value.date-required`);let n=Vf(e,`min`),r=Vf(e,`max`);return t!==``&&n&&t<n?Y(`local.runtime.value.date-earlier`,{min:n}):t!==``&&r&&t>r?Y(`local.runtime.value.date-later`,{max:r}):{ok:!0,value:t}}if(e.name===`input`||e.name===`textarea`){let n=Wf(t);if(t===``&&Hf(e,`required`)===!0)return Y(`local.runtime.value.field-required`);let r=Uf(e,`min-length`),i=Uf(e,`max-length`);if(r!==void 0&&r>0&&t!==``&&n<r)return Y(`local.runtime.value.min-length`,{min:r});if(i!==void 0&&n>i)return Y(`local.runtime.value.max-length`,{max:i});if(e.name===`input`&&Vf(e,`type`)===`email`&&t!==``){if(t.length>254)return Y(`local.runtime.value.email-length`,{limit:254});if(!N(t))return Y(`local.runtime.value.email-invalid`)}}return{ok:!0,value:t}}function Kf(e,t,n){switch(e.type){case`number`:{if(typeof n!=`number`||!Number.isFinite(n))return Y(`local.runtime.value.finite-number`,{name:e.name});if(e.min!==void 0&&n<e.min)return Y(`local.runtime.value.min`,{name:e.name,min:e.min});if(e.max!==void 0&&n>e.max)return Y(`local.runtime.value.max`,{name:e.name,max:e.max});let t=e.step??1,r=e.min??0;return t>0&&!Lf(n,r,t)?Y(`local.runtime.value.step`,{name:e.name,step:t,base:r}):{ok:!0,value:n}}case`boolean`:return typeof n==`boolean`?{ok:!0,value:n}:Y(`local.runtime.value.boolean`,{name:e.name});case`string`:{if(typeof n!=`string`)return Y(`local.runtime.value.string`,{name:e.name});let r=yt(n);if(r)return Y(`local.runtime.value.budget`,{name:e.name,detail:et(r),detailKey:r.key,...r.params});for(let e of t){let t=Gf(e,n);if(!t.ok)return t}return e.options?.length&&!e.options.includes(n)?Y(`local.runtime.value.option`,{value:n,options:e.options.join(`, `)}):{ok:!0,value:n}}case`array`:{if(!Array.isArray(n))return Y(`local.runtime.value.array`,{name:e.name});let t=yt(n);if(t)return Y(`local.runtime.value.budget`,{name:e.name,detail:et(t),detailKey:t.key,...t.params});let r=new Set;for(let t of n){if(typeof t!=`string`)return Y(`local.runtime.value.array-members`,{name:e.name});if(e.options&&!e.options.includes(t))return Y(`local.runtime.value.checklist-option`,{value:t});r.add(t)}let i=e.options?e.options.filter(e=>r.has(e)):[...r];return e.maxItems!==void 0&&i.length>e.maxItems?Y(`local.runtime.value.max-items`,{name:e.name,max:e.maxItems}):{ok:!0,value:i}}case`null`:return{ok:!0,value:n}}return Y(`local.runtime.value.unsupported-type`,{name:e.name})}function qf(e){if(!e||e.syntax!==`local`)throw Error(`createLocalRuntime requires a local interaction document.`);if(e.syntaxVersion!==void 0&&e.syntaxVersion!==`local-draft-2`||e.versionDeclaration&&e.versionDeclaration.version!==`local-draft-2`)throw Error(`createLocalRuntime requires ${au}; migrate the source before constructing a runtime.`);let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};n(e.nodes);let r={},i=new Map;for(let[n,a]of Object.entries(e.bindings)){let e=yt(a.initial);if(e)throw new R(`expression-budget`,`Parameter "${n}": ${et(e)}`,0);r[n]=Nf(a.initial);let o=[];for(let e of a.nodeIds){let n=t.get(e);n&&o.push(n)}i.set(n,o)}let a=new Map;for(let[t,n]of Object.entries(e.bindingSlots??{}))a.set(t,{...n});let o=Object.freeze(Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort()),s=new Map;for(let[e,t]of a)for(let n of Object.values(t)){if(n.startsWith(`@`))continue;let t=s.get(n)??new Set;t.add(e),s.set(n,t)}let c=(e,t)=>{let n=a.get(e);if(!n?.start||!n?.end)return!1;let r=t[n.start],i=t[n.end];return typeof r==`number`&&typeof i==`number`&&r>i},l=e.computations??{},u=Object.keys(l),d=new Map;for(let[e,t]of Object.entries(l))try{d.set(e,Yt(t.source))}catch{}let{order:f,cyclic:p}=Zn(l),m={},h=new Map,g=e=>e instanceof R?e:new R(`expression-eval`,e instanceof Error?e.message:String(e),0);for(let e of f){let t=l[e];if(!t||t.kind!==`const`)continue;if(Object.hasOwn(t,`value`)){let n=t.value,r=bt(n);if(r){h.set(e,new R(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Nf(n);continue}let n=d.get(e);if(!n)h.set(e,new R(`expression-eval`,`Constant "${e}" cannot be evaluated.`,0));else try{let t=n.evaluate({...m}),r=bt(t);if(r){h.set(e,new R(`expression-budget`,`Constant "${e}": ${r}`,0));continue}m[e]=Nf(t)}catch(t){h.set(e,g(t))}}let _=new Map;for(let e of p)_.set(e,new R(`expression-cycle`,`Computation "${e}" is part of a dependency cycle.`,0));let v=[];if(Array.isArray(e.validations)){for(let t of e.validations)if(q(t))try{v.push({rule:t,expression:Yt(t.expression),error:null})}catch(e){v.push({rule:t,expression:null,error:g(e)})}}let y=K(typeof e.source==`string`?e.source:``),b=null,S=e=>{let t;try{t=tn(e,O)}catch{t=$u}return ed(t)},C=()=>{let t=[],n=typeof e.source==`string`?e.source:``;for(let e of v){if(e.error){t.push(nd(n,y,e.rule.range,Qu,ed(`Validation expression is invalid: ${e.error.message}`)));continue}if(!e.expression)continue;let r;try{r=e.expression.evaluate(O)}catch(r){t.push(nd(n,y,e.rule.range,Qu,ed(`Validation expression failed: ${r instanceof Error?r.message:String(r)}`)));continue}typeof r==`boolean`?r||t.push(nd(n,y,e.rule.range,Zu,S(e.rule.message))):t.push(nd(n,y,e.rule.range,Qu,`Validation expression must evaluate to a boolean.`))}return t},w=r,T=0,E={},D=new Map,O={},k={},A={revision:0,state:Rf({})},j=!1,M=new Set,N=new Map,ee=new Map,P=()=>{if(j)throw Error(`The local interaction runtime has been disposed.`)},te=()=>{if(u.length===0)E={},D=new Map;else{let e=$n(l,f,d,w,m);E=e.values,D=e.errors;for(let[e,t]of h)Object.hasOwn(E,e)||D.set(e,t);for(let[e,t]of _)Object.hasOwn(E,e)||D.set(e,t)}let e={};for(let[t,n]of Object.entries(w))e[t]=n;for(let[t,n]of Object.entries(E))e[t]=n;for(let[t,n]of D)Object.hasOwn(E,t)||Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get(){throw n}});O=e;let t={};for(let[e,n]of Object.entries(w))t[e]=n;for(let[e,n]of Object.entries(E))t[e]=n;k=t},F=()=>{A={revision:T,state:Rf(k)}},ne=e=>{w=e,T+=1,te(),F();for(let e of M)e()},re=(n,r)=>{let a=(i.get(n.name)??[])[0]??(n.owner?t.get(n.owner):void 0)??(n.nodeIds[0]?t.get(n.nodeIds[0]):void 0);return a?zf(e,a,`local.runtime.value`,r):Bf(`local.runtime.value`,et(r))},ie=n=>{P();let r=[],a={},o=Object.keys(n).sort();for(let t of o){if(t===`__proto__`){r.push(Bf(`local.runtime.parameter`,`Parameter names cannot be "__proto__".`));continue}if(t.startsWith(`@`)){r.push(Bf(`local.runtime.parameter`,`Internal parameter "${t}" cannot be written by name.`));continue}if(!Object.hasOwn(e.bindings,t)){r.push(Bf(`local.runtime.parameter`,`Unknown parameter "${t}".`));continue}let o=e.bindings[t],s=Kf(o,i.get(t)??[],n[t]);s.ok?a[t]=Nf(s.value):r.push(re(o,s.detail))}if(r.length)return r;if(!o.some(e=>!Ff(w[e],a[e])))return[];let l={...w,...a},u=new Set;for(let e of o)for(let t of s.get(e)??[])u.add(t);for(let n of[...u].sort())if(c(n,l)){let i=t.get(n);r.push(i?zf(e,i,`local.runtime.value`,Be(`local.runtime.value.range-order`)):Bf(`local.runtime.value`,et(Be(`local.runtime.value.range-order`))))}return r.length?r:(ne(l),[])};te(),F();let ae=e=>{let t=ee.get(e);if(!t){if(t=Yt(e),ee.size>=Mf){let e=ee.keys().next().value;e!==void 0&&ee.delete(e)}ee.set(e,t)}return t},oe=e=>{let t=new Set,n=e=>{t.add(e.id);for(let t of e.children??[])n(t)};return n(e),t};return{document:e,snapshot(){return P(),A},get(e,n){P();let r=t.get(e.id);if(!r)return null;let i=n===void 0?x(r):a.get(r.id)?.[n];return i&&Object.hasOwn(w,i)?Nf(w[i]):null},set(n,r,o){P();let s=t.get(n.id);if(!s)return[zf(e,n,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let l=a.get(s.id),u;if(o===void 0){if(l)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.needs-slot`))];u=x(s)}else if(u=l?.[o],!u)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.unknown-slot`,{slot:o}))];let d=Object.hasOwn(e.bindings,u)?e.bindings[u]:void 0;if(!d)return[zf(e,s,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let f=Kf(d,i.get(u)??[],r);if(!f.ok)return[zf(e,s,`local.runtime.value`,f.detail)];let p=Nf(f.value);if(Ff(w[u],p))return[];let m={...w,[u]:p};return c(s.id,m)?[zf(e,s,`local.runtime.value`,Be(`local.runtime.value.range-order`))]:(ne(m),[])},setMany(n,r){P();let o=t.get(n.id);if(!o)return[zf(e,n,`local.runtime.binding`,Be(`local.runtime.binding.no-writable`))];let s=a.get(o.id);if(!s)return[zf(e,o,`local.runtime.binding`,Be(`local.runtime.binding.no-multi-slot`))];let l=Object.entries(r);if(!l.length)return[];let u={...w};for(let[t,n]of l){let r=s[t];if(!r||!Object.hasOwn(e.bindings,r))return[zf(e,o,`local.runtime.binding`,Be(`local.runtime.binding.unknown-slot`,{slot:t}))];let a=Kf(e.bindings[r],i.get(r)??[],n);if(!a.ok)return[zf(e,o,`local.runtime.value`,a.detail)];u[r]=Nf(a.value)}return c(o.id,u)?[zf(e,o,`local.runtime.value`,Be(`local.runtime.value.range-order`))]:(l.every(([e,t])=>Ff(w[s[e]],t))||ne(u),[])},parameterNames(){return P(),o},getParameter(t){if(P(),!t.startsWith(`@`)&&Object.hasOwn(e.bindings,t))return Object.hasOwn(w,t)?Nf(w[t]):void 0},getParameters(){P();let e={};for(let t of o){let n=w[t];e[t]=Array.isArray(n)?Object.freeze([...n]):n}return Object.freeze(e)},setParameter(e,t){P();let n=Object.create(null);return n[e]=t,ie(n)},setParameters(e){if(P(),typeof e!=`object`||!e||Array.isArray(e))throw TypeError(`setParameters requires an object of parameter values.`);return ie(e)},evaluate(e){P();let t=ae(e).evaluate(O);return Array.isArray(t)?t.slice():t},validate(){if(P(),b&&b.revision===T)return b.diagnostics.map(Pf);let e=C();return b={revision:T,diagnostics:e},e.map(Pf)},text(e){return P(),tn(e,O)},reset(n){P();let r=t.get(n.id);if(!r)return;let a=oe(r),o={...w};for(let[t,n]of Object.entries(e.bindings)){if(!(i.get(t)??[]).some(e=>a.has(e.id)))continue;let e=yt(n.initial);if(e)throw new R(`expression-budget`,`Parameter "${t}": ${et(e)}`,0);o[t]=Nf(n.initial)}for(let e of a)N.set(e,(N.get(e)??0)+1);ne(o)},resetToken(e){P();let n=t.get(e.id);return n?N.get(n.id)??0:0},subscribe(e){return P(),M.add(e),()=>{M.delete(e)}},dispose(){j||(j=!0,M.clear(),ee.clear(),d.clear(),N.clear())}}}var X=(e,t,...n)=>(0,y.createElement)(e,t,...n),Jf={" ":`space`,",":`thinspace`,":":`medspace`,";":`thickspace`,"!":`negthinspace`,"{":`lbrace`,"}":`rbrace`,"|":`vert`,"%":`percent`,"&":`amp`,"#":`hash`,_:`underscore`,$:`dollar`},Yf=5e4,Xf=2e4,Zf=120,Qf=2e3;function $f(e){return e.length>Qf?`${e.slice(0,Qf)}…`:e}function ep(e){if(e.length>Yf)throw Error(`Math source exceeds the length limit.`);let t=[],n=e=>{if(t.length>=Xf)throw Error(`Math input contains too many tokens.`);t.push(e)},r=0;for(;r<e.length;){let t=e[r];if(t===` `||t===` `||t===`\r`||t===`
55
+ `)r+=1;else if(t===`%`)for(;r<e.length&&e[r]!==`
56
+ `;)r+=1;else if(t===`\\`){if(r+1>=e.length){n({kind:`command`,value:`backslash`,offset:r}),r+=1;continue}let t=e[r+1];if(t===`\\`){n({kind:`newline`,value:`\\\\`,offset:r}),r+=2;continue}if(/[A-Za-z]/.test(t)){let t=r+1;for(;t<e.length&&/[A-Za-z]/.test(e[t]);)t+=1;n({kind:`command`,value:e.slice(r+1,t),offset:r}),r=t;continue}n({kind:`command`,value:Object.hasOwn(Jf,t)?Jf[t]:t,offset:r}),r+=2}else if(t>=`0`&&t<=`9`){let t=/^\d+(?:\.\d*)?/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else if(t===`.`&&e[r+1]>=`0`&&e[r+1]<=`9`){let t=/^(?:\d+(?:\.\d*)?|\.\d+)/.exec(e.slice(r));n({kind:`number`,value:t[0],offset:r}),r+=t[0].length}else/[A-Za-z]/.test(t)?(n({kind:`letter`,value:t,offset:r}),r+=1):(n({kind:`punct`,value:t,offset:r}),r+=1)}return n({kind:`eof`,value:``,offset:e.length}),t}var tp={alpha:`α`,beta:`β`,gamma:`γ`,delta:`δ`,epsilon:`ϵ`,varepsilon:`ε`,zeta:`ζ`,eta:`η`,theta:`θ`,vartheta:`ϑ`,iota:`ι`,kappa:`κ`,lambda:`λ`,mu:`μ`,nu:`ν`,xi:`ξ`,omicron:`ο`,pi:`π`,varpi:`ϖ`,rho:`ρ`,varrho:`ϱ`,sigma:`σ`,varsigma:`ς`,tau:`τ`,upsilon:`υ`,phi:`φ`,varphi:`ϕ`,chi:`χ`,psi:`ψ`,omega:`ω`,Gamma:`Γ`,Delta:`Δ`,Theta:`Θ`,Lambda:`Λ`,Xi:`Ξ`,Pi:`Π`,Sigma:`Σ`,Upsilon:`Υ`,Phi:`Φ`,Psi:`Ψ`,Omega:`Ω`},np={cdot:`·`,times:`×`,div:`÷`,pm:`±`,mp:`∓`,le:`≤`,leq:`≤`,ge:`≥`,geq:`≥`,ne:`≠`,neq:`≠`,lt:`<`,gt:`>`,approx:`≈`,equiv:`≡`,sim:`∼`,propto:`∝`,infty:`∞`,partial:`∂`,nabla:`∇`,sum:`∑`,prod:`∏`,int:`∫`,iint:`∬`,oint:`∮`,to:`→`,rightarrow:`→`,leftarrow:`←`,Rightarrow:`⇒`,leftrightarrow:`↔`,in:`∈`,notin:`∉`,ni:`∋`,subset:`⊂`,supset:`⊃`,subseteq:`⊆`,supseteq:`⊇`,cup:`∪`,cap:`∩`,emptyset:`∅`,forall:`∀`,exists:`∃`,neg:`¬`,land:`∧`,lor:`∨`,angle:`∠`,perp:`⊥`,parallel:`∥`,degree:`°`,prime:`′`,ldots:`…`,cdots:`⋯`,dots:`…`,langle:`⟨`,rangle:`⟩`,lbrace:`{`,rbrace:`}`,vert:`|`,lvert:`|`,rvert:`|`,lVert:`‖`,rVert:`‖`,backslash:`\\`,percent:`%`,amp:`&`,hash:`#`,underscore:`_`,dollar:`$`,colon:`:`},rp=new Set([`sin`,`cos`,`tan`,`arcsin`,`arccos`,`arctan`,`exp`,`ln`,`log`,`min`,`max`,`lim`,`det`,`sup`,`inf`,`arg`,`gcd`]),ip={space:`0.25em`,thinspace:`0.167em`,medspace:`0.222em`,thickspace:`0.278em`,negthinspace:`-0.167em`,quad:`1em`,qquad:`2em`,enspace:`0.5em`},ap=new Set([`displaystyle`,`textstyle`,`scriptstyle`,`scriptscriptstyle`,`limits`,`nolimits`]),op=class{tokens;pos=0;source;depth=0;constructor(e){this.source=e,this.tokens=ep(e)}enter(){if(this.depth+=1,this.depth>Zf)throw--this.depth,Error(`Formula is nested too deeply.`)}leave(){--this.depth}render(){let e=this.parseRow({});return e.length===1?e[0]:X(`mrow`,null,...e)}peek(e=0){return this.tokens[Math.min(this.pos+e,this.tokens.length-1)]}take(){return this.tokens[this.pos++]}atPunct(e){let t=this.peek();return t.kind===`punct`&&t.value===e}atCommand(e){let t=this.peek();return t.kind===`command`&&t.value===e}parseRow(e){this.enter();try{let t=[];for(;;){let n=this.peek();if(n.kind===`eof`||n.kind===`punct`&&e.chars?.has(n.value)||n.kind===`command`&&e.commands?.has(n.value)||n.kind===`newline`&&e.newline)break;t.push(this.parseAtom())}return t}finally{this.leave()}}parseAtom(){this.enter();try{return this.parseAtomBody()}finally{this.leave()}}parseAtomBody(){let e=this.peek(),t;return e.kind===`number`?(this.take(),t=X(`mn`,null,e.value)):e.kind===`letter`?(this.take(),t=X(`mi`,null,e.value)):e.kind===`punct`?t=this.parsePunctuation(e):e.kind===`newline`?(this.take(),t=X(`mspace`,{linebreak:`newline`})):e.kind===`command`?t=this.parseCommand(e):(this.take(),t=X(`mtext`,null,``)),this.applyScripts(t)}parsePunctuation(e){return this.take(),e.value===`{`?(--this.pos,this.parseBraceGroup()):e.value===`}`||e.value===`&`||e.value===`#`?X(`mo`,null,e.value):X(`mo`,e.value===`(`||e.value===`)`||e.value===`[`||e.value===`]`||e.value===`|`?{fence:`true`,stretchy:`true`}:null,e.value)}parseCommand(e){let t=e.value;if(t===`frac`||t===`dfrac`||t===`tfrac`)return this.take(),this.parseFraction();if(t===`sqrt`)return this.take(),this.parseRoot();if(t===`left`)return this.take(),this.parseLeft();if(t===`right`)return this.take(),this.readDelimiter()??X(`mrow`,null);if(t===`begin`)return this.take(),this.parseEnvironment();if(t===`end`)return this.take(),this.readRawGroup(),X(`mtext`,null,`\\end`);if(t===`text`||t===`textrm`||t===`mbox`||t===`operatorname`)return this.take(),X(`mtext`,null,this.readRawGroup());if(t===`mathrm`||t===`mathbf`||t===`mathit`||t===`mathsf`){this.take();let e=this.readRawGroup();return X(`mtext`,{mathvariant:t===`mathrm`?`normal`:t===`mathbf`?`bold`:t===`mathit`?`italic`:`sans-serif`},e)}if(t===`overline`||t===`bar`||t===`hat`||t===`tilde`||t===`vec`||t===`dot`||t===`ddot`)return this.take(),X(`mover`,{accent:`true`},this.parseRequiredArgument(),X(`mo`,{stretchy:`true`},t===`overline`||t===`bar`?`¯`:t===`hat`?`^`:t===`tilde`?`~`:t===`vec`?`→`:t===`dot`?`˙`:`¨`));if(ap.has(t))return this.take(),X(`mrow`,null);if(Object.hasOwn(ip,t))return this.take(),X(`mspace`,{width:ip[t]});if(rp.has(t))return this.take(),X(`mo`,{mathvariant:`normal`,form:`prefix`},t);if(Object.hasOwn(tp,t))return this.take(),X(`mi`,null,tp[t]);if(Object.hasOwn(np,t)){this.take();let e=np[t];return X(`mo`,e===`(`||e===`)`||e===`[`||e===`]`||e===`{`||e===`}`||e===`|`||e===`‖`||e===`⟨`||e===`⟩`?{fence:`true`,stretchy:`true`}:null,e)}return this.take(),X(`mtext`,null,`\\${t}`)}parseBraceGroup(){if(!this.atPunct(`{`))return X(`mrow`,null);this.take();let e=this.parseRow({chars:new Set([`}`])});return this.atPunct(`}`)&&this.take(),X(`mrow`,null,...e)}parseFraction(){return X(`mfrac`,null,this.parseRequiredArgument(),this.parseRequiredArgument())}parseRoot(){let e=null;if(this.atPunct(`[`)){this.take();let t=this.parseRow({chars:new Set([`]`])});this.atPunct(`]`)&&this.take(),e=X(`mrow`,null,...t)}let t=this.parseRequiredArgument();return e?X(`mroot`,null,t,e):X(`msqrt`,null,t)}parseRequiredArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.parseAtom()}parseLeft(){let e=this.readDelimiter(),t=this.parseRow({commands:new Set([`right`])}),n=null;return this.atCommand(`right`)&&(this.take(),n=this.readDelimiter()),!e&&!n?X(`mrow`,null,...t):X(`mrow`,null,e,...t,n)}readDelimiter(){let e=this.peek();if(e.kind===`punct`)return e.value===`.`?(this.take(),null):`()[]|`.includes(e.value)?(this.take(),X(`mo`,{fence:`true`,stretchy:`true`},e.value)):null;if(e.kind===`command`){let t={lbrace:`{`,rbrace:`}`,lvert:`|`,rvert:`|`,vert:`|`,lVert:`‖`,rVert:`‖`,Vert:`‖`,langle:`⟨`,rangle:`⟩`},n=Object.hasOwn(t,e.value)?t[e.value]:void 0;if(n)return this.take(),X(`mo`,{fence:`true`,stretchy:`true`},n)}return null}parseEnvironment(){let e=this.readRawGroup().trim();if(e!==`cases`)return X(`mtext`,null,`\\begin{${e}}`);let t=[],n=0;for(;!this.atCommand(`end`)&&this.peek().kind!==`eof`&&n<500;){n+=1;let e=[];for(;;){let t=this.parseRow({chars:new Set([`&`]),commands:new Set([`end`]),newline:!0});if(e.push(X(`mtd`,{columnalign:`left`},...t)),!this.atPunct(`&`))break;this.take()}if(t.push(X(`mtr`,null,...e)),this.peek().kind===`newline`)this.take();else{if(this.atCommand(`end`)||this.peek().kind===`eof`)break;this.take()}}this.atCommand(`end`)&&(this.take(),this.readRawGroup());let r=X(`mtable`,{columnalign:`left`,columnspacing:`1em`},...t);return X(`mrow`,null,X(`mo`,{fence:`true`,stretchy:`true`},`{`),r)}applyScripts(e){let t=null,n=null,r=!1;for(;;)if(this.atPunct(`^`))this.take(),n=this.parseScriptArgument(),r=!0;else if(this.atPunct(`_`))this.take(),t=this.parseScriptArgument(),r=!0;else break;return r?t!==null&&n!==null?X(`msubsup`,null,e,t,n):n===null?X(`msub`,null,e,t):X(`msup`,null,e,n):e}parseScriptArgument(){return this.atPunct(`{`)?this.parseBraceGroup():this.atPunct(`+`)||this.atPunct(`-`)?X(`mrow`,null,X(`mo`,null,this.take().value),this.parseAtom()):this.parseAtom()}readRawGroup(){if(!this.atPunct(`{`))return``;let e=this.take(),t=1,n=this.pos;for(;n<this.tokens.length;n+=1){let e=this.tokens[n];if(e.kind===`eof`)break;if(e.kind===`punct`){if(e.value===`{`)t+=1;else if(e.value===`}`&&(--t,t===0))break}}if(n>=this.tokens.length||this.tokens[n].kind===`eof`)return this.pos=n,this.source.slice(e.offset+1);let r=this.tokens[n];return this.pos=n+1,this.source.slice(e.offset+1,r.offset)}};function sp({source:e,display:t=!1}){let n=$f(e),r;if(e.length>Yf)r=X(`mtext`,null,n);else try{r=new op(e).render()}catch{r=X(`mtext`,null,n)}let i=e.length>Qf?n:e;return X(`math`,{display:t?`block`:`inline`,className:t?`local-math local-math-block`:`local-math`,"aria-label":i},X(`semantics`,null,X(`mrow`,null,r),X(`annotation`,{encoding:`application/x-tex`},i)))}var cp=s((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),Z=s(((e,t)=>{t.exports=cp()}))(),lp=e=>e,up=(0,y.createContext)(`en`);function dp({locale:e=`en`,children:t}){return(0,Z.jsx)(up.Provider,{value:e,children:t})}function fp(){return(0,y.useContext)(up)}function pp(e,t,n){return e===`zh`?n:t}function Q(){let e=fp();return(0,y.useMemo)(()=>(t,n)=>pp(e,t,n),[e])}var mp=[`var(--chart-1)`,`var(--chart-2)`,`var(--chart-3)`,`var(--chart-4)`,`var(--chart-5)`,`var(--chart-6)`,`var(--chart-7)`,`var(--chart-8)`],hp=520,gp=320,_p=520,vp=320,yp=520,bp=120,xp=46,Sp=150,Cp=12.5,wp=10,Tp=100,Ep=2,Dp=15,Op=/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/,kp=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Ap(e){if(!Number.isFinite(e))return`—`;if(Object.is(e,-0))return`0`;let t=Math.abs(e);return t>=0xe8d4a51000||t>0&&t<1e-4?e.toExponential(3).replace(/(\.\d*?)0+e/,`$1e`).replace(/\.e/,`e`):Number(e.toFixed(6)).toString()}function jp(e){if(!Number.isFinite(e))return`—`;let t=Math.abs(e);return t>=1e6||t>0&&t<.001?e.toExponential(2):Number(e.toFixed(4)).toString()}function Mp(e){return e instanceof Error?e.message:String(e)}function Np(e,t,n,r=``){let i=t?.[n];if(i===void 0)return r;try{return e.text(i)}catch{return r}}function Pp(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a)return null;let o=kp.exec(a);try{let t=o?e.evaluate(o[1].trim()):Number(a);return typeof t==`number`&&Number.isFinite(t)?t:null}catch{return null}}function Fp(e,t,n,r){let i=t?.[n];if(i===void 0)return r;let a=i.trim();if(!a||a===`true`)return!0;if(a===`false`)return!1;let o=kp.exec(a);if(!o)return r;try{let t=e.evaluate(o[1].trim());return typeof t==`boolean`?t:r}catch{return r}}function Ip(e,t,n,r){let i=Pp(e,t,n,r);return i===null||!Number.isFinite(i)?r:Math.trunc(i)}function Lp(e,t){return e.length>t?`${e.slice(0,Math.max(1,t-1))}…`:e}function Rp(e,t=8,n=2){if(!e)return[``];let r=[],i=e;for(;i&&r.length<n-1;)r.push(i.slice(0,t)),i=i.slice(t);return(i||r.length===0)&&r.push(i.length>t?`${i.slice(0,Math.max(1,t-1))}…`:i),r}function zp(e,t){let n=Array.from(e),r=Array.from(t),i=Math.min(n.length,r.length);for(let e=0;e<i;e+=1){let t=(n[e].codePointAt(0)??0)-(r[e].codePointAt(0)??0);if(t!==0)return t}return n.length-r.length}function Bp(e,t,n=5){if(!Number.isFinite(e)||!Number.isFinite(t)||t<=e)return[e];let r=(t-e)/Math.max(1,n-1),i=10**Math.floor(Math.log10(r)),a=r/i,o=(a<=1?1:a<=2?2:a<=5?5:10)*i,s=Math.ceil(e/o)*o,c=[];for(let e=s;e<=t+o*1e-9&&c.length<40;e+=o)c.push(Number(e.toFixed(10)));return c}function Vp(e,t){let n=1/0,r=-1/0;for(let t of e)Number.isFinite(t)&&(t<n&&(n=t),t>r&&(r=t));if(!Number.isFinite(n)||!Number.isFinite(r))return{min:0,max:1};if(t&&(n=Math.min(n,0),r=Math.max(r,0)),n===r){let e=Math.abs(n)>0?Math.abs(n)*.15:1;n-=e,r+=e}else{let e=(r-n)*.06;n-=e,r+=e,t&&(n=Math.min(n,0),r=Math.max(r,0))}return{min:n,max:r}}function Hp(e,t){return Math.max(46,...e.map(e=>jp(e).length*6+(t?24:10)))}function Up(e,t,n){let r=e.currentTarget,i=r.ownerSVGElement??r.closest(`svg`);if(!i)return;let a=Array.from(i.querySelectorAll(t)),o=a.indexOf(r);o<0||a.length===0||(e.preventDefault(),a[(o+n+a.length)%a.length]?.focus())}function Wp(e){return e.key===`Enter`||e.key===` `||e.key===`Spacebar`}function Gp(e,t=lp){return e===null?{text:``,kind:`null`,error:null}:typeof e==`string`?{text:e,kind:`string`,error:null}:typeof e==`number`?Number.isFinite(e)?{text:Ap(e),kind:`number`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`error`,error:t(`Result is not a finite number`,`结果不是有限数字`)}:typeof e==`boolean`?{text:e?`true`:`false`,kind:`boolean`,error:null}:{text:t(`Cannot compute`,`无法计算`),kind:`array`,error:t(`Arrays must first be converted with a function such as len`,`数组需要先用 len 等函数转换`)}}function Kp(e,t,n=lp){let r=``,i=null;for(let a of e??[])if(a.type===`text`||a.type===`inlineCode`||a.type===`code`)r+=a.value??``;else if(a.type===`interpolation`)try{let e=Gp(t.evaluate((a.value??``).trim()),n);e.error&&(i??=e.error),r+=e.text}catch(e){i??=Mp(e),r+=n(`Cannot compute`,`无法计算`)}else if(a.type===`inlineMath`||a.type===`math`)r+=a.value??``;else if(a.type===`image`)r+=a.alt??``;else if(a.children&&a.children.length>0){let e=Kp(a.children,t,n);r+=e.text,i??=e.error}else a.value&&(r+=a.value);return{text:r,error:i}}function qp(e,t,n=lp){let r=e.children??[],i=r.filter(e=>!(e.type===`text`&&!(e.value??``).trim()));if(i.length===1&&i[0].type===`interpolation`)try{let a=t.evaluate((i[0].value??``).trim()),o=Gp(a,n);return{node:e,children:r,text:o.text,value:a,kind:o.kind,numeric:o.kind===`number`?a:null,error:o.error}}catch(t){return{node:e,children:r,text:n(`Cannot compute`,`无法计算`),value:void 0,kind:`error`,numeric:null,error:Mp(t)}}let a=Kp(r,t,n);if(i.length>0&&i.every(e=>e.type===`text`)&&Op.test(a.text.trim())){let t=Number(a.text.trim());if(Number.isFinite(t))return{node:e,children:r,text:a.text,value:t,kind:`number`,numeric:t,error:null}}let o=!a.text.trim()&&!a.error;return{node:e,children:r,text:a.error?n(`Cannot compute`,`无法计算`):a.text,value:a.text,kind:a.error?`error`:o?`empty`:`string`,numeric:null,error:a.error}}function Jp(e,t=lp){return e?e.error?t(`Cannot compute`,`无法计算`):e.text:``}function Yp(e,t,n=lp){let r=e.children?.find(e=>e.type===`table`);if(!r)return null;let i=r.children?.filter(e=>e.type===`tableRow`)??[];if(i.length===0)return null;let a=(i[0].children??[]).map(e=>qp(e,t,n));return{tableNode:r,header:a,headerText:a.map(e=>Jp(e,n)),rows:i.slice(1).map((e,r)=>({index:r,cells:(e.children??[]).map(e=>qp(e,t,n))}))}}function Xp(e,t){let n=!1;for(let r of e.rows){let e=r.cells[t];if(e&&e.kind!==`empty`){if(e.numeric===null)return!1;n=!0}}return n}function Zp(e,t){let n=(e?.key??``).trim();return n?t.findIndex(e=>e.trim()===n):-1}function Qp(e,t,n){return e<0?``:Jp(t.cells[e],n).trim()}function $p(e,t,n){if(!n)return``;try{let n=e.get(t);return typeof n==`string`?n:``}catch{return``}}function em({className:e,label:t,children:n}){let r=(0,y.useId)();return(0,Z.jsxs)(`figure`,{className:`local-visual ${e}`,"aria-labelledby":r,children:[(0,Z.jsx)(`figcaption`,{id:r,className:`local-visual-title`,children:t}),n]})}function tm({message:e,kind:t=`status`}){return(0,Z.jsx)(`p`,{className:`local-visual-message local-visual-${t}`,role:t,children:e})}function nm({notes:e}){return e.length===0?null:(0,Z.jsx)(`ul`,{className:`local-visual-notes`,role:`status`,children:e.map((e,t)=>(0,Z.jsx)(`li`,{children:e},`${e}-${t}`))})}function rm({items:e,hidden:t,onToggle:n,label:r,mode:i}){let a=Q(),o=i!==`static`;return(0,Z.jsx)(`div`,{className:`local-visual-legend${o?``:` local-static-legend`}`,role:`group`,"aria-label":o?r:a(`Legend`,`图例`),children:e.map((e,r)=>{let i=t.has(r);return o?(0,Z.jsxs)(`button`,{type:`button`,className:`local-visual-legend-item${i?` is-off`:``}`,"aria-pressed":!i,disabled:e.disabled,onClick:()=>n(r),title:i?a(`Show ${e.name}`,`显示 ${e.name}`):a(`Hide ${e.name}`,`隐藏 ${e.name}`),children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`):(0,Z.jsxs)(`span`,{className:`local-visual-legend-item local-static-legend-item`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:e.color},"aria-hidden":`true`}),(0,Z.jsxs)(`span`,{className:`local-visual-legend-text`,children:[e.name,e.detail?a(` (${e.detail})`,`(${e.detail})`):``]})]},`${e.name}-${r}`)})})}function im({node:e,runtime:t,render:n,mode:r}){let i=Q(),[a,o]=(0,y.useState)(``),[s,c]=(0,y.useState)(null),[l,u]=(0,y.useState)(1),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(``),c(null),u(1),f(null)},[p]);let m=Np(t,e.attrs,`label`,i(`Table`,`表格`)),h=Fp(t,e.attrs,`searchable`,!0),g=Fp(t,e.attrs,`sortable`,!0),_=Ip(t,e.attrs,`page-size`,10),v=Math.max(1,_),b=Yp(e,t,i);if(!b||b.header.length===0)return(0,Z.jsx)(em,{className:`local-visual-table-block`,label:m,children:(0,Z.jsx)(tm,{message:i(`Table requires a non-empty Markdown table.`,`表格需要一个非空的 Markdown 表格。`),kind:`alert`})});let x=Zp(e.attrs,b.headerText),S=x>=0,C=$p(t,e,S),w=n=>{f(null);try{let r=t.set(e,n);r.length>0&&f(r.map(e=>i(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){f(Mp(e))}},T=b.header.map((e,t)=>Xp(b,t)),E=a.trim().toLowerCase(),D=[...b.rows.filter(e=>!E||e.cells.some(e=>Jp(e,i).toLowerCase().includes(E)))];if(s){let e=T[s.column];D.sort((t,n)=>{let r=t.cells[s.column],a=n.cells[s.column],o;if(e){let e=r?.numeric??-1/0,t=a?.numeric??-1/0;o=e===t?0:e<t?-1:1}else o=zp(Jp(r,i),Jp(a,i));return o===0?t.index-n.index:s.direction===`asc`?o:-o})}let O=Math.max(1,Math.ceil(D.length/v)),k=Math.min(l,O),A=D.slice((k-1)*v,k*v),j=e=>{u(1),c(t=>!t||t.column!==e?{column:e,direction:`asc`}:t.direction===`asc`?{column:e,direction:`desc`}:null)},M=e=>!s||s.column!==e?null:(0,Z.jsx)(`span`,{className:`local-visual-sort-marker`,"aria-hidden":`true`,children:s.direction===`asc`?`▲`:`▼`});return r===`static`?(0,Z.jsxs)(em,{className:`local-visual-table-block local-static-table-block`,label:m,children:[(0,Z.jsx)(`div`,{className:`local-visual-table-scroll local-static-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`local-visual-table local-static-table`,children:[(0,Z.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:b.header.map((e,t)=>(0,Z.jsx)(`th`,{scope:`col`,className:T[t]?`is-numeric`:void 0,children:Jp(e,i)},`head-${t}`))})}),(0,Z.jsx)(`tbody`,{children:b.rows.map(e=>{let t=S?Qp(x,e,i):``,r=S&&t!==``&&t===C;return(0,Z.jsx)(`tr`,{className:r?`is-selected local-static-selected`:void 0,children:b.header.map((t,a)=>{let o=e.cells[a];return(0,Z.jsxs)(`td`,{className:T[a]?`is-numeric`:void 0,children:[r&&a===0?(0,Z.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Selected row`,`已选择行`)}):null,o?.error?(0,Z.jsx)(`span`,{className:`local-visual-cell-error`,title:o.error,children:i(`Cannot compute`,`无法计算`)}):n(o?.children??[])]},`cell-${e.index}-${a}`)})},`row-${e.index}`)})})]})}),b.rows.length===0?(0,Z.jsx)(tm,{message:i(`No rows to display`,`没有可显示的行`)}):null]}):(0,Z.jsxs)(em,{className:`local-visual-table-block`,label:m,children:[h?(0,Z.jsxs)(`label`,{className:`local-visual-search`,children:[(0,Z.jsx)(`span`,{children:i(`Search`,`搜索`)}),(0,Z.jsx)(`input`,{type:`search`,value:a,placeholder:i(`Search all columns`,`搜索所有列`),"aria-label":i(`Search ${m}`,`搜索${m}`),onChange:e=>{o(e.target.value),u(1)}})]}):null,(0,Z.jsx)(`div`,{className:`local-visual-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`local-visual-table`,children:[(0,Z.jsx)(`caption`,{className:`local-visual-sr-only`,children:m}),(0,Z.jsx)(`thead`,{children:(0,Z.jsxs)(`tr`,{children:[S?(0,Z.jsx)(`th`,{scope:`col`,className:`local-visual-select-column`,children:(0,Z.jsx)(`span`,{className:`local-visual-sr-only`,children:i(`Select`,`选择`)})}):null,b.header.map((e,t)=>{let n=s&&s.column===t?s.direction===`asc`?`ascending`:`descending`:`none`;return(0,Z.jsx)(`th`,{scope:`col`,"aria-sort":n,className:T[t]?`is-numeric`:void 0,children:g?(0,Z.jsxs)(`button`,{type:`button`,className:`local-visual-sort-button${s&&s.column===t?` is-sorted`:``}`,onClick:()=>j(t),title:i(`Click to cycle ascending, descending and original order`,`点击切换升序、降序和原始顺序`),children:[Jp(e,i),M(t)]}):Jp(e,i)},`head-${t}`)})]})}),(0,Z.jsx)(`tbody`,{children:A.map(e=>{let t=S?Qp(x,e,i):``,r=S&&t!==``&&t===C;return(0,Z.jsxs)(`tr`,{className:r?`is-selected`:void 0,children:[S?(0,Z.jsx)(`td`,{className:`local-visual-select-cell`,children:t?(0,Z.jsx)(`button`,{type:`button`,className:`local-visual-select-button${r?` is-selected`:``}`,"aria-pressed":r,"aria-label":i(`Select row ${t}`,`选择行 ${t}`),title:i(`Select row ${t}`,`选择行 ${t}`),onClick:()=>w(t),children:(0,Z.jsx)(`span`,{"aria-hidden":`true`,children:r?`●`:`○`})}):null}):null,b.header.map((t,r)=>{let a=e.cells[r];return(0,Z.jsx)(`td`,{className:T[r]?`is-numeric`:void 0,children:a?.error?(0,Z.jsx)(`span`,{className:`local-visual-cell-error`,title:a.error,children:i(`Cannot compute`,`无法计算`)}):n(a?.children??[])},`cell-${e.index}-${r}`)})]},`row-${e.index}`)})})]})}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,D.length===0?(0,Z.jsx)(tm,{message:i(`No matching results`,`没有匹配结果`)}):null,O>1?(0,Z.jsxs)(`nav`,{className:`local-visual-pagination`,"aria-label":i(`Table pagination`,`表格分页`),children:[(0,Z.jsx)(`button`,{type:`button`,disabled:k<=1,onClick:()=>u(e=>Math.max(1,e-1)),children:i(`Previous`,`上一页`)}),(0,Z.jsx)(`span`,{children:i(`Page ${k} of ${O} · ${D.length} rows`,`第 ${k} / ${O} 页 · 共 ${D.length} 行`)}),(0,Z.jsx)(`button`,{type:`button`,disabled:k>=O,onClick:()=>u(e=>Math.min(O,e+1)),children:i(`Next`,`下一页`)})]}):null]})}var am=[`bar`,`line`,`area`,`scatter`,`donut`];function om(e,t,n,r,i,a){let o=(n,r)=>[e+n*Math.cos(r),t+n*Math.sin(r)],[s,c]=o(n,i),[l,u]=o(n,a),[d,f]=o(r,a),[p,m]=o(r,i),h=+(a-i>Math.PI);return[`M ${s} ${c}`,`A ${n} ${n} 0 ${h} 1 ${l} ${u}`,`L ${d} ${f}`,`A ${r} ${r} 0 ${h} 0 ${p} ${m}`,`Z`].join(` `)}function sm({node:e,runtime:t,mode:n}){let r=Q(),i=n===`static`,[a,o]=(0,y.useState)(new Set),[s,c]=(0,y.useState)(new Set),[l,u]=(0,y.useState)(null),[d,f]=(0,y.useState)(null),p=t.resetToken(e);(0,y.useEffect)(()=>{o(new Set),c(new Set),u(null),f(null)},[p]);let m=(0,y.useId)(),h=Np(t,e.attrs,`title`,``)||Np(t,e.attrs,`label`,``)||r(`Chart`,`图表`),g=(e.attrs?.kind??`bar`).trim().toLowerCase(),_=am.includes(g)?g:null,v=Np(t,e.attrs,`x-label`,``),b=Np(t,e.attrs,`y-label`,``),x=Yp(e,t,r);if(!x||x.header.length===0)return(0,Z.jsx)(em,{className:`local-visual-chart`,label:h,children:(0,Z.jsx)(tm,{message:r(`chart body requires a non-empty Markdown table.`,`chart 正文需要一个非空的 Markdown 表格。`),kind:`alert`})});let S=x.headerText.map(e=>e.trim()),C=Zp(e.attrs,S),w=C>=0,T=$p(t,e,w),E=n=>{f(null);try{let i=t.set(e,n);i.length>0&&f(i.map(e=>r(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){f(Mp(e))}},D=x.rows.map(e=>({index:e.index,cells:e.cells,texts:S.map((t,n)=>Jp(e.cells[n],r)),keyValue:Qp(C,e,r)}));if(!_)return(0,Z.jsx)(em,{className:`local-visual-chart`,label:h,children:(0,Z.jsx)(tm,{message:r(`Unknown chart type "${g}".`,`未知图表类型“${g}”。`),kind:`alert`})});let O=[],k=[],A=(e.attrs?.x??``).trim(),j=A?S.indexOf(A):0;(j<0||j>=S.length)&&k.push(r(`x column "${A}" does not exist.`,`x 列“${A}”不存在。`));let M=(e.attrs?.y??``).split(`,`).map(e=>e.trim()).filter(Boolean),N=[];if(_===`donut`){if(M.length>1)k.push(r(`donut can only use one numeric column; specify a single column in y.`,`donut 只能使用一个数值列,请在 y 中指定唯一列。`));else if(M.length===1){let e=S.indexOf(M[0]);e<0?k.push(r(`y column "${M[0]}" does not exist.`,`y 列“${M[0]}”不存在。`)):N=[e]}else S.length===2?N=[1]:k.push(r(`A donut chart with more than two columns must use y to specify the single numeric column.`,`donut 多于两列时必须用 y 指定唯一数值列。`))}else if(M.length>0)for(let e of M){let t=S.indexOf(e);t<0?k.push(r(`y column "${e}" does not exist.`,`y 列“${e}”不存在。`)):N.includes(t)||N.push(t)}else N=S.map((e,t)=>t).filter(e=>e!==j);if(k.length===0&&N.length===0&&k.push(r(`Chart requires at least one numeric series.`,`图表至少需要一个数值系列。`)),k.length>0)return(0,Z.jsx)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:k.map((e,t)=>(0,Z.jsx)(tm,{message:e,kind:`alert`},`${e}-${t}`))});let ee=N.map(e=>S[e]||r(`Series ${e+1}`,`系列 ${e+1}`)),P=0,te=0,F=D.map(e=>{let t=e.cells[j],n=e.texts[j]||r(`Item ${e.index+1}`,`第 ${e.index+1} 项`),i=t&&t.numeric!==null?t.numeric:null,a=N.map(t=>{let n=e.cells[t];return!n||n.kind===`empty`||n.numeric===null?(P+=1,null):(_===`donut`&&n.numeric<0&&(te+=1),n.numeric)});return{index:e.index,label:n,xValue:i,values:a,cells:e.cells,keyValue:e.keyValue}});P>0&&O.push(r(`${P} values are empty or cannot be computed; gaps are kept in the chart.`,`${P} 个数值为空或无法计算,图表中保留空缺。`));for(let e of N)Xp(x,e)||O.push(r(`Column "${S[e]}" is not purely numeric; non-numeric values are treated as gaps.`,`列“${S[e]}”不是纯数值列,非数值按空缺处理。`));_===`donut`&&te>0&&O.push(r(`Donut values must be non-negative; ignored ${te} negative values.`,`环形图数值必须非负,已忽略 ${te} 个负值。`)),_===`scatter`&&!Xp(x,j)&&O.push(r(`scatter horizontal axis column "${S[j]}" requires numeric values.`,`scatter 的横轴列“${S[j]}”需要数值。`));let ne=e=>{u(null),o(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},re=e=>{u(null),c(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},ie=ee.map((e,t)=>({name:e,color:mp[t%mp.length]}));if(_===`donut`){let e=F.map(e=>e.values[0]),t=e.map(e=>e!==null&&e>=0?e:0),a=t.reduce((e,t,n)=>!i&&s.has(n)?e:e+t,0),o=F.map((n,r)=>({name:n.label,color:mp[r%mp.length],detail:e[r]===null?`—`:Ap(e[r]),disabled:t[r]<=0}));if(a<=0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-donut`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No share to display`,`暂无占比`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:o,hidden:s,onToggle:re,label:r(`Legend`,`图例`),mode:n})]});let c=-Math.PI/2,f=[];F.forEach((e,n)=>{if(!i&&s.has(n))return;let r=t[n];if(r<=0)return;let o=r/a*Math.PI*2,l=c,u=c+o;c=u,f.push({key:`donut:${n}`,label:e.label,value:r,start:l,end:u,color:mp[n%mp.length],x:170,y:120,rowKey:e.keyValue})});let p=l?r(`${l.label}: ${Ap(l.value)}`,`${l.label}:${Ap(l.value)}`):r(`Focus a slice or legend to view values`,`聚焦扇区或图例查看数值`);return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-donut${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:p}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 340 240`,role:`group`,"aria-label":r(`${h}, donut chart, ${F.length} items`,`${h},环形图,共 ${F.length} 项`),"aria-describedby":i?void 0:m,children:[(0,Z.jsxs)(`g`,{className:`local-visual-donut-center`,"aria-hidden":`true`,children:[(0,Z.jsx)(`text`,{x:170,y:118,textAnchor:`middle`,className:`local-visual-donut-total`,children:Ap(a)}),(0,Z.jsx)(`text`,{x:170,y:138,textAnchor:`middle`,className:`local-visual-donut-caption`,children:Lp(ee[0],14)})]}),f.map(e=>{let t=w&&e.rowKey!==``,n=t&&e.rowKey===T,a={key:e.key,series:ee[0],label:e.label,value:e.value,x:e.x,y:e.y,rowKey:e.rowKey,selectable:t,selected:n},o=i?{}:{"data-chart-mark":``,...t?{"data-chart-selectable":``}:{},tabIndex:0,role:t?`button`:`img`,...t?{"aria-pressed":n}:{},"aria-label":r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`),onFocus:()=>u(a),onBlur:()=>u(null),onPointerEnter:()=>u(a),onPointerLeave:()=>u(null),onClick:t?()=>E(e.rowKey):void 0,onKeyDown:n=>{t&&Wp(n)?(n.preventDefault(),E(e.rowKey)):n.key===`ArrowRight`||n.key===`ArrowDown`?Up(n,`[data-chart-mark]`,1):(n.key===`ArrowLeft`||n.key===`ArrowUp`)&&Up(n,`[data-chart-mark]`,-1)}},s=`local-visual-donut-slice${n?` is-selected`:``}`;return e.end-e.start>=Math.PI*2-1e-6?(0,Z.jsx)(`circle`,{className:s,cx:170,cy:120,r:77,fill:`none`,style:{stroke:e.color},strokeWidth:30,...o,children:(0,Z.jsx)(`title`,{children:r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`)})},e.key):(0,Z.jsx)(`path`,{className:s,d:om(170,120,92,62,e.start,e.end),style:{fill:e.color},...o,children:(0,Z.jsx)(`title`,{children:r(`${e.label}: ${Ap(e.value)}`,`${e.label}:${Ap(e.value)}`)})},e.key)})]})}),(0,Z.jsx)(rm,{items:o,hidden:s,onToggle:re,label:r(`Legend, toggle slices`,`图例,可开关扇区`),mode:n}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:O})]})}let ae=ee.map((e,t)=>t).filter(e=>i||!a.has(e));if(ae.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`All series are hidden in the legend`,`所有系列已在图例中关闭`)}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let oe=Xp(x,j),se=_===`scatter`?!0:_===`line`||_===`area`?oe:!1,ce=se?F.filter(e=>e.xValue!==null):F;se&&ce.length<F.length&&O.push(r(`${F.length-ce.length} rows have an empty or non-numeric horizontal axis and are not plotted.`,`${F.length-ce.length} 行横轴为空或不是数值,未参与绘制。`));let le=[];for(let e of ce)for(let t of ae){let n=e.values[t];n!==null&&le.push(n)}if(ce.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No data rows to plot`,`没有可绘制的数据行`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});if(le.length===0)return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}`,label:h,children:[(0,Z.jsx)(tm,{message:r(`No values to read`,`没有可读取的数值`)}),(0,Z.jsx)(nm,{notes:O}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n})]});let ue=Vp(le,_===`bar`||_===`area`),de=Bp(ue.min,ue.max,5),fe=Hp(de,!!b),pe=506-fe,me=e=>16+(ue.max-e)/(ue.max-ue.min)*258,I=me(Math.max(ue.min,Math.min(ue.max,0))),L=se&&ce.length>0?Vp(ce.map(e=>e.xValue).filter(e=>e!==null),!1):null,he=pe/Math.max(1,F.length),ge=e=>fe+he*(e+.5),_e=e=>fe+(e-L.min)/(L.max-L.min)*pe,ve=(e,t)=>L?e.xValue===null?null:_e(e.xValue):ge(t),ye=[];if(L)ye.push(...Bp(L.min,L.max,5));else{let e=Math.max(1,Math.ceil(F.length/6));for(let t=0;t<F.length;t+=e)ye.push(t);let t=F.length-1;t>=0&&ye[ye.length-1]!==t&&(ye.length>1&&t-ye[ye.length-1]<e*.6?ye[ye.length-1]=t:ye.push(t))}let be=e=>L?fe+(e-L.min)/(L.max-L.min)*pe:ge(e),xe=i||!l?null:L?(0,Z.jsx)(`line`,{className:`local-visual-guide`,x1:Math.max(fe,Math.min(506,l.x)),x2:Math.max(fe,Math.min(506,l.x)),y1:16,y2:274}):null,Se=e=>i?{}:{"data-chart-mark":``,...e.selectable?{"data-chart-selectable":``}:{},tabIndex:0,role:e.selectable?`button`:`img`,...e.selectable?{"aria-pressed":e.selected}:{},"aria-label":r(`${e.series}, ${e.label}${e.selectable&&e.rowKey!==e.label?`, ${e.rowKey}`:``}: ${Ap(e.value)}`,`${e.series},${e.label}${e.selectable&&e.rowKey!==e.label?`,${e.rowKey}`:``}:${Ap(e.value)}`),onFocus:()=>u(e),onBlur:()=>u(null),onPointerEnter:()=>u(e),onPointerLeave:()=>u(null),onClick:e.selectable?()=>E(e.rowKey):void 0,onKeyDown:t=>{e.selectable&&Wp(t)?(t.preventDefault(),E(e.rowKey)):t.key===`ArrowRight`||t.key===`ArrowDown`?Up(t,`[data-chart-mark]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Up(t,`[data-chart-mark]`,-1)}},Ce=(e,t,n,r,i)=>{let a=w&&t.keyValue!==``;return{key:`${e}:${t.index}`,series:ee[e],label:t.label,value:n,x:r,y:i,rowKey:t.keyValue,selectable:a,selected:a&&t.keyValue===T}},we=[];if(_===`bar`){let e=he*.76,t=Math.max(1,e/Math.max(1,ae.length));F.forEach((n,i)=>{ae.forEach((a,o)=>{let s=n.values[a];if(s===null)return;let c=fe+he*i+(he-e)/2+o*t,l=Math.max(1,Math.abs(me(s)-I)),u=s>=0?I-l:I,d=Math.max(1.5,t-1),f=Math.min(4,d/2,l/2),p=Ce(a,n,s,c+t/2,u+l/2);we.push((0,Z.jsx)(`rect`,{className:`local-visual-bar${p.selected?` is-selected`:``}`,x:c,y:u,width:d,height:l,rx:f,style:{fill:mp[a%mp.length]},...Se(p),children:(0,Z.jsx)(`title`,{children:r(`${p.series}, ${p.label}: ${Ap(p.value)}`,`${p.series},${p.label}:${Ap(p.value)}`)})},`bar-${a}-${n.index}`))})})}let Te=[],Ee=[],De=[];if(_===`line`||_===`area`)for(let e of ae){let t=[],n=[],i=()=>{n.length>0&&t.push(n),n=[]};F.forEach((t,r)=>{let a=t.values[e],o=ve(t,r);a===null||o===null?i():n.push({row:t,value:a,x:o,y:me(a)})}),i();for(let n of t){if(n.length>=2){let t=n.map((e,t)=>`${t===0?`M`:`L`} ${e.x} ${e.y}`).join(` `);if(Te.push((0,Z.jsx)(`path`,{className:`local-visual-line`,d:t,fill:`none`,style:{stroke:mp[e%mp.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`line-${e}-${n[0].row.index}`)),_===`area`){let t=I,r=n[0],i=n[n.length-1],a=`M ${r.x} ${t} ${n.map(e=>`L ${e.x} ${e.y}`).join(` `)} L ${i.x} ${t} Z`;Ee.push((0,Z.jsx)(`path`,{className:`local-visual-area`,d:a,style:{fill:mp[e%mp.length]}},`area-${e}-${r.row.index}`))}}for(let t of n){let n=Ce(e,t.row,t.value,t.x,t.y);De.push((0,Z.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,Z.jsx)(`circle`,{className:`local-visual-hit${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:12,fill:`transparent`,...Se(n),children:(0,Z.jsx)(`title`,{children:r(`${n.series}, ${n.label}: ${Ap(n.value)}`,`${n.series},${n.label}:${Ap(n.value)}`)})}),(0,Z.jsx)(`circle`,{className:`local-visual-point${n.selected?` is-selected`:``}`,cx:t.x,cy:t.y,r:4.5,style:{fill:mp[e%mp.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`point-${e}-${t.row.index}`))}}}_===`scatter`&&F.forEach((e,t)=>{let n=ve(e,t);n!==null&&ae.forEach(t=>{let i=e.values[t];if(i===null)return;let a=me(i),o=Ce(t,e,i,n,a);De.push((0,Z.jsxs)(`g`,{className:`local-visual-point-group`,children:[(0,Z.jsx)(`circle`,{className:`local-visual-hit${o.selected?` is-selected`:``}`,cx:n,cy:a,r:15,fill:`transparent`,...Se(o),children:(0,Z.jsx)(`title`,{children:r(`${o.series}, ${o.label}: ${Ap(o.value)}`,`${o.series},${o.label}:${Ap(o.value)}`)})}),(0,Z.jsx)(`circle`,{className:`local-visual-point${o.selected?` is-selected`:``}`,cx:n,cy:a,r:6,style:{fill:mp[t%mp.length],stroke:`var(--surface)`},strokeWidth:1.5,pointerEvents:`none`})]},`scatter-${t}-${e.index}`))})});let Oe=l?r(`${l.series} · ${l.label}: ${Ap(l.value)}`,`${l.series} · ${l.label}:${Ap(l.value)}`):r(`Focus or point at a mark; use arrow keys to change the readout`,`聚焦或指向图形,用方向键切换读数`),ke=r(`${h}, ${_} chart, ${F.length} items, ${ae.length} series`,`${h},${_} 图,共 ${F.length} 项,${ae.length} 个系列`);return(0,Z.jsxs)(em,{className:`local-visual-chart local-visual-chart-${_}${i?` local-static-chart`:``}`,label:h,children:[i?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:m,"aria-live":`polite`,children:Oe}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${hp} ${gp}`,role:`group`,"aria-label":ke,"aria-describedby":i?void 0:m,children:[de.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-grid-line`,x1:fe,x2:506,y1:me(e),y2:me(e)}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:fe-6,y:me(e),textAnchor:`end`,dominantBaseline:`middle`,children:jp(e)})]},`y-${e}`)),ue.min<0&&ue.max>0?(0,Z.jsx)(`line`,{className:`local-visual-zero-line`,x1:fe,x2:506,y1:I,y2:I}):null,(0,Z.jsx)(`line`,{className:`local-visual-axis-line`,x1:fe,x2:506,y1:274,y2:274}),ye.map(e=>{let t=be(e),n=L?jp(e):Lp(F[e]?.label??``,8);return(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-tick`,x1:t,x2:t,y1:274,y2:279}),(0,Z.jsxs)(`text`,{className:`local-visual-axis-label`,x:t,y:293,textAnchor:`middle`,children:[n,!L&&F[e]?(0,Z.jsx)(`title`,{children:F[e].label}):null]})]},`x-${e}`)}),v?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,x:(fe+506)/2,y:318,textAnchor:`middle`,children:v}):null,b?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:b}):null,Ee,Te,xe,we,De]})}),(0,Z.jsx)(rm,{items:ie,hidden:a,onToggle:ne,label:r(`Legend, toggle series`,`图例,可开关系列`),mode:n}),d?(0,Z.jsx)(tm,{message:d,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:O})]})}var cm=64,lm=new WeakMap,um=new WeakMap;function dm(e,t){let n=lm.get(e);return n&&n.revision===t||(n={revision:t,requestedPoints:new Map,evaluation:{steps:0,limit:k}},lm.set(e,n)),n}function fm(e){let t=um.get(e);return t||(t=new Map,um.set(e,t)),t}function pm(e,t,n){if(e.size>=cm){let t=e.keys().next().value;t!==void 0&&e.delete(t)}return e.set(t,n),n}function mm(e,t,n){return e.map(e=>{let r=/^y\s*=\s*([\s\S]+)$/.exec((e.value??``).trim());if(!r)return`\u0003${n}`;try{let e=Mn(r[1].trim());return JSON.stringify(e.dependencies.map(e=>t[e]??null))}catch{return`\u0003${n}`}}).join(``)}function hm(e,t,n,r,i,a,o,s,c,l=lp){let u=fm(s),d=u.get(t);if(d)return d;let f=dm(s,c),p=e=>pm(u,t,{ok:!1,message:e});if(n.length>16)return p(l(`plot supports at most 16 curves, but has ${n.length}.`,`plot 最多支持 16 条曲线,当前为 ${n.length} 条。`));let m=n.length*o;f.requestedPoints.set(e,m);let h=0;for(let e of f.requestedPoints.values())h+=e;if(h>2e4)return p(l(`The document's plot sample count exceeds the limit: ${h} requested, at most ${O} allowed. Reduce curves or samples.`,`整篇文档的绘图采样点超过上限:已请求 ${h} 个,最多 ${O} 个。请减少曲线或采样数。`));let g=[],_={message:null},v=n.map((e,t)=>{let n=(e.value??``).trim(),s=/^y\s*=\s*([\s\S]+)$/.exec(n);if(!s)return g.push(l(`Curve ${t+1}: cannot compute (each formula block must be written as y = expression).`,`曲线 ${t+1}:无法计算(每块公式需写成 y = 表达式)。`)),{source:n,expression:null,points:[],endpoint:null,error:`formula`};try{let e=Mn(s[1].trim()),t=In(e,r,i,a,o,f.evaluation);return{source:n,expression:e,points:t.points,endpoint:t.endpoint,error:null}}catch(e){return e instanceof B&&e.code===`latex-budget`?(_.message=e.message,{source:n,expression:null,points:[],endpoint:null,error:e.message}):(g.push(l(`Curve ${t+1}: cannot compute (${Mp(e)}).`,`曲线 ${t+1}:无法计算(${Mp(e)})。`)),{source:n,expression:null,points:[],endpoint:null,error:Mp(e)})}});return _.message===null?pm(u,t,{ok:!0,curves:v,notes:g}):p(l(`Plot computation exceeded the shared execution budget: ${_.message}`,`绘图计算超过共享执行预算:${_.message}`))}function gm(e){if(e.length===0)return 0;let t=[...e].sort((e,t)=>e-t),n=Math.floor(t.length/2);return t.length%2==0?(t[n-1]+t[n])/2:t[n]}function _m(e,t,n,r){let i=[],a=[],o=(e,i)=>{let a=Math.abs(i.y-e.y),o=e.y*i.y<0&&Math.min(Math.abs(e.y),Math.abs(i.y))>Math.max(1,n*8),s=a>t*.8&&a>Math.max(r,1e-9)*10;return o||s};for(let t of e){if(t.y===null){a.length>0&&i.push(a),a=[];continue}let e={x:t.x,y:t.y},n=a[a.length-1];n&&o(n,e)&&(i.push(a),a=[]),a.push(e)}return a.length>0&&i.push(a),i}function vm({node:e,runtime:t,mode:n}){let r=Q(),i=fp(),a=n===`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=(0,y.useId)(),u=Np(t,e.attrs,`label`,``)||r(`Function plot`,`函数图`),d=Np(t,e.attrs,`x-label`,`x`),f=Np(t,e.attrs,`y-label`,`y`),p=Pp(t,e.attrs,`min`,-10),m=Pp(t,e.attrs,`max`,10),h=Math.min(2e3,Math.max(2,Ip(t,e.attrs,`samples`,200))),g=(e.children??[]).filter(e=>e.type===`math`||e.type===`inlineMath`),_=(()=>{try{return{...t.snapshot().state}}catch{return{}}})(),v=0;try{v=t.snapshot().revision}catch{v=0}let b=g.map(e=>`${e.id}\u0000${e.value??``}`).join(``),x=`${e.id}\u0000${p}\u0000${m}\u0000${h}\u0000${i}\u0000${b}`,S=mm(g,_,v),C=`${x}\u0002${S}`,w=(0,y.useMemo)(()=>g.length===0||p===null||m===null||!(m>p)?{ok:!0,curves:[],notes:[]}:hm(e.id,C,g,_,p,m,h,t,v,r),[x,S,e.id,t,r]);if(g.length===0)return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:r(`plot body requires one or more $$ formula blocks.`,`plot 正文需要一个或多个 $$ 公式块。`),kind:`alert`})});if(p===null||m===null||!(m>p))return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:r(`plot min must be less than max.`,`plot 的 min 必须小于 max。`),kind:`alert`})});if(!w.ok)return(0,Z.jsx)(em,{className:`local-visual-plot`,label:u,children:(0,Z.jsx)(tm,{message:w.message,kind:`alert`})});let{curves:T,notes:E}=w,D=T.flatMap(e=>e.points.filter(e=>e.y!==null&&Number.isFinite(e.y))),O=(0,Z.jsx)(`div`,{className:`local-visual-plot-legend`,role:`list`,"aria-label":r(`Curve legend`,`曲线图例`),children:T.map((e,t)=>(0,Z.jsxs)(`div`,{className:`local-visual-plot-legend-item`,role:`listitem`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:mp[t%mp.length]},"aria-hidden":`true`}),(0,Z.jsx)(`span`,{className:`local-visual-plot-legend-text`,children:(0,Z.jsx)(`span`,{className:`local-visual-plot-formula`,children:(0,Z.jsx)(sp,{source:e.source})})})]},`curve-legend-${t}`))});if(D.length===0)return(0,Z.jsxs)(em,{className:`local-visual-plot`,label:u,children:[(0,Z.jsx)(tm,{message:r(`No plottable values in the current range`,`当前范围内没有可绘制的值`)}),(0,Z.jsx)(nm,{notes:E}),O]});let A=Vp(D.map(e=>e.y),!1),j=Bp(A.min,A.max,5),M=Bp(p,m,5),N=Hp(j,!!f),ee=506-N,P=e=>N+(e-p)/(m-p)*ee,te=e=>16+(A.max-e)/(A.max-A.min)*258,F=gm(D.map(e=>Math.abs(e.y))),ne=[];for(let e of T)for(let t=1;t<e.points.length;t+=1){let n=e.points[t-1],r=e.points[t];n.y!==null&&r.y!==null&&ne.push(Math.abs(r.y-n.y))}let re=gm(ne),ie=A.max-A.min,ae=T.map(e=>_m(e.points,ie,F,re)),oe={steps:0,limit:k},se=(e,t)=>{if(!e.expression)return null;try{let n=e.expression.evaluate(t,_,oe);return typeof n==`number`&&Number.isFinite(n)?n:null}catch{return null}},ce=e=>Math.max(p,Math.min(m,e)),le=(m-p)/100,ue=e=>{let t=e.currentTarget.getBoundingClientRect();if(t.width===0)return;let n=Math.max(0,Math.min(1,(e.clientX-t.left)/t.width));s(p+n*(m-p))},de=e=>{let t=e.shiftKey?10:1,n=o;if(e.key===`ArrowRight`)n=(o??(p+m)/2)+le*t;else if(e.key===`ArrowLeft`)n=(o??(p+m)/2)-le*t;else if(e.key===`Home`)n=p;else if(e.key===`End`)n=m;else return;e.preventDefault(),s(ce(n))},fe=a||o===null?null:ce(o),pe=fe===null?r(`Range [${Ap(p)}, ${Ap(m)}] · ${h} samples; use arrow keys or pointer to read values`,`区间 [${Ap(p)}, ${Ap(m)}] · ${h} 个采样点;用方向键或指针读取数值`):`${r(`x = ${Ap(fe)}; `,`x = ${Ap(fe)};`)}${T.map((e,t)=>{let n=se(e,fe),i=e.error?r(`cannot compute`,`无法计算`):n===null?r(`undefined`,`无定义`):Ap(n);return r(`Curve ${t+1}: `,`曲线 ${t+1}:`)+i}).join(r(`; `,`;`))}`,me=fe===null?null:T.map((e,t)=>{let n=se(e,fe);return n===null||!e.expression?null:(0,Z.jsx)(`circle`,{className:`local-visual-active-point`,cx:P(fe),cy:te(n),r:4.5,style:{fill:mp[t%mp.length],stroke:`var(--surface)`},strokeWidth:1.5},`active-${t}`)});return(0,Z.jsxs)(em,{className:`local-visual-plot`,label:u,children:[a?null:(0,Z.jsx)(`div`,{className:`local-visual-readout`,id:l,"aria-live":`polite`,children:pe}),(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg`,viewBox:`0 0 ${_p} ${vp}`,role:`group`,"aria-label":r(`${u}, range ${Ap(p)} to ${Ap(m)}, ${h} samples`,`${u},区间 ${Ap(p)} 到 ${Ap(m)},${h} 个采样点`),"aria-describedby":a?void 0:l,tabIndex:a?void 0:0,onPointerMove:a?void 0:ue,onPointerLeave:a?void 0:()=>s(null),onFocus:a?void 0:()=>s(e=>e??(p+m)/2),onBlur:a?void 0:()=>s(null),onKeyDown:a?void 0:de,children:[j.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-grid-line`,x1:N,x2:506,y1:te(e),y2:te(e)}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:N-6,y:te(e),textAnchor:`end`,dominantBaseline:`middle`,children:jp(e)})]},`y-${e}`)),A.min<0&&A.max>0?(0,Z.jsx)(`line`,{className:`local-visual-zero-line`,x1:N,x2:506,y1:te(0),y2:te(0)}):null,(0,Z.jsx)(`line`,{className:`local-visual-axis-line`,x1:N,x2:506,y1:274,y2:274}),M.map(e=>(0,Z.jsxs)(`g`,{children:[(0,Z.jsx)(`line`,{className:`local-visual-tick`,x1:P(e),x2:P(e),y1:274,y2:279}),(0,Z.jsx)(`text`,{className:`local-visual-axis-label`,x:P(e),y:293,textAnchor:`middle`,children:jp(e)})]},`x-${e}`)),d?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,x:(N+506)/2,y:318,textAnchor:`middle`,children:d}):null,f?(0,Z.jsx)(`text`,{className:`local-visual-axis-title`,transform:`translate(12 145) rotate(-90)`,textAnchor:`middle`,children:f}):null,ae.map((e,t)=>e.map((e,n)=>{if(e.length<2)return null;let r=e.map((e,t)=>`${t===0?`M`:`L`} ${P(e.x)} ${te(e.y)}`).join(` `);return(0,Z.jsx)(`path`,{className:`local-visual-plot-line`,d:r,fill:`none`,style:{stroke:mp[t%mp.length]},strokeWidth:2.4,strokeLinejoin:`round`,strokeLinecap:`round`},`curve-${t}-${n}`)})),fe===null?null:(0,Z.jsx)(`line`,{className:`local-visual-guide`,x1:P(fe),x2:P(fe),y1:16,y2:274}),me]})}),(0,Z.jsx)(nm,{notes:E}),O]})}var ym={title:`Task`,start:`Start`,duration:`Duration`,notes:`Notes`},bm={title:`事项`,start:`开始`,duration:`时长`,notes:`说明`};function xm(e){let t=t=>e.includes(t.title)&&e.includes(t.start)&&e.includes(t.duration);return t(ym)?ym:t(bm)?bm:null}function Sm({node:e,runtime:t,render:n,mode:r}){let i=Q(),a=r!==`static`,[o,s]=(0,y.useState)(null),c=t.resetToken(e);(0,y.useEffect)(()=>{s(null)},[c]);let l=Np(t,e.attrs,`title`,``)||i(`Timeline`,`时间轴`),u=Np(t,e.attrs,`unit`,i(`minutes`,`分钟`)),d=Yp(e,t,i);if(!d)return(0,Z.jsx)(em,{className:`local-visual-timeline`,label:l,children:(0,Z.jsx)(tm,{message:i(`timeline body requires a Markdown table.`,`timeline 正文需要一个 Markdown 表格。`),kind:`alert`})});let f=d.headerText.map(e=>e.trim()),p=xm(f),m=p?f.indexOf(p.title):-1,h=p?f.indexOf(p.start):-1,g=p?f.indexOf(p.duration):-1,_=p?f.indexOf(p.notes):-1;if(!p||m<0||h<0||g<0)return(0,Z.jsx)(em,{className:`local-visual-timeline`,label:l,children:(0,Z.jsx)(tm,{message:i(`timeline table requires the "Task", "Start" and "Duration" columns.`,`timeline 表格需要“事项”“开始”“时长”三列,或“Task”“Start”“Duration”三列。`),kind:`alert`})});let v=[],b=[],x=[];if(d.rows.forEach((e,t)=>{let n=e.cells[h],r=e.cells[g],a=n?.numeric??null,o=r?.numeric??null;if(a===null||o===null||a<0||o<0){b.push(t+1);return}let s=Jp(e.cells[m],i)||i(`Task ${t+1}`,`事项 ${t+1}`);x.push({key:`item-${e.index}`,title:s,start:a,duration:o,description:_>=0?e.cells[_]?.children??[]:[],sourceIndex:t})}),b.length>0&&v.push(i(`Rows ${b.join(`, `)} have an invalid start or duration (must be non-negative numbers) and are hidden.`,`第 ${b.join(`、`)} 行的开始或时长不是非负数字,未显示。`)),x.length===0)return(0,Z.jsxs)(em,{className:`local-visual-timeline`,label:l,children:[(0,Z.jsx)(tm,{message:i(`No valid timeline items.`,`没有有效的时间轴事项。`)}),(0,Z.jsx)(nm,{notes:v})]});let S=[...x].sort((e,t)=>e.start-t.start||e.sourceIndex-t.sourceIndex),C=S.reduce((e,t)=>Math.max(e,t.start+t.duration),0),w=Math.max(1,C),T=Bp(0,w,5);(T.length===0||T[0]!==0)&&T.unshift(0),T[T.length-1]<w&&T.push(w);let E=u?` ${u}`:``,D=e=>`${Ap(e)}${E}`,O=S.find(e=>e.key===o)??null;return(0,Z.jsxs)(em,{className:`local-visual-timeline${a?``:` local-static-timeline`}`,label:l,children:[(0,Z.jsx)(`div`,{className:`local-visual-timeline-axis`,"aria-hidden":`true`,children:T.map((e,t)=>{let n=e/w*100,r=t===T.length-1?{left:`${n}%`,transform:`translateX(-100%)`}:t===0?{left:`0%`}:{left:`${n}%`,transform:`translateX(-50%)`};return(0,Z.jsx)(`span`,{className:`local-visual-timeline-tick`,style:r,children:jp(e)},`tick-${e}`)})}),(0,Z.jsx)(`ol`,{className:`local-visual-timeline-list`,children:S.map(e=>{let t=e.start+e.duration,r=e.start/w*100,c=e.duration/w*100,l=S.indexOf(e);return(0,Z.jsxs)(`li`,{className:`local-visual-timeline-item${a&&o===e.key?` is-active`:``}${a?``:` local-static-timeline-item`}`,tabIndex:a?0:void 0,"aria-label":a?i(`${e.title}, started ${D(e.start)}, ended ${D(t)}, duration ${D(e.duration)}${e.description.length>0?`, with notes`:``}`,`${e.title},开始 ${D(e.start)},结束 ${D(t)},时长 ${D(e.duration)}${e.description.length>0?`,有说明`:``}`):void 0,onFocus:a?()=>s(e.key):void 0,onBlur:a?()=>s(t=>t===e.key?null:t):void 0,onPointerEnter:a?()=>s(e.key):void 0,onPointerLeave:a?()=>s(t=>t===e.key?null:t):void 0,onKeyDown:a?e=>{e.key===`Escape`&&(e.preventDefault(),s(null))}:void 0,children:[(0,Z.jsxs)(`div`,{className:`local-visual-timeline-head`,children:[(0,Z.jsxs)(`span`,{className:`local-visual-timeline-title`,children:[(0,Z.jsx)(`span`,{className:`local-visual-swatch`,style:{backgroundColor:mp[l%mp.length]},"aria-hidden":`true`}),e.title]}),(0,Z.jsxs)(`span`,{className:`local-visual-timeline-times`,children:[i(`Started`,`开始`),` `,D(e.start),` · `,i(`Ended`,`结束`),` `,D(t),` · `,i(`Duration`,`时长`),` `,D(e.duration)]})]}),(0,Z.jsx)(`div`,{className:`local-visual-timeline-track`,"aria-hidden":`true`,children:(0,Z.jsx)(`span`,{className:`local-visual-timeline-bar${e.duration===0?` is-zero`:``}`,style:{left:`${r}%`,width:`${c}%`,backgroundColor:mp[l%mp.length]}})}),a||e.description.length===0?null:(0,Z.jsx)(`div`,{className:`local-visual-timeline-detail local-static-timeline-detail`,children:n(e.description)})]},e.key)})}),a?(0,Z.jsx)(`div`,{className:`local-visual-timeline-detail`,"aria-live":`polite`,children:O?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`strong`,{children:O.title}),O.description.length>0?n(O.description):(0,Z.jsx)(`span`,{children:i(`No notes.`,`没有说明。`)})]}):(0,Z.jsx)(`span`,{children:i(`Focus or point at an item to view its notes.`,`聚焦或指向事项查看说明。`)})}):null,(0,Z.jsx)(nm,{notes:v})]})}var Cm=/[\u1100-\u115f\u2e80-\u303f\u3040-\u33ff\u3400-\u4dbf\u4e00-\u9fff\uac00-\ud7af\uf900-\ufaff\ufe30-\ufe4f\uff00-\uff60\uffe0-\uffe6]/u;function wm(e){let t=0;for(let n of e)Cm.test(n)?t+=1:/\s/u.test(n)?t+=.3:t+=.58;return t*Cp}function Tm(e,t){if(wm(e)<=t)return e;let n=``;for(let r of e){if(wm(`${n}${r}…`)>t)break;n+=r}return`${n.trimEnd()}…`}function Em(e){let t=[],n=``;for(let r of e)n&&wm(n+r)>Tp?(t.push(n),n=r):n+=r;if(n&&t.push(n),t.length<=Ep)return t;let r=t.slice(0,Ep);return r[1]=Tm(t.slice(1).join(``),Tp),r}function Dm(e){let t=Em(e);return{width:t.reduce((e,t)=>Math.max(e,wm(t)),0)+10,height:t.length*Dp+6,lines:t}}function Om(e){let t=new Map;for(let n of e){let e=`${n.from}\u0000${n.to}`;t.set(e,(t.get(e)??0)+1)}let n=new Map,r=new Map;for(let i of e){let e=`${i.from}\u0000${i.to}`,a=t.get(e)??1,o=n.get(e)??0;n.set(e,o+1),r.set(i.key,(o-(a-1)/2)*12)}return r}function km(e,t,n){let{width:r,height:i,positions:a}=e,o=Om(t),s=1/0,c=1/0,l=-1/0,u=-1/0;for(let e of t){if(!e.label)continue;let t=a.get(e.from),r=a.get(e.to);if(!t||!r)continue;let i=jm(n,t,r,o.get(e.key)??0,e.from===e.to),d=Dm(e.label);s=Math.min(s,i.labelX-d.width/2),c=Math.min(c,i.labelY-d.height/2),l=Math.max(l,i.labelX+d.width/2),u=Math.max(u,i.labelY+d.height/2)}if(!Number.isFinite(s))return e;let d=Math.max(0,wp-s),f=Math.max(0,wp-c),p=Math.max(0,l+wp-r),m=Math.max(0,u+wp-i);if(d===0&&f===0&&p===0&&m===0)return e;for(let e of a.values())e.x+=d,e.y+=f;return{width:r+d+p,height:i+f+m,positions:a}}function Am(e,t,n){let r=e.map(e=>e.id),i=new Map(r.map((e,t)=>[e,t])),a=new Set(r),o=new Map(r.map(e=>[e,[]]));for(let e of t)e.from!==e.to&&a.has(e.from)&&a.has(e.to)&&o.get(e.from).push(e.to);let s=new Map,c=new Map,l=new Set,u=[],d=[],f=0,p=e=>{s.set(e,f),c.set(e,f),f+=1,u.push(e),l.add(e);for(let t of o.get(e)??[])s.has(t)?l.has(t)&&c.set(e,Math.min(c.get(e),s.get(t))):(p(t),c.set(e,Math.min(c.get(e),c.get(t))));if(c.get(e)===s.get(e)){let t=[],n;do n=u.pop(),l.delete(n),t.push(n);while(n!==e);d.push(t.reverse())}};for(let e of r)s.has(e)||p(e);let m=new Map;d.forEach((e,t)=>{for(let n of e)m.set(n,t)});let h=d.map(()=>new Set),g=d.map(()=>0);for(let e of t){if(!a.has(e.from)||!a.has(e.to))continue;let t=m.get(e.from),n=m.get(e.to);t===n||h[t].has(n)||(h[t].add(n),g[n]+=1)}let _=d.map((e,t)=>({index:t,order:Math.min(...e.map(e=>i.get(e)??0))})),v=_.filter(e=>g[e.index]===0).map(e=>e.index).sort((e,t)=>_[e].order-_[t].order),y=d.map(()=>0);for(;v.length>0;){let e=v.shift();for(let t of h[e])y[t]=Math.max(y[t],y[e]+1),--g[t],g[t]===0&&v.push(t)}let b=Math.max(1,...y)+1,x=Array.from({length:b},()=>[]);for(let e of r)x[y[m.get(e)]].push(e);let S=x.filter(e=>e.length>0),C=Math.max(1,...S.map(e=>e.length)),w=new Map,T,E;if(n===`down`)T=yp,E=Math.max(240,106+(S.length-1)*120),S.forEach((e,t)=>{let n=53+t*120;e.forEach((t,r)=>{let i=e.length===1?T/2:104+r*((T-88-bp)/(e.length-1));w.set(t,{x:i,y:n})})});else{let e=t.reduce((e,t)=>t.label?Math.max(e,Dm(t.label).width):e,0),n=Math.max(Sp,bp+(e>0?e+24:0));T=Math.max(yp,208+(S.length-1)*n),E=Math.max(240,106+(C-1)*74),S.forEach((e,t)=>{let n=S.length===1?T/2:104+t*((T-88-bp)/(S.length-1));e.forEach((t,r)=>{let i=e.length===1?E/2:53+r*((E-60-xp)/(e.length-1));w.set(t,{x:n,y:i})})})}return km({width:T,height:E,positions:w},t,n)}function jm(e,t,n,r,i){let a=bp,o=xp;if(i)return e===`right`?{d:`M ${t.x+20} ${t.y-o/2} C ${t.x+64} ${t.y-o/2-64}, ${t.x-64} ${t.y-o/2-64}, ${t.x-20} ${t.y-o/2}`,labelX:t.x,labelY:t.y-o/2-46}:{d:`M ${t.x+a/2} ${t.y-10} C ${t.x+a/2+64} ${t.y-54}, ${t.x+a/2+64} ${t.y+54}, ${t.x+a/2} ${t.y+10}`,labelX:t.x+a/2+44,labelY:t.y};if(e===`right`){if(n.x>t.x){let e=t.x+a/2,i=t.y+r,o=n.x-a/2,s=n.y+r;return{d:`M ${e} ${i} L ${o} ${s}`,labelX:(e+o)/2,labelY:(i+s)/2-12}}let e=t.x+r,i=n.x+r,s=t.y+o/2,c=n.y-o/2,l=Math.max(70,Math.abs(i-e)*.45);return{d:`M ${e} ${s} C ${e+l} ${s+86}, ${i-l} ${c+86}, ${i} ${c}`,labelX:(e+i)/2,labelY:Math.max(s,c)+48}}if(n.y>t.y){let e=t.x+r,i=n.x+r,a=t.y+o/2,s=n.y-o/2;return{d:`M ${e} ${a} L ${i} ${s}`,labelX:(e+i)/2+10,labelY:(a+s)/2}}let s=t.x+a/2,c=n.x-a/2,l=t.y+r,u=n.y+r,d=Math.max(70,Math.abs(u-l)*.45);return{d:`M ${s} ${l} C ${s+86} ${l+d}, ${c+86} ${u-d}, ${c} ${u}`,labelX:Math.max(s,c)+48,labelY:(l+u)/2}}function Mm({node:e,runtime:t,render:n,mode:r}){let i=Q(),a=r!==`static`,[o,s]=(0,y.useState)(null),[c,l]=(0,y.useState)(null),u=t.resetToken(e);(0,y.useEffect)(()=>{s(null),l(null)},[u]);let d=(0,y.useId)().replace(/[^a-zA-Z0-9_-]/g,``),f=`local-diagram-arrow-${d}`,p=`local-diagram-description-${d}`,m=Np(t,e.attrs,`label`,``)||i(`Diagram`,`图解`),h=(e.attrs?.direction??`right`).trim().toLowerCase()===`down`?`down`:`right`,g=e.children?.filter(e=>e.type===`component`)??[],_=[],v=[],b=new Set;for(let e of g){if(e.name!==`node`)continue;let n=(e.attrs?.id??``).trim();if(!n){_.push(i(`Ignored a node without an id.`,`已忽略缺少 id 的节点。`));continue}if(b.has(n)){_.push(i(`Duplicate node id ${n}; ignored the later node.`,`节点 id 重复(${n}),已忽略后一个节点。`));continue}b.add(n);let r=Np(t,e.attrs,`tone`,`neutral`).trim(),a=r===`success`||r===`warning`?r:`neutral`;v.push({id:n,label:Np(t,e.attrs,`label`,n)||n,tone:a,children:e.children??[]})}let x=[],S=new Set;for(let e of g){if(e.name!==`edge`)continue;let n=(e.attrs?.from??``).trim(),r=(e.attrs?.to??``).trim();if(!n||!r||!b.has(n)||!b.has(r)){_.push(i(`Edge ${n||`?`} → ${r||`?`} references a missing endpoint; ignored.`,`连线 ${n||`?`} → ${r||`?`} 缺少端点,已忽略。`));continue}let a=Np(t,e.attrs,`label`,``),o=`${n}\u0000${r}\u0000${a}`;S.has(o)?_.push(i(`Duplicate edge: ${n} → ${r}${a?` (${a})`:``}; ignored.`,`重复连线:${n} → ${r}${a?`(${a})`:``},已忽略。`)):(S.add(o),x.push({key:o,from:n,to:r,label:a}))}if(v.length===0)return(0,Z.jsxs)(em,{className:`local-visual-diagram`,label:m,children:[(0,Z.jsx)(tm,{message:`diagram requires at least one node.`,kind:`alert`}),(0,Z.jsx)(nm,{notes:_})]});let C=null;try{let n=t.get(e);typeof n==`string`&&(C=n)}catch{C=null}let w=new Set(v.map(e=>e.id)),T=(e.attrs?.initial??``).trim(),E=T&&w.has(T)?T:v[0].id,D=C&&w.has(C)?C:o&&w.has(o)?o:E,O=v.find(e=>e.id===D)??v[0],k=C&&w.has(C)?C:T&&w.has(T)?T:null,A=n=>{s(n),l(null);try{let r=t.set(e,n);r.length>0&&l(r.map(e=>i(tt(e,`en`),tt(e,`zh`))).join(`; `))}catch(e){l(Mp(e))}},j=Am(v,x,h),M=Om(x),N=[],ee=[];for(let e of x){let t=j.positions.get(e.from),n=j.positions.get(e.to);if(!t||!n)continue;let r=jm(h,t,n,M.get(e.key)??0,e.from===e.to);if(N.push((0,Z.jsx)(`g`,{className:`local-visual-edge`,children:(0,Z.jsx)(`path`,{d:r.d,fill:`none`,style:{stroke:`var(--ink-muted)`},strokeWidth:1.6,markerEnd:`url(#${f})`})},`edge-${e.key}`)),!e.label)continue;let i=Dm(e.label);ee.push((0,Z.jsx)(`g`,{className:`local-visual-edge-label-group`,children:(0,Z.jsx)(`text`,{className:`local-visual-edge-label`,x:r.labelX,y:r.labelY,textAnchor:`middle`,dominantBaseline:`middle`,children:i.lines.map((e,t)=>(0,Z.jsx)(`tspan`,{x:r.labelX,y:r.labelY+(t-(i.lines.length-1)/2)*Dp,children:e},t))})},`edge-label-${e.key}`))}return(0,Z.jsxs)(em,{className:`local-visual-diagram${a?``:` local-static-diagram`}`,label:m,children:[(0,Z.jsx)(`div`,{className:`local-visual-svg-wrap`,children:(0,Z.jsxs)(`svg`,{className:`local-visual-svg local-visual-diagram-svg`,viewBox:`0 0 ${j.width} ${j.height}`,role:`group`,"aria-label":a?`${m}, with ${v.length} nodes and ${x.length} edges; press Tab to focus a node and Enter to select`:i(`${m}, with ${v.length} nodes and ${x.length} edges`,`${m},共 ${v.length} 个节点、${x.length} 条连线`),"aria-describedby":p,children:[(0,Z.jsx)(`defs`,{children:(0,Z.jsx)(`marker`,{id:f,viewBox:`0 0 10 10`,refX:`9`,refY:`5`,markerWidth:`7`,markerHeight:`7`,orient:`auto-start-reverse`,children:(0,Z.jsx)(`path`,{d:`M 0 0 L 10 5 L 0 10 z`,style:{fill:`var(--ink-muted)`}})})}),N,v.map(e=>{let t=j.positions.get(e.id);if(!t)return null;let n=a?e.id===D:k!==null&&e.id===k,r=Rp(e.label,8,2);return(0,Z.jsxs)(`g`,{className:`local-visual-node local-visual-node-${e.tone}${n?` is-selected`:``}`,"data-diagram-node":a?``:void 0,transform:`translate(${t.x} ${t.y})`,role:a?`button`:void 0,tabIndex:a?0:void 0,"aria-pressed":a?n:void 0,"aria-label":a?e.label:void 0,onClick:a?()=>A(e.id):void 0,onKeyDown:a?t=>{Wp(t)?(t.preventDefault(),A(e.id)):t.key===`ArrowRight`||t.key===`ArrowDown`?Up(t,`[data-diagram-node]`,1):(t.key===`ArrowLeft`||t.key===`ArrowUp`)&&Up(t,`[data-diagram-node]`,-1)}:void 0,children:[(0,Z.jsx)(`title`,{children:e.label}),(0,Z.jsx)(`rect`,{className:`local-visual-node-shape`,x:-60,y:-23,width:bp,height:xp,rx:10}),(0,Z.jsx)(`text`,{className:`local-visual-node-text`,textAnchor:`middle`,children:r.map((e,t)=>(0,Z.jsx)(`tspan`,{x:0,y:(t-(r.length-1)/2)*16+4,children:e},t))})]},`node-${e.id}`)}),ee]})}),a?(0,Z.jsx)(`div`,{className:`local-visual-diagram-detail`,"aria-live":`polite`,children:O?(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`strong`,{children:O.label}),O.children.length>0?n(O.children):(0,Z.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})]}):(0,Z.jsx)(`span`,{children:i(`Click a node, or focus it with Tab and press Enter, to view its description.`,`点击节点,或用 Tab 聚焦后按 Enter 查看说明。`)})}):(0,Z.jsx)(`div`,{className:`local-visual-diagram-detail local-static-diagram-detail`,children:(0,Z.jsx)(`dl`,{className:`local-static-diagram-nodes`,children:v.map(e=>(0,Z.jsxs)(`div`,{className:`local-static-diagram-node`,children:[(0,Z.jsx)(`dt`,{children:e.label}),(0,Z.jsx)(`dd`,{children:e.children.length>0?n(e.children):(0,Z.jsx)(`span`,{children:i(`This node has no description.`,`此节点没有说明。`)})})]},`static-node-${e.id}`))})}),(0,Z.jsxs)(`ul`,{id:p,className:`local-visual-sr-only`,"aria-label":i(`Nodes and edges`,`节点与连线`),children:[v.map(e=>(0,Z.jsx)(`li`,{children:e.label},`description-node-${e.id}`)),x.map(e=>{let t=v.find(t=>t.id===e.from),n=v.find(t=>t.id===e.to);return(0,Z.jsxs)(`li`,{children:[t?.label??e.from,` → `,n?.label??e.to,e.label?` (${e.label})`:``]},`description-edge-${e.key}`)})]}),c?(0,Z.jsx)(tm,{message:c,kind:`alert`}):null,(0,Z.jsx)(nm,{notes:_})]})}function Nm(e){let t={...e,mode:e.mode??`interactive`};switch(t.node.name){case`table`:return(0,Z.jsx)(im,{...t});case`chart`:return(0,Z.jsx)(sm,{...t});case`plot`:return(0,Z.jsx)(vm,{...t});case`timeline`:return(0,Z.jsx)(Sm,{...t});case`diagram`:return(0,Z.jsx)(Mm,{...t});default:return null}}var Pm=class extends Error{failure;constructor(e){super(e),this.name=`DataTableFailureError`,this.failure=e}};function Fm(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function Im(e){return typeof e==`string`?e===``?null:`s:${e}`:typeof e==`number`&&Number.isFinite(e)?`n:${e===0?0:e}`:null}function Lm(e,t,n){let r={...n};for(let i of t)Object.hasOwn(n,i)||Object.defineProperty(r,i,{enumerable:!0,configurable:!0,get(){return e.evaluate(i)}});return r}function Rm(e){if(e.length===0)return null;let t=typeof e[0];if(t!==`string`&&t!==`number`)return`rows`;for(let n of e)if(typeof n!==t||typeof n==`number`&&!Number.isFinite(n))return`rows`;return null}function zm(e,t){let n;try{n=Yt(t)}catch{throw new Pm(`rows`)}let r;try{r=n.evaluate(Lm(e,n.dependencies,{}))}catch{throw new Pm(`rows`)}if(!Array.isArray(r))throw new Pm(`rows`);let i=Rm(r);if(i)throw new Pm(i);return r}function Bm(e){let{rows:t,columns:n,keyExpression:r,runtime:i}=e,a=e.maxRows??100,o=e.budget??1e5;if(!Number.isSafeInteger(a)||a<=0||a>1e3)return{ok:!1,failure:`max-rows`};if(n.length<1||n.length>20)return{ok:!1,failure:`columns`};let s=Rm(t);if(s)return{ok:!1,failure:s};if(t.length>a)return{ok:!1,failure:`rows-budget`};let c;try{c=Yt(r)}catch{return{ok:!1,failure:`key`}}let l=c.dependencies;if(l.length!==1||l[0]!==`item`)return{ok:!1,failure:`key`};let u=n.map(e=>{try{return{spec:e,expression:Yt(e.value)}}catch{return{spec:e,expression:null}}}),d=0;for(let e of n)d+=e.label.length;if(t.length===0&&(d+=7),d>o)return{ok:!1,failure:`text-budget`};let f=e=>{if(d+=e,d>o)throw new Pm(`text-budget`)},p=new Set,m=[];try{for(let e=0;e<t.length;e+=1){let n={item:t[e],index:e},r=null;try{r=Im(c.evaluate(n))}catch{return{ok:!1,failure:`key`}}if(r===null||p.has(r))return{ok:!1,failure:`key`};f(r.length),p.add(r);let a=[];for(let e of u){if(!e.expression){f(14),a.push({ok:!1,text:``});continue}let t=null;try{t=Fm(e.expression.evaluate(Lm(i,e.expression.dependencies,n)))}catch{t=null}t===null?(f(14),a.push({ok:!1,text:``})):(f(t.length),a.push({ok:!0,text:t}))}m.push({key:r,cells:a})}}catch(e){return e instanceof Pm?{ok:!1,failure:e.failure}:{ok:!1,failure:`rows`}}return{ok:!0,model:{columns:n.map(e=>e.label),rows:m,empty:t.length===0}}}function Vm(e,t){switch(t){case`label`:return e(`Data table requires a label.`,`数据表需要标签。`);case`columns`:return e(`Data table requires between 1 and 20 column definitions.`,`数据表需要 1 到 20 个列定义。`);case`max-rows`:return e(`max-rows must be a positive integer no greater than ${A}.`,`max-rows 必须是 1 到 ${A} 之间的整数。`);case`rows`:return e(`Rows must evaluate to a list.`,`行数据必须计算为列表。`);case`rows-budget`:return e(`Too many rows for this table.`,`此数据表的行数超过上限。`);case`key`:return e(`Every row needs a unique, non-empty key.`,`每一行都需要唯一且非空的键。`);case`text-budget`:return e(`The table content exceeds the text budget.`,`数据表内容超过文本上限。`)}}var Hm=/^\s*\{\{([\s\S]*)\}\}\s*$/;function Um(e){if(e===void 0)return null;let t=Hm.exec(e),n=t?t[1].trim():``;return n===``?null:n}function Wm(e){return e.type===`comment`||e.type===`text`&&(e.value??``).trim()===``||e.type===`paragraph`&&!e.children?.length&&(e.value??``).trim()===``}function Gm(e){let t=(e.attrs?.label??``).trim();if(t===``)return{ok:!1,failure:`label`};let n=Um(e.attrs?.rows);if(!n)return{ok:!1,failure:`rows`};let r=Um(e.attrs?.key);if(!r)return{ok:!1,failure:`key`};let i=e.attrs?.[`max-rows`],a=100;if(i!==void 0&&(!/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?$/.test(i.trim())||(a=Number(i.trim()),!Number.isSafeInteger(a)||a<=0||a>1e3)))return{ok:!1,failure:`max-rows`};let o=(e.children??[]).filter(e=>!Wm(e)),s=[];for(let e of o){let t=(e.children??[]).filter(e=>!Wm(e));if(e.type!==`component`||e.name!==`column`||t.length>0)return{ok:!1,failure:`columns`};let n=(e.attrs?.label??``).trim(),r=Um(e.attrs?.value);if(n===``||!r)return{ok:!1,failure:`columns`};s.push({label:n,value:r})}return s.length<1||s.length>20?{ok:!1,failure:`columns`}:{ok:!0,table:{label:t,rows:n,key:r,maxRows:a,columns:s}}}function Km({node:e,runtime:t,t:n}){let r=Gm(e);if(!r.ok)return(0,Z.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Vm(n,r.failure)});let i;try{i=Bm({rows:zm(t,r.table.rows),columns:r.table.columns,keyExpression:r.table.key,maxRows:r.table.maxRows,runtime:t})}catch(e){i={ok:!1,failure:e instanceof Pm?e.failure:`rows`}}if(!i.ok)return(0,Z.jsx)(`div`,{className:`local-error local-data-table-error`,role:`alert`,children:Vm(n,i.failure)});let{model:a}=i;return(0,Z.jsx)(`div`,{className:`md-table-scroll local-data-table-scroll`,"data-local-data-table":``,children:(0,Z.jsxs)(`table`,{className:`md-table local-data-table`,"aria-label":r.table.label,children:[(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:a.columns.map((e,t)=>(0,Z.jsx)(`th`,{scope:`col`,children:e},`column-${t}`))})}),(0,Z.jsx)(`tbody`,{children:a.empty?(0,Z.jsx)(`tr`,{children:(0,Z.jsx)(`td`,{className:`local-data-table-empty`,colSpan:a.columns.length,children:n(`No rows`,`没有数据`)})}):a.rows.map(e=>(0,Z.jsx)(`tr`,{children:e.cells.map((e,t)=>(0,Z.jsx)(`td`,{children:e.ok?e.text:(0,Z.jsx)(`span`,{className:`local-error local-data-table-cell-error`,children:n(`Cannot compute`,`无法计算`)})},`cell-${t}`))},e.key))})]})})}var qm=(0,y.createContext)(null);function $(){let e=(0,y.useContext)(qm);if(!e)throw Error(`LocalViewContext is not initialized`);return e}var Jm=`local.validation.failed`,Ym=`local.validation.expression`,Xm=2e3,Zm={invalid:!1},Qm={hintFor:()=>null,fieldFor:()=>Zm};function $m(e){return`${e.start}:${e.end}`}function eh(e){return e.length>Xm?`${e.slice(0,1999)}…`:e}function th(e,t,n,r){let i=Array.isArray(e.validations)?e.validations:[];if(i.length===0)return Qm;let a=null;try{typeof t.validate==`function`&&(a=t.validate())}catch{a=null}let o=new Map;for(let e of a??[])(e.code===Jm||e.code===Ym)&&o.set($m(e.range),e);let s=new Map,c=new Map,l=new Map,u=r(`This rule cannot be evaluated`,`无法计算此规则`),d=r(`Validation failed.`,`校验未通过。`);for(let[t,r]of i.entries()){let i=$m(r.range),f=o.get(i),p=a===null||f?.code===Ym,m=f?.code===Jm,h=m?eh(f?.message||r.message||d):p?f?.message?`${u}: ${eh(f.message)}`:u:``,g={id:`${n}-validation-${t}`,failed:m,error:p,message:h};if(s.set(r.nodeId,g),c.set(i,g),m||p)for(let t of r.fields??[]){let n=Object.hasOwn(e.bindings,t)?e.bindings[t]:void 0;if(n)for(let e of n.nodeIds??[]){let t=l.get(e);t?t.includes(g.id)||t.push(g.id):l.set(e,[g.id])}}}return{hintFor(e){return c.get($m(e.range))??s.get(e.id)??null},fieldFor(e){let t=l.get(e.id);return t&&t.length>0?{describedBy:t.join(` `),invalid:!0}:Zm}}}function nh(e){return $().validation.fieldFor(e)}var rh=/^\s*\{\{([\s\S]*)\}\}\s*$/,ih={revision:0,state:{}};function ah(e,t){return e.attrs?.[t]}function oh(e,t,n){let r=ah(t,n);if(r===void 0)return{present:!1};let i=rh.exec(r);if(!i)return{present:!0,ok:!0,value:r};try{return{present:!0,ok:!0,value:e.evaluate(i[1])}}catch{return{present:!0,ok:!1}}}function sh(e){return e===null?``:typeof e==`string`?e:typeof e==`number`?Number.isFinite(e)?String(e):null:typeof e==`boolean`?e?`true`:`false`:null}function ch(e,t,n,r=``,i=lp){let a=ah(t,n);if(a===void 0)return r;let o=rh.exec(a);try{return o?sh(e.evaluate(o[1]))??i(`Cannot compute`,`无法计算`):e.text(a)}catch{return i(`Cannot compute`,`无法计算`)}}function lh(e,t,n,r){let i=ah(t,n);if(i===void 0)return{ok:!0,value:r};let a=rh.exec(i);if(!a)return{ok:!0,value:i===`true`};try{let t=e.evaluate(a[1]);return typeof t==`boolean`?{ok:!0,value:t}:{ok:!1}}catch{return{ok:!1}}}function uh(e,t,n,r=!1){let i=lh(e,t,n,r);return i.ok?i.value:r}function dh(e,t,n,r,i){let a=ah(t,n);if(a===void 0)return{tone:i,error:!1};let o=rh.exec(a);if(!o){let e=a.trim();return{tone:r.includes(e)?e:i,error:!1}}try{let t=e.evaluate(o[1]);return typeof t==`string`&&r.includes(t)?{tone:t,error:!1}:{tone:i,error:!0}}catch{return{tone:i,error:!0}}}function fh(e){try{return e.snapshot().revision}catch{return 0}}function ph(e,t,n,r){let i=ah(t,n);if(i===void 0)return r;let a=rh.exec(i);try{let t=a?e.evaluate(a[1]):Number(i);return typeof t==`number`&&Number.isFinite(t)?t:r}catch{return r}}function mh(e,t){try{return e.get(t)}catch{return null}}function hh(e){return sh(e)??``}var gh=`—`;function _h(e){return e.trim()===``?gh:e}function vh({label:e,value:t,hint:n,className:r=``,multiline:i=!1}){return(0,Z.jsxs)(`div`,{className:`md-control local-static-control ${r}`.trim(),children:[(0,Z.jsx)(`span`,{className:`md-label`,children:e}),(0,Z.jsx)(`span`,{className:`local-static-value${i?` local-static-multiline`:``}`,"data-local-static-value":``,children:t}),n?(0,Z.jsx)(`span`,{className:`md-hint`,children:n}):null]})}function yh({value:e,block:t=!1}){return t?(0,Z.jsx)(`div`,{className:`local-print-value local-print-block`,"aria-hidden":`true`,"data-local-print-value":``,children:e}):(0,Z.jsx)(`span`,{className:`local-print-value`,"aria-hidden":`true`,"data-local-print-value":``,children:e})}function bh(e){let t=ah(e,`color`);if(t===void 0)return;let n=t.trim();return n!==``&&qn(n)?n:void 0}function xh(e){if(e)return{"--local-accent":e,"--local-accent-soft":`color-mix(in srgb, ${e} 14%, var(--surface))`,"--local-accent-strong":e}}var Sh=`(prefers-color-scheme: dark)`;function Ch(e){if(!Array.isArray(e)||e.length===0)return``;try{return e.map(e=>{if(!e||typeof e!=`object`)return``;let t=Array.isArray(e.colorSchemes)?e.colorSchemes.join(``):``;return`${e.name}\u0000${e.protocol}\u0000${t}`}).join(``)}catch{return``}}function wh(e){return e.map(e=>`${e.code}\u0000${e.range.start}\u0000${e.range.end}\u0000${e.message}`).join(``)}function Th(e){return e===`light`||e===`dark`?e:null}function Eh(e){let t=Th(e.getAttribute(`data-theme`));if(t)return t;let n=e.parentElement;for(;n;){let e=Th(n.getAttribute(`data-color-scheme`))??Th(n.getAttribute(`data-theme`));if(e)return e;n=n.parentElement}return null}function Dh(){if(typeof window>`u`||typeof window.matchMedia!=`function`)return null;try{return window.matchMedia(Sh).matches?`dark`:`light`}catch{return null}}function Oh(e,t){let n=Th(t),[r,i]=(0,y.useState)(`light`);return(0,y.useEffect)(()=>{if(n){i(n);return}let t=e.current;if(!t||typeof window>`u`){i(`light`);return}let r=()=>i(Eh(t)??Dh()??`light`);r();let a=[];if(typeof MutationObserver==`function`)try{let e=(e,t)=>{let n=new MutationObserver(r);n.observe(e,{attributes:!0,attributeFilter:t}),a.push(n)};e(t,[`data-theme`]);let n=t.parentElement;for(;n;)e(n,[`data-color-scheme`,`data-theme`]),n=n.parentElement}catch{for(let e of a)e.disconnect();a=[]}let o=()=>r(),s=null;if(typeof window.matchMedia==`function`)try{s=window.matchMedia(Sh),typeof s.addEventListener==`function`?s.addEventListener(`change`,o):typeof s.addListener==`function`&&s.addListener(o)}catch{s=null}return()=>{for(let e of a)e.disconnect();s&&(typeof s.removeEventListener==`function`?s.removeEventListener(`change`,o):typeof s.removeListener==`function`&&s.removeListener(o))}},[n,e]),n??r}function kh(e,t,n){return Math.min(n,Math.max(t,e))}function Ah(e,t,n,r){let i=Number.isFinite(r)&&r>0?r:1,a=Math.max(0,Math.floor((n-t)/i+1e-9)),o=t+Math.max(0,Math.min(a,Math.round((e-t)/i)))*i;return Number(o.toPrecision(15))}function jh(e,t,n,r){try{let i=e.get(t,n);return typeof i==`number`&&Number.isFinite(i)?i:r}catch{return r}}function Mh(e,t,n,r,i,a,o=1){let s=ph(e,t,n,i),c=ph(e,t,r,a);s>c&&([s,c]=[c,s]);let l=ph(e,t,`step`,o);return{min:s,max:c,step:Number.isFinite(l)&&l>0?l:1}}function Nh(e){let{runtime:t,report:n}=$(),r=fp(),i=Q(),[a,o]=(0,y.useState)(null);return{write:(0,y.useCallback)((a,s)=>{try{let i=t.set(e,a,s);return i.length?(o(i.map(e=>tt(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),writeMany:(0,y.useCallback)(a=>{try{let i=t.setMany(e,a);return i.length?(o(i.map(e=>tt(e,r)).join(`; `)),n(i),!1):(o(null),!0)}catch(e){return o(e instanceof Error?e.message:i(`Cannot write`,`无法写入`)),!1}},[r,e,n,t,i]),error:a,setError:o}}function Ph(e){let{runtime:t}=$(),n=lh(t,e,`disabled`,!1);return n.ok?{disabled:n.value,invalid:!1}:{disabled:!0,invalid:!0}}function Fh(e,t,n){let r=0;try{r=e.resetToken(t)}catch{r=0}let i=(0,y.useRef)(r),a=(0,y.useRef)(n);a.current=n,(0,y.useEffect)(()=>{i.current!==r&&(i.current=r,a.current())},[r])}function Ih({message:e}){let t=Q();return(0,Z.jsx)(`span`,{className:`local-error`,role:`alert`,children:e??t(`Cannot compute`,`无法计算`)})}var Lh=class extends y.Component{state={failed:!1};static getDerivedStateFromError(){return{failed:!0}}componentDidUpdate(e){this.state.failed&&e.revision!==this.props.revision&&this.setState({failed:!1})}render(){return this.state.failed?(0,Z.jsx)(Ih,{}):this.props.children}},Rh=new Set([`table`,`chart`,`plot`,`timeline`,`diagram`]);function zh(e,t,n){if(!e)return null;let r=e.trim();if(!r)return null;let i=r.replace(/[\u0000- ]+/g,``),a=/^([a-z][a-z0-9+.-]*):/i.exec(i);if(a){let e=a[1].toLowerCase();if(!(t===`image`?e===`http`||e===`https`:e===`http`||e===`https`||e===`mailto`||e===`tel`))return null}if(!n)return t===`image`?null:r;try{return n(r,t)?r:null}catch{return null}}function Bh(e){return`h${Math.min(6,Math.max(1,e??1))}`}function Vh(e,t){if(e.node!==t.node||e.visible!==t.visible||e.resetToken!==t.resetToken||e.env!==t.env||e.depValues===null||t.depValues===null||e.depValues.length!==t.depValues.length)return!1;for(let n=0;n<e.depValues.length;n+=1)if(!Object.is(e.depValues[n],t.depValues[n]))return!1;return!0}var Hh=(0,y.memo)(function({node:e,index:t,visible:n,env:r}){return qh(r,e,t,n,!0)},Vh);function Uh(e,t,n,r=!0){if(!t||t.length===0)return null;if(!r)return t.map((t,r)=>qh(e,t,r,n,!1));let i=null,a=null;try{i=e.runtime.snapshot().state,a=Vn(e.runtime)}catch{i=null}let o=i;return t.map((t,r)=>{let i=e.dependencies.get(t.id),s=i==null||o===null||a===null?null:i.map(e=>o[e]),c=a?.get(t.id)??0;return(0,Z.jsx)(Hh,{node:t,index:r,visible:n,env:e,depValues:s,resetToken:c},t.id||`${t.type}-${r}`)})}function Wh(e,t){if(typeof t.value==`string`)return t.value;let{start:n,end:r}=t.range;return Number.isInteger(n)&&Number.isInteger(r)&&n>=0&&r>=n?e.runtime.document.source.slice(n,r):``}function Gh(e,t,n,r){return(0,Z.jsx)(`span`,{className:r?`local-fallback local-fallback-block`:`local-fallback local-fallback-inline`,title:e.t(`Unsupported syntax shown as source`,`未支持的语法,已按源码原样显示`),"data-local-fallback":``,children:Wh(e,t)},n)}function Kh(e,t,n){return!t||t.length===0?null:t.map((t,r)=>t.type===`paragraph`||t.type===`root`?(0,Z.jsx)(`span`,{children:Uh(e,t.children,n,!1)},t.id||`inline-${r}`):qh(e,t,r,n,!1))}function qh(e,t,n,r,i=!0){let a=t.id||`${t.type}-${n}`;if(t.type===`component`)return(0,Z.jsx)(Lh,{revision:fh(e.runtime),children:Yh(t,r,e.runtime,e.t)},a);switch(t.type){case`root`:return(0,Z.jsx)(`div`,{children:Uh(e,t.children,r)},a);case`heading`:return(0,y.createElement)(Bh(t.depth),{key:a,id:e.anchors.ids.get(t)},Uh(e,t.children,r,!1));case`paragraph`:return(0,Z.jsx)(`p`,{children:Uh(e,t.children,r,!1)},a);case`text`:return(0,Z.jsx)(`span`,{children:t.value??``},a);case`emphasis`:return(0,Z.jsx)(`em`,{children:Uh(e,t.children,r,!1)},a);case`strong`:return(0,Z.jsx)(`strong`,{children:Uh(e,t.children,r,!1)},a);case`delete`:return(0,Z.jsx)(`del`,{children:Uh(e,t.children,r,!1)},a);case`inlineCode`:return(0,Z.jsx)(`code`,{className:`md-inline-code`,children:t.value??``},a);case`code`:{let e=t.lang?`language-${t.lang}`:void 0;return(0,Z.jsx)(`pre`,{className:`md-code`,children:(0,Z.jsx)(`code`,{className:e,children:t.value??``})},a)}case`blockquote`:return(0,Z.jsx)(`blockquote`,{children:Uh(e,t.children,r)},a);case`break`:return(0,Z.jsx)(`br`,{},a);case`thematicBreak`:return(0,Z.jsx)(`hr`,{},a);case`list`:return t.ordered?(0,Z.jsx)(`ol`,{start:t.start??1,className:`md-list`,children:Uh(e,t.children,r)},a):(0,Z.jsx)(`ul`,{className:`md-list`,children:Uh(e,t.children,r)},a);case`listItem`:{let n=typeof t.checked==`boolean`;return(0,Z.jsxs)(`li`,{className:n?`md-list-item md-task-item`:`md-list-item`,children:[n?e.mode===`static`?(0,Z.jsx)(`span`,{className:`md-task-marker`,role:`img`,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`),children:t.checked?`✓`:`☐`}):(0,Z.jsx)(`input`,{type:`checkbox`,className:`md-task-checkbox`,checked:t.checked===!0,readOnly:!0,tabIndex:-1,"aria-label":t.checked?e.t(`Completed`,`已完成`):e.t(`Not completed`,`未完成`)}):null,Uh(e,t.children,r)]},a)}case`link`:{let n=zh(t.url,`link`,e.urlPolicy);if(!n)return(0,Z.jsx)(`span`,{className:`md-link-rejected`,title:e.t(`Unsafe link URL rejected`,`已拒绝不安全的链接地址`),children:Uh(e,t.children,r,!1)},a);let i=e.anchors.resolve(n),o=/^https?:/i.test(i);return(0,Z.jsx)(`a`,{href:i,title:t.title??void 0,target:o?`_blank`:void 0,rel:o?`noopener noreferrer`:void 0,children:Uh(e,t.children,r,!1)},a)}case`image`:{let n=zh(t.url,`image`,e.urlPolicy),r=n;if(n&&e.imageResolver)try{let t=e.imageResolver(n);r=typeof t==`string`&&t.trim()!==``?t:null}catch{r=null}if(!r){let n=e.t(`Unsafe image rejected`,`已拒绝不安全的图片`),r=t.alt?e.t(`: ${t.alt}`,`:${t.alt}`):``;return(0,Z.jsxs)(`span`,{className:`md-image-rejected`,children:[`[`,n,r,`]`]},a)}return(0,Z.jsx)(`img`,{className:`md-image`,src:r,alt:t.alt??``,title:t.title??void 0,loading:`lazy`,referrerPolicy:`no-referrer`},a)}case`table`:{let[n,...i]=t.children??[];return(0,Z.jsx)(`div`,{className:`md-table-scroll`,children:(0,Z.jsxs)(`table`,{className:`md-table`,children:[n?(0,Z.jsx)(`thead`,{children:(0,Z.jsx)(`tr`,{children:Jh(e,n,`th`,t.align,r)})}):null,i.length?(0,Z.jsx)(`tbody`,{children:i.map((n,i)=>(0,Z.jsx)(`tr`,{children:Jh(e,n,`td`,t.align,r)},n.id||`${a}-row-${i}`))}):null]})},a)}case`tableRow`:return(0,Z.jsx)(`tr`,{children:Jh(e,t,`td`,void 0,r)},a);case`tableCell`:{let n=t.align?.[0]??void 0;return(0,Z.jsx)(`td`,{style:{textAlign:n??void 0},children:Uh(e,t.children,r,!1)},a)}case`interpolation`:try{let n=sh(e.runtime.evaluate(t.value??``));if(n===null)throw Error(`Cannot display an array`);return(0,Z.jsx)(`span`,{className:`local-interpolation`,children:n},a)}catch{return(0,Z.jsx)(Ih,{},a)}case`math`:case`inlineMath`:{let n=t.type===`math`;return(0,Z.jsx)(`span`,{className:n?`local-math-display`:`local-math-inline`,children:(0,Z.jsx)(Lh,{revision:fh(e.runtime),children:(0,Z.jsx)(sp,{source:t.value??``,display:n})})},a)}case`html`:return(0,Z.jsx)(`span`,{className:`md-raw-html`,children:t.value??``},a);case`fallback`:return Gh(e,t,a,i);case`footnoteReference`:return Gh(e,t,a,!1);case`footnoteDefinition`:return Gh(e,t,a,i);case`comment`:case`definition`:return null;default:return t.children&&t.children.length?(0,Z.jsx)(`span`,{children:Uh(e,t.children,r,i)},a):typeof t.value==`string`?(0,Z.jsx)(`span`,{children:t.value},a):null}}function Jh(e,t,n,r,i){return(t.children??[]).map((a,o)=>{let s=a.align?.[0]??t.align?.[o]??r?.[o]??void 0;return n===`th`?(0,Z.jsx)(`th`,{style:{textAlign:s??void 0},children:Uh(e,a.children,i,!1)},a.id||`${t.id}-h-${o}`):(0,Z.jsx)(`td`,{style:{textAlign:s??void 0},children:Uh(e,a.children,i,!1)},a.id||`${t.id}-c-${o}`)})}function Yh(e,t,n,r){let i=e.name??``;if(i===`computed`||i===`const`)return null;if(i===`data-table`)return(0,Z.jsx)(Km,{node:e,visible:t,runtime:n,t:r});if(Rh.has(i))return(0,Z.jsx)(Xh,{node:e,visible:t});let a=qg[i];return a?(0,Z.jsx)(a,{node:e,visible:t}):(0,Z.jsxs)(`span`,{className:`component-error`,children:[r(`Unknown component "`,`未知组件“`),i||r(`(missing name)`,`(缺少名称)`),r(`"`,`”`)]})}function Xh({node:e,visible:t}){let{runtime:n,render:r,mode:i}=$(),a=Q(),o=nh(e),s=(0,Z.jsx)(Nm,{node:e,runtime:n,render:r,visible:t,mode:i});if(!n.document.validations?.some(t=>t.fields.some(t=>Object.hasOwn(n.document.bindings,t)&&n.document.bindings[t].nodeIds.includes(e.id))))return s;let c=ch(n,e,`label`,ch(n,e,`title`,a(`Selection`,`选择`),a),a);return(0,Z.jsx)(`div`,{role:`group`,"aria-label":c,"aria-invalid":o.invalid||void 0,"aria-describedby":o.describedBy,children:s})}function Zh({node:e,visible:t}){let{validation:n}=$(),r=n.hintFor(e);if(!r)return null;let i=r.failed||r.error,a=t&&i;return(0,Z.jsx)(`span`,{id:r.id,className:`local-validation-hint`,"data-local-validation":r.error?`error`:r.failed?`failed`:`passed`,role:a?`status`:void 0,"aria-live":a?`polite`:void 0,children:i?r.message:null})}function Qh(){return null}function $h({message:e}){return e?(0,Z.jsx)(`span`,{className:`field-error`,role:`alert`,children:e}):null}function eg(e,t,n=lp){if(t.required&&e.length===0)return n(`This field is required`,`请填写此字段`);if(e.length>1e5)return n(`At most ${w} characters`,`最多允许 ${w} 个字符`);if(t.email&&e!==``&&!N(e))return n(`Enter a valid email address`,`请输入有效的邮箱地址`);let r=nt(e);return t.minLength!==void 0&&t.minLength>0&&e!==``&&r<t.minLength?n(`At least ${t.minLength} characters`,`至少需要 ${t.minLength} 个字符`):t.maxLength!==void 0&&t.maxLength>=0&&r>t.maxLength?n(`At most ${t.maxLength} characters`,`最多允许 ${t.maxLength} 个字符`):null}function tg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,e.name??i(`Input`,`输入`),i),l=ch(n,e,`placeholder`,``,i),u=(ah(e,`type`)??`text`)===`email`,d=uh(n,e,`required`,!1),{disabled:f,invalid:p}=Ph(e),m=nh(e),h=ah(e,`min-length`),g=ah(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`max-length`,0))),b=hh(mh(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),Fh(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,Z.jsx)(vh,{className:`local-input${u?` local-input-email`:``}`,label:c,value:_h(b)});let M=e=>eg(e,{required:d,minLength:_,maxLength:v,email:u},i);return(0,Z.jsxs)(`div`,{className:`md-control local-input${u?` local-input-email`:``}`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-input`,children:c}),(0,Z.jsx)(`input`,{id:`${t}-input`,className:`md-text-input`,type:u?`email`:`text`,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,Z.jsx)(yh,{value:_h(b)}),(0,Z.jsx)($h,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function ng({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,i(`Text`,`文本`),i),l=ch(n,e,`placeholder`,``,i),u=Math.min(40,Math.max(1,Math.floor(ph(n,e,`rows`,4)))),d=uh(n,e,`required`,!1),{disabled:f,invalid:p}=Ph(e),m=nh(e),h=ah(e,`min-length`),g=ah(e,`max-length`),_=h===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`min-length`,0))),v=g===void 0?void 0:Math.max(0,Math.floor(ph(n,e,`max-length`,0))),b=hh(mh(n,e)),[x,S]=(0,y.useState)(b),[C,w]=(0,y.useState)(!1),[T,E]=(0,y.useState)(!1),[D,O]=(0,y.useState)(null),k=(0,y.useRef)(!1),A=(0,y.useRef)(b),j=(0,y.useRef)(b);if(j.current=b,(0,y.useEffect)(()=>{A.current!==b&&(A.current=b,!C&&!k.current&&S(b))},[b,C]),Fh(n,e,()=>{k.current=!1,S(j.current),E(!1),O(null),s(null)}),r===`static`)return(0,Z.jsx)(vh,{className:`local-textarea`,label:c,value:_h(b),multiline:!0});let M=e=>eg(e,{required:d,minLength:_,maxLength:v},i);return(0,Z.jsxs)(`div`,{className:`md-control local-textarea`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-textarea`,children:c}),(0,Z.jsx)(`textarea`,{id:`${t}-textarea`,className:`md-text-input`,rows:u,value:x,placeholder:l||void 0,disabled:f,required:d,"aria-invalid":D||o||m.invalid?!0:void 0,"aria-describedby":m.describedBy,onFocus:()=>w(!0),onBlur:()=>{w(!1),E(!0);let e=M(x);O(e),!e&&x!==b&&a(x)},onChange:e=>{let t=e.target.value;S(t),s(null),T&&O(M(t)),!k.current&&M(t)===null&&a(t)},onCompositionStart:()=>{k.current=!0},onCompositionEnd:e=>{k.current=!1;let t=e.currentTarget.value;S(t),T&&O(M(t)),M(t)===null&&a(t)}}),(0,Z.jsx)(yh,{value:_h(b),block:!0}),(0,Z.jsx)($h,{message:p?i(`Cannot compute`,`无法计算`):D??o})]})}function rg(e){let t=e.trim();if(t===``||t===`-`||t===`+`||t===`.`||t===`-.`)return{kind:`empty`};let n=Number(t);return Number.isFinite(n)?{kind:`valid`,value:n}:{kind:`invalid`}}function ig(e,t,n,r,i=lp){let a=1e-9*Math.max(1,Math.abs(e));if(t!==void 0&&e<t-a)return i(`Must be at least ${t}`,`不能小于 ${t}`);if(n!==void 0&&e>n+a)return i(`Must be at most ${n}`,`不能大于 ${n}`);if(!Number.isFinite(r)||r<=0)return i(`Step must be greater than 0`,`步长必须大于 0`);let o=(e-(t??0))/r;return Math.abs(o-Math.round(o))>1e-9*Math.max(1,Math.abs(o))?i(`Must be a multiple of ${r}`,`需要按步长 ${r} 取值`):null}function ag({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o,setError:s}=Nh(e),c=ch(n,e,`label`,i(`Number`,`数字`),i),{disabled:l,invalid:u}=Ph(e),d=nh(e),f=ah(e,`min`)!==void 0,p=ah(e,`max`)!==void 0,m=f?ph(n,e,`min`,0):void 0,h=p?ph(n,e,`max`,0):void 0,g=ph(n,e,`step`,1),_=mh(n,e),v=typeof _==`number`&&Number.isFinite(_)?String(_):``,[b,x]=(0,y.useState)(v),[S,C]=(0,y.useState)(!1),[w,T]=(0,y.useState)(!1),[E,D]=(0,y.useState)(null),O=(0,y.useRef)(!1),k=(0,y.useRef)(v),A=(0,y.useRef)(v);A.current=v,(0,y.useEffect)(()=>{k.current!==v&&(k.current=v,!S&&!O.current&&x(v))},[v,S]),Fh(n,e,()=>{O.current=!1,x(A.current),T(!1),D(null),s(null)});let j=(0,Z.jsxs)(Z.Fragment,{children:[m===void 0?``:i(`Min ${m}`,`最小 ${m}`),m!==void 0&&h!==void 0?` · `:``,h===void 0?``:i(`Max ${h}`,`最大 ${h}`),g===void 0?``:i(` · Step ${g}`,` · 步长 ${g}`)]});if(r===`static`)return(0,Z.jsx)(vh,{className:`local-number`,label:c,value:_h(v),hint:j});let M=(e,t)=>{let n=rg(e);if(n.kind!==`valid`)return t&&D(i(`Enter a valid number`,`请输入有效数字`)),!1;let r=ig(n.value,m,h,g,i);return r?(t&&D(r),!1):(D(null),a(n.value))};return(0,Z.jsxs)(`div`,{className:`md-control local-number`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-number`,children:c}),(0,Z.jsx)(`input`,{id:`${t}-number`,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:b,disabled:l,"aria-invalid":E||o||d.invalid?!0:void 0,"aria-describedby":d.describedBy,onFocus:()=>C(!0),onBlur:()=>{C(!1),T(!0),M(b,!0)},onChange:e=>{let t=e.target.value;x(t),s(null),O.current||M(t,w)},onCompositionStart:()=>{O.current=!0},onCompositionEnd:e=>{O.current=!1,M(e.currentTarget.value,w)}}),(0,Z.jsx)(yh,{value:_h(v)}),m!==void 0||h!==void 0||g!==void 0?(0,Z.jsx)(`span`,{className:`md-hint`,children:j}):null,(0,Z.jsx)($h,{message:u?i(`Cannot compute`,`无法计算`):E??o})]})}function og({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Slider`,`滑块`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=ph(n,e,`min`,0),f=ph(n,e,`max`,100),p=ph(n,e,`step`,1),m=mh(n,e),h=Math.min(f,Math.max(d,typeof m==`number`&&Number.isFinite(m)?m:d));return r===`static`?(0,Z.jsx)(vh,{className:`md-slider local-slider`,label:s,value:String(h)}):(0,Z.jsxs)(`div`,{className:`md-control md-slider local-slider`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-label`,htmlFor:`${t}-slider`,children:[(0,Z.jsx)(`span`,{children:s}),(0,Z.jsx)(`span`,{className:`md-slider-value`,"aria-hidden":`true`,children:h})]}),(0,Z.jsx)(`input`,{id:`${t}-slider`,type:`range`,min:d,max:f,step:p,value:h,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(Number(e.target.value))}),(0,Z.jsx)(yh,{value:String(h)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function sg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Toggle`,`开关`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=mh(n,e)===!0,f=d?i(`On`,`开`):i(`Off`,`关`);return r===`static`?(0,Z.jsx)(vh,{className:`md-toggle local-toggle`,label:s,value:f}):(0,Z.jsxs)(`div`,{className:`md-control md-toggle local-toggle`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-toggle`,children:[(0,Z.jsx)(`input`,{id:`${t}-toggle`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:f}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function cg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Checkbox`,`勾选`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=mh(n,e)===!0,f=d?i(`Checked`,`已勾选`):i(`Unchecked`,`未勾选`);return r===`static`?(0,Z.jsx)(vh,{className:`local-checkbox`,label:s,value:f}):(0,Z.jsxs)(`div`,{className:`md-control local-checkbox`,style:xh(bh(e)),children:[(0,Z.jsxs)(`label`,{className:`md-toggle-label`,htmlFor:`${t}-checkbox`,children:[(0,Z.jsx)(`input`,{id:`${t}-checkbox`,type:`checkbox`,checked:d,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.checked)}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:f}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function lg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Date`,`日期`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=uh(n,e,`required`,!1),f=ch(n,e,`min`,``,i),p=ch(n,e,`max`,``,i),m=mh(n,e),h=typeof m==`string`?m:``,[g,_]=(0,y.useState)(!1),v=g&&d&&h===``?i(`Select a date`,`请选择日期`):null;return r===`static`?(0,Z.jsx)(vh,{className:`local-date`,label:s,value:_h(h)}):(0,Z.jsxs)(`div`,{className:`md-control local-date`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-date`,children:s}),(0,Z.jsx)(`input`,{id:`${t}-date`,className:`md-text-input`,type:`date`,value:h,min:f||void 0,max:p||void 0,required:d,disabled:c,"aria-invalid":v||o||u.invalid?!0:void 0,"aria-describedby":u.describedBy,onBlur:()=>_(!0),onChange:e=>{_(!0),a(e.target.value)}}),(0,Z.jsx)(yh,{value:_h(h)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):v??o})]})}function ug(e){return(e.children??[]).filter(e=>e.type===`component`&&e.name===`option`).map((e,t)=>({value:ah(e,`value`)??`option-${t+1}`,node:e}))}function dg(e,t,n=lp){if(!t)return``;let r=``;for(let i of t)if(i.type===`text`||i.type===`inlineCode`)r+=i.value??``;else if(i.type===`fallback`)r+=i.value??``;else if(i.type===`interpolation`)try{r+=sh(e.evaluate(i.value??``))??``}catch{r+=n(`Cannot compute`,`无法计算`)}else i.type===`break`?r+=` `:r+=dg(e,i.children,n);return r}function fg(e,t,n=lp){return dg(e,t.children,n)||ah(t,`value`)||``}function pg(){return null}function mg({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,error:o}=Nh(e),s=ch(n,e,`label`,i(`Select`,`选择`),i),{disabled:c,invalid:l}=Ph(e),u=nh(e),d=ug(e),f=mh(n,e),p=typeof f==`string`?f:``,m=d.some(e=>e.value===p)?p:d[0]?.value??``,h=d.find(e=>e.value===m),g=h?fg(n,h.node,i)||m:``;return d.length===0?(0,Z.jsx)(Ih,{message:i(`Missing options`,`缺少选项`)}):r===`static`?(0,Z.jsx)(vh,{className:`md-select local-select`,label:s,value:_h(g)}):(0,Z.jsxs)(`div`,{className:`md-control md-select local-select`,style:xh(bh(e)),children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${t}-select`,children:s}),(0,Z.jsx)(`select`,{id:`${t}-select`,className:`md-select-input`,value:m,disabled:c,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,onChange:e=>a(e.target.value),children:d.map(e=>(0,Z.jsx)(`option`,{value:e.value,children:fg(n,e.node,i)||e.value},e.node.id))}),(0,Z.jsx)(yh,{value:_h(g)}),(0,Z.jsx)($h,{message:l?i(`Cannot compute`,`无法计算`):o})]})}function hg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=ug(e),m=mh(i,e),h=typeof m==`string`?m:``,g=p.findIndex(e=>e.value===h),_=g>=0?g:0,v=g>=0?p[g]:void 0,b=v?fg(i,v.node,o):``,x=(0,y.useRef)([]);if(p.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,Z.jsx)(vh,{className:`local-choices`,label:l,value:_h(b)});let S=e=>{let t=p[e];t&&(s(t.value),x.current[e]?.focus())},C=(e,t)=>{let n=-1;e.key===`ArrowRight`||e.key===`ArrowDown`?n=(t+1)%p.length:e.key===`ArrowLeft`||e.key===`ArrowUp`?n=(t-1+p.length)%p.length:e.key===`Home`?n=0:e.key===`End`&&(n=p.length-1),!(n<0)&&(e.preventDefault(),S(n))};return(0,Z.jsxs)(`div`,{className:`md-control local-choices`,style:xh(bh(e)),children:[(0,Z.jsx)(`span`,{className:`md-label`,id:`${n}-choices-label`,children:l}),(0,Z.jsx)(`div`,{className:`local-choice-list`,role:`radiogroup`,"aria-labelledby":`${n}-choices-label`,"aria-disabled":u||void 0,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:p.map((e,n)=>{let i=e.value===h;return(0,Z.jsx)(`button`,{ref:e=>{x.current[n]=e},type:`button`,role:`radio`,"aria-checked":i,tabIndex:n===_?0:-1,disabled:u,className:`local-choice${i?` is-selected`:``}`,onClick:()=>s(e.value),onKeyDown:e=>C(e,n),children:Kh(r,e.node.children,t)},e.node.id)})}),(0,Z.jsx)(yh,{value:_h(b)}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function gg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Options`,`选项`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=ug(e),m=mh(i,e),h=typeof m==`string`?m:``,g=n,_=p.find(e=>e.value===h),v=_?fg(i,_.node,o):``;return p.length===0?(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)}):a===`static`?(0,Z.jsx)(vh,{className:`local-radio-group`,label:l,value:_h(v)}):(0,Z.jsxs)(`fieldset`,{className:`md-control local-radio-group`,style:xh(bh(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>(0,Z.jsxs)(`label`,{className:`local-radio-option`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:g,value:e.value,checked:h===e.value,onChange:()=>s(e.value)}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id)),(0,Z.jsx)(yh,{value:_h(v)}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function _g(e){return((e.children??[]).find(e=>e.type===`list`)?.children??[]).filter(e=>e.type===`listItem`).map((e,t)=>({id:`item-${t+1}`,node:e}))}function vg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c}=Nh(e),l=ch(i,e,`label`,o(`Checklist`,`清单`),o),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=_g(e),m=mh(i,e),h=Array.isArray(m)?m.filter(e=>typeof e==`string`):[];if(p.length===0)return(0,Z.jsx)(Ih,{message:o(`Checklist requires a task list`,`清单需要任务列表`)});let g=e=>e?o(`Checked`,`已勾选`):o(`Unchecked`,`未勾选`);if(a===`static`)return(0,Z.jsxs)(`div`,{className:`local-checklist local-static-checklist`,style:xh(bh(e)),role:`group`,"aria-label":l,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:l}),(0,Z.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let n=h.includes(e.id);return(0,Z.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,Z.jsx)(`span`,{className:`local-static-state`,children:g(n)}),(0,Z.jsx)(`span`,{className:`local-static-item${n?` is-checked`:``}`,children:Kh(r,e.node.children,t)})]},e.id)})})]});let _=(e,t)=>{let n=new Set(h);t?n.add(e):n.delete(e),s(p.filter(e=>n.has(e.id)).map(e=>e.id))};return(0,Z.jsxs)(`fieldset`,{className:`local-checklist`,style:xh(bh(e)),disabled:u,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:l}),p.map(e=>{let i=h.includes(e.id);return(0,Z.jsxs)(`div`,{className:`local-checklist-item`,children:[(0,Z.jsx)(`input`,{id:`${n}-${e.id}`,type:`checkbox`,checked:i,onChange:t=>_(e.id,t.target.checked)}),(0,Z.jsx)(`label`,{className:`local-checklist-text${i?` is-checked`:``}`,htmlFor:`${n}-${e.id}`,children:Kh(r,e.node.children,t)})]},e.id)}),(0,Z.jsx)(yh,{block:!0,value:(0,Z.jsx)(`ul`,{className:`local-static-list`,children:p.map(e=>{let t=h.includes(e.id);return(0,Z.jsxs)(`li`,{className:`local-static-list-item`,children:[(0,Z.jsx)(`span`,{className:`local-static-state`,children:g(t)}),(0,Z.jsx)(`span`,{className:`local-static-item${t?` is-checked`:``}`,children:dg(i,e.node.children,o)})]},e.id)})})}),(0,Z.jsx)($h,{message:d?o(`Cannot compute`,`无法计算`):c})]})}function yg(e,t=lp){let n=Math.max(0,Math.floor(e)),r=Math.floor(n/60),i=n%60;return r===0?t(`${i} seconds`,`${i} 秒`):`${r}:${String(i).padStart(2,`0`)}`}function bg({node:e}){let{runtime:t,mode:n}=$(),r=Q(),{write:i,error:a}=Nh(e),o=ch(t,e,`label`,r(`Counter`,`计数`),r),{disabled:s,invalid:c}=Ph(e),l=nh(e),u=ph(t,e,`min`,0),d=ah(e,`max`)===void 0?void 0:ph(t,e,`max`,0),f=ph(t,e,`step`,1),p=mh(t,e),m=typeof p==`number`&&Number.isFinite(p)?p:u,h=Number.isFinite(f)&&f>0?f:1,g=1e-9*Math.max(1,Math.abs(m)),_=m-h>=u-g,v=d===void 0||m+h<=d+g;if(n===`static`)return(0,Z.jsx)(vh,{className:`local-counter`,label:o,value:String(m)});let y=e=>{let t=Number((m+e*h).toFixed(12));i(t)};return(0,Z.jsxs)(`div`,{className:`local-counter`,role:`group`,"aria-label":o,"aria-invalid":l.invalid||void 0,"aria-describedby":l.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:o}),(0,Z.jsxs)(`div`,{className:`local-counter-row`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`decrease`,`减少`)}`,disabled:s||!_,onClick:()=>y(-1),children:`−`}),(0,Z.jsx)(`span`,{className:`local-counter-value`,"aria-live":`polite`,children:m}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-counter-button`,"aria-label":`${o} ${r(`increase`,`增加`)}`,disabled:s||!v,onClick:()=>y(1),children:`+`}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-counter-reset`,disabled:s,onClick:()=>{try{t.reset(e)}catch{}},children:r(`Reset`,`恢复初值`)})]}),(0,Z.jsx)(yh,{value:String(m)}),(0,Z.jsx)($h,{message:c?r(`Cannot compute`,`无法计算`):a})]})}function xg({node:e,visible:t}){let{runtime:n,mode:r}=$(),i=fp(),a=Q(),o=ch(n,e,`label`,a(`Timer`,`计时器`),a),s=nh(e),c=ph(n,e,`duration`,60),l=Math.floor(c),u=mh(n,e),d=typeof u==`number`&&Number.isFinite(u)?Math.max(0,Math.ceil(u)):l,[f,p]=(0,y.useState)(!1),[m,h]=(0,y.useState)(!1),g=(0,y.useRef)(0),_=(0,y.useRef)(d);_.current=d;let[v,b]=(0,y.useState)(null),x=(0,y.useCallback)(t=>{try{let r=n.set(e,t);r.length&&b(r.map(e=>tt(e,i)).join(`; `))}catch{}},[i,e,n]);return(0,y.useEffect)(()=>{if(!f)return;let e=window.setInterval(()=>{let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));e!==_.current&&(_.current=e,x(e)),e<=0&&(p(!1),h(!0))},200);return()=>window.clearInterval(e)},[f,x]),(0,y.useEffect)(()=>{if(t||!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},[t,f,x]),Fh(n,e,()=>{p(!1),h(!1),b(null)}),!Number.isFinite(c)||l<=0?(0,Z.jsx)(Ih,{message:a(`Timer duration must be a positive number of seconds`,`计时时长必须是大于 0 的秒数`)}):r===`static`?(0,Z.jsx)(vh,{className:`local-timer`,label:o,value:yg(d,a)}):(0,Z.jsxs)(`div`,{className:`local-timer`,role:`group`,"aria-label":o,"aria-invalid":s.invalid||void 0,"aria-describedby":s.describedBy,children:[(0,Z.jsxs)(`div`,{className:`local-timer-head`,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:o}),(0,Z.jsx)(`span`,{className:`local-timer-value`,role:`timer`,"aria-label":a(`${d} seconds remaining`,`剩余 ${d} 秒`),children:yg(d,a)})]}),(0,Z.jsxs)(`div`,{className:`local-timer-controls`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-primary`,onClick:()=>{if(f)return;let e=d>0?d:l;d<=0&&(_.current=l,x(l)),g.current=performance.now()+e*1e3,h(!1),b(null),p(!0)},disabled:f,children:a(`Start`,`开始`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary`,onClick:()=>{if(!f)return;let e=Math.max(0,Math.ceil((g.current-performance.now())/1e3));_.current=e,x(e),p(!1)},disabled:!f,children:a(`Pause`,`暂停`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet`,onClick:()=>{p(!1),h(!1),b(null),_.current=l;try{n.reset(e)}catch{}},children:a(`Reset`,`重置`)})]}),(0,Z.jsx)(`span`,{className:`local-timer-status`,role:`status`,"aria-live":`polite`,children:m?a(`Completed`,`计时完成`):f?a(`Running`,`计时中`):a(`Paused`,`已暂停`)}),(0,Z.jsx)(yh,{value:yg(d,a)}),(0,Z.jsx)($h,{message:v})]})}function Sg({node:e}){let{runtime:t}=$(),n=Q(),r=ch(t,e,`label`,n(`Progress`,`进度`),n),i=ph(t,e,`max`,100),a=oh(t,e,`value`);if(!Number.isFinite(i)||i<=0)return(0,Z.jsx)(Ih,{message:n(`Progress maximum must be positive`,`进度上限必须是正数`)});if(!a.present||!a.ok)return(0,Z.jsx)(Ih,{});let o=a.value,s=typeof o==`number`?o:typeof o==`string`&&o.trim()!==``?Number(o):NaN;if(!Number.isFinite(s))return(0,Z.jsx)(Ih,{});if(s<0||s>i)return(0,Z.jsx)(Ih,{message:n(`Progress value must be between 0 and ${i}`,`进度值需要在 0 到 ${i} 之间`)});let c=s/i*100,l=bh(e);return(0,Z.jsxs)(`div`,{className:`local-progress`,style:l?{"--local-progress-color":l}:void 0,children:[(0,Z.jsxs)(`div`,{className:`local-progress-head`,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:r}),(0,Z.jsxs)(`span`,{className:`local-progress-value`,children:[Math.round(c),`%`]})]}),(0,Z.jsx)(`div`,{className:`local-progress-track`,role:`progressbar`,"aria-label":r||n(`Progress`,`进度`),"aria-valuemin":0,"aria-valuemax":i,"aria-valuenow":s,children:(0,Z.jsx)(`div`,{className:`local-progress-fill`,style:{width:`${c}%`}})})]})}function Cg({node:e,visible:t}){let{runtime:n,render:r,mode:i}=$(),a=Q(),o=ch(n,e,`title`,``,a),s=uh(n,e,`reset`,!0)&&i!==`static`,[c,l]=(0,y.useState)(null);return(0,Z.jsxs)(`section`,{className:`local-panel`,"aria-label":o||a(`Parameter panel`,`参数面板`),children:[o||s?(0,Z.jsxs)(`div`,{className:`local-panel-head`,children:[o?(0,Z.jsx)(`h3`,{className:`local-panel-title`,children:o}):(0,Z.jsx)(`span`,{}),s?(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-panel-reset`,onClick:()=>{try{n.reset(e),l(null)}catch(e){l(e instanceof Error?e.message:a(`Cannot reset`,`无法恢复默认`))}},"aria-label":o?a(`Reset ${o}`,`${o} 恢复默认`):a(`Reset`,`恢复默认`),children:a(`Reset`,`恢复默认`)}):null]}):null,(0,Z.jsx)(`div`,{className:`local-panel-body`,children:r(e.children??[],t)}),(0,Z.jsx)($h,{message:c})]})}function wg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=ch(n,e,`title`,``,Q());return(0,Z.jsxs)(`section`,{className:`md-card local-card`,children:[i?(0,Z.jsx)(`h3`,{className:`md-card-title`,children:i}):null,(0,Z.jsx)(`div`,{className:`md-card-body`,children:r(e.children??[],t)})]})}function Tg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Math.min(4,Math.max(1,Math.floor(ph(n,e,`columns`,2))));return(0,Z.jsx)(`div`,{className:`local-grid`,style:{"--local-grid-columns":String(i)},children:r(e.children??[],t)})}function Eg({node:e,visible:t}){let{render:n}=$();return(0,Z.jsx)(`div`,{className:`local-tabpanel-body`,children:n(e.children??[],t)})}function Dg(){return null}function Og({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),{write:s,error:c}=Nh(e),l=ch(r,e,`label`,``,o),u=nh(e),d=(e.children??[]).filter(e=>e.type===`component`&&e.name===`tab`),f=d.map((e,t)=>ah(e,`value`)??`tab-${t+1}`),p=d.map((e,t)=>ch(r,e,`label`,f[t],o)),m=ah(e,`initial`)??f[0]??``,h=ah(e,`bind`)!==void 0,g=mh(r,e),_=typeof g==`string`?g:``,[v,b]=(0,y.useState)(()=>f.includes(m)?m:f[0]??``),x=(0,y.useRef)([]);if(Fh(r,e,()=>{b(f.includes(m)?m:f[0]??``)}),d.length===0)return(0,Z.jsx)(Ih,{message:o(`Tabs requires at least one tab`,`标签页至少需要一个 tab`)});if(a===`static`)return(0,Z.jsxs)(`section`,{className:`local-tabs local-static-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),children:[l?(0,Z.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,d.map((e,n)=>(0,Z.jsxs)(`section`,{className:`local-static-tab`,children:[(0,Z.jsx)(`h4`,{className:`local-static-tab-label`,children:p[n]}),(0,Z.jsx)(`div`,{className:`local-static-tab-body`,children:i(e.children??[],t)})]},e.id))]});let S=h?f.includes(_)?_:f[0]:f.includes(v)?v:f[0],C=Math.max(0,f.indexOf(S)),w=e=>{let t=f[e];t!==void 0&&(h?s(t):b(t),x.current[e]?.focus())};return(0,Z.jsxs)(`section`,{className:`local-tabs`,"aria-label":l||o(`Tabs`,`选项卡`),"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[l?(0,Z.jsx)(`div`,{className:`local-tabs-label`,children:l}):null,(0,Z.jsx)(`div`,{className:`local-tablist`,role:`tablist`,"aria-label":l||o(`Tabs`,`选项卡`),onKeyDown:e=>{let t=-1;e.key===`ArrowRight`?t=(C+1)%d.length:e.key===`ArrowLeft`?t=(C-1+d.length)%d.length:e.key===`Home`?t=0:e.key===`End`&&(t=d.length-1),!(t<0)&&(e.preventDefault(),w(t))},children:d.map((e,t)=>{let r=f[t],i=r===S;return(0,Z.jsx)(`button`,{ref:e=>{x.current[t]=e},id:`${n}-tab-${t}`,type:`button`,role:`tab`,className:`local-tab${i?` is-selected`:``}`,"aria-selected":i,"aria-controls":`${n}-panel-${t}`,tabIndex:i?0:-1,onClick:()=>{h?s(r):b(r)},children:p[t]},e.id)})}),d.map((e,r)=>{let a=f[r]===S;return(0,Z.jsxs)(`div`,{id:`${n}-panel-${r}`,className:`local-tabpanel`,role:`tabpanel`,"aria-labelledby":`${n}-tab-${r}`,tabIndex:0,hidden:!a,children:[(0,Z.jsx)(yh,{block:!0,value:p[r]}),i(e.children??[],t&&a)]},e.id)}),(0,Z.jsx)($h,{message:c})]})}function kg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Q(),a=ch(n,e,`label`,``,i);return(0,Z.jsxs)(`div`,{className:`local-accordion`,role:`group`,"aria-label":a||i(`Accordion`,`折叠面板`),children:[a?(0,Z.jsx)(`div`,{className:`local-accordion-label`,children:a}):null,r(e.children??[],t)]})}function Ag({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),s=ch(r,e,`label`,o(`Details`,`折叠内容`),o),c=uh(r,e,`open`,!1),[l,u]=(0,y.useState)(c);if(Fh(r,e,()=>{u(c)}),a===`static`)return(0,Z.jsxs)(`section`,{className:`local-disclosure local-static-disclosure`,children:[(0,Z.jsx)(`h3`,{className:`local-disclosure-heading`,children:s}),(0,Z.jsx)(`div`,{className:`local-disclosure-panel`,children:i(e.children??[],t)})]});let d=`${n}-disclosure-trigger`,f=`${n}-disclosure-panel`;return(0,Z.jsxs)(`div`,{className:`local-disclosure`,children:[(0,Z.jsxs)(`h3`,{className:`local-disclosure-heading`,children:[(0,Z.jsxs)(`button`,{id:d,type:`button`,className:`local-disclosure-trigger`,"aria-expanded":l,"aria-controls":f,onClick:()=>u(e=>!e),children:[(0,Z.jsx)(`span`,{className:`local-chevron${l?` is-open`:``}`,"aria-hidden":`true`,children:`▸`}),(0,Z.jsx)(`span`,{children:s})]}),(0,Z.jsx)(yh,{value:s})]}),(0,Z.jsx)(`div`,{id:f,className:`local-disclosure-panel`,role:`region`,"aria-labelledby":d,hidden:!l,children:i(e.children??[],t&&l)})]})}function jg({node:e,visible:t}){let{runtime:n,render:r}=$(),i=Q(),a=lh(n,e,`when`,!1),o=a.ok?a.value:!1,s=!a.ok,c=(0,y.useRef)(null),l=(0,y.useRef)(o),u=(0,y.useRef)(!1);return(0,y.useEffect)(()=>{if(l.current&&!o){if(u.current){let e=c.current?.closest(`.local-document`);e&&(e.tabIndex=-1,e.focus({preventScroll:!0}))}u.current=!1}l.current=o},[o]),(0,Z.jsxs)(Z.Fragment,{children:[s?(0,Z.jsx)(Ih,{}):null,(0,Z.jsx)(`div`,{ref:c,className:`local-if md-if`,role:`group`,"aria-label":i(`Conditional content`,`条件内容`),tabIndex:-1,hidden:!o,"aria-hidden":!o,onFocus:()=>{u.current=!0},onBlur:e=>{c.current?.contains(e.relatedTarget)||(u.current=!1)},children:r(e.children??[],t&&o)})]})}function Mg(){let e=Q();return(0,Z.jsx)(`span`,{className:`local-error local-tone-error`,role:`status`,children:e(`Invalid tone; using the default style`,`色调无效,已使用默认样式`)})}function Ng({node:e,visible:t}){let{runtime:n,render:r}=$(),i=ch(n,e,`title`,``,Q()),{tone:a,error:o}=dh(n,e,`tone`,[`info`,`success`,`warning`],`info`),s=a===`warning`?`alert`:`status`;return(0,Z.jsxs)(Z.Fragment,{children:[o?(0,Z.jsx)(Mg,{}):null,(0,Z.jsxs)(`div`,{className:`local-alert local-alert-${a}`,role:s,children:[i?(0,Z.jsx)(`div`,{className:`local-alert-title`,children:i}):null,(0,Z.jsx)(`div`,{className:`local-alert-body`,children:r(e.children??[],t)})]})]})}function Pg({node:e,visible:t}){let n=$(),{runtime:r}=n,{tone:i,error:a}=dh(r,e,`tone`,[`neutral`,`success`,`warning`],`neutral`),o=bh(e);return(0,Z.jsxs)(Z.Fragment,{children:[a?(0,Z.jsx)(Mg,{}):null,(0,Z.jsx)(`span`,{className:`md-badge md-badge-${i} local-badge`,style:o?{color:o}:void 0,children:Kh(n,e.children,t)})]})}function Fg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),s=ch(i,e,`text`,o(`Tooltip`,`提示`),o),[c,l]=(0,y.useState)(!1),u=`${n}-tooltip`;return a===`static`?(0,Z.jsxs)(`span`,{className:`local-tooltip local-static-tooltip`,children:[(0,Z.jsx)(`span`,{className:`local-tooltip-trigger`,children:Kh(r,e.children,t)}),(0,Z.jsx)(`span`,{className:`local-tooltip-bubble is-visible`,role:`note`,children:s})]}):(0,Z.jsxs)(`span`,{className:`local-tooltip`,onMouseEnter:()=>l(!0),onMouseLeave:()=>l(!1),children:[(0,Z.jsx)(`span`,{className:`local-tooltip-trigger`,tabIndex:0,"aria-describedby":u,onFocus:()=>l(!0),onBlur:()=>l(!1),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),l(!1))},children:Kh(r,e.children,t)}),(0,Z.jsx)(`span`,{id:u,role:`tooltip`,className:`local-tooltip-bubble${c?` is-visible`:``}`,children:s}),(0,Z.jsx)(yh,{value:s})]})}function Ig({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{anchors:i,rootRef:a,runtime:o,urlPolicy:s,mode:c}=r,l=Q(),u=`${n}-jump-feedback`,[d,f]=(0,y.useState)(null),p=ah(e,`to`)??``,m=i.targetId(p),h=ah(e,`appearance`)===`button`?`button`:`link`,g=bh(e),_=m?`#${m}`:`#`,v=m!==void 0;if(v&&s)try{v=s(`#${p}`,`link`)===!0}catch{v=!1}return Fh(o,e,()=>f(null)),c===`static`?v&&m?(0,Z.jsx)(`a`,{href:`#${m}`,className:`local-jump local-jump-link local-jump-static`,style:xh(g),children:Kh(r,e.children,t)}):(0,Z.jsx)(`span`,{className:`local-jump local-jump-static-blocked`,style:xh(g),children:Kh(r,e.children,t)}):(0,Z.jsxs)(Z.Fragment,{children:[(0,Z.jsx)(`a`,{href:v?_:`#`,className:`local-jump local-jump-${h}`,style:xh(g),"data-local-target-missing":m?void 0:`true`,"data-local-jump-blocked":m&&!v?`true`:void 0,"aria-describedby":d?u:void 0,onClick:e=>{if(!v||!m){e.preventDefault(),f(m?l(`Jump is blocked by the host`,`跳转已被主机策略阻止`):l(`Jump target not found`,`找不到跳转目标`));return}let t=a.current;if(!t||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let n=null;try{n=t.querySelector(`[id="${m}"]`)}catch{n=null}if(!n){e.preventDefault(),f(l(`Jump target not found`,`找不到跳转目标`));return}if(n.closest(`[hidden]`)){e.preventDefault(),f(l(`Jump target is hidden`,`跳转目标当前隐藏`));return}e.preventDefault(),n.hasAttribute(`tabindex`)||(n.tabIndex=-1);try{n.focus({preventScroll:!0})}catch{}let r=`smooth`;try{window.matchMedia(`(prefers-reduced-motion: reduce)`).matches&&(r=`auto`)}catch{r=`auto`}try{n.scrollIntoView({behavior:r,block:`start`})}catch{}f(null)},children:Kh(r,e.children,t)}),d?(0,Z.jsx)(`span`,{id:u,className:`local-jump-feedback`,role:`status`,"aria-live":`polite`,children:d}):null]})}function Lg({node:e}){let{anchors:t}=$(),n=t.anchorIds.get(e);return n?(0,Z.jsx)(`span`,{className:`local-anchor`,id:n,"data-local-anchor":``}):null}function Rg({node:e,visible:t}){let n=$(),r=bh(e);return(0,Z.jsx)(`span`,{className:`local-text`,style:r?{color:r}:void 0,children:Kh(n,e.children,t)})}function zg({node:e,visible:t}){let{render:n}=$(),r=bh(e);return(0,Z.jsx)(`div`,{className:`local-section`,style:r?{color:r}:void 0,children:n(e.children??[],t)})}function Bg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),{write:s,error:c,setError:l}=Nh(e),u=ch(i,e,`label`,o(`Multi select`,`多选`),o),{disabled:d,invalid:f}=Ph(e),p=nh(e),m=ug(e),h=mh(i,e),g=Array.isArray(h)?h.filter(e=>typeof e==`string`):[],_=m.filter(e=>g.includes(e.value)).map(e=>fg(i,e.node,o)||e.value),v=ph(i,e,`max-selected`,m.length),b=Number.isFinite(v)?Math.max(0,Math.floor(v)):m.length,[x,S]=(0,y.useState)(``);if(Fh(i,e,()=>{S(``),l(null)}),m.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});if(a===`static`)return(0,Z.jsx)(vh,{className:`local-multi-select`,label:u,value:_h(_.join(`, `))});let C=new Set(g),w=g.length>=b,T=x.trim().toLocaleLowerCase(),E=T?m.filter(e=>`${dg(i,e.node.children,o)} ${e.value}`.toLocaleLowerCase().includes(T)):m,D=(e,t)=>{let n=new Set(C);if(t){if(!n.has(e)&&n.size>=b)return;n.add(e)}else n.delete(e);s(m.filter(e=>n.has(e.value)).map(e=>e.value))};return(0,Z.jsxs)(`fieldset`,{className:`local-multi-select`,style:xh(bh(e)),disabled:d,"aria-invalid":p.invalid||void 0,"aria-describedby":p.describedBy,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:u}),(0,Z.jsxs)(`div`,{className:`local-multi-toolbar`,children:[(0,Z.jsx)(`input`,{id:`${n}-multi-search`,type:`search`,className:`md-text-input local-multi-search`,value:x,placeholder:o(`Search options`,`搜索选项`),"aria-label":o(`Search ${u}`,`搜索${u}`),onChange:e=>S(e.target.value)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-quiet local-multi-clear`,onClick:()=>{S(``),g.length>0&&s([])},children:o(`Clear`,`清除`)})]}),(0,Z.jsx)(`div`,{className:`local-multi-list`,role:`group`,"aria-label":u,children:E.length===0?(0,Z.jsx)(`span`,{className:`local-multi-empty`,children:o(`No matching options`,`没有匹配选项`)}):E.map(e=>{let n=C.has(e.value);return(0,Z.jsxs)(`label`,{className:`local-multi-option${n?` is-selected`:``}`,children:[(0,Z.jsx)(`input`,{type:`checkbox`,checked:n,disabled:!n&&w,onChange:t=>D(e.value,t.target.checked)}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id)})}),(0,Z.jsx)(`span`,{className:`local-multi-count`,role:`status`,"aria-live":`polite`,children:o(`${g.length} of ${b} selected`,`已选 ${g.length}/${b}`)}),(0,Z.jsx)(yh,{value:_h(_.join(`, `))}),(0,Z.jsx)($h,{message:f?o(`Cannot compute`,`无法计算`):c})]})}function Vg({node:e}){let{runtime:t,mode:n}=$(),r=Q(),{write:i,error:a,setError:o}=Nh(e),s=ch(t,e,`label`,r(`Range`,`范围`),r),{disabled:c,invalid:l}=Ph(e),u=nh(e),{min:d,max:f,step:p}=Mh(t,e,`min`,`max`,0,100,1),m=Math.floor((f-d)/p+1e-9),h=d,g=kh(d+Math.max(0,m)*p,d,f),_=Ah(jh(t,e,`start`,h),d,f,p),v=Ah(jh(t,e,`end`,g),d,f,p);_>v&&(_=v);let[b,x]=(0,y.useState)(null);Fh(t,e,()=>{x(null),o(null)});let S=r(`Start`,`起点`),C=r(`End`,`终点`),w=`${S}: ${_} · ${C}: ${v}`;if(n===`static`)return(0,Z.jsx)(vh,{className:`local-range-slider`,label:s,value:w});let T=(e,t)=>{let n=Ah(kh(t,d,f),d,f,p);e===`start`&&n>v?x(r(`Start cannot exceed end`,`起点不能超过终点`)):e===`end`&&n<_?x(r(`End cannot be less than start`,`终点不能小于起点`)):(x(null),i(n,e))};return(0,Z.jsxs)(`div`,{className:`md-control local-range-slider`,style:xh(bh(e)),role:`group`,"aria-label":s,"aria-invalid":u.invalid||void 0,"aria-describedby":u.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:s}),(0,Z.jsxs)(`div`,{className:`local-range-row`,children:[(0,Z.jsx)(`span`,{className:`local-range-name`,children:r(`Start`,`起点`)}),(0,Z.jsx)(`input`,{type:`range`,className:`local-range-input`,min:d,max:v,step:p,value:_,disabled:c,"aria-label":`${s} ${r(`Start`,`起点`)}`,onChange:e=>T(`start`,Number(e.target.value))}),(0,Z.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:_})]}),(0,Z.jsxs)(`div`,{className:`local-range-row`,children:[(0,Z.jsx)(`span`,{className:`local-range-name`,children:r(`End`,`终点`)}),(0,Z.jsx)(`input`,{type:`range`,className:`local-range-input`,min:_,max:f,step:p,value:v,disabled:c,"aria-label":`${s} ${r(`End`,`终点`)}`,onChange:e=>T(`end`,Number(e.target.value))}),(0,Z.jsx)(`span`,{className:`local-range-value`,"aria-hidden":`true`,children:v})]}),(0,Z.jsx)(yh,{value:w}),(0,Z.jsx)($h,{message:l?r(`Cannot compute`,`无法计算`):b??a})]})}function Hg({id:e,label:t,value:n,min:r,max:i,step:a,disabled:o,onCommit:s,reset:c}){let[l,u]=(0,y.useState)(()=>String(n)),[d,f]=(0,y.useState)(!1),p=(0,y.useRef)(n);(0,y.useEffect)(()=>{u(String(n)),f(!1)},[c]),(0,y.useEffect)(()=>{p.current!==n&&(p.current=n,d||u(String(n)))},[n,d]);let m=e=>{let t=e.trim();if(t===``||t===`-`||t===`.`||t===`-.`)return null;let n=Number(t);return Number.isFinite(n)?Ah(kh(n,r,i),r,i,a):null};return(0,Z.jsxs)(`div`,{className:`local-number-field`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:e,children:t}),(0,Z.jsx)(`input`,{id:e,className:`md-text-input`,type:`text`,inputMode:`decimal`,value:l,disabled:o,onFocus:()=>f(!0),onBlur:()=>{f(!1);let e=m(l);u(String(e??n))},onChange:e=>{let t=e.target.value;u(t);let n=m(t);n!==null&&s(n)}})]})}function Ug({node:e}){let t=(0,y.useId)(),{runtime:n,mode:r}=$(),i=Q(),{write:a,writeMany:o,error:s,setError:c}=Nh(e),l=ch(n,e,`label`,i(`Coordinate`,`坐标`),i),{disabled:u,invalid:d}=Ph(e),f=nh(e),p=Mh(n,e,`x-min`,`x-max`,-5,5,1),m=Mh(n,e,`y-min`,`y-max`,-5,5,1),h=Ah(0,p.min,p.max,p.step),g=Ah(0,m.min,m.max,m.step),_=Ah(jh(n,e,`x`,h),p.min,p.max,p.step),v=Ah(jh(n,e,`y`,g),m.min,m.max,m.step),b=(0,y.useRef)(null),x=(0,y.useRef)(!1);Fh(n,e,()=>c(null));let S=`X: ${_} · Y: ${v}`;if(r===`static`)return(0,Z.jsx)(vh,{className:`local-coordinate`,label:l,value:S});let C=e=>p.max>p.min?40+(e-p.min)/(p.max-p.min)*320:200,w=e=>m.max>m.min?360-(e-m.min)/(m.max-m.min)*320:200,T=C(_),E=w(v),D=C(kh(0,p.min,p.max)),O=w(kh(0,m.min,m.max)),k=e=>{let t=e.step*Math.max(1,Math.ceil((e.max-e.min)/(e.step*10))),n=Math.min(11,Math.floor((e.max-e.min)/t)+1);return Array.from({length:n},(n,r)=>e.min+r*t)},A=e=>{let t=b.current?.getBoundingClientRect();if(!t||t.width===0||t.height===0)return null;let n=kh(((e.clientX-t.left)/t.width-.1)/.8,0,1),r=kh(((e.clientY-t.top)/t.height-.1)/.8,0,1);return{x:Ah(p.min+n*(p.max-p.min),p.min,p.max,p.step),y:Ah(m.min+(1-r)*(m.max-m.min),m.min,m.max,m.step)}},j=(e,t)=>{(e!==_||t!==v)&&o({x:e,y:t})};return(0,Z.jsxs)(`div`,{className:`local-coordinate`,style:xh(bh(e)),role:`group`,"aria-label":l,"aria-invalid":f.invalid||void 0,"aria-describedby":f.describedBy,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:l}),(0,Z.jsxs)(`div`,{className:`local-coordinate-surface`,children:[(0,Z.jsx)(`div`,{ref:b,className:`local-coordinate-pad`,role:`group`,"aria-label":i(`${l} drag area`,`${l} 拖拽区`),"aria-disabled":u||void 0,tabIndex:u?-1:0,onKeyDown:e=>{if(u)return;let t=_,n=v;switch(e.key){case`ArrowLeft`:t=Ah(_-p.step,p.min,p.max,p.step);break;case`ArrowRight`:t=Ah(_+p.step,p.min,p.max,p.step);break;case`ArrowDown`:n=Ah(v-m.step,m.min,m.max,m.step);break;case`ArrowUp`:n=Ah(v+m.step,m.min,m.max,m.step);break;case`Home`:t=p.min,n=m.min;break;case`End`:t=Ah(p.max,p.min,p.max,p.step),n=Ah(m.max,m.min,m.max,m.step);break;default:return}e.preventDefault(),j(t,n)},onPointerDown:e=>{if(u)return;e.preventDefault(),x.current=!0,b.current?.focus({preventScroll:!0});try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}let t=A(e);t&&j(t.x,t.y)},onPointerMove:e=>{if(!x.current||u)return;let t=A(e);t&&j(t.x,t.y)},onPointerUp:e=>{x.current=!1;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},onPointerCancel:()=>{x.current=!1},children:(0,Z.jsxs)(`svg`,{className:`local-coordinate-svg`,viewBox:`0 0 400 400`,"aria-hidden":`true`,focusable:`false`,children:[(0,Z.jsx)(`defs`,{children:(0,Z.jsx)(`marker`,{id:`${t}-coordinate-arrow`,markerWidth:`8`,markerHeight:`8`,refX:`6`,refY:`4`,orient:`auto`,viewBox:`0 0 8 8`,children:(0,Z.jsx)(`path`,{className:`local-coordinate-arrow`,d:`M1 1 L6 4 L1 7`})})}),(0,Z.jsxs)(`g`,{className:`local-coordinate-grid`,children:[(0,Z.jsx)(`rect`,{x:`40`,y:`40`,width:`320`,height:`320`}),k(p).map((e,t)=>(0,Z.jsx)(`line`,{x1:C(e),y1:`40`,x2:C(e),y2:`360`},`x-${t}`)),k(m).map((e,t)=>(0,Z.jsx)(`line`,{x1:`40`,y1:w(e),x2:`360`,y2:w(e)},`y-${t}`))]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-axes`,children:[(0,Z.jsx)(`line`,{className:`local-coordinate-horizontal`,x1:`26`,y1:O,x2:`372`,y2:O,markerEnd:`url(#${t}-coordinate-arrow)`}),(0,Z.jsx)(`line`,{className:`local-coordinate-vertical`,x1:D,y1:`374`,x2:D,y2:`24`,markerEnd:`url(#${t}-coordinate-arrow)`})]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-axis-label`,children:[(0,Z.jsx)(`text`,{x:`358`,y:O-14,children:`x`}),(0,Z.jsx)(`text`,{x:D+12,y:`40`,children:`y`})]}),(0,Z.jsxs)(`g`,{className:`local-coordinate-projection`,children:[(0,Z.jsx)(`line`,{x1:T,y1:E,x2:T,y2:O}),(0,Z.jsx)(`line`,{x1:T,y1:E,x2:D,y2:E})]}),(0,Z.jsx)(`circle`,{className:`local-coordinate-dot`,cx:T,cy:E,r:`10`}),(0,Z.jsx)(`text`,{className:`local-coordinate-value`,x:T,y:E>330?E-22:E+30,textAnchor:T<80?`start`:T>320?`end`:`middle`,children:`(${_}, ${v})`})]})}),(0,Z.jsx)(`span`,{className:`local-coordinate-caption`,children:i(`Draggable coordinate plane`,`可拖动的坐标平面`)})]}),(0,Z.jsx)(`span`,{className:`md-hint local-hint`,children:i(`Arrow keys adjust the point; Home and End jump to the lower or upper bounds.`,`方向键调整坐标;Home 和 End 跳到最小或最大边界。`)}),(0,Z.jsxs)(`div`,{className:`local-coordinate-fields`,children:[(0,Z.jsx)(Hg,{id:`${t}-coordinate-x`,reset:n.resetToken(e),label:`${l} X`,value:_,min:p.min,max:p.max,step:p.step,disabled:u,onCommit:e=>a(e,`x`)}),(0,Z.jsx)(Hg,{id:`${t}-coordinate-y`,reset:n.resetToken(e),label:`${l} Y`,value:v,min:m.min,max:m.max,step:m.step,disabled:u,onCommit:e=>a(e,`y`)})]}),(0,Z.jsx)(yh,{value:S}),(0,Z.jsx)($h,{message:d?i(`Cannot compute`,`无法计算`):s})]})}function Wg({node:e,visible:t}){let n=(0,y.useId)(),r=$(),{runtime:i,mode:a}=r,o=Q(),s=ch(i,e,`label`,o(`Quiz`,`测验`),o),c=ah(e,`type`)===`number`?`number`:`choice`,l=(ah(e,`answer`)??``).trim(),u=ph(i,e,`tolerance`,0),d=Number.isFinite(u)&&u>=0?u:0,{disabled:f,invalid:p}=Ph(e),m=ug(e),h=ch(i,e,`explanation`,``,o),[g,_]=(0,y.useState)(``),[v,b]=(0,y.useState)(null);Fh(i,e,()=>{_(``),b(null)});let x=c===`number`?Number(l):NaN;if(c===`number`&&!Number.isFinite(x))return(0,Z.jsx)(Ih,{message:o(`Quiz answer must be a number`,`测验答案必须是数字`)});if(c===`choice`&&m.length===0)return(0,Z.jsx)(Ih,{message:o(`Missing options`,`缺少选项`)});let S=m.map(e=>fg(i,e.node,o)||e.value);if(a===`static`)return(0,Z.jsxs)(`div`,{className:`local-quiz local-static-quiz`,role:`group`,"aria-label":s,children:[(0,Z.jsx)(`span`,{className:`md-label`,children:s}),c===`choice`?(0,Z.jsx)(`ul`,{className:`local-static-list local-static-quiz-options`,children:m.map(e=>(0,Z.jsx)(`li`,{className:`local-static-list-item`,children:Kh(r,e.node.children,t)},e.node.id))}):(0,Z.jsx)(`span`,{className:`local-static-value`,children:o(`Numeric answer`,`数字作答`)})]});let C=()=>{if(c===`choice`){if(g===``){b(`incomplete`);return}b(g===l?`correct`:`incorrect`);return}let e=g.trim(),t=e===``?NaN:Number(e);b(Number.isFinite(t)?Math.abs(t-x)<=d?`correct`:`incorrect`:`incomplete`)},w=()=>{_(``),b(null)},T=v===null?null:v===`correct`?`${o(`Correct`,`回答正确`)}`:v===`incorrect`?`${o(`Not quite`,`回答不正确`)}`:c===`number`?o(`Enter a number first`,`请先输入数字`):o(`Choose an answer first`,`请先选择答案`),E=v===`correct`?` is-correct`:v===`incorrect`?` is-incorrect`:``;return(0,Z.jsxs)(`div`,{className:`local-quiz`,role:`group`,"aria-label":s,children:[c===`choice`?(0,Z.jsxs)(`fieldset`,{className:`local-quiz-options`,disabled:f,children:[(0,Z.jsx)(`legend`,{className:`md-label`,children:s}),m.map(e=>(0,Z.jsxs)(`label`,{className:`local-radio-option`,children:[(0,Z.jsx)(`input`,{type:`radio`,name:`${n}-quiz`,value:e.value,checked:g===e.value,onChange:()=>{_(e.value),b(null)}}),(0,Z.jsx)(`span`,{children:Kh(r,e.node.children,t)})]},e.node.id))]}):(0,Z.jsxs)(`div`,{className:`local-quiz-number`,children:[(0,Z.jsx)(`label`,{className:`md-label`,htmlFor:`${n}-quiz`,children:s}),(0,Z.jsx)(`input`,{id:`${n}-quiz`,className:`md-text-input local-quiz-input`,type:`text`,inputMode:`decimal`,value:g,disabled:f,"aria-label":s,onChange:e=>{_(e.target.value),b(null)}})]}),(0,Z.jsxs)(`div`,{className:`local-quiz-actions`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-primary local-quiz-check`,disabled:f,onClick:C,children:o(`Check answer`,`检查答案`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-quiz-again`,disabled:f,onClick:w,children:o(`Try again`,`再试一次`)})]}),(0,Z.jsx)(`span`,{className:`local-quiz-feedback${E}`,role:`status`,"aria-live":`polite`,children:T?`${v===`correct`?`✓ `:v===`incorrect`?`✗ `:``}${T}`:``}),v!==null&&h?(0,Z.jsx)(`div`,{className:`local-quiz-explanation`,children:h}):null,(0,Z.jsx)(yh,{block:!0,value:c===`choice`?`${T?`${T} · `:``}${S.join(` · `)}`:T||o(`No answer yet`,`尚未作答`)}),(0,Z.jsx)($h,{message:p?o(`Cannot compute`,`无法计算`):null})]})}function Gg({node:e,visible:t}){let n=(0,y.useId)(),{runtime:r,render:i,mode:a}=$(),o=Q(),{write:s,error:c,setError:l}=Nh(e),u=ch(r,e,`label`,``,o),d=nh(e),f=(e.children??[]).filter(e=>e.type===`component`&&e.name===`step`),p=f.map((e,t)=>ah(e,`value`)??`step-${t+1}`),m=f.map((e,t)=>ch(r,e,`label`,p[t],o)),h=ah(e,`initial`)??``,g=p.includes(h)?h:p[0]??``,_=mh(r,e),v=typeof _==`string`?_:``,b=(0,y.useRef)([]),x=(0,y.useRef)(!1);Fh(r,e,()=>{l(null),x.current=!1});let S=p.includes(v)?v:g,C=Math.max(0,p.indexOf(S));if((0,y.useEffect)(()=>{x.current&&(x.current=!1,b.current[C]?.focus({preventScroll:!0}))},[C,S]),f.length===0)return(0,Z.jsx)(Ih,{message:o(`Steps requires at least one step`,`步骤至少需要一个 step`)});if(a===`static`){let e=f[C];return(0,Z.jsxs)(`section`,{className:`local-steps local-static-steps`,"aria-label":u||o(`Steps`,`步骤`),children:[u?(0,Z.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,Z.jsx)(`div`,{className:`local-steps-nav local-static-steps-nav`,children:(0,Z.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)})}),(0,Z.jsx)(`div`,{className:`local-steps-panel`,role:`group`,"aria-label":m[C],children:i(e.children??[],t)})]})}let w=e=>{let t=p[e];t!==void 0&&(x.current=!0,s(t))};return(0,Z.jsxs)(`section`,{className:`local-steps`,"aria-label":u||o(`Steps`,`步骤`),"aria-invalid":d.invalid||void 0,"aria-describedby":d.describedBy,children:[u?(0,Z.jsx)(`div`,{className:`local-steps-label`,children:u}):null,(0,Z.jsxs)(`div`,{className:`local-steps-nav`,children:[(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-prev`,disabled:C<=0,onClick:()=>w(C-1),children:o(`Previous`,`上一步`)}),(0,Z.jsx)(`span`,{className:`local-steps-status`,role:`status`,"aria-live":`polite`,children:o(`Step ${C+1} of ${f.length}`,`第 ${C+1} 步,共 ${f.length} 步`)}),(0,Z.jsx)(`button`,{type:`button`,className:`md-button md-button-secondary local-steps-next`,disabled:C>=f.length-1,onClick:()=>w(C+1),children:o(`Next`,`下一步`)})]}),f.map((e,r)=>{let a=r===C;return(0,Z.jsx)(`div`,{id:`${n}-step-${r}`,ref:e=>{b.current[r]=e},className:`local-steps-panel`,role:`group`,"aria-label":m[r],tabIndex:-1,hidden:!a,children:i(e.children??[],t&&a)},e.id)}),(0,Z.jsx)($h,{message:c})]})}function Kg(){return null}var qg={panel:Cg,card:wg,grid:Tg,tabs:Og,tab:Eg,accordion:kg,disclosure:Ag,if:jg,alert:Ng,badge:Pg,validation:Zh,column:Qh,tooltip:Fg,input:tg,textarea:ng,number:ag,slider:og,toggle:sg,checkbox:cg,date:lg,select:mg,choices:hg,"radio-group":gg,option:pg,node:Eg,edge:Dg,counter:bg,timer:xg,checklist:vg,progress:Sg,jump:Ig,anchor:Lg,text:Rg,section:zg,"multi-select":Bg,"range-slider":Vg,coordinate:Ug,quiz:Wg,steps:Gg,step:Kg};function Jg({document:e,runtime:t,onDiagnostics:n,urlPolicy:r,locale:i=`en`,themes:a,colorScheme:o=`auto`,mode:s=`interactive`,staticFirst:c=!1,imageResolver:l}){let[u,d]=(0,y.useState)(!c);(0,y.useEffect)(()=>{c&&d(!0)},[c]);let f=s===`interactive`&&c&&!u?`static`:s,p=(0,y.useId)(),m=(0,y.useMemo)(()=>(e,t)=>pp(i,e,t),[i]),h=(0,y.useMemo)(()=>rr(e,`local-heading-${p}`),[e,p]),g=(0,y.useMemo)(()=>{try{return Un(e)}catch{return Ln}},[e]),_=(0,y.useRef)(n);_.current=n;let v=(0,y.useRef)(null),b=(0,y.useCallback)(e=>{_.current?.(e)},[]),x=Ch(a),S=(0,y.useMemo)(()=>{try{return Fu(e.theme,a,e.themeRange,e.source)}catch{return{name:Ou.name,diagnostics:[]}}},[e.theme,e.themeRange?.start,e.themeRange?.end,e.source,x]),C=Oh(v,o),w=(0,y.useRef)(``);(0,y.useEffect)(()=>{let e=wh(S.diagnostics);if(e===w.current)return;let t=w.current!==``;w.current=e,(S.diagnostics.length>0||t)&&b(S.diagnostics)},[S,b]);let T=(0,y.useCallback)(e=>{try{return t.subscribe(e)}catch{return()=>{}}},[t]),E=(0,y.useCallback)(()=>{try{return t.snapshot()}catch{return ih}},[t]);(0,y.useSyncExternalStore)(T,E,E);let D=``;if(e.validations?.length)try{D=wh(t.validate())}catch{D=`unavailable`}let O=(0,y.useMemo)(()=>th(e,t,p,m),[e,t,p,m,D]),k=(0,y.useMemo)(()=>({runtime:t,urlPolicy:r,imageResolver:l,anchors:h,t:m,mode:f,dependencies:g}),[t,r,l,h,m,f,g]),A=(0,y.useCallback)((e,t=!0)=>Uh(k,e??[],t),[k]),j=(0,y.useMemo)(()=>({runtime:t,render:A,visible:!0,mode:f,imageResolver:l,validation:O,report:b,urlPolicy:r,anchors:h,rootRef:v,t:m,dependencies:g}),[t,A,b,r,l,f,h,v,m,O,g]);return(0,Z.jsx)(dp,{locale:i,children:(0,Z.jsx)(`article`,{ref:v,className:`md-document local-document${f===`static`?` local-static`:``}`,"data-rmd-theme":S.name,"data-color-scheme":C,"data-render-mode":f,style:{colorScheme:C},"aria-label":f===`static`?m(`Static document`,`静态文档`):m(`Interactive document`,`交互文档`),children:(0,Z.jsx)(qm.Provider,{value:j,children:A(e.nodes,!0)})})})}var Yg=`reactive-md-state/v1`,Xg=1048576,Zg=/^fnv1a32:[0-9a-f]{8}$/,Qg=2166136261,$g=16777619,e_=new Set([`format`,`syntax`,`sourceDigest`,`parameters`,`generator`]),t_=new Set([`name`,`version`]),n_=new TextEncoder;function r_(e,t){return{code:e,message:t.length>2e3?`${t.slice(0,D-1)}…`:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function i_(e,t,n){e.length<100&&e.push(r_(t,n))}function a_(e){return e instanceof Error?e.message:String(e)}function o_(e){for(let t=0;t<e.length;t+=1){let n=e.charCodeAt(t);if(n>=55296&&n<=56319){let n=e.charCodeAt(t+1);if(n>=56320&&n<=57343){t+=1;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}function s_(e){if(typeof e!=`string`)throw TypeError(`localSourceDigest requires a source string.`);let t=n_.encode(e),n=Qg;for(let e=0;e<t.length;e+=1)n^=t[e],n=Math.imul(n,$g)>>>0;return`fnv1a32:${n.toString(16).padStart(8,`0`)}`}function c_(e){if(typeof e==`string`)return o_(e)?{ok:!0,value:e}:{ok:!1,message:`contains malformed Unicode.`};if(typeof e==`number`)return Number.isFinite(e)?{ok:!0,value:e}:{ok:!1,message:`must be a finite number.`};if(typeof e==`boolean`||e===null)return{ok:!0,value:e};if(Array.isArray(e)){let t=[];for(let n=0;n<e.length;n+=1){let r=e[n];if(typeof r!=`string`)return{ok:!1,message:`must be an array of strings.`};if(!o_(r))return{ok:!1,message:`contains malformed Unicode.`};t.push(r)}return{ok:!0,value:Object.freeze(t)}}return{ok:!1,message:`must be a string, finite number, boolean, null or string array.`}}function l_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function u_(e){return Object.freeze(e.parameters),e.generator&&Object.freeze(e.generator),Object.freeze(e)}function d_(e){if(!e||typeof e!=`object`||Array.isArray(e))throw TypeError(`generator must be an object with string name and version.`);if(typeof e.name!=`string`||typeof e.version!=`string`)throw TypeError(`generator must have string name and version.`);if(!o_(e.name)||!o_(e.version))throw TypeError(`generator name and version must be well-formed Unicode strings.`);return Object.freeze({name:e.name,version:e.version})}function f_(e){return typeof e==`string`?`"${e.length>48?`${e.slice(0,48)}…`:e}"`:e===null?`null`:Array.isArray(e)?`an array`:typeof e}function p_(e,t){return e.length>t?e.length:n_.encode(e).byteLength}function m_(e,t){let n;try{let t=JSON.stringify(e);if(typeof t!=`string`)return null;n=t}catch{return null}return p_(n,t)}function h_(e){if(e===void 0)return Xg;if(typeof e!=`object`||!e)throw TypeError(`parseLocalState options must be an object.`);let{maxLength:t}=e;if(t===void 0)return Xg;if(typeof t!=`number`||!Number.isSafeInteger(t)||t<=0)throw RangeError(`maxLength must be a finite positive integer.`);return t}function g_(e,t,n){if(!e||e.syntax!==`local`||typeof e.source!=`string`)throw TypeError(`createLocalStateFile requires a compiled local document.`);if(!t||typeof t!=`object`||Array.isArray(t))throw TypeError(`createLocalStateFile requires a state object.`);let r=Object.keys(e.bindings).filter(e=>!e.startsWith(`@`)).sort(),i=new Set(r),a=new Map;for(let n of Object.keys(t)){if(Object.hasOwn(e.computations??{},n))continue;if(n.startsWith(`@`)){if(!Object.hasOwn(e.bindings,n))throw Error(`Cannot persist parameter "${n}": it is not a binding of this document.`);continue}if(!i.has(n))throw Error(`Cannot persist parameter "${n}": it is not a public binding of this document.`);let r=c_(t[n]);if(!r.ok)throw TypeError(`Cannot persist parameter "${n}": the value ${r.message}`);a.set(n,r.value)}let o={};for(let e of r){if(!a.has(e))throw Error(`Cannot persist the document: parameter "${e}" is missing from the supplied state.`);o[e]=a.get(e)}let s={format:Yg,syntax:au,sourceDigest:s_(e.source),parameters:o};return n!==void 0&&(s.generator=d_(n)),u_(s)}function __(e,t){let n=[],r=(e,t)=>i_(n,e,t),i=e;if(typeof e==`string`){if(p_(e,t)>t)return{ok:!1,diagnostics:[r_(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]};if(!o_(e))return{ok:!1,diagnostics:[r_(`local.state.utf`,`The state payload contains malformed Unicode.`)]};try{i=JSON.parse(e)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.json`,`The state payload is not valid JSON: ${a_(e)}`)]}}}else{let n=m_(e,t);if(n===null)return{ok:!1,diagnostics:[r_(`local.state.shape`,`The state payload must be a JSON object.`)]};if(n>t)return{ok:!1,diagnostics:[r_(`local.state.size`,`The state payload exceeds the ${t}-byte limit.`)]}}if(!l_(i))return{ok:!1,diagnostics:[r_(`local.state.shape`,`The state payload must be a JSON object.`)]};Object.getOwnPropertySymbols(i).length>0&&r(`local.state.shape`,`The state payload cannot use symbol keys.`);for(let e of Object.keys(i))e_.has(e)||r(`local.state.key`,`Unknown top-level state key "${e}".`);let a=i.format;a!==`reactive-md-state/v1`&&r(`local.state.format`,`Unsupported state format ${f_(a)}; expected "${Yg}".`);let o=i.syntax;o!==`local-draft-2`&&r(`local.state.syntax`,`Unsupported state syntax ${f_(o)}; expected "${au}".`);let s=i.sourceDigest;typeof s==`string`&&Zg.test(s)||r(`local.state.digest`,`sourceDigest must match "fnv1a32:" followed by 8 lowercase hexadecimal digits.`);let c={},l=i.parameters;if(!l_(l))r(`local.state.parameters`,`parameters must be a JSON object of public binding values.`);else for(let e of Object.keys(l).sort()){if(e===`__proto__`){r(`local.state.parameter.prototype`,`Parameter names cannot be "__proto__".`);continue}if(e.startsWith(`@`)){r(`local.state.parameter.internal`,`Internal parameter "${e}" cannot be persisted.`);continue}let t=c_(l[e]);t.ok?c[e]=t.value:r(`local.state.parameter.value`,`Parameter "${e}" ${t.message}`)}let u;if(Object.hasOwn(i,`generator`)){let e=i.generator;if(!l_(e))r(`local.state.generator`,`generator must be an object with string name and version.`);else{for(let t of Object.keys(e))t_.has(t)||r(`local.state.generator`,`generator has unknown key "${t}".`);typeof e.name!=`string`||typeof e.version!=`string`?r(`local.state.generator`,`generator must have string name and version.`):!o_(e.name)||!o_(e.version)?r(`local.state.utf`,`generator contains malformed Unicode.`):u=Object.freeze({name:e.name,version:e.version})}}if(n.length)return{ok:!1,diagnostics:n};let d={format:Yg,syntax:au,sourceDigest:s,parameters:c};return u&&(d.generator=u),{ok:!0,file:u_(d)}}function v_(e,t){let n=h_(t);try{return __(e,n)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.invalid`,`Cannot read the local state: ${a_(e)}`)]}}}function y_(e){let t=new Map,n=e=>{for(let r of e)t.set(r.id,r),r.children&&n(r.children)};return n(e.nodes),t}function b_(e){let t=y_(e),n=new Map,r=[];for(let[i,a]of Object.entries(e.bindingSlots??{})){let e=t.get(i);if(!e)continue;let o={node:e,slots:[]};for(let[t,r]of Object.entries(a))o.slots.push({slot:t,key:r}),r.startsWith(`@`)||n.set(r,{node:e,slot:t});o.slots.length&&r.push(o)}let i=[];for(let[r,a]of Object.entries(e.bindings)){if(r.startsWith(`@`))continue;let e=n.get(r);if(e){i.push({key:r,binding:a,node:e.node,slot:e.slot});continue}let o=a.owner&&t.has(a.owner)?a.owner:a.nodeIds.find(e=>t.has(e));i.push({key:r,binding:a,node:o?t.get(o):void 0})}return{plans:i,groups:r}}function x_(e,t,n){let r=[];for(let i of t.plans)i.slot===void 0&&Object.hasOwn(n,i.key)&&(i.node?Object.is(e.get(i.node),n[i.key])||r.push(...e.set(i.node,n[i.key])):r.push(r_(`local.state.document`,`The document has no component for parameter "${i.key}".`)));for(let i of t.groups){let t={},a=!1;for(let{slot:e,key:r}of i.slots)Object.hasOwn(n,r)&&(t[e]=n[r],a=!0);a&&r.push(...e.setMany(i.node,t))}return r}function S_(e,t){let n=e.snapshot(),r={};for(let e of t){let t=n.state[e];r[e]=Array.isArray(t)?Object.freeze([...t]):t}return Object.freeze(r)}function C_(e,t,n,r){let i=v_(t,r);if(!i.ok)return i;if(!e||e.syntax!==`local`||typeof e.source!=`string`||!Array.isArray(e.nodes)||!e.bindings)return{ok:!1,diagnostics:[r_(`local.state.document`,`resolveLocalState requires a compiled local document.`)]};if(i.file.syntax!==`local-draft-2`)return{ok:!1,diagnostics:[r_(`local.state.syntax`,`This state file uses syntax "${i.file.syntax}", but this build accepts "${au}".`)]};if(i.file.sourceDigest!==s_(e.source))return{ok:!1,diagnostics:[r_(`local.state.source`,`This state file was created for a different document (source digest mismatch).`)]};let a=b_(e),o=new Set(a.plans.map(e=>e.key)),s=[];for(let e of Object.keys(i.file.parameters))o.has(e)||i_(s,`local.state.parameter.unknown`,`The state contains unknown parameter "${e}" for this document.`);for(let e of o)Object.hasOwn(i.file.parameters,e)||i_(s,`local.state.parameter.missing`,`The state is missing parameter "${e}".`);if(s.length)return{ok:!1,diagnostics:s};let c;try{c=qf(e)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.document`,`Cannot validate this document: ${a_(e)}`)]}}try{if(n){let e=x_(c,a,n);if(e.length)return{ok:!1,diagnostics:e}}let e=x_(c,a,i.file.parameters);if(e.length)return{ok:!1,diagnostics:e};let t=[...o].sort();return{ok:!0,file:i.file,state:S_(c,t)}}finally{c.dispose()}}function w_(e,t,n){try{return C_(e,t,void 0,n)}catch(e){return{ok:!1,diagnostics:[r_(`local.state.invalid`,`Cannot resolve the local state: ${a_(e)}`)]}}}function T_(e,t){return g_(e.document,e.getParameters(),t)}function E_(e,t){return{code:e,message:t,severity:`error`,range:{start:0,end:0},line:1,column:1}}function D_(e,t=8){let n=e.slice(0,t).map(e=>`- [${e.code}] ${e.message} (line ${e.line}, column ${e.column})`);return e.length>n.length&&n.push(`- ${e.length-n.length} more diagnostic(s).`),n.join(`
57
+ `)}function O_(e){return e instanceof Error?e.message:String(e)}var k_=class extends Error{diagnostics;constructor(e,t){let n=D_(t);super(n?`${e}\n${n}`:e),this.name=`ReactiveMDMountError`,this.diagnostics=t}};function A_(e,t=`standalone.mount`){if(typeof e==`object`&&e&&Array.isArray(e.diagnostics)){let t=e.diagnostics;if(t.length>0)return t}return[E_(t,O_(e))]}var j_=`reactive-md-diagnostics`,M_=`reactive-md-state-change`,N_=/^[A-Za-z][A-Za-z0-9_-]*$/,P_=256,F_=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,I_=/[\u0000-\u001f\u007f-\u009f]/,L_=64,R_=4096,z_=41943040;function B_(e,t){if(e===void 0)return;if(!V_(e)){t(`standalone.payload.images`,`images must be a JSON object mapping image URLs to data URLs.`);return}let n=Object.entries(e);if(n.length>L_){t(`standalone.payload.images`,`images cannot contain more than ${L_} entries.`);return}let r=Object.create(null),i=0;for(let[e,a]of n)if(!e||e.length>R_||e===`__proto__`||I_.test(e)||typeof a!=`string`||!F_.test(a))t(`standalone.payload.images`,`Every image entry must use a bounded URL key and a base64 raster data URL.`);else{if(i+=a.length,i>z_){t(`standalone.payload.images`,`The embedded image map exceeds the 40 MiB budget.`);return}r[e]=a}return r}function V_(e){if(typeof e!=`object`||!e||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function H_(e){let t=[],n=(e,n)=>{t.push(E_(e,n))};if(!V_(e))return{ok:!1,diagnostics:[E_(`standalone.payload.shape`,`The reactive-md payload must be a JSON object.`)]};e.version!==1&&n(`standalone.payload.version`,`The reactive-md payload must use version 1.`);let r=e.target;typeof r!=`string`||r.length===0||r.length>P_?n(`standalone.payload.target`,`The payload target must be an element id of 1-${P_} characters.`):N_.test(r)||n(`standalone.payload.target`,`The payload target must start with a letter and use only letters, digits, underscores or hyphens.`);let i=e.source;typeof i!=`string`&&n(`standalone.payload.source`,`The payload source must be a string.`);let a=e.locale===void 0?`en`:e.locale;a!==`en`&&a!==`zh`&&n(`standalone.payload.locale`,`The payload locale must be "en" or "zh".`);let o=e.colorScheme===void 0?`auto`:e.colorScheme;o!==`light`&&o!==`dark`&&o!==`auto`&&n(`standalone.payload.color-scheme`,`The payload colorScheme must be "light", "dark" or "auto".`);let s=e.hydrate!==void 0&&e.hydrate;typeof s!=`boolean`&&n(`standalone.payload.hydrate`,`The payload hydrate flag must be a boolean.`);let c=e.state;V_(c)||n(`standalone.payload.state`,`The payload state must be a JSON object.`);let l=B_(e.images,n);return t.length>0?{ok:!1,diagnostics:t}:{ok:!0,payload:{version:1,target:r,source:i,state:c,locale:a,colorScheme:o,hydrate:s,...l&&Object.keys(l).length>0?{images:l}:{}}}}function U_(e){try{return H_(e)}catch(e){return{ok:!1,diagnostics:[E_(`standalone.payload.invalid`,`The reactive-md payload could not be read: ${O_(e)}`)]}}}function W_(e){return Array.isArray(e)?e.slice():e}function G_(e,t){let n=w_(e,t);if(!n.ok)return n;let r={};for(let[t,i]of Object.entries(e.bindings))r[t]=Object.hasOwn(n.state,t)?{...i,initial:W_(n.state[t])}:i;let i={...e.initialState};for(let[e,t]of Object.entries(n.state))i[e]=W_(t);return{ok:!0,baseline:{document:{...e,bindings:r,initialState:i},state:n.state}}}function K_(e,t,n){if(typeof e!=`string`)throw new k_(`Cannot mount a Reactive MD document: source must be a string.`,[E_(`standalone.source`,`source must be a string.`)]);let r=Sd(e);if(!r.ok)throw new k_(`Cannot mount a Reactive MD document: the source contains syntax errors.`,r.diagnostics);let i=r.document;if(t!==void 0){let e=v_(t);if(!e.ok)throw new k_(`Cannot mount a Reactive MD document: the state payload is invalid.`,e.diagnostics);let n=G_(i,e.file);if(!n.ok)throw new k_(`Cannot mount a Reactive MD document: the state does not match this source.`,n.diagnostics);i=n.baseline.document}return typeof n==`string`&&n.trim().length>0&&(i={...i,theme:n.trim(),themeRange:void 0}),{document:i,diagnostics:r.diagnostics.slice()}}var q_=`0.4.0`,J_=Object.freeze({name:`reactive-md-standalone`,version:q_}),Y_=`data-reactive-md-mounted`,X_=`script[type="application/reactive-md+json"][data-reactive-md-auto]`,Z_=/^data:image\/(?:png|jpeg|gif|webp);base64,[A-Za-z0-9+/]+={0,2}$/,Q_=64;function $_(e){if(!e)return{};let t=new Map;for(let[n,r]of Object.entries(e).slice(0,Q_))typeof n==`string`&&n.length>0&&typeof r==`string`&&Z_.test(r)&&t.set(n,r);return t.size===0?{}:{urlPolicy:(e,n)=>n===`link`||t.has(e),imageResolver:e=>t.get(e)??null}}var ev=new WeakSet;function tv(e){return ev.has(e)||e.hasAttribute(`data-reactive-md-mounted`)}function nv(e,t){return T_(e,t)}function rv(e){if(e)try{e()}catch{}}function iv(e){let t=()=>{let t=e.querySelector(`article.local-document`);t&&(t.classList.remove(`local-static-first`,`reactive-md-static-first`,`reactive-md-hydrating`),t.removeAttribute(`data-static-first`),t.removeAttribute(`data-reactive-md-static-first`)),e.classList.remove(`local-static-first`,`reactive-md-static-first`),e.removeAttribute(`data-static-first`)};if(typeof requestAnimationFrame!=`function`)return t(),()=>{};let n=0,r=0;return n=requestAnimationFrame(()=>{t(),r=requestAnimationFrame(t)}),()=>{typeof cancelAnimationFrame==`function`&&(cancelAnimationFrame(n),r&&cancelAnimationFrame(r))}}function av(e,t,n={}){if(!e||typeof e!=`object`||!(`nodeType`in e)||!e.hasAttribute)throw new k_(`Cannot mount a Reactive MD document: element must be an HTMLElement.`,[E_(`standalone.element`,`element must be an HTMLElement.`)]);if(tv(e))throw new k_(`Cannot mount a Reactive MD document: this element is already mounted.`,[E_(`standalone.mount`,`The target element already hosts a Reactive MD document.`)]);if(!t||typeof t!=`object`)throw new k_(`Cannot mount a Reactive MD document: options are required.`,[E_(`standalone.options`,`mount requires an options object with a source string.`)]);let r=K_(t.source,t.state,n.theme),i;try{i=qf(r.document)}catch(e){throw new k_(`Cannot mount a Reactive MD document: the interactive runtime could not be created.`,[E_(`standalone.runtime`,O_(e))])}let a=t.generator??J_,o=$_(t.images),s=t.urlPolicy??o.urlPolicy,c=t.imageResolver??o.imageResolver,l=()=>nv(i,a),u;try{u=l()}catch(e){try{i.dispose()}catch{}throw new k_(`Cannot mount a Reactive MD document: the initial state could not be captured.`,[E_(`standalone.state`,O_(e))])}let d=!1,f=e=>{d||rv(n.onDiagnostics?()=>n.onDiagnostics(e):void 0)},p=t.hydrate===!0&&e.hasChildNodes(),m=(0,Z.jsx)(Jg,{document:r.document,runtime:i,onDiagnostics:f,urlPolicy:s,locale:t.locale??`en`,themes:t.themes,colorScheme:t.colorScheme??`auto`,mode:`interactive`,staticFirst:p,imageResolver:c});if(!p)for(;e.firstChild;)e.removeChild(e.firstChild);let h=null;try{h=p?(0,b.hydrateRoot)(e,m):(0,b.createRoot)(e),p||h.render(m)}catch(e){try{h?.unmount()}catch{}try{i.dispose()}catch{}throw new k_(`Cannot mount a Reactive MD document: React could not render the document.`,A_(e,`standalone.render`))}ev.add(e),e.setAttribute(Y_,``);let g=n.onStateChange?i.subscribe(()=>{if(d)return;let e;try{e=l()}catch{return}rv(n.onStateChange?()=>n.onStateChange(e):void 0)}):()=>{};rv(n.onStateChange?()=>n.onStateChange(u):void 0),r.diagnostics.length>0&&f(r.diagnostics);let _=p?iv(e):()=>{};return{element:e,getState(){if(d)throw Error(`This Reactive MD document has been unmounted.`);return l()},unmount:()=>{if(!d){d=!0,g(),_();try{h?.unmount()}catch{}try{i.dispose()}catch{}ev.delete(e),e.getAttribute(`data-reactive-md-mounted`)===``&&e.removeAttribute(Y_)}}}}function ov(e,t){return av(e,t)}function sv(e,t,n){if(typeof console<`u`&&typeof console.error==`function`)try{console.error(`Reactive MD: ${n.map(e=>`[${e.code}] ${e.message}`).join(` `)}`)}catch{}let r=e.defaultView?.CustomEvent;if(typeof r==`function`)try{t.dispatchEvent(new r(j_,{detail:n,bubbles:!0,composed:!0}))}catch{}}function cv(e,t){let n=t.defaultView?.HTMLElement;return n?e instanceof n:e.namespaceURI===`http://www.w3.org/1999/xhtml`}function lv(e){if(typeof document>`u`)return[];let t=e??document,n=t,r=n.nodeType===9?t:n.ownerDocument??document,i=[],a;try{a=Array.from(t.querySelectorAll(X_))}catch{return i}for(let e of a){let a;try{a=U_(JSON.parse(e.textContent??``))}catch(t){sv(r,e,[E_(`standalone.payload.json`,`The reactive-md payload is not valid JSON: ${O_(t)}`)]);continue}if(!a.ok){sv(r,e,a.diagnostics);continue}let o=a.payload,s=t,c=(typeof s.getElementById==`function`?s.getElementById(o.target):null)??r.getElementById(o.target);if(!c)sv(r,e,[E_(`standalone.target.missing`,`The reactive-md payload target "#${o.target}" was not found.`)]);else if(n!==r&&!n.contains(c))sv(r,e,[E_(`standalone.target.scope`,`The reactive-md payload target is outside the scanned root.`)]);else if(!cv(c,r))sv(r,e,[E_(`standalone.target.type`,`The reactive-md payload target must be an HTML element.`)]);else if(!tv(c))try{i.push(ov(c,{source:o.source,state:o.state,locale:o.locale,colorScheme:o.colorScheme,hydrate:o.hydrate,images:o.images}))}catch(e){sv(r,c,A_(e))}}return i}var uv=`reactive-md-doc`,dv=typeof HTMLElement<`u`?HTMLElement:class{};function fv(e){return typeof e==`object`&&!!e&&e.name===`AbortError`}var pv=class extends dv{static observedAttributes=[`src`,`source`,`locale`,`color-scheme`,`theme`];_source;_state;_urlPolicy;_imageResolver;_themes;_connected=!1;_generation=0;_restartScheduled=!1;_session=null;_abort=null;_stateTimer=null;_pendingState=null;_cache=null;connectedCallback(){this._connected||(this._connected=!0,this._start())}disconnectedCallback(){this._connected&&(this._connected=!1,this._generation+=1,this._restartScheduled=!1,this._abortFetch(),this._clearStateTimer(),this._teardown(),this._cache=null)}attributeChangedCallback(e,t,n){t!==n&&(e===`src`&&(this._cache=null),this._requestRestart())}get src(){return this.getAttribute(`src`)??void 0}set src(e){e==null?this.removeAttribute(`src`):this.setAttribute(`src`,e)}get theme(){return this.getAttribute(`theme`)??void 0}set theme(e){e==null?this.removeAttribute(`theme`):this.setAttribute(`theme`,e)}get source(){return this._source===void 0?this.getAttribute(`source`)??void 0:this._source}set source(e){let t=typeof e==`string`?e:void 0;t!==this._source&&(this._source=t,this._requestRestart())}get state(){return this._state}set state(e){e!==this._state&&(this._state=e,this._requestRestart())}get urlPolicy(){return this._urlPolicy}set urlPolicy(e){e!==this._urlPolicy&&(this._urlPolicy=e,this._requestRestart())}get imageResolver(){return this._imageResolver}set imageResolver(e){e!==this._imageResolver&&(this._imageResolver=e,this._requestRestart())}get themes(){return this._themes}set themes(e){e!==this._themes&&(this._themes=e,this._requestRestart())}get _locale(){return this.getAttribute(`locale`)===`zh`?`zh`:`en`}get _colorScheme(){let e=this.getAttribute(`color-scheme`);return e===`light`||e===`dark`?e:`auto`}get _themeOverride(){return this.getAttribute(`theme`)?.trim()||void 0}_requestRestart(){this._connected&&!this._restartScheduled&&(this._restartScheduled=!0,queueMicrotask(()=>{this._restartScheduled=!1,this._connected&&this._start()}))}_start(){this._generation+=1;let e=this._generation;this._abortFetch(),this._clearStateTimer(),this._teardown(),this._load(e)}async _load(e){let t=this.getAttribute(`src`)?.trim()??``,n=this.source;if(t){if(this._cache&&this._cache.src===t)n=this._cache.text;else{let r=null;try{r=typeof AbortController==`function`?new AbortController:null,this._abort=r;let i=await fetch(t,r?{signal:r.signal}:{});if(!i.ok)throw Error(`HTTP ${i.status}${i.statusText?` ${i.statusText}`:``}`);let a=await i.text();if(!this._connected||e!==this._generation)return;this._cache={src:t,text:a},n=a}catch(n){if(!this._connected||e!==this._generation||fv(n))return;this._showError([E_(`standalone.fetch`,`Cannot load "${t}": ${O_(n)}`)]);return}finally{this._abort===r&&(this._abort=null)}}}if(this._connected&&e===this._generation){if(typeof n!=`string`)this._showError([E_(`standalone.source`,`The <reactive-md-doc> element requires a "src" attribute or a "source" attribute/property.`)]);else try{let t=av(this,{source:n,state:this._state,locale:this._locale,colorScheme:this._colorScheme,themes:this._themes,urlPolicy:this._urlPolicy,imageResolver:this._imageResolver},{theme:this._themeOverride,onDiagnostics:e=>this._emitDiagnostics(e),onStateChange:e=>this._queueState(e)});if(!this._connected||e!==this._generation){try{t.unmount()}catch{}return}this._session=t}catch(e){this._session=null,this._showError(A_(e))}}}_teardown(){let e=this._session;if(this._session=null,e)try{e.unmount()}catch{}}_abortFetch(){let e=this._abort;if(this._abort=null,e)try{e.abort()}catch{}}_clearStateTimer(){this._stateTimer!==null&&(clearTimeout(this._stateTimer),this._stateTimer=null),this._pendingState=null}_queueState(e){this._connected&&(this._pendingState=e,this._stateTimer===null&&(this._stateTimer=setTimeout(()=>{this._stateTimer=null;let e=this._pendingState;this._pendingState=null,this._connected&&e&&this._dispatch(M_,e)},0)))}_emitDiagnostics(e){this._connected&&e.length!==0&&this._dispatch(j_,e)}_showError(e){if(!this._connected)return;this._teardown(),this._clearStateTimer();let t=this.ownerDocument;for(;this.firstChild;)this.removeChild(this.firstChild);let n=t.createElement(`div`);n.className=`local-inactive reactive-md-standalone-error`,n.setAttribute(`role`,`alert`),n.setAttribute(`data-reactive-md-error`,``);let r=t.createElement(`p`);if(r.className=`local-inactive-title`,r.textContent=this._locale===`zh`?`无法加载交互文档。`:`This interactive document could not be loaded.`,n.appendChild(r),e.length>0){let r=t.createElement(`ul`);r.className=`local-inactive-list`;for(let n of e.slice(0,12)){let e=t.createElement(`li`);e.textContent=`${n.message} (line ${n.line}, column ${n.column})`,r.appendChild(e)}n.appendChild(r)}this.appendChild(n),this._emitDiagnostics(e)}_dispatch(e,t){if(!this._connected)return;let n=this.ownerDocument.defaultView?.CustomEvent;if(typeof n==`function`)try{this.dispatchEvent(new n(e,{detail:t,bubbles:!0,composed:!0}))}catch{}}};function mv(){typeof customElements<`u`&&(customElements.get(`reactive-md-doc`)||customElements.define(uv,pv))}mv();var hv=!1;function gv(){if(hv||typeof document>`u`)return;hv=!0;let e=()=>{try{lv(document)}catch(e){typeof console<`u`&&typeof console.error==`function`&&console.error(`Reactive MD: automatic mounting failed.`,e)}};document.readyState===`loading`?document.addEventListener(`DOMContentLoaded`,e,{once:!0}):queueMicrotask(e)}return gv(),e.REACTIVE_MD_DIAGNOSTICS_EVENT=j_,e.REACTIVE_MD_DOC_TAG=uv,e.REACTIVE_MD_MOUNTED_ATTRIBUTE=Y_,e.REACTIVE_MD_STANDALONE_GENERATOR=J_,e.REACTIVE_MD_STANDALONE_VERSION=q_,e.REACTIVE_MD_STATE_CHANGE_EVENT=M_,e.ReactiveMDDocElement=pv,e.ReactiveMDMountError=k_,e.defineReactiveMDDoc=mv,e.diagnosticsFromError=A_,e.isReactiveMDMounted=tv,e.mount=ov,e.mountAll=lv,e.parseMountPayload=U_,e.prepareStandaloneDocument=K_,e})({});