@gramlot/gramlot 0.3.27 → 0.3.30

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 (194) hide show
  1. package/assets/icons/chart.svg +1 -0
  2. package/dist/components/audio/__init__.py +13 -0
  3. package/dist/components/audio/assets/collection.js +3 -0
  4. package/dist/components/audio/assets/index.js +3 -0
  5. package/dist/components/audio/commands.json +7 -0
  6. package/dist/components/audio/grammar.json +335 -0
  7. package/dist/components/charts/__init__.py +13 -0
  8. package/dist/components/charts/assets/collection.js +47 -0
  9. package/dist/components/charts/assets/files/55ea01207028f76d844678511f29fc800f8a1e67a8a0fe80470128677847ad32-echarts-gl.txt +29 -0
  10. package/dist/components/charts/assets/files/63727832aaf62004a2b249c933e327f3c90caf49e41a72f4bf436edf632cbda8-vega.txt +27 -0
  11. package/dist/components/charts/assets/files/8c45d9eaf50c2f72dd9c7ab9ef440788ba58a3538484b5c51c1f17d5128752e7-plotly.txt +21 -0
  12. package/dist/components/charts/assets/files/8f989229699b4fe2f1a0432d0e9edc338a8a911e250e2d1b01ecd770a5f5b1bd-uplot.txt +21 -0
  13. package/dist/components/charts/assets/files/c8fa058cba98f7f288b5d8fa4116f441d6dacb25b96da859e518c973fff41d0c-claygl.txt +23 -0
  14. package/dist/components/charts/assets/index.js +3 -0
  15. package/dist/components/charts/assets/modules/chunk-2CCTLZE7.js +76 -0
  16. package/dist/components/charts/assets/modules/chunk-RMRBEYTI.js +1 -0
  17. package/dist/components/charts/assets/modules/echarts-gl-CXVTZA6G.js +4409 -0
  18. package/dist/components/charts/assets/modules/plotly.min-4LB7HE7P.js +3596 -0
  19. package/dist/components/charts/assets/modules/uPlot.esm-5JJNHHRF.js +3 -0
  20. package/dist/components/charts/assets/modules/uPlot.min-N3E3FA74.js +1 -0
  21. package/dist/components/charts/assets/modules/vega.module-2QCOVQ3A.js +13 -0
  22. package/dist/components/charts/commands.json +7 -0
  23. package/dist/components/charts/grammar.json +1113 -0
  24. package/dist/components/chat/__init__.py +1 -1
  25. package/dist/components/chat/assets/collection.js +3 -3
  26. package/dist/components/chat/assets/index.js +1 -1
  27. package/dist/components/drawing/__init__.py +15 -0
  28. package/dist/components/drawing/assets/collection.js +28 -0
  29. package/dist/components/drawing/assets/index.js +3 -0
  30. package/dist/components/drawing/commands.json +7 -0
  31. package/dist/components/drawing/grammar.json +110 -0
  32. package/dist/components/editors/__init__.py +2 -2
  33. package/dist/components/editors/assets/collection.js +18 -18
  34. package/dist/components/editors/assets/index.js +1 -1
  35. package/dist/components/editors/assets/modules/{prose-mirror-engine-GMZPJPNN.js → prose-mirror-engine-DQEAEIMV.js} +2 -2
  36. package/dist/components/editors/grammar.json +150 -0
  37. package/dist/components/grid/__init__.py +1 -1
  38. package/dist/components/grid/assets/collection.js +51 -30
  39. package/dist/components/grid/assets/index.js +1 -1
  40. package/dist/components/grid/grammar.json +258 -0
  41. package/dist/components/grouplets/__init__.py +1 -1
  42. package/dist/components/grouplets/assets/collection.js +3 -3
  43. package/dist/components/grouplets/assets/index.js +1 -1
  44. package/dist/components/inputs/__init__.py +3 -2
  45. package/dist/components/inputs/assets/collection.js +38 -23
  46. package/dist/components/inputs/assets/index.js +1 -1
  47. package/dist/components/inputs/grammar.json +1533 -321
  48. package/dist/components/layout/__init__.py +1 -1
  49. package/dist/components/layout/assets/collection.js +27 -23
  50. package/dist/components/layout/assets/index.js +1 -1
  51. package/dist/components/layout/grammar.json +85 -0
  52. package/dist/components/selection_trial/__init__.py +1 -1
  53. package/dist/components/selection_trial/assets/collection.js +3 -3
  54. package/dist/components/selection_trial/assets/index.js +1 -1
  55. package/dist/components/tree/__init__.py +1 -1
  56. package/dist/components/tree/assets/collection.js +11 -11
  57. package/dist/components/tree/assets/index.js +1 -1
  58. package/dist/components/tree/grammar.json +126 -0
  59. package/dist/components/typst/__init__.py +1 -1
  60. package/dist/components/typst/assets/collection.js +2 -2
  61. package/dist/components/typst/assets/index.js +1 -1
  62. package/dist/components/uploads/__init__.py +1 -1
  63. package/dist/components/uploads/assets/collection.js +8 -8
  64. package/dist/components/uploads/assets/index.js +1 -1
  65. package/dist/components/vizabi/__init__.py +13 -0
  66. package/dist/components/vizabi/assets/collection.js +22 -0
  67. package/dist/components/vizabi/assets/index.js +3 -0
  68. package/dist/components/vizabi/commands.json +7 -0
  69. package/dist/components/vizabi/grammar.json +128 -0
  70. package/dist/gramlot.js +572 -176
  71. package/dist/gramlot.min.js +85 -53
  72. package/dist/standard-collections.js +2 -0
  73. package/package.json +12 -4
  74. package/src/binding/grid-struct.js +2 -2
  75. package/src/binding/runtime.js +10 -0
  76. package/src/bootstrap.js +1 -1
  77. package/src/builder/gramlot-builder.d.ts +15 -2
  78. package/src/builder/gramlot-builder.js +22 -3
  79. package/src/builder/source.js +24 -1
  80. package/src/components/audio-analysis-session.js +65 -0
  81. package/src/components/audio.js +44 -0
  82. package/src/components/bases.js +6 -4
  83. package/src/components/border-container.js +6 -3
  84. package/src/components/buttons.js +47 -3
  85. package/src/components/chart-bar3d-options.js +30 -0
  86. package/src/components/chart-controls.js +83 -0
  87. package/src/components/chart-data-view.js +52 -0
  88. package/src/components/chart-data.js +42 -0
  89. package/src/components/chart-domains.js +46 -0
  90. package/src/components/chart-engines/echarts-options.js +50 -0
  91. package/src/components/chart-engines/echarts.js +82 -0
  92. package/src/components/chart-engines/index.js +22 -0
  93. package/src/components/chart-engines/plotly-map.js +34 -0
  94. package/src/components/chart-engines/plotly-spatial.js +35 -0
  95. package/src/components/chart-engines/plotly.js +138 -0
  96. package/src/components/chart-engines/uplot.js +57 -0
  97. package/src/components/chart-engines/vega.js +101 -0
  98. package/src/components/chart-fields.js +110 -0
  99. package/src/components/chart-geographic-options.js +47 -0
  100. package/src/components/chart-geojson.js +60 -0
  101. package/src/components/chart-geometry.js +11 -0
  102. package/src/components/chart-map-anchors.js +24 -0
  103. package/src/components/chart-map-bar3d-options.js +41 -0
  104. package/src/components/chart-map-data.js +25 -0
  105. package/src/components/chart-map-labels.js +8 -0
  106. package/src/components/chart-map-options.js +20 -0
  107. package/src/components/chart-pane.js +91 -0
  108. package/src/components/chart-renderer.js +58 -0
  109. package/src/components/chart-sample-view.js +32 -0
  110. package/src/components/chart-spatial-options.js +40 -0
  111. package/src/components/chart-time.js +84 -0
  112. package/src/components/chart-timeline.js +70 -0
  113. package/src/components/chart-types/area.js +2 -0
  114. package/src/components/chart-types/bar.js +2 -0
  115. package/src/components/chart-types/bar3D.js +2 -0
  116. package/src/components/chart-types/donut.js +2 -0
  117. package/src/components/chart-types/horizontalBar.js +2 -0
  118. package/src/components/chart-types/index.js +26 -0
  119. package/src/components/chart-types/line.js +2 -0
  120. package/src/components/chart-types/line3D.js +2 -0
  121. package/src/components/chart-types/lines3D.js +2 -0
  122. package/src/components/chart-types/map.js +2 -0
  123. package/src/components/chart-types/map3D.js +2 -0
  124. package/src/components/chart-types/mapBar3D.js +2 -0
  125. package/src/components/chart-types/pie.js +2 -0
  126. package/src/components/chart-types/polygons3D.js +2 -0
  127. package/src/components/chart-types/scatter.js +2 -0
  128. package/src/components/chart-types/scatter3D.js +2 -0
  129. package/src/components/chart-types/stackedArea.js +2 -0
  130. package/src/components/chart-types/stackedBar.js +2 -0
  131. package/src/components/chart-types/surface.js +2 -0
  132. package/src/components/charts.js +152 -0
  133. package/src/components/check-box-text-editor.js +88 -0
  134. package/src/components/check-box-text.js +193 -0
  135. package/src/components/check-box-tree.js +62 -0
  136. package/src/components/choice-editor.js +7 -5
  137. package/src/components/choice-field-styles.js +14 -0
  138. package/src/components/choices.js +5 -0
  139. package/src/components/drawing.js +199 -0
  140. package/src/components/grid-check-sets.js +98 -0
  141. package/src/components/grid-column-filters.js +198 -0
  142. package/src/components/grid-grammar.json +44 -0
  143. package/src/components/grid-header-interaction.js +3 -1
  144. package/src/components/grid-rows.js +2 -2
  145. package/src/components/grid-search-box.js +38 -22
  146. package/src/components/grid-search-styles.js +13 -14
  147. package/src/components/grid-search.js +8 -1
  148. package/src/components/grid-structure.js +10 -2
  149. package/src/components/grid-styles.js +23 -0
  150. package/src/components/grid.js +52 -10
  151. package/src/components/image-uploader.js +2 -2
  152. package/src/components/inputs.js +19 -10
  153. package/src/components/labelbox.js +5 -1
  154. package/src/components/licenses/claygl.txt +23 -0
  155. package/src/components/licenses/echarts-gl.txt +29 -0
  156. package/src/components/licenses/plotly.txt +21 -0
  157. package/src/components/licenses/uplot.txt +21 -0
  158. package/src/components/licenses/vega.txt +27 -0
  159. package/src/components/menus.js +19 -11
  160. package/src/components/toolbar-overflow.js +12 -8
  161. package/src/components/tree.js +30 -8
  162. package/src/components/typed-editor.js +14 -3
  163. package/src/components/vizabi-session.js +66 -0
  164. package/src/components/vizabi.js +66 -0
  165. package/src/components/window-surface.js +20 -9
  166. package/src/components/windows.js +1 -1
  167. package/src/gramlot.d.ts +1 -0
  168. package/src/gramlot.js +2 -0
  169. package/src/handlers/device-handler.js +32 -32
  170. package/src/handlers/source-handler.d.ts +2 -2
  171. package/src/ide-documents.js +19 -3
  172. package/src/ide-runtime.d.ts +1 -0
  173. package/src/ide-runtime.js +45 -31
  174. package/src/index.d.ts +1 -0
  175. package/src/renderer/drag-drop.js +1 -0
  176. package/src/renderer/gramlot-renderer.d.ts +2 -0
  177. package/src/renderer/gramlot-renderer.js +5 -4
  178. package/src/server/assets.d.ts +3 -0
  179. package/src/server/assets.js +9 -0
  180. package/src/server/gramlot-server.d.ts +1 -1
  181. package/src/server/gramlot-server.js +2 -1
  182. package/src/server/index.d.ts +1 -1
  183. package/src/server/index.js +1 -1
  184. package/src/server/visual-editor.js +17 -17
  185. package/src/stores/bag-collection-view.js +79 -17
  186. package/src/stores/collection-filter.js +2 -1
  187. package/src/stores/column-filter.js +49 -0
  188. package/src/stores/id-set.js +10 -0
  189. package/src/view/controls.js +8 -0
  190. package/src/view/html.js +10 -1
  191. package/src/view/label-menu.js +61 -0
  192. package/src/view/labelbox.js +15 -2
  193. package/themes/gramlot-base/theme.css +6 -0
  194. package/tools/gramlot-tools-inspector.js +169 -505
@@ -1,9 +1,9 @@
1
- var Uo=Object.create;var Vn=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var qo=Object.getOwnPropertyNames;var jo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var tt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},na=(t,e)=>{for(var r in e)Vn(t,r,{get:e[r],enumerable:!0})},jn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qo(e))!Vo.call(t,s)&&s!==r&&Vn(t,s,{get:()=>e[s],enumerable:!(n=Po(e,s))||n.enumerable});return t},Wr=(t,e,r)=>(jn(t,e,"default"),r&&jn(r,e,"default")),sa=(t,e,r)=>(r=t!=null?Uo(jo(t)):{},jn(e||!t||!t.__esModule?Vn(r,"default",{value:t,enumerable:!0}):r,t));var kt=tt(pe=>{"use strict";function hu(t,e,r){if(r===void 0&&(r=Array.prototype),t&&typeof r.find=="function")return r.find.call(t,e);for(var n=0;n<t.length;n++)if(vt(t,n)){var s=t[n];if(e.call(void 0,s,n,t))return s}}function Rt(t,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&typeof e.freeze=="function"?e.freeze(t):t}function vt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)vt(e,r)&&(t[r]=e[r]);return t}var Pa=Rt({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function _u(t){return vt(Pa,t.toLowerCase())}var qa=Rt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gu(t){return vt(qa,t.toLowerCase())}var pr=Rt({script:!1,style:!1,textarea:!0,title:!0});function bu(t){var e=t.toLowerCase();return vt(pr,e)&&!pr[e]}function wu(t){var e=t.toLowerCase();return vt(pr,e)&&pr[e]}function ja(t){return t===hr.HTML}function yu(t){return ja(t)||t===hr.XML_XHTML_APPLICATION}var hr=Rt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),vu=Object.keys(hr).map(function(t){return hr[t]});function ku(t){return vu.indexOf(t)>-1}var Eu=Rt({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});pe.assign=mu;pe.find=hu;pe.freeze=Rt;pe.HTML_BOOLEAN_ATTRIBUTES=Pa;pe.HTML_RAW_TEXT_ELEMENTS=pr;pe.HTML_VOID_ELEMENTS=qa;pe.hasDefaultHTMLNamespace=yu;pe.hasOwn=vt;pe.isHTMLBooleanAttribute=_u;pe.isHTMLRawTextElement=bu;pe.isHTMLEscapableRawTextElement=wu;pe.isHTMLMimeType=ja;pe.isHTMLVoidElement=gu;pe.isValidMimeType=ku;pe.MIME_TYPE=hr;pe.NAMESPACE=Eu});var wr=tt(br=>{"use strict";var Du=kt();function za(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var _r=Du.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),Ha=Object.keys(_r);function Wa(t){return typeof t=="number"&&t>=1&&t<=25}function Au(t){return typeof t=="string"&&t.substring(t.length-_r.Error.length)===_r.Error}function gr(t,e){Wa(t)?(this.name=Ha[t],this.message=e||""):(this.message=t,this.name=Au(e)?e:_r.Error),Error.captureStackTrace&&Error.captureStackTrace(this,gr)}za(gr,!0);Object.defineProperties(gr.prototype,{code:{enumerable:!0,get:function(){var t=Ha.indexOf(this.name);return Wa(t)?t:0}}});var Xa={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},cs=Object.entries(Xa);for(mr=0;mr<cs.length;mr++)Va=cs[mr][0],gr[Va]=cs[mr][1];var Va,mr;function ds(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,ds)}za(ds);br.DOMException=gr;br.DOMExceptionName=_r;br.ExceptionCode=Xa;br.ParseError=ds});var bs=tt(M=>{"use strict";function Qa(t){try{typeof t!="function"&&(t=RegExp);var e=new t("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var Ft=Qa();function lt(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Lt(t,e){if(t.source[0]!=="[")throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(t.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+t.source+"/");if(e==="-"&&t.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),Ft?"u":"")}function L(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(r){var n=typeof r=="string";if(n&&e===void 0&&r==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?r:r.source}).join(""),Ft?"u":"")}function O(t){if(arguments.length===0)throw new Error("no parameters provided");return L.apply(O,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var xu="\uFFFD",ut=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Ft&&(ut=L("[",lt(ut),"\\u{10000}-\\u{10FFFF}","]"));var Tu=new RegExp("[^"+lt(ut)+"]",Ft?"u":""),cn=/[\x20\x09\x0D\x0A]/,Cu=lt(cn),H=L(cn,"+"),Z=L(cn,"*"),yr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Ft&&(yr=L("[",lt(yr),"\\u{10000}-\\u{10FFFF}","]"));var Nu=lt(yr),hs=L("[",Nu,lt(/[-.0-9\xB7]/),lt(/[\u0300-\u036F\u203F-\u2040]/),"]"),Ae=L(yr,hs,"*"),Su=L("^",Ae,"$"),Ga=L(hs,"+"),Ou=L("&",Ae,";"),Bu=O(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),vr=O(Ou,"|",Bu),kr=L("%",Ae,";"),ms=O(L('"',O(/[^%&"]/,"|",kr,"|",vr),"*",'"'),"|",L("'",O(/[^%&']/,"|",kr,"|",vr),"*","'")),Iu=O('"',O(/[^<&"]/,"|",vr),"*",'"',"|","'",O(/[^<&']/,"|",vr),"*","'"),Mu=Lt(yr,":"),Ru=Lt(hs,":"),fs=L(Mu,Ru,"*"),Lu=L("^",fs,"$"),Er=L(fs,O(":",fs),"?"),$u=L("^",Er,"$"),Fu=L("(",Er,")"),$t=O(/"[^"]*"|'[^']*'/),Uu=L(/^<\?/,"(",Ae,")",O(H,"(?!",cn,")(",ut,"*?)"),"?",/\?>/),Ya=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Dr=O('"',Ya,'*"',"|","'",Lt(Ya,"'"),"*'"),ei="<!--",ti="-->",Pu=L(ei,O(Lt(ut,"-"),"|",L("-",Lt(ut,"-"))),"*",ti),Za="#PCDATA",qu=O(L(/\(/,Z,Za,O(Z,/\|/,Z,Er),"*",Z,/\)\*/),"|",L(/\(/,Z,Za,Z,/\)/)),ju=/[?*+]?/,Vu=L(/\([^>]+\)/,ju),zu=O("EMPTY","|","ANY","|",qu,"|",Vu),Hu="<!ELEMENT",Wu=L(Hu,H,O(Er,"|",kr),H,O(zu,"|",kr),Z,">"),Xu=L("NOTATION",H,/\(/,Z,Ae,O(Z,/\|/,Z,Ae),"*",Z,/\)/),Gu=L(/\(/,Z,Ga,O(Z,/\|/,Z,Ga),"*",Z,/\)/),Yu=O(Xu,"|",Gu),Zu=O(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Yu),Ju=O(/#REQUIRED|#IMPLIED/,"|",O(O("#FIXED",H),"?",Iu)),Ku=O(H,Ae,H,Zu,H,Ju),Qu="<!ATTLIST",ec=L(Qu,H,Ae,Ku,"*",Z,">"),ps="about:legacy-compat",tc=O('"'+ps+'"',"|","'"+ps+"'"),_s="SYSTEM",dn="PUBLIC",fn=O(O(_s,H,$t),"|",O(dn,H,Dr,H,$t)),rc=L("^",O(O(_s,H,"(?<SystemLiteralOnly>",$t,")"),"|",O(dn,H,"(?<PubidLiteral>",Dr,")",H,"(?<SystemLiteral>",$t,")"))),nc=L("^",Dr,"$"),sc=L("^",$t,"$"),ac=O(H,"NDATA",H,Ae),ic=O(ms,"|",O(fn,ac,"?")),ri="<!ENTITY",oc=L(ri,H,Ae,H,ic,Z,">"),lc=O(ms,"|",fn),uc=L(ri,H,"%",H,Ae,H,lc,Z,">"),cc=O(oc,"|",uc),dc=L(dn,H,Dr),fc=L("<!NOTATION",H,Ae,H,O(fn,"|",dc),Z,">"),gs=L(Z,"=",Z),Ja=/1[.]\d+/,pc=L(H,"version",gs,O("'",Ja,"'","|",'"',Ja,'"')),Ka=/[A-Za-z][-A-Za-z0-9._]*/,hc=O(H,"encoding",gs,O('"',Ka,'"',"|","'",Ka,"'")),mc=O(H,"standalone",gs,O("'",O("yes","|","no"),"'","|",'"',O("yes","|","no"),'"')),_c=L(/^<\?xml/,pc,hc,"?",mc,"?",Z,/\?>/),gc="<!DOCTYPE",bc="<![CDATA[",wc="]]>",yc=/<!\[CDATA\[/,vc=/\]\]>/,kc=L(ut,"*?",vc),Ec=L(yc,kc);M.chars=lt;M.chars_without=Lt;M.detectUnicodeSupport=Qa;M.reg=L;M.regg=O;M.ABOUT_LEGACY_COMPAT=ps;M.ABOUT_LEGACY_COMPAT_SystemLiteral=tc;M.AttlistDecl=ec;M.CDATA_START=bc;M.CDATA_END=wc;M.CDSect=Ec;M.Char=ut;M.Comment=Pu;M.COMMENT_START=ei;M.COMMENT_END=ti;M.DOCTYPE_DECL_START=gc;M.elementdecl=Wu;M.EntityDecl=cc;M.EntityValue=ms;M.ExternalID=fn;M.ExternalID_match=rc;M.Name=Ae;M.Name_exact=Su;M.NCName_exact=Lu;M.NotationDecl=fc;M.Reference=vr;M.PEReference=kr;M.PI=Uu;M.PUBLIC=dn;M.PubidLiteral=Dr;M.PubidLiteral_match=nc;M.QName=Er;M.QName_exact=$u;M.QName_group=Fu;M.S=H;M.SChar_s=Cu;M.S_OPT=Z;M.SYSTEM=_s;M.SystemLiteral=$t;M.SystemLiteral_match=sc;M.InvalidChar=Tu;M.UNICODE_REPLACEMENT_CHARACTER=xu;M.UNICODE_SUPPORT=Ft;M.XMLDecl=_c});var Cs=tt(ee=>{"use strict";var Ce=kt(),qe=Ce.find,Dc=Ce.hasDefaultHTMLNamespace,Pt=Ce.hasOwn,Ac=Ce.isHTMLMimeType,xc=Ce.isHTMLRawTextElement,Tc=Ce.isHTMLVoidElement,Ar=Ce.MIME_TYPE,je=Ce.NAMESPACE,we=Symbol(),ui=wr(),E=ui.DOMException,ge=ui.DOMExceptionName,Q=bs();function ke(t){if(t!==we)throw new TypeError("Illegal constructor")}function Cc(t){return t!==""}function Nc(t){return t?t.split(/[\t\n\f\r ]+/).filter(Cc):[]}function Sc(t,e){return Pt(t,e)||(t[e]=!0),t}function ni(t){if(!t)return[];var e=Nc(t);return Object.keys(e.reduce(Sc,{}))}function Oc(t){return function(e){return t&&t.indexOf(e)!==-1}}function ci(t){if(!Q.QName_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function ys(t,e){ci(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var s=e.split(":");r=s[0],n=s[1]}if(r!==null&&t===null)throw new E(E.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ce.NAMESPACE.XML)throw new E(E.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ce.NAMESPACE.XMLNS)throw new E(E.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ce.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new E(E.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Vt(t,e){for(var r in t)Pt(t,r)&&(e[r]=t[r])}function Ee(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Vt(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var De={},Te=De.ELEMENT_NODE=1,qt=De.ATTRIBUTE_NODE=2,xr=De.TEXT_NODE=3,di=De.CDATA_SECTION_NODE=4,fi=De.ENTITY_REFERENCE_NODE=5,Bc=De.ENTITY_NODE=6,vs=De.PROCESSING_INSTRUCTION_NODE=7,ks=De.COMMENT_NODE=8,Ut=De.DOCUMENT_NODE=9,pi=De.DOCUMENT_TYPE_NODE=10,ct=De.DOCUMENT_FRAGMENT_NODE=11,Ic=De.NOTATION_NODE=12,K=Ce.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function hi(t,e){if(e.length<t.length)return hi(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function si(t){return t.guid||(t.guid=Math.random()),t.guid}function oe(){}oe.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var r=[],n=0;n<this.length;n++)Ts(this[n],r,null,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};oe.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function Pe(t,e){this._node=t,this._refresh=e,_n(this)}function _n(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ai(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Pt(t,n)&&delete t[n];Vt(r,t),t._inc=e}}Pe.prototype.item=function(t){return _n(this),this[t]||null};Ee(Pe,oe);function jt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function mi(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function Es(t,e,r){if(!e)return t._noNsIndex;var n=t._nsIndex[e];return!n&&r&&(n=t._nsIndex[e]=Object.create(null)),n}function Mc(t,e,r){var n=Es(t,e,!1),s=n&&n[r];return s||null}function Rc(t,e){Es(t,e.namespaceURI,!0)[e.localName]=e}function Lc(t,e){var r=Es(t,e.namespaceURI,!1);r&&delete r[e.localName]}function $c(t,e,r,n){if(n?e[mi(e,n)]=r:(e[e.length]=r,e.length++),Rc(e,r),t){r.ownerElement=t;var s=t.ownerDocument;s&&(n&&bi(s,t,n),Fc(s,t,r))}}function ai(t,e,r){var n=mi(e,r);if(n>=0){for(var s=e.length-1;n<=s;)e[n]=e[++n];if(e.length=s,Lc(e,r),t){var a=t.ownerDocument;a&&bi(a,t,r),r.ownerElement=null}}}jt.prototype={length:0,item:oe.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var r=this[e];if(r.nodeName===t)return r;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new E(E.INUSE_ATTRIBUTE_ERR);var r=Mc(this,t.namespaceURI,t.localName);return r===t?t:($c(this._ownerElement,this,t,r),r)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new E(E.NOT_FOUND_ERR,t);return ai(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new E(E.NOT_FOUND_ERR,t?t+" : "+e:e);return ai(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){t||(t=null);for(var r=0;r<this.length;){var n=this[r];if(n.localName===e&&n.namespaceURI===t)return n;r++}return null}};jt.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function _i(){}_i.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=Ar.XML_APPLICATION;t===je.HTML?n=Ar.XML_XHTML_APPLICATION:t===je.SVG&&(n=Ar.XML_SVG_IMAGE);var s=new Ye(we,{contentType:n});if(s.implementation=this,s.childNodes=new oe,s.doctype=r||null,r&&s.appendChild(r),e){var a=s.createElementNS(t,e);s.appendChild(a)}return s},createDocumentType:function(t,e,r,n){ci(t);var s=new wn(we);return s.name=t,s.nodeName=t,s.publicId=e||"",s.systemId=r||"",s.internalSubset=n||"",s.childNodes=new oe,s},createHTMLDocument:function(t){var e=new Ye(we,{contentType:Ar.HTML});if(e.implementation=this,e.childNodes=new oe,t!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var r=e.createElement("html");e.appendChild(r);var n=e.createElement("head");if(r.appendChild(n),typeof t=="string"){var s=e.createElement("title");s.appendChild(e.createTextNode(t)),n.appendChild(s)}r.appendChild(e.createElement("body"))}return e}};function P(t){ke(t)}P.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;for(var e=[{node:this,other:t}];e.length>0;){var r=e.pop(),n=r.node,s=r.other;if(n.nodeType!==s.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==s.name||n.publicId!==s.publicId||n.systemId!==s.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==s.namespaceURI||n.prefix!==s.prefix||n.localName!==s.localName||n.attributes.length!==s.attributes.length)return!1;for(var a=0;a<n.attributes.length;a++){var i=n.attributes.item(a),o=s.getAttributeNodeNS(i.namespaceURI,i.localName);if(!o)return!1;e.push({node:i,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==s.namespaceURI||n.localName!==s.localName||n.value!==s.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==s.target||n.data!==s.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==s.data)return!1;break}if(n.childNodes.length!==s.childNodes.length)return!1;for(var a=n.childNodes.length-1;a>=0;a--)e.push({node:n.childNodes[a],other:s.childNodes[a]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return mn(this,t,e)},replaceChild:function(t,e){mn(this,t,e,vi),e&&this.removeChild(e)},removeChild:function(t){return wi(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Di(this.ownerDocument||this,this,t)},normalize:function(){he(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===xr&&e.nodeType===xr){for(var n=[],s=r;s!==null&&s.nodeType===xr;)n.push(s.data),s=s.nextSibling;for(var a=e.nextSibling;a!==s;){var i=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=i}e.nextSibling=s,s!==null?s.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),Ds(t.ownerDocument,t),e=s}else e=r}return!0}})},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Pt(r,n)&&r[n]===t)return n}e=e.nodeType==qt?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Pt(r,t))return r[t];e=e.nodeType==qt?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,r=this,n=null,s=null;if(e instanceof Et&&(n=e,e=n.ownerElement),r instanceof Et&&(s=r,r=s.ownerElement,n&&e&&r===e))for(var a=0,i;i=r.attributes[a];a++){if(i===n)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_PRECEDING;if(i===s)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return K.DOCUMENT_POSITION_DISCONNECTED+K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(si(r.ownerDocument)>si(e.ownerDocument)?K.DOCUMENT_POSITION_FOLLOWING:K.DOCUMENT_POSITION_PRECEDING);if(s&&e===r)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!s&&l===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=r.parentNode;c;){if(!n&&c===e)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var d=hi(o,u);for(var f in d.childNodes){var p=d.childNodes[f];if(p===r)return K.DOCUMENT_POSITION_FOLLOWING;if(p===e)return K.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(p)>=0)return K.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return K.DOCUMENT_POSITION_PRECEDING}return 0}};function gi(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Vt(De,P);Vt(De,P.prototype);Vt(K,P);Vt(K,P.prototype);function hn(t,e){he(t,null,{enter:function(r){return e(r)?he.STOP:!0}})}function he(t,e,r){for(var n=[{node:t,context:e,phase:he.ENTER}];n.length>0;){var s=n.pop();if(s.phase===he.ENTER){var a=r.enter(s.node,s.context);if(a===he.STOP)return he.STOP;if(n.push({node:s.node,context:a,phase:he.EXIT}),a==null)continue;for(var i=s.node.lastChild;i;)n.push({node:i,context:a,phase:he.ENTER}),i=i.previousSibling}else r.exit&&r.exit(s.node,s.context)}}he.STOP=Symbol("walkDOM.STOP");he.ENTER=0;he.EXIT=1;function Ye(t,e){ke(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||Ar.XML_APPLICATION,this.type=Ac(this.contentType)?"html":"xml"}function Fc(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===je.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function bi(t,e,r,n){t&&t._inc++;var s=r.namespaceURI;s===je.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function Ds(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var s=e.firstChild,a=0;s;)n[a++]=s,s=s.nextSibling;n.length=a,delete n[n.length]}}}function wi(t,e){if(t!==e.parentNode)throw new E(E.NOT_FOUND_ERR,"child's parent is not parent");var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,Ds(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Uc(t){return t&&(t.nodeType===P.DOCUMENT_NODE||t.nodeType===P.DOCUMENT_FRAGMENT_NODE||t.nodeType===P.ELEMENT_NODE)}function Pc(t){return t&&(t.nodeType===P.CDATA_SECTION_NODE||t.nodeType===P.COMMENT_NODE||t.nodeType===P.DOCUMENT_FRAGMENT_NODE||t.nodeType===P.DOCUMENT_TYPE_NODE||t.nodeType===P.ELEMENT_NODE||t.nodeType===P.PROCESSING_INSTRUCTION_NODE||t.nodeType===P.TEXT_NODE)}function dt(t){return t&&t.nodeType===P.DOCUMENT_TYPE_NODE}function Ge(t){return t&&t.nodeType===P.ELEMENT_NODE}function yi(t){return t&&t.nodeType===P.TEXT_NODE}function ii(t,e){var r=t.childNodes||[];if(qe(r,Ge)||dt(e))return!1;var n=qe(r,dt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function oi(t,e){var r=t.childNodes||[];function n(a){return Ge(a)&&a!==e}if(qe(r,n))return!1;var s=qe(r,dt);return!(e&&s&&r.indexOf(s)>r.indexOf(e))}function qc(t,e,r){if(!Uc(t))throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new E(E.NOT_FOUND_ERR,"child not in parent");if(!Pc(e)||dt(e)&&t.nodeType!==P.DOCUMENT_NODE)throw new E(E.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function jc(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===P.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||qe(s,yi))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!ii(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!ii(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(qe(n,dt))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=qe(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&i)throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function vi(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===P.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||qe(s,yi))throw new E(E.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!oi(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!oi(t,r))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(qe(n,function(l){return dt(l)&&l!==r}))throw new E(E.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=qe(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new E(E.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function mn(t,e,r,n){qc(t,e,r),t.nodeType===P.DOCUMENT_NODE&&(n||jc)(t,e,r);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===ct){var a=e.firstChild;if(a==null)return e;var i=e.lastChild}else a=i=e;var o=r?r.previousSibling:t.lastChild;a.previousSibling=o,i.nextSibling=r,o?o.nextSibling=a:t.firstChild=a,r==null?t.lastChild=i:r.previousSibling=i;do a.parentNode=t;while(a!==i&&(a=a.nextSibling));return Ds(t.ownerDocument||t,t,e),e.nodeType==ct&&(e.firstChild=e.lastChild=null),e}Ye.prototype={implementation:null,nodeName:"#document",nodeType:Ut,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===ct){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return mn(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===Te&&(this.documentElement=t),t},removeChild:function(t){var e=wi(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){mn(this,t,e,vi),t.ownerDocument=this,e&&this.removeChild(e),Ge(t)&&(this.documentElement=t)},importNode:function(t,e){return Vc(this,t,e)},getElementById:function(t){var e=null;return hn(this.documentElement,function(r){if(r.nodeType==Te&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Ze(we);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Dc(this.contentType)&&(e.namespaceURI=je.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new oe;var r=e.attributes=new jt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new zt(we);return t.ownerDocument=this,t.childNodes=new oe,t},createTextNode:function(t){var e=new Tr(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createComment:function(t){var e=new gn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new E(E.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new bn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new vn(we);return r.ownerDocument=this,r.childNodes=new oe,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!Q.QName_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new Et(we);return e.ownerDocument=this,e.childNodes=new oe,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!Q.Name_exact.test(t))throw new E(E.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new E("document is an html document",ge.NotSupportedError);var e=new yn(we);return e.ownerDocument=this,e.childNodes=new oe,e.nodeName=t,e},createElementNS:function(t,e){var r=ys(t,e),n=new Ze(we),s=n.attributes=new jt;return n.childNodes=new oe,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],s._ownerElement=n,n},createAttributeNS:function(t,e){var r=ys(t,e),n=new Et(we);return n.ownerDocument=this,n.childNodes=new oe,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};Ee(Ye,P);function Ze(t){ke(t),this._nsMap=Object.create(null)}Ze.prototype={nodeType:Te,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===je.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var r=this.getAttributeNode(t);r?r.value=r.nodeValue=""+e:(r=this.ownerDocument._createAttribute(t),r.value=r.nodeValue=""+e,this.setAttributeNode(r))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r?r.value:null},setAttributeNS:function(t,e,r){var n=ys(t,e),s=n[2],a=this.getAttributeNodeNS(t,s);a?a.value=a.nodeValue=""+r:(a=this.ownerDocument.createAttributeNS(t,e),a.value=a.nodeValue=""+r,this.setAttributeNode(a))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=ni(t);return new Pe(this,function(r){var n=[];return e.length>0&&hn(r,function(s){if(s!==r&&s.nodeType===Te){var a=s.getAttribute("class");if(a){var i=t===a;if(!i){var o=ni(a);i=e.every(Oc(o))}i&&n.push(s)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ut?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Pe(this,function(n){var s=[];return hn(n,function(a){if(!(a===n||a.nodeType!==Te))if(t==="*")s.push(a);else{var i=a.getQualifiedName(),o=e&&a.namespaceURI===je.HTML?r:t;i===o&&s.push(a)}}),s})},getElementsByTagNameNS:function(t,e){return new Pe(this,function(r){var n=[];return hn(r,function(s){s!==r&&s.nodeType===Te&&(t==="*"||s.namespaceURI===t)&&(e==="*"||s.localName==e)&&n.push(s)}),n})}};Ye.prototype.getElementsByClassName=Ze.prototype.getElementsByClassName;Ye.prototype.getElementsByTagName=Ze.prototype.getElementsByTagName;Ye.prototype.getElementsByTagNameNS=Ze.prototype.getElementsByTagNameNS;Ee(Ze,P);function Et(t){ke(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}Et.prototype.nodeType=qt;Ee(Et,P);function ft(t){ke(t)}ft.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var n=this.data.substring(0,t),s=this.data.substring(t+e);r=n+r+s,this.nodeValue=this.data=r,this.length=r.length}};Ee(ft,P);function Tr(t){ke(t)}Tr.prototype={nodeName:"#text",nodeType:xr,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};Ee(Tr,ft);function gn(t){ke(t)}gn.prototype={nodeName:"#comment",nodeType:ks};Ee(gn,ft);function bn(t){ke(t)}bn.prototype={nodeName:"#cdata-section",nodeType:di};Ee(bn,Tr);function wn(t){ke(t)}wn.prototype.nodeType=pi;Ee(wn,P);function As(t){ke(t)}As.prototype.nodeType=Ic;Ee(As,P);function xs(t){ke(t)}xs.prototype.nodeType=Bc;Ee(xs,P);function yn(t){ke(t)}yn.prototype.nodeType=fi;Ee(yn,P);function zt(t){ke(t)}zt.prototype.nodeName="#document-fragment";zt.prototype.nodeType=ct;Ee(zt,P);function vn(t){ke(t)}vn.prototype.nodeType=vs;Ee(vn,ft);function ki(){}ki.prototype.serializeToString=function(t,e){return Ei.call(t,e)};P.prototype.toString=Ei;function Ei(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t!=null?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var r=[],n=this.nodeType===Ut&&this.documentElement||this,s=n.prefix,a=n.namespaceURI;if(a&&s==null){var s=n.lookupPrefix(a);if(s==null)var i=[{namespace:a,prefix:null}]}return Ts(this,r,i,e),r.join("")}function li(t,e,r){var n=t.prefix||"",s=t.namespaceURI;if(!s||n==="xml"&&s===je.XML||s===je.XMLNS)return!1;for(var a=r.length;a--;){var i=r[a];if(i.prefix===n)return i.namespace!==s}return!0}function pn(t,e,r,n){if(n&&!Q.QName_exact.test(e))throw new E('The attribute name "'+e+'" is not a valid XML QName',ge.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,gi),'"')}function Ts(t,e,r,n){r||(r=[]);var s=n.nodeFilter,a=n.requireWellFormed,i=n.splitCDATASections,o=t.nodeType===Ut?t:t.ownerDocument,l=o.type==="html";he(t,{ns:r},{enter:function(u,c){var d=c.ns;if(s)if(u=s(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Te:var f=u.attributes,p=f.length,h=u.tagName,m=h;if(!l&&!u.prefix&&u.namespaceURI){for(var g,w=0;w<f.length;w++)if(f.item(w).name==="xmlns"){g=f.item(w).value;break}if(!g)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.prefix===""&&v.namespace===u.namespaceURI){g=v.namespace;break}}if(g!==u.namespaceURI)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.namespace===u.namespaceURI){v.prefix&&(m=v.prefix+":"+h);break}}}if(a&&!Q.QName_exact.test(m))throw new E('The element name "'+m+'" is not a valid XML QName',ge.InvalidStateError);e.push("<",m);for(var k=d.slice(),D=0;D<p;D++){var y=f.item(D);y.prefix=="xmlns"?k.push({prefix:y.localName,namespace:y.value}):y.nodeName=="xmlns"&&k.push({prefix:"",namespace:y.value})}for(var D=0;D<p;D++){var y=f.item(D);if(li(y,l,k)){var C=y.prefix||"",V=y.namespaceURI;pn(e,C?"xmlns:"+C:"xmlns",V,a),k.push({prefix:C,namespace:V})}var Y=s?s(y):y;Y&&(typeof Y=="string"?e.push(Y):pn(e,Y.name,Y.value,a))}if(h===m&&li(u,l,k)){var U=u.prefix||"",V=u.namespaceURI;pn(e,U?"xmlns:"+U:"xmlns",V,a),k.push({prefix:U,namespace:V})}var B=!u.firstChild;if(B&&(l||u.namespaceURI===je.HTML)&&(B=Tc(h)),B)return e.push("/>"),null;if(e.push(">"),l&&xc(h)){for(var X=u.firstChild;X;)X.data?e.push(X.data):Ts(X,e,k.slice(),n),X=X.nextSibling;return e.push("</",m,">"),null}return{ns:k,tag:m};case Ut:case ct:if(a&&u.nodeType===Ut&&u.documentElement==null)throw new E("The Document has no documentElement",ge.InvalidStateError);return{ns:d};case qt:return pn(e,u.name,u.value,a),null;case xr:if(a&&Q.InvalidChar.test(u.data))throw new E("The Text node data contains characters outside the XML Char production",ge.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,gi)),null;case di:if(a&&u.data.indexOf("]]>")!==-1)throw new E('The CDATASection data contains "]]>"',ge.InvalidStateError);return i?e.push(Q.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),Q.CDATA_END):e.push(Q.CDATA_START,u.data,Q.CDATA_END),null;case ks:if(a){if(Q.InvalidChar.test(u.data))throw new E("The comment node data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new E('The comment node data contains "--" or ends with "-"',ge.InvalidStateError)}return e.push(Q.COMMENT_START,u.data,Q.COMMENT_END),null;case pi:var J=u.publicId,$=u.systemId;if(a){if(!Q.Name_exact.test(u.name))throw new E('The doctype name "'+u.name+'" is not a valid XML Name',ge.InvalidStateError);if(J&&!Q.PubidLiteral_match.test(J))throw new E("DocumentType publicId is not a valid PubidLiteral",ge.InvalidStateError);if($&&$!=="."&&!Q.SystemLiteral_match.test($))throw new E("DocumentType systemId is not a valid SystemLiteral",ge.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new E('DocumentType internalSubset contains "]>"',ge.InvalidStateError)}return e.push(Q.DOCTYPE_DECL_START," ",u.name),J?(e.push(" ",Q.PUBLIC," ",J),$&&$!=="."&&e.push(" ",$)):$&&$!=="."&&e.push(" ",Q.SYSTEM," ",$),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case vs:if(a){if(!Q.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new E('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',ge.InvalidStateError);if(Q.InvalidChar.test(u.data))throw new E("The ProcessingInstruction data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new E('The ProcessingInstruction data contains "?>"',ge.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case fi:if(a&&!Q.Name_exact.test(u.nodeName))throw new E('The entity reference name "'+u.nodeName+'" is not a valid XML Name',ge.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Vc(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=s.cloneNode(!1);i.ownerDocument=t,i.parentNode=null,a===null?n=i:a.appendChild(i);var o=s.nodeType===qt||r;return o?i:null}}),n}function Di(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=new s.constructor(we);for(var o in s)if(Pt(s,o)){var l=s[o];typeof l!="object"&&l!=i[o]&&(i[o]=l)}s.childNodes&&(i.childNodes=new oe),i.ownerDocument=t;var u=r;switch(i.nodeType){case Te:var c=s.attributes,d=i.attributes=new jt,f=c.length;d._ownerElement=i;for(var p=0;p<f;p++)i.setAttributeNode(Di(t,c.item(p),!0));break;case qt:u=!0}return a!==null?a.appendChild(i):n=i,u?i:null}}),n}function Ai(t,e,r){t[e]=r}function ws(t){for(var e=[],r=t.firstChild;r;)r.nodeType===Te&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Pe.prototype,"length",{get:function(){return _n(this),this.$$length}}),Object.defineProperty(P.prototype,"textContent",{get:function(){if(this.nodeType===Te||this.nodeType===ct){var t=[];return he(this,null,{enter:function(e){if(e.nodeType===Te||e.nodeType===ct)return!0;if(e.nodeType===vs||e.nodeType===ks)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case Te:case ct:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Object.defineProperty(ft.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(t){this._data=t,this.length=typeof t=="string"?t.length:0}}),Object.defineProperty(ft.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(Ze.prototype,"children",{get:function(){return new Pe(this,ws)}}),Object.defineProperty(Ye.prototype,"children",{get:function(){return new Pe(this,ws)}}),Object.defineProperty(zt.prototype,"children",{get:function(){return new Pe(this,ws)}}),Ai=function(t,e,r){t["$$"+e]=r})}catch{}ee._updateLiveList=_n;ee.Attr=Et;ee.CDATASection=bn;ee.CharacterData=ft;ee.Comment=gn;ee.Document=Ye;ee.DocumentFragment=zt;ee.DocumentType=wn;ee.DOMImplementation=_i;ee.Element=Ze;ee.Entity=xs;ee.EntityReference=yn;ee.LiveNodeList=Pe;ee.NamedNodeMap=jt;ee.Node=P;ee.NodeList=oe;ee.Notation=As;ee.Text=Tr;ee.ProcessingInstruction=vn;ee.walkDOM=he;ee.XMLSerializer=ki});var Ti=tt(Cr=>{"use strict";var xi=kt().freeze;Cr.XML_ENTITIES=xi({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Cr.HTML_ENTITIES=xi({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
2
- `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Cr.entityMap=Cr.HTML_ENTITIES});var Li=tt(En=>{"use strict";var Yt=kt(),R=bs(),Oi=wr(),zc=Yt.isHTMLEscapableRawTextElement,Hc=Yt.isHTMLMimeType,Wc=Yt.isHTMLRawTextElement,Or=Yt.hasOwn,Ci=Yt.NAMESPACE,Xc=Oi.ParseError,Gc=Oi.DOMException,Ht=0,pt=1,Wt=2,Nr=3,Xt=4,Gt=5,Sr=6,kn=7;function Bi(){}Bi.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),Kc(e,e=Object.create(null)),Yc(t,e,r,n,this.errorHandler),n.endDocument()}};var Ns=/&#?\w+;?/g;function Yc(t,e,r,n,s){var a=Hc(n.mimeType);t.indexOf(R.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function i(F){if(F>65535){F-=65536;var A=55296+(F>>10),j=56320+(F&1023);return String.fromCharCode(A,j)}else return String.fromCharCode(F)}function o(F){var A=F[F.length-1]===";"?F:F+";";if(!a&&A!==F)return s.error("EntityRef: expecting ;"),F;var j=R.Reference.exec(A);if(!j||j[0].length!==A.length)return s.error("entity not matching Reference production: "+F),F;var se=A.slice(1,-1);return Or(r,se)?r[se]:se.charAt(0)==="#"?i(parseInt(se.substring(1).replace("x","0x"))):(s.error("entity not found:"+F),F)}function l(F){if(F>g){var A=t.substring(g,F).replace(Ns,o);f&&p(g),n.characters(A,0,F-g),g=F}}var u=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(F,A){for(;F>=c&&(A=d.exec(t));)u=c,c=A.index+A[0].length,f.lineNumber++;f.columnNumber=F-u+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var w=t.indexOf("<",g);if(w<0){if(!a&&m.length>0)return s.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(g).match(/^\s*$/)){var b=n.doc,v=b.createTextNode(t.substring(g));if(b.documentElement)return s.error("Extra content at the end of the document");b.appendChild(v),n.currentElement=v}return}if(w>g){var k=t.substring(g,w);!a&&m.length===0&&(k=k.replace(new RegExp(R.S_OPT.source,"g"),""),k&&s.error("Unexpected content outside root element: '"+k+"'")),l(w)}switch(t.charAt(w+1)){case"/":var N=t.indexOf(">",w+2),D=t.substring(w+2,N>0?N:void 0);if(!D)return s.fatalError("end tag name missing");var y=R.reg("^",R.QName_group,R.S_OPT,"$"),C=N>0&&y.exec(D);if(!C){var V=N>0&&R.reg("^",R.QName_group).exec(D);if(a&&V)s.warning('end tag name contains invalid trailing characters: "'+D+'"'),C=V;else if(V&&new RegExp(y.source,y.flags+"m").test(D))s.error('end tag name is followed by a line break and trailing content: "'+D+'"'),C=V;else return s.fatalError('end tag name contains invalid characters: "'+D+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var Y=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(Y!==C[1]){var U=C[1].toLowerCase();if(!a||Y.toLowerCase()!==U)return s.fatalError('Opening and ending tag mismatch: "'+Y+'" != "'+D+'"')}var B=h.pop();m.pop();var X=B.localNSMap;if(n.endElement(B.uri,B.localName,Y),X)for(var J in X)Or(X,J)&&n.endPrefixMapping(J);N++;break;case"?":f&&p(w),N=ed(t,w,n,s);break;case"!":f&&p(w),N=Mi(t,w,n,s,a);break;default:f&&p(w);var $=new Ri,W=h[h.length-1].currentNSMap,N=Zc(t,w,$,W,o,s,a),ne=$.length;if($.closed||(a&&Yt.isHTMLVoidElement($.tagName)?$.closed=!0:m.push($.tagName)),f&&ne){for(var Se=Ni(f,{}),_t=0;_t<ne;_t++){var ar=$[_t];p(ar.offset),ar.locator=Ni(f,{})}n.locator=Se,Si($,n,W)&&h.push($),n.locator=f}else Si($,n,W)&&h.push($);a&&!$.closed?N=Jc(t,N,$.tagName,o,n):N++}}catch(F){if(F instanceof Xc)throw F;if(F instanceof Gc)return s.fatalError("Error constructing the DOM: "+F.name+": "+F.message,F);s.error("element parse error: "+F),N=-1}N>g?g=N:l(Math.max(w,g)+1)}}function Ni(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Zc(t,e,r,n,s,a,i){function o(p,h,m){if(Or(r.attributeNames,p))return a.fatalError("Attribute "+p+" redefined");if(!i&&h.indexOf("<")>=0)return a.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(p,h.replace(/[\t\n\r]/g," ").replace(Ns,s),m)}for(var l,u,c=++e,d=Ht;;){var f=t.charAt(c);if(d===Ht&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===pt)l=t.slice(e,c),d=Nr;else if(d===Wt)d=Nr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Nr||d===pt)if(d===pt&&(a.warning('attribute value must after "="'),l=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)u=t.slice(e,c),o(l,u,e-1),d=Gt;else throw new Error("attribute value no end '"+f+"' match");else if(d==Xt)u=t.slice(e,c),o(l,u,e),a.warning('attribute "'+l+'" missed start quot('+f+")!!"),e=c+1,d=Gt;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Sr:case kn:d=kn,r.closed=!0;case Xt:case pt:break;case Wt:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),d==Ht&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Sr:case kn:break;case Xt:case pt:u=t.slice(e,c),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case Wt:d===Wt&&(u=l),d==Xt?(a.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(i||a.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Nr:if(!i)return a.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Ht:r.setTagName(t.slice(e,c)),d=Sr;break;case pt:l=t.slice(e,c),d=Wt;break;case Xt:var u=t.slice(e,c);a.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Gt:d=Sr;break}else switch(d){case Wt:i||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,d=pt;break;case Gt:a.warning('attribute space is required"'+l+'"!!');case Sr:d=pt,e=c;break;case Nr:d=Xt,e=c;break;case kn:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Si(t,e,r){for(var n=t.tagName,s=null,d=t.length;d--;){var a=t[d],i=a.qName,o=a.value,f=i.indexOf(":");if(f>0)var l=a.prefix=i.slice(0,f),u=i.slice(f+1),c=l==="xmlns"&&u;else u=i,l=null,c=i==="xmlns"&&"";a.localName=u,c!==!1&&(s==null&&(s=Object.create(null),r=Object.create(r)),r[c]=s[c]=o,a.uri=Ci.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)a=t[d],a.prefix&&(a.prefix==="xml"&&(a.uri=Ci.XML),a.prefix!=="xmlns"&&(a.uri=r[a.prefix]));var f=n.indexOf(":");f>0?(l=t.prefix=n.slice(0,f),u=t.localName=n.slice(f+1)):(l=null,u=t.localName=n);var p=t.uri=r[l||""];if(e.startElement(p,u,n,t),t.closed){if(e.endElement(p,u,n),s)for(l in s)Or(s,l)&&e.endPrefixMapping(l)}else return t.currentNSMap=r,t.localNSMap=s,!0}function Jc(t,e,r,n,s){var a=zc(r);if(a||Wc(r)){var i=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");i.lastIndex=e;var o=i.exec(t),l=o?o.index:-1;if(l<0)return e+1;var u=t.substring(e+1,l);return a&&(u=u.replace(Ns,n)),s.characters(u,0,u.length),l}return e+1}function Kc(t,e){for(var r in t)Or(t,r)&&(e[r]=t[r])}function Ii(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function s(c){c=c||1,r+=c}function a(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
3
- `&&d!==" "&&d!=="\r")return c;c++,s()}return-1}function i(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function l(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function u(c){var d=R.reg("^",c),f=d.exec(i());return f?(s(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:u,getSource:function(){return t},skip:s,skipBlanks:a,substringFromIndex:i,substringStartsWith:o,substringStartsWithCaseInsensitive:l}}function Qc(t,e){function r(o,l){var u=R.PI.exec(o.substringFromIndex());return u?u[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(u[0].length),u[0]):l.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var s=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var a=n.substring(s,t.getIndex());return t.skip(1),a}var i=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?i=t.getMatch(R.elementdecl):t.char(3)==="N"&&(i=t.getMatch(R.EntityDecl));break;case"A":i=t.getMatch(R.AttlistDecl);break;case"N":i=t.getMatch(R.NotationDecl);break;case"-":i=t.getMatch(R.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")i=r(t,e);else if(t.char()==="%")i=t.getMatch(R.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!i)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function Mi(t,e,r,n,s){var a=Ii(t,e);switch(s?a.char(2).toUpperCase():a.char(2)){case"-":var i=a.getMatch(R.Comment);return i?(r.comment(i,R.COMMENT_START.length,i.length-R.COMMENT_START.length-R.COMMENT_END.length),a.getIndex()):n.fatalError("comment is not well-formed at position "+a.getIndex());case"[":var o=a.getMatch(R.CDSect);return o?!s&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,R.CDATA_START.length,o.length-R.CDATA_START.length-R.CDATA_END.length),r.endCDATA(),a.getIndex()):n.fatalError("Invalid CDATA starting at position "+e);case"D":{if(r.doc&&r.doc.documentElement)return n.fatalError("Doctype not allowed inside or after documentElement at position "+a.getIndex());if(s?!a.substringStartsWithCaseInsensitive(R.DOCTYPE_DECL_START):!a.substringStartsWith(R.DOCTYPE_DECL_START))return n.fatalError("Expected "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());if(a.skip(R.DOCTYPE_DECL_START.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=a.getMatch(R.Name),!l.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+a.getIndex());if(s&&l.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+a.getIndex()),a.skipBlanks(),a.substringStartsWith(R.PUBLIC)||a.substringStartsWith(R.SYSTEM)){var u=R.ExternalID_match.exec(a.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+a.getIndex());u.groups.SystemLiteralOnly!==void 0?l.systemId=u.groups.SystemLiteralOnly:(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral),a.skip(u[0].length)}else if(s&&a.substringStartsWithCaseInsensitive(R.SYSTEM)){if(a.skip(R.SYSTEM.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.SYSTEM+" at position "+a.getIndex());if(l.systemId=a.getMatch(R.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return n.fatalError("Expected "+R.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+R.SYSTEM+" at position "+a.getIndex())}return s&&l.systemId&&!R.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+a.getIndex()),s||(a.skipBlanks(),l.internalSubset=Qc(a,n)),a.skipBlanks(),a.char()!==">"?n.fatalError("doctype not terminated with > at position "+a.getIndex()):(a.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),a.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function ed(t,e,r,n){var s=t.substring(e).match(R.PI);if(!s)return n.fatalError("Invalid processing instruction starting at position "+e);if(s[1].toLowerCase()==="xml"){if(e>0)return n.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!R.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(s[1],s[2]),e+s[0].length}function Ri(){this.attributeNames=Object.create(null)}Ri.prototype={setTagName:function(t){if(!R.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!R.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};En.XMLReader=Bi;En.parseUtils=Ii;En.parseDoctypeCommentOrCData=Mi});var Vi=tt(Jt=>{"use strict";var Dt=kt(),td=Cs(),rd=wr(),$i=Ti(),nd=Li(),sd=td.DOMImplementation,ad=Dt.hasDefaultHTMLNamespace,id=Dt.isHTMLMimeType,od=Dt.isValidMimeType,Pi=Dt.MIME_TYPE,Ss=Dt.NAMESPACE,Fi=rd.ParseError,ld=nd.XMLReader;function qi(t){return t.replace(/\r[\n\u0085]/g,`
1
+ var Uo=Object.create;var Vn=Object.defineProperty;var Po=Object.getOwnPropertyDescriptor;var qo=Object.getOwnPropertyNames;var jo=Object.getPrototypeOf,Vo=Object.prototype.hasOwnProperty;var tt=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},na=(t,e)=>{for(var r in e)Vn(t,r,{get:e[r],enumerable:!0})},jn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of qo(e))!Vo.call(t,s)&&s!==r&&Vn(t,s,{get:()=>e[s],enumerable:!(n=Po(e,s))||n.enumerable});return t},ir=(t,e,r)=>(jn(t,e,"default"),r&&jn(r,e,"default")),sa=(t,e,r)=>(r=t!=null?Uo(jo(t)):{},jn(e||!t||!t.__esModule?Vn(r,"default",{value:t,enumerable:!0}):r,t));var kt=tt(pe=>{"use strict";function hu(t,e,r){if(r===void 0&&(r=Array.prototype),t&&typeof r.find=="function")return r.find.call(t,e);for(var n=0;n<t.length;n++)if(vt(t,n)){var s=t[n];if(e.call(void 0,s,n,t))return s}}function Rt(t,e){return e===void 0&&(e=Object),e&&typeof e.getOwnPropertyDescriptors=="function"&&(t=e.create(null,e.getOwnPropertyDescriptors(t))),e&&typeof e.freeze=="function"?e.freeze(t):t}function vt(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function mu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)vt(e,r)&&(t[r]=e[r]);return t}var Pa=Rt({allowfullscreen:!0,async:!0,autofocus:!0,autoplay:!0,checked:!0,controls:!0,default:!0,defer:!0,disabled:!0,formnovalidate:!0,hidden:!0,ismap:!0,itemscope:!0,loop:!0,multiple:!0,muted:!0,nomodule:!0,novalidate:!0,open:!0,playsinline:!0,readonly:!0,required:!0,reversed:!0,selected:!0});function _u(t){return vt(Pa,t.toLowerCase())}var qa=Rt({area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function gu(t){return vt(qa,t.toLowerCase())}var hr=Rt({script:!1,style:!1,textarea:!0,title:!0});function bu(t){var e=t.toLowerCase();return vt(hr,e)&&!hr[e]}function wu(t){var e=t.toLowerCase();return vt(hr,e)&&hr[e]}function ja(t){return t===mr.HTML}function yu(t){return ja(t)||t===mr.XML_XHTML_APPLICATION}var mr=Rt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),vu=Object.keys(mr).map(function(t){return mr[t]});function ku(t){return vu.indexOf(t)>-1}var Eu=Rt({HTML:"http://www.w3.org/1999/xhtml",SVG:"http://www.w3.org/2000/svg",XML:"http://www.w3.org/XML/1998/namespace",XMLNS:"http://www.w3.org/2000/xmlns/"});pe.assign=mu;pe.find=hu;pe.freeze=Rt;pe.HTML_BOOLEAN_ATTRIBUTES=Pa;pe.HTML_RAW_TEXT_ELEMENTS=hr;pe.HTML_VOID_ELEMENTS=qa;pe.hasDefaultHTMLNamespace=yu;pe.hasOwn=vt;pe.isHTMLBooleanAttribute=_u;pe.isHTMLRawTextElement=bu;pe.isHTMLEscapableRawTextElement=wu;pe.isHTMLMimeType=ja;pe.isHTMLVoidElement=gu;pe.isValidMimeType=ku;pe.MIME_TYPE=mr;pe.NAMESPACE=Eu});var yr=tt(wr=>{"use strict";var Du=kt();function za(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var gr=Du.freeze({Error:"Error",IndexSizeError:"IndexSizeError",DomstringSizeError:"DomstringSizeError",HierarchyRequestError:"HierarchyRequestError",WrongDocumentError:"WrongDocumentError",InvalidCharacterError:"InvalidCharacterError",NoDataAllowedError:"NoDataAllowedError",NoModificationAllowedError:"NoModificationAllowedError",NotFoundError:"NotFoundError",NotSupportedError:"NotSupportedError",InUseAttributeError:"InUseAttributeError",InvalidStateError:"InvalidStateError",SyntaxError:"SyntaxError",InvalidModificationError:"InvalidModificationError",NamespaceError:"NamespaceError",InvalidAccessError:"InvalidAccessError",ValidationError:"ValidationError",TypeMismatchError:"TypeMismatchError",SecurityError:"SecurityError",NetworkError:"NetworkError",AbortError:"AbortError",URLMismatchError:"URLMismatchError",QuotaExceededError:"QuotaExceededError",TimeoutError:"TimeoutError",InvalidNodeTypeError:"InvalidNodeTypeError",DataCloneError:"DataCloneError",EncodingError:"EncodingError",NotReadableError:"NotReadableError",UnknownError:"UnknownError",ConstraintError:"ConstraintError",DataError:"DataError",TransactionInactiveError:"TransactionInactiveError",ReadOnlyError:"ReadOnlyError",VersionError:"VersionError",OperationError:"OperationError",NotAllowedError:"NotAllowedError",OptOutError:"OptOutError"}),Ha=Object.keys(gr);function Wa(t){return typeof t=="number"&&t>=1&&t<=25}function Au(t){return typeof t=="string"&&t.substring(t.length-gr.Error.length)===gr.Error}function br(t,e){Wa(t)?(this.name=Ha[t],this.message=e||""):(this.message=t,this.name=Au(e)?e:gr.Error),Error.captureStackTrace&&Error.captureStackTrace(this,br)}za(br,!0);Object.defineProperties(br.prototype,{code:{enumerable:!0,get:function(){var t=Ha.indexOf(this.name);return Wa(t)?t:0}}});var Xa={INDEX_SIZE_ERR:1,DOMSTRING_SIZE_ERR:2,HIERARCHY_REQUEST_ERR:3,WRONG_DOCUMENT_ERR:4,INVALID_CHARACTER_ERR:5,NO_DATA_ALLOWED_ERR:6,NO_MODIFICATION_ALLOWED_ERR:7,NOT_FOUND_ERR:8,NOT_SUPPORTED_ERR:9,INUSE_ATTRIBUTE_ERR:10,INVALID_STATE_ERR:11,SYNTAX_ERR:12,INVALID_MODIFICATION_ERR:13,NAMESPACE_ERR:14,INVALID_ACCESS_ERR:15,VALIDATION_ERR:16,TYPE_MISMATCH_ERR:17,SECURITY_ERR:18,NETWORK_ERR:19,ABORT_ERR:20,URL_MISMATCH_ERR:21,QUOTA_EXCEEDED_ERR:22,TIMEOUT_ERR:23,INVALID_NODE_TYPE_ERR:24,DATA_CLONE_ERR:25},cs=Object.entries(Xa);for(_r=0;_r<cs.length;_r++)Va=cs[_r][0],br[Va]=cs[_r][1];var Va,_r;function ds(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,ds)}za(ds);wr.DOMException=br;wr.DOMExceptionName=gr;wr.ExceptionCode=Xa;wr.ParseError=ds});var bs=tt(M=>{"use strict";function Qa(t){try{typeof t!="function"&&(t=RegExp);var e=new t("\u{1D306}","u").exec("\u{1D306}");return!!e&&e[0].length===2}catch{}return!1}var Ft=Qa();function lt(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Lt(t,e){if(t.source[0]!=="[")throw new Error("/"+t.source+"/ can not be used with chars_without");if(!e||typeof e!="string")throw new Error(JSON.stringify(e)+" is not a valid search");if(t.source.indexOf(e)===-1)throw new Error('"'+e+'" is not is /'+t.source+"/");if(e==="-"&&t.source.indexOf(e)!==1)throw new Error('"'+e+'" is not at the first postion of /'+t.source+"/");return new RegExp(t.source.replace(e,""),Ft?"u":"")}function L(t){var e=this;return new RegExp(Array.prototype.slice.call(arguments).map(function(r){var n=typeof r=="string";if(n&&e===void 0&&r==="|")throw new Error("use regg instead of reg to wrap expressions with `|`!");return n?r:r.source}).join(""),Ft?"u":"")}function B(t){if(arguments.length===0)throw new Error("no parameters provided");return L.apply(B,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var xu="\uFFFD",ut=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Ft&&(ut=L("[",lt(ut),"\\u{10000}-\\u{10FFFF}","]"));var Tu=new RegExp("[^"+lt(ut)+"]",Ft?"u":""),cn=/[\x20\x09\x0D\x0A]/,Cu=lt(cn),W=L(cn,"+"),J=L(cn,"*"),vr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Ft&&(vr=L("[",lt(vr),"\\u{10000}-\\u{10FFFF}","]"));var Nu=lt(vr),hs=L("[",Nu,lt(/[-.0-9\xB7]/),lt(/[\u0300-\u036F\u203F-\u2040]/),"]"),Ae=L(vr,hs,"*"),Su=L("^",Ae,"$"),Ga=L(hs,"+"),Ou=L("&",Ae,";"),Bu=B(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),kr=B(Ou,"|",Bu),Er=L("%",Ae,";"),ms=B(L('"',B(/[^%&"]/,"|",Er,"|",kr),"*",'"'),"|",L("'",B(/[^%&']/,"|",Er,"|",kr),"*","'")),Iu=B('"',B(/[^<&"]/,"|",kr),"*",'"',"|","'",B(/[^<&']/,"|",kr),"*","'"),Mu=Lt(vr,":"),Ru=Lt(hs,":"),fs=L(Mu,Ru,"*"),Lu=L("^",fs,"$"),Dr=L(fs,B(":",fs),"?"),$u=L("^",Dr,"$"),Fu=L("(",Dr,")"),$t=B(/"[^"]*"|'[^']*'/),Uu=L(/^<\?/,"(",Ae,")",B(W,"(?!",cn,")(",ut,"*?)"),"?",/\?>/),Ya=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,Ar=B('"',Ya,'*"',"|","'",Lt(Ya,"'"),"*'"),ei="<!--",ti="-->",Pu=L(ei,B(Lt(ut,"-"),"|",L("-",Lt(ut,"-"))),"*",ti),Za="#PCDATA",qu=B(L(/\(/,J,Za,B(J,/\|/,J,Dr),"*",J,/\)\*/),"|",L(/\(/,J,Za,J,/\)/)),ju=/[?*+]?/,Vu=L(/\([^>]+\)/,ju),zu=B("EMPTY","|","ANY","|",qu,"|",Vu),Hu="<!ELEMENT",Wu=L(Hu,W,B(Dr,"|",Er),W,B(zu,"|",Er),J,">"),Xu=L("NOTATION",W,/\(/,J,Ae,B(J,/\|/,J,Ae),"*",J,/\)/),Gu=L(/\(/,J,Ga,B(J,/\|/,J,Ga),"*",J,/\)/),Yu=B(Xu,"|",Gu),Zu=B(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",Yu),Ju=B(/#REQUIRED|#IMPLIED/,"|",B(B("#FIXED",W),"?",Iu)),Ku=B(W,Ae,W,Zu,W,Ju),Qu="<!ATTLIST",ec=L(Qu,W,Ae,Ku,"*",J,">"),ps="about:legacy-compat",tc=B('"'+ps+'"',"|","'"+ps+"'"),_s="SYSTEM",dn="PUBLIC",fn=B(B(_s,W,$t),"|",B(dn,W,Ar,W,$t)),rc=L("^",B(B(_s,W,"(?<SystemLiteralOnly>",$t,")"),"|",B(dn,W,"(?<PubidLiteral>",Ar,")",W,"(?<SystemLiteral>",$t,")"))),nc=L("^",Ar,"$"),sc=L("^",$t,"$"),ac=B(W,"NDATA",W,Ae),ic=B(ms,"|",B(fn,ac,"?")),ri="<!ENTITY",oc=L(ri,W,Ae,W,ic,J,">"),lc=B(ms,"|",fn),uc=L(ri,W,"%",W,Ae,W,lc,J,">"),cc=B(oc,"|",uc),dc=L(dn,W,Ar),fc=L("<!NOTATION",W,Ae,W,B(fn,"|",dc),J,">"),gs=L(J,"=",J),Ja=/1[.]\d+/,pc=L(W,"version",gs,B("'",Ja,"'","|",'"',Ja,'"')),Ka=/[A-Za-z][-A-Za-z0-9._]*/,hc=B(W,"encoding",gs,B('"',Ka,'"',"|","'",Ka,"'")),mc=B(W,"standalone",gs,B("'",B("yes","|","no"),"'","|",'"',B("yes","|","no"),'"')),_c=L(/^<\?xml/,pc,hc,"?",mc,"?",J,/\?>/),gc="<!DOCTYPE",bc="<![CDATA[",wc="]]>",yc=/<!\[CDATA\[/,vc=/\]\]>/,kc=L(ut,"*?",vc),Ec=L(yc,kc);M.chars=lt;M.chars_without=Lt;M.detectUnicodeSupport=Qa;M.reg=L;M.regg=B;M.ABOUT_LEGACY_COMPAT=ps;M.ABOUT_LEGACY_COMPAT_SystemLiteral=tc;M.AttlistDecl=ec;M.CDATA_START=bc;M.CDATA_END=wc;M.CDSect=Ec;M.Char=ut;M.Comment=Pu;M.COMMENT_START=ei;M.COMMENT_END=ti;M.DOCTYPE_DECL_START=gc;M.elementdecl=Wu;M.EntityDecl=cc;M.EntityValue=ms;M.ExternalID=fn;M.ExternalID_match=rc;M.Name=Ae;M.Name_exact=Su;M.NCName_exact=Lu;M.NotationDecl=fc;M.Reference=kr;M.PEReference=Er;M.PI=Uu;M.PUBLIC=dn;M.PubidLiteral=Ar;M.PubidLiteral_match=nc;M.QName=Dr;M.QName_exact=$u;M.QName_group=Fu;M.S=W;M.SChar_s=Cu;M.S_OPT=J;M.SYSTEM=_s;M.SystemLiteral=$t;M.SystemLiteral_match=sc;M.InvalidChar=Tu;M.UNICODE_REPLACEMENT_CHARACTER=xu;M.UNICODE_SUPPORT=Ft;M.XMLDecl=_c});var Cs=tt(ee=>{"use strict";var Ce=kt(),je=Ce.find,Dc=Ce.hasDefaultHTMLNamespace,Pt=Ce.hasOwn,Ac=Ce.isHTMLMimeType,xc=Ce.isHTMLRawTextElement,Tc=Ce.isHTMLVoidElement,xr=Ce.MIME_TYPE,Ve=Ce.NAMESPACE,we=Symbol(),ui=yr(),D=ui.DOMException,ge=ui.DOMExceptionName,Q=bs();function ke(t){if(t!==we)throw new TypeError("Illegal constructor")}function Cc(t){return t!==""}function Nc(t){return t?t.split(/[\t\n\f\r ]+/).filter(Cc):[]}function Sc(t,e){return Pt(t,e)||(t[e]=!0),t}function ni(t){if(!t)return[];var e=Nc(t);return Object.keys(e.reduce(Sc,{}))}function Oc(t){return function(e){return t&&t.indexOf(e)!==-1}}function ci(t){if(!Q.QName_exact.test(t))throw new D(D.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function ys(t,e){ci(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var s=e.split(":");r=s[0],n=s[1]}if(r!==null&&t===null)throw new D(D.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ce.NAMESPACE.XML)throw new D(D.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ce.NAMESPACE.XMLNS)throw new D(D.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ce.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new D(D.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function Vt(t,e){for(var r in t)Pt(t,r)&&(e[r]=t[r])}function Ee(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,Vt(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var De={},Te=De.ELEMENT_NODE=1,qt=De.ATTRIBUTE_NODE=2,Tr=De.TEXT_NODE=3,di=De.CDATA_SECTION_NODE=4,fi=De.ENTITY_REFERENCE_NODE=5,Bc=De.ENTITY_NODE=6,vs=De.PROCESSING_INSTRUCTION_NODE=7,ks=De.COMMENT_NODE=8,Ut=De.DOCUMENT_NODE=9,pi=De.DOCUMENT_TYPE_NODE=10,ct=De.DOCUMENT_FRAGMENT_NODE=11,Ic=De.NOTATION_NODE=12,K=Ce.freeze({DOCUMENT_POSITION_DISCONNECTED:1,DOCUMENT_POSITION_PRECEDING:2,DOCUMENT_POSITION_FOLLOWING:4,DOCUMENT_POSITION_CONTAINS:8,DOCUMENT_POSITION_CONTAINED_BY:16,DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:32});function hi(t,e){if(e.length<t.length)return hi(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function si(t){return t.guid||(t.guid=Math.random()),t.guid}function oe(){}oe.prototype={length:0,item:function(t){return t>=0&&t<this.length?this[t]:null},toString:function(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};for(var r=[],n=0;n<this.length;n++)Ts(this[n],r,null,e);return r.join("")},filter:function(t){return Array.prototype.filter.call(this,t)},indexOf:function(t){return Array.prototype.indexOf.call(this,t)}};oe.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function qe(t,e){this._node=t,this._refresh=e,_n(this)}function _n(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ai(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)Pt(t,n)&&delete t[n];Vt(r,t),t._inc=e}}qe.prototype.item=function(t){return _n(this),this[t]||null};Ee(qe,oe);function jt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function mi(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function Es(t,e,r){if(!e)return t._noNsIndex;var n=t._nsIndex[e];return!n&&r&&(n=t._nsIndex[e]=Object.create(null)),n}function Mc(t,e,r){var n=Es(t,e,!1),s=n&&n[r];return s||null}function Rc(t,e){Es(t,e.namespaceURI,!0)[e.localName]=e}function Lc(t,e){var r=Es(t,e.namespaceURI,!1);r&&delete r[e.localName]}function $c(t,e,r,n){if(n?e[mi(e,n)]=r:(e[e.length]=r,e.length++),Rc(e,r),t){r.ownerElement=t;var s=t.ownerDocument;s&&(n&&bi(s,t,n),Fc(s,t,r))}}function ai(t,e,r){var n=mi(e,r);if(n>=0){for(var s=e.length-1;n<=s;)e[n]=e[++n];if(e.length=s,Lc(e,r),t){var a=t.ownerDocument;a&&bi(a,t,r),r.ownerElement=null}}}jt.prototype={length:0,item:oe.prototype.item,getNamedItem:function(t){this._ownerElement&&this._ownerElement._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());for(var e=0;e<this.length;){var r=this[e];if(r.nodeName===t)return r;e++}return null},setNamedItem:function(t){var e=t.ownerElement;if(e&&e!==this._ownerElement)throw new D(D.INUSE_ATTRIBUTE_ERR);var r=Mc(this,t.namespaceURI,t.localName);return r===t?t:($c(this._ownerElement,this,t,r),r)},setNamedItemNS:function(t){return this.setNamedItem(t)},removeNamedItem:function(t){var e=this.getNamedItem(t);if(!e)throw new D(D.NOT_FOUND_ERR,t);return ai(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new D(D.NOT_FOUND_ERR,t?t+" : "+e:e);return ai(this._ownerElement,this,r),r},getNamedItemNS:function(t,e){t||(t=null);for(var r=0;r<this.length;){var n=this[r];if(n.localName===e&&n.namespaceURI===t)return n;r++}return null}};jt.prototype[Symbol.iterator]=function(){var t=this,e=0;return{next:function(){return e<t.length?{value:t[e++],done:!1}:{done:!0}},return:function(){return{done:!0}}}};function _i(){}_i.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=xr.XML_APPLICATION;t===Ve.HTML?n=xr.XML_XHTML_APPLICATION:t===Ve.SVG&&(n=xr.XML_SVG_IMAGE);var s=new Ye(we,{contentType:n});if(s.implementation=this,s.childNodes=new oe,s.doctype=r||null,r&&s.appendChild(r),e){var a=s.createElementNS(t,e);s.appendChild(a)}return s},createDocumentType:function(t,e,r,n){ci(t);var s=new wn(we);return s.name=t,s.nodeName=t,s.publicId=e||"",s.systemId=r||"",s.internalSubset=n||"",s.childNodes=new oe,s},createHTMLDocument:function(t){var e=new Ye(we,{contentType:xr.HTML});if(e.implementation=this,e.childNodes=new oe,t!==!1){e.doctype=this.createDocumentType("html"),e.doctype.ownerDocument=e,e.appendChild(e.doctype);var r=e.createElement("html");e.appendChild(r);var n=e.createElement("head");if(r.appendChild(n),typeof t=="string"){var s=e.createElement("title");s.appendChild(e.createTextNode(t)),n.appendChild(s)}r.appendChild(e.createElement("body"))}return e}};function U(t){ke(t)}U.prototype={firstChild:null,lastChild:null,previousSibling:null,nextSibling:null,parentNode:null,get parentElement(){return this.parentNode&&this.parentNode.nodeType===this.ELEMENT_NODE?this.parentNode:null},childNodes:null,ownerDocument:null,nodeValue:null,namespaceURI:null,prefix:null,localName:null,baseURI:"about:blank",get isConnected(){var t=this.getRootNode();return t&&t.nodeType===t.DOCUMENT_NODE},contains:function(t){if(!t)return!1;var e=t;do{if(this===e)return!0;e=e.parentNode}while(e);return!1},getRootNode:function(t){var e=this;do{if(!e.parentNode)return e;e=e.parentNode}while(e)},isEqualNode:function(t){if(!t)return!1;for(var e=[{node:this,other:t}];e.length>0;){var r=e.pop(),n=r.node,s=r.other;if(n.nodeType!==s.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==s.name||n.publicId!==s.publicId||n.systemId!==s.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==s.namespaceURI||n.prefix!==s.prefix||n.localName!==s.localName||n.attributes.length!==s.attributes.length)return!1;for(var a=0;a<n.attributes.length;a++){var i=n.attributes.item(a),o=s.getAttributeNodeNS(i.namespaceURI,i.localName);if(!o)return!1;e.push({node:i,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==s.namespaceURI||n.localName!==s.localName||n.value!==s.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==s.target||n.data!==s.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==s.data)return!1;break}if(n.childNodes.length!==s.childNodes.length)return!1;for(var a=n.childNodes.length-1;a>=0;a--)e.push({node:n.childNodes[a],other:s.childNodes[a]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return mn(this,t,e)},replaceChild:function(t,e){mn(this,t,e,vi),e&&this.removeChild(e)},removeChild:function(t){return wi(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Di(this.ownerDocument||this,this,t)},normalize:function(){he(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===Tr&&e.nodeType===Tr){for(var n=[],s=r;s!==null&&s.nodeType===Tr;)n.push(s.data),s=s.nextSibling;for(var a=e.nextSibling;a!==s;){var i=a.nextSibling;a.parentNode=null,a.previousSibling=null,a.nextSibling=null,a=i}e.nextSibling=s,s!==null?s.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),Ds(t.ownerDocument,t),e=s}else e=r}return!0}})},isSupported:function(t,e){return this.ownerDocument.implementation.hasFeature(t,e)},lookupPrefix:function(t){for(var e=this;e;){var r=e._nsMap;if(r){for(var n in r)if(Pt(r,n)&&r[n]===t)return n}e=e.nodeType==qt?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&Pt(r,t))return r[t];e=e.nodeType==qt?e.ownerDocument:e.parentNode}return null},isDefaultNamespace:function(t){var e=this.lookupPrefix(t);return e==null},compareDocumentPosition:function(t){if(this===t)return 0;var e=t,r=this,n=null,s=null;if(e instanceof Et&&(n=e,e=n.ownerElement),r instanceof Et&&(s=r,r=s.ownerElement,n&&e&&r===e))for(var a=0,i;i=r.attributes[a];a++){if(i===n)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_PRECEDING;if(i===s)return K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+K.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return K.DOCUMENT_POSITION_DISCONNECTED+K.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(si(r.ownerDocument)>si(e.ownerDocument)?K.DOCUMENT_POSITION_FOLLOWING:K.DOCUMENT_POSITION_PRECEDING);if(s&&e===r)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;for(var o=[],l=e.parentNode;l;){if(!s&&l===r)return K.DOCUMENT_POSITION_CONTAINED_BY+K.DOCUMENT_POSITION_FOLLOWING;o.push(l),l=l.parentNode}o.reverse();for(var u=[],c=r.parentNode;c;){if(!n&&c===e)return K.DOCUMENT_POSITION_CONTAINS+K.DOCUMENT_POSITION_PRECEDING;u.push(c),c=c.parentNode}u.reverse();var d=hi(o,u);for(var f in d.childNodes){var p=d.childNodes[f];if(p===r)return K.DOCUMENT_POSITION_FOLLOWING;if(p===e)return K.DOCUMENT_POSITION_PRECEDING;if(u.indexOf(p)>=0)return K.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(p)>=0)return K.DOCUMENT_POSITION_PRECEDING}return 0}};function gi(t){return t=="<"&&"&lt;"||t==">"&&"&gt;"||t=="&"&&"&amp;"||t=='"'&&"&quot;"||"&#"+t.charCodeAt()+";"}Vt(De,U);Vt(De,U.prototype);Vt(K,U);Vt(K,U.prototype);function hn(t,e){he(t,null,{enter:function(r){return e(r)?he.STOP:!0}})}function he(t,e,r){for(var n=[{node:t,context:e,phase:he.ENTER}];n.length>0;){var s=n.pop();if(s.phase===he.ENTER){var a=r.enter(s.node,s.context);if(a===he.STOP)return he.STOP;if(n.push({node:s.node,context:a,phase:he.EXIT}),a==null)continue;for(var i=s.node.lastChild;i;)n.push({node:i,context:a,phase:he.ENTER}),i=i.previousSibling}else r.exit&&r.exit(s.node,s.context)}}he.STOP=Symbol("walkDOM.STOP");he.ENTER=0;he.EXIT=1;function Ye(t,e){ke(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||xr.XML_APPLICATION,this.type=Ac(this.contentType)?"html":"xml"}function Fc(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===Ve.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function bi(t,e,r,n){t&&t._inc++;var s=r.namespaceURI;s===Ve.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function Ds(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var s=e.firstChild,a=0;s;)n[a++]=s,s=s.nextSibling;n.length=a,delete n[n.length]}}}function wi(t,e){if(t!==e.parentNode)throw new D(D.NOT_FOUND_ERR,"child's parent is not parent");var r=e.previousSibling,n=e.nextSibling;return r?r.nextSibling=n:t.firstChild=n,n?n.previousSibling=r:t.lastChild=r,Ds(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Uc(t){return t&&(t.nodeType===U.DOCUMENT_NODE||t.nodeType===U.DOCUMENT_FRAGMENT_NODE||t.nodeType===U.ELEMENT_NODE)}function Pc(t){return t&&(t.nodeType===U.CDATA_SECTION_NODE||t.nodeType===U.COMMENT_NODE||t.nodeType===U.DOCUMENT_FRAGMENT_NODE||t.nodeType===U.DOCUMENT_TYPE_NODE||t.nodeType===U.ELEMENT_NODE||t.nodeType===U.PROCESSING_INSTRUCTION_NODE||t.nodeType===U.TEXT_NODE)}function dt(t){return t&&t.nodeType===U.DOCUMENT_TYPE_NODE}function Ge(t){return t&&t.nodeType===U.ELEMENT_NODE}function yi(t){return t&&t.nodeType===U.TEXT_NODE}function ii(t,e){var r=t.childNodes||[];if(je(r,Ge)||dt(e))return!1;var n=je(r,dt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function oi(t,e){var r=t.childNodes||[];function n(a){return Ge(a)&&a!==e}if(je(r,n))return!1;var s=je(r,dt);return!(e&&s&&r.indexOf(s)>r.indexOf(e))}function qc(t,e,r){if(!Uc(t))throw new D(D.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new D(D.NOT_FOUND_ERR,"child not in parent");if(!Pc(e)||dt(e)&&t.nodeType!==U.DOCUMENT_NODE)throw new D(D.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function jc(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||je(s,yi))throw new D(D.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!ii(t,r))throw new D(D.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!ii(t,r))throw new D(D.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(je(n,dt))throw new D(D.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=je(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new D(D.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&i)throw new D(D.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function vi(t,e,r){var n=t.childNodes||[],s=e.childNodes||[];if(e.nodeType===U.DOCUMENT_FRAGMENT_NODE){var a=s.filter(Ge);if(a.length>1||je(s,yi))throw new D(D.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(a.length===1&&!oi(t,r))throw new D(D.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Ge(e)&&!oi(t,r))throw new D(D.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(dt(e)){if(je(n,function(l){return dt(l)&&l!==r}))throw new D(D.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var i=je(n,Ge);if(r&&n.indexOf(i)<n.indexOf(r))throw new D(D.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function mn(t,e,r,n){qc(t,e,r),t.nodeType===U.DOCUMENT_NODE&&(n||jc)(t,e,r);var s=e.parentNode;if(s&&s.removeChild(e),e.nodeType===ct){var a=e.firstChild;if(a==null)return e;var i=e.lastChild}else a=i=e;var o=r?r.previousSibling:t.lastChild;a.previousSibling=o,i.nextSibling=r,o?o.nextSibling=a:t.firstChild=a,r==null?t.lastChild=i:r.previousSibling=i;do a.parentNode=t;while(a!==i&&(a=a.nextSibling));return Ds(t.ownerDocument||t,t,e),e.nodeType==ct&&(e.firstChild=e.lastChild=null),e}Ye.prototype={implementation:null,nodeName:"#document",nodeType:Ut,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===ct){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return mn(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===Te&&(this.documentElement=t),t},removeChild:function(t){var e=wi(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){mn(this,t,e,vi),t.ownerDocument=this,e&&this.removeChild(e),Ge(t)&&(this.documentElement=t)},importNode:function(t,e){return Vc(this,t,e)},getElementById:function(t){var e=null;return hn(this.documentElement,function(r){if(r.nodeType==Te&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Ze(we);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Dc(this.contentType)&&(e.namespaceURI=Ve.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new oe;var r=e.attributes=new jt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new zt(we);return t.ownerDocument=this,t.childNodes=new oe,t},createTextNode:function(t){var e=new Cr(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createComment:function(t){var e=new gn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new D(D.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new bn(we);return e.ownerDocument=this,e.childNodes=new oe,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new vn(we);return r.ownerDocument=this,r.childNodes=new oe,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!Q.QName_exact.test(t))throw new D(D.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new Et(we);return e.ownerDocument=this,e.childNodes=new oe,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!Q.Name_exact.test(t))throw new D(D.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new D("document is an html document",ge.NotSupportedError);var e=new yn(we);return e.ownerDocument=this,e.childNodes=new oe,e.nodeName=t,e},createElementNS:function(t,e){var r=ys(t,e),n=new Ze(we),s=n.attributes=new jt;return n.childNodes=new oe,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],s._ownerElement=n,n},createAttributeNS:function(t,e){var r=ys(t,e),n=new Et(we);return n.ownerDocument=this,n.childNodes=new oe,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};Ee(Ye,U);function Ze(t){ke(t),this._nsMap=Object.create(null)}Ze.prototype={nodeType:Te,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Ve.HTML},hasAttributes:function(){return!!(this.attributes&&this.attributes.length)},hasAttribute:function(t){return!!this.getAttributeNode(t)},getAttribute:function(t){var e=this.getAttributeNode(t);return e?e.value:null},getAttributeNode:function(t){return this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase()),this.attributes.getNamedItem(t)},setAttribute:function(t,e){this._isInHTMLDocumentAndNamespace()&&(t=t.toLowerCase());var r=this.getAttributeNode(t);r?r.value=r.nodeValue=""+e:(r=this.ownerDocument._createAttribute(t),r.value=r.nodeValue=""+e,this.setAttributeNode(r))},removeAttribute:function(t){var e=this.getAttributeNode(t);e&&this.removeAttributeNode(e)},setAttributeNode:function(t){return this.attributes.setNamedItem(t)},setAttributeNodeNS:function(t){return this.attributes.setNamedItemNS(t)},removeAttributeNode:function(t){return this.attributes.removeNamedItem(t.nodeName)},removeAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);r&&this.removeAttributeNode(r)},hasAttributeNS:function(t,e){return this.getAttributeNodeNS(t,e)!=null},getAttributeNS:function(t,e){var r=this.getAttributeNodeNS(t,e);return r?r.value:null},setAttributeNS:function(t,e,r){var n=ys(t,e),s=n[2],a=this.getAttributeNodeNS(t,s);a?a.value=a.nodeValue=""+r:(a=this.ownerDocument.createAttributeNS(t,e),a.value=a.nodeValue=""+r,this.setAttributeNode(a))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=ni(t);return new qe(this,function(r){var n=[];return e.length>0&&hn(r,function(s){if(s!==r&&s.nodeType===Te){var a=s.getAttribute("class");if(a){var i=t===a;if(!i){var o=ni(a);i=e.every(Oc(o))}i&&n.push(s)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ut?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new qe(this,function(n){var s=[];return hn(n,function(a){if(!(a===n||a.nodeType!==Te))if(t==="*")s.push(a);else{var i=a.getQualifiedName(),o=e&&a.namespaceURI===Ve.HTML?r:t;i===o&&s.push(a)}}),s})},getElementsByTagNameNS:function(t,e){return new qe(this,function(r){var n=[];return hn(r,function(s){s!==r&&s.nodeType===Te&&(t==="*"||s.namespaceURI===t)&&(e==="*"||s.localName==e)&&n.push(s)}),n})}};Ye.prototype.getElementsByClassName=Ze.prototype.getElementsByClassName;Ye.prototype.getElementsByTagName=Ze.prototype.getElementsByTagName;Ye.prototype.getElementsByTagNameNS=Ze.prototype.getElementsByTagNameNS;Ee(Ze,U);function Et(t){ke(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}Et.prototype.nodeType=qt;Ee(Et,U);function ft(t){ke(t)}ft.prototype={data:"",substringData:function(t,e){return this.data.substring(t,t+e)},appendData:function(t){t=this.data+t,this.nodeValue=this.data=t,this.length=t.length},insertData:function(t,e){this.replaceData(t,0,e)},deleteData:function(t,e){this.replaceData(t,e,"")},replaceData:function(t,e,r){var n=this.data.substring(0,t),s=this.data.substring(t+e);r=n+r+s,this.nodeValue=this.data=r,this.length=r.length}};Ee(ft,U);function Cr(t){ke(t)}Cr.prototype={nodeName:"#text",nodeType:Tr,splitText:function(t){var e=this.data,r=e.substring(t);e=e.substring(0,t),this.data=this.nodeValue=e,this.length=e.length;var n=this.ownerDocument.createTextNode(r);return this.parentNode&&this.parentNode.insertBefore(n,this.nextSibling),n}};Ee(Cr,ft);function gn(t){ke(t)}gn.prototype={nodeName:"#comment",nodeType:ks};Ee(gn,ft);function bn(t){ke(t)}bn.prototype={nodeName:"#cdata-section",nodeType:di};Ee(bn,Cr);function wn(t){ke(t)}wn.prototype.nodeType=pi;Ee(wn,U);function As(t){ke(t)}As.prototype.nodeType=Ic;Ee(As,U);function xs(t){ke(t)}xs.prototype.nodeType=Bc;Ee(xs,U);function yn(t){ke(t)}yn.prototype.nodeType=fi;Ee(yn,U);function zt(t){ke(t)}zt.prototype.nodeName="#document-fragment";zt.prototype.nodeType=ct;Ee(zt,U);function vn(t){ke(t)}vn.prototype.nodeType=vs;Ee(vn,ft);function ki(){}ki.prototype.serializeToString=function(t,e){return Ei.call(t,e)};U.prototype.toString=Ei;function Ei(t){var e;typeof t=="function"?e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:t}:t!=null?e={requireWellFormed:!!t.requireWellFormed,splitCDATASections:t.splitCDATASections!==!1,nodeFilter:t.nodeFilter||null}:e={requireWellFormed:!1,splitCDATASections:!0,nodeFilter:null};var r=[],n=this.nodeType===Ut&&this.documentElement||this,s=n.prefix,a=n.namespaceURI;if(a&&s==null){var s=n.lookupPrefix(a);if(s==null)var i=[{namespace:a,prefix:null}]}return Ts(this,r,i,e),r.join("")}function li(t,e,r){var n=t.prefix||"",s=t.namespaceURI;if(!s||n==="xml"&&s===Ve.XML||s===Ve.XMLNS)return!1;for(var a=r.length;a--;){var i=r[a];if(i.prefix===n)return i.namespace!==s}return!0}function pn(t,e,r,n){if(n&&!Q.QName_exact.test(e))throw new D('The attribute name "'+e+'" is not a valid XML QName',ge.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,gi),'"')}function Ts(t,e,r,n){r||(r=[]);var s=n.nodeFilter,a=n.requireWellFormed,i=n.splitCDATASections,o=t.nodeType===Ut?t:t.ownerDocument,l=o.type==="html";he(t,{ns:r},{enter:function(u,c){var d=c.ns;if(s)if(u=s(u),u){if(typeof u=="string")return e.push(u),null}else return null;switch(u.nodeType){case Te:var f=u.attributes,p=f.length,h=u.tagName,m=h;if(!l&&!u.prefix&&u.namespaceURI){for(var g,w=0;w<f.length;w++)if(f.item(w).name==="xmlns"){g=f.item(w).value;break}if(!g)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.prefix===""&&v.namespace===u.namespaceURI){g=v.namespace;break}}if(g!==u.namespaceURI)for(var b=d.length-1;b>=0;b--){var v=d[b];if(v.namespace===u.namespaceURI){v.prefix&&(m=v.prefix+":"+h);break}}}if(a&&!Q.QName_exact.test(m))throw new D('The element name "'+m+'" is not a valid XML QName',ge.InvalidStateError);e.push("<",m);for(var k=d.slice(),E=0;E<p;E++){var y=f.item(E);y.prefix=="xmlns"?k.push({prefix:y.localName,namespace:y.value}):y.nodeName=="xmlns"&&k.push({prefix:"",namespace:y.value})}for(var E=0;E<p;E++){var y=f.item(E);if(li(y,l,k)){var N=y.prefix||"",q=y.namespaceURI;pn(e,N?"xmlns:"+N:"xmlns",q,a),k.push({prefix:N,namespace:q})}var Z=s?s(y):y;Z&&(typeof Z=="string"?e.push(Z):pn(e,Z.name,Z.value,a))}if(h===m&&li(u,l,k)){var z=u.prefix||"",q=u.namespaceURI;pn(e,z?"xmlns:"+z:"xmlns",q,a),k.push({prefix:z,namespace:q})}var T=!u.firstChild;if(T&&(l||u.namespaceURI===Ve.HTML)&&(T=Tc(h)),T)return e.push("/>"),null;if(e.push(">"),l&&xc(h)){for(var V=u.firstChild;V;)V.data?e.push(V.data):Ts(V,e,k.slice(),n),V=V.nextSibling;return e.push("</",m,">"),null}return{ns:k,tag:m};case Ut:case ct:if(a&&u.nodeType===Ut&&u.documentElement==null)throw new D("The Document has no documentElement",ge.InvalidStateError);return{ns:d};case qt:return pn(e,u.name,u.value,a),null;case Tr:if(a&&Q.InvalidChar.test(u.data))throw new D("The Text node data contains characters outside the XML Char production",ge.InvalidStateError);return e.push(u.data.replace(/[<&>]/g,gi)),null;case di:if(a&&u.data.indexOf("]]>")!==-1)throw new D('The CDATASection data contains "]]>"',ge.InvalidStateError);return i?e.push(Q.CDATA_START,u.data.replace(/]]>/g,"]]]]><![CDATA[>"),Q.CDATA_END):e.push(Q.CDATA_START,u.data,Q.CDATA_END),null;case ks:if(a){if(Q.InvalidChar.test(u.data))throw new D("The comment node data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("--")!==-1||u.data[u.data.length-1]==="-")throw new D('The comment node data contains "--" or ends with "-"',ge.InvalidStateError)}return e.push(Q.COMMENT_START,u.data,Q.COMMENT_END),null;case pi:var Y=u.publicId,$=u.systemId;if(a){if(!Q.Name_exact.test(u.name))throw new D('The doctype name "'+u.name+'" is not a valid XML Name',ge.InvalidStateError);if(Y&&!Q.PubidLiteral_match.test(Y))throw new D("DocumentType publicId is not a valid PubidLiteral",ge.InvalidStateError);if($&&$!=="."&&!Q.SystemLiteral_match.test($))throw new D("DocumentType systemId is not a valid SystemLiteral",ge.InvalidStateError);if(u.internalSubset&&u.internalSubset.indexOf("]>")!==-1)throw new D('DocumentType internalSubset contains "]>"',ge.InvalidStateError)}return e.push(Q.DOCTYPE_DECL_START," ",u.name),Y?(e.push(" ",Q.PUBLIC," ",Y),$&&$!=="."&&e.push(" ",$)):$&&$!=="."&&e.push(" ",Q.SYSTEM," ",$),u.internalSubset&&e.push(" [",u.internalSubset,"]"),e.push(">"),null;case vs:if(a){if(!Q.NCName_exact.test(u.target)||u.target.toLowerCase()==="xml")throw new D('The processing instruction target "'+u.target+'" is not a valid XML NCName or is reserved',ge.InvalidStateError);if(Q.InvalidChar.test(u.data))throw new D("The ProcessingInstruction data contains characters outside the XML Char production",ge.InvalidStateError);if(u.data.indexOf("?>")!==-1)throw new D('The ProcessingInstruction data contains "?>"',ge.InvalidStateError)}return e.push("<?",u.target," ",u.data,"?>"),null;case fi:if(a&&!Q.Name_exact.test(u.nodeName))throw new D('The entity reference name "'+u.nodeName+'" is not a valid XML Name',ge.InvalidStateError);return e.push("&",u.nodeName,";"),null;default:return e.push("??",u.nodeName),null}},exit:function(u,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Vc(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=s.cloneNode(!1);i.ownerDocument=t,i.parentNode=null,a===null?n=i:a.appendChild(i);var o=s.nodeType===qt||r;return o?i:null}}),n}function Di(t,e,r){var n;return he(e,null,{enter:function(s,a){var i=new s.constructor(we);for(var o in s)if(Pt(s,o)){var l=s[o];typeof l!="object"&&l!=i[o]&&(i[o]=l)}s.childNodes&&(i.childNodes=new oe),i.ownerDocument=t;var u=r;switch(i.nodeType){case Te:var c=s.attributes,d=i.attributes=new jt,f=c.length;d._ownerElement=i;for(var p=0;p<f;p++)i.setAttributeNode(Di(t,c.item(p),!0));break;case qt:u=!0}return a!==null?a.appendChild(i):n=i,u?i:null}}),n}function Ai(t,e,r){t[e]=r}function ws(t){for(var e=[],r=t.firstChild;r;)r.nodeType===Te&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(qe.prototype,"length",{get:function(){return _n(this),this.$$length}}),Object.defineProperty(U.prototype,"textContent",{get:function(){if(this.nodeType===Te||this.nodeType===ct){var t=[];return he(this,null,{enter:function(e){if(e.nodeType===Te||e.nodeType===ct)return!0;if(e.nodeType===vs||e.nodeType===ks)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case Te:case ct:for(;this.firstChild;)this.removeChild(this.firstChild);(t||String(t))&&this.appendChild(this.ownerDocument.createTextNode(t));break;default:this.data=t,this.value=t,this.nodeValue=t}}}),Object.defineProperty(ft.prototype,"data",{get:function(){return this._data!=null?this._data:""},set:function(t){this._data=t,this.length=typeof t=="string"?t.length:0}}),Object.defineProperty(ft.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(Ze.prototype,"children",{get:function(){return new qe(this,ws)}}),Object.defineProperty(Ye.prototype,"children",{get:function(){return new qe(this,ws)}}),Object.defineProperty(zt.prototype,"children",{get:function(){return new qe(this,ws)}}),Ai=function(t,e,r){t["$$"+e]=r})}catch{}ee._updateLiveList=_n;ee.Attr=Et;ee.CDATASection=bn;ee.CharacterData=ft;ee.Comment=gn;ee.Document=Ye;ee.DocumentFragment=zt;ee.DocumentType=wn;ee.DOMImplementation=_i;ee.Element=Ze;ee.Entity=xs;ee.EntityReference=yn;ee.LiveNodeList=qe;ee.NamedNodeMap=jt;ee.Node=U;ee.NodeList=oe;ee.Notation=As;ee.Text=Cr;ee.ProcessingInstruction=vn;ee.walkDOM=he;ee.XMLSerializer=ki});var Ti=tt(Nr=>{"use strict";var xi=kt().freeze;Nr.XML_ENTITIES=xi({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});Nr.HTML_ENTITIES=xi({Aacute:"\xC1",aacute:"\xE1",Abreve:"\u0102",abreve:"\u0103",ac:"\u223E",acd:"\u223F",acE:"\u223E\u0333",Acirc:"\xC2",acirc:"\xE2",acute:"\xB4",Acy:"\u0410",acy:"\u0430",AElig:"\xC6",aelig:"\xE6",af:"\u2061",Afr:"\u{1D504}",afr:"\u{1D51E}",Agrave:"\xC0",agrave:"\xE0",alefsym:"\u2135",aleph:"\u2135",Alpha:"\u0391",alpha:"\u03B1",Amacr:"\u0100",amacr:"\u0101",amalg:"\u2A3F",AMP:"&",amp:"&",And:"\u2A53",and:"\u2227",andand:"\u2A55",andd:"\u2A5C",andslope:"\u2A58",andv:"\u2A5A",ang:"\u2220",ange:"\u29A4",angle:"\u2220",angmsd:"\u2221",angmsdaa:"\u29A8",angmsdab:"\u29A9",angmsdac:"\u29AA",angmsdad:"\u29AB",angmsdae:"\u29AC",angmsdaf:"\u29AD",angmsdag:"\u29AE",angmsdah:"\u29AF",angrt:"\u221F",angrtvb:"\u22BE",angrtvbd:"\u299D",angsph:"\u2222",angst:"\xC5",angzarr:"\u237C",Aogon:"\u0104",aogon:"\u0105",Aopf:"\u{1D538}",aopf:"\u{1D552}",ap:"\u2248",apacir:"\u2A6F",apE:"\u2A70",ape:"\u224A",apid:"\u224B",apos:"'",ApplyFunction:"\u2061",approx:"\u2248",approxeq:"\u224A",Aring:"\xC5",aring:"\xE5",Ascr:"\u{1D49C}",ascr:"\u{1D4B6}",Assign:"\u2254",ast:"*",asymp:"\u2248",asympeq:"\u224D",Atilde:"\xC3",atilde:"\xE3",Auml:"\xC4",auml:"\xE4",awconint:"\u2233",awint:"\u2A11",backcong:"\u224C",backepsilon:"\u03F6",backprime:"\u2035",backsim:"\u223D",backsimeq:"\u22CD",Backslash:"\u2216",Barv:"\u2AE7",barvee:"\u22BD",Barwed:"\u2306",barwed:"\u2305",barwedge:"\u2305",bbrk:"\u23B5",bbrktbrk:"\u23B6",bcong:"\u224C",Bcy:"\u0411",bcy:"\u0431",bdquo:"\u201E",becaus:"\u2235",Because:"\u2235",because:"\u2235",bemptyv:"\u29B0",bepsi:"\u03F6",bernou:"\u212C",Bernoullis:"\u212C",Beta:"\u0392",beta:"\u03B2",beth:"\u2136",between:"\u226C",Bfr:"\u{1D505}",bfr:"\u{1D51F}",bigcap:"\u22C2",bigcirc:"\u25EF",bigcup:"\u22C3",bigodot:"\u2A00",bigoplus:"\u2A01",bigotimes:"\u2A02",bigsqcup:"\u2A06",bigstar:"\u2605",bigtriangledown:"\u25BD",bigtriangleup:"\u25B3",biguplus:"\u2A04",bigvee:"\u22C1",bigwedge:"\u22C0",bkarow:"\u290D",blacklozenge:"\u29EB",blacksquare:"\u25AA",blacktriangle:"\u25B4",blacktriangledown:"\u25BE",blacktriangleleft:"\u25C2",blacktriangleright:"\u25B8",blank:"\u2423",blk12:"\u2592",blk14:"\u2591",blk34:"\u2593",block:"\u2588",bne:"=\u20E5",bnequiv:"\u2261\u20E5",bNot:"\u2AED",bnot:"\u2310",Bopf:"\u{1D539}",bopf:"\u{1D553}",bot:"\u22A5",bottom:"\u22A5",bowtie:"\u22C8",boxbox:"\u29C9",boxDL:"\u2557",boxDl:"\u2556",boxdL:"\u2555",boxdl:"\u2510",boxDR:"\u2554",boxDr:"\u2553",boxdR:"\u2552",boxdr:"\u250C",boxH:"\u2550",boxh:"\u2500",boxHD:"\u2566",boxHd:"\u2564",boxhD:"\u2565",boxhd:"\u252C",boxHU:"\u2569",boxHu:"\u2567",boxhU:"\u2568",boxhu:"\u2534",boxminus:"\u229F",boxplus:"\u229E",boxtimes:"\u22A0",boxUL:"\u255D",boxUl:"\u255C",boxuL:"\u255B",boxul:"\u2518",boxUR:"\u255A",boxUr:"\u2559",boxuR:"\u2558",boxur:"\u2514",boxV:"\u2551",boxv:"\u2502",boxVH:"\u256C",boxVh:"\u256B",boxvH:"\u256A",boxvh:"\u253C",boxVL:"\u2563",boxVl:"\u2562",boxvL:"\u2561",boxvl:"\u2524",boxVR:"\u2560",boxVr:"\u255F",boxvR:"\u255E",boxvr:"\u251C",bprime:"\u2035",Breve:"\u02D8",breve:"\u02D8",brvbar:"\xA6",Bscr:"\u212C",bscr:"\u{1D4B7}",bsemi:"\u204F",bsim:"\u223D",bsime:"\u22CD",bsol:"\\",bsolb:"\u29C5",bsolhsub:"\u27C8",bull:"\u2022",bullet:"\u2022",bump:"\u224E",bumpE:"\u2AAE",bumpe:"\u224F",Bumpeq:"\u224E",bumpeq:"\u224F",Cacute:"\u0106",cacute:"\u0107",Cap:"\u22D2",cap:"\u2229",capand:"\u2A44",capbrcup:"\u2A49",capcap:"\u2A4B",capcup:"\u2A47",capdot:"\u2A40",CapitalDifferentialD:"\u2145",caps:"\u2229\uFE00",caret:"\u2041",caron:"\u02C7",Cayleys:"\u212D",ccaps:"\u2A4D",Ccaron:"\u010C",ccaron:"\u010D",Ccedil:"\xC7",ccedil:"\xE7",Ccirc:"\u0108",ccirc:"\u0109",Cconint:"\u2230",ccups:"\u2A4C",ccupssm:"\u2A50",Cdot:"\u010A",cdot:"\u010B",cedil:"\xB8",Cedilla:"\xB8",cemptyv:"\u29B2",cent:"\xA2",CenterDot:"\xB7",centerdot:"\xB7",Cfr:"\u212D",cfr:"\u{1D520}",CHcy:"\u0427",chcy:"\u0447",check:"\u2713",checkmark:"\u2713",Chi:"\u03A7",chi:"\u03C7",cir:"\u25CB",circ:"\u02C6",circeq:"\u2257",circlearrowleft:"\u21BA",circlearrowright:"\u21BB",circledast:"\u229B",circledcirc:"\u229A",circleddash:"\u229D",CircleDot:"\u2299",circledR:"\xAE",circledS:"\u24C8",CircleMinus:"\u2296",CirclePlus:"\u2295",CircleTimes:"\u2297",cirE:"\u29C3",cire:"\u2257",cirfnint:"\u2A10",cirmid:"\u2AEF",cirscir:"\u29C2",ClockwiseContourIntegral:"\u2232",CloseCurlyDoubleQuote:"\u201D",CloseCurlyQuote:"\u2019",clubs:"\u2663",clubsuit:"\u2663",Colon:"\u2237",colon:":",Colone:"\u2A74",colone:"\u2254",coloneq:"\u2254",comma:",",commat:"@",comp:"\u2201",compfn:"\u2218",complement:"\u2201",complexes:"\u2102",cong:"\u2245",congdot:"\u2A6D",Congruent:"\u2261",Conint:"\u222F",conint:"\u222E",ContourIntegral:"\u222E",Copf:"\u2102",copf:"\u{1D554}",coprod:"\u2210",Coproduct:"\u2210",COPY:"\xA9",copy:"\xA9",copysr:"\u2117",CounterClockwiseContourIntegral:"\u2233",crarr:"\u21B5",Cross:"\u2A2F",cross:"\u2717",Cscr:"\u{1D49E}",cscr:"\u{1D4B8}",csub:"\u2ACF",csube:"\u2AD1",csup:"\u2AD0",csupe:"\u2AD2",ctdot:"\u22EF",cudarrl:"\u2938",cudarrr:"\u2935",cuepr:"\u22DE",cuesc:"\u22DF",cularr:"\u21B6",cularrp:"\u293D",Cup:"\u22D3",cup:"\u222A",cupbrcap:"\u2A48",CupCap:"\u224D",cupcap:"\u2A46",cupcup:"\u2A4A",cupdot:"\u228D",cupor:"\u2A45",cups:"\u222A\uFE00",curarr:"\u21B7",curarrm:"\u293C",curlyeqprec:"\u22DE",curlyeqsucc:"\u22DF",curlyvee:"\u22CE",curlywedge:"\u22CF",curren:"\xA4",curvearrowleft:"\u21B6",curvearrowright:"\u21B7",cuvee:"\u22CE",cuwed:"\u22CF",cwconint:"\u2232",cwint:"\u2231",cylcty:"\u232D",Dagger:"\u2021",dagger:"\u2020",daleth:"\u2138",Darr:"\u21A1",dArr:"\u21D3",darr:"\u2193",dash:"\u2010",Dashv:"\u2AE4",dashv:"\u22A3",dbkarow:"\u290F",dblac:"\u02DD",Dcaron:"\u010E",dcaron:"\u010F",Dcy:"\u0414",dcy:"\u0434",DD:"\u2145",dd:"\u2146",ddagger:"\u2021",ddarr:"\u21CA",DDotrahd:"\u2911",ddotseq:"\u2A77",deg:"\xB0",Del:"\u2207",Delta:"\u0394",delta:"\u03B4",demptyv:"\u29B1",dfisht:"\u297F",Dfr:"\u{1D507}",dfr:"\u{1D521}",dHar:"\u2965",dharl:"\u21C3",dharr:"\u21C2",DiacriticalAcute:"\xB4",DiacriticalDot:"\u02D9",DiacriticalDoubleAcute:"\u02DD",DiacriticalGrave:"`",DiacriticalTilde:"\u02DC",diam:"\u22C4",Diamond:"\u22C4",diamond:"\u22C4",diamondsuit:"\u2666",diams:"\u2666",die:"\xA8",DifferentialD:"\u2146",digamma:"\u03DD",disin:"\u22F2",div:"\xF7",divide:"\xF7",divideontimes:"\u22C7",divonx:"\u22C7",DJcy:"\u0402",djcy:"\u0452",dlcorn:"\u231E",dlcrop:"\u230D",dollar:"$",Dopf:"\u{1D53B}",dopf:"\u{1D555}",Dot:"\xA8",dot:"\u02D9",DotDot:"\u20DC",doteq:"\u2250",doteqdot:"\u2251",DotEqual:"\u2250",dotminus:"\u2238",dotplus:"\u2214",dotsquare:"\u22A1",doublebarwedge:"\u2306",DoubleContourIntegral:"\u222F",DoubleDot:"\xA8",DoubleDownArrow:"\u21D3",DoubleLeftArrow:"\u21D0",DoubleLeftRightArrow:"\u21D4",DoubleLeftTee:"\u2AE4",DoubleLongLeftArrow:"\u27F8",DoubleLongLeftRightArrow:"\u27FA",DoubleLongRightArrow:"\u27F9",DoubleRightArrow:"\u21D2",DoubleRightTee:"\u22A8",DoubleUpArrow:"\u21D1",DoubleUpDownArrow:"\u21D5",DoubleVerticalBar:"\u2225",DownArrow:"\u2193",Downarrow:"\u21D3",downarrow:"\u2193",DownArrowBar:"\u2913",DownArrowUpArrow:"\u21F5",DownBreve:"\u0311",downdownarrows:"\u21CA",downharpoonleft:"\u21C3",downharpoonright:"\u21C2",DownLeftRightVector:"\u2950",DownLeftTeeVector:"\u295E",DownLeftVector:"\u21BD",DownLeftVectorBar:"\u2956",DownRightTeeVector:"\u295F",DownRightVector:"\u21C1",DownRightVectorBar:"\u2957",DownTee:"\u22A4",DownTeeArrow:"\u21A7",drbkarow:"\u2910",drcorn:"\u231F",drcrop:"\u230C",Dscr:"\u{1D49F}",dscr:"\u{1D4B9}",DScy:"\u0405",dscy:"\u0455",dsol:"\u29F6",Dstrok:"\u0110",dstrok:"\u0111",dtdot:"\u22F1",dtri:"\u25BF",dtrif:"\u25BE",duarr:"\u21F5",duhar:"\u296F",dwangle:"\u29A6",DZcy:"\u040F",dzcy:"\u045F",dzigrarr:"\u27FF",Eacute:"\xC9",eacute:"\xE9",easter:"\u2A6E",Ecaron:"\u011A",ecaron:"\u011B",ecir:"\u2256",Ecirc:"\xCA",ecirc:"\xEA",ecolon:"\u2255",Ecy:"\u042D",ecy:"\u044D",eDDot:"\u2A77",Edot:"\u0116",eDot:"\u2251",edot:"\u0117",ee:"\u2147",efDot:"\u2252",Efr:"\u{1D508}",efr:"\u{1D522}",eg:"\u2A9A",Egrave:"\xC8",egrave:"\xE8",egs:"\u2A96",egsdot:"\u2A98",el:"\u2A99",Element:"\u2208",elinters:"\u23E7",ell:"\u2113",els:"\u2A95",elsdot:"\u2A97",Emacr:"\u0112",emacr:"\u0113",empty:"\u2205",emptyset:"\u2205",EmptySmallSquare:"\u25FB",emptyv:"\u2205",EmptyVerySmallSquare:"\u25AB",emsp:"\u2003",emsp13:"\u2004",emsp14:"\u2005",ENG:"\u014A",eng:"\u014B",ensp:"\u2002",Eogon:"\u0118",eogon:"\u0119",Eopf:"\u{1D53C}",eopf:"\u{1D556}",epar:"\u22D5",eparsl:"\u29E3",eplus:"\u2A71",epsi:"\u03B5",Epsilon:"\u0395",epsilon:"\u03B5",epsiv:"\u03F5",eqcirc:"\u2256",eqcolon:"\u2255",eqsim:"\u2242",eqslantgtr:"\u2A96",eqslantless:"\u2A95",Equal:"\u2A75",equals:"=",EqualTilde:"\u2242",equest:"\u225F",Equilibrium:"\u21CC",equiv:"\u2261",equivDD:"\u2A78",eqvparsl:"\u29E5",erarr:"\u2971",erDot:"\u2253",Escr:"\u2130",escr:"\u212F",esdot:"\u2250",Esim:"\u2A73",esim:"\u2242",Eta:"\u0397",eta:"\u03B7",ETH:"\xD0",eth:"\xF0",Euml:"\xCB",euml:"\xEB",euro:"\u20AC",excl:"!",exist:"\u2203",Exists:"\u2203",expectation:"\u2130",ExponentialE:"\u2147",exponentiale:"\u2147",fallingdotseq:"\u2252",Fcy:"\u0424",fcy:"\u0444",female:"\u2640",ffilig:"\uFB03",fflig:"\uFB00",ffllig:"\uFB04",Ffr:"\u{1D509}",ffr:"\u{1D523}",filig:"\uFB01",FilledSmallSquare:"\u25FC",FilledVerySmallSquare:"\u25AA",fjlig:"fj",flat:"\u266D",fllig:"\uFB02",fltns:"\u25B1",fnof:"\u0192",Fopf:"\u{1D53D}",fopf:"\u{1D557}",ForAll:"\u2200",forall:"\u2200",fork:"\u22D4",forkv:"\u2AD9",Fouriertrf:"\u2131",fpartint:"\u2A0D",frac12:"\xBD",frac13:"\u2153",frac14:"\xBC",frac15:"\u2155",frac16:"\u2159",frac18:"\u215B",frac23:"\u2154",frac25:"\u2156",frac34:"\xBE",frac35:"\u2157",frac38:"\u215C",frac45:"\u2158",frac56:"\u215A",frac58:"\u215D",frac78:"\u215E",frasl:"\u2044",frown:"\u2322",Fscr:"\u2131",fscr:"\u{1D4BB}",gacute:"\u01F5",Gamma:"\u0393",gamma:"\u03B3",Gammad:"\u03DC",gammad:"\u03DD",gap:"\u2A86",Gbreve:"\u011E",gbreve:"\u011F",Gcedil:"\u0122",Gcirc:"\u011C",gcirc:"\u011D",Gcy:"\u0413",gcy:"\u0433",Gdot:"\u0120",gdot:"\u0121",gE:"\u2267",ge:"\u2265",gEl:"\u2A8C",gel:"\u22DB",geq:"\u2265",geqq:"\u2267",geqslant:"\u2A7E",ges:"\u2A7E",gescc:"\u2AA9",gesdot:"\u2A80",gesdoto:"\u2A82",gesdotol:"\u2A84",gesl:"\u22DB\uFE00",gesles:"\u2A94",Gfr:"\u{1D50A}",gfr:"\u{1D524}",Gg:"\u22D9",gg:"\u226B",ggg:"\u22D9",gimel:"\u2137",GJcy:"\u0403",gjcy:"\u0453",gl:"\u2277",gla:"\u2AA5",glE:"\u2A92",glj:"\u2AA4",gnap:"\u2A8A",gnapprox:"\u2A8A",gnE:"\u2269",gne:"\u2A88",gneq:"\u2A88",gneqq:"\u2269",gnsim:"\u22E7",Gopf:"\u{1D53E}",gopf:"\u{1D558}",grave:"`",GreaterEqual:"\u2265",GreaterEqualLess:"\u22DB",GreaterFullEqual:"\u2267",GreaterGreater:"\u2AA2",GreaterLess:"\u2277",GreaterSlantEqual:"\u2A7E",GreaterTilde:"\u2273",Gscr:"\u{1D4A2}",gscr:"\u210A",gsim:"\u2273",gsime:"\u2A8E",gsiml:"\u2A90",Gt:"\u226B",GT:">",gt:">",gtcc:"\u2AA7",gtcir:"\u2A7A",gtdot:"\u22D7",gtlPar:"\u2995",gtquest:"\u2A7C",gtrapprox:"\u2A86",gtrarr:"\u2978",gtrdot:"\u22D7",gtreqless:"\u22DB",gtreqqless:"\u2A8C",gtrless:"\u2277",gtrsim:"\u2273",gvertneqq:"\u2269\uFE00",gvnE:"\u2269\uFE00",Hacek:"\u02C7",hairsp:"\u200A",half:"\xBD",hamilt:"\u210B",HARDcy:"\u042A",hardcy:"\u044A",hArr:"\u21D4",harr:"\u2194",harrcir:"\u2948",harrw:"\u21AD",Hat:"^",hbar:"\u210F",Hcirc:"\u0124",hcirc:"\u0125",hearts:"\u2665",heartsuit:"\u2665",hellip:"\u2026",hercon:"\u22B9",Hfr:"\u210C",hfr:"\u{1D525}",HilbertSpace:"\u210B",hksearow:"\u2925",hkswarow:"\u2926",hoarr:"\u21FF",homtht:"\u223B",hookleftarrow:"\u21A9",hookrightarrow:"\u21AA",Hopf:"\u210D",hopf:"\u{1D559}",horbar:"\u2015",HorizontalLine:"\u2500",Hscr:"\u210B",hscr:"\u{1D4BD}",hslash:"\u210F",Hstrok:"\u0126",hstrok:"\u0127",HumpDownHump:"\u224E",HumpEqual:"\u224F",hybull:"\u2043",hyphen:"\u2010",Iacute:"\xCD",iacute:"\xED",ic:"\u2063",Icirc:"\xCE",icirc:"\xEE",Icy:"\u0418",icy:"\u0438",Idot:"\u0130",IEcy:"\u0415",iecy:"\u0435",iexcl:"\xA1",iff:"\u21D4",Ifr:"\u2111",ifr:"\u{1D526}",Igrave:"\xCC",igrave:"\xEC",ii:"\u2148",iiiint:"\u2A0C",iiint:"\u222D",iinfin:"\u29DC",iiota:"\u2129",IJlig:"\u0132",ijlig:"\u0133",Im:"\u2111",Imacr:"\u012A",imacr:"\u012B",image:"\u2111",ImaginaryI:"\u2148",imagline:"\u2110",imagpart:"\u2111",imath:"\u0131",imof:"\u22B7",imped:"\u01B5",Implies:"\u21D2",in:"\u2208",incare:"\u2105",infin:"\u221E",infintie:"\u29DD",inodot:"\u0131",Int:"\u222C",int:"\u222B",intcal:"\u22BA",integers:"\u2124",Integral:"\u222B",intercal:"\u22BA",Intersection:"\u22C2",intlarhk:"\u2A17",intprod:"\u2A3C",InvisibleComma:"\u2063",InvisibleTimes:"\u2062",IOcy:"\u0401",iocy:"\u0451",Iogon:"\u012E",iogon:"\u012F",Iopf:"\u{1D540}",iopf:"\u{1D55A}",Iota:"\u0399",iota:"\u03B9",iprod:"\u2A3C",iquest:"\xBF",Iscr:"\u2110",iscr:"\u{1D4BE}",isin:"\u2208",isindot:"\u22F5",isinE:"\u22F9",isins:"\u22F4",isinsv:"\u22F3",isinv:"\u2208",it:"\u2062",Itilde:"\u0128",itilde:"\u0129",Iukcy:"\u0406",iukcy:"\u0456",Iuml:"\xCF",iuml:"\xEF",Jcirc:"\u0134",jcirc:"\u0135",Jcy:"\u0419",jcy:"\u0439",Jfr:"\u{1D50D}",jfr:"\u{1D527}",jmath:"\u0237",Jopf:"\u{1D541}",jopf:"\u{1D55B}",Jscr:"\u{1D4A5}",jscr:"\u{1D4BF}",Jsercy:"\u0408",jsercy:"\u0458",Jukcy:"\u0404",jukcy:"\u0454",Kappa:"\u039A",kappa:"\u03BA",kappav:"\u03F0",Kcedil:"\u0136",kcedil:"\u0137",Kcy:"\u041A",kcy:"\u043A",Kfr:"\u{1D50E}",kfr:"\u{1D528}",kgreen:"\u0138",KHcy:"\u0425",khcy:"\u0445",KJcy:"\u040C",kjcy:"\u045C",Kopf:"\u{1D542}",kopf:"\u{1D55C}",Kscr:"\u{1D4A6}",kscr:"\u{1D4C0}",lAarr:"\u21DA",Lacute:"\u0139",lacute:"\u013A",laemptyv:"\u29B4",lagran:"\u2112",Lambda:"\u039B",lambda:"\u03BB",Lang:"\u27EA",lang:"\u27E8",langd:"\u2991",langle:"\u27E8",lap:"\u2A85",Laplacetrf:"\u2112",laquo:"\xAB",Larr:"\u219E",lArr:"\u21D0",larr:"\u2190",larrb:"\u21E4",larrbfs:"\u291F",larrfs:"\u291D",larrhk:"\u21A9",larrlp:"\u21AB",larrpl:"\u2939",larrsim:"\u2973",larrtl:"\u21A2",lat:"\u2AAB",lAtail:"\u291B",latail:"\u2919",late:"\u2AAD",lates:"\u2AAD\uFE00",lBarr:"\u290E",lbarr:"\u290C",lbbrk:"\u2772",lbrace:"{",lbrack:"[",lbrke:"\u298B",lbrksld:"\u298F",lbrkslu:"\u298D",Lcaron:"\u013D",lcaron:"\u013E",Lcedil:"\u013B",lcedil:"\u013C",lceil:"\u2308",lcub:"{",Lcy:"\u041B",lcy:"\u043B",ldca:"\u2936",ldquo:"\u201C",ldquor:"\u201E",ldrdhar:"\u2967",ldrushar:"\u294B",ldsh:"\u21B2",lE:"\u2266",le:"\u2264",LeftAngleBracket:"\u27E8",LeftArrow:"\u2190",Leftarrow:"\u21D0",leftarrow:"\u2190",LeftArrowBar:"\u21E4",LeftArrowRightArrow:"\u21C6",leftarrowtail:"\u21A2",LeftCeiling:"\u2308",LeftDoubleBracket:"\u27E6",LeftDownTeeVector:"\u2961",LeftDownVector:"\u21C3",LeftDownVectorBar:"\u2959",LeftFloor:"\u230A",leftharpoondown:"\u21BD",leftharpoonup:"\u21BC",leftleftarrows:"\u21C7",LeftRightArrow:"\u2194",Leftrightarrow:"\u21D4",leftrightarrow:"\u2194",leftrightarrows:"\u21C6",leftrightharpoons:"\u21CB",leftrightsquigarrow:"\u21AD",LeftRightVector:"\u294E",LeftTee:"\u22A3",LeftTeeArrow:"\u21A4",LeftTeeVector:"\u295A",leftthreetimes:"\u22CB",LeftTriangle:"\u22B2",LeftTriangleBar:"\u29CF",LeftTriangleEqual:"\u22B4",LeftUpDownVector:"\u2951",LeftUpTeeVector:"\u2960",LeftUpVector:"\u21BF",LeftUpVectorBar:"\u2958",LeftVector:"\u21BC",LeftVectorBar:"\u2952",lEg:"\u2A8B",leg:"\u22DA",leq:"\u2264",leqq:"\u2266",leqslant:"\u2A7D",les:"\u2A7D",lescc:"\u2AA8",lesdot:"\u2A7F",lesdoto:"\u2A81",lesdotor:"\u2A83",lesg:"\u22DA\uFE00",lesges:"\u2A93",lessapprox:"\u2A85",lessdot:"\u22D6",lesseqgtr:"\u22DA",lesseqqgtr:"\u2A8B",LessEqualGreater:"\u22DA",LessFullEqual:"\u2266",LessGreater:"\u2276",lessgtr:"\u2276",LessLess:"\u2AA1",lesssim:"\u2272",LessSlantEqual:"\u2A7D",LessTilde:"\u2272",lfisht:"\u297C",lfloor:"\u230A",Lfr:"\u{1D50F}",lfr:"\u{1D529}",lg:"\u2276",lgE:"\u2A91",lHar:"\u2962",lhard:"\u21BD",lharu:"\u21BC",lharul:"\u296A",lhblk:"\u2584",LJcy:"\u0409",ljcy:"\u0459",Ll:"\u22D8",ll:"\u226A",llarr:"\u21C7",llcorner:"\u231E",Lleftarrow:"\u21DA",llhard:"\u296B",lltri:"\u25FA",Lmidot:"\u013F",lmidot:"\u0140",lmoust:"\u23B0",lmoustache:"\u23B0",lnap:"\u2A89",lnapprox:"\u2A89",lnE:"\u2268",lne:"\u2A87",lneq:"\u2A87",lneqq:"\u2268",lnsim:"\u22E6",loang:"\u27EC",loarr:"\u21FD",lobrk:"\u27E6",LongLeftArrow:"\u27F5",Longleftarrow:"\u27F8",longleftarrow:"\u27F5",LongLeftRightArrow:"\u27F7",Longleftrightarrow:"\u27FA",longleftrightarrow:"\u27F7",longmapsto:"\u27FC",LongRightArrow:"\u27F6",Longrightarrow:"\u27F9",longrightarrow:"\u27F6",looparrowleft:"\u21AB",looparrowright:"\u21AC",lopar:"\u2985",Lopf:"\u{1D543}",lopf:"\u{1D55D}",loplus:"\u2A2D",lotimes:"\u2A34",lowast:"\u2217",lowbar:"_",LowerLeftArrow:"\u2199",LowerRightArrow:"\u2198",loz:"\u25CA",lozenge:"\u25CA",lozf:"\u29EB",lpar:"(",lparlt:"\u2993",lrarr:"\u21C6",lrcorner:"\u231F",lrhar:"\u21CB",lrhard:"\u296D",lrm:"\u200E",lrtri:"\u22BF",lsaquo:"\u2039",Lscr:"\u2112",lscr:"\u{1D4C1}",Lsh:"\u21B0",lsh:"\u21B0",lsim:"\u2272",lsime:"\u2A8D",lsimg:"\u2A8F",lsqb:"[",lsquo:"\u2018",lsquor:"\u201A",Lstrok:"\u0141",lstrok:"\u0142",Lt:"\u226A",LT:"<",lt:"<",ltcc:"\u2AA6",ltcir:"\u2A79",ltdot:"\u22D6",lthree:"\u22CB",ltimes:"\u22C9",ltlarr:"\u2976",ltquest:"\u2A7B",ltri:"\u25C3",ltrie:"\u22B4",ltrif:"\u25C2",ltrPar:"\u2996",lurdshar:"\u294A",luruhar:"\u2966",lvertneqq:"\u2268\uFE00",lvnE:"\u2268\uFE00",macr:"\xAF",male:"\u2642",malt:"\u2720",maltese:"\u2720",Map:"\u2905",map:"\u21A6",mapsto:"\u21A6",mapstodown:"\u21A7",mapstoleft:"\u21A4",mapstoup:"\u21A5",marker:"\u25AE",mcomma:"\u2A29",Mcy:"\u041C",mcy:"\u043C",mdash:"\u2014",mDDot:"\u223A",measuredangle:"\u2221",MediumSpace:"\u205F",Mellintrf:"\u2133",Mfr:"\u{1D510}",mfr:"\u{1D52A}",mho:"\u2127",micro:"\xB5",mid:"\u2223",midast:"*",midcir:"\u2AF0",middot:"\xB7",minus:"\u2212",minusb:"\u229F",minusd:"\u2238",minusdu:"\u2A2A",MinusPlus:"\u2213",mlcp:"\u2ADB",mldr:"\u2026",mnplus:"\u2213",models:"\u22A7",Mopf:"\u{1D544}",mopf:"\u{1D55E}",mp:"\u2213",Mscr:"\u2133",mscr:"\u{1D4C2}",mstpos:"\u223E",Mu:"\u039C",mu:"\u03BC",multimap:"\u22B8",mumap:"\u22B8",nabla:"\u2207",Nacute:"\u0143",nacute:"\u0144",nang:"\u2220\u20D2",nap:"\u2249",napE:"\u2A70\u0338",napid:"\u224B\u0338",napos:"\u0149",napprox:"\u2249",natur:"\u266E",natural:"\u266E",naturals:"\u2115",nbsp:"\xA0",nbump:"\u224E\u0338",nbumpe:"\u224F\u0338",ncap:"\u2A43",Ncaron:"\u0147",ncaron:"\u0148",Ncedil:"\u0145",ncedil:"\u0146",ncong:"\u2247",ncongdot:"\u2A6D\u0338",ncup:"\u2A42",Ncy:"\u041D",ncy:"\u043D",ndash:"\u2013",ne:"\u2260",nearhk:"\u2924",neArr:"\u21D7",nearr:"\u2197",nearrow:"\u2197",nedot:"\u2250\u0338",NegativeMediumSpace:"\u200B",NegativeThickSpace:"\u200B",NegativeThinSpace:"\u200B",NegativeVeryThinSpace:"\u200B",nequiv:"\u2262",nesear:"\u2928",nesim:"\u2242\u0338",NestedGreaterGreater:"\u226B",NestedLessLess:"\u226A",NewLine:`
2
+ `,nexist:"\u2204",nexists:"\u2204",Nfr:"\u{1D511}",nfr:"\u{1D52B}",ngE:"\u2267\u0338",nge:"\u2271",ngeq:"\u2271",ngeqq:"\u2267\u0338",ngeqslant:"\u2A7E\u0338",nges:"\u2A7E\u0338",nGg:"\u22D9\u0338",ngsim:"\u2275",nGt:"\u226B\u20D2",ngt:"\u226F",ngtr:"\u226F",nGtv:"\u226B\u0338",nhArr:"\u21CE",nharr:"\u21AE",nhpar:"\u2AF2",ni:"\u220B",nis:"\u22FC",nisd:"\u22FA",niv:"\u220B",NJcy:"\u040A",njcy:"\u045A",nlArr:"\u21CD",nlarr:"\u219A",nldr:"\u2025",nlE:"\u2266\u0338",nle:"\u2270",nLeftarrow:"\u21CD",nleftarrow:"\u219A",nLeftrightarrow:"\u21CE",nleftrightarrow:"\u21AE",nleq:"\u2270",nleqq:"\u2266\u0338",nleqslant:"\u2A7D\u0338",nles:"\u2A7D\u0338",nless:"\u226E",nLl:"\u22D8\u0338",nlsim:"\u2274",nLt:"\u226A\u20D2",nlt:"\u226E",nltri:"\u22EA",nltrie:"\u22EC",nLtv:"\u226A\u0338",nmid:"\u2224",NoBreak:"\u2060",NonBreakingSpace:"\xA0",Nopf:"\u2115",nopf:"\u{1D55F}",Not:"\u2AEC",not:"\xAC",NotCongruent:"\u2262",NotCupCap:"\u226D",NotDoubleVerticalBar:"\u2226",NotElement:"\u2209",NotEqual:"\u2260",NotEqualTilde:"\u2242\u0338",NotExists:"\u2204",NotGreater:"\u226F",NotGreaterEqual:"\u2271",NotGreaterFullEqual:"\u2267\u0338",NotGreaterGreater:"\u226B\u0338",NotGreaterLess:"\u2279",NotGreaterSlantEqual:"\u2A7E\u0338",NotGreaterTilde:"\u2275",NotHumpDownHump:"\u224E\u0338",NotHumpEqual:"\u224F\u0338",notin:"\u2209",notindot:"\u22F5\u0338",notinE:"\u22F9\u0338",notinva:"\u2209",notinvb:"\u22F7",notinvc:"\u22F6",NotLeftTriangle:"\u22EA",NotLeftTriangleBar:"\u29CF\u0338",NotLeftTriangleEqual:"\u22EC",NotLess:"\u226E",NotLessEqual:"\u2270",NotLessGreater:"\u2278",NotLessLess:"\u226A\u0338",NotLessSlantEqual:"\u2A7D\u0338",NotLessTilde:"\u2274",NotNestedGreaterGreater:"\u2AA2\u0338",NotNestedLessLess:"\u2AA1\u0338",notni:"\u220C",notniva:"\u220C",notnivb:"\u22FE",notnivc:"\u22FD",NotPrecedes:"\u2280",NotPrecedesEqual:"\u2AAF\u0338",NotPrecedesSlantEqual:"\u22E0",NotReverseElement:"\u220C",NotRightTriangle:"\u22EB",NotRightTriangleBar:"\u29D0\u0338",NotRightTriangleEqual:"\u22ED",NotSquareSubset:"\u228F\u0338",NotSquareSubsetEqual:"\u22E2",NotSquareSuperset:"\u2290\u0338",NotSquareSupersetEqual:"\u22E3",NotSubset:"\u2282\u20D2",NotSubsetEqual:"\u2288",NotSucceeds:"\u2281",NotSucceedsEqual:"\u2AB0\u0338",NotSucceedsSlantEqual:"\u22E1",NotSucceedsTilde:"\u227F\u0338",NotSuperset:"\u2283\u20D2",NotSupersetEqual:"\u2289",NotTilde:"\u2241",NotTildeEqual:"\u2244",NotTildeFullEqual:"\u2247",NotTildeTilde:"\u2249",NotVerticalBar:"\u2224",npar:"\u2226",nparallel:"\u2226",nparsl:"\u2AFD\u20E5",npart:"\u2202\u0338",npolint:"\u2A14",npr:"\u2280",nprcue:"\u22E0",npre:"\u2AAF\u0338",nprec:"\u2280",npreceq:"\u2AAF\u0338",nrArr:"\u21CF",nrarr:"\u219B",nrarrc:"\u2933\u0338",nrarrw:"\u219D\u0338",nRightarrow:"\u21CF",nrightarrow:"\u219B",nrtri:"\u22EB",nrtrie:"\u22ED",nsc:"\u2281",nsccue:"\u22E1",nsce:"\u2AB0\u0338",Nscr:"\u{1D4A9}",nscr:"\u{1D4C3}",nshortmid:"\u2224",nshortparallel:"\u2226",nsim:"\u2241",nsime:"\u2244",nsimeq:"\u2244",nsmid:"\u2224",nspar:"\u2226",nsqsube:"\u22E2",nsqsupe:"\u22E3",nsub:"\u2284",nsubE:"\u2AC5\u0338",nsube:"\u2288",nsubset:"\u2282\u20D2",nsubseteq:"\u2288",nsubseteqq:"\u2AC5\u0338",nsucc:"\u2281",nsucceq:"\u2AB0\u0338",nsup:"\u2285",nsupE:"\u2AC6\u0338",nsupe:"\u2289",nsupset:"\u2283\u20D2",nsupseteq:"\u2289",nsupseteqq:"\u2AC6\u0338",ntgl:"\u2279",Ntilde:"\xD1",ntilde:"\xF1",ntlg:"\u2278",ntriangleleft:"\u22EA",ntrianglelefteq:"\u22EC",ntriangleright:"\u22EB",ntrianglerighteq:"\u22ED",Nu:"\u039D",nu:"\u03BD",num:"#",numero:"\u2116",numsp:"\u2007",nvap:"\u224D\u20D2",nVDash:"\u22AF",nVdash:"\u22AE",nvDash:"\u22AD",nvdash:"\u22AC",nvge:"\u2265\u20D2",nvgt:">\u20D2",nvHarr:"\u2904",nvinfin:"\u29DE",nvlArr:"\u2902",nvle:"\u2264\u20D2",nvlt:"<\u20D2",nvltrie:"\u22B4\u20D2",nvrArr:"\u2903",nvrtrie:"\u22B5\u20D2",nvsim:"\u223C\u20D2",nwarhk:"\u2923",nwArr:"\u21D6",nwarr:"\u2196",nwarrow:"\u2196",nwnear:"\u2927",Oacute:"\xD3",oacute:"\xF3",oast:"\u229B",ocir:"\u229A",Ocirc:"\xD4",ocirc:"\xF4",Ocy:"\u041E",ocy:"\u043E",odash:"\u229D",Odblac:"\u0150",odblac:"\u0151",odiv:"\u2A38",odot:"\u2299",odsold:"\u29BC",OElig:"\u0152",oelig:"\u0153",ofcir:"\u29BF",Ofr:"\u{1D512}",ofr:"\u{1D52C}",ogon:"\u02DB",Ograve:"\xD2",ograve:"\xF2",ogt:"\u29C1",ohbar:"\u29B5",ohm:"\u03A9",oint:"\u222E",olarr:"\u21BA",olcir:"\u29BE",olcross:"\u29BB",oline:"\u203E",olt:"\u29C0",Omacr:"\u014C",omacr:"\u014D",Omega:"\u03A9",omega:"\u03C9",Omicron:"\u039F",omicron:"\u03BF",omid:"\u29B6",ominus:"\u2296",Oopf:"\u{1D546}",oopf:"\u{1D560}",opar:"\u29B7",OpenCurlyDoubleQuote:"\u201C",OpenCurlyQuote:"\u2018",operp:"\u29B9",oplus:"\u2295",Or:"\u2A54",or:"\u2228",orarr:"\u21BB",ord:"\u2A5D",order:"\u2134",orderof:"\u2134",ordf:"\xAA",ordm:"\xBA",origof:"\u22B6",oror:"\u2A56",orslope:"\u2A57",orv:"\u2A5B",oS:"\u24C8",Oscr:"\u{1D4AA}",oscr:"\u2134",Oslash:"\xD8",oslash:"\xF8",osol:"\u2298",Otilde:"\xD5",otilde:"\xF5",Otimes:"\u2A37",otimes:"\u2297",otimesas:"\u2A36",Ouml:"\xD6",ouml:"\xF6",ovbar:"\u233D",OverBar:"\u203E",OverBrace:"\u23DE",OverBracket:"\u23B4",OverParenthesis:"\u23DC",par:"\u2225",para:"\xB6",parallel:"\u2225",parsim:"\u2AF3",parsl:"\u2AFD",part:"\u2202",PartialD:"\u2202",Pcy:"\u041F",pcy:"\u043F",percnt:"%",period:".",permil:"\u2030",perp:"\u22A5",pertenk:"\u2031",Pfr:"\u{1D513}",pfr:"\u{1D52D}",Phi:"\u03A6",phi:"\u03C6",phiv:"\u03D5",phmmat:"\u2133",phone:"\u260E",Pi:"\u03A0",pi:"\u03C0",pitchfork:"\u22D4",piv:"\u03D6",planck:"\u210F",planckh:"\u210E",plankv:"\u210F",plus:"+",plusacir:"\u2A23",plusb:"\u229E",pluscir:"\u2A22",plusdo:"\u2214",plusdu:"\u2A25",pluse:"\u2A72",PlusMinus:"\xB1",plusmn:"\xB1",plussim:"\u2A26",plustwo:"\u2A27",pm:"\xB1",Poincareplane:"\u210C",pointint:"\u2A15",Popf:"\u2119",popf:"\u{1D561}",pound:"\xA3",Pr:"\u2ABB",pr:"\u227A",prap:"\u2AB7",prcue:"\u227C",prE:"\u2AB3",pre:"\u2AAF",prec:"\u227A",precapprox:"\u2AB7",preccurlyeq:"\u227C",Precedes:"\u227A",PrecedesEqual:"\u2AAF",PrecedesSlantEqual:"\u227C",PrecedesTilde:"\u227E",preceq:"\u2AAF",precnapprox:"\u2AB9",precneqq:"\u2AB5",precnsim:"\u22E8",precsim:"\u227E",Prime:"\u2033",prime:"\u2032",primes:"\u2119",prnap:"\u2AB9",prnE:"\u2AB5",prnsim:"\u22E8",prod:"\u220F",Product:"\u220F",profalar:"\u232E",profline:"\u2312",profsurf:"\u2313",prop:"\u221D",Proportion:"\u2237",Proportional:"\u221D",propto:"\u221D",prsim:"\u227E",prurel:"\u22B0",Pscr:"\u{1D4AB}",pscr:"\u{1D4C5}",Psi:"\u03A8",psi:"\u03C8",puncsp:"\u2008",Qfr:"\u{1D514}",qfr:"\u{1D52E}",qint:"\u2A0C",Qopf:"\u211A",qopf:"\u{1D562}",qprime:"\u2057",Qscr:"\u{1D4AC}",qscr:"\u{1D4C6}",quaternions:"\u210D",quatint:"\u2A16",quest:"?",questeq:"\u225F",QUOT:'"',quot:'"',rAarr:"\u21DB",race:"\u223D\u0331",Racute:"\u0154",racute:"\u0155",radic:"\u221A",raemptyv:"\u29B3",Rang:"\u27EB",rang:"\u27E9",rangd:"\u2992",range:"\u29A5",rangle:"\u27E9",raquo:"\xBB",Rarr:"\u21A0",rArr:"\u21D2",rarr:"\u2192",rarrap:"\u2975",rarrb:"\u21E5",rarrbfs:"\u2920",rarrc:"\u2933",rarrfs:"\u291E",rarrhk:"\u21AA",rarrlp:"\u21AC",rarrpl:"\u2945",rarrsim:"\u2974",Rarrtl:"\u2916",rarrtl:"\u21A3",rarrw:"\u219D",rAtail:"\u291C",ratail:"\u291A",ratio:"\u2236",rationals:"\u211A",RBarr:"\u2910",rBarr:"\u290F",rbarr:"\u290D",rbbrk:"\u2773",rbrace:"}",rbrack:"]",rbrke:"\u298C",rbrksld:"\u298E",rbrkslu:"\u2990",Rcaron:"\u0158",rcaron:"\u0159",Rcedil:"\u0156",rcedil:"\u0157",rceil:"\u2309",rcub:"}",Rcy:"\u0420",rcy:"\u0440",rdca:"\u2937",rdldhar:"\u2969",rdquo:"\u201D",rdquor:"\u201D",rdsh:"\u21B3",Re:"\u211C",real:"\u211C",realine:"\u211B",realpart:"\u211C",reals:"\u211D",rect:"\u25AD",REG:"\xAE",reg:"\xAE",ReverseElement:"\u220B",ReverseEquilibrium:"\u21CB",ReverseUpEquilibrium:"\u296F",rfisht:"\u297D",rfloor:"\u230B",Rfr:"\u211C",rfr:"\u{1D52F}",rHar:"\u2964",rhard:"\u21C1",rharu:"\u21C0",rharul:"\u296C",Rho:"\u03A1",rho:"\u03C1",rhov:"\u03F1",RightAngleBracket:"\u27E9",RightArrow:"\u2192",Rightarrow:"\u21D2",rightarrow:"\u2192",RightArrowBar:"\u21E5",RightArrowLeftArrow:"\u21C4",rightarrowtail:"\u21A3",RightCeiling:"\u2309",RightDoubleBracket:"\u27E7",RightDownTeeVector:"\u295D",RightDownVector:"\u21C2",RightDownVectorBar:"\u2955",RightFloor:"\u230B",rightharpoondown:"\u21C1",rightharpoonup:"\u21C0",rightleftarrows:"\u21C4",rightleftharpoons:"\u21CC",rightrightarrows:"\u21C9",rightsquigarrow:"\u219D",RightTee:"\u22A2",RightTeeArrow:"\u21A6",RightTeeVector:"\u295B",rightthreetimes:"\u22CC",RightTriangle:"\u22B3",RightTriangleBar:"\u29D0",RightTriangleEqual:"\u22B5",RightUpDownVector:"\u294F",RightUpTeeVector:"\u295C",RightUpVector:"\u21BE",RightUpVectorBar:"\u2954",RightVector:"\u21C0",RightVectorBar:"\u2953",ring:"\u02DA",risingdotseq:"\u2253",rlarr:"\u21C4",rlhar:"\u21CC",rlm:"\u200F",rmoust:"\u23B1",rmoustache:"\u23B1",rnmid:"\u2AEE",roang:"\u27ED",roarr:"\u21FE",robrk:"\u27E7",ropar:"\u2986",Ropf:"\u211D",ropf:"\u{1D563}",roplus:"\u2A2E",rotimes:"\u2A35",RoundImplies:"\u2970",rpar:")",rpargt:"\u2994",rppolint:"\u2A12",rrarr:"\u21C9",Rrightarrow:"\u21DB",rsaquo:"\u203A",Rscr:"\u211B",rscr:"\u{1D4C7}",Rsh:"\u21B1",rsh:"\u21B1",rsqb:"]",rsquo:"\u2019",rsquor:"\u2019",rthree:"\u22CC",rtimes:"\u22CA",rtri:"\u25B9",rtrie:"\u22B5",rtrif:"\u25B8",rtriltri:"\u29CE",RuleDelayed:"\u29F4",ruluhar:"\u2968",rx:"\u211E",Sacute:"\u015A",sacute:"\u015B",sbquo:"\u201A",Sc:"\u2ABC",sc:"\u227B",scap:"\u2AB8",Scaron:"\u0160",scaron:"\u0161",sccue:"\u227D",scE:"\u2AB4",sce:"\u2AB0",Scedil:"\u015E",scedil:"\u015F",Scirc:"\u015C",scirc:"\u015D",scnap:"\u2ABA",scnE:"\u2AB6",scnsim:"\u22E9",scpolint:"\u2A13",scsim:"\u227F",Scy:"\u0421",scy:"\u0441",sdot:"\u22C5",sdotb:"\u22A1",sdote:"\u2A66",searhk:"\u2925",seArr:"\u21D8",searr:"\u2198",searrow:"\u2198",sect:"\xA7",semi:";",seswar:"\u2929",setminus:"\u2216",setmn:"\u2216",sext:"\u2736",Sfr:"\u{1D516}",sfr:"\u{1D530}",sfrown:"\u2322",sharp:"\u266F",SHCHcy:"\u0429",shchcy:"\u0449",SHcy:"\u0428",shcy:"\u0448",ShortDownArrow:"\u2193",ShortLeftArrow:"\u2190",shortmid:"\u2223",shortparallel:"\u2225",ShortRightArrow:"\u2192",ShortUpArrow:"\u2191",shy:"\xAD",Sigma:"\u03A3",sigma:"\u03C3",sigmaf:"\u03C2",sigmav:"\u03C2",sim:"\u223C",simdot:"\u2A6A",sime:"\u2243",simeq:"\u2243",simg:"\u2A9E",simgE:"\u2AA0",siml:"\u2A9D",simlE:"\u2A9F",simne:"\u2246",simplus:"\u2A24",simrarr:"\u2972",slarr:"\u2190",SmallCircle:"\u2218",smallsetminus:"\u2216",smashp:"\u2A33",smeparsl:"\u29E4",smid:"\u2223",smile:"\u2323",smt:"\u2AAA",smte:"\u2AAC",smtes:"\u2AAC\uFE00",SOFTcy:"\u042C",softcy:"\u044C",sol:"/",solb:"\u29C4",solbar:"\u233F",Sopf:"\u{1D54A}",sopf:"\u{1D564}",spades:"\u2660",spadesuit:"\u2660",spar:"\u2225",sqcap:"\u2293",sqcaps:"\u2293\uFE00",sqcup:"\u2294",sqcups:"\u2294\uFE00",Sqrt:"\u221A",sqsub:"\u228F",sqsube:"\u2291",sqsubset:"\u228F",sqsubseteq:"\u2291",sqsup:"\u2290",sqsupe:"\u2292",sqsupset:"\u2290",sqsupseteq:"\u2292",squ:"\u25A1",Square:"\u25A1",square:"\u25A1",SquareIntersection:"\u2293",SquareSubset:"\u228F",SquareSubsetEqual:"\u2291",SquareSuperset:"\u2290",SquareSupersetEqual:"\u2292",SquareUnion:"\u2294",squarf:"\u25AA",squf:"\u25AA",srarr:"\u2192",Sscr:"\u{1D4AE}",sscr:"\u{1D4C8}",ssetmn:"\u2216",ssmile:"\u2323",sstarf:"\u22C6",Star:"\u22C6",star:"\u2606",starf:"\u2605",straightepsilon:"\u03F5",straightphi:"\u03D5",strns:"\xAF",Sub:"\u22D0",sub:"\u2282",subdot:"\u2ABD",subE:"\u2AC5",sube:"\u2286",subedot:"\u2AC3",submult:"\u2AC1",subnE:"\u2ACB",subne:"\u228A",subplus:"\u2ABF",subrarr:"\u2979",Subset:"\u22D0",subset:"\u2282",subseteq:"\u2286",subseteqq:"\u2AC5",SubsetEqual:"\u2286",subsetneq:"\u228A",subsetneqq:"\u2ACB",subsim:"\u2AC7",subsub:"\u2AD5",subsup:"\u2AD3",succ:"\u227B",succapprox:"\u2AB8",succcurlyeq:"\u227D",Succeeds:"\u227B",SucceedsEqual:"\u2AB0",SucceedsSlantEqual:"\u227D",SucceedsTilde:"\u227F",succeq:"\u2AB0",succnapprox:"\u2ABA",succneqq:"\u2AB6",succnsim:"\u22E9",succsim:"\u227F",SuchThat:"\u220B",Sum:"\u2211",sum:"\u2211",sung:"\u266A",Sup:"\u22D1",sup:"\u2283",sup1:"\xB9",sup2:"\xB2",sup3:"\xB3",supdot:"\u2ABE",supdsub:"\u2AD8",supE:"\u2AC6",supe:"\u2287",supedot:"\u2AC4",Superset:"\u2283",SupersetEqual:"\u2287",suphsol:"\u27C9",suphsub:"\u2AD7",suplarr:"\u297B",supmult:"\u2AC2",supnE:"\u2ACC",supne:"\u228B",supplus:"\u2AC0",Supset:"\u22D1",supset:"\u2283",supseteq:"\u2287",supseteqq:"\u2AC6",supsetneq:"\u228B",supsetneqq:"\u2ACC",supsim:"\u2AC8",supsub:"\u2AD4",supsup:"\u2AD6",swarhk:"\u2926",swArr:"\u21D9",swarr:"\u2199",swarrow:"\u2199",swnwar:"\u292A",szlig:"\xDF",Tab:" ",target:"\u2316",Tau:"\u03A4",tau:"\u03C4",tbrk:"\u23B4",Tcaron:"\u0164",tcaron:"\u0165",Tcedil:"\u0162",tcedil:"\u0163",Tcy:"\u0422",tcy:"\u0442",tdot:"\u20DB",telrec:"\u2315",Tfr:"\u{1D517}",tfr:"\u{1D531}",there4:"\u2234",Therefore:"\u2234",therefore:"\u2234",Theta:"\u0398",theta:"\u03B8",thetasym:"\u03D1",thetav:"\u03D1",thickapprox:"\u2248",thicksim:"\u223C",ThickSpace:"\u205F\u200A",thinsp:"\u2009",ThinSpace:"\u2009",thkap:"\u2248",thksim:"\u223C",THORN:"\xDE",thorn:"\xFE",Tilde:"\u223C",tilde:"\u02DC",TildeEqual:"\u2243",TildeFullEqual:"\u2245",TildeTilde:"\u2248",times:"\xD7",timesb:"\u22A0",timesbar:"\u2A31",timesd:"\u2A30",tint:"\u222D",toea:"\u2928",top:"\u22A4",topbot:"\u2336",topcir:"\u2AF1",Topf:"\u{1D54B}",topf:"\u{1D565}",topfork:"\u2ADA",tosa:"\u2929",tprime:"\u2034",TRADE:"\u2122",trade:"\u2122",triangle:"\u25B5",triangledown:"\u25BF",triangleleft:"\u25C3",trianglelefteq:"\u22B4",triangleq:"\u225C",triangleright:"\u25B9",trianglerighteq:"\u22B5",tridot:"\u25EC",trie:"\u225C",triminus:"\u2A3A",TripleDot:"\u20DB",triplus:"\u2A39",trisb:"\u29CD",tritime:"\u2A3B",trpezium:"\u23E2",Tscr:"\u{1D4AF}",tscr:"\u{1D4C9}",TScy:"\u0426",tscy:"\u0446",TSHcy:"\u040B",tshcy:"\u045B",Tstrok:"\u0166",tstrok:"\u0167",twixt:"\u226C",twoheadleftarrow:"\u219E",twoheadrightarrow:"\u21A0",Uacute:"\xDA",uacute:"\xFA",Uarr:"\u219F",uArr:"\u21D1",uarr:"\u2191",Uarrocir:"\u2949",Ubrcy:"\u040E",ubrcy:"\u045E",Ubreve:"\u016C",ubreve:"\u016D",Ucirc:"\xDB",ucirc:"\xFB",Ucy:"\u0423",ucy:"\u0443",udarr:"\u21C5",Udblac:"\u0170",udblac:"\u0171",udhar:"\u296E",ufisht:"\u297E",Ufr:"\u{1D518}",ufr:"\u{1D532}",Ugrave:"\xD9",ugrave:"\xF9",uHar:"\u2963",uharl:"\u21BF",uharr:"\u21BE",uhblk:"\u2580",ulcorn:"\u231C",ulcorner:"\u231C",ulcrop:"\u230F",ultri:"\u25F8",Umacr:"\u016A",umacr:"\u016B",uml:"\xA8",UnderBar:"_",UnderBrace:"\u23DF",UnderBracket:"\u23B5",UnderParenthesis:"\u23DD",Union:"\u22C3",UnionPlus:"\u228E",Uogon:"\u0172",uogon:"\u0173",Uopf:"\u{1D54C}",uopf:"\u{1D566}",UpArrow:"\u2191",Uparrow:"\u21D1",uparrow:"\u2191",UpArrowBar:"\u2912",UpArrowDownArrow:"\u21C5",UpDownArrow:"\u2195",Updownarrow:"\u21D5",updownarrow:"\u2195",UpEquilibrium:"\u296E",upharpoonleft:"\u21BF",upharpoonright:"\u21BE",uplus:"\u228E",UpperLeftArrow:"\u2196",UpperRightArrow:"\u2197",Upsi:"\u03D2",upsi:"\u03C5",upsih:"\u03D2",Upsilon:"\u03A5",upsilon:"\u03C5",UpTee:"\u22A5",UpTeeArrow:"\u21A5",upuparrows:"\u21C8",urcorn:"\u231D",urcorner:"\u231D",urcrop:"\u230E",Uring:"\u016E",uring:"\u016F",urtri:"\u25F9",Uscr:"\u{1D4B0}",uscr:"\u{1D4CA}",utdot:"\u22F0",Utilde:"\u0168",utilde:"\u0169",utri:"\u25B5",utrif:"\u25B4",uuarr:"\u21C8",Uuml:"\xDC",uuml:"\xFC",uwangle:"\u29A7",vangrt:"\u299C",varepsilon:"\u03F5",varkappa:"\u03F0",varnothing:"\u2205",varphi:"\u03D5",varpi:"\u03D6",varpropto:"\u221D",vArr:"\u21D5",varr:"\u2195",varrho:"\u03F1",varsigma:"\u03C2",varsubsetneq:"\u228A\uFE00",varsubsetneqq:"\u2ACB\uFE00",varsupsetneq:"\u228B\uFE00",varsupsetneqq:"\u2ACC\uFE00",vartheta:"\u03D1",vartriangleleft:"\u22B2",vartriangleright:"\u22B3",Vbar:"\u2AEB",vBar:"\u2AE8",vBarv:"\u2AE9",Vcy:"\u0412",vcy:"\u0432",VDash:"\u22AB",Vdash:"\u22A9",vDash:"\u22A8",vdash:"\u22A2",Vdashl:"\u2AE6",Vee:"\u22C1",vee:"\u2228",veebar:"\u22BB",veeeq:"\u225A",vellip:"\u22EE",Verbar:"\u2016",verbar:"|",Vert:"\u2016",vert:"|",VerticalBar:"\u2223",VerticalLine:"|",VerticalSeparator:"\u2758",VerticalTilde:"\u2240",VeryThinSpace:"\u200A",Vfr:"\u{1D519}",vfr:"\u{1D533}",vltri:"\u22B2",vnsub:"\u2282\u20D2",vnsup:"\u2283\u20D2",Vopf:"\u{1D54D}",vopf:"\u{1D567}",vprop:"\u221D",vrtri:"\u22B3",Vscr:"\u{1D4B1}",vscr:"\u{1D4CB}",vsubnE:"\u2ACB\uFE00",vsubne:"\u228A\uFE00",vsupnE:"\u2ACC\uFE00",vsupne:"\u228B\uFE00",Vvdash:"\u22AA",vzigzag:"\u299A",Wcirc:"\u0174",wcirc:"\u0175",wedbar:"\u2A5F",Wedge:"\u22C0",wedge:"\u2227",wedgeq:"\u2259",weierp:"\u2118",Wfr:"\u{1D51A}",wfr:"\u{1D534}",Wopf:"\u{1D54E}",wopf:"\u{1D568}",wp:"\u2118",wr:"\u2240",wreath:"\u2240",Wscr:"\u{1D4B2}",wscr:"\u{1D4CC}",xcap:"\u22C2",xcirc:"\u25EF",xcup:"\u22C3",xdtri:"\u25BD",Xfr:"\u{1D51B}",xfr:"\u{1D535}",xhArr:"\u27FA",xharr:"\u27F7",Xi:"\u039E",xi:"\u03BE",xlArr:"\u27F8",xlarr:"\u27F5",xmap:"\u27FC",xnis:"\u22FB",xodot:"\u2A00",Xopf:"\u{1D54F}",xopf:"\u{1D569}",xoplus:"\u2A01",xotime:"\u2A02",xrArr:"\u27F9",xrarr:"\u27F6",Xscr:"\u{1D4B3}",xscr:"\u{1D4CD}",xsqcup:"\u2A06",xuplus:"\u2A04",xutri:"\u25B3",xvee:"\u22C1",xwedge:"\u22C0",Yacute:"\xDD",yacute:"\xFD",YAcy:"\u042F",yacy:"\u044F",Ycirc:"\u0176",ycirc:"\u0177",Ycy:"\u042B",ycy:"\u044B",yen:"\xA5",Yfr:"\u{1D51C}",yfr:"\u{1D536}",YIcy:"\u0407",yicy:"\u0457",Yopf:"\u{1D550}",yopf:"\u{1D56A}",Yscr:"\u{1D4B4}",yscr:"\u{1D4CE}",YUcy:"\u042E",yucy:"\u044E",Yuml:"\u0178",yuml:"\xFF",Zacute:"\u0179",zacute:"\u017A",Zcaron:"\u017D",zcaron:"\u017E",Zcy:"\u0417",zcy:"\u0437",Zdot:"\u017B",zdot:"\u017C",zeetrf:"\u2128",ZeroWidthSpace:"\u200B",Zeta:"\u0396",zeta:"\u03B6",Zfr:"\u2128",zfr:"\u{1D537}",ZHcy:"\u0416",zhcy:"\u0436",zigrarr:"\u21DD",Zopf:"\u2124",zopf:"\u{1D56B}",Zscr:"\u{1D4B5}",zscr:"\u{1D4CF}",zwj:"\u200D",zwnj:"\u200C"});Nr.entityMap=Nr.HTML_ENTITIES});var Li=tt(En=>{"use strict";var Yt=kt(),R=bs(),Oi=yr(),zc=Yt.isHTMLEscapableRawTextElement,Hc=Yt.isHTMLMimeType,Wc=Yt.isHTMLRawTextElement,Br=Yt.hasOwn,Ci=Yt.NAMESPACE,Xc=Oi.ParseError,Gc=Oi.DOMException,Ht=0,pt=1,Wt=2,Sr=3,Xt=4,Gt=5,Or=6,kn=7;function Bi(){}Bi.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),Kc(e,e=Object.create(null)),Yc(t,e,r,n,this.errorHandler),n.endDocument()}};var Ns=/&#?\w+;?/g;function Yc(t,e,r,n,s){var a=Hc(n.mimeType);t.indexOf(R.UNICODE_REPLACEMENT_CHARACTER)>=0&&s.warning("Unicode replacement character detected, source encoding issues?");function i(F){if(F>65535){F-=65536;var A=55296+(F>>10),j=56320+(F&1023);return String.fromCharCode(A,j)}else return String.fromCharCode(F)}function o(F){var A=F[F.length-1]===";"?F:F+";";if(!a&&A!==F)return s.error("EntityRef: expecting ;"),F;var j=R.Reference.exec(A);if(!j||j[0].length!==A.length)return s.error("entity not matching Reference production: "+F),F;var se=A.slice(1,-1);return Br(r,se)?r[se]:se.charAt(0)==="#"?i(parseInt(se.substring(1).replace("x","0x"))):(s.error("entity not found:"+F),F)}function l(F){if(F>g){var A=t.substring(g,F).replace(Ns,o);f&&p(g),n.characters(A,0,F-g),g=F}}var u=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function p(F,A){for(;F>=c&&(A=d.exec(t));)u=c,c=A.index+A[0].length,f.lineNumber++;f.columnNumber=F-u+1}for(var h=[{currentNSMap:e}],m=[],g=0;;){try{var w=t.indexOf("<",g);if(w<0){if(!a&&m.length>0)return s.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(g).match(/^\s*$/)){var b=n.doc,v=b.createTextNode(t.substring(g));if(b.documentElement)return s.error("Extra content at the end of the document");b.appendChild(v),n.currentElement=v}return}if(w>g){var k=t.substring(g,w);!a&&m.length===0&&(k=k.replace(new RegExp(R.S_OPT.source,"g"),""),k&&s.error("Unexpected content outside root element: '"+k+"'")),l(w)}switch(t.charAt(w+1)){case"/":var S=t.indexOf(">",w+2),E=t.substring(w+2,S>0?S:void 0);if(!E)return s.fatalError("end tag name missing");var y=R.reg("^",R.QName_group,R.S_OPT,"$"),N=S>0&&y.exec(E);if(!N){var q=S>0&&R.reg("^",R.QName_group).exec(E);if(a&&q)s.warning('end tag name contains invalid trailing characters: "'+E+'"'),N=q;else if(q&&new RegExp(y.source,y.flags+"m").test(E))s.error('end tag name is followed by a line break and trailing content: "'+E+'"'),N=q;else return s.fatalError('end tag name contains invalid characters: "'+E+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var Z=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(Z!==N[1]){var z=N[1].toLowerCase();if(!a||Z.toLowerCase()!==z)return s.fatalError('Opening and ending tag mismatch: "'+Z+'" != "'+E+'"')}var T=h.pop();m.pop();var V=T.localNSMap;if(n.endElement(T.uri,T.localName,Z),V)for(var Y in V)Br(V,Y)&&n.endPrefixMapping(Y);S++;break;case"?":f&&p(w),S=ed(t,w,n,s);break;case"!":f&&p(w),S=Mi(t,w,n,s,a);break;default:f&&p(w);var $=new Ri,X=h[h.length-1].currentNSMap,S=Zc(t,w,$,X,o,s,a),ne=$.length;if($.closed||(a&&Yt.isHTMLVoidElement($.tagName)?$.closed=!0:m.push($.tagName)),f&&ne){for(var Se=Ni(f,{}),_t=0;_t<ne;_t++){var ar=$[_t];p(ar.offset),ar.locator=Ni(f,{})}n.locator=Se,Si($,n,X)&&h.push($),n.locator=f}else Si($,n,X)&&h.push($);a&&!$.closed?S=Jc(t,S,$.tagName,o,n):S++}}catch(F){if(F instanceof Xc)throw F;if(F instanceof Gc)return s.fatalError("Error constructing the DOM: "+F.name+": "+F.message,F);s.error("element parse error: "+F),S=-1}S>g?g=S:l(Math.max(w,g)+1)}}function Ni(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function Zc(t,e,r,n,s,a,i){function o(p,h,m){if(Br(r.attributeNames,p))return a.fatalError("Attribute "+p+" redefined");if(!i&&h.indexOf("<")>=0)return a.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(p,h.replace(/[\t\n\r]/g," ").replace(Ns,s),m)}for(var l,u,c=++e,d=Ht;;){var f=t.charAt(c);if(d===Ht&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===pt)l=t.slice(e,c),d=Sr;else if(d===Wt)d=Sr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===Sr||d===pt)if(d===pt&&(a.warning('attribute value must after "="'),l=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)u=t.slice(e,c),o(l,u,e-1),d=Gt;else throw new Error("attribute value no end '"+f+"' match");else if(d==Xt)u=t.slice(e,c),o(l,u,e),a.warning('attribute "'+l+'" missed start quot('+f+")!!"),e=c+1,d=Gt;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Or:case kn:d=kn,r.closed=!0;case Xt:case pt:break;case Wt:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return a.error("unexpected end of input"),d==Ht&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Ht:r.setTagName(t.slice(e,c));case Gt:case Or:case kn:break;case Xt:case pt:u=t.slice(e,c),u.slice(-1)==="/"&&(r.closed=!0,u=u.slice(0,-1));case Wt:d===Wt&&(u=l),d==Xt?(a.warning('attribute "'+u+'" missed quot(")!'),o(l,u,e)):(i||a.warning('attribute "'+u+'" missed value!! "'+u+'" instead!!'),o(u,u,e));break;case Sr:if(!i)return a.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Ht:r.setTagName(t.slice(e,c)),d=Or;break;case pt:l=t.slice(e,c),d=Wt;break;case Xt:var u=t.slice(e,c);a.warning('attribute "'+u+'" missed quot(")!!'),o(l,u,e);case Gt:d=Or;break}else switch(d){case Wt:i||a.warning('attribute "'+l+'" missed value!! "'+l+'" instead2!!'),o(l,l,e),e=c,d=pt;break;case Gt:a.warning('attribute space is required"'+l+'"!!');case Or:d=pt,e=c;break;case Sr:d=Xt,e=c;break;case kn:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Si(t,e,r){for(var n=t.tagName,s=null,d=t.length;d--;){var a=t[d],i=a.qName,o=a.value,f=i.indexOf(":");if(f>0)var l=a.prefix=i.slice(0,f),u=i.slice(f+1),c=l==="xmlns"&&u;else u=i,l=null,c=i==="xmlns"&&"";a.localName=u,c!==!1&&(s==null&&(s=Object.create(null),r=Object.create(r)),r[c]=s[c]=o,a.uri=Ci.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)a=t[d],a.prefix&&(a.prefix==="xml"&&(a.uri=Ci.XML),a.prefix!=="xmlns"&&(a.uri=r[a.prefix]));var f=n.indexOf(":");f>0?(l=t.prefix=n.slice(0,f),u=t.localName=n.slice(f+1)):(l=null,u=t.localName=n);var p=t.uri=r[l||""];if(e.startElement(p,u,n,t),t.closed){if(e.endElement(p,u,n),s)for(l in s)Br(s,l)&&e.endPrefixMapping(l)}else return t.currentNSMap=r,t.localNSMap=s,!0}function Jc(t,e,r,n,s){var a=zc(r);if(a||Wc(r)){var i=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");i.lastIndex=e;var o=i.exec(t),l=o?o.index:-1;if(l<0)return e+1;var u=t.substring(e+1,l);return a&&(u=u.replace(Ns,n)),s.characters(u,0,u.length),l}return e+1}function Kc(t,e){for(var r in t)Br(t,r)&&(e[r]=t[r])}function Ii(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function s(c){c=c||1,r+=c}function a(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
3
+ `&&d!==" "&&d!=="\r")return c;c++,s()}return-1}function i(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function l(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function u(c){var d=R.reg("^",c),f=d.exec(i());return f?(s(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:u,getSource:function(){return t},skip:s,skipBlanks:a,substringFromIndex:i,substringStartsWith:o,substringStartsWithCaseInsensitive:l}}function Qc(t,e){function r(o,l){var u=R.PI.exec(o.substringFromIndex());return u?u[1].toLowerCase()==="xml"?l.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(u[0].length),u[0]):l.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var s=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var a=n.substring(s,t.getIndex());return t.skip(1),a}var i=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?i=t.getMatch(R.elementdecl):t.char(3)==="N"&&(i=t.getMatch(R.EntityDecl));break;case"A":i=t.getMatch(R.AttlistDecl);break;case"N":i=t.getMatch(R.NotationDecl);break;case"-":i=t.getMatch(R.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")i=r(t,e);else if(t.char()==="%")i=t.getMatch(R.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!i)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function Mi(t,e,r,n,s){var a=Ii(t,e);switch(s?a.char(2).toUpperCase():a.char(2)){case"-":var i=a.getMatch(R.Comment);return i?(r.comment(i,R.COMMENT_START.length,i.length-R.COMMENT_START.length-R.COMMENT_END.length),a.getIndex()):n.fatalError("comment is not well-formed at position "+a.getIndex());case"[":var o=a.getMatch(R.CDSect);return o?!s&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,R.CDATA_START.length,o.length-R.CDATA_START.length-R.CDATA_END.length),r.endCDATA(),a.getIndex()):n.fatalError("Invalid CDATA starting at position "+e);case"D":{if(r.doc&&r.doc.documentElement)return n.fatalError("Doctype not allowed inside or after documentElement at position "+a.getIndex());if(s?!a.substringStartsWithCaseInsensitive(R.DOCTYPE_DECL_START):!a.substringStartsWith(R.DOCTYPE_DECL_START))return n.fatalError("Expected "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());if(a.skip(R.DOCTYPE_DECL_START.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.DOCTYPE_DECL_START+" at position "+a.getIndex());var l={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(l.name=a.getMatch(R.Name),!l.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+a.getIndex());if(s&&l.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+a.getIndex()),a.skipBlanks(),a.substringStartsWith(R.PUBLIC)||a.substringStartsWith(R.SYSTEM)){var u=R.ExternalID_match.exec(a.substringFromIndex());if(!u)return n.fatalError("doctype external id is not well-formed at position "+a.getIndex());u.groups.SystemLiteralOnly!==void 0?l.systemId=u.groups.SystemLiteralOnly:(l.systemId=u.groups.SystemLiteral,l.publicId=u.groups.PubidLiteral),a.skip(u[0].length)}else if(s&&a.substringStartsWithCaseInsensitive(R.SYSTEM)){if(a.skip(R.SYSTEM.length),a.skipBlanks()<1)return n.fatalError("Expected whitespace after "+R.SYSTEM+" at position "+a.getIndex());if(l.systemId=a.getMatch(R.ABOUT_LEGACY_COMPAT_SystemLiteral),!l.systemId)return n.fatalError("Expected "+R.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+R.SYSTEM+" at position "+a.getIndex())}return s&&l.systemId&&!R.ABOUT_LEGACY_COMPAT_SystemLiteral.test(l.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+a.getIndex()),s||(a.skipBlanks(),l.internalSubset=Qc(a,n)),a.skipBlanks(),a.char()!==">"?n.fatalError("doctype not terminated with > at position "+a.getIndex()):(a.skip(1),r.startDTD(l.name,l.publicId,l.systemId,l.internalSubset),r.endDTD(),a.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function ed(t,e,r,n){var s=t.substring(e).match(R.PI);if(!s)return n.fatalError("Invalid processing instruction starting at position "+e);if(s[1].toLowerCase()==="xml"){if(e>0)return n.fatalError("processing instruction at position "+e+" is an xml declaration which is only at the start of the document");if(!R.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(s[1],s[2]),e+s[0].length}function Ri(){this.attributeNames=Object.create(null)}Ri.prototype={setTagName:function(t){if(!R.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!R.QName_exact.test(t))throw new Error("invalid attribute:"+t);this.attributeNames[t]=this.length,this[this.length++]={qName:t,value:e,offset:r}},length:0,getLocalName:function(t){return this[t].localName},getLocator:function(t){return this[t].locator},getQName:function(t){return this[t].qName},getURI:function(t){return this[t].uri},getValue:function(t){return this[t].value}};En.XMLReader=Bi;En.parseUtils=Ii;En.parseDoctypeCommentOrCData=Mi});var Vi=tt(Jt=>{"use strict";var Dt=kt(),td=Cs(),rd=yr(),$i=Ti(),nd=Li(),sd=td.DOMImplementation,ad=Dt.hasDefaultHTMLNamespace,id=Dt.isHTMLMimeType,od=Dt.isValidMimeType,Pi=Dt.MIME_TYPE,Ss=Dt.NAMESPACE,Fi=rd.ParseError,ld=nd.XMLReader;function qi(t){return t.replace(/\r[\n\u0085]/g,`
4
4
  `).replace(/[\r\u0085\u2028\u2029]/g,`
5
5
  `)}function ji(t){if(t=t||{},t.locator===void 0&&(t.locator=!0),this.assign=t.assign||Dt.assign,this.domHandler=t.domHandler||An,this.onError=t.onError||t.errorHandler,t.errorHandler&&typeof t.errorHandler!="function")throw new TypeError("errorHandler object is no longer supported, switch to onError!");t.errorHandler&&t.errorHandler("warning","The `errorHandler` option has been deprecated, use `onError` instead!",this),this.normalizeLineEndings=t.normalizeLineEndings||qi,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}ji.prototype.parseFromString=function(t,e){if(!od(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),n=$i.XML_ENTITIES,s=r[""]||null;ad(e)?(n=$i.HTML_ENTITIES,s=Ss.HTML):e===Pi.XML_SVG_IMAGE&&(s=Ss.SVG),r[""]=s,r.xml=r.xml||Ss.XML;var a=new this.domHandler({mimeType:e,defaultNamespace:s,onError:this.onError}),i=this.locator?{}:void 0;this.locator&&a.setDocumentLocator(i);var o=new ld;o.errorHandler=a,o.domBuilder=a;var l=!Dt.isHTMLMimeType(e);return l&&typeof t!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(t)),r,n),a.doc.documentElement||o.errorHandler.fatalError("missing root element"),a.doc};function An(t){var e=t||{};this.mimeType=e.mimeType||Pi.XML_APPLICATION,this.defaultNamespace=e.defaultNamespace||null,this.cdata=!1,this.currentElement=void 0,this.doc=void 0,this.locator=void 0,this.onError=e.onError}function Zt(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}An.prototype={startDocument:function(){var t=new sd;this.doc=id(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,r,n){var s=this.doc,a=s.createElementNS(t,r||e),i=n.length;Dn(this,a),this.currentElement=a,this.locator&&Zt(this.locator,a);for(var o=0;o<i;o++){var t=n.getURI(o),l=n.getValue(o),r=n.getQName(o),u=s.createAttributeNS(t,r);this.locator&&Zt(n.getLocator(o),u),u.value=u.nodeValue=l,a.setAttributeNode(u)}},endElement:function(t,e,r){this.currentElement=this.currentElement.parentNode},startPrefixMapping:function(t,e){},endPrefixMapping:function(t){},processingInstruction:function(t,e){var r=this.doc.createProcessingInstruction(t,e);this.locator&&Zt(this.locator,r),Dn(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=Ui.apply(this,arguments),t){if(this.cdata)var n=this.doc.createCDATASection(t);else var n=this.doc.createTextNode(t);this.currentElement?this.currentElement.appendChild(n):/^\s*$/.test(t)&&this.doc.appendChild(n),this.locator&&Zt(this.locator,n)}},skippedEntity:function(t){},endDocument:function(){this.doc.normalize()},setDocumentLocator:function(t){t&&(t.lineNumber=0),this.locator=t},comment:function(t,e,r){t=Ui.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&Zt(this.locator,n),Dn(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r,n){var s=this.doc.implementation;if(s&&s.createDocumentType){var a=s.createDocumentType(t,e,r,n);this.locator&&Zt(this.locator,a),Dn(this,a),this.doc.doctype=a}},reportError:function(t,e){if(typeof this.onError=="function")try{this.onError(t,e,this)}catch(r){throw new Fi("Reporting "+t+' "'+e+'" caused '+r,this.locator)}else console.error("[xmldom "+t+"] "+e,ud(this.locator))},warning:function(t){this.reportError("warning",t)},error:function(t){this.reportError("error",t)},fatalError:function(t,e){throw this.reportError("fatalError",t),new Fi(t,this.locator,e)}};function ud(t){if(t)return`
6
- @#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function Ui(t,e,r){return typeof t=="string"?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){An.prototype[t]=function(){return null}});function Dn(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function cd(t){if(t==="error")throw"onErrorStopParsing"}function dd(){throw"onWarningStopParsing"}Jt.__DOMHandler=An;Jt.DOMParser=ji;Jt.normalizeLineEndings=qi;Jt.onErrorStopParsing=cd;Jt.onWarningStopParsing=dd});var Os=tt(q=>{"use strict";var Kt=kt();q.assign=Kt.assign;q.hasDefaultHTMLNamespace=Kt.hasDefaultHTMLNamespace;q.isHTMLMimeType=Kt.isHTMLMimeType;q.isValidMimeType=Kt.isValidMimeType;q.MIME_TYPE=Kt.MIME_TYPE;q.NAMESPACE=Kt.NAMESPACE;var xn=wr();q.DOMException=xn.DOMException;q.DOMExceptionName=xn.DOMExceptionName;q.ExceptionCode=xn.ExceptionCode;q.ParseError=xn.ParseError;var le=Cs();q.Attr=le.Attr;q.CDATASection=le.CDATASection;q.CharacterData=le.CharacterData;q.Comment=le.Comment;q.Document=le.Document;q.DocumentFragment=le.DocumentFragment;q.DocumentType=le.DocumentType;q.DOMImplementation=le.DOMImplementation;q.Element=le.Element;q.Entity=le.Entity;q.EntityReference=le.EntityReference;q.LiveNodeList=le.LiveNodeList;q.NamedNodeMap=le.NamedNodeMap;q.Node=le.Node;q.NodeList=le.NodeList;q.Notation=le.Notation;q.ProcessingInstruction=le.ProcessingInstruction;q.Text=le.Text;q.XMLSerializer=le.XMLSerializer;var Tn=Vi();q.DOMParser=Tn.DOMParser;q.normalizeLineEndings=Tn.normalizeLineEndings;q.onErrorStopParsing=Tn.onErrorStopParsing;q.onWarningStopParsing=Tn.onWarningStopParsing});import{Bag as be,createDOMPurify as Af}from"@gramlot/gramlot";var We={};na(We,{defineCollection:()=>zn});Wr(We,Sf);import*as Sf from"@gramlot/gramlot/components";import{defineCollection as zo}from"@gramlot/gramlot/components";function zn(t){if(t.name!=="tree")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,s)=>{n.href=e[s].href});for(let[n,s]of Object.entries(t.assets??{}))s.href=r[n].href;return zo({...t,css:e,assets:r})}function aa(t,e){return t.parameters=Ho(t.constructor.gramlotComponent,e),Object.fromEntries(Object.entries(e).filter(([r])=>!Object.hasOwn(t.parameters,r)))}function Ho(t,e){return Object.fromEntries(Object.entries(t.parameters).map(([r,n])=>[r,Object.hasOwn(e,r)?e[r]:n.default]))}function Xr(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=`:host{box-sizing:border-box;display:block;min-width:0;font:inherit;color:var(--gramlot-ink,CanvasText)}
6
+ @#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function Ui(t,e,r){return typeof t=="string"?t.substr(e,r):t.length>=e+r||e?new java.lang.String(t,e,r)+"":t}"endDTD,startEntity,endEntity,attributeDecl,elementDecl,externalEntityDecl,internalEntityDecl,resolveEntity,getExternalSubset,notationDecl,unparsedEntityDecl".replace(/\w+/g,function(t){An.prototype[t]=function(){return null}});function Dn(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function cd(t){if(t==="error")throw"onErrorStopParsing"}function dd(){throw"onWarningStopParsing"}Jt.__DOMHandler=An;Jt.DOMParser=ji;Jt.normalizeLineEndings=qi;Jt.onErrorStopParsing=cd;Jt.onWarningStopParsing=dd});var Os=tt(P=>{"use strict";var Kt=kt();P.assign=Kt.assign;P.hasDefaultHTMLNamespace=Kt.hasDefaultHTMLNamespace;P.isHTMLMimeType=Kt.isHTMLMimeType;P.isValidMimeType=Kt.isValidMimeType;P.MIME_TYPE=Kt.MIME_TYPE;P.NAMESPACE=Kt.NAMESPACE;var xn=yr();P.DOMException=xn.DOMException;P.DOMExceptionName=xn.DOMExceptionName;P.ExceptionCode=xn.ExceptionCode;P.ParseError=xn.ParseError;var le=Cs();P.Attr=le.Attr;P.CDATASection=le.CDATASection;P.CharacterData=le.CharacterData;P.Comment=le.Comment;P.Document=le.Document;P.DocumentFragment=le.DocumentFragment;P.DocumentType=le.DocumentType;P.DOMImplementation=le.DOMImplementation;P.Element=le.Element;P.Entity=le.Entity;P.EntityReference=le.EntityReference;P.LiveNodeList=le.LiveNodeList;P.NamedNodeMap=le.NamedNodeMap;P.Node=le.Node;P.NodeList=le.NodeList;P.Notation=le.Notation;P.ProcessingInstruction=le.ProcessingInstruction;P.Text=le.Text;P.XMLSerializer=le.XMLSerializer;var Tn=Vi();P.DOMParser=Tn.DOMParser;P.normalizeLineEndings=Tn.normalizeLineEndings;P.onErrorStopParsing=Tn.onErrorStopParsing;P.onWarningStopParsing=Tn.onWarningStopParsing});import{Bag as be,createDOMPurify as Af}from"@gramlot/gramlot";var $e={};na($e,{defineCollection:()=>zn});ir($e,If);import*as If from"@gramlot/gramlot/components";import{defineCollection as zo}from"@gramlot/gramlot/components";function zn(t){if(t.name!=="tree")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,s)=>{n.href=e[s].href});for(let[n,s]of Object.entries(t.assets??{}))s.href=r[n].href;return zo({...t,css:e,assets:r})}function aa(t,e){return t.parameters=Ho(t.constructor.gramlotComponent,e),Object.fromEntries(Object.entries(e).filter(([r])=>!Object.hasOwn(t.parameters,r)))}function Ho(t,e){return Object.fromEntries(Object.entries(t.parameters).map(([r,n])=>[r,Object.hasOwn(e,r)?e[r]:n.default]))}function Xr(t){return class extends t{constructor(){super();let e=this.attachShadow({mode:"open"}),r=this.ownerDocument.createElement("style");r.textContent=`:host{box-sizing:border-box;display:block;min-width:0;font:inherit;color:var(--gramlot-ink,CanvasText)}
7
7
  *,*::before,*::after{box-sizing:border-box}.control-box{min-width:0}slot{display:contents}
8
8
  ::slotted(*){min-width:0;max-width:100%}`,this.controlBox=this.ownerDocument.createElement("div"),this.controlBox.className="control-box",this.control=this.controlBox,this.control.id="control",this.control.append(this.ownerDocument.createElement("slot")),e.append(r,this.controlBox)}projectAttributes(e){return aa(this,e)}}}Xr.parameters={};function rt(t){if(typeof t!="string"||!["^","="].includes(t[0])||t.startsWith("=="))return null;let e=t.indexOf(":");if(e<0)return null;let r=t[e+1]==="=";return{pointer:t.slice(0,e),expression:r,body:t.slice(e+(r?2:1))}}var ia=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function Hn(t,e){let r="",n=!1;for(let s=0;s<t.length;){if(t[s]!=="{"&&t[s]!=="}"){r+=t[s++];continue}let a=t.slice(s).match(ia);if(!a)throw new SyntaxError("Invalid pointer template placeholder");let i=a[1]??"",o=i.startsWith("?"),l=e(o?i.slice(1):i);l==null||l===""&&!o?n=!0:r+=String(l),s+=a[0].length}return n?null:r}function Wn(t){let e=[],r=new Set,n="",s=!0;for(let a=0;a<t.length;){let i=a,o=t[a];if(o==='"'||o==="'"||o==="`"){for(a++;a<t.length;){if(t[a]==="\\"){a+=2;continue}if(t[a++]===o)break}n+=t.slice(i,a),s=!1;continue}if(t.startsWith("//",a)){a=t.indexOf(`
9
9
  `,a),a<0&&(a=t.length),n+=t.slice(i,a);continue}if(t.startsWith("/*",a)){let c=t.indexOf("*/",a+2);a=c<0?t.length:c+2,n+=t.slice(i,a);continue}if(o==="/"&&s){let c=!1;for(a++;a<t.length;){let d=t[a++];if(d==="\\"){a++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[a]??"")&&a<t.length;)a++;n+=t.slice(i,a),s=!1;continue}let l=o==="{"?t.slice(a).match(ia):null;if(l){let c=l[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),a+=l[0].length,s=!1;continue}let u=t.slice(a).match(/^[A-Za-z_$][\w$]*/);if(u){r.add(u[0]),n+=u[0],a+=u[0].length,s=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(u[0]);continue}n+=o,a++,/\s/.test(o)||(s=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function oa(t,e,r=()=>null){let n=new Map,s=[],a=i=>{if(n.has(i))return n.get(i);if(!t.has(i))throw new Error(`Referenced Source attribute '${i}' does not exist`);if(s.includes(i))throw new Error(`Cyclic attribute dependency: ${[...s,i].join(" -> ")}`);s.push(i);try{let o=t.get(i),l=typeof i=="string"?rt(o):null,u=e.get(i);if(l){let c=d=>d?a(d):e.get(i);if(l.expression){let d=Wn(l.body);u=r(i,o,d,d.slots.map(c))}else u=Hn(l.body,c),e.get(i)==null&&(u=null)}return n.set(i,u),u}finally{s.pop()}};return new Map([...t.keys()].map(i=>[i,a(i)]))}function Xn(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,s=[],a=i=>{let o=rt(i);if(!o)return;let l=[];o.expression?l.push(...Wn(o.body).slots):Hn(o.body,u=>(l.push(u),""));for(let u of l.filter(Boolean)){if(!r.has(u))throw new Error(`Referenced Source attribute '${u}' does not exist`);if(s.includes(u))throw new Error(`Cyclic attribute dependency: ${[...s,u].join(" -> ")}`);n.has(u)||(s.push(u),a(r.get(u)),s.pop(),n.add(u))}};return a(e),n}/*!
@@ -12,16 +12,16 @@ var Uo=Object.create;var Vn=Object.defineProperty;var Po=Object.getOwnPropertyDe
12
12
  * https://github.com/MikeMcl/decimal.js
13
13
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
14
14
  * MIT Licence
15
- */var Bt=9e15,it=1e9,Gn="0123456789abcdef",Zr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Jr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Yn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Bt,maxE:Bt,crypto:!1},da,Xe,I=!0,Qr="[DecimalError] ",at=Qr+"Invalid argument: ",fa=Qr+"Precision limit exceeded",pa=Qr+"crypto unavailable",ha="[object Decimal]",me=Math.floor,ie=Math.pow,Wo=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xo=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Go=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ma=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,S=7,Yo=9007199254740991,Zo=Zr.length-1,Zn=Jr.length-1,_={toStringTag:ha};_.absoluteValue=_.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),T(t)};_.ceil=function(){return T(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(t,e){var r,n=this,s=n.constructor;if(t=new s(t),e=new s(e),!t.s||!e.s)return new s(NaN);if(t.gt(e))throw Error(at+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new s(n)};_.comparedTo=_.cmp=function(t){var e,r,n,s,a=this,i=a.d,o=(t=new a.constructor(t)).d,l=a.s,u=t.s;if(!i||!o)return!l||!u?NaN:l!==u?l:i===o?0:!i^l<0?1:-1;if(!i[0]||!o[0])return i[0]?l:o[0]?-u:0;if(l!==u)return l;if(a.e!==t.e)return a.e>t.e^l<0?1:-1;for(n=i.length,s=o.length,e=0,r=n<s?n:s;e<r;++e)if(i[e]!==o[e])return i[e]>o[e]^l<0?1:-1;return n===s?0:n>s^l<0?1:-1};_.cosine=_.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+S,n.rounding=1,r=Jo(n,ya(n,r)),n.precision=t,n.rounding=e,T(Xe==2||Xe==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var t,e,r,n,s,a,i,o,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(I=!1,a=c.s*ie(c.s*c,1/3),!a||Math.abs(a)==1/0?(r=fe(c.d),t=c.e,(a=(t-r.length+1)%3)&&(r+=a==1||a==-2?"0":"00"),a=ie(r,1/3),t=me((t+1)/3)-(t%3==(t<0?-1:2)),a==1/0?r="5e"+t:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(a.toString()),i=(t=d.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=G(u.plus(c).times(o),u.plus(l),i+2,1),fe(o.d).slice(0,i)===(r=fe(n.d)).slice(0,i))if(r=r.slice(i-3,i+1),r=="9999"||!s&&r=="4999"){if(!s&&(T(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}i+=4,s=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(T(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return I=!0,T(n,t,d.rounding,e)};_.decimalPlaces=_.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-me(this.e/S))*S,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(t){return G(this,new this.constructor(t))};_.dividedToIntegerBy=_.divToInt=function(t){var e=this,r=e.constructor;return T(G(e,new r(t),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(t){return this.cmp(t)===0};_.floor=function(){return T(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(t){return this.cmp(t)>0};_.greaterThanOrEqualTo=_.gte=function(t){var e=this.cmp(t);return e==1||e===0};_.hyperbolicCosine=_.cosh=function(){var t,e,r,n,s,a=this,i=a.constructor,o=new i(1);if(!a.isFinite())return new i(a.s?1/0:NaN);if(a.isZero())return o;r=i.precision,n=i.rounding,i.precision=r+Math.max(a.e,a.sd())+4,i.rounding=1,s=a.d.length,s<32?(t=Math.ceil(s/3),e=(1/tn(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),a=It(i,1,a.times(e),new i(1),!0);for(var l,u=t,c=new i(8);u--;)l=a.times(a),a=o.minus(l.times(c.minus(l.times(c))));return T(a,i.precision=r,i.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var t,e,r,n,s=this,a=s.constructor;if(!s.isFinite()||s.isZero())return new a(s);if(e=a.precision,r=a.rounding,a.precision=e+Math.max(s.e,s.sd())+4,a.rounding=1,n=s.d.length,n<3)s=It(a,2,s,s,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,s=s.times(1/tn(5,t)),s=It(a,2,s,s,!0);for(var i,o=new a(5),l=new a(16),u=new a(20);t--;)i=s.times(s),s=s.times(o.plus(i.times(l.times(i).plus(u))))}return a.precision=e,a.rounding=r,T(s,e,r,!0)};_.hyperbolicTangent=_.tanh=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,G(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};_.inverseCosine=_.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,s=e.rounding;return r!==-1?r===0?t.isNeg()?$e(e,n,s):new e(0):new e(NaN):t.isZero()?$e(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,t.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};_.inverseHyperbolicSine=_.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!0,n.precision=t,n.rounding=e,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var t,e,r,n,s=this,a=s.constructor;return s.isFinite()?s.e>=0?new a(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(t=a.precision,e=a.rounding,n=s.sd(),Math.max(n,t)<2*-s.e-1?T(new a(s),t,e,!0):(a.precision=r=n-s.e,s=G(s.plus(1),new a(1).minus(s),r+t,1),a.precision=t+4,a.rounding=1,s=s.ln(),a.precision=t,a.rounding=e,s.times(.5))):new a(NaN)};_.inverseSine=_.asin=function(){var t,e,r,n,s=this,a=s.constructor;return s.isZero()?new a(s):(e=s.abs().cmp(1),r=a.precision,n=a.rounding,e!==-1?e===0?(t=$e(a,r+4,n).times(.5),t.s=s.s,t):new a(NaN):(a.precision=r+6,a.rounding=1,s=s.div(new a(1).minus(s.times(s)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,s.times(2)))};_.inverseTangent=_.atan=function(){var t,e,r,n,s,a,i,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=Zn)return i=$e(c,d+4,f).times(.25),i.s=u.s,i}else{if(!u.s)return new c(NaN);if(d+4<=Zn)return i=$e(c,d+4,f).times(.5),i.s=u.s,i}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/S+2|0),t=r;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,e=Math.ceil(o/S),n=1,l=u.times(u),i=new c(u),s=u;t!==-1;)if(s=s.times(l),a=i.minus(s.div(n+=2)),s=s.times(l),i=a.plus(s.div(n+=2)),i.d[e]!==void 0)for(t=e;i.d[t]===a.d[t]&&t--;);return r&&(i=i.times(2<<r-1)),I=!0,T(i,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&me(this.e/S)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(t){return this.cmp(t)<0};_.lessThanOrEqualTo=_.lte=function(t){return this.cmp(t)<1};_.logarithm=_.log=function(t){var e,r,n,s,a,i,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),r=t.d,t.s<0||!r||!r[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)a=!0;else{for(s=r[0];s%10===0;)s/=10;a=s!==1}if(I=!1,o=d+p,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),ir(l.d,s=d,f))do if(o+=10,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),!a){+fe(l.d).slice(s+1,s+15)+1==1e14&&(l=T(l,d+1,0));break}while(ir(l.d,s+=10,f));return I=!0,T(l,d,f)};_.minus=_.sub=function(t){var e,r,n,s,a,i,o,l,u,c,d,f,p=this,h=p.constructor;if(t=new h(t),!p.d||!t.d)return!p.s||!t.s?t=new h(NaN):p.d?t.s=-t.s:t=new h(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,f=t.d,o=h.precision,l=h.rounding,!u[0]||!f[0]){if(f[0])t.s=-t.s;else if(u[0])t=new h(p);else return new h(l===3?-0:0);return I?T(t,o,l):t}if(r=me(t.e/S),c=me(p.e/S),u=u.slice(),a=c-r,a){for(d=a<0,d?(e=u,a=-a,i=f.length):(e=f,r=c,i=u.length),n=Math.max(Math.ceil(o/S),i)+2,a>n&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for(n=u.length,i=f.length,d=n<i,d&&(i=n),n=0;n<i;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}a=0}for(d&&(e=u,u=f,f=e,t.s=-t.s),i=u.length,n=f.length-i;n>0;--n)u[i++]=0;for(n=f.length;n>a;){if(u[--n]<f[n]){for(s=n;s&&u[--s]===0;)u[s]=Oe-1;--u[s],u[n]+=Oe}u[n]-=f[n]}for(;u[--i]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=en(u,r),I?T(t,o,l):t):new h(l===3?-0:0)};_.modulo=_.mod=function(t){var e,r=this,n=r.constructor;return t=new n(t),!r.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||r.d&&!r.d[0]?T(new n(r),n.precision,n.rounding):(I=!1,n.modulo==9?(e=G(r,t.abs(),0,3,1),e.s*=t.s):e=G(r,t,0,n.modulo,1),e=e.times(t),I=!0,r.minus(e))};_.naturalExponential=_.exp=function(){return Jn(this)};_.naturalLogarithm=_.ln=function(){return st(this)};_.negated=_.neg=function(){var t=new this.constructor(this);return t.s=-t.s,T(t)};_.plus=_.add=function(t){var e,r,n,s,a,i,o,l,u,c,d=this,f=d.constructor;if(t=new f(t),!d.d||!t.d)return!d.s||!t.s?t=new f(NaN):d.d||(t=new f(t.d||d.s===t.s?d:NaN)),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(u=d.d,c=t.d,o=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(t=new f(d)),I?T(t,o,l):t;if(a=me(d.e/S),n=me(t.e/S),u=u.slice(),s=a-n,s){for(s<0?(r=u,s=-s,i=c.length):(r=c,n=a,i=u.length),a=Math.ceil(o/S),i=a>i?a+1:i+1,s>i&&(s=i,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(i=u.length,s=c.length,i-s<0&&(s=i,r=c,c=u,u=r),e=0;s;)e=(u[--s]=u[s]+c[s]+e)/Oe|0,u[s]%=Oe;for(e&&(u.unshift(e),++n),i=u.length;u[--i]==0;)u.pop();return t.d=u,t.e=en(u,n),I?T(t,o,l):t};_.precision=_.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(at+t);return r.d?(e=_a(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};_.round=function(){var t=this,e=t.constructor;return T(new e(t),t.e+1,e.rounding)};_.sine=_.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+S,n.rounding=1,r=Qo(n,ya(n,r)),n.precision=t,n.rounding=e,T(Xe>2?r.neg():r,t,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var t,e,r,n,s,a,i=this,o=i.d,l=i.e,u=i.s,c=i.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?i:1/0);for(I=!1,u=Math.sqrt(+i),u==0||u==1/0?(e=fe(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=me((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(a=n,n=a.plus(G(i,a,r+2,1)).times(.5),fe(a.d).slice(0,r)===(e=fe(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!s&&e=="4999"){if(!s&&(T(a,l+1,0),a.times(a).eq(i))){n=a;break}r+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(T(n,l+1,1),t=!n.times(n).eq(i));break}return I=!0,T(n,l,c.rounding,t)};_.tangent=_.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,r=r.sin(),r.s=1,r=G(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,T(Xe==2||Xe==4?r.neg():r,t,e,!0)):new n(NaN)};_.times=_.mul=function(t){var e,r,n,s,a,i,o,l,u,c=this,d=c.constructor,f=c.d,p=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!t.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?t.s/0:t.s*0);for(r=me(c.e/S)+me(t.e/S),l=f.length,u=p.length,l<u&&(a=f,f=p,p=a,i=l,l=u,u=i),a=[],i=l+u,n=i;n--;)a.push(0);for(n=u;--n>=0;){for(e=0,s=l+n;s>n;)o=a[s]+p[n]*f[s-n-1]+e,a[s--]=o%Oe|0,e=o/Oe|0;a[s]=(a[s]+e)%Oe|0}for(;!a[--i];)a.pop();return e?++r:a.shift(),t.d=a,t.e=en(a,r),I?T(t,d.precision,d.rounding):t};_.toBinary=function(t,e){return Kn(this,2,t,e)};_.toDecimalPlaces=_.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ve(t,0,it),e===void 0?e=n.rounding:ve(e,0,8),T(r,t+r.e+1,e))};_.toExponential=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Fe(n,!0):(ve(t,0,it),e===void 0?e=s.rounding:ve(e,0,8),n=T(new s(n),t+1,e),r=Fe(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFixed=function(t,e){var r,n,s=this,a=s.constructor;return t===void 0?r=Fe(s):(ve(t,0,it),e===void 0?e=a.rounding:ve(e,0,8),n=T(new a(s),t+s.e+1,e),r=Fe(n,!1,t+n.e+1)),s.isNeg()&&!s.isZero()?"-"+r:r};_.toFraction=function(t){var e,r,n,s,a,i,o,l,u,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(u=r=new m(1),n=l=new m(0),e=new m(n),a=e.e=_a(h)-p.e-1,i=a%S,e.d[0]=ie(10,i<0?S+i:i),t==null)t=a>0?e:u;else{if(o=new m(t),!o.isInt()||o.lt(u))throw Error(at+o);t=o.gt(e)?a>0?e:u:o}for(I=!1,o=new m(fe(h)),c=m.precision,m.precision=a=h.length*S*2;d=G(o,e,0,1,1),s=r.plus(d.times(n)),s.cmp(t)!=1;)r=n,n=s,s=u,u=l.plus(d.times(s)),l=s,s=e,e=o.minus(d.times(s)),o=s;return s=G(t.minus(r),n,0,1,1),l=l.plus(s.times(u)),r=r.plus(s.times(n)),l.s=u.s=p.s,f=G(u,n,a,1).minus(p).abs().cmp(G(l,r,a,1).minus(p).abs())<1?[u,n]:[l,r],m.precision=c,I=!0,f};_.toHexadecimal=_.toHex=function(t,e){return Kn(this,16,t,e)};_.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),t==null){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),e===void 0?e=n.rounding:ve(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(I=!1,r=G(r,t,0,e,1).times(t),I=!0,T(r)):(t.s=r.s,r=t),r};_.toNumber=function(){return+this};_.toOctal=function(t,e){return Kn(this,8,t,e)};_.toPower=_.pow=function(t){var e,r,n,s,a,i,o=this,l=o.constructor,u=+(t=new l(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new l(ie(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,a=l.rounding,t.eq(1))return T(o,n,a);if(e=me(t.e/S),e>=t.d.length-1&&(r=u<0?-u:u)<=Yo)return s=ga(l,o,r,n),t.s<0?new l(1).div(s):T(s,n,a);if(i=o.s,i<0){if(e<t.d.length-1)return new l(NaN);if((t.d[e]&1)==0&&(i=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=i,o}return r=ie(+o,u),e=r==0||!isFinite(r)?me(u*(Math.log("0."+fe(o.d))/Math.LN10+o.e+1)):new l(r+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?i/0:0):(I=!1,l.rounding=o.s=1,r=Math.min(12,(e+"").length),s=Jn(t.times(st(o,n+r)),n),s.d&&(s=T(s,n+5,1),ir(s.d,n,a)&&(e=n+10,s=T(Jn(t.times(st(o,e+r)),e),e+5,1),+fe(s.d).slice(n+1,n+15)+1==1e14&&(s=T(s,n+1,0)))),s.s=i,I=!0,l.rounding=a,T(s,n,a))};_.toPrecision=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Fe(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(ve(t,1,it),e===void 0?e=s.rounding:ve(e,0,8),n=T(new s(n),t,e),r=Fe(n,t<=n.e||n.e<=s.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ve(t,1,it),e===void 0?e=n.rounding:ve(e,0,8)),T(new n(r),t,e)};_.toString=function(){var t=this,e=t.constructor,r=Fe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return T(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var t=this,e=t.constructor,r=Fe(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function fe(t){var e,r,n,s=t.length-1,a="",i=t[0];if(s>0){for(a+=i,e=1;e<s;e++)n=t[e]+"",r=S-n.length,r&&(a+=nt(r)),a+=n;i=t[e],n=i+"",r=S-n.length,r&&(a+=nt(r))}else if(i===0)return"0";for(;i%10===0;)i/=10;return a+i}function ve(t,e,r){if(t!==~~t||t<e||t>r)throw Error(at+t)}function ir(t,e,r,n){var s,a,i,o;for(a=t[0];a>=10;a/=10)--e;return--e<0?(e+=S,s=0):(s=Math.ceil((e+1)/S),e%=S),a=ie(10,S-e),o=t[s]%a|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),i=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):i=(r<4&&o+1==a||r>3&&o+1==a/2)&&(t[s+1]/a/100|0)==ie(10,e-2)-1||(o==a/2||o==0)&&(t[s+1]/a/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),i=(n||r<4)&&o==9999||!n&&r>3&&o==4999):i=((n||r<4)&&o+1==a||!n&&r>3&&o+1==a/2)&&(t[s+1]/a/1e3|0)==ie(10,e-3)-1,i}function Gr(t,e,r){for(var n,s=[0],a,i=0,o=t.length;i<o;){for(a=s.length;a--;)s[a]*=e;for(s[0]+=Gn.indexOf(t.charAt(i++)),n=0;n<s.length;n++)s[n]>r-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/r|0,s[n]%=r)}return s.reverse()}function Jo(t,e){var r,n,s;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),s=(1/tn(4,r)).toString()):(r=16,s="2.3283064365386962890625e-10"),t.precision+=r,e=It(t,1,e.times(s),new t(1));for(var a=r;a--;){var i=e.times(e);e=i.times(i).minus(i).times(8).plus(1)}return t.precision-=r,e}var G=(function(){function t(n,s,a){var i,o=0,l=n.length;for(n=n.slice();l--;)i=n[l]*s+o,n[l]=i%a|0,o=i/a|0;return o&&n.unshift(o),n}function e(n,s,a,i){var o,l;if(a!=i)l=a>i?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=s[o]){l=n[o]>s[o]?1:-1;break}return l}function r(n,s,a,i){for(var o=0;a--;)n[a]-=o,o=n[a]<s[a]?1:0,n[a]=o*i+n[a]-s[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,s,a,i,o,l){var u,c,d,f,p,h,m,g,w,b,v,k,D,y,C,V,Y,U,B,X,J=n.constructor,$=n.s==s.s?1:-1,W=n.d,N=s.d;if(!W||!W[0]||!N||!N[0])return new J(!n.s||!s.s||(W?N&&W[0]==N[0]:!N)?NaN:W&&W[0]==0||!N?$*0:$/0);for(l?(p=1,c=n.e-s.e):(l=Oe,p=S,c=me(n.e/p)-me(s.e/p)),B=N.length,Y=W.length,w=new J($),b=w.d=[],d=0;N[d]==(W[d]||0);d++);if(N[d]>(W[d]||0)&&c--,a==null?(y=a=J.precision,i=J.rounding):o?y=a+(n.e-s.e)+1:y=a,y<0)b.push(1),h=!0;else{if(y=y/p+2|0,d=0,B==1){for(f=0,N=N[0],y++;(d<Y||f)&&y--;d++)C=f*l+(W[d]||0),b[d]=C/N|0,f=C%N|0;h=f||d<Y}else{for(f=l/(N[0]+1)|0,f>1&&(N=t(N,f,l),W=t(W,f,l),B=N.length,Y=W.length),V=B,v=W.slice(0,B),k=v.length;k<B;)v[k++]=0;X=N.slice(),X.unshift(0),U=N[0],N[1]>=l/2&&++U;do f=0,u=e(N,v,B,k),u<0?(D=v[0],B!=k&&(D=D*l+(v[1]||0)),f=D/U|0,f>1?(f>=l&&(f=l-1),m=t(N,f,l),g=m.length,k=v.length,u=e(m,v,g,k),u==1&&(f--,r(m,B<g?X:N,g,l))):(f==0&&(u=f=1),m=N.slice()),g=m.length,g<k&&m.unshift(0),r(v,m,k,l),u==-1&&(k=v.length,u=e(N,v,B,k),u<1&&(f++,r(v,B<k?X:N,k,l))),k=v.length):u===0&&(f++,v=[0]),b[d++]=f,u&&v[0]?v[k++]=W[V]||0:(v=[W[V]],k=1);while((V++<Y||v[0]!==void 0)&&y--);h=v[0]!==void 0}b[0]||b.shift()}if(p==1)w.e=c,da=h;else{for(d=1,f=b[0];f>=10;f/=10)d++;w.e=d+c*p-1,T(w,o?a+w.e+1:a,i,h)}return w}})();function T(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(s=1,o=d[0];o>=10;o/=10)s++;if(a=e-s,a<0)a+=S,i=e,c=d[f=0],l=c/ie(10,s-i-1)%10|0;else if(f=Math.ceil((a+1)/S),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=l=0,s=1,a%=S,i=a-S+1}else break e;else{for(c=o=d[f],s=1;o>=10;o/=10)s++;a%=S,i=a-S+s,l=i<0?0:c/ie(10,s-i-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(i<0?c:c%ie(10,s-i-1)),u=r<4?(l||n)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(a>0?i>0?c/ie(10,s-i):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=t.e+1,d[0]=ie(10,(S-e%S)%S),t.e=-e||0):d[0]=t.e=0,t;if(a==0?(d.length=f,o=1,f--):(d.length=f+1,o=ie(10,S-a),d[f]=i>0?(c/ie(10,s-i)%ie(10,i)|0)*o:0),u)for(;;)if(f==0){for(a=1,i=d[0];i>=10;i/=10)a++;for(i=d[0]+=o,o=1;i>=10;i/=10)o++;a!=o&&(t.e++,d[0]==Oe&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Oe)break;d[f--]=0,o=1}for(a=d.length;d[--a]===0;)d.pop()}return I&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function Fe(t,e,r){if(!t.isFinite())return wa(t);var n,s=t.e,a=fe(t.d),i=a.length;return e?(r&&(n=r-i)>0?a=a.charAt(0)+"."+a.slice(1)+nt(n):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(t.e<0?"e":"e+")+t.e):s<0?(a="0."+nt(-s-1)+a,r&&(n=r-i)>0&&(a+=nt(n))):s>=i?(a+=nt(s+1-i),r&&(n=r-s-1)>0&&(a=a+"."+nt(n))):((n=s+1)<i&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-i)>0&&(s+1===i&&(a+="."),a+=nt(n))),a}function en(t,e){var r=t[0];for(e*=S;r>=10;r/=10)e++;return e}function Kr(t,e,r){if(e>Zo)throw I=!0,r&&(t.precision=r),Error(fa);return T(new t(Zr),e,1,!0)}function $e(t,e,r){if(e>Zn)throw Error(fa);return T(new t(Jr),e,r,!0)}function _a(t){var e=t.length-1,r=e*S+1;if(e=t[e],e){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function nt(t){for(var e="";t--;)e+="0";return e}function ga(t,e,r,n){var s,a=new t(1),i=Math.ceil(n/S+4);for(I=!1;;){if(r%2&&(a=a.times(e),ua(a.d,i)&&(s=!0)),r=me(r/2),r===0){r=a.d.length-1,s&&a.d[r]===0&&++a.d[r];break}e=e.times(e),ua(e.d,i)}return I=!0,a}function la(t){return t.d[t.d.length-1]&1}function ba(t,e,r){for(var n,s,a=new t(e[0]),i=0;++i<e.length;){if(s=new t(e[i]),!s.s){a=s;break}n=a.cmp(s),(n===r||n===0&&a.s===r)&&(a=s)}return a}function Jn(t,e){var r,n,s,a,i,o,l,u=0,c=0,d=0,f=t.constructor,p=f.rounding,h=f.precision;if(!t.d||!t.d[0]||t.e>17)return new f(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(I=!1,l=h):l=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(ie(2,d))/Math.LN10*2+5|0,l+=n,r=a=i=new f(1),f.precision=l;;){if(a=T(a.times(t),l,1),r=r.times(++c),o=i.plus(G(a,r,l,1)),fe(o.d).slice(0,l)===fe(i.d).slice(0,l)){for(s=d;s--;)i=T(i.times(i),l,1);if(e==null)if(u<3&&ir(i.d,l-n,p,u))f.precision=l+=10,r=a=o=new f(1),c=0,u++;else return T(i,f.precision=h,p,I=!0);else return f.precision=h,i}i=o}}function st(t,e){var r,n,s,a,i,o,l,u,c,d,f,p=1,h=10,m=t,g=m.d,w=m.constructor,b=w.rounding,v=w.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new w(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(I=!1,c=v):c=e,w.precision=c+=h,r=fe(g),n=r.charAt(0),Math.abs(a=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=fe(m.d),n=r.charAt(0),p++;a=m.e,n>1?(m=new w("0."+r),a++):m=new w(n+"."+r.slice(1))}else return u=Kr(w,c+2,v).times(a+""),m=st(new w(n+"."+r.slice(1)),c-h).plus(u),w.precision=v,e==null?T(m,v,b,I=!0):m;for(d=m,l=i=m=G(m.minus(1),m.plus(1),c,1),f=T(m.times(m),c,1),s=3;;){if(i=T(i.times(f),c,1),u=l.plus(G(i,new w(s),c,1)),fe(u.d).slice(0,c)===fe(l.d).slice(0,c))if(l=l.times(2),a!==0&&(l=l.plus(Kr(w,c+2,v).times(a+""))),l=G(l,new w(p),c,1),e==null)if(ir(l.d,c-h,b,o))w.precision=c+=h,u=i=m=G(d.minus(1),d.plus(1),c,1),f=T(m.times(m),c,1),s=o=1;else return T(l,w.precision=v,b,I=!0);else return w.precision=v,l;l=u,s+=2}}function wa(t){return String(t.s*t.s/0)}function Yr(t,e){var r,n,s;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%S,r<0&&(n+=S),n<s){for(n&&t.d.push(+e.slice(0,n)),s-=S;n<s;)t.d.push(+e.slice(n,n+=S));e=e.slice(n),n=S-e.length}else n-=s;for(;n--;)e+="0";t.d.push(+e),I&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function Ko(t,e){var r,n,s,a,i,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),ma.test(e))return Yr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Xo.test(e))r=16,e=e.toLowerCase();else if(Wo.test(e))r=2;else if(Go.test(e))r=8;else throw Error(at+e);for(a=e.search(/p/i),a>0?(l=+e.slice(a+1),e=e.substring(2,a)):e=e.slice(2),a=e.indexOf("."),i=a>=0,n=t.constructor,i&&(e=e.replace(".",""),o=e.length,a=o-a,s=ga(n,new n(r),a,a*2)),u=Gr(e,r,Oe),c=u.length-1,a=c;u[a]===0;--a)u.pop();return a<0?new n(t.s*0):(t.e=en(u,c),t.d=u,I=!1,i&&(t=G(t,s,o*4)),l&&(t=t.times(Math.abs(l)<54?ie(2,l):or.pow(2,l))),I=!0,t)}function Qo(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:It(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/tn(5,r)),e=It(t,2,e,e);for(var s,a=new t(5),i=new t(16),o=new t(20);r--;)s=e.times(e),e=e.times(a.plus(s.times(i.times(s).minus(o))));return e}function It(t,e,r,n,s){var a,i,o,l,u=1,c=t.precision,d=Math.ceil(c/S);for(I=!1,l=r.times(r),o=new t(n);;){if(i=G(o.times(l),new t(e++*e++),c,1),o=s?n.plus(i):n.minus(i),n=G(i.times(l),new t(e++*e++),c,1),i=o.plus(n),i.d[d]!==void 0){for(a=d;i.d[a]===o.d[a]&&a--;);if(a==-1)break}a=o,o=n,n=i,i=a,u++}return I=!0,i.d.length=d+1,i}function tn(t,e){for(var r=t;--e;)r*=t;return r}function ya(t,e){var r,n=e.s<0,s=$e(t,t.precision,1),a=s.times(.5);if(e=e.abs(),e.lte(a))return Xe=n?4:1,e;if(r=e.divToInt(s),r.isZero())Xe=n?3:2;else{if(e=e.minus(r.times(s)),e.lte(a))return Xe=la(r)?n?2:3:n?4:1,e;Xe=la(r)?n?1:4:n?3:2}return e.minus(s).abs()}function Kn(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor,h=r!==void 0;if(h?(ve(r,1,it),n===void 0?n=p.rounding:ve(n,0,8)):(r=p.precision,n=p.rounding),!t.isFinite())c=wa(t);else{for(c=Fe(t),i=c.indexOf("."),h?(s=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):s=e,i>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-i,f.d=Gr(Fe(f),10,s),f.e=f.d.length),d=Gr(c,10,s),a=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(i<0?a--:(t=new p(t),t.d=d,t.e=a,t=G(t,f,r,n,0,s),d=t.d,a=t.e,u=da),i=d[r],o=s/2,u=u||d[r+1]!==void 0,u=n<4?(i!==void 0||u)&&(n===0||n===(t.s<0?3:2)):i>o||i===o&&(n===4||u||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,u)for(;++d[--r]>s-1;)d[r]=0,r||(++a,d.unshift(1));for(l=d.length;!d[l-1];--l);for(i=0,c="";i<l;i++)c+=Gn.charAt(d[i]);if(h){if(l>1)if(e==16||e==8){for(i=e==16?4:3,--l;l%i;l++)c+="0";for(d=Gr(c,s,e),l=d.length;!d[l-1];--l);for(i=1,c="1.";i<l;i++)c+=Gn.charAt(d[i])}else c=c.charAt(0)+"."+c.slice(1);c=c+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)c="0"+c;c="0."+c}else if(++a>l)for(a-=l;a--;)c+="0";else a<l&&(c=c.slice(0,a)+"."+c.slice(a))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function ua(t,e){if(t.length>e)return t.length=e,!0}function el(t){return new this(t).abs()}function tl(t){return new this(t).acos()}function rl(t){return new this(t).acosh()}function nl(t,e){return new this(t).plus(e)}function sl(t){return new this(t).asin()}function al(t){return new this(t).asinh()}function il(t){return new this(t).atan()}function ol(t){return new this(t).atanh()}function ll(t,e){t=new this(t),e=new this(e);var r,n=this.precision,s=this.rounding,a=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=$e(this,a,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?$e(this,n,s):new this(0),r.s=t.s):!t.d||e.isZero()?(r=$e(this,a,1).times(.5),r.s=t.s):e.s<0?(this.precision=a,this.rounding=1,r=this.atan(G(t,e,a,1)),e=$e(this,a,1),this.precision=n,this.rounding=s,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(G(t,e,a,1)),r}function ul(t){return new this(t).cbrt()}function cl(t){return T(t=new this(t),t.e+1,2)}function dl(t,e,r){return new this(t).clamp(e,r)}function fl(t){if(!t||typeof t!="object")throw Error(Qr+"Object expected");var e,r,n,s=t.defaults===!0,a=["precision",1,it,"rounding",0,8,"toExpNeg",-Bt,0,"toExpPos",0,Bt,"maxE",0,Bt,"minE",-Bt,0,"modulo",0,9];for(e=0;e<a.length;e+=3)if(r=a[e],s&&(this[r]=Yn[r]),(n=t[r])!==void 0)if(me(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(at+r+": "+n);if(r="crypto",s&&(this[r]=Yn[r]),(n=t[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(pa);else this[r]=!1;else throw Error(at+r+": "+n);return this}function pl(t){return new this(t).cos()}function hl(t){return new this(t).cosh()}function va(t){var e,r,n;function s(a){var i,o,l,u=this;if(!(u instanceof s))return new s(a);if(u.constructor=s,ca(a)){u.s=a.s,I?!a.d||a.e>s.maxE?(u.e=NaN,u.d=null):a.e<s.minE?(u.e=0,u.d=[0]):(u.e=a.e,u.d=a.d.slice()):(u.e=a.e,u.d=a.d?a.d.slice():a.d);return}if(l=typeof a,l==="number"){if(a===0){u.s=1/a<0?-1:1,u.e=0,u.d=[0];return}if(a<0?(a=-a,u.s=-1):u.s=1,a===~~a&&a<1e7){for(i=0,o=a;o>=10;o/=10)i++;I?i>s.maxE?(u.e=NaN,u.d=null):i<s.minE?(u.e=0,u.d=[0]):(u.e=i,u.d=[a]):(u.e=i,u.d=[a]);return}if(a*0!==0){a||(u.s=NaN),u.e=NaN,u.d=null;return}return Yr(u,a.toString())}if(l==="string")return(o=a.charCodeAt(0))===45?(a=a.slice(1),u.s=-1):(o===43&&(a=a.slice(1)),u.s=1),ma.test(a)?Yr(u,a):Ko(u,a);if(l==="bigint")return a<0?(a=-a,u.s=-1):u.s=1,Yr(u,a.toString());throw Error(at+a)}if(s.prototype=_,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=fl,s.clone=va,s.isDecimal=ca,s.abs=el,s.acos=tl,s.acosh=rl,s.add=nl,s.asin=sl,s.asinh=al,s.atan=il,s.atanh=ol,s.atan2=ll,s.cbrt=ul,s.ceil=cl,s.clamp=dl,s.cos=pl,s.cosh=hl,s.div=ml,s.exp=_l,s.floor=gl,s.hypot=bl,s.ln=wl,s.log=yl,s.log10=kl,s.log2=vl,s.max=El,s.min=Dl,s.mod=Al,s.mul=xl,s.pow=Tl,s.random=Cl,s.round=Nl,s.sign=Sl,s.sin=Ol,s.sinh=Bl,s.sqrt=Il,s.sub=Ml,s.sum=Rl,s.tan=Ll,s.tanh=$l,s.trunc=Fl,t===void 0&&(t={}),t&&t.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return s.config(t),s}function ml(t,e){return new this(t).div(e)}function _l(t){return new this(t).exp()}function gl(t){return T(t=new this(t),t.e+1,3)}function bl(){var t,e,r=new this(0);for(I=!1,t=0;t<arguments.length;)if(e=new this(arguments[t++]),e.d)r.d&&(r=r.plus(e.times(e)));else{if(e.s)return I=!0,new this(1/0);r=e}return I=!0,r.sqrt()}function ca(t){return t instanceof or||t&&t.toStringTag===ha||!1}function wl(t){return new this(t).ln()}function yl(t,e){return new this(t).log(e)}function vl(t){return new this(t).log(2)}function kl(t){return new this(t).log(10)}function El(){return ba(this,arguments,-1)}function Dl(){return ba(this,arguments,1)}function Al(t,e){return new this(t).mod(e)}function xl(t,e){return new this(t).mul(e)}function Tl(t,e){return new this(t).pow(e)}function Cl(t){var e,r,n,s,a=0,i=new this(1),o=[];if(t===void 0?t=this.precision:ve(t,1,it),n=Math.ceil(t/S),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)s=e[a],s>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:o[a++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);a<n;)s=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((e[a+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,a):(o.push(s%1e7),a+=4);a=n/4}else throw Error(pa);else for(;a<n;)o[a++]=Math.random()*1e7|0;for(n=o[--a],t%=S,n&&t&&(s=ie(10,S-t),o[a]=(n/s|0)*s);o[a]===0;a--)o.pop();if(a<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=S)o.shift();for(n=1,s=o[0];s>=10;s/=10)n++;n<S&&(r-=S-n)}return i.e=r,i.d=o,i}function Nl(t){return T(t=new this(t),t.e+1,this.rounding)}function Sl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ol(t){return new this(t).sin()}function Bl(t){return new this(t).sinh()}function Il(t){return new this(t).sqrt()}function Ml(t,e){return new this(t).sub(e)}function Rl(){var t=0,e=arguments,r=new this(e[t]);for(I=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return I=!0,T(r,this.precision,this.rounding)}function Ll(t){return new this(t).tan()}function $l(t){return new this(t).tanh()}function Fl(t){return T(t=new this(t),t.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var or=_.constructor=va(Yn);Zr=new or(Zr);Jr=new or(Jr);var ka=or;var Ul=20,Pl=1,gt=1e6,Ea=1e6,ql=-7,jl=21,Vl=!1,lr="[big.js] ",bt=lr+"Invalid ",rn=bt+"decimal places",zl=bt+"rounding mode",Da=lr+"Division by zero",z={},Ue=void 0,Hl=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Aa(){function t(e){var r=this;if(!(r instanceof t))return e===Ue?Aa():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(bt+"value");e=e===0&&1/e<0?"-0":String(e)}Wl(r,e)}r.constructor=t}return t.prototype=z,t.DP=Ul,t.RM=Pl,t.NE=ql,t.PE=jl,t.strict=Vl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function Wl(t,e){var r,n,s;if(!Hl.test(e))throw Error(bt+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),s=e.length,n=0;n<s&&e.charAt(n)=="0";)++n;if(n==s)t.c=[t.e=0];else{for(;s>0&&e.charAt(--s)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=s;)t.c[r++]=+e.charAt(n++)}return t}function wt(t,e,r,n){var s=t.c;if(r===Ue&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(zl);if(e<1)n=r===3&&(n||!!s[0])||e===0&&(r===1&&s[0]>=5||r===2&&(s[0]>5||s[0]===5&&(n||s[1]!==Ue))),s.length=1,n?(t.e=t.e-e+1,s[0]=1):s[0]=t.e=0;else if(e<s.length){if(n=r===1&&s[e]>=5||r===2&&(s[e]>5||s[e]===5&&(n||s[e+1]!==Ue||s[e-1]&1))||r===3&&(n||!!s[0]),s.length=e,n){for(;++s[--e]>9;)if(s[e]=0,e===0){++t.e,s.unshift(1);break}}for(e=s.length;!s[--e];)s.pop()}return t}function yt(t,e,r){var n=t.e,s=t.c.join(""),a=s.length;if(e)s=s.charAt(0)+(a>1?"."+s.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)s="0"+s;s="0."+s}else if(n>0)if(++n>a)for(n-=a;n--;)s+="0";else n<a&&(s=s.slice(0,n)+"."+s.slice(n));else a>1&&(s=s.charAt(0)+"."+s.slice(1));return t.s<0&&r?"-"+s:s}z.abs=function(){var t=new this.constructor(this);return t.s=1,t};z.cmp=function(t){var e,r=this,n=r.c,s=(t=new r.constructor(t)).c,a=r.s,i=t.s,o=r.e,l=t.e;if(!n[0]||!s[0])return n[0]?a:s[0]?-i:0;if(a!=i)return a;if(e=a<0,o!=l)return o>l^e?1:-1;for(i=(o=n.length)<(l=s.length)?o:l,a=-1;++a<i;)if(n[a]!=s[a])return n[a]>s[a]^e?1:-1;return o==l?0:o>l^e?1:-1};z.div=function(t){var e=this,r=e.constructor,n=e.c,s=(t=new r(t)).c,a=e.s==t.s?1:-1,i=r.DP;if(i!==~~i||i<0||i>gt)throw Error(rn);if(!s[0])throw Error(Da);if(!n[0])return t.s=a,t.c=[t.e=0],t;var o,l,u,c,d,f=s.slice(),p=o=s.length,h=n.length,m=n.slice(0,o),g=m.length,w=t,b=w.c=[],v=0,k=i+(w.e=e.e-t.e)+1;for(w.s=a,a=k<0?0:k,f.unshift(0);g++<o;)m.push(0);do{for(u=0;u<10;u++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(s[d]!=m[d]){c=s[d]>m[d]?1:-1;break}if(c<0){for(l=g==o?s:f;g;){if(m[--g]<l[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=l[g]}for(;!m[0];)m.shift()}else break}b[v++]=c?u:++u,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Ue)&&a--);return!b[0]&&v!=1&&(b.shift(),w.e--,k--),v>k&&wt(w,k,r.RM,m[0]!==Ue),w};z.eq=function(t){return this.cmp(t)===0};z.gt=function(t){return this.cmp(t)>0};z.gte=function(t){return this.cmp(t)>-1};z.lt=function(t){return this.cmp(t)<0};z.lte=function(t){return this.cmp(t)<1};z.minus=z.sub=function(t){var e,r,n,s,a=this,i=a.constructor,o=a.s,l=(t=new i(t)).s;if(o!=l)return t.s=-l,a.plus(t);var u=a.c.slice(),c=a.e,d=t.c,f=t.e;if(!u[0]||!d[0])return d[0]?t.s=-l:u[0]?t=new i(a):t.s=1,t;if(o=c-f){for((s=o<0)?(o=-o,n=u):(f=c,n=d),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(r=((s=u.length<d.length)?u:d).length,o=l=0;l<r;l++)if(u[l]!=d[l]){s=u[l]<d[l];break}if(s&&(n=u,u=d,d=n,t.s=-t.s),(l=(r=d.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;r>o;){if(u[--r]<d[r]){for(e=r;e&&!u[--e];)u[e]=9;--u[e],u[r]+=10}u[r]-=d[r]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--f;return u[0]||(t.s=1,u=[f=0]),t.c=u,t.e=f,t};z.mod=function(t){var e,r=this,n=r.constructor,s=r.s,a=(t=new n(t)).s;if(!t.c[0])throw Error(Da);return r.s=t.s=1,e=t.cmp(r)==1,r.s=s,t.s=a,e?new n(r):(s=n.DP,a=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=s,n.RM=a,this.minus(r.times(t)))};z.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};z.plus=z.add=function(t){var e,r,n,s=this,a=s.constructor;if(t=new a(t),s.s!=t.s)return t.s=-t.s,s.minus(t);var i=s.e,o=s.c,l=t.e,u=t.c;if(!o[0]||!u[0])return u[0]||(o[0]?t=new a(s):t.s=s.s),t;if(o=o.slice(),e=i-l){for(e>0?(l=i,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+u[e]+r)/10|0;for(r&&(o.unshift(r),++l),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=l,t};z.pow=function(t){var e=this,r=new e.constructor("1"),n=r,s=t<0;if(t!==~~t||t<-Ea||t>Ea)throw Error(bt+"exponent");for(s&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return s?r.div(n):n};z.prec=function(t,e){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");return wt(new this.constructor(this),t,e)};z.round=function(t,e){if(t===Ue)t=0;else if(t!==~~t||t<-gt||t>gt)throw Error(rn);return wt(new this.constructor(this),t+this.e+1,e)};z.sqrt=function(){var t,e,r,n=this,s=n.constructor,a=n.s,i=n.e,o=new s("0.5");if(!n.c[0])return new s(n);if(a<0)throw Error(lr+"No square root");a=Math.sqrt(+yt(n,!0,!0)),a===0||a===1/0?(e=n.c.join(""),e.length+i&1||(e+="0"),a=Math.sqrt(e),i=((i+1)/2|0)-(i<0||i&1),t=new s((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+i)):t=new s(a+""),i=t.e+(s.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,i).join("")!==t.c.slice(0,i).join(""));return wt(t,(s.DP-=4)+t.e+1,s.RM)};z.times=z.mul=function(t){var e,r=this,n=r.constructor,s=r.c,a=(t=new n(t)).c,i=s.length,o=a.length,l=r.e,u=t.e;if(t.s=r.s==t.s?1:-1,!s[0]||!a[0])return t.c=[t.e=0],t;for(t.e=l+u,i<o&&(e=s,s=a,a=e,u=i,i=o,o=u),e=new Array(u=i+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=i+l;u>l;)o=e[u]+a[l]*s[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++t.e:e.shift(),l=e.length;!e[--l];)e.pop();return t.c=e,t};z.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Ue){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return yt(r,!0,!!n)};z.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Ue){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return yt(r,!1,!!n)};z[Symbol.for("nodejs.util.inspect.custom")]=z.toJSON=z.toString=function(){var t=this,e=t.constructor;return yt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};z.toNumber=function(){var t=+yt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(lr+"Imprecise conversion");return t};z.toPrecision=function(t,e){var r=this,n=r.constructor,s=r.c[0];if(t!==Ue){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");for(r=wt(new n(r),t,e);r.c.length<t;)r.c.push(0)}return yt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!s)};z.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(lr+"valueOf disallowed");return yt(t,t.e<=e.NE||t.e>=e.PE,!0)};var Xl=Aa(),xa=Xl;var us={};na(us,{DecodeError:()=>_e,Decoder:()=>Ie,EXT_TIMESTAMP:()=>es,Encoder:()=>Mt,ExtData:()=>Be,ExtensionCodec:()=>ot,decode:()=>Ra,decodeArrayStream:()=>Fa,decodeAsync:()=>$a,decodeMulti:()=>La,decodeMultiStream:()=>Ua,decodeTimestampExtension:()=>as,decodeTimestampToTimeSpec:()=>ss,encode:()=>an,encodeDateToTimeSpec:()=>rs,encodeTimeSpecToTimestamp:()=>ts,encodeTimestampExtension:()=>ns});function Ta(t){let e=t.length,r=0,n=0;for(;n<e;){let s=t.charCodeAt(n++);if((s&4294967168)===0){r++;continue}else if((s&4294965248)===0)r+=2;else{if(s>=55296&&s<=56319&&n<e){let a=t.charCodeAt(n);(a&64512)===56320&&(++n,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?r+=3:r+=4}}return r}function Gl(t,e,r){let n=t.length,s=r,a=0;for(;a<n;){let i=t.charCodeAt(a++);if((i&4294967168)===0){e[s++]=i;continue}else if((i&4294965248)===0)e[s++]=i>>6&31|192;else{if(i>=55296&&i<=56319&&a<n){let o=t.charCodeAt(a);(o&64512)===56320&&(++a,i=((i&1023)<<10)+(o&1023)+65536)}(i&4294901760)===0?(e[s++]=i>>12&15|224,e[s++]=i>>6&63|128):(e[s++]=i>>18&7|240,e[s++]=i>>12&63|128,e[s++]=i>>6&63|128)}e[s++]=i&63|128}}var Yl=new TextEncoder,Zl=50;function Jl(t,e,r){Yl.encodeInto(t,e.subarray(r))}function Ca(t,e,r){t.length>Zl?Jl(t,e,r):Gl(t,e,r)}var Kl=4096;function Qn(t,e,r){let n=e,s=n+r,a=[],i="";for(;n<s;){let o=t[n++];if((o&128)===0)a.push(o);else if((o&224)===192){let l=t[n++]&63;a.push((o&31)<<6|l)}else if((o&240)===224){let l=t[n++]&63,u=t[n++]&63;a.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=t[n++]&63,u=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|l<<12|u<<6|c;d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|d&1023),a.push(d)}else a.push(o);a.length>=Kl&&(i+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(i+=String.fromCharCode(...a)),i}var Ql=new TextDecoder,eu=200;function tu(t,e,r){let n=t.subarray(e,e+r);return Ql.decode(n)}function Na(t,e,r){return r>eu?tu(t,e,r):Qn(t,e,r)}var Be=class{type;data;constructor(e,r){this.type=e,this.data=r}};var _e=class t extends Error{constructor(e){super(e);let r=Object.create(t.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:t.name})}};function Sa(t,e,r){let n=r/4294967296,s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function nn(t,e,r){let n=Math.floor(r/4294967296),s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function sn(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Oa(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var es=-1,ru=4294967296-1,nu=17179869184-1;function ts({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=nu)if(e===0&&t<=ru){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,s=new Uint8Array(8),a=new DataView(s.buffer);return a.setUint32(0,e<<2|r&3),a.setUint32(4,n),s}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),nn(n,4,t),r}}function rs(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,s=Math.floor(n/1e9);return{sec:r+s,nsec:n-s*1e9}}function ns(t){if(t instanceof Date){let e=rs(t);return ts(e)}else return null}function ss(t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let r=e.getUint32(0),n=e.getUint32(4),s=(r&3)*4294967296+n,a=r>>>2;return{sec:s,nsec:a}}case 12:{let r=sn(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new _e(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function as(t){let e=ss(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Ba={type:es,encode:ns,decode:as};var ot=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Ba)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let s=-1-e;this.builtInEncoders[s]=r,this.builtInDecoders[s]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let s=this.builtInEncoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=-1-n;return new Be(i,a)}}}for(let n=0;n<this.encoders.length;n++){let s=this.encoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=n;return new Be(i,a)}}}return e instanceof Be?e:null}decode(e,r,n){let s=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return s?s(e,r,n):new Be(r,e)}};function su(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function ur(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):su(t)?new Uint8Array(t):Uint8Array.from(t)}var au=100,iu=2048,Mt=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??au,this.initialBufferSize=e?.initialBufferSize??iu,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){let r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){let r=new ArrayBuffer(e),n=new Uint8Array(r),s=new DataView(r);n.set(this.bytes),this.view=s,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=Ta(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Ca(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);let n=ur(e);this.writeU8a(n)}encodeArray(e,r){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let s of e)this.doEncode(s,r+1)}countWithoutUndefined(e,r){let n=0;for(let s of r)e[s]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let s=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(s<16)this.writeU8(128+s);else if(s<65536)this.writeU8(222),this.writeU16(s);else if(s<4294967296)this.writeU8(223),this.writeU32(s);else throw new Error(`Too large map object: ${s}`);for(let a of n){let i=e[a];this.ignoreUndefined&&i===void 0||(this.encodeString(a),this.doEncode(i,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),s=n.length;if(s>=4294967296)throw new Error(`Too large extension object: ${s}`);this.writeU8(201),this.writeU32(s),this.writeI8(e.type),this.writeU8a(n);return}let r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Sa(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),nn(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function an(t,e){return new Mt(e).encodeSharedRef(t)}function on(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var ou=16,lu=16,ln=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=ou,r=lu){this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){let s=this.caches[n-1];e:for(let a of s){let i=a.bytes;for(let o=0;o<n;o++)if(i[o]!==e[r+o])continue e;return a.str}return null}store(e,r){let n=this.caches[e.length-1],s={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=s:n.push(s)}decode(e,r,n){let s=this.find(e,r,n);if(s!=null)return this.hit++,s;this.miss++;let a=Qn(e,r,n),i=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(i,a),a}};var is="array",fr="map_key",Ma="map_value",uu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new _e("The type of key must be string or number but "+typeof t)},os=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=is,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=fr,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===is){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===fr||e.type===Ma){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},dr=-1,ls=new DataView(new ArrayBuffer(0)),cu=new Uint8Array(ls.buffer);try{ls.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Ia=new RangeError("Insufficient data"),du=new ln,Ie=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ls;bytes=cu;headByte=dr;stack=new os;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:du,this.mapKeyConverter=e?.mapKeyConverter??uu}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=dr,this.stack.reset()}setBuffer(e){let r=ur(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===dr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=ur(e),s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length),this.setBuffer(s)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(let o of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),r=!0}catch(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:s,pos:a,totalPos:i}=this;throw new RangeError(`Insufficient data in parsing ${on(s)} at ${i} (${a} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,s=-1;for await(let a of e){if(r&&s===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),n&&(s=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--s!==0;);}catch(i){if(!(i instanceof RangeError))throw i}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){let s=e-128;if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e<160){let s=e-144;if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else{let s=e-160;r=this.decodeString(s,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){let s=this.lookU8();r=this.decodeString(s,1)}else if(e===218){let s=this.lookU16();r=this.decodeString(s,2)}else if(e===219){let s=this.lookU32();r=this.decodeString(s,4)}else if(e===220){let s=this.readU16();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===221){let s=this.readU32();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===222){let s=this.readU16();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===223){let s=this.readU32();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===196){let s=this.lookU8();r=this.decodeBinary(s,1)}else if(e===197){let s=this.lookU16();r=this.decodeBinary(s,2)}else if(e===198){let s=this.lookU32();r=this.decodeBinary(s,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){let s=this.lookU8();r=this.decodeExtension(s,1)}else if(e===200){let s=this.lookU16();r=this.decodeExtension(s,2)}else if(e===201){let s=this.lookU32();r=this.decodeExtension(s,4)}else throw new _e(`Unrecognized type byte: ${on(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let s=n.top();if(s.type===is)if(s.array[s.position]=r,s.position++,s.position===s.size)r=s.array,n.release(s);else continue e;else if(s.type===fr){if(r==="__proto__")throw new _e("The key __proto__ is not allowed");s.key=this.mapKeyConverter(r),s.type=Ma;continue e}else if(s.map[s.key]=r,s.readCount++,s.readCount===s.size)r=s.map,n.release(s);else{s.key=null,s.type=fr;continue e}}return r}}readHeadByte(){return this.headByte===dr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=dr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new _e(`Unrecognized array type byte: ${on(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new _e(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new _e(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){if(e>this.maxStrLength)throw new _e(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Ia;let n=this.pos+r,s;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?s=this.keyDecoder.decode(this.bytes,n,e):s=Na(this.bytes,n,e),this.pos+=r+e,s}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===fr:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new _e(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Ia;let n=this.pos+r,s=this.bytes.subarray(n,n+e);return this.pos+=r+e,s}decodeExtension(e,r){if(e>this.maxExtLength)throw new _e(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),s=this.decodeBinary(e,r+1);return this.extensionCodec.decode(s,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=Oa(this.view,this.pos);return this.pos+=8,e}readI64(){let e=sn(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function Ra(t,e){return new Ie(e).decode(t)}function La(t,e){return new Ie(e).decodeMulti(t)}function fu(t){return t[Symbol.asyncIterator]!=null}async function*pu(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function un(t){return fu(t)?t:pu(t)}async function $a(t,e){let r=un(t);return new Ie(e).decodeAsync(r)}function Fa(t,e){let r=un(t);return new Ie(e).decodeArrayStream(r)}function Ua(t,e){let r=un(t);return new Ie(e).decodeStream(r)}var Cn=sa(Os(),1),Bs=ka,Is=xa,Ve=us,zi=Cn.DOMParser,Hi=Cn.XMLSerializer;var Wi=Ve!==null;function Xi(){if(!Wi)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Gi=fd();function fd(){if(!Wi)return null;let t=new TextEncoder,e=new TextDecoder,r=new Ve.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let s=At(n);if(s==="D"||s==="H")return null}return Ve.encodeTimestampExtension(n)},decode:n=>Ve.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ne(n)?t.encode(n.toString()):null,decode:n=>Nn(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&At(n)==="D"){let s=n.getUTCFullYear(),a=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${s}-${a}-${i}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&At(n)==="H"){let s=String(n.getUTCHours()).padStart(2,"0"),a=String(n.getUTCMinutes()).padStart(2,"0"),i=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${s}:${a}:${i}.${o}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf("."),i=a>=0?s.substring(0,a):s,o=a>=0?s.substring(a+1):"0",[l,u,c]=i.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,d))}}),r.register({type:4,encode:n=>{let s=Ms(n);if(s!==null){let[a,i]=s;return t.encode(`${a}:${i(n)}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf(":"),i=s.slice(0,a),o=s.slice(a+1),l=ht[i];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${i}`}}),r}function Yi(t){return Xi(),Ve.encode(t,{extensionCodec:Gi})}function Zi(t){return Xi(),Ve.decode(t,{extensionCodec:Gi})}function On(t,e=!1){let r=Bn(t);if(r===null)return[!1,String(t)];let[n,s,a]=r;return a&&!e?[!1,String(t)]:[!0,`${s(t)}::${n}`]}function Rs(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),s=ht[n];if(s===void 0)return[!1,t];let[,a]=s;return[!0,a(r)]}function Sn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[s,a]of Object.entries(t))n[s]=Sn(a,e,r);return n}return Array.isArray(t)?t.map(n=>Sn(n,e,r)):r(t)?e(t):t}function Ls(t){let e=Bn(t);if(e!==null){let[r,n,s]=e;return s?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(s=>{let[a,i]=Ls(s);return i&&(r=!0),a}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[s,a]of Object.entries(t)){let[i,o]=Ls(a);o&&(r=!0),n[s]=i}return[n,r]}return[t,!1]}function pd(t,e=!1){let[r,n]=On(t,e);if(r)return n;let[s,a]=Ls(t),i=JSON.stringify(s);return a?`${i}::JS`:i}function hd(t){return JSON.stringify(t)}function md(t){if(!Ve)throw new Error("@msgpack/msgpack is required for MessagePack support");return Ve.encode(t)}function xe(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:s=!1}={}){if(n)return`${Ki(t)}::QS`;if(r){if(e===null||e==="json")return hd(t);if(e==="msgpack")return md(t);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let a=pd(t,s);return e==="json"?`"${a}"`:a}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Ji(t)}</tytx_root>`;if(e==="msgpack")return Yi(t);throw new Error(`Unknown transport: ${e}`)}}var Qt,$s;typeof window<"u"&&window.DOMParser?(Qt=window.DOMParser,$s=window.XMLSerializer):(Qt=zi,$s=Hi);function Qi(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);if(e.length!==1)return!1;let r=t[e[0]];return r!==null&&typeof r=="object"&&"value"in r}function eo(t,e,r){let n=t.createElement(e),s=r.attrs||{},a=r.value;for(let[i,o]of Object.entries(s))n.setAttribute(i,xe(o,null,{_forceSuffix:!0}));if(Array.isArray(a))for(let i of a)if(Qi(i)){let[o]=Object.keys(i),l=i[o],u=eo(t,o,l);n.appendChild(u)}else{n.textContent=xe(a);break}else n.textContent=xe(a);return n}function Ji(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(Qi(t)){let[e]=Object.keys(t),r=t[e],n=new Qt().parseFromString("<root/>","text/xml"),s=eo(n,e,r);return new $s().serializeToString(s)}else return xe(t)}function Fs(t){let e={};for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];e[s.name]=ue(s.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let s=t.childNodes[n];s.nodeType===1&&r.push(s)}if(r.length>0)if(r.length===1){let n=r[0],s=Fs(n);return{attrs:e,value:{[n.tagName]:s}}}else{let n=[];for(let s of r){let a=Fs(s);n.push({[s.tagName]:a})}return{attrs:e,value:n}}return{attrs:e,value:ue(t.textContent)}}function to(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Qt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let a=null;for(let i=0;i<n.childNodes.length;i++)if(n.childNodes[i].nodeType===1){a=n.childNodes[i];break}if(!a)return ue(n.textContent);n=a}let s=Fs(n);return{[n.tagName]:s}}function _d(t){return typeof t=="string"}function gd(t){let[e,r]=Rs(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let s;try{s=JSON.parse(n)}catch{return t}return Sn(s,bd,_d)}function bd(t){return t.includes("::")?Rs(t)[1]:t}function wd(t){let e=to(t);return typeof e=="string"?ue(e):e}function yd(t){return Zi(t)}function ue(t,e=null){if(t===null)return null;if(e===null||e==="json"){let r=t;return e==="json"&&t.startsWith('"')&&t.endsWith('"')&&(r=t.slice(1,-1)),gd(r)}else{if(e==="xml")return wd(t);if(e==="msgpack")return yd(t);throw new Error(`Unknown transport: ${e}`)}}function Ki(t){if(Array.isArray(t))return t.map(e=>String(e)).join("&");if(t!==null&&typeof t=="object"){let e=[];for(let[r,n]of Object.entries(t)){let[s,a]=On(n,!0);s?e.push(`${r}=${a}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function ro(t){if(!t)return[];let e=t.split("&"),r=e.map(i=>i.includes("=")),n=r.every(Boolean),s=!r.some(Boolean);if(!n&&!s)throw new Error("QS format error: mixed items with and without '='");if(s)return e.map(i=>ue(i));let a={};for(let i of e){let o=i.indexOf("="),l=i.slice(0,o),u=i.slice(o+1);a[l]=ue(u)}return a}var so=Bs||Is||Number,vd=Bs?"decimal.js":Is?"big.js":"number";function Nn(t){return new so(t)}function Ne(t){return vd==="number"?!1:t instanceof so}function At(t){let e=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,r=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;return e&&!r?"H":r&&!e?"D":"DHZ"}function kd(t){return t.toString()}function Ed(t){let e=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),n=String(t.getUTCDate()).padStart(2,"0");return`${e}-${r}-${n}`}function Dd(t){return t.toISOString()}function Ad(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),s=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${s}`}function xd(t){return t?"true":"false"}function Td(t){return t.toString()}function Cd(t){return t.toString()}function Nd(t){let e="";for(let r=0;r<t.length;r+=32768)e+=String.fromCharCode.apply(null,t.subarray(r,r+32768));return btoa(e)}var In=[],Us=new Map;function Ms(t){if(t===null||typeof t!="object")return null;for(let e=Object.getPrototypeOf(t);e!==null;e=Object.getPrototypeOf(e))for(let[r,n,s,a]of In)if(r.prototype===e)return[n,s,a];return null}function Bn(t){if(t===null)return["NN",()=>"",!0];if(Ne(t))return["N",kd,!1];if(t instanceof Uint8Array)return["RAW",Nd,!1];if(t instanceof Date){let e=At(t);return e==="D"?["D",Ed,!1]:e==="H"?["H",Ad,!1]:["DHZ",Dd,!1]}return typeof t=="boolean"?["B",xd,!0]:typeof t=="number"?Number.isInteger(t)?["L",Td,!0]:["R",Cd,!0]:Ms(t)}function Sd(t){return Nn(t)}function Od(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function no(t){return new Date(t)}function Bd(t){let[e,r,n]=t.split(":"),[s,a]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(s),Number(a||0)))}function Id(t){return t.toLowerCase()==="true"}function Md(t){return parseInt(t,10)}function Rd(t){return parseFloat(t)}function Ld(t){return t}function $d(t){return null}var Fd=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Ud(t){if(!Fd.test(t))throw new Error(`RAW payload is not standard padded base64: '${t}'`);let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Pd(t){return ro(t)}var qd=/^[A-Z]+$/,ht={N:[Object,Sd],D:[Date,Od],DH:[Date,no],DHZ:[Date,no],H:[Date,Bd],L:[Number,Md],R:[Number,Rd],T:[String,Ld],B:[Boolean,Id],QS:[Object,Pd],NN:[null,$d],RAW:[Uint8Array,Ud]};function Br(t){return Object.hasOwn(ht,t)?ht[t][0]:null}function Ps(t,e,r,n,s=!1){if(typeof e!="string"||!qd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let a=ht[e];if(a!==void 0&&a[0]!==t){let i=a[0]===null?"null":a[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${i}`)}In=In.filter(([i])=>i!==t),In.push([t,e,r,s]),ht[e]=[t,n]}function Ir(t,e){Us.set(t,e)}function Je(t){return Us.has(t)?Us.get(t):{}}var ao={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function Vd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?ao[e]||null:e}function zd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function Hd(t){return new Promise(e=>setTimeout(e,t))}async function Wd(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,s=e.backoff||2,a=e.jitter!==!1,i=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<r;u++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,u<r-1&&zd(c,i)){let d=l;a&&(d*=1+Math.random()*.1),await Hd(d),l*=s}else throw c}throw o}var ce=class t{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let a of["interval","reactive"])if(Object.hasOwn(n,a))throw new TypeError(`Removed resolver option: ${a}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let s=this.constructor.internalParams;for(let[a,i]of Object.entries(n))s.has(a)||(this._kw[a]=i);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}_buildEffectiveKw(){let e={...this._kw};if(this._node&&this._node.attr)for(let r of Object.keys(this._kw))Object.hasOwn(this._node.attr,r)&&(e[r]=this._node.attr[r]);return e}resolve(e={}){let{static:r=!1,...n}=e;if(r)return this._node?this._node._value:this.cachedValue;let s=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...s,...n},i=>this._prepareValue(i));let a=this._computeEffectiveFingerprint(s);return a===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=a,this._load(s,i=>this._finalize(i)))}_load(e,r){let n=Vd(this),s=()=>this.load(e);if(n)return Wd(s,n).then(r);let a=s();return a&&typeof a.then=="function"?a.then(r):r(a)}_finalize(e){return e=this._prepareValue(e),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_prepareValue(e){let r;return this._asBag===!0?r=!0:this._asBag===!1?r=!1:r=!this._readOnly,r&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),e}_convertToBag(e){let r=t._BagClass;if(!r||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&r.fromXml)return r.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&r.fromTytx)return r.fromTytx(e)}return e}static registerBagClass(e){t._BagClass=e}load(e){return null}};ce._BagClass=null;var Mr=class extends ce{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Ke=class t{constructor(e,r,n=null,s=null,a=null,i=null,o=null,l=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=i,this.xmlTag=o,this._compiled=null,this.parentBag=e,s&&this.setAttr(s,!1,!0,l),n!==null&&this.setValue(n,!1),a&&(this.resolver=a)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,r=null,n={}){if(r!==null){let s=ue(`${r}::QS`);if(Array.isArray(s)){let a=s.length?s:Object.keys(this._attr),i=a.map(l=>{let u=this.getAttr(l);return!e&&u instanceof ce?u.resolve():u}),o=l=>s.length===0?Object.fromEntries(a.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return i.some(l=>l&&typeof l.then=="function")?Promise.all(i).then(o):o(i)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...s}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,s=null,a=!0,i=null,o=!1){e instanceof ce?(this.resolver=e,e=null):e instanceof t&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=r??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,s,a);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}r=c&&(u||d!==null);let f=d?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),r){let p=d!==null?{oldvalue:l,attrs_diff:d}:{oldvalue:l};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),r&&this._parentBag._onNodeChanged(this,[this.label],f,l,d,i,o))}replace(e){if(!(e instanceof t))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let r=e.staticValue;r&&typeof r._htraverse=="function"&&(r=r.createChildBag().replace(r));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let s=this._value,a={...this._attr},i=this.resolver;i&&i._node===this&&(i._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(a,this._attr),l=Object.keys(o).length?o:null,u=s!==r||i!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",d=l?{oldvalue:s,attrs_diff:l}:{oldvalue:s};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,s,l)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,r=null){return e?e in this._attr?this._attr[e]:r:this._attr}_buildAttrDiff(e,r){let n={},s=new Set([...Object.keys(e),...Object.keys(r)]);for(let a of s){let i=a in e?e[a]:null,o=a in r?r[a]:null;i!==o&&(n[a]={old:i,new:o})}return n}setAttr(e=null,r=!0,n=!0,s=!0){let a=e||{},i=Object.keys(this._nodeSubscribers).length>0,l=r&&(i||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,a):this._attr={...a},s)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(r&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&i)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,c)}}}delAttr(...e){for(let r of e)if(typeof r=="string"&&r.includes(","))for(let n of r.split(","))delete this._attr[n.trim()];else delete this._attr[r]}hasAttr(e,r=null){return e in this._attr?r!==null?this._attr[e]===r:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,r){this._nodeSubscribers[e]=r}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,r=null){let n=this;if(r===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==r;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof t)||this.label!==e.label)return!1;let r=Object.keys(this._attr),n=Object.keys(e._attr);if(r.length!==n.length)return!1;for(let s of r)if(this._attr[s]!==e._attr[s])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let r=Object.keys(this._attr),n=Object.keys(e._attr);return r.length!==n.length||r.some(s=>this._attr[s]!==e._attr[s])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let r=this.value;return r&&typeof r.toJson=="function"&&(r=r.toJson(e,!0)),{label:this.label,value:r,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Rr=class t{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let r=e.match(/^#(\d+)$/);if(r){let n=parseInt(r[1],10);return n<this._list.length?n:-1}if(r=e.match(/^#(\w*)=(.*)$/),r){let[,n,s]=r,a=s.includes("::")?ue(s):s;return n?this._list.findIndex(i=>i.getAttr(n)===a):this._list.findIndex(i=>i._value===a)}return-1}_parsePosition(e){let r=this._list.length;if(e==null||e===">")return r;if(typeof e=="number")return e<0&&(e=r+e),Math.max(0,Math.min(e,r));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,r)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a+1,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,r){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${r}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${r}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let r=this.index(e);return r>=0?this._list[r]:null}return this._dict[e]||null}set(e,r,n=">",s=null,a=null,i=null,o=!1,l=!0,u=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)s={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");s={};for(let g=0;g<m.length;g++)s[m[g]]=r[g]}r=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),i!==null&&(i===!1?h.resolver=null:h.resolver=i),p?h.setAttr(s,c,!0,l):h.setValue(r,c,s,o,l,u,d);else{let m=a&&a.nodeClass?a.nodeClass:Ke;h=new m(a,e,p?null:r,s,i,f,null,l);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&a&&a.backref&&a._onNodeInserted(h,g,null,u,d)}return d&&h.setValue(null,!1),h}pop(e){let r=this.get(e);if(r){delete this._dict[r.label];let n=this._list.indexOf(r);return n>=0&&this._list.splice(n,1),r}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,r,n=!0){if(r<0)return;let s=Array.isArray(e)?e:[e];if(s.length===0||r>=this._list.length)return;let a=this._list[r].label;if(s.length>1){let i=[...s].sort((c,d)=>c-d),o=i[0]<r?1:0,l=[];for(let c=i.length-1;c>=0;c--){let d=i[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),l.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let u=this.index(a);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let i=s[0];if(i===r||i<0||i>=this._list.length)return;let o=this._list[i];this._list.splice(i,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,i),this._list.splice(r,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,r)}}isEqual(e){if(!(e instanceof t)||this._list.length!==e._list.length)return!1;for(let r=0;r<this._list.length;r++){let n=this._list[r],s=e._list[r];if(!n.isEqual(s))return!1}return!0}};var uo=sa(Os(),1);var qs="::RSLV:",Xd=new Map,Gd=new Map,Mn=new WeakMap,re=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Lr=class extends ce{constructor(e){super({asBag:!1}),Mn.set(this,e)}get payload(){return Mn.get(this)}load(){throw new re("This resolver is opaque; local execution is unavailable")}};function io(t){if(!t||typeof t!="object"||Array.isArray(t)||typeof t.resolver_module!="string"||typeof t.resolver_class!="string"||!Array.isArray(t.args??[])||!t.kwargs||typeof t.kwargs!="object"||Array.isArray(t.kwargs))throw new re("Invalid resolver description")}function oo(t,e=new Set){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(typeof t!="object"||e.has(t)||!Array.isArray(t)&&Object.getPrototypeOf(t)!==Object.prototype&&Object.getPrototypeOf(t)!==null)throw new re("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))oo(r,e);e.delete(t)}}function $r(t){if(Mn.has(t))return Mn.get(t);let e=Gd.get(t.constructor);if(!e)throw new re(`Unregistered resolver: ${t.constructor.name}`);let r=e.encode(t),n={resolver_module:e.module,resolver_class:e.name,args:r.args??[],kwargs:r.kwargs??{}};return io(n),oo(n),qs+JSON.stringify(n)}function Rn(t){if(typeof t!="string"||!t.startsWith(qs))return null;let e=t.slice(qs.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Lr(t);let r;try{r=JSON.parse(e)}catch{throw new re("Invalid resolver JSON or signed token")}io(r);let n=Xd.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Lr(t);let s=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(s instanceof n.cls))throw new re("Resolver decoder returned an incompatible instance");return s}function Ln(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ce?$r(r):r]))}function js(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Rn(r)??r]))}var Me="__cls";function er(t,e){return t!==null&&t.tytxSuffix===e?t:Br(e)}function Yd(t){let e=t.tytxSuffix,r=Object.entries(Je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new re(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new re(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Vs(t,e){let r=Je(t);if(!Object.hasOwn(r,e))throw new re(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function zs(t,e){return t===e?null:Yd(t)}function*co(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let s=r.getValue(!0);!r.resolver&&s instanceof de&&(yield*co(s,n))}}function Zd(t){let e=t.toISOString(),r=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,n=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;if(n&&!r)return e.slice(0,e.indexOf("T"));let s=e.replace(/\.000Z$/,"Z");return r&&!n?s.slice(s.indexOf("T")+1):s}function tr(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function mt(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(mt):tr(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,mt(r)])):t}function Hs(t){if(!tr(t))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=t;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var lo=!1,de=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Rr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Hs(r),e!=null&&this.fillFrom(e,r)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Ke}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let r=[],n=e;for(;n!==null;){if(n.parentBag===this)return r.push(n.label),r.reverse(),r.join(".");r.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let r=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(s=>s)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[s,a]=this._htraverseBefore(e);if(s===null)return[null,null];if(a.length===0)return[s,""];for(;a.length>1&&s instanceof t;){let i=a[0];if(i==="#parent"){if(s.parent===null||s.parent===void 0)break;a.shift(),s=s.parent;continue}let o=s._nodes.get(i);if(!o)break;let l=o.getValue(n);if(l instanceof t)a.shift(),s=l;else if(r){let u=s.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),a.shift(),s=u}else break}if(!r)return a.length>1?[null,null]:[s,a[0]];for(;a.length>1;){let i=a.shift();if(i.startsWith("#"))throw new Fr("Not existing index in #n syntax");let o=s.createChildBag();s._nodes.set(i,o,">",null,s,null,!1,!0,"autocreate"),s=o}return[s,a[0]]}get(e,r=null,n=!0,s={}){if(!e)return this;if(e==="#parent")return this.parent;let a=null;e.includes("?")&&([e,a]=e.split("?",2));let i=this._nodes.get(e);return i?i.getValue(n,a,s):r}getItem(e,r=null,n=!1,s={}){if(!e)return this;let[a,i]=this._htraverse(e,!1,n);return a instanceof t?a.get(i,r,n,s):r}setItem(e,r,n=null,s=">",a=!1,i=!0,o=null,l=!1,u=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,r,s,n,f,c,a,i,o,u,l,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let s=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(s,n,null,r),s}return null}pop(e,r=null,n=null){let s=this.popNode(e,n);return s?s.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,s]=this._htraverse(e,!1,!0);if(!n||!s)return null;let a=n._nodes.get(s);if(!a)return null;try{return n._pop(s,r)}finally{a.parentBag===n&&n._nodes._dict[a.label]!==a&&(a.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let r of e)r.parentBag=null}getNode(e,r=!0,n=!1,s=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[a,i]=this._htraverse(e,n,r);if(a instanceof t&&i){let o=a._nodes.get(i);if(o)return o;if(n)return a._nodes.set(i,s,">",null,a,null,!1,!0,"autocreate"),a._nodes.get(i)}return null}setBackref(e=null,r=null){let n=this._backref;if(this._backref=!0,this._parent=r,this._parentNode=e,!n){this._nodes._parentBag=this;for(let s of this)s.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let r=e.getValue(!0);r instanceof t&&r.clearBackref()}}}_onNodeChanged(e,r,n,s=null,a=null,i=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:r,oldvalue:s,attrs_diff:a,evt:n,reason:i,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,s,a,i,o)}_onNodeInserted(e,r,n=null,s=null,a=!1){let i=e.parentBag,o=e.getValue(!0);i!==null&&i.backref&&o instanceof t&&o.setBackref(e,i),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:r,evt:"ins",reason:s,fired:a});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],s,a)}_onNodeDeleted(e,r,n=null,s=null){for(let a of Object.values(this._delSubscribers))a({node:e,pathlist:n,ind:r,evt:"del",reason:s});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],s))}_subscribe(e,r,n){n!=null&&(r[e]=n)}subscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:s=null,delete:a=null,any:i=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||i),this._subscribe(e,this._insSubscribers,s||i),this._subscribe(e,this._delSubscribers,a||i)}unsubscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:s=!1,delete:a=!1,any:i=!1}=r;(n||i)&&delete this._updSubscribers[e],(s||i)&&delete this._insSubscribers[e],(a||i)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,r=null,n=!0){let s=t.prototype.getNode.call(this,e,!0,!0);s&&s.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let s=this.getNode(e);return s?s.getAttr(r,n):n}delAttr(e=null,...r){let n=this.getNode(e);n&&n.delAttr(...r)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(r=>e(r)):[...this._nodes]}getNodeByValue(e,r){for(let n of this._nodes){let s=n.value;if(s instanceof t){if(s.getItem(e)===r)return n}else if(s&&s.get&&s.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,s=!1){let a=r===void 0,i=n&&typeof r=="string"?r.toLowerCase():r,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(a||d==i)return c}if(c._value instanceof t)if(s){let d=o(c._value);if(d)return d}else u.push(c._value)}for(let c of u){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,r=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let s=n.getValue(!0);if(s!=null&&!(e&&s===0)&&!(r&&s===""))return!1}return!0}query(e=null,r=null,n=!1,s=!1,a=!0,i=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");u=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,w)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let b=w();return g&&b instanceof t?null:b}else if(h.startsWith("#v.")){let b=h.split(".").slice(1).join("."),v=w();return v&&v.getItem?v.getItem(b):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let b=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(b)}else{let b=w();return b&&b.getItem?b.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let w of m._nodes){let b=g?`${g}.${w.label}`:w.label,v=!1,k,D=()=>(v||(k=w.getValue(l),v=!0),k);if((a&&i||(D()instanceof t?i:a))&&(r===null||r(w))&&(yield c.length===1?d(w,c[0],b,s,D):c.map(C=>d(w,C,b,s,D)),p++,o!==null&&p>=o))return;if(s){let C=D();if(C instanceof t&&(yield*h(C,b),o!==null&&p>=o))return}}}yield*h(u,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,s)=>{for(let a of n._nodes){let i=s?`${s}.${a.label}`:a.label,o=a.getValue(!1);o instanceof t?r(o,i):e.push([i,o])}};return r(this,""),e}digest(e=null,r=null,n=!1){typeof r=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=r,r=null);let s=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!s||s.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let a=[...s];if(a.length&&Array.isArray(a[0])){let i=a[0].length,o=[];for(let l=0;l<i;l++)o.push(a.map(u=>u[l]));return o}return[a]}return[...s]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",s=e.map(a=>`${n}${a}`).join(",");return this.digest(s,null,!0)}sum(e="#v",r=!1,n=null){if(r!=null&&typeof r!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let s=a=>{let i=0,o=!1;for(let l of this.query(a,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}i+=l}return r&&o?null:i};return e.includes(",")?e.split(",").map(a=>s(a.trim())):s(e)}sort(e="#k:a"){let r=(s,a)=>s==null?[-1,""]:a&&typeof s=="string"?[0,s.toLowerCase()]:[0,s],n=(s,a)=>s[0]!==a[0]?s[0]-a[0]:s[1]<a[1]?-1:s[1]>a[1]?1:0;if(typeof e=="function")this._nodes._list.sort((s,a)=>{let i=e(s),o=e(a);return i<o?-1:i>o?1:0});else{let s=e.split(",");s.reverse();for(let a of s){let i,o;a.includes(":")?[i,o]=a.split(":",2):(i=a,o="a"),i=i.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(i.toLowerCase()==="#k")c=d=>r(d.label,u);else if(i.toLowerCase()==="#v")c=d=>r(d.value,u);else if(i.toLowerCase().startsWith("#a.")){let d=i.slice(3);c=f=>r(f.getAttr(d),u)}else c=d=>{let f=d.value,p=f instanceof t?f.getItem(i):f?f[i]:null;return r(p,u)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return l?-p:p})}}return this}equalTo(e){return e instanceof t?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let r=null;e.includes("?")&&([e,r]=e.split("?",2));let n=this.getNode(e);return n===null?!1:r===null?!0:r.split("&").every(s=>s in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let r=this.getNode(e);return r?r.resolver:null}setResolver(e,r){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=r}setCallbackItem(e,r,n={}){let s=new Mr({callback:r,...n});this.setResolver(e,s)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,s=!1){let a={};for(let i of this._nodes){let o=i.value;if(s&&o==null)continue;let l=i.label;e&&(l=String(l)),r&&(l=l.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,s)),Object.defineProperty(a,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return a}setdefault(e,r=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,r),r)}deepcopy(e=!1){let r=this.createChildBag();for(let n of this._nodes){let s=n.getValue(!e);s instanceof t&&(s=s.deepcopy(e));let a=new r.nodeClass(r,n.label,s);a.setAttr({...n.attr},!1,!1,!1),a.nodeTag=n.nodeTag,a.xmlTag=n.xmlTag,r._nodes._list.push(a),r._nodes._dict[a.label]=a}return r}update(e,r=null,n=null,s=!1){if(!(e instanceof t)){for(let a in e){let i=e[a];(!s||i!==null||!this._nodes.has(a))&&this.setItem(a,i,null,">",!1,!1,n,!1,n!==!1)}return}for(let a of[...e]){let i=a.label,o=r==="static"?a.resolver:null,l=o?null:a.getValue(),u=a.attr.__replace;delete a.attr.__replace;let c=this._nodes.get(i);if(c)if(c.setAttr(a.attr,n===null?!0:n,!0,!1),a.nodeTag!=null&&(c.nodeTag=a.nodeTag),a.xmlTag!=null&&(c.xmlTag=a.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{a.resolver&&(c.resolver=null);let d=c.getValue();l instanceof t&&d instanceof t&&!u?d.update(l,r,n,s):(!s||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(i,o||l,a.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=a.nodeTag,d.xmlTag=a.xmlTag}}}_fillFromBag(e){this.clear();for(let r of e){let n=new this.nodeClass(this,r.label);n.replace(r),n.nodeTag=r.nodeTag,n.xmlTag=r.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,r,n=null,s=null,a=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let i=new this.nodeClass(this,e,null,n,s,a,null,!1);return r instanceof ce?i.resolver=r:i._value=r,this._nodes._dict[e]=i,this._nodes._list.push(i),i}fillFrom(e=null,r={}){let n=Hs(r);if(e!=null&&!tr(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let s=this.createChildBag(),a=new Set,i=(o,l,u)=>{if(a.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);a.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,d=Array.isArray(l)?Array.from(l,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(f=>Object.prototype.propertyIsEnumerable.call(l,f)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[f,p]of d){let h=p;n&&(tr(h)||Array.isArray(h))&&(h=this.createChildBag(),i(h,p,`${u}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{a.delete(l)}};return e!=null&&i(s,e,"$"),this._replacePrepared(s)}_loadSource(e,r={}){return this.fillFrom(e,r)}replace(e){if(!(e instanceof t))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let r=this.createChildBag();return r._fillFromBag(e),this._replacePrepared(r)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let s=n.getValue(!0);s instanceof t&&s.clearBackref()}let r=this._nodes;this._nodes=e._nodes,e._nodes=r,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:r=!0,deep:n=!1,kwargs:s={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let a=(i,o)=>{for(let l=0;l<i._nodes.length;l++){let u=i._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let d=e(u,c,l);if(d)return d;if(d==null&&n){let f=u.getValue(r);if(f instanceof t){let p=a(f,c);if(p)return p}}}return null};return a(this,s)}*traverse(){for(let e of this._nodes){yield e;let r=e.getValue(!0);r instanceof t&&(yield*r.traverse())}}*_iterNodesWithPaths(e=!0,r=""){for(let n of this._nodes){let s=r?`${r}.${n.label}`:n.label;yield[s,n];let a=n.getValue(e);a instanceof t&&(yield*a._iterNodesWithPaths(e,s))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,s=0,a=new Map([["[]",this.constructor]]);for(let[i,o]of co(this)){let l=i.slice(0,-1),u=JSON.stringify(i),c=JSON.stringify(l),d=o.getValue(!0),f,p=null;if(o.resolver)f=$r(o.resolver);else if(d instanceof t){let g=d.constructor,w=g.tytxSuffix;a.set(u,g),p=zs(g,er(a.get(c),w)),f=`::${w}`}else d===null?f="::NN":f=mt(d);if(o.attr&&Object.hasOwn(o.attr,Me))throw new re(`node '${i}': the attribute '${Me}' is reserved for the Bag class name`);let h=Ln(mt(o.attr));p!==null&&(h[Me]=p);let m=o.nodeTag;r?(yield[l.length?n[c]:null,o.label,m,f,h],d instanceof t&&(n[u]=s,e[s]=i,s++)):yield[l,o.label,m,f,h]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),s=this.constructor.tytxSuffix;if(e==="json")return`${n}::${s}`;if(e==="msgpack")return an(new Be(4,new TextEncoder().encode(`${s}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let a={};r={rows:[...this._nodeFlattener(a)],paths:a}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,s=zs(n,er(null,n.tytxSuffix));return s!==null&&(r[Me]=s),r.rows=r.rows.map(([a,i,o,l,u])=>[mt(a),mt(i),mt(o),l,u]),r.paths&&(r.paths=mt(r.paths)),xe(r)}static fromTytx(e,r="json",n={}){if(tr(r)&&(n=r,r="json"),Hs(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(r!=="json"&&r!=="msgpack")throw new TypeError(`Unsupported transport: ${r}`);r==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let s=ue(e,r==="json"?null:r);if(s instanceof t)return s;if(!tr(s)&&!Array.isArray(s))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(s,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(er(null,r));let n=ue(e);if(!n||!Array.isArray(n.rows))throw new re("Invalid TYTX Bag: expected rows");let s=n.paths,a=s!=null,i=Object.hasOwn(n,Me)?Vs(r,n[Me]):er(null,r),o=new i,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new re("Invalid TYTX Bag row");let[c,d,f,p,h]=u,m=c??"";if(a){if(c!==null&&!Object.hasOwn(s,c))throw new re(`Unknown TYTX parent reference: ${c}`);m=c===null?"":s[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new re("Invalid TYTX parent path");let g=JSON.stringify(m);if(!l.has(g))throw new re(`Missing or undecodable TYTX parent branch: ${m}`);let w=l.get(g),b=JSON.stringify([...m,d]),v=p,k=Rn(v),D=js(h),y=Object.hasOwn(D,Me)?D[Me]:null;if(delete D[Me],v instanceof t){let V=v.constructor.tytxSuffix,Y=y!==null?Vs(V,y):er(w.constructor,V);v=new Y,l.set(b,v)}else if(y!==null)throw new re(`node '${b}': the attribute '${Me}' is reserved for the Bag class name of a branch`);let C=w._appendLiteral(d,k?null:v,D,k);C.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:s=null,selfClosedTags:a=null}=e,i=this._bagToXml(a,r);return s===!0?i=`<?xml version='1.0' encoding='${n}'?>
15
+ */var Bt=9e15,it=1e9,Gn="0123456789abcdef",Zr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Jr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Yn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-Bt,maxE:Bt,crypto:!1},da,Xe,I=!0,Qr="[DecimalError] ",at=Qr+"Invalid argument: ",fa=Qr+"Precision limit exceeded",pa=Qr+"crypto unavailable",ha="[object Decimal]",me=Math.floor,ie=Math.pow,Wo=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,Xo=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,Go=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,ma=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Oe=1e7,O=7,Yo=9007199254740991,Zo=Zr.length-1,Zn=Jr.length-1,_={toStringTag:ha};_.absoluteValue=_.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),C(t)};_.ceil=function(){return C(new this.constructor(this),this.e+1,2)};_.clampedTo=_.clamp=function(t,e){var r,n=this,s=n.constructor;if(t=new s(t),e=new s(e),!t.s||!e.s)return new s(NaN);if(t.gt(e))throw Error(at+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new s(n)};_.comparedTo=_.cmp=function(t){var e,r,n,s,a=this,i=a.d,o=(t=new a.constructor(t)).d,l=a.s,u=t.s;if(!i||!o)return!l||!u?NaN:l!==u?l:i===o?0:!i^l<0?1:-1;if(!i[0]||!o[0])return i[0]?l:o[0]?-u:0;if(l!==u)return l;if(a.e!==t.e)return a.e>t.e^l<0?1:-1;for(n=i.length,s=o.length,e=0,r=n<s?n:s;e<r;++e)if(i[e]!==o[e])return i[e]>o[e]^l<0?1:-1;return n===s?0:n>s^l<0?1:-1};_.cosine=_.cos=function(){var t,e,r=this,n=r.constructor;return r.d?r.d[0]?(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+O,n.rounding=1,r=Jo(n,ya(n,r)),n.precision=t,n.rounding=e,C(Xe==2||Xe==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};_.cubeRoot=_.cbrt=function(){var t,e,r,n,s,a,i,o,l,u,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(I=!1,a=c.s*ie(c.s*c,1/3),!a||Math.abs(a)==1/0?(r=fe(c.d),t=c.e,(a=(t-r.length+1)%3)&&(r+=a==1||a==-2?"0":"00"),a=ie(r,1/3),t=me((t+1)/3)-(t%3==(t<0?-1:2)),a==1/0?r="5e"+t:(r=a.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(a.toString()),i=(t=d.precision)+3;;)if(o=n,l=o.times(o).times(o),u=l.plus(c),n=G(u.plus(c).times(o),u.plus(l),i+2,1),fe(o.d).slice(0,i)===(r=fe(n.d)).slice(0,i))if(r=r.slice(i-3,i+1),r=="9999"||!s&&r=="4999"){if(!s&&(C(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}i+=4,s=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(C(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return I=!0,C(n,t,d.rounding,e)};_.decimalPlaces=_.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-me(this.e/O))*O,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};_.dividedBy=_.div=function(t){return G(this,new this.constructor(t))};_.dividedToIntegerBy=_.divToInt=function(t){var e=this,r=e.constructor;return C(G(e,new r(t),0,1,1),r.precision,r.rounding)};_.equals=_.eq=function(t){return this.cmp(t)===0};_.floor=function(){return C(new this.constructor(this),this.e+1,3)};_.greaterThan=_.gt=function(t){return this.cmp(t)>0};_.greaterThanOrEqualTo=_.gte=function(t){var e=this.cmp(t);return e==1||e===0};_.hyperbolicCosine=_.cosh=function(){var t,e,r,n,s,a=this,i=a.constructor,o=new i(1);if(!a.isFinite())return new i(a.s?1/0:NaN);if(a.isZero())return o;r=i.precision,n=i.rounding,i.precision=r+Math.max(a.e,a.sd())+4,i.rounding=1,s=a.d.length,s<32?(t=Math.ceil(s/3),e=(1/tn(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),a=It(i,1,a.times(e),new i(1),!0);for(var l,u=t,c=new i(8);u--;)l=a.times(a),a=o.minus(l.times(c.minus(l.times(c))));return C(a,i.precision=r,i.rounding=n,!0)};_.hyperbolicSine=_.sinh=function(){var t,e,r,n,s=this,a=s.constructor;if(!s.isFinite()||s.isZero())return new a(s);if(e=a.precision,r=a.rounding,a.precision=e+Math.max(s.e,s.sd())+4,a.rounding=1,n=s.d.length,n<3)s=It(a,2,s,s,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,s=s.times(1/tn(5,t)),s=It(a,2,s,s,!0);for(var i,o=new a(5),l=new a(16),u=new a(20);t--;)i=s.times(s),s=s.times(o.plus(i.times(l.times(i).plus(u))))}return a.precision=e,a.rounding=r,C(s,e,r,!0)};_.hyperbolicTangent=_.tanh=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+7,n.rounding=1,G(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};_.inverseCosine=_.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,s=e.rounding;return r!==-1?r===0?t.isNeg()?Fe(e,n,s):new e(0):new e(NaN):t.isZero()?Fe(e,n+4,s).times(.5):(e.precision=n+6,e.rounding=1,t=new e(1).minus(t).div(t.plus(1)).sqrt().atan(),e.precision=n,e.rounding=s,t.times(2))};_.inverseHyperbolicCosine=_.acosh=function(){var t,e,r=this,n=r.constructor;return r.lte(1)?new n(r.eq(1)?0:NaN):r.isFinite()?(t=n.precision,e=n.rounding,n.precision=t+Math.max(Math.abs(r.e),r.sd())+4,n.rounding=1,I=!1,r=r.times(r).minus(1).sqrt().plus(r),I=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};_.inverseHyperbolicSine=_.asinh=function(){var t,e,r=this,n=r.constructor;return!r.isFinite()||r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+2*Math.max(Math.abs(r.e),r.sd())+6,n.rounding=1,I=!1,r=r.times(r).plus(1).sqrt().plus(r),I=!0,n.precision=t,n.rounding=e,r.ln())};_.inverseHyperbolicTangent=_.atanh=function(){var t,e,r,n,s=this,a=s.constructor;return s.isFinite()?s.e>=0?new a(s.abs().eq(1)?s.s/0:s.isZero()?s:NaN):(t=a.precision,e=a.rounding,n=s.sd(),Math.max(n,t)<2*-s.e-1?C(new a(s),t,e,!0):(a.precision=r=n-s.e,s=G(s.plus(1),new a(1).minus(s),r+t,1),a.precision=t+4,a.rounding=1,s=s.ln(),a.precision=t,a.rounding=e,s.times(.5))):new a(NaN)};_.inverseSine=_.asin=function(){var t,e,r,n,s=this,a=s.constructor;return s.isZero()?new a(s):(e=s.abs().cmp(1),r=a.precision,n=a.rounding,e!==-1?e===0?(t=Fe(a,r+4,n).times(.5),t.s=s.s,t):new a(NaN):(a.precision=r+6,a.rounding=1,s=s.div(new a(1).minus(s.times(s)).sqrt().plus(1)).atan(),a.precision=r,a.rounding=n,s.times(2)))};_.inverseTangent=_.atan=function(){var t,e,r,n,s,a,i,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding;if(u.isFinite()){if(u.isZero())return new c(u);if(u.abs().eq(1)&&d+4<=Zn)return i=Fe(c,d+4,f).times(.25),i.s=u.s,i}else{if(!u.s)return new c(NaN);if(d+4<=Zn)return i=Fe(c,d+4,f).times(.5),i.s=u.s,i}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/O+2|0),t=r;t;--t)u=u.div(u.times(u).plus(1).sqrt().plus(1));for(I=!1,e=Math.ceil(o/O),n=1,l=u.times(u),i=new c(u),s=u;t!==-1;)if(s=s.times(l),a=i.minus(s.div(n+=2)),s=s.times(l),i=a.plus(s.div(n+=2)),i.d[e]!==void 0)for(t=e;i.d[t]===a.d[t]&&t--;);return r&&(i=i.times(2<<r-1)),I=!0,C(i,c.precision=d,c.rounding=f,!0)};_.isFinite=function(){return!!this.d};_.isInteger=_.isInt=function(){return!!this.d&&me(this.e/O)>this.d.length-2};_.isNaN=function(){return!this.s};_.isNegative=_.isNeg=function(){return this.s<0};_.isPositive=_.isPos=function(){return this.s>0};_.isZero=function(){return!!this.d&&this.d[0]===0};_.lessThan=_.lt=function(t){return this.cmp(t)<0};_.lessThanOrEqualTo=_.lte=function(t){return this.cmp(t)<1};_.logarithm=_.log=function(t){var e,r,n,s,a,i,o,l,u=this,c=u.constructor,d=c.precision,f=c.rounding,p=5;if(t==null)t=new c(10),e=!0;else{if(t=new c(t),r=t.d,t.s<0||!r||!r[0]||t.eq(1))return new c(NaN);e=t.eq(10)}if(r=u.d,u.s<0||!r||!r[0]||u.eq(1))return new c(r&&!r[0]?-1/0:u.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)a=!0;else{for(s=r[0];s%10===0;)s/=10;a=s!==1}if(I=!1,o=d+p,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),or(l.d,s=d,f))do if(o+=10,i=st(u,o),n=e?Kr(c,o+10):st(t,o),l=G(i,n,o,1),!a){+fe(l.d).slice(s+1,s+15)+1==1e14&&(l=C(l,d+1,0));break}while(or(l.d,s+=10,f));return I=!0,C(l,d,f)};_.minus=_.sub=function(t){var e,r,n,s,a,i,o,l,u,c,d,f,p=this,h=p.constructor;if(t=new h(t),!p.d||!t.d)return!p.s||!t.s?t=new h(NaN):p.d?t.s=-t.s:t=new h(t.d||p.s!==t.s?p:NaN),t;if(p.s!=t.s)return t.s=-t.s,p.plus(t);if(u=p.d,f=t.d,o=h.precision,l=h.rounding,!u[0]||!f[0]){if(f[0])t.s=-t.s;else if(u[0])t=new h(p);else return new h(l===3?-0:0);return I?C(t,o,l):t}if(r=me(t.e/O),c=me(p.e/O),u=u.slice(),a=c-r,a){for(d=a<0,d?(e=u,a=-a,i=f.length):(e=f,r=c,i=u.length),n=Math.max(Math.ceil(o/O),i)+2,a>n&&(a=n,e.length=1),e.reverse(),n=a;n--;)e.push(0);e.reverse()}else{for(n=u.length,i=f.length,d=n<i,d&&(i=n),n=0;n<i;n++)if(u[n]!=f[n]){d=u[n]<f[n];break}a=0}for(d&&(e=u,u=f,f=e,t.s=-t.s),i=u.length,n=f.length-i;n>0;--n)u[i++]=0;for(n=f.length;n>a;){if(u[--n]<f[n]){for(s=n;s&&u[--s]===0;)u[s]=Oe-1;--u[s],u[n]+=Oe}u[n]-=f[n]}for(;u[--i]===0;)u.pop();for(;u[0]===0;u.shift())--r;return u[0]?(t.d=u,t.e=en(u,r),I?C(t,o,l):t):new h(l===3?-0:0)};_.modulo=_.mod=function(t){var e,r=this,n=r.constructor;return t=new n(t),!r.d||!t.s||t.d&&!t.d[0]?new n(NaN):!t.d||r.d&&!r.d[0]?C(new n(r),n.precision,n.rounding):(I=!1,n.modulo==9?(e=G(r,t.abs(),0,3,1),e.s*=t.s):e=G(r,t,0,n.modulo,1),e=e.times(t),I=!0,r.minus(e))};_.naturalExponential=_.exp=function(){return Jn(this)};_.naturalLogarithm=_.ln=function(){return st(this)};_.negated=_.neg=function(){var t=new this.constructor(this);return t.s=-t.s,C(t)};_.plus=_.add=function(t){var e,r,n,s,a,i,o,l,u,c,d=this,f=d.constructor;if(t=new f(t),!d.d||!t.d)return!d.s||!t.s?t=new f(NaN):d.d||(t=new f(t.d||d.s===t.s?d:NaN)),t;if(d.s!=t.s)return t.s=-t.s,d.minus(t);if(u=d.d,c=t.d,o=f.precision,l=f.rounding,!u[0]||!c[0])return c[0]||(t=new f(d)),I?C(t,o,l):t;if(a=me(d.e/O),n=me(t.e/O),u=u.slice(),s=a-n,s){for(s<0?(r=u,s=-s,i=c.length):(r=c,n=a,i=u.length),a=Math.ceil(o/O),i=a>i?a+1:i+1,s>i&&(s=i,r.length=1),r.reverse();s--;)r.push(0);r.reverse()}for(i=u.length,s=c.length,i-s<0&&(s=i,r=c,c=u,u=r),e=0;s;)e=(u[--s]=u[s]+c[s]+e)/Oe|0,u[s]%=Oe;for(e&&(u.unshift(e),++n),i=u.length;u[--i]==0;)u.pop();return t.d=u,t.e=en(u,n),I?C(t,o,l):t};_.precision=_.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(at+t);return r.d?(e=_a(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};_.round=function(){var t=this,e=t.constructor;return C(new e(t),t.e+1,e.rounding)};_.sine=_.sin=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+Math.max(r.e,r.sd())+O,n.rounding=1,r=Qo(n,ya(n,r)),n.precision=t,n.rounding=e,C(Xe>2?r.neg():r,t,e,!0)):new n(NaN)};_.squareRoot=_.sqrt=function(){var t,e,r,n,s,a,i=this,o=i.d,l=i.e,u=i.s,c=i.constructor;if(u!==1||!o||!o[0])return new c(!u||u<0&&(!o||o[0])?NaN:o?i:1/0);for(I=!1,u=Math.sqrt(+i),u==0||u==1/0?(e=fe(o),(e.length+l)%2==0&&(e+="0"),u=Math.sqrt(e),l=me((l+1)/2)-(l<0||l%2),u==1/0?e="5e"+l:(e=u.toExponential(),e=e.slice(0,e.indexOf("e")+1)+l),n=new c(e)):n=new c(u.toString()),r=(l=c.precision)+3;;)if(a=n,n=a.plus(G(i,a,r+2,1)).times(.5),fe(a.d).slice(0,r)===(e=fe(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!s&&e=="4999"){if(!s&&(C(a,l+1,0),a.times(a).eq(i))){n=a;break}r+=4,s=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(C(n,l+1,1),t=!n.times(n).eq(i));break}return I=!0,C(n,l,c.rounding,t)};_.tangent=_.tan=function(){var t,e,r=this,n=r.constructor;return r.isFinite()?r.isZero()?new n(r):(t=n.precision,e=n.rounding,n.precision=t+10,n.rounding=1,r=r.sin(),r.s=1,r=G(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,C(Xe==2||Xe==4?r.neg():r,t,e,!0)):new n(NaN)};_.times=_.mul=function(t){var e,r,n,s,a,i,o,l,u,c=this,d=c.constructor,f=c.d,p=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!p||!p[0])return new d(!t.s||f&&!f[0]&&!p||p&&!p[0]&&!f?NaN:!f||!p?t.s/0:t.s*0);for(r=me(c.e/O)+me(t.e/O),l=f.length,u=p.length,l<u&&(a=f,f=p,p=a,i=l,l=u,u=i),a=[],i=l+u,n=i;n--;)a.push(0);for(n=u;--n>=0;){for(e=0,s=l+n;s>n;)o=a[s]+p[n]*f[s-n-1]+e,a[s--]=o%Oe|0,e=o/Oe|0;a[s]=(a[s]+e)%Oe|0}for(;!a[--i];)a.pop();return e?++r:a.shift(),t.d=a,t.e=en(a,r),I?C(t,d.precision,d.rounding):t};_.toBinary=function(t,e){return Kn(this,2,t,e)};_.toDecimalPlaces=_.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(ve(t,0,it),e===void 0?e=n.rounding:ve(e,0,8),C(r,t+r.e+1,e))};_.toExponential=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Ue(n,!0):(ve(t,0,it),e===void 0?e=s.rounding:ve(e,0,8),n=C(new s(n),t+1,e),r=Ue(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toFixed=function(t,e){var r,n,s=this,a=s.constructor;return t===void 0?r=Ue(s):(ve(t,0,it),e===void 0?e=a.rounding:ve(e,0,8),n=C(new a(s),t+s.e+1,e),r=Ue(n,!1,t+n.e+1)),s.isNeg()&&!s.isZero()?"-"+r:r};_.toFraction=function(t){var e,r,n,s,a,i,o,l,u,c,d,f,p=this,h=p.d,m=p.constructor;if(!h)return new m(p);if(u=r=new m(1),n=l=new m(0),e=new m(n),a=e.e=_a(h)-p.e-1,i=a%O,e.d[0]=ie(10,i<0?O+i:i),t==null)t=a>0?e:u;else{if(o=new m(t),!o.isInt()||o.lt(u))throw Error(at+o);t=o.gt(e)?a>0?e:u:o}for(I=!1,o=new m(fe(h)),c=m.precision,m.precision=a=h.length*O*2;d=G(o,e,0,1,1),s=r.plus(d.times(n)),s.cmp(t)!=1;)r=n,n=s,s=u,u=l.plus(d.times(s)),l=s,s=e,e=o.minus(d.times(s)),o=s;return s=G(t.minus(r),n,0,1,1),l=l.plus(s.times(u)),r=r.plus(s.times(n)),l.s=u.s=p.s,f=G(u,n,a,1).minus(p).abs().cmp(G(l,r,a,1).minus(p).abs())<1?[u,n]:[l,r],m.precision=c,I=!0,f};_.toHexadecimal=_.toHex=function(t,e){return Kn(this,16,t,e)};_.toNearest=function(t,e){var r=this,n=r.constructor;if(r=new n(r),t==null){if(!r.d)return r;t=new n(1),e=n.rounding}else{if(t=new n(t),e===void 0?e=n.rounding:ve(e,0,8),!r.d)return t.s?r:t;if(!t.d)return t.s&&(t.s=r.s),t}return t.d[0]?(I=!1,r=G(r,t,0,e,1).times(t),I=!0,C(r)):(t.s=r.s,r=t),r};_.toNumber=function(){return+this};_.toOctal=function(t,e){return Kn(this,8,t,e)};_.toPower=_.pow=function(t){var e,r,n,s,a,i,o=this,l=o.constructor,u=+(t=new l(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new l(ie(+o,u));if(o=new l(o),o.eq(1))return o;if(n=l.precision,a=l.rounding,t.eq(1))return C(o,n,a);if(e=me(t.e/O),e>=t.d.length-1&&(r=u<0?-u:u)<=Yo)return s=ga(l,o,r,n),t.s<0?new l(1).div(s):C(s,n,a);if(i=o.s,i<0){if(e<t.d.length-1)return new l(NaN);if((t.d[e]&1)==0&&(i=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=i,o}return r=ie(+o,u),e=r==0||!isFinite(r)?me(u*(Math.log("0."+fe(o.d))/Math.LN10+o.e+1)):new l(r+"").e,e>l.maxE+1||e<l.minE-1?new l(e>0?i/0:0):(I=!1,l.rounding=o.s=1,r=Math.min(12,(e+"").length),s=Jn(t.times(st(o,n+r)),n),s.d&&(s=C(s,n+5,1),or(s.d,n,a)&&(e=n+10,s=C(Jn(t.times(st(o,e+r)),e),e+5,1),+fe(s.d).slice(n+1,n+15)+1==1e14&&(s=C(s,n+1,0)))),s.s=i,I=!0,l.rounding=a,C(s,n,a))};_.toPrecision=function(t,e){var r,n=this,s=n.constructor;return t===void 0?r=Ue(n,n.e<=s.toExpNeg||n.e>=s.toExpPos):(ve(t,1,it),e===void 0?e=s.rounding:ve(e,0,8),n=C(new s(n),t,e),r=Ue(n,t<=n.e||n.e<=s.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};_.toSignificantDigits=_.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(ve(t,1,it),e===void 0?e=n.rounding:ve(e,0,8)),C(new n(r),t,e)};_.toString=function(){var t=this,e=t.constructor,r=Ue(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};_.truncated=_.trunc=function(){return C(new this.constructor(this),this.e+1,1)};_.valueOf=_.toJSON=function(){var t=this,e=t.constructor,r=Ue(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function fe(t){var e,r,n,s=t.length-1,a="",i=t[0];if(s>0){for(a+=i,e=1;e<s;e++)n=t[e]+"",r=O-n.length,r&&(a+=nt(r)),a+=n;i=t[e],n=i+"",r=O-n.length,r&&(a+=nt(r))}else if(i===0)return"0";for(;i%10===0;)i/=10;return a+i}function ve(t,e,r){if(t!==~~t||t<e||t>r)throw Error(at+t)}function or(t,e,r,n){var s,a,i,o;for(a=t[0];a>=10;a/=10)--e;return--e<0?(e+=O,s=0):(s=Math.ceil((e+1)/O),e%=O),a=ie(10,O-e),o=t[s]%a|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),i=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):i=(r<4&&o+1==a||r>3&&o+1==a/2)&&(t[s+1]/a/100|0)==ie(10,e-2)-1||(o==a/2||o==0)&&(t[s+1]/a/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),i=(n||r<4)&&o==9999||!n&&r>3&&o==4999):i=((n||r<4)&&o+1==a||!n&&r>3&&o+1==a/2)&&(t[s+1]/a/1e3|0)==ie(10,e-3)-1,i}function Gr(t,e,r){for(var n,s=[0],a,i=0,o=t.length;i<o;){for(a=s.length;a--;)s[a]*=e;for(s[0]+=Gn.indexOf(t.charAt(i++)),n=0;n<s.length;n++)s[n]>r-1&&(s[n+1]===void 0&&(s[n+1]=0),s[n+1]+=s[n]/r|0,s[n]%=r)}return s.reverse()}function Jo(t,e){var r,n,s;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),s=(1/tn(4,r)).toString()):(r=16,s="2.3283064365386962890625e-10"),t.precision+=r,e=It(t,1,e.times(s),new t(1));for(var a=r;a--;){var i=e.times(e);e=i.times(i).minus(i).times(8).plus(1)}return t.precision-=r,e}var G=(function(){function t(n,s,a){var i,o=0,l=n.length;for(n=n.slice();l--;)i=n[l]*s+o,n[l]=i%a|0,o=i/a|0;return o&&n.unshift(o),n}function e(n,s,a,i){var o,l;if(a!=i)l=a>i?1:-1;else for(o=l=0;o<a;o++)if(n[o]!=s[o]){l=n[o]>s[o]?1:-1;break}return l}function r(n,s,a,i){for(var o=0;a--;)n[a]-=o,o=n[a]<s[a]?1:0,n[a]=o*i+n[a]-s[a];for(;!n[0]&&n.length>1;)n.shift()}return function(n,s,a,i,o,l){var u,c,d,f,p,h,m,g,w,b,v,k,E,y,N,q,Z,z,T,V,Y=n.constructor,$=n.s==s.s?1:-1,X=n.d,S=s.d;if(!X||!X[0]||!S||!S[0])return new Y(!n.s||!s.s||(X?S&&X[0]==S[0]:!S)?NaN:X&&X[0]==0||!S?$*0:$/0);for(l?(p=1,c=n.e-s.e):(l=Oe,p=O,c=me(n.e/p)-me(s.e/p)),T=S.length,Z=X.length,w=new Y($),b=w.d=[],d=0;S[d]==(X[d]||0);d++);if(S[d]>(X[d]||0)&&c--,a==null?(y=a=Y.precision,i=Y.rounding):o?y=a+(n.e-s.e)+1:y=a,y<0)b.push(1),h=!0;else{if(y=y/p+2|0,d=0,T==1){for(f=0,S=S[0],y++;(d<Z||f)&&y--;d++)N=f*l+(X[d]||0),b[d]=N/S|0,f=N%S|0;h=f||d<Z}else{for(f=l/(S[0]+1)|0,f>1&&(S=t(S,f,l),X=t(X,f,l),T=S.length,Z=X.length),q=T,v=X.slice(0,T),k=v.length;k<T;)v[k++]=0;V=S.slice(),V.unshift(0),z=S[0],S[1]>=l/2&&++z;do f=0,u=e(S,v,T,k),u<0?(E=v[0],T!=k&&(E=E*l+(v[1]||0)),f=E/z|0,f>1?(f>=l&&(f=l-1),m=t(S,f,l),g=m.length,k=v.length,u=e(m,v,g,k),u==1&&(f--,r(m,T<g?V:S,g,l))):(f==0&&(u=f=1),m=S.slice()),g=m.length,g<k&&m.unshift(0),r(v,m,k,l),u==-1&&(k=v.length,u=e(S,v,T,k),u<1&&(f++,r(v,T<k?V:S,k,l))),k=v.length):u===0&&(f++,v=[0]),b[d++]=f,u&&v[0]?v[k++]=X[q]||0:(v=[X[q]],k=1);while((q++<Z||v[0]!==void 0)&&y--);h=v[0]!==void 0}b[0]||b.shift()}if(p==1)w.e=c,da=h;else{for(d=1,f=b[0];f>=10;f/=10)d++;w.e=d+c*p-1,C(w,o?a+w.e+1:a,i,h)}return w}})();function C(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(s=1,o=d[0];o>=10;o/=10)s++;if(a=e-s,a<0)a+=O,i=e,c=d[f=0],l=c/ie(10,s-i-1)%10|0;else if(f=Math.ceil((a+1)/O),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=l=0,s=1,a%=O,i=a-O+1}else break e;else{for(c=o=d[f],s=1;o>=10;o/=10)s++;a%=O,i=a-O+s,l=i<0?0:c/ie(10,s-i-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(i<0?c:c%ie(10,s-i-1)),u=r<4?(l||n)&&(r==0||r==(t.s<0?3:2)):l>5||l==5&&(r==4||n||r==6&&(a>0?i>0?c/ie(10,s-i):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,u?(e-=t.e+1,d[0]=ie(10,(O-e%O)%O),t.e=-e||0):d[0]=t.e=0,t;if(a==0?(d.length=f,o=1,f--):(d.length=f+1,o=ie(10,O-a),d[f]=i>0?(c/ie(10,s-i)%ie(10,i)|0)*o:0),u)for(;;)if(f==0){for(a=1,i=d[0];i>=10;i/=10)a++;for(i=d[0]+=o,o=1;i>=10;i/=10)o++;a!=o&&(t.e++,d[0]==Oe&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Oe)break;d[f--]=0,o=1}for(a=d.length;d[--a]===0;)d.pop()}return I&&(t.e>p.maxE?(t.d=null,t.e=NaN):t.e<p.minE&&(t.e=0,t.d=[0])),t}function Ue(t,e,r){if(!t.isFinite())return wa(t);var n,s=t.e,a=fe(t.d),i=a.length;return e?(r&&(n=r-i)>0?a=a.charAt(0)+"."+a.slice(1)+nt(n):i>1&&(a=a.charAt(0)+"."+a.slice(1)),a=a+(t.e<0?"e":"e+")+t.e):s<0?(a="0."+nt(-s-1)+a,r&&(n=r-i)>0&&(a+=nt(n))):s>=i?(a+=nt(s+1-i),r&&(n=r-s-1)>0&&(a=a+"."+nt(n))):((n=s+1)<i&&(a=a.slice(0,n)+"."+a.slice(n)),r&&(n=r-i)>0&&(s+1===i&&(a+="."),a+=nt(n))),a}function en(t,e){var r=t[0];for(e*=O;r>=10;r/=10)e++;return e}function Kr(t,e,r){if(e>Zo)throw I=!0,r&&(t.precision=r),Error(fa);return C(new t(Zr),e,1,!0)}function Fe(t,e,r){if(e>Zn)throw Error(fa);return C(new t(Jr),e,r,!0)}function _a(t){var e=t.length-1,r=e*O+1;if(e=t[e],e){for(;e%10==0;e/=10)r--;for(e=t[0];e>=10;e/=10)r++}return r}function nt(t){for(var e="";t--;)e+="0";return e}function ga(t,e,r,n){var s,a=new t(1),i=Math.ceil(n/O+4);for(I=!1;;){if(r%2&&(a=a.times(e),ua(a.d,i)&&(s=!0)),r=me(r/2),r===0){r=a.d.length-1,s&&a.d[r]===0&&++a.d[r];break}e=e.times(e),ua(e.d,i)}return I=!0,a}function la(t){return t.d[t.d.length-1]&1}function ba(t,e,r){for(var n,s,a=new t(e[0]),i=0;++i<e.length;){if(s=new t(e[i]),!s.s){a=s;break}n=a.cmp(s),(n===r||n===0&&a.s===r)&&(a=s)}return a}function Jn(t,e){var r,n,s,a,i,o,l,u=0,c=0,d=0,f=t.constructor,p=f.rounding,h=f.precision;if(!t.d||!t.d[0]||t.e>17)return new f(t.d?t.d[0]?t.s<0?0:1/0:1:t.s?t.s<0?0:t:NaN);for(e==null?(I=!1,l=h):l=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(ie(2,d))/Math.LN10*2+5|0,l+=n,r=a=i=new f(1),f.precision=l;;){if(a=C(a.times(t),l,1),r=r.times(++c),o=i.plus(G(a,r,l,1)),fe(o.d).slice(0,l)===fe(i.d).slice(0,l)){for(s=d;s--;)i=C(i.times(i),l,1);if(e==null)if(u<3&&or(i.d,l-n,p,u))f.precision=l+=10,r=a=o=new f(1),c=0,u++;else return C(i,f.precision=h,p,I=!0);else return f.precision=h,i}i=o}}function st(t,e){var r,n,s,a,i,o,l,u,c,d,f,p=1,h=10,m=t,g=m.d,w=m.constructor,b=w.rounding,v=w.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new w(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(I=!1,c=v):c=e,w.precision=c+=h,r=fe(g),n=r.charAt(0),Math.abs(a=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=fe(m.d),n=r.charAt(0),p++;a=m.e,n>1?(m=new w("0."+r),a++):m=new w(n+"."+r.slice(1))}else return u=Kr(w,c+2,v).times(a+""),m=st(new w(n+"."+r.slice(1)),c-h).plus(u),w.precision=v,e==null?C(m,v,b,I=!0):m;for(d=m,l=i=m=G(m.minus(1),m.plus(1),c,1),f=C(m.times(m),c,1),s=3;;){if(i=C(i.times(f),c,1),u=l.plus(G(i,new w(s),c,1)),fe(u.d).slice(0,c)===fe(l.d).slice(0,c))if(l=l.times(2),a!==0&&(l=l.plus(Kr(w,c+2,v).times(a+""))),l=G(l,new w(p),c,1),e==null)if(or(l.d,c-h,b,o))w.precision=c+=h,u=i=m=G(d.minus(1),d.plus(1),c,1),f=C(m.times(m),c,1),s=o=1;else return C(l,w.precision=v,b,I=!0);else return w.precision=v,l;l=u,s+=2}}function wa(t){return String(t.s*t.s/0)}function Yr(t,e){var r,n,s;for((r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),n=0;e.charCodeAt(n)===48;n++);for(s=e.length;e.charCodeAt(s-1)===48;--s);if(e=e.slice(n,s),e){if(s-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%O,r<0&&(n+=O),n<s){for(n&&t.d.push(+e.slice(0,n)),s-=O;n<s;)t.d.push(+e.slice(n,n+=O));e=e.slice(n),n=O-e.length}else n-=s;for(;n--;)e+="0";t.d.push(+e),I&&(t.e>t.constructor.maxE?(t.d=null,t.e=NaN):t.e<t.constructor.minE&&(t.e=0,t.d=[0]))}else t.e=0,t.d=[0];return t}function Ko(t,e){var r,n,s,a,i,o,l,u,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),ma.test(e))return Yr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(Xo.test(e))r=16,e=e.toLowerCase();else if(Wo.test(e))r=2;else if(Go.test(e))r=8;else throw Error(at+e);for(a=e.search(/p/i),a>0?(l=+e.slice(a+1),e=e.substring(2,a)):e=e.slice(2),a=e.indexOf("."),i=a>=0,n=t.constructor,i&&(e=e.replace(".",""),o=e.length,a=o-a,s=ga(n,new n(r),a,a*2)),u=Gr(e,r,Oe),c=u.length-1,a=c;u[a]===0;--a)u.pop();return a<0?new n(t.s*0):(t.e=en(u,c),t.d=u,I=!1,i&&(t=G(t,s,o*4)),l&&(t=t.times(Math.abs(l)<54?ie(2,l):lr.pow(2,l))),I=!0,t)}function Qo(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:It(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/tn(5,r)),e=It(t,2,e,e);for(var s,a=new t(5),i=new t(16),o=new t(20);r--;)s=e.times(e),e=e.times(a.plus(s.times(i.times(s).minus(o))));return e}function It(t,e,r,n,s){var a,i,o,l,u=1,c=t.precision,d=Math.ceil(c/O);for(I=!1,l=r.times(r),o=new t(n);;){if(i=G(o.times(l),new t(e++*e++),c,1),o=s?n.plus(i):n.minus(i),n=G(i.times(l),new t(e++*e++),c,1),i=o.plus(n),i.d[d]!==void 0){for(a=d;i.d[a]===o.d[a]&&a--;);if(a==-1)break}a=o,o=n,n=i,i=a,u++}return I=!0,i.d.length=d+1,i}function tn(t,e){for(var r=t;--e;)r*=t;return r}function ya(t,e){var r,n=e.s<0,s=Fe(t,t.precision,1),a=s.times(.5);if(e=e.abs(),e.lte(a))return Xe=n?4:1,e;if(r=e.divToInt(s),r.isZero())Xe=n?3:2;else{if(e=e.minus(r.times(s)),e.lte(a))return Xe=la(r)?n?2:3:n?4:1,e;Xe=la(r)?n?1:4:n?3:2}return e.minus(s).abs()}function Kn(t,e,r,n){var s,a,i,o,l,u,c,d,f,p=t.constructor,h=r!==void 0;if(h?(ve(r,1,it),n===void 0?n=p.rounding:ve(n,0,8)):(r=p.precision,n=p.rounding),!t.isFinite())c=wa(t);else{for(c=Ue(t),i=c.indexOf("."),h?(s=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):s=e,i>=0&&(c=c.replace(".",""),f=new p(1),f.e=c.length-i,f.d=Gr(Ue(f),10,s),f.e=f.d.length),d=Gr(c,10,s),a=l=d.length;d[--l]==0;)d.pop();if(!d[0])c=h?"0p+0":"0";else{if(i<0?a--:(t=new p(t),t.d=d,t.e=a,t=G(t,f,r,n,0,s),d=t.d,a=t.e,u=da),i=d[r],o=s/2,u=u||d[r+1]!==void 0,u=n<4?(i!==void 0||u)&&(n===0||n===(t.s<0?3:2)):i>o||i===o&&(n===4||u||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,u)for(;++d[--r]>s-1;)d[r]=0,r||(++a,d.unshift(1));for(l=d.length;!d[l-1];--l);for(i=0,c="";i<l;i++)c+=Gn.charAt(d[i]);if(h){if(l>1)if(e==16||e==8){for(i=e==16?4:3,--l;l%i;l++)c+="0";for(d=Gr(c,s,e),l=d.length;!d[l-1];--l);for(i=1,c="1.";i<l;i++)c+=Gn.charAt(d[i])}else c=c.charAt(0)+"."+c.slice(1);c=c+(a<0?"p":"p+")+a}else if(a<0){for(;++a;)c="0"+c;c="0."+c}else if(++a>l)for(a-=l;a--;)c+="0";else a<l&&(c=c.slice(0,a)+"."+c.slice(a))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function ua(t,e){if(t.length>e)return t.length=e,!0}function el(t){return new this(t).abs()}function tl(t){return new this(t).acos()}function rl(t){return new this(t).acosh()}function nl(t,e){return new this(t).plus(e)}function sl(t){return new this(t).asin()}function al(t){return new this(t).asinh()}function il(t){return new this(t).atan()}function ol(t){return new this(t).atanh()}function ll(t,e){t=new this(t),e=new this(e);var r,n=this.precision,s=this.rounding,a=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=Fe(this,a,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?Fe(this,n,s):new this(0),r.s=t.s):!t.d||e.isZero()?(r=Fe(this,a,1).times(.5),r.s=t.s):e.s<0?(this.precision=a,this.rounding=1,r=this.atan(G(t,e,a,1)),e=Fe(this,a,1),this.precision=n,this.rounding=s,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(G(t,e,a,1)),r}function ul(t){return new this(t).cbrt()}function cl(t){return C(t=new this(t),t.e+1,2)}function dl(t,e,r){return new this(t).clamp(e,r)}function fl(t){if(!t||typeof t!="object")throw Error(Qr+"Object expected");var e,r,n,s=t.defaults===!0,a=["precision",1,it,"rounding",0,8,"toExpNeg",-Bt,0,"toExpPos",0,Bt,"maxE",0,Bt,"minE",-Bt,0,"modulo",0,9];for(e=0;e<a.length;e+=3)if(r=a[e],s&&(this[r]=Yn[r]),(n=t[r])!==void 0)if(me(n)===n&&n>=a[e+1]&&n<=a[e+2])this[r]=n;else throw Error(at+r+": "+n);if(r="crypto",s&&(this[r]=Yn[r]),(n=t[r])!==void 0)if(n===!0||n===!1||n===0||n===1)if(n)if(typeof crypto<"u"&&crypto&&(crypto.getRandomValues||crypto.randomBytes))this[r]=!0;else throw Error(pa);else this[r]=!1;else throw Error(at+r+": "+n);return this}function pl(t){return new this(t).cos()}function hl(t){return new this(t).cosh()}function va(t){var e,r,n;function s(a){var i,o,l,u=this;if(!(u instanceof s))return new s(a);if(u.constructor=s,ca(a)){u.s=a.s,I?!a.d||a.e>s.maxE?(u.e=NaN,u.d=null):a.e<s.minE?(u.e=0,u.d=[0]):(u.e=a.e,u.d=a.d.slice()):(u.e=a.e,u.d=a.d?a.d.slice():a.d);return}if(l=typeof a,l==="number"){if(a===0){u.s=1/a<0?-1:1,u.e=0,u.d=[0];return}if(a<0?(a=-a,u.s=-1):u.s=1,a===~~a&&a<1e7){for(i=0,o=a;o>=10;o/=10)i++;I?i>s.maxE?(u.e=NaN,u.d=null):i<s.minE?(u.e=0,u.d=[0]):(u.e=i,u.d=[a]):(u.e=i,u.d=[a]);return}if(a*0!==0){a||(u.s=NaN),u.e=NaN,u.d=null;return}return Yr(u,a.toString())}if(l==="string")return(o=a.charCodeAt(0))===45?(a=a.slice(1),u.s=-1):(o===43&&(a=a.slice(1)),u.s=1),ma.test(a)?Yr(u,a):Ko(u,a);if(l==="bigint")return a<0?(a=-a,u.s=-1):u.s=1,Yr(u,a.toString());throw Error(at+a)}if(s.prototype=_,s.ROUND_UP=0,s.ROUND_DOWN=1,s.ROUND_CEIL=2,s.ROUND_FLOOR=3,s.ROUND_HALF_UP=4,s.ROUND_HALF_DOWN=5,s.ROUND_HALF_EVEN=6,s.ROUND_HALF_CEIL=7,s.ROUND_HALF_FLOOR=8,s.EUCLID=9,s.config=s.set=fl,s.clone=va,s.isDecimal=ca,s.abs=el,s.acos=tl,s.acosh=rl,s.add=nl,s.asin=sl,s.asinh=al,s.atan=il,s.atanh=ol,s.atan2=ll,s.cbrt=ul,s.ceil=cl,s.clamp=dl,s.cos=pl,s.cosh=hl,s.div=ml,s.exp=_l,s.floor=gl,s.hypot=bl,s.ln=wl,s.log=yl,s.log10=kl,s.log2=vl,s.max=El,s.min=Dl,s.mod=Al,s.mul=xl,s.pow=Tl,s.random=Cl,s.round=Nl,s.sign=Sl,s.sin=Ol,s.sinh=Bl,s.sqrt=Il,s.sub=Ml,s.sum=Rl,s.tan=Ll,s.tanh=$l,s.trunc=Fl,t===void 0&&(t={}),t&&t.defaults!==!0)for(n=["precision","rounding","toExpNeg","toExpPos","maxE","minE","modulo","crypto"],e=0;e<n.length;)t.hasOwnProperty(r=n[e++])||(t[r]=this[r]);return s.config(t),s}function ml(t,e){return new this(t).div(e)}function _l(t){return new this(t).exp()}function gl(t){return C(t=new this(t),t.e+1,3)}function bl(){var t,e,r=new this(0);for(I=!1,t=0;t<arguments.length;)if(e=new this(arguments[t++]),e.d)r.d&&(r=r.plus(e.times(e)));else{if(e.s)return I=!0,new this(1/0);r=e}return I=!0,r.sqrt()}function ca(t){return t instanceof lr||t&&t.toStringTag===ha||!1}function wl(t){return new this(t).ln()}function yl(t,e){return new this(t).log(e)}function vl(t){return new this(t).log(2)}function kl(t){return new this(t).log(10)}function El(){return ba(this,arguments,-1)}function Dl(){return ba(this,arguments,1)}function Al(t,e){return new this(t).mod(e)}function xl(t,e){return new this(t).mul(e)}function Tl(t,e){return new this(t).pow(e)}function Cl(t){var e,r,n,s,a=0,i=new this(1),o=[];if(t===void 0?t=this.precision:ve(t,1,it),n=Math.ceil(t/O),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));a<n;)s=e[a],s>=429e7?e[a]=crypto.getRandomValues(new Uint32Array(1))[0]:o[a++]=s%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);a<n;)s=e[a]+(e[a+1]<<8)+(e[a+2]<<16)+((e[a+3]&127)<<24),s>=214e7?crypto.randomBytes(4).copy(e,a):(o.push(s%1e7),a+=4);a=n/4}else throw Error(pa);else for(;a<n;)o[a++]=Math.random()*1e7|0;for(n=o[--a],t%=O,n&&t&&(s=ie(10,O-t),o[a]=(n/s|0)*s);o[a]===0;a--)o.pop();if(a<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=O)o.shift();for(n=1,s=o[0];s>=10;s/=10)n++;n<O&&(r-=O-n)}return i.e=r,i.d=o,i}function Nl(t){return C(t=new this(t),t.e+1,this.rounding)}function Sl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Ol(t){return new this(t).sin()}function Bl(t){return new this(t).sinh()}function Il(t){return new this(t).sqrt()}function Ml(t,e){return new this(t).sub(e)}function Rl(){var t=0,e=arguments,r=new this(e[t]);for(I=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return I=!0,C(r,this.precision,this.rounding)}function Ll(t){return new this(t).tan()}function $l(t){return new this(t).tanh()}function Fl(t){return C(t=new this(t),t.e+1,1)}_[Symbol.for("nodejs.util.inspect.custom")]=_.toString;_[Symbol.toStringTag]="Decimal";var lr=_.constructor=va(Yn);Zr=new lr(Zr);Jr=new lr(Jr);var ka=lr;var Ul=20,Pl=1,gt=1e6,Ea=1e6,ql=-7,jl=21,Vl=!1,ur="[big.js] ",bt=ur+"Invalid ",rn=bt+"decimal places",zl=bt+"rounding mode",Da=ur+"Division by zero",H={},Pe=void 0,Hl=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Aa(){function t(e){var r=this;if(!(r instanceof t))return e===Pe?Aa():new t(e);if(e instanceof t)r.s=e.s,r.e=e.e,r.c=e.c.slice();else{if(typeof e!="string"){if(t.strict===!0&&typeof e!="bigint")throw TypeError(bt+"value");e=e===0&&1/e<0?"-0":String(e)}Wl(r,e)}r.constructor=t}return t.prototype=H,t.DP=Ul,t.RM=Pl,t.NE=ql,t.PE=jl,t.strict=Vl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function Wl(t,e){var r,n,s;if(!Hl.test(e))throw Error(bt+"number");for(t.s=e.charAt(0)=="-"?(e=e.slice(1),-1):1,(r=e.indexOf("."))>-1&&(e=e.replace(".","")),(n=e.search(/e/i))>0?(r<0&&(r=n),r+=+e.slice(n+1),e=e.substring(0,n)):r<0&&(r=e.length),s=e.length,n=0;n<s&&e.charAt(n)=="0";)++n;if(n==s)t.c=[t.e=0];else{for(;s>0&&e.charAt(--s)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=s;)t.c[r++]=+e.charAt(n++)}return t}function wt(t,e,r,n){var s=t.c;if(r===Pe&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(zl);if(e<1)n=r===3&&(n||!!s[0])||e===0&&(r===1&&s[0]>=5||r===2&&(s[0]>5||s[0]===5&&(n||s[1]!==Pe))),s.length=1,n?(t.e=t.e-e+1,s[0]=1):s[0]=t.e=0;else if(e<s.length){if(n=r===1&&s[e]>=5||r===2&&(s[e]>5||s[e]===5&&(n||s[e+1]!==Pe||s[e-1]&1))||r===3&&(n||!!s[0]),s.length=e,n){for(;++s[--e]>9;)if(s[e]=0,e===0){++t.e,s.unshift(1);break}}for(e=s.length;!s[--e];)s.pop()}return t}function yt(t,e,r){var n=t.e,s=t.c.join(""),a=s.length;if(e)s=s.charAt(0)+(a>1?"."+s.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)s="0"+s;s="0."+s}else if(n>0)if(++n>a)for(n-=a;n--;)s+="0";else n<a&&(s=s.slice(0,n)+"."+s.slice(n));else a>1&&(s=s.charAt(0)+"."+s.slice(1));return t.s<0&&r?"-"+s:s}H.abs=function(){var t=new this.constructor(this);return t.s=1,t};H.cmp=function(t){var e,r=this,n=r.c,s=(t=new r.constructor(t)).c,a=r.s,i=t.s,o=r.e,l=t.e;if(!n[0]||!s[0])return n[0]?a:s[0]?-i:0;if(a!=i)return a;if(e=a<0,o!=l)return o>l^e?1:-1;for(i=(o=n.length)<(l=s.length)?o:l,a=-1;++a<i;)if(n[a]!=s[a])return n[a]>s[a]^e?1:-1;return o==l?0:o>l^e?1:-1};H.div=function(t){var e=this,r=e.constructor,n=e.c,s=(t=new r(t)).c,a=e.s==t.s?1:-1,i=r.DP;if(i!==~~i||i<0||i>gt)throw Error(rn);if(!s[0])throw Error(Da);if(!n[0])return t.s=a,t.c=[t.e=0],t;var o,l,u,c,d,f=s.slice(),p=o=s.length,h=n.length,m=n.slice(0,o),g=m.length,w=t,b=w.c=[],v=0,k=i+(w.e=e.e-t.e)+1;for(w.s=a,a=k<0?0:k,f.unshift(0);g++<o;)m.push(0);do{for(u=0;u<10;u++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(s[d]!=m[d]){c=s[d]>m[d]?1:-1;break}if(c<0){for(l=g==o?s:f;g;){if(m[--g]<l[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=l[g]}for(;!m[0];)m.shift()}else break}b[v++]=c?u:++u,m[0]&&c?m[g]=n[p]||0:m=[n[p]]}while((p++<h||m[0]!==Pe)&&a--);return!b[0]&&v!=1&&(b.shift(),w.e--,k--),v>k&&wt(w,k,r.RM,m[0]!==Pe),w};H.eq=function(t){return this.cmp(t)===0};H.gt=function(t){return this.cmp(t)>0};H.gte=function(t){return this.cmp(t)>-1};H.lt=function(t){return this.cmp(t)<0};H.lte=function(t){return this.cmp(t)<1};H.minus=H.sub=function(t){var e,r,n,s,a=this,i=a.constructor,o=a.s,l=(t=new i(t)).s;if(o!=l)return t.s=-l,a.plus(t);var u=a.c.slice(),c=a.e,d=t.c,f=t.e;if(!u[0]||!d[0])return d[0]?t.s=-l:u[0]?t=new i(a):t.s=1,t;if(o=c-f){for((s=o<0)?(o=-o,n=u):(f=c,n=d),n.reverse(),l=o;l--;)n.push(0);n.reverse()}else for(r=((s=u.length<d.length)?u:d).length,o=l=0;l<r;l++)if(u[l]!=d[l]){s=u[l]<d[l];break}if(s&&(n=u,u=d,d=n,t.s=-t.s),(l=(r=d.length)-(e=u.length))>0)for(;l--;)u[e++]=0;for(l=e;r>o;){if(u[--r]<d[r]){for(e=r;e&&!u[--e];)u[e]=9;--u[e],u[r]+=10}u[r]-=d[r]}for(;u[--l]===0;)u.pop();for(;u[0]===0;)u.shift(),--f;return u[0]||(t.s=1,u=[f=0]),t.c=u,t.e=f,t};H.mod=function(t){var e,r=this,n=r.constructor,s=r.s,a=(t=new n(t)).s;if(!t.c[0])throw Error(Da);return r.s=t.s=1,e=t.cmp(r)==1,r.s=s,t.s=a,e?new n(r):(s=n.DP,a=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=s,n.RM=a,this.minus(r.times(t)))};H.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};H.plus=H.add=function(t){var e,r,n,s=this,a=s.constructor;if(t=new a(t),s.s!=t.s)return t.s=-t.s,s.minus(t);var i=s.e,o=s.c,l=t.e,u=t.c;if(!o[0]||!u[0])return u[0]||(o[0]?t=new a(s):t.s=s.s),t;if(o=o.slice(),e=i-l){for(e>0?(l=i,n=u):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-u.length<0&&(n=u,u=o,o=n),e=u.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+u[e]+r)/10|0;for(r&&(o.unshift(r),++l),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=l,t};H.pow=function(t){var e=this,r=new e.constructor("1"),n=r,s=t<0;if(t!==~~t||t<-Ea||t>Ea)throw Error(bt+"exponent");for(s&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return s?r.div(n):n};H.prec=function(t,e){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");return wt(new this.constructor(this),t,e)};H.round=function(t,e){if(t===Pe)t=0;else if(t!==~~t||t<-gt||t>gt)throw Error(rn);return wt(new this.constructor(this),t+this.e+1,e)};H.sqrt=function(){var t,e,r,n=this,s=n.constructor,a=n.s,i=n.e,o=new s("0.5");if(!n.c[0])return new s(n);if(a<0)throw Error(ur+"No square root");a=Math.sqrt(+yt(n,!0,!0)),a===0||a===1/0?(e=n.c.join(""),e.length+i&1||(e+="0"),a=Math.sqrt(e),i=((i+1)/2|0)-(i<0||i&1),t=new s((a==1/0?"5e":(a=a.toExponential()).slice(0,a.indexOf("e")+1))+i)):t=new s(a+""),i=t.e+(s.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,i).join("")!==t.c.slice(0,i).join(""));return wt(t,(s.DP-=4)+t.e+1,s.RM)};H.times=H.mul=function(t){var e,r=this,n=r.constructor,s=r.c,a=(t=new n(t)).c,i=s.length,o=a.length,l=r.e,u=t.e;if(t.s=r.s==t.s?1:-1,!s[0]||!a[0])return t.c=[t.e=0],t;for(t.e=l+u,i<o&&(e=s,s=a,a=e,u=i,i=o,o=u),e=new Array(u=i+o);u--;)e[u]=0;for(l=o;l--;){for(o=0,u=i+l;u>l;)o=e[u]+a[l]*s[u-l-1]+o,e[u--]=o%10,o=o/10|0;e[u]=o}for(o?++t.e:e.shift(),l=e.length;!e[--l];)e.pop();return t.c=e,t};H.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Pe){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return yt(r,!0,!!n)};H.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Pe){if(t!==~~t||t<0||t>gt)throw Error(rn);for(r=wt(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return yt(r,!1,!!n)};H[Symbol.for("nodejs.util.inspect.custom")]=H.toJSON=H.toString=function(){var t=this,e=t.constructor;return yt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};H.toNumber=function(){var t=+yt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(ur+"Imprecise conversion");return t};H.toPrecision=function(t,e){var r=this,n=r.constructor,s=r.c[0];if(t!==Pe){if(t!==~~t||t<1||t>gt)throw Error(bt+"precision");for(r=wt(new n(r),t,e);r.c.length<t;)r.c.push(0)}return yt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!s)};H.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(ur+"valueOf disallowed");return yt(t,t.e<=e.NE||t.e>=e.PE,!0)};var Xl=Aa(),xa=Xl;var us={};na(us,{DecodeError:()=>_e,Decoder:()=>Ie,EXT_TIMESTAMP:()=>es,Encoder:()=>Mt,ExtData:()=>Be,ExtensionCodec:()=>ot,decode:()=>Ra,decodeArrayStream:()=>Fa,decodeAsync:()=>$a,decodeMulti:()=>La,decodeMultiStream:()=>Ua,decodeTimestampExtension:()=>as,decodeTimestampToTimeSpec:()=>ss,encode:()=>an,encodeDateToTimeSpec:()=>rs,encodeTimeSpecToTimestamp:()=>ts,encodeTimestampExtension:()=>ns});function Ta(t){let e=t.length,r=0,n=0;for(;n<e;){let s=t.charCodeAt(n++);if((s&4294967168)===0){r++;continue}else if((s&4294965248)===0)r+=2;else{if(s>=55296&&s<=56319&&n<e){let a=t.charCodeAt(n);(a&64512)===56320&&(++n,s=((s&1023)<<10)+(a&1023)+65536)}(s&4294901760)===0?r+=3:r+=4}}return r}function Gl(t,e,r){let n=t.length,s=r,a=0;for(;a<n;){let i=t.charCodeAt(a++);if((i&4294967168)===0){e[s++]=i;continue}else if((i&4294965248)===0)e[s++]=i>>6&31|192;else{if(i>=55296&&i<=56319&&a<n){let o=t.charCodeAt(a);(o&64512)===56320&&(++a,i=((i&1023)<<10)+(o&1023)+65536)}(i&4294901760)===0?(e[s++]=i>>12&15|224,e[s++]=i>>6&63|128):(e[s++]=i>>18&7|240,e[s++]=i>>12&63|128,e[s++]=i>>6&63|128)}e[s++]=i&63|128}}var Yl=new TextEncoder,Zl=50;function Jl(t,e,r){Yl.encodeInto(t,e.subarray(r))}function Ca(t,e,r){t.length>Zl?Jl(t,e,r):Gl(t,e,r)}var Kl=4096;function Qn(t,e,r){let n=e,s=n+r,a=[],i="";for(;n<s;){let o=t[n++];if((o&128)===0)a.push(o);else if((o&224)===192){let l=t[n++]&63;a.push((o&31)<<6|l)}else if((o&240)===224){let l=t[n++]&63,u=t[n++]&63;a.push((o&31)<<12|l<<6|u)}else if((o&248)===240){let l=t[n++]&63,u=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|l<<12|u<<6|c;d>65535&&(d-=65536,a.push(d>>>10&1023|55296),d=56320|d&1023),a.push(d)}else a.push(o);a.length>=Kl&&(i+=String.fromCharCode(...a),a.length=0)}return a.length>0&&(i+=String.fromCharCode(...a)),i}var Ql=new TextDecoder,eu=200;function tu(t,e,r){let n=t.subarray(e,e+r);return Ql.decode(n)}function Na(t,e,r){return r>eu?tu(t,e,r):Qn(t,e,r)}var Be=class{type;data;constructor(e,r){this.type=e,this.data=r}};var _e=class t extends Error{constructor(e){super(e);let r=Object.create(t.prototype);Object.setPrototypeOf(this,r),Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:t.name})}};function Sa(t,e,r){let n=r/4294967296,s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function nn(t,e,r){let n=Math.floor(r/4294967296),s=r;t.setUint32(e,n),t.setUint32(e+4,s)}function sn(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Oa(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var es=-1,ru=4294967296-1,nu=17179869184-1;function ts({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=nu)if(e===0&&t<=ru){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,s=new Uint8Array(8),a=new DataView(s.buffer);return a.setUint32(0,e<<2|r&3),a.setUint32(4,n),s}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),nn(n,4,t),r}}function rs(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,s=Math.floor(n/1e9);return{sec:r+s,nsec:n-s*1e9}}function ns(t){if(t instanceof Date){let e=rs(t);return ts(e)}else return null}function ss(t){let e=new DataView(t.buffer,t.byteOffset,t.byteLength);switch(t.byteLength){case 4:return{sec:e.getUint32(0),nsec:0};case 8:{let r=e.getUint32(0),n=e.getUint32(4),s=(r&3)*4294967296+n,a=r>>>2;return{sec:s,nsec:a}}case 12:{let r=sn(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new _e(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function as(t){let e=ss(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Ba={type:es,encode:ns,decode:as};var ot=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Ba)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let s=-1-e;this.builtInEncoders[s]=r,this.builtInDecoders[s]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let s=this.builtInEncoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=-1-n;return new Be(i,a)}}}for(let n=0;n<this.encoders.length;n++){let s=this.encoders[n];if(s!=null){let a=s(e,r);if(a!=null){let i=n;return new Be(i,a)}}}return e instanceof Be?e:null}decode(e,r,n){let s=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return s?s(e,r,n):new Be(r,e)}};function su(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function cr(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):su(t)?new Uint8Array(t):Uint8Array.from(t)}var au=100,iu=2048,Mt=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??au,this.initialBufferSize=e?.initialBufferSize??iu,this.sortKeys=e?.sortKeys??!1,this.forceFloat32=e?.forceFloat32??!1,this.ignoreUndefined=e?.ignoreUndefined??!1,this.forceIntegerToFloat=e?.forceIntegerToFloat??!1,this.pos=0,this.view=new DataView(new ArrayBuffer(this.initialBufferSize)),this.bytes=new Uint8Array(this.view.buffer)}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,maxDepth:this.maxDepth,initialBufferSize:this.initialBufferSize,sortKeys:this.sortKeys,forceFloat32:this.forceFloat32,ignoreUndefined:this.ignoreUndefined,forceIntegerToFloat:this.forceIntegerToFloat})}reinitializeState(){this.pos=0}encodeSharedRef(e){if(this.entered)return this.clone().encodeSharedRef(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.subarray(0,this.pos)}finally{this.entered=!1}}encode(e){if(this.entered)return this.clone().encode(e);try{return this.entered=!0,this.reinitializeState(),this.doEncode(e,1),this.bytes.slice(0,this.pos)}finally{this.entered=!1}}doEncode(e,r){if(r>this.maxDepth)throw new Error(`Too deep objects in depth ${r}`);e==null?this.encodeNil():typeof e=="boolean"?this.encodeBoolean(e):typeof e=="number"?this.forceIntegerToFloat?this.encodeNumberAsFloat(e):this.encodeNumber(e):typeof e=="string"?this.encodeString(e):this.useBigInt64&&typeof e=="bigint"?this.encodeBigInt64(e):this.encodeObject(e,r)}ensureBufferSizeToWrite(e){let r=this.pos+e;this.view.byteLength<r&&this.resizeBuffer(r*2)}resizeBuffer(e){let r=new ArrayBuffer(e),n=new Uint8Array(r),s=new DataView(r);n.set(this.bytes),this.view=s,this.bytes=n}encodeNil(){this.writeU8(192)}encodeBoolean(e){e===!1?this.writeU8(194):this.writeU8(195)}encodeNumber(e){!this.forceIntegerToFloat&&Number.isSafeInteger(e)?e>=0?e<128?this.writeU8(e):e<256?(this.writeU8(204),this.writeU8(e)):e<65536?(this.writeU8(205),this.writeU16(e)):e<4294967296?(this.writeU8(206),this.writeU32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(207),this.writeU64(e)):e>=-32?this.writeU8(224|e+32):e>=-128?(this.writeU8(208),this.writeI8(e)):e>=-32768?(this.writeU8(209),this.writeI16(e)):e>=-2147483648?(this.writeU8(210),this.writeI32(e)):this.useBigInt64?this.encodeNumberAsFloat(e):(this.writeU8(211),this.writeI64(e)):this.encodeNumberAsFloat(e)}encodeNumberAsFloat(e){this.forceFloat32?(this.writeU8(202),this.writeF32(e)):(this.writeU8(203),this.writeF64(e))}encodeBigInt64(e){e>=BigInt(0)?(this.writeU8(207),this.writeBigUint64(e)):(this.writeU8(211),this.writeBigInt64(e))}writeStringHeader(e){if(e<32)this.writeU8(160+e);else if(e<256)this.writeU8(217),this.writeU8(e);else if(e<65536)this.writeU8(218),this.writeU16(e);else if(e<4294967296)this.writeU8(219),this.writeU32(e);else throw new Error(`Too long string: ${e} bytes in UTF-8`)}encodeString(e){let n=Ta(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Ca(e,this.bytes,this.pos),this.pos+=n}encodeObject(e,r){let n=this.extensionCodec.tryToEncode(e,this.context);if(n!=null)this.encodeExtension(n);else if(Array.isArray(e))this.encodeArray(e,r);else if(ArrayBuffer.isView(e))this.encodeBinary(e);else if(typeof e=="object")this.encodeMap(e,r);else throw new Error(`Unrecognized object: ${Object.prototype.toString.apply(e)}`)}encodeBinary(e){let r=e.byteLength;if(r<256)this.writeU8(196),this.writeU8(r);else if(r<65536)this.writeU8(197),this.writeU16(r);else if(r<4294967296)this.writeU8(198),this.writeU32(r);else throw new Error(`Too large binary: ${r}`);let n=cr(e);this.writeU8a(n)}encodeArray(e,r){let n=e.length;if(n<16)this.writeU8(144+n);else if(n<65536)this.writeU8(220),this.writeU16(n);else if(n<4294967296)this.writeU8(221),this.writeU32(n);else throw new Error(`Too large array: ${n}`);for(let s of e)this.doEncode(s,r+1)}countWithoutUndefined(e,r){let n=0;for(let s of r)e[s]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let s=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(s<16)this.writeU8(128+s);else if(s<65536)this.writeU8(222),this.writeU16(s);else if(s<4294967296)this.writeU8(223),this.writeU32(s);else throw new Error(`Too large map object: ${s}`);for(let a of n){let i=e[a];this.ignoreUndefined&&i===void 0||(this.encodeString(a),this.doEncode(i,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),s=n.length;if(s>=4294967296)throw new Error(`Too large extension object: ${s}`);this.writeU8(201),this.writeU32(s),this.writeI8(e.type),this.writeU8a(n);return}let r=e.data.length;if(r===1)this.writeU8(212);else if(r===2)this.writeU8(213);else if(r===4)this.writeU8(214);else if(r===8)this.writeU8(215);else if(r===16)this.writeU8(216);else if(r<256)this.writeU8(199),this.writeU8(r);else if(r<65536)this.writeU8(200),this.writeU16(r);else if(r<4294967296)this.writeU8(201),this.writeU32(r);else throw new Error(`Too large extension object: ${r}`);this.writeI8(e.type),this.writeU8a(e.data)}writeU8(e){this.ensureBufferSizeToWrite(1),this.view.setUint8(this.pos,e),this.pos++}writeU8a(e){let r=e.length;this.ensureBufferSizeToWrite(r),this.bytes.set(e,this.pos),this.pos+=r}writeI8(e){this.ensureBufferSizeToWrite(1),this.view.setInt8(this.pos,e),this.pos++}writeU16(e){this.ensureBufferSizeToWrite(2),this.view.setUint16(this.pos,e),this.pos+=2}writeI16(e){this.ensureBufferSizeToWrite(2),this.view.setInt16(this.pos,e),this.pos+=2}writeU32(e){this.ensureBufferSizeToWrite(4),this.view.setUint32(this.pos,e),this.pos+=4}writeI32(e){this.ensureBufferSizeToWrite(4),this.view.setInt32(this.pos,e),this.pos+=4}writeF32(e){this.ensureBufferSizeToWrite(4),this.view.setFloat32(this.pos,e),this.pos+=4}writeF64(e){this.ensureBufferSizeToWrite(8),this.view.setFloat64(this.pos,e),this.pos+=8}writeU64(e){this.ensureBufferSizeToWrite(8),Sa(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),nn(this.view,this.pos,e),this.pos+=8}writeBigUint64(e){this.ensureBufferSizeToWrite(8),this.view.setBigUint64(this.pos,e),this.pos+=8}writeBigInt64(e){this.ensureBufferSizeToWrite(8),this.view.setBigInt64(this.pos,e),this.pos+=8}};function an(t,e){return new Mt(e).encodeSharedRef(t)}function on(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var ou=16,lu=16,ln=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=ou,r=lu){this.maxKeyLength=e,this.maxLengthPerKey=r,this.caches=[];for(let n=0;n<this.maxKeyLength;n++)this.caches.push([])}canBeCached(e){return e>0&&e<=this.maxKeyLength}find(e,r,n){let s=this.caches[n-1];e:for(let a of s){let i=a.bytes;for(let o=0;o<n;o++)if(i[o]!==e[r+o])continue e;return a.str}return null}store(e,r){let n=this.caches[e.length-1],s={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=s:n.push(s)}decode(e,r,n){let s=this.find(e,r,n);if(s!=null)return this.hit++,s;this.miss++;let a=Qn(e,r,n),i=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(i,a),a}};var is="array",pr="map_key",Ma="map_value",uu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new _e("The type of key must be string or number but "+typeof t)},os=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=is,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=pr,r.readCount=0,r.size=e,r.map={}}getUninitializedStateFromPool(){if(this.stackHeadPosition++,this.stackHeadPosition===this.stack.length){let e={type:void 0,size:0,array:void 0,position:0,readCount:0,map:void 0,key:null};this.stack.push(e)}return this.stack[this.stackHeadPosition]}release(e){if(this.stack[this.stackHeadPosition]!==e)throw new Error("Invalid stack state. Released state is not on top of the stack.");if(e.type===is){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===pr||e.type===Ma){let n=e;n.size=0,n.map=void 0,n.readCount=0,n.type=void 0}this.stackHeadPosition--}reset(){this.stack.length=0,this.stackHeadPosition=-1}},fr=-1,ls=new DataView(new ArrayBuffer(0)),cu=new Uint8Array(ls.buffer);try{ls.getInt8(0)}catch(t){if(!(t instanceof RangeError))throw new Error("This module is not supported in the current JavaScript engine because DataView does not throw RangeError on out-of-bounds access")}var Ia=new RangeError("Insufficient data"),du=new ln,Ie=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ls;bytes=cu;headByte=fr;stack=new os;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??ot.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.rawStrings=e?.rawStrings??!1,this.maxStrLength=e?.maxStrLength??4294967295,this.maxBinLength=e?.maxBinLength??4294967295,this.maxArrayLength=e?.maxArrayLength??4294967295,this.maxMapLength=e?.maxMapLength??4294967295,this.maxExtLength=e?.maxExtLength??4294967295,this.keyDecoder=e?.keyDecoder!==void 0?e.keyDecoder:du,this.mapKeyConverter=e?.mapKeyConverter??uu}clone(){return new t({extensionCodec:this.extensionCodec,context:this.context,useBigInt64:this.useBigInt64,rawStrings:this.rawStrings,maxStrLength:this.maxStrLength,maxBinLength:this.maxBinLength,maxArrayLength:this.maxArrayLength,maxMapLength:this.maxMapLength,maxExtLength:this.maxExtLength,keyDecoder:this.keyDecoder})}reinitializeState(){this.totalPos=0,this.headByte=fr,this.stack.reset()}setBuffer(e){let r=cr(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===fr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=cr(e),s=new Uint8Array(r.length+n.length);s.set(r),s.set(n,r.length),this.setBuffer(s)}}hasRemaining(e){return this.view.byteLength-this.pos>=e}createExtraByteError(e){let{view:r,pos:n}=this;return new RangeError(`Extra ${r.byteLength-n} of ${r.byteLength} byte(s) found at buffer[${e}]`)}decode(e){if(this.entered)return this.clone().decode(e);try{this.entered=!0,this.reinitializeState(),this.setBuffer(e);let r=this.doDecodeSync();if(this.hasRemaining(1))throw this.createExtraByteError(this.pos);return r}finally{this.entered=!1}}*decodeMulti(e){if(this.entered){yield*this.clone().decodeMulti(e);return}try{for(this.entered=!0,this.reinitializeState(),this.setBuffer(e);this.hasRemaining(1);)yield this.doDecodeSync()}finally{this.entered=!1}}async decodeAsync(e){if(this.entered)return this.clone().decodeAsync(e);try{this.entered=!0;let r=!1,n;for await(let o of e){if(r)throw this.entered=!1,this.createExtraByteError(this.totalPos);this.appendBuffer(o);try{n=this.doDecodeSync(),r=!0}catch(l){if(!(l instanceof RangeError))throw l}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:s,pos:a,totalPos:i}=this;throw new RangeError(`Insufficient data in parsing ${on(s)} at ${i} (${a} in the current buffer)`)}finally{this.entered=!1}}decodeArrayStream(e){return this.decodeMultiAsync(e,!0)}decodeStream(e){return this.decodeMultiAsync(e,!1)}async*decodeMultiAsync(e,r){if(this.entered){yield*this.clone().decodeMultiAsync(e,r);return}try{this.entered=!0;let n=r,s=-1;for await(let a of e){if(r&&s===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(a),n&&(s=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--s!==0;);}catch(i){if(!(i instanceof RangeError))throw i}this.totalPos+=this.pos}}finally{this.entered=!1}}doDecodeSync(){e:for(;;){let e=this.readHeadByte(),r;if(e>=224)r=e-256;else if(e<192)if(e<128)r=e;else if(e<144){let s=e-128;if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e<160){let s=e-144;if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else{let s=e-160;r=this.decodeString(s,0)}else if(e===192)r=null;else if(e===194)r=!1;else if(e===195)r=!0;else if(e===202)r=this.readF32();else if(e===203)r=this.readF64();else if(e===204)r=this.readU8();else if(e===205)r=this.readU16();else if(e===206)r=this.readU32();else if(e===207)this.useBigInt64?r=this.readU64AsBigInt():r=this.readU64();else if(e===208)r=this.readI8();else if(e===209)r=this.readI16();else if(e===210)r=this.readI32();else if(e===211)this.useBigInt64?r=this.readI64AsBigInt():r=this.readI64();else if(e===217){let s=this.lookU8();r=this.decodeString(s,1)}else if(e===218){let s=this.lookU16();r=this.decodeString(s,2)}else if(e===219){let s=this.lookU32();r=this.decodeString(s,4)}else if(e===220){let s=this.readU16();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===221){let s=this.readU32();if(s!==0){this.pushArrayState(s),this.complete();continue e}else r=[]}else if(e===222){let s=this.readU16();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===223){let s=this.readU32();if(s!==0){this.pushMapState(s),this.complete();continue e}else r={}}else if(e===196){let s=this.lookU8();r=this.decodeBinary(s,1)}else if(e===197){let s=this.lookU16();r=this.decodeBinary(s,2)}else if(e===198){let s=this.lookU32();r=this.decodeBinary(s,4)}else if(e===212)r=this.decodeExtension(1,0);else if(e===213)r=this.decodeExtension(2,0);else if(e===214)r=this.decodeExtension(4,0);else if(e===215)r=this.decodeExtension(8,0);else if(e===216)r=this.decodeExtension(16,0);else if(e===199){let s=this.lookU8();r=this.decodeExtension(s,1)}else if(e===200){let s=this.lookU16();r=this.decodeExtension(s,2)}else if(e===201){let s=this.lookU32();r=this.decodeExtension(s,4)}else throw new _e(`Unrecognized type byte: ${on(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let s=n.top();if(s.type===is)if(s.array[s.position]=r,s.position++,s.position===s.size)r=s.array,n.release(s);else continue e;else if(s.type===pr){if(r==="__proto__")throw new _e("The key __proto__ is not allowed");s.key=this.mapKeyConverter(r),s.type=Ma;continue e}else if(s.map[s.key]=r,s.readCount++,s.readCount===s.size)r=s.map,n.release(s);else{s.key=null,s.type=pr;continue e}}return r}}readHeadByte(){return this.headByte===fr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=fr}readArraySize(){let e=this.readHeadByte();switch(e){case 220:return this.readU16();case 221:return this.readU32();default:{if(e<160)return e-144;throw new _e(`Unrecognized array type byte: ${on(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new _e(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new _e(`Max length exceeded: array length (${e}) > maxArrayLength (${this.maxArrayLength})`);this.stack.pushArrayState(e)}decodeString(e,r){return!this.rawStrings||this.stateIsMapKey()?this.decodeUtf8String(e,r):this.decodeBinary(e,r)}decodeUtf8String(e,r){if(e>this.maxStrLength)throw new _e(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Ia;let n=this.pos+r,s;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?s=this.keyDecoder.decode(this.bytes,n,e):s=Na(this.bytes,n,e),this.pos+=r+e,s}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===pr:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new _e(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Ia;let n=this.pos+r,s=this.bytes.subarray(n,n+e);return this.pos+=r+e,s}decodeExtension(e,r){if(e>this.maxExtLength)throw new _e(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),s=this.decodeBinary(e,r+1);return this.extensionCodec.decode(s,n,this.context)}lookU8(){return this.view.getUint8(this.pos)}lookU16(){return this.view.getUint16(this.pos)}lookU32(){return this.view.getUint32(this.pos)}readU8(){let e=this.view.getUint8(this.pos);return this.pos++,e}readI8(){let e=this.view.getInt8(this.pos);return this.pos++,e}readU16(){let e=this.view.getUint16(this.pos);return this.pos+=2,e}readI16(){let e=this.view.getInt16(this.pos);return this.pos+=2,e}readU32(){let e=this.view.getUint32(this.pos);return this.pos+=4,e}readI32(){let e=this.view.getInt32(this.pos);return this.pos+=4,e}readU64(){let e=Oa(this.view,this.pos);return this.pos+=8,e}readI64(){let e=sn(this.view,this.pos);return this.pos+=8,e}readU64AsBigInt(){let e=this.view.getBigUint64(this.pos);return this.pos+=8,e}readI64AsBigInt(){let e=this.view.getBigInt64(this.pos);return this.pos+=8,e}readF32(){let e=this.view.getFloat32(this.pos);return this.pos+=4,e}readF64(){let e=this.view.getFloat64(this.pos);return this.pos+=8,e}};function Ra(t,e){return new Ie(e).decode(t)}function La(t,e){return new Ie(e).decodeMulti(t)}function fu(t){return t[Symbol.asyncIterator]!=null}async function*pu(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function un(t){return fu(t)?t:pu(t)}async function $a(t,e){let r=un(t);return new Ie(e).decodeAsync(r)}function Fa(t,e){let r=un(t);return new Ie(e).decodeArrayStream(r)}function Ua(t,e){let r=un(t);return new Ie(e).decodeStream(r)}var Cn=sa(Os(),1),Bs=ka,Is=xa,ze=us,zi=Cn.DOMParser,Hi=Cn.XMLSerializer;var Wi=ze!==null;function Xi(){if(!Wi)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Gi=fd();function fd(){if(!Wi)return null;let t=new TextEncoder,e=new TextDecoder,r=new ze.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let s=At(n);if(s==="D"||s==="H")return null}return ze.encodeTimestampExtension(n)},decode:n=>ze.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>Ne(n)?t.encode(n.toString()):null,decode:n=>Nn(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&&At(n)==="D"){let s=n.getUTCFullYear(),a=String(n.getUTCMonth()+1).padStart(2,"0"),i=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${s}-${a}-${i}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&&At(n)==="H"){let s=String(n.getUTCHours()).padStart(2,"0"),a=String(n.getUTCMinutes()).padStart(2,"0"),i=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${s}:${a}:${i}.${o}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf("."),i=a>=0?s.substring(0,a):s,o=a>=0?s.substring(a+1):"0",[l,u,c]=i.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+l,+u,+c,d))}}),r.register({type:4,encode:n=>{let s=Ms(n);if(s!==null){let[a,i]=s;return t.encode(`${a}:${i(n)}`)}return null},decode:n=>{let s=e.decode(n),a=s.indexOf(":"),i=s.slice(0,a),o=s.slice(a+1),l=ht[i];if(l!==void 0){let[,u]=l;return u(o)}return`${o}::${i}`}}),r}function Yi(t){return Xi(),ze.encode(t,{extensionCodec:Gi})}function Zi(t){return Xi(),ze.decode(t,{extensionCodec:Gi})}function On(t,e=!1){let r=Bn(t);if(r===null)return[!1,String(t)];let[n,s,a]=r;return a&&!e?[!1,String(t)]:[!0,`${s(t)}::${n}`]}function Rs(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),s=ht[n];if(s===void 0)return[!1,t];let[,a]=s;return[!0,a(r)]}function Sn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[s,a]of Object.entries(t))n[s]=Sn(a,e,r);return n}return Array.isArray(t)?t.map(n=>Sn(n,e,r)):r(t)?e(t):t}function Ls(t){let e=Bn(t);if(e!==null){let[r,n,s]=e;return s?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(s=>{let[a,i]=Ls(s);return i&&(r=!0),a}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[s,a]of Object.entries(t)){let[i,o]=Ls(a);o&&(r=!0),n[s]=i}return[n,r]}return[t,!1]}function pd(t,e=!1){let[r,n]=On(t,e);if(r)return n;let[s,a]=Ls(t),i=JSON.stringify(s);return a?`${i}::JS`:i}function hd(t){return JSON.stringify(t)}function md(t){if(!ze)throw new Error("@msgpack/msgpack is required for MessagePack support");return ze.encode(t)}function xe(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:s=!1}={}){if(n)return`${Ki(t)}::QS`;if(r){if(e===null||e==="json")return hd(t);if(e==="msgpack")return md(t);throw e==="xml"?new Error("raw=true is not supported for XML transport"):new Error(`Unknown transport: ${e}`)}if(e===null||e==="json"){let a=pd(t,s);return e==="json"?`"${a}"`:a}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Ji(t)}</tytx_root>`;if(e==="msgpack")return Yi(t);throw new Error(`Unknown transport: ${e}`)}}var Qt,$s;typeof window<"u"&&window.DOMParser?(Qt=window.DOMParser,$s=window.XMLSerializer):(Qt=zi,$s=Hi);function Qi(t){if(t===null||typeof t!="object"||Array.isArray(t))return!1;let e=Object.keys(t);if(e.length!==1)return!1;let r=t[e[0]];return r!==null&&typeof r=="object"&&"value"in r}function eo(t,e,r){let n=t.createElement(e),s=r.attrs||{},a=r.value;for(let[i,o]of Object.entries(s))n.setAttribute(i,xe(o,null,{_forceSuffix:!0}));if(Array.isArray(a))for(let i of a)if(Qi(i)){let[o]=Object.keys(i),l=i[o],u=eo(t,o,l);n.appendChild(u)}else{n.textContent=xe(a);break}else n.textContent=xe(a);return n}function Ji(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(Qi(t)){let[e]=Object.keys(t),r=t[e],n=new Qt().parseFromString("<root/>","text/xml"),s=eo(n,e,r);return new $s().serializeToString(s)}else return xe(t)}function Fs(t){let e={};for(let n=0;n<t.attributes.length;n++){let s=t.attributes[n];e[s.name]=ue(s.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let s=t.childNodes[n];s.nodeType===1&&r.push(s)}if(r.length>0)if(r.length===1){let n=r[0],s=Fs(n);return{attrs:e,value:{[n.tagName]:s}}}else{let n=[];for(let s of r){let a=Fs(s);n.push({[s.tagName]:a})}return{attrs:e,value:n}}return{attrs:e,value:ue(t.textContent)}}function to(t){if(!Qt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new Qt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let a=null;for(let i=0;i<n.childNodes.length;i++)if(n.childNodes[i].nodeType===1){a=n.childNodes[i];break}if(!a)return ue(n.textContent);n=a}let s=Fs(n);return{[n.tagName]:s}}function _d(t){return typeof t=="string"}function gd(t){let[e,r]=Rs(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let s;try{s=JSON.parse(n)}catch{return t}return Sn(s,bd,_d)}function bd(t){return t.includes("::")?Rs(t)[1]:t}function wd(t){let e=to(t);return typeof e=="string"?ue(e):e}function yd(t){return Zi(t)}function ue(t,e=null){if(t===null)return null;if(e===null||e==="json"){let r=t;return e==="json"&&t.startsWith('"')&&t.endsWith('"')&&(r=t.slice(1,-1)),gd(r)}else{if(e==="xml")return wd(t);if(e==="msgpack")return yd(t);throw new Error(`Unknown transport: ${e}`)}}function Ki(t){if(Array.isArray(t))return t.map(e=>String(e)).join("&");if(t!==null&&typeof t=="object"){let e=[];for(let[r,n]of Object.entries(t)){let[s,a]=On(n,!0);s?e.push(`${r}=${a}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function ro(t){if(!t)return[];let e=t.split("&"),r=e.map(i=>i.includes("=")),n=r.every(Boolean),s=!r.some(Boolean);if(!n&&!s)throw new Error("QS format error: mixed items with and without '='");if(s)return e.map(i=>ue(i));let a={};for(let i of e){let o=i.indexOf("="),l=i.slice(0,o),u=i.slice(o+1);a[l]=ue(u)}return a}var so=Bs||Is||Number,vd=Bs?"decimal.js":Is?"big.js":"number";function Nn(t){return new so(t)}function Ne(t){return vd==="number"?!1:t instanceof so}function At(t){let e=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,r=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;return e&&!r?"H":r&&!e?"D":"DHZ"}function kd(t){return t.toString()}function Ed(t){let e=t.getUTCFullYear(),r=String(t.getUTCMonth()+1).padStart(2,"0"),n=String(t.getUTCDate()).padStart(2,"0");return`${e}-${r}-${n}`}function Dd(t){return t.toISOString()}function Ad(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),s=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${s}`}function xd(t){return t?"true":"false"}function Td(t){return t.toString()}function Cd(t){return t.toString()}function Nd(t){let e="";for(let r=0;r<t.length;r+=32768)e+=String.fromCharCode.apply(null,t.subarray(r,r+32768));return btoa(e)}var In=[],Us=new Map;function Ms(t){if(t===null||typeof t!="object")return null;for(let e=Object.getPrototypeOf(t);e!==null;e=Object.getPrototypeOf(e))for(let[r,n,s,a]of In)if(r.prototype===e)return[n,s,a];return null}function Bn(t){if(t===null)return["NN",()=>"",!0];if(Ne(t))return["N",kd,!1];if(t instanceof Uint8Array)return["RAW",Nd,!1];if(t instanceof Date){let e=At(t);return e==="D"?["D",Ed,!1]:e==="H"?["H",Ad,!1]:["DHZ",Dd,!1]}return typeof t=="boolean"?["B",xd,!0]:typeof t=="number"?Number.isInteger(t)?["L",Td,!0]:["R",Cd,!0]:Ms(t)}function Sd(t){return Nn(t)}function Od(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function no(t){return new Date(t)}function Bd(t){let[e,r,n]=t.split(":"),[s,a]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(s),Number(a||0)))}function Id(t){return t.toLowerCase()==="true"}function Md(t){return parseInt(t,10)}function Rd(t){return parseFloat(t)}function Ld(t){return t}function $d(t){return null}var Fd=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Ud(t){if(!Fd.test(t))throw new Error(`RAW payload is not standard padded base64: '${t}'`);let e=atob(t),r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e.charCodeAt(n);return r}function Pd(t){return ro(t)}var qd=/^[A-Z]+$/,ht={N:[Object,Sd],D:[Date,Od],DH:[Date,no],DHZ:[Date,no],H:[Date,Bd],L:[Number,Md],R:[Number,Rd],T:[String,Ld],B:[Boolean,Id],QS:[Object,Pd],NN:[null,$d],RAW:[Uint8Array,Ud]};function Ir(t){return Object.hasOwn(ht,t)?ht[t][0]:null}function Ps(t,e,r,n,s=!1){if(typeof e!="string"||!qd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let a=ht[e];if(a!==void 0&&a[0]!==t){let i=a[0]===null?"null":a[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${i}`)}In=In.filter(([i])=>i!==t),In.push([t,e,r,s]),ht[e]=[t,n]}function Mr(t,e){Us.set(t,e)}function Je(t){return Us.has(t)?Us.get(t):{}}var ao={network:{maxAttempts:3,delay:1,backoff:2,jitter:!0,on:["TypeError","NetworkError","AbortError"]},aggressive:{maxAttempts:5,delay:.5,backoff:2,jitter:!0,on:["Error"]},gentle:{maxAttempts:2,delay:2,backoff:1.5,jitter:!1,on:["TypeError","NetworkError"]}};function Vd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?ao[e]||null:e}function zd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function Hd(t){return new Promise(e=>setTimeout(e,t))}async function Wd(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,s=e.backoff||2,a=e.jitter!==!1,i=e.on||["Error"],o=null,l=n*1e3;for(let u=0;u<r;u++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,u<r-1&&zd(c,i)){let d=l;a&&(d*=1+Math.random()*.1),await Hd(d),l*=s}else throw c}throw o}var ce=class t{static classKwargs={cacheTime:0,readOnly:!1,asBag:null,retryPolicy:null};static classArgs=[];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy"]);constructor(e={}){let n={...this.constructor.classKwargs,...e};for(let a of["interval","reactive"])if(Object.hasOwn(n,a))throw new TypeError(`Removed resolver option: ${a}. Schedule updates in the application; use reset() and read explicitly.`);this.cacheTime=n.cacheTime,this._readOnly=n.readOnly,this._asBag=n.asBag,this._retryPolicy=n.retryPolicy,this._kw={};let s=this.constructor.internalParams;for(let[a,i]of Object.entries(n))s.has(a)||(this._kw[a]=i);this._lastUpdate=null,this._node=null,this._lastEffectiveFingerprint=null,this._cachedValue=null,this.init()}init(){}setNode(e){e!==this._node&&!this.readOnly&&this._lastUpdate!==null&&this.reset(),this._node=e,this.onSetResolver(e)}onSetResolver(e){}get node(){return this._node}get cacheTime(){return this._cacheTime}set cacheTime(e){if(typeof e=="boolean")throw new TypeError("cacheTime must be numeric; use a negative value for infinite caching");this._cacheTime=e}get readOnly(){return this._readOnly}get expired(){return this._cacheTime<0?this._lastUpdate===null:this._cacheTime===0||this._lastUpdate===null?!0:(Date.now()-this._lastUpdate)/1e3>this._cacheTime}reset(...e){if(e.length)throw new TypeError("reset() takes no arguments. It invalidates the cache for the next explicit read.");this._lastUpdate=null,this._lastEffectiveFingerprint=null}get cachedValue(){return!this.readOnly&&this._node?this._node._value:this._cachedValue}set cachedValue(e){!this.readOnly&&this._node?this._node.setValue(e,!1):this._cachedValue=e}_computeEffectiveFingerprint(e){return JSON.stringify(Object.entries(e).sort())}_buildEffectiveKw(){let e={...this._kw};if(this._node&&this._node.attr)for(let r of Object.keys(this._kw))Object.hasOwn(this._node.attr,r)&&(e[r]=this._node.attr[r]);return e}resolve(e={}){let{static:r=!1,...n}=e;if(r)return this._node?this._node._value:this.cachedValue;let s=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...s,...n},i=>this._prepareValue(i));let a=this._computeEffectiveFingerprint(s);return a===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=a,this._load(s,i=>this._finalize(i)))}_load(e,r){let n=Vd(this),s=()=>this.load(e);if(n)return Wd(s,n).then(r);let a=s();return a&&typeof a.then=="function"?a.then(r):r(a)}_finalize(e){return e=this._prepareValue(e),this._lastUpdate=Date.now(),(!this.readOnly||this.cacheTime!==0)&&(this.cachedValue=e),e}_prepareValue(e){let r;return this._asBag===!0?r=!0:this._asBag===!1?r=!1:r=!this._readOnly,r&&e!==null&&e!==void 0&&(e=this._convertToBag(e)),e}_convertToBag(e){let r=t._BagClass;if(!r||e&&typeof e._htraverse=="function")return e;if(typeof e=="string"){if(e=e.trim(),e.startsWith("<")&&r.fromXml)return r.fromXml(e);if((e.startsWith("{")||e.startsWith("["))&&r.fromTytx)return r.fromTytx(e)}return e}static registerBagClass(e){t._BagClass=e}load(e){return null}};ce._BagClass=null;var Rr=class extends ce{static classKwargs={cacheTime:0,readOnly:!1,asBag:!1,retryPolicy:null,callback:null};static classArgs=["callback"];static internalParams=new Set(["cacheTime","readOnly","asBag","retryPolicy","callback"]);constructor(e={}){typeof e=="function"&&(e={callback:e}),super(e),this._callback=e.callback||null}load(e){return this._callback?this._callback.call(this,e):null}};var Ke=class t{constructor(e,r,n=null,s=null,a=null,i=null,o=null,l=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=i,this.xmlTag=o,this._compiled=null,this.parentBag=e,s&&this.setAttr(s,!1,!0,l),n!==null&&this.setValue(n,!1),a&&(this.resolver=a)}get parentBag(){return this._parentBag}set parentBag(e){e===null&&this._value?.parentNode===this&&this._value.setBackref(),this._parentBag=e,e?.backref&&this._value&&typeof this._value._htraverse=="function"&&this._value.setBackref(this,e)}get value(){return this.getValue()}set value(e){this.setValue(e)}getValue(e=!1,r=null,n={}){if(r!==null){let s=ue(`${r}::QS`);if(Array.isArray(s)){let a=s.length?s:Object.keys(this._attr),i=a.map(l=>{let u=this.getAttr(l);return!e&&u instanceof ce?u.resolve():u}),o=l=>s.length===0?Object.fromEntries(a.map((u,c)=>[u,l[c]])):l.length===1?l[0]:l;return i.some(l=>l&&typeof l.then=="function")?Promise.all(i).then(o):o(i)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...s}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,s=null,a=!0,i=null,o=!1){e instanceof ce?(this.resolver=e,e=null):e instanceof t&&(n=n||{},Object.assign(n,e._attr),e.resolver&&(this.resolver=e.resolver),e=e._value);let l=this._value;l!==e&&l?.parentNode===this&&l.setBackref(),this._value=e;let u=l!==this._value,c=r??!0,d=null;if(n!==null){let p={...this._attr};this.setAttr(n,!1,s,a);let h=this._buildAttrDiff(p,this._attr);d=Object.keys(h).length>0?h:null}r=c&&(u||d!==null);let f=d?u?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,l,c),r){let p=d!==null?{oldvalue:l,attrs_diff:d}:{oldvalue:l};for(let h of Object.values(this._nodeSubscribers))h({node:this,info:p,evt:f})}this._parentBag!==null&&this._parentBag.backref&&(e&&typeof e._htraverse=="function"&&e.setBackref(this,this._parentBag),r&&this._parentBag._onNodeChanged(this,[this.label],f,l,d,i,o))}replace(e){if(!(e instanceof t))throw new TypeError("BagNode.replace expects a BagNode");if(e===this)return this;let r=e.staticValue;r&&typeof r._htraverse=="function"&&(r=r.createChildBag().replace(r));let n=null;e.resolver&&(n=Object.create(Object.getPrototypeOf(e.resolver),Object.getOwnPropertyDescriptors(e.resolver)),n._node=null,n._kw={...e.resolver._kw});let s=this._value,a={...this._attr},i=this.resolver;i&&i._node===this&&(i._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(a,this._attr),l=Object.keys(o).length?o:null,u=s!==r||i!==n;if(u||l){let c=l?u?"upd_value_attr":"upd_attrs":"upd_value",d=l?{oldvalue:s,attrs_diff:l}:{oldvalue:s};for(let f of Object.values(this._nodeSubscribers))f({node:this,info:d,evt:c});this._parentBag!==null&&this._parentBag.backref&&this._parentBag._onNodeChanged(this,[this.label],c,s,l)}return this}get staticValue(){return this._value}set staticValue(e){this._value=e}get resolver(){return this._resolver}set resolver(e){this._resolver=e,e&&e.setNode&&e.setNode(this)}resetResolver(){if(!this._resolver)throw new Error("Cannot reset resolver: node has no resolver");this._resolver.reset(),this.setValue(null)}get attr(){return this._attr}getAttr(e=null,r=null){return e?e in this._attr?this._attr[e]:r:this._attr}_buildAttrDiff(e,r){let n={},s=new Set([...Object.keys(e),...Object.keys(r)]);for(let a of s){let i=a in e?e[a]:null,o=a in r?r[a]:null;i!==o&&(n[a]={old:i,new:o})}return n}setAttr(e=null,r=!0,n=!0,s=!0){let a=e||{},i=Object.keys(this._nodeSubscribers).length>0,l=r&&(i||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,a):this._attr={...a},s)for(let u of Object.keys(this._attr))this._attr[u]===null&&delete this._attr[u];if(r&&l!==null){let u=this._buildAttrDiff(l,this._attr);if(Object.keys(u).length>0&&i)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:u},evt:"upd_attrs"});if(Object.keys(u).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,u,c)}}}delAttr(...e){for(let r of e)if(typeof r=="string"&&r.includes(","))for(let n of r.split(","))delete this._attr[n.trim()];else delete this._attr[r]}hasAttr(e,r=null){return e in this._attr?r!==null?this._attr[e]===r:!0:!1}getInheritedAttributes(){let e={};return this._parentBag&&this._parentBag.parentNode&&(e=this._parentBag.parentNode.getInheritedAttributes()),{...e,...this._attr}}subscribe(e,r){this._nodeSubscribers[e]=r}unsubscribe(e){delete this._nodeSubscribers[e]}get compiled(){return this._compiled||(this._compiled={}),this._compiled}get isBranch(){return this._value!=null&&typeof this._value._htraverse=="function"}get position(){return this._parentBag===null?null:this._parentBag._nodes.index(this.label)}get fullpath(){if(this._parentBag!==null){let e=this._parentBag.fullpath;return e?`${e}.${this.label}`:this.label}return null}get parentNode(){return this._parentBag?this._parentBag.parentNode:null}attributeOwnerNode(e,r=null){let n=this;if(r===null)for(;n&&!(e in n._attr);)n=n.parentNode;else for(;n&&n._attr[e]!==r;)n=n.parentNode;return n}asTuple(){return[this.label,this.value,this._attr,this._resolver||null]}isEqual(e){if(!(e instanceof t)||this.label!==e.label)return!1;let r=Object.keys(this._attr),n=Object.keys(e._attr);if(r.length!==n.length)return!1;for(let s of r)if(this._attr[s]!==e._attr[s])return!1;return this._resolver!==null?this._resolver===e._resolver:this._value&&typeof this._value.equalTo=="function"?this._value.equalTo(e._value):this._value&&typeof this._value.isEqual=="function"?this._value.isEqual(e._value):this._value===e._value}diff(e){if(this.label!==e.label)return`Other label: ${e.label}`;let r=Object.keys(this._attr),n=Object.keys(e._attr);return r.length!==n.length||r.some(s=>this._attr[s]!==e._attr[s])?`attributes self:${JSON.stringify(this._attr)} --- other:${JSON.stringify(e._attr)}`:this._value!==e._value?`value self:${this._value} --- other:${e._value}`:null}toJson(e=!0){let r=this.value;return r&&typeof r.toJson=="function"&&(r=r.toJson(e,!0)),{label:this.label,value:r,attr:this._attr}}toString(){return`BagNode : ${this.label}`}};var Lr=class t{constructor(){this._dict=Object.create(null),this._list=[],this._parentBag=null}index(e){if(e in this._dict)return this._list.findIndex(n=>n.label===e);let r=e.match(/^#(\d+)$/);if(r){let n=parseInt(r[1],10);return n<this._list.length?n:-1}if(r=e.match(/^#(\w*)=(.*)$/),r){let[,n,s]=r,a=s.includes("::")?ue(s):s;return n?this._list.findIndex(i=>i.getAttr(n)===a):this._list.findIndex(i=>i._value===a)}return-1}_parsePosition(e){let r=this._list.length;if(e==null||e===">")return r;if(typeof e=="number")return e<0&&(e=r+e),Math.max(0,Math.min(e,r));if(e==="<")return 0;if(e.startsWith("#")){let n=this._parseSharpIndex(e.slice(1),e);return Math.min(n,r)}if(e.startsWith("<")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let a=this._parseSharpIndex(n.slice(1),e);return Math.min(a+1,r)}let s=this.index(n);if(s<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return s+1}throw new Error(`Invalid node_position '${e}': unrecognized syntax`)}_parseSharpIndex(e,r){if(!/^-?\d+$/.test(e))throw new Error(`Invalid node_position '${r}': '${e}' is not an integer`);let n=parseInt(e,10);if(n<0)throw new Error(`Invalid node_position '${r}': negative index not allowed in '#n' syntax`);return n}get(e){if(typeof e=="number")return e>=0&&e<this._list.length?this._list[e]:null;if(e.startsWith("#")){let r=this.index(e);return r>=0?this._list[r]:null}return this._dict[e]||null}set(e,r,n=">",s=null,a=null,i=null,o=!1,l=!0,u=null,c=!0,d=!1,f=null){let p=null;if(e.includes("?")&&([e,p]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(p){let m=p.split("&");if(m.length===1)s={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");s={};for(let g=0;g<m.length;g++)s[m[g]]=r[g]}r=null}let h=this._dict[e];if(h)f&&(h.nodeTag=f),i!==null&&(i===!1?h.resolver=null:h.resolver=i),p?h.setAttr(s,c,!0,l):h.setValue(r,c,s,o,l,u,d);else{let m=a&&a.nodeClass?a.nodeClass:Ke;h=new m(a,e,p?null:r,s,i,f,null,l);let g=this._parsePosition(n);this._dict[e]=h,this._list.splice(g,0,h),c&&a&&a.backref&&a._onNodeInserted(h,g,null,u,d)}return d&&h.setValue(null,!1),h}pop(e){let r=this.get(e);if(r){delete this._dict[r.label];let n=this._list.indexOf(r);return n>=0&&this._list.splice(n,1),r}return null}has(e){return e in this._dict}get length(){return this._list.length}clear(){this._dict=Object.create(null),this._list=[]}keys(){return this._list.map(e=>e.label)}values(){return this._list.map(e=>e.getValue())}items(){return this._list.map(e=>[e.label,e.getValue()])}[Symbol.iterator](){return this._list[Symbol.iterator]()}move(e,r,n=!0){if(r<0)return;let s=Array.isArray(e)?e:[e];if(s.length===0||r>=this._list.length)return;let a=this._list[r].label;if(s.length>1){let i=[...s].sort((c,d)=>c-d),o=i[0]<r?1:0,l=[];for(let c=i.length-1;c>=0;c--){let d=i[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),l.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let u=this.index(a);u<0&&(u=this._list.length),u+=o;for(let c of l)this._list.splice(u,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,u)}else{let i=s[0];if(i===r||i<0||i>=this._list.length)return;let o=this._list[i];this._list.splice(i,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,i),this._list.splice(r,0,o),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(o,r)}}isEqual(e){if(!(e instanceof t)||this._list.length!==e._list.length)return!1;for(let r=0;r<this._list.length;r++){let n=this._list[r],s=e._list[r];if(!n.isEqual(s))return!1}return!0}};var uo=sa(Os(),1);var qs="::RSLV:",Xd=new Map,Gd=new Map,Mn=new WeakMap,re=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},$r=class extends ce{constructor(e){super({asBag:!1}),Mn.set(this,e)}get payload(){return Mn.get(this)}load(){throw new re("This resolver is opaque; local execution is unavailable")}};function io(t){if(!t||typeof t!="object"||Array.isArray(t)||typeof t.resolver_module!="string"||typeof t.resolver_class!="string"||!Array.isArray(t.args??[])||!t.kwargs||typeof t.kwargs!="object"||Array.isArray(t.kwargs))throw new re("Invalid resolver description")}function oo(t,e=new Set){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(typeof t!="object"||e.has(t)||!Array.isArray(t)&&Object.getPrototypeOf(t)!==Object.prototype&&Object.getPrototypeOf(t)!==null)throw new re("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))oo(r,e);e.delete(t)}}function Fr(t){if(Mn.has(t))return Mn.get(t);let e=Gd.get(t.constructor);if(!e)throw new re(`Unregistered resolver: ${t.constructor.name}`);let r=e.encode(t),n={resolver_module:e.module,resolver_class:e.name,args:r.args??[],kwargs:r.kwargs??{}};return io(n),oo(n),qs+JSON.stringify(n)}function Rn(t){if(typeof t!="string"||!t.startsWith(qs))return null;let e=t.slice(qs.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new $r(t);let r;try{r=JSON.parse(e)}catch{throw new re("Invalid resolver JSON or signed token")}io(r);let n=Xd.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new $r(t);let s=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(s instanceof n.cls))throw new re("Resolver decoder returned an incompatible instance");return s}function Ln(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ce?Fr(r):r]))}function js(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Rn(r)??r]))}var Me="__cls";function er(t,e){return t!==null&&t.tytxSuffix===e?t:Ir(e)}function Yd(t){let e=t.tytxSuffix,r=Object.entries(Je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new re(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new re(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Vs(t,e){let r=Je(t);if(!Object.hasOwn(r,e))throw new re(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function zs(t,e){return t===e?null:Yd(t)}function*co(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let s=r.getValue(!0);!r.resolver&&s instanceof de&&(yield*co(s,n))}}function Zd(t){let e=t.toISOString(),r=t.getUTCFullYear()===1970&&t.getUTCMonth()===0&&t.getUTCDate()===1,n=t.getUTCHours()===0&&t.getUTCMinutes()===0&&t.getUTCSeconds()===0&&t.getUTCMilliseconds()===0;if(n&&!r)return e.slice(0,e.indexOf("T"));let s=e.replace(/\.000Z$/,"Z");return r&&!n?s.slice(s.indexOf("T")+1):s}function tr(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function mt(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(mt):tr(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,mt(r)])):t}function Hs(t){if(!tr(t))throw new TypeError("Bag options must be an object");let{recursive:e=!0}=t;if(typeof e!="boolean")throw new TypeError("recursive must be a boolean");return e}var lo=!1,de=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Lr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Hs(r),e!=null&&this.fillFrom(e,r)}get parent(){return this._parent}set parent(e){this._parent=e}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e}get backref(){return!!this._backref}get nodeClass(){return Ke}createChildBag(){return new this.constructor}get fullpath(){if(this._parent!==null&&this._parentNode!==null){let e=this._parent.fullpath;return e?`${e}.${this._parentNode.label}`:this._parentNode.label}return null}relativePath(e){let r=[],n=e;for(;n!==null;){if(n.parentBag===this)return r.push(n.label),r.reverse(),r.join(".");r.push(n.label),n=n.parentNode}return null}get length(){return this._nodes.length}get root(){let e=this;for(;e.parent!==null;)e=e.parent;return e}get attributes(){return this._parentNode!==null?this._parentNode.getAttr():{}}get rootAttributes(){return this._rootAttributes}set rootAttributes(e){this._rootAttributes=e!==null?{...e}:null}_htraverseBefore(e){let r=this,n;for(typeof e=="string"?(e=e.replace(/\.\.\//g,"#parent."),n=e.split(".").filter(s=>s)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[s,a]=this._htraverseBefore(e);if(s===null)return[null,null];if(a.length===0)return[s,""];for(;a.length>1&&s instanceof t;){let i=a[0];if(i==="#parent"){if(s.parent===null||s.parent===void 0)break;a.shift(),s=s.parent;continue}let o=s._nodes.get(i);if(!o)break;let l=o.getValue(n);if(l instanceof t)a.shift(),s=l;else if(r){let u=s.createChildBag();o.setValue(u,!0,null,!0,!0,"autocreate"),a.shift(),s=u}else break}if(!r)return a.length>1?[null,null]:[s,a[0]];for(;a.length>1;){let i=a.shift();if(i.startsWith("#"))throw new Ur("Not existing index in #n syntax");let o=s.createChildBag();s._nodes.set(i,o,">",null,s,null,!1,!0,"autocreate"),s=o}return[s,a[0]]}get(e,r=null,n=!0,s={}){if(!e)return this;if(e==="#parent")return this.parent;let a=null;e.includes("?")&&([e,a]=e.split("?",2));let i=this._nodes.get(e);return i?i.getValue(n,a,s):r}getItem(e,r=null,n=!1,s={}){if(!e)return this;let[a,i]=this._htraverse(e,!1,n);return a instanceof t?a.get(i,r,n,s):r}setItem(e,r,n=null,s=">",a=!1,i=!0,o=null,l=!1,u=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,p]=this._htraverse(e,!0);return f._nodes.set(p,r,s,n,f,c,a,i,o,u,l,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let s=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(s,n,null,r),s}return null}pop(e,r=null,n=null){let s=this.popNode(e,n);return s?s.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,s]=this._htraverse(e,!1,!0);if(!n||!s)return null;let a=n._nodes.get(s);if(!a)return null;try{return n._pop(s,r)}finally{a.parentBag===n&&n._nodes._dict[a.label]!==a&&(a.parentBag=null)}}clear(){let e=[...this._nodes];this._nodes.clear(),this.backref&&this._onNodeDeleted(e,-1);for(let r of e)r.parentBag=null}getNode(e,r=!0,n=!1,s=null){if(e==null||e==="")return this.parentNode;if(typeof e=="number")return this._nodes.get(e);typeof e=="string"&&(e=e.split("?",1)[0]);let[a,i]=this._htraverse(e,n,r);if(a instanceof t&&i){let o=a._nodes.get(i);if(o)return o;if(n)return a._nodes.set(i,s,">",null,a,null,!1,!0,"autocreate"),a._nodes.get(i)}return null}setBackref(e=null,r=null){let n=this._backref;if(this._backref=!0,this._parent=r,this._parentNode=e,!n){this._nodes._parentBag=this;for(let s of this)s.parentBag=this}}delParentRef(){this._parent=null,this._parentNode=null,this._backref=!1}clearBackref(){if(this._backref){this._backref=!1,this._parent=null,this._parentNode=null,this._nodes._parentBag=null;for(let e of this){e.parentBag=null;let r=e.getValue(!0);r instanceof t&&r.clearBackref()}}}_onNodeChanged(e,r,n,s=null,a=null,i=null,o=!1){for(let l of Object.values(this._updSubscribers))l({node:e,pathlist:r,oldvalue:s,attrs_diff:a,evt:n,reason:i,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,s,a,i,o)}_onNodeInserted(e,r,n=null,s=null,a=!1){let i=e.parentBag,o=e.getValue(!0);i!==null&&i.backref&&o instanceof t&&o.setBackref(e,i),n===null&&(n=[]);for(let l of Object.values(this._insSubscribers))l({node:e,pathlist:n,ind:r,evt:"ins",reason:s,fired:a});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],s,a)}_onNodeDeleted(e,r,n=null,s=null){for(let a of Object.values(this._delSubscribers))a({node:e,pathlist:n,ind:r,evt:"del",reason:s});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],s))}_subscribe(e,r,n){n!=null&&(r[e]=n)}subscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=null,insert:s=null,delete:a=null,any:i=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||i),this._subscribe(e,this._insSubscribers,s||i),this._subscribe(e,this._delSubscribers,a||i)}unsubscribe(e,r={}){if(Object.hasOwn(r,"timer")||Object.hasOwn(r,"interval"))throw new TypeError("Timer subscriptions were removed. Schedule polling in the application.");let{update:n=!1,insert:s=!1,delete:a=!1,any:i=!1}=r;(n||i)&&delete this._updSubscribers[e],(s||i)&&delete this._insSubscribers[e],(a||i)&&delete this._delSubscribers[e]}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}keys(){return this._nodes.keys()}values(){return this._nodes.values()}items(){return[...this._nodes].map(e=>({key:e.label,value:e.getValue()}))}get nodes(){return this.getNodes()}node(e){return this._nodes.get(e)}setAttr(e=null,r=null,n=!0){let s=t.prototype.getNode.call(this,e,!0,!0);s&&s.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let s=this.getNode(e);return s?s.getAttr(r,n):n}delAttr(e=null,...r){let n=this.getNode(e);n&&n.delAttr(...r)}getInheritedAttributes(){return this._parentNode?this._parentNode.getInheritedAttributes():{}}getNodes(e=null){return e?[...this._nodes].filter(r=>e(r)):[...this._nodes]}getNodeByValue(e,r){for(let n of this._nodes){let s=n.value;if(s instanceof t){if(s.getItem(e)===r)return n}else if(s&&s.get&&s.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,s=!1){let a=r===void 0,i=n&&typeof r=="string"?r.toLowerCase():r,o=l=>{let u=[];for(let c of l._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(a||d==i)return c}if(c._value instanceof t)if(s){let d=o(c._value);if(d)return d}else u.push(c._value)}for(let c of u){let d=o(c);if(d)return d}return null};return o(this)}isEmpty(e=!1,r=!1){if(this._nodes.length===0)return!0;for(let n of this._nodes){if(n._resolver!==null)return!1;let s=n.getValue(!0);if(s!=null&&!(e&&s===0)&&!(r&&s===""))return!1}return!0}query(e=null,r=null,n=!1,s=!1,a=!0,i=!0,o=null,l=!0){e||(e="#k,#v,#a");let u=this,c;if(typeof e=="string"){if(e.includes(":")){let[p,h]=e.split(":");u=this.getItem(p),e=h}c=e.split(",").map(p=>p.trim())}else c=e;let d=(p,h,m,g,w)=>{if(h==="#k")return p.label;if(h==="#p")return m;if(h==="#n")return p;if(typeof h=="function")return h(p);if(h==="#v"){let b=w();return g&&b instanceof t?null:b}else if(h.startsWith("#v.")){let b=h.split(".").slice(1).join("."),v=w();return v&&v.getItem?v.getItem(b):null}else{if(h==="#__v")return p.getValue(!0);if(h.startsWith("#a")){let b=h.includes(".")?h.split(".").slice(1).join("."):null;return p.getAttr(b)}else{let b=w();return b&&b.getItem?b.getItem(h):null}}};function*f(){let p=0;function*h(m,g){for(let w of m._nodes){let b=g?`${g}.${w.label}`:w.label,v=!1,k,E=()=>(v||(k=w.getValue(l),v=!0),k);if((a&&i||(E()instanceof t?i:a))&&(r===null||r(w))&&(yield c.length===1?d(w,c[0],b,s,E):c.map(N=>d(w,N,b,s,E)),p++,o!==null&&p>=o))return;if(s){let N=E();if(N instanceof t&&(yield*h(N,b),o!==null&&p>=o))return}}}yield*h(u,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,s)=>{for(let a of n._nodes){let i=s?`${s}.${a.label}`:a.label,o=a.getValue(!1);o instanceof t?r(o,i):e.push([i,o])}};return r(this,""),e}digest(e=null,r=null,n=!1){typeof r=="boolean"&&(console.warn("Bag.digest(what, asColumns) is deprecated; use digest(what, null, asColumns)."),n=r,r=null);let s=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!s||s.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(l=>l.trim()).map(()=>[]);let a=[...s];if(a.length&&Array.isArray(a[0])){let i=a[0].length,o=[];for(let l=0;l<i;l++)o.push(a.map(u=>u[l]));return o}return[a]}return[...s]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",s=e.map(a=>`${n}${a}`).join(",");return this.digest(s,null,!0)}sum(e="#v",r=!1,n=null){if(r!=null&&typeof r!="boolean")throw new TypeError("sum strict must be a boolean; pass condition as the third argument");if(n!=null&&typeof n!="function")throw new TypeError("sum condition must be callable; deep is no longer supported");let s=a=>{let i=0,o=!1;for(let l of this.query(a,n)){if(l==null||l===""){o=!0;continue}if(typeof l!="number"&&typeof l!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof l}`);continue}i+=l}return r&&o?null:i};return e.includes(",")?e.split(",").map(a=>s(a.trim())):s(e)}sort(e="#k:a"){let r=(s,a)=>s==null?[-1,""]:a&&typeof s=="string"?[0,s.toLowerCase()]:[0,s],n=(s,a)=>s[0]!==a[0]?s[0]-a[0]:s[1]<a[1]?-1:s[1]>a[1]?1:0;if(typeof e=="function")this._nodes._list.sort((s,a)=>{let i=e(s),o=e(a);return i<o?-1:i>o?1:0});else{let s=e.split(",");s.reverse();for(let a of s){let i,o;a.includes(":")?[i,o]=a.split(":",2):(i=a,o="a"),i=i.trim(),o=o.trim();let l=o==="d"||o==="D",u=o==="a"||o==="d",c;if(i.toLowerCase()==="#k")c=d=>r(d.label,u);else if(i.toLowerCase()==="#v")c=d=>r(d.value,u);else if(i.toLowerCase().startsWith("#a.")){let d=i.slice(3);c=f=>r(f.getAttr(d),u)}else c=d=>{let f=d.value,p=f instanceof t?f.getItem(i):f?f[i]:null;return r(p,u)};this._nodes._list.sort((d,f)=>{let p=n(c(d),c(f));return l?-p:p})}}return this}equalTo(e){return e instanceof t?this._nodes.isEqual(e._nodes):!1}has(e){if(typeof e=="string"){let r=null;e.includes("?")&&([e,r]=e.split("?",2));let n=this.getNode(e);return n===null?!1:r===null?!0:r.split("&").every(s=>s in n.attr)}else if(e&&e.label!==void 0)return[...this._nodes].includes(e);return!1}getResolver(e){let r=this.getNode(e);return r?r.resolver:null}setResolver(e,r){let n=this.getNode(e);n||(this.setItem(e,null),n=this.getNode(e)),n.resolver=r}setCallbackItem(e,r,n={}){let s=new Rr({callback:r,...n});this.setResolver(e,s)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,s=!1){let a={};for(let i of this._nodes){let o=i.value;if(s&&o==null)continue;let l=i.label;e&&(l=String(l)),r&&(l=l.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,s)),Object.defineProperty(a,l,{value:o,enumerable:!0,writable:!0,configurable:!0})}return a}setdefault(e,r=null){let n=this.getNode(e);return n?n.value:(this.setItem(e,r),r)}deepcopy(e=!1){let r=this.createChildBag();for(let n of this._nodes){let s=n.getValue(!e);s instanceof t&&(s=s.deepcopy(e));let a=new r.nodeClass(r,n.label,s);a.setAttr({...n.attr},!1,!1,!1),a.nodeTag=n.nodeTag,a.xmlTag=n.xmlTag,r._nodes._list.push(a),r._nodes._dict[a.label]=a}return r}update(e,r=null,n=null,s=!1){if(!(e instanceof t)){for(let a in e){let i=e[a];(!s||i!==null||!this._nodes.has(a))&&this.setItem(a,i,null,">",!1,!1,n,!1,n!==!1)}return}for(let a of[...e]){let i=a.label,o=r==="static"?a.resolver:null,l=o?null:a.getValue(),u=a.attr.__replace;delete a.attr.__replace;let c=this._nodes.get(i);if(c)if(c.setAttr(a.attr,n===null?!0:n,!0,!1),a.nodeTag!=null&&(c.nodeTag=a.nodeTag),a.xmlTag!=null&&(c.xmlTag=a.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{a.resolver&&(c.resolver=null);let d=c.getValue();l instanceof t&&d instanceof t&&!u?d.update(l,r,n,s):(!s||l!==null)&&c.setValue(l,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(i,o||l,a.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=a.nodeTag,d.xmlTag=a.xmlTag}}}_fillFromBag(e){this.clear();for(let r of e){let n=new this.nodeClass(this,r.label);n.replace(r),n.nodeTag=r.nodeTag,n.xmlTag=r.xmlTag,this._nodes._list.push(n),this._nodes._dict[n.label]=n}}_appendLiteral(e,r,n=null,s=null,a=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let i=new this.nodeClass(this,e,null,n,s,a,null,!1);return r instanceof ce?i.resolver=r:i._value=r,this._nodes._dict[e]=i,this._nodes._list.push(i),i}fillFrom(e=null,r={}){let n=Hs(r);if(e!=null&&!tr(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let s=this.createChildBag(),a=new Set,i=(o,l,u)=>{if(a.has(l))throw new TypeError(`Cyclic Bag source at ${u}`);a.add(l);try{let c=Array.isArray(l)?String(l.length).length+1:0,d=Array.isArray(l)?Array.from(l,(f,p)=>[`r_${String(p).padStart(c,"0")}`,f]):Object.entries(l);if(!Array.isArray(l)&&Object.getOwnPropertySymbols(l).some(f=>Object.prototype.propertyIsEnumerable.call(l,f)))throw new TypeError(`Bag labels must be strings at ${u}`);for(let[f,p]of d){let h=p;n&&(tr(h)||Array.isArray(h))&&(h=this.createChildBag(),i(h,p,`${u}[${JSON.stringify(f)}]`)),o._appendLiteral(f,h)}}finally{a.delete(l)}};return e!=null&&i(s,e,"$"),this._replacePrepared(s)}_loadSource(e,r={}){return this.fillFrom(e,r)}replace(e){if(!(e instanceof t))throw new TypeError("Bag.replace expects a Bag");if(e===this)return this;let r=this.createChildBag();return r._fillFromBag(e),this._replacePrepared(r)}_replacePrepared(e){for(let n of this._nodes){n.parentBag=null;let s=n.getValue(!0);s instanceof t&&s.clearBackref()}let r=this._nodes;this._nodes=e._nodes,e._nodes=r,this._nodes._parentBag=this.backref?this:null,e._nodes._parentBag=null;for(let n of this._nodes)n.parentBag=this;for(let n of e._nodes)n._parentBag=e;return this.backref&&this.parent&&this.parentNode&&this.parent._onNodeChanged(this.parentNode,[this.parentNode.label],"upd_value",e),this}forEach(e,{static:r=!0,deep:n=!1,kwargs:s={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let a=(i,o)=>{for(let l=0;l<i._nodes.length;l++){let u=i._nodes._list[l],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,u.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,l]);let d=e(u,c,l);if(d)return d;if(d==null&&n){let f=u.getValue(r);if(f instanceof t){let p=a(f,c);if(p)return p}}}return null};return a(this,s)}*traverse(){for(let e of this._nodes){yield e;let r=e.getValue(!0);r instanceof t&&(yield*r.traverse())}}*_iterNodesWithPaths(e=!0,r=""){for(let n of this._nodes){let s=r?`${r}.${n.label}`:n.label;yield[s,n];let a=n.getValue(e);a instanceof t&&(yield*a._iterNodesWithPaths(e,s))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,s=0,a=new Map([["[]",this.constructor]]);for(let[i,o]of co(this)){let l=i.slice(0,-1),u=JSON.stringify(i),c=JSON.stringify(l),d=o.getValue(!0),f,p=null;if(o.resolver)f=Fr(o.resolver);else if(d instanceof t){let g=d.constructor,w=g.tytxSuffix;a.set(u,g),p=zs(g,er(a.get(c),w)),f=`::${w}`}else d===null?f="::NN":f=mt(d);if(o.attr&&Object.hasOwn(o.attr,Me))throw new re(`node '${i}': the attribute '${Me}' is reserved for the Bag class name`);let h=Ln(mt(o.attr));p!==null&&(h[Me]=p);let m=o.nodeTag;r?(yield[l.length?n[c]:null,o.label,m,f,h],d instanceof t&&(n[u]=s,e[s]=i,s++)):yield[l,o.label,m,f,h]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),s=this.constructor.tytxSuffix;if(e==="json")return`${n}::${s}`;if(e==="msgpack")return an(new Be(4,new TextEncoder().encode(`${s}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let a={};r={rows:[...this._nodeFlattener(a)],paths:a}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,s=zs(n,er(null,n.tytxSuffix));return s!==null&&(r[Me]=s),r.rows=r.rows.map(([a,i,o,l,u])=>[mt(a),mt(i),mt(o),l,u]),r.paths&&(r.paths=mt(r.paths)),xe(r)}static fromTytx(e,r="json",n={}){if(tr(r)&&(n=r,r="json"),Hs(n),typeof e!="string"&&!(e instanceof Uint8Array))throw new TypeError("fromTytx requires serialized text or bytes");if(r!=="json"&&r!=="msgpack")throw new TypeError(`Unsupported transport: ${r}`);r==="json"&&e instanceof Uint8Array&&(e=new TextDecoder().decode(e));let s=ue(e,r==="json"?null:r);if(s instanceof t)return s;if(!tr(s)&&!Array.isArray(s))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(s,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(er(null,r));let n=ue(e);if(!n||!Array.isArray(n.rows))throw new re("Invalid TYTX Bag: expected rows");let s=n.paths,a=s!=null,i=Object.hasOwn(n,Me)?Vs(r,n[Me]):er(null,r),o=new i,l=new Map([["[]",o]]);for(let u of n.rows){if(!Array.isArray(u)||u.length!==5)throw new re("Invalid TYTX Bag row");let[c,d,f,p,h]=u,m=c??"";if(a){if(c!==null&&!Object.hasOwn(s,c))throw new re(`Unknown TYTX parent reference: ${c}`);m=c===null?"":s[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new re("Invalid TYTX parent path");let g=JSON.stringify(m);if(!l.has(g))throw new re(`Missing or undecodable TYTX parent branch: ${m}`);let w=l.get(g),b=JSON.stringify([...m,d]),v=p,k=Rn(v),E=js(h),y=Object.hasOwn(E,Me)?E[Me]:null;if(delete E[Me],v instanceof t){let q=v.constructor.tytxSuffix,Z=y!==null?Vs(q,y):er(w.constructor,q);v=new Z,l.set(b,v)}else if(y!==null)throw new re(`node '${b}': the attribute '${Me}' is reserved for the Bag class name of a branch`);let N=w._appendLiteral(d,k?null:v,E,k);N.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:s=null,selfClosedTags:a=null}=e,i=this._bagToXml(a,r);return s===!0?i=`<?xml version='1.0' encoding='${n}'?>
16
16
  ${i}`:typeof s=="string"&&(i=`${s}
17
17
  ${i}`),i}_bagToXml(e=null,r=!1,n=0){let s=[];for(let a of this._nodes)s.push((r?" ".repeat(n):"")+this._nodeToXml(a,e,r,n));return s.join(r?`
18
- `:"")}_nodeToXml(e,r=null,n=!1,s=0){let a=e.xmlTag||e.nodeTag||e.label,i=this._sanitizeTag(a),o=[];if(i!==a&&o.push(`_tag="${this._escapeAttr(a)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr($r(e.resolver))}"`),e.attr)for(let[f,p]of Object.entries(Ln(e.attr)))p!==null&&p!==!1&&p!==void 0&&o.push(`${f}="${this._escapeAttr(String(p))}"`);let l=o.length?" "+o.join(" "):"",u=e.resolver?null:e.getValue(!0);if(u&&typeof u._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=u._bagToXml(r,n,s+1);return f?n?`<${i}${l}>
18
+ `:"")}_nodeToXml(e,r=null,n=!1,s=0){let a=e.xmlTag||e.nodeTag||e.label,i=this._sanitizeTag(a),o=[];if(i!==a&&o.push(`_tag="${this._escapeAttr(a)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(Fr(e.resolver))}"`),e.attr)for(let[f,p]of Object.entries(Ln(e.attr)))p!==null&&p!==!1&&p!==void 0&&o.push(`${f}="${this._escapeAttr(String(p))}"`);let l=o.length?" "+o.join(" "):"",u=e.resolver?null:e.getValue(!0);if(u&&typeof u._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=u._bagToXml(r,n,s+1);return f?n?`<${i}${l}>
19
19
  ${f}
20
- ${" ".repeat(s)}</${i}>`:`<${i}${l}>${f}</${i}>`:r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`}if(u==null||u==="")return r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`;let c=u instanceof Date&&!Number.isNaN(u.getTime())?Zd(u):String(u),d=this._escapeXml(c);return`<${i}${l}>${d}</${i}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}_escapeAttr(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,s;if(typeof DOMParser<"u"){s=new DOMParser().parseFromString(e,"application/xml");let i=s.querySelector("parsererror");if(i)throw new Error(`XML parse error: ${i.textContent}`)}else s=new uo.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(s.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,s=Array.from(e.childNodes).filter(a=>a.nodeType===1);for(let a of s){let i=a.tagName,o={};for(let m=0;m<a.attributes.length;m++){let g=a.attributes[m];o[g.name]=g.value}let l=Rn(o._resolver);l&&delete o._resolver;let u=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,js(o));let c=i;"_tag"in o&&(c=o._tag,delete o._tag),r&&r in o&&(c=o[r],delete o[r]);let d=c,f=1;for(;n.getNode(c);)c=`${d}_${f++}`;let p=Array.from(a.childNodes).filter(m=>m.nodeType===1),h;if(p.length>0||u){let m=this._xmlElementToBag(a,r);h=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=a.textContent||"";h=n.setItem(c,m,Object.keys(o).length>0?o:null)}l&&(h.resolver=l),h.xmlTag=i}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,s={};n&&(s.signal=AbortSignal.timeout(n*1e3));let a=await fetch(e,s),i=a.headers.get("content-type")||"",o=await a.text();if(i.includes("json"))return t.fromTytx(o);if(i.includes("xml"))return t.fromXml(o);let l=o.trim();if(l.startsWith("<"))return t.fromXml(o);if(l.startsWith("{")||l.startsWith("["))return t.fromTytx(o);throw new Fr(`Unsupported content-type: ${i}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?xe(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let a=[];for(let i of n._nodes)a.push(n._nodeToJsonDict(i,r));n=a}let s={label:e.label,value:n,attr:Ln(e.attr)};return e.nodeTag!==null&&(s.tag=e.nodeTag),e.resolver&&(s.resolver=$r(e.resolver)),s}static fromJson(e,r={}){return lo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),lo=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",s=!0){r===null&&(r=new Map);let a=[],i=[...this._nodes];for(let o=0;o<i.length;o++){let l=i[o],u=o===i.length-1,c=l.getValue(e),d=l.getAttr(),f="",p=Object.keys(d);p.length>0&&(f=" ["+p.map(w=>`${w}=${JSON.stringify(d[w])}`).join(", ")+"]");let h=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(u?" ":"\u2502 ");if(c instanceof t){let g=l,w=c.backref?"(*)":"";if(r.has(g))a.push(`${n}${h}${l.label}${w}${f} \u2192 (circular ref)`);else{r.set(g,l.label),a.push(`${n}${h}${l.label}${w}${f}`);let b=c.toStringTree(e,r,m,u);b&&a.push(b)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let w=new TextDecoder("utf-8",{fatal:!1}),b=c instanceof ArrayBuffer?new Uint8Array(c):c;g=w.decode(b)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);a.push(`${n}${h}${l.label}: ${g}${f}`)}}return a.join(`
20
+ ${" ".repeat(s)}</${i}>`:`<${i}${l}>${f}</${i}>`:r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`}if(u==null||u==="")return r===null||r.includes(i)?`<${i}${l}/>`:`<${i}${l}></${i}>`;let c=u instanceof Date&&!Number.isNaN(u.getTime())?Zd(u):String(u),d=this._escapeXml(c);return`<${i}${l}>${d}</${i}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}_escapeAttr(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,s;if(typeof DOMParser<"u"){s=new DOMParser().parseFromString(e,"application/xml");let i=s.querySelector("parsererror");if(i)throw new Error(`XML parse error: ${i.textContent}`)}else s=new uo.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(s.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,s=Array.from(e.childNodes).filter(a=>a.nodeType===1);for(let a of s){let i=a.tagName,o={};for(let m=0;m<a.attributes.length;m++){let g=a.attributes[m];o[g.name]=g.value}let l=Rn(o._resolver);l&&delete o._resolver;let u=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,js(o));let c=i;"_tag"in o&&(c=o._tag,delete o._tag),r&&r in o&&(c=o[r],delete o[r]);let d=c,f=1;for(;n.getNode(c);)c=`${d}_${f++}`;let p=Array.from(a.childNodes).filter(m=>m.nodeType===1),h;if(p.length>0||u){let m=this._xmlElementToBag(a,r);h=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=a.textContent||"";h=n.setItem(c,m,Object.keys(o).length>0?o:null)}l&&(h.resolver=l),h.xmlTag=i}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,s={};n&&(s.signal=AbortSignal.timeout(n*1e3));let a=await fetch(e,s),i=a.headers.get("content-type")||"",o=await a.text();if(i.includes("json"))return t.fromTytx(o);if(i.includes("xml"))return t.fromXml(o);let l=o.trim();if(l.startsWith("<"))return t.fromXml(o);if(l.startsWith("{")||l.startsWith("["))return t.fromTytx(o);throw new Ur(`Unsupported content-type: ${i}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?xe(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let a=[];for(let i of n._nodes)a.push(n._nodeToJsonDict(i,r));n=a}let s={label:e.label,value:n,attr:Ln(e.attr)};return e.nodeTag!==null&&(s.tag=e.nodeTag),e.resolver&&(s.resolver=Fr(e.resolver)),s}static fromJson(e,r={}){return lo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),lo=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",s=!0){r===null&&(r=new Map);let a=[],i=[...this._nodes];for(let o=0;o<i.length;o++){let l=i[o],u=o===i.length-1,c=l.getValue(e),d=l.getAttr(),f="",p=Object.keys(d);p.length>0&&(f=" ["+p.map(w=>`${w}=${JSON.stringify(d[w])}`).join(", ")+"]");let h=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(u?" ":"\u2502 ");if(c instanceof t){let g=l,w=c.backref?"(*)":"";if(r.has(g))a.push(`${n}${h}${l.label}${w}${f} \u2192 (circular ref)`);else{r.set(g,l.label),a.push(`${n}${h}${l.label}${w}${f}`);let b=c.toStringTree(e,r,m,u);b&&a.push(b)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let w=new TextDecoder("utf-8",{fatal:!1}),b=c instanceof ArrayBuffer?new Uint8Array(c):c;g=w.decode(b)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);a.push(`${n}${h}${l.label}: ${g}${f}`)}}return a.join(`
21
21
  `)}toString(e=!0,r=null,n=""){r||(r=new Set);let s=[],a=[...this._nodes];for(let i=0;i<a.length;i++){let o=a[i],l=i===a.length-1,u=o.getValue(e),c="",d=o.attr;d&&Object.keys(d).length>0&&(c=` [${Object.entries(d).map(([m,g])=>`${m}=${JSON.stringify(g)}`).join(", ")}]`);let f=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",p=n+(l?" ":"\u2502 ");if(u&&typeof u._htraverse=="function"){let h=o;if(r.has(h))s.push(`${n}${f}${o.label}${c} \u2192 (circular ref)`);else{r.add(h),s.push(`${n}${f}${o.label}${c}`);let m=u.toString(e,r,p);m&&s.push(m)}}else{let h;u==null?h="null":typeof u=="string"&&u.length>50?h=JSON.stringify(u.slice(0,47)+"..."):typeof u=="string"?h=JSON.stringify(u):h=String(u),s.push(`${n}${f}${o.label}: ${h}${c}`)}}return s.join(`
22
- `)}},Fr=class extends Error{constructor(e){super(e),this.name="BagException"}};ce.registerBagClass(de);Ps(de,"X",t=>t._toTytxPayload(),t=>de._fromTytxPayload(t));Ir(de.tytxSuffix,{...Je(de.tytxSuffix),Bag:de});var fo=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function po(t){return t.endsWith("_")&&fo.has(t.slice(0,-1))?t.slice(0,-1):t}function ho(t){let e=po(t);return e!==t?e:t.startsWith("_")&&fo.has(t.slice(1))?t.slice(1):t}function Ws(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let s=e||t;if(!s)return s;if(s=po(s),r&&!e){let a=`${n}_`;s.startsWith(a)&&(s=s.slice(a.length)),s=`${r}:${s}`}return s}var nr=Symbol("value"),_o=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function Xs(t){return Object.entries(t||{}).filter(([e])=>!_o.has(e)).map(([e,r])=>[ho(e),r])}var rr=class extends Ke{constructor(e,r,n=null,s=null,a=null,i=null,o=null){super(e,r,n,s,a,i,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let r=this.getAttr("_meta")||{},n=e.split(",").map(s=>s.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(s=>r[s]!==void 0?r[s]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[r,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([r,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return Xs(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(nr,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(rt(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,r),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,r)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,r){return e=this._collapseParentDatapath(e,e),r?`${e}?${r}`:e}_composeRelativeDatapath(e,r){let n=this;for(;n!==null&&e.startsWith(".");){let s=n.getAttr("datapath");s!=null&&(e=e==="."?s:s+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let s of e.split("."))if(s==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(s);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),s=n.indexOf("."),a=s===-1?n:n.slice(0,s),i=s===-1?"":n.slice(s+1),o;if(a==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(a==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",a),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(i?`.${i}`:".")}_findMarkedDatapathAncestor(e,r,n){let s=this;for(;s!=null;){let i=s.getAttr()||{};if(e&&(i.formId!=null||i.form===!0)||r&&"_anchor"in i)return s;s=s.parentNode}let a=e?"FORM":"ANCHOR";throw new Error(`#${a}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let s=this.data,a=this.absDatapath(e);return n&&s.getItem(a)==null&&s.setItem(a,r),s.getItem(a,r)}setRelativeData(e,r,{attributes:n=null,fired:s=!1,reason:a=null}={}){let i=this.data,o=this.absDatapath(e);i.setItem(o,r,n,">",!1,!0,a===null?!0:a,s)}fireEvent(e,r=!0,{attributes:n=null,reason:s=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:s})}SET(e,r){this.setRelativeData(e,r)}GET(e){return this.getRelativeData(e)}PUT(e,r){this.setRelativeData(e,r,{reason:!1})}FIRE(e,r=!0){this.setRelativeData(e,r,{fired:!0})}},te=class t extends de{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return rr}_setBuilderItem(e,r,n,...s){let a=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,l]of r)o._builder=l;let i=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...s)}catch(o){if(this.node(n)==null&&a)for(let[l,u]of a)l._builder=u;throw o}finally{this._insertingBuilder=i}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,s]of r)n._builder=s;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,s=(a,i)=>{if(n.has(a))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(a),r.push([a,i]);for(let o of a.getNodes()){let l=i,u=o._getMeta("subbuilder");u!=null&&(l=i._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),r.push([o,l]);let c=o.getValue(!0);c instanceof t&&s(c,l)}};return s(this,e),r}};if((Je(te.tytxSuffix).SourceBag??te)!==te)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Ir(te.tytxSuffix,{...Je(te.tytxSuffix),SourceBag:te});function ef(t){if(t.length===0)return{value:null,attrs:{}};let e=t[0];if(e!==null&&typeof e=="object"){let r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null)return{value:null,attrs:e}}return{value:e,attrs:t[1]||{}}}var tf=new Set(["then","toJSON"]),go=new WeakMap;function Ur(t){return go.get(t)||t}function Gs(t){if(t==null)return t;t=Ur(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function bo(t,e){let r=e instanceof de,n=new Proxy(e,{get(s,a){if(typeof a=="symbol"||a.startsWith("_")||tf.has(a))return Reflect.get(s,a,s);let i=t.schemaTag(a);if(r&&i)return mo(t,s,i,r);if(a in s){let l=Reflect.get(s,a,s);return typeof l=="function"?l.bind(s):l}if(i)return mo(t,s,i,r);let o=t.containerMethod(a);if(o)return(...l)=>t[o](t.wrapSource(s),...l)}});return go.set(n,e),n}function mo(t,e,r,n){return(...s)=>{let{value:a,attrs:i}=ef(s),o=n?t.bagCall(e,r,a,i):t.commandOnNode(e,r,a,i);return o.builder.wrapSource(o)}}var yo=/^[A-Za-z_][A-Za-z0-9_]*$/,rf=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),nf=new Set(["framework","value","attribute"]),sf=new Map([["builtins.str",t=>typeof t=="string"],["builtins.int",t=>Number.isInteger(t)],["builtins.float",t=>typeof t=="number"&&Number.isFinite(t)],["builtins.bool",t=>typeof t=="boolean"],["builtins.list",t=>Array.isArray(t)],["builtins.dict",t=>t!==null&&typeof t=="object"&&!Array.isArray(t)],["builtins.tuple",t=>Array.isArray(t)],["builtins.set",t=>Array.isArray(t)||t instanceof Set],["builtins.NoneType",t=>t===null],["builtins.object",t=>!0]]);function Tt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function x(t,e){throw new TypeError(`${t}: ${e}`)}function ze(t,e,r,n){Tt(t)||x(n,"must be an object");for(let s of Object.keys(t))e.includes(s)||x(n,`unknown field '${s}'`);for(let s of r)Object.hasOwn(t,s)||x(n,`missing field '${s}'`)}function Ct(t,e){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t))return t.forEach((r,n)=>Ct(r,`${e}[${n}]`));if(Tt(t))return Object.entries(t).forEach(([r,n])=>Ct(n,`${e}.${r}`));x(e,"must be lossless JSON data")}}function af(t,e){let r="",n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){r+=a+(t[++s]??"");continue}a==="["&&(n=!0),!n&&a==="."&&!(e&16)?r+="[^\\n]":!n&&a==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&a==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=a,a==="]"&&(n=!1)}return r}function xt(t,e,r=!1,n=null){if(t===null)return null;switch(ze(t,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),t.kind){case"custom":return ze(t,["kind","name"],["kind","name"],e),n||x(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{ze(t,["kind","dtype"],["kind","dtype"],e);let s=t.dtype;typeof s!="string"&&x(e,"dtype must be a string");let a=Br(s);return!a&&s!=="NN"&&x(e,`unknown dtype '${s}'`),{...t,test:o=>s==="NN"?o===null:s==="N"?Ne(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):a===Number?typeof o=="number"&&Number.isFinite(o)&&(s!=="L"||Number.isInteger(o)):a===String?typeof o=="string":a===Boolean?typeof o=="boolean":a===Date?o instanceof Date&&Number.isFinite(o.getTime()):a===Object?Tt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof a}}case"any":return{...t,test:s=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&x(e,"type requires string module/name");let s=`${t.module}.${t.name}`;if(s==="collections.abc.Callable")return{...t,test:i=>typeof i=="function",portable:!1};let a=sf.get(s);return a||x(e,`unsupported type '${s}'`),{...t,test:a}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&x(e,"union items must be non-empty");let s=t.items.map((a,i)=>xt(a,`${e}.items[${i}]`,!0,n));return{...t,items:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>s.some(i=>i.test&&i.test(a))}}case"literal":return Array.isArray(t.values)||x(e,"literal values must be an array"),t.values.forEach((s,a)=>Ct(s,`${e}.values[${a}]`)),{...t,test:s=>t.values.some(a=>Object.is(a,s))};case"annotated":{Array.isArray(t.metadata)||x(e,"annotated metadata must be an array"),t.metadata.some(i=>!["regex","range","value"].includes(i?.kind))&&x(e,"unsupported annotation metadata kind");let s=xt(t.base,`${e}.base`,!0,n),a=t.metadata.map((i,o)=>xt(i,`${e}.metadata[${o}]`,!0,n));return{...t,base:s,metadata:a,inputConstraint:s.inputConstraint,test:i=>s.test(i)&&a.every(o=>!o.test||o.test(i))}}case"range":{for(let s of["ge","le","gt","lt"])Object.hasOwn(t,s)||x(e,`range missing '${s}'`);for(let s of["ge","le","gt","lt"])t[s]!==null&&(typeof t[s]!="number"||!Number.isFinite(t[s]))&&x(e,`${s} must be finite number or null`);return{...t,test:s=>typeof s=="number"&&(t.ge===null||s>=t.ge)&&(t.le===null||s<=t.le)&&(t.gt===null||s>t.gt)&&(t.lt===null||s<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&x(e,"regex requires pattern and non-negative integer flags");let s=t.flags&-59;s&&x(e,`unsupported Python regex flags ${s}`),t.flags&2&&x(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&x(e,"regex uses a non-portable construct or character class");let a="uy";t.flags&16&&(a+="s");let i;try{i=new RegExp(`(?:${af(t.pattern,t.flags)})(?![\\s\\S])`,a)}catch(o){x(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(i.lastIndex=0,i.test(o))}}case"value":return Ct(t.value,`${e}.value`),{...t};case"generic":{let s=xt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&x(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||x(e,"generic arguments must be an array");let a=t.arguments.map((i,o)=>xt(i,`${e}.arguments[${o}]`,!0,n));return{...t,origin:s,arguments:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>s.test(i)&&of(t.origin,a,i)}}case"arguments":x(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||x(e,"ellipsis is only valid as a nested descriptor"),{...t};default:x(e,`unknown annotation kind '${t.kind}'`)}}function of(t,e,r){let n=`${t.module}.${t.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?r.length===e.length&&r.every((s,a)=>e[a].test(s)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(s=>!e[0]?.test||e[0].test(s)):n==="builtins.dict"?Object.entries(r).every(([s,a])=>(!e[0]?.test||e[0].test(s))&&(!e[1]?.test||e[1].test(a))):!1}function vo(t,e){if(t===null)return null;if(typeof t!="string"&&x(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let s=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(s)&&x(e,`invalid cardinality item '${n}'`);let a=s.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);a||x(e,`invalid cardinality item '${n}'`);let[,i,o,l,u]=a;r.has(i)&&x(e,`duplicate tag '${i}'`);let c=0,d=1/0;s.includes("[")&&(s.includes(":")?(c=l?Number(l):0,d=u?Number(u):1/0):c=d=Number(o)),d<c&&x(e,`maximum ${d} is below minimum ${c}`),r.set(i,{min:c,max:d})}return r.has("*")&&r.size>1&&x(e,"wildcard '*' cannot be combined with named tags"),r}function ko(t,e){if(t===null)return null;typeof t!="string"&&x(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let s=n.trim();s&&((!yo.test(s)||r.has(s))&&x(e,`invalid or duplicate parent '${n}'`),r.add(s))}return r}function lf(t,e,r){if(t===null)return null;ze(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||x(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&x(e,"invalid signature descriptor");let s=new Set,a=!1,i=!1,o=t.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return ze(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!yo.test(l.name)||s.has(l.name))&&x(c,"invalid or duplicate parameter name"),s.add(l.name),(!rf.has(l.kind)||!nf.has(l.role)||typeof l.has_default!="boolean")&&x(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&x(c,"default presence must equal has_default"),l.has_default&&Ct(l.default,`${c}.default`),a||=l.kind==="var_keyword",i||=l.kind==="var_positional",{...l,annotation:xt(l.annotation,`${c}.annotation`,!1,r)}});return(a!==t.accepts_var_keyword||i!==t.accepts_var_positional)&&x(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function wo(t,e,r,n){let s=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];ze(t,s,[],e),t={...Object.fromEntries(s.map(a=>[a,null])),...t};for(let a of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[a]!==null&&typeof t[a]!="string"&&x(e,`${a} must be string or null`);return t._meta!==null&&(Tt(t._meta)||x(e,"_meta must be object or null"),Ct(t._meta,`${e}._meta`)),vo(t.sub_tags,`${e}.sub_tags`),ko(t.parent_tags,`${e}.parent_tags`),{...t,attributes:lf(t.attributes,`${e}.attributes`,n)}}function Eo(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Do(t,e){let r={...e};for(let[n,s]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=s);return r._meta={...t._meta||{},...e._meta||{}},r}function Ao(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?vo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?ko(e.parent_tags,"resolved.parent_tags"):null,e}function xo(t,e,r,n){if(r.get(t)===1&&x(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let s=e[t];s||x(n,`unknown abstract '${t}'`),r.set(t,1);let a={...s};for(let i of Eo(s.inherits_from))a=Do(xo(i,e,r,n),a);return a=Ao(a),r.set(t,2),e[t]=a,a}function Ys({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let a of Object.keys(r))xo(a,r,n,`abstracts.${a}.inherits_from`);let s={};for(let[a,i]of Object.entries(e)){let o={...i};for(let l of Eo(i.inherits_from)){let u=r[l];u||x(`elements.${a}.inherits_from`,`unknown abstract '${l}'`),o=Do(u,o)}s[a]=Ao(o)}return{abstracts:r,elements:s}}function Zs(t){ze(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),ze(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&x("document_format","expected builder_grammar version 1.1 or 1.2"),ze(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&x("grammar.name","must be non-empty string");for(let s of["version","title","description"])t.grammar[s]!==null&&typeof t.grammar[s]!="string"&&x(`grammar.${s}`,"must be string or null");(!Tt(t.abstracts)||!Tt(t.elements))&&x("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&x("custom_types","requires version 1.2");let e=$n.fromJSON(t.custom_types??{}),r={};for(let[s,a]of Object.entries(t.abstracts))(!s||s.startsWith("_"))&&x("abstracts",`invalid public name '${s}'`),r[s]=wo(a,`abstracts.${s}`,!1,e);let n={};for(let[s,a]of Object.entries(t.elements))(!s||s.startsWith("_"))&&x("elements",`invalid public name '${s}'`),n[s]=wo(a,`elements.${s}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function To(t,e,r,n){let s=e.attributes;if(!s)return;let a={...n};r!=null&&(a.node_value=r);let i=new Set(s.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!s.accepts_var_keyword)for(let u of Object.keys(n))!i.has(u)&&!o.has(u)&&x(t,`unknown attribute '${u}'`);let l=e._meta?.component?s.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of s.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(a,u.name);!c&&!u.has_default&&x(t,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(a[u.name]))&&x(t,`invalid value for ${u.role} '${u.name}'`)}}var $n=class t{#e=new Map;#i=new Map;register(e,r,n){let s=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),a=s.has(r)?{kind:"type",module:"builtins",name:s.get(r)}:r;return this.#s(e,{kind:"annotated",base:a,metadata:[n]})}#s(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||uf.has(e))&&x("custom_types",`invalid, reserved or duplicate name '${e}'`),ze(r,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(r.kind!=="annotated"||!Array.isArray(r.metadata)||r.metadata.length!==1||!["regex","range"].includes(r.metadata[0]?.kind))&&x(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=r.metadata[0].kind==="regex"?["str"]:["int","float"];(r.base?.kind!=="type"||r.base.module!=="builtins"||!n.includes(r.base.name))&&x(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),Ct(r,`custom_types.${e}`);let s=structuredClone(r),a=xt(s,`custom_types.${e}`),i=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:i,enumerable:!0}),this.#e.set(e,s),this.#i.set(e,{...i,inputConstraint:!0,test:a.test}),i}resolve(e,r="custom_types"){return this.#i.has(e)||x(r,`unknown custom type '${e}'`),{...this.#i.get(e)}}validate(e,r){return this.resolve(e).test(r)||x(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){Tt(e)||x("custom_types","must be an object");let r=new t;for(let[n,s]of Object.entries(e))r.#s(n,s);return r}},uf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function Co(t,e,r,n){let s=e?.attributes;if(s)for(let a of s.parameters){if(!a.annotation?.inputConstraint||a.role==="framework"||["var_keyword","var_positional"].includes(a.kind))continue;let i=a.role==="value"?r:n[a.name];i!==void 0&&(a.annotation.test(i)||x(t,`invalid input for '${a.name}' (custom type)`))}}function No(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Js(t,e))throw new TypeError(`conflicting custom type '${r[1]}'`);return structuredClone(t)}if(r.length===2&&["abstracts","elements"].includes(r[0]))return structuredClone(e);if(Qe(t)&&Qe(e)){let n=structuredClone(t);for(let[s,a]of Object.entries(e))a!==null&&Object.defineProperty(n,s,{value:No(n[s],a,[...r,s]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Js(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Js(r,e[n])):Qe(t)&&Qe(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Js(t[r],e[r])):!1}function Qe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Ks(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Ks);return}if(Qe(t)){Object.values(t).forEach(Ks);return}throw new TypeError("collection must contain only finite JSON values")}}var et=class t{#e;constructor(e){Ks(e);let r=["document_format","grammar","abstracts","elements"];if(!Qe(e)||Object.keys(e).some(s=>![...r,"custom_types"].includes(s))||r.some(s=>!Object.hasOwn(e,s)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Qe(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let s of["grammar","abstracts","elements"])if(!Qe(e[s]))throw new TypeError(`${s} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Qe(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let r=new t(e),n=No(this.#e,r.#e);return(this.#e.document_format.version==="1.2"||r.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var Nt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,r){this.renders.set(e,r)}getRender(e){let r=this.renders.get(e);if(r!==void 0)return r;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,r={}){let n=e.builder,[s,a]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,a,r);let i=this.getRender(n),o;return[o,a]=i._handleMeta(e,a),e._getMeta("subbuilder")||(a=i.adaptAttrs(a)),e.value instanceof te&&(s=this.renderChildren(e.value,r)),i.renderedItem(e,s,a,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let s of e.getNodes()){let a=this.render(s,r);a!==null&&(Array.isArray(a)?n.push(...a):n.push(a))}return n}_renderComponent(e,r,n){let[s,a,i,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,s,i,o,n);if(a==null)return[];if(!(a instanceof de))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${a?.constructor?.name||typeof a}`);return a.getNodes().map(l=>this._expandBlock(e,s,i,{node_label:l.label},n))}_expansionInputs(e,r){let n=e.builder,s=n.componentMethod(e.nodeTag),a=s&&n[s];if(typeof a!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let i=r.iterate;delete r.iterate,delete r.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let l of Object.keys(r)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(r[l]=`^${e.absDatapath(u)}`)}return[a,i,o,r]}_expandBlock(e,r,n,s,a){let i=e.builder._expansionRoot(n);r.call(e.builder,Gs(i),s);let o=i.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...a,depthOffset:this._nodeDepth(e,a.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,r,n,s){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,s]=e._getMeta("render_tag,render_attributes"),a=Ws(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!a)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return s&&(r={...r,...s}),[a,r]}adaptAttrs(e){return e}adapt(e){let r=`${this.builder.constructor._name}_`;return e.startsWith(r)?e.slice(r.length):e}finalize(e,r=null,n={}){let s=this._composeStringFragments(e);if(r==null)return s;if(typeof r=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof r.full=="function"&&typeof r.write!="function")return r.full(s),null;if(typeof r.write=="function")return r.write(s),null;if(typeof r=="function")return r(s),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(r=>typeof r!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',"&quot;")}_nodeDepth(e,r=0){let s=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(s-1,0)+r}};var St=class extends Nt{static mode="xml";renderedItem(e,r,n,{tag:s,pretty:a=!1,depthOffset:i=0}={}){let o=this._formatAttrs(n),l=a?" ".repeat(this._nodeDepth(e,i)):"",u=a?`
23
- `:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${l}<${s}${o}>${u}${c}${l}</${s}>${u}`}return r==null?`${l}<${s}${o}></${s}>${u}`:`${l}<${s}${o}>${this._escapeText(r)}</${s}>${u}`}finalize(e,r=null,{docHeader:n=null}={}){let s=this._composeStringFragments(e);return n===!0?s=`<?xml version='1.0' encoding='UTF-8'?>${s}`:typeof n=="string"&&(s=n+s),super.finalize(s,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var So={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function Oo(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function df(t){let e=Object.create(null),r=(n,s)=>{let a=n.toLowerCase(),i=e[a];if(i!==void 0&&i!==s)throw new Error(`container '${n}' is already tied to implementation method '${i}' (cannot rebind to '${s}')`);e[a]=s};for(let n of Oo(t))if(Object.hasOwn(n,"containers"))for(let s of n.containers||[])r(s,s);return e}function Pr(t){let e=Object.create(null);for(let r of Object.keys(t)){let n=r.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${r}' has a case-insensitive collision with '${e[n]}'`);e[n]=r}return e}var qr="_root_",Qs="_root_",Bo=new Set(["destination","func","value","_on_start"]),He=class t{static _sourceClass=te;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof t))throw new TypeError("registerBuilder requires a BuilderBase subclass");let r=e._name;if(typeof r!="string"||!r)throw new TypeError("registered builders require a non-empty static _name");let n=t._registry.get(r);if(n&&n!==e)throw new Error(`Builder name '${r}' is already registered to ${n.name}; cannot register ${e.name}`);return t._registry.set(r,e),e}static getBuilderClass(e){let r=t._registry.get(e);if(!r)throw new Error(`No builder registered with name '${e}'`);return r}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new de,this._dataroot.setBackref(),this._dataroot.setItem(Qs,new de),this.data=this._dataroot.getItem(Qs),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let r=this.constructor._sourceClass;this._sourceroot=new r(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem(qr,new r(null,this)),this.source=this._sourceroot.getItem(qr)}wrapSource(e){if(e=Ur(e),!(e instanceof te)&&!(e instanceof rr))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=bo(this,e),this._sourceHandles.set(e,r)),r}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let r=this._subbuilders.get(e);if(!r){let n=t.getBuilderClass(e);r=new n,this._subbuilders.set(e,r)}return r._dataroot=this._dataroot,r.data=this.data,r}_resolveSubbuilderReference(e,r,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let r=this._classCollection,n=r?new et(r.toDocument()).update(e):new et(e),s=Zs(n.toDocument()),a=Ys(s),i=Pr(a.elements);this._classCollection=n,this._classSchema=a.elements,this._abstracts=a.abstracts,this._tagNames=i}static{this.defineGrammar(So)}get _containers(){return df(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=Pr(this.schema):this.constructor._tagNames??=Pr(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let s=`${this.constructor._name}_`;return r.startsWith(s)&&this.schemaTagNames[r.slice(s.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,s=r?new et(e):new et(n.toDocument()).update(e),a=Zs(s.toDocument()),i=Ys(a),o=Pr(i.elements);return this._collection=s,this._schemaOverride=i.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let r=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=r&&r!==this&&r.schema[e.nodeTag]?._meta?.subbuilder?r:this;Co(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);return To(s,this.schema[s],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:s}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let a=r!==void 0?r:e.value instanceof te?null:e.value;this.validateNodeValues(e.nodeTag,a,n||e.getAttr?.()||{});let i=this.schema[this.schemaTag(e.nodeTag)],o=s||(e.value instanceof te?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,i,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(a=>typeof a!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(s,this.schema[s],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let s=this.schema[n];if(!this._countsForGrammar(s))return!0;let a=s._parentSpec;if(a==null||a.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let i=this.schemaTag(r);if(!i)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,s,i),!0}bagCall(e,r,n,s){return this.setChild(e,r,n,s)}commandOnNode(e,r,n,s){if(e=Ur(e),e.value instanceof te)return this.setChild(e.value,r,n,s);let a=e.value,i=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(i,r,n,s,e);return this.promoteNodeValue(e,a,i),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,s,a=null){let i={...s},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,i);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,i,r))||this,d=n instanceof te?n._builderBindingPlan(c):null,f=a?.rootBuilder||e.root._builder||this;if(i.nodeId!=null&&f.source.getNodeByAttr("nodeId",i.nodeId))throw new Error(`Duplicate nodeId '${i.nodeId}'`);n instanceof te&&this._validateChildren(r,o,n.getNodes().map(v=>v.nodeTag),!1);let p=a||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(v=>v.nodeTag),r],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in i)&&(i._meta=o._meta),o.ns&&!("ns"in i)&&(i.ns=o.ns);let m=i.node_position;delete i.node_position;let g=i.node_label;delete i.node_label;let w;if(h?.collection_key){if(g!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);w=this._collectionLabel(h.collection_key,r,i)}else{let v=h?._subSpec?.get(r);if(v&&v.max===1){if(g!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);w=r}else w=g||o.node_label||this._autoLabel(e,r)}if(e.node(w)!=null)throw new Error(`duplicate node label '${w}'`);return e._setBuilderItem(c,d,w,n,i,m||">",!1,!0,null,!1,!0,null,r)}_countsForGrammar(e){let r=e?._meta||{};return!(r.data_element||r.subbuilder||r.component)}_validateParent(e,r,n){let s=r._parentSpec;if(!(s==null||s.has("*")||!this._countsForGrammar(r))&&!s.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,s){let a=r._subSpec;if(a==null||a.has("*")||r._meta?.subbuilder)return[];let i=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=a.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(i.get(o)||0)+1;if(i.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return s?[...a].filter(([o,l])=>(i.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let s=a=>{if(n[a]===null||n[a]===void 0)throw new Error(`'${r}': collection key needs attribute '${a}'`);return String(n[a])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(a,i)=>s(i)):s(e)}validateSource(){let e=[],r=(n,s="")=>{for(let a of n.getNodes()){let i=s?`${s}.${a.label}`:a.label,o=a.builder;o.validateCustomTypes(a);let l=o.schema[a.nodeTag];if(l&&!a._getMeta("data_element,subbuilder,component").some(Boolean)){let u=a.value instanceof te?a.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(a.nodeTag,l,u,!0);c.length&&e.push([i,c])}a.value instanceof te&&r(a.value,i)}};return r(this.source),e}_autoLabel(e,r){let n=0;for(;e.node(`${r}_${n}`)!==null&&e.node(`${r}_${n}`)!==void 0;)n+=1;return`${r}_${n}`}nodeById(e){let r=this.source.getNodeByAttr("nodeId",e);if(r==null)throw new Error(`nodeId not found: ${e}`);return r.builder.wrapSource(r)}runtimeValues(e){e.builder.validateCustomTypes(e);let r=new Map,n={},s=e.runtimeToEvaluate(),a=new Set(s.keys()),i=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...s])if(!(typeof c!="string"||!rt(d)))for(let f of Xn(e,d))s.has(f)||s.set(f,i.get(f));let o=e._getMeta("data_element");for(let[c,d]of s){if(d instanceof ce){r.set(c,d.resolve());continue}let f=typeof c=="string"?rt(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(r.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===nr){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let l=oa(s,r,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),u=l.get(nr);l.delete(nr);for(let c of l.keys())a.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,r,n,s,a){return null}targetId(e){if(e._targetId)return e._targetId;let r=e.rootBuilder;return e.parentBag.root!==r.source.root?null:(r._targetSerial+=1,e._targetId=`n${r._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let r of this.dataLogic){let s=(typeof r=="function"?r:r.constructor)[e];if(typeof s=="function")return s}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[s,a]of Object.entries(r))Bo.has(s)||(n[s]=a);return n}computeLogic(e){for(let r of e)this._computeNode(r)}_computeNode(e){let r=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[s,a]of Object.entries(r))s!=="destination"&&s!=="value"&&!s.startsWith("_")&&(n[s]=a);e.setRelativeData(r.destination,r.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(r.func);e.setRelativeData(r.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(r.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],r=n=>{for(let s of n.getNodes())s._getMeta("data_element")&&e.push(s),s.value instanceof te&&r(s.value)};return r(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of Oo(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,l]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let s=Pr(r),a=this._collection||this.constructor._classCollection,i=a.toDocument();i.abstracts={},i.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new et(a.toDocument()).update(i),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=s}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(qr,new r(null,this),e?{datapath:e}:null),n.getItem(qr)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new St(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let r=this[`renderer_${e}`];if(!r)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return r}materialize(e=null,r={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),s=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=s,s}setRenderTarget(e,r=null){r??=this.constructor._defaultRenderMode,this._defaultTargets.set(r,e)}render({mode:e=null,target:r=null,...n}={}){e??=this.constructor._defaultRenderMode;let s=this.getRenderer(e);if(r===!1&&s.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let a=r===!1?null:r||this._defaultTargets.get(s.mode)||null,i={...a?.renderOpts,...n};return s.finalize(this.materialize(e,i),a,i)}};He._registry=new Map;var ff=new Set(["short","medium","long","full"]),pf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function hf(t,e){if(!(t instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(t.getTime()))throw new RangeError("Invalid date");let r=e||xe(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function mf(t,e,r,n){let s=e.match(pf)||[];if(s.join("")!==e)throw new RangeError("Unclosed format literal");let a=(c,d=2)=>String(c).padStart(d,"0"),i=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),u={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>a(t.getUTCFullYear()%100),yyyy:()=>a(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>a(t.getUTCMonth()+1),MMM:()=>i({month:"short"}),MMMM:()=>i({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>a(t.getUTCDate()),EEE:()=>i({weekday:"short"}),EEEE:()=>i({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>a(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>a(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>a(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>a(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return s.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function Io(t,{format:e,mask:r,locale:n,dtype:s,places:a}={}){let i=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||a!=null))if(typeof t=="number"||Ne(t))i=gf(t,{format:e,locale:n,places:a});else{let o=hf(t,s);if(ff.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),i=new Intl.DateTimeFormat(n||void 0,l).format(t)}else i=mf(t,String(e),n||void 0,o)}return r==null?i:String(r).replaceAll("%s",()=>i)}function _f({format:t="decimal",places:e}={}){let r={maximumFractionDigits:20};if(!t||t==="decimal")r.style="decimal";else if(t==="percent")r.style="percent";else if(t==="scientific")r.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(t);if(!n||t.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${t}`);r.useGrouping=n[1].includes(","),r.minimumFractionDigits=(n[2]||"").length,r.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");r.minimumFractionDigits=n,r.maximumFractionDigits=n}return r}function gf(t,e={}){if(typeof t!="number"&&!Ne(t))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(t)))throw new RangeError("Number must be finite");let r=new Intl.NumberFormat(e.locale||void 0,_f(e));if(Ne(t)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return r.format(Ne(t)?t.toString():t)}var bf=new Set(["style","script"]),wf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Mo=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),jr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Ro=t=>t===!0?"true":t===!1?"false":String(t),Fn=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function yf(t){if(Mo.has(t))return!0;for(let e of Mo)if(t.startsWith(`${e}_`))return!0;return!1}function vf(t){let e=new Map;if(!t)return e;let r=[],n=0,s=null,a=!1,i=!1,o=0,l=String(t);for(let u=0;u<l.length;u+=1){let c=l[u],d=l[u+1];if(i){c==="*"&&d==="/"&&(i=!1,u+=1);continue}if(a){a=!1;continue}if(c==="\\"){a=!0;continue}if(s){c===s&&(s=null);continue}c==='"'||c==="'"?s=c:c==="/"&&d==="*"?(i=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(l.slice(n,u)),n=u+1)}r.push(l.slice(n));for(let u of r){let c=u.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var Vr=class extends Nt{static mode="html";renderedItem(e,r,n,{tag:s,xml:a=!0,pretty:i=!1,depthOffset:o=0,includeDatapath:l=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||p!=null)&&(r=Io(r,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(l){if(!Object.hasOwn(n,"id")){let k=this.builder.targetId(e);k!==null&&(g+=` id="${this._htmlAttrValue(k)}"`)}for(let[k,D]of Object.entries(e.getAttr()))e.pointerType(D)&&(g+=` data-${this.adapt(k)}-pointer="${this._htmlAttrValue(e.absDatapath(D))}"`)}let w=i?" ".repeat(this._nodeDepth(e,o)):"",b=i?`
24
- `:"";if(e._getMeta("void"))return`${w}<${s}${g}${a?"/":""}>${b}`;if(Array.isArray(r)){let k=this._composeStringFragments(r);return`${w}<${s}${g}>${b}${k}${w}</${s}>${b}`}if(r==null)return`${w}<${s}${g}></${s}>${b}`;let v=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):bf.has(s)?String(r):this._escapeText(r);return`${w}<${s}${g}>${v}</${s}>${b}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let s=n.getAttr("locale");if(s==null)continue;let a=n.pointerType(s)?n.data.getItem(n.absDatapath(s)):s;if(a)return a}}adaptAttrs(e){let r={},n={};for(let[a,i]of Object.entries(e||{}))if(a.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(a)]=i;else if(a==="dtype")r.dtype=i;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>a.startsWith(o)))continue;this._isStyleContribution(a)?n[a]=i:r[a]=i}let s=this._adaptStyle(n);return s&&(r.style=s),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||jr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&jr.has(r)||yf(e)}_adaptStyle(e){let r=vf(e.style),n=new Map,s=new Map;for(let[a,i]of Object.entries(e))if(a!=="style")if(a.startsWith("style_"))r.set(a.slice(6).replaceAll("_","-"),Ro(i));else if(jr.has(a))n.set(a,i);else{let o=a.indexOf("_"),l=o<0?a:a.slice(0,o);o>=0&&jr.has(l)?(s.has(l)||s.set(l,{}),s.get(l)[a.slice(o+1)]=i):r.set(a.replaceAll("_","-"),Ro(i))}for(let a of jr)(n.has(a)||s.has(a))&&this[`_macro_${a}`](n.get(a),s.get(a)||{},r);return[...r].map(([a,i])=>`${a}: ${i}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,s]of Object.entries(e||{}))wf.has(n)?s&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(s)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}_macro_rounded(e,r,n){let s=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[a,i]of Object.entries(r))if(a==="top"||a==="bottom")s[`${a}_left`]=i,s[`${a}_right`]=i;else if(a==="left"||a==="right")s[`top_${a}`]=i,s[`bottom_${a}`]=i;else if(["top_left","top_right","bottom_left","bottom_right"].includes(a))s[a]=i;else throw new TypeError(`rounded: unknown sub-kwarg '${a}'`);for(let[a,i]of Object.entries(s))n.set(`border-${a.replaceAll("_","-")}-radius`,Fn(i))}_macro_transform(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`rotate(${i}deg)`):a==="scale"||a==="translate"?s.push(`${a}(${i})`):a==="translate_x"?s.push(`translateX(${Fn(i)})`):a==="translate_y"?s.push(`translateY(${Fn(i)})`):a==="skew_x"?s.push(`skewX(${i}deg)`):a==="skew_y"?s.push(`skewY(${i}deg)`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("transform",s.join(" "))}_macro_filter(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`hue-rotate(${i}deg)`):a==="blur"?s.push(`blur(${Fn(i)})`):a==="drop_shadow"?s.push(`drop-shadow(${i})`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("filter",s.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[s,a]of Object.entries(r))n.set(`transition-${s.replaceAll("_","-")}`,String(a))}_macro_zoom(e,r,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,r,n){e!==void 0&&n.set("box-shadow",String(e));for(let[s,a]of Object.entries(r))n.set(`box-shadow-${s.replaceAll("_","-")}`,String(a))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var kf=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Lo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[kf.has(e)?e.replaceAll("_","-"):e,r]))}var zr=class extends St{static mode="svg";adaptAttrs(e){return Lo(e)}};var $o={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Un=class extends He{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar($o)}get renderer_html(){return new Vr(this)}};He.registerBuilder(Un);var Fo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Pn=class extends He{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Fo)}get renderer_svg(){return new zr(this)}};He.registerBuilder(Pn);var sr="http://www.w3.org/2000/svg";var xf=(0,We.defineComponent)({name:"rowActions",tag:"gramlot-row-actions",base:Xr,subTags:"button,dropDownButton",sourceContext:!0,parameters:{position:{dtype:"T",default:"end"},actionState:{dtype:"T",nullable:!0,default:null},state:{dtype:"X",nullable:!0,default:null,binding:"read"}},implementation:t=>class extends t{#e=null;#i;connectedCallback(){this.slot="row-actions",this.hidden=!0}setSourceContext(e){this.#i=e}setRowContext(e,r){this.#e={item:e,path:r},this.#s()}getRowContext(){return this.#e}clearRowContext(){this.#e=null,this.hidden=!0}projectAttributes(e,r){let n=super.projectAttributes(e,r);if(!["start","end"].includes(this.parameters.position))throw new TypeError("rowActions position must be start or end");return this.#s(),n}#s(){if(!(!this.#e||!this.parameters.actionState))for(let e of this.children){let r=e.getAttribute("rowAction");if(r===null)continue;let n=this.#i.callLogic(this.parameters.actionState,{...this.#e,action:r,state:this.parameters.state});if(!n||typeof n.hidden!="boolean"||typeof n.icon!="string"||typeof n.title!="string")throw new TypeError("rowActions actionState must return hidden, icon and title");e.setActionPresentation(n)}}}}),Tf=(0,We.defineComponent)({name:"tree",tag:"gramlot-tree",base:Xr,subTags:"rowActions[:1]",sourceContext:!0,bagStore:!0,dragSource:!0,parameters:{storepath:{dtype:"T"},draggable:{dtype:"B",default:!1,binding:"read"},labelAttribute:{dtype:"T",nullable:!0,default:null,binding:"read"},internalNames:{dtype:"B",default:!1,binding:"read"},hideValues:{dtype:"B",default:!1,binding:"read"},excludeRoot:{dtype:"T",nullable:!0,default:null,binding:"read"},labelCb:{dtype:"T",nullable:!0,default:null},getLabel:{dtype:"T",nullable:!0,default:null},getLabelClass:{dtype:"T",nullable:!0,default:null},getIconClass:{dtype:"T",nullable:!0,default:null},selectedLabelClass:{dtype:"T",default:"",binding:"read"},searchText:{dtype:"T",default:"",binding:"read"},favorites:{dtype:"X",nullable:!0,default:null,binding:"read"},favoritesLabel:{dtype:"T",default:"Favorites",binding:"read"},autoCollapse:{dtype:"B",default:!1,binding:"read"},selectedPath:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},onChecked:{dtype:["B","T"],nullable:!0,default:null},checkedPaths:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},checkedPaths_joiner:{dtype:"T",default:","},checkChildren:{dtype:"B",default:!0,binding:"read"}},implementation:t=>class extends t{#e;#i;#s;#a=new Set;#c=new Map;#R=new Map;#u=!1;#k=new WeakMap;#L=new Map;#E;#$=0;#_=null;#F=!1;#o;#U=!1;#f=!1;#g=new WeakMap;#b=new WeakSet;#p=new Set;#r=new Map;#w="";#H=null;#t="";#h=null;#P=0;#d=new Set;#D=new WeakSet;#A=new WeakSet;#m=!1;#l=new Map;constructor(){super(),this.#i=Af(this.ownerDocument.defaultView),this.control.replaceChildren(),this.control.setAttribute("role","tree"),this.control.setAttribute("aria-label","Tree"),this.control.classList.add("tree"),this.control.setAttribute("part","tree");let e=this.ownerDocument.createElement("style");e.textContent=`
22
+ `)}},Ur=class extends Error{constructor(e){super(e),this.name="BagException"}};ce.registerBagClass(de);Ps(de,"X",t=>t._toTytxPayload(),t=>de._fromTytxPayload(t));Mr(de.tytxSuffix,{...Je(de.tytxSuffix),Bag:de});var fo=new Set(["False","None","True","and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","nonlocal","not","or","pass","raise","return","try","while","with","yield"]);function po(t){return t.endsWith("_")&&fo.has(t.slice(0,-1))?t.slice(0,-1):t}function ho(t){let e=po(t);return e!==t?e:t.startsWith("_")&&fo.has(t.slice(1))?t.slice(1):t}function Ws(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let s=e||t;if(!s)return s;if(s=po(s),r&&!e){let a=`${n}_`;s.startsWith(a)&&(s=s.slice(a.length)),s=`${r}:${s}`}return s}var nr=Symbol("value"),_o=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function Xs(t){return Object.entries(t||{}).filter(([e])=>!_o.has(e)).map(([e,r])=>[ho(e),r])}var rr=class extends Ke{constructor(e,r,n=null,s=null,a=null,i=null,o=null){super(e,r,n,s,a,i,o),this._builder=e?._insertingBuilder??e?._builder??null,this._targetId=null}get builder(){if(this._builder)return this._builder;let e=this.parentBag;return e?e._builder:null}get data(){return this.builder.data}get rootBuilder(){return this.parentBag.root._builder}_getMeta(e){let r=this.getAttr("_meta")||{},n=e.split(",").map(s=>s.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(s=>r[s]!==void 0?r[s]:null)}pointerType(e){return typeof e=="string"&&(e[0]==="^"||e[0]==="=")&&!e.startsWith("==")?e[0]:null}pointers(){this.builder.validateCustomTypes(this);let e=[];for(let[r,n]of Object.entries(this.getAttr()||{}))this.pointerType(n)==="^"&&e.push([r,n.split(":",1)[0]]);return this.pointerType(this.value)==="^"&&e.push(["",this.value.split(":",1)[0]]),e}fixedAttrItems(){return Xs(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(nr,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(rt(e)?.pointer??e).slice(1));let n=null;return e.includes("?")&&([e,n]=e.split("?",2)),e.startsWith("#")?this._finalizeAbsPath(this._resolveSymbolicDatapath(e,r),n):(e.startsWith(".")&&(e=this._composeRelativeDatapath(e,r)),this._finalizeAbsPath(e,n))}_finalizeAbsPath(e,r){return e=this._collapseParentDatapath(e,e),r?`${e}?${r}`:e}_composeRelativeDatapath(e,r){let n=this;for(;n!==null&&e.startsWith(".");){let s=n.getAttr("datapath");s!=null&&(e=e==="."?s:s+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let s of e.split("."))if(s==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(s);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),s=n.indexOf("."),a=s===-1?n:n.slice(0,s),i=s===-1?"":n.slice(s+1),o;if(a==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(a==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let l=this.rootBuilder;if(!l)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=l.source.getNodeByAttr("nodeId",a),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(i?`.${i}`:".")}_findMarkedDatapathAncestor(e,r,n){let s=this;for(;s!=null;){let i=s.getAttr()||{};if(e&&(i.formId!=null||i.form===!0)||r&&"_anchor"in i)return s;s=s.parentNode}let a=e?"FORM":"ANCHOR";throw new Error(`#${a}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let s=this.data,a=this.absDatapath(e);return n&&s.getItem(a)==null&&s.setItem(a,r),s.getItem(a,r)}setRelativeData(e,r,{attributes:n=null,fired:s=!1,reason:a=null}={}){let i=this.data,o=this.absDatapath(e);i.setItem(o,r,n,">",!1,!0,a===null?!0:a,s)}fireEvent(e,r=!0,{attributes:n=null,reason:s=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:s})}SET(e,r){this.setRelativeData(e,r)}GET(e){return this.getRelativeData(e)}PUT(e,r){this.setRelativeData(e,r,{reason:!1})}FIRE(e,r=!0){this.setRelativeData(e,r,{fired:!0})}},te=class t extends de{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return rr}_setBuilderItem(e,r,n,...s){let a=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,l]of r)o._builder=l;let i=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...s)}catch(o){if(this.node(n)==null&&a)for(let[l,u]of a)l._builder=u;throw o}finally{this._insertingBuilder=i}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,s]of r)n._builder=s;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,s=(a,i)=>{if(n.has(a))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(a),r.push([a,i]);for(let o of a.getNodes()){let l=i,u=o._getMeta("subbuilder");u!=null&&(l=i._resolveSubbuilderReference(u,o.getAttr()||{},o.nodeTag)),r.push([o,l]);let c=o.getValue(!0);c instanceof t&&s(c,l)}};return s(this,e),r}};if((Je(te.tytxSuffix).SourceBag??te)!==te)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");Mr(te.tytxSuffix,{...Je(te.tytxSuffix),SourceBag:te});function ef(t){if(t.length===0)return{value:null,attrs:{}};let e=t[0];if(e!==null&&typeof e=="object"){let r=Object.getPrototypeOf(e);if(r===Object.prototype||r===null)return{value:null,attrs:e}}return{value:e,attrs:t[1]||{}}}var tf=new Set(["then","toJSON"]),go=new WeakMap;function Pr(t){return go.get(t)||t}function Gs(t){if(t==null)return t;t=Pr(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function bo(t,e){let r=e instanceof de,n=new Proxy(e,{get(s,a){if(typeof a=="symbol"||a.startsWith("_")||tf.has(a))return Reflect.get(s,a,s);let i=t.schemaTag(a);if(r&&i)return mo(t,s,i,r);if(a in s){let l=Reflect.get(s,a,s);return typeof l=="function"?l.bind(s):l}if(i)return mo(t,s,i,r);let o=t.containerMethod(a);if(o)return(...l)=>t[o](t.wrapSource(s),...l)}});return go.set(n,e),n}function mo(t,e,r,n){return(...s)=>{let{value:a,attrs:i}=ef(s),o=n?t.bagCall(e,r,a,i):t.commandOnNode(e,r,a,i);return o.builder.wrapSource(o)}}var yo=/^[A-Za-z_][A-Za-z0-9_]*$/,rf=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),nf=new Set(["framework","value","attribute"]),sf=new Map([["builtins.str",t=>typeof t=="string"],["builtins.int",t=>Number.isInteger(t)],["builtins.float",t=>typeof t=="number"&&Number.isFinite(t)],["builtins.bool",t=>typeof t=="boolean"],["builtins.list",t=>Array.isArray(t)],["builtins.dict",t=>t!==null&&typeof t=="object"&&!Array.isArray(t)],["builtins.tuple",t=>Array.isArray(t)],["builtins.set",t=>Array.isArray(t)||t instanceof Set],["builtins.NoneType",t=>t===null],["builtins.object",t=>!0]]);function Tt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function x(t,e){throw new TypeError(`${t}: ${e}`)}function He(t,e,r,n){Tt(t)||x(n,"must be an object");for(let s of Object.keys(t))e.includes(s)||x(n,`unknown field '${s}'`);for(let s of r)Object.hasOwn(t,s)||x(n,`missing field '${s}'`)}function Ct(t,e){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t))return t.forEach((r,n)=>Ct(r,`${e}[${n}]`));if(Tt(t))return Object.entries(t).forEach(([r,n])=>Ct(n,`${e}.${r}`));x(e,"must be lossless JSON data")}}function af(t,e){let r="",n=!1;for(let s=0;s<t.length;s++){let a=t[s];if(a==="\\"){r+=a+(t[++s]??"");continue}a==="["&&(n=!0),!n&&a==="."&&!(e&16)?r+="[^\\n]":!n&&a==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&a==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=a,a==="]"&&(n=!1)}return r}function xt(t,e,r=!1,n=null){if(t===null)return null;switch(He(t,["kind","dtype","module","name","origin","arguments","items","values","base","metadata","pattern","flags","ge","le","gt","lt","value"],["kind"],e),t.kind){case"custom":return He(t,["kind","name"],["kind","name"],e),n||x(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{He(t,["kind","dtype"],["kind","dtype"],e);let s=t.dtype;typeof s!="string"&&x(e,"dtype must be a string");let a=Ir(s);return!a&&s!=="NN"&&x(e,`unknown dtype '${s}'`),{...t,test:o=>s==="NN"?o===null:s==="N"?Ne(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):a===Number?typeof o=="number"&&Number.isFinite(o)&&(s!=="L"||Number.isInteger(o)):a===String?typeof o=="string":a===Boolean?typeof o=="boolean":a===Date?o instanceof Date&&Number.isFinite(o.getTime()):a===Object?Tt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof a}}case"any":return{...t,test:s=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&x(e,"type requires string module/name");let s=`${t.module}.${t.name}`;if(s==="collections.abc.Callable")return{...t,test:i=>typeof i=="function",portable:!1};let a=sf.get(s);return a||x(e,`unsupported type '${s}'`),{...t,test:a}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&x(e,"union items must be non-empty");let s=t.items.map((a,i)=>xt(a,`${e}.items[${i}]`,!0,n));return{...t,items:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>s.some(i=>i.test&&i.test(a))}}case"literal":return Array.isArray(t.values)||x(e,"literal values must be an array"),t.values.forEach((s,a)=>Ct(s,`${e}.values[${a}]`)),{...t,test:s=>t.values.some(a=>Object.is(a,s))};case"annotated":{Array.isArray(t.metadata)||x(e,"annotated metadata must be an array"),t.metadata.some(i=>!["regex","range","value"].includes(i?.kind))&&x(e,"unsupported annotation metadata kind");let s=xt(t.base,`${e}.base`,!0,n),a=t.metadata.map((i,o)=>xt(i,`${e}.metadata[${o}]`,!0,n));return{...t,base:s,metadata:a,inputConstraint:s.inputConstraint,test:i=>s.test(i)&&a.every(o=>!o.test||o.test(i))}}case"range":{for(let s of["ge","le","gt","lt"])Object.hasOwn(t,s)||x(e,`range missing '${s}'`);for(let s of["ge","le","gt","lt"])t[s]!==null&&(typeof t[s]!="number"||!Number.isFinite(t[s]))&&x(e,`${s} must be finite number or null`);return{...t,test:s=>typeof s=="number"&&(t.ge===null||s>=t.ge)&&(t.le===null||s<=t.le)&&(t.gt===null||s>t.gt)&&(t.lt===null||s<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&x(e,"regex requires pattern and non-negative integer flags");let s=t.flags&-59;s&&x(e,`unsupported Python regex flags ${s}`),t.flags&2&&x(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&x(e,"regex uses a non-portable construct or character class");let a="uy";t.flags&16&&(a+="s");let i;try{i=new RegExp(`(?:${af(t.pattern,t.flags)})(?![\\s\\S])`,a)}catch(o){x(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(i.lastIndex=0,i.test(o))}}case"value":return Ct(t.value,`${e}.value`),{...t};case"generic":{let s=xt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&x(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||x(e,"generic arguments must be an array");let a=t.arguments.map((i,o)=>xt(i,`${e}.arguments[${o}]`,!0,n));return{...t,origin:s,arguments:a,inputConstraint:a.some(i=>i.inputConstraint),test:i=>s.test(i)&&of(t.origin,a,i)}}case"arguments":x(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||x(e,"ellipsis is only valid as a nested descriptor"),{...t};default:x(e,`unknown annotation kind '${t.kind}'`)}}function of(t,e,r){let n=`${t.module}.${t.name}`;return n==="builtins.tuple"&&e.length&&e[1]?.kind!=="ellipsis"?r.length===e.length&&r.every((s,a)=>e[a].test(s)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(s=>!e[0]?.test||e[0].test(s)):n==="builtins.dict"?Object.entries(r).every(([s,a])=>(!e[0]?.test||e[0].test(s))&&(!e[1]?.test||e[1].test(a))):!1}function vo(t,e){if(t===null)return null;if(typeof t!="string"&&x(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let s=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(s)&&x(e,`invalid cardinality item '${n}'`);let a=s.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);a||x(e,`invalid cardinality item '${n}'`);let[,i,o,l,u]=a;r.has(i)&&x(e,`duplicate tag '${i}'`);let c=0,d=1/0;s.includes("[")&&(s.includes(":")?(c=l?Number(l):0,d=u?Number(u):1/0):c=d=Number(o)),d<c&&x(e,`maximum ${d} is below minimum ${c}`),r.set(i,{min:c,max:d})}return r.has("*")&&r.size>1&&x(e,"wildcard '*' cannot be combined with named tags"),r}function ko(t,e){if(t===null)return null;typeof t!="string"&&x(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let s=n.trim();s&&((!yo.test(s)||r.has(s))&&x(e,`invalid or duplicate parent '${n}'`),r.add(s))}return r}function lf(t,e,r){if(t===null)return null;He(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||x(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(l=>l.kind==="var_keyword"),accepts_var_positional:n.some(l=>l.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&x(e,"invalid signature descriptor");let s=new Set,a=!1,i=!1,o=t.parameters.map((l,u)=>{let c=`${e}.parameters[${u}]`;return He(l,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof l.name!="string"||!yo.test(l.name)||s.has(l.name))&&x(c,"invalid or duplicate parameter name"),s.add(l.name),(!rf.has(l.kind)||!nf.has(l.role)||typeof l.has_default!="boolean")&&x(c,"invalid kind, role, or has_default"),l.has_default!==Object.hasOwn(l,"default")&&x(c,"default presence must equal has_default"),l.has_default&&Ct(l.default,`${c}.default`),a||=l.kind==="var_keyword",i||=l.kind==="var_positional",{...l,annotation:xt(l.annotation,`${c}.annotation`,!1,r)}});return(a!==t.accepts_var_keyword||i!==t.accepts_var_positional)&&x(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function wo(t,e,r,n){let s=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];He(t,s,[],e),t={...Object.fromEntries(s.map(a=>[a,null])),...t};for(let a of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[a]!==null&&typeof t[a]!="string"&&x(e,`${a} must be string or null`);return t._meta!==null&&(Tt(t._meta)||x(e,"_meta must be object or null"),Ct(t._meta,`${e}._meta`)),vo(t.sub_tags,`${e}.sub_tags`),ko(t.parent_tags,`${e}.parent_tags`),{...t,attributes:lf(t.attributes,`${e}.attributes`,n)}}function Eo(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Do(t,e){let r={...e};for(let[n,s]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=s);return r._meta={...t._meta||{},...e._meta||{}},r}function Ao(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?vo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?ko(e.parent_tags,"resolved.parent_tags"):null,e}function xo(t,e,r,n){if(r.get(t)===1&&x(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let s=e[t];s||x(n,`unknown abstract '${t}'`),r.set(t,1);let a={...s};for(let i of Eo(s.inherits_from))a=Do(xo(i,e,r,n),a);return a=Ao(a),r.set(t,2),e[t]=a,a}function Ys({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let a of Object.keys(r))xo(a,r,n,`abstracts.${a}.inherits_from`);let s={};for(let[a,i]of Object.entries(e)){let o={...i};for(let l of Eo(i.inherits_from)){let u=r[l];u||x(`elements.${a}.inherits_from`,`unknown abstract '${l}'`),o=Do(u,o)}s[a]=Ao(o)}return{abstracts:r,elements:s}}function Zs(t){He(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),He(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&x("document_format","expected builder_grammar version 1.1 or 1.2"),He(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&x("grammar.name","must be non-empty string");for(let s of["version","title","description"])t.grammar[s]!==null&&typeof t.grammar[s]!="string"&&x(`grammar.${s}`,"must be string or null");(!Tt(t.abstracts)||!Tt(t.elements))&&x("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&x("custom_types","requires version 1.2");let e=$n.fromJSON(t.custom_types??{}),r={};for(let[s,a]of Object.entries(t.abstracts))(!s||s.startsWith("_"))&&x("abstracts",`invalid public name '${s}'`),r[s]=wo(a,`abstracts.${s}`,!1,e);let n={};for(let[s,a]of Object.entries(t.elements))(!s||s.startsWith("_"))&&x("elements",`invalid public name '${s}'`),n[s]=wo(a,`elements.${s}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function To(t,e,r,n){let s=e.attributes;if(!s)return;let a={...n};r!=null&&(a.node_value=r);let i=new Set(s.parameters.filter(u=>u.role==="attribute").map(u=>u.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!s.accepts_var_keyword)for(let u of Object.keys(n))!i.has(u)&&!o.has(u)&&x(t,`unknown attribute '${u}'`);let l=e._meta?.component?s.parameters.find(u=>u.role!=="framework"&&["positional_only","positional_or_keyword"].includes(u.kind))?.name:null;for(let u of s.parameters){if(u.name===l||u.role==="framework"||u.kind.startsWith("var_"))continue;let c=Object.hasOwn(a,u.name);!c&&!u.has_default&&x(t,`missing required ${u.role} '${u.name}'`),c&&u.annotation!==null&&(!u.annotation.test||!u.annotation.test(a[u.name]))&&x(t,`invalid value for ${u.role} '${u.name}'`)}}var $n=class t{#e=new Map;#i=new Map;register(e,r,n){let s=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),a=s.has(r)?{kind:"type",module:"builtins",name:s.get(r)}:r;return this.#s(e,{kind:"annotated",base:a,metadata:[n]})}#s(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||uf.has(e))&&x("custom_types",`invalid, reserved or duplicate name '${e}'`),He(r,["kind","base","metadata"],["kind","base","metadata"],`custom_types.${e}`),(r.kind!=="annotated"||!Array.isArray(r.metadata)||r.metadata.length!==1||!["regex","range"].includes(r.metadata[0]?.kind))&&x(`custom_types.${e}`,"requires an annotated base with one Regex or Range validator");let n=r.metadata[0].kind==="regex"?["str"]:["int","float"];(r.base?.kind!=="type"||r.base.module!=="builtins"||!n.includes(r.base.name))&&x(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),Ct(r,`custom_types.${e}`);let s=structuredClone(r),a=xt(s,`custom_types.${e}`),i=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:i,enumerable:!0}),this.#e.set(e,s),this.#i.set(e,{...i,inputConstraint:!0,test:a.test}),i}resolve(e,r="custom_types"){return this.#i.has(e)||x(r,`unknown custom type '${e}'`),{...this.#i.get(e)}}validate(e,r){return this.resolve(e).test(r)||x(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){Tt(e)||x("custom_types","must be an object");let r=new t;for(let[n,s]of Object.entries(e))r.#s(n,s);return r}},uf=new Set("False None True and as assert async await break class continue def del elif else except finally for from global if import in is lambda nonlocal not or pass raise return try while with yield".split(" "));function Co(t,e,r,n){let s=e?.attributes;if(s)for(let a of s.parameters){if(!a.annotation?.inputConstraint||a.role==="framework"||["var_keyword","var_positional"].includes(a.kind))continue;let i=a.role==="value"?r:n[a.name];i!==void 0&&(a.annotation.test(i)||x(t,`invalid input for '${a.name}' (custom type)`))}}function No(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Js(t,e))throw new TypeError(`conflicting custom type '${r[1]}'`);return structuredClone(t)}if(r.length===2&&["abstracts","elements"].includes(r[0]))return structuredClone(e);if(Qe(t)&&Qe(e)){let n=structuredClone(t);for(let[s,a]of Object.entries(e))a!==null&&Object.defineProperty(n,s,{value:No(n[s],a,[...r,s]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Js(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Js(r,e[n])):Qe(t)&&Qe(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Js(t[r],e[r])):!1}function Qe(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Ks(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Ks);return}if(Qe(t)){Object.values(t).forEach(Ks);return}throw new TypeError("collection must contain only finite JSON values")}}var et=class t{#e;constructor(e){Ks(e);let r=["document_format","grammar","abstracts","elements"];if(!Qe(e)||Object.keys(e).some(s=>![...r,"custom_types"].includes(s))||r.some(s=>!Object.hasOwn(e,s)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Qe(n)||Object.keys(n).length!==2||n.name!=="builder_grammar"||!["1.1","1.2"].includes(n.version))throw new TypeError("expected builder_grammar version 1.1 or 1.2");for(let s of["grammar","abstracts","elements"])if(!Qe(e[s]))throw new TypeError(`${s} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Qe(e.custom_types)))throw new TypeError("custom_types requires an object catalog and version 1.2");this.#e=structuredClone(e)}update(e){let r=new t(e),n=No(this.#e,r.#e);return(this.#e.document_format.version==="1.2"||r.#e.document_format.version==="1.2")&&(n.document_format.version="1.2"),this.#e=n,this}toDocument(){return structuredClone(this.#e)}};var Nt=class{static renderType="string";static mode=null;constructor(e){this._builder=e,this.renders=new Map([[e,this]])}get builder(){return this._builder}get renderType(){return this.constructor.renderType}get mode(){return this.constructor.mode}addRender(e,r){this.renders.set(e,r)}getRender(e){let r=this.renders.get(e);if(r!==void 0)return r;let n=e.getRenderer();return this.renders.set(e,n),n}render(e,r={}){let n=e.builder,[s,a]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,a,r);let i=this.getRender(n),o;return[o,a]=i._handleMeta(e,a),e._getMeta("subbuilder")||(a=i.adaptAttrs(a)),e.value instanceof te&&(s=this.renderChildren(e.value,r)),i.renderedItem(e,s,a,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let s of e.getNodes()){let a=this.render(s,r);a!==null&&(Array.isArray(a)?n.push(...a):n.push(a))}return n}_renderComponent(e,r,n){let[s,a,i,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,s,i,o,n);if(a==null)return[];if(!(a instanceof de))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${a?.constructor?.name||typeof a}`);return a.getNodes().map(l=>this._expandBlock(e,s,i,{node_label:l.label},n))}_expansionInputs(e,r){let n=e.builder,s=n.componentMethod(e.nodeTag),a=s&&n[s];if(typeof a!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let i=r.iterate;delete r.iterate,delete r.store;let o=e.getAttr("iterate")||e.getAttr("store");o!=null?(e.pointerType(o)&&(o=o.slice(1)),o.startsWith(".")&&(o=e._composeRelativeDatapath(o,o))):o=null;for(let l of Object.keys(r)){let u=e.getAttr(l);e.pointerType(u)==="^"&&(r[l]=`^${e.absDatapath(u)}`)}return[a,i,o,r]}_expandBlock(e,r,n,s,a){let i=e.builder._expansionRoot(n);r.call(e.builder,Gs(i),s);let o=i.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let l={...a,depthOffset:this._nodeDepth(e,a.depthOffset||0)};return this.render(o[0],l)}preprocess(e){return e}renderedItem(e,r,n,s){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,s]=e._getMeta("render_tag,render_attributes"),a=Ws(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!a)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return s&&(r={...r,...s}),[a,r]}adaptAttrs(e){return e}adapt(e){let r=`${this.builder.constructor._name}_`;return e.startsWith(r)?e.slice(r.length):e}finalize(e,r=null,n={}){let s=this._composeStringFragments(e);if(r==null)return s;if(typeof r=="string")throw new TypeError("string render targets require filesystem support, which is unavailable in the portable renderer; pass a callable or writable target instead");if(typeof r.full=="function"&&typeof r.write!="function")return r.full(s),null;if(typeof r.write=="function")return r.write(s),null;if(typeof r=="function")return r(s),null;throw new TypeError("render target must be writable (.write), callable, or expose .full")}_composeStringFragments(e){if(!Array.isArray(e))return e;if(e.some(r=>typeof r!="string"))throw new TypeError("String composition requires string fragments; object renderers must define their own composition");return e.join("")}_escapeText(e){return String(e).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',"&quot;")}_nodeDepth(e,r=0){let s=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(s-1,0)+r}};var St=class extends Nt{static mode="xml";renderedItem(e,r,n,{tag:s,pretty:a=!1,depthOffset:i=0}={}){let o=this._formatAttrs(n),l=a?" ".repeat(this._nodeDepth(e,i)):"",u=a?`
23
+ `:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${l}<${s}${o}>${u}${c}${l}</${s}>${u}`}return r==null?`${l}<${s}${o}></${s}>${u}`:`${l}<${s}${o}>${this._escapeText(r)}</${s}>${u}`}finalize(e,r=null,{docHeader:n=null}={}){let s=this._composeStringFragments(e);return n===!0?s=`<?xml version='1.0' encoding='UTF-8'?>${s}`:typeof n=="string"&&(s=n+s),super.finalize(s,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var So={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"base",version:null,title:null,description:null},abstracts:{},elements:{dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};function Oo(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function df(t){let e=Object.create(null),r=(n,s)=>{let a=n.toLowerCase(),i=e[a];if(i!==void 0&&i!==s)throw new Error(`container '${n}' is already tied to implementation method '${i}' (cannot rebind to '${s}')`);e[a]=s};for(let n of Oo(t))if(Object.hasOwn(n,"containers"))for(let s of n.containers||[])r(s,s);return e}function qr(t){let e=Object.create(null);for(let r of Object.keys(t)){let n=r.toLowerCase();if(Object.hasOwn(e,n))throw new Error(`element declaration '${r}' has a case-insensitive collision with '${e[n]}'`);e[n]=r}return e}var jr="_root_",Qs="_root_",Bo=new Set(["destination","func","value","_on_start"]),We=class t{static _sourceClass=te;static registerBuilder(e){if(typeof e!="function"||!(e.prototype instanceof t))throw new TypeError("registerBuilder requires a BuilderBase subclass");let r=e._name;if(typeof r!="string"||!r)throw new TypeError("registered builders require a non-empty static _name");let n=t._registry.get(r);if(n&&n!==e)throw new Error(`Builder name '${r}' is already registered to ${n.name}; cannot register ${e.name}`);return t._registry.set(r,e),e}static getBuilderClass(e){let r=t._registry.get(e);if(!r)throw new Error(`No builder registered with name '${e}'`);return r}constructor(e=null){this.name=e||this.constructor._name,this._dataroot=new de,this._dataroot.setBackref(),this._dataroot.setItem(Qs,new de),this.data=this._dataroot.getItem(Qs),this._defaultTargets=new Map,this.materialized=Object.create(null),this._collection=null,this._schemaOverride=null,this._tagNamesOverride=null,this._componentMap=null,this._targetSerial=0,this._subbuilders=new Map,this._sourceHandles=new WeakMap;let r=this.constructor._sourceClass;this._sourceroot=new r(null,this),this._sourceroot.setBackref(),this._sourceroot.setItem(jr,new r(null,this)),this.source=this._sourceroot.getItem(jr)}wrapSource(e){if(e=Pr(e),!(e instanceof te)&&!(e instanceof rr))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=bo(this,e),this._sourceHandles.set(e,r)),r}get root(){return this.wrapSource(this.source)}getSubbuilder(e){if(typeof e!="string"||!e||e.includes(":"))throw new Error(`unsupported subbuilder reference '${e}'`);let r=this._subbuilders.get(e);if(!r){let n=t.getBuilderClass(e);r=new n,this._subbuilders.set(e,r)}return r._dataroot=this._dataroot,r.data=this.data,r}_resolveSubbuilderReference(e,r,n){if(typeof e!="string"||!e)throw new Error(`'${n}': subbuilder declaration must be a non-empty string`);if(e.includes(":"))throw new Error(`'${n}': runtime subbuilder reference '${e}' is unsupported`);return this.getSubbuilder(e)}static defineGrammar(e){let r=this._classCollection,n=r?new et(r.toDocument()).update(e):new et(e),s=Zs(n.toDocument()),a=Ys(s),i=qr(a.elements);this._classCollection=n,this._classSchema=a.elements,this._abstracts=a.abstracts,this._tagNames=i}static{this.defineGrammar(So)}get _containers(){return df(this.constructor)}containerMethod(e){return this._containers[e.toLowerCase()]||null}componentMethod(e){return this._componentMap?.[e.toLowerCase()]||null}get schema(){return this._schemaOverride||this.constructor._classSchema||{}}get schemaTagNames(){return this._schemaOverride?this._tagNamesOverride??=qr(this.schema):this.constructor._tagNames??=qr(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let s=`${this.constructor._name}_`;return r.startsWith(s)&&this.schemaTagNames[r.slice(s.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,s=r?new et(e):new et(n.toDocument()).update(e),a=Zs(s.toDocument()),i=Ys(a),o=qr(i.elements);return this._collection=s,this._schemaOverride=i.elements,this._tagNamesOverride=o,this}validateCustomTypes(e){let r=e.parentBag?.parentNode?.builder||e.parentBag?._builder,n=r&&r!==this&&r.schema[e.nodeTag]?._meta?.subbuilder?r:this;Co(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);return To(s,this.schema[s],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:s}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let a=r!==void 0?r:e.value instanceof te?null:e.value;this.validateNodeValues(e.nodeTag,a,n||e.getAttr?.()||{});let i=this.schema[this.schemaTag(e.nodeTag)],o=s||(e.value instanceof te?e.value.getNodes().map(l=>l.nodeTag):null);return o&&this._validateChildren(e.nodeTag,i,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let s=this.schemaTag(e);if(!s)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(a=>typeof a!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(s,this.schema[s],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let s=this.schema[n];if(!this._countsForGrammar(s))return!0;let a=s._parentSpec;if(a==null||a.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let i=this.schemaTag(r);if(!i)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,s,i),!0}bagCall(e,r,n,s){return this.setChild(e,r,n,s)}commandOnNode(e,r,n,s){if(e=Pr(e),e.value instanceof te)return this.setChild(e.value,r,n,s);let a=e.value,i=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(i,r,n,s,e);return this.promoteNodeValue(e,a,i),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,s,a=null){let i={...s},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,i);let l=o._meta?.subbuilder,c=(l==null?null:this._resolveSubbuilderReference(l,i,r))||this,d=n instanceof te?n._builderBindingPlan(c):null,f=a?.rootBuilder||e.root._builder||this;if(i.nodeId!=null&&f.source.getNodeByAttr("nodeId",i.nodeId))throw new Error(`Duplicate nodeId '${i.nodeId}'`);n instanceof te&&this._validateChildren(r,o,n.getNodes().map(v=>v.nodeTag),!1);let p=a||e.parentNode,h=p?.nodeTag?this.schema[p.nodeTag]:null;if(h&&!p._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,p.nodeTag),this._validateChildren(p.nodeTag,h,[...e.getNodes().map(v=>v.nodeTag),r],!1);else if(!h&&!p?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in i)&&(i._meta=o._meta),o.ns&&!("ns"in i)&&(i.ns=o.ns);let m=i.node_position;delete i.node_position;let g=i.node_label;delete i.node_label;let w;if(h?.collection_key){if(g!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);w=this._collectionLabel(h.collection_key,r,i)}else{let v=h?._subSpec?.get(r);if(v&&v.max===1){if(g!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);w=r}else w=g||o.node_label||this._autoLabel(e,r)}if(e.node(w)!=null)throw new Error(`duplicate node label '${w}'`);return e._setBuilderItem(c,d,w,n,i,m||">",!1,!0,null,!1,!0,null,r)}_countsForGrammar(e){let r=e?._meta||{};return!(r.data_element||r.subbuilder||r.component)}_validateParent(e,r,n){let s=r._parentSpec;if(!(s==null||s.has("*")||!this._countsForGrammar(r))&&!s.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,s){let a=r._subSpec;if(a==null||a.has("*")||r._meta?.subbuilder)return[];let i=new Map;for(let o of n){let l=this.schema[o];if(l&&!this._countsForGrammar(l))continue;let u=a.get(o);if(!u)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(i.get(o)||0)+1;if(i.set(o,c),c>u.max)throw new Error(`too many '${o}' in '${e}'`)}return s?[...a].filter(([o,l])=>(i.get(o)||0)<l.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let s=a=>{if(n[a]===null||n[a]===void 0)throw new Error(`'${r}': collection key needs attribute '${a}'`);return String(n[a])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(a,i)=>s(i)):s(e)}validateSource(){let e=[],r=(n,s="")=>{for(let a of n.getNodes()){let i=s?`${s}.${a.label}`:a.label,o=a.builder;o.validateCustomTypes(a);let l=o.schema[a.nodeTag];if(l&&!a._getMeta("data_element,subbuilder,component").some(Boolean)){let u=a.value instanceof te?a.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(a.nodeTag,l,u,!0);c.length&&e.push([i,c])}a.value instanceof te&&r(a.value,i)}};return r(this.source),e}_autoLabel(e,r){let n=0;for(;e.node(`${r}_${n}`)!==null&&e.node(`${r}_${n}`)!==void 0;)n+=1;return`${r}_${n}`}nodeById(e){let r=this.source.getNodeByAttr("nodeId",e);if(r==null)throw new Error(`nodeId not found: ${e}`);return r.builder.wrapSource(r)}runtimeValues(e){e.builder.validateCustomTypes(e);let r=new Map,n={},s=e.runtimeToEvaluate(),a=new Set(s.keys()),i=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...s])if(!(typeof c!="string"||!rt(d)))for(let f of Xn(e,d))s.has(f)||s.set(f,i.get(f));let o=e._getMeta("data_element");for(let[c,d]of s){if(d instanceof ce){r.set(c,d.resolve());continue}let f=typeof c=="string"?rt(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let p=e.absDatapath(f);if(r.set(c,this.data.getItem(p)),!o&&!p.includes("?")&&c===nr){let h=this.data.getNode(p);h&&Object.assign(n,h.getAttr("_wdg"))}}let l=oa(s,r,(c,d,f,p)=>this.evaluatePointerExpression(e,c,d,f,p)),u=l.get(nr);l.delete(nr);for(let c of l.keys())a.has(c)||l.delete(c);return[u,{...Object.fromEntries(l),...n}]}evaluatePointerExpression(e,r,n,s,a){return null}targetId(e){if(e._targetId)return e._targetId;let r=e.rootBuilder;return e.parentBag.root!==r.source.root?null:(r._targetSerial+=1,e._targetId=`n${r._targetSerial}`,e._targetId)}get dataLogic(){if(!this._dataLogic){let e=this._buildDataLogic();this._dataLogic=Array.isArray(e)?e:[e]}return this._dataLogic}_buildDataLogic(){return this}_resolveLogicFunc(e){if(typeof e=="function")return e;if(typeof e!="string")throw new Error("data-element func must be a name or a function");for(let r of this.dataLogic){let s=(typeof r=="function"?r:r.constructor)[e];if(typeof s=="function")return s}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[s,a]of Object.entries(r))Bo.has(s)||(n[s]=a);return n}computeLogic(e){for(let r of e)this._computeNode(r)}_computeNode(e){let r=e.getAttr()||{};if(e.nodeTag==="dataSetter"){let n={};for(let[s,a]of Object.entries(r))s!=="destination"&&s!=="value"&&!s.startsWith("_")&&(n[s]=a);e.setRelativeData(r.destination,r.value,{attributes:Object.keys(n).length?n:null})}else if(e.nodeTag==="dataFormula"){let n=this._resolveLogicFunc(r.func);e.setRelativeData(r.destination,n(this._bindings(e)))}else e.nodeTag==="dataController"&&this._resolveLogicFunc(r.func)(e,this._bindings(e))}_dataElementNodes(){let e=[],r=n=>{for(let s of n.getNodes())s._getMeta("data_element")&&e.push(s),s.value instanceof te&&r(s.value)};return r(this.source),e}setup(e){}main(e){throw new Error(`${this.constructor.name}.main() not implemented: a bare builder is grammar, not a renderable page`)}_resolveComponents(){let e={};for(let o of Oo(this.constructor))if(Object.hasOwn(o,"components"))for(let l of o.components||[])e[l]=l;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,l]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=l;let s=qr(r),a=this._collection||this.constructor._classCollection,i=a.toDocument();i.abstracts={},i.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new et(a.toDocument()).update(i),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=s}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(jr,new r(null,this),e?{datapath:e}:null),n.getItem(jr)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new St(this)}getRenderer(e=null){e??=this.constructor._defaultRenderMode;let r=this[`renderer_${e}`];if(!r)throw new Error(`${this.constructor.name} does not expose renderer_${e}`);return r}materialize(e=null,r={}){e??=this.constructor._defaultRenderMode;let n=this.getRenderer(e),s=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=s,s}setRenderTarget(e,r=null){r??=this.constructor._defaultRenderMode,this._defaultTargets.set(r,e)}render({mode:e=null,target:r=null,...n}={}){e??=this.constructor._defaultRenderMode;let s=this.getRenderer(e);if(r===!1&&s.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let a=r===!1?null:r||this._defaultTargets.get(s.mode)||null,i={...a?.renderOpts,...n};return s.finalize(this.materialize(e,i),a,i)}};We._registry=new Map;var ff=new Set(["short","medium","long","full"]),pf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function hf(t,e){if(!(t instanceof Date))throw new TypeError("Temporal formats require a typed Date value");if(!Number.isFinite(t.getTime()))throw new RangeError("Invalid date");let r=e||xe(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function mf(t,e,r,n){let s=e.match(pf)||[];if(s.join("")!==e)throw new RangeError("Unclosed format literal");let a=(c,d=2)=>String(c).padStart(d,"0"),i=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),u={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>a(t.getUTCFullYear()%100),yyyy:()=>a(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>a(t.getUTCMonth()+1),MMM:()=>i({month:"short"}),MMMM:()=>i({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>a(t.getUTCDate()),EEE:()=>i({weekday:"short"}),EEEE:()=>i({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>a(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>a(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>a(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>a(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return s.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!u[c])throw new RangeError(`Unsupported date format token: ${c}`);return u[c]()}).join("")}function Io(t,{format:e,mask:r,locale:n,dtype:s,places:a}={}){let i=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||a!=null))if(typeof t=="number"||Ne(t))i=gf(t,{format:e,locale:n,places:a});else{let o=hf(t,s);if(ff.has(e)){let l={timeZone:"UTC"};o!=="H"&&(l.dateStyle=e),o!=="D"&&(l.timeStyle=e),i=new Intl.DateTimeFormat(n||void 0,l).format(t)}else i=mf(t,String(e),n||void 0,o)}return r==null?i:String(r).replaceAll("%s",()=>i)}function _f({format:t="decimal",places:e}={}){let r={maximumFractionDigits:20};if(!t||t==="decimal")r.style="decimal";else if(t==="percent")r.style="percent";else if(t==="scientific")r.notation="scientific";else{let n=/^(0|#,##0)(?:\.(0*)(#*))?$/.exec(t);if(!n||t.includes(".")&&!n[2]&&!n[3])throw new RangeError(`Unsupported number format: ${t}`);r.useGrouping=n[1].includes(","),r.minimumFractionDigits=(n[2]||"").length,r.maximumFractionDigits=(n[2]||"").length+(n[3]||"").length}if(e!=null&&e!==""){let n=Number(e);if(!Number.isInteger(n)||n<0||n>20)throw new RangeError("places must be an integer from 0 to 20");r.minimumFractionDigits=n,r.maximumFractionDigits=n}return r}function gf(t,e={}){if(typeof t!="number"&&!Ne(t))throw new TypeError("Number formatting requires a Number or Decimal");if(!Number.isFinite(Number(t)))throw new RangeError("Number must be finite");let r=new Intl.NumberFormat(e.locale||void 0,_f(e));if(Ne(t)&&new Intl.NumberFormat("en",{useGrouping:!1}).format("9007199254740993")!=="9007199254740993")throw new Error("This browser cannot format Decimal values without precision loss");return r.format(Ne(t)?t.toString():t)}var bf=new Set(["style","script"]),wf=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected"]),Mo=new Set(["width","height","top","left","right","bottom","padding","margin","border","position","display","overflow","float","clear","resize","z_index","min_width","min_height","max_width","max_height","color","background","font","text","line_height","white_space","vertical_align","flex","gap","row_gap","column_gap","grid","align_content","justify_content","align_items","justify_items","visibility","opacity","cursor"]),Vr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Ro=t=>t===!0?"true":t===!1?"false":String(t),Fn=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function yf(t){if(Mo.has(t))return!0;for(let e of Mo)if(t.startsWith(`${e}_`))return!0;return!1}function vf(t){let e=new Map;if(!t)return e;let r=[],n=0,s=null,a=!1,i=!1,o=0,l=String(t);for(let u=0;u<l.length;u+=1){let c=l[u],d=l[u+1];if(i){c==="*"&&d==="/"&&(i=!1,u+=1);continue}if(a){a=!1;continue}if(c==="\\"){a=!0;continue}if(s){c===s&&(s=null);continue}c==='"'||c==="'"?s=c:c==="/"&&d==="*"?(i=!0,u+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(l.slice(n,u)),n=u+1)}r.push(l.slice(n));for(let u of r){let c=u.trim();if(!c)continue;let d=c.indexOf(":");if(d<0)throw new TypeError(`malformed style declaration '${c}'`);e.set(c.slice(0,d).trim(),c.slice(d+1).trim())}return e}var zr=class extends Nt{static mode="html";renderedItem(e,r,n,{tag:s,xml:a=!0,pretty:i=!1,depthOffset:o=0,includeDatapath:l=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:p,dtype:h,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||p!=null)&&(r=Io(r,{format:c,mask:d,places:p,dtype:h,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(l){if(!Object.hasOwn(n,"id")){let k=this.builder.targetId(e);k!==null&&(g+=` id="${this._htmlAttrValue(k)}"`)}for(let[k,E]of Object.entries(e.getAttr()))e.pointerType(E)&&(g+=` data-${this.adapt(k)}-pointer="${this._htmlAttrValue(e.absDatapath(E))}"`)}let w=i?" ".repeat(this._nodeDepth(e,o)):"",b=i?`
24
+ `:"";if(e._getMeta("void"))return`${w}<${s}${g}${a?"/":""}>${b}`;if(Array.isArray(r)){let k=this._composeStringFragments(r);return`${w}<${s}${g}>${b}${k}${w}</${s}>${b}`}if(r==null)return`${w}<${s}${g}></${s}>${b}`;let v=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):bf.has(s)?String(r):this._escapeText(r);return`${w}<${s}${g}>${v}</${s}>${b}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let s=n.getAttr("locale");if(s==null)continue;let a=n.pointerType(s)?n.data.getItem(n.absDatapath(s)):s;if(a)return a}}adaptAttrs(e){let r={},n={};for(let[a,i]of Object.entries(e||{}))if(a.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(a)]=i;else if(a==="dtype")r.dtype=i;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>a.startsWith(o)))continue;this._isStyleContribution(a)?n[a]=i:r[a]=i}let s=this._adaptStyle(n);return s&&(r.style=s),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Vr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&Vr.has(r)||yf(e)}_adaptStyle(e){let r=vf(e.style),n=new Map,s=new Map;for(let[a,i]of Object.entries(e))if(a!=="style")if(a.startsWith("style_"))r.set(a.slice(6).replaceAll("_","-"),Ro(i));else if(Vr.has(a))n.set(a,i);else{let o=a.indexOf("_"),l=o<0?a:a.slice(0,o);o>=0&&Vr.has(l)?(s.has(l)||s.set(l,{}),s.get(l)[a.slice(o+1)]=i):r.set(a.replaceAll("_","-"),Ro(i))}for(let a of Vr)(n.has(a)||s.has(a))&&this[`_macro_${a}`](n.get(a),s.get(a)||{},r);return[...r].map(([a,i])=>`${a}: ${i}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,s]of Object.entries(e||{}))wf.has(n)?s&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(s)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&amp;").replaceAll("<","&lt;").replaceAll(">","&gt;").replaceAll('"',"&quot;")}_macro_rounded(e,r,n){let s=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[a,i]of Object.entries(r))if(a==="top"||a==="bottom")s[`${a}_left`]=i,s[`${a}_right`]=i;else if(a==="left"||a==="right")s[`top_${a}`]=i,s[`bottom_${a}`]=i;else if(["top_left","top_right","bottom_left","bottom_right"].includes(a))s[a]=i;else throw new TypeError(`rounded: unknown sub-kwarg '${a}'`);for(let[a,i]of Object.entries(s))n.set(`border-${a.replaceAll("_","-")}-radius`,Fn(i))}_macro_transform(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`rotate(${i}deg)`):a==="scale"||a==="translate"?s.push(`${a}(${i})`):a==="translate_x"?s.push(`translateX(${Fn(i)})`):a==="translate_y"?s.push(`translateY(${Fn(i)})`):a==="skew_x"?s.push(`skewX(${i}deg)`):a==="skew_y"?s.push(`skewY(${i}deg)`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("transform",s.join(" "))}_macro_filter(e,r,n){let s=e===void 0?[]:[String(e)];for(let[a,i]of Object.entries(r))a==="rotate"?s.push(`hue-rotate(${i}deg)`):a==="blur"?s.push(`blur(${Fn(i)})`):a==="drop_shadow"?s.push(`drop-shadow(${i})`):s.push(`${a.replaceAll("_","-")}(${i})`);s.length&&n.set("filter",s.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[s,a]of Object.entries(r))n.set(`transition-${s.replaceAll("_","-")}`,String(a))}_macro_zoom(e,r,n){e!==void 0&&n.set("zoom",String(e))}_macro_shadow(e,r,n){e!==void 0&&n.set("box-shadow",String(e));for(let[s,a]of Object.entries(r))n.set(`box-shadow-${s.replaceAll("_","-")}`,String(a))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var kf=new Set(["alignment_baseline","baseline_shift","clip_path","clip_rule","color_interpolation","color_interpolation_filters","dominant_baseline","fill_opacity","fill_rule","flood_color","flood_opacity","font_family","font_size","font_size_adjust","font_stretch","font_style","font_variant","font_weight","glyph_orientation_horizontal","glyph_orientation_vertical","image_rendering","letter_spacing","lighting_color","marker_end","marker_mid","marker_start","overline_position","overline_thickness","paint_order","pointer_events","shape_rendering","stop_color","stop_opacity","strikethrough_position","strikethrough_thickness","stroke_dasharray","stroke_dashoffset","stroke_linecap","stroke_linejoin","stroke_miterlimit","stroke_opacity","stroke_width","text_anchor","text_decoration","text_rendering","underline_position","underline_thickness","unicode_bidi","word_spacing","writing_mode"]);function Lo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[kf.has(e)?e.replaceAll("_","-"):e,r]))}var Hr=class extends St{static mode="svg";adaptAttrs(e){return Lo(e)}};var $o={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"html",version:null,title:null,description:null},abstracts:{},elements:{svg:{doc:"Switch to the SVG dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to SVG from this node down. No ``render_tag``: ``<svg>`` is\n emitted verbatim (HTML5 has a native ``<svg>`` tag).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"svg"}},a:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},abbr:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},address:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},area:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},article:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},aside:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},audio:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},b:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},base:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},bdi:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},bdo:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},blockquote:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},body:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},br:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},button:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},canvas:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},caption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},cite:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},code:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},col:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},colgroup:{doc:null,sub_tags:"col,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},data:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},datalist:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,option,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dd:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},del_:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},details:{doc:null,sub_tags:"summary[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dfn:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dialog:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},div:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dl:{doc:null,sub_tags:"dd,div,dt,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dt:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},em:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},embed:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},fieldset:{doc:null,sub_tags:"legend[0:1],a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figcaption:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},figure:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figcaption[0:1],figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},footer:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},form:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h1:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h2:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h3:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h4:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h5:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},h6:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},head:{doc:null,sub_tags:"base[0:1],link,meta,noscript,script,style,template,title[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},header:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hgroup:{doc:null,sub_tags:"h1,h2,h3,h4,h5,h6,p,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},hr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},html:{doc:null,sub_tags:"head[0:1],body[0:1]",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},i:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},iframe:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},img:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},input:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},ins:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},kbd:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},label:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},legend:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},li:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},link:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},main:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},map:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mark:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},menu:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},meta:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},meter:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},nav:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},noscript:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},object:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ol:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},optgroup:{doc:null,sub_tags:"div,legend,noscript,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},option:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,div,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},output:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},p:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},picture:{doc:null,sub_tags:"img[0:1],script,source,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pre:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},progress:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},q:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rp:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rt:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ruby:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},s:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},samp:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},script:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},search:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},section:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},select:{doc:null,sub_tags:"button,div,hr,noscript,optgroup,option,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},slot:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},small:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},source:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},span:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},strong:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},style:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sub:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},summary:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,h1,h2,h3,h4,h5,h6,hgroup,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},sup:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},table:{doc:null,sub_tags:"caption[0:1],colgroup,script,tbody,template,tfoot[0:1],thead[0:1],tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tbody:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},td:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},template:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,caption,cite,code,col,colgroup,data,datalist,del_,details,dfn,dialog,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,legend,li,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,optgroup,option,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,source,span,strong,style,sub,summary,sup,table,tbody,td,template,textarea,tfoot,th,thead,time,tr,track,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textarea:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tfoot:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},th:{doc:null,sub_tags:"a,abbr,address,area,article,aside,audio,b,bdi,bdo,blockquote,br,button,canvas,cite,code,data,datalist,del_,details,dfn,dialog,div,dl,em,embed,fieldset,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,hr,i,iframe,img,input,ins,kbd,label,link,main,map,mark,menu,meta,meter,nav,noscript,object,ol,output,p,picture,pre,progress,q,ruby,s,samp,script,search,section,select,selectedcontent,slot,small,span,strong,style,sub,sup,table,template,textarea,time,u,ul,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},thead:{doc:null,sub_tags:"script,template,tr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},time:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tr:{doc:null,sub_tags:"script,td,template,th",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},track:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},u:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ul:{doc:null,sub_tags:"li,script,template",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},var:{doc:null,sub_tags:"a,abbr,area,audio,b,bdi,bdo,br,button,canvas,cite,code,data,datalist,del_,dfn,em,embed,i,iframe,img,input,ins,kbd,label,link,map,mark,meta,meter,noscript,object,output,picture,progress,q,ruby,s,samp,script,select,selectedcontent,slot,small,span,strong,sub,sup,template,textarea,time,u,var,video,wbr",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},video:{doc:null,sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},wbr:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{void:!0}},selectedcontent:{doc:"Mirror of the selected option for Customizable Select (HTML 2024).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Un=class extends We{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar($o)}get renderer_html(){return new zr(this)}};We.registerBuilder(Un);var Fo={document_format:{name:"builder_grammar",version:"1.1"},grammar:{name:"svg",version:null,title:null,description:null},abstracts:{graphics:{doc:"SVG graphics content: any graphical element.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null},containerElement:{doc:"SVG container content: elements that can hold children.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},_meta:null}},elements:{html:{doc:"Switch to the HTML dialect from this node down (BLD.2).\n\n A sub-builder element: ``_meta['subbuilder']`` switches the active\n dialect to HTML from this node down. The source tag ``html`` is\n rendered as ``_meta['render_tag']`` (``<foreignObject>``) carrying\n ``_meta['render_attributes']`` (the SVG namespace). The immediate\n HTML child declares XHTML so both sides of the XML boundary retain\n their native namespace.\n ",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{subbuilder:"html",render_tag:"foreignObject",render_attributes:{xmlns:"http://www.w3.org/2000/svg"}}},svg:{doc:"Root SVG container or nested SVG viewport.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},g:{doc:"Group container for applying transforms and styles.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},defs:{doc:"Container for referenced elements (gradients, patterns, etc.).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},symbol:{doc:"Reusable graphical template, rendered only when referenced by <use>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},use:{doc:"Reference and render a <symbol> or other element.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},rect:{doc:"Rectangle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},circle:{doc:"Circle.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},ellipse:{doc:"Ellipse.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},line:{doc:"Line segment between two points.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polyline:{doc:"Open shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},polygon:{doc:"Closed shape of connected line segments.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},path:{doc:"Arbitrary shape defined by path commands (d attribute).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},image:{doc:"Embedded raster image.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},text:{doc:"Text block. Contains text content and optional <tspan>/<textPath>.",sub_tags:"tspan,textPath",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},tspan:{doc:"Inline text span within <text>.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},textPath:{doc:"Text rendered along a path shape.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},linearGradient:{doc:"Linear gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},radialGradient:{doc:"Radial gradient definition. Place inside <defs>.",sub_tags:"stop",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},stop:{doc:"Gradient stop (color and offset).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},pattern:{doc:"Tile pattern definition. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},clipPath:{doc:"Clipping path definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},mask:{doc:"Alpha mask definition.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},marker:{doc:"Marker symbol for line endpoints or vertices.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},filter:{doc:"Filter effect container. Place inside <defs>.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feGaussianBlur:{doc:"Gaussian blur filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feOffset:{doc:"Offset filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feBlend:{doc:"Blend filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feColorMatrix:{doc:"Color matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feComposite:{doc:"Composite filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feFlood:{doc:"Flood fill filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMerge:{doc:"Merge filter primitive (container for feMergeNode).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMergeNode:{doc:"Single input for feMerge.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDropShadow:{doc:"Drop shadow filter primitive (SVG 2).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDiffuseLighting:{doc:"Diffuse lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpecularLighting:{doc:"Specular lighting filter primitive.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},fePointLight:{doc:"Point light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDistantLight:{doc:"Distant light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feSpotLight:{doc:"Spot light source for lighting filters.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feMorphology:{doc:"Morphology filter primitive (erode/dilate).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTurbulence:{doc:"Turbulence noise filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feDisplacementMap:{doc:"Displacement map filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feConvolveMatrix:{doc:"Convolution matrix filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feImage:{doc:"Image filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},feTile:{doc:"Tile filter primitive.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animate:{doc:"Animate an attribute over time.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateTransform:{doc:"Animate a transform attribute.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},animateMotion:{doc:"Animate motion along a path.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},set:{doc:"Set an attribute to a value for a duration.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},title:{doc:"Accessible title (tooltip in browsers).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},desc:{doc:"Accessible description.",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},metadata:{doc:"Metadata container (RDF, Dublin Core, etc.).",sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},a:{doc:"Hyperlink wrapper.",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},foreignObject:{doc:"Container for non-SVG content (HTML, MathML).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},switch:{doc:"Conditional processing (renders first matching child).",sub_tags:"*",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:null},dataSetter:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"value",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1},{name:"attr",kind:"var_keyword",role:"attribute",annotation:{kind:"any"},has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataFormula:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"destination",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"type",module:"builtins",name:"str"},has_default:!1},{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}},dataController:{doc:null,sub_tags:"",parent_tags:null,inherits_from:null,ns:null,attributes:{parameters:[{name:"func",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"union",items:[{kind:"type",module:"builtins",name:"str"},{kind:"type",module:"collections.abc",name:"Callable"}]},has_default:!1},{name:"kwargs",kind:"var_keyword",role:"attribute",annotation:null,has_default:!1}],accepts_var_keyword:!0,accepts_var_positional:!1},node_label:null,collection_key:null,_meta:{data_element:!0}}}};var Pn=class extends We{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Fo)}get renderer_svg(){return new Hr(this)}};We.registerBuilder(Pn);var sr="http://www.w3.org/2000/svg";var xf=(0,$e.defineComponent)({name:"rowActions",tag:"gramlot-row-actions",base:Xr,subTags:"button,dropDownButton",sourceContext:!0,parameters:{position:{dtype:"T",default:"end"},actionState:{dtype:"T",nullable:!0,default:null},state:{dtype:"X",nullable:!0,default:null,binding:"read"}},implementation:t=>class extends t{#e=null;#i;connectedCallback(){this.slot="row-actions",this.hidden=!0}setSourceContext(e){this.#i=e}setRowContext(e,r){this.#e={item:e,path:r},this.#s()}getRowContext(){return this.#e}clearRowContext(){this.#e=null,this.hidden=!0}projectAttributes(e,r){let n=super.projectAttributes(e,r);if(!["start","end"].includes(this.parameters.position))throw new TypeError("rowActions position must be start or end");return this.#s(),n}#s(){if(!(!this.#e||!this.parameters.actionState))for(let e of this.children){let r=e.getAttribute("rowAction");if(r===null)continue;let n=this.#i.callLogic(this.parameters.actionState,{...this.#e,action:r,state:this.parameters.state});if(!n||typeof n.hidden!="boolean"||typeof n.icon!="string"||typeof n.title!="string")throw new TypeError("rowActions actionState must return hidden, icon and title");e.setActionPresentation(n)}}}}),Tf=(0,$e.defineComponent)({name:"tree",tag:"gramlot-tree",base:Xr,subTags:"rowActions[:1]",sourceContext:!0,bagStore:!0,dragSource:!0,parameters:{storepath:{dtype:"T"},draggable:{dtype:"B",default:!1,binding:"read"},labelAttribute:{dtype:"T",nullable:!0,default:null,binding:"read"},internalNames:{dtype:"B",default:!1,binding:"read"},hideValues:{dtype:"B",default:!1,binding:"read"},excludeRoot:{dtype:"T",nullable:!0,default:null,binding:"read"},labelCb:{dtype:"T",nullable:!0,default:null},getLabel:{dtype:"T",nullable:!0,default:null},labelState:{dtype:"X",nullable:!0,default:null,binding:"read"},getLabelClass:{dtype:"T",nullable:!0,default:null},getIconClass:{dtype:"T",nullable:!0,default:null},selectedLabelClass:{dtype:"T",default:"",binding:"read"},searchText:{dtype:"T",default:"",binding:"read"},searchEager:{dtype:"B",default:!0,binding:"read"},searchAttributes:{dtype:"T",default:"",binding:"read"},favorites:{dtype:"X",nullable:!0,default:null,binding:"read"},favoritesLabel:{dtype:"T",default:"Favorites",binding:"read"},autoCollapse:{dtype:"B",default:!1,binding:"read"},resolveLazy:{dtype:"B",default:!0,binding:"read"},selectedPath:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},onChecked:{dtype:["B","T"],nullable:!0,default:null},checkedPaths:{dtype:"T",nullable:!0,default:null,binding:"twoWay"},checkedPaths_joiner:{dtype:"T",default:","},checkChildren:{dtype:"B",default:!0,binding:"read"}},implementation:t=>class extends t{#e;#i;#s;#a=new Set;#c=new Map;#R=new Map;#u=!1;#E=new WeakMap;#L=new Map;#D;#$=0;#g=null;#F=!1;#o;#U=!1;#f=!1;#b=new WeakMap;#w=new WeakSet;#p=new Set;#r=new Map;#h="";#H=null;#t="";#m=null;#P=0;#d=new Set;#A=new WeakSet;#x=new WeakSet;#_=!1;#l=new Map;constructor(){super(),this.#i=Af(this.ownerDocument.defaultView),this.control.replaceChildren(),this.control.setAttribute("role","tree"),this.control.setAttribute("aria-label","Tree"),this.control.classList.add("tree"),this.control.setAttribute("part","tree");let e=this.ownerDocument.createElement("style");e.textContent=`
25
25
  :host{position:relative}
26
26
  .control-box{overflow:auto;padding:4px;min-height:32px}
27
27
  ul{list-style:none;margin:0;padding:0} ul ul{padding-inline-start:20px}
@@ -49,4 +49,4 @@ ${" ".repeat(s)}</${i}>`:`<${i}${l}>${f}</${i}>`:r===null||r.includes(i)?`<${i}
49
49
  .loading>.row{opacity:.65}.error>.row .caption{text-decoration:underline dotted}
50
50
  mark{background:#ffe493;color:#302300;font-weight:600;border-radius:2px;padding:0 1px}
51
51
  .search-status{padding:4px;color:var(--gramlot-text-secondary,#555);font-size:.9em}
52
- [hidden]{display:none}`,this.shadowRoot.append(e);let r=this.ownerDocument.createElement("slot");r.name="row-actions",this.shadowRoot.append(r),this.addEventListener("pointerleave",()=>{let n=this.#O();n&&!n.contains(this.ownerDocument.activeElement)&&n.clearRowContext()})}setSourceContext(e){this.#s=e}getDragContext(e){for(let r of e.composedPath()){let n=this.#k.get(r);if(!n)continue;let{item:s,path:a,caption:i}=n;return{element:r,item:s,path:a,dragValues:{"text/plain":i.textContent,nodeattr:{...s.getAttr()},treenode:{fullpath:s.fullpath,relpath:a}}}}return null}setStoreBag(e){if(!(e instanceof be))throw new TypeError("tree storepath must resolve to a Bag");e!==this.#e&&(this.#e=e,this.#x(),this.#t=this.#w.toLowerCase(),this.#a.clear(),this.#r.clear(),this.#E=void 0,this.#$++,this.#o=void 0,this.#g=new WeakMap,this.#b=new WeakSet),this.#n()}projectAttributes(e,r){this.#f=Object.hasOwn(e,"checkedPaths"),this.#U=this.#f||!!e.onChecked;let n=super.projectAttributes(e,r);this.#H!==this.parameters.excludeRoot&&(this.#H=this.parameters.excludeRoot,this.#x(),this.#t=this.#w.toLowerCase());let s=this.parameters.searchText.trim();return s!==this.#w&&(this.#x(),this.#w=s,s?this.#h=setTimeout(()=>{this.#h=null,this.#t=s.toLowerCase(),this.#n()},200):this.#t=""),this.#n(),n}connectedCallback(){this.#h===null&&(this.#t=this.#w.toLowerCase()),this.#n()}disconnectedCallback(){this.#x()}#x(){clearTimeout(this.#h),this.#h=null,this.#P++,this.#m=!1,this.#A=new WeakSet,this.#d.clear(),this.#D=new WeakSet}#T(e){return this.#t?this.#d.has(e):this.#a.has(e)}async#G(){let e=this.#P,r=this.#e,n=()=>this.isConnected&&e===this.#P&&r===this.#e;this.#m=!0;let s=async(a,i=new Set)=>{if(!n())return;if(i.has(a))throw new TypeError("tree requires an acyclic Bag store");let o=new Set(i).add(a);for(let l of a.getNodes())if(!(a===this.#e&&l.label===this.parameters.excludeRoot)){if(!n())return;if(l.attr.loop!==!0){if(l.resolver!==null&&l.resolver.expired&&!this.#A.has(l)&&(this.#A.add(l),await this.#z(l,!0)),!n())return;l.staticValue instanceof be&&await s(l.staticValue,o)}}};try{await s(r)}finally{n()&&(this.#m=!1,this.#n())}}#Y(e){let r=this.ownerDocument.createTreeWalker(e,4),n=[];for(;r.nextNode();)n.push(r.currentNode);for(let s of n){let a=s.textContent,i=a.toLowerCase(),o=this.ownerDocument.createDocumentFragment(),l=0,u=i.indexOf(this.#t);if(!(u<0)){for(;u>=0;){o.append(a.slice(l,u));let c=this.ownerDocument.createElement("mark");c.textContent=a.slice(u,u+this.#t.length),o.append(c),l=u+this.#t.length,u=i.indexOf(this.#t,l)}o.append(a.slice(l)),s.replaceWith(o)}}}retrySelection(){this.#E=void 0,this.#n()}#n(){this.#F||(this.#F=!0,queueMicrotask(()=>{this.#F=!1,this.isConnected&&this.#e&&this.#Z()}))}#Z(){let e=this.shadowRoot.activeElement?.closest("[role=treeitem]")?.dataset.path,r=this.shadowRoot.activeElement?.dataset.favoritePath,n=this.shadowRoot.activeElement?.dataset.favoritesGroup==="true",s=[],a=!1;this.#U&&this.parameters.checkChildren&&!(this.#f&&this.parameters.checkedPaths!==this.#o)&&(a=this.#X(this.#e,new Set,s));let i=new Map,o=new Set,l=(b,v,k)=>{if(o.has(b))throw new TypeError("tree requires an acyclic Bag store");o.add(b);for(let D of b.getNodes()){if(b===this.#e&&D.label===this.parameters.excludeRoot)continue;let y=v?`${v}.${D.label}`:D.label,C=D.staticValue;i.set(y,{node:D,ancestors:k,children:C instanceof be?C:null}),C instanceof be&&l(C,y,[...k,D])}o.delete(b)};l(this.#e,"",[]),this.#t&&this.#h===null&&!this.#m&&[...i.values()].some(({node:b})=>b.attr.loop!==!0&&b.resolver!==null&&b.resolver.expired&&!this.#A.has(b))&&this.#G();let u=this.#O(),c=u?u.getRowContext():null;if(c&&((c.item.getAttr("favoriteEntry")===!0?this.parameters.favorites instanceof be&&this.parameters.favorites.getNodes().includes(c.item):i.get(c.path)?.node===c.item)||u.clearRowContext()),this.#f&&this.parameters.checkedPaths!==this.#o){let b=this.#o===void 0;this.#o=this.parameters.checkedPaths;for(let{node:v}of i.values())v.attr.checked==="disabled:on"||v.attr.checked==="disabled:off"||(!b||this.#o!==null)&&v.setAttr({checked:!1});for(let v of(this.#o||"").split(this.parameters.checkedPaths_joiner).filter(Boolean)){let k=i.get(v);k&&this.#q(k.node,!0,!1)}}else if(this.#f&&s.length){let b=(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean);for(let v of b){let k=i.get(v);if(!k||k.node.attr.checked===!0||k.node.attr.checked==="disabled:on"||k.node.attr.checked==="disabled:off")continue;let D=k.node.parentBag;for(;D&&!s.includes(D);)D=D.parentNode?.parentBag;D&&this.#q(k.node,!0,!1)}(a||b.length)&&this.#j(!0)}else a&&this.#j(!0);let d=new Set([...i.values()].map(b=>b.node));for(let b of this.#a)d.has(b)||this.#a.delete(b);for(let b of this.#r.keys())d.has(b)||this.#r.delete(b);let f=this.parameters.selectedPath,p=null;if(f!==this.#E){this.#E=f,this.#_=f;let b=++this.#$,v=i.get(f)?.ancestors??[];f&&!i.has(f)&&(p={requested:f,version:b,store:this.#e});for(let k=0;k<v.length;k++){let D=v[k];this.#a.has(D)||this.#V(D)}}let h=this.#_;this.#c.clear(),this.#R.clear(),this.#k=new WeakMap,this.#L.clear();let m=new Map,g=(b,v,k)=>{let D=this.ownerDocument.createElement("ul");D.className="group",D.setAttribute("part","group"),D.setAttribute("role","group");for(let y of b.getNodes()){if(b===this.#e&&y.label===this.parameters.excludeRoot)continue;let C=v?`${v}.${y.label}`:y.label,{children:V}=i.get(C),Y=V===null&&!this.parameters.hideValues&&(y.resolver===null||!y.resolver.expired),U=V!==null?V.length>0:Y||y.resolver!==null&&y.attr.child_count!==0,B=this.ownerDocument.createElement("li");B.className=`node ${U?"branch":"leaf"}`,B.setAttribute("part",`node ${U?"branch":"leaf"}`),B.classList.toggle("loading",this.#p.has(y)),B.classList.toggle("error",this.#r.has(y)),B.setAttribute("aria-busy",String(this.#p.has(y))),B.setAttribute("role","treeitem"),B.setAttribute("aria-selected",String(h===C)),B.classList.toggle("selected",h===C),B.dataset.path=C,B.tabIndex=-1;let X=this.ownerDocument.createElement("div");X.className="row",X.addEventListener("pointerenter",()=>this.#B(X,y,C)),B.addEventListener("focus",()=>this.#B(X,y,C)),X.draggable=this.parameters.draggable,X.setAttribute("part",`row ${U?"branch-row":"leaf-row"}${h===C?" selected-row":""}`),this.#r.has(y)&&(X.title=String(this.#r.get(y)));let J=this.ownerDocument.createElement(U?"button":"span");if(J.setAttribute("part",U?"expander":"spacer"),U){J.className="expander",J.type="button",J.tabIndex=-1;let A=this.ownerDocument.createElementNS(sr,"svg");A.setAttribute("viewBox","0 0 24 24"),A.setAttribute("aria-hidden","true"),A.setAttribute("focusable","false");let j=this.ownerDocument.createElementNS(sr,"path");j.setAttribute("d","m9 5 7 7-7 7"),j.setAttribute("fill","none"),j.setAttribute("stroke","currentColor"),j.setAttribute("stroke-width","1.8"),j.setAttribute("stroke-linecap","round"),j.setAttribute("stroke-linejoin","round"),A.append(j),J.append(A),J.addEventListener("click",se=>{se.stopPropagation(),B.focus(),F()})}else J.className="spacer";let $=this.ownerDocument.createElement("span");$.className="caption";let W=this.ownerDocument.createElement("span");W.className="badge",W.setAttribute("part","badge"),this.#k.set(X,{item:y,path:C,caption:$}),$.setAttribute("part","caption");let N=this.ownerDocument.createElement("span");N.className=`icon ${U?"branch-icon":"leaf-icon"}`,N.setAttribute("aria-hidden","true"),N.setAttribute("part",`icon ${U?"branch-icon":"leaf-icon"}`);let ne;this.#U&&(ne=this.ownerDocument.createElement("input"),ne.type="checkbox",ne.className="checkbox",ne.setAttribute("part","checkbox"),ne.tabIndex=-1,ne.addEventListener("click",A=>{if(A.stopPropagation(),typeof this.parameters.onChecked=="string"){let j=this.#s.callLogic(this.parameters.onChecked,{item:y,path:C});if(j instanceof Promise)throw new TypeError("tree onChecked must be synchronous");if(j===!1){this.#n();return}}this.#q(y,ne.checked,!0)})),X.append(J,ne||N,W,$),B.append(X);let Se=U?V?g(V,C,B):this.ownerDocument.createElement("ul"):null;if(Se&&(Se.className="group",Se.setAttribute("role","group"),Se.setAttribute("part","group")),Se&&B.append(Se),Y){let A=this.ownerDocument.createElement("li");A.className="value-node",A.setAttribute("part","value-node"),A.setAttribute("role","treeitem"),A.setAttribute("aria-selected","false"),A.tabIndex=-1,A.dataset.path=C,A.dataset.valueRow="true";let j=this.ownerDocument.createElement("div");j.className="row value-row",j.setAttribute("part","row value-row");let se=this.ownerDocument.createElement("span");se.className="spacer";let ae=this.ownerDocument.createElement("span");ae.className="value",ae.setAttribute("part","value"),ae.textContent=String(y.staticValue),j.append(se,ae),A.append(j),Se.append(A),j.addEventListener("click",()=>this.#M(C)),A.addEventListener("keydown",ye=>{let Re=this.#y(),Hr=Re.indexOf(A),Le;if(ye.key==="ArrowUp")Le=Re[Hr-1];else if(ye.key==="ArrowDown")Le=Re[Hr+1];else if(ye.key==="Home")Le=Re[0];else if(ye.key==="End")Le=Re.at(-1);else if(ye.key==="ArrowLeft")Le=B;else if(ye.key==="Enter"||ye.key===" ")this.#M(C);else return;ye.preventDefault(),ye.stopPropagation(),Le&&(this.#v(Le),Le.focus())})}let _t=()=>{let A=this.#T(y),j=this.#_===C,se=y.attr.badge;if(se!=null&&typeof se!="string"&&typeof se!="number")throw new TypeError("tree badge must be text or a number");let ae=y.attr.badge_color;if(ae!=null&&typeof ae!="string")throw new TypeError("tree badge_color must be text");W.textContent=se==null?"":String(se),W.hidden=se==null||se==="",W.style.backgroundColor=ae??"",W.toggleAttribute("data-colored",ae!=null&&ae!=="");let ye={item:y,path:C,opened:A,selected:j},Re=this.parameters.labelAttribute,Hr=this.parameters.internalNames&&y.getAttr("fieldpath")?y.label:this.parameters.getLabel!==null?this.#I("getLabel",ye):Re!==null?Object.hasOwn(y.attr,Re)?y.attr[Re]:y.label:this.parameters.labelCb!==null?this.#I("labelCb",ye):y.label;this.#ee($,Hr,!(this.parameters.internalNames&&y.getAttr("fieldpath"))&&(this.parameters.getLabel!==null||Re===null&&this.parameters.labelCb!==null)),this.#t&&this.#Y($);let Le=this.parameters.getLabelClass!==null?this.#I("getLabelClass",ye):y.attr[A?"labelClassOpened":"labelClassClosed"]||y.attr.labelClass||"",ea=[...this.#S(Le),...j?this.#S(this.parameters.selectedLabelClass):[]];$.className=["caption",...ea].join(" "),$.setAttribute("part",["caption",...ea].join(" "));let ta=this.#S(y.attr.node_class??"");B.className=["node",U?"branch":"leaf",...ta,...j?["selected"]:[],...U?[A?"opened":"closed"]:[],...this.#p.has(y)?["loading"]:[],...this.#r.has(y)?["error"]:[]].join(" "),B.setAttribute("part",["node",U?"branch":"leaf",...ta].join(" "));let ra=!ne&&this.parameters.getIconClass!==null,qn=ra?this.#S(this.#I("getIconClass",ye)):[U?"branch-icon":"leaf-icon",...U?[A?"opened-icon":"closed-icon"]:[]];if(N.className=["icon",...qn].join(" "),N.setAttribute("part",["icon",...qn].join(" ")),N.hidden=ra&&qn.length===0,ne){let Ot=y.attr.checked;ne.checked=Ot===!0||Ot==="disabled:on",ne.indeterminate=Ot===-1,B.setAttribute("aria-checked",Ot===-1?"mixed":String(ne.checked)),ne.disabled=Ot==="disabled:on"||Ot==="disabled:off",ne.setAttribute("aria-label",$.textContent)}U&&J.setAttribute("aria-label",`${A?"Collapse":"Expand"} ${$.textContent}`)};this.#L.set(C,_t);let ar=()=>{let A=this.#T(y);B.setAttribute("aria-expanded",String(A)),B.classList.toggle("opened",A),B.classList.toggle("closed",!A),N.classList.toggle("opened-icon",A),N.setAttribute("part",`icon branch-icon ${A?"opened-icon":"closed-icon"}`),Se.hidden=!A,_t()},F=()=>{let A=this.#t?this.#d:this.#a;A.has(y)?(A.delete(y),this.#t&&this.#D.add(y)):(this.#t?(this.#D.delete(y),this.#d.add(y)):this.#V(y),y.resolver!==null&&this.#z(y));for(let j of m.values())j();this.#v(C)};U?(m.set(y,ar),ar()):_t(),X.addEventListener("click",()=>this.#M(C)),B.addEventListener("keydown",A=>{if(A.target!==B)return;let j=this.#y(),se=j.indexOf(B),ae;if(A.key==="ArrowDown")ae=j[se+1];else if(A.key==="ArrowUp")ae=j[se-1];else if(A.key==="Home")ae=j[0];else if(A.key==="End")ae=j.at(-1);else if(A.key==="ArrowRight"&&U)this.#T(y)?ae=Se.firstElementChild:F();else if(A.key==="ArrowLeft")U&&this.#T(y)?F():ae=k;else if(A.key===" "&&ne)ne.click();else if(A.key==="Enter"||A.key===" ")this.#M(C);else return;A.preventDefault(),A.stopPropagation(),ae&&(this.#v(ae),ae.focus())}),this.#c.set(C,B),D.append(B)}return D},w=g(this.#e,"",null);if(this.parameters.favorites!==null){if(!(this.parameters.favorites instanceof be))throw new TypeError("tree favorites must be a Bag");this.parameters.favorites.length&&w.prepend(this.#J(this.parameters.favorites,h))}if(this.control.replaceChildren(w),this.control.setAttribute("aria-busy",String(this.#m)),this.#t){let b=new Set,v=[];this.#d.clear();for(let[D,y]of this.#c){let C=y.firstElementChild.querySelector(".caption"),V=i.get(D);if(V.ancestors.some(U=>U.attr.loop===!0))continue;let Y=C.textContent.toLowerCase().includes(this.#t);if(Y&&v.push(C),Y||this.#r.has(V.node)||this.#p.has(V.node)){b.add(V.node);for(let U of V.ancestors)b.add(U),this.#D.has(U)||this.#d.add(U)}}for(let[D,y]of this.#c)y.hidden=!b.has(i.get(D).node);for(let D of m.values())D();let k=this.ownerDocument.createElement("div");k.className="search-status",k.setAttribute("role","status"),k.textContent=this.#m?"Searching\u2026":this.#r.size?"Some branches could not be searched. Expand them to retry.":v.length?"":"No matches",this.control.append(k)}this.#v(e??h),r?this.#R.get(r)?.focus():n?w.querySelector("[data-favorites-group]")?.focus():e&&this.#c.get(e)?.focus(),p&&queueMicrotask(()=>this.#K(p))}#J(e,r){let n=this.ownerDocument,s=n.createElement("li");s.className="node branch",s.setAttribute("role","treeitem"),s.dataset.favoritesGroup="true",s.tabIndex=-1;let a=n.createElement("div");a.className="row";let i=n.createElement("button");i.type="button",i.className="expander",i.tabIndex=-1;let o=n.createElement("span");o.textContent="\u2661",o.setAttribute("aria-hidden","true");let l=n.createElement("span");l.className="caption",l.textContent=this.parameters.favoritesLabel;let u=n.createElement("ul");u.className="group",u.setAttribute("role","group");let c=()=>{s.setAttribute("aria-expanded",String(this.#u)),i.textContent=this.#u?"\u25BE":"\u25B8",i.setAttribute("aria-label",`${this.#u?"Collapse":"Expand"} ${this.parameters.favoritesLabel}`),u.hidden=!this.#u},d=()=>{this.#u=!this.#u,c()};i.addEventListener("click",f=>{f.stopPropagation(),d(),s.focus()}),a.addEventListener("click",d),s.addEventListener("focus",()=>this.#O()?.clearRowContext()),s.addEventListener("keydown",f=>{if(f.target===s){if(f.key==="ArrowRight")this.#u?u.firstElementChild?.focus():d();else if(f.key==="ArrowLeft")this.#u&&d();else if(f.key==="Enter"||f.key===" ")d();else if(f.key==="ArrowDown"||f.key==="ArrowUp"){let p=this.#y(),h=p.indexOf(s);p[h+(f.key==="ArrowDown"?1:-1)]?.focus()}else return;f.preventDefault(),f.stopPropagation()}}),a.append(i,o,l),s.append(a,u);for(let f of e.getNodes()){let p=f.getAttr("originalPath"),h=n.createElement("li");h.className="node leaf",h.setAttribute("role","treeitem"),h.dataset.favoritePath=p,h.tabIndex=-1,h.setAttribute("aria-selected",String(r===p));let m=n.createElement("div");m.className="row";let g=n.createElement("span");g.className="spacer";let w=n.createElement("span");w.className="icon",w.setAttribute("aria-hidden","true");let b=n.createElement("span");b.className="badge",b.setAttribute("part","badge");let v=f.getAttr("badge");b.textContent=v==null?"":String(v),b.hidden=v==null||v==="";let k=f.getAttr("badge_color");k&&(b.style.backgroundColor=k,b.setAttribute("data-colored",""));let D=n.createElement("span");D.className="caption",D.textContent=f.getAttr(this.parameters.internalNames?"fieldpath":"fullcaption"),m.title=f.getAttr("fieldpath"),m.draggable=this.parameters.draggable,this.#k.set(m,{item:f,path:p,caption:D}),m.addEventListener("pointerenter",()=>this.#B(m,f,p)),h.addEventListener("focus",()=>this.#B(m,f,p)),m.addEventListener("click",()=>this.#W(p)),h.addEventListener("keydown",y=>{if(y.target===h){if(y.key==="Enter"||y.key===" ")this.#W(p);else if(y.key==="ArrowLeft")s.focus();else if(y.key==="ArrowDown"||y.key==="ArrowUp"){let C=this.#y(),V=C.indexOf(h);C[V+(y.key==="ArrowDown"?1:-1)]?.focus()}else return;y.preventDefault(),y.stopPropagation()}}),m.append(g,w,b,D),h.append(m),u.append(h),this.#R.set(p,h)}return c(),s}#W(e){this.parameters.selectedPath===e?this.retrySelection():this.#s.writeParameter("selectedPath",e)}async#K({requested:e,version:r,store:n}){let s=()=>this.isConnected&&this.#$===r&&this.#e===n&&this.parameters.selectedPath===e&&this.#_===e,a=e.split("."),i=n;for(let o of a.slice(0,-1)){if(!s())return;let l=i.getNode(o);if(!l||l.resolver===null&&!(l.staticValue instanceof be)||!s()||i.getNode(o)!==l||(this.#V(l),this.#n(),l.resolver!==null&&!(l.staticValue instanceof be)&&await this.#z(l),!s()||i.getNode(o)!==l||!(l.staticValue instanceof be)))return;i=l.staticValue}s()&&i.getNode(a.at(-1))&&this.#n()}#q(e,r,n){if(e.attr.checked==="disabled:on"||e.attr.checked==="disabled:off")return;let s=this.#l.get(e)??e.getValue();if(s instanceof Promise&&!this.#l.has(e)){this.#r.delete(e);let a=s.catch(i=>{this.#r.set(e,i),this.#a.delete(e)}).finally(()=>{this.#l.get(e)===a&&this.#l.delete(e),this.#n()});this.#l.set(e,a)}if(this.parameters.checkChildren&&s instanceof be&&(e.resolver!==null&&this.#g.set(e,s),this.#C(s,r)),e.setAttr({checked:this.parameters.checkChildren&&s instanceof be&&s.length?this.#N(s):r}),this.parameters.checkChildren)for(let a=e.parentBag.parentNode;a&&a!==this.#e.parentNode;a=a.parentBag.parentNode)a.setAttr({checked:this.#N(a.staticValue)});n&&this.#j()}#C(e,r,n=!1){for(let s of e.getNodes()){if(n&&this.#b.has(s)||(this.#b.add(s),s.attr.checked==="disabled:on"||s.attr.checked==="disabled:off"))continue;let a=s.staticValue;a instanceof be&&a.length?(s.resolver!==null&&this.#g.set(s,a),this.#C(a,r),s.setAttr({checked:this.#N(a)})):s.setAttr({checked:r})}}#X(e,r=new Set,n=[]){if(r.has(e))throw new TypeError("tree requires an acyclic Bag store");r.add(e);let s=!1;for(let a of e.getNodes()){this.#b.add(a);let i=a.staticValue;if(!(i instanceof be))continue;let o=!1;a.resolver!==null&&this.#g.get(a)!==i?(this.#g.set(a,i),n.push(i),typeof a.attr.checked=="boolean"&&(this.#C(i,a.attr.checked),o=!0)):typeof a.attr.checked=="boolean"&&i.getNodes().some(l=>!this.#b.has(l))&&(this.#C(i,a.attr.checked,!0),n.push(i),o=!0),o=this.#X(i,r,n)||o,o&&i.length&&a.attr.checked!=="disabled:on"&&a.attr.checked!=="disabled:off"&&a.setAttr({checked:this.#N(i)}),s||=o}return r.delete(e),s}#j(e=!1){let r=[],n=(s,a)=>{for(let i of s.getNodes()){let o=a?`${a}.${i.label}`:i.label,l=i.staticValue;l instanceof be&&l.length?(!this.parameters.checkChildren&&i.attr.checked===!0&&r.push(o),n(l,o)):i.attr.checked===!0&&r.push(o)}};if(n(this.#e,""),e&&this.#f)for(let s of(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean))!r.includes(s)&&this.#Q(s)&&r.push(s);this.#o=r.join(this.parameters.checkedPaths_joiner),this.#s.writeParameter("checkedPaths",this.#o),this.#n()}#Q(e){let r=e.split("."),n=this.#e;for(let s=0;s<r.length;s++){let a=n.getNode(r[s]);if(!a||s===r.length-1)return!1;if(a.resolver!==null&&!(a.staticValue instanceof be))return!0;if(!(a.staticValue instanceof be))return!1;n=a.staticValue}return!1}#N(e){let r=e.getNodes().map(n=>n.attr.checked==="disabled:on"?!0:n.attr.checked==="disabled:off"||n.attr.checked==null?!1:n.attr.checked);return r.every(n=>n===!0)?!0:r.every(n=>n===!1)?!1:-1}#S(e){if(typeof e!="string")throw new TypeError("Tree classes must be a string");return e.split(/\s+/).filter(Boolean)}#O(){let e=this.querySelectorAll(":scope > gramlot-row-actions");if(e.length>1)throw new Error("tree accepts one rowActions bar");return e[0]??null}#B(e,r,n){let s=this.#O();if(!s||s.contains(this.ownerDocument.activeElement))return;let a=this.getBoundingClientRect(),i=e.getBoundingClientRect();s.setRowContext(r,n),s.style.position="absolute",s.style.top=`${i.top-a.top}px`,s.style.left=s.parameters.position==="start"?`${i.left-a.left}px`:"auto",s.style.right=s.parameters.position==="end"?`${a.right-i.right}px`:"auto",s.style.zIndex="1",s.hidden=!1}#I(e,r){let n=this.#s.callLogic(this.parameters[e],r);if(e==="labelCb"||e==="getLabel"){if(!n||typeof n!="object"||Object.keys(n).length!==1||!(Object.hasOwn(n,"text")&&typeof n.text=="string"||Object.hasOwn(n,"html")&&typeof n.html=="string"))throw new TypeError(`tree ${e} must return {text: string} or {html: string} synchronously`)}else if(typeof n!="string")throw new TypeError(`tree ${e} must return a string synchronously`);return n}#ee(e,r,n){n&&Object.hasOwn(r,"html")?e.replaceChildren(this.#i.sanitize(r.html,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})):e.textContent=n?r.text:r}#y(){return[...this.control.querySelectorAll("[role=treeitem]")].filter(e=>!e.closest("[hidden]"))}#V(e){if(this.#t){this.#d.add(e);return}if(this.parameters.autoCollapse)for(let r of e.parentBag.getNodes())r!==e&&this.#a.delete(r);this.#a.add(e)}#z(e,r=!1){if(this.#l.has(e))return this.#l.get(e);this.#p.add(e),this.#r.delete(e),this.#n();let n=(async()=>{try{await Promise.resolve().then(()=>e.getValue())}catch(s){this.#r.set(e,s),r||this.#a.delete(e)}finally{this.#p.delete(e),this.#l.delete(e),this.#n()}})();return this.#l.set(e,n),n}#v(e){let r=this.#y(),n=typeof e=="string"||e==null?r.find(s=>s.dataset.path===e)??r[0]:e;for(let s of this.control.querySelectorAll("[role=treeitem]"))s.tabIndex=s===n?0:-1}#M(e){this.#_=e;for(let[r,n]of this.#c)n.setAttribute("aria-selected",String(r===e)),n.classList.toggle("selected",r===e),this.#L.get(r)(),n.firstElementChild.setAttribute("part",`row ${n.classList.contains("branch")?"branch-row":"leaf-row"}${r===e?" selected-row":""}`);this.#v(e),this.#c.get(e).focus(),this.#s.writeParameter("selectedPath",e)}}}),T_=zn({name:"tree",components:[Tf,xf]});export{xf as RowActions,Tf as Tree,T_ as default};
52
+ [hidden]{display:none}`,this.shadowRoot.append(e);let r=this.ownerDocument.createElement("slot");r.name="row-actions",this.shadowRoot.append(r),this.addEventListener("pointerleave",()=>{let n=this.#O();n&&!n.contains(this.ownerDocument.activeElement)&&n.clearRowContext()})}setSourceContext(e){this.#s=e}get storeBag(){return this.#e}getDragContext(e){for(let r of e.composedPath()){let n=this.#E.get(r);if(!n)continue;let{item:s,path:a,caption:i}=n,o=r.getBoundingClientRect(),l=o.height?(e.clientY-o.top)/o.height:.5,u=l<.25?"before":l>.75?"after":"inside";return{element:r,item:s,path:a,placement:u,dragValues:{"text/plain":i.textContent,nodeattr:{...s.getAttr()},treenode:{fullpath:s.fullpath,relpath:a}}}}return null}setStoreBag(e){if(!(e instanceof be))throw new TypeError("tree storepath must resolve to a Bag");e!==this.#e&&(this.#e=e,this.#y(),this.#t=this.#h.toLowerCase(),this.#a.clear(),this.#r.clear(),this.#D=void 0,this.#$++,this.#o=void 0,this.#b=new WeakMap,this.#w=new WeakSet),this.#n()}projectAttributes(e,r){this.#f=Object.hasOwn(e,"checkedPaths"),this.#U=this.#f||!!e.onChecked;let n=this.parameters?.searchEager,s=this.parameters?.resolveLazy,a=super.projectAttributes(e,r);(n!==this.parameters.searchEager||s!==this.parameters.resolveLazy)&&(this.#y(),this.#t=this.#h.toLowerCase()),this.#H!==this.parameters.excludeRoot&&(this.#H=this.parameters.excludeRoot,this.#y(),this.#t=this.#h.toLowerCase());let i=this.parameters.searchText.trim();return i!==this.#h&&(this.#y(),this.#h=i,i?this.#m=setTimeout(()=>{this.#m=null,this.#t=i.toLowerCase(),this.#n()},200):this.#t=""),this.#n(),a}connectedCallback(){this.#m===null&&(this.#t=this.#h.toLowerCase()),this.#n()}disconnectedCallback(){this.#y()}#y(){clearTimeout(this.#m),this.#m=null,this.#P++,this.#_=!1,this.#x=new WeakSet,this.#d.clear(),this.#A=new WeakSet}#T(e){return this.#t?this.#d.has(e):this.#a.has(e)}async#G(){let e=this.#P,r=this.#e,n=()=>this.isConnected&&e===this.#P&&r===this.#e&&this.parameters.searchEager&&this.parameters.resolveLazy;this.#_=!0;let s=async(a,i=new Set)=>{if(!n())return;if(i.has(a))throw new TypeError("tree requires an acyclic Bag store");let o=new Set(i).add(a);for(let l of a.getNodes())if(!(a===this.#e&&l.label===this.parameters.excludeRoot)){if(!n())return;if(l.attr.loop!==!0&&!(l.resolver!==null&&!this.parameters.resolveLazy)){if(l.resolver!==null&&l.resolver.expired&&!this.#x.has(l)&&(this.#x.add(l),await this.#z(l,!0)),!n())return;l.staticValue instanceof be&&await s(l.staticValue,o)}}};try{await s(r)}finally{n()&&(this.#_=!1,this.#n())}}#Y(e){let r=this.ownerDocument.createTreeWalker(e,4),n=[];for(;r.nextNode();)n.push(r.currentNode);for(let s of n){let a=s.textContent,i=a.toLowerCase(),o=this.ownerDocument.createDocumentFragment(),l=0,u=i.indexOf(this.#t);if(!(u<0)){for(;u>=0;){o.append(a.slice(l,u));let c=this.ownerDocument.createElement("mark");c.textContent=a.slice(u,u+this.#t.length),o.append(c),l=u+this.#t.length,u=i.indexOf(this.#t,l)}o.append(a.slice(l)),s.replaceWith(o)}}}retrySelection(){this.#D=void 0,this.#n()}#n(){this.#F||(this.#F=!0,queueMicrotask(()=>{this.#F=!1,this.isConnected&&this.#e&&this.#Z()}))}#Z(){let e=this.shadowRoot.activeElement?.closest("[role=treeitem]")?.dataset.path,r=this.shadowRoot.activeElement?.dataset.favoritePath,n=this.shadowRoot.activeElement?.dataset.favoritesGroup==="true",s=[],a=!1;this.#U&&this.parameters.checkChildren&&!(this.#f&&this.parameters.checkedPaths!==this.#o)&&(a=this.#X(this.#e,new Set,s));let i=new Map,o=new Set,l=(b,v,k)=>{if(o.has(b))throw new TypeError("tree requires an acyclic Bag store");o.add(b);for(let E of b.getNodes()){if(b===this.#e&&E.label===this.parameters.excludeRoot)continue;let y=v?`${v}.${E.label}`:E.label,N=E.resolver!==null&&!this.parameters.resolveLazy?null:E.staticValue;i.set(y,{node:E,ancestors:k,children:N instanceof be?N:null}),N instanceof be&&l(N,y,[...k,E])}o.delete(b)};l(this.#e,"",[]),this.parameters.searchEager&&this.parameters.resolveLazy&&this.#t&&this.#m===null&&!this.#_&&[...i.values()].some(({node:b})=>b.attr.loop!==!0&&b.resolver!==null&&b.resolver.expired&&!this.#x.has(b))&&this.#G();let u=this.#O(),c=u?u.getRowContext():null;if(c&&((c.item.getAttr("favoriteEntry")===!0?this.parameters.favorites instanceof be&&this.parameters.favorites.getNodes().includes(c.item):i.get(c.path)?.node===c.item)||u.clearRowContext()),this.#f&&this.parameters.checkedPaths!==this.#o){let b=this.#o===void 0;this.#o=this.parameters.checkedPaths;for(let{node:v}of i.values())v.attr.checked==="disabled:on"||v.attr.checked==="disabled:off"||(!b||this.#o!==null)&&v.setAttr({checked:!1});for(let v of(this.#o||"").split(this.parameters.checkedPaths_joiner).filter(Boolean)){let k=i.get(v);k&&this.#q(k.node,!0,!1)}}else if(this.#f&&s.length){let b=(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean);for(let v of b){let k=i.get(v);if(!k||k.node.attr.checked===!0||k.node.attr.checked==="disabled:on"||k.node.attr.checked==="disabled:off")continue;let E=k.node.parentBag;for(;E&&!s.includes(E);)E=E.parentNode?.parentBag;E&&this.#q(k.node,!0,!1)}(a||b.length)&&this.#j(!0)}else a&&this.#j(!0);let d=new Set([...i.values()].map(b=>b.node));for(let b of this.#a)d.has(b)||this.#a.delete(b);for(let b of this.#r.keys())d.has(b)||this.#r.delete(b);let f=this.parameters.selectedPath,p=null;if(f!==this.#D){this.#D=f,this.#g=f;let b=++this.#$,v=i.get(f)?.ancestors??[];f&&!i.has(f)&&(p={requested:f,version:b,store:this.#e});for(let k=0;k<v.length;k++){let E=v[k];this.#a.has(E)||this.#V(E)}}let h=this.#g;this.#c.clear(),this.#R.clear(),this.#E=new WeakMap,this.#L.clear();let m=new Map,g=(b,v,k)=>{let E=this.ownerDocument.createElement("ul");E.className="group",E.setAttribute("part","group"),E.setAttribute("role","group");for(let y of b.getNodes()){if(b===this.#e&&y.label===this.parameters.excludeRoot)continue;let N=v?`${v}.${y.label}`:y.label,{children:q}=i.get(N),Z=q===null&&!this.parameters.hideValues&&(y.resolver===null||!y.resolver.expired),z=q!==null?q.length>0:Z||y.resolver!==null&&this.parameters.resolveLazy&&y.attr.child_count!==0,T=this.ownerDocument.createElement("li");T.className=`node ${z?"branch":"leaf"}`,T.setAttribute("part",`node ${z?"branch":"leaf"}`),T.classList.toggle("loading",this.#p.has(y)),T.classList.toggle("error",this.#r.has(y)),T.setAttribute("aria-busy",String(this.#p.has(y))),T.setAttribute("role","treeitem"),T.setAttribute("aria-selected",String(h===N)),T.classList.toggle("selected",h===N),T.dataset.path=N,T.tabIndex=-1;let V=this.ownerDocument.createElement("div");V.className="row",V.addEventListener("pointerenter",()=>this.#B(V,y,N)),T.addEventListener("focus",()=>this.#B(V,y,N)),V.draggable=this.parameters.draggable,V.setAttribute("part",`row ${z?"branch-row":"leaf-row"}${h===N?" selected-row":""}`),this.#r.has(y)&&(V.title=String(this.#r.get(y)));let Y=this.ownerDocument.createElement(z?"button":"span");if(Y.setAttribute("part",z?"expander":"spacer"),z){Y.className="expander",Y.type="button",Y.tabIndex=-1;let A=this.ownerDocument.createElementNS(sr,"svg");A.setAttribute("viewBox","0 0 24 24"),A.setAttribute("aria-hidden","true"),A.setAttribute("focusable","false");let j=this.ownerDocument.createElementNS(sr,"path");j.setAttribute("d","m9 5 7 7-7 7"),j.setAttribute("fill","none"),j.setAttribute("stroke","currentColor"),j.setAttribute("stroke-width","1.8"),j.setAttribute("stroke-linecap","round"),j.setAttribute("stroke-linejoin","round"),A.append(j),Y.append(A),Y.addEventListener("click",se=>{se.stopPropagation(),T.focus(),F()})}else Y.className="spacer";let $=this.ownerDocument.createElement("span");$.className="caption";let X=this.ownerDocument.createElement("span");X.className="badge",X.setAttribute("part","badge"),this.#E.set(V,{item:y,path:N,caption:$}),$.setAttribute("part","caption");let S=this.ownerDocument.createElement("span");S.className=`icon ${z?"branch-icon":"leaf-icon"}`,S.setAttribute("aria-hidden","true"),S.setAttribute("part",`icon ${z?"branch-icon":"leaf-icon"}`);let ne;this.#U&&(ne=this.ownerDocument.createElement("input"),ne.type="checkbox",ne.className="checkbox",ne.setAttribute("part","checkbox"),ne.tabIndex=-1,ne.addEventListener("click",A=>{if(A.stopPropagation(),typeof this.parameters.onChecked=="string"){let j=this.#s.callLogic(this.parameters.onChecked,{item:y,path:N});if(j instanceof Promise)throw new TypeError("tree onChecked must be synchronous");if(j===!1){this.#n();return}}this.#q(y,ne.checked,!0)})),V.append(Y,ne||S,X,$),T.append(V);let Se=z?q?g(q,N,T):this.ownerDocument.createElement("ul"):null;if(Se&&(Se.className="group",Se.setAttribute("role","group"),Se.setAttribute("part","group")),Se&&T.append(Se),Z){let A=this.ownerDocument.createElement("li");A.className="value-node",A.setAttribute("part","value-node"),A.setAttribute("role","treeitem"),A.setAttribute("aria-selected","false"),A.tabIndex=-1,A.dataset.path=N,A.dataset.valueRow="true";let j=this.ownerDocument.createElement("div");j.className="row value-row",j.setAttribute("part","row value-row");let se=this.ownerDocument.createElement("span");se.className="spacer";let ae=this.ownerDocument.createElement("span");ae.className="value",ae.setAttribute("part","value"),ae.textContent=String(y.staticValue),j.append(se,ae),A.append(j),Se.append(A),j.addEventListener("click",()=>this.#M(N)),A.addEventListener("keydown",ye=>{let Re=this.#v(),Wr=Re.indexOf(A),Le;if(ye.key==="ArrowUp")Le=Re[Wr-1];else if(ye.key==="ArrowDown")Le=Re[Wr+1];else if(ye.key==="Home")Le=Re[0];else if(ye.key==="End")Le=Re.at(-1);else if(ye.key==="ArrowLeft")Le=T;else if(ye.key==="Enter"||ye.key===" ")this.#M(N);else return;ye.preventDefault(),ye.stopPropagation(),Le&&(this.#k(Le),Le.focus())})}let _t=()=>{let A=this.#T(y),j=this.#g===N,se=y.attr.badge;if(se!=null&&typeof se!="string"&&typeof se!="number")throw new TypeError("tree badge must be text or a number");let ae=y.attr.badge_color;if(ae!=null&&typeof ae!="string")throw new TypeError("tree badge_color must be text");X.textContent=se==null?"":String(se),X.hidden=se==null||se==="",X.style.backgroundColor=ae??"",X.toggleAttribute("data-colored",ae!=null&&ae!=="");let ye={item:y,path:N,opened:A,selected:j,state:this.parameters.labelState},Re=this.parameters.labelAttribute,Wr=this.parameters.internalNames&&y.getAttr("fieldpath")?y.label:this.parameters.getLabel!==null?this.#I("getLabel",ye):Re!==null?Object.hasOwn(y.attr,Re)?y.attr[Re]:y.label:this.parameters.labelCb!==null?this.#I("labelCb",ye):y.label;this.#ee($,Wr,!(this.parameters.internalNames&&y.getAttr("fieldpath"))&&(this.parameters.getLabel!==null||Re===null&&this.parameters.labelCb!==null)),this.#t&&this.#Y($);let Le=this.parameters.getLabelClass!==null?this.#I("getLabelClass",ye):y.attr[A?"labelClassOpened":"labelClassClosed"]||y.attr.labelClass||"",ea=[...this.#S(Le),...j?this.#S(this.parameters.selectedLabelClass):[]];$.className=["caption",...ea].join(" "),$.setAttribute("part",["caption",...ea].join(" "));let ta=this.#S(y.attr.node_class??"");T.className=["node",z?"branch":"leaf",...ta,...j?["selected"]:[],...z?[A?"opened":"closed"]:[],...this.#p.has(y)?["loading"]:[],...this.#r.has(y)?["error"]:[]].join(" "),T.setAttribute("part",["node",z?"branch":"leaf",...ta].join(" "));let ra=!ne&&this.parameters.getIconClass!==null,qn=ra?this.#S(this.#I("getIconClass",ye)):[z?"branch-icon":"leaf-icon",...z?[A?"opened-icon":"closed-icon"]:[]];if(S.className=["icon",...qn].join(" "),S.setAttribute("part",["icon",...qn].join(" ")),S.hidden=ra&&qn.length===0,ne){let Ot=y.attr.checked;ne.checked=Ot===!0||Ot==="disabled:on",ne.indeterminate=Ot===-1,T.setAttribute("aria-checked",Ot===-1?"mixed":String(ne.checked)),ne.disabled=Ot==="disabled:on"||Ot==="disabled:off",ne.setAttribute("aria-label",$.textContent)}z&&Y.setAttribute("aria-label",`${A?"Collapse":"Expand"} ${$.textContent}`)};this.#L.set(N,_t);let ar=()=>{let A=this.#T(y);T.setAttribute("aria-expanded",String(A)),T.classList.toggle("opened",A),T.classList.toggle("closed",!A),S.classList.toggle("opened-icon",A),S.setAttribute("part",`icon branch-icon ${A?"opened-icon":"closed-icon"}`),Se.hidden=!A,_t()},F=()=>{let A=this.#t?this.#d:this.#a;A.has(y)?(A.delete(y),this.#t&&this.#A.add(y)):(this.#t?(this.#A.delete(y),this.#d.add(y)):this.#V(y),y.resolver!==null&&this.#z(y));for(let j of m.values())j();this.#k(N)};z?(m.set(y,ar),ar()):_t(),V.addEventListener("click",()=>this.#M(N)),T.addEventListener("keydown",A=>{if(A.target!==T)return;let j=this.#v(),se=j.indexOf(T),ae;if(A.key==="ArrowDown")ae=j[se+1];else if(A.key==="ArrowUp")ae=j[se-1];else if(A.key==="Home")ae=j[0];else if(A.key==="End")ae=j.at(-1);else if(A.key==="ArrowRight"&&z)this.#T(y)?ae=Se.firstElementChild:F();else if(A.key==="ArrowLeft")z&&this.#T(y)?F():ae=k;else if(A.key===" "&&ne)ne.click();else if(A.key==="Enter"||A.key===" ")this.#M(N);else return;A.preventDefault(),A.stopPropagation(),ae&&(this.#k(ae),ae.focus())}),this.#c.set(N,T),E.append(T)}return E},w=g(this.#e,"",null);if(this.parameters.favorites!==null){if(!(this.parameters.favorites instanceof be))throw new TypeError("tree favorites must be a Bag");this.parameters.favorites.length&&w.prepend(this.#J(this.parameters.favorites,h))}if(this.control.replaceChildren(w),this.control.setAttribute("aria-busy",String(this.#_)),this.#t){let b=new Set,v=[];this.#d.clear();for(let[E,y]of this.#c){let N=y.firstElementChild.querySelector(".caption"),q=i.get(E);if(q.ancestors.some(T=>T.attr.loop===!0))continue;let Z=this.parameters.searchAttributes.split(",").map(T=>T.trim()).filter(Boolean).flatMap(T=>{let V=q.node.getAttr(T);return Array.isArray(V)?V.filter(Y=>typeof Y=="string"):typeof V=="string"?[V]:[]}),z=[N.textContent,...Z].some(T=>T.toLowerCase().includes(this.#t));if(z&&v.push(N),z||this.#r.has(q.node)||this.#p.has(q.node)){b.add(q.node);for(let T of q.ancestors)b.add(T),this.#A.has(T)||this.#d.add(T)}}for(let[E,y]of this.#c)y.hidden=!b.has(i.get(E).node);for(let E of m.values())E();let k=this.ownerDocument.createElement("div");k.className="search-status",k.setAttribute("role","status"),k.textContent=this.#_?"Searching\u2026":this.#r.size?"Some branches could not be searched. Expand them to retry.":v.length?"":"No matches",this.control.append(k)}this.#k(e??h),r?this.#R.get(r)?.focus():n?w.querySelector("[data-favorites-group]")?.focus():e&&this.#c.get(e)?.focus(),p&&queueMicrotask(()=>this.#K(p))}#J(e,r){let n=this.ownerDocument,s=n.createElement("li");s.className="node branch",s.setAttribute("role","treeitem"),s.dataset.favoritesGroup="true",s.tabIndex=-1;let a=n.createElement("div");a.className="row";let i=n.createElement("button");i.type="button",i.className="expander",i.tabIndex=-1;let o=n.createElement("span");o.textContent="\u2661",o.setAttribute("aria-hidden","true");let l=n.createElement("span");l.className="caption",l.textContent=this.parameters.favoritesLabel;let u=n.createElement("ul");u.className="group",u.setAttribute("role","group");let c=()=>{s.setAttribute("aria-expanded",String(this.#u)),i.textContent=this.#u?"\u25BE":"\u25B8",i.setAttribute("aria-label",`${this.#u?"Collapse":"Expand"} ${this.parameters.favoritesLabel}`),u.hidden=!this.#u},d=()=>{this.#u=!this.#u,c()};i.addEventListener("click",f=>{f.stopPropagation(),d(),s.focus()}),a.addEventListener("click",d),s.addEventListener("focus",()=>this.#O()?.clearRowContext()),s.addEventListener("keydown",f=>{if(f.target===s){if(f.key==="ArrowRight")this.#u?u.firstElementChild?.focus():d();else if(f.key==="ArrowLeft")this.#u&&d();else if(f.key==="Enter"||f.key===" ")d();else if(f.key==="ArrowDown"||f.key==="ArrowUp"){let p=this.#v(),h=p.indexOf(s);p[h+(f.key==="ArrowDown"?1:-1)]?.focus()}else return;f.preventDefault(),f.stopPropagation()}}),a.append(i,o,l),s.append(a,u);for(let f of e.getNodes()){let p=f.getAttr("originalPath"),h=n.createElement("li");h.className="node leaf",h.setAttribute("role","treeitem"),h.dataset.favoritePath=p,h.tabIndex=-1,h.setAttribute("aria-selected",String(r===p));let m=n.createElement("div");m.className="row";let g=n.createElement("span");g.className="spacer";let w=n.createElement("span");w.className="icon",w.setAttribute("aria-hidden","true");let b=n.createElement("span");b.className="badge",b.setAttribute("part","badge");let v=f.getAttr("badge");b.textContent=v==null?"":String(v),b.hidden=v==null||v==="";let k=f.getAttr("badge_color");k&&(b.style.backgroundColor=k,b.setAttribute("data-colored",""));let E=n.createElement("span");E.className="caption",E.textContent=f.getAttr(this.parameters.internalNames?"fieldpath":"fullcaption"),m.title=f.getAttr("fieldpath"),m.draggable=this.parameters.draggable,this.#E.set(m,{item:f,path:p,caption:E}),m.addEventListener("pointerenter",()=>this.#B(m,f,p)),h.addEventListener("focus",()=>this.#B(m,f,p)),m.addEventListener("click",()=>this.#W(p)),h.addEventListener("keydown",y=>{if(y.target===h){if(y.key==="Enter"||y.key===" ")this.#W(p);else if(y.key==="ArrowLeft")s.focus();else if(y.key==="ArrowDown"||y.key==="ArrowUp"){let N=this.#v(),q=N.indexOf(h);N[q+(y.key==="ArrowDown"?1:-1)]?.focus()}else return;y.preventDefault(),y.stopPropagation()}}),m.append(g,w,b,E),h.append(m),u.append(h),this.#R.set(p,h)}return c(),s}#W(e){this.parameters.selectedPath===e?this.retrySelection():this.#s.writeParameter("selectedPath",e)}async#K({requested:e,version:r,store:n}){let s=()=>this.isConnected&&this.#$===r&&this.#e===n&&this.parameters.selectedPath===e&&this.#g===e,a=e.split("."),i=n;for(let o of a.slice(0,-1)){if(!s())return;let l=i.getNode(o);if(!l||l.resolver!==null&&!this.parameters.resolveLazy||l.resolver===null&&!(l.staticValue instanceof be)||!s()||i.getNode(o)!==l||(this.#V(l),this.#n(),l.resolver!==null&&!(l.staticValue instanceof be)&&await this.#z(l),!s()||i.getNode(o)!==l||!(l.staticValue instanceof be)))return;i=l.staticValue}s()&&i.getNode(a.at(-1))&&this.#n()}#q(e,r,n){if(e.attr.checked==="disabled:on"||e.attr.checked==="disabled:off")return;let s=this.#l.get(e)??e.getValue();if(s instanceof Promise&&!this.#l.has(e)){this.#r.delete(e);let a=s.catch(i=>{this.#r.set(e,i),this.#a.delete(e)}).finally(()=>{this.#l.get(e)===a&&this.#l.delete(e),this.#n()});this.#l.set(e,a)}if(this.parameters.checkChildren&&s instanceof be&&(e.resolver!==null&&this.#b.set(e,s),this.#C(s,r)),e.setAttr({checked:this.parameters.checkChildren&&s instanceof be&&s.length?this.#N(s):r}),this.parameters.checkChildren)for(let a=e.parentBag.parentNode;a&&a!==this.#e.parentNode;a=a.parentBag.parentNode)a.setAttr({checked:this.#N(a.staticValue)});n&&this.#j()}#C(e,r,n=!1){for(let s of e.getNodes()){if(n&&this.#w.has(s)||(this.#w.add(s),s.attr.checked==="disabled:on"||s.attr.checked==="disabled:off"))continue;let a=s.staticValue;a instanceof be&&a.length?(s.resolver!==null&&this.#b.set(s,a),this.#C(a,r),s.setAttr({checked:this.#N(a)})):s.setAttr({checked:r})}}#X(e,r=new Set,n=[]){if(r.has(e))throw new TypeError("tree requires an acyclic Bag store");r.add(e);let s=!1;for(let a of e.getNodes()){this.#w.add(a);let i=a.staticValue;if(!(i instanceof be))continue;let o=!1;a.resolver!==null&&this.#b.get(a)!==i?(this.#b.set(a,i),n.push(i),typeof a.attr.checked=="boolean"&&(this.#C(i,a.attr.checked),o=!0)):typeof a.attr.checked=="boolean"&&i.getNodes().some(l=>!this.#w.has(l))&&(this.#C(i,a.attr.checked,!0),n.push(i),o=!0),o=this.#X(i,r,n)||o,o&&i.length&&a.attr.checked!=="disabled:on"&&a.attr.checked!=="disabled:off"&&a.setAttr({checked:this.#N(i)}),s||=o}return r.delete(e),s}#j(e=!1){let r=[],n=(s,a)=>{for(let i of s.getNodes()){let o=a?`${a}.${i.label}`:i.label,l=i.staticValue;l instanceof be&&l.length?(!this.parameters.checkChildren&&i.attr.checked===!0&&r.push(o),n(l,o)):i.attr.checked===!0&&r.push(o)}};if(n(this.#e,""),e&&this.#f)for(let s of(this.parameters.checkedPaths||"").split(this.parameters.checkedPaths_joiner).filter(Boolean))!r.includes(s)&&this.#Q(s)&&r.push(s);this.#o=r.join(this.parameters.checkedPaths_joiner),this.#s.writeParameter("checkedPaths",this.#o),this.#n()}#Q(e){let r=e.split("."),n=this.#e;for(let s=0;s<r.length;s++){let a=n.getNode(r[s]);if(!a||s===r.length-1)return!1;if(a.resolver!==null&&!(a.staticValue instanceof be))return!0;if(!(a.staticValue instanceof be))return!1;n=a.staticValue}return!1}#N(e){let r=e.getNodes().map(n=>n.attr.checked==="disabled:on"?!0:n.attr.checked==="disabled:off"||n.attr.checked==null?!1:n.attr.checked);return r.every(n=>n===!0)?!0:r.every(n=>n===!1)?!1:-1}#S(e){if(typeof e!="string")throw new TypeError("Tree classes must be a string");return e.split(/\s+/).filter(Boolean)}#O(){let e=[...this.children].filter(r=>r.localName==="gramlot-row-actions");if(e.length>1)throw new Error("tree accepts one rowActions bar");return e[0]??null}#B(e,r,n){let s=this.#O();if(!s||s.contains(this.ownerDocument.activeElement))return;let a=this.getBoundingClientRect(),i=e.getBoundingClientRect();s.setRowContext(r,n),s.style.position="absolute",s.style.top=`${i.top-a.top}px`,s.style.left=s.parameters.position==="start"?`${i.left-a.left}px`:"auto",s.style.right=s.parameters.position==="end"?`${a.right-i.right}px`:"auto",s.style.zIndex="1",s.hidden=!1}#I(e,r){let n=this.#s.callLogic(this.parameters[e],r);if(e==="labelCb"||e==="getLabel"){if(!n||typeof n!="object"||Object.keys(n).length!==1||!(Object.hasOwn(n,"text")&&typeof n.text=="string"||Object.hasOwn(n,"html")&&typeof n.html=="string"))throw new TypeError(`tree ${e} must return {text: string} or {html: string} synchronously`)}else if(typeof n!="string")throw new TypeError(`tree ${e} must return a string synchronously`);return n}#ee(e,r,n){n&&Object.hasOwn(r,"html")?e.replaceChildren(this.#i.sanitize(r.html,{USE_PROFILES:{html:!0},FORBID_TAGS:["style","form","input","button","select","textarea"],RETURN_DOM_FRAGMENT:!0})):e.textContent=n?r.text:r}#v(){return[...this.control.querySelectorAll("[role=treeitem]")].filter(e=>!e.closest("[hidden]"))}#V(e){if(this.#t){this.#d.add(e);return}if(this.parameters.autoCollapse)for(let r of e.parentBag.getNodes())r!==e&&this.#a.delete(r);this.#a.add(e)}#z(e,r=!1){if(this.#l.has(e))return this.#l.get(e);this.#p.add(e),this.#r.delete(e),this.#n();let n=(async()=>{try{await Promise.resolve().then(()=>e.getValue())}catch(s){this.#r.set(e,s),r||this.#a.delete(e)}finally{this.#p.delete(e),this.#l.delete(e),this.#n()}})();return this.#l.set(e,n),n}#k(e){let r=this.#v(),n=typeof e=="string"||e==null?r.find(s=>s.dataset.path===e)??r[0]:e;for(let s of this.control.querySelectorAll("[role=treeitem]"))s.tabIndex=s===n?0:-1}#M(e){this.#g=e;for(let[r,n]of this.#c)n.setAttribute("aria-selected",String(r===e)),n.classList.toggle("selected",r===e),this.#L.get(r)(),n.firstElementChild.setAttribute("part",`row ${n.classList.contains("branch")?"branch-row":"leaf-row"}${r===e?" selected-row":""}`);this.#k(e),this.#c.get(e).focus(),this.#s.writeParameter("selectedPath",e)}}}),S_=zn({name:"tree",components:[Tf,xf]});export{xf as RowActions,Tf as Tree,S_ as default};