@gramlot/gramlot 0.3.26 → 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.
- package/assets/icons/chart.svg +1 -0
- package/dist/components/audio/__init__.py +13 -0
- package/dist/components/audio/assets/collection.js +3 -0
- package/dist/components/audio/assets/index.js +3 -0
- package/dist/components/audio/commands.json +7 -0
- package/dist/components/audio/grammar.json +335 -0
- package/dist/components/charts/__init__.py +13 -0
- package/dist/components/charts/assets/collection.js +47 -0
- package/dist/components/charts/assets/files/55ea01207028f76d844678511f29fc800f8a1e67a8a0fe80470128677847ad32-echarts-gl.txt +29 -0
- package/dist/components/charts/assets/files/63727832aaf62004a2b249c933e327f3c90caf49e41a72f4bf436edf632cbda8-vega.txt +27 -0
- package/dist/components/charts/assets/files/8c45d9eaf50c2f72dd9c7ab9ef440788ba58a3538484b5c51c1f17d5128752e7-plotly.txt +21 -0
- package/dist/components/charts/assets/files/8f989229699b4fe2f1a0432d0e9edc338a8a911e250e2d1b01ecd770a5f5b1bd-uplot.txt +21 -0
- package/dist/components/charts/assets/files/c8fa058cba98f7f288b5d8fa4116f441d6dacb25b96da859e518c973fff41d0c-claygl.txt +23 -0
- package/dist/components/charts/assets/index.js +3 -0
- package/dist/components/charts/assets/modules/chunk-2CCTLZE7.js +76 -0
- package/dist/components/charts/assets/modules/chunk-RMRBEYTI.js +1 -0
- package/dist/components/charts/assets/modules/echarts-gl-CXVTZA6G.js +4409 -0
- package/dist/components/charts/assets/modules/plotly.min-4LB7HE7P.js +3596 -0
- package/dist/components/charts/assets/modules/uPlot.esm-5JJNHHRF.js +3 -0
- package/dist/components/charts/assets/modules/uPlot.min-N3E3FA74.js +1 -0
- package/dist/components/charts/assets/modules/vega.module-2QCOVQ3A.js +13 -0
- package/dist/components/charts/commands.json +7 -0
- package/dist/components/charts/grammar.json +1113 -0
- package/dist/components/chat/__init__.py +1 -1
- package/dist/components/chat/assets/collection.js +3 -3
- package/dist/components/chat/assets/index.js +1 -1
- package/dist/components/drawing/__init__.py +15 -0
- package/dist/components/drawing/assets/collection.js +28 -0
- package/dist/components/drawing/assets/index.js +3 -0
- package/dist/components/drawing/commands.json +7 -0
- package/dist/components/drawing/grammar.json +110 -0
- package/dist/components/editors/__init__.py +2 -2
- package/dist/components/editors/assets/collection.js +18 -18
- package/dist/components/editors/assets/index.js +1 -1
- package/dist/components/editors/assets/modules/{prose-mirror-engine-GMZPJPNN.js → prose-mirror-engine-DQEAEIMV.js} +2 -2
- package/dist/components/editors/grammar.json +150 -0
- package/dist/components/grid/__init__.py +1 -1
- package/dist/components/grid/assets/collection.js +63 -33
- package/dist/components/grid/assets/index.js +1 -1
- package/dist/components/grid/grammar.json +279 -0
- package/dist/components/grouplets/__init__.py +1 -1
- package/dist/components/grouplets/assets/collection.js +3 -3
- package/dist/components/grouplets/assets/index.js +1 -1
- package/dist/components/inputs/__init__.py +3 -2
- package/dist/components/inputs/assets/collection.js +38 -23
- package/dist/components/inputs/assets/index.js +1 -1
- package/dist/components/inputs/grammar.json +1533 -321
- package/dist/components/layout/__init__.py +1 -1
- package/dist/components/layout/assets/collection.js +27 -23
- package/dist/components/layout/assets/index.js +1 -1
- package/dist/components/layout/grammar.json +85 -0
- package/dist/components/selection_trial/__init__.py +1 -1
- package/dist/components/selection_trial/assets/collection.js +3 -3
- package/dist/components/selection_trial/assets/index.js +1 -1
- package/dist/components/tree/__init__.py +1 -1
- package/dist/components/tree/assets/collection.js +12 -12
- package/dist/components/tree/assets/index.js +1 -1
- package/dist/components/tree/grammar.json +126 -0
- package/dist/components/typst/__init__.py +1 -1
- package/dist/components/typst/assets/collection.js +3 -3
- package/dist/components/typst/assets/index.js +1 -1
- package/dist/components/uploads/__init__.py +1 -1
- package/dist/components/uploads/assets/collection.js +9 -9
- package/dist/components/uploads/assets/index.js +1 -1
- package/dist/components/vizabi/__init__.py +13 -0
- package/dist/components/vizabi/assets/collection.js +22 -0
- package/dist/components/vizabi/assets/index.js +3 -0
- package/dist/components/vizabi/commands.json +7 -0
- package/dist/components/vizabi/grammar.json +128 -0
- package/dist/gramlot.js +1190 -256
- package/dist/gramlot.min.js +85 -52
- package/dist/standard-collections.js +2 -0
- package/package.json +12 -4
- package/src/binding/grid-struct.js +2 -2
- package/src/binding/runtime.js +10 -0
- package/src/binding/validation-context.js +2 -1
- package/src/bootstrap.js +1 -1
- package/src/builder/gramlot-builder.d.ts +15 -2
- package/src/builder/gramlot-builder.js +22 -3
- package/src/builder/source.js +24 -1
- package/src/components/audio-analysis-session.js +65 -0
- package/src/components/audio.js +44 -0
- package/src/components/bases.js +11 -7
- package/src/components/border-container.js +6 -3
- package/src/components/buttons.js +47 -3
- package/src/components/chart-bar3d-options.js +30 -0
- package/src/components/chart-controls.js +83 -0
- package/src/components/chart-data-view.js +52 -0
- package/src/components/chart-data.js +42 -0
- package/src/components/chart-domains.js +46 -0
- package/src/components/chart-engines/echarts-options.js +50 -0
- package/src/components/chart-engines/echarts.js +82 -0
- package/src/components/chart-engines/index.js +22 -0
- package/src/components/chart-engines/plotly-map.js +34 -0
- package/src/components/chart-engines/plotly-spatial.js +35 -0
- package/src/components/chart-engines/plotly.js +138 -0
- package/src/components/chart-engines/uplot.js +57 -0
- package/src/components/chart-engines/vega.js +101 -0
- package/src/components/chart-fields.js +110 -0
- package/src/components/chart-geographic-options.js +47 -0
- package/src/components/chart-geojson.js +60 -0
- package/src/components/chart-geometry.js +11 -0
- package/src/components/chart-map-anchors.js +24 -0
- package/src/components/chart-map-bar3d-options.js +41 -0
- package/src/components/chart-map-data.js +25 -0
- package/src/components/chart-map-labels.js +8 -0
- package/src/components/chart-map-options.js +20 -0
- package/src/components/chart-pane.js +91 -0
- package/src/components/chart-renderer.js +58 -0
- package/src/components/chart-sample-view.js +32 -0
- package/src/components/chart-spatial-options.js +40 -0
- package/src/components/chart-time.js +84 -0
- package/src/components/chart-timeline.js +70 -0
- package/src/components/chart-types/area.js +2 -0
- package/src/components/chart-types/bar.js +2 -0
- package/src/components/chart-types/bar3D.js +2 -0
- package/src/components/chart-types/donut.js +2 -0
- package/src/components/chart-types/horizontalBar.js +2 -0
- package/src/components/chart-types/index.js +26 -0
- package/src/components/chart-types/line.js +2 -0
- package/src/components/chart-types/line3D.js +2 -0
- package/src/components/chart-types/lines3D.js +2 -0
- package/src/components/chart-types/map.js +2 -0
- package/src/components/chart-types/map3D.js +2 -0
- package/src/components/chart-types/mapBar3D.js +2 -0
- package/src/components/chart-types/pie.js +2 -0
- package/src/components/chart-types/polygons3D.js +2 -0
- package/src/components/chart-types/scatter.js +2 -0
- package/src/components/chart-types/scatter3D.js +2 -0
- package/src/components/chart-types/stackedArea.js +2 -0
- package/src/components/chart-types/stackedBar.js +2 -0
- package/src/components/chart-types/surface.js +2 -0
- package/src/components/charts.js +152 -0
- package/src/components/check-box-text-editor.js +88 -0
- package/src/components/check-box-text.js +193 -0
- package/src/components/check-box-tree.js +62 -0
- package/src/components/choice-editor.js +35 -18
- package/src/components/choice-field-styles.js +14 -0
- package/src/components/choices.js +5 -0
- package/src/components/database-choices.js +9 -6
- package/src/components/drawing.js +199 -0
- package/src/components/field-state.js +8 -1
- package/src/components/grid-cell-editor.js +83 -19
- package/src/components/grid-check-sets.js +98 -0
- package/src/components/grid-column-filters.js +198 -0
- package/src/components/grid-grammar.json +65 -0
- package/src/components/grid-header-interaction.js +3 -1
- package/src/components/grid-rows.js +2 -2
- package/src/components/grid-search-box.js +38 -22
- package/src/components/grid-search-styles.js +13 -14
- package/src/components/grid-search.js +8 -1
- package/src/components/grid-structure.js +13 -2
- package/src/components/grid-styles.js +34 -2
- package/src/components/grid.js +67 -10
- package/src/components/image-uploader.js +2 -2
- package/src/components/inputs.js +21 -12
- package/src/components/labelbox.js +5 -1
- package/src/components/licenses/claygl.txt +23 -0
- package/src/components/licenses/echarts-gl.txt +29 -0
- package/src/components/licenses/plotly.txt +21 -0
- package/src/components/licenses/uplot.txt +21 -0
- package/src/components/licenses/vega.txt +27 -0
- package/src/components/menus.js +19 -11
- package/src/components/parameters.js +6 -2
- package/src/components/toolbar-overflow.js +12 -8
- package/src/components/tree.js +31 -8
- package/src/components/typed-editor.js +18 -7
- package/src/components/validation.js +1 -1
- package/src/components/vizabi-session.js +66 -0
- package/src/components/vizabi.js +66 -0
- package/src/components/window-surface.js +20 -9
- package/src/components/windows.js +1 -1
- package/src/editing-session.d.ts +1 -0
- package/src/editing-session.js +113 -15
- package/src/editor-values.js +57 -0
- package/src/gramlot.d.ts +2 -0
- package/src/gramlot.js +9 -4
- package/src/handlers/device-handler.js +32 -32
- package/src/handlers/source-handler.d.ts +2 -2
- package/src/ide-documents.js +19 -3
- package/src/ide-runtime.d.ts +1 -0
- package/src/ide-runtime.js +45 -31
- package/src/index.d.ts +2 -1
- package/src/renderer/drag-drop.js +1 -0
- package/src/renderer/gramlot-renderer.d.ts +3 -0
- package/src/renderer/gramlot-renderer.js +16 -4
- package/src/server/assets.d.ts +3 -0
- package/src/server/assets.js +9 -0
- package/src/server/gramlot-server.d.ts +1 -1
- package/src/server/gramlot-server.js +2 -1
- package/src/server/index.d.ts +1 -1
- package/src/server/index.js +1 -1
- package/src/server/source-import.d.ts +1 -1
- package/src/server/source-import.js +5 -1
- package/src/server/visual-editor.d.ts +1 -1
- package/src/server/visual-editor.js +44 -34
- package/src/source-picker.d.ts +1 -1
- package/src/source-picker.js +1 -2
- package/src/stores/bag-collection-view.js +79 -17
- package/src/stores/collection-filter.js +2 -1
- package/src/stores/column-filter.js +49 -0
- package/src/stores/id-set.js +10 -0
- package/src/view/controls.js +8 -0
- package/src/view/html.js +10 -1
- package/src/view/label-menu.js +61 -0
- package/src/view/labelbox.js +15 -2
- package/src/visual-editor-canvas.js +29 -0
- package/src/visual-editor-catalogue.js +34 -0
- package/src/visual-editor.d.ts +5 -0
- package/src/visual-editor.js +244 -26
- package/themes/gramlot-base/theme.css +84 -36
- package/tools/gramlot-tools-inspector.js +170 -506
- package/tools/inspector-agent.js +1 -1
|
@@ -1,34 +1,44 @@
|
|
|
1
|
-
var Xo=Object.create;var qn=Object.defineProperty;var Zo=Object.getOwnPropertyDescriptor;var Jo=Object.getOwnPropertyNames;var Ko=Object.getPrototypeOf,Qo=Object.prototype.hasOwnProperty;var Ge=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},rs=(t,e)=>{for(var r in e)qn(t,r,{get:e[r],enumerable:!0})},Pn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Jo(e))!Qo.call(t,i)&&i!==r&&qn(t,i,{get:()=>e[i],enumerable:!(n=Zo(e,i))||n.enumerable});return t},Fr=(t,e,r)=>(Pn(t,e,"default"),r&&Pn(r,e,"default")),ns=(t,e,r)=>(r=t!=null?Xo(Ko(t)):{},Pn(e||!t||!t.__esModule?qn(r,"default",{value:t,enumerable:!0}):r,t));var ht=Ge(se=>{"use strict";function ku(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(ft(t,n)){var i=t[n];if(e.call(void 0,i,n,t))return i}}function Dt(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 ft(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function Eu(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)ft(e,r)&&(t[r]=e[r]);return t}var Fs=Dt({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 Au(t){return ft(Fs,t.toLowerCase())}var Ps=Dt({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 Du(t){return ft(Ps,t.toLowerCase())}var tr=Dt({script:!1,style:!1,textarea:!0,title:!0});function xu(t){var e=t.toLowerCase();return ft(tr,e)&&!tr[e]}function Tu(t){var e=t.toLowerCase();return ft(tr,e)&&tr[e]}function qs(t){return t===rr.HTML}function Nu(t){return qs(t)||t===rr.XML_XHTML_APPLICATION}var rr=Dt({HTML:"text/html",XML_APPLICATION:"application/xml",XML_TEXT:"text/xml",XML_XHTML_APPLICATION:"application/xhtml+xml",XML_SVG_IMAGE:"image/svg+xml"}),Cu=Object.keys(rr).map(function(t){return rr[t]});function Su(t){return Cu.indexOf(t)>-1}var Ou=Dt({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/"});se.assign=Eu;se.find=ku;se.freeze=Dt;se.HTML_BOOLEAN_ATTRIBUTES=Fs;se.HTML_RAW_TEXT_ELEMENTS=tr;se.HTML_VOID_ELEMENTS=Ps;se.hasDefaultHTMLNamespace=Nu;se.hasOwn=ft;se.isHTMLBooleanAttribute=Au;se.isHTMLRawTextElement=xu;se.isHTMLEscapableRawTextElement=Tu;se.isHTMLMimeType=qs;se.isHTMLVoidElement=Du;se.isValidMimeType=Su;se.MIME_TYPE=rr;se.NAMESPACE=Ou});var or=Ge(ar=>{"use strict";var Bu=ht();function js(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var ir=Bu.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"}),zs=Object.keys(ir);function Vs(t){return typeof t=="number"&&t>=1&&t<=25}function Iu(t){return typeof t=="string"&&t.substring(t.length-ir.Error.length)===ir.Error}function sr(t,e){Vs(t)?(this.name=zs[t],this.message=e||""):(this.message=t,this.name=Iu(e)?e:ir.Error),Error.captureStackTrace&&Error.captureStackTrace(this,sr)}js(sr,!0);Object.defineProperties(sr.prototype,{code:{enumerable:!0,get:function(){var t=zs.indexOf(this.name);return Vs(t)?t:0}}});var Hs={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},ai=Object.entries(Hs);for(nr=0;nr<ai.length;nr++)Us=ai[nr][0],sr[Us]=ai[nr][1];var Us,nr;function oi(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,oi)}js(oi);ar.DOMException=sr;ar.DOMExceptionName=ir;ar.ExceptionCode=Hs;ar.ParseError=oi});var pi=Ge(N=>{"use strict";function Js(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 Nt=Js();function et(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function xt(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,""),Nt?"u":"")}function B(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(""),Nt?"u":"")}function x(t){if(arguments.length===0)throw new Error("no parameters provided");return B.apply(x,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Mu="\uFFFD",tt=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Nt&&(tt=B("[",et(tt),"\\u{10000}-\\u{10FFFF}","]"));var Ru=new RegExp("[^"+et(tt)+"]",Nt?"u":""),en=/[\x20\x09\x0D\x0A]/,Lu=et(en),P=B(en,"+"),j=B(en,"*"),lr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Nt&&(lr=B("[",et(lr),"\\u{10000}-\\u{10FFFF}","]"));var $u=et(lr),ci=B("[",$u,et(/[-.0-9\xB7]/),et(/[\u0300-\u036F\u203F-\u2040]/),"]"),_e=B(lr,ci,"*"),Fu=B("^",_e,"$"),Ws=B(ci,"+"),Pu=B("&",_e,";"),qu=x(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),ur=x(Pu,"|",qu),cr=B("%",_e,";"),di=x(B('"',x(/[^%&"]/,"|",cr,"|",ur),"*",'"'),"|",B("'",x(/[^%&']/,"|",cr,"|",ur),"*","'")),Uu=x('"',x(/[^<&"]/,"|",ur),"*",'"',"|","'",x(/[^<&']/,"|",ur),"*","'"),ju=xt(lr,":"),zu=xt(ci,":"),li=B(ju,zu,"*"),Vu=B("^",li,"$"),dr=B(li,x(":",li),"?"),Hu=B("^",dr,"$"),Wu=B("(",dr,")"),Tt=x(/"[^"]*"|'[^']*'/),Gu=B(/^<\?/,"(",_e,")",x(P,"(?!",en,")(",tt,"*?)"),"?",/\?>/),Gs=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,fr=x('"',Gs,'*"',"|","'",xt(Gs,"'"),"*'"),Ks="<!--",Qs="-->",Yu=B(Ks,x(xt(tt,"-"),"|",B("-",xt(tt,"-"))),"*",Qs),Ys="#PCDATA",Xu=x(B(/\(/,j,Ys,x(j,/\|/,j,dr),"*",j,/\)\*/),"|",B(/\(/,j,Ys,j,/\)/)),Zu=/[?*+]?/,Ju=B(/\([^>]+\)/,Zu),Ku=x("EMPTY","|","ANY","|",Xu,"|",Ju),Qu="<!ELEMENT",ec=B(Qu,P,x(dr,"|",cr),P,x(Ku,"|",cr),j,">"),tc=B("NOTATION",P,/\(/,j,_e,x(j,/\|/,j,_e),"*",j,/\)/),rc=B(/\(/,j,Ws,x(j,/\|/,j,Ws),"*",j,/\)/),nc=x(tc,"|",rc),ic=x(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",nc),sc=x(/#REQUIRED|#IMPLIED/,"|",x(x("#FIXED",P),"?",Uu)),ac=x(P,_e,P,ic,P,sc),oc="<!ATTLIST",lc=B(oc,P,_e,ac,"*",j,">"),ui="about:legacy-compat",uc=x('"'+ui+'"',"|","'"+ui+"'"),fi="SYSTEM",tn="PUBLIC",rn=x(x(fi,P,Tt),"|",x(tn,P,fr,P,Tt)),cc=B("^",x(x(fi,P,"(?<SystemLiteralOnly>",Tt,")"),"|",x(tn,P,"(?<PubidLiteral>",fr,")",P,"(?<SystemLiteral>",Tt,")"))),dc=B("^",fr,"$"),fc=B("^",Tt,"$"),hc=x(P,"NDATA",P,_e),pc=x(di,"|",x(rn,hc,"?")),ea="<!ENTITY",mc=B(ea,P,_e,P,pc,j,">"),gc=x(di,"|",rn),_c=B(ea,P,"%",P,_e,P,gc,j,">"),bc=x(mc,"|",_c),wc=B(tn,P,fr),yc=B("<!NOTATION",P,_e,P,x(rn,"|",wc),j,">"),hi=B(j,"=",j),Xs=/1[.]\d+/,vc=B(P,"version",hi,x("'",Xs,"'","|",'"',Xs,'"')),Zs=/[A-Za-z][-A-Za-z0-9._]*/,kc=x(P,"encoding",hi,x('"',Zs,'"',"|","'",Zs,"'")),Ec=x(P,"standalone",hi,x("'",x("yes","|","no"),"'","|",'"',x("yes","|","no"),'"')),Ac=B(/^<\?xml/,vc,kc,"?",Ec,"?",j,/\?>/),Dc="<!DOCTYPE",xc="<![CDATA[",Tc="]]>",Nc=/<!\[CDATA\[/,Cc=/\]\]>/,Sc=B(tt,"*?",Cc),Oc=B(Nc,Sc);N.chars=et;N.chars_without=xt;N.detectUnicodeSupport=Js;N.reg=B;N.regg=x;N.ABOUT_LEGACY_COMPAT=ui;N.ABOUT_LEGACY_COMPAT_SystemLiteral=uc;N.AttlistDecl=lc;N.CDATA_START=xc;N.CDATA_END=Tc;N.CDSect=Oc;N.Char=tt;N.Comment=Yu;N.COMMENT_START=Ks;N.COMMENT_END=Qs;N.DOCTYPE_DECL_START=Dc;N.elementdecl=ec;N.EntityDecl=bc;N.EntityValue=di;N.ExternalID=rn;N.ExternalID_match=cc;N.Name=_e;N.Name_exact=Fu;N.NCName_exact=Vu;N.NotationDecl=yc;N.Reference=ur;N.PEReference=cr;N.PI=Gu;N.PUBLIC=tn;N.PubidLiteral=fr;N.PubidLiteral_match=dc;N.QName=dr;N.QName_exact=Hu;N.QName_group=Wu;N.S=P;N.SChar_s=Lu;N.S_OPT=j;N.SYSTEM=fi;N.SystemLiteral=Tt;N.SystemLiteral_match=fc;N.InvalidChar=Ru;N.UNICODE_REPLACEMENT_CHARACTER=Mu;N.UNICODE_SUPPORT=Nt;N.XMLDecl=Ac});var Ai=Ge(H=>{"use strict";var Ee=ht(),Be=Ee.find,Bc=Ee.hasDefaultHTMLNamespace,St=Ee.hasOwn,Ic=Ee.isHTMLMimeType,Mc=Ee.isHTMLRawTextElement,Rc=Ee.isHTMLVoidElement,hr=Ee.MIME_TYPE,Ie=Ee.NAMESPACE,fe=Symbol(),oa=or(),v=oa.DOMException,ue=oa.DOMExceptionName,V=pi();function pe(t){if(t!==fe)throw new TypeError("Illegal constructor")}function Lc(t){return t!==""}function $c(t){return t?t.split(/[\t\n\f\r ]+/).filter(Lc):[]}function Fc(t,e){return St(t,e)||(t[e]=!0),t}function ta(t){if(!t)return[];var e=$c(t);return Object.keys(e.reduce(Fc,{}))}function Pc(t){return function(e){return t&&t.indexOf(e)!==-1}}function la(t){if(!V.QName_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function gi(t,e){la(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var i=e.split(":");r=i[0],n=i[1]}if(r!==null&&t===null)throw new v(v.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ee.NAMESPACE.XML)throw new v(v.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ee.NAMESPACE.XMLNS)throw new v(v.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ee.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new v(v.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function It(t,e){for(var r in t)St(t,r)&&(e[r]=t[r])}function me(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,It(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var ge={},ke=ge.ELEMENT_NODE=1,Ot=ge.ATTRIBUTE_NODE=2,pr=ge.TEXT_NODE=3,ua=ge.CDATA_SECTION_NODE=4,ca=ge.ENTITY_REFERENCE_NODE=5,qc=ge.ENTITY_NODE=6,_i=ge.PROCESSING_INSTRUCTION_NODE=7,bi=ge.COMMENT_NODE=8,Ct=ge.DOCUMENT_NODE=9,da=ge.DOCUMENT_TYPE_NODE=10,rt=ge.DOCUMENT_FRAGMENT_NODE=11,Uc=ge.NOTATION_NODE=12,z=Ee.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 fa(t,e){if(e.length<t.length)return fa(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function ra(t){return t.guid||(t.guid=Math.random()),t.guid}function J(){}J.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++)Ei(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)}};J.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 Oe(t,e){this._node=t,this._refresh=e,on(this)}function on(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ea(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)St(t,n)&&delete t[n];It(r,t),t._inc=e}}Oe.prototype.item=function(t){return on(this),this[t]||null};me(Oe,J);function Bt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function ha(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function wi(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 jc(t,e,r){var n=wi(t,e,!1),i=n&&n[r];return i||null}function zc(t,e){wi(t,e.namespaceURI,!0)[e.localName]=e}function Vc(t,e){var r=wi(t,e.namespaceURI,!1);r&&delete r[e.localName]}function Hc(t,e,r,n){if(n?e[ha(e,n)]=r:(e[e.length]=r,e.length++),zc(e,r),t){r.ownerElement=t;var i=t.ownerDocument;i&&(n&&ga(i,t,n),Wc(i,t,r))}}function na(t,e,r){var n=ha(e,r);if(n>=0){for(var i=e.length-1;n<=i;)e[n]=e[++n];if(e.length=i,Vc(e,r),t){var s=t.ownerDocument;s&&ga(s,t,r),r.ownerElement=null}}}Bt.prototype={length:0,item:J.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 v(v.INUSE_ATTRIBUTE_ERR);var r=jc(this,t.namespaceURI,t.localName);return r===t?t:(Hc(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 v(v.NOT_FOUND_ERR,t);return na(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new v(v.NOT_FOUND_ERR,t?t+" : "+e:e);return na(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}};Bt.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 pa(){}pa.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=hr.XML_APPLICATION;t===Ie.HTML?n=hr.XML_XHTML_APPLICATION:t===Ie.SVG&&(n=hr.XML_SVG_IMAGE);var i=new qe(fe,{contentType:n});if(i.implementation=this,i.childNodes=new J,i.doctype=r||null,r&&i.appendChild(r),e){var s=i.createElementNS(t,e);i.appendChild(s)}return i},createDocumentType:function(t,e,r,n){la(t);var i=new cn(fe);return i.name=t,i.nodeName=t,i.publicId=e||"",i.systemId=r||"",i.internalSubset=n||"",i.childNodes=new J,i},createHTMLDocument:function(t){var e=new qe(fe,{contentType:hr.HTML});if(e.implementation=this,e.childNodes=new J,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 i=e.createElement("title");i.appendChild(e.createTextNode(t)),n.appendChild(i)}r.appendChild(e.createElement("body"))}return e}};function I(t){pe(t)}I.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,i=r.other;if(n.nodeType!==i.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==i.name||n.publicId!==i.publicId||n.systemId!==i.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==i.namespaceURI||n.prefix!==i.prefix||n.localName!==i.localName||n.attributes.length!==i.attributes.length)return!1;for(var s=0;s<n.attributes.length;s++){var a=n.attributes.item(s),o=i.getAttributeNodeNS(a.namespaceURI,a.localName);if(!o)return!1;e.push({node:a,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==i.namespaceURI||n.localName!==i.localName||n.value!==i.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==i.target||n.data!==i.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==i.data)return!1;break}if(n.childNodes.length!==i.childNodes.length)return!1;for(var s=n.childNodes.length-1;s>=0;s--)e.push({node:n.childNodes[s],other:i.childNodes[s]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return an(this,t,e)},replaceChild:function(t,e){an(this,t,e,wa),e&&this.removeChild(e)},removeChild:function(t){return _a(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return ka(this.ownerDocument||this,this,t)},normalize:function(){ae(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===pr&&e.nodeType===pr){for(var n=[],i=r;i!==null&&i.nodeType===pr;)n.push(i.data),i=i.nextSibling;for(var s=e.nextSibling;s!==i;){var a=s.nextSibling;s.parentNode=null,s.previousSibling=null,s.nextSibling=null,s=a}e.nextSibling=i,i!==null?i.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),yi(t.ownerDocument,t),e=i}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(St(r,n)&&r[n]===t)return n}e=e.nodeType==Ot?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&St(r,t))return r[t];e=e.nodeType==Ot?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,i=null;if(e instanceof pt&&(n=e,e=n.ownerElement),r instanceof pt&&(i=r,r=i.ownerElement,n&&e&&r===e))for(var s=0,a;a=r.attributes[s];s++){if(a===n)return z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+z.DOCUMENT_POSITION_PRECEDING;if(a===i)return z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+z.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return z.DOCUMENT_POSITION_DISCONNECTED+z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(ra(r.ownerDocument)>ra(e.ownerDocument)?z.DOCUMENT_POSITION_FOLLOWING:z.DOCUMENT_POSITION_PRECEDING);if(i&&e===r)return z.DOCUMENT_POSITION_CONTAINS+z.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return z.DOCUMENT_POSITION_CONTAINED_BY+z.DOCUMENT_POSITION_FOLLOWING;for(var o=[],u=e.parentNode;u;){if(!i&&u===r)return z.DOCUMENT_POSITION_CONTAINED_BY+z.DOCUMENT_POSITION_FOLLOWING;o.push(u),u=u.parentNode}o.reverse();for(var l=[],c=r.parentNode;c;){if(!n&&c===e)return z.DOCUMENT_POSITION_CONTAINS+z.DOCUMENT_POSITION_PRECEDING;l.push(c),c=c.parentNode}l.reverse();var d=fa(o,l);for(var f in d.childNodes){var h=d.childNodes[f];if(h===r)return z.DOCUMENT_POSITION_FOLLOWING;if(h===e)return z.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(h)>=0)return z.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(h)>=0)return z.DOCUMENT_POSITION_PRECEDING}return 0}};function ma(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}It(ge,I);It(ge,I.prototype);It(z,I);It(z,I.prototype);function sn(t,e){ae(t,null,{enter:function(r){return e(r)?ae.STOP:!0}})}function ae(t,e,r){for(var n=[{node:t,context:e,phase:ae.ENTER}];n.length>0;){var i=n.pop();if(i.phase===ae.ENTER){var s=r.enter(i.node,i.context);if(s===ae.STOP)return ae.STOP;if(n.push({node:i.node,context:s,phase:ae.EXIT}),s==null)continue;for(var a=i.node.lastChild;a;)n.push({node:a,context:s,phase:ae.ENTER}),a=a.previousSibling}else r.exit&&r.exit(i.node,i.context)}}ae.STOP=Symbol("walkDOM.STOP");ae.ENTER=0;ae.EXIT=1;function qe(t,e){pe(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||hr.XML_APPLICATION,this.type=Ic(this.contentType)?"html":"xml"}function Wc(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===Ie.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function ga(t,e,r,n){t&&t._inc++;var i=r.namespaceURI;i===Ie.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function yi(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var i=e.firstChild,s=0;i;)n[s++]=i,i=i.nextSibling;n.length=s,delete n[n.length]}}}function _a(t,e){if(t!==e.parentNode)throw new v(v.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,yi(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function Gc(t){return t&&(t.nodeType===I.DOCUMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.ELEMENT_NODE)}function Yc(t){return t&&(t.nodeType===I.CDATA_SECTION_NODE||t.nodeType===I.COMMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.DOCUMENT_TYPE_NODE||t.nodeType===I.ELEMENT_NODE||t.nodeType===I.PROCESSING_INSTRUCTION_NODE||t.nodeType===I.TEXT_NODE)}function nt(t){return t&&t.nodeType===I.DOCUMENT_TYPE_NODE}function Pe(t){return t&&t.nodeType===I.ELEMENT_NODE}function ba(t){return t&&t.nodeType===I.TEXT_NODE}function ia(t,e){var r=t.childNodes||[];if(Be(r,Pe)||nt(e))return!1;var n=Be(r,nt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function sa(t,e){var r=t.childNodes||[];function n(s){return Pe(s)&&s!==e}if(Be(r,n))return!1;var i=Be(r,nt);return!(e&&i&&r.indexOf(i)>r.indexOf(e))}function Xc(t,e,r){if(!Gc(t))throw new v(v.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new v(v.NOT_FOUND_ERR,"child not in parent");if(!Yc(e)||nt(e)&&t.nodeType!==I.DOCUMENT_NODE)throw new v(v.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function Zc(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Pe);if(s.length>1||Be(i,ba))throw new v(v.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!ia(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Pe(e)&&!ia(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(nt(e)){if(Be(n,nt))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=Be(n,Pe);if(r&&n.indexOf(a)<n.indexOf(r))throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&a)throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function wa(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Pe);if(s.length>1||Be(i,ba))throw new v(v.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!sa(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Pe(e)&&!sa(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(nt(e)){if(Be(n,function(u){return nt(u)&&u!==r}))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=Be(n,Pe);if(r&&n.indexOf(a)<n.indexOf(r))throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function an(t,e,r,n){Xc(t,e,r),t.nodeType===I.DOCUMENT_NODE&&(n||Zc)(t,e,r);var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===rt){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var o=r?r.previousSibling:t.lastChild;s.previousSibling=o,a.nextSibling=r,o?o.nextSibling=s:t.firstChild=s,r==null?t.lastChild=a:r.previousSibling=a;do s.parentNode=t;while(s!==a&&(s=s.nextSibling));return yi(t.ownerDocument||t,t,e),e.nodeType==rt&&(e.firstChild=e.lastChild=null),e}qe.prototype={implementation:null,nodeName:"#document",nodeType:Ct,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===rt){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return an(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===ke&&(this.documentElement=t),t},removeChild:function(t){var e=_a(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){an(this,t,e,wa),t.ownerDocument=this,e&&this.removeChild(e),Pe(t)&&(this.documentElement=t)},importNode:function(t,e){return Jc(this,t,e)},getElementById:function(t){var e=null;return sn(this.documentElement,function(r){if(r.nodeType==ke&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new Ue(fe);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Bc(this.contentType)&&(e.namespaceURI=Ie.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new J;var r=e.attributes=new Bt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Mt(fe);return t.ownerDocument=this,t.childNodes=new J,t},createTextNode:function(t){var e=new mr(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createComment:function(t){var e=new ln(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new v(v.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new un(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new fn(fe);return r.ownerDocument=this,r.childNodes=new J,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!V.QName_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new pt(fe);return e.ownerDocument=this,e.childNodes=new J,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!V.Name_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new v("document is an html document",ue.NotSupportedError);var e=new dn(fe);return e.ownerDocument=this,e.childNodes=new J,e.nodeName=t,e},createElementNS:function(t,e){var r=gi(t,e),n=new Ue(fe),i=n.attributes=new Bt;return n.childNodes=new J,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],i._ownerElement=n,n},createAttributeNS:function(t,e){var r=gi(t,e),n=new pt(fe);return n.ownerDocument=this,n.childNodes=new J,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};me(qe,I);function Ue(t){pe(t),this._nsMap=Object.create(null)}Ue.prototype={nodeType:ke,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Ie.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=gi(t,e),i=n[2],s=this.getAttributeNodeNS(t,i);s?s.value=s.nodeValue=""+r:(s=this.ownerDocument.createAttributeNS(t,e),s.value=s.nodeValue=""+r,this.setAttributeNode(s))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=ta(t);return new Oe(this,function(r){var n=[];return e.length>0&&sn(r,function(i){if(i!==r&&i.nodeType===ke){var s=i.getAttribute("class");if(s){var a=t===s;if(!a){var o=ta(s);a=e.every(Pc(o))}a&&n.push(i)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Ct?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Oe(this,function(n){var i=[];return sn(n,function(s){if(!(s===n||s.nodeType!==ke))if(t==="*")i.push(s);else{var a=s.getQualifiedName(),o=e&&s.namespaceURI===Ie.HTML?r:t;a===o&&i.push(s)}}),i})},getElementsByTagNameNS:function(t,e){return new Oe(this,function(r){var n=[];return sn(r,function(i){i!==r&&i.nodeType===ke&&(t==="*"||i.namespaceURI===t)&&(e==="*"||i.localName==e)&&n.push(i)}),n})}};qe.prototype.getElementsByClassName=Ue.prototype.getElementsByClassName;qe.prototype.getElementsByTagName=Ue.prototype.getElementsByTagName;qe.prototype.getElementsByTagNameNS=Ue.prototype.getElementsByTagNameNS;me(Ue,I);function pt(t){pe(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}pt.prototype.nodeType=Ot;me(pt,I);function it(t){pe(t)}it.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),i=this.data.substring(t+e);r=n+r+i,this.nodeValue=this.data=r,this.length=r.length}};me(it,I);function mr(t){pe(t)}mr.prototype={nodeName:"#text",nodeType:pr,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}};me(mr,it);function ln(t){pe(t)}ln.prototype={nodeName:"#comment",nodeType:bi};me(ln,it);function un(t){pe(t)}un.prototype={nodeName:"#cdata-section",nodeType:ua};me(un,mr);function cn(t){pe(t)}cn.prototype.nodeType=da;me(cn,I);function vi(t){pe(t)}vi.prototype.nodeType=Uc;me(vi,I);function ki(t){pe(t)}ki.prototype.nodeType=qc;me(ki,I);function dn(t){pe(t)}dn.prototype.nodeType=ca;me(dn,I);function Mt(t){pe(t)}Mt.prototype.nodeName="#document-fragment";Mt.prototype.nodeType=rt;me(Mt,I);function fn(t){pe(t)}fn.prototype.nodeType=_i;me(fn,it);function ya(){}ya.prototype.serializeToString=function(t,e){return va.call(t,e)};I.prototype.toString=va;function va(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===Ct&&this.documentElement||this,i=n.prefix,s=n.namespaceURI;if(s&&i==null){var i=n.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return Ei(this,r,a,e),r.join("")}function aa(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!i||n==="xml"&&i===Ie.XML||i===Ie.XMLNS)return!1;for(var s=r.length;s--;){var a=r[s];if(a.prefix===n)return a.namespace!==i}return!0}function nn(t,e,r,n){if(n&&!V.QName_exact.test(e))throw new v('The attribute name "'+e+'" is not a valid XML QName',ue.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,ma),'"')}function Ei(t,e,r,n){r||(r=[]);var i=n.nodeFilter,s=n.requireWellFormed,a=n.splitCDATASections,o=t.nodeType===Ct?t:t.ownerDocument,u=o.type==="html";ae(t,{ns:r},{enter:function(l,c){var d=c.ns;if(i)if(l=i(l),l){if(typeof l=="string")return e.push(l),null}else return null;switch(l.nodeType){case ke:var f=l.attributes,h=f.length,p=l.tagName,m=p;if(!u&&!l.prefix&&l.namespaceURI){for(var _,b=0;b<f.length;b++)if(f.item(b).name==="xmlns"){_=f.item(b).value;break}if(!_)for(var w=d.length-1;w>=0;w--){var y=d[w];if(y.prefix===""&&y.namespace===l.namespaceURI){_=y.namespace;break}}if(_!==l.namespaceURI)for(var w=d.length-1;w>=0;w--){var y=d[w];if(y.namespace===l.namespaceURI){y.prefix&&(m=y.prefix+":"+p);break}}}if(s&&!V.QName_exact.test(m))throw new v('The element name "'+m+'" is not a valid XML QName',ue.InvalidStateError);e.push("<",m);for(var E=d.slice(),S=0;S<h;S++){var R=f.item(S);R.prefix=="xmlns"?E.push({prefix:R.localName,namespace:R.value}):R.nodeName=="xmlns"&&E.push({prefix:"",namespace:R.value})}for(var S=0;S<h;S++){var R=f.item(S);if(aa(R,u,E)){var $=R.prefix||"",re=R.namespaceURI;nn(e,$?"xmlns:"+$:"xmlns",re,s),E.push({prefix:$,namespace:re})}var ne=i?i(R):R;ne&&(typeof ne=="string"?e.push(ne):nn(e,ne.name,ne.value,s))}if(p===m&&aa(l,u,E)){var $e=l.prefix||"",re=l.namespaceURI;nn(e,$e?"xmlns:"+$e:"xmlns",re,s),E.push({prefix:$e,namespace:re})}var X=!l.firstChild;if(X&&(u||l.namespaceURI===Ie.HTML)&&(X=Rc(p)),X)return e.push("/>"),null;if(e.push(">"),u&&Mc(p)){for(var de=l.firstChild;de;)de.data?e.push(de.data):Ei(de,e,E.slice(),n),de=de.nextSibling;return e.push("</",m,">"),null}return{ns:E,tag:m};case Ct:case rt:if(s&&l.nodeType===Ct&&l.documentElement==null)throw new v("The Document has no documentElement",ue.InvalidStateError);return{ns:d};case Ot:return nn(e,l.name,l.value,s),null;case pr:if(s&&V.InvalidChar.test(l.data))throw new v("The Text node data contains characters outside the XML Char production",ue.InvalidStateError);return e.push(l.data.replace(/[<&>]/g,ma)),null;case ua:if(s&&l.data.indexOf("]]>")!==-1)throw new v('The CDATASection data contains "]]>"',ue.InvalidStateError);return a?e.push(V.CDATA_START,l.data.replace(/]]>/g,"]]]]><![CDATA[>"),V.CDATA_END):e.push(V.CDATA_START,l.data,V.CDATA_END),null;case bi:if(s){if(V.InvalidChar.test(l.data))throw new v("The comment node data contains characters outside the XML Char production",ue.InvalidStateError);if(l.data.indexOf("--")!==-1||l.data[l.data.length-1]==="-")throw new v('The comment node data contains "--" or ends with "-"',ue.InvalidStateError)}return e.push(V.COMMENT_START,l.data,V.COMMENT_END),null;case da:var ye=l.publicId,q=l.systemId;if(s){if(!V.Name_exact.test(l.name))throw new v('The doctype name "'+l.name+'" is not a valid XML Name',ue.InvalidStateError);if(ye&&!V.PubidLiteral_match.test(ye))throw new v("DocumentType publicId is not a valid PubidLiteral",ue.InvalidStateError);if(q&&q!=="."&&!V.SystemLiteral_match.test(q))throw new v("DocumentType systemId is not a valid SystemLiteral",ue.InvalidStateError);if(l.internalSubset&&l.internalSubset.indexOf("]>")!==-1)throw new v('DocumentType internalSubset contains "]>"',ue.InvalidStateError)}return e.push(V.DOCTYPE_DECL_START," ",l.name),ye?(e.push(" ",V.PUBLIC," ",ye),q&&q!=="."&&e.push(" ",q)):q&&q!=="."&&e.push(" ",V.SYSTEM," ",q),l.internalSubset&&e.push(" [",l.internalSubset,"]"),e.push(">"),null;case _i:if(s){if(!V.NCName_exact.test(l.target)||l.target.toLowerCase()==="xml")throw new v('The processing instruction target "'+l.target+'" is not a valid XML NCName or is reserved',ue.InvalidStateError);if(V.InvalidChar.test(l.data))throw new v("The ProcessingInstruction data contains characters outside the XML Char production",ue.InvalidStateError);if(l.data.indexOf("?>")!==-1)throw new v('The ProcessingInstruction data contains "?>"',ue.InvalidStateError)}return e.push("<?",l.target," ",l.data,"?>"),null;case ca:if(s&&!V.Name_exact.test(l.nodeName))throw new v('The entity reference name "'+l.nodeName+'" is not a valid XML Name',ue.InvalidStateError);return e.push("&",l.nodeName,";"),null;default:return e.push("??",l.nodeName),null}},exit:function(l,c){c&&c.tag&&e.push("</",c.tag,">")}})}function Jc(t,e,r){var n;return ae(e,null,{enter:function(i,s){var a=i.cloneNode(!1);a.ownerDocument=t,a.parentNode=null,s===null?n=a:s.appendChild(a);var o=i.nodeType===Ot||r;return o?a:null}}),n}function ka(t,e,r){var n;return ae(e,null,{enter:function(i,s){var a=new i.constructor(fe);for(var o in i)if(St(i,o)){var u=i[o];typeof u!="object"&&u!=a[o]&&(a[o]=u)}i.childNodes&&(a.childNodes=new J),a.ownerDocument=t;var l=r;switch(a.nodeType){case ke:var c=i.attributes,d=a.attributes=new Bt,f=c.length;d._ownerElement=a;for(var h=0;h<f;h++)a.setAttributeNode(ka(t,c.item(h),!0));break;case Ot:l=!0}return s!==null?s.appendChild(a):n=a,l?a:null}}),n}function Ea(t,e,r){t[e]=r}function mi(t){for(var e=[],r=t.firstChild;r;)r.nodeType===ke&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Oe.prototype,"length",{get:function(){return on(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){if(this.nodeType===ke||this.nodeType===rt){var t=[];return ae(this,null,{enter:function(e){if(e.nodeType===ke||e.nodeType===rt)return!0;if(e.nodeType===_i||e.nodeType===bi)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case ke:case rt: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(it.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(it.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(Ue.prototype,"children",{get:function(){return new Oe(this,mi)}}),Object.defineProperty(qe.prototype,"children",{get:function(){return new Oe(this,mi)}}),Object.defineProperty(Mt.prototype,"children",{get:function(){return new Oe(this,mi)}}),Ea=function(t,e,r){t["$$"+e]=r})}catch{}H._updateLiveList=on;H.Attr=pt;H.CDATASection=un;H.CharacterData=it;H.Comment=ln;H.Document=qe;H.DocumentFragment=Mt;H.DocumentType=cn;H.DOMImplementation=pa;H.Element=Ue;H.Entity=ki;H.EntityReference=dn;H.LiveNodeList=Oe;H.NamedNodeMap=Bt;H.Node=I;H.NodeList=J;H.Notation=vi;H.Text=mr;H.ProcessingInstruction=fn;H.walkDOM=ae;H.XMLSerializer=ya});var Da=Ge(gr=>{"use strict";var Aa=ht().freeze;gr.XML_ENTITIES=Aa({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});gr.HTML_ENTITIES=Aa({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"});gr.entityMap=gr.HTML_ENTITIES});var Ma=Ge(pn=>{"use strict";var Pt=ht(),C=pi(),Ca=or(),Kc=Pt.isHTMLEscapableRawTextElement,Qc=Pt.isHTMLMimeType,ed=Pt.isHTMLRawTextElement,wr=Pt.hasOwn,xa=Pt.NAMESPACE,td=Ca.ParseError,rd=Ca.DOMException,Rt=0,st=1,Lt=2,_r=3,$t=4,Ft=5,br=6,hn=7;function Sa(){}Sa.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),ad(e,e=Object.create(null)),nd(t,e,r,n,this.errorHandler),n.endDocument()}};var Di=/&#?\w+;?/g;function nd(t,e,r,n,i){var s=Qc(n.mimeType);t.indexOf(C.UNICODE_REPLACEMENT_CHARACTER)>=0&&i.warning("Unicode replacement character detected, source encoding issues?");function a(L){if(L>65535){L-=65536;var ve=55296+(L>>10),Lr=56320+(L&1023);return String.fromCharCode(ve,Lr)}else return String.fromCharCode(L)}function o(L){var ve=L[L.length-1]===";"?L:L+";";if(!s&&ve!==L)return i.error("EntityRef: expecting ;"),L;var Lr=C.Reference.exec(ve);if(!Lr||Lr[0].length!==ve.length)return i.error("entity not matching Reference production: "+L),L;var $r=ve.slice(1,-1);return wr(r,$r)?r[$r]:$r.charAt(0)==="#"?a(parseInt($r.substring(1).replace("x","0x"))):(i.error("entity not found:"+L),L)}function u(L){if(L>_){var ve=t.substring(_,L).replace(Di,o);f&&h(_),n.characters(ve,0,L-_),_=L}}var l=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function h(L,ve){for(;L>=c&&(ve=d.exec(t));)l=c,c=ve.index+ve[0].length,f.lineNumber++;f.columnNumber=L-l+1}for(var p=[{currentNSMap:e}],m=[],_=0;;){try{var b=t.indexOf("<",_);if(b<0){if(!s&&m.length>0)return i.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(_).match(/^\s*$/)){var w=n.doc,y=w.createTextNode(t.substring(_));if(w.documentElement)return i.error("Extra content at the end of the document");w.appendChild(y),n.currentElement=y}return}if(b>_){var E=t.substring(_,b);!s&&m.length===0&&(E=E.replace(new RegExp(C.S_OPT.source,"g"),""),E&&i.error("Unexpected content outside root element: '"+E+"'")),u(b)}switch(t.charAt(b+1)){case"/":var O=t.indexOf(">",b+2),S=t.substring(b+2,O>0?O:void 0);if(!S)return i.fatalError("end tag name missing");var R=C.reg("^",C.QName_group,C.S_OPT,"$"),$=O>0&&R.exec(S);if(!$){var re=O>0&&C.reg("^",C.QName_group).exec(S);if(s&&re)i.warning('end tag name contains invalid trailing characters: "'+S+'"'),$=re;else if(re&&new RegExp(R.source,R.flags+"m").test(S))i.error('end tag name is followed by a line break and trailing content: "'+S+'"'),$=re;else return i.fatalError('end tag name contains invalid characters: "'+S+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var ne=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(ne!==$[1]){var $e=$[1].toLowerCase();if(!s||ne.toLowerCase()!==$e)return i.fatalError('Opening and ending tag mismatch: "'+ne+'" != "'+S+'"')}var X=p.pop();m.pop();var de=X.localNSMap;if(n.endElement(X.uri,X.localName,ne),de)for(var ye in de)wr(de,ye)&&n.endPrefixMapping(ye);O++;break;case"?":f&&h(b),O=ld(t,b,n,i);break;case"!":f&&h(b),O=Ba(t,b,n,i,s);break;default:f&&h(b);var q=new Ia,Y=p[p.length-1].currentNSMap,O=id(t,b,q,Y,o,i,s),es=q.length;if(q.closed||(s&&Pt.isHTMLVoidElement(q.tagName)?q.closed=!0:m.push(q.tagName)),f&&es){for(var Yo=Ta(f,{}),Fn=0;Fn<es;Fn++){var ts=q[Fn];h(ts.offset),ts.locator=Ta(f,{})}n.locator=Yo,Na(q,n,Y)&&p.push(q),n.locator=f}else Na(q,n,Y)&&p.push(q);s&&!q.closed?O=sd(t,O,q.tagName,o,n):O++}}catch(L){if(L instanceof td)throw L;if(L instanceof rd)return i.fatalError("Error constructing the DOM: "+L.name+": "+L.message,L);i.error("element parse error: "+L),O=-1}O>_?_=O:u(Math.max(b,_)+1)}}function Ta(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function id(t,e,r,n,i,s,a){function o(h,p,m){if(wr(r.attributeNames,h))return s.fatalError("Attribute "+h+" redefined");if(!a&&p.indexOf("<")>=0)return s.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(h,p.replace(/[\t\n\r]/g," ").replace(Di,i),m)}for(var u,l,c=++e,d=Rt;;){var f=t.charAt(c);if(d===Rt&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===st)u=t.slice(e,c),d=_r;else if(d===Lt)d=_r;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===_r||d===st)if(d===st&&(s.warning('attribute value must after "="'),u=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)l=t.slice(e,c),o(u,l,e-1),d=Ft;else throw new Error("attribute value no end '"+f+"' match");else if(d==$t)l=t.slice(e,c),o(u,l,e),s.warning('attribute "'+u+'" missed start quot('+f+")!!"),e=c+1,d=Ft;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Rt:r.setTagName(t.slice(e,c));case Ft:case br:case hn:d=hn,r.closed=!0;case $t:case st:break;case Lt:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),d==Rt&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Rt:r.setTagName(t.slice(e,c));case Ft:case br:case hn:break;case $t:case st:l=t.slice(e,c),l.slice(-1)==="/"&&(r.closed=!0,l=l.slice(0,-1));case Lt:d===Lt&&(l=u),d==$t?(s.warning('attribute "'+l+'" missed quot(")!'),o(u,l,e)):(a||s.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),o(l,l,e));break;case _r:if(!a)return s.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Rt:r.setTagName(t.slice(e,c)),d=br;break;case st:u=t.slice(e,c),d=Lt;break;case $t:var l=t.slice(e,c);s.warning('attribute "'+l+'" missed quot(")!!'),o(u,l,e);case Ft:d=br;break}else switch(d){case Lt:a||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,e),e=c,d=st;break;case Ft:s.warning('attribute space is required"'+u+'"!!');case br:d=st,e=c;break;case _r:d=$t,e=c;break;case hn:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function Na(t,e,r){for(var n=t.tagName,i=null,d=t.length;d--;){var s=t[d],a=s.qName,o=s.value,f=a.indexOf(":");if(f>0)var u=s.prefix=a.slice(0,f),l=a.slice(f+1),c=u==="xmlns"&&l;else l=a,u=null,c=a==="xmlns"&&"";s.localName=l,c!==!1&&(i==null&&(i=Object.create(null),r=Object.create(r)),r[c]=i[c]=o,s.uri=xa.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)s=t[d],s.prefix&&(s.prefix==="xml"&&(s.uri=xa.XML),s.prefix!=="xmlns"&&(s.uri=r[s.prefix]));var f=n.indexOf(":");f>0?(u=t.prefix=n.slice(0,f),l=t.localName=n.slice(f+1)):(u=null,l=t.localName=n);var h=t.uri=r[u||""];if(e.startElement(h,l,n,t),t.closed){if(e.endElement(h,l,n),i)for(u in i)wr(i,u)&&e.endPrefixMapping(u)}else return t.currentNSMap=r,t.localNSMap=i,!0}function sd(t,e,r,n,i){var s=Kc(r);if(s||ed(r)){var a=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");a.lastIndex=e;var o=a.exec(t),u=o?o.index:-1;if(u<0)return e+1;var l=t.substring(e+1,u);return s&&(l=l.replace(Di,n)),i.characters(l,0,l.length),u}return e+1}function ad(t,e){for(var r in t)wr(t,r)&&(e[r]=t[r])}function Oa(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function i(c){c=c||1,r+=c}function s(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
-
`&&d!==" "&&d!=="\r")return c;c++,i()}return-1}function a(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function u(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function l(c){var d=
|
|
1
|
+
var cl=Object.create;var Yn=Object.defineProperty;var dl=Object.getOwnPropertyDescriptor;var fl=Object.getOwnPropertyNames;var hl=Object.getPrototypeOf,pl=Object.prototype.hasOwnProperty;var Ge=(t,e)=>()=>{try{return e||t((e={exports:{}}).exports,e),e.exports}catch(r){throw e=0,r}},ms=(t,e)=>{for(var r in e)Yn(t,r,{get:e[r],enumerable:!0})},Gn=(t,e,r,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of fl(e))!pl.call(t,i)&&i!==r&&Yn(t,i,{get:()=>e[i],enumerable:!(n=dl(e,i))||n.enumerable});return t},Xt=(t,e,r)=>(Gn(t,e,"default"),r&&Gn(r,e,"default")),gs=(t,e,r)=>(r=t!=null?cl(hl(t)):{},Gn(e||!t||!t.__esModule?Yn(r,"default",{value:t,enumerable:!0}):r,t));var ht=Ge(se=>{"use strict";function Fu(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(ft(t,n)){var i=t[n];if(e.call(void 0,i,n,t))return i}}function At(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 ft(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function $u(t,e){if(t===null||typeof t!="object")throw new TypeError("target is not an object");for(var r in e)ft(e,r)&&(t[r]=e[r]);return t}var Xs=At({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 qu(t){return ft(Xs,t.toLowerCase())}var Zs=At({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 Pu(t){return ft(Zs,t.toLowerCase())}var nr=At({script:!1,style:!1,textarea:!0,title:!0});function Uu(t){var e=t.toLowerCase();return ft(nr,e)&&!nr[e]}function ju(t){var e=t.toLowerCase();return ft(nr,e)&&nr[e]}function Ks(t){return t===ir.HTML}function zu(t){return Ks(t)||t===ir.XML_XHTML_APPLICATION}var ir=At({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(ir).map(function(t){return ir[t]});function Hu(t){return Vu.indexOf(t)>-1}var Wu=At({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/"});se.assign=$u;se.find=Fu;se.freeze=At;se.HTML_BOOLEAN_ATTRIBUTES=Xs;se.HTML_RAW_TEXT_ELEMENTS=nr;se.HTML_VOID_ELEMENTS=Zs;se.hasDefaultHTMLNamespace=zu;se.hasOwn=ft;se.isHTMLBooleanAttribute=qu;se.isHTMLRawTextElement=Uu;se.isHTMLEscapableRawTextElement=ju;se.isHTMLMimeType=Ks;se.isHTMLVoidElement=Pu;se.isValidMimeType=Hu;se.MIME_TYPE=ir;se.NAMESPACE=Wu});var ur=Ge(lr=>{"use strict";var Gu=ht();function Qs(t,e){t.prototype=Object.create(Error.prototype,{constructor:{value:t},name:{value:t.name,enumerable:!0,writable:e}})}var ar=Gu.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"}),ea=Object.keys(ar);function ta(t){return typeof t=="number"&&t>=1&&t<=25}function Yu(t){return typeof t=="string"&&t.substring(t.length-ar.Error.length)===ar.Error}function or(t,e){ta(t)?(this.name=ea[t],this.message=e||""):(this.message=t,this.name=Yu(e)?e:ar.Error),Error.captureStackTrace&&Error.captureStackTrace(this,or)}Qs(or,!0);Object.defineProperties(or.prototype,{code:{enumerable:!0,get:function(){var t=ea.indexOf(this.name);return ta(t)?t:0}}});var ra={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},di=Object.entries(ra);for(sr=0;sr<di.length;sr++)Js=di[sr][0],or[Js]=di[sr][1];var Js,sr;function fi(t,e,r){this.message=t,this.locator=e,this.cause=r,Error.captureStackTrace&&Error.captureStackTrace(this,fi)}Qs(fi);lr.DOMException=or;lr.DOMExceptionName=ar;lr.ExceptionCode=ra;lr.ParseError=fi});var wi=Ge(C=>{"use strict";function la(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 Ct=la();function Qe(t){if(t.source[0]!=="[")throw new Error(t+" can not be used with chars");return t.source.slice(1,t.source.lastIndexOf("]"))}function Dt(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,""),Ct?"u":"")}function B(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(""),Ct?"u":"")}function D(t){if(arguments.length===0)throw new Error("no parameters provided");return B.apply(D,["(?:"].concat(Array.prototype.slice.call(arguments),[")"]))}var Xu="\uFFFD",et=/[-\x09\x0A\x0D\x20-\x2C\x2E-\uD7FF\uE000-\uFFFD]/;Ct&&(et=B("[",Qe(et),"\\u{10000}-\\u{10FFFF}","]"));var Zu=new RegExp("[^"+Qe(et)+"]",Ct?"u":""),nn=/[\x20\x09\x0D\x0A]/,Ku=Qe(nn),q=B(nn,"+"),j=B(nn,"*"),cr=/[:_a-zA-Z\xC0-\xD6\xD8-\xF6\xF8-\u02FF\u0370-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/;Ct&&(cr=B("[",Qe(cr),"\\u{10000}-\\u{10FFFF}","]"));var Ju=Qe(cr),mi=B("[",Ju,Qe(/[-.0-9\xB7]/),Qe(/[\u0300-\u036F\u203F-\u2040]/),"]"),we=B(cr,mi,"*"),Qu=B("^",we,"$"),na=B(mi,"+"),ec=B("&",we,";"),tc=D(/&#[0-9]+;|&#x[0-9a-fA-F]+;/),dr=D(ec,"|",tc),fr=B("%",we,";"),gi=D(B('"',D(/[^%&"]/,"|",fr,"|",dr),"*",'"'),"|",B("'",D(/[^%&']/,"|",fr,"|",dr),"*","'")),rc=D('"',D(/[^<&"]/,"|",dr),"*",'"',"|","'",D(/[^<&']/,"|",dr),"*","'"),nc=Dt(cr,":"),ic=Dt(mi,":"),hi=B(nc,ic,"*"),sc=B("^",hi,"$"),hr=B(hi,D(":",hi),"?"),ac=B("^",hr,"$"),oc=B("(",hr,")"),Tt=D(/"[^"]*"|'[^']*'/),lc=B(/^<\?/,"(",we,")",D(q,"(?!",nn,")(",et,"*?)"),"?",/\?>/),ia=/[\x20\x0D\x0Aa-zA-Z0-9-'()+,./:=?;!*#@$_%]/,pr=D('"',ia,'*"',"|","'",Dt(ia,"'"),"*'"),ua="<!--",ca="-->",uc=B(ua,D(Dt(et,"-"),"|",B("-",Dt(et,"-"))),"*",ca),sa="#PCDATA",cc=D(B(/\(/,j,sa,D(j,/\|/,j,hr),"*",j,/\)\*/),"|",B(/\(/,j,sa,j,/\)/)),dc=/[?*+]?/,fc=B(/\([^>]+\)/,dc),hc=D("EMPTY","|","ANY","|",cc,"|",fc),pc="<!ELEMENT",mc=B(pc,q,D(hr,"|",fr),q,D(hc,"|",fr),j,">"),gc=B("NOTATION",q,/\(/,j,we,D(j,/\|/,j,we),"*",j,/\)/),bc=B(/\(/,j,na,D(j,/\|/,j,na),"*",j,/\)/),_c=D(gc,"|",bc),wc=D(/CDATA|ID|IDREF|IDREFS|ENTITY|ENTITIES|NMTOKEN|NMTOKENS/,"|",_c),yc=D(/#REQUIRED|#IMPLIED/,"|",D(D("#FIXED",q),"?",rc)),vc=D(q,we,q,wc,q,yc),kc="<!ATTLIST",Ec=B(kc,q,we,vc,"*",j,">"),pi="about:legacy-compat",xc=D('"'+pi+'"',"|","'"+pi+"'"),bi="SYSTEM",sn="PUBLIC",an=D(D(bi,q,Tt),"|",D(sn,q,pr,q,Tt)),Ac=B("^",D(D(bi,q,"(?<SystemLiteralOnly>",Tt,")"),"|",D(sn,q,"(?<PubidLiteral>",pr,")",q,"(?<SystemLiteral>",Tt,")"))),Dc=B("^",pr,"$"),Tc=B("^",Tt,"$"),Cc=D(q,"NDATA",q,we),Nc=D(gi,"|",D(an,Cc,"?")),da="<!ENTITY",Sc=B(da,q,we,q,Nc,j,">"),Oc=D(gi,"|",an),Bc=B(da,q,"%",q,we,q,Oc,j,">"),Ic=D(Sc,"|",Bc),Mc=B(sn,q,pr),Rc=B("<!NOTATION",q,we,q,D(an,"|",Mc),j,">"),_i=B(j,"=",j),aa=/1[.]\d+/,Lc=B(q,"version",_i,D("'",aa,"'","|",'"',aa,'"')),oa=/[A-Za-z][-A-Za-z0-9._]*/,Fc=D(q,"encoding",_i,D('"',oa,'"',"|","'",oa,"'")),$c=D(q,"standalone",_i,D("'",D("yes","|","no"),"'","|",'"',D("yes","|","no"),'"')),qc=B(/^<\?xml/,Lc,Fc,"?",$c,"?",j,/\?>/),Pc="<!DOCTYPE",Uc="<![CDATA[",jc="]]>",zc=/<!\[CDATA\[/,Vc=/\]\]>/,Hc=B(et,"*?",Vc),Wc=B(zc,Hc);C.chars=Qe;C.chars_without=Dt;C.detectUnicodeSupport=la;C.reg=B;C.regg=D;C.ABOUT_LEGACY_COMPAT=pi;C.ABOUT_LEGACY_COMPAT_SystemLiteral=xc;C.AttlistDecl=Ec;C.CDATA_START=Uc;C.CDATA_END=jc;C.CDSect=Wc;C.Char=et;C.Comment=uc;C.COMMENT_START=ua;C.COMMENT_END=ca;C.DOCTYPE_DECL_START=Pc;C.elementdecl=mc;C.EntityDecl=Ic;C.EntityValue=gi;C.ExternalID=an;C.ExternalID_match=Ac;C.Name=we;C.Name_exact=Qu;C.NCName_exact=sc;C.NotationDecl=Rc;C.Reference=dr;C.PEReference=fr;C.PI=lc;C.PUBLIC=sn;C.PubidLiteral=pr;C.PubidLiteral_match=Dc;C.QName=hr;C.QName_exact=ac;C.QName_group=oc;C.S=q;C.SChar_s=Ku;C.S_OPT=j;C.SYSTEM=bi;C.SystemLiteral=Tt;C.SystemLiteral_match=Tc;C.InvalidChar=Zu;C.UNICODE_REPLACEMENT_CHARACTER=Xu;C.UNICODE_SUPPORT=Ct;C.XMLDecl=qc});var Ni=Ge(H=>{"use strict";var Ee=ht(),Ie=Ee.find,Gc=Ee.hasDefaultHTMLNamespace,St=Ee.hasOwn,Yc=Ee.isHTMLMimeType,Xc=Ee.isHTMLRawTextElement,Zc=Ee.isHTMLVoidElement,mr=Ee.MIME_TYPE,Me=Ee.NAMESPACE,fe=Symbol(),_a=ur(),v=_a.DOMException,ce=_a.DOMExceptionName,V=wi();function pe(t){if(t!==fe)throw new TypeError("Illegal constructor")}function Kc(t){return t!==""}function Jc(t){return t?t.split(/[\t\n\f\r ]+/).filter(Kc):[]}function Qc(t,e){return St(t,e)||(t[e]=!0),t}function fa(t){if(!t)return[];var e=Jc(t);return Object.keys(e.reduce(Qc,{}))}function ed(t){return function(e){return t&&t.indexOf(e)!==-1}}function wa(t){if(!V.QName_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'invalid character in qualified name "'+t+'"')}function vi(t,e){wa(e),t=t||null;var r=null,n=e;if(e.indexOf(":")>=0){var i=e.split(":");r=i[0],n=i[1]}if(r!==null&&t===null)throw new v(v.NAMESPACE_ERR,"prefix is non-null and namespace is null");if(r==="xml"&&t!==Ee.NAMESPACE.XML)throw new v(v.NAMESPACE_ERR,'prefix is "xml" and namespace is not the XML namespace');if((r==="xmlns"||e==="xmlns")&&t!==Ee.NAMESPACE.XMLNS)throw new v(v.NAMESPACE_ERR,'either qualifiedName or prefix is "xmlns" and namespace is not the XMLNS namespace');if(t===Ee.NAMESPACE.XMLNS&&r!=="xmlns"&&e!=="xmlns")throw new v(v.NAMESPACE_ERR,'namespace is the XMLNS namespace and neither qualifiedName nor prefix is "xmlns"');return[t,r,n]}function It(t,e){for(var r in t)St(t,r)&&(e[r]=t[r])}function me(t,e){var r=t.prototype;if(!(r instanceof e)){let n=function(){};n.prototype=e.prototype,n=new n,It(r,n),t.prototype=r=n}r.constructor!=t&&(typeof t!="function"&&console.error("unknown Class:"+t),r.constructor=t)}var ge={},ke=ge.ELEMENT_NODE=1,Ot=ge.ATTRIBUTE_NODE=2,gr=ge.TEXT_NODE=3,ya=ge.CDATA_SECTION_NODE=4,va=ge.ENTITY_REFERENCE_NODE=5,td=ge.ENTITY_NODE=6,ki=ge.PROCESSING_INSTRUCTION_NODE=7,Ei=ge.COMMENT_NODE=8,Nt=ge.DOCUMENT_NODE=9,ka=ge.DOCUMENT_TYPE_NODE=10,tt=ge.DOCUMENT_FRAGMENT_NODE=11,rd=ge.NOTATION_NODE=12,z=Ee.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 Ea(t,e){if(e.length<t.length)return Ea(e,t);var r=null;for(var n in t){if(t[n]!==e[n])return r;r=t[n]}return r}function ha(t){return t.guid||(t.guid=Math.random()),t.guid}function J(){}J.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++)Ci(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)}};J.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 Be(t,e){this._node=t,this._refresh=e,cn(this)}function cn(t){var e=t._node._inc||t._node.ownerDocument._inc;if(t._inc!==e){var r=t._refresh(t._node);if(Ma(t,"length",r.length),!t.$$length||r.length<t.$$length)for(var n=r.length;n in t;n++)St(t,n)&&delete t[n];It(r,t),t._inc=e}}Be.prototype.item=function(t){return cn(this),this[t]||null};me(Be,J);function Bt(){this._nsIndex=Object.create(null),this._noNsIndex=Object.create(null)}function xa(t,e){for(var r=0;r<t.length;){if(t[r]===e)return r;r++}}function xi(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 nd(t,e,r){var n=xi(t,e,!1),i=n&&n[r];return i||null}function id(t,e){xi(t,e.namespaceURI,!0)[e.localName]=e}function sd(t,e){var r=xi(t,e.namespaceURI,!1);r&&delete r[e.localName]}function ad(t,e,r,n){if(n?e[xa(e,n)]=r:(e[e.length]=r,e.length++),id(e,r),t){r.ownerElement=t;var i=t.ownerDocument;i&&(n&&Ta(i,t,n),od(i,t,r))}}function pa(t,e,r){var n=xa(e,r);if(n>=0){for(var i=e.length-1;n<=i;)e[n]=e[++n];if(e.length=i,sd(e,r),t){var s=t.ownerDocument;s&&Ta(s,t,r),r.ownerElement=null}}}Bt.prototype={length:0,item:J.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 v(v.INUSE_ATTRIBUTE_ERR);var r=nd(this,t.namespaceURI,t.localName);return r===t?t:(ad(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 v(v.NOT_FOUND_ERR,t);return pa(this._ownerElement,this,e),e},removeNamedItemNS:function(t,e){var r=this.getNamedItemNS(t,e);if(!r)throw new v(v.NOT_FOUND_ERR,t?t+" : "+e:e);return pa(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}};Bt.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 Aa(){}Aa.prototype={hasFeature:function(t,e){return!0},createDocument:function(t,e,r){var n=mr.XML_APPLICATION;t===Me.HTML?n=mr.XML_XHTML_APPLICATION:t===Me.SVG&&(n=mr.XML_SVG_IMAGE);var i=new Ue(fe,{contentType:n});if(i.implementation=this,i.childNodes=new J,i.doctype=r||null,r&&i.appendChild(r),e){var s=i.createElementNS(t,e);i.appendChild(s)}return i},createDocumentType:function(t,e,r,n){wa(t);var i=new hn(fe);return i.name=t,i.nodeName=t,i.publicId=e||"",i.systemId=r||"",i.internalSubset=n||"",i.childNodes=new J,i},createHTMLDocument:function(t){var e=new Ue(fe,{contentType:mr.HTML});if(e.implementation=this,e.childNodes=new J,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 i=e.createElement("title");i.appendChild(e.createTextNode(t)),n.appendChild(i)}r.appendChild(e.createElement("body"))}return e}};function I(t){pe(t)}I.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,i=r.other;if(n.nodeType!==i.nodeType)return!1;switch(n.nodeType){case n.DOCUMENT_TYPE_NODE:if(n.name!==i.name||n.publicId!==i.publicId||n.systemId!==i.systemId)return!1;break;case n.ELEMENT_NODE:if(n.namespaceURI!==i.namespaceURI||n.prefix!==i.prefix||n.localName!==i.localName||n.attributes.length!==i.attributes.length)return!1;for(var s=0;s<n.attributes.length;s++){var a=n.attributes.item(s),o=i.getAttributeNodeNS(a.namespaceURI,a.localName);if(!o)return!1;e.push({node:a,other:o})}break;case n.ATTRIBUTE_NODE:if(n.namespaceURI!==i.namespaceURI||n.localName!==i.localName||n.value!==i.value)return!1;break;case n.PROCESSING_INSTRUCTION_NODE:if(n.target!==i.target||n.data!==i.data)return!1;break;case n.TEXT_NODE:case n.CDATA_SECTION_NODE:case n.COMMENT_NODE:if(n.data!==i.data)return!1;break}if(n.childNodes.length!==i.childNodes.length)return!1;for(var s=n.childNodes.length-1;s>=0;s--)e.push({node:n.childNodes[s],other:i.childNodes[s]})}return!0},isSameNode:function(t){return this===t},insertBefore:function(t,e){return un(this,t,e)},replaceChild:function(t,e){un(this,t,e,Sa),e&&this.removeChild(e)},removeChild:function(t){return Ca(this,t)},appendChild:function(t){return this.insertBefore(t,null)},hasChildNodes:function(){return this.firstChild!=null},cloneNode:function(t){return Ia(this.ownerDocument||this,this,t)},normalize:function(){ae(this,null,{enter:function(t){for(var e=t.firstChild;e;){var r=e.nextSibling;if(r!==null&&r.nodeType===gr&&e.nodeType===gr){for(var n=[],i=r;i!==null&&i.nodeType===gr;)n.push(i.data),i=i.nextSibling;for(var s=e.nextSibling;s!==i;){var a=s.nextSibling;s.parentNode=null,s.previousSibling=null,s.nextSibling=null,s=a}e.nextSibling=i,i!==null?i.previousSibling=e:t.lastChild=e,e.appendData(n.join("")),Ai(t.ownerDocument,t),e=i}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(St(r,n)&&r[n]===t)return n}e=e.nodeType==Ot?e.ownerDocument:e.parentNode}return null},lookupNamespaceURI:function(t){for(var e=this;e;){var r=e._nsMap;if(r&&St(r,t))return r[t];e=e.nodeType==Ot?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,i=null;if(e instanceof pt&&(n=e,e=n.ownerElement),r instanceof pt&&(i=r,r=i.ownerElement,n&&e&&r===e))for(var s=0,a;a=r.attributes[s];s++){if(a===n)return z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+z.DOCUMENT_POSITION_PRECEDING;if(a===i)return z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+z.DOCUMENT_POSITION_FOLLOWING}if(!e||!r||r.ownerDocument!==e.ownerDocument)return z.DOCUMENT_POSITION_DISCONNECTED+z.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC+(ha(r.ownerDocument)>ha(e.ownerDocument)?z.DOCUMENT_POSITION_FOLLOWING:z.DOCUMENT_POSITION_PRECEDING);if(i&&e===r)return z.DOCUMENT_POSITION_CONTAINS+z.DOCUMENT_POSITION_PRECEDING;if(n&&e===r)return z.DOCUMENT_POSITION_CONTAINED_BY+z.DOCUMENT_POSITION_FOLLOWING;for(var o=[],u=e.parentNode;u;){if(!i&&u===r)return z.DOCUMENT_POSITION_CONTAINED_BY+z.DOCUMENT_POSITION_FOLLOWING;o.push(u),u=u.parentNode}o.reverse();for(var l=[],c=r.parentNode;c;){if(!n&&c===e)return z.DOCUMENT_POSITION_CONTAINS+z.DOCUMENT_POSITION_PRECEDING;l.push(c),c=c.parentNode}l.reverse();var d=Ea(o,l);for(var f in d.childNodes){var h=d.childNodes[f];if(h===r)return z.DOCUMENT_POSITION_FOLLOWING;if(h===e)return z.DOCUMENT_POSITION_PRECEDING;if(l.indexOf(h)>=0)return z.DOCUMENT_POSITION_FOLLOWING;if(o.indexOf(h)>=0)return z.DOCUMENT_POSITION_PRECEDING}return 0}};function Da(t){return t=="<"&&"<"||t==">"&&">"||t=="&"&&"&"||t=='"'&&"""||"&#"+t.charCodeAt()+";"}It(ge,I);It(ge,I.prototype);It(z,I);It(z,I.prototype);function ln(t,e){ae(t,null,{enter:function(r){return e(r)?ae.STOP:!0}})}function ae(t,e,r){for(var n=[{node:t,context:e,phase:ae.ENTER}];n.length>0;){var i=n.pop();if(i.phase===ae.ENTER){var s=r.enter(i.node,i.context);if(s===ae.STOP)return ae.STOP;if(n.push({node:i.node,context:s,phase:ae.EXIT}),s==null)continue;for(var a=i.node.lastChild;a;)n.push({node:a,context:s,phase:ae.ENTER}),a=a.previousSibling}else r.exit&&r.exit(i.node,i.context)}}ae.STOP=Symbol("walkDOM.STOP");ae.ENTER=0;ae.EXIT=1;function Ue(t,e){pe(t);var r=e||{};this.ownerDocument=this,this.contentType=r.contentType||mr.XML_APPLICATION,this.type=Yc(this.contentType)?"html":"xml"}function od(t,e,r){t&&t._inc++;var n=r.namespaceURI;n===Me.XMLNS&&(e._nsMap[r.prefix?r.localName:""]=r.value)}function Ta(t,e,r,n){t&&t._inc++;var i=r.namespaceURI;i===Me.XMLNS&&delete e._nsMap[r.prefix?r.localName:""]}function Ai(t,e,r){if(t&&t._inc){t._inc++;var n=e.childNodes;if(r&&!r.nextSibling)n[n.length++]=r;else{for(var i=e.firstChild,s=0;i;)n[s++]=i,i=i.nextSibling;n.length=s,delete n[n.length]}}}function Ca(t,e){if(t!==e.parentNode)throw new v(v.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,Ai(t.ownerDocument,t),e.parentNode=null,e.previousSibling=null,e.nextSibling=null,e}function ld(t){return t&&(t.nodeType===I.DOCUMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.ELEMENT_NODE)}function ud(t){return t&&(t.nodeType===I.CDATA_SECTION_NODE||t.nodeType===I.COMMENT_NODE||t.nodeType===I.DOCUMENT_FRAGMENT_NODE||t.nodeType===I.DOCUMENT_TYPE_NODE||t.nodeType===I.ELEMENT_NODE||t.nodeType===I.PROCESSING_INSTRUCTION_NODE||t.nodeType===I.TEXT_NODE)}function rt(t){return t&&t.nodeType===I.DOCUMENT_TYPE_NODE}function Pe(t){return t&&t.nodeType===I.ELEMENT_NODE}function Na(t){return t&&t.nodeType===I.TEXT_NODE}function ma(t,e){var r=t.childNodes||[];if(Ie(r,Pe)||rt(e))return!1;var n=Ie(r,rt);return!(e&&n&&r.indexOf(n)>r.indexOf(e))}function ga(t,e){var r=t.childNodes||[];function n(s){return Pe(s)&&s!==e}if(Ie(r,n))return!1;var i=Ie(r,rt);return!(e&&i&&r.indexOf(i)>r.indexOf(e))}function cd(t,e,r){if(!ld(t))throw new v(v.HIERARCHY_REQUEST_ERR,"Unexpected parent node type "+t.nodeType);if(r&&r.parentNode!==t)throw new v(v.NOT_FOUND_ERR,"child not in parent");if(!ud(e)||rt(e)&&t.nodeType!==I.DOCUMENT_NODE)throw new v(v.HIERARCHY_REQUEST_ERR,"Unexpected node type "+e.nodeType+" for parent node type "+t.nodeType)}function dd(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Pe);if(s.length>1||Ie(i,Na))throw new v(v.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!ma(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Pe(e)&&!ma(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(rt(e)){if(Ie(n,rt))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=Ie(n,Pe);if(r&&n.indexOf(a)<n.indexOf(r))throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element");if(!r&&a)throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can not be appended since element is present")}}function Sa(t,e,r){var n=t.childNodes||[],i=e.childNodes||[];if(e.nodeType===I.DOCUMENT_FRAGMENT_NODE){var s=i.filter(Pe);if(s.length>1||Ie(i,Na))throw new v(v.HIERARCHY_REQUEST_ERR,"More than one element or text in fragment");if(s.length===1&&!ga(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Element in fragment can not be inserted before doctype")}if(Pe(e)&&!ga(t,r))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one element can be added and only after doctype");if(rt(e)){if(Ie(n,function(u){return rt(u)&&u!==r}))throw new v(v.HIERARCHY_REQUEST_ERR,"Only one doctype is allowed");var a=Ie(n,Pe);if(r&&n.indexOf(a)<n.indexOf(r))throw new v(v.HIERARCHY_REQUEST_ERR,"Doctype can only be inserted before an element")}}function un(t,e,r,n){cd(t,e,r),t.nodeType===I.DOCUMENT_NODE&&(n||dd)(t,e,r);var i=e.parentNode;if(i&&i.removeChild(e),e.nodeType===tt){var s=e.firstChild;if(s==null)return e;var a=e.lastChild}else s=a=e;var o=r?r.previousSibling:t.lastChild;s.previousSibling=o,a.nextSibling=r,o?o.nextSibling=s:t.firstChild=s,r==null?t.lastChild=a:r.previousSibling=a;do s.parentNode=t;while(s!==a&&(s=s.nextSibling));return Ai(t.ownerDocument||t,t,e),e.nodeType==tt&&(e.firstChild=e.lastChild=null),e}Ue.prototype={implementation:null,nodeName:"#document",nodeType:Nt,doctype:null,documentElement:null,_inc:1,insertBefore:function(t,e){if(t.nodeType===tt){for(var r=t.firstChild;r;){var n=r.nextSibling;this.insertBefore(r,e),r=n}return t}return un(this,t,e),t.ownerDocument=this,this.documentElement===null&&t.nodeType===ke&&(this.documentElement=t),t},removeChild:function(t){var e=Ca(this,t);return e===this.documentElement&&(this.documentElement=null),e},replaceChild:function(t,e){un(this,t,e,Sa),t.ownerDocument=this,e&&this.removeChild(e),Pe(t)&&(this.documentElement=t)},importNode:function(t,e){return fd(this,t,e)},getElementById:function(t){var e=null;return ln(this.documentElement,function(r){if(r.nodeType==ke&&r.getAttribute("id")==t)return e=r,!0}),e},createElement:function(t){var e=new je(fe);e.ownerDocument=this,this.type==="html"&&(t=t.toLowerCase()),Gc(this.contentType)&&(e.namespaceURI=Me.HTML),e.nodeName=t,e.tagName=t,e.localName=t,e.childNodes=new J;var r=e.attributes=new Bt;return r._ownerElement=e,e},createDocumentFragment:function(){var t=new Mt(fe);return t.ownerDocument=this,t.childNodes=new J,t},createTextNode:function(t){var e=new br(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createComment:function(t){var e=new dn(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createCDATASection:function(t){if(t.indexOf("]]>")!==-1)throw new v(v.INVALID_CHARACTER_ERR,'data contains "]]>"');var e=new fn(fe);return e.ownerDocument=this,e.childNodes=new J,e.appendData(t),e},createProcessingInstruction:function(t,e){var r=new mn(fe);return r.ownerDocument=this,r.childNodes=new J,r.nodeName=r.target=t,r.nodeValue=r.data=e,r},createAttribute:function(t){if(!V.QName_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'invalid character in name "'+t+'"');return this.type==="html"&&(t=t.toLowerCase()),this._createAttribute(t)},_createAttribute:function(t){var e=new pt(fe);return e.ownerDocument=this,e.childNodes=new J,e.name=t,e.nodeName=t,e.localName=t,e.specified=!0,e},createEntityReference:function(t){if(!V.Name_exact.test(t))throw new v(v.INVALID_CHARACTER_ERR,'not a valid xml name "'+t+'"');if(this.type==="html")throw new v("document is an html document",ce.NotSupportedError);var e=new pn(fe);return e.ownerDocument=this,e.childNodes=new J,e.nodeName=t,e},createElementNS:function(t,e){var r=vi(t,e),n=new je(fe),i=n.attributes=new Bt;return n.childNodes=new J,n.ownerDocument=this,n.nodeName=e,n.tagName=e,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],i._ownerElement=n,n},createAttributeNS:function(t,e){var r=vi(t,e),n=new pt(fe);return n.ownerDocument=this,n.childNodes=new J,n.nodeName=e,n.name=e,n.specified=!0,n.namespaceURI=r[0],n.prefix=r[1],n.localName=r[2],n}};me(Ue,I);function je(t){pe(t),this._nsMap=Object.create(null)}je.prototype={nodeType:ke,attributes:null,getQualifiedName:function(){return this.prefix?this.prefix+":"+this.localName:this.localName},_isInHTMLDocumentAndNamespace:function(){return this.ownerDocument.type==="html"&&this.namespaceURI===Me.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=vi(t,e),i=n[2],s=this.getAttributeNodeNS(t,i);s?s.value=s.nodeValue=""+r:(s=this.ownerDocument.createAttributeNS(t,e),s.value=s.nodeValue=""+r,this.setAttributeNode(s))},getAttributeNodeNS:function(t,e){return this.attributes.getNamedItemNS(t,e)},getElementsByClassName:function(t){var e=fa(t);return new Be(this,function(r){var n=[];return e.length>0&&ln(r,function(i){if(i!==r&&i.nodeType===ke){var s=i.getAttribute("class");if(s){var a=t===s;if(!a){var o=fa(s);a=e.every(ed(o))}a&&n.push(i)}}}),n})},getElementsByTagName:function(t){var e=(this.nodeType===Nt?this:this.ownerDocument).type==="html",r=t.toLowerCase();return new Be(this,function(n){var i=[];return ln(n,function(s){if(!(s===n||s.nodeType!==ke))if(t==="*")i.push(s);else{var a=s.getQualifiedName(),o=e&&s.namespaceURI===Me.HTML?r:t;a===o&&i.push(s)}}),i})},getElementsByTagNameNS:function(t,e){return new Be(this,function(r){var n=[];return ln(r,function(i){i!==r&&i.nodeType===ke&&(t==="*"||i.namespaceURI===t)&&(e==="*"||i.localName==e)&&n.push(i)}),n})}};Ue.prototype.getElementsByClassName=je.prototype.getElementsByClassName;Ue.prototype.getElementsByTagName=je.prototype.getElementsByTagName;Ue.prototype.getElementsByTagNameNS=je.prototype.getElementsByTagNameNS;me(je,I);function pt(t){pe(t),this.namespaceURI=null,this.prefix=null,this.ownerElement=null}pt.prototype.nodeType=Ot;me(pt,I);function nt(t){pe(t)}nt.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),i=this.data.substring(t+e);r=n+r+i,this.nodeValue=this.data=r,this.length=r.length}};me(nt,I);function br(t){pe(t)}br.prototype={nodeName:"#text",nodeType:gr,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}};me(br,nt);function dn(t){pe(t)}dn.prototype={nodeName:"#comment",nodeType:Ei};me(dn,nt);function fn(t){pe(t)}fn.prototype={nodeName:"#cdata-section",nodeType:ya};me(fn,br);function hn(t){pe(t)}hn.prototype.nodeType=ka;me(hn,I);function Di(t){pe(t)}Di.prototype.nodeType=rd;me(Di,I);function Ti(t){pe(t)}Ti.prototype.nodeType=td;me(Ti,I);function pn(t){pe(t)}pn.prototype.nodeType=va;me(pn,I);function Mt(t){pe(t)}Mt.prototype.nodeName="#document-fragment";Mt.prototype.nodeType=tt;me(Mt,I);function mn(t){pe(t)}mn.prototype.nodeType=ki;me(mn,nt);function Oa(){}Oa.prototype.serializeToString=function(t,e){return Ba.call(t,e)};I.prototype.toString=Ba;function Ba(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===Nt&&this.documentElement||this,i=n.prefix,s=n.namespaceURI;if(s&&i==null){var i=n.lookupPrefix(s);if(i==null)var a=[{namespace:s,prefix:null}]}return Ci(this,r,a,e),r.join("")}function ba(t,e,r){var n=t.prefix||"",i=t.namespaceURI;if(!i||n==="xml"&&i===Me.XML||i===Me.XMLNS)return!1;for(var s=r.length;s--;){var a=r[s];if(a.prefix===n)return a.namespace!==i}return!0}function on(t,e,r,n){if(n&&!V.QName_exact.test(e))throw new v('The attribute name "'+e+'" is not a valid XML QName',ce.InvalidStateError);t.push(" ",e,'="',r.replace(/[<>&"\t\n\r]/g,Da),'"')}function Ci(t,e,r,n){r||(r=[]);var i=n.nodeFilter,s=n.requireWellFormed,a=n.splitCDATASections,o=t.nodeType===Nt?t:t.ownerDocument,u=o.type==="html";ae(t,{ns:r},{enter:function(l,c){var d=c.ns;if(i)if(l=i(l),l){if(typeof l=="string")return e.push(l),null}else return null;switch(l.nodeType){case ke:var f=l.attributes,h=f.length,p=l.tagName,m=p;if(!u&&!l.prefix&&l.namespaceURI){for(var g,_=0;_<f.length;_++)if(f.item(_).name==="xmlns"){g=f.item(_).value;break}if(!g)for(var w=d.length-1;w>=0;w--){var y=d[w];if(y.prefix===""&&y.namespace===l.namespaceURI){g=y.namespace;break}}if(g!==l.namespaceURI)for(var w=d.length-1;w>=0;w--){var y=d[w];if(y.namespace===l.namespaceURI){y.prefix&&(m=y.prefix+":"+p);break}}}if(s&&!V.QName_exact.test(m))throw new v('The element name "'+m+'" is not a valid XML QName',ce.InvalidStateError);e.push("<",m);for(var k=d.slice(),S=0;S<h;S++){var R=f.item(S);R.prefix=="xmlns"?k.push({prefix:R.localName,namespace:R.value}):R.nodeName=="xmlns"&&k.push({prefix:"",namespace:R.value})}for(var S=0;S<h;S++){var R=f.item(S);if(ba(R,u,k)){var F=R.prefix||"",re=R.namespaceURI;on(e,F?"xmlns:"+F:"xmlns",re,s),k.push({prefix:F,namespace:re})}var ne=i?i(R):R;ne&&(typeof ne=="string"?e.push(ne):on(e,ne.name,ne.value,s))}if(p===m&&ba(l,u,k)){var $e=l.prefix||"",re=l.namespaceURI;on(e,$e?"xmlns:"+$e:"xmlns",re,s),k.push({prefix:$e,namespace:re})}var Z=!l.firstChild;if(Z&&(u||l.namespaceURI===Me.HTML)&&(Z=Zc(p)),Z)return e.push("/>"),null;if(e.push(">"),u&&Xc(p)){for(var de=l.firstChild;de;)de.data?e.push(de.data):Ci(de,e,k.slice(),n),de=de.nextSibling;return e.push("</",m,">"),null}return{ns:k,tag:m};case Nt:case tt:if(s&&l.nodeType===Nt&&l.documentElement==null)throw new v("The Document has no documentElement",ce.InvalidStateError);return{ns:d};case Ot:return on(e,l.name,l.value,s),null;case gr:if(s&&V.InvalidChar.test(l.data))throw new v("The Text node data contains characters outside the XML Char production",ce.InvalidStateError);return e.push(l.data.replace(/[<&>]/g,Da)),null;case ya:if(s&&l.data.indexOf("]]>")!==-1)throw new v('The CDATASection data contains "]]>"',ce.InvalidStateError);return a?e.push(V.CDATA_START,l.data.replace(/]]>/g,"]]]]><![CDATA[>"),V.CDATA_END):e.push(V.CDATA_START,l.data,V.CDATA_END),null;case Ei:if(s){if(V.InvalidChar.test(l.data))throw new v("The comment node data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("--")!==-1||l.data[l.data.length-1]==="-")throw new v('The comment node data contains "--" or ends with "-"',ce.InvalidStateError)}return e.push(V.COMMENT_START,l.data,V.COMMENT_END),null;case ka:var ye=l.publicId,P=l.systemId;if(s){if(!V.Name_exact.test(l.name))throw new v('The doctype name "'+l.name+'" is not a valid XML Name',ce.InvalidStateError);if(ye&&!V.PubidLiteral_match.test(ye))throw new v("DocumentType publicId is not a valid PubidLiteral",ce.InvalidStateError);if(P&&P!=="."&&!V.SystemLiteral_match.test(P))throw new v("DocumentType systemId is not a valid SystemLiteral",ce.InvalidStateError);if(l.internalSubset&&l.internalSubset.indexOf("]>")!==-1)throw new v('DocumentType internalSubset contains "]>"',ce.InvalidStateError)}return e.push(V.DOCTYPE_DECL_START," ",l.name),ye?(e.push(" ",V.PUBLIC," ",ye),P&&P!=="."&&e.push(" ",P)):P&&P!=="."&&e.push(" ",V.SYSTEM," ",P),l.internalSubset&&e.push(" [",l.internalSubset,"]"),e.push(">"),null;case ki:if(s){if(!V.NCName_exact.test(l.target)||l.target.toLowerCase()==="xml")throw new v('The processing instruction target "'+l.target+'" is not a valid XML NCName or is reserved',ce.InvalidStateError);if(V.InvalidChar.test(l.data))throw new v("The ProcessingInstruction data contains characters outside the XML Char production",ce.InvalidStateError);if(l.data.indexOf("?>")!==-1)throw new v('The ProcessingInstruction data contains "?>"',ce.InvalidStateError)}return e.push("<?",l.target," ",l.data,"?>"),null;case va:if(s&&!V.Name_exact.test(l.nodeName))throw new v('The entity reference name "'+l.nodeName+'" is not a valid XML Name',ce.InvalidStateError);return e.push("&",l.nodeName,";"),null;default:return e.push("??",l.nodeName),null}},exit:function(l,c){c&&c.tag&&e.push("</",c.tag,">")}})}function fd(t,e,r){var n;return ae(e,null,{enter:function(i,s){var a=i.cloneNode(!1);a.ownerDocument=t,a.parentNode=null,s===null?n=a:s.appendChild(a);var o=i.nodeType===Ot||r;return o?a:null}}),n}function Ia(t,e,r){var n;return ae(e,null,{enter:function(i,s){var a=new i.constructor(fe);for(var o in i)if(St(i,o)){var u=i[o];typeof u!="object"&&u!=a[o]&&(a[o]=u)}i.childNodes&&(a.childNodes=new J),a.ownerDocument=t;var l=r;switch(a.nodeType){case ke:var c=i.attributes,d=a.attributes=new Bt,f=c.length;d._ownerElement=a;for(var h=0;h<f;h++)a.setAttributeNode(Ia(t,c.item(h),!0));break;case Ot:l=!0}return s!==null?s.appendChild(a):n=a,l?a:null}}),n}function Ma(t,e,r){t[e]=r}function yi(t){for(var e=[],r=t.firstChild;r;)r.nodeType===ke&&e.push(r),r=r.nextSibling;return e}try{Object.defineProperty&&(Object.defineProperty(Be.prototype,"length",{get:function(){return cn(this),this.$$length}}),Object.defineProperty(I.prototype,"textContent",{get:function(){if(this.nodeType===ke||this.nodeType===tt){var t=[];return ae(this,null,{enter:function(e){if(e.nodeType===ke||e.nodeType===tt)return!0;if(e.nodeType===ki||e.nodeType===Ei)return null;t.push(e.nodeValue)}}),t.join("")}return this.nodeValue},set:function(t){switch(this.nodeType){case ke:case tt: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(nt.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(nt.prototype,"nodeValue",{get:function(){return this.data},set:function(t){this.data=t},enumerable:!0,configurable:!0}),Object.defineProperty(je.prototype,"children",{get:function(){return new Be(this,yi)}}),Object.defineProperty(Ue.prototype,"children",{get:function(){return new Be(this,yi)}}),Object.defineProperty(Mt.prototype,"children",{get:function(){return new Be(this,yi)}}),Ma=function(t,e,r){t["$$"+e]=r})}catch{}H._updateLiveList=cn;H.Attr=pt;H.CDATASection=fn;H.CharacterData=nt;H.Comment=dn;H.Document=Ue;H.DocumentFragment=Mt;H.DocumentType=hn;H.DOMImplementation=Aa;H.Element=je;H.Entity=Ti;H.EntityReference=pn;H.LiveNodeList=Be;H.NamedNodeMap=Bt;H.Node=I;H.NodeList=J;H.Notation=Di;H.Text=br;H.ProcessingInstruction=mn;H.walkDOM=ae;H.XMLSerializer=Oa});var La=Ge(_r=>{"use strict";var Ra=ht().freeze;_r.XML_ENTITIES=Ra({amp:"&",apos:"'",gt:">",lt:"<",quot:'"'});_r.HTML_ENTITIES=Ra({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"});_r.entityMap=_r.HTML_ENTITIES});var Ha=Ge(bn=>{"use strict";var qt=ht(),N=wi(),Pa=ur(),hd=qt.isHTMLEscapableRawTextElement,pd=qt.isHTMLMimeType,md=qt.isHTMLRawTextElement,vr=qt.hasOwn,Fa=qt.NAMESPACE,gd=Pa.ParseError,bd=Pa.DOMException,Rt=0,it=1,Lt=2,wr=3,Ft=4,$t=5,yr=6,gn=7;function Ua(){}Ua.prototype={parse:function(t,e,r){var n=this.domBuilder;n.startDocument(),vd(e,e=Object.create(null)),_d(t,e,r,n,this.errorHandler),n.endDocument()}};var Si=/&#?\w+;?/g;function _d(t,e,r,n,i){var s=pd(n.mimeType);t.indexOf(N.UNICODE_REPLACEMENT_CHARACTER)>=0&&i.warning("Unicode replacement character detected, source encoding issues?");function a(L){if(L>65535){L-=65536;var ve=55296+(L>>10),qr=56320+(L&1023);return String.fromCharCode(ve,qr)}else return String.fromCharCode(L)}function o(L){var ve=L[L.length-1]===";"?L:L+";";if(!s&&ve!==L)return i.error("EntityRef: expecting ;"),L;var qr=N.Reference.exec(ve);if(!qr||qr[0].length!==ve.length)return i.error("entity not matching Reference production: "+L),L;var Pr=ve.slice(1,-1);return vr(r,Pr)?r[Pr]:Pr.charAt(0)==="#"?a(parseInt(Pr.substring(1).replace("x","0x"))):(i.error("entity not found:"+L),L)}function u(L){if(L>g){var ve=t.substring(g,L).replace(Si,o);f&&h(g),n.characters(ve,0,L-g),g=L}}var l=0,c=0,d=/\r\n?|\n|$/g,f=n.locator;function h(L,ve){for(;L>=c&&(ve=d.exec(t));)l=c,c=ve.index+ve[0].length,f.lineNumber++;f.columnNumber=L-l+1}for(var p=[{currentNSMap:e}],m=[],g=0;;){try{var _=t.indexOf("<",g);if(_<0){if(!s&&m.length>0)return i.fatalError("unclosed xml tag(s): "+m.join(", "));if(!t.substring(g).match(/^\s*$/)){var w=n.doc,y=w.createTextNode(t.substring(g));if(w.documentElement)return i.error("Extra content at the end of the document");w.appendChild(y),n.currentElement=y}return}if(_>g){var k=t.substring(g,_);!s&&m.length===0&&(k=k.replace(new RegExp(N.S_OPT.source,"g"),""),k&&i.error("Unexpected content outside root element: '"+k+"'")),u(_)}switch(t.charAt(_+1)){case"/":var O=t.indexOf(">",_+2),S=t.substring(_+2,O>0?O:void 0);if(!S)return i.fatalError("end tag name missing");var R=N.reg("^",N.QName_group,N.S_OPT,"$"),F=O>0&&R.exec(S);if(!F){var re=O>0&&N.reg("^",N.QName_group).exec(S);if(s&&re)i.warning('end tag name contains invalid trailing characters: "'+S+'"'),F=re;else if(re&&new RegExp(R.source,R.flags+"m").test(S))i.error('end tag name is followed by a line break and trailing content: "'+S+'"'),F=re;else return i.fatalError('end tag name contains invalid characters: "'+S+'"')}if(!n.currentElement&&!n.doc.documentElement)return;var ne=m[m.length-1]||n.currentElement.tagName||n.doc.documentElement.tagName||"";if(ne!==F[1]){var $e=F[1].toLowerCase();if(!s||ne.toLowerCase()!==$e)return i.fatalError('Opening and ending tag mismatch: "'+ne+'" != "'+S+'"')}var Z=p.pop();m.pop();var de=Z.localNSMap;if(n.endElement(Z.uri,Z.localName,ne),de)for(var ye in de)vr(de,ye)&&n.endPrefixMapping(ye);O++;break;case"?":f&&h(_),O=Ed(t,_,n,i);break;case"!":f&&h(_),O=za(t,_,n,i,s);break;default:f&&h(_);var P=new Va,Y=p[p.length-1].currentNSMap,O=wd(t,_,P,Y,o,i,s),hs=P.length;if(P.closed||(s&&qt.isHTMLVoidElement(P.tagName)?P.closed=!0:m.push(P.tagName)),f&&hs){for(var ul=$a(f,{}),Wn=0;Wn<hs;Wn++){var ps=P[Wn];h(ps.offset),ps.locator=$a(f,{})}n.locator=ul,qa(P,n,Y)&&p.push(P),n.locator=f}else qa(P,n,Y)&&p.push(P);s&&!P.closed?O=yd(t,O,P.tagName,o,n):O++}}catch(L){if(L instanceof gd)throw L;if(L instanceof bd)return i.fatalError("Error constructing the DOM: "+L.name+": "+L.message,L);i.error("element parse error: "+L),O=-1}O>g?g=O:u(Math.max(_,g)+1)}}function $a(t,e){return e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber,e}function wd(t,e,r,n,i,s,a){function o(h,p,m){if(vr(r.attributeNames,h))return s.fatalError("Attribute "+h+" redefined");if(!a&&p.indexOf("<")>=0)return s.fatalError("Unescaped '<' not allowed in attributes values");r.addValue(h,p.replace(/[\t\n\r]/g," ").replace(Si,i),m)}for(var u,l,c=++e,d=Rt;;){var f=t.charAt(c);if(d===Rt&&f==="<")throw new Error("unexpected < in tag name: "+t.slice(e,c));switch(f){case"=":if(d===it)u=t.slice(e,c),d=wr;else if(d===Lt)d=wr;else throw new Error("attribute equal must after attrName");break;case"'":case'"':if(d===wr||d===it)if(d===it&&(s.warning('attribute value must after "="'),u=t.slice(e,c)),e=c+1,c=t.indexOf(f,e),c>0)l=t.slice(e,c),o(u,l,e-1),d=$t;else throw new Error("attribute value no end '"+f+"' match");else if(d==Ft)l=t.slice(e,c),o(u,l,e),s.warning('attribute "'+u+'" missed start quot('+f+")!!"),e=c+1,d=$t;else throw new Error('attribute value must after "="');break;case"/":switch(d){case Rt:r.setTagName(t.slice(e,c));case $t:case yr:case gn:d=gn,r.closed=!0;case Ft:case it:break;case Lt:r.closed=!0;break;default:throw new Error("attribute invalid close char('/')")}break;case"":return s.error("unexpected end of input"),d==Rt&&r.setTagName(t.slice(e,c)),c;case">":switch(d){case Rt:r.setTagName(t.slice(e,c));case $t:case yr:case gn:break;case Ft:case it:l=t.slice(e,c),l.slice(-1)==="/"&&(r.closed=!0,l=l.slice(0,-1));case Lt:d===Lt&&(l=u),d==Ft?(s.warning('attribute "'+l+'" missed quot(")!'),o(u,l,e)):(a||s.warning('attribute "'+l+'" missed value!! "'+l+'" instead!!'),o(l,l,e));break;case wr:if(!a)return s.fatalError(`AttValue: ' or " expected`)}return c;case"\x80":f=" ";default:if(f<=" ")switch(d){case Rt:r.setTagName(t.slice(e,c)),d=yr;break;case it:u=t.slice(e,c),d=Lt;break;case Ft:var l=t.slice(e,c);s.warning('attribute "'+l+'" missed quot(")!!'),o(u,l,e);case $t:d=yr;break}else switch(d){case Lt:a||s.warning('attribute "'+u+'" missed value!! "'+u+'" instead2!!'),o(u,u,e),e=c,d=it;break;case $t:s.warning('attribute space is required"'+u+'"!!');case yr:d=it,e=c;break;case wr:d=Ft,e=c;break;case gn:throw new Error("elements closed character '/' and '>' must be connected to")}}c++}}function qa(t,e,r){for(var n=t.tagName,i=null,d=t.length;d--;){var s=t[d],a=s.qName,o=s.value,f=a.indexOf(":");if(f>0)var u=s.prefix=a.slice(0,f),l=a.slice(f+1),c=u==="xmlns"&&l;else l=a,u=null,c=a==="xmlns"&&"";s.localName=l,c!==!1&&(i==null&&(i=Object.create(null),r=Object.create(r)),r[c]=i[c]=o,s.uri=Fa.XMLNS,e.startPrefixMapping(c,o))}for(var d=t.length;d--;)s=t[d],s.prefix&&(s.prefix==="xml"&&(s.uri=Fa.XML),s.prefix!=="xmlns"&&(s.uri=r[s.prefix]));var f=n.indexOf(":");f>0?(u=t.prefix=n.slice(0,f),l=t.localName=n.slice(f+1)):(u=null,l=t.localName=n);var h=t.uri=r[u||""];if(e.startElement(h,l,n,t),t.closed){if(e.endElement(h,l,n),i)for(u in i)vr(i,u)&&e.endPrefixMapping(u)}else return t.currentNSMap=r,t.localNSMap=i,!0}function yd(t,e,r,n,i){var s=hd(r);if(s||md(r)){var a=new RegExp("</"+r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+">","ig");a.lastIndex=e;var o=a.exec(t),u=o?o.index:-1;if(u<0)return e+1;var l=t.substring(e+1,u);return s&&(l=l.replace(Si,n)),i.characters(l,0,l.length),u}return e+1}function vd(t,e){for(var r in t)vr(t,r)&&(e[r]=t[r])}function ja(t,e){var r=e;function n(c){return c=c||0,t.charAt(r+c)}function i(c){c=c||1,r+=c}function s(){for(var c=0;r<t.length;){var d=n();if(d!==" "&&d!==`
|
|
3
|
+
`&&d!==" "&&d!=="\r")return c;c++,i()}return-1}function a(){return t.substring(r)}function o(c){return t.substring(r,r+c.length)===c}function u(c){return t.substring(r,r+c.length).toUpperCase()===c.toUpperCase()}function l(c){var d=N.reg("^",c),f=d.exec(a());return f?(i(f[0].length),f[0]):null}return{char:n,getIndex:function(){return r},getMatch:l,getSource:function(){return t},skip:i,skipBlanks:s,substringFromIndex:a,substringStartsWith:o,substringStartsWithCaseInsensitive:u}}function kd(t,e){function r(o,u){var l=N.PI.exec(o.substringFromIndex());return l?l[1].toLowerCase()==="xml"?u.fatalError("xml declaration is only allowed at the start of the document, but found at position "+o.getIndex()):(o.skip(l[0].length),l[0]):u.fatalError("processing instruction is not well-formed at position "+o.getIndex())}var n=t.getSource();if(t.char()==="["){t.skip(1);for(var i=t.getIndex();t.getIndex()<n.length;){if(t.skipBlanks(),t.char()==="]"){var s=n.substring(i,t.getIndex());return t.skip(1),s}var a=null;if(t.char()==="<"&&t.char(1)==="!")switch(t.char(2)){case"E":t.char(3)==="L"?a=t.getMatch(N.elementdecl):t.char(3)==="N"&&(a=t.getMatch(N.EntityDecl));break;case"A":a=t.getMatch(N.AttlistDecl);break;case"N":a=t.getMatch(N.NotationDecl);break;case"-":a=t.getMatch(N.Comment);break}else if(t.char()==="<"&&t.char(1)==="?")a=r(t,e);else if(t.char()==="%")a=t.getMatch(N.PEReference);else return e.fatalError("Error detected in Markup declaration");if(!a)return e.fatalError("Error in internal subset at position "+t.getIndex())}return e.fatalError("doctype internal subset is not well-formed, missing ]")}}function za(t,e,r,n,i){var s=ja(t,e);switch(i?s.char(2).toUpperCase():s.char(2)){case"-":var a=s.getMatch(N.Comment);return a?(r.comment(a,N.COMMENT_START.length,a.length-N.COMMENT_START.length-N.COMMENT_END.length),s.getIndex()):n.fatalError("comment is not well-formed at position "+s.getIndex());case"[":var o=s.getMatch(N.CDSect);return o?!i&&!r.currentElement?n.fatalError("CDATA outside of element"):(r.startCDATA(),r.characters(o,N.CDATA_START.length,o.length-N.CDATA_START.length-N.CDATA_END.length),r.endCDATA(),s.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 "+s.getIndex());if(i?!s.substringStartsWithCaseInsensitive(N.DOCTYPE_DECL_START):!s.substringStartsWith(N.DOCTYPE_DECL_START))return n.fatalError("Expected "+N.DOCTYPE_DECL_START+" at position "+s.getIndex());if(s.skip(N.DOCTYPE_DECL_START.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+N.DOCTYPE_DECL_START+" at position "+s.getIndex());var u={name:void 0,publicId:void 0,systemId:void 0,internalSubset:void 0};if(u.name=s.getMatch(N.Name),!u.name)return n.fatalError("doctype name missing or contains unexpected characters at position "+s.getIndex());if(i&&u.name.toLowerCase()!=="html"&&n.warning("Unexpected DOCTYPE in HTML document at position "+s.getIndex()),s.skipBlanks(),s.substringStartsWith(N.PUBLIC)||s.substringStartsWith(N.SYSTEM)){var l=N.ExternalID_match.exec(s.substringFromIndex());if(!l)return n.fatalError("doctype external id is not well-formed at position "+s.getIndex());l.groups.SystemLiteralOnly!==void 0?u.systemId=l.groups.SystemLiteralOnly:(u.systemId=l.groups.SystemLiteral,u.publicId=l.groups.PubidLiteral),s.skip(l[0].length)}else if(i&&s.substringStartsWithCaseInsensitive(N.SYSTEM)){if(s.skip(N.SYSTEM.length),s.skipBlanks()<1)return n.fatalError("Expected whitespace after "+N.SYSTEM+" at position "+s.getIndex());if(u.systemId=s.getMatch(N.ABOUT_LEGACY_COMPAT_SystemLiteral),!u.systemId)return n.fatalError("Expected "+N.ABOUT_LEGACY_COMPAT+" in single or double quotes after "+N.SYSTEM+" at position "+s.getIndex())}return i&&u.systemId&&!N.ABOUT_LEGACY_COMPAT_SystemLiteral.test(u.systemId)&&n.warning("Unexpected doctype.systemId in HTML document at position "+s.getIndex()),i||(s.skipBlanks(),u.internalSubset=kd(s,n)),s.skipBlanks(),s.char()!==">"?n.fatalError("doctype not terminated with > at position "+s.getIndex()):(s.skip(1),r.startDTD(u.name,u.publicId,u.systemId,u.internalSubset),r.endDTD(),s.getIndex())}default:return n.fatalError('Not well-formed XML starting with "<!" at position '+e)}}function Ed(t,e,r,n){var i=t.substring(e).match(N.PI);if(!i)return n.fatalError("Invalid processing instruction starting at position "+e);if(i[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(!N.XMLDecl.test(t.substring(e)))return n.fatalError("xml declaration is not well-formed")}return r.processingInstruction(i[1],i[2]),e+i[0].length}function Va(){this.attributeNames=Object.create(null)}Va.prototype={setTagName:function(t){if(!N.QName_exact.test(t))throw new Error("invalid tagName:"+t);this.tagName=t},addValue:function(t,e,r){if(!N.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}};bn.XMLReader=Ua;bn.parseUtils=ja;bn.parseDoctypeCommentOrCData=za});var Ja=Ge(Ut=>{"use strict";var mt=ht(),xd=Ni(),Ad=ur(),Wa=La(),Dd=Ha(),Td=xd.DOMImplementation,Cd=mt.hasDefaultHTMLNamespace,Nd=mt.isHTMLMimeType,Sd=mt.isValidMimeType,Xa=mt.MIME_TYPE,Oi=mt.NAMESPACE,Ga=Ad.ParseError,Od=Dd.XMLReader;function Za(t){return t.replace(/\r[\n\u0085]/g,`
|
|
4
4
|
`).replace(/[\r\u0085\u2028\u2029]/g,`
|
|
5
|
-
`)}function
|
|
6
|
-
@#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function
|
|
7
|
-
`,s),s<0&&(s=t.length),n+=t.slice(a,s);continue}if(t.startsWith("/*",s)){let c=t.indexOf("*/",s+2);s=c<0?t.length:c+2,n+=t.slice(a,s);continue}if(o==="/"&&i){let c=!1;for(s++;s<t.length;){let d=t[s++];if(d==="\\"){s++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[s]??"")&&s<t.length;)s++;n+=t.slice(a,s),i=!1;continue}let u=o==="{"?t.slice(s).match(is):null;if(u){let c=u[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),s+=u[0].length,i=!1;continue}let l=t.slice(s).match(/^[A-Za-z_$][\w$]*/);if(l){r.add(l[0]),n+=l[0],s+=l[0].length,i=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(l[0]);continue}n+=o,s++,/\s/.test(o)||(i=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function ss(t,e,r=()=>null){let n=new Map,i=[],s=a=>{if(n.has(a))return n.get(a);if(!t.has(a))throw new Error(`Referenced Source attribute '${a}' does not exist`);if(i.includes(a))throw new Error(`Cyclic attribute dependency: ${[...i,a].join(" -> ")}`);i.push(a);try{let o=t.get(a),u=typeof a=="string"?Ye(o):null,l=e.get(a);if(u){let c=d=>d?s(d):e.get(a);if(u.expression){let d=jn(u.body);l=r(a,o,d,d.slots.map(c))}else l=Un(u.body,c),e.get(a)==null&&(l=null)}return n.set(a,l),l}finally{i.pop()}};return new Map([...t.keys()].map(a=>[a,s(a)]))}function zn(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,i=[],s=a=>{let o=Ye(a);if(!o)return;let u=[];o.expression?u.push(...jn(o.body).slots):Un(o.body,l=>(u.push(l),""));for(let l of u.filter(Boolean)){if(!r.has(l))throw new Error(`Referenced Source attribute '${l}' does not exist`);if(i.includes(l))throw new Error(`Cyclic attribute dependency: ${[...i,l].join(" -> ")}`);n.has(l)||(i.push(l),s(r.get(l)),i.pop(),n.add(l))}};return s(e),n}/*!
|
|
5
|
+
`)}function Ka(t){if(t=t||{},t.locator===void 0&&(t.locator=!0),this.assign=t.assign||mt.assign,this.domHandler=t.domHandler||wn,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||Za,this.locator=!!t.locator,this.xmlns=this.assign(Object.create(null),t.xmlns)}Ka.prototype.parseFromString=function(t,e){if(!Sd(e))throw new TypeError('DOMParser.parseFromString: the provided mimeType "'+e+'" is not valid.');var r=this.assign(Object.create(null),this.xmlns),n=Wa.XML_ENTITIES,i=r[""]||null;Cd(e)?(n=Wa.HTML_ENTITIES,i=Oi.HTML):e===Xa.XML_SVG_IMAGE&&(i=Oi.SVG),r[""]=i,r.xml=r.xml||Oi.XML;var s=new this.domHandler({mimeType:e,defaultNamespace:i,onError:this.onError}),a=this.locator?{}:void 0;this.locator&&s.setDocumentLocator(a);var o=new Od;o.errorHandler=s,o.domBuilder=s;var u=!mt.isHTMLMimeType(e);return u&&typeof t!="string"&&o.errorHandler.fatalError("source is not a string"),o.parse(this.normalizeLineEndings(String(t)),r,n),s.doc.documentElement||o.errorHandler.fatalError("missing root element"),s.doc};function wn(t){var e=t||{};this.mimeType=e.mimeType||Xa.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 Pt(t,e){e.lineNumber=t.lineNumber,e.columnNumber=t.columnNumber}wn.prototype={startDocument:function(){var t=new Td;this.doc=Nd(this.mimeType)?t.createHTMLDocument(!1):t.createDocument(this.defaultNamespace,"")},startElement:function(t,e,r,n){var i=this.doc,s=i.createElementNS(t,r||e),a=n.length;_n(this,s),this.currentElement=s,this.locator&&Pt(this.locator,s);for(var o=0;o<a;o++){var t=n.getURI(o),u=n.getValue(o),r=n.getQName(o),l=i.createAttributeNS(t,r);this.locator&&Pt(n.getLocator(o),l),l.value=l.nodeValue=u,s.setAttributeNode(l)}},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&&Pt(this.locator,r),_n(this,r)},ignorableWhitespace:function(t,e,r){},characters:function(t,e,r){if(t=Ya.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&&Pt(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=Ya.apply(this,arguments);var n=this.doc.createComment(t);this.locator&&Pt(this.locator,n),_n(this,n)},startCDATA:function(){this.cdata=!0},endCDATA:function(){this.cdata=!1},startDTD:function(t,e,r,n){var i=this.doc.implementation;if(i&&i.createDocumentType){var s=i.createDocumentType(t,e,r,n);this.locator&&Pt(this.locator,s),_n(this,s),this.doc.doctype=s}},reportError:function(t,e){if(typeof this.onError=="function")try{this.onError(t,e,this)}catch(r){throw new Ga("Reporting "+t+' "'+e+'" caused '+r,this.locator)}else console.error("[xmldom "+t+"] "+e,Bd(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 Ga(t,this.locator,e)}};function Bd(t){if(t)return`
|
|
6
|
+
@#[line:`+t.lineNumber+",col:"+t.columnNumber+"]"}function Ya(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){wn.prototype[t]=function(){return null}});function _n(t,e){t.currentElement?t.currentElement.appendChild(e):t.doc.appendChild(e)}function Id(t){if(t==="error")throw"onErrorStopParsing"}function Md(){throw"onWarningStopParsing"}Ut.__DOMHandler=wn;Ut.DOMParser=Ka;Ut.normalizeLineEndings=Za;Ut.onErrorStopParsing=Id;Ut.onWarningStopParsing=Md});var Bi=Ge(M=>{"use strict";var jt=ht();M.assign=jt.assign;M.hasDefaultHTMLNamespace=jt.hasDefaultHTMLNamespace;M.isHTMLMimeType=jt.isHTMLMimeType;M.isValidMimeType=jt.isValidMimeType;M.MIME_TYPE=jt.MIME_TYPE;M.NAMESPACE=jt.NAMESPACE;var yn=ur();M.DOMException=yn.DOMException;M.DOMExceptionName=yn.DOMExceptionName;M.ExceptionCode=yn.ExceptionCode;M.ParseError=yn.ParseError;var Q=Ni();M.Attr=Q.Attr;M.CDATASection=Q.CDATASection;M.CharacterData=Q.CharacterData;M.Comment=Q.Comment;M.Document=Q.Document;M.DocumentFragment=Q.DocumentFragment;M.DocumentType=Q.DocumentType;M.DOMImplementation=Q.DOMImplementation;M.Element=Q.Element;M.Entity=Q.Entity;M.EntityReference=Q.EntityReference;M.LiveNodeList=Q.LiveNodeList;M.NamedNodeMap=Q.NamedNodeMap;M.Node=Q.Node;M.NodeList=Q.NodeList;M.Notation=Q.Notation;M.ProcessingInstruction=Q.ProcessingInstruction;M.Text=Q.Text;M.XMLSerializer=Q.XMLSerializer;var vn=Ja();M.DOMParser=vn.DOMParser;M.normalizeLineEndings=vn.normalizeLineEndings;M.onErrorStopParsing=vn.onErrorStopParsing;M.onWarningStopParsing=vn.onWarningStopParsing});import{Bag as Zo,sourceTarget as Yt}from"@gramlot/gramlot";function Ur(t,e,{align:r="start",matchWidth:n=!1,inset:i=0,placement:s="bottom",point:a=null}={}){let o=e.ownerDocument.defaultView,u=a?{left:a.x,right:a.x,top:a.y,bottom:a.y,width:0}:e.getBoundingClientRect(),l=Math.max(0,o.innerWidth-16);t.style.setProperty("--gramlot-popup-available-width",`${l}px`),n&&(t.style.width=`${Math.min(Math.max(0,u.width-2*i),l)}px`),t.style.removeProperty("--gramlot-popup-available-height");let c=t.getBoundingClientRect();if(s==="side"){let _=Math.max(0,o.innerWidth-8-u.right-3),w=Math.max(0,u.left-8-3),y=c.width>_&&w>_;t.style.setProperty("--gramlot-popup-available-width",`${y?w:_}px`),t.style.setProperty("--gramlot-popup-available-height",`${Math.max(0,o.innerHeight-16)}px`);let k=t.getBoundingClientRect(),S=y?u.left-k.width-3:u.right+3;t.style.left=`${Math.max(8,Math.min(S,o.innerWidth-k.width-8))}px`,t.style.top=`${Math.max(8,Math.min(u.top,o.innerHeight-k.height-8))}px`;return}let d=Math.max(0,o.innerHeight-8-u.bottom-3),f=Math.max(0,u.top-8-3),h=c.height>d&&f>d;t.style.setProperty("--gramlot-popup-available-height",`${h?f:d}px`);let p=t.getBoundingClientRect(),m=r==="end"?u.right-p.width-i:u.left+i,g=h?u.top-p.height-3:u.bottom+3;t.style.left=`${Math.max(8,Math.min(m,o.innerWidth-p.width-8))}px`,t.style.top=`${Math.max(8,Math.min(g,o.innerHeight-p.height-8))}px`}/*!
|
|
8
7
|
* decimal.js v10.6.0
|
|
9
8
|
* An arbitrary-precision Decimal type for JavaScript.
|
|
10
9
|
* https://github.com/MikeMcl/decimal.js
|
|
11
10
|
* Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
|
|
12
11
|
* MIT Licence
|
|
13
|
-
*/var kt=9e15,Ke=1e9,Vn="0123456789abcdef",Ur="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",jr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Hn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-kt,maxE:kt,crypto:!1},us,Fe,T=!0,Vr="[DecimalError] ",Je=Vr+"Invalid argument: ",cs=Vr+"Precision limit exceeded",ds=Vr+"crypto unavailable",fs="[object Decimal]",oe=Math.floor,Z=Math.pow,el=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,tl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,rl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,hs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ae=1e7,D=7,nl=9007199254740991,il=Ur.length-1,Wn=jr.length-1,g={toStringTag:fs};g.absoluteValue=g.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),A(t)};g.ceil=function(){return A(new this.constructor(this),this.e+1,2)};g.clampedTo=g.clamp=function(t,e){var r,n=this,i=n.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(Je+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new i(n)};g.comparedTo=g.cmp=function(t){var e,r,n,i,s=this,a=s.d,o=(t=new s.constructor(t)).d,u=s.s,l=t.s;if(!a||!o)return!u||!l?NaN:u!==l?u:a===o?0:!a^u<0?1:-1;if(!a[0]||!o[0])return a[0]?u:o[0]?-l:0;if(u!==l)return u;if(s.e!==t.e)return s.e>t.e^u<0?1:-1;for(n=a.length,i=o.length,e=0,r=n<i?n:i;e<r;++e)if(a[e]!==o[e])return a[e]>o[e]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};g.cosine=g.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())+D,n.rounding=1,r=sl(n,bs(n,r)),n.precision=t,n.rounding=e,A(Fe==2||Fe==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};g.cubeRoot=g.cbrt=function(){var t,e,r,n,i,s,a,o,u,l,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(T=!1,s=c.s*Z(c.s*c,1/3),!s||Math.abs(s)==1/0?(r=ie(c.d),t=c.e,(s=(t-r.length+1)%3)&&(r+=s==1||s==-2?"0":"00"),s=Z(r,1/3),t=oe((t+1)/3)-(t%3==(t<0?-1:2)),s==1/0?r="5e"+t:(r=s.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(s.toString()),a=(t=d.precision)+3;;)if(o=n,u=o.times(o).times(o),l=u.plus(c),n=U(l.plus(c).times(o),l.plus(u),a+2,1),ie(o.d).slice(0,a)===(r=ie(n.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!i&&r=="4999"){if(!i&&(A(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}a+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(A(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return T=!0,A(n,t,d.rounding,e)};g.decimalPlaces=g.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-oe(this.e/D))*D,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};g.dividedBy=g.div=function(t){return U(this,new this.constructor(t))};g.dividedToIntegerBy=g.divToInt=function(t){var e=this,r=e.constructor;return A(U(e,new r(t),0,1,1),r.precision,r.rounding)};g.equals=g.eq=function(t){return this.cmp(t)===0};g.floor=function(){return A(new this.constructor(this),this.e+1,3)};g.greaterThan=g.gt=function(t){return this.cmp(t)>0};g.greaterThanOrEqualTo=g.gte=function(t){var e=this.cmp(t);return e==1||e===0};g.hyperbolicCosine=g.cosh=function(){var t,e,r,n,i,s=this,a=s.constructor,o=new a(1);if(!s.isFinite())return new a(s.s?1/0:NaN);if(s.isZero())return o;r=a.precision,n=a.rounding,a.precision=r+Math.max(s.e,s.sd())+4,a.rounding=1,i=s.d.length,i<32?(t=Math.ceil(i/3),e=(1/Wr(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),s=Et(a,1,s.times(e),new a(1),!0);for(var u,l=t,c=new a(8);l--;)u=s.times(s),s=o.minus(u.times(c.minus(u.times(c))));return A(s,a.precision=r,a.rounding=n,!0)};g.hyperbolicSine=g.sinh=function(){var t,e,r,n,i=this,s=i.constructor;if(!i.isFinite()||i.isZero())return new s(i);if(e=s.precision,r=s.rounding,s.precision=e+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<3)i=Et(s,2,i,i,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,i=i.times(1/Wr(5,t)),i=Et(s,2,i,i,!0);for(var a,o=new s(5),u=new s(16),l=new s(20);t--;)a=i.times(i),i=i.times(o.plus(a.times(u.times(a).plus(l))))}return s.precision=e,s.rounding=r,A(i,e,r,!0)};g.hyperbolicTangent=g.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,U(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};g.inverseCosine=g.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,i=e.rounding;return r!==-1?r===0?t.isNeg()?Ne(e,n,i):new e(0):new e(NaN):t.isZero()?Ne(e,n+4,i).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=i,t.times(2))};g.inverseHyperbolicCosine=g.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,T=!1,r=r.times(r).minus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};g.inverseHyperbolicSine=g.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,T=!1,r=r.times(r).plus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln())};g.inverseHyperbolicTangent=g.atanh=function(){var t,e,r,n,i=this,s=i.constructor;return i.isFinite()?i.e>=0?new s(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=s.precision,e=s.rounding,n=i.sd(),Math.max(n,t)<2*-i.e-1?A(new s(i),t,e,!0):(s.precision=r=n-i.e,i=U(i.plus(1),new s(1).minus(i),r+t,1),s.precision=t+4,s.rounding=1,i=i.ln(),s.precision=t,s.rounding=e,i.times(.5))):new s(NaN)};g.inverseSine=g.asin=function(){var t,e,r,n,i=this,s=i.constructor;return i.isZero()?new s(i):(e=i.abs().cmp(1),r=s.precision,n=s.rounding,e!==-1?e===0?(t=Ne(s,r+4,n).times(.5),t.s=i.s,t):new s(NaN):(s.precision=r+6,s.rounding=1,i=i.div(new s(1).minus(i.times(i)).sqrt().plus(1)).atan(),s.precision=r,s.rounding=n,i.times(2)))};g.inverseTangent=g.atan=function(){var t,e,r,n,i,s,a,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&d+4<=Wn)return a=Ne(c,d+4,f).times(.25),a.s=l.s,a}else{if(!l.s)return new c(NaN);if(d+4<=Wn)return a=Ne(c,d+4,f).times(.5),a.s=l.s,a}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/D+2|0),t=r;t;--t)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(T=!1,e=Math.ceil(o/D),n=1,u=l.times(l),a=new c(l),i=l;t!==-1;)if(i=i.times(u),s=a.minus(i.div(n+=2)),i=i.times(u),a=s.plus(i.div(n+=2)),a.d[e]!==void 0)for(t=e;a.d[t]===s.d[t]&&t--;);return r&&(a=a.times(2<<r-1)),T=!0,A(a,c.precision=d,c.rounding=f,!0)};g.isFinite=function(){return!!this.d};g.isInteger=g.isInt=function(){return!!this.d&&oe(this.e/D)>this.d.length-2};g.isNaN=function(){return!this.s};g.isNegative=g.isNeg=function(){return this.s<0};g.isPositive=g.isPos=function(){return this.s>0};g.isZero=function(){return!!this.d&&this.d[0]===0};g.lessThan=g.lt=function(t){return this.cmp(t)<0};g.lessThanOrEqualTo=g.lte=function(t){return this.cmp(t)<1};g.logarithm=g.log=function(t){var e,r,n,i,s,a,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding,h=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)s=!0;else{for(i=r[0];i%10===0;)i/=10;s=i!==1}if(T=!1,o=d+h,a=Ze(l,o),n=e?zr(c,o+10):Ze(t,o),u=U(a,n,o,1),Yt(u.d,i=d,f))do if(o+=10,a=Ze(l,o),n=e?zr(c,o+10):Ze(t,o),u=U(a,n,o,1),!s){+ie(u.d).slice(i+1,i+15)+1==1e14&&(u=A(u,d+1,0));break}while(Yt(u.d,i+=10,f));return T=!0,A(u,d,f)};g.minus=g.sub=function(t){var e,r,n,i,s,a,o,u,l,c,d,f,h=this,p=h.constructor;if(t=new p(t),!h.d||!t.d)return!h.s||!t.s?t=new p(NaN):h.d?t.s=-t.s:t=new p(t.d||h.s!==t.s?h:NaN),t;if(h.s!=t.s)return t.s=-t.s,h.plus(t);if(l=h.d,f=t.d,o=p.precision,u=p.rounding,!l[0]||!f[0]){if(f[0])t.s=-t.s;else if(l[0])t=new p(h);else return new p(u===3?-0:0);return T?A(t,o,u):t}if(r=oe(t.e/D),c=oe(h.e/D),l=l.slice(),s=c-r,s){for(d=s<0,d?(e=l,s=-s,a=f.length):(e=f,r=c,a=l.length),n=Math.max(Math.ceil(o/D),a)+2,s>n&&(s=n,e.length=1),e.reverse(),n=s;n--;)e.push(0);e.reverse()}else{for(n=l.length,a=f.length,d=n<a,d&&(a=n),n=0;n<a;n++)if(l[n]!=f[n]){d=l[n]<f[n];break}s=0}for(d&&(e=l,l=f,f=e,t.s=-t.s),a=l.length,n=f.length-a;n>0;--n)l[a++]=0;for(n=f.length;n>s;){if(l[--n]<f[n]){for(i=n;i&&l[--i]===0;)l[i]=Ae-1;--l[i],l[n]+=Ae}l[n]-=f[n]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=Hr(l,r),T?A(t,o,u):t):new p(u===3?-0:0)};g.modulo=g.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]?A(new n(r),n.precision,n.rounding):(T=!1,n.modulo==9?(e=U(r,t.abs(),0,3,1),e.s*=t.s):e=U(r,t,0,n.modulo,1),e=e.times(t),T=!0,r.minus(e))};g.naturalExponential=g.exp=function(){return Gn(this)};g.naturalLogarithm=g.ln=function(){return Ze(this)};g.negated=g.neg=function(){var t=new this.constructor(this);return t.s=-t.s,A(t)};g.plus=g.add=function(t){var e,r,n,i,s,a,o,u,l,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(l=d.d,c=t.d,o=f.precision,u=f.rounding,!l[0]||!c[0])return c[0]||(t=new f(d)),T?A(t,o,u):t;if(s=oe(d.e/D),n=oe(t.e/D),l=l.slice(),i=s-n,i){for(i<0?(r=l,i=-i,a=c.length):(r=c,n=s,a=l.length),s=Math.ceil(o/D),a=s>a?s+1:a+1,i>a&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(a=l.length,i=c.length,a-i<0&&(i=a,r=c,c=l,l=r),e=0;i;)e=(l[--i]=l[i]+c[i]+e)/Ae|0,l[i]%=Ae;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return t.d=l,t.e=Hr(l,n),T?A(t,o,u):t};g.precision=g.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Je+t);return r.d?(e=ps(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};g.round=function(){var t=this,e=t.constructor;return A(new e(t),t.e+1,e.rounding)};g.sine=g.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())+D,n.rounding=1,r=ol(n,bs(n,r)),n.precision=t,n.rounding=e,A(Fe>2?r.neg():r,t,e,!0)):new n(NaN)};g.squareRoot=g.sqrt=function(){var t,e,r,n,i,s,a=this,o=a.d,u=a.e,l=a.s,c=a.constructor;if(l!==1||!o||!o[0])return new c(!l||l<0&&(!o||o[0])?NaN:o?a:1/0);for(T=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=ie(o),(e.length+u)%2==0&&(e+="0"),l=Math.sqrt(e),u=oe((u+1)/2)-(u<0||u%2),l==1/0?e="5e"+u:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+u),n=new c(e)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(s=n,n=s.plus(U(a,s,r+2,1)).times(.5),ie(s.d).slice(0,r)===(e=ie(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!i&&e=="4999"){if(!i&&(A(s,u+1,0),s.times(s).eq(a))){n=s;break}r+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(A(n,u+1,1),t=!n.times(n).eq(a));break}return T=!0,A(n,u,c.rounding,t)};g.tangent=g.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=U(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,A(Fe==2||Fe==4?r.neg():r,t,e,!0)):new n(NaN)};g.times=g.mul=function(t){var e,r,n,i,s,a,o,u,l,c=this,d=c.constructor,f=c.d,h=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!h||!h[0])return new d(!t.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:!f||!h?t.s/0:t.s*0);for(r=oe(c.e/D)+oe(t.e/D),u=f.length,l=h.length,u<l&&(s=f,f=h,h=s,a=u,u=l,l=a),s=[],a=u+l,n=a;n--;)s.push(0);for(n=l;--n>=0;){for(e=0,i=u+n;i>n;)o=s[i]+h[n]*f[i-n-1]+e,s[i--]=o%Ae|0,e=o/Ae|0;s[i]=(s[i]+e)%Ae|0}for(;!s[--a];)s.pop();return e?++r:s.shift(),t.d=s,t.e=Hr(s,r),T?A(t,d.precision,d.rounding):t};g.toBinary=function(t,e){return Yn(this,2,t,e)};g.toDecimalPlaces=g.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(he(t,0,Ke),e===void 0?e=n.rounding:he(e,0,8),A(r,t+r.e+1,e))};g.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Ce(n,!0):(he(t,0,Ke),e===void 0?e=i.rounding:he(e,0,8),n=A(new i(n),t+1,e),r=Ce(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};g.toFixed=function(t,e){var r,n,i=this,s=i.constructor;return t===void 0?r=Ce(i):(he(t,0,Ke),e===void 0?e=s.rounding:he(e,0,8),n=A(new s(i),t+i.e+1,e),r=Ce(n,!1,t+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};g.toFraction=function(t){var e,r,n,i,s,a,o,u,l,c,d,f,h=this,p=h.d,m=h.constructor;if(!p)return new m(h);if(l=r=new m(1),n=u=new m(0),e=new m(n),s=e.e=ps(p)-h.e-1,a=s%D,e.d[0]=Z(10,a<0?D+a:a),t==null)t=s>0?e:l;else{if(o=new m(t),!o.isInt()||o.lt(l))throw Error(Je+o);t=o.gt(e)?s>0?e:l:o}for(T=!1,o=new m(ie(p)),c=m.precision,m.precision=s=p.length*D*2;d=U(o,e,0,1,1),i=r.plus(d.times(n)),i.cmp(t)!=1;)r=n,n=i,i=l,l=u.plus(d.times(i)),u=i,i=e,e=o.minus(d.times(i)),o=i;return i=U(t.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=h.s,f=U(l,n,s,1).minus(h).abs().cmp(U(u,r,s,1).minus(h).abs())<1?[l,n]:[u,r],m.precision=c,T=!0,f};g.toHexadecimal=g.toHex=function(t,e){return Yn(this,16,t,e)};g.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:he(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]?(T=!1,r=U(r,t,0,e,1).times(t),T=!0,A(r)):(t.s=r.s,r=t),r};g.toNumber=function(){return+this};g.toOctal=function(t,e){return Yn(this,8,t,e)};g.toPower=g.pow=function(t){var e,r,n,i,s,a,o=this,u=o.constructor,l=+(t=new u(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new u(Z(+o,l));if(o=new u(o),o.eq(1))return o;if(n=u.precision,s=u.rounding,t.eq(1))return A(o,n,s);if(e=oe(t.e/D),e>=t.d.length-1&&(r=l<0?-l:l)<=nl)return i=ms(u,o,r,n),t.s<0?new u(1).div(i):A(i,n,s);if(a=o.s,a<0){if(e<t.d.length-1)return new u(NaN);if((t.d[e]&1)==0&&(a=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=a,o}return r=Z(+o,l),e=r==0||!isFinite(r)?oe(l*(Math.log("0."+ie(o.d))/Math.LN10+o.e+1)):new u(r+"").e,e>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(T=!1,u.rounding=o.s=1,r=Math.min(12,(e+"").length),i=Gn(t.times(Ze(o,n+r)),n),i.d&&(i=A(i,n+5,1),Yt(i.d,n,s)&&(e=n+10,i=A(Gn(t.times(Ze(o,e+r)),e),e+5,1),+ie(i.d).slice(n+1,n+15)+1==1e14&&(i=A(i,n+1,0)))),i.s=a,T=!0,u.rounding=s,A(i,n,s))};g.toPrecision=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Ce(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(he(t,1,Ke),e===void 0?e=i.rounding:he(e,0,8),n=A(new i(n),t,e),r=Ce(n,t<=n.e||n.e<=i.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};g.toSignificantDigits=g.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(he(t,1,Ke),e===void 0?e=n.rounding:he(e,0,8)),A(new n(r),t,e)};g.toString=function(){var t=this,e=t.constructor,r=Ce(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};g.truncated=g.trunc=function(){return A(new this.constructor(this),this.e+1,1)};g.valueOf=g.toJSON=function(){var t=this,e=t.constructor,r=Ce(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function ie(t){var e,r,n,i=t.length-1,s="",a=t[0];if(i>0){for(s+=a,e=1;e<i;e++)n=t[e]+"",r=D-n.length,r&&(s+=Xe(r)),s+=n;a=t[e],n=a+"",r=D-n.length,r&&(s+=Xe(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}function he(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Je+t)}function Yt(t,e,r,n){var i,s,a,o;for(s=t[0];s>=10;s/=10)--e;return--e<0?(e+=D,i=0):(i=Math.ceil((e+1)/D),e%=D),s=Z(10,D-e),o=t[i]%s|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),a=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):a=(r<4&&o+1==s||r>3&&o+1==s/2)&&(t[i+1]/s/100|0)==Z(10,e-2)-1||(o==s/2||o==0)&&(t[i+1]/s/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),a=(n||r<4)&&o==9999||!n&&r>3&&o==4999):a=((n||r<4)&&o+1==s||!n&&r>3&&o+1==s/2)&&(t[i+1]/s/1e3|0)==Z(10,e-3)-1,a}function Pr(t,e,r){for(var n,i=[0],s,a=0,o=t.length;a<o;){for(s=i.length;s--;)i[s]*=e;for(i[0]+=Vn.indexOf(t.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function sl(t,e){var r,n,i;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),i=(1/Wr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),t.precision+=r,e=Et(t,1,e.times(i),new t(1));for(var s=r;s--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=r,e}var U=(function(){function t(n,i,s){var a,o=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+o,n[u]=a%s|0,o=a/s|0;return o&&n.unshift(o),n}function e(n,i,s,a){var o,u;if(s!=a)u=s>a?1:-1;else for(o=u=0;o<s;o++)if(n[o]!=i[o]){u=n[o]>i[o]?1:-1;break}return u}function r(n,i,s,a){for(var o=0;s--;)n[s]-=o,o=n[s]<i[s]?1:0,n[s]=o*a+n[s]-i[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,s,a,o,u){var l,c,d,f,h,p,m,_,b,w,y,E,S,R,$,re,ne,$e,X,de,ye=n.constructor,q=n.s==i.s?1:-1,Y=n.d,O=i.d;if(!Y||!Y[0]||!O||!O[0])return new ye(!n.s||!i.s||(Y?O&&Y[0]==O[0]:!O)?NaN:Y&&Y[0]==0||!O?q*0:q/0);for(u?(h=1,c=n.e-i.e):(u=Ae,h=D,c=oe(n.e/h)-oe(i.e/h)),X=O.length,ne=Y.length,b=new ye(q),w=b.d=[],d=0;O[d]==(Y[d]||0);d++);if(O[d]>(Y[d]||0)&&c--,s==null?(R=s=ye.precision,a=ye.rounding):o?R=s+(n.e-i.e)+1:R=s,R<0)w.push(1),p=!0;else{if(R=R/h+2|0,d=0,X==1){for(f=0,O=O[0],R++;(d<ne||f)&&R--;d++)$=f*u+(Y[d]||0),w[d]=$/O|0,f=$%O|0;p=f||d<ne}else{for(f=u/(O[0]+1)|0,f>1&&(O=t(O,f,u),Y=t(Y,f,u),X=O.length,ne=Y.length),re=X,y=Y.slice(0,X),E=y.length;E<X;)y[E++]=0;de=O.slice(),de.unshift(0),$e=O[0],O[1]>=u/2&&++$e;do f=0,l=e(O,y,X,E),l<0?(S=y[0],X!=E&&(S=S*u+(y[1]||0)),f=S/$e|0,f>1?(f>=u&&(f=u-1),m=t(O,f,u),_=m.length,E=y.length,l=e(m,y,_,E),l==1&&(f--,r(m,X<_?de:O,_,u))):(f==0&&(l=f=1),m=O.slice()),_=m.length,_<E&&m.unshift(0),r(y,m,E,u),l==-1&&(E=y.length,l=e(O,y,X,E),l<1&&(f++,r(y,X<E?de:O,E,u))),E=y.length):l===0&&(f++,y=[0]),w[d++]=f,l&&y[0]?y[E++]=Y[re]||0:(y=[Y[re]],E=1);while((re++<ne||y[0]!==void 0)&&R--);p=y[0]!==void 0}w[0]||w.shift()}if(h==1)b.e=c,us=p;else{for(d=1,f=w[0];f>=10;f/=10)d++;b.e=d+c*h-1,A(b,o?s+b.e+1:s,a,p)}return b}})();function A(t,e,r,n){var i,s,a,o,u,l,c,d,f,h=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(i=1,o=d[0];o>=10;o/=10)i++;if(s=e-i,s<0)s+=D,a=e,c=d[f=0],u=c/Z(10,i-a-1)%10|0;else if(f=Math.ceil((s+1)/D),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=u=0,i=1,s%=D,a=s-D+1}else break e;else{for(c=o=d[f],i=1;o>=10;o/=10)i++;s%=D,a=s-D+i,u=a<0?0:c/Z(10,i-a-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(a<0?c:c%Z(10,i-a-1)),l=r<4?(u||n)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(s>0?a>0?c/Z(10,i-a):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,l?(e-=t.e+1,d[0]=Z(10,(D-e%D)%D),t.e=-e||0):d[0]=t.e=0,t;if(s==0?(d.length=f,o=1,f--):(d.length=f+1,o=Z(10,D-s),d[f]=a>0?(c/Z(10,i-a)%Z(10,a)|0)*o:0),l)for(;;)if(f==0){for(s=1,a=d[0];a>=10;a/=10)s++;for(a=d[0]+=o,o=1;a>=10;a/=10)o++;s!=o&&(t.e++,d[0]==Ae&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ae)break;d[f--]=0,o=1}for(s=d.length;d[--s]===0;)d.pop()}return T&&(t.e>h.maxE?(t.d=null,t.e=NaN):t.e<h.minE&&(t.e=0,t.d=[0])),t}function Ce(t,e,r){if(!t.isFinite())return _s(t);var n,i=t.e,s=ie(t.d),a=s.length;return e?(r&&(n=r-a)>0?s=s.charAt(0)+"."+s.slice(1)+Xe(n):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(t.e<0?"e":"e+")+t.e):i<0?(s="0."+Xe(-i-1)+s,r&&(n=r-a)>0&&(s+=Xe(n))):i>=a?(s+=Xe(i+1-a),r&&(n=r-i-1)>0&&(s=s+"."+Xe(n))):((n=i+1)<a&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(s+="."),s+=Xe(n))),s}function Hr(t,e){var r=t[0];for(e*=D;r>=10;r/=10)e++;return e}function zr(t,e,r){if(e>il)throw T=!0,r&&(t.precision=r),Error(cs);return A(new t(Ur),e,1,!0)}function Ne(t,e,r){if(e>Wn)throw Error(cs);return A(new t(jr),e,r,!0)}function ps(t){var e=t.length-1,r=e*D+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 Xe(t){for(var e="";t--;)e+="0";return e}function ms(t,e,r,n){var i,s=new t(1),a=Math.ceil(n/D+4);for(T=!1;;){if(r%2&&(s=s.times(e),os(s.d,a)&&(i=!0)),r=oe(r/2),r===0){r=s.d.length-1,i&&s.d[r]===0&&++s.d[r];break}e=e.times(e),os(e.d,a)}return T=!0,s}function as(t){return t.d[t.d.length-1]&1}function gs(t,e,r){for(var n,i,s=new t(e[0]),a=0;++a<e.length;){if(i=new t(e[a]),!i.s){s=i;break}n=s.cmp(i),(n===r||n===0&&s.s===r)&&(s=i)}return s}function Gn(t,e){var r,n,i,s,a,o,u,l=0,c=0,d=0,f=t.constructor,h=f.rounding,p=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?(T=!1,u=p):u=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(Z(2,d))/Math.LN10*2+5|0,u+=n,r=s=a=new f(1),f.precision=u;;){if(s=A(s.times(t),u,1),r=r.times(++c),o=a.plus(U(s,r,u,1)),ie(o.d).slice(0,u)===ie(a.d).slice(0,u)){for(i=d;i--;)a=A(a.times(a),u,1);if(e==null)if(l<3&&Yt(a.d,u-n,h,l))f.precision=u+=10,r=s=o=new f(1),c=0,l++;else return A(a,f.precision=p,h,T=!0);else return f.precision=p,a}a=o}}function Ze(t,e){var r,n,i,s,a,o,u,l,c,d,f,h=1,p=10,m=t,_=m.d,b=m.constructor,w=b.rounding,y=b.precision;if(m.s<0||!_||!_[0]||!m.e&&_[0]==1&&_.length==1)return new b(_&&!_[0]?-1/0:m.s!=1?NaN:_?0:m);if(e==null?(T=!1,c=y):c=e,b.precision=c+=p,r=ie(_),n=r.charAt(0),Math.abs(s=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=ie(m.d),n=r.charAt(0),h++;s=m.e,n>1?(m=new b("0."+r),s++):m=new b(n+"."+r.slice(1))}else return l=zr(b,c+2,y).times(s+""),m=Ze(new b(n+"."+r.slice(1)),c-p).plus(l),b.precision=y,e==null?A(m,y,w,T=!0):m;for(d=m,u=a=m=U(m.minus(1),m.plus(1),c,1),f=A(m.times(m),c,1),i=3;;){if(a=A(a.times(f),c,1),l=u.plus(U(a,new b(i),c,1)),ie(l.d).slice(0,c)===ie(u.d).slice(0,c))if(u=u.times(2),s!==0&&(u=u.plus(zr(b,c+2,y).times(s+""))),u=U(u,new b(h),c,1),e==null)if(Yt(u.d,c-p,w,o))b.precision=c+=p,l=a=m=U(d.minus(1),d.plus(1),c,1),f=A(m.times(m),c,1),i=o=1;else return A(u,b.precision=y,w,T=!0);else return b.precision=y,u;u=l,i+=2}}function _s(t){return String(t.s*t.s/0)}function qr(t,e){var r,n,i;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(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(n,i),e){if(i-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%D,r<0&&(n+=D),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=D;n<i;)t.d.push(+e.slice(n,n+=D));e=e.slice(n),n=D-e.length}else n-=i;for(;n--;)e+="0";t.d.push(+e),T&&(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 al(t,e){var r,n,i,s,a,o,u,l,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),hs.test(e))return qr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(tl.test(e))r=16,e=e.toLowerCase();else if(el.test(e))r=2;else if(rl.test(e))r=8;else throw Error(Je+e);for(s=e.search(/p/i),s>0?(u=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),s=e.indexOf("."),a=s>=0,n=t.constructor,a&&(e=e.replace(".",""),o=e.length,s=o-s,i=ms(n,new n(r),s,s*2)),l=Pr(e,r,Ae),c=l.length-1,s=c;l[s]===0;--s)l.pop();return s<0?new n(t.s*0):(t.e=Hr(l,c),t.d=l,T=!1,a&&(t=U(t,i,o*4)),u&&(t=t.times(Math.abs(u)<54?Z(2,u):Xt.pow(2,u))),T=!0,t)}function ol(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:Et(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/Wr(5,r)),e=Et(t,2,e,e);for(var i,s=new t(5),a=new t(16),o=new t(20);r--;)i=e.times(e),e=e.times(s.plus(i.times(a.times(i).minus(o))));return e}function Et(t,e,r,n,i){var s,a,o,u,l=1,c=t.precision,d=Math.ceil(c/D);for(T=!1,u=r.times(r),o=new t(n);;){if(a=U(o.times(u),new t(e++*e++),c,1),o=i?n.plus(a):n.minus(a),n=U(a.times(u),new t(e++*e++),c,1),a=o.plus(n),a.d[d]!==void 0){for(s=d;a.d[s]===o.d[s]&&s--;);if(s==-1)break}s=o,o=n,n=a,a=s,l++}return T=!0,a.d.length=d+1,a}function Wr(t,e){for(var r=t;--e;)r*=t;return r}function bs(t,e){var r,n=e.s<0,i=Ne(t,t.precision,1),s=i.times(.5);if(e=e.abs(),e.lte(s))return Fe=n?4:1,e;if(r=e.divToInt(i),r.isZero())Fe=n?3:2;else{if(e=e.minus(r.times(i)),e.lte(s))return Fe=as(r)?n?2:3:n?4:1,e;Fe=as(r)?n?1:4:n?3:2}return e.minus(i).abs()}function Yn(t,e,r,n){var i,s,a,o,u,l,c,d,f,h=t.constructor,p=r!==void 0;if(p?(he(r,1,Ke),n===void 0?n=h.rounding:he(n,0,8)):(r=h.precision,n=h.rounding),!t.isFinite())c=_s(t);else{for(c=Ce(t),a=c.indexOf("."),p?(i=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):i=e,a>=0&&(c=c.replace(".",""),f=new h(1),f.e=c.length-a,f.d=Pr(Ce(f),10,i),f.e=f.d.length),d=Pr(c,10,i),s=u=d.length;d[--u]==0;)d.pop();if(!d[0])c=p?"0p+0":"0";else{if(a<0?s--:(t=new h(t),t.d=d,t.e=s,t=U(t,f,r,n,0,i),d=t.d,s=t.e,l=us),a=d[r],o=i/2,l=l||d[r+1]!==void 0,l=n<4?(a!==void 0||l)&&(n===0||n===(t.s<0?3:2)):a>o||a===o&&(n===4||l||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,l)for(;++d[--r]>i-1;)d[r]=0,r||(++s,d.unshift(1));for(u=d.length;!d[u-1];--u);for(a=0,c="";a<u;a++)c+=Vn.charAt(d[a]);if(p){if(u>1)if(e==16||e==8){for(a=e==16?4:3,--u;u%a;u++)c+="0";for(d=Pr(c,i,e),u=d.length;!d[u-1];--u);for(a=1,c="1.";a<u;a++)c+=Vn.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>u)for(s-=u;s--;)c+="0";else s<u&&(c=c.slice(0,s)+"."+c.slice(s))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function os(t,e){if(t.length>e)return t.length=e,!0}function ll(t){return new this(t).abs()}function ul(t){return new this(t).acos()}function cl(t){return new this(t).acosh()}function dl(t,e){return new this(t).plus(e)}function fl(t){return new this(t).asin()}function hl(t){return new this(t).asinh()}function pl(t){return new this(t).atan()}function ml(t){return new this(t).atanh()}function gl(t,e){t=new this(t),e=new this(e);var r,n=this.precision,i=this.rounding,s=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=Ne(this,s,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?Ne(this,n,i):new this(0),r.s=t.s):!t.d||e.isZero()?(r=Ne(this,s,1).times(.5),r.s=t.s):e.s<0?(this.precision=s,this.rounding=1,r=this.atan(U(t,e,s,1)),e=Ne(this,s,1),this.precision=n,this.rounding=i,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(U(t,e,s,1)),r}function _l(t){return new this(t).cbrt()}function bl(t){return A(t=new this(t),t.e+1,2)}function wl(t,e,r){return new this(t).clamp(e,r)}function yl(t){if(!t||typeof t!="object")throw Error(Vr+"Object expected");var e,r,n,i=t.defaults===!0,s=["precision",1,Ke,"rounding",0,8,"toExpNeg",-kt,0,"toExpPos",0,kt,"maxE",0,kt,"minE",-kt,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(r=s[e],i&&(this[r]=Hn[r]),(n=t[r])!==void 0)if(oe(n)===n&&n>=s[e+1]&&n<=s[e+2])this[r]=n;else throw Error(Je+r+": "+n);if(r="crypto",i&&(this[r]=Hn[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(ds);else this[r]=!1;else throw Error(Je+r+": "+n);return this}function vl(t){return new this(t).cos()}function kl(t){return new this(t).cosh()}function ws(t){var e,r,n;function i(s){var a,o,u,l=this;if(!(l instanceof i))return new i(s);if(l.constructor=i,ls(s)){l.s=s.s,T?!s.d||s.e>i.maxE?(l.e=NaN,l.d=null):s.e<i.minE?(l.e=0,l.d=[0]):(l.e=s.e,l.d=s.d.slice()):(l.e=s.e,l.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){l.s=1/s<0?-1:1,l.e=0,l.d=[0];return}if(s<0?(s=-s,l.s=-1):l.s=1,s===~~s&&s<1e7){for(a=0,o=s;o>=10;o/=10)a++;T?a>i.maxE?(l.e=NaN,l.d=null):a<i.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[s]):(l.e=a,l.d=[s]);return}if(s*0!==0){s||(l.s=NaN),l.e=NaN,l.d=null;return}return qr(l,s.toString())}if(u==="string")return(o=s.charCodeAt(0))===45?(s=s.slice(1),l.s=-1):(o===43&&(s=s.slice(1)),l.s=1),hs.test(s)?qr(l,s):al(l,s);if(u==="bigint")return s<0?(s=-s,l.s=-1):l.s=1,qr(l,s.toString());throw Error(Je+s)}if(i.prototype=g,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=yl,i.clone=ws,i.isDecimal=ls,i.abs=ll,i.acos=ul,i.acosh=cl,i.add=dl,i.asin=fl,i.asinh=hl,i.atan=pl,i.atanh=ml,i.atan2=gl,i.cbrt=_l,i.ceil=bl,i.clamp=wl,i.cos=vl,i.cosh=kl,i.div=El,i.exp=Al,i.floor=Dl,i.hypot=xl,i.ln=Tl,i.log=Nl,i.log10=Sl,i.log2=Cl,i.max=Ol,i.min=Bl,i.mod=Il,i.mul=Ml,i.pow=Rl,i.random=Ll,i.round=$l,i.sign=Fl,i.sin=Pl,i.sinh=ql,i.sqrt=Ul,i.sub=jl,i.sum=zl,i.tan=Vl,i.tanh=Hl,i.trunc=Wl,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 i.config(t),i}function El(t,e){return new this(t).div(e)}function Al(t){return new this(t).exp()}function Dl(t){return A(t=new this(t),t.e+1,3)}function xl(){var t,e,r=new this(0);for(T=!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 T=!0,new this(1/0);r=e}return T=!0,r.sqrt()}function ls(t){return t instanceof Xt||t&&t.toStringTag===fs||!1}function Tl(t){return new this(t).ln()}function Nl(t,e){return new this(t).log(e)}function Cl(t){return new this(t).log(2)}function Sl(t){return new this(t).log(10)}function Ol(){return gs(this,arguments,-1)}function Bl(){return gs(this,arguments,1)}function Il(t,e){return new this(t).mod(e)}function Ml(t,e){return new this(t).mul(e)}function Rl(t,e){return new this(t).pow(e)}function Ll(t){var e,r,n,i,s=0,a=new this(1),o=[];if(t===void 0?t=this.precision:he(t,1,Ke),n=Math.ceil(t/D),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));s<n;)i=e[s],i>=429e7?e[s]=crypto.getRandomValues(new Uint32Array(1))[0]:o[s++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);s<n;)i=e[s]+(e[s+1]<<8)+(e[s+2]<<16)+((e[s+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(e,s):(o.push(i%1e7),s+=4);s=n/4}else throw Error(ds);else for(;s<n;)o[s++]=Math.random()*1e7|0;for(n=o[--s],t%=D,n&&t&&(i=Z(10,D-t),o[s]=(n/i|0)*i);o[s]===0;s--)o.pop();if(s<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=D)o.shift();for(n=1,i=o[0];i>=10;i/=10)n++;n<D&&(r-=D-n)}return a.e=r,a.d=o,a}function $l(t){return A(t=new this(t),t.e+1,this.rounding)}function Fl(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function Pl(t){return new this(t).sin()}function ql(t){return new this(t).sinh()}function Ul(t){return new this(t).sqrt()}function jl(t,e){return new this(t).sub(e)}function zl(){var t=0,e=arguments,r=new this(e[t]);for(T=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return T=!0,A(r,this.precision,this.rounding)}function Vl(t){return new this(t).tan()}function Hl(t){return new this(t).tanh()}function Wl(t){return A(t=new this(t),t.e+1,1)}g[Symbol.for("nodejs.util.inspect.custom")]=g.toString;g[Symbol.toStringTag]="Decimal";var Xt=g.constructor=ws(Hn);Ur=new Xt(Ur);jr=new Xt(jr);var ys=Xt;var Gl=20,Yl=1,lt=1e6,vs=1e6,Xl=-7,Zl=21,Jl=!1,Zt="[big.js] ",ut=Zt+"Invalid ",Gr=ut+"decimal places",Kl=ut+"rounding mode",ks=Zt+"Division by zero",F={},Se=void 0,Ql=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Es(){function t(e){var r=this;if(!(r instanceof t))return e===Se?Es():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(ut+"value");e=e===0&&1/e<0?"-0":String(e)}eu(r,e)}r.constructor=t}return t.prototype=F,t.DP=Gl,t.RM=Yl,t.NE=Xl,t.PE=Zl,t.strict=Jl,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function eu(t,e){var r,n,i;if(!Ql.test(e))throw Error(ut+"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),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function ct(t,e,r,n){var i=t.c;if(r===Se&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(Kl);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==Se))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==Se||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function dt(t,e,r){var n=t.e,i=t.c.join(""),s=i.length;if(e)i=i.charAt(0)+(s>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+="0";else n<s&&(i=i.slice(0,n)+"."+i.slice(n));else s>1&&(i=i.charAt(0)+"."+i.slice(1));return t.s<0&&r?"-"+i:i}F.abs=function(){var t=new this.constructor(this);return t.s=1,t};F.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,a=t.s,o=r.e,u=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-a:0;if(s!=a)return s;if(e=s<0,o!=u)return o>u^e?1:-1;for(a=(o=n.length)<(u=i.length)?o:u,s=-1;++s<a;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return o==u?0:o>u^e?1:-1};F.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,a=r.DP;if(a!==~~a||a<0||a>lt)throw Error(Gr);if(!i[0])throw Error(ks);if(!n[0])return t.s=s,t.c=[t.e=0],t;var o,u,l,c,d,f=i.slice(),h=o=i.length,p=n.length,m=n.slice(0,o),_=m.length,b=t,w=b.c=[],y=0,E=a+(b.e=e.e-t.e)+1;for(b.s=s,s=E<0?0:E,f.unshift(0);_++<o;)m.push(0);do{for(l=0;l<10;l++){if(o!=(_=m.length))c=o>_?1:-1;else for(d=-1,c=0;++d<o;)if(i[d]!=m[d]){c=i[d]>m[d]?1:-1;break}if(c<0){for(u=_==o?i:f;_;){if(m[--_]<u[_]){for(d=_;d&&!m[--d];)m[d]=9;--m[d],m[_]+=10}m[_]-=u[_]}for(;!m[0];)m.shift()}else break}w[y++]=c?l:++l,m[0]&&c?m[_]=n[h]||0:m=[n[h]]}while((h++<p||m[0]!==Se)&&s--);return!w[0]&&y!=1&&(w.shift(),b.e--,E--),y>E&&ct(b,E,r.RM,m[0]!==Se),b};F.eq=function(t){return this.cmp(t)===0};F.gt=function(t){return this.cmp(t)>0};F.gte=function(t){return this.cmp(t)>-1};F.lt=function(t){return this.cmp(t)<0};F.lte=function(t){return this.cmp(t)<1};F.minus=F.sub=function(t){var e,r,n,i,s=this,a=s.constructor,o=s.s,u=(t=new a(t)).s;if(o!=u)return t.s=-u,s.plus(t);var l=s.c.slice(),c=s.e,d=t.c,f=t.e;if(!l[0]||!d[0])return d[0]?t.s=-u:l[0]?t=new a(s):t.s=1,t;if(o=c-f){for((i=o<0)?(o=-o,n=l):(f=c,n=d),n.reverse(),u=o;u--;)n.push(0);n.reverse()}else for(r=((i=l.length<d.length)?l:d).length,o=u=0;u<r;u++)if(l[u]!=d[u]){i=l[u]<d[u];break}if(i&&(n=l,l=d,d=n,t.s=-t.s),(u=(r=d.length)-(e=l.length))>0)for(;u--;)l[e++]=0;for(u=e;r>o;){if(l[--r]<d[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=d[r]}for(;l[--u]===0;)l.pop();for(;l[0]===0;)l.shift(),--f;return l[0]||(t.s=1,l=[f=0]),t.c=l,t.e=f,t};F.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(ks);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};F.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};F.plus=F.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var a=i.e,o=i.c,u=t.e,l=t.c;if(!o[0]||!l[0])return l[0]||(o[0]?t=new s(i):t.s=i.s),t;if(o=o.slice(),e=a-u){for(e>0?(u=a,n=l):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-l.length<0&&(n=l,l=o,o=n),e=l.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+l[e]+r)/10|0;for(r&&(o.unshift(r),++u),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=u,t};F.pow=function(t){var e=this,r=new e.constructor("1"),n=r,i=t<0;if(t!==~~t||t<-vs||t>vs)throw Error(ut+"exponent");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};F.prec=function(t,e){if(t!==~~t||t<1||t>lt)throw Error(ut+"precision");return ct(new this.constructor(this),t,e)};F.round=function(t,e){if(t===Se)t=0;else if(t!==~~t||t<-lt||t>lt)throw Error(Gr);return ct(new this.constructor(this),t+this.e+1,e)};F.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,a=n.e,o=new i("0.5");if(!n.c[0])return new i(n);if(s<0)throw Error(Zt+"No square root");s=Math.sqrt(+dt(n,!0,!0)),s===0||s===1/0?(e=n.c.join(""),e.length+a&1||(e+="0"),s=Math.sqrt(e),a=((a+1)/2|0)-(a<0||a&1),t=new i((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+a)):t=new i(s+""),a=t.e+(i.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,a).join("")!==t.c.slice(0,a).join(""));return ct(t,(i.DP-=4)+t.e+1,i.RM)};F.times=F.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,a=i.length,o=s.length,u=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=u+l,a<o&&(e=i,i=s,s=e,l=a,a=o,o=l),e=new Array(l=a+o);l--;)e[l]=0;for(u=o;u--;){for(o=0,l=a+u;l>u;)o=e[l]+s[u]*i[l-u-1]+o,e[l--]=o%10,o=o/10|0;e[l]=o}for(o?++t.e:e.shift(),u=e.length;!e[--u];)e.pop();return t.c=e,t};F.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>lt)throw Error(Gr);for(r=ct(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return dt(r,!0,!!n)};F.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Se){if(t!==~~t||t<0||t>lt)throw Error(Gr);for(r=ct(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return dt(r,!1,!!n)};F[Symbol.for("nodejs.util.inspect.custom")]=F.toJSON=F.toString=function(){var t=this,e=t.constructor;return dt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};F.toNumber=function(){var t=+dt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(Zt+"Imprecise conversion");return t};F.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==Se){if(t!==~~t||t<1||t>lt)throw Error(ut+"precision");for(r=ct(new n(r),t,e);r.c.length<t;)r.c.push(0)}return dt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};F.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(Zt+"valueOf disallowed");return dt(t,t.e<=e.NE||t.e>=e.PE,!0)};var tu=Es(),As=tu;var si={};rs(si,{DecodeError:()=>le,Decoder:()=>xe,EXT_TIMESTAMP:()=>Zn,Encoder:()=>At,ExtData:()=>De,ExtensionCodec:()=>Qe,decode:()=>Is,decodeArrayStream:()=>Ls,decodeAsync:()=>Rs,decodeMulti:()=>Ms,decodeMultiStream:()=>$s,decodeTimestampExtension:()=>ti,decodeTimestampToTimeSpec:()=>ei,encode:()=>Zr,encodeDateToTimeSpec:()=>Kn,encodeTimeSpecToTimestamp:()=>Jn,encodeTimestampExtension:()=>Qn});function Ds(t){let e=t.length,r=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if((i&4294967168)===0){r++;continue}else if((i&4294965248)===0)r+=2;else{if(i>=55296&&i<=56319&&n<e){let s=t.charCodeAt(n);(s&64512)===56320&&(++n,i=((i&1023)<<10)+(s&1023)+65536)}(i&4294901760)===0?r+=3:r+=4}}return r}function ru(t,e,r){let n=t.length,i=r,s=0;for(;s<n;){let a=t.charCodeAt(s++);if((a&4294967168)===0){e[i++]=a;continue}else if((a&4294965248)===0)e[i++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&s<n){let o=t.charCodeAt(s);(o&64512)===56320&&(++s,a=((a&1023)<<10)+(o&1023)+65536)}(a&4294901760)===0?(e[i++]=a>>12&15|224,e[i++]=a>>6&63|128):(e[i++]=a>>18&7|240,e[i++]=a>>12&63|128,e[i++]=a>>6&63|128)}e[i++]=a&63|128}}var nu=new TextEncoder,iu=50;function su(t,e,r){nu.encodeInto(t,e.subarray(r))}function xs(t,e,r){t.length>iu?su(t,e,r):ru(t,e,r)}var au=4096;function Xn(t,e,r){let n=e,i=n+r,s=[],a="";for(;n<i;){let o=t[n++];if((o&128)===0)s.push(o);else if((o&224)===192){let u=t[n++]&63;s.push((o&31)<<6|u)}else if((o&240)===224){let u=t[n++]&63,l=t[n++]&63;s.push((o&31)<<12|u<<6|l)}else if((o&248)===240){let u=t[n++]&63,l=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|u<<12|l<<6|c;d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|d&1023),s.push(d)}else s.push(o);s.length>=au&&(a+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(a+=String.fromCharCode(...s)),a}var ou=new TextDecoder,lu=200;function uu(t,e,r){let n=t.subarray(e,e+r);return ou.decode(n)}function Ts(t,e,r){return r>lu?uu(t,e,r):Xn(t,e,r)}var De=class{type;data;constructor(e,r){this.type=e,this.data=r}};var le=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 Ns(t,e,r){let n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function Yr(t,e,r){let n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function Xr(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Cs(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var Zn=-1,cu=4294967296-1,du=17179869184-1;function Jn({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=du)if(e===0&&t<=cu){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|r&3),s.setUint32(4,n),i}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),Yr(n,4,t),r}}function Kn(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function Qn(t){if(t instanceof Date){let e=Kn(t);return Jn(e)}else return null}function ei(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),i=(r&3)*4294967296+n,s=r>>>2;return{sec:i,nsec:s}}case 12:{let r=Xr(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new le(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function ti(t){let e=ei(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Ss={type:Zn,encode:Qn,decode:ti};var Qe=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Ss)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let i=this.builtInEncoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=-1-n;return new De(a,s)}}}for(let n=0;n<this.encoders.length;n++){let i=this.encoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=n;return new De(a,s)}}}return e instanceof De?e:null}decode(e,r,n){let i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new De(r,e)}};function fu(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Jt(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):fu(t)?new Uint8Array(t):Uint8Array.from(t)}var hu=100,pu=2048,At=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Qe.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??hu,this.initialBufferSize=e?.initialBufferSize??pu,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),i=new DataView(r);n.set(this.bytes),this.view=i,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=Ds(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),xs(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=Jt(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 i of e)this.doEncode(i,r+1)}countWithoutUndefined(e,r){let n=0;for(let i of r)e[i]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(let s of n){let a=e[s];this.ignoreUndefined&&a===void 0||(this.encodeString(s),this.doEncode(a,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),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),Ns(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),Yr(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 Zr(t,e){return new At(e).encodeSharedRef(t)}function Jr(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var mu=16,gu=16,Kr=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=mu,r=gu){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 i=this.caches[n-1];e:for(let s of i){let a=s.bytes;for(let o=0;o<n;o++)if(a[o]!==e[r+o])continue e;return s.str}return null}store(e,r){let n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){let i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;let s=Xn(e,r,n),a=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(a,s),s}};var ri="array",er="map_key",Bs="map_value",_u=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new le("The type of key must be string or number but "+typeof t)},ni=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=ri,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=er,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===ri){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===er||e.type===Bs){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}},Qt=-1,ii=new DataView(new ArrayBuffer(0)),bu=new Uint8Array(ii.buffer);try{ii.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 Os=new RangeError("Insufficient data"),wu=new Kr,xe=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ii;bytes=bu;headByte=Qt;stack=new ni;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Qe.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:wu,this.mapKeyConverter=e?.mapKeyConverter??_u}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=Qt,this.stack.reset()}setBuffer(e){let r=Jt(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===Qt&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=Jt(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}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(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:i,pos:s,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${Jr(i)} at ${a} (${s} 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,i=-1;for await(let s of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(a){if(!(a instanceof RangeError))throw a}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 i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){let i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{let i=e-160;r=this.decodeString(i,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 i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){let i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){let i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){let i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){let i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){let i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){let i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){let i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){let i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){let i=this.lookU32();r=this.decodeBinary(i,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 i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){let i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){let i=this.lookU32();r=this.decodeExtension(i,4)}else throw new le(`Unrecognized type byte: ${Jr(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let i=n.top();if(i.type===ri)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===er){if(r==="__proto__")throw new le("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=Bs;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=er;continue e}}return r}}readHeadByte(){return this.headByte===Qt&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=Qt}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 le(`Unrecognized array type byte: ${Jr(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new le(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new le(`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 le(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw Os;let n=this.pos+r,i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,n,e):i=Ts(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===er:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new le(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw Os;let n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new le(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,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=Cs(this.view,this.pos);return this.pos+=8,e}readI64(){let e=Xr(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 Is(t,e){return new xe(e).decode(t)}function Ms(t,e){return new xe(e).decodeMulti(t)}function yu(t){return t[Symbol.asyncIterator]!=null}async function*vu(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function Qr(t){return yu(t)?t:vu(t)}async function Rs(t,e){let r=Qr(t);return new xe(e).decodeAsync(r)}function Ls(t,e){let r=Qr(t);return new xe(e).decodeArrayStream(r)}function $s(t,e){let r=Qr(t);return new xe(e).decodeStream(r)}var wn=ns(Ti(),1),Ni=ys,Ci=As,Me=si,ja=wn.DOMParser,za=wn.XMLSerializer;var Va=Me!==null;function Ha(){if(!Va)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var Wa=yd();function yd(){if(!Va)return null;let t=new TextEncoder,e=new TextDecoder,r=new Me.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let i=gt(n);if(i==="D"||i==="H")return null}return Me.encodeTimestampExtension(n)},decode:n=>Me.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>ce(n)?t.encode(n.toString()):null,decode:n=>yr(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&>(n)==="D"){let i=n.getUTCFullYear(),s=String(n.getUTCMonth()+1).padStart(2,"0"),a=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${i}-${s}-${a}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&>(n)==="H"){let i=String(n.getUTCHours()).padStart(2,"0"),s=String(n.getUTCMinutes()).padStart(2,"0"),a=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${i}:${s}:${a}.${o}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf("."),a=s>=0?i.substring(0,s):i,o=s>=0?i.substring(s+1):"0",[u,l,c]=a.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+u,+l,+c,d))}}),r.register({type:4,encode:n=>{let i=Si(n);if(i!==null){let[s,a]=i;return t.encode(`${s}:${a(n)}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf(":"),a=i.slice(0,s),o=i.slice(s+1),u=at[a];if(u!==void 0){let[,l]=u;return l(o)}return`${o}::${a}`}}),r}function Ga(t){return Ha(),Me.encode(t,{extensionCodec:Wa})}function Ya(t){return Ha(),Me.decode(t,{extensionCodec:Wa})}function vn(t,e=!1){let r=kn(t);if(r===null)return[!1,String(t)];let[n,i,s]=r;return s&&!e?[!1,String(t)]:[!0,`${i(t)}::${n}`]}function Oi(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),i=at[n];if(i===void 0)return[!1,t];let[,s]=i;return[!0,s(r)]}function yn(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[i,s]of Object.entries(t))n[i]=yn(s,e,r);return n}return Array.isArray(t)?t.map(n=>yn(n,e,r)):r(t)?e(t):t}function Bi(t){let e=kn(t);if(e!==null){let[r,n,i]=e;return i?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(i=>{let[s,a]=Bi(i);return a&&(r=!0),s}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[i,s]of Object.entries(t)){let[a,o]=Bi(s);o&&(r=!0),n[i]=a}return[n,r]}return[t,!1]}function vd(t,e=!1){let[r,n]=vn(t,e);if(r)return n;let[i,s]=Bi(t),a=JSON.stringify(i);return s?`${a}::JS`:a}function kd(t){return JSON.stringify(t)}function Ed(t){if(!Me)throw new Error("@msgpack/msgpack is required for MessagePack support");return Me.encode(t)}function be(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:i=!1}={}){if(n)return`${Za(t)}::QS`;if(r){if(e===null||e==="json")return kd(t);if(e==="msgpack")return Ed(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 s=vd(t,i);return e==="json"?`"${s}"`:s}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${Xa(t)}</tytx_root>`;if(e==="msgpack")return Ga(t);throw new Error(`Unknown transport: ${e}`)}}var zt,Ii;typeof window<"u"&&window.DOMParser?(zt=window.DOMParser,Ii=window.XMLSerializer):(zt=ja,Ii=za);function Ja(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 Ka(t,e,r){let n=t.createElement(e),i=r.attrs||{},s=r.value;for(let[a,o]of Object.entries(i))n.setAttribute(a,be(o,null,{_forceSuffix:!0}));if(Array.isArray(s))for(let a of s)if(Ja(a)){let[o]=Object.keys(a),u=a[o],l=Ka(t,o,u);n.appendChild(l)}else{n.textContent=be(s);break}else n.textContent=be(s);return n}function Xa(t){if(!zt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(Ja(t)){let[e]=Object.keys(t),r=t[e],n=new zt().parseFromString("<root/>","text/xml"),i=Ka(n,e,r);return new Ii().serializeToString(i)}else return be(t)}function Mi(t){let e={};for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=Q(i.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let i=t.childNodes[n];i.nodeType===1&&r.push(i)}if(r.length>0)if(r.length===1){let n=r[0],i=Mi(n);return{attrs:e,value:{[n.tagName]:i}}}else{let n=[];for(let i of r){let s=Mi(i);n.push({[i.tagName]:s})}return{attrs:e,value:n}}return{attrs:e,value:Q(t.textContent)}}function Qa(t){if(!zt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new zt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let s=null;for(let a=0;a<n.childNodes.length;a++)if(n.childNodes[a].nodeType===1){s=n.childNodes[a];break}if(!s)return Q(n.textContent);n=s}let i=Mi(n);return{[n.tagName]:i}}function Ad(t){return typeof t=="string"}function Dd(t){let[e,r]=Oi(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let i;try{i=JSON.parse(n)}catch{return t}return yn(i,xd,Ad)}function xd(t){return t.includes("::")?Oi(t)[1]:t}function Td(t){let e=Qa(t);return typeof e=="string"?Q(e):e}function Nd(t){return Ya(t)}function Q(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)),Dd(r)}else{if(e==="xml")return Td(t);if(e==="msgpack")return Nd(t);throw new Error(`Unknown transport: ${e}`)}}function Za(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[i,s]=vn(n,!0);i?e.push(`${r}=${s}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function eo(t){if(!t)return[];let e=t.split("&"),r=e.map(a=>a.includes("=")),n=r.every(Boolean),i=!r.some(Boolean);if(!n&&!i)throw new Error("QS format error: mixed items with and without '='");if(i)return e.map(a=>Q(a));let s={};for(let a of e){let o=a.indexOf("="),u=a.slice(0,o),l=a.slice(o+1);s[u]=Q(l)}return s}var ro=Ni||Ci||Number,Cd=Ni?"decimal.js":Ci?"big.js":"number";function yr(t){return new ro(t)}function ce(t){return Cd==="number"?!1:t instanceof ro}function gt(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 Sd(t){return t.toString()}function Od(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 Bd(t){return t.toISOString()}function Id(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),i=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${i}`}function Md(t){return t?"true":"false"}function Rd(t){return t.toString()}function Ld(t){return t.toString()}function $d(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 En=[],Ri=new Map;function Si(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,i,s]of En)if(r.prototype===e)return[n,i,s];return null}function kn(t){if(t===null)return["NN",()=>"",!0];if(ce(t))return["N",Sd,!1];if(t instanceof Uint8Array)return["RAW",$d,!1];if(t instanceof Date){let e=gt(t);return e==="D"?["D",Od,!1]:e==="H"?["H",Id,!1]:["DHZ",Bd,!1]}return typeof t=="boolean"?["B",Md,!0]:typeof t=="number"?Number.isInteger(t)?["L",Rd,!0]:["R",Ld,!0]:Si(t)}function Fd(t){return yr(t)}function Pd(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function to(t){return new Date(t)}function qd(t){let[e,r,n]=t.split(":"),[i,s]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(i),Number(s||0)))}function Ud(t){return t.toLowerCase()==="true"}function jd(t){return parseInt(t,10)}function zd(t){return parseFloat(t)}function Vd(t){return t}function Hd(t){return null}var Wd=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function Gd(t){if(!Wd.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 Yd(t){return eo(t)}var Xd=/^[A-Z]+$/,at={N:[Object,Fd],D:[Date,Pd],DH:[Date,to],DHZ:[Date,to],H:[Date,qd],L:[Number,jd],R:[Number,zd],T:[String,Vd],B:[Boolean,Ud],QS:[Object,Yd],NN:[null,Hd],RAW:[Uint8Array,Gd]};function vr(t){return Object.hasOwn(at,t)?at[t][0]:null}function Li(t,e,r,n,i=!1){if(typeof e!="string"||!Xd.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let s=at[e];if(s!==void 0&&s[0]!==t){let a=s[0]===null?"null":s[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${a}`)}En=En.filter(([a])=>a!==t),En.push([t,e,r,i]),at[e]=[t,n]}function kr(t,e){Ri.set(t,e)}function je(t){return Ri.has(t)?Ri.get(t):{}}var no={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 Jd(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?no[e]||null:e}function Kd(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function Qd(t){return new Promise(e=>setTimeout(e,t))}async function ef(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,i=e.backoff||2,s=e.jitter!==!1,a=e.on||["Error"],o=null,u=n*1e3;for(let l=0;l<r;l++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,l<r-1&&Kd(c,a)){let d=u;s&&(d*=1+Math.random()*.1),await Qd(d),u*=i}else throw c}throw o}var ee=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 s of["interval","reactive"])if(Object.hasOwn(n,s))throw new TypeError(`Removed resolver option: ${s}. 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 i=this.constructor.internalParams;for(let[s,a]of Object.entries(n))i.has(s)||(this._kw[s]=a);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 i=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...i,...n},a=>this._prepareValue(a));let s=this._computeEffectiveFingerprint(i);return s===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=s,this._load(i,a=>this._finalize(a)))}_load(e,r){let n=Jd(this),i=()=>this.load(e);if(n)return ef(i,n).then(r);let s=i();return s&&typeof s.then=="function"?s.then(r):r(s)}_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}};ee._BagClass=null;var Er=class extends ee{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 ze=class t{constructor(e,r,n=null,i=null,s=null,a=null,o=null,u=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=a,this.xmlTag=o,this._compiled=null,this.parentBag=e,i&&this.setAttr(i,!1,!0,u),n!==null&&this.setValue(n,!1),s&&(this.resolver=s)}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 i=Q(`${r}::QS`);if(Array.isArray(i)){let s=i.length?i:Object.keys(this._attr),a=s.map(u=>{let l=this.getAttr(u);return!e&&l instanceof ee?l.resolve():l}),o=u=>i.length===0?Object.fromEntries(s.map((l,c)=>[l,u[c]])):u.length===1?u[0]:u;return a.some(u=>u&&typeof u.then=="function")?Promise.all(a).then(o):o(a)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...i}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,i=null,s=!0,a=null,o=!1){e instanceof ee?(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 u=this._value;u!==e&&u?.parentNode===this&&u.setBackref(),this._value=e;let l=u!==this._value,c=r??!0,d=null;if(n!==null){let h={...this._attr};this.setAttr(n,!1,i,s);let p=this._buildAttrDiff(h,this._attr);d=Object.keys(p).length>0?p:null}r=c&&(l||d!==null);let f=d?l?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,u,c),r){let h=d!==null?{oldvalue:u,attrs_diff:d}:{oldvalue:u};for(let p of Object.values(this._nodeSubscribers))p({node:this,info:h,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,u,d,a,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 i=this._value,s={...this._attr},a=this.resolver;a&&a._node===this&&(a._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(s,this._attr),u=Object.keys(o).length?o:null,l=i!==r||a!==n;if(l||u){let c=u?l?"upd_value_attr":"upd_attrs":"upd_value",d=u?{oldvalue:i,attrs_diff:u}:{oldvalue:i};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,i,u)}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={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(let s of i){let a=s in e?e[s]:null,o=s in r?r[s]:null;a!==o&&(n[s]={old:a,new:o})}return n}setAttr(e=null,r=!0,n=!0,i=!0){let s=e||{},a=Object.keys(this._nodeSubscribers).length>0,u=r&&(a||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,s):this._attr={...s},i)for(let l of Object.keys(this._attr))this._attr[l]===null&&delete this._attr[l];if(r&&u!==null){let l=this._buildAttrDiff(u,this._attr);if(Object.keys(l).length>0&&a)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:l},evt:"upd_attrs"});if(Object.keys(l).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,l,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 i of r)if(this._attr[i]!==e._attr[i])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(i=>this._attr[i]!==e._attr[i])?`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 Ar=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,i]=r,s=i.includes("::")?Q(i):i;return n?this._list.findIndex(a=>a.getAttr(n)===s):this._list.findIndex(a=>a._value===s)}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 s=this._parseSharpIndex(n.slice(1),e);return Math.min(s,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let s=this._parseSharpIndex(n.slice(1),e);return Math.min(s+1,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i+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=">",i=null,s=null,a=null,o=!1,u=!0,l=null,c=!0,d=!1,f=null){let h=null;if(e.includes("?")&&([e,h]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(h){let m=h.split("&");if(m.length===1)i={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");i={};for(let _=0;_<m.length;_++)i[m[_]]=r[_]}r=null}let p=this._dict[e];if(p)f&&(p.nodeTag=f),a!==null&&(a===!1?p.resolver=null:p.resolver=a),h?p.setAttr(i,c,!0,u):p.setValue(r,c,i,o,u,l,d);else{let m=s&&s.nodeClass?s.nodeClass:ze;p=new m(s,e,h?null:r,i,a,f,null,u);let _=this._parsePosition(n);this._dict[e]=p,this._list.splice(_,0,p),c&&s&&s.backref&&s._onNodeInserted(p,_,null,l,d)}return d&&p.setValue(null,!1),p}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 i=Array.isArray(e)?e:[e];if(i.length===0||r>=this._list.length)return;let s=this._list[r].label;if(i.length>1){let a=[...i].sort((c,d)=>c-d),o=a[0]<r?1:0,u=[];for(let c=a.length-1;c>=0;c--){let d=a[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),u.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let l=this.index(s);l<0&&(l=this._list.length),l+=o;for(let c of u)this._list.splice(l,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,l)}else{let a=i[0];if(a===r||a<0||a>=this._list.length)return;let o=this._list[a];this._list.splice(a,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,a),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],i=e._list[r];if(!n.isEqual(i))return!1}return!0}};var oo=ns(Ti(),1);var $i="::RSLV:",tf=new Map,rf=new Map,An=new WeakMap,G=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Dr=class extends ee{constructor(e){super({asBag:!1}),An.set(this,e)}get payload(){return An.get(this)}load(){throw new G("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 G("Invalid resolver description")}function so(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 G("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))so(r,e);e.delete(t)}}function xr(t){if(An.has(t))return An.get(t);let e=rf.get(t.constructor);if(!e)throw new G(`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),so(n),$i+JSON.stringify(n)}function Dn(t){if(typeof t!="string"||!t.startsWith($i))return null;let e=t.slice($i.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Dr(t);let r;try{r=JSON.parse(e)}catch{throw new G("Invalid resolver JSON or signed token")}io(r);let n=tf.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Dr(t);let i=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(i instanceof n.cls))throw new G("Resolver decoder returned an incompatible instance");return i}function xn(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ee?xr(r):r]))}function Fi(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Dn(r)??r]))}var Te="__cls";function Vt(t,e){return t!==null&&t.tytxSuffix===e?t:vr(e)}function nf(t){let e=t.tytxSuffix,r=Object.entries(je(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new G(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new G(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Pi(t,e){let r=je(t);if(!Object.hasOwn(r,e))throw new G(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function qi(t,e){return t===e?null:nf(t)}function*lo(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let i=r.getValue(!0);!r.resolver&&i instanceof te&&(yield*lo(i,n))}}function sf(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 i=e.replace(/\.000Z$/,"Z");return r&&!n?i.slice(i.indexOf("T")+1):i}function Ht(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function ot(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(ot):Ht(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,ot(r)])):t}function Ui(t){if(!Ht(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 ao=!1,te=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Ar,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Ui(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 ze}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(i=>i)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[i,s]=this._htraverseBefore(e);if(i===null)return[null,null];if(s.length===0)return[i,""];for(;s.length>1&&i instanceof t;){let a=s[0];if(a==="#parent"){if(i.parent===null||i.parent===void 0)break;s.shift(),i=i.parent;continue}let o=i._nodes.get(a);if(!o)break;let u=o.getValue(n);if(u instanceof t)s.shift(),i=u;else if(r){let l=i.createChildBag();o.setValue(l,!0,null,!0,!0,"autocreate"),s.shift(),i=l}else break}if(!r)return s.length>1?[null,null]:[i,s[0]];for(;s.length>1;){let a=s.shift();if(a.startsWith("#"))throw new Tr("Not existing index in #n syntax");let o=i.createChildBag();i._nodes.set(a,o,">",null,i,null,!1,!0,"autocreate"),i=o}return[i,s[0]]}get(e,r=null,n=!0,i={}){if(!e)return this;if(e==="#parent")return this.parent;let s=null;e.includes("?")&&([e,s]=e.split("?",2));let a=this._nodes.get(e);return a?a.getValue(n,s,i):r}getItem(e,r=null,n=!1,i={}){if(!e)return this;let[s,a]=this._htraverse(e,!1,n);return s instanceof t?s.get(a,r,n,i):r}setItem(e,r,n=null,i=">",s=!1,a=!0,o=null,u=!1,l=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,h]=this._htraverse(e,!0);return f._nodes.set(h,r,i,n,f,c,s,a,o,l,u,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let i=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(i,n,null,r),i}return null}pop(e,r=null,n=null){let i=this.popNode(e,n);return i?i.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,i]=this._htraverse(e,!1,!0);if(!n||!i)return null;let s=n._nodes.get(i);if(!s)return null;try{return n._pop(i,r)}finally{s.parentBag===n&&n._nodes._dict[s.label]!==s&&(s.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,i=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[s,a]=this._htraverse(e,n,r);if(s instanceof t&&a){let o=s._nodes.get(a);if(o)return o;if(n)return s._nodes.set(a,i,">",null,s,null,!1,!0,"autocreate"),s._nodes.get(a)}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 i of this)i.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,i=null,s=null,a=null,o=!1){for(let u of Object.values(this._updSubscribers))u({node:e,pathlist:r,oldvalue:i,attrs_diff:s,evt:n,reason:a,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,i,s,a,o)}_onNodeInserted(e,r,n=null,i=null,s=!1){let a=e.parentBag,o=e.getValue(!0);a!==null&&a.backref&&o instanceof t&&o.setBackref(e,a),n===null&&(n=[]);for(let u of Object.values(this._insSubscribers))u({node:e,pathlist:n,ind:r,evt:"ins",reason:i,fired:s});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],i,s)}_onNodeDeleted(e,r,n=null,i=null){for(let s of Object.values(this._delSubscribers))s({node:e,pathlist:n,ind:r,evt:"del",reason:i});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],i))}_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:i=null,delete:s=null,any:a=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||a),this._subscribe(e,this._insSubscribers,i||a),this._subscribe(e,this._delSubscribers,s||a)}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:i=!1,delete:s=!1,any:a=!1}=r;(n||a)&&delete this._updSubscribers[e],(i||a)&&delete this._insSubscribers[e],(s||a)&&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 i=t.prototype.getNode.call(this,e,!0,!0);i&&i.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let i=this.getNode(e);return i?i.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 i=n.value;if(i instanceof t){if(i.getItem(e)===r)return n}else if(i&&i.get&&i.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,i=!1){let s=r===void 0,a=n&&typeof r=="string"?r.toLowerCase():r,o=u=>{let l=[];for(let c of u._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(s||d==a)return c}if(c._value instanceof t)if(i){let d=o(c._value);if(d)return d}else l.push(c._value)}for(let c of l){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 i=n.getValue(!0);if(i!=null&&!(e&&i===0)&&!(r&&i===""))return!1}return!0}query(e=null,r=null,n=!1,i=!1,s=!0,a=!0,o=null,u=!0){e||(e="#k,#v,#a");let l=this,c;if(typeof e=="string"){if(e.includes(":")){let[h,p]=e.split(":");l=this.getItem(h),e=p}c=e.split(",").map(h=>h.trim())}else c=e;let d=(h,p,m,_,b)=>{if(p==="#k")return h.label;if(p==="#p")return m;if(p==="#n")return h;if(typeof p=="function")return p(h);if(p==="#v"){let w=b();return _&&w instanceof t?null:w}else if(p.startsWith("#v.")){let w=p.split(".").slice(1).join("."),y=b();return y&&y.getItem?y.getItem(w):null}else{if(p==="#__v")return h.getValue(!0);if(p.startsWith("#a")){let w=p.includes(".")?p.split(".").slice(1).join("."):null;return h.getAttr(w)}else{let w=b();return w&&w.getItem?w.getItem(p):null}}};function*f(){let h=0;function*p(m,_){for(let b of m._nodes){let w=_?`${_}.${b.label}`:b.label,y=!1,E,S=()=>(y||(E=b.getValue(u),y=!0),E);if((s&&a||(S()instanceof t?a:s))&&(r===null||r(b))&&(yield c.length===1?d(b,c[0],w,i,S):c.map($=>d(b,$,w,i,S)),h++,o!==null&&h>=o))return;if(i){let $=S();if($ instanceof t&&(yield*p($,w),o!==null&&h>=o))return}}}yield*p(l,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,i)=>{for(let s of n._nodes){let a=i?`${i}.${s.label}`:s.label,o=s.getValue(!1);o instanceof t?r(o,a):e.push([a,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 i=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!i||i.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(u=>u.trim()).map(()=>[]);let s=[...i];if(s.length&&Array.isArray(s[0])){let a=s[0].length,o=[];for(let u=0;u<a;u++)o.push(s.map(l=>l[u]));return o}return[s]}return[...i]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",i=e.map(s=>`${n}${s}`).join(",");return this.digest(i,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 i=s=>{let a=0,o=!1;for(let u of this.query(s,n)){if(u==null||u===""){o=!0;continue}if(typeof u!="number"&&typeof u!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof u}`);continue}a+=u}return r&&o?null:a};return e.includes(",")?e.split(",").map(s=>i(s.trim())):i(e)}sort(e="#k:a"){let r=(i,s)=>i==null?[-1,""]:s&&typeof i=="string"?[0,i.toLowerCase()]:[0,i],n=(i,s)=>i[0]!==s[0]?i[0]-s[0]:i[1]<s[1]?-1:i[1]>s[1]?1:0;if(typeof e=="function")this._nodes._list.sort((i,s)=>{let a=e(i),o=e(s);return a<o?-1:a>o?1:0});else{let i=e.split(",");i.reverse();for(let s of i){let a,o;s.includes(":")?[a,o]=s.split(":",2):(a=s,o="a"),a=a.trim(),o=o.trim();let u=o==="d"||o==="D",l=o==="a"||o==="d",c;if(a.toLowerCase()==="#k")c=d=>r(d.label,l);else if(a.toLowerCase()==="#v")c=d=>r(d.value,l);else if(a.toLowerCase().startsWith("#a.")){let d=a.slice(3);c=f=>r(f.getAttr(d),l)}else c=d=>{let f=d.value,h=f instanceof t?f.getItem(a):f?f[a]:null;return r(h,l)};this._nodes._list.sort((d,f)=>{let h=n(c(d),c(f));return u?-h:h})}}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(i=>i 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 i=new Er({callback:r,...n});this.setResolver(e,i)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,i=!1){let s={};for(let a of this._nodes){let o=a.value;if(i&&o==null)continue;let u=a.label;e&&(u=String(u)),r&&(u=u.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,i)),Object.defineProperty(s,u,{value:o,enumerable:!0,writable:!0,configurable:!0})}return s}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 i=n.getValue(!e);i instanceof t&&(i=i.deepcopy(e));let s=new r.nodeClass(r,n.label,i);s.setAttr({...n.attr},!1,!1,!1),s.nodeTag=n.nodeTag,s.xmlTag=n.xmlTag,r._nodes._list.push(s),r._nodes._dict[s.label]=s}return r}update(e,r=null,n=null,i=!1){if(!(e instanceof t)){for(let s in e){let a=e[s];(!i||a!==null||!this._nodes.has(s))&&this.setItem(s,a,null,">",!1,!1,n,!1,n!==!1)}return}for(let s of[...e]){let a=s.label,o=r==="static"?s.resolver:null,u=o?null:s.getValue(),l=s.attr.__replace;delete s.attr.__replace;let c=this._nodes.get(a);if(c)if(c.setAttr(s.attr,n===null?!0:n,!0,!1),s.nodeTag!=null&&(c.nodeTag=s.nodeTag),s.xmlTag!=null&&(c.xmlTag=s.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{s.resolver&&(c.resolver=null);let d=c.getValue();u instanceof t&&d instanceof t&&!l?d.update(u,r,n,i):(!i||u!==null)&&c.setValue(u,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(a,o||u,s.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=s.nodeTag,d.xmlTag=s.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,i=null,s=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let a=new this.nodeClass(this,e,null,n,i,s,null,!1);return r instanceof ee?a.resolver=r:a._value=r,this._nodes._dict[e]=a,this._nodes._list.push(a),a}fillFrom(e=null,r={}){let n=Ui(r);if(e!=null&&!Ht(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let i=this.createChildBag(),s=new Set,a=(o,u,l)=>{if(s.has(u))throw new TypeError(`Cyclic Bag source at ${l}`);s.add(u);try{let c=Array.isArray(u)?String(u.length).length+1:0,d=Array.isArray(u)?Array.from(u,(f,h)=>[`r_${String(h).padStart(c,"0")}`,f]):Object.entries(u);if(!Array.isArray(u)&&Object.getOwnPropertySymbols(u).some(f=>Object.prototype.propertyIsEnumerable.call(u,f)))throw new TypeError(`Bag labels must be strings at ${l}`);for(let[f,h]of d){let p=h;n&&(Ht(p)||Array.isArray(p))&&(p=this.createChildBag(),a(p,h,`${l}[${JSON.stringify(f)}]`)),o._appendLiteral(f,p)}}finally{s.delete(u)}};return e!=null&&a(i,e,"$"),this._replacePrepared(i)}_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 i=n.getValue(!0);i instanceof t&&i.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:i={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let s=(a,o)=>{for(let u=0;u<a._nodes.length;u++){let l=a._nodes._list[u],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,l.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,u]);let d=e(l,c,u);if(d)return d;if(d==null&&n){let f=l.getValue(r);if(f instanceof t){let h=s(f,c);if(h)return h}}}return null};return s(this,i)}*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 i=r?`${r}.${n.label}`:n.label;yield[i,n];let s=n.getValue(e);s instanceof t&&(yield*s._iterNodesWithPaths(e,i))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,i=0,s=new Map([["[]",this.constructor]]);for(let[a,o]of lo(this)){let u=a.slice(0,-1),l=JSON.stringify(a),c=JSON.stringify(u),d=o.getValue(!0),f,h=null;if(o.resolver)f=xr(o.resolver);else if(d instanceof t){let _=d.constructor,b=_.tytxSuffix;s.set(l,_),h=qi(_,Vt(s.get(c),b)),f=`::${b}`}else d===null?f="::NN":f=ot(d);if(o.attr&&Object.hasOwn(o.attr,Te))throw new G(`node '${a}': the attribute '${Te}' is reserved for the Bag class name`);let p=xn(ot(o.attr));h!==null&&(p[Te]=h);let m=o.nodeTag;r?(yield[u.length?n[c]:null,o.label,m,f,p],d instanceof t&&(n[l]=i,e[i]=a,i++)):yield[u,o.label,m,f,p]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),i=this.constructor.tytxSuffix;if(e==="json")return`${n}::${i}`;if(e==="msgpack")return Zr(new De(4,new TextEncoder().encode(`${i}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let s={};r={rows:[...this._nodeFlattener(s)],paths:s}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,i=qi(n,Vt(null,n.tytxSuffix));return i!==null&&(r[Te]=i),r.rows=r.rows.map(([s,a,o,u,l])=>[ot(s),ot(a),ot(o),u,l]),r.paths&&(r.paths=ot(r.paths)),be(r)}static fromTytx(e,r="json",n={}){if(Ht(r)&&(n=r,r="json"),Ui(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 i=Q(e,r==="json"?null:r);if(i instanceof t)return i;if(!Ht(i)&&!Array.isArray(i))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(i,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(Vt(null,r));let n=Q(e);if(!n||!Array.isArray(n.rows))throw new G("Invalid TYTX Bag: expected rows");let i=n.paths,s=i!=null,a=Object.hasOwn(n,Te)?Pi(r,n[Te]):Vt(null,r),o=new a,u=new Map([["[]",o]]);for(let l of n.rows){if(!Array.isArray(l)||l.length!==5)throw new G("Invalid TYTX Bag row");let[c,d,f,h,p]=l,m=c??"";if(s){if(c!==null&&!Object.hasOwn(i,c))throw new G(`Unknown TYTX parent reference: ${c}`);m=c===null?"":i[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new G("Invalid TYTX parent path");let _=JSON.stringify(m);if(!u.has(_))throw new G(`Missing or undecodable TYTX parent branch: ${m}`);let b=u.get(_),w=JSON.stringify([...m,d]),y=h,E=Dn(y),S=Fi(p),R=Object.hasOwn(S,Te)?S[Te]:null;if(delete S[Te],y instanceof t){let re=y.constructor.tytxSuffix,ne=R!==null?Pi(re,R):Vt(b.constructor,re);y=new ne,u.set(w,y)}else if(R!==null)throw new G(`node '${w}': the attribute '${Te}' is reserved for the Bag class name of a branch`);let $=b._appendLiteral(d,E?null:y,S,E);$.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:i=null,selfClosedTags:s=null}=e,a=this._bagToXml(s,r);return i===!0?a=`<?xml version='1.0' encoding='${n}'?>
|
|
12
|
+
*/var kt=9e15,Ke=1e9,Xn="0123456789abcdef",Vr="2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058",Hr="3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789",Zn={precision:20,rounding:4,modulo:1,toExpNeg:-7,toExpPos:21,minE:-kt,maxE:kt,crypto:!1},ys,qe,T=!0,Gr="[DecimalError] ",Ze=Gr+"Invalid argument: ",vs=Gr+"Precision limit exceeded",ks=Gr+"crypto unavailable",Es="[object Decimal]",le=Math.floor,K=Math.pow,ml=/^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i,gl=/^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i,bl=/^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i,xs=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ae=1e7,A=7,_l=9007199254740991,wl=Vr.length-1,Kn=Hr.length-1,b={toStringTag:Es};b.absoluteValue=b.abs=function(){var t=new this.constructor(this);return t.s<0&&(t.s=1),x(t)};b.ceil=function(){return x(new this.constructor(this),this.e+1,2)};b.clampedTo=b.clamp=function(t,e){var r,n=this,i=n.constructor;if(t=new i(t),e=new i(e),!t.s||!e.s)return new i(NaN);if(t.gt(e))throw Error(Ze+e);return r=n.cmp(t),r<0?t:n.cmp(e)>0?e:new i(n)};b.comparedTo=b.cmp=function(t){var e,r,n,i,s=this,a=s.d,o=(t=new s.constructor(t)).d,u=s.s,l=t.s;if(!a||!o)return!u||!l?NaN:u!==l?u:a===o?0:!a^u<0?1:-1;if(!a[0]||!o[0])return a[0]?u:o[0]?-l:0;if(u!==l)return u;if(s.e!==t.e)return s.e>t.e^u<0?1:-1;for(n=a.length,i=o.length,e=0,r=n<i?n:i;e<r;++e)if(a[e]!==o[e])return a[e]>o[e]^u<0?1:-1;return n===i?0:n>i^u<0?1:-1};b.cosine=b.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())+A,n.rounding=1,r=yl(n,Ns(n,r)),n.precision=t,n.rounding=e,x(qe==2||qe==3?r.neg():r,t,e,!0)):new n(1):new n(NaN)};b.cubeRoot=b.cbrt=function(){var t,e,r,n,i,s,a,o,u,l,c=this,d=c.constructor;if(!c.isFinite()||c.isZero())return new d(c);for(T=!1,s=c.s*K(c.s*c,1/3),!s||Math.abs(s)==1/0?(r=ie(c.d),t=c.e,(s=(t-r.length+1)%3)&&(r+=s==1||s==-2?"0":"00"),s=K(r,1/3),t=le((t+1)/3)-(t%3==(t<0?-1:2)),s==1/0?r="5e"+t:(r=s.toExponential(),r=r.slice(0,r.indexOf("e")+1)+t),n=new d(r),n.s=c.s):n=new d(s.toString()),a=(t=d.precision)+3;;)if(o=n,u=o.times(o).times(o),l=u.plus(c),n=U(l.plus(c).times(o),l.plus(u),a+2,1),ie(o.d).slice(0,a)===(r=ie(n.d)).slice(0,a))if(r=r.slice(a-3,a+1),r=="9999"||!i&&r=="4999"){if(!i&&(x(o,t+1,0),o.times(o).times(o).eq(c))){n=o;break}a+=4,i=1}else{(!+r||!+r.slice(1)&&r.charAt(0)=="5")&&(x(n,t+1,1),e=!n.times(n).times(n).eq(c));break}return T=!0,x(n,t,d.rounding,e)};b.decimalPlaces=b.dp=function(){var t,e=this.d,r=NaN;if(e){if(t=e.length-1,r=(t-le(this.e/A))*A,t=e[t],t)for(;t%10==0;t/=10)r--;r<0&&(r=0)}return r};b.dividedBy=b.div=function(t){return U(this,new this.constructor(t))};b.dividedToIntegerBy=b.divToInt=function(t){var e=this,r=e.constructor;return x(U(e,new r(t),0,1,1),r.precision,r.rounding)};b.equals=b.eq=function(t){return this.cmp(t)===0};b.floor=function(){return x(new this.constructor(this),this.e+1,3)};b.greaterThan=b.gt=function(t){return this.cmp(t)>0};b.greaterThanOrEqualTo=b.gte=function(t){var e=this.cmp(t);return e==1||e===0};b.hyperbolicCosine=b.cosh=function(){var t,e,r,n,i,s=this,a=s.constructor,o=new a(1);if(!s.isFinite())return new a(s.s?1/0:NaN);if(s.isZero())return o;r=a.precision,n=a.rounding,a.precision=r+Math.max(s.e,s.sd())+4,a.rounding=1,i=s.d.length,i<32?(t=Math.ceil(i/3),e=(1/Xr(4,t)).toString()):(t=16,e="2.3283064365386962890625e-10"),s=Et(a,1,s.times(e),new a(1),!0);for(var u,l=t,c=new a(8);l--;)u=s.times(s),s=o.minus(u.times(c.minus(u.times(c))));return x(s,a.precision=r,a.rounding=n,!0)};b.hyperbolicSine=b.sinh=function(){var t,e,r,n,i=this,s=i.constructor;if(!i.isFinite()||i.isZero())return new s(i);if(e=s.precision,r=s.rounding,s.precision=e+Math.max(i.e,i.sd())+4,s.rounding=1,n=i.d.length,n<3)i=Et(s,2,i,i,!0);else{t=1.4*Math.sqrt(n),t=t>16?16:t|0,i=i.times(1/Xr(5,t)),i=Et(s,2,i,i,!0);for(var a,o=new s(5),u=new s(16),l=new s(20);t--;)a=i.times(i),i=i.times(o.plus(a.times(u.times(a).plus(l))))}return s.precision=e,s.rounding=r,x(i,e,r,!0)};b.hyperbolicTangent=b.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,U(r.sinh(),r.cosh(),n.precision=t,n.rounding=e)):new n(r.s)};b.inverseCosine=b.acos=function(){var t=this,e=t.constructor,r=t.abs().cmp(1),n=e.precision,i=e.rounding;return r!==-1?r===0?t.isNeg()?Ne(e,n,i):new e(0):new e(NaN):t.isZero()?Ne(e,n+4,i).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=i,t.times(2))};b.inverseHyperbolicCosine=b.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,T=!1,r=r.times(r).minus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln()):new n(r)};b.inverseHyperbolicSine=b.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,T=!1,r=r.times(r).plus(1).sqrt().plus(r),T=!0,n.precision=t,n.rounding=e,r.ln())};b.inverseHyperbolicTangent=b.atanh=function(){var t,e,r,n,i=this,s=i.constructor;return i.isFinite()?i.e>=0?new s(i.abs().eq(1)?i.s/0:i.isZero()?i:NaN):(t=s.precision,e=s.rounding,n=i.sd(),Math.max(n,t)<2*-i.e-1?x(new s(i),t,e,!0):(s.precision=r=n-i.e,i=U(i.plus(1),new s(1).minus(i),r+t,1),s.precision=t+4,s.rounding=1,i=i.ln(),s.precision=t,s.rounding=e,i.times(.5))):new s(NaN)};b.inverseSine=b.asin=function(){var t,e,r,n,i=this,s=i.constructor;return i.isZero()?new s(i):(e=i.abs().cmp(1),r=s.precision,n=s.rounding,e!==-1?e===0?(t=Ne(s,r+4,n).times(.5),t.s=i.s,t):new s(NaN):(s.precision=r+6,s.rounding=1,i=i.div(new s(1).minus(i.times(i)).sqrt().plus(1)).atan(),s.precision=r,s.rounding=n,i.times(2)))};b.inverseTangent=b.atan=function(){var t,e,r,n,i,s,a,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding;if(l.isFinite()){if(l.isZero())return new c(l);if(l.abs().eq(1)&&d+4<=Kn)return a=Ne(c,d+4,f).times(.25),a.s=l.s,a}else{if(!l.s)return new c(NaN);if(d+4<=Kn)return a=Ne(c,d+4,f).times(.5),a.s=l.s,a}for(c.precision=o=d+10,c.rounding=1,r=Math.min(28,o/A+2|0),t=r;t;--t)l=l.div(l.times(l).plus(1).sqrt().plus(1));for(T=!1,e=Math.ceil(o/A),n=1,u=l.times(l),a=new c(l),i=l;t!==-1;)if(i=i.times(u),s=a.minus(i.div(n+=2)),i=i.times(u),a=s.plus(i.div(n+=2)),a.d[e]!==void 0)for(t=e;a.d[t]===s.d[t]&&t--;);return r&&(a=a.times(2<<r-1)),T=!0,x(a,c.precision=d,c.rounding=f,!0)};b.isFinite=function(){return!!this.d};b.isInteger=b.isInt=function(){return!!this.d&&le(this.e/A)>this.d.length-2};b.isNaN=function(){return!this.s};b.isNegative=b.isNeg=function(){return this.s<0};b.isPositive=b.isPos=function(){return this.s>0};b.isZero=function(){return!!this.d&&this.d[0]===0};b.lessThan=b.lt=function(t){return this.cmp(t)<0};b.lessThanOrEqualTo=b.lte=function(t){return this.cmp(t)<1};b.logarithm=b.log=function(t){var e,r,n,i,s,a,o,u,l=this,c=l.constructor,d=c.precision,f=c.rounding,h=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=l.d,l.s<0||!r||!r[0]||l.eq(1))return new c(r&&!r[0]?-1/0:l.s!=1?NaN:r?0:1/0);if(e)if(r.length>1)s=!0;else{for(i=r[0];i%10===0;)i/=10;s=i!==1}if(T=!1,o=d+h,a=Xe(l,o),n=e?Wr(c,o+10):Xe(t,o),u=U(a,n,o,1),Zt(u.d,i=d,f))do if(o+=10,a=Xe(l,o),n=e?Wr(c,o+10):Xe(t,o),u=U(a,n,o,1),!s){+ie(u.d).slice(i+1,i+15)+1==1e14&&(u=x(u,d+1,0));break}while(Zt(u.d,i+=10,f));return T=!0,x(u,d,f)};b.minus=b.sub=function(t){var e,r,n,i,s,a,o,u,l,c,d,f,h=this,p=h.constructor;if(t=new p(t),!h.d||!t.d)return!h.s||!t.s?t=new p(NaN):h.d?t.s=-t.s:t=new p(t.d||h.s!==t.s?h:NaN),t;if(h.s!=t.s)return t.s=-t.s,h.plus(t);if(l=h.d,f=t.d,o=p.precision,u=p.rounding,!l[0]||!f[0]){if(f[0])t.s=-t.s;else if(l[0])t=new p(h);else return new p(u===3?-0:0);return T?x(t,o,u):t}if(r=le(t.e/A),c=le(h.e/A),l=l.slice(),s=c-r,s){for(d=s<0,d?(e=l,s=-s,a=f.length):(e=f,r=c,a=l.length),n=Math.max(Math.ceil(o/A),a)+2,s>n&&(s=n,e.length=1),e.reverse(),n=s;n--;)e.push(0);e.reverse()}else{for(n=l.length,a=f.length,d=n<a,d&&(a=n),n=0;n<a;n++)if(l[n]!=f[n]){d=l[n]<f[n];break}s=0}for(d&&(e=l,l=f,f=e,t.s=-t.s),a=l.length,n=f.length-a;n>0;--n)l[a++]=0;for(n=f.length;n>s;){if(l[--n]<f[n]){for(i=n;i&&l[--i]===0;)l[i]=Ae-1;--l[i],l[n]+=Ae}l[n]-=f[n]}for(;l[--a]===0;)l.pop();for(;l[0]===0;l.shift())--r;return l[0]?(t.d=l,t.e=Yr(l,r),T?x(t,o,u):t):new p(u===3?-0:0)};b.modulo=b.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]?x(new n(r),n.precision,n.rounding):(T=!1,n.modulo==9?(e=U(r,t.abs(),0,3,1),e.s*=t.s):e=U(r,t,0,n.modulo,1),e=e.times(t),T=!0,r.minus(e))};b.naturalExponential=b.exp=function(){return Jn(this)};b.naturalLogarithm=b.ln=function(){return Xe(this)};b.negated=b.neg=function(){var t=new this.constructor(this);return t.s=-t.s,x(t)};b.plus=b.add=function(t){var e,r,n,i,s,a,o,u,l,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(l=d.d,c=t.d,o=f.precision,u=f.rounding,!l[0]||!c[0])return c[0]||(t=new f(d)),T?x(t,o,u):t;if(s=le(d.e/A),n=le(t.e/A),l=l.slice(),i=s-n,i){for(i<0?(r=l,i=-i,a=c.length):(r=c,n=s,a=l.length),s=Math.ceil(o/A),a=s>a?s+1:a+1,i>a&&(i=a,r.length=1),r.reverse();i--;)r.push(0);r.reverse()}for(a=l.length,i=c.length,a-i<0&&(i=a,r=c,c=l,l=r),e=0;i;)e=(l[--i]=l[i]+c[i]+e)/Ae|0,l[i]%=Ae;for(e&&(l.unshift(e),++n),a=l.length;l[--a]==0;)l.pop();return t.d=l,t.e=Yr(l,n),T?x(t,o,u):t};b.precision=b.sd=function(t){var e,r=this;if(t!==void 0&&t!==!!t&&t!==1&&t!==0)throw Error(Ze+t);return r.d?(e=As(r.d),t&&r.e+1>e&&(e=r.e+1)):e=NaN,e};b.round=function(){var t=this,e=t.constructor;return x(new e(t),t.e+1,e.rounding)};b.sine=b.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())+A,n.rounding=1,r=kl(n,Ns(n,r)),n.precision=t,n.rounding=e,x(qe>2?r.neg():r,t,e,!0)):new n(NaN)};b.squareRoot=b.sqrt=function(){var t,e,r,n,i,s,a=this,o=a.d,u=a.e,l=a.s,c=a.constructor;if(l!==1||!o||!o[0])return new c(!l||l<0&&(!o||o[0])?NaN:o?a:1/0);for(T=!1,l=Math.sqrt(+a),l==0||l==1/0?(e=ie(o),(e.length+u)%2==0&&(e+="0"),l=Math.sqrt(e),u=le((u+1)/2)-(u<0||u%2),l==1/0?e="5e"+u:(e=l.toExponential(),e=e.slice(0,e.indexOf("e")+1)+u),n=new c(e)):n=new c(l.toString()),r=(u=c.precision)+3;;)if(s=n,n=s.plus(U(a,s,r+2,1)).times(.5),ie(s.d).slice(0,r)===(e=ie(n.d)).slice(0,r))if(e=e.slice(r-3,r+1),e=="9999"||!i&&e=="4999"){if(!i&&(x(s,u+1,0),s.times(s).eq(a))){n=s;break}r+=4,i=1}else{(!+e||!+e.slice(1)&&e.charAt(0)=="5")&&(x(n,u+1,1),t=!n.times(n).eq(a));break}return T=!0,x(n,u,c.rounding,t)};b.tangent=b.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=U(r,new n(1).minus(r.times(r)).sqrt(),t+10,0),n.precision=t,n.rounding=e,x(qe==2||qe==4?r.neg():r,t,e,!0)):new n(NaN)};b.times=b.mul=function(t){var e,r,n,i,s,a,o,u,l,c=this,d=c.constructor,f=c.d,h=(t=new d(t)).d;if(t.s*=c.s,!f||!f[0]||!h||!h[0])return new d(!t.s||f&&!f[0]&&!h||h&&!h[0]&&!f?NaN:!f||!h?t.s/0:t.s*0);for(r=le(c.e/A)+le(t.e/A),u=f.length,l=h.length,u<l&&(s=f,f=h,h=s,a=u,u=l,l=a),s=[],a=u+l,n=a;n--;)s.push(0);for(n=l;--n>=0;){for(e=0,i=u+n;i>n;)o=s[i]+h[n]*f[i-n-1]+e,s[i--]=o%Ae|0,e=o/Ae|0;s[i]=(s[i]+e)%Ae|0}for(;!s[--a];)s.pop();return e?++r:s.shift(),t.d=s,t.e=Yr(s,r),T?x(t,d.precision,d.rounding):t};b.toBinary=function(t,e){return Qn(this,2,t,e)};b.toDecimalPlaces=b.toDP=function(t,e){var r=this,n=r.constructor;return r=new n(r),t===void 0?r:(he(t,0,Ke),e===void 0?e=n.rounding:he(e,0,8),x(r,t+r.e+1,e))};b.toExponential=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Se(n,!0):(he(t,0,Ke),e===void 0?e=i.rounding:he(e,0,8),n=x(new i(n),t+1,e),r=Se(n,!0,t+1)),n.isNeg()&&!n.isZero()?"-"+r:r};b.toFixed=function(t,e){var r,n,i=this,s=i.constructor;return t===void 0?r=Se(i):(he(t,0,Ke),e===void 0?e=s.rounding:he(e,0,8),n=x(new s(i),t+i.e+1,e),r=Se(n,!1,t+n.e+1)),i.isNeg()&&!i.isZero()?"-"+r:r};b.toFraction=function(t){var e,r,n,i,s,a,o,u,l,c,d,f,h=this,p=h.d,m=h.constructor;if(!p)return new m(h);if(l=r=new m(1),n=u=new m(0),e=new m(n),s=e.e=As(p)-h.e-1,a=s%A,e.d[0]=K(10,a<0?A+a:a),t==null)t=s>0?e:l;else{if(o=new m(t),!o.isInt()||o.lt(l))throw Error(Ze+o);t=o.gt(e)?s>0?e:l:o}for(T=!1,o=new m(ie(p)),c=m.precision,m.precision=s=p.length*A*2;d=U(o,e,0,1,1),i=r.plus(d.times(n)),i.cmp(t)!=1;)r=n,n=i,i=l,l=u.plus(d.times(i)),u=i,i=e,e=o.minus(d.times(i)),o=i;return i=U(t.minus(r),n,0,1,1),u=u.plus(i.times(l)),r=r.plus(i.times(n)),u.s=l.s=h.s,f=U(l,n,s,1).minus(h).abs().cmp(U(u,r,s,1).minus(h).abs())<1?[l,n]:[u,r],m.precision=c,T=!0,f};b.toHexadecimal=b.toHex=function(t,e){return Qn(this,16,t,e)};b.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:he(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]?(T=!1,r=U(r,t,0,e,1).times(t),T=!0,x(r)):(t.s=r.s,r=t),r};b.toNumber=function(){return+this};b.toOctal=function(t,e){return Qn(this,8,t,e)};b.toPower=b.pow=function(t){var e,r,n,i,s,a,o=this,u=o.constructor,l=+(t=new u(t));if(!o.d||!t.d||!o.d[0]||!t.d[0])return new u(K(+o,l));if(o=new u(o),o.eq(1))return o;if(n=u.precision,s=u.rounding,t.eq(1))return x(o,n,s);if(e=le(t.e/A),e>=t.d.length-1&&(r=l<0?-l:l)<=_l)return i=Ds(u,o,r,n),t.s<0?new u(1).div(i):x(i,n,s);if(a=o.s,a<0){if(e<t.d.length-1)return new u(NaN);if((t.d[e]&1)==0&&(a=1),o.e==0&&o.d[0]==1&&o.d.length==1)return o.s=a,o}return r=K(+o,l),e=r==0||!isFinite(r)?le(l*(Math.log("0."+ie(o.d))/Math.LN10+o.e+1)):new u(r+"").e,e>u.maxE+1||e<u.minE-1?new u(e>0?a/0:0):(T=!1,u.rounding=o.s=1,r=Math.min(12,(e+"").length),i=Jn(t.times(Xe(o,n+r)),n),i.d&&(i=x(i,n+5,1),Zt(i.d,n,s)&&(e=n+10,i=x(Jn(t.times(Xe(o,e+r)),e),e+5,1),+ie(i.d).slice(n+1,n+15)+1==1e14&&(i=x(i,n+1,0)))),i.s=a,T=!0,u.rounding=s,x(i,n,s))};b.toPrecision=function(t,e){var r,n=this,i=n.constructor;return t===void 0?r=Se(n,n.e<=i.toExpNeg||n.e>=i.toExpPos):(he(t,1,Ke),e===void 0?e=i.rounding:he(e,0,8),n=x(new i(n),t,e),r=Se(n,t<=n.e||n.e<=i.toExpNeg,t)),n.isNeg()&&!n.isZero()?"-"+r:r};b.toSignificantDigits=b.toSD=function(t,e){var r=this,n=r.constructor;return t===void 0?(t=n.precision,e=n.rounding):(he(t,1,Ke),e===void 0?e=n.rounding:he(e,0,8)),x(new n(r),t,e)};b.toString=function(){var t=this,e=t.constructor,r=Se(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()&&!t.isZero()?"-"+r:r};b.truncated=b.trunc=function(){return x(new this.constructor(this),this.e+1,1)};b.valueOf=b.toJSON=function(){var t=this,e=t.constructor,r=Se(t,t.e<=e.toExpNeg||t.e>=e.toExpPos);return t.isNeg()?"-"+r:r};function ie(t){var e,r,n,i=t.length-1,s="",a=t[0];if(i>0){for(s+=a,e=1;e<i;e++)n=t[e]+"",r=A-n.length,r&&(s+=Ye(r)),s+=n;a=t[e],n=a+"",r=A-n.length,r&&(s+=Ye(r))}else if(a===0)return"0";for(;a%10===0;)a/=10;return s+a}function he(t,e,r){if(t!==~~t||t<e||t>r)throw Error(Ze+t)}function Zt(t,e,r,n){var i,s,a,o;for(s=t[0];s>=10;s/=10)--e;return--e<0?(e+=A,i=0):(i=Math.ceil((e+1)/A),e%=A),s=K(10,A-e),o=t[i]%s|0,n==null?e<3?(e==0?o=o/100|0:e==1&&(o=o/10|0),a=r<4&&o==99999||r>3&&o==49999||o==5e4||o==0):a=(r<4&&o+1==s||r>3&&o+1==s/2)&&(t[i+1]/s/100|0)==K(10,e-2)-1||(o==s/2||o==0)&&(t[i+1]/s/100|0)==0:e<4?(e==0?o=o/1e3|0:e==1?o=o/100|0:e==2&&(o=o/10|0),a=(n||r<4)&&o==9999||!n&&r>3&&o==4999):a=((n||r<4)&&o+1==s||!n&&r>3&&o+1==s/2)&&(t[i+1]/s/1e3|0)==K(10,e-3)-1,a}function jr(t,e,r){for(var n,i=[0],s,a=0,o=t.length;a<o;){for(s=i.length;s--;)i[s]*=e;for(i[0]+=Xn.indexOf(t.charAt(a++)),n=0;n<i.length;n++)i[n]>r-1&&(i[n+1]===void 0&&(i[n+1]=0),i[n+1]+=i[n]/r|0,i[n]%=r)}return i.reverse()}function yl(t,e){var r,n,i;if(e.isZero())return e;n=e.d.length,n<32?(r=Math.ceil(n/3),i=(1/Xr(4,r)).toString()):(r=16,i="2.3283064365386962890625e-10"),t.precision+=r,e=Et(t,1,e.times(i),new t(1));for(var s=r;s--;){var a=e.times(e);e=a.times(a).minus(a).times(8).plus(1)}return t.precision-=r,e}var U=(function(){function t(n,i,s){var a,o=0,u=n.length;for(n=n.slice();u--;)a=n[u]*i+o,n[u]=a%s|0,o=a/s|0;return o&&n.unshift(o),n}function e(n,i,s,a){var o,u;if(s!=a)u=s>a?1:-1;else for(o=u=0;o<s;o++)if(n[o]!=i[o]){u=n[o]>i[o]?1:-1;break}return u}function r(n,i,s,a){for(var o=0;s--;)n[s]-=o,o=n[s]<i[s]?1:0,n[s]=o*a+n[s]-i[s];for(;!n[0]&&n.length>1;)n.shift()}return function(n,i,s,a,o,u){var l,c,d,f,h,p,m,g,_,w,y,k,S,R,F,re,ne,$e,Z,de,ye=n.constructor,P=n.s==i.s?1:-1,Y=n.d,O=i.d;if(!Y||!Y[0]||!O||!O[0])return new ye(!n.s||!i.s||(Y?O&&Y[0]==O[0]:!O)?NaN:Y&&Y[0]==0||!O?P*0:P/0);for(u?(h=1,c=n.e-i.e):(u=Ae,h=A,c=le(n.e/h)-le(i.e/h)),Z=O.length,ne=Y.length,_=new ye(P),w=_.d=[],d=0;O[d]==(Y[d]||0);d++);if(O[d]>(Y[d]||0)&&c--,s==null?(R=s=ye.precision,a=ye.rounding):o?R=s+(n.e-i.e)+1:R=s,R<0)w.push(1),p=!0;else{if(R=R/h+2|0,d=0,Z==1){for(f=0,O=O[0],R++;(d<ne||f)&&R--;d++)F=f*u+(Y[d]||0),w[d]=F/O|0,f=F%O|0;p=f||d<ne}else{for(f=u/(O[0]+1)|0,f>1&&(O=t(O,f,u),Y=t(Y,f,u),Z=O.length,ne=Y.length),re=Z,y=Y.slice(0,Z),k=y.length;k<Z;)y[k++]=0;de=O.slice(),de.unshift(0),$e=O[0],O[1]>=u/2&&++$e;do f=0,l=e(O,y,Z,k),l<0?(S=y[0],Z!=k&&(S=S*u+(y[1]||0)),f=S/$e|0,f>1?(f>=u&&(f=u-1),m=t(O,f,u),g=m.length,k=y.length,l=e(m,y,g,k),l==1&&(f--,r(m,Z<g?de:O,g,u))):(f==0&&(l=f=1),m=O.slice()),g=m.length,g<k&&m.unshift(0),r(y,m,k,u),l==-1&&(k=y.length,l=e(O,y,Z,k),l<1&&(f++,r(y,Z<k?de:O,k,u))),k=y.length):l===0&&(f++,y=[0]),w[d++]=f,l&&y[0]?y[k++]=Y[re]||0:(y=[Y[re]],k=1);while((re++<ne||y[0]!==void 0)&&R--);p=y[0]!==void 0}w[0]||w.shift()}if(h==1)_.e=c,ys=p;else{for(d=1,f=w[0];f>=10;f/=10)d++;_.e=d+c*h-1,x(_,o?s+_.e+1:s,a,p)}return _}})();function x(t,e,r,n){var i,s,a,o,u,l,c,d,f,h=t.constructor;e:if(e!=null){if(d=t.d,!d)return t;for(i=1,o=d[0];o>=10;o/=10)i++;if(s=e-i,s<0)s+=A,a=e,c=d[f=0],u=c/K(10,i-a-1)%10|0;else if(f=Math.ceil((s+1)/A),o=d.length,f>=o)if(n){for(;o++<=f;)d.push(0);c=u=0,i=1,s%=A,a=s-A+1}else break e;else{for(c=o=d[f],i=1;o>=10;o/=10)i++;s%=A,a=s-A+i,u=a<0?0:c/K(10,i-a-1)%10|0}if(n=n||e<0||d[f+1]!==void 0||(a<0?c:c%K(10,i-a-1)),l=r<4?(u||n)&&(r==0||r==(t.s<0?3:2)):u>5||u==5&&(r==4||n||r==6&&(s>0?a>0?c/K(10,i-a):0:d[f-1])%10&1||r==(t.s<0?8:7)),e<1||!d[0])return d.length=0,l?(e-=t.e+1,d[0]=K(10,(A-e%A)%A),t.e=-e||0):d[0]=t.e=0,t;if(s==0?(d.length=f,o=1,f--):(d.length=f+1,o=K(10,A-s),d[f]=a>0?(c/K(10,i-a)%K(10,a)|0)*o:0),l)for(;;)if(f==0){for(s=1,a=d[0];a>=10;a/=10)s++;for(a=d[0]+=o,o=1;a>=10;a/=10)o++;s!=o&&(t.e++,d[0]==Ae&&(d[0]=1));break}else{if(d[f]+=o,d[f]!=Ae)break;d[f--]=0,o=1}for(s=d.length;d[--s]===0;)d.pop()}return T&&(t.e>h.maxE?(t.d=null,t.e=NaN):t.e<h.minE&&(t.e=0,t.d=[0])),t}function Se(t,e,r){if(!t.isFinite())return Cs(t);var n,i=t.e,s=ie(t.d),a=s.length;return e?(r&&(n=r-a)>0?s=s.charAt(0)+"."+s.slice(1)+Ye(n):a>1&&(s=s.charAt(0)+"."+s.slice(1)),s=s+(t.e<0?"e":"e+")+t.e):i<0?(s="0."+Ye(-i-1)+s,r&&(n=r-a)>0&&(s+=Ye(n))):i>=a?(s+=Ye(i+1-a),r&&(n=r-i-1)>0&&(s=s+"."+Ye(n))):((n=i+1)<a&&(s=s.slice(0,n)+"."+s.slice(n)),r&&(n=r-a)>0&&(i+1===a&&(s+="."),s+=Ye(n))),s}function Yr(t,e){var r=t[0];for(e*=A;r>=10;r/=10)e++;return e}function Wr(t,e,r){if(e>wl)throw T=!0,r&&(t.precision=r),Error(vs);return x(new t(Vr),e,1,!0)}function Ne(t,e,r){if(e>Kn)throw Error(vs);return x(new t(Hr),e,r,!0)}function As(t){var e=t.length-1,r=e*A+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 Ye(t){for(var e="";t--;)e+="0";return e}function Ds(t,e,r,n){var i,s=new t(1),a=Math.ceil(n/A+4);for(T=!1;;){if(r%2&&(s=s.times(e),_s(s.d,a)&&(i=!0)),r=le(r/2),r===0){r=s.d.length-1,i&&s.d[r]===0&&++s.d[r];break}e=e.times(e),_s(e.d,a)}return T=!0,s}function bs(t){return t.d[t.d.length-1]&1}function Ts(t,e,r){for(var n,i,s=new t(e[0]),a=0;++a<e.length;){if(i=new t(e[a]),!i.s){s=i;break}n=s.cmp(i),(n===r||n===0&&s.s===r)&&(s=i)}return s}function Jn(t,e){var r,n,i,s,a,o,u,l=0,c=0,d=0,f=t.constructor,h=f.rounding,p=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?(T=!1,u=p):u=e,o=new f(.03125);t.e>-2;)t=t.times(o),d+=5;for(n=Math.log(K(2,d))/Math.LN10*2+5|0,u+=n,r=s=a=new f(1),f.precision=u;;){if(s=x(s.times(t),u,1),r=r.times(++c),o=a.plus(U(s,r,u,1)),ie(o.d).slice(0,u)===ie(a.d).slice(0,u)){for(i=d;i--;)a=x(a.times(a),u,1);if(e==null)if(l<3&&Zt(a.d,u-n,h,l))f.precision=u+=10,r=s=o=new f(1),c=0,l++;else return x(a,f.precision=p,h,T=!0);else return f.precision=p,a}a=o}}function Xe(t,e){var r,n,i,s,a,o,u,l,c,d,f,h=1,p=10,m=t,g=m.d,_=m.constructor,w=_.rounding,y=_.precision;if(m.s<0||!g||!g[0]||!m.e&&g[0]==1&&g.length==1)return new _(g&&!g[0]?-1/0:m.s!=1?NaN:g?0:m);if(e==null?(T=!1,c=y):c=e,_.precision=c+=p,r=ie(g),n=r.charAt(0),Math.abs(s=m.e)<15e14){for(;n<7&&n!=1||n==1&&r.charAt(1)>3;)m=m.times(t),r=ie(m.d),n=r.charAt(0),h++;s=m.e,n>1?(m=new _("0."+r),s++):m=new _(n+"."+r.slice(1))}else return l=Wr(_,c+2,y).times(s+""),m=Xe(new _(n+"."+r.slice(1)),c-p).plus(l),_.precision=y,e==null?x(m,y,w,T=!0):m;for(d=m,u=a=m=U(m.minus(1),m.plus(1),c,1),f=x(m.times(m),c,1),i=3;;){if(a=x(a.times(f),c,1),l=u.plus(U(a,new _(i),c,1)),ie(l.d).slice(0,c)===ie(u.d).slice(0,c))if(u=u.times(2),s!==0&&(u=u.plus(Wr(_,c+2,y).times(s+""))),u=U(u,new _(h),c,1),e==null)if(Zt(u.d,c-p,w,o))_.precision=c+=p,l=a=m=U(d.minus(1),d.plus(1),c,1),f=x(m.times(m),c,1),i=o=1;else return x(u,_.precision=y,w,T=!0);else return _.precision=y,u;u=l,i+=2}}function Cs(t){return String(t.s*t.s/0)}function zr(t,e){var r,n,i;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(i=e.length;e.charCodeAt(i-1)===48;--i);if(e=e.slice(n,i),e){if(i-=n,t.e=r=r-n-1,t.d=[],n=(r+1)%A,r<0&&(n+=A),n<i){for(n&&t.d.push(+e.slice(0,n)),i-=A;n<i;)t.d.push(+e.slice(n,n+=A));e=e.slice(n),n=A-e.length}else n-=i;for(;n--;)e+="0";t.d.push(+e),T&&(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 vl(t,e){var r,n,i,s,a,o,u,l,c;if(e.indexOf("_")>-1){if(e=e.replace(/(\d)_(?=\d)/g,"$1"),xs.test(e))return zr(t,e)}else if(e==="Infinity"||e==="NaN")return+e||(t.s=NaN),t.e=NaN,t.d=null,t;if(gl.test(e))r=16,e=e.toLowerCase();else if(ml.test(e))r=2;else if(bl.test(e))r=8;else throw Error(Ze+e);for(s=e.search(/p/i),s>0?(u=+e.slice(s+1),e=e.substring(2,s)):e=e.slice(2),s=e.indexOf("."),a=s>=0,n=t.constructor,a&&(e=e.replace(".",""),o=e.length,s=o-s,i=Ds(n,new n(r),s,s*2)),l=jr(e,r,Ae),c=l.length-1,s=c;l[s]===0;--s)l.pop();return s<0?new n(t.s*0):(t.e=Yr(l,c),t.d=l,T=!1,a&&(t=U(t,i,o*4)),u&&(t=t.times(Math.abs(u)<54?K(2,u):Kt.pow(2,u))),T=!0,t)}function kl(t,e){var r,n=e.d.length;if(n<3)return e.isZero()?e:Et(t,2,e,e);r=1.4*Math.sqrt(n),r=r>16?16:r|0,e=e.times(1/Xr(5,r)),e=Et(t,2,e,e);for(var i,s=new t(5),a=new t(16),o=new t(20);r--;)i=e.times(e),e=e.times(s.plus(i.times(a.times(i).minus(o))));return e}function Et(t,e,r,n,i){var s,a,o,u,l=1,c=t.precision,d=Math.ceil(c/A);for(T=!1,u=r.times(r),o=new t(n);;){if(a=U(o.times(u),new t(e++*e++),c,1),o=i?n.plus(a):n.minus(a),n=U(a.times(u),new t(e++*e++),c,1),a=o.plus(n),a.d[d]!==void 0){for(s=d;a.d[s]===o.d[s]&&s--;);if(s==-1)break}s=o,o=n,n=a,a=s,l++}return T=!0,a.d.length=d+1,a}function Xr(t,e){for(var r=t;--e;)r*=t;return r}function Ns(t,e){var r,n=e.s<0,i=Ne(t,t.precision,1),s=i.times(.5);if(e=e.abs(),e.lte(s))return qe=n?4:1,e;if(r=e.divToInt(i),r.isZero())qe=n?3:2;else{if(e=e.minus(r.times(i)),e.lte(s))return qe=bs(r)?n?2:3:n?4:1,e;qe=bs(r)?n?1:4:n?3:2}return e.minus(i).abs()}function Qn(t,e,r,n){var i,s,a,o,u,l,c,d,f,h=t.constructor,p=r!==void 0;if(p?(he(r,1,Ke),n===void 0?n=h.rounding:he(n,0,8)):(r=h.precision,n=h.rounding),!t.isFinite())c=Cs(t);else{for(c=Se(t),a=c.indexOf("."),p?(i=2,e==16?r=r*4-3:e==8&&(r=r*3-2)):i=e,a>=0&&(c=c.replace(".",""),f=new h(1),f.e=c.length-a,f.d=jr(Se(f),10,i),f.e=f.d.length),d=jr(c,10,i),s=u=d.length;d[--u]==0;)d.pop();if(!d[0])c=p?"0p+0":"0";else{if(a<0?s--:(t=new h(t),t.d=d,t.e=s,t=U(t,f,r,n,0,i),d=t.d,s=t.e,l=ys),a=d[r],o=i/2,l=l||d[r+1]!==void 0,l=n<4?(a!==void 0||l)&&(n===0||n===(t.s<0?3:2)):a>o||a===o&&(n===4||l||n===6&&d[r-1]&1||n===(t.s<0?8:7)),d.length=r,l)for(;++d[--r]>i-1;)d[r]=0,r||(++s,d.unshift(1));for(u=d.length;!d[u-1];--u);for(a=0,c="";a<u;a++)c+=Xn.charAt(d[a]);if(p){if(u>1)if(e==16||e==8){for(a=e==16?4:3,--u;u%a;u++)c+="0";for(d=jr(c,i,e),u=d.length;!d[u-1];--u);for(a=1,c="1.";a<u;a++)c+=Xn.charAt(d[a])}else c=c.charAt(0)+"."+c.slice(1);c=c+(s<0?"p":"p+")+s}else if(s<0){for(;++s;)c="0"+c;c="0."+c}else if(++s>u)for(s-=u;s--;)c+="0";else s<u&&(c=c.slice(0,s)+"."+c.slice(s))}c=(e==16?"0x":e==2?"0b":e==8?"0o":"")+c}return t.s<0?"-"+c:c}function _s(t,e){if(t.length>e)return t.length=e,!0}function El(t){return new this(t).abs()}function xl(t){return new this(t).acos()}function Al(t){return new this(t).acosh()}function Dl(t,e){return new this(t).plus(e)}function Tl(t){return new this(t).asin()}function Cl(t){return new this(t).asinh()}function Nl(t){return new this(t).atan()}function Sl(t){return new this(t).atanh()}function Ol(t,e){t=new this(t),e=new this(e);var r,n=this.precision,i=this.rounding,s=n+4;return!t.s||!e.s?r=new this(NaN):!t.d&&!e.d?(r=Ne(this,s,1).times(e.s>0?.25:.75),r.s=t.s):!e.d||t.isZero()?(r=e.s<0?Ne(this,n,i):new this(0),r.s=t.s):!t.d||e.isZero()?(r=Ne(this,s,1).times(.5),r.s=t.s):e.s<0?(this.precision=s,this.rounding=1,r=this.atan(U(t,e,s,1)),e=Ne(this,s,1),this.precision=n,this.rounding=i,r=t.s<0?r.minus(e):r.plus(e)):r=this.atan(U(t,e,s,1)),r}function Bl(t){return new this(t).cbrt()}function Il(t){return x(t=new this(t),t.e+1,2)}function Ml(t,e,r){return new this(t).clamp(e,r)}function Rl(t){if(!t||typeof t!="object")throw Error(Gr+"Object expected");var e,r,n,i=t.defaults===!0,s=["precision",1,Ke,"rounding",0,8,"toExpNeg",-kt,0,"toExpPos",0,kt,"maxE",0,kt,"minE",-kt,0,"modulo",0,9];for(e=0;e<s.length;e+=3)if(r=s[e],i&&(this[r]=Zn[r]),(n=t[r])!==void 0)if(le(n)===n&&n>=s[e+1]&&n<=s[e+2])this[r]=n;else throw Error(Ze+r+": "+n);if(r="crypto",i&&(this[r]=Zn[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(ks);else this[r]=!1;else throw Error(Ze+r+": "+n);return this}function Ll(t){return new this(t).cos()}function Fl(t){return new this(t).cosh()}function Ss(t){var e,r,n;function i(s){var a,o,u,l=this;if(!(l instanceof i))return new i(s);if(l.constructor=i,ws(s)){l.s=s.s,T?!s.d||s.e>i.maxE?(l.e=NaN,l.d=null):s.e<i.minE?(l.e=0,l.d=[0]):(l.e=s.e,l.d=s.d.slice()):(l.e=s.e,l.d=s.d?s.d.slice():s.d);return}if(u=typeof s,u==="number"){if(s===0){l.s=1/s<0?-1:1,l.e=0,l.d=[0];return}if(s<0?(s=-s,l.s=-1):l.s=1,s===~~s&&s<1e7){for(a=0,o=s;o>=10;o/=10)a++;T?a>i.maxE?(l.e=NaN,l.d=null):a<i.minE?(l.e=0,l.d=[0]):(l.e=a,l.d=[s]):(l.e=a,l.d=[s]);return}if(s*0!==0){s||(l.s=NaN),l.e=NaN,l.d=null;return}return zr(l,s.toString())}if(u==="string")return(o=s.charCodeAt(0))===45?(s=s.slice(1),l.s=-1):(o===43&&(s=s.slice(1)),l.s=1),xs.test(s)?zr(l,s):vl(l,s);if(u==="bigint")return s<0?(s=-s,l.s=-1):l.s=1,zr(l,s.toString());throw Error(Ze+s)}if(i.prototype=b,i.ROUND_UP=0,i.ROUND_DOWN=1,i.ROUND_CEIL=2,i.ROUND_FLOOR=3,i.ROUND_HALF_UP=4,i.ROUND_HALF_DOWN=5,i.ROUND_HALF_EVEN=6,i.ROUND_HALF_CEIL=7,i.ROUND_HALF_FLOOR=8,i.EUCLID=9,i.config=i.set=Rl,i.clone=Ss,i.isDecimal=ws,i.abs=El,i.acos=xl,i.acosh=Al,i.add=Dl,i.asin=Tl,i.asinh=Cl,i.atan=Nl,i.atanh=Sl,i.atan2=Ol,i.cbrt=Bl,i.ceil=Il,i.clamp=Ml,i.cos=Ll,i.cosh=Fl,i.div=$l,i.exp=ql,i.floor=Pl,i.hypot=Ul,i.ln=jl,i.log=zl,i.log10=Hl,i.log2=Vl,i.max=Wl,i.min=Gl,i.mod=Yl,i.mul=Xl,i.pow=Zl,i.random=Kl,i.round=Jl,i.sign=Ql,i.sin=eu,i.sinh=tu,i.sqrt=ru,i.sub=nu,i.sum=iu,i.tan=su,i.tanh=au,i.trunc=ou,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 i.config(t),i}function $l(t,e){return new this(t).div(e)}function ql(t){return new this(t).exp()}function Pl(t){return x(t=new this(t),t.e+1,3)}function Ul(){var t,e,r=new this(0);for(T=!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 T=!0,new this(1/0);r=e}return T=!0,r.sqrt()}function ws(t){return t instanceof Kt||t&&t.toStringTag===Es||!1}function jl(t){return new this(t).ln()}function zl(t,e){return new this(t).log(e)}function Vl(t){return new this(t).log(2)}function Hl(t){return new this(t).log(10)}function Wl(){return Ts(this,arguments,-1)}function Gl(){return Ts(this,arguments,1)}function Yl(t,e){return new this(t).mod(e)}function Xl(t,e){return new this(t).mul(e)}function Zl(t,e){return new this(t).pow(e)}function Kl(t){var e,r,n,i,s=0,a=new this(1),o=[];if(t===void 0?t=this.precision:he(t,1,Ke),n=Math.ceil(t/A),this.crypto)if(crypto.getRandomValues)for(e=crypto.getRandomValues(new Uint32Array(n));s<n;)i=e[s],i>=429e7?e[s]=crypto.getRandomValues(new Uint32Array(1))[0]:o[s++]=i%1e7;else if(crypto.randomBytes){for(e=crypto.randomBytes(n*=4);s<n;)i=e[s]+(e[s+1]<<8)+(e[s+2]<<16)+((e[s+3]&127)<<24),i>=214e7?crypto.randomBytes(4).copy(e,s):(o.push(i%1e7),s+=4);s=n/4}else throw Error(ks);else for(;s<n;)o[s++]=Math.random()*1e7|0;for(n=o[--s],t%=A,n&&t&&(i=K(10,A-t),o[s]=(n/i|0)*i);o[s]===0;s--)o.pop();if(s<0)r=0,o=[0];else{for(r=-1;o[0]===0;r-=A)o.shift();for(n=1,i=o[0];i>=10;i/=10)n++;n<A&&(r-=A-n)}return a.e=r,a.d=o,a}function Jl(t){return x(t=new this(t),t.e+1,this.rounding)}function Ql(t){return t=new this(t),t.d?t.d[0]?t.s:0*t.s:t.s||NaN}function eu(t){return new this(t).sin()}function tu(t){return new this(t).sinh()}function ru(t){return new this(t).sqrt()}function nu(t,e){return new this(t).sub(e)}function iu(){var t=0,e=arguments,r=new this(e[t]);for(T=!1;r.s&&++t<e.length;)r=r.plus(e[t]);return T=!0,x(r,this.precision,this.rounding)}function su(t){return new this(t).tan()}function au(t){return new this(t).tanh()}function ou(t){return x(t=new this(t),t.e+1,1)}b[Symbol.for("nodejs.util.inspect.custom")]=b.toString;b[Symbol.toStringTag]="Decimal";var Kt=b.constructor=Ss(Zn);Vr=new Kt(Vr);Hr=new Kt(Hr);var Os=Kt;var lu=20,uu=1,lt=1e6,Bs=1e6,cu=-7,du=21,fu=!1,Jt="[big.js] ",ut=Jt+"Invalid ",Zr=ut+"decimal places",hu=ut+"rounding mode",Is=Jt+"Division by zero",$={},Oe=void 0,pu=/^-?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i;function Ms(){function t(e){var r=this;if(!(r instanceof t))return e===Oe?Ms():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(ut+"value");e=e===0&&1/e<0?"-0":String(e)}mu(r,e)}r.constructor=t}return t.prototype=$,t.DP=lu,t.RM=uu,t.NE=cu,t.PE=du,t.strict=fu,t.roundDown=0,t.roundHalfUp=1,t.roundHalfEven=2,t.roundUp=3,t}function mu(t,e){var r,n,i;if(!pu.test(e))throw Error(ut+"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),i=e.length,n=0;n<i&&e.charAt(n)=="0";)++n;if(n==i)t.c=[t.e=0];else{for(;i>0&&e.charAt(--i)=="0";);for(t.e=r-n-1,t.c=[],r=0;n<=i;)t.c[r++]=+e.charAt(n++)}return t}function ct(t,e,r,n){var i=t.c;if(r===Oe&&(r=t.constructor.RM),r!==0&&r!==1&&r!==2&&r!==3)throw Error(hu);if(e<1)n=r===3&&(n||!!i[0])||e===0&&(r===1&&i[0]>=5||r===2&&(i[0]>5||i[0]===5&&(n||i[1]!==Oe))),i.length=1,n?(t.e=t.e-e+1,i[0]=1):i[0]=t.e=0;else if(e<i.length){if(n=r===1&&i[e]>=5||r===2&&(i[e]>5||i[e]===5&&(n||i[e+1]!==Oe||i[e-1]&1))||r===3&&(n||!!i[0]),i.length=e,n){for(;++i[--e]>9;)if(i[e]=0,e===0){++t.e,i.unshift(1);break}}for(e=i.length;!i[--e];)i.pop()}return t}function dt(t,e,r){var n=t.e,i=t.c.join(""),s=i.length;if(e)i=i.charAt(0)+(s>1?"."+i.slice(1):"")+(n<0?"e":"e+")+n;else if(n<0){for(;++n;)i="0"+i;i="0."+i}else if(n>0)if(++n>s)for(n-=s;n--;)i+="0";else n<s&&(i=i.slice(0,n)+"."+i.slice(n));else s>1&&(i=i.charAt(0)+"."+i.slice(1));return t.s<0&&r?"-"+i:i}$.abs=function(){var t=new this.constructor(this);return t.s=1,t};$.cmp=function(t){var e,r=this,n=r.c,i=(t=new r.constructor(t)).c,s=r.s,a=t.s,o=r.e,u=t.e;if(!n[0]||!i[0])return n[0]?s:i[0]?-a:0;if(s!=a)return s;if(e=s<0,o!=u)return o>u^e?1:-1;for(a=(o=n.length)<(u=i.length)?o:u,s=-1;++s<a;)if(n[s]!=i[s])return n[s]>i[s]^e?1:-1;return o==u?0:o>u^e?1:-1};$.div=function(t){var e=this,r=e.constructor,n=e.c,i=(t=new r(t)).c,s=e.s==t.s?1:-1,a=r.DP;if(a!==~~a||a<0||a>lt)throw Error(Zr);if(!i[0])throw Error(Is);if(!n[0])return t.s=s,t.c=[t.e=0],t;var o,u,l,c,d,f=i.slice(),h=o=i.length,p=n.length,m=n.slice(0,o),g=m.length,_=t,w=_.c=[],y=0,k=a+(_.e=e.e-t.e)+1;for(_.s=s,s=k<0?0:k,f.unshift(0);g++<o;)m.push(0);do{for(l=0;l<10;l++){if(o!=(g=m.length))c=o>g?1:-1;else for(d=-1,c=0;++d<o;)if(i[d]!=m[d]){c=i[d]>m[d]?1:-1;break}if(c<0){for(u=g==o?i:f;g;){if(m[--g]<u[g]){for(d=g;d&&!m[--d];)m[d]=9;--m[d],m[g]+=10}m[g]-=u[g]}for(;!m[0];)m.shift()}else break}w[y++]=c?l:++l,m[0]&&c?m[g]=n[h]||0:m=[n[h]]}while((h++<p||m[0]!==Oe)&&s--);return!w[0]&&y!=1&&(w.shift(),_.e--,k--),y>k&&ct(_,k,r.RM,m[0]!==Oe),_};$.eq=function(t){return this.cmp(t)===0};$.gt=function(t){return this.cmp(t)>0};$.gte=function(t){return this.cmp(t)>-1};$.lt=function(t){return this.cmp(t)<0};$.lte=function(t){return this.cmp(t)<1};$.minus=$.sub=function(t){var e,r,n,i,s=this,a=s.constructor,o=s.s,u=(t=new a(t)).s;if(o!=u)return t.s=-u,s.plus(t);var l=s.c.slice(),c=s.e,d=t.c,f=t.e;if(!l[0]||!d[0])return d[0]?t.s=-u:l[0]?t=new a(s):t.s=1,t;if(o=c-f){for((i=o<0)?(o=-o,n=l):(f=c,n=d),n.reverse(),u=o;u--;)n.push(0);n.reverse()}else for(r=((i=l.length<d.length)?l:d).length,o=u=0;u<r;u++)if(l[u]!=d[u]){i=l[u]<d[u];break}if(i&&(n=l,l=d,d=n,t.s=-t.s),(u=(r=d.length)-(e=l.length))>0)for(;u--;)l[e++]=0;for(u=e;r>o;){if(l[--r]<d[r]){for(e=r;e&&!l[--e];)l[e]=9;--l[e],l[r]+=10}l[r]-=d[r]}for(;l[--u]===0;)l.pop();for(;l[0]===0;)l.shift(),--f;return l[0]||(t.s=1,l=[f=0]),t.c=l,t.e=f,t};$.mod=function(t){var e,r=this,n=r.constructor,i=r.s,s=(t=new n(t)).s;if(!t.c[0])throw Error(Is);return r.s=t.s=1,e=t.cmp(r)==1,r.s=i,t.s=s,e?new n(r):(i=n.DP,s=n.RM,n.DP=n.RM=0,r=r.div(t),n.DP=i,n.RM=s,this.minus(r.times(t)))};$.neg=function(){var t=new this.constructor(this);return t.s=-t.s,t};$.plus=$.add=function(t){var e,r,n,i=this,s=i.constructor;if(t=new s(t),i.s!=t.s)return t.s=-t.s,i.minus(t);var a=i.e,o=i.c,u=t.e,l=t.c;if(!o[0]||!l[0])return l[0]||(o[0]?t=new s(i):t.s=i.s),t;if(o=o.slice(),e=a-u){for(e>0?(u=a,n=l):(e=-e,n=o),n.reverse();e--;)n.push(0);n.reverse()}for(o.length-l.length<0&&(n=l,l=o,o=n),e=l.length,r=0;e;o[e]%=10)r=(o[--e]=o[e]+l[e]+r)/10|0;for(r&&(o.unshift(r),++u),e=o.length;o[--e]===0;)o.pop();return t.c=o,t.e=u,t};$.pow=function(t){var e=this,r=new e.constructor("1"),n=r,i=t<0;if(t!==~~t||t<-Bs||t>Bs)throw Error(ut+"exponent");for(i&&(t=-t);t&1&&(n=n.times(e)),t>>=1,!!t;)e=e.times(e);return i?r.div(n):n};$.prec=function(t,e){if(t!==~~t||t<1||t>lt)throw Error(ut+"precision");return ct(new this.constructor(this),t,e)};$.round=function(t,e){if(t===Oe)t=0;else if(t!==~~t||t<-lt||t>lt)throw Error(Zr);return ct(new this.constructor(this),t+this.e+1,e)};$.sqrt=function(){var t,e,r,n=this,i=n.constructor,s=n.s,a=n.e,o=new i("0.5");if(!n.c[0])return new i(n);if(s<0)throw Error(Jt+"No square root");s=Math.sqrt(+dt(n,!0,!0)),s===0||s===1/0?(e=n.c.join(""),e.length+a&1||(e+="0"),s=Math.sqrt(e),a=((a+1)/2|0)-(a<0||a&1),t=new i((s==1/0?"5e":(s=s.toExponential()).slice(0,s.indexOf("e")+1))+a)):t=new i(s+""),a=t.e+(i.DP+=4);do r=t,t=o.times(r.plus(n.div(r)));while(r.c.slice(0,a).join("")!==t.c.slice(0,a).join(""));return ct(t,(i.DP-=4)+t.e+1,i.RM)};$.times=$.mul=function(t){var e,r=this,n=r.constructor,i=r.c,s=(t=new n(t)).c,a=i.length,o=s.length,u=r.e,l=t.e;if(t.s=r.s==t.s?1:-1,!i[0]||!s[0])return t.c=[t.e=0],t;for(t.e=u+l,a<o&&(e=i,i=s,s=e,l=a,a=o,o=l),e=new Array(l=a+o);l--;)e[l]=0;for(u=o;u--;){for(o=0,l=a+u;l>u;)o=e[l]+s[u]*i[l-u-1]+o,e[l--]=o%10,o=o/10|0;e[l]=o}for(o?++t.e:e.shift(),u=e.length;!e[--u];)e.pop();return t.c=e,t};$.toExponential=function(t,e){var r=this,n=r.c[0];if(t!==Oe){if(t!==~~t||t<0||t>lt)throw Error(Zr);for(r=ct(new r.constructor(r),++t,e);r.c.length<t;)r.c.push(0)}return dt(r,!0,!!n)};$.toFixed=function(t,e){var r=this,n=r.c[0];if(t!==Oe){if(t!==~~t||t<0||t>lt)throw Error(Zr);for(r=ct(new r.constructor(r),t+r.e+1,e),t=t+r.e+1;r.c.length<t;)r.c.push(0)}return dt(r,!1,!!n)};$[Symbol.for("nodejs.util.inspect.custom")]=$.toJSON=$.toString=function(){var t=this,e=t.constructor;return dt(t,t.e<=e.NE||t.e>=e.PE,!!t.c[0])};$.toNumber=function(){var t=+dt(this,!0,!0);if(this.constructor.strict===!0&&!this.eq(t.toString()))throw Error(Jt+"Imprecise conversion");return t};$.toPrecision=function(t,e){var r=this,n=r.constructor,i=r.c[0];if(t!==Oe){if(t!==~~t||t<1||t>lt)throw Error(ut+"precision");for(r=ct(new n(r),t,e);r.c.length<t;)r.c.push(0)}return dt(r,t<=r.e||r.e<=n.NE||r.e>=n.PE,!!i)};$.valueOf=function(){var t=this,e=t.constructor;if(e.strict===!0)throw Error(Jt+"valueOf disallowed");return dt(t,t.e<=e.NE||t.e>=e.PE,!0)};var gu=Ms(),Rs=gu;var ci={};ms(ci,{DecodeError:()=>ue,Decoder:()=>Te,EXT_TIMESTAMP:()=>ti,Encoder:()=>xt,ExtData:()=>De,ExtensionCodec:()=>Je,decode:()=>Vs,decodeArrayStream:()=>Gs,decodeAsync:()=>Ws,decodeMulti:()=>Hs,decodeMultiStream:()=>Ys,decodeTimestampExtension:()=>ai,decodeTimestampToTimeSpec:()=>si,encode:()=>Qr,encodeDateToTimeSpec:()=>ni,encodeTimeSpecToTimestamp:()=>ri,encodeTimestampExtension:()=>ii});function Ls(t){let e=t.length,r=0,n=0;for(;n<e;){let i=t.charCodeAt(n++);if((i&4294967168)===0){r++;continue}else if((i&4294965248)===0)r+=2;else{if(i>=55296&&i<=56319&&n<e){let s=t.charCodeAt(n);(s&64512)===56320&&(++n,i=((i&1023)<<10)+(s&1023)+65536)}(i&4294901760)===0?r+=3:r+=4}}return r}function bu(t,e,r){let n=t.length,i=r,s=0;for(;s<n;){let a=t.charCodeAt(s++);if((a&4294967168)===0){e[i++]=a;continue}else if((a&4294965248)===0)e[i++]=a>>6&31|192;else{if(a>=55296&&a<=56319&&s<n){let o=t.charCodeAt(s);(o&64512)===56320&&(++s,a=((a&1023)<<10)+(o&1023)+65536)}(a&4294901760)===0?(e[i++]=a>>12&15|224,e[i++]=a>>6&63|128):(e[i++]=a>>18&7|240,e[i++]=a>>12&63|128,e[i++]=a>>6&63|128)}e[i++]=a&63|128}}var _u=new TextEncoder,wu=50;function yu(t,e,r){_u.encodeInto(t,e.subarray(r))}function Fs(t,e,r){t.length>wu?yu(t,e,r):bu(t,e,r)}var vu=4096;function ei(t,e,r){let n=e,i=n+r,s=[],a="";for(;n<i;){let o=t[n++];if((o&128)===0)s.push(o);else if((o&224)===192){let u=t[n++]&63;s.push((o&31)<<6|u)}else if((o&240)===224){let u=t[n++]&63,l=t[n++]&63;s.push((o&31)<<12|u<<6|l)}else if((o&248)===240){let u=t[n++]&63,l=t[n++]&63,c=t[n++]&63,d=(o&7)<<18|u<<12|l<<6|c;d>65535&&(d-=65536,s.push(d>>>10&1023|55296),d=56320|d&1023),s.push(d)}else s.push(o);s.length>=vu&&(a+=String.fromCharCode(...s),s.length=0)}return s.length>0&&(a+=String.fromCharCode(...s)),a}var ku=new TextDecoder,Eu=200;function xu(t,e,r){let n=t.subarray(e,e+r);return ku.decode(n)}function $s(t,e,r){return r>Eu?xu(t,e,r):ei(t,e,r)}var De=class{type;data;constructor(e,r){this.type=e,this.data=r}};var ue=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 qs(t,e,r){let n=r/4294967296,i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function Kr(t,e,r){let n=Math.floor(r/4294967296),i=r;t.setUint32(e,n),t.setUint32(e+4,i)}function Jr(t,e){let r=t.getInt32(e),n=t.getUint32(e+4);return r*4294967296+n}function Ps(t,e){let r=t.getUint32(e),n=t.getUint32(e+4);return r*4294967296+n}var ti=-1,Au=4294967296-1,Du=17179869184-1;function ri({sec:t,nsec:e}){if(t>=0&&e>=0&&t<=Du)if(e===0&&t<=Au){let r=new Uint8Array(4);return new DataView(r.buffer).setUint32(0,t),r}else{let r=t/4294967296,n=t&4294967295,i=new Uint8Array(8),s=new DataView(i.buffer);return s.setUint32(0,e<<2|r&3),s.setUint32(4,n),i}else{let r=new Uint8Array(12),n=new DataView(r.buffer);return n.setUint32(0,e),Kr(n,4,t),r}}function ni(t){let e=t.getTime(),r=Math.floor(e/1e3),n=(e-r*1e3)*1e6,i=Math.floor(n/1e9);return{sec:r+i,nsec:n-i*1e9}}function ii(t){if(t instanceof Date){let e=ni(t);return ri(e)}else return null}function si(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),i=(r&3)*4294967296+n,s=r>>>2;return{sec:i,nsec:s}}case 12:{let r=Jr(e,4),n=e.getUint32(0);return{sec:r,nsec:n}}default:throw new ue(`Unrecognized data size for timestamp (expected 4, 8, or 12): ${t.length}`)}}function ai(t){let e=si(t);return new Date(e.sec*1e3+e.nsec/1e6)}var Us={type:ti,encode:ii,decode:ai};var Je=class t{static defaultCodec=new t;__brand;builtInEncoders=[];builtInDecoders=[];encoders=[];decoders=[];constructor(){this.register(Us)}register({type:e,encode:r,decode:n}){if(e>=0)this.encoders[e]=r,this.decoders[e]=n;else{let i=-1-e;this.builtInEncoders[i]=r,this.builtInDecoders[i]=n}}tryToEncode(e,r){for(let n=0;n<this.builtInEncoders.length;n++){let i=this.builtInEncoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=-1-n;return new De(a,s)}}}for(let n=0;n<this.encoders.length;n++){let i=this.encoders[n];if(i!=null){let s=i(e,r);if(s!=null){let a=n;return new De(a,s)}}}return e instanceof De?e:null}decode(e,r,n){let i=r<0?this.builtInDecoders[-1-r]:this.decoders[r];return i?i(e,r,n):new De(r,e)}};function Tu(t){return t instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer}function Qt(t){return t instanceof Uint8Array?t:ArrayBuffer.isView(t)?new Uint8Array(t.buffer,t.byteOffset,t.byteLength):Tu(t)?new Uint8Array(t):Uint8Array.from(t)}var Cu=100,Nu=2048,xt=class t{extensionCodec;context;useBigInt64;maxDepth;initialBufferSize;sortKeys;forceFloat32;ignoreUndefined;forceIntegerToFloat;pos;view;bytes;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Je.defaultCodec,this.context=e?.context,this.useBigInt64=e?.useBigInt64??!1,this.maxDepth=e?.maxDepth??Cu,this.initialBufferSize=e?.initialBufferSize??Nu,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),i=new DataView(r);n.set(this.bytes),this.view=i,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=Ls(e);this.ensureBufferSizeToWrite(5+n),this.writeStringHeader(n),Fs(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=Qt(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 i of e)this.doEncode(i,r+1)}countWithoutUndefined(e,r){let n=0;for(let i of r)e[i]!==void 0&&n++;return n}encodeMap(e,r){let n=Object.keys(e);this.sortKeys&&n.sort();let i=this.ignoreUndefined?this.countWithoutUndefined(e,n):n.length;if(i<16)this.writeU8(128+i);else if(i<65536)this.writeU8(222),this.writeU16(i);else if(i<4294967296)this.writeU8(223),this.writeU32(i);else throw new Error(`Too large map object: ${i}`);for(let s of n){let a=e[s];this.ignoreUndefined&&a===void 0||(this.encodeString(s),this.doEncode(a,r+1))}}encodeExtension(e){if(typeof e.data=="function"){let n=e.data(this.pos+6),i=n.length;if(i>=4294967296)throw new Error(`Too large extension object: ${i}`);this.writeU8(201),this.writeU32(i),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),qs(this.view,this.pos,e),this.pos+=8}writeI64(e){this.ensureBufferSizeToWrite(8),Kr(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 Qr(t,e){return new xt(e).encodeSharedRef(t)}function en(t){return`${t<0?"-":""}0x${Math.abs(t).toString(16).padStart(2,"0")}`}var Su=16,Ou=16,tn=class{hit=0;miss=0;caches;maxKeyLength;maxLengthPerKey;constructor(e=Su,r=Ou){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 i=this.caches[n-1];e:for(let s of i){let a=s.bytes;for(let o=0;o<n;o++)if(a[o]!==e[r+o])continue e;return s.str}return null}store(e,r){let n=this.caches[e.length-1],i={bytes:e,str:r};n.length>=this.maxLengthPerKey?n[Math.random()*n.length|0]=i:n.push(i)}decode(e,r,n){let i=this.find(e,r,n);if(i!=null)return this.hit++,i;this.miss++;let s=ei(e,r,n),a=Uint8Array.prototype.slice.call(e,r,r+n);return this.store(a,s),s}};var oi="array",rr="map_key",zs="map_value",Bu=t=>{if(typeof t=="string"||typeof t=="number")return t;throw new ue("The type of key must be string or number but "+typeof t)},li=class{stack=[];stackHeadPosition=-1;get length(){return this.stackHeadPosition+1}top(){return this.stack[this.stackHeadPosition]}pushArrayState(e){let r=this.getUninitializedStateFromPool();r.type=oi,r.position=0,r.size=e,r.array=new Array(e)}pushMapState(e){let r=this.getUninitializedStateFromPool();r.type=rr,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===oi){let n=e;n.size=0,n.array=void 0,n.position=0,n.type=void 0}if(e.type===rr||e.type===zs){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}},tr=-1,ui=new DataView(new ArrayBuffer(0)),Iu=new Uint8Array(ui.buffer);try{ui.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 js=new RangeError("Insufficient data"),Mu=new tn,Te=class t{extensionCodec;context;useBigInt64;rawStrings;maxStrLength;maxBinLength;maxArrayLength;maxMapLength;maxExtLength;keyDecoder;mapKeyConverter;totalPos=0;pos=0;view=ui;bytes=Iu;headByte=tr;stack=new li;entered=!1;constructor(e){this.extensionCodec=e?.extensionCodec??Je.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:Mu,this.mapKeyConverter=e?.mapKeyConverter??Bu}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=tr,this.stack.reset()}setBuffer(e){let r=Qt(e);this.bytes=r,this.view=new DataView(r.buffer,r.byteOffset,r.byteLength),this.pos=0}appendBuffer(e){if(this.headByte===tr&&!this.hasRemaining(1))this.setBuffer(e);else{let r=this.bytes.subarray(this.pos),n=Qt(e),i=new Uint8Array(r.length+n.length);i.set(r),i.set(n,r.length),this.setBuffer(i)}}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(u){if(!(u instanceof RangeError))throw u}this.totalPos+=this.pos}if(r){if(this.hasRemaining(1))throw this.createExtraByteError(this.totalPos);return n}let{headByte:i,pos:s,totalPos:a}=this;throw new RangeError(`Insufficient data in parsing ${en(i)} at ${a} (${s} 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,i=-1;for await(let s of e){if(r&&i===0)throw this.createExtraByteError(this.totalPos);this.appendBuffer(s),n&&(i=this.readArraySize(),n=!1,this.complete());try{for(;yield this.doDecodeSync(),--i!==0;);}catch(a){if(!(a instanceof RangeError))throw a}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 i=e-128;if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e<160){let i=e-144;if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else{let i=e-160;r=this.decodeString(i,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 i=this.lookU8();r=this.decodeString(i,1)}else if(e===218){let i=this.lookU16();r=this.decodeString(i,2)}else if(e===219){let i=this.lookU32();r=this.decodeString(i,4)}else if(e===220){let i=this.readU16();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===221){let i=this.readU32();if(i!==0){this.pushArrayState(i),this.complete();continue e}else r=[]}else if(e===222){let i=this.readU16();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===223){let i=this.readU32();if(i!==0){this.pushMapState(i),this.complete();continue e}else r={}}else if(e===196){let i=this.lookU8();r=this.decodeBinary(i,1)}else if(e===197){let i=this.lookU16();r=this.decodeBinary(i,2)}else if(e===198){let i=this.lookU32();r=this.decodeBinary(i,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 i=this.lookU8();r=this.decodeExtension(i,1)}else if(e===200){let i=this.lookU16();r=this.decodeExtension(i,2)}else if(e===201){let i=this.lookU32();r=this.decodeExtension(i,4)}else throw new ue(`Unrecognized type byte: ${en(e)}`);this.complete();let n=this.stack;for(;n.length>0;){let i=n.top();if(i.type===oi)if(i.array[i.position]=r,i.position++,i.position===i.size)r=i.array,n.release(i);else continue e;else if(i.type===rr){if(r==="__proto__")throw new ue("The key __proto__ is not allowed");i.key=this.mapKeyConverter(r),i.type=zs;continue e}else if(i.map[i.key]=r,i.readCount++,i.readCount===i.size)r=i.map,n.release(i);else{i.key=null,i.type=rr;continue e}}return r}}readHeadByte(){return this.headByte===tr&&(this.headByte=this.readU8()),this.headByte}complete(){this.headByte=tr}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 ue(`Unrecognized array type byte: ${en(e)}`)}}}pushMapState(e){if(e>this.maxMapLength)throw new ue(`Max length exceeded: map length (${e}) > maxMapLengthLength (${this.maxMapLength})`);this.stack.pushMapState(e)}pushArrayState(e){if(e>this.maxArrayLength)throw new ue(`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 ue(`Max length exceeded: UTF-8 byte length (${e}) > maxStrLength (${this.maxStrLength})`);if(this.bytes.byteLength<this.pos+r+e)throw js;let n=this.pos+r,i;return this.stateIsMapKey()&&this.keyDecoder?.canBeCached(e)?i=this.keyDecoder.decode(this.bytes,n,e):i=$s(this.bytes,n,e),this.pos+=r+e,i}stateIsMapKey(){return this.stack.length>0?this.stack.top().type===rr:!1}decodeBinary(e,r){if(e>this.maxBinLength)throw new ue(`Max length exceeded: bin length (${e}) > maxBinLength (${this.maxBinLength})`);if(!this.hasRemaining(e+r))throw js;let n=this.pos+r,i=this.bytes.subarray(n,n+e);return this.pos+=r+e,i}decodeExtension(e,r){if(e>this.maxExtLength)throw new ue(`Max length exceeded: ext length (${e}) > maxExtLength (${this.maxExtLength})`);let n=this.view.getInt8(this.pos+r),i=this.decodeBinary(e,r+1);return this.extensionCodec.decode(i,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=Ps(this.view,this.pos);return this.pos+=8,e}readI64(){let e=Jr(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 Vs(t,e){return new Te(e).decode(t)}function Hs(t,e){return new Te(e).decodeMulti(t)}function Ru(t){return t[Symbol.asyncIterator]!=null}async function*Lu(t){let e=t.getReader();try{for(;;){let{done:r,value:n}=await e.read();if(r)return;yield n}}finally{e.releaseLock()}}function rn(t){return Ru(t)?t:Lu(t)}async function Ws(t,e){let r=rn(t);return new Te(e).decodeAsync(r)}function Gs(t,e){let r=rn(t);return new Te(e).decodeArrayStream(r)}function Ys(t,e){let r=rn(t);return new Te(e).decodeStream(r)}var kn=gs(Bi(),1),Ii=Os,Mi=Rs,Re=ci,Qa=kn.DOMParser,eo=kn.XMLSerializer;var to=Re!==null;function ro(){if(!to)throw new Error("@msgpack/msgpack is required for MessagePack support. Install with: npm install @msgpack/msgpack")}var no=Rd();function Rd(){if(!to)return null;let t=new TextEncoder,e=new TextDecoder,r=new Re.ExtensionCodec;return r.register({type:-1,encode:n=>{if(n instanceof Date){let i=gt(n);if(i==="D"||i==="H")return null}return Re.encodeTimestampExtension(n)},decode:n=>Re.decodeTimestampExtension(n)}),r.register({type:1,encode:n=>oe(n)?t.encode(n.toString()):null,decode:n=>kr(e.decode(n))}),r.register({type:2,encode:n=>{if(n instanceof Date&>(n)==="D"){let i=n.getUTCFullYear(),s=String(n.getUTCMonth()+1).padStart(2,"0"),a=String(n.getUTCDate()).padStart(2,"0");return t.encode(`${i}-${s}-${a}`)}return null},decode:n=>new Date(e.decode(n)+"T00:00:00.000Z")}),r.register({type:3,encode:n=>{if(n instanceof Date&>(n)==="H"){let i=String(n.getUTCHours()).padStart(2,"0"),s=String(n.getUTCMinutes()).padStart(2,"0"),a=String(n.getUTCSeconds()).padStart(2,"0"),o=String(n.getUTCMilliseconds()).padStart(3,"0");return t.encode(`${i}:${s}:${a}.${o}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf("."),a=s>=0?i.substring(0,s):i,o=s>=0?i.substring(s+1):"0",[u,l,c]=a.split(":"),d=Math.round(+o.substring(0,3));return new Date(Date.UTC(1970,0,1,+u,+l,+c,d))}}),r.register({type:4,encode:n=>{let i=Ri(n);if(i!==null){let[s,a]=i;return t.encode(`${s}:${a(n)}`)}return null},decode:n=>{let i=e.decode(n),s=i.indexOf(":"),a=i.slice(0,s),o=i.slice(s+1),u=st[a];if(u!==void 0){let[,l]=u;return l(o)}return`${o}::${a}`}}),r}function io(t){return ro(),Re.encode(t,{extensionCodec:no})}function so(t){return ro(),Re.decode(t,{extensionCodec:no})}function xn(t,e=!1){let r=An(t);if(r===null)return[!1,String(t)];let[n,i,s]=r;return s&&!e?[!1,String(t)]:[!0,`${i(t)}::${n}`]}function Li(t){if(!t.includes("::"))return[!1,t];let e=t.lastIndexOf("::"),r=t.slice(0,e),n=t.slice(e+2),i=st[n];if(i===void 0)return[!1,t];let[,s]=i;return[!0,s(r)]}function En(t,e,r){if(t!==null&&typeof t=="object"&&!Array.isArray(t)){let n={};for(let[i,s]of Object.entries(t))n[i]=En(s,e,r);return n}return Array.isArray(t)?t.map(n=>En(n,e,r)):r(t)?e(t):t}function Fi(t){let e=An(t);if(e!==null){let[r,n,i]=e;return i?[t,!1]:[`${n(t)}::${r}`,!0]}if(Array.isArray(t)){let r=!1;return[t.map(i=>{let[s,a]=Fi(i);return a&&(r=!0),s}),r]}if(t!==null&&typeof t=="object"){let r=!1,n={};for(let[i,s]of Object.entries(t)){let[a,o]=Fi(s);o&&(r=!0),n[i]=a}return[n,r]}return[t,!1]}function Ld(t,e=!1){let[r,n]=xn(t,e);if(r)return n;let[i,s]=Fi(t),a=JSON.stringify(i);return s?`${a}::JS`:a}function Fd(t){return JSON.stringify(t)}function $d(t){if(!Re)throw new Error("@msgpack/msgpack is required for MessagePack support");return Re.encode(t)}function be(t,e=null,{raw:r=!1,qs:n=!1,_forceSuffix:i=!1}={}){if(n)return`${oo(t)}::QS`;if(r){if(e===null||e==="json")return Fd(t);if(e==="msgpack")return $d(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 s=Ld(t,i);return e==="json"?`"${s}"`:s}else{if(e==="xml")return`<?xml version="1.0" ?><tytx_root>${ao(t)}</tytx_root>`;if(e==="msgpack")return io(t);throw new Error(`Unknown transport: ${e}`)}}var zt,$i;typeof window<"u"&&window.DOMParser?(zt=window.DOMParser,$i=window.XMLSerializer):(zt=Qa,$i=eo);function lo(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 uo(t,e,r){let n=t.createElement(e),i=r.attrs||{},s=r.value;for(let[a,o]of Object.entries(i))n.setAttribute(a,be(o,null,{_forceSuffix:!0}));if(Array.isArray(s))for(let a of s)if(lo(a)){let[o]=Object.keys(a),u=a[o],l=uo(t,o,u);n.appendChild(l)}else{n.textContent=be(s);break}else n.textContent=be(s);return n}function ao(t){if(!zt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");if(lo(t)){let[e]=Object.keys(t),r=t[e],n=new zt().parseFromString("<root/>","text/xml"),i=uo(n,e,r);return new $i().serializeToString(i)}else return be(t)}function qi(t){let e={};for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=X(i.value)}let r=[];for(let n=0;n<t.childNodes.length;n++){let i=t.childNodes[n];i.nodeType===1&&r.push(i)}if(r.length>0)if(r.length===1){let n=r[0],i=qi(n);return{attrs:e,value:{[n.tagName]:i}}}else{let n=[];for(let i of r){let s=qi(i);n.push({[i.tagName]:s})}return{attrs:e,value:n}}return{attrs:e,value:X(t.textContent)}}function co(t){if(!zt)throw new Error("XML support requires @xmldom/xmldom package in Node.js");let n=new zt().parseFromString(t,"text/xml").documentElement;if(n.tagName==="tytx_root"){let s=null;for(let a=0;a<n.childNodes.length;a++)if(n.childNodes[a].nodeType===1){s=n.childNodes[a];break}if(!s)return X(n.textContent);n=s}let i=qi(n);return{[n.tagName]:i}}function qd(t){return typeof t=="string"}function Pd(t){let[e,r]=Li(t);if(e)return r;let n=t;n.endsWith("::JS")&&(n=n.slice(0,-4));let i;try{i=JSON.parse(n)}catch{return t}return En(i,Ud,qd)}function Ud(t){return t.includes("::")?Li(t)[1]:t}function jd(t){let e=co(t);return typeof e=="string"?X(e):e}function zd(t){return so(t)}function X(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)),Pd(r)}else{if(e==="xml")return jd(t);if(e==="msgpack")return zd(t);throw new Error(`Unknown transport: ${e}`)}}function oo(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[i,s]=xn(n,!0);i?e.push(`${r}=${s}`):e.push(`${r}=${n}`)}return e.join("&")}throw new TypeError(`toQs expects object or array, got ${typeof t}`)}function fo(t){if(!t)return[];let e=t.split("&"),r=e.map(a=>a.includes("=")),n=r.every(Boolean),i=!r.some(Boolean);if(!n&&!i)throw new Error("QS format error: mixed items with and without '='");if(i)return e.map(a=>X(a));let s={};for(let a of e){let o=a.indexOf("="),u=a.slice(0,o),l=a.slice(o+1);s[u]=X(l)}return s}var po=Ii||Mi||Number,Vd=Ii?"decimal.js":Mi?"big.js":"number";function kr(t){return new po(t)}function oe(t){return Vd==="number"?!1:t instanceof po}function gt(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 Hd(t){return t.toString()}function Wd(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 Gd(t){return t.toISOString()}function Yd(t){let e=String(t.getUTCHours()).padStart(2,"0"),r=String(t.getUTCMinutes()).padStart(2,"0"),n=String(t.getUTCSeconds()).padStart(2,"0"),i=String(t.getUTCMilliseconds()).padStart(3,"0");return`${e}:${r}:${n}.${i}`}function Xd(t){return t?"true":"false"}function Zd(t){return t.toString()}function Kd(t){return t.toString()}function Jd(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 Dn=[],Pi=new Map;function Ri(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,i,s]of Dn)if(r.prototype===e)return[n,i,s];return null}function An(t){if(t===null)return["NN",()=>"",!0];if(oe(t))return["N",Hd,!1];if(t instanceof Uint8Array)return["RAW",Jd,!1];if(t instanceof Date){let e=gt(t);return e==="D"?["D",Wd,!1]:e==="H"?["H",Yd,!1]:["DHZ",Gd,!1]}return typeof t=="boolean"?["B",Xd,!0]:typeof t=="number"?Number.isInteger(t)?["L",Zd,!0]:["R",Kd,!0]:Ri(t)}function Qd(t){return kr(t)}function ef(t){let[e,r,n]=t.split("-").map(Number);return new Date(Date.UTC(e,r-1,n,0,0,0,0))}function ho(t){return new Date(t)}function tf(t){let[e,r,n]=t.split(":"),[i,s]=n.split(".");return new Date(Date.UTC(1970,0,1,Number(e),Number(r),Number(i),Number(s||0)))}function rf(t){return t.toLowerCase()==="true"}function nf(t){return parseInt(t,10)}function sf(t){return parseFloat(t)}function af(t){return t}function of(t){return null}var lf=/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/;function uf(t){if(!lf.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 cf(t){return fo(t)}var df=/^[A-Z]+$/,st={N:[Object,Qd],D:[Date,ef],DH:[Date,ho],DHZ:[Date,ho],H:[Date,tf],L:[Number,nf],R:[Number,sf],T:[String,af],B:[Boolean,rf],QS:[Object,cf],NN:[null,of],RAW:[Uint8Array,uf]};function Er(t){return Object.hasOwn(st,t)?st[t][0]:null}function Ui(t,e,r,n,i=!1){if(typeof e!="string"||!df.test(e))throw new Error(`TYTX suffix '${e}' is invalid: expected uppercase ASCII letters only`);let s=st[e];if(s!==void 0&&s[0]!==t){let a=s[0]===null?"null":s[0].name;throw new Error(`TYTX suffix '${e}' is already registered for ${a}`)}Dn=Dn.filter(([a])=>a!==t),Dn.push([t,e,r,i]),st[e]=[t,n]}function xr(t,e){Pi.set(t,e)}function ze(t){return Pi.has(t)?Pi.get(t):{}}var Ar=class{constructor(e,r){this.store=e,this.format=r}read(e,r=this.store.getRows()){return r.map(n=>({node:n,cells:e.map(i=>i.check?"":ji(this.store.value(n,i.field),i,this.format))}))}};function ji(t,e,r){if(t==null)return"";let{dtype:n,format:i}=e;if(n==="T"&&typeof t!="string"||n==="B"&&typeof t!="boolean")throw new TypeError(`grid ${e.field} does not match ${n}`);if(typeof t=="string"||typeof t=="boolean"){if(n&&!["T","B"].includes(n)||i!=null)throw new TypeError(`grid ${e.field} requires a typed numeric or temporal value`);return String(t)}if(t instanceof Date||i!=null)return r(t,{dtype:n,pattern:i??"short"});if(n&&!["L","R","N"].includes(n))throw new TypeError(`grid ${e.field} does not match ${n}`);if(n==="L"&&!Number.isInteger(t))throw new TypeError("grid L requires an integer");if(typeof t=="number"&&Number.isFinite(t)||oe(t)&&t.isFinite())return String(t);throw new TypeError(`grid ${e.field} requires a scalar value`)}function at(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 mo=/^\{(\??[A-Za-z_][A-Za-z0-9_]*|\?)?\}/;function zi(t,e){let r="",n=!1;for(let i=0;i<t.length;){if(t[i]!=="{"&&t[i]!=="}"){r+=t[i++];continue}let s=t.slice(i).match(mo);if(!s)throw new SyntaxError("Invalid pointer template placeholder");let a=s[1]??"",o=a.startsWith("?"),u=e(o?a.slice(1):a);u==null||u===""&&!o?n=!0:r+=String(u),i+=s[0].length}return n?null:r}function Vi(t){let e=[],r=new Set,n="",i=!0;for(let s=0;s<t.length;){let a=s,o=t[s];if(o==='"'||o==="'"||o==="`"){for(s++;s<t.length;){if(t[s]==="\\"){s+=2;continue}if(t[s++]===o)break}n+=t.slice(a,s),i=!1;continue}if(t.startsWith("//",s)){s=t.indexOf(`
|
|
13
|
+
`,s),s<0&&(s=t.length),n+=t.slice(a,s);continue}if(t.startsWith("/*",s)){let c=t.indexOf("*/",s+2);s=c<0?t.length:c+2,n+=t.slice(a,s);continue}if(o==="/"&&i){let c=!1;for(s++;s<t.length;){let d=t[s++];if(d==="\\"){s++;continue}if(d==="[")c=!0;else if(d==="]")c=!1;else if(d==="/"&&!c)break}for(;/[a-z]/i.test(t[s]??"")&&s<t.length;)s++;n+=t.slice(a,s),i=!1;continue}let u=o==="{"?t.slice(s).match(mo):null;if(u){let c=u[1]??"";if(c.startsWith("?"))throw new SyntaxError("Optional slots are supported in pointer templates only");n+=`_pointerValues[${e.length}]`,e.push(c),s+=u[0].length,i=!1;continue}let l=t.slice(s).match(/^[A-Za-z_$][\w$]*/);if(l){r.add(l[0]),n+=l[0],s+=l[0].length,i=["return","typeof","void","delete","new","in","instanceof","yield","await"].includes(l[0]);continue}n+=o,s++,/\s/.test(o)||(i=/[([{,:;=!?&|+*%~<>\/-]/.test(o))}return{text:n,slots:e,identifiers:r}}function go(t,e,r=()=>null){let n=new Map,i=[],s=a=>{if(n.has(a))return n.get(a);if(!t.has(a))throw new Error(`Referenced Source attribute '${a}' does not exist`);if(i.includes(a))throw new Error(`Cyclic attribute dependency: ${[...i,a].join(" -> ")}`);i.push(a);try{let o=t.get(a),u=typeof a=="string"?at(o):null,l=e.get(a);if(u){let c=d=>d?s(d):e.get(a);if(u.expression){let d=Vi(u.body);l=r(a,o,d,d.slots.map(c))}else l=zi(u.body,c),e.get(a)==null&&(l=null)}return n.set(a,l),l}finally{i.pop()}};return new Map([...t.keys()].map(a=>[a,s(a)]))}function Hi(t,e){let r=new Map([...Object.entries(t.getAttr()),...t.fixedAttrItems()]),n=new Set,i=[],s=a=>{let o=at(a);if(!o)return;let u=[];o.expression?u.push(...Vi(o.body).slots):zi(o.body,l=>(u.push(l),""));for(let l of u.filter(Boolean)){if(!r.has(l))throw new Error(`Referenced Source attribute '${l}' does not exist`);if(i.includes(l))throw new Error(`Cyclic attribute dependency: ${[...i,l].join(" -> ")}`);n.has(l)||(i.push(l),s(r.get(l)),i.pop(),n.add(l))}};return s(e),n}var bo={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 hf(t){let e=t._retryPolicy;return e==null?null:typeof e=="string"?bo[e]||null:e}function pf(t,e){return e.some(r=>r==="Error"?!0:t.name===r||t.constructor.name===r)}function mf(t){return new Promise(e=>setTimeout(e,t))}async function gf(t,e){if(!e)return t();let r=e.maxAttempts||3,n=e.delay||1,i=e.backoff||2,s=e.jitter!==!1,a=e.on||["Error"],o=null,u=n*1e3;for(let l=0;l<r;l++)try{let c=t();return c instanceof Promise?await c:c}catch(c){if(o=c,l<r-1&&pf(c,a)){let d=u;s&&(d*=1+Math.random()*.1),await mf(d),u*=i}else throw c}throw o}var ee=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 s of["interval","reactive"])if(Object.hasOwn(n,s))throw new TypeError(`Removed resolver option: ${s}. 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 i=this.constructor.internalParams;for(let[s,a]of Object.entries(n))i.has(s)||(this._kw[s]=a);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 i=this._buildEffectiveKw();if(Object.keys(n).length>0)return this._load({...i,...n},a=>this._prepareValue(a));let s=this._computeEffectiveFingerprint(i);return s===this._lastEffectiveFingerprint&&!this.expired?this.cachedValue:(this._lastEffectiveFingerprint=s,this._load(i,a=>this._finalize(a)))}_load(e,r){let n=hf(this),i=()=>this.load(e);if(n)return gf(i,n).then(r);let s=i();return s&&typeof s.then=="function"?s.then(r):r(s)}_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}};ee._BagClass=null;var Dr=class extends ee{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 Ve=class t{constructor(e,r,n=null,i=null,s=null,a=null,o=null,u=!0){this.label=r,this._value=null,this._attr={},this._parentBag=null,this._resolver=null,this._nodeSubscribers={},this._onChangedValue=null,this.nodeTag=a,this.xmlTag=o,this._compiled=null,this.parentBag=e,i&&this.setAttr(i,!1,!0,u),n!==null&&this.setValue(n,!1),s&&(this.resolver=s)}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 i=X(`${r}::QS`);if(Array.isArray(i)){let s=i.length?i:Object.keys(this._attr),a=s.map(u=>{let l=this.getAttr(u);return!e&&l instanceof ee?l.resolve():l}),o=u=>i.length===0?Object.fromEntries(s.map((l,c)=>[l,u[c]])):u.length===1?u[0]:u;return a.some(u=>u&&typeof u.then=="function")?Promise.all(a).then(o):o(a)}else{if(!this._resolver)throw new Error("Cannot use kwargs syntax without resolver");n={...n,...i}}}return this._resolver!==null?this._resolver.resolve({static:e,...n}):this._value}setValue(e,r=!0,n=null,i=null,s=!0,a=null,o=!1){e instanceof ee?(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 u=this._value;u!==e&&u?.parentNode===this&&u.setBackref(),this._value=e;let l=u!==this._value,c=r??!0,d=null;if(n!==null){let h={...this._attr};this.setAttr(n,!1,i,s);let p=this._buildAttrDiff(h,this._attr);d=Object.keys(p).length>0?p:null}r=c&&(l||d!==null);let f=d?l?"upd_value_attr":"upd_attrs":"upd_value";if(this._onChangedValue&&this._onChangedValue(this,e,u,c),r){let h=d!==null?{oldvalue:u,attrs_diff:d}:{oldvalue:u};for(let p of Object.values(this._nodeSubscribers))p({node:this,info:h,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,u,d,a,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 i=this._value,s={...this._attr},a=this.resolver;a&&a._node===this&&(a._node=null),this.resolver=n,this.setValue(r,!1,{...e.attr},!1,!1,null);let o=this._buildAttrDiff(s,this._attr),u=Object.keys(o).length?o:null,l=i!==r||a!==n;if(l||u){let c=u?l?"upd_value_attr":"upd_attrs":"upd_value",d=u?{oldvalue:i,attrs_diff:u}:{oldvalue:i};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,i,u)}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={},i=new Set([...Object.keys(e),...Object.keys(r)]);for(let s of i){let a=s in e?e[s]:null,o=s in r?r[s]:null;a!==o&&(n[s]={old:a,new:o})}return n}setAttr(e=null,r=!0,n=!0,i=!0){let s=e||{},a=Object.keys(this._nodeSubscribers).length>0,u=r&&(a||this._parentBag!==null&&this._parentBag.backref)?{...this._attr}:null;if(n?Object.assign(this._attr,s):this._attr={...s},i)for(let l of Object.keys(this._attr))this._attr[l]===null&&delete this._attr[l];if(r&&u!==null){let l=this._buildAttrDiff(u,this._attr);if(Object.keys(l).length>0&&a)for(let c of Object.values(this._nodeSubscribers))c({node:this,info:{attrs_diff:l},evt:"upd_attrs"});if(Object.keys(l).length>0&&this._parentBag!==null&&this._parentBag.backref){let c=r===!0?"true":String(r);this._parentBag._onNodeChanged(this,[this.label],"upd_attrs",null,l,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 i of r)if(this._attr[i]!==e._attr[i])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(i=>this._attr[i]!==e._attr[i])?`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 Tr=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,i]=r,s=i.includes("::")?X(i):i;return n?this._list.findIndex(a=>a.getAttr(n)===s):this._list.findIndex(a=>a._value===s)}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 s=this._parseSharpIndex(n.slice(1),e);return Math.min(s,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i}if(e.startsWith(">")){let n=e.slice(1);if(n.startsWith("#")){let s=this._parseSharpIndex(n.slice(1),e);return Math.min(s+1,r)}let i=this.index(n);if(i<0)throw new Error(`Invalid node_position '${e}': label '${n}' not found`);return i+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=">",i=null,s=null,a=null,o=!1,u=!0,l=null,c=!0,d=!1,f=null){let h=null;if(e.includes("?")&&([e,h]=e.split("?",2)),e==null||e.startsWith("#"))throw new Error("Cannot create new node with #n syntax");if(h){let m=h.split("&");if(m.length===1)i={[m[0]]:r};else{if(!Array.isArray(r)||r.length!==m.length)throw new Error("Wrong attributes assignment");i={};for(let g=0;g<m.length;g++)i[m[g]]=r[g]}r=null}let p=this._dict[e];if(p)f&&(p.nodeTag=f),a!==null&&(a===!1?p.resolver=null:p.resolver=a),h?p.setAttr(i,c,!0,u):p.setValue(r,c,i,o,u,l,d);else{let m=s&&s.nodeClass?s.nodeClass:Ve;p=new m(s,e,h?null:r,i,a,f,null,u);let g=this._parsePosition(n);this._dict[e]=p,this._list.splice(g,0,p),c&&s&&s.backref&&s._onNodeInserted(p,g,null,l,d)}return d&&p.setValue(null,!1),p}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 i=Array.isArray(e)?e:[e];if(i.length===0||r>=this._list.length)return;let s=this._list[r].label;if(i.length>1){let a=[...i].sort((c,d)=>c-d),o=a[0]<r?1:0,u=[];for(let c=a.length-1;c>=0;c--){let d=a[c];if(d>=0&&d<this._list.length){let f=this._list[d];this._list.splice(d,1),u.push(f),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(f,d)}}let l=this.index(s);l<0&&(l=this._list.length),l+=o;for(let c of u)this._list.splice(l,0,c),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeInserted(c,l)}else{let a=i[0];if(a===r||a<0||a>=this._list.length)return;let o=this._list[a];this._list.splice(a,1),n&&this._parentBag&&this._parentBag.backref&&this._parentBag._onNodeDeleted(o,a),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],i=e._list[r];if(!n.isEqual(i))return!1}return!0}};var vo=gs(Bi(),1);var Wi="::RSLV:",bf=new Map,_f=new Map,Tn=new WeakMap,G=class extends Error{constructor(e){super(e),this.name="BagSerializationError"}},Cr=class extends ee{constructor(e){super({asBag:!1}),Tn.set(this,e)}get payload(){return Tn.get(this)}load(){throw new G("This resolver is opaque; local execution is unavailable")}};function _o(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 G("Invalid resolver description")}function wo(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 G("Resolver parameters must be JSON data; callbacks cannot travel");e.add(t);for(let r of Object.values(t))wo(r,e);e.delete(t)}}function Nr(t){if(Tn.has(t))return Tn.get(t);let e=_f.get(t.constructor);if(!e)throw new G(`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 _o(n),wo(n),Wi+JSON.stringify(n)}function Cn(t){if(typeof t!="string"||!t.startsWith(Wi))return null;let e=t.slice(Wi.length);if(/^[A-Za-z0-9_-]+\.[A-Za-z0-9_-]*\.[A-Za-z0-9_-]+$/.test(e))return new Cr(t);let r;try{r=JSON.parse(e)}catch{throw new G("Invalid resolver JSON or signed token")}_o(r);let n=bf.get(JSON.stringify([r.resolver_module,r.resolver_class]));if(!n)return new Cr(t);let i=n.decode({args:r.args??[],kwargs:r.kwargs});if(!(i instanceof n.cls))throw new G("Resolver decoder returned an incompatible instance");return i}function Nn(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,r instanceof ee?Nr(r):r]))}function Gi(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[e,Cn(r)??r]))}var Ce="__cls";function Vt(t,e){return t!==null&&t.tytxSuffix===e?t:Er(e)}function wf(t){let e=t.tytxSuffix,r=Object.entries(ze(e)).filter(([,n])=>n===t).map(([n])=>n);if(r.length===0)throw new G(`${t.name} is not in the TYTX subtype dictionary of '${e}'`);if(r.length>1)throw new G(`${t.name} is in the TYTX subtype dictionary of '${e}' under several names: ${r.sort().join(", ")}`);return r[0]}function Yi(t,e){let r=ze(t);if(!Object.hasOwn(r,e))throw new G(`Unknown Bag class '${e}' for TYTX type '${t}'`);return r[e]}function Xi(t,e){return t===e?null:wf(t)}function*ko(t,e=[]){for(let r of t){let n=[...e,r.label];yield[n,r];let i=r.getValue(!0);!r.resolver&&i instanceof te&&(yield*ko(i,n))}}function yf(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 i=e.replace(/\.000Z$/,"Z");return r&&!n?i.slice(i.indexOf("T")+1):i}function Ht(t){if(t===null||typeof t!="object")return!1;let e=Object.getPrototypeOf(t);return e===Object.prototype||e===null}function ot(t){return typeof t=="string"?t.includes("::")?`${t}::T`:t:Array.isArray(t)?t.map(ot):Ht(t)?Object.fromEntries(Object.entries(t).map(([e,r])=>[e,ot(r)])):t}function Zi(t){if(!Ht(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 yo=!1,te=class t{static tytxSuffix="X";constructor(e=null,r={}){this._nodes=new Tr,this._backref=!1,this._parent=null,this._parentNode=null,this._rootAttributes=null,this._updSubscribers={},this._insSubscribers={},this._delSubscribers={},Zi(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 Ve}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(i=>i)):n=[...e];n.length&&n[0]==="#parent"&&r!==null;)n.shift(),r=r.parent;return[r,n]}_htraverse(e,r=!1,n=!0){let[i,s]=this._htraverseBefore(e);if(i===null)return[null,null];if(s.length===0)return[i,""];for(;s.length>1&&i instanceof t;){let a=s[0];if(a==="#parent"){if(i.parent===null||i.parent===void 0)break;s.shift(),i=i.parent;continue}let o=i._nodes.get(a);if(!o)break;let u=o.getValue(n);if(u instanceof t)s.shift(),i=u;else if(r){let l=i.createChildBag();o.setValue(l,!0,null,!0,!0,"autocreate"),s.shift(),i=l}else break}if(!r)return s.length>1?[null,null]:[i,s[0]];for(;s.length>1;){let a=s.shift();if(a.startsWith("#"))throw new Sr("Not existing index in #n syntax");let o=i.createChildBag();i._nodes.set(a,o,">",null,i,null,!1,!0,"autocreate"),i=o}return[i,s[0]]}get(e,r=null,n=!0,i={}){if(!e)return this;if(e==="#parent")return this.parent;let s=null;e.includes("?")&&([e,s]=e.split("?",2));let a=this._nodes.get(e);return a?a.getValue(n,s,i):r}getItem(e,r=null,n=!1,i={}){if(!e)return this;let[s,a]=this._htraverse(e,!1,n);return s instanceof t?s.get(a,r,n,i):r}setItem(e,r,n=null,i=">",s=!1,a=!0,o=null,u=!1,l=!0,c=null,d=null){if(e==="")throw new RangeError("setItem requires a non-empty path");let[f,h]=this._htraverse(e,!0);return f._nodes.set(h,r,i,n,f,c,s,a,o,l,u,d)}_pop(e,r=null){let n=this._nodes.index(e);if(n>=0){let i=this._nodes.pop(n);return this.backref&&this._onNodeDeleted(i,n,null,r),i}return null}pop(e,r=null,n=null){let i=this.popNode(e,n);return i?i.value:r}delItem(e,r=null,n=null){return this.pop(e,r,n)}popNode(e,r=null){let[n,i]=this._htraverse(e,!1,!0);if(!n||!i)return null;let s=n._nodes.get(i);if(!s)return null;try{return n._pop(i,r)}finally{s.parentBag===n&&n._nodes._dict[s.label]!==s&&(s.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,i=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[s,a]=this._htraverse(e,n,r);if(s instanceof t&&a){let o=s._nodes.get(a);if(o)return o;if(n)return s._nodes.set(a,i,">",null,s,null,!1,!0,"autocreate"),s._nodes.get(a)}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 i of this)i.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,i=null,s=null,a=null,o=!1){for(let u of Object.values(this._updSubscribers))u({node:e,pathlist:r,oldvalue:i,attrs_diff:s,evt:n,reason:a,fired:o});this._parent&&this._parentNode&&this._parent._onNodeChanged(e,[this._parentNode.label,...r],n,i,s,a,o)}_onNodeInserted(e,r,n=null,i=null,s=!1){let a=e.parentBag,o=e.getValue(!0);a!==null&&a.backref&&o instanceof t&&o.setBackref(e,a),n===null&&(n=[]);for(let u of Object.values(this._insSubscribers))u({node:e,pathlist:n,ind:r,evt:"ins",reason:i,fired:s});this._parent&&this._parentNode&&this._parent._onNodeInserted(e,r,[this._parentNode.label,...n],i,s)}_onNodeDeleted(e,r,n=null,i=null){for(let s of Object.values(this._delSubscribers))s({node:e,pathlist:n,ind:r,evt:"del",reason:i});this._parent&&this._parentNode&&(n===null&&(n=[]),this._parent._onNodeDeleted(e,r,[this._parentNode.label,...n],i))}_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:i=null,delete:s=null,any:a=null}=r;this.backref||this.setBackref(),this._subscribe(e,this._updSubscribers,n||a),this._subscribe(e,this._insSubscribers,i||a),this._subscribe(e,this._delSubscribers,s||a)}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:i=!1,delete:s=!1,any:a=!1}=r;(n||a)&&delete this._updSubscribers[e],(i||a)&&delete this._insSubscribers[e],(s||a)&&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 i=t.prototype.getNode.call(this,e,!0,!0);i&&i.setAttr(r,!0,!0,n)}getAttr(e=null,r=null,n=null){let i=this.getNode(e);return i?i.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 i=n.value;if(i instanceof t){if(i.getItem(e)===r)return n}else if(i&&i.get&&i.get(e)===r)return n}return null}getNodeByAttr(e,r,n=!1,i=!1){let s=r===void 0,a=n&&typeof r=="string"?r.toLowerCase():r,o=u=>{let l=[];for(let c of u._nodes){if(e in c.attr){let d=n&&typeof c.attr[e]=="string"?c.attr[e].toLowerCase():c.attr[e];if(s||d==a)return c}if(c._value instanceof t)if(i){let d=o(c._value);if(d)return d}else l.push(c._value)}for(let c of l){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 i=n.getValue(!0);if(i!=null&&!(e&&i===0)&&!(r&&i===""))return!1}return!0}query(e=null,r=null,n=!1,i=!1,s=!0,a=!0,o=null,u=!0){e||(e="#k,#v,#a");let l=this,c;if(typeof e=="string"){if(e.includes(":")){let[h,p]=e.split(":");l=this.getItem(h),e=p}c=e.split(",").map(h=>h.trim())}else c=e;let d=(h,p,m,g,_)=>{if(p==="#k")return h.label;if(p==="#p")return m;if(p==="#n")return h;if(typeof p=="function")return p(h);if(p==="#v"){let w=_();return g&&w instanceof t?null:w}else if(p.startsWith("#v.")){let w=p.split(".").slice(1).join("."),y=_();return y&&y.getItem?y.getItem(w):null}else{if(p==="#__v")return h.getValue(!0);if(p.startsWith("#a")){let w=p.includes(".")?p.split(".").slice(1).join("."):null;return h.getAttr(w)}else{let w=_();return w&&w.getItem?w.getItem(p):null}}};function*f(){let h=0;function*p(m,g){for(let _ of m._nodes){let w=g?`${g}.${_.label}`:_.label,y=!1,k,S=()=>(y||(k=_.getValue(u),y=!0),k);if((s&&a||(S()instanceof t?a:s))&&(r===null||r(_))&&(yield c.length===1?d(_,c[0],w,i,S):c.map(F=>d(_,F,w,i,S)),h++,o!==null&&h>=o))return;if(i){let F=S();if(F instanceof t&&(yield*p(F,w),o!==null&&h>=o))return}}}yield*p(l,"")}return n?f():[...f()]}getLeaves(){let e=[],r=(n,i)=>{for(let s of n._nodes){let a=i?`${i}.${s.label}`:s.label,o=s.getValue(!1);o instanceof t?r(o,a):e.push([a,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 i=this.query(e,r,!1,!1,!0,!0,null,!1);if(n){if(!i||i.length===0)return(typeof e=="string"?e:"#k,#v,#a").split(",").map(u=>u.trim()).map(()=>[]);let s=[...i];if(s.length&&Array.isArray(s[0])){let a=s[0].length,o=[];for(let u=0;u<a;u++)o.push(s.map(l=>l[u]));return o}return[s]}return[...i]}columns(e,r=!1){typeof e=="string"&&(e=e.split(","));let n=r?"#a.":"",i=e.map(s=>`${n}${s}`).join(",");return this.digest(i,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 i=s=>{let a=0,o=!1;for(let u of this.query(s,n)){if(u==null||u===""){o=!0;continue}if(typeof u!="number"&&typeof u!="boolean"){if(r)throw new TypeError(`sum encountered non-numeric value: ${typeof u}`);continue}a+=u}return r&&o?null:a};return e.includes(",")?e.split(",").map(s=>i(s.trim())):i(e)}sort(e="#k:a"){let r=(i,s)=>i==null?[-1,""]:s&&typeof i=="string"?[0,i.toLowerCase()]:[0,i],n=(i,s)=>i[0]!==s[0]?i[0]-s[0]:i[1]<s[1]?-1:i[1]>s[1]?1:0;if(typeof e=="function")this._nodes._list.sort((i,s)=>{let a=e(i),o=e(s);return a<o?-1:a>o?1:0});else{let i=e.split(",");i.reverse();for(let s of i){let a,o;s.includes(":")?[a,o]=s.split(":",2):(a=s,o="a"),a=a.trim(),o=o.trim();let u=o==="d"||o==="D",l=o==="a"||o==="d",c;if(a.toLowerCase()==="#k")c=d=>r(d.label,l);else if(a.toLowerCase()==="#v")c=d=>r(d.value,l);else if(a.toLowerCase().startsWith("#a.")){let d=a.slice(3);c=f=>r(f.getAttr(d),l)}else c=d=>{let f=d.value,h=f instanceof t?f.getItem(a):f?f[a]:null;return r(h,l)};this._nodes._list.sort((d,f)=>{let h=n(c(d),c(f));return u?-h:h})}}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(i=>i 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 i=new Dr({callback:r,...n});this.setResolver(e,i)}move(e,r,n=!0){this._nodes.move(e,r,n)}asDict(e=!1,r=!1,n=!1,i=!1){let s={};for(let a of this._nodes){let o=a.value;if(i&&o==null)continue;let u=a.label;e&&(u=String(u)),r&&(u=u.toLowerCase()),n&&o instanceof t&&(o=t.prototype.asDict.call(o,e,r,n,i)),Object.defineProperty(s,u,{value:o,enumerable:!0,writable:!0,configurable:!0})}return s}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 i=n.getValue(!e);i instanceof t&&(i=i.deepcopy(e));let s=new r.nodeClass(r,n.label,i);s.setAttr({...n.attr},!1,!1,!1),s.nodeTag=n.nodeTag,s.xmlTag=n.xmlTag,r._nodes._list.push(s),r._nodes._dict[s.label]=s}return r}update(e,r=null,n=null,i=!1){if(!(e instanceof t)){for(let s in e){let a=e[s];(!i||a!==null||!this._nodes.has(s))&&this.setItem(s,a,null,">",!1,!1,n,!1,n!==!1)}return}for(let s of[...e]){let a=s.label,o=r==="static"?s.resolver:null,u=o?null:s.getValue(),l=s.attr.__replace;delete s.attr.__replace;let c=this._nodes.get(a);if(c)if(c.setAttr(s.attr,n===null?!0:n,!0,!1),s.nodeTag!=null&&(c.nodeTag=s.nodeTag),s.xmlTag!=null&&(c.xmlTag=s.xmlTag),o)c.resolver=o,c.setValue(null,n===null?!0:n,null,null,!1,n);else{s.resolver&&(c.resolver=null);let d=c.getValue();u instanceof t&&d instanceof t&&!l?d.update(u,r,n,i):(!i||u!==null)&&c.setValue(u,n===null?!0:n,null,null,!1,n)}else{let d=this.setItem(a,o||u,s.attr,">",!1,!1,n,!1,n!==!1);d.nodeTag=s.nodeTag,d.xmlTag=s.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,i=null,s=null){if(typeof e!="string")throw new TypeError("Bag labels must be strings");let a=new this.nodeClass(this,e,null,n,i,s,null,!1);return r instanceof ee?a.resolver=r:a._value=r,this._nodes._dict[e]=a,this._nodes._list.push(a),a}fillFrom(e=null,r={}){let n=Zi(r);if(e!=null&&!Ht(e)&&!Array.isArray(e))throw new TypeError("Bag source must be a dictionary, array or null");let i=this.createChildBag(),s=new Set,a=(o,u,l)=>{if(s.has(u))throw new TypeError(`Cyclic Bag source at ${l}`);s.add(u);try{let c=Array.isArray(u)?String(u.length).length+1:0,d=Array.isArray(u)?Array.from(u,(f,h)=>[`r_${String(h).padStart(c,"0")}`,f]):Object.entries(u);if(!Array.isArray(u)&&Object.getOwnPropertySymbols(u).some(f=>Object.prototype.propertyIsEnumerable.call(u,f)))throw new TypeError(`Bag labels must be strings at ${l}`);for(let[f,h]of d){let p=h;n&&(Ht(p)||Array.isArray(p))&&(p=this.createChildBag(),a(p,h,`${l}[${JSON.stringify(f)}]`)),o._appendLiteral(f,p)}}finally{s.delete(u)}};return e!=null&&a(i,e,"$"),this._replacePrepared(i)}_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 i=n.getValue(!0);i instanceof t&&i.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:i={}}={}){if(typeof e!="function")throw new TypeError("forEach requires a callback");let s=(a,o)=>{for(let u=0;u<a._nodes.length;u++){let l=a._nodes._list[u],c={...o};"_pathlist"in o&&(c._pathlist=[...o._pathlist,l.label]),"_indexlist"in o&&(c._indexlist=[...o._indexlist,u]);let d=e(l,c,u);if(d)return d;if(d==null&&n){let f=l.getValue(r);if(f instanceof t){let h=s(f,c);if(h)return h}}}return null};return s(this,i)}*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 i=r?`${r}.${n.label}`:n.label;yield[i,n];let s=n.getValue(e);s instanceof t&&(yield*s._iterNodesWithPaths(e,i))}}*_nodeFlattener(e=null){let r=e!==null,n=r?Object.create(null):null,i=0,s=new Map([["[]",this.constructor]]);for(let[a,o]of ko(this)){let u=a.slice(0,-1),l=JSON.stringify(a),c=JSON.stringify(u),d=o.getValue(!0),f,h=null;if(o.resolver)f=Nr(o.resolver);else if(d instanceof t){let g=d.constructor,_=g.tytxSuffix;s.set(l,g),h=Xi(g,Vt(s.get(c),_)),f=`::${_}`}else d===null?f="::NN":f=ot(d);if(o.attr&&Object.hasOwn(o.attr,Ce))throw new G(`node '${a}': the attribute '${Ce}' is reserved for the Bag class name`);let p=Nn(ot(o.attr));h!==null&&(p[Ce]=h);let m=o.nodeTag;r?(yield[u.length?n[c]:null,o.label,m,f,p],d instanceof t&&(n[l]=i,e[i]=a,i++)):yield[u,o.label,m,f,p]}}toTytx(e="json",r=!1){let n=this._toTytxPayload(r),i=this.constructor.tytxSuffix;if(e==="json")return`${n}::${i}`;if(e==="msgpack")return Qr(new De(4,new TextEncoder().encode(`${i}:${n}`)));throw new TypeError(`Unsupported transport: ${e}`)}_toTytxPayload(e=!1){let r;if(e){let s={};r={rows:[...this._nodeFlattener(s)],paths:s}}else r={rows:[...this._nodeFlattener(null)]};let n=this.constructor,i=Xi(n,Vt(null,n.tytxSuffix));return i!==null&&(r[Ce]=i),r.rows=r.rows.map(([s,a,o,u,l])=>[ot(s),ot(a),ot(o),u,l]),r.paths&&(r.paths=ot(r.paths)),be(r)}static fromTytx(e,r="json",n={}){if(Ht(r)&&(n=r,r="json"),Zi(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 i=X(e,r==="json"?null:r);if(i instanceof t)return i;if(!Ht(i)&&!Array.isArray(i))throw new TypeError("fromTytx requires a dictionary, array or typed Bag root");return new this(i,n)}static _fromTytxPayload(e){let r=this.tytxSuffix;if(e==="")return new(Vt(null,r));let n=X(e);if(!n||!Array.isArray(n.rows))throw new G("Invalid TYTX Bag: expected rows");let i=n.paths,s=i!=null,a=Object.hasOwn(n,Ce)?Yi(r,n[Ce]):Vt(null,r),o=new a,u=new Map([["[]",o]]);for(let l of n.rows){if(!Array.isArray(l)||l.length!==5)throw new G("Invalid TYTX Bag row");let[c,d,f,h,p]=l,m=c??"";if(s){if(c!==null&&!Object.hasOwn(i,c))throw new G(`Unknown TYTX parent reference: ${c}`);m=c===null?"":i[c]}if(typeof m=="string"&&(m=m?m.split("."):[]),!Array.isArray(m))throw new G("Invalid TYTX parent path");let g=JSON.stringify(m);if(!u.has(g))throw new G(`Missing or undecodable TYTX parent branch: ${m}`);let _=u.get(g),w=JSON.stringify([...m,d]),y=h,k=Cn(y),S=Gi(p),R=Object.hasOwn(S,Ce)?S[Ce]:null;if(delete S[Ce],y instanceof t){let re=y.constructor.tytxSuffix,ne=R!==null?Yi(re,R):Vt(_.constructor,re);y=new ne,u.set(w,y)}else if(R!==null)throw new G(`node '${w}': the attribute '${Ce}' is reserved for the Bag class name of a branch`);let F=_._appendLiteral(d,k?null:y,S,k);F.nodeTag=f??null}return o}toXml(e={}){let{pretty:r=!1,encoding:n="UTF-8",docHeader:i=null,selfClosedTags:s=null}=e,a=this._bagToXml(s,r);return i===!0?a=`<?xml version='1.0' encoding='${n}'?>
|
|
14
14
|
${a}`:typeof i=="string"&&(a=`${i}
|
|
15
15
|
${a}`),a}_bagToXml(e=null,r=!1,n=0){let i=[];for(let s of this._nodes)i.push((r?" ".repeat(n):"")+this._nodeToXml(s,e,r,n));return i.join(r?`
|
|
16
|
-
`:"")}_nodeToXml(e,r=null,n=!1,i=0){let s=e.xmlTag||e.nodeTag||e.label,a=this._sanitizeTag(s),o=[];if(a!==s&&o.push(`_tag="${this._escapeAttr(s)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(
|
|
16
|
+
`:"")}_nodeToXml(e,r=null,n=!1,i=0){let s=e.xmlTag||e.nodeTag||e.label,a=this._sanitizeTag(s),o=[];if(a!==s&&o.push(`_tag="${this._escapeAttr(s)}"`),e.resolver&&o.push(`_resolver="${this._escapeAttr(Nr(e.resolver))}"`),e.attr)for(let[f,h]of Object.entries(Nn(e.attr)))h!==null&&h!==!1&&h!==void 0&&o.push(`${f}="${this._escapeAttr(String(h))}"`);let u=o.length?" "+o.join(" "):"",l=e.resolver?null:e.getValue(!0);if(l&&typeof l._bagToXml=="function"){n=n&&e.attr?.["xml:space"]!=="preserve";let f=l._bagToXml(r,n,i+1);return f?n?`<${a}${u}>
|
|
17
17
|
${f}
|
|
18
|
-
${" ".repeat(i)}</${a}>`:`<${a}${u}>${f}</${a}>`:r===null||r.includes(a)?`<${a}${u}/>`:`<${a}${u}></${a}>`}if(l==null||l==="")return r===null||r.includes(a)?`<${a}${u}/>`:`<${a}${u}></${a}>`;let c=l instanceof Date&&!Number.isNaN(l.getTime())?
|
|
19
|
-
`)}toString(e=!0,r=null,n=""){r||(r=new Set);let i=[],s=[...this._nodes];for(let a=0;a<s.length;a++){let o=s[a],u=a===s.length-1,l=o.getValue(e),c="",d=o.attr;d&&Object.keys(d).length>0&&(c=` [${Object.entries(d).map(([m,
|
|
20
|
-
`)}},Tr=class extends Error{constructor(e){super(e),this.name="BagException"}};ee.registerBagClass(te);Li(te,"X",t=>t._toTytxPayload(),t=>te._fromTytxPayload(t));kr(te.tytxSuffix,{...je(te.tytxSuffix),Bag:te});var uo=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 co(t){return t.endsWith("_")&&uo.has(t.slice(0,-1))?t.slice(0,-1):t}function fo(t){let e=co(t);return e!==t?e:t.startsWith("_")&&uo.has(t.slice(1))?t.slice(1):t}function ji(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let i=e||t;if(!i)return i;if(i=co(i),r&&!e){let s=`${n}_`;i.startsWith(s)&&(i=i.slice(s.length)),i=`${r}:${i}`}return i}var Gt=Symbol("value"),po=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function zi(t){return Object.entries(t||{}).filter(([e])=>!po.has(e)).map(([e,r])=>[fo(e),r])}var Wt=class extends ze{constructor(e,r,n=null,i=null,s=null,a=null,o=null){super(e,r,n,i,s,a,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(i=>i.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(i=>r[i]!==void 0?r[i]: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 zi(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(Gt,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(Ye(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 i=n.getAttr("datapath");i!=null&&(e=e==="."?i:i+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let i of e.split("."))if(i==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(i);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),i=n.indexOf("."),s=i===-1?n:n.slice(0,i),a=i===-1?"":n.slice(i+1),o;if(s==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(s==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let u=this.rootBuilder;if(!u)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=u.source.getNodeByAttr("nodeId",s),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(a?`.${a}`:".")}_findMarkedDatapathAncestor(e,r,n){let i=this;for(;i!=null;){let a=i.getAttr()||{};if(e&&(a.formId!=null||a.form===!0)||r&&"_anchor"in a)return i;i=i.parentNode}let s=e?"FORM":"ANCHOR";throw new Error(`#${s}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let i=this.data,s=this.absDatapath(e);return n&&i.getItem(s)==null&&i.setItem(s,r),i.getItem(s,r)}setRelativeData(e,r,{attributes:n=null,fired:i=!1,reason:s=null}={}){let a=this.data,o=this.absDatapath(e);a.setItem(o,r,n,">",!1,!0,s===null?!0:s,i)}fireEvent(e,r=!0,{attributes:n=null,reason:i=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:i})}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})}},W=class t extends te{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return Wt}_setBuilderItem(e,r,n,...i){let s=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,u]of r)o._builder=u;let a=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...i)}catch(o){if(this.node(n)==null&&s)for(let[u,l]of s)u._builder=l;throw o}finally{this._insertingBuilder=a}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,i]of r)n._builder=i;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,i=(s,a)=>{if(n.has(s))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(s),r.push([s,a]);for(let o of s.getNodes()){let u=a,l=o._getMeta("subbuilder");l!=null&&(u=a._resolveSubbuilderReference(l,o.getAttr()||{},o.nodeTag)),r.push([o,u]);let c=o.getValue(!0);c instanceof t&&i(c,u)}};return i(this,e),r}};if((je(W.tytxSuffix).SourceBag??W)!==W)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");kr(W.tytxSuffix,{...je(W.tytxSuffix),SourceBag:W});function uf(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 cf=new Set(["then","toJSON"]),mo=new WeakMap;function Nr(t){return mo.get(t)||t}function Vi(t){if(t==null)return t;t=Nr(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function go(t,e){let r=e instanceof te,n=new Proxy(e,{get(i,s){if(typeof s=="symbol"||s.startsWith("_")||cf.has(s))return Reflect.get(i,s,i);let a=t.schemaTag(s);if(r&&a)return ho(t,i,a,r);if(s in i){let u=Reflect.get(i,s,i);return typeof u=="function"?u.bind(i):u}if(a)return ho(t,i,a,r);let o=t.containerMethod(s);if(o)return(...u)=>t[o](t.wrapSource(i),...u)}});return mo.set(n,e),n}function ho(t,e,r,n){return(...i)=>{let{value:s,attrs:a}=uf(i),o=n?t.bagCall(e,r,s,a):t.commandOnNode(e,r,s,a);return o.builder.wrapSource(o)}}var bo=/^[A-Za-z_][A-Za-z0-9_]*$/,df=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),ff=new Set(["framework","value","attribute"]),hf=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 bt(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function k(t,e){throw new TypeError(`${t}: ${e}`)}function Re(t,e,r,n){bt(t)||k(n,"must be an object");for(let i of Object.keys(t))e.includes(i)||k(n,`unknown field '${i}'`);for(let i of r)Object.hasOwn(t,i)||k(n,`missing field '${i}'`)}function wt(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)=>wt(r,`${e}[${n}]`));if(bt(t))return Object.entries(t).forEach(([r,n])=>wt(n,`${e}.${r}`));k(e,"must be lossless JSON data")}}function pf(t,e){let r="",n=!1;for(let i=0;i<t.length;i++){let s=t[i];if(s==="\\"){r+=s+(t[++i]??"");continue}s==="["&&(n=!0),!n&&s==="."&&!(e&16)?r+="[^\\n]":!n&&s==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&s==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=s,s==="]"&&(n=!1)}return r}function _t(t,e,r=!1,n=null){if(t===null)return null;switch(Re(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 Re(t,["kind","name"],["kind","name"],e),n||k(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{Re(t,["kind","dtype"],["kind","dtype"],e);let i=t.dtype;typeof i!="string"&&k(e,"dtype must be a string");let s=vr(i);return!s&&i!=="NN"&&k(e,`unknown dtype '${i}'`),{...t,test:o=>i==="NN"?o===null:i==="N"?ce(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):s===Number?typeof o=="number"&&Number.isFinite(o)&&(i!=="L"||Number.isInteger(o)):s===String?typeof o=="string":s===Boolean?typeof o=="boolean":s===Date?o instanceof Date&&Number.isFinite(o.getTime()):s===Object?bt(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof s}}case"any":return{...t,test:i=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&k(e,"type requires string module/name");let i=`${t.module}.${t.name}`;if(i==="collections.abc.Callable")return{...t,test:a=>typeof a=="function",portable:!1};let s=hf.get(i);return s||k(e,`unsupported type '${i}'`),{...t,test:s}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&k(e,"union items must be non-empty");let i=t.items.map((s,a)=>_t(s,`${e}.items[${a}]`,!0,n));return{...t,items:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>i.some(a=>a.test&&a.test(s))}}case"literal":return Array.isArray(t.values)||k(e,"literal values must be an array"),t.values.forEach((i,s)=>wt(i,`${e}.values[${s}]`)),{...t,test:i=>t.values.some(s=>Object.is(s,i))};case"annotated":{Array.isArray(t.metadata)||k(e,"annotated metadata must be an array"),t.metadata.some(a=>!["regex","range","value"].includes(a?.kind))&&k(e,"unsupported annotation metadata kind");let i=_t(t.base,`${e}.base`,!0,n),s=t.metadata.map((a,o)=>_t(a,`${e}.metadata[${o}]`,!0,n));return{...t,base:i,metadata:s,inputConstraint:i.inputConstraint,test:a=>i.test(a)&&s.every(o=>!o.test||o.test(a))}}case"range":{for(let i of["ge","le","gt","lt"])Object.hasOwn(t,i)||k(e,`range missing '${i}'`);for(let i of["ge","le","gt","lt"])t[i]!==null&&(typeof t[i]!="number"||!Number.isFinite(t[i]))&&k(e,`${i} must be finite number or null`);return{...t,test:i=>typeof i=="number"&&(t.ge===null||i>=t.ge)&&(t.le===null||i<=t.le)&&(t.gt===null||i>t.gt)&&(t.lt===null||i<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&k(e,"regex requires pattern and non-negative integer flags");let i=t.flags&-59;i&&k(e,`unsupported Python regex flags ${i}`),t.flags&2&&k(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&k(e,"regex uses a non-portable construct or character class");let s="uy";t.flags&16&&(s+="s");let a;try{a=new RegExp(`(?:${pf(t.pattern,t.flags)})(?![\\s\\S])`,s)}catch(o){k(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(a.lastIndex=0,a.test(o))}}case"value":return wt(t.value,`${e}.value`),{...t};case"generic":{let i=_t(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&k(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||k(e,"generic arguments must be an array");let s=t.arguments.map((a,o)=>_t(a,`${e}.arguments[${o}]`,!0,n));return{...t,origin:i,arguments:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>i.test(a)&&mf(t.origin,s,a)}}case"arguments":k(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||k(e,"ellipsis is only valid as a nested descriptor"),{...t};default:k(e,`unknown annotation kind '${t.kind}'`)}}function mf(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((i,s)=>e[s].test(i)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(i=>!e[0]?.test||e[0].test(i)):n==="builtins.dict"?Object.entries(r).every(([i,s])=>(!e[0]?.test||e[0].test(i))&&(!e[1]?.test||e[1].test(s))):!1}function wo(t,e){if(t===null)return null;if(typeof t!="string"&&k(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let i=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(i)&&k(e,`invalid cardinality item '${n}'`);let s=i.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);s||k(e,`invalid cardinality item '${n}'`);let[,a,o,u,l]=s;r.has(a)&&k(e,`duplicate tag '${a}'`);let c=0,d=1/0;i.includes("[")&&(i.includes(":")?(c=u?Number(u):0,d=l?Number(l):1/0):c=d=Number(o)),d<c&&k(e,`maximum ${d} is below minimum ${c}`),r.set(a,{min:c,max:d})}return r.has("*")&&r.size>1&&k(e,"wildcard '*' cannot be combined with named tags"),r}function yo(t,e){if(t===null)return null;typeof t!="string"&&k(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let i=n.trim();i&&((!bo.test(i)||r.has(i))&&k(e,`invalid or duplicate parent '${n}'`),r.add(i))}return r}function gf(t,e,r){if(t===null)return null;Re(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||k(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(u=>u.kind==="var_keyword"),accepts_var_positional:n.some(u=>u.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&k(e,"invalid signature descriptor");let i=new Set,s=!1,a=!1,o=t.parameters.map((u,l)=>{let c=`${e}.parameters[${l}]`;return Re(u,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof u.name!="string"||!bo.test(u.name)||i.has(u.name))&&k(c,"invalid or duplicate parameter name"),i.add(u.name),(!df.has(u.kind)||!ff.has(u.role)||typeof u.has_default!="boolean")&&k(c,"invalid kind, role, or has_default"),u.has_default!==Object.hasOwn(u,"default")&&k(c,"default presence must equal has_default"),u.has_default&&wt(u.default,`${c}.default`),s||=u.kind==="var_keyword",a||=u.kind==="var_positional",{...u,annotation:_t(u.annotation,`${c}.annotation`,!1,r)}});return(s!==t.accepts_var_keyword||a!==t.accepts_var_positional)&&k(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function _o(t,e,r,n){let i=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];Re(t,i,[],e),t={...Object.fromEntries(i.map(s=>[s,null])),...t};for(let s of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[s]!==null&&typeof t[s]!="string"&&k(e,`${s} must be string or null`);return t._meta!==null&&(bt(t._meta)||k(e,"_meta must be object or null"),wt(t._meta,`${e}._meta`)),wo(t.sub_tags,`${e}.sub_tags`),yo(t.parent_tags,`${e}.parent_tags`),{...t,attributes:gf(t.attributes,`${e}.attributes`,n)}}function vo(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function ko(t,e){let r={...e};for(let[n,i]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=i);return r._meta={...t._meta||{},...e._meta||{}},r}function Eo(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?wo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?yo(e.parent_tags,"resolved.parent_tags"):null,e}function Ao(t,e,r,n){if(r.get(t)===1&&k(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let i=e[t];i||k(n,`unknown abstract '${t}'`),r.set(t,1);let s={...i};for(let a of vo(i.inherits_from))s=ko(Ao(a,e,r,n),s);return s=Eo(s),r.set(t,2),e[t]=s,s}function Hi({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let s of Object.keys(r))Ao(s,r,n,`abstracts.${s}.inherits_from`);let i={};for(let[s,a]of Object.entries(e)){let o={...a};for(let u of vo(a.inherits_from)){let l=r[u];l||k(`elements.${s}.inherits_from`,`unknown abstract '${u}'`),o=ko(l,o)}i[s]=Eo(o)}return{abstracts:r,elements:i}}function Wi(t){Re(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Re(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&k("document_format","expected builder_grammar version 1.1 or 1.2"),Re(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&k("grammar.name","must be non-empty string");for(let i of["version","title","description"])t.grammar[i]!==null&&typeof t.grammar[i]!="string"&&k(`grammar.${i}`,"must be string or null");(!bt(t.abstracts)||!bt(t.elements))&&k("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&k("custom_types","requires version 1.2");let e=Tn.fromJSON(t.custom_types??{}),r={};for(let[i,s]of Object.entries(t.abstracts))(!i||i.startsWith("_"))&&k("abstracts",`invalid public name '${i}'`),r[i]=_o(s,`abstracts.${i}`,!1,e);let n={};for(let[i,s]of Object.entries(t.elements))(!i||i.startsWith("_"))&&k("elements",`invalid public name '${i}'`),n[i]=_o(s,`elements.${i}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function Do(t,e,r,n){let i=e.attributes;if(!i)return;let s={...n};r!=null&&(s.node_value=r);let a=new Set(i.parameters.filter(l=>l.role==="attribute").map(l=>l.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!i.accepts_var_keyword)for(let l of Object.keys(n))!a.has(l)&&!o.has(l)&&k(t,`unknown attribute '${l}'`);let u=e._meta?.component?i.parameters.find(l=>l.role!=="framework"&&["positional_only","positional_or_keyword"].includes(l.kind))?.name:null;for(let l of i.parameters){if(l.name===u||l.role==="framework"||l.kind.startsWith("var_"))continue;let c=Object.hasOwn(s,l.name);!c&&!l.has_default&&k(t,`missing required ${l.role} '${l.name}'`),c&&l.annotation!==null&&(!l.annotation.test||!l.annotation.test(s[l.name]))&&k(t,`invalid value for ${l.role} '${l.name}'`)}}var Tn=class t{#e=new Map;#r=new Map;register(e,r,n){let i=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),s=i.has(r)?{kind:"type",module:"builtins",name:i.get(r)}:r;return this.#l(e,{kind:"annotated",base:s,metadata:[n]})}#l(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||_f.has(e))&&k("custom_types",`invalid, reserved or duplicate name '${e}'`),Re(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))&&k(`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))&&k(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),wt(r,`custom_types.${e}`);let i=structuredClone(r),s=_t(i,`custom_types.${e}`),a=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:a,enumerable:!0}),this.#e.set(e,i),this.#r.set(e,{...a,inputConstraint:!0,test:s.test}),a}resolve(e,r="custom_types"){return this.#r.has(e)||k(r,`unknown custom type '${e}'`),{...this.#r.get(e)}}validate(e,r){return this.resolve(e).test(r)||k(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){bt(e)||k("custom_types","must be an object");let r=new t;for(let[n,i]of Object.entries(e))r.#l(n,i);return r}},_f=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 xo(t,e,r,n){let i=e?.attributes;if(i)for(let s of i.parameters){if(!s.annotation?.inputConstraint||s.role==="framework"||["var_keyword","var_positional"].includes(s.kind))continue;let a=s.role==="value"?r:n[s.name];a!==void 0&&(s.annotation.test(a)||k(t,`invalid input for '${s.name}' (custom type)`))}}function To(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!Gi(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(Ve(t)&&Ve(e)){let n=structuredClone(t);for(let[i,s]of Object.entries(e))s!==null&&Object.defineProperty(n,i,{value:To(n[i],s,[...r,i]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function Gi(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>Gi(r,e[n])):Ve(t)&&Ve(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&Gi(t[r],e[r])):!1}function Ve(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function Yi(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(Yi);return}if(Ve(t)){Object.values(t).forEach(Yi);return}throw new TypeError("collection must contain only finite JSON values")}}var He=class t{#e;constructor(e){Yi(e);let r=["document_format","grammar","abstracts","elements"];if(!Ve(e)||Object.keys(e).some(i=>![...r,"custom_types"].includes(i))||r.some(i=>!Object.hasOwn(e,i)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!Ve(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 i of["grammar","abstracts","elements"])if(!Ve(e[i]))throw new TypeError(`${i} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!Ve(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=To(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 yt=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,[i,s]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,s,r);let a=this.getRender(n),o;return[o,s]=a._handleMeta(e,s),e._getMeta("subbuilder")||(s=a.adaptAttrs(s)),e.value instanceof W&&(i=this.renderChildren(e.value,r)),a.renderedItem(e,i,s,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let i of e.getNodes()){let s=this.render(i,r);s!==null&&(Array.isArray(s)?n.push(...s):n.push(s))}return n}_renderComponent(e,r,n){let[i,s,a,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,i,a,o,n);if(s==null)return[];if(!(s instanceof te))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${s?.constructor?.name||typeof s}`);return s.getNodes().map(u=>this._expandBlock(e,i,a,{node_label:u.label},n))}_expansionInputs(e,r){let n=e.builder,i=n.componentMethod(e.nodeTag),s=i&&n[i];if(typeof s!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let a=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 u of Object.keys(r)){let l=e.getAttr(u);e.pointerType(l)==="^"&&(r[u]=`^${e.absDatapath(l)}`)}return[s,a,o,r]}_expandBlock(e,r,n,i,s){let a=e.builder._expansionRoot(n);r.call(e.builder,Vi(a),i);let o=a.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let u={...s,depthOffset:this._nodeDepth(e,s.depthOffset||0)};return this.render(o[0],u)}preprocess(e){return e}renderedItem(e,r,n,i){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,i]=e._getMeta("render_tag,render_attributes"),s=ji(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!s)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return i&&(r={...r,...i}),[s,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 i=this._composeStringFragments(e);if(r==null)return i;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(i),null;if(typeof r.write=="function")return r.write(i),null;if(typeof r=="function")return r(i),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("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,r=0){let i=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(i-1,0)+r}};var vt=class extends yt{static mode="xml";renderedItem(e,r,n,{tag:i,pretty:s=!1,depthOffset:a=0}={}){let o=this._formatAttrs(n),u=s?" ".repeat(this._nodeDepth(e,a)):"",l=s?`
|
|
21
|
-
`:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${u}<${i}${o}>${l}${c}${u}</${i}>${l}`}return r==null?`${u}<${i}${o}></${i}>${l}`:`${u}<${i}${o}>${this._escapeText(r)}</${i}>${l}`}finalize(e,r=null,{docHeader:n=null}={}){let i=this._composeStringFragments(e);return n===!0?i=`<?xml version='1.0' encoding='UTF-8'?>${i}`:typeof n=="string"&&(i=n+i),super.finalize(i,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var No={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 Co(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function wf(t){let e=Object.create(null),r=(n,i)=>{let s=n.toLowerCase(),a=e[s];if(a!==void 0&&a!==i)throw new Error(`container '${n}' is already tied to implementation method '${a}' (cannot rebind to '${i}')`);e[s]=i};for(let n of Co(t))if(Object.hasOwn(n,"containers"))for(let i of n.containers||[])r(i,i);return e}function Cr(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 Sr="_root_",Xi="_root_",So=new Set(["destination","func","value","_on_start"]),Le=class t{static _sourceClass=W;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 te,this._dataroot.setBackref(),this._dataroot.setItem(Xi,new te),this.data=this._dataroot.getItem(Xi),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(Sr,new r(null,this)),this.source=this._sourceroot.getItem(Sr)}wrapSource(e){if(e=Nr(e),!(e instanceof W)&&!(e instanceof Wt))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=go(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 He(r.toDocument()).update(e):new He(e),i=Wi(n.toDocument()),s=Hi(i),a=Cr(s.elements);this._classCollection=n,this._classSchema=s.elements,this._abstracts=s.abstracts,this._tagNames=a}static{this.defineGrammar(No)}get _containers(){return wf(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??=Cr(this.schema):this.constructor._tagNames??=Cr(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let i=`${this.constructor._name}_`;return r.startsWith(i)&&this.schemaTagNames[r.slice(i.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,i=r?new He(e):new He(n.toDocument()).update(e),s=Wi(i.toDocument()),a=Hi(s),o=Cr(a.elements);return this._collection=i,this._schemaOverride=a.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;xo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);return Do(i,this.schema[i],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:i}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let s=r!==void 0?r:e.value instanceof W?null:e.value;this.validateNodeValues(e.nodeTag,s,n||e.getAttr?.()||{});let a=this.schema[this.schemaTag(e.nodeTag)],o=i||(e.value instanceof W?e.value.getNodes().map(u=>u.nodeTag):null);return o&&this._validateChildren(e.nodeTag,a,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(s=>typeof s!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(i,this.schema[i],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let i=this.schema[n];if(!this._countsForGrammar(i))return!0;let s=i._parentSpec;if(s==null||s.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let a=this.schemaTag(r);if(!a)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,i,a),!0}bagCall(e,r,n,i){return this.setChild(e,r,n,i)}commandOnNode(e,r,n,i){if(e=Nr(e),e.value instanceof W)return this.setChild(e.value,r,n,i);let s=e.value,a=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(a,r,n,i,e);return this.promoteNodeValue(e,s,a),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,i,s=null){let a={...i},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,a);let u=o._meta?.subbuilder,c=(u==null?null:this._resolveSubbuilderReference(u,a,r))||this,d=n instanceof W?n._builderBindingPlan(c):null,f=s?.rootBuilder||e.root._builder||this;if(a.nodeId!=null&&f.source.getNodeByAttr("nodeId",a.nodeId))throw new Error(`Duplicate nodeId '${a.nodeId}'`);n instanceof W&&this._validateChildren(r,o,n.getNodes().map(y=>y.nodeTag),!1);let h=s||e.parentNode,p=h?.nodeTag?this.schema[h.nodeTag]:null;if(p&&!h._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,h.nodeTag),this._validateChildren(h.nodeTag,p,[...e.getNodes().map(y=>y.nodeTag),r],!1);else if(!p&&!h?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in a)&&(a._meta=o._meta),o.ns&&!("ns"in a)&&(a.ns=o.ns);let m=a.node_position;delete a.node_position;let _=a.node_label;delete a.node_label;let b;if(p?.collection_key){if(_!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);b=this._collectionLabel(p.collection_key,r,a)}else{let y=p?._subSpec?.get(r);if(y&&y.max===1){if(_!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);b=r}else b=_||o.node_label||this._autoLabel(e,r)}if(e.node(b)!=null)throw new Error(`duplicate node label '${b}'`);return e._setBuilderItem(c,d,b,n,a,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 i=r._parentSpec;if(!(i==null||i.has("*")||!this._countsForGrammar(r))&&!i.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,i){let s=r._subSpec;if(s==null||s.has("*")||r._meta?.subbuilder)return[];let a=new Map;for(let o of n){let u=this.schema[o];if(u&&!this._countsForGrammar(u))continue;let l=s.get(o);if(!l)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(a.get(o)||0)+1;if(a.set(o,c),c>l.max)throw new Error(`too many '${o}' in '${e}'`)}return i?[...s].filter(([o,u])=>(a.get(o)||0)<u.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let i=s=>{if(n[s]===null||n[s]===void 0)throw new Error(`'${r}': collection key needs attribute '${s}'`);return String(n[s])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(s,a)=>i(a)):i(e)}validateSource(){let e=[],r=(n,i="")=>{for(let s of n.getNodes()){let a=i?`${i}.${s.label}`:s.label,o=s.builder;o.validateCustomTypes(s);let u=o.schema[s.nodeTag];if(u&&!s._getMeta("data_element,subbuilder,component").some(Boolean)){let l=s.value instanceof W?s.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(s.nodeTag,u,l,!0);c.length&&e.push([a,c])}s.value instanceof W&&r(s.value,a)}};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={},i=e.runtimeToEvaluate(),s=new Set(i.keys()),a=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...i])if(!(typeof c!="string"||!Ye(d)))for(let f of zn(e,d))i.has(f)||i.set(f,a.get(f));let o=e._getMeta("data_element");for(let[c,d]of i){if(d instanceof ee){r.set(c,d.resolve());continue}let f=typeof c=="string"?Ye(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let h=e.absDatapath(f);if(r.set(c,this.data.getItem(h)),!o&&!h.includes("?")&&c===Gt){let p=this.data.getNode(h);p&&Object.assign(n,p.getAttr("_wdg"))}}let u=ss(i,r,(c,d,f,h)=>this.evaluatePointerExpression(e,c,d,f,h)),l=u.get(Gt);u.delete(Gt);for(let c of u.keys())s.has(c)||u.delete(c);return[l,{...Object.fromEntries(u),...n}]}evaluatePointerExpression(e,r,n,i,s){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 i=(typeof r=="function"?r:r.constructor)[e];if(typeof i=="function")return i}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[i,s]of Object.entries(r))So.has(i)||(n[i]=s);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[i,s]of Object.entries(r))i!=="destination"&&i!=="value"&&!i.startsWith("_")&&(n[i]=s);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 i of n.getNodes())i._getMeta("data_element")&&e.push(i),i.value instanceof W&&r(i.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 Co(this.constructor))if(Object.hasOwn(o,"components"))for(let u of o.components||[])e[u]=u;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,u]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=u;let i=Cr(r),s=this._collection||this.constructor._classCollection,a=s.toDocument();a.abstracts={},a.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new He(s.toDocument()).update(a),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=i}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(Sr,new r(null,this),e?{datapath:e}:null),n.getItem(Sr)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new vt(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),i=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=i,i}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 i=this.getRenderer(e);if(r===!1&&i.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let s=r===!1?null:r||this._defaultTargets.get(i.mode)||null,a={...s?.renderOpts,...n};return i.finalize(this.materialize(e,a),s,a)}};Le._registry=new Map;var yf=new Set(["short","medium","long","full"]),vf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function kf(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||be(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function Ef(t,e,r,n){let i=e.match(vf)||[];if(i.join("")!==e)throw new RangeError("Unclosed format literal");let s=(c,d=2)=>String(c).padStart(d,"0"),a=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),l={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>s(t.getUTCFullYear()%100),yyyy:()=>s(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>s(t.getUTCMonth()+1),MMM:()=>a({month:"short"}),MMMM:()=>a({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>s(t.getUTCDate()),EEE:()=>a({weekday:"short"}),EEEE:()=>a({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>s(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>s(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>s(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>s(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return i.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!l[c])throw new RangeError(`Unsupported date format token: ${c}`);return l[c]()}).join("")}function Oo(t,{format:e,mask:r,locale:n,dtype:i,places:s}={}){let a=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||s!=null))if(typeof t=="number"||ce(t))a=Df(t,{format:e,locale:n,places:s});else{let o=kf(t,i);if(yf.has(e)){let u={timeZone:"UTC"};o!=="H"&&(u.dateStyle=e),o!=="D"&&(u.timeStyle=e),a=new Intl.DateTimeFormat(n||void 0,u).format(t)}else a=Ef(t,String(e),n||void 0,o)}return r==null?a:String(r).replaceAll("%s",()=>a)}function Af({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 Df(t,e={}){if(typeof t!="number"&&!ce(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,Af(e));if(ce(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(ce(t)?t.toString():t)}var xf=new Set(["style","script"]),Tf=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"]),Bo=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"]),Or=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Io=t=>t===!0?"true":t===!1?"false":String(t),Nn=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function Nf(t){if(Bo.has(t))return!0;for(let e of Bo)if(t.startsWith(`${e}_`))return!0;return!1}function Cf(t){let e=new Map;if(!t)return e;let r=[],n=0,i=null,s=!1,a=!1,o=0,u=String(t);for(let l=0;l<u.length;l+=1){let c=u[l],d=u[l+1];if(a){c==="*"&&d==="/"&&(a=!1,l+=1);continue}if(s){s=!1;continue}if(c==="\\"){s=!0;continue}if(i){c===i&&(i=null);continue}c==='"'||c==="'"?i=c:c==="/"&&d==="*"?(a=!0,l+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(u.slice(n,l)),n=l+1)}r.push(u.slice(n));for(let l of r){let c=l.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 Br=class extends yt{static mode="html";renderedItem(e,r,n,{tag:i,xml:s=!0,pretty:a=!1,depthOffset:o=0,includeDatapath:u=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:h,dtype:p,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||h!=null)&&(r=Oo(r,{format:c,mask:d,places:h,dtype:p,locale:this._displayLocale(e,f)}));let _=this._formatAttrs(m);if(u){if(!Object.hasOwn(n,"id")){let E=this.builder.targetId(e);E!==null&&(_+=` id="${this._htmlAttrValue(E)}"`)}for(let[E,S]of Object.entries(e.getAttr()))e.pointerType(S)&&(_+=` data-${this.adapt(E)}-pointer="${this._htmlAttrValue(e.absDatapath(S))}"`)}let b=a?" ".repeat(this._nodeDepth(e,o)):"",w=a?`
|
|
22
|
-
`:"";if(e._getMeta("void"))return`${b}<${i}${_}${s?"/":""}>${w}`;if(Array.isArray(r)){let E=this._composeStringFragments(r);return`${b}<${i}${_}>${w}${E}${b}</${i}>${w}`}if(r==null)return`${b}<${i}${_}></${i}>${w}`;let y=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):xf.has(i)?String(r):this._escapeText(r);return`${b}<${i}${_}>${y}</${i}>${w}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let i=n.getAttr("locale");if(i==null)continue;let s=n.pointerType(i)?n.data.getItem(n.absDatapath(i)):i;if(s)return s}}adaptAttrs(e){let r={},n={};for(let[s,a]of Object.entries(e||{}))if(s.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(s)]=a;else if(s==="dtype")r.dtype=a;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>s.startsWith(o)))continue;this._isStyleContribution(s)?n[s]=a:r[s]=a}let i=this._adaptStyle(n);return i&&(r.style=i),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Or.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&Or.has(r)||Nf(e)}_adaptStyle(e){let r=Cf(e.style),n=new Map,i=new Map;for(let[s,a]of Object.entries(e))if(s!=="style")if(s.startsWith("style_"))r.set(s.slice(6).replaceAll("_","-"),Io(a));else if(Or.has(s))n.set(s,a);else{let o=s.indexOf("_"),u=o<0?s:s.slice(0,o);o>=0&&Or.has(u)?(i.has(u)||i.set(u,{}),i.get(u)[s.slice(o+1)]=a):r.set(s.replaceAll("_","-"),Io(a))}for(let s of Or)(n.has(s)||i.has(s))&&this[`_macro_${s}`](n.get(s),i.get(s)||{},r);return[...r].map(([s,a])=>`${s}: ${a}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,i]of Object.entries(e||{}))Tf.has(n)?i&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(i)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,r,n){let i=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[s,a]of Object.entries(r))if(s==="top"||s==="bottom")i[`${s}_left`]=a,i[`${s}_right`]=a;else if(s==="left"||s==="right")i[`top_${s}`]=a,i[`bottom_${s}`]=a;else if(["top_left","top_right","bottom_left","bottom_right"].includes(s))i[s]=a;else throw new TypeError(`rounded: unknown sub-kwarg '${s}'`);for(let[s,a]of Object.entries(i))n.set(`border-${s.replaceAll("_","-")}-radius`,Nn(a))}_macro_transform(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`rotate(${a}deg)`):s==="scale"||s==="translate"?i.push(`${s}(${a})`):s==="translate_x"?i.push(`translateX(${Nn(a)})`):s==="translate_y"?i.push(`translateY(${Nn(a)})`):s==="skew_x"?i.push(`skewX(${a}deg)`):s==="skew_y"?i.push(`skewY(${a}deg)`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("transform",i.join(" "))}_macro_filter(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`hue-rotate(${a}deg)`):s==="blur"?i.push(`blur(${Nn(a)})`):s==="drop_shadow"?i.push(`drop-shadow(${a})`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("filter",i.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[i,s]of Object.entries(r))n.set(`transition-${i.replaceAll("_","-")}`,String(s))}_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[i,s]of Object.entries(r))n.set(`box-shadow-${i.replaceAll("_","-")}`,String(s))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var Sf=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 Mo(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[Sf.has(e)?e.replaceAll("_","-"):e,r]))}var Ir=class extends vt{static mode="svg";adaptAttrs(e){return Mo(e)}};var Ro={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 Cn=class extends Le{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(Ro)}get renderer_html(){return new Br(this)}};Le.registerBuilder(Cn);var Lo={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 Sn=class extends Le{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Lo)}get renderer_svg(){return new Ir(this)}};Le.registerBuilder(Sn);var We="http://www.w3.org/2000/svg";var we={};rs(we,{defineCollection:()=>Mf});Fr(we,Ig);import*as Ig from"@gramlot/gramlot/components";import{defineCollection as If}from"@gramlot/gramlot/components";function Mf(t){if(t.name!=="grid")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,i)=>{n.href=e[i].href});for(let[n,i]of Object.entries(t.assets??{}))i.href=r[n].href;return If({...t,css:e,assets:r})}function $o(t,e){return t.parameters=Object.fromEntries(Object.entries(t.constructor.gramlotComponent.parameters).map(([r,n])=>[r,Object.hasOwn(e,r)?e[r]:n.default])),Object.fromEntries(Object.entries(e).filter(([r])=>!Object.hasOwn(t.parameters,r)))}function Mr(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)}
|
|
18
|
+
${" ".repeat(i)}</${a}>`:`<${a}${u}>${f}</${a}>`:r===null||r.includes(a)?`<${a}${u}/>`:`<${a}${u}></${a}>`}if(l==null||l==="")return r===null||r.includes(a)?`<${a}${u}/>`:`<${a}${u}></${a}>`;let c=l instanceof Date&&!Number.isNaN(l.getTime())?yf(l):String(l),d=this._escapeXml(c);return`<${a}${u}>${d}</${a}>`}_sanitizeTag(e){return e?e.replace(/[^a-zA-Z0-9_\-.:]/g,"_"):"_none_"}_escapeXml(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}_escapeAttr(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")}static fromXml(e,r={}){let{tagAttribute:n=null}=r,i;if(typeof DOMParser<"u"){i=new DOMParser().parseFromString(e,"application/xml");let a=i.querySelector("parsererror");if(a)throw new Error(`XML parse error: ${a.textContent}`)}else i=new vo.DOMParser().parseFromString(e,"application/xml");return this._xmlElementToBag(i.documentElement,n)}static _xmlElementToBag(e,r=null){let n=new this,i=Array.from(e.childNodes).filter(s=>s.nodeType===1);for(let s of i){let a=s.tagName,o={};for(let m=0;m<s.attributes.length;m++){let g=s.attributes[m];o[g.name]=g.value}let u=Cn(o._resolver);u&&delete o._resolver;let l=String(o._T||"").toUpperCase()==="BAG";Object.assign(o,Gi(o));let c=a;"_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 h=Array.from(s.childNodes).filter(m=>m.nodeType===1),p;if(h.length>0||l){let m=this._xmlElementToBag(s,r);p=n.setItem(c,m,Object.keys(o).length>0?o:null)}else{let m=s.textContent||"";p=n.setItem(c,m,Object.keys(o).length>0?o:null)}u&&(p.resolver=u),p.xmlTag=a}return n}static async fromUrl(e,r={}){let{timeout:n=30}=r,i={};n&&(i.signal=AbortSignal.timeout(n*1e3));let s=await fetch(e,i),a=s.headers.get("content-type")||"",o=await s.text();if(a.includes("json"))return t.fromTytx(o);if(a.includes("xml"))return t.fromXml(o);let u=o.trim();if(u.startsWith("<"))return t.fromXml(o);if(u.startsWith("{")||u.startsWith("["))return t.fromTytx(o);throw new Sr(`Unsupported content-type: ${a}`)}toJson(e=!0){let r=[];for(let n of this._nodes)r.push(this._nodeToJsonDict(n,e));return e?be(r):JSON.stringify(r)}_nodeToJsonDict(e,r){let n=e.resolver?null:e.getValue(!0);if(n&&typeof n._nodeToJsonDict=="function"){let s=[];for(let a of n._nodes)s.push(n._nodeToJsonDict(a,r));n=s}let i={label:e.label,value:n,attr:Nn(e.attr)};return e.nodeTag!==null&&(i.tag=e.nodeTag),e.resolver&&(i.resolver=Nr(e.resolver)),i}static fromJson(e,r={}){return yo||(console.warn("Bag.fromJson is deprecated; use Bag.fromTytx"),yo=!0),this.fromTytx(e,"json",r)}toStringTree(e=!0,r=null,n="",i=!0){r===null&&(r=new Map);let s=[],a=[...this._nodes];for(let o=0;o<a.length;o++){let u=a[o],l=o===a.length-1,c=u.getValue(e),d=u.getAttr(),f="",h=Object.keys(d);h.length>0&&(f=" ["+h.map(_=>`${_}=${JSON.stringify(d[_])}`).join(", ")+"]");let p=l?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",m=n+(l?" ":"\u2502 ");if(c instanceof t){let g=u,_=c.backref?"(*)":"";if(r.has(g))s.push(`${n}${p}${u.label}${_}${f} \u2192 (circular ref)`);else{r.set(g,u.label),s.push(`${n}${p}${u.label}${_}${f}`);let w=c.toStringTree(e,r,m,l);w&&s.push(w)}}else{let g;if(c===null)g="null";else if(c===void 0)g="undefined";else if(c instanceof ArrayBuffer||c instanceof Uint8Array){let _=new TextDecoder("utf-8",{fatal:!1}),w=c instanceof ArrayBuffer?new Uint8Array(c):c;g=_.decode(w)}else typeof c=="string"?c.length>50?g=JSON.stringify(c.slice(0,47)+"..."):g=JSON.stringify(c):g=String(c);s.push(`${n}${p}${u.label}: ${g}${f}`)}}return s.join(`
|
|
19
|
+
`)}toString(e=!0,r=null,n=""){r||(r=new Set);let i=[],s=[...this._nodes];for(let a=0;a<s.length;a++){let o=s[a],u=a===s.length-1,l=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=u?"\u2514\u2500\u2500 ":"\u251C\u2500\u2500 ",h=n+(u?" ":"\u2502 ");if(l&&typeof l._htraverse=="function"){let p=o;if(r.has(p))i.push(`${n}${f}${o.label}${c} \u2192 (circular ref)`);else{r.add(p),i.push(`${n}${f}${o.label}${c}`);let m=l.toString(e,r,h);m&&i.push(m)}}else{let p;l==null?p="null":typeof l=="string"&&l.length>50?p=JSON.stringify(l.slice(0,47)+"..."):typeof l=="string"?p=JSON.stringify(l):p=String(l),i.push(`${n}${f}${o.label}: ${p}${c}`)}}return i.join(`
|
|
20
|
+
`)}},Sr=class extends Error{constructor(e){super(e),this.name="BagException"}};ee.registerBagClass(te);Ui(te,"X",t=>t._toTytxPayload(),t=>te._fromTytxPayload(t));xr(te.tytxSuffix,{...ze(te.tytxSuffix),Bag:te});var Eo=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 xo(t){return t.endsWith("_")&&Eo.has(t.slice(0,-1))?t.slice(0,-1):t}function Ao(t){let e=xo(t);return e!==t?e:t.startsWith("_")&&Eo.has(t.slice(1))?t.slice(1):t}function Ki(t,{renderTag:e=null,ns:r=null,dialectName:n=null}={}){let i=e||t;if(!i)return i;if(i=xo(i),r&&!e){let s=`${n}_`;i.startsWith(s)&&(i=i.slice(s.length)),i=`${r}:${i}`}return i}var Gt=Symbol("value"),To=new Set(["_meta","datapath","nodeId","ns","form","formId","_anchor","updateOn"]);function Ji(t){return Object.entries(t||{}).filter(([e])=>!To.has(e)).map(([e,r])=>[Ao(e),r])}var Wt=class extends Ve{constructor(e,r,n=null,i=null,s=null,a=null,o=null){super(e,r,n,i,s,a,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(i=>i.trim());return n.length===1?r[n[0]]!==void 0?r[n[0]]:null:n.map(i=>r[i]!==void 0?r[i]: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 Ji(this.getAttr())}runtimeToEvaluate(){let e=new Map(this.fixedAttrItems());return e.set(Gt,this.value),e}absDatapath(e){let r=e;this.pointerType(e)&&(e=(at(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 i=n.getAttr("datapath");i!=null&&(e=e==="."?i:i+e),n=n.parentNode}if(e.startsWith("."))throw new Error(`unresolved relative datapath: ${r}`);return e}_collapseParentDatapath(e,r){let n=[];for(let i of e.split("."))if(i==="#parent"){if(n.length===0)throw new Error(`#parent has no segment to cancel: ${r}`);n.pop()}else n.push(i);return n.join(".")}_resolveSymbolicDatapath(e,r){let n=e.slice(1),i=n.indexOf("."),s=i===-1?n:n.slice(0,i),a=i===-1?"":n.slice(i+1),o;if(s==="FORM")o=this._findMarkedDatapathAncestor(!0,!1,r);else if(s==="ANCHOR")o=this._findMarkedDatapathAncestor(!1,!0,r);else{let u=this.rootBuilder;if(!u)throw new Error(`#<id>: cannot resolve ${r} on a node without builder`);if(o=u.source.getNodeByAttr("nodeId",s),o==null)throw new Error(`#<id>: cannot resolve ${r}`)}return o.absDatapath(a?`.${a}`:".")}_findMarkedDatapathAncestor(e,r,n){let i=this;for(;i!=null;){let a=i.getAttr()||{};if(e&&(a.formId!=null||a.form===!0)||r&&"_anchor"in a)return i;i=i.parentNode}let s=e?"FORM":"ANCHOR";throw new Error(`#${s}: no marked ancestor found for ${n}`)}getRelativeData(e,r=null,{autocreate:n=!1}={}){let i=this.data,s=this.absDatapath(e);return n&&i.getItem(s)==null&&i.setItem(s,r),i.getItem(s,r)}setRelativeData(e,r,{attributes:n=null,fired:i=!1,reason:s=null}={}){let a=this.data,o=this.absDatapath(e);a.setItem(o,r,n,">",!1,!0,s===null?!0:s,i)}fireEvent(e,r=!0,{attributes:n=null,reason:i=null}={}){this.setRelativeData(e,r,{attributes:n,fired:!0,reason:i})}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})}},W=class t extends te{constructor(e=null,r=null){super(e),this._builder=r,this._insertingBuilder=null}get nodeClass(){return Wt}_setBuilderItem(e,r,n,...i){let s=r?.map(([o])=>[o,o._builder])||null;if(r)for(let[o,u]of r)o._builder=u;let a=this._insertingBuilder;this._insertingBuilder=e;try{return this.setItem(n,...i)}catch(o){if(this.node(n)==null&&s)for(let[u,l]of s)u._builder=l;throw o}finally{this._insertingBuilder=a}}bindBuilder(e){if(!e)throw new Error("SourceBag.bindBuilder requires a builder");let r=this._builderBindingPlan(e);for(let[n,i]of r)n._builder=i;return this.setBackref(),this}_builderBindingPlan(e){let r=[],n=new WeakSet,i=(s,a)=>{if(n.has(s))throw new Error("source contains a cyclic or shared SourceBag branch");n.add(s),r.push([s,a]);for(let o of s.getNodes()){let u=a,l=o._getMeta("subbuilder");l!=null&&(u=a._resolveSubbuilderReference(l,o.getAttr()||{},o.nodeTag)),r.push([o,u]);let c=o.getValue(!0);c instanceof t&&i(c,u)}};return i(this,e),r}};if((ze(W.tytxSuffix).SourceBag??W)!==W)throw new Error("TYTX subtype name 'SourceBag' is already registered for another class");xr(W.tytxSuffix,{...ze(W.tytxSuffix),SourceBag:W});function xf(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 Af=new Set(["then","toJSON"]),Co=new WeakMap;function Or(t){return Co.get(t)||t}function Qi(t){if(t==null)return t;t=Or(t);let e=t._builder||t.parentBag&&t.parentBag._builder;return e?e.wrapSource(t):t}function No(t,e){let r=e instanceof te,n=new Proxy(e,{get(i,s){if(typeof s=="symbol"||s.startsWith("_")||Af.has(s))return Reflect.get(i,s,i);let a=t.schemaTag(s);if(r&&a)return Do(t,i,a,r);if(s in i){let u=Reflect.get(i,s,i);return typeof u=="function"?u.bind(i):u}if(a)return Do(t,i,a,r);let o=t.containerMethod(s);if(o)return(...u)=>t[o](t.wrapSource(i),...u)}});return Co.set(n,e),n}function Do(t,e,r,n){return(...i)=>{let{value:s,attrs:a}=xf(i),o=n?t.bagCall(e,r,s,a):t.commandOnNode(e,r,s,a);return o.builder.wrapSource(o)}}var Oo=/^[A-Za-z_][A-Za-z0-9_]*$/,Df=new Set(["positional_only","positional_or_keyword","keyword_only","var_positional","var_keyword"]),Tf=new Set(["framework","value","attribute"]),Cf=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 _t(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)}function E(t,e){throw new TypeError(`${t}: ${e}`)}function Le(t,e,r,n){_t(t)||E(n,"must be an object");for(let i of Object.keys(t))e.includes(i)||E(n,`unknown field '${i}'`);for(let i of r)Object.hasOwn(t,i)||E(n,`missing field '${i}'`)}function wt(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)=>wt(r,`${e}[${n}]`));if(_t(t))return Object.entries(t).forEach(([r,n])=>wt(n,`${e}.${r}`));E(e,"must be lossless JSON data")}}function Nf(t,e){let r="",n=!1;for(let i=0;i<t.length;i++){let s=t[i];if(s==="\\"){r+=s+(t[++i]??"");continue}s==="["&&(n=!0),!n&&s==="."&&!(e&16)?r+="[^\\n]":!n&&s==="^"&&e&8?r+="(?:^|(?<=\\n))":!n&&s==="$"?r+=e&8?"(?=\\n|(?![\\s\\S]))":"(?=\\n?(?![\\s\\S]))":r+=s,s==="]"&&(n=!1)}return r}function bt(t,e,r=!1,n=null){if(t===null)return null;switch(Le(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 Le(t,["kind","name"],["kind","name"],e),n||E(e,"custom references require a catalog; nested catalog references are unsupported"),n.resolve(t.name,e);case"dtype":{Le(t,["kind","dtype"],["kind","dtype"],e);let i=t.dtype;typeof i!="string"&&E(e,"dtype must be a string");let s=Er(i);return!s&&i!=="NN"&&E(e,`unknown dtype '${i}'`),{...t,test:o=>i==="NN"?o===null:i==="N"?oe(o)&&!["NaN","Infinity","-Infinity"].includes(o.toString()):s===Number?typeof o=="number"&&Number.isFinite(o)&&(i!=="L"||Number.isInteger(o)):s===String?typeof o=="string":s===Boolean?typeof o=="boolean":s===Date?o instanceof Date&&Number.isFinite(o.getTime()):s===Object?_t(o)&&[Object.prototype,null].includes(Object.getPrototypeOf(o)):o instanceof s}}case"any":return{...t,test:i=>!0};case"type":{(typeof t.module!="string"||typeof t.name!="string")&&E(e,"type requires string module/name");let i=`${t.module}.${t.name}`;if(i==="collections.abc.Callable")return{...t,test:a=>typeof a=="function",portable:!1};let s=Cf.get(i);return s||E(e,`unsupported type '${i}'`),{...t,test:s}}case"union":{(!Array.isArray(t.items)||!t.items.length)&&E(e,"union items must be non-empty");let i=t.items.map((s,a)=>bt(s,`${e}.items[${a}]`,!0,n));return{...t,items:i,inputConstraint:i.some(s=>s.inputConstraint),test:s=>i.some(a=>a.test&&a.test(s))}}case"literal":return Array.isArray(t.values)||E(e,"literal values must be an array"),t.values.forEach((i,s)=>wt(i,`${e}.values[${s}]`)),{...t,test:i=>t.values.some(s=>Object.is(s,i))};case"annotated":{Array.isArray(t.metadata)||E(e,"annotated metadata must be an array"),t.metadata.some(a=>!["regex","range","value"].includes(a?.kind))&&E(e,"unsupported annotation metadata kind");let i=bt(t.base,`${e}.base`,!0,n),s=t.metadata.map((a,o)=>bt(a,`${e}.metadata[${o}]`,!0,n));return{...t,base:i,metadata:s,inputConstraint:i.inputConstraint,test:a=>i.test(a)&&s.every(o=>!o.test||o.test(a))}}case"range":{for(let i of["ge","le","gt","lt"])Object.hasOwn(t,i)||E(e,`range missing '${i}'`);for(let i of["ge","le","gt","lt"])t[i]!==null&&(typeof t[i]!="number"||!Number.isFinite(t[i]))&&E(e,`${i} must be finite number or null`);return{...t,test:i=>typeof i=="number"&&(t.ge===null||i>=t.ge)&&(t.le===null||i<=t.le)&&(t.gt===null||i>t.gt)&&(t.lt===null||i<t.lt)}}case"regex":{(typeof t.pattern!="string"||!Number.isInteger(t.flags)||t.flags<0)&&E(e,"regex requires pattern and non-negative integer flags");let i=t.flags&-59;i&&E(e,`unsupported Python regex flags ${i}`),t.flags&2&&E(e,"IGNORECASE is not portable across Python and JavaScript Unicode rules"),/\\[AZzUwWdDsSabBN0-9]|\(\?P[<=!]|\(\?\(|\(\?>|\(\?#|\(\?[aiLmsux-]|[+*?}]\+|\{,/.test(t.pattern.replaceAll(String.raw`[\s\S]`,"."))&&E(e,"regex uses a non-portable construct or character class");let s="uy";t.flags&16&&(s+="s");let a;try{a=new RegExp(`(?:${Nf(t.pattern,t.flags)})(?![\\s\\S])`,s)}catch(o){E(e,`invalid portable regex: ${o.message}`)}return{...t,test:o=>typeof o!="string"?!1:(a.lastIndex=0,a.test(o))}}case"value":return wt(t.value,`${e}.value`),{...t};case"generic":{let i=bt(t.origin,`${e}.origin`,!0,n);(t.origin?.kind!=="type"||t.origin.module!=="builtins"||!["list","dict","tuple","set"].includes(t.origin.name))&&E(e,"only list, dict, tuple and set generic origins are supported"),Array.isArray(t.arguments)||E(e,"generic arguments must be an array");let s=t.arguments.map((a,o)=>bt(a,`${e}.arguments[${o}]`,!0,n));return{...t,origin:i,arguments:s,inputConstraint:s.some(a=>a.inputConstraint),test:a=>i.test(a)&&Sf(t.origin,s,a)}}case"arguments":E(e,"Callable argument-list descriptors are not supported by Python validation");case"ellipsis":return r||E(e,"ellipsis is only valid as a nested descriptor"),{...t};default:E(e,`unknown annotation kind '${t.kind}'`)}}function Sf(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((i,s)=>e[s].test(i)):n==="builtins.list"||n==="builtins.set"||n==="builtins.tuple"?[...r].every(i=>!e[0]?.test||e[0].test(i)):n==="builtins.dict"?Object.entries(r).every(([i,s])=>(!e[0]?.test||e[0].test(i))&&(!e[1]?.test||e[1].test(s))):!1}function Bo(t,e){if(t===null)return null;if(typeof t!="string"&&E(e,"must be string or null"),t==="")return new Map;let r=new Map;for(let n of t.split(",")){let i=n.trim();/^[A-Za-z_][A-Za-z0-9_]*\[\]$/.test(i)&&E(e,`invalid cardinality item '${n}'`);let s=i.match(/^([A-Za-z_][A-Za-z0-9_]*|\*)(?:\[(?:(\d+)|(?:(\d*):(\d*)))\])?$/);s||E(e,`invalid cardinality item '${n}'`);let[,a,o,u,l]=s;r.has(a)&&E(e,`duplicate tag '${a}'`);let c=0,d=1/0;i.includes("[")&&(i.includes(":")?(c=u?Number(u):0,d=l?Number(l):1/0):c=d=Number(o)),d<c&&E(e,`maximum ${d} is below minimum ${c}`),r.set(a,{min:c,max:d})}return r.has("*")&&r.size>1&&E(e,"wildcard '*' cannot be combined with named tags"),r}function Io(t,e){if(t===null)return null;typeof t!="string"&&E(e,"must be string or null");let r=new Set;for(let n of t.split(",")){let i=n.trim();i&&((!Oo.test(i)||r.has(i))&&E(e,`invalid or duplicate parent '${n}'`),r.add(i))}return r}function Of(t,e,r){if(t===null)return null;Le(t,["parameters","accepts_var_keyword","accepts_var_positional"],[],e);let n=t.parameters??[];Array.isArray(n)||E(e,"parameters must be an array"),t={parameters:n,accepts_var_keyword:n.some(u=>u.kind==="var_keyword"),accepts_var_positional:n.some(u=>u.kind==="var_positional"),...t},(!Array.isArray(t.parameters)||typeof t.accepts_var_keyword!="boolean"||typeof t.accepts_var_positional!="boolean")&&E(e,"invalid signature descriptor");let i=new Set,s=!1,a=!1,o=t.parameters.map((u,l)=>{let c=`${e}.parameters[${l}]`;return Le(u,["name","kind","role","annotation","has_default","default"],["name","kind","role","annotation","has_default"],c),(typeof u.name!="string"||!Oo.test(u.name)||i.has(u.name))&&E(c,"invalid or duplicate parameter name"),i.add(u.name),(!Df.has(u.kind)||!Tf.has(u.role)||typeof u.has_default!="boolean")&&E(c,"invalid kind, role, or has_default"),u.has_default!==Object.hasOwn(u,"default")&&E(c,"default presence must equal has_default"),u.has_default&&wt(u.default,`${c}.default`),s||=u.kind==="var_keyword",a||=u.kind==="var_positional",{...u,annotation:bt(u.annotation,`${c}.annotation`,!1,r)}});return(s!==t.accepts_var_keyword||a!==t.accepts_var_positional)&&E(e,"variadic summary flags do not match parameters"),{...t,parameters:o}}function So(t,e,r,n){let i=["doc","sub_tags","parent_tags","inherits_from","ns","attributes",...r?["node_label","collection_key"]:[],"_meta"];Le(t,i,[],e),t={...Object.fromEntries(i.map(s=>[s,null])),...t};for(let s of["doc","inherits_from","ns",...r?["node_label","collection_key"]:[]])t[s]!==null&&typeof t[s]!="string"&&E(e,`${s} must be string or null`);return t._meta!==null&&(_t(t._meta)||E(e,"_meta must be object or null"),wt(t._meta,`${e}._meta`)),Bo(t.sub_tags,`${e}.sub_tags`),Io(t.parent_tags,`${e}.parent_tags`),{...t,attributes:Of(t.attributes,`${e}.attributes`,n)}}function Mo(t){return t?t.split(",").map(e=>e.trim()).filter(Boolean):[]}function Ro(t,e){let r={...e};for(let[n,i]of Object.entries(t))n==="inherits_from"||n.startsWith("_")||r[n]||(r[n]=i);return r._meta={...t._meta||{},...e._meta||{}},r}function Lo(t){let e={...t};return e._subSpec=Object.hasOwn(e,"sub_tags")?Bo(e.sub_tags,"resolved.sub_tags"):null,e._parentSpec=Object.hasOwn(e,"parent_tags")?Io(e.parent_tags,"resolved.parent_tags"):null,e}function Fo(t,e,r,n){if(r.get(t)===1&&E(n,`inheritance cycle at '${t}'`),r.get(t)===2)return e[t];let i=e[t];i||E(n,`unknown abstract '${t}'`),r.set(t,1);let s={...i};for(let a of Mo(i.inherits_from))s=Ro(Fo(a,e,r,n),s);return s=Lo(s),r.set(t,2),e[t]=s,s}function es({abstracts:t={},elements:e={}}){let r={...t},n=new Map;for(let s of Object.keys(r))Fo(s,r,n,`abstracts.${s}.inherits_from`);let i={};for(let[s,a]of Object.entries(e)){let o={...a};for(let u of Mo(a.inherits_from)){let l=r[u];l||E(`elements.${s}.inherits_from`,`unknown abstract '${u}'`),o=Ro(l,o)}i[s]=Lo(o)}return{abstracts:r,elements:i}}function ts(t){Le(t,["document_format","grammar","abstracts","elements","custom_types"],["document_format","grammar","abstracts","elements"],"grammar document"),Le(t.document_format,["name","version"],["name","version"],"document_format"),(t.document_format.name!=="builder_grammar"||!["1.1","1.2"].includes(t.document_format.version))&&E("document_format","expected builder_grammar version 1.1 or 1.2"),Le(t.grammar,["name","version","title","description"],["name","version","title","description"],"grammar"),(typeof t.grammar.name!="string"||!t.grammar.name)&&E("grammar.name","must be non-empty string");for(let i of["version","title","description"])t.grammar[i]!==null&&typeof t.grammar[i]!="string"&&E(`grammar.${i}`,"must be string or null");(!_t(t.abstracts)||!_t(t.elements))&&E("grammar document","abstracts/elements must be objects"),Object.hasOwn(t,"custom_types")&&t.document_format.version!=="1.2"&&E("custom_types","requires version 1.2");let e=Sn.fromJSON(t.custom_types??{}),r={};for(let[i,s]of Object.entries(t.abstracts))(!i||i.startsWith("_"))&&E("abstracts",`invalid public name '${i}'`),r[i]=So(s,`abstracts.${i}`,!1,e);let n={};for(let[i,s]of Object.entries(t.elements))(!i||i.startsWith("_"))&&E("elements",`invalid public name '${i}'`),n[i]=So(s,`elements.${i}`,!0,e);return{grammar:structuredClone(t.grammar),abstracts:r,elements:n}}function $o(t,e,r,n){let i=e.attributes;if(!i)return;let s={...n};r!=null&&(s.node_value=r);let a=new Set(i.parameters.filter(l=>l.role==="attribute").map(l=>l.name)),o=new Set(["node_label","node_position","nodeId","target_id","datapath","iterate","store","_tag","_meta","ns"]);if(!i.accepts_var_keyword)for(let l of Object.keys(n))!a.has(l)&&!o.has(l)&&E(t,`unknown attribute '${l}'`);let u=e._meta?.component?i.parameters.find(l=>l.role!=="framework"&&["positional_only","positional_or_keyword"].includes(l.kind))?.name:null;for(let l of i.parameters){if(l.name===u||l.role==="framework"||l.kind.startsWith("var_"))continue;let c=Object.hasOwn(s,l.name);!c&&!l.has_default&&E(t,`missing required ${l.role} '${l.name}'`),c&&l.annotation!==null&&(!l.annotation.test||!l.annotation.test(s[l.name]))&&E(t,`invalid value for ${l.role} '${l.name}'`)}}var Sn=class t{#e=new Map;#s=new Map;register(e,r,n){let i=new Map([[String,"str"],[Number,"float"],["string","str"],["integer","int"],["number","float"]]),s=i.has(r)?{kind:"type",module:"builtins",name:i.get(r)}:r;return this.#o(e,{kind:"annotated",base:s,metadata:[n]})}#o(e,r){(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/.test(e)||e in this||["to_dict","from_dict"].includes(e)||Bf.has(e))&&E("custom_types",`invalid, reserved or duplicate name '${e}'`),Le(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))&&E(`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))&&E(`custom_types.${e}`,"portable Regex requires str; portable Range requires int or float"),wt(r,`custom_types.${e}`);let i=structuredClone(r),s=bt(i,`custom_types.${e}`),a=Object.freeze({kind:"custom",name:e});return Object.defineProperty(this,e,{value:a,enumerable:!0}),this.#e.set(e,i),this.#s.set(e,{...a,inputConstraint:!0,test:s.test}),a}resolve(e,r="custom_types"){return this.#s.has(e)||E(r,`unknown custom type '${e}'`),{...this.#s.get(e)}}validate(e,r){return this.resolve(e).test(r)||E(`custom_types.${e}`,"invalid input value"),!0}toJSON(){return structuredClone(Object.fromEntries(this.#e))}static fromJSON(e){_t(e)||E("custom_types","must be an object");let r=new t;for(let[n,i]of Object.entries(e))r.#o(n,i);return r}},Bf=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 qo(t,e,r,n){let i=e?.attributes;if(i)for(let s of i.parameters){if(!s.annotation?.inputConstraint||s.role==="framework"||["var_keyword","var_positional"].includes(s.kind))continue;let a=s.role==="value"?r:n[s.name];a!==void 0&&(s.annotation.test(a)||E(t,`invalid input for '${s.name}' (custom type)`))}}function Po(t,e,r=[]){if(e===null)return structuredClone(t);if(r.length===2&&r[0]==="custom_types"&&t!==void 0){if(!rs(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(He(t)&&He(e)){let n=structuredClone(t);for(let[i,s]of Object.entries(e))s!==null&&Object.defineProperty(n,i,{value:Po(n[i],s,[...r,i]),enumerable:!0,writable:!0,configurable:!0});return n}return structuredClone(e)}function rs(t,e){return Object.is(t,e)?!0:Array.isArray(t)&&Array.isArray(e)?t.length===e.length&&t.every((r,n)=>rs(r,e[n])):He(t)&&He(e)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every(r=>Object.hasOwn(e,r)&&rs(t[r],e[r])):!1}function He(t){return t!==null&&typeof t=="object"&&!Array.isArray(t)&&Object.getPrototypeOf(t)===Object.prototype}function ns(t){if(!(t===null||typeof t=="string"||typeof t=="boolean")&&!(typeof t=="number"&&Number.isFinite(t))){if(Array.isArray(t)){t.forEach(ns);return}if(He(t)){Object.values(t).forEach(ns);return}throw new TypeError("collection must contain only finite JSON values")}}var We=class t{#e;constructor(e){ns(e);let r=["document_format","grammar","abstracts","elements"];if(!He(e)||Object.keys(e).some(i=>![...r,"custom_types"].includes(i))||r.some(i=>!Object.hasOwn(e,i)))throw new TypeError("collection requires document_format, grammar, abstracts and elements");let n=e.document_format;if(!He(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 i of["grammar","abstracts","elements"])if(!He(e[i]))throw new TypeError(`${i} must be an object`);if(Object.hasOwn(e,"custom_types")&&(n.version!=="1.2"||!He(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=Po(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 yt=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,[i,s]=n.runtimeValues(e);if(e._getMeta("data_element"))return null;if(e._getMeta("component"))return this._renderComponent(e,s,r);let a=this.getRender(n),o;return[o,s]=a._handleMeta(e,s),e._getMeta("subbuilder")||(s=a.adaptAttrs(s)),e.value instanceof W&&(i=this.renderChildren(e.value,r)),a.renderedItem(e,i,s,{tag:o,...r})}renderChildren(e,r={}){let n=[];for(let i of e.getNodes()){let s=this.render(i,r);s!==null&&(Array.isArray(s)?n.push(...s):n.push(s))}return n}_renderComponent(e,r,n){let[i,s,a,o]=this._expansionInputs(e,r);if(!Object.hasOwn(e.getAttr(),"iterate"))return this._expandBlock(e,i,a,o,n);if(s==null)return[];if(!(s instanceof te))throw new TypeError(`component '${e.nodeTag}': iterate must resolve to a Bag, got ${s?.constructor?.name||typeof s}`);return s.getNodes().map(u=>this._expandBlock(e,i,a,{node_label:u.label},n))}_expansionInputs(e,r){let n=e.builder,i=n.componentMethod(e.nodeTag),s=i&&n[i];if(typeof s!="function")throw new Error(`component '${e.nodeTag}' has no implementation`);let a=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 u of Object.keys(r)){let l=e.getAttr(u);e.pointerType(l)==="^"&&(r[u]=`^${e.absDatapath(l)}`)}return[s,a,o,r]}_expandBlock(e,r,n,i,s){let a=e.builder._expansionRoot(n);r.call(e.builder,Qi(a),i);let o=a.getNodes();if(o.length!==1)throw new Error(`component '${e.nodeTag}' must build a tree, not a forest: ${o.length} root nodes`);let u={...s,depthOffset:this._nodeDepth(e,s.depthOffset||0)};return this.render(o[0],u)}preprocess(e){return e}renderedItem(e,r,n,i){throw new Error(`${this.constructor.name} does not implement renderedItem`)}_handleMeta(e,r){let[n,i]=e._getMeta("render_tag,render_attributes"),s=Ki(e.nodeTag,{renderTag:n,ns:e.getAttr("ns"),dialectName:e.builder?.constructor._name});if(!s)throw new Error(`node ${e.label} has no tag to render (no render_tag, no node_tag)`);return i&&(r={...r,...i}),[s,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 i=this._composeStringFragments(e);if(r==null)return i;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(i),null;if(typeof r.write=="function")return r.write(i),null;if(typeof r=="function")return r(i),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("&","&").replaceAll("<","<").replaceAll(">",">")}_escapeAttr(e){return this._escapeText(e).replaceAll('"',""")}_nodeDepth(e,r=0){let i=((e.fullpath||"").match(/\./g)||[]).length;return Math.max(i-1,0)+r}};var vt=class extends yt{static mode="xml";renderedItem(e,r,n,{tag:i,pretty:s=!1,depthOffset:a=0}={}){let o=this._formatAttrs(n),u=s?" ".repeat(this._nodeDepth(e,a)):"",l=s?`
|
|
21
|
+
`:"";if(Array.isArray(r)){let c=this._composeStringFragments(r);return`${u}<${i}${o}>${l}${c}${u}</${i}>${l}`}return r==null?`${u}<${i}${o}></${i}>${l}`:`${u}<${i}${o}>${this._escapeText(r)}</${i}>${l}`}finalize(e,r=null,{docHeader:n=null}={}){let i=this._composeStringFragments(e);return n===!0?i=`<?xml version='1.0' encoding='UTF-8'?>${i}`:typeof n=="string"&&(i=n+i),super.finalize(i,r)}_formatAttrs(e){return Object.entries(e||{}).map(([r,n])=>` ${r.startsWith("xmlns_")?`xmlns:${r.slice(6)}`:r}="${this._escapeAttr(n)}"`).join("")}};var Uo={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 jo(t){let e=[];for(;t&&t!==Function.prototype;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}function Mf(t){let e=Object.create(null),r=(n,i)=>{let s=n.toLowerCase(),a=e[s];if(a!==void 0&&a!==i)throw new Error(`container '${n}' is already tied to implementation method '${a}' (cannot rebind to '${i}')`);e[s]=i};for(let n of jo(t))if(Object.hasOwn(n,"containers"))for(let i of n.containers||[])r(i,i);return e}function Br(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 Ir="_root_",is="_root_",zo=new Set(["destination","func","value","_on_start"]),Fe=class t{static _sourceClass=W;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 te,this._dataroot.setBackref(),this._dataroot.setItem(is,new te),this.data=this._dataroot.getItem(is),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(Ir,new r(null,this)),this.source=this._sourceroot.getItem(Ir)}wrapSource(e){if(e=Or(e),!(e instanceof W)&&!(e instanceof Wt))throw new TypeError("wrapSource requires a SourceBag or SourceBagNode");let r=this._sourceHandles.get(e);return r||(r=No(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 We(r.toDocument()).update(e):new We(e),i=ts(n.toDocument()),s=es(i),a=Br(s.elements);this._classCollection=n,this._classSchema=s.elements,this._abstracts=s.abstracts,this._tagNames=a}static{this.defineGrammar(Uo)}get _containers(){return Mf(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??=Br(this.schema):this.constructor._tagNames??=Br(this.schema)}schemaTag(e){let r=e.toLowerCase(),n=this.schemaTagNames[r];if(n)return n;let i=`${this.constructor._name}_`;return r.startsWith(i)&&this.schemaTagNames[r.slice(i.length)]||null}loadGrammar(e,{replace:r=!1}={}){let n=this._collection||this.constructor._classCollection,i=r?new We(e):new We(n.toDocument()).update(e),s=ts(i.toDocument()),a=es(s),o=Br(a.elements);return this._collection=i,this._schemaOverride=a.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;qo(e.nodeTag,n.schema[e.nodeTag],e.value,e.getAttr()||{})}validateNodeValues(e,r,n={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);return $o(i,this.schema[i],r,n),!0}validateNode(e,{value:r,attrs:n,childTags:i}={}){if(!e||typeof e.nodeTag!="string")throw new TypeError("validateNode requires a source node");let s=r!==void 0?r:e.value instanceof W?null:e.value;this.validateNodeValues(e.nodeTag,s,n||e.getAttr?.()||{});let a=this.schema[this.schemaTag(e.nodeTag)],o=i||(e.value instanceof W?e.value.getNodes().map(u=>u.nodeTag):null);return o&&this._validateChildren(e.nodeTag,a,o,!1),!0}validateChildren(e,r,{includeMinimum:n=!1}={}){let i=this.schemaTag(e);if(!i)throw new Error(`unknown element '${e}'`);if(!Array.isArray(r)||r.some(s=>typeof s!="string"))throw new TypeError("childTags must be an array of strings");return this._validateChildren(i,this.schema[i],r,n)}validateParent(e,r=null){let n=this.schemaTag(e);if(!n)throw new Error(`unknown element '${e}'`);let i=this.schema[n];if(!this._countsForGrammar(i))return!0;let s=i._parentSpec;if(s==null||s.has("*"))return!0;if(r===null)throw new Error(`'${n}' requires a declared parent`);let a=this.schemaTag(r);if(!a)throw new Error(`unknown parent element '${r}'`);return this._validateParent(n,i,a),!0}bagCall(e,r,n,i){return this.setChild(e,r,n,i)}commandOnNode(e,r,n,i){if(e=Or(e),e.value instanceof W)return this.setChild(e.value,r,n,i);let s=e.value,a=new e.parentBag.constructor(null,e.builder||this),o=this.setChild(a,r,n,i,e);return this.promoteNodeValue(e,s,a),o}promoteNodeValue(e,r,n){e.setValue(n)}setChild(e,r,n,i,s=null){let a={...i},o=this.schema[r];if(!o)throw new Error(`unknown element '${r}'`);this.validateNodeValues(r,n,a);let u=o._meta?.subbuilder,c=(u==null?null:this._resolveSubbuilderReference(u,a,r))||this,d=n instanceof W?n._builderBindingPlan(c):null,f=s?.rootBuilder||e.root._builder||this;if(a.nodeId!=null&&f.source.getNodeByAttr("nodeId",a.nodeId))throw new Error(`Duplicate nodeId '${a.nodeId}'`);n instanceof W&&this._validateChildren(r,o,n.getNodes().map(y=>y.nodeTag),!1);let h=s||e.parentNode,p=h?.nodeTag?this.schema[h.nodeTag]:null;if(p&&!h._getMeta("subbuilder")&&this._countsForGrammar(o))this._validateParent(r,o,h.nodeTag),this._validateChildren(h.nodeTag,p,[...e.getNodes().map(y=>y.nodeTag),r],!1);else if(!p&&!h?._getMeta("subbuilder")&&o._parentSpec!=null&&this._countsForGrammar(o))throw new Error(`'${r}' requires a declared parent`);o._meta&&!("_meta"in a)&&(a._meta=o._meta),o.ns&&!("ns"in a)&&(a.ns=o.ns);let m=a.node_position;delete a.node_position;let g=a.node_label;delete a.node_label;let _;if(p?.collection_key){if(g!=null)throw new Error(`'${r}': node_label is not allowed in a collection`);_=this._collectionLabel(p.collection_key,r,a)}else{let y=p?._subSpec?.get(r);if(y&&y.max===1){if(g!=null)throw new Error(`'${r}': node_label is not allowed on a singleton`);_=r}else _=g||o.node_label||this._autoLabel(e,r)}if(e.node(_)!=null)throw new Error(`duplicate node label '${_}'`);return e._setBuilderItem(c,d,_,n,a,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 i=r._parentSpec;if(!(i==null||i.has("*")||!this._countsForGrammar(r))&&!i.has(n))throw new Error(`'${e}' not allowed as child of '${n}'`)}_validateChildren(e,r,n,i){let s=r._subSpec;if(s==null||s.has("*")||r._meta?.subbuilder)return[];let a=new Map;for(let o of n){let u=this.schema[o];if(u&&!this._countsForGrammar(u))continue;let l=s.get(o);if(!l)throw new Error(`'${o}' not allowed as child of '${e}'`);let c=(a.get(o)||0)+1;if(a.set(o,c),c>l.max)throw new Error(`too many '${o}' in '${e}'`)}return i?[...s].filter(([o,u])=>(a.get(o)||0)<u.min).map(([o])=>o):[]}_collectionLabel(e,r,n){let i=s=>{if(n[s]===null||n[s]===void 0)throw new Error(`'${r}': collection key needs attribute '${s}'`);return String(n[s])};return e.includes("${")?e.replace(/\$\{([^}]+)\}/g,(s,a)=>i(a)):i(e)}validateSource(){let e=[],r=(n,i="")=>{for(let s of n.getNodes()){let a=i?`${i}.${s.label}`:s.label,o=s.builder;o.validateCustomTypes(s);let u=o.schema[s.nodeTag];if(u&&!s._getMeta("data_element,subbuilder,component").some(Boolean)){let l=s.value instanceof W?s.value.getNodes().map(d=>d.nodeTag):[],c=o._validateChildren(s.nodeTag,u,l,!0);c.length&&e.push([a,c])}s.value instanceof W&&r(s.value,a)}};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={},i=e.runtimeToEvaluate(),s=new Set(i.keys()),a=new Map([...Object.entries(e.getAttr()),...e.fixedAttrItems()]);for(let[c,d]of[...i])if(!(typeof c!="string"||!at(d)))for(let f of Hi(e,d))i.has(f)||i.set(f,a.get(f));let o=e._getMeta("data_element");for(let[c,d]of i){if(d instanceof ee){r.set(c,d.resolve());continue}let f=typeof c=="string"?at(d)?.pointer??d:d;if(!e.pointerType(f)){r.set(c,typeof c=="string"&&typeof d=="string"&&d.startsWith("==")?null:d);continue}let h=e.absDatapath(f);if(r.set(c,this.data.getItem(h)),!o&&!h.includes("?")&&c===Gt){let p=this.data.getNode(h);p&&Object.assign(n,p.getAttr("_wdg"))}}let u=go(i,r,(c,d,f,h)=>this.evaluatePointerExpression(e,c,d,f,h)),l=u.get(Gt);u.delete(Gt);for(let c of u.keys())s.has(c)||u.delete(c);return[l,{...Object.fromEntries(u),...n}]}evaluatePointerExpression(e,r,n,i,s){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 i=(typeof r=="function"?r:r.constructor)[e];if(typeof i=="function")return i}throw new Error(`data-element func '${e}' not found on any data_logic source`)}_bindings(e){let[,r]=this.runtimeValues(e),n={};for(let[i,s]of Object.entries(r))zo.has(i)||(n[i]=s);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[i,s]of Object.entries(r))i!=="destination"&&i!=="value"&&!i.startsWith("_")&&(n[i]=s);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 i of n.getNodes())i._getMeta("data_element")&&e.push(i),i.value instanceof W&&r(i.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 jo(this.constructor))if(Object.hasOwn(o,"components"))for(let u of o.components||[])e[u]=u;if(!Object.keys(e).length)return;let r={...this.schema},n={};for(let[o,u]of Object.entries(e))r[o]={sub_tags:"",_meta:{component:!0}},n[o.toLowerCase()]=u;let i=Br(r),s=this._collection||this.constructor._classCollection,a=s.toDocument();a.abstracts={},a.elements=Object.fromEntries(Object.keys(e).map(o=>[o,r[o]])),this._collection=new We(s.toDocument()).update(a),this._schemaOverride=r,this._componentMap=n,this._tagNamesOverride=i}_expansionRoot(e=null){let r=this.constructor._sourceClass,n=new r(null,this);return n.setBackref(),n.setItem(Ir,new r(null,this),e?{datapath:e}:null),n.getItem(Ir)}create(){this.setup(this.data),this._resolveComponents(),this.main(this.root),this.computeLogic(this._dataElementNodes())}get renderer_xml(){return new vt(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),i=n.renderChildren(n.preprocess(this.source),r);return this.materialized[e]=i,i}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 i=this.getRenderer(e);if(r===!1&&i.renderType!=="string")throw new TypeError("target=false is not valid for an object renderer");let s=r===!1?null:r||this._defaultTargets.get(i.mode)||null,a={...s?.renderOpts,...n};return i.finalize(this.materialize(e,a),s,a)}};Fe._registry=new Map;var Rf=new Set(["short","medium","long","full"]),Lf=/('(?:[^']|'')*'|[a-zA-Z]+|[^a-zA-Z']+)/g;function Ff(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||be(t).split("::").at(-1);if(!["D","H","DH","DHZ"].includes(r))throw new RangeError(`Unsupported temporal dtype: ${r}`);return r}function $f(t,e,r,n){let i=e.match(Lf)||[];if(i.join("")!==e)throw new RangeError("Unclosed format literal");let s=(c,d=2)=>String(c).padStart(d,"0"),a=c=>new Intl.DateTimeFormat(r,{timeZone:"UTC",...c}).format(t),l={...n==="H"?{}:{y:()=>String(t.getUTCFullYear()),yy:()=>s(t.getUTCFullYear()%100),yyyy:()=>s(t.getUTCFullYear(),4),M:()=>String(t.getUTCMonth()+1),MM:()=>s(t.getUTCMonth()+1),MMM:()=>a({month:"short"}),MMMM:()=>a({month:"long"}),d:()=>String(t.getUTCDate()),dd:()=>s(t.getUTCDate()),EEE:()=>a({weekday:"short"}),EEEE:()=>a({weekday:"long"})},...n==="D"?{}:{H:()=>String(t.getUTCHours()),HH:()=>s(t.getUTCHours()),h:()=>String(t.getUTCHours()%12||12),hh:()=>s(t.getUTCHours()%12||12),m:()=>String(t.getUTCMinutes()),mm:()=>s(t.getUTCMinutes()),s:()=>String(t.getUTCSeconds()),ss:()=>s(t.getUTCSeconds()),a:()=>new Intl.DateTimeFormat(r,{hour:"numeric",hour12:!0,timeZone:"UTC"}).formatToParts(t).find(c=>c.type==="dayPeriod").value}};return i.map(c=>{if(c.startsWith("'"))return c==="''"?"'":c.slice(1,-1).replaceAll("''","'");if(!/^[a-zA-Z]/.test(c))return c;if(!l[c])throw new RangeError(`Unsupported date format token: ${c}`);return l[c]()}).join("")}function Vo(t,{format:e,mask:r,locale:n,dtype:i,places:s}={}){let a=t==null?"":String(t);if(t!=null&&t!==""&&(e!=null&&e!==""||s!=null))if(typeof t=="number"||oe(t))a=Pf(t,{format:e,locale:n,places:s});else{let o=Ff(t,i);if(Rf.has(e)){let u={timeZone:"UTC"};o!=="H"&&(u.dateStyle=e),o!=="D"&&(u.timeStyle=e),a=new Intl.DateTimeFormat(n||void 0,u).format(t)}else a=$f(t,String(e),n||void 0,o)}return r==null?a:String(r).replaceAll("%s",()=>a)}function qf({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 Pf(t,e={}){if(typeof t!="number"&&!oe(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,qf(e));if(oe(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(oe(t)?t.toString():t)}var Uf=new Set(["style","script"]),jf=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"]),Ho=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"]),Mr=new Set(["rounded","gradient","shadow","transform","transition","zoom","filter"]),Wo=t=>t===!0?"true":t===!1?"false":String(t),On=t=>typeof t=="number"&&Number.isFinite(t)?`${t}px`:String(t);function zf(t){if(Ho.has(t))return!0;for(let e of Ho)if(t.startsWith(`${e}_`))return!0;return!1}function Vf(t){let e=new Map;if(!t)return e;let r=[],n=0,i=null,s=!1,a=!1,o=0,u=String(t);for(let l=0;l<u.length;l+=1){let c=u[l],d=u[l+1];if(a){c==="*"&&d==="/"&&(a=!1,l+=1);continue}if(s){s=!1;continue}if(c==="\\"){s=!0;continue}if(i){c===i&&(i=null);continue}c==='"'||c==="'"?i=c:c==="/"&&d==="*"?(a=!0,l+=1):"([{".includes(c)?o+=1:")]}".includes(c)&&o>0?o-=1:c===";"&&o===0&&(r.push(u.slice(n,l)),n=l+1)}r.push(u.slice(n));for(let l of r){let c=l.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 Rr=class extends yt{static mode="html";renderedItem(e,r,n,{tag:i,xml:s=!0,pretty:a=!1,depthOffset:o=0,includeDatapath:u=!1}={}){e.parentNode?._getMeta("subbuilder")==="html"&&(n={xmlns:"http://www.w3.org/1999/xhtml",...n});let{format:c,mask:d,locale:f,places:h,dtype:p,...m}=n;!Array.isArray(r)&&(c!=null||d!=null||h!=null)&&(r=Vo(r,{format:c,mask:d,places:h,dtype:p,locale:this._displayLocale(e,f)}));let g=this._formatAttrs(m);if(u){if(!Object.hasOwn(n,"id")){let k=this.builder.targetId(e);k!==null&&(g+=` id="${this._htmlAttrValue(k)}"`)}for(let[k,S]of Object.entries(e.getAttr()))e.pointerType(S)&&(g+=` data-${this.adapt(k)}-pointer="${this._htmlAttrValue(e.absDatapath(S))}"`)}let _=a?" ".repeat(this._nodeDepth(e,o)):"",w=a?`
|
|
22
|
+
`:"";if(e._getMeta("void"))return`${_}<${i}${g}${s?"/":""}>${w}`;if(Array.isArray(r)){let k=this._composeStringFragments(r);return`${_}<${i}${g}>${w}${k}${_}</${i}>${w}`}if(r==null)return`${_}<${i}${g}></${i}>${w}`;let y=typeof r=="string"&&r.endsWith("::HTML")?r.slice(0,-6):Uf.has(i)?String(r):this._escapeText(r);return`${_}<${i}${g}>${y}</${i}>${w}`}_displayLocale(e,r){if(r)return r;for(let n=e.parentNode;n;n=n.parentNode){let i=n.getAttr("locale");if(i==null)continue;let s=n.pointerType(i)?n.data.getItem(n.absDatapath(i)):i;if(s)return s}}adaptAttrs(e){let r={},n={};for(let[s,a]of Object.entries(e||{}))if(s.startsWith(`${this.builder.constructor._name}_`))r[this.adapt(s)]=a;else if(s==="dtype")r.dtype=a;else{if(this.builder.constructor.retainedAttrPrefixes.some(o=>s.startsWith(o)))continue;this._isStyleContribution(s)?n[s]=a:r[s]=a}let i=this._adaptStyle(n);return i&&(r.style=i),r}_isStyleContribution(e){if(e==="style"||e.startsWith("style_")||Mr.has(e))return!0;let r=e.includes("_")?e.slice(0,e.indexOf("_")):null;return r!==null&&Mr.has(r)||zf(e)}_adaptStyle(e){let r=Vf(e.style),n=new Map,i=new Map;for(let[s,a]of Object.entries(e))if(s!=="style")if(s.startsWith("style_"))r.set(s.slice(6).replaceAll("_","-"),Wo(a));else if(Mr.has(s))n.set(s,a);else{let o=s.indexOf("_"),u=o<0?s:s.slice(0,o);o>=0&&Mr.has(u)?(i.has(u)||i.set(u,{}),i.get(u)[s.slice(o+1)]=a):r.set(s.replaceAll("_","-"),Wo(a))}for(let s of Mr)(n.has(s)||i.has(s))&&this[`_macro_${s}`](n.get(s),i.get(s)||{},r);return[...r].map(([s,a])=>`${s}: ${a}`).join("; ")}_formatAttrs(e){let r=[];for(let[n,i]of Object.entries(e||{}))jf.has(n)?i&&r.push(` ${n}`):r.push(` ${n}="${this._htmlAttrValue(i)}"`);return r.join("")}_htmlAttrValue(e){return(e===!0?"true":e===!1?"false":String(e)).replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""")}_macro_rounded(e,r,n){let i=e===void 0?{}:{top_left:e,top_right:e,bottom_left:e,bottom_right:e};for(let[s,a]of Object.entries(r))if(s==="top"||s==="bottom")i[`${s}_left`]=a,i[`${s}_right`]=a;else if(s==="left"||s==="right")i[`top_${s}`]=a,i[`bottom_${s}`]=a;else if(["top_left","top_right","bottom_left","bottom_right"].includes(s))i[s]=a;else throw new TypeError(`rounded: unknown sub-kwarg '${s}'`);for(let[s,a]of Object.entries(i))n.set(`border-${s.replaceAll("_","-")}-radius`,On(a))}_macro_transform(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`rotate(${a}deg)`):s==="scale"||s==="translate"?i.push(`${s}(${a})`):s==="translate_x"?i.push(`translateX(${On(a)})`):s==="translate_y"?i.push(`translateY(${On(a)})`):s==="skew_x"?i.push(`skewX(${a}deg)`):s==="skew_y"?i.push(`skewY(${a}deg)`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("transform",i.join(" "))}_macro_filter(e,r,n){let i=e===void 0?[]:[String(e)];for(let[s,a]of Object.entries(r))s==="rotate"?i.push(`hue-rotate(${a}deg)`):s==="blur"?i.push(`blur(${On(a)})`):s==="drop_shadow"?i.push(`drop-shadow(${a})`):i.push(`${s.replaceAll("_","-")}(${a})`);i.length&&n.set("filter",i.join(" "))}_macro_transition(e,r,n){e!==void 0&&n.set("transition",String(e));for(let[i,s]of Object.entries(r))n.set(`transition-${i.replaceAll("_","-")}`,String(s))}_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[i,s]of Object.entries(r))n.set(`box-shadow-${i.replaceAll("_","-")}`,String(s))}_macro_gradient(e,r,n){e!==void 0&&n.set("background-image",String(e))}};var Hf=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 Go(t){return Object.fromEntries(Object.entries(t||{}).map(([e,r])=>[Hf.has(e)?e.replaceAll("_","-"):e,r]))}var Lr=class extends vt{static mode="svg";adaptAttrs(e){return Go(e)}};var Yo={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 Bn=class extends Fe{static _name="html";static _defaultRenderMode="html";static retainedAttrPrefixes=["validate_","dtype"];static{this.defineGrammar(Yo)}get renderer_html(){return new Rr(this)}};Fe.registerBuilder(Bn);var Xo={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 In=class extends Fe{static _name="svg";static _defaultRenderMode="svg";static{this.defineGrammar(Xo)}get renderer_svg(){return new Lr(this)}};Fe.registerBuilder(In);var xe="http://www.w3.org/2000/svg";function Mn(){return Array.from(globalThis.crypto.getRandomValues(new Uint8Array(16)),t=>t.toString(16).padStart(2,"0")).join("")}var Rn=class{#e;#s;#o;#l=[];#u;#d;#a;#r=null;#t=null;#_;#v;#k;#f;#n;#p=!1;#y=[];#b;#g=[];#i=!1;#h=!1;constructor(e,r){this.#e=e,this.#s=r;let n=this.#a=e.ownerDocument.createElement("div");n.className="column-filter-panel",n.setAttribute("popover","auto"),n.setAttribute("role","dialog");let i=e.ownerDocument.createElement("slot");i.name="column-filter",n.append(i),n.addEventListener("toggle",s=>{s.newState==="closed"&&!n.matches(":popover-open")&&this.#m()}),e.addEventListener("keydown",s=>{this.#r&&s.key==="Escape"&&(s.preventDefault(),s.stopPropagation(),this.close())}),e.shadowRoot.append(n)}setSourceContext(e){this.#d=e;let r=e.sourceNode,n=r.rootBuilder;r.staticValue===null&&r.setValue(new n.source.constructor(null,n),!1),e.sourceNode.rootBuilder.binding.bindingFor(e.sourceNode).track(()=>this.dispose())}#E(){if(this.#n)return;let e=this.#d.sourceNode,r=e.rootBuilder;this.#f=`_gramlot.grid.${Mn()}.columnFilter`,this.#n=new Zo({rows:new Zo,checked:"",title:"",summary:"",from:null,to:null,hideRange:!0,rangeError:""}),e.setRelativeData(this.#f,this.#n);let n=r.wrapSource(e).div({node_label:`column_filter_${Mn()}`,slot:"column-filter",display:"flex",flex_direction:"column",gap:"8px",padding:"10px",style:"font-size:12px;--gramlot-grid-row-height:28px;--gramlot-grid-font-size:12px;--gramlot-grid-cell-padding:4px 7px;--gramlot-menu-item-padding:4px 7px"});this.#_=Yt(n),this.#_.setAttr({datapath:this.#f});let i=new r.source.constructor(null,r),s=r.wrapSource(i);s.div("^.title",{font_weight:"600",padding:"0 2px"});let a=s.div({display:"flex",gap:"8px",hidden:"^.hideRange"});this.#y=[Yt(a.dateTextBox({value:"^.from",period_to:".to",lbl:"From",width:"136px"})),Yt(a.dateTextBox({value:"^.to",lbl:"To",width:"136px"}))],s.div("^.rangeError",{role:"alert",color:"var(--gramlot-error)"});let o=s.frameGrid({storepath:".rows",rowMode:"attributes",height:"270px",width:"100%"});this.#v=Yt(o),this.#k=Yt(o.toolbar.menuline({group:!0,class:"gramlot-grid-search"}).searchBox({searchOn:"Value:caption",searchLiteral:!0}));let u=o.grid;u.setAttr({sortedBy:"caption:a"});let l=u.struct();l.column({field:"selected",name:"\u2713",title:"Selected values",width:"32px",align:"center",check:"multiple",checked:"^.checked",checkedField:"id"}),l.column({field:"caption",name:"Value",width:"170px"}),l.column({field:"count",name:"Rows",dtype:"L",width:"64px",align:"end"});let c=s.menu({presentation:"bar",aria_label:"Column filter actions"});Object.defineProperty(Yt(c),"gridColumnFilters",{value:this,configurable:!0});for(let[f,h]of[["All","selectAll"],["None","selectNone"],["Reset","reset"]])c.menuline({caption:f,action:`this.parentBag.parentNode.gridColumnFilters.${h}()`});s.div("^.summary",{color:"var(--gramlot-text-secondary)",font_size:"11px",padding:"0 2px"});let d=r.binding.gramlot.src.prepareSource(i);r.binding.renderer.validateCandidate(d),this.#_.setValue(d),this.#A()}#A(){if(!this.#n||this.#g.length)return;let e=this.#d.sourceNode.rootBuilder.binding.router;this.#g.push(e.register({path:this.#f+".checked",recipient:{receive:()=>this.#x()}}));for(let r of["from","to"])this.#g.push(e.register({path:this.#f+"."+r,recipient:{receive:()=>this.#w()}}))}#x(){if(this.#h||this.#t===null)return;let e=","+this.#n.getItem("checked")+",",r=this.#n.getItem("rows").getNodes(),n=r.filter(i=>e.includes(","+i.label+",")).map(i=>i.getAttr("value"));this.#o.applyColumnFilter(this.#t,this.#o.columnRange(this.#t)&&n.length===r.length?null:n)}#w(){this.#h||this.#p||this.#t===null||(this.#p=!0,queueMicrotask(()=>{this.#p=!1,this.#t!==null&&this.#i&&this.#O()}))}#O(){let e=this.#l.find(a=>a.field===this.#t);if(!["D","DH","DHZ"].includes(e.dtype))return;let r=this.#n.getItem("from"),n=this.#n.getItem("to"),i=this.#o.columnRange(this.#t);if(i?.from&&!r&&(n=null,this.#h=!0,this.#n.setItem("to",null),this.#h=!1),r&&n&&r>n){this.#n.setItem("rangeError","From must not be after To.");return}if(this.#n.setItem("rangeError",""),+r==+(i?.from??null)&&+n==+(i?.to??null))return;let s=!r&&!n?this.#o.columnFacets(this.#t).filter(a=>a.selected).map(a=>a.value):null;this.#o.applyColumnFilter(this.#t,s,{from:r,to:n,dtype:e.dtype,timeZone:this.#d.timeZone})}selectAll(){this.#o.applyColumnFilter(this.#t,this.#o.columnRange(this.#t)?null:this.#o.columnFacets(this.#t).map(e=>e.value))}selectNone(){this.#o.applyColumnFilter(this.#t,[])}reset(){this.#h=!0;try{this.#n.setItem("from",null),this.#n.setItem("to",null),this.#n.setItem("rangeError","");let e=this.#d.sourceNode.rootBuilder.binding.renderer;for(let r of this.#y)e.getDomNode(r).restoreFormValue(null)}finally{this.#h=!1}this.#o.applyColumnFilter(this.#t,null,null)}button(e){let r=this.#e.ownerDocument,n=r.createElement("button");n.type="button",n.className="column-filter",n.dataset.field=e.field,n.setAttribute("aria-label",`Filter ${e.title??e.name}`),n.setAttribute("aria-haspopup","dialog"),n.setAttribute("aria-expanded","false"),n.title=`Filter ${e.title??e.name}`;let i=r.createElementNS(xe,"svg");i.setAttribute("viewBox","0 0 24 24"),i.setAttribute("aria-hidden","true");let s=r.createElementNS(xe,"path");return s.setAttribute("d","M3 5h18l-7 8v6l-4 2v-8z"),i.append(s),n.append(i),n}update(e,r,n,i){e!==this.#o&&(this.close(),this.#b?.(),this.#b=null,this.#o=e),this.#l=r,this.#u=i,(!n||this.#r&&!this.#r.isConnected)&&this.close(),this.#i&&!this.#b&&(this.#b=e.subscribe(this.refresh)),this.refresh()}#D=e=>{let r=e.target.closest(".column-filter");if(!r)return;if(e.stopPropagation(),r===this.#r){this.close();return}this.close(),this.#E(),this.#r=r,this.#t=r.dataset.field,this.#h=!0;let n=this.#o.columnRange(this.#t);this.#n.setItem("from",n?.from??null),this.#n.setItem("to",n?.to??null),this.#n.setItem("rangeError","");let i=this.#l.find(a=>a.field===this.#t);this.#n.setItem("hideRange",!["D","DH","DHZ"].includes(i.dtype));let s=this.#d.sourceNode.rootBuilder.binding.renderer;for(let[a,o]of["from","to"].entries())s.getDomNode(this.#y[a]).restoreFormValue(this.#n.getItem(o));this.#n.getItem("rows").clear(),this.#n.setItem("checked",""),s.getDomNode(this.#k).clear(),this.#h=!1,this.refresh(),this.#a.showPopover(),r.setAttribute("aria-expanded","true"),this.#c(),this.#d.sourceNode.rootBuilder.binding.renderer.getDomNode(this.#k).focus()};refresh=()=>{if(!this.#o)return;for(let o of this.#s.querySelectorAll(".column-filter")){let u=this.#o.columnFilter(o.dataset.field)!==null||this.#o.columnRange(o.dataset.field)!==null;o.classList.toggle("active",u),o.closest("th").classList.toggle("column-filtered",u),o.setAttribute("aria-pressed",String(u))}if(this.#t===null)return;let e=this.#l.find(o=>o.field===this.#t);if(!e){this.close();return}let r=e.title??e.name;this.#a.setAttribute("aria-label",`Filter ${r}`);let n=this.#o.columnFacets(this.#t),i=this.#n.getItem("rows");this.#v.setAttr({height:`${76+28*Math.max(1,Math.min(n.length,8))}px`});let s=new Map(i.getNodes().map(o=>[o.getAttr("key"),o])),a=[];this.#h=!0;try{this.#n.setItem("title",r);for(let u of n){let l=u.value===null?"Empty":ji(u.value,e,this.#u),c={key:u.key,value:u.value,caption:l,count:u.count},d=s.get(u.key);if(d)s.delete(u.key),d.setAttr(c);else{let f=`v_${Mn()}`;i.setItem(f,null,{...c,id:f}),d=i.getNode(f)}u.selected&&a.push(d.label)}for(let u of s.values())i.popNode(u.label);let o=a.join(",");this.#n.getItem("checked")!==o&&this.#n.setItem("checked",o),this.#n.setItem("summary",`${a.length} of ${n.length} values selected`)}finally{this.#h=!1}this.#c()};#c=()=>{this.#r&&Ur(this.#a,this.#r,{align:"start"})};#m(){this.#r?.setAttribute("aria-expanded","false"),this.#r=null,this.#t=null}close(){if(!this.#r)return;let e=this.#r;this.#a.hidePopover(),this.#m(),e.isConnected&&e.focus({preventScroll:!0})}connect(){this.#i||(this.#i=!0,this.#A(),this.#s.addEventListener("click",this.#D),this.#e.ownerDocument.defaultView.addEventListener("resize",this.#c),this.#e.ownerDocument.defaultView.addEventListener("scroll",this.#c,!0))}disconnect(){this.close(),this.#i=!1,this.#b?.(),this.#b=null;for(let e of this.#g)e.close();this.#g=[],this.#s.removeEventListener("click",this.#D),this.#e.ownerDocument.defaultView.removeEventListener("resize",this.#c),this.#e.ownerDocument.defaultView.removeEventListener("scroll",this.#c,!0)}dispose(){this.disconnect(),this.#f&&this.#d.sourceNode.data.popNode(this.#f)}};import{Bag as ll}from"@gramlot/gramlot";var _e={};ms(_e,{defineCollection:()=>Xf});Xt(_e,lb);import*as lb from"@gramlot/gramlot/components";import{defineCollection as Yf}from"@gramlot/gramlot/components";function Xf(t){if(t.name!=="grid")throw new Error("Unexpected bundled collection");let e=[],r={};t.css?.forEach((n,i)=>{n.href=e[i].href});for(let[n,i]of Object.entries(t.assets??{}))i.href=r[n].href;return Yf({...t,css:e,assets:r})}function Ko(t,e){return t.parameters=Zf(t.constructor.gramlotComponent,e),Object.fromEntries(Object.entries(e).filter(([r])=>!Object.hasOwn(t.parameters,r)))}function Zf(t,e){return Object.fromEntries(Object.entries(t.parameters).map(([r,n])=>[r,Object.hasOwn(e,r)?e[r]:n.default]))}function Fr(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)}
|
|
23
23
|
*,*::before,*::after{box-sizing:border-box}.control-box{min-width:0}slot{display:contents}
|
|
24
|
-
::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
|
|
25
|
-
`)):(n.removeAttribute("aria-invalid"),n.removeAttribute("title"))}}refresh(){let e=this.store().bag;for(let[r,n]of this.retained)n.parentBag!==e&&(this.releaseField(r),this.active?.row===n&&this.close());for(let r of this.retained.keys())r!==this.active?.path&&this.releaseCleanField(r);for(let[r,n]of this.renderedRows())this.decorate(n,r)}replaceData(){if(this.close(),this.session){for(let e of this.retained.keys())this.releaseField(e);this.retained.clear()}}dispose(){this.disconnect(),this.replaceData(),this.releaseStatus?.(),this.layer.remove()}};var Rr=class{constructor(e,r){this.store=e,this.format=r}read(e,r=this.store.getRows()){return r.map(n=>({node:n,cells:e.map(i=>Lf(this.store.value(n,i.field),i,this.format))}))}};function Lf(t,e,r){if(t==null)return"";let{dtype:n,format:i}=e;if(n==="T"&&typeof t!="string"||n==="B"&&typeof t!="boolean")throw new TypeError(`grid ${e.field} does not match ${n}`);if(typeof t=="string"||typeof t=="boolean"){if(n&&!["T","B"].includes(n)||i!=null)throw new TypeError(`grid ${e.field} requires a typed numeric or temporal value`);return String(t)}if(t instanceof Date||i!=null)return r(t,{dtype:n,pattern:i??"short"});if(n&&!["L","R","N"].includes(n))throw new TypeError(`grid ${e.field} does not match ${n}`);if(n==="L"&&!Number.isInteger(t))throw new TypeError("grid L requires an integer");if(typeof t=="number"&&Number.isFinite(t)||ce(t)&&t.isFinite())return String(t);throw new TypeError(`grid ${e.field} requires a scalar value`)}import{Bag as qo}from"@gramlot/gramlot";var $f=new Set(["T","B","L","R","N","D","H","DHZ"]),Ff=new Set(["tag","field","name","dtype","width","align","format","columnset","white_space","edit"]),Pf=new Set(["tag","code","name","background","color"]),In=class{#e=new Map;constructor(e){if(!(e instanceof qo))throw new TypeError("grid structpath must resolve to a Bag");let r=Bn(e,"view_0"),n=Bn(e,"info"),i=Bn(r,"rows_0"),s=Bn(n,"columnsets"),a=new Set,o=new Map;for(let u of s.getNodes()){let l=u.getAttr();if(Fo(l,Pf),Po(l.code,"colgroup code"),l.tag!=="columnset"||u.resolver||u.staticValue!=null||u.label!==l.code)throw new TypeError("grid columnset requires a scalar definition labelled by code");if(o.has(l.code))throw new TypeError(`Duplicate grid colgroup: ${l.code}`);if(l.name!=null&&typeof l.name!="string")throw new TypeError("grid group name must be text");for(let c of["background","color"])if(l[c]!=null&&typeof l[c]!="string")throw new TypeError(`grid ${c} must be text`);o.set(l.code,{...l,name:l.name??l.code})}this.columns=[],this.groups=[];for(let u of i.getNodes()){let l=u.getAttr();if(Fo(l,Ff),l.tag!=="cell"||u.staticValue!=null||u.resolver)throw new TypeError("grid cell must be a scalar declaration");if(Po(l.field,"field"),a.has(l.field))throw new TypeError(`Duplicate grid field: ${l.field}`);if(a.add(l.field),this.#e.set(l.field,u),l.columnset!=null&&!o.has(l.columnset))throw new TypeError(`Unknown grid columnset: ${l.columnset}`);if(l.dtype!=null&&!$f.has(l.dtype))throw new TypeError(`Unsupported grid dtype: ${l.dtype}`);if(l.align!=null&&!["start","center","end"].includes(l.align))throw new TypeError("grid align requires start, center or end");if(l.width!=null&&(typeof l.width!="string"||!/^(?:\d+(?:\.\d+)?)(?:px|em|rem|ch|%)$/.test(l.width)))throw new TypeError("grid width requires a nonnegative CSS length (px, em, rem, ch or %)");if(l.white_space!=null&&!["normal","nowrap","pre-wrap"].includes(l.white_space))throw new TypeError("grid white_space requires normal, nowrap or pre-wrap");for(let h of["name","format"])if(l[h]!=null&&typeof l[h]!="string")throw new TypeError(`grid ${h} must be text`);if(l.edit!=null&&typeof l.edit!="boolean"&&(typeof l.edit!="object"||Array.isArray(l.edit)))throw new TypeError("grid edit requires a boolean or editor options");let c=Object.freeze({...l,name:l.name??l.field,align:l.align??(["L","R","N"].includes(l.dtype)?"end":"start")});this.columns.push(c);let d=l.columnset??null,f=this.groups.at(-1);(!f||f.code!==d)&&(f={code:d,...d===null?{name:null}:o.get(d),columns:[]},this.groups.push(f)),f.columns.push(c)}if(!this.columns.length)throw new TypeError("grid struct requires at least one column");for(let u of this.groups)Object.freeze(u.columns),Object.freeze(u);Object.freeze(this.columns),Object.freeze(this.groups),Object.freeze(this)}columnNode(e){return this.#e.get(e)}moveColumn(e,r,n=!1){let i=this.#e.get(e),s=this.#e.get(r);if(!i||!s||i===s)return;let a=i.parentBag,o=a.getNodes(),u=o.indexOf(i),l=o.indexOf(s),c=l+Number(n)-+(u<l);c!==u&&a.move(u,c)}setColumnWidth(e,r){if(!Number.isFinite(r)||r<=0)throw new TypeError("grid resized width must be positive pixels");this.#e.get(e).setAttr({width:`${Math.round(r)}px`})}};function Bn(t,e){let r=t.getNode(e);if(!r||r.resolver||!(r.staticValue instanceof qo))throw new TypeError(`grid struct requires Bag ${e}`);return r.staticValue}function Fo(t,e){for(let r of Object.keys(t))if(!e.has(r))throw new TypeError(`Unsupported grid struct attribute: ${r}`)}function Po(t,e){if(typeof t!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw new TypeError(`grid ${e} requires a simple field identifier`)}var Mn=class{#e;#r;#l;#c;#a;#s;#i=!1;#t=null;#o=null;constructor(e,r,n,i,s,a){this.#e=e,this.#r=r,this.#l=n,this.#c=i,this.#a=s,this.#s=a}connect(){this.#e.addEventListener("click",this.#y),this.#e.addEventListener("pointerdown",this.#p),this.#e.addEventListener("pointermove",this.#k),this.#e.addEventListener("pointerup",this.#w),this.#e.addEventListener("pointercancel",this.#D),this.#e.addEventListener("lostpointercapture",this.#D),this.#e.addEventListener("keydown",this.#A),this.#e.addEventListener("dragstart",this.#f),this.#e.addEventListener("dragover",this.#d),this.#e.addEventListener("drop",this.#v),this.#e.addEventListener("dragend",this.#b)}disconnect(){this.cancel(),this.#e.removeEventListener("click",this.#y),this.#e.removeEventListener("pointerdown",this.#p),this.#e.removeEventListener("pointermove",this.#k),this.#e.removeEventListener("pointerup",this.#w),this.#e.removeEventListener("pointercancel",this.#D),this.#e.removeEventListener("lostpointercapture",this.#D),this.#e.removeEventListener("keydown",this.#A),this.#e.removeEventListener("dragstart",this.#f),this.#e.removeEventListener("dragover",this.#d),this.#e.removeEventListener("drop",this.#v),this.#e.removeEventListener("dragend",this.#b)}#y=e=>{if(this.#i){this.#i=!1;return}if(e.target.closest(".column-resize"))return;let r=e.target.closest("th[data-field]");r&&this.#c(r.dataset.field,e.shiftKey)};#f=e=>{let r=e.target.closest("th[data-field]");if(!r||this.#t){e.preventDefault();return}this.#i=!0,this.#o={field:r.dataset.field,node:this.#l().columnNode(r.dataset.field)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",r.textContent),r.classList.add("column-dragging")};#h(e){let r=e.target.closest("th[data-field]");if(!this.#o||!r)return null;let n=this.#l().columnNode(r.dataset.field);return this.#l().columnNode(this.#o.field)!==this.#o.node||n===this.#o.node||n.parentBag!==this.#o.node.parentBag?null:{header:r,field:r.dataset.field,after:e.clientX>r.getBoundingClientRect().left+r.getBoundingClientRect().width/2}}#d=e=>{let r=this.#h(e);for(let n of this.#e.querySelectorAll("[data-drop]"))n.removeAttribute("data-drop");r&&(e.preventDefault(),e.dataTransfer.dropEffect="move",r.header.dataset.drop=r.after?"after":"before")};#v=e=>{let r=this.#h(e);if(!r)return;e.preventDefault();let n=this.#o.field;this.#b(),this.#l().moveColumn(n,r.field,r.after),this.#e.querySelector(`th[data-field="${n}"]`).focus({preventScroll:!0})};#b=()=>{this.#o=null;for(let e of this.#e.querySelectorAll("th"))e.classList.remove("column-dragging"),e.removeAttribute("data-drop")};#g(e){let r=e.dataset.field;if(r===void 0){let s=this.#a();return{identity:s,width:s.headerWidth,setWidth:a=>{s.setHeaderWidth(a),this.#s()}}}let n=this.#l(),i=n.columnNode(r);return{identity:i,width:i.getAttr("width"),setWidth:s=>n.setColumnWidth(r,s)}}#n(e){return e.classList.contains("row-heading")?Math.max(40,Math.ceil(e.querySelector(".row-number-measure").getBoundingClientRect().width)):Number.parseFloat(this.#r.ownerDocument.defaultView.getComputedStyle(this.#r).getPropertyValue("--gramlot-grid-column-min-width"))||40}#p=e=>{this.#i=!1;let r=e.target.closest(".column-resize");if(!r||e.button!==0||this.#t)return;let n=r.closest("th"),i=n.dataset.field,s=this.#g(n),a=[...this.#r.querySelectorAll("table")],o=[...this.#e.querySelectorAll("th[scope=col]")],u=o.map(l=>l.getBoundingClientRect().width);this.#t={pointerId:e.pointerId,field:i,header:n,identity:s.identity,originalWidth:s.width,x:e.clientX,index:o.indexOf(n),widths:u,width:n.getBoundingClientRect().width,tables:a.map(l=>({table:l,width:l.style.width,columns:[...l.querySelectorAll("col")].map(c=>({col:c,width:c.style.width}))}))},this.#e.setPointerCapture(e.pointerId),this.#r.classList.add("resizing"),e.preventDefault()};#k=e=>{let r=this.#t;if(!r||r.pointerId!==e.pointerId)return;r.width=Math.max(this.#n(r.header),Math.round(r.widths[r.index]+e.clientX-r.x));let n=r.widths.map((i,s)=>s===r.index?r.width:i);for(let{table:i,columns:s}of r.tables)i.style.width=`${n.reduce((a,o)=>a+o,0)}px`,s.forEach(({col:a},o)=>{a.style.width=`${n[o]}px`})};#w=e=>{let r=this.#t;if(!r||r.pointerId!==e.pointerId)return;this.#k(e);let n=this.#g(r.header);this.#i=!0,this.cancel(),!(n.identity!==r.identity||n.width!==r.originalWidth)&&(n.setWidth(r.width),this.#_(r.field))};#A=e=>{if(e.key==="Escape"&&this.#t){this.cancel(),e.preventDefault();return}let r=e.target.closest(".column-resize");if(!r&&["Enter"," "].includes(e.key)){let s=e.target.closest("th[data-field]");s&&(e.preventDefault(),this.#c(s.dataset.field,e.shiftKey));return}if(!["ArrowLeft","ArrowRight"].includes(e.key))return;if(!r){let s=e.target.closest("th[data-field]");if(!s||!e.altKey)return;let a=s.dataset.field,o=this.#l(),u=o.columnNode(a),l=u.parentBag.getNodes(),c=l[l.indexOf(u)+(e.key==="ArrowRight"?1:-1)];c?.getAttr("tag")==="cell"&&(o.moveColumn(a,c.getAttr("field"),e.key==="ArrowRight"),this.#e.querySelector(`th[data-field="${a}"]`).focus({preventScroll:!0})),e.preventDefault();return}let n=r.closest("th"),i=(e.key==="ArrowRight"?1:-1)*(e.shiftKey?1:10);this.#g(n).setWidth(Math.max(this.#n(n),Math.round(n.getBoundingClientRect().width+i))),this.#_(n.dataset.field),e.preventDefault()};#_(e){this.#e.querySelector(e===void 0?".row-heading .column-resize":`th[data-field="${e}"] .column-resize`).focus({preventScroll:!0})}#D=()=>{this.#t&&this.cancel()};cancel(){this.#b();let e=this.#t;if(e){this.#t=null;for(let{table:r,width:n,columns:i}of e.tables){r.style.width=n;for(let{col:s,width:a}of i)s.style.width=a}this.#r.classList.remove("resizing"),this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId)}}};var Rn=class{#e;#r=null;setWindow(e){if(e!==null&&(!Number.isSafeInteger(e.start)||e.start<0||!Number.isSafeInteger(e.total)||e.total<e.start))throw new TypeError("Invalid grid window");this.#r=e,this.#t=!0}#l=null;get headerWidth(){return this.#l}setHeaderWidth(e){if(!Number.isFinite(e)||e<=0)throw new TypeError("Grid row header width must be positive pixels");this.#l=Math.round(e)}#c=new Map;#a=new Map;#s=[];#i=[0];#t=!0;#o=32;bindStore(e){e!==this.#e&&(this.#c.clear(),this.resetMeasurements(),this.#e=e)}retain(e){let r=new Set(e);for(let n of[this.#c,this.#a])for(let i of n.keys())r.has(i)||n.delete(i);this.#t=!0}height(e){return this.#c.get(e)??null}setHeight(e,r){if(e.parentBag===this.#e){if(r===null)this.#c.delete(e);else{if(!Number.isFinite(r)||r<=0)throw new TypeError("Grid row height must be positive pixels");this.#c.set(e,Math.round(r))}this.forget(e)}}setRows(e){this.#s=e,this.#t=!0}resetMeasurements(){this.#a.clear(),this.#t=!0}forget(e){this.#a.delete(e),this.#t=!0}measure(e,r){return r<=0||this.#a.get(e)===r?!1:(this.#a.set(e,r),this.#t=!0,!0)}#y(){if(!this.#t)return;let e=1/0;for(let[r,n]of this.#a)this.#c.has(r)||(e=Math.min(e,n));e!==1/0&&(this.#o=e),this.#i=[0];for(let r of this.#s)this.#i.push(this.#i.at(-1)+(this.#a.get(r)??Math.max(this.#c.get(r)??0,this.#o)));this.#t=!1}offset(e){if(this.#y(),!this.#r)return this.#i[e];let r=e-this.#r.start;return r<=0?e*this.#o:r<=this.#s.length?this.#r.start*this.#o+this.#i[r]:e*this.#o+this.#i.at(-1)-this.#s.length*this.#o}get count(){return this.#r?.total??this.#s.length}get totalHeight(){return this.offset(this.count)}indexAt(e){this.#y();let r=0,n=this.count;for(;r<n;){let i=r+n>>>1;this.offset(i+1)<=e?r=i+1:n=i}return Math.min(r,Math.max(0,this.count-1))}window(e,r){this.#y();let n=Math.max(r,this.#o*8);return{start:this.indexAt(Math.max(0,e-n)),end:Math.min(this.count,this.indexAt(e+r+n)+1)}}};var Ln=class{#e;#r;#l;#c;#a=null;#s=null;#i;#t;#o;constructor(e,r,n,i,s,a,o){this.#e=e,this.#r=r,this.#l=n,this.#c=i,this.#i=s,this.#t=a,this.#o=o}get resizing(){return this.#a!==null}connect(){this.#e.addEventListener("pointerdown",this.#k),this.#e.addEventListener("pointermove",this.#w),this.#e.addEventListener("pointerup",this.#A),this.#e.addEventListener("pointercancel",this.#E),this.#e.addEventListener("lostpointercapture",this.#E),this.#e.addEventListener("keydown",this.#_),this.#e.addEventListener("dblclick",this.#D),this.#e.addEventListener("dragstart",this.#y),this.#e.addEventListener("dragover",this.#d),this.#e.addEventListener("dragleave",this.#v),this.#e.addEventListener("drop",this.#b),this.#e.addEventListener("dragend",this.#g)}disconnect(){this.cancel(),this.cancelDrag(),this.#e.removeEventListener("pointerdown",this.#k),this.#e.removeEventListener("pointermove",this.#w),this.#e.removeEventListener("pointerup",this.#A),this.#e.removeEventListener("pointercancel",this.#E),this.#e.removeEventListener("lostpointercapture",this.#E),this.#e.removeEventListener("keydown",this.#_),this.#e.removeEventListener("dblclick",this.#D),this.#e.removeEventListener("dragstart",this.#y),this.#e.removeEventListener("dragover",this.#d),this.#e.removeEventListener("dragleave",this.#v),this.#e.removeEventListener("drop",this.#b),this.#e.removeEventListener("dragend",this.#g)}#y=e=>{let r=e.target.closest("tr"),n=this.#c(r);if(!this.#t()||!n||this.#a||e.target.closest(".row-height-handle")){e.preventDefault();return}this.#s={node:n,bag:this.#i().bag},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",n.label),r.classList.add("row-dragging")};#f(e){if(!this.#s||!this.#t())return null;let{node:r,bag:n}=this.#s,i=e.target.closest("tr"),s=this.#c(i);if(!s||s===r||this.#i().bag!==n||r.parentBag!==n||s.parentBag!==n)return null;let a=i.getBoundingClientRect();return{row:i,target:s,after:e.clientY>a.top+a.height/2}}#h(){for(let e of this.#e.querySelectorAll("[data-row-drop]"))e.removeAttribute("data-row-drop")}#d=e=>{this.#h();let r=this.#f(e);r&&(e.preventDefault(),e.dataTransfer.dropEffect="move",r.row.dataset.rowDrop=r.after?"after":"before")};#v=e=>{this.#e.contains(e.relatedTarget)||this.#h()};#b=e=>{let r=this.#f(e);if(!r)return;e.preventDefault(),e.stopPropagation();let{node:n}=this.#s;this.cancelDrag(),this.#i().moveRow(n,r.target,r.after)};#g=()=>{this.cancelDrag()};cancelDrag(){this.#s=null,this.#h();for(let e of this.#e.querySelectorAll(".row-dragging"))e.classList.remove("row-dragging")}#n(e){let r=e.target.closest(".row-height-handle");if(!r)return null;let n=r.closest("tr"),i=this.#c(n);return i?{handle:r,row:n,node:i}:null}project(e,r){let n=this.#l().height(r);e.style.height=n===null?"":`${n}px`}#p(e){let r=e.querySelector(".row-height-handle");r&&r.setAttribute("aria-valuenow",String(Math.round(e.getBoundingClientRect().height))),this.#o()}#k=e=>{let r=this.#n(e);if(!r||e.button!==0||this.#a)return;let{row:n}=r,i=n.getBoundingClientRect().height,s=n.style.height;n.style.height="";let a=n.getBoundingClientRect().height;n.style.height=s,this.#a={...r,pointerId:e.pointerId,y:e.clientY,height:i,minimum:a,preview:i},r.handle.focus({preventScroll:!0}),r.handle.setPointerCapture(e.pointerId),this.#r.classList.add("resizing-row"),e.preventDefault()};#w=e=>{let r=this.#a;!r||r.pointerId!==e.pointerId||(r.preview=Math.max(r.minimum,Math.round(r.height+e.clientY-r.y)),r.row.style.height=`${r.preview}px`,this.#p(r.row))};#A=e=>{let r=this.#a;!r||r.pointerId!==e.pointerId||(this.#w(e),this.cancel(),!(this.#c(r.row)!==r.node||r.preview===r.height)&&(this.#l().setHeight(r.node,r.preview),this.project(r.row,r.node),this.#p(r.row)))};#_=e=>{if(e.key==="Escape"&&(this.#a||this.#s)){this.cancel(),this.cancelDrag(),e.preventDefault();return}let r=this.#n(e);if(!r||!["ArrowUp","ArrowDown","Home"].includes(e.key))return;this.cancel();let n=null;if(e.key!=="Home"){let i=r.row.getBoundingClientRect().height;r.row.style.height="";let s=r.row.getBoundingClientRect().height;n=Math.max(s,i+(e.key==="ArrowDown"?10:-10))}this.#l().setHeight(r.node,n),this.project(r.row,r.node),this.#p(r.row),e.preventDefault()};#D=e=>{let r=this.#n(e);r&&(this.cancel(),this.#l().setHeight(r.node,null),this.project(r.row,r.node),this.#p(r.row),e.preventDefault())};#E=()=>{this.cancel()};cancel(){let e=this.#a;e&&(this.#a=null,this.project(e.row,e.node),this.#r.classList.remove("resizing-row"),e.handle.hasPointerCapture(e.pointerId)&&e.handle.releasePointerCapture(e.pointerId))}};var Uo=`
|
|
24
|
+
::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 Ko(this,e)}}}Fr.parameters={};function ss(t,e){return(","+t+",").includes(","+e+",")}function as(t){if(typeof t!="string")throw new TypeError("grid checked must refer to a string (empty string for an empty set)");return t}function Ln(t){if(typeof t!="string"||!t||t.includes(","))throw new TypeError("grid checkedField requires nonempty text IDs without commas");return t}function os(t){if(typeof t!="string")throw new TypeError("collection view sortedBy must be a string");if(t==="")return[];let e=new Set;return t.split(",").map(r=>{let n=/^([^,:]+):([ad])$/.exec(r);if(!n||e.has(n[1]))throw new TypeError(`Invalid collection view sort criterion: ${r}`);return e.add(n[1]),{field:n[1],direction:n[2]}})}import nh from"@gramlot/collections/inputs";import{sourceTarget as Fn,toTytx as Jf}from"@gramlot/gramlot";var $n=class{constructor(e,r,n,i,s,a,o){this.grid=e,this.context=r,this.cellFor=n,this.store=i,this.renderedRows=s,this.navigate=a,this.focusField=o,this.retained=new Map,this.declarations=new Map,this.checking=new Set,this.columns=[],this.layer=e.ownerDocument.createElement("div"),this.layer.className="cell-editor",this.layer.hidden=!0;let u=e.ownerDocument.createElement("slot");u.name="cell-editor",this.layer.append(u),e.control.append(this.layer),this.keydown=l=>{if(!(!this.active||l.isComposing)){if(l.key==="Escape"){l.preventDefault();let c=this.cellFor(this.active.row,this.active.column.field);this.session.clearDraft(this.active.source),this.close(),c?.focus({preventScroll:!0})}else if(l.key==="Enter"||l.key==="Tab"){if(l.key==="Enter"&&this.active.element.control.localName==="textarea"&&!l.ctrlKey&&!l.metaKey)return;l.preventDefault();let c=this.active;this.session.commitField(c.path);let d=this.cellFor(c.row,c.column.field);this.close(),d?.focus({preventScroll:!0}),l.key==="Tab"&&this.navigate(c.row,c.column.field,l.shiftKey?-1:1)}}},this.arrowKeydown=l=>{if(!this.active||l.isComposing||!["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"].includes(l.key)||l.altKey||l.ctrlKey||l.metaKey||l.shiftKey)return;let c=this.active.element.control;if(c.localName==="textarea"||["range","date","time","datetime-local"].includes(c.type)||["gramlot-date-text-box","gramlot-time-text-box","gramlot-date-calendar"].includes(this.active.element.localName)||c.getAttribute("aria-expanded")==="true"||l.key==="ArrowDown"&&c.getAttribute("role")==="combobox")return;let d=l.key==="ArrowLeft"||l.key==="ArrowRight",f=l.key==="ArrowLeft"||l.key==="ArrowUp";if(d&&(typeof c.selectionStart!="number"||c.selectionStart!==c.selectionEnd||c.selectionStart!==(f?0:c.value.length)))return;l.preventDefault(),l.stopPropagation();let h=this.active;if(this.session.commitField(h.path),this.navigate(h.row,h.column.field,d?f?-1:1:{row:f?-1:1}),d&&this.active&&this.active!==h){let p=this.active.element.control;if(typeof p.selectionStart=="number"){let m=f?p.value.length:0;p.setSelectionRange(m,m)}}},this.connect(),r.sourceNode.rootBuilder.binding.bindingFor(r.sourceNode).track(()=>this.dispose())}connect(){this.grid.addEventListener("keydown",this.keydown),this.grid.addEventListener("keydown",this.arrowKeydown,!0),this.session&&!this.releaseNavigator&&(this.releaseNavigator=this.session.registerNavigator(this.focusField))}disconnect(){this.close(),this.grid.removeEventListener("keydown",this.keydown),this.grid.removeEventListener("keydown",this.arrowKeydown,!0),this.releaseNavigator?.(),this.releaseNavigator=null}path(e,r){let{mode:n}=this.store();return this.context.sourceNode.absDatapath(this.context.sourceNode.getAttr("storepath"))+"."+e.label+(n==="attributes"?"?":".")+r}configure(e){let r=e.filter(i=>i.edit);if(r.length){if(this.store().window!==null)throw new Error("Editing requires a fully resident Bag; remote windows are read-only.");let i=this.context.sourceNode;this.session=i.editCollection(i.absDatapath(i.getAttr("storepath")))}let n=Jf(r.map(({field:i,dtype:s,edit:a})=>({field:i,dtype:s,edit:a})));if(n!==this.validationSignature){this.validationSignature=n,this.columns=r;for(let[i,s]of this.declarations){let a=r.find(o=>o.field===s.field);if(!a)this.active?.path===i&&this.close(),this.releaseField(i);else{let{tag:o,options:u}=this.definition(a);o!==s.tag?(this.active?.path===i&&this.close(),this.releaseField(i)):(s.source.setAttr({...Object.fromEntries(Object.keys(s.options).map(l=>[l,null])),...u}),s.options=u)}}if(!r.length){this.releaseValidation?.(),this.releaseValidation=null;return}this.releaseStatus||(this.releaseStatus=this.session.subscribe(()=>this.refresh())),this.releaseNavigator||(this.releaseNavigator=this.session.registerNavigator(this.focusField)),this.releaseValidation?this.session.invalidateValidation():this.releaseValidation=this.session.registerValidationSource(()=>this.validationFields())}}definition(e){let r=e.edit===!0?{}:{...e.edit},n=r.tag??{L:"numberTextBox",R:"numberTextBox",N:"numberTextBox",D:"dateTextBox",H:"timeTextBox",B:"checkBox"}[e.dtype]??"textbox";if(e.dtype==="DHZ"&&!r.tag)throw new Error("A datetime column requires an explicitly declared supported editor.");return delete r.tag,{tag:n,options:{...r,dtype:e.dtype??"T"}}}*validationFields(){let e=this.context.sourceNode;this.session.trackValidationDependency(e.absDatapath(e.getAttr("structpath")));let r=this.store().bag;for(let n of r.getNodes())for(let i of this.columns){if(n.parentBag!==r)continue;let s=this.path(n,i.field);this.checking.add(s);try{yield{node:this.declare(n,i,!1).source,release:()=>{this.checking.delete(s),s!==this.active?.path&&this.releaseCleanField(s)}}}catch(a){throw this.checking.delete(s),this.releaseCleanField(s),a}}}open(e,r,n){if(this.store().window!==null)throw new Error("Editing requires a fully resident Bag; remote windows are read-only.");if(this.active?.row===e&&this.active.column.field===r.field){this.active.element.control.focus();return}this.close();let i=this.path(e,r.field),s=this.declare(e,r,!0),a=this.grid.ownerDocument.getElementById(s.id);this.active={row:e,column:r,path:i,...s,element:a},this.layer.hidden=!1,this.position(n),a.control.focus()}declare(e,r,n){let i=this.context.sourceNode,s=this.path(e,r.field);this.retained.has(s)||(this.session.retainField(s),this.retained.set(s,e));let a=this.declarations.get(s);if(a)n&&i.rootBuilder.binding.renderer.mountView(a.container);else{let{tag:o,options:u}=this.definition(r);if(!i.rootBuilder.schemaTag(o))throw new Error(`Grid editor requires the ${o} input collection.`);let l=i.rootBuilder,c=`grid-cell-${crypto.randomUUID()}`,d=l.wrapSource(i).div({node_label:c,slot:"cell-editor"});n||l.binding.renderer.unmountView(Fn(d));try{let f=d[o]({...u,value:"^"+s,id:c,width:"100%",margin:"0"});a={container:Fn(d),source:Fn(f),id:c,tag:o,options:u,field:r.field};let h=this.grid.ownerDocument.defaultView.customElements.get(a.source._getMeta("render_tag"));this.session.registerField(a.source,h,n),this.declarations.set(s,a)}catch(f){let h=Fn(d);throw h.parentBag.popNode(h.label),this.releaseCleanField(s),f}}return a}close(){let e=this.active;this.active=null,this.layer.hidden=!0,e&&(this.context.sourceNode.rootBuilder.binding.renderer.unmountView(e.container),this.releaseCleanField(e.path))}releaseCleanField(e){if(this.checking.has(e))return;let r=this.session.fieldStatus(e);r.error===null&&r.pending===null&&r.draft===null&&this.retained.has(e)&&this.releaseField(e)}releaseField(e){let r=this.declarations.get(e);this.declarations.delete(e),r?.container.parentBag&&r.container.parentBag.popNode(r.container.label),this.session.releaseField(e),this.retained.delete(e)}position(e=null){if(!this.active)return;if(e??=this.cellFor(this.active.row,this.active.column.field),!e){this.close();return}let r=e.getBoundingClientRect(),n=this.grid.control.getBoundingClientRect(),i=this.grid.shadowRoot.querySelector(".body-viewport").getBoundingClientRect();Object.assign(this.layer.style,{left:`${r.left-n.left-this.grid.control.clientLeft}px`,top:`${r.top-n.top-this.grid.control.clientTop}px`,width:`${r.width}px`}),this.layer.style.setProperty("--grid-editor-height",`${r.height}px`);let s=e.style.getPropertyValue("--grid-cell-max-height");s?this.layer.style.setProperty("--grid-cell-max-height",s):this.layer.style.removeProperty("--grid-cell-max-height");let a=this.layer.getBoundingClientRect();i.height&&(a.top<i.top||a.bottom>i.bottom||a.right<=i.left||a.left>=i.right)&&this.close()}decorate(e,r){if(this.session)for(let n of e.querySelectorAll("td[data-field]")){let i=this.session.fieldStatus(this.path(r,n.dataset.field));n.classList.toggle("invalid-cell",!!i.error),n.classList.toggle("draft-cell",i.draft!==null),i.error?(n.setAttribute("aria-invalid","true"),n.title=i.error.getNodes().map(s=>s.value).join(`
|
|
25
|
+
`)):(n.removeAttribute("aria-invalid"),n.removeAttribute("title"))}}refresh(){let e=this.store().bag;for(let[r,n]of this.retained)n.parentBag!==e&&(this.releaseField(r),this.active?.row===n&&this.close());for(let r of this.retained.keys())r!==this.active?.path&&this.releaseCleanField(r);for(let[r,n]of this.renderedRows())this.decorate(n,r)}replaceData(){if(this.close(),this.session){for(let e of this.retained.keys())this.releaseField(e);this.retained.clear()}}dispose(){this.releaseValidation?.(),this.releaseValidation=null,this.disconnect(),this.replaceData(),this.releaseStatus?.(),this.layer.remove()}};function Jo(t){return typeof t=="number"&&Number.isFinite(t)?t:Ln(t)}var qn=class{#e=[];#s=!1;constructor(e,r,n,i,s,a,o){this.source=e,this.body=r,this.columns=n,this.rowFor=i,this.read=s,this.selection=a,this.view=o}path(e){return this.source.absDatapath(e.checked.slice(1))}value(e){let r=this.source.getRelativeData(e.checked.slice(1));return e.check==="single"?r==null||r===""?r:Jo(r):as(r)}id(e,r){let n=this.read(e,r.checkedField);return r.check==="single"?Jo(n):Ln(n)}contains(e,r,n){return e.check==="single"?r===n:ss(r,n)}filter(){let e=this.selection(),r=e===""?null:e.split(",").map(n=>{let i=this.columns().find(s=>s.field===n&&s.check==="multiple");if(!i)throw new TypeError(`Unknown external check column: ${n}`);return{field:i.checkedField,value:this.value(i)}});this.view().applySetFilter(r)}project(e,r,n){let i=this.id(r,n),s=this.value(n),a=e.querySelector("input.grid-set-check");a||(a=e.ownerDocument.createElement("input"),a.className="grid-set-check",e.replaceChildren(a)),a.type=n.check==="single"?"radio":"checkbox",n.check==="single"?a.name=n.field:a.removeAttribute("name"),a.setAttribute("aria-label",`${n.title??n.name}: ${i}`),a.checked=this.contains(n,s,i)}refresh=()=>{this.filter();for(let e of this.body.querySelectorAll("input.grid-set-check")){let r=e.closest("td[data-field]"),n=this.columns().find(s=>s.field===r.dataset.field),i=this.rowFor(r.parentElement);n?.check&&i&&this.project(e.parentElement,i,n)}};change=e=>{let r=e.target;if(!r.matches("input.grid-set-check"))return;let n=r.closest("td[data-field]"),i=this.columns().find(c=>c.field===n.dataset.field),s=this.rowFor(n.parentElement),a=this.id(s,i),o=this.value(i),u=this.contains(i,o,a);if(r.checked===u)return;if(i.check==="single"){r.checked?this.source.setRelativeData(i.checked.slice(1),a):this.project(r.parentElement,s,i);return}let l=r.checked?o?o+","+a:a:(","+o+",").replace(","+a+",",",").slice(1,-1);this.source.setRelativeData(i.checked.slice(1),l)};configure(){for(let e of this.#e)e.close();if(this.#e=[],!!this.#s){this.filter();for(let e of this.columns().filter(r=>r.check))this.#e.push(this.source.rootBuilder.binding.router.register({path:this.path(e),recipient:{receive:this.refresh}}))}}connect(){this.#s||(this.#s=!0,this.body.addEventListener("change",this.change))}disconnect(){this.body.removeEventListener("change",this.change),this.#s=!1,this.configure()}};import{Bag as el}from"@gramlot/gramlot";var Qf=new Set(["T","B","L","R","N","D","H","DHZ"]),eh=new Set(["tag","field","name","title","dtype","width","align","format","columnset","white_space","max_height","edit","check","checked","checkedField"]),th=new Set(["tag","code","name","background","color"]),Un=class{#e=new Map;constructor(e){if(!(e instanceof el))throw new TypeError("grid structpath must resolve to a Bag");let r=Pn(e,"view_0"),n=Pn(e,"info"),i=Pn(r,"rows_0"),s=Pn(n,"columnsets"),a=new Set,o=new Map;for(let u of s.getNodes()){let l=u.getAttr();if(Qo(l,th),ls(l.code,"colgroup code"),l.tag!=="columnset"||u.resolver||u.staticValue!=null||u.label!==l.code)throw new TypeError("grid columnset requires a scalar definition labelled by code");if(o.has(l.code))throw new TypeError(`Duplicate grid colgroup: ${l.code}`);if(l.name!=null&&typeof l.name!="string")throw new TypeError("grid group name must be text");for(let c of["background","color"])if(l[c]!=null&&typeof l[c]!="string")throw new TypeError(`grid ${c} must be text`);o.set(l.code,{...l,name:l.name??l.code})}this.columns=[],this.groups=[];for(let u of i.getNodes()){let l=u.getAttr();if(Qo(l,eh),l.tag!=="cell"||u.staticValue!=null||u.resolver)throw new TypeError("grid cell must be a scalar declaration");if(ls(l.field,"field"),a.has(l.field))throw new TypeError(`Duplicate grid field: ${l.field}`);if(a.add(l.field),this.#e.set(l.field,u),l.columnset!=null&&!o.has(l.columnset))throw new TypeError(`Unknown grid columnset: ${l.columnset}`);if(l.dtype!=null&&!Qf.has(l.dtype))throw new TypeError(`Unsupported grid dtype: ${l.dtype}`);if(l.align!=null&&!["start","center","end"].includes(l.align))throw new TypeError("grid align requires start, center or end");if(l.width!=null&&(typeof l.width!="string"||!/^(?:\d+(?:\.\d+)?)(?:px|em|rem|ch|%)$/.test(l.width)))throw new TypeError("grid width requires a nonnegative CSS length (px, em, rem, ch or %)");if(l.max_height!=null&&(typeof l.max_height!="string"||!/^(?:\d+(?:\.\d+)?)(?:px|em|rem)$/.test(l.max_height)))throw new TypeError("grid max_height requires a nonnegative CSS length (px, em or rem)");if(l.white_space!=null&&!["normal","nowrap","pre-wrap"].includes(l.white_space))throw new TypeError("grid white_space requires normal, nowrap or pre-wrap");for(let h of["name","title","format"])if(l[h]!=null&&typeof l[h]!="string")throw new TypeError(`grid ${h} must be text`);if(l.edit!=null&&typeof l.edit!="boolean"&&(typeof l.edit!="object"||Array.isArray(l.edit)))throw new TypeError("grid edit requires a boolean or editor options");if(l.check!=null||l.checked!=null||l.checkedField!=null){if(!["multiple","single"].includes(l.check)||typeof l.checked!="string"||!l.checked.startsWith("^")||l.checked.length<2||l.checked.includes("?"))throw new TypeError("grid check requires single or multiple and checked=^DataPath");if(ls(l.checkedField,"checkedField"),l.edit)throw new TypeError("external check sets cannot edit row fields")}let c=Object.freeze({...l,name:l.name??l.field,align:l.align??(["L","R","N"].includes(l.dtype)?"end":"start")});this.columns.push(c);let d=l.columnset??null,f=this.groups.at(-1);(!f||f.code!==d)&&(f={code:d,...d===null?{name:null}:o.get(d),columns:[]},this.groups.push(f)),f.columns.push(c)}if(!this.columns.length)throw new TypeError("grid struct requires at least one column");for(let u of this.groups)Object.freeze(u.columns),Object.freeze(u);Object.freeze(this.columns),Object.freeze(this.groups),Object.freeze(this)}columnNode(e){return this.#e.get(e)}moveColumn(e,r,n=!1){let i=this.#e.get(e),s=this.#e.get(r);if(!i||!s||i===s)return;let a=i.parentBag,o=a.getNodes(),u=o.indexOf(i),l=o.indexOf(s),c=l+Number(n)-+(u<l);c!==u&&a.move(u,c)}setColumnWidth(e,r){if(!Number.isFinite(r)||r<=0)throw new TypeError("grid resized width must be positive pixels");this.#e.get(e).setAttr({width:`${Math.round(r)}px`})}};function Pn(t,e){let r=t.getNode(e);if(!r||r.resolver||!(r.staticValue instanceof el))throw new TypeError(`grid struct requires Bag ${e}`);return r.staticValue}function Qo(t,e){for(let r of Object.keys(t))if(!e.has(r))throw new TypeError(`Unsupported grid struct attribute: ${r}`)}function ls(t,e){if(typeof t!="string"||!/^[A-Za-z_][A-Za-z0-9_]*$/.test(t))throw new TypeError(`grid ${e} requires a simple field identifier`)}var jn=class{#e;#s;#o;#l;#u;#d;#a=!1;#r=null;#t=null;constructor(e,r,n,i,s,a){this.#e=e,this.#s=r,this.#o=n,this.#l=i,this.#u=s,this.#d=a}connect(){this.#e.addEventListener("click",this.#_),this.#e.addEventListener("pointerdown",this.#g),this.#e.addEventListener("pointermove",this.#i),this.#e.addEventListener("pointerup",this.#h),this.#e.addEventListener("pointercancel",this.#x),this.#e.addEventListener("lostpointercapture",this.#x),this.#e.addEventListener("keydown",this.#E),this.#e.addEventListener("dragstart",this.#v),this.#e.addEventListener("dragover",this.#f),this.#e.addEventListener("drop",this.#n),this.#e.addEventListener("dragend",this.#p)}disconnect(){this.cancel(),this.#e.removeEventListener("click",this.#_),this.#e.removeEventListener("pointerdown",this.#g),this.#e.removeEventListener("pointermove",this.#i),this.#e.removeEventListener("pointerup",this.#h),this.#e.removeEventListener("pointercancel",this.#x),this.#e.removeEventListener("lostpointercapture",this.#x),this.#e.removeEventListener("keydown",this.#E),this.#e.removeEventListener("dragstart",this.#v),this.#e.removeEventListener("dragover",this.#f),this.#e.removeEventListener("drop",this.#n),this.#e.removeEventListener("dragend",this.#p)}#_=e=>{if(this.#a){this.#a=!1;return}if(e.target.closest(".column-resize, .column-filter"))return;let r=e.target.closest("th[data-field]");r&&this.#l(r.dataset.field,e.shiftKey)};#v=e=>{if(e.target.closest(".column-filter")){e.preventDefault();return}let r=e.target.closest("th[data-field]");if(!r||this.#r){e.preventDefault();return}this.#a=!0,this.#t={field:r.dataset.field,node:this.#o().columnNode(r.dataset.field)},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",r.textContent),r.classList.add("column-dragging")};#k(e){let r=e.target.closest("th[data-field]");if(!this.#t||!r)return null;let n=this.#o().columnNode(r.dataset.field);return this.#o().columnNode(this.#t.field)!==this.#t.node||n===this.#t.node||n.parentBag!==this.#t.node.parentBag?null:{header:r,field:r.dataset.field,after:e.clientX>r.getBoundingClientRect().left+r.getBoundingClientRect().width/2}}#f=e=>{let r=this.#k(e);for(let n of this.#e.querySelectorAll("[data-drop]"))n.removeAttribute("data-drop");r&&(e.preventDefault(),e.dataTransfer.dropEffect="move",r.header.dataset.drop=r.after?"after":"before")};#n=e=>{let r=this.#k(e);if(!r)return;e.preventDefault();let n=this.#t.field;this.#p(),this.#o().moveColumn(n,r.field,r.after),this.#e.querySelector(`th[data-field="${n}"]`).focus({preventScroll:!0})};#p=()=>{this.#t=null;for(let e of this.#e.querySelectorAll("th"))e.classList.remove("column-dragging"),e.removeAttribute("data-drop")};#y(e){let r=e.dataset.field;if(r===void 0){let s=this.#u();return{identity:s,width:s.headerWidth,setWidth:a=>{s.setHeaderWidth(a),this.#d()}}}let n=this.#o(),i=n.columnNode(r);return{identity:i,width:i.getAttr("width"),setWidth:s=>n.setColumnWidth(r,s)}}#b(e){return e.classList.contains("row-heading")?Math.max(40,Math.ceil(e.querySelector(".row-number-measure").getBoundingClientRect().width)):Number.parseFloat(this.#s.ownerDocument.defaultView.getComputedStyle(this.#s).getPropertyValue("--gramlot-grid-column-min-width"))||40}#g=e=>{this.#a=!1;let r=e.target.closest(".column-resize");if(!r||e.button!==0||this.#r)return;let n=r.closest("th"),i=n.dataset.field,s=this.#y(n),a=[...this.#s.querySelectorAll("table")],o=[...this.#e.querySelectorAll("th[scope=col]")],u=o.map(l=>l.getBoundingClientRect().width);this.#r={pointerId:e.pointerId,field:i,header:n,identity:s.identity,originalWidth:s.width,x:e.clientX,index:o.indexOf(n),widths:u,width:n.getBoundingClientRect().width,tables:a.map(l=>({table:l,width:l.style.width,columns:[...l.querySelectorAll("col")].map(c=>({col:c,width:c.style.width}))}))},this.#e.setPointerCapture(e.pointerId),this.#s.classList.add("resizing"),e.preventDefault()};#i=e=>{let r=this.#r;if(!r||r.pointerId!==e.pointerId)return;r.width=Math.max(this.#b(r.header),Math.round(r.widths[r.index]+e.clientX-r.x));let n=r.widths.map((i,s)=>s===r.index?r.width:i);for(let{table:i,columns:s}of r.tables)i.style.width=`${n.reduce((a,o)=>a+o,0)}px`,s.forEach(({col:a},o)=>{a.style.width=`${n[o]}px`})};#h=e=>{let r=this.#r;if(!r||r.pointerId!==e.pointerId)return;this.#i(e);let n=this.#y(r.header);this.#a=!0,this.cancel(),!(n.identity!==r.identity||n.width!==r.originalWidth)&&(n.setWidth(r.width),this.#A(r.field))};#E=e=>{if(e.target.closest(".column-filter"))return;if(e.key==="Escape"&&this.#r){this.cancel(),e.preventDefault();return}let r=e.target.closest(".column-resize");if(!r&&["Enter"," "].includes(e.key)){let s=e.target.closest("th[data-field]");s&&(e.preventDefault(),this.#l(s.dataset.field,e.shiftKey));return}if(!["ArrowLeft","ArrowRight"].includes(e.key))return;if(!r){let s=e.target.closest("th[data-field]");if(!s||!e.altKey)return;let a=s.dataset.field,o=this.#o(),u=o.columnNode(a),l=u.parentBag.getNodes(),c=l[l.indexOf(u)+(e.key==="ArrowRight"?1:-1)];c?.getAttr("tag")==="cell"&&(o.moveColumn(a,c.getAttr("field"),e.key==="ArrowRight"),this.#e.querySelector(`th[data-field="${a}"]`).focus({preventScroll:!0})),e.preventDefault();return}let n=r.closest("th"),i=(e.key==="ArrowRight"?1:-1)*(e.shiftKey?1:10);this.#y(n).setWidth(Math.max(this.#b(n),Math.round(n.getBoundingClientRect().width+i))),this.#A(n.dataset.field),e.preventDefault()};#A(e){this.#e.querySelector(e===void 0?".row-heading .column-resize":`th[data-field="${e}"] .column-resize`).focus({preventScroll:!0})}#x=()=>{this.#r&&this.cancel()};cancel(){this.#p();let e=this.#r;if(e){this.#r=null;for(let{table:r,width:n,columns:i}of e.tables){r.style.width=n;for(let{col:s,width:a}of i)s.style.width=a}this.#s.classList.remove("resizing"),this.#e.hasPointerCapture(e.pointerId)&&this.#e.releasePointerCapture(e.pointerId)}}};var zn=class{#e;#s=null;setWindow(e){if(e!==null&&(!Number.isSafeInteger(e.start)||e.start<0||!Number.isSafeInteger(e.total)||e.total<e.start))throw new TypeError("Invalid grid window");this.#s=e,this.#r=!0}#o=null;get headerWidth(){return this.#o}setHeaderWidth(e){if(!Number.isFinite(e)||e<=0)throw new TypeError("Grid row header width must be positive pixels");this.#o=Math.round(e)}#l=new Map;#u=new Map;#d=[];#a=[0];#r=!0;#t=32;bindStore(e){e!==this.#e&&(this.#l.clear(),this.resetMeasurements(),this.#e=e)}retain(e){let r=new Set(e);for(let n of[this.#l,this.#u])for(let i of n.keys())r.has(i)||n.delete(i);this.#r=!0}height(e){return this.#l.get(e)??null}setHeight(e,r){if(e.parentBag===this.#e){if(r===null)this.#l.delete(e);else{if(!Number.isFinite(r)||r<=0)throw new TypeError("Grid row height must be positive pixels");this.#l.set(e,Math.round(r))}this.forget(e)}}setRows(e){this.#d=e,this.#r=!0}resetMeasurements(){this.#u.clear(),this.#r=!0}forget(e){this.#u.delete(e),this.#r=!0}measure(e,r){return r<=0||this.#u.get(e)===r?!1:(this.#u.set(e,r),this.#r=!0,!0)}#_(){if(!this.#r)return;let e=1/0;for(let[r,n]of this.#u)this.#l.has(r)||(e=Math.min(e,n));e!==1/0&&(this.#t=e),this.#a=[0];for(let r of this.#d)this.#a.push(this.#a.at(-1)+(this.#u.get(r)??Math.max(this.#l.get(r)??0,this.#t)));this.#r=!1}offset(e){if(this.#_(),!this.#s)return this.#a[e];let r=e-this.#s.start;return r<=0?e*this.#t:r<=this.#d.length?this.#s.start*this.#t+this.#a[r]:e*this.#t+this.#a.at(-1)-this.#d.length*this.#t}get count(){return this.#s?.total??this.#d.length}get totalHeight(){return this.offset(this.count)}indexAt(e){this.#_();let r=0,n=this.count;for(;r<n;){let i=r+n>>>1;this.offset(i+1)<=e?r=i+1:n=i}return Math.min(r,Math.max(0,this.count-1))}window(e,r){this.#_();let n=Math.max(r,this.#t*8);return{start:this.indexAt(Math.max(0,e-n)),end:Math.min(this.count,this.indexAt(e+r+n)+1)}}};var Vn=class{#e;#s;#o;#l;#u=null;#d=null;#a;#r;#t;constructor(e,r,n,i,s,a,o){this.#e=e,this.#s=r,this.#o=n,this.#l=i,this.#a=s,this.#r=a,this.#t=o}get resizing(){return this.#u!==null}connect(){this.#e.addEventListener("pointerdown",this.#i),this.#e.addEventListener("pointermove",this.#h),this.#e.addEventListener("pointerup",this.#E),this.#e.addEventListener("pointercancel",this.#w),this.#e.addEventListener("lostpointercapture",this.#w),this.#e.addEventListener("keydown",this.#A),this.#e.addEventListener("dblclick",this.#x),this.#e.addEventListener("dragstart",this.#_),this.#e.addEventListener("dragover",this.#f),this.#e.addEventListener("dragleave",this.#n),this.#e.addEventListener("drop",this.#p),this.#e.addEventListener("dragend",this.#y)}disconnect(){this.cancel(),this.cancelDrag(),this.#e.removeEventListener("pointerdown",this.#i),this.#e.removeEventListener("pointermove",this.#h),this.#e.removeEventListener("pointerup",this.#E),this.#e.removeEventListener("pointercancel",this.#w),this.#e.removeEventListener("lostpointercapture",this.#w),this.#e.removeEventListener("keydown",this.#A),this.#e.removeEventListener("dblclick",this.#x),this.#e.removeEventListener("dragstart",this.#_),this.#e.removeEventListener("dragover",this.#f),this.#e.removeEventListener("dragleave",this.#n),this.#e.removeEventListener("drop",this.#p),this.#e.removeEventListener("dragend",this.#y)}#_=e=>{let r=e.target.closest("tr"),n=this.#l(r);if(!this.#r()||!n||this.#u||e.target.closest(".row-height-handle")){e.preventDefault();return}this.#d={node:n,bag:this.#a().bag},e.dataTransfer.effectAllowed="move",e.dataTransfer.setData("text/plain",n.label),r.classList.add("row-dragging")};#v(e){if(!this.#d||!this.#r())return null;let{node:r,bag:n}=this.#d,i=e.target.closest("tr"),s=this.#l(i);if(!s||s===r||this.#a().bag!==n||r.parentBag!==n||s.parentBag!==n)return null;let a=i.getBoundingClientRect();return{row:i,target:s,after:e.clientY>a.top+a.height/2}}#k(){for(let e of this.#e.querySelectorAll("[data-row-drop]"))e.removeAttribute("data-row-drop")}#f=e=>{this.#k();let r=this.#v(e);r&&(e.preventDefault(),e.dataTransfer.dropEffect="move",r.row.dataset.rowDrop=r.after?"after":"before")};#n=e=>{this.#e.contains(e.relatedTarget)||this.#k()};#p=e=>{let r=this.#v(e);if(!r)return;e.preventDefault(),e.stopPropagation();let{node:n}=this.#d;this.cancelDrag(),this.#a().moveRow(n,r.target,r.after)};#y=()=>{this.cancelDrag()};cancelDrag(){this.#d=null,this.#k();for(let e of this.#e.querySelectorAll(".row-dragging"))e.classList.remove("row-dragging")}#b(e){let r=e.target.closest(".row-height-handle");if(!r)return null;let n=r.closest("tr"),i=this.#l(n);return i?{handle:r,row:n,node:i}:null}project(e,r){let n=this.#o().height(r);e.style.height=n===null?"":`${n}px`}#g(e){let r=e.querySelector(".row-height-handle");r&&r.setAttribute("aria-valuenow",String(Math.round(e.getBoundingClientRect().height))),this.#t()}#i=e=>{let r=this.#b(e);if(!r||e.button!==0||this.#u)return;let{row:n}=r,i=n.getBoundingClientRect().height,s=n.style.height;n.style.height="";let a=n.getBoundingClientRect().height;n.style.height=s,this.#u={...r,pointerId:e.pointerId,y:e.clientY,height:i,minimum:a,preview:i},r.handle.focus({preventScroll:!0}),r.handle.setPointerCapture(e.pointerId),this.#s.classList.add("resizing-row"),e.preventDefault()};#h=e=>{let r=this.#u;!r||r.pointerId!==e.pointerId||(r.preview=Math.max(r.minimum,Math.round(r.height+e.clientY-r.y)),r.row.style.height=`${r.preview}px`,this.#g(r.row))};#E=e=>{let r=this.#u;!r||r.pointerId!==e.pointerId||(this.#h(e),this.cancel(),!(this.#l(r.row)!==r.node||r.preview===r.height)&&(this.#o().setHeight(r.node,r.preview),this.project(r.row,r.node),this.#g(r.row)))};#A=e=>{if(e.key==="Escape"&&(this.#u||this.#d)){this.cancel(),this.cancelDrag(),e.preventDefault();return}let r=this.#b(e);if(!r||!["ArrowUp","ArrowDown","Home"].includes(e.key))return;this.cancel();let n=null;if(e.key!=="Home"){let i=r.row.getBoundingClientRect().height;r.row.style.height="";let s=r.row.getBoundingClientRect().height;n=Math.max(s,i+(e.key==="ArrowDown"?10:-10))}this.#o().setHeight(r.node,n),this.project(r.row,r.node),this.#g(r.row),e.preventDefault()};#x=e=>{let r=this.#b(e);r&&(this.cancel(),this.#o().setHeight(r.node,null),this.project(r.row,r.node),this.#g(r.row),e.preventDefault())};#w=()=>{this.cancel()};cancel(){let e=this.#u;e&&(this.#u=null,this.project(e.row,e.node),this.#s.classList.remove("resizing-row"),e.handle.hasPointerCapture(e.pointerId)&&e.handle.releasePointerCapture(e.pointerId))}};var tl=`
|
|
26
|
+
.column-filter{position:absolute;inset-inline-end:8px;top:50%;transform:translateY(-50%);border:0;background:transparent;color:inherit;cursor:pointer;padding:2px;margin-inline-start:4px;vertical-align:middle;line-height:0;opacity:.6}
|
|
27
|
+
th:has(.column-filter){padding-inline-end:28px}
|
|
28
|
+
.column-filter svg{width:13px;height:13px;fill:none;stroke:currentColor;stroke-width:1.5}
|
|
29
|
+
.column-filter.active{opacity:1;color:var(--gramlot-action,Highlight)}
|
|
30
|
+
.column-filter.active svg{fill:currentColor}
|
|
31
|
+
.column-filtered{box-shadow:inset 0 -2px var(--gramlot-action,Highlight)}
|
|
32
|
+
.column-filter:focus-visible{outline:2px solid var(--gramlot-focus-ring,Highlight)}
|
|
33
|
+
.column-filter-panel{position:fixed;inset:auto;margin:0;padding:0;border:1px solid var(--gramlot-border,GrayText);border-radius:8px;background:var(--gramlot-surface,Canvas);color:var(--gramlot-ink,CanvasText);font:inherit;box-shadow:0 8px 24px #0003;width:310px;max-width:var(--gramlot-popup-available-width);max-height:var(--gramlot-popup-available-height);overflow:auto}
|
|
34
|
+
.column-filter-panel slot{display:contents}
|
|
35
|
+
|
|
26
36
|
.control-box{position:relative}
|
|
27
37
|
.cell-editor{
|
|
28
|
-
position:absolute;z-index:4;height:var(--grid-editor-height);
|
|
38
|
+
position:absolute;z-index:4;height:min(var(--grid-editor-height),var(--grid-cell-max-height,var(--grid-editor-height)));
|
|
29
39
|
background:var(--gramlot-grid-background,var(--gramlot-surface,Canvas));
|
|
30
40
|
--gramlot-field-height:0px;
|
|
31
|
-
--gramlot-field-block-size:var(--grid-editor-height);
|
|
41
|
+
--gramlot-field-block-size:min(var(--grid-editor-height),var(--grid-cell-max-height,var(--grid-editor-height)));
|
|
32
42
|
--gramlot-field-padding:var(--gramlot-grid-cell-padding,.3rem .6rem);
|
|
33
43
|
--gramlot-field-font-size:1em;
|
|
34
44
|
--gramlot-field-line-height:var(--gramlot-grid-line-height,1.35);
|
|
@@ -161,6 +171,28 @@ ${" ".repeat(i)}</${a}>`:`<${a}${u}>${f}</${a}>`:r===null||r.includes(a)?`<${a}
|
|
|
161
171
|
block-size: var(--gramlot-grid-row-height, 2rem);
|
|
162
172
|
border-block-end: 1px solid var(--gramlot-grid-row-border-color, var(--gramlot-border, ButtonBorder));
|
|
163
173
|
}
|
|
174
|
+
.cell-color-swatch { display:inline-block;vertical-align:middle;width:100%;max-width:48px;height:14px;
|
|
175
|
+
border:1px solid var(--gramlot-border-control,#888);border-radius:3px; }
|
|
176
|
+
.cell-color-swatch[hidden] { display:none; }
|
|
177
|
+
td[data-field] { padding: 0; }
|
|
178
|
+
.cell-content {
|
|
179
|
+
padding: var(--gramlot-grid-cell-padding, .3rem .6rem);
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
text-overflow: ellipsis;
|
|
182
|
+
max-height: var(--grid-cell-max-height, none);
|
|
183
|
+
}
|
|
184
|
+
td.check-cell { vertical-align: middle; }
|
|
185
|
+
.check-cell > .cell-content {
|
|
186
|
+
display: flex;
|
|
187
|
+
align-items: center;
|
|
188
|
+
justify-content: center;
|
|
189
|
+
padding: 0;
|
|
190
|
+
min-block-size: calc(var(--gramlot-grid-row-height, 2rem) - 1px);
|
|
191
|
+
text-overflow: clip;
|
|
192
|
+
}
|
|
193
|
+
.grid-set-check { margin: 0; flex: none; }
|
|
194
|
+
.cell-scroll { overflow: auto; overscroll-behavior: contain; }
|
|
195
|
+
.cell-scroll:focus-visible { outline: 1px solid var(--gramlot-focus-ring, Highlight); outline-offset: -1px; }
|
|
164
196
|
tbody tr { background: var(--gramlot-grid-background, var(--gramlot-surface, Canvas)); }
|
|
165
197
|
tbody tr.alternate { background: var(--gramlot-grid-row-alt-background, var(--gramlot-surface-subtle, Canvas)); }
|
|
166
198
|
tbody tr:hover { background: var(--gramlot-grid-row-hover-background, var(--gramlot-selected, Highlight)); }
|
|
@@ -219,32 +251,30 @@ ${" ".repeat(i)}</${a}>`:`<${a}${u}>${f}</${a}>`:r===null||r.includes(a)?`<${a}
|
|
|
219
251
|
tbody tr[data-row-drop=after] > * { box-shadow: inset 0 -2px var(--gramlot-focus-ring, Highlight); }
|
|
220
252
|
.numeric { font-variant-numeric: tabular-nums; }
|
|
221
253
|
.empty { text-align: center; color: var(--gramlot-text-secondary, GrayText); }
|
|
222
|
-
`;var
|
|
223
|
-
:host{display:inline-block;inline-size:
|
|
224
|
-
.control-box{display:flex;align-items:stretch;position:relative;min-block-size:var(--gramlot-
|
|
254
|
+
`;var us=class{#e=new Set;view=null;#s;columns=[];update(e,r){if(!(this.view===e&&this.#s===e.bag&&this.columns===r)){this.view=e,this.#s=e.bag,this.columns=r;for(let n of this.#e)n()}}detach(e){if(this.view===e){this.view=null,this.#s=null,this.columns=[];for(let r of this.#e)r()}}subscribe(e){return this.#e.add(e),()=>this.#e.delete(e)}};function $r(t){return Object.hasOwn(t,"gridSearch")||Object.defineProperty(t,"gridSearch",{value:new us,configurable:!0}),t.gridSearch}function rl(t,e){if(t===!0||typeof t=="string"&&t.startsWith("*")){let r=t===!0?e:e.filter(n=>t.slice(1).includes(n.dtype??"T"));return r.length?[...r.length>1?[{field:r.map(n=>n.field).join("+"),name:"All columns"}]:[],...r.map(n=>({field:n.field,name:n.name}))]:[]}if(typeof t!="string"||!t.trim())throw new TypeError("searchOn requires true or a column list");return t.split(",").map(r=>{let n=r.trim().split(":"),i=n.at(-1),s=n.length===2?n[0]:e.find(a=>a.field===i)?.name;if(n.length>2||!i||i.split("+").some(a=>!e.some(o=>o.field===a)))throw new TypeError(`Unknown searchOn column: ${r}`);return{field:i,name:s??i}})}function cs(t,e=","){if(typeof e!="string"||!e)throw new TypeError("separator must be a nonempty string");if(t==="")return[];let r=new Set;return t.split(e).map(n=>{let i=n.indexOf(":"),s=i<0?n:n.slice(0,i),a=i<0?n:n.slice(i+1);if(!s||r.has(s))throw new Error("Invalid or duplicate choice code");return r.add(s),{id:s,caption:a}})}function ds(t,e,r=""){return t.find(n=>n.id===e)?.caption??r??""}var nl=["TL","TC","TR","L","R","BL","BC","BR"];function Hn(t){return class extends t{setLabelbox(e){let{box:r,labelBox:n,fieldLabel:i}=e;Object.assign(this,{box:r,labelBox:n,fieldLabel:i}),i.addEventListener("click",()=>{this.control.focus(),this.control.localName==="input"&&["checkbox","radio"].includes(this.control.type)&&this.control.click()})}projectAttributes(e,r){let n=super.projectAttributes(e,r),{lbl:i,lbl_value:s,lbl_values:a}=this.parameters,o=a==null?i??"":ds(cs(a),s,i);return o?this.control.setAttribute("aria-label",o):this.control.removeAttribute("aria-label"),n}}}Hn.labelbox=!0;Hn.parameters={lbl:{dtype:"T",qualification:"intl_str",nullable:!0,binding:"read"},lbl_value:{dtype:"T",nullable:!0,binding:"twoWay"},lbl_values:{dtype:"T",nullable:!0,binding:"read"},lbl_position:{dtype:"T",default:"TL",binding:"read",enum:nl}};var il=".gramlot-search-labelbox{inline-size:var(--gramlot-search-width,240px);max-inline-size:100%;font-size:var(--gramlot-search-font-size,12px)}",sl=`
|
|
255
|
+
:host{display:inline-block;inline-size:100%;font-size:var(--gramlot-search-font-size,12px);max-inline-size:100%;min-inline-size:0}
|
|
256
|
+
.control-box{display:flex;align-items:stretch;position:relative;min-block-size:max(var(--gramlot-search-height,26px),var(--gramlot-touch-target,0px));
|
|
225
257
|
border:1px solid var(--gramlot-border,GrayText);border-radius:999px;
|
|
226
258
|
background:var(--gramlot-field-background,Canvas);color:var(--gramlot-ink,CanvasText);
|
|
227
259
|
transition:border-color .15s}
|
|
228
260
|
.control-box:hover{border-color:var(--gramlot-border-control,GrayText)}
|
|
229
261
|
.control-box:focus-within{border-color:var(--gramlot-border-control,GrayText)}
|
|
230
|
-
|
|
231
|
-
.column-choice{display:flex;align-items:center;background:var(--gramlot-surface-subtle,ButtonFace);border-radius:999px 0 0 999px;position:relative;flex:0 1 auto;max-inline-size:42%;border-inline-end:1px solid var(--gramlot-border,GrayText)}
|
|
232
|
-
select{display:block;appearance:none;inline-size:100%;padding:.35rem 1.8rem .35rem .85rem;
|
|
233
|
-
border-radius:999px;font-size:.9em;color:var(--gramlot-text-secondary,GrayText);cursor:pointer;text-overflow:ellipsis}
|
|
234
|
-
select option{background:var(--gramlot-field-background,Canvas);color:var(--gramlot-ink,CanvasText)}
|
|
235
|
-
.column-choice>svg{position:absolute;inset-inline-end:.55rem;inset-block-start:50%;transform:translateY(-50%);pointer-events:none;color:var(--gramlot-text-secondary,GrayText);width:.8rem;height:.8rem}
|
|
262
|
+
input,button{font:inherit;color:inherit;min-inline-size:0;border:0;background:transparent}
|
|
236
263
|
.search-entry{position:relative;display:flex;align-items:center;flex:1;min-inline-size:0}
|
|
237
264
|
.search-lens{position:absolute;inset-inline-start:.65rem;pointer-events:none;color:var(--gramlot-text-secondary,GrayText);opacity:.6}
|
|
238
|
-
input{inline-size:100%;min-block-size:var(--gramlot-
|
|
265
|
+
input{inline-size:100%;min-block-size:max(var(--gramlot-search-height,26px),var(--gramlot-touch-target,0px));padding:2px calc(2 * max(24px,var(--gramlot-touch-target,0px)) + 4px) 2px 26px;border-radius:999px;outline:none}
|
|
239
266
|
input::placeholder{color:var(--gramlot-text-secondary,GrayText);opacity:.75}
|
|
240
267
|
input:disabled{opacity:.5}
|
|
241
268
|
.clear,.info{position:absolute;display:grid;place-items:center;padding:.3rem;
|
|
242
|
-
inline-size:
|
|
243
|
-
.clear{inset-inline-end:
|
|
244
|
-
.info{
|
|
269
|
+
inline-size:max(24px,var(--gramlot-touch-target,0px));block-size:max(24px,var(--gramlot-touch-target,0px));border-radius:50%;color:var(--gramlot-text-secondary,GrayText);cursor:pointer}
|
|
270
|
+
.clear{inset-inline-end:calc(max(24px,var(--gramlot-touch-target,0px)) + 2px)}
|
|
271
|
+
.info[hidden]{display:none}
|
|
272
|
+
.search-entry:has(.info[hidden]) .clear{inset-inline-end:2px}
|
|
273
|
+
.search-entry:has(.info[hidden]) input{padding-inline-end:calc(max(24px,var(--gramlot-touch-target,0px)) + 4px)}
|
|
274
|
+
.info{inset-inline-end:2px;opacity:.7}
|
|
245
275
|
.clear:hover,.info:hover{color:var(--gramlot-ink,CanvasText);background:var(--gramlot-surface-subtle,ButtonFace)}
|
|
246
276
|
input:placeholder-shown~.clear{display:none}
|
|
247
|
-
|
|
277
|
+
button:focus-visible{outline:1px solid var(--gramlot-text-secondary,GrayText);outline-offset:-3px}
|
|
248
278
|
svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
|
|
249
279
|
.control-box:has([aria-invalid=true]){border-color:var(--gramlot-error,Mark)}
|
|
250
280
|
.error{position:absolute;inset-block-start:calc(100% + .35rem);inset-inline:0;z-index:1;
|
|
@@ -256,7 +286,7 @@ svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.7;stroke
|
|
|
256
286
|
max-block-size:var(--gramlot-popup-available-height,80vh);overflow:auto;padding:1rem;
|
|
257
287
|
border:1px solid var(--gramlot-border,GrayText);border-radius:var(--gramlot-radius-lg,.75rem);
|
|
258
288
|
background:var(--gramlot-surface,Canvas);color:var(--gramlot-ink,CanvasText);
|
|
259
|
-
box-shadow:var(--gramlot-shadow,0 3px 12px #0002);font:inherit;font-size
|
|
289
|
+
box-shadow:var(--gramlot-shadow,0 3px 12px #0002);font:inherit;font-size:inherit;line-height:1.5}
|
|
260
290
|
.search-help p{margin:.6rem 0 0}.search-help p:last-child{color:var(--gramlot-text-secondary,GrayText)}
|
|
261
291
|
@media(prefers-reduced-motion:reduce){.control-box{transition:none}}
|
|
262
|
-
`;var Ho=(0,we.defineComponent)({name:"searchBox",tag:"gramlot-search-box",base:Mr,sourceContext:!0,parameters:{searchOn:{dtype:["B","T"],default:!0,binding:"read"},searchTime:{dtype:"R",nullable:!0,default:null,binding:"write"}},implementation:t=>class extends t{#e;#r;#l;#c;#a;#s=null;#i;#t;#o;#y;#f;#h;constructor(){super();let e=this.ownerDocument,r=e.createElement("style");r.textContent=Vo;let n=f=>{let h=e.createElementNS(We,"svg");h.setAttribute("viewBox","0 0 24 24"),h.setAttribute("aria-hidden","true");let p=e.createElementNS(We,"path");return p.setAttribute("d",f),h.append(p),h};this.#i=e.createElement("select"),this.#i.setAttribute("aria-label","Search column"),this.#t=e.createElement("input"),this.#t.type="text",this.#t.setAttribute("role","searchbox"),this.#t.setAttribute("aria-label","Filter rows"),this.#t.setAttribute("aria-describedby","search-error"),this.#t.placeholder=" ";let i=e.createElement("button");i.type="button",i.title="Clear filter",i.setAttribute("aria-label","Clear filter"),i.append(n("M6 6L18 18M18 6L6 18")),this.#o=e.createElement("span"),this.#o.id="search-error",this.#o.className="error",this.#o.setAttribute("role","alert");let s=e.createElement("span");s.className="column-choice",s.append(this.#i,n("M7 10L12 15L17 10"));let a=e.createElement("span");a.className="search-entry";let o=n("M21 21L16 16M18 10A8 8 0 1 1 2 10A8 8 0 0 1 18 10");o.classList.add("search-lens"),i.className="clear";let u=e.createElement("button");u.type="button",u.className="info",u.setAttribute("aria-label","Search instructions"),u.title="Search instructions",u.setAttribute("aria-haspopup","dialog"),u.setAttribute("aria-expanded","false"),u.setAttribute("aria-controls","search-help"),u.append(n("M21 12A9 9 0 1 1 3 12A9 9 0 0 1 21 12M12 11V17M12 7V7.1"));let l=e.createElement("div");l.id="search-help",l.className="search-help",l.setAttribute("popover","auto"),l.setAttribute("role","dialog"),l.setAttribute("aria-label","Search instructions");let c=e.createElement("strong");c.textContent="Search instructions",this.#y=e.createElement("p");let d=e.createElement("p");d.textContent="Clear with \xD7 or Escape. Changing column clears the query. An incomplete expression keeps the last valid result.",l.append(c,this.#y,d),this.shadowRoot.append(l),u.addEventListener("click",()=>{l.matches(":popover-open")?l.hidePopover():(l.showPopover(),zo(l,u,{align:"end"}))}),l.addEventListener("toggle",()=>u.setAttribute("aria-expanded",String(l.matches(":popover-open")))),a.append(o,this.#t,i,u),this.control.replaceChildren(s,a,this.#o),this.shadowRoot.append(r),this.#t.addEventListener("input",()=>{this.#d(),this.#s=e.defaultView.setTimeout(()=>{this.#s=null,this.#w()},100)}),this.#t.addEventListener("keydown",f=>{f.isComposing||(f.key==="Enter"&&(f.preventDefault(),this.#d(),this.#w()),f.key==="Escape"&&(f.preventDefault(),this.#k()))}),this.#i.addEventListener("change",()=>this.#k()),i.addEventListener("click",()=>{this.#k(),this.#t.focus()})}setSourceContext(e){this.#e=e;let r=e.frameRecipient();if(r?.nodeTag!=="grid")throw new TypeError("searchBox requires a FrameGrid target");this.#r=$n(r)}projectAttributes(e,r){let n=super.projectAttributes(e,r);return this.isConnected&&this.#v(),n}connectedCallback(){this.#l=this.#r.subscribe(()=>this.#v()),this.#v()}disconnectedCallback(){this.#d(),this.#l?.(),this.#c?.(),this.#l=this.#c=null}#d(){this.#s!==null&&this.ownerDocument.defaultView.clearTimeout(this.#s),this.#s=null}#v(){try{this.#b()}catch(e){this.#t.disabled=!0,this.#o.textContent=e.message}}#b(){if(!this.#r.view)return;(this.#a!==this.#r.view||this.#h!==this.#r.view.bag||!this.#c)&&(this.#d(),this.#c?.(),this.#a=this.#r.view,this.#h=this.#a.bag,this.#f=void 0,this.#c=this.#a.subscribe(()=>this.#g()));let e=this.#i.value,r=jo(this.parameters.searchOn,this.#r.columns);this.#i.replaceChildren(...r.map(({field:n,name:i})=>{let s=this.ownerDocument.createElement("option");return s.value=n,s.textContent=i,s})),r.some(n=>n.field===e)&&(this.#i.value=e),this.#t.disabled=!r.length,this.#g(),this.#p()}#g(){let e=this.#a.filter,r=JSON.stringify(e);this.#f!==r&&(this.#f=r,this.#d(),this.#t.value=e?.value??"",e&&(this.#i.value=e.columns.join("+")),this.#o.textContent="",this.#t.removeAttribute("aria-invalid"),this.#p())}#n(){let e=this.#r.columns.find(r=>r.field===this.#i.value);return["L","R","N","D"].includes(e?.dtype)?e.dtype:"T"}#p(){let e=this.#n();this.#y.textContent=e==="T"?"Type a word to find it anywhere. Text is case-insensitive. You can also use expressions: lamp|desk matches either word; ^lamp matches the start.":e==="D"?"Compare dates: = 2026-10-15, >= 2026-10-15 or < 2026-10-15. ISO dates and your browser\u2019s local date notation are accepted.":"Compare numbers: = 12, > 100, <= 50 or ! 0 (not equal). Decimal punctuation follows your browser locale."}#k(){this.#d(),this.#t.value="",this.#w(),this.#p()}#w(){if(this.#a)try{let e=this.#t.value,r=performance.now();this.#a.applyFilter(e.trim()?{value:e,columns:this.#i.value.split("+"),dtype:this.#n(),locale:this.#e.locale,timeZone:this.#e.timeZone}:null),this.#e.writeParameter("searchTime",performance.now()-r),this.#o.textContent="",this.#t.removeAttribute("aria-invalid")}catch(e){this.#o.textContent=e.message,this.#t.setAttribute("aria-invalid","true")}}}});var Wo={elements:{struct:{doc:null,sub_tags:"column,colgroup",parent_tags:"grid",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0,gridStruct:!0}},column:{doc:null,sub_tags:"",parent_tags:"struct,colgroup",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[{name:"field",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[A-Za-z_][A-Za-z0-9_]*$",flags:0}]},has_default:!1},{name:"name",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"dtype",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(T|B|L|R|N|D|H|DHZ)$",flags:0}]},has_default:!0,default:null},{name:"width",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[0-9]+([.][0-9]+)?(px|em|rem|ch|%)$",flags:0}]},has_default:!0,default:null},{name:"align",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(start|center|end)$",flags:0}]},has_default:!0,default:null},{name:"format",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"white_space",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(normal|nowrap|pre-wrap)$",flags:0}]},has_default:!0,default:null},{name:"edit",kind:"keyword_only",role:"attribute",annotation:{kind:"union",items:[{kind:"dtype",dtype:"B"},{kind:"type",module:"builtins",name:"dict"}]},has_default:!0,default:!1}],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0}},colgroup:{doc:null,sub_tags:"column",parent_tags:"struct",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[{name:"code",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[A-Za-z_][A-Za-z0-9_]*$",flags:0}]},has_default:!1},{name:"name",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"background",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"color",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null}],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0}}}};var jf=(0,we.defineComponent)({name:"grid",tag:"gramlot-grid",base:Mr,bagStore:!0,bagStruct:!0,sourceContext:!0,subTags:"struct,div",parameters:{windowInfo:{dtype:"X",nullable:!0,default:null,binding:"read"},loading:{dtype:"B",default:!1,binding:"read"},viewport:{dtype:"X",nullable:!0,default:null,binding:"write"},sortRequest:{dtype:"T",default:"",binding:"write"},storepath:{dtype:"T"},structpath:{dtype:"T"},rowMode:{dtype:"T"},rowHeaders:{dtype:"B",default:!1,binding:"read"},rowResize:{dtype:"B",default:!1,binding:"read"},selfDragRows:{dtype:"B",default:!1,binding:"read"},sortedBy:{dtype:"T",default:"",binding:"read"},filter:{annotation:{kind:"type",module:"builtins",name:"dict"},nullable:!0,default:null,binding:"read"}},implementation:t=>class extends t{#e;#r;#l=e=>{if(e.type==="keydown"&&!["Enter","F2"].includes(e.key))return;let r=e.target.closest("td[data-field]");if(!r||!this.#i)return;let n=[...this.#f].find(([,s])=>s===r.parentElement)?.[0],i=this.#i.columns.find(s=>s.field===r.dataset.field);if(n&&i.edit){e.preventDefault();try{this.#r.open(n,i,r)}catch(s){this.#s.reportError(s,"Grid editor")}}};#c;#a;#s;#i;#t;#o=!0;#y;#f=new Map;#h;#d;#v;#b;#g;#n;#p;#k;#w=null;#A=1;#_=!1;#D;#E;#u;#m;#j;#z;#C;#S=null;#O=!1;#I=new Set;#M=[];#$=-1;#F=-1;#R;#L;#V;#N=!1;#P=null;#H=e=>{e.target!==this.#n||!["Home","End"].includes(e.key)||!this.#i||(e.preventDefault(),this.#N=e.key==="End",this.#B(this.#N?Math.max(0,this.#u.totalHeight-this.#n.clientHeight):0),this.#x())};#W=()=>{let e=this.#n;e.scrollTop!==this.#P&&(this.#N=e.scrollTop>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1),this.#P=null,this.#g.scrollLeft=this.#n.scrollLeft,this.#x()};constructor(){super();let e=this.ownerDocument,r=e.createElement("style");r.textContent=Uo,this.control.setAttribute("role","table"),this.control.setAttribute("aria-label","Grid"),this.control.setAttribute("part","table");let n=e.createElement("div");n.className="header-frame",n.setAttribute("part","header"),this.#g=e.createElement("div"),this.#g.className="header-viewport",this.#g.setAttribute("part","header-viewport"),this.#n=e.createElement("div"),this.#n.className="body-viewport",this.#n.setAttribute("part","body-viewport"),this.#n.tabIndex=0,this.#n.setAttribute("role","rowgroup"),this.#v=e.createElement("table"),this.#b=e.createElement("table");for(let u of[this.#v,this.#b])u.setAttribute("role","presentation");this.#h=e.createElement("thead"),this.#h.setAttribute("role","rowgroup"),this.#d=e.createElement("tbody"),this.#d.setAttribute("role","presentation"),this.#v.append(this.#h),this.#b.append(this.#d),this.#g.append(this.#v),n.append(this.#g),this.#R=e.createElement("div"),this.#L=e.createElement("div");for(let u of[this.#R,this.#L])u.className="row-space",u.setAttribute("aria-hidden","true");this.#n.append(this.#R,this.#b,this.#L);let i=e.createElement("div");i.className="body-frame",this.#p=e.createElement("div"),this.#p.className="loading-status",this.#p.setAttribute("role","status"),this.#p.setAttribute("aria-label","Loading\u2026"),this.#p.hidden=!0;let s=e.createElementNS(We,"svg");s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("aria-hidden","true");let a=e.createElementNS(We,"circle");a.setAttribute("cx","12"),a.setAttribute("cy","12"),a.setAttribute("r","9"),a.setAttribute("opacity",".2");let o=e.createElementNS(We,"path");o.setAttribute("d","M12 3a9 9 0 0 1 9 9"),s.append(a,o),this.#p.append(s),i.append(this.#n,this.#p),this.control.replaceChildren(n,i),this.shadowRoot.append(r),this.#D=new Mn(this.#h,this.control,()=>this.#i,(u,l)=>this.#ie(u,l),()=>this.#u,()=>this.#x()),this.#E=new Ln(this.#d,this.control,()=>this.#u,u=>{for(let[l,c]of this.#f)if(c===u)return l;return null},()=>this.#m,()=>this.parameters.selfDragRows,()=>this.#x()),this.#k=new e.defaultView.ResizeObserver(()=>this.#x())}connectedCallback(){this.#d.addEventListener("dblclick",this.#l),this.#d.addEventListener("keydown",this.#l),this.#r?.connect(),this.#Z(),this.#m&&this.#U({full:!0,rows:[]}),this.#D.connect(),this.#E.connect(),this.#n.addEventListener("scroll",this.#W,{passive:!0}),this.#n.addEventListener("keydown",this.#H),this.#k.observe(this.#n),this.#k.observe(this.#b),this.#x()}disconnectedCallback(){this.#d.removeEventListener("dblclick",this.#l),this.#d.removeEventListener("keydown",this.#l),this.#r?.disconnect(),this.#J(),this.#m?.disconnect(),this.#C?.(),this.#C=null,this.#D.disconnect(),this.#E.disconnect(),this.#n.removeEventListener("scroll",this.#W),this.#n.removeEventListener("keydown",this.#H),this.#k.disconnect(),this.#w!==null&&this.ownerDocument.defaultView.cancelAnimationFrame(this.#w),this.#w=null}#x(){!this.isConnected||this.#w!==null||(this.#w=this.ownerDocument.defaultView.requestAnimationFrame(()=>{this.#w=null;let r=`${this.#n.offsetWidth-this.#n.clientWidth}px`;this.control.style.getPropertyValue("--grid-scrollbar-width")!==r&&this.control.style.setProperty("--grid-scrollbar-width",r),this.#G();for(let n of this.#h.querySelectorAll("th[scope=col]"))n.querySelector(".column-resize").setAttribute("aria-valuenow",String(Math.round(n.getBoundingClientRect().width)));for(let n of this.#f.values()){let i=n.querySelector(".row-height-handle");i&&i.setAttribute("aria-valuenow",String(Math.round(n.getBoundingClientRect().height)))}if(this.#g.scrollLeft=this.#n.scrollLeft,!!this.#i)try{this.#Q(),this.#r.position()}catch(n){this.#s.reportError(n,"Grid viewport")}}))}#G(){if(!this.#_)return;let e=this.#h.querySelector(".row-number-measure");e.textContent=String(Math.max(1,this.#u.count));let r=Math.ceil(e.getBoundingClientRect().width);this.control.style.setProperty("--grid-row-header-min-width",`${r}px`),this.#u.headerWidth===null?this.control.style.removeProperty("--grid-row-header-width"):this.control.style.setProperty("--grid-row-header-width",`${this.#u.headerWidth}px`),this.#h.querySelector(".row-heading .column-resize").setAttribute("aria-valuemin",String(Math.max(40,r)))}#Q(){let e=this.#n,r=this.#u.indexAt(e.scrollTop),n=e.scrollTop-this.#u.offset(r),i=!1,s=this.#f.values().next().value;if(s){let a=this.ownerDocument.defaultView.getComputedStyle(s.querySelector("td")),o=JSON.stringify([this.#b.getBoundingClientRect().width,a.font,a.lineHeight,a.padding,a.getPropertyValue("--gramlot-grid-row-height")]);o!==this.#V&&(this.#u.resetMeasurements(),this.#V=o,i=!0)}for(let[a,o]of this.#f)i=this.#u.measure(a,o.getBoundingClientRect().height)||i;if(i&&this.#M.length){let a=this.#u.offset(r)+n;this.#Y(),this.#B(this.#N?Math.max(0,this.#u.totalHeight-e.clientHeight):a)}this.#E.resizing||this.#q()}#Y(){let e=Math.max(0,this.#$),r=Math.max(e,this.#F);this.#R.style.height=`${this.#u.offset(e)}px`,this.#L.style.height=`${Math.max(0,this.#u.totalHeight-this.#u.offset(r))}px`}#B(e){this.#n.scrollTop!==e&&(this.#n.scrollTop=e,this.#P=this.#n.scrollTop)}#q(e=!1){let r=this.#n,n=Math.max(0,this.#u.totalHeight-r.clientHeight),i=this.#N?n:Math.min(r.scrollTop,n),{start:s,end:a}=this.#u.window(i,r.clientHeight),o=this.#T();if(o){let l=o.start+this.#M.length;if(s<o.start||a>l){let c=Math.max(200,a-s),d=Math.max(0,Math.min(Math.max(0,o.total-c),s)),f=JSON.stringify([o.revision,d,c]);f!==this.#a&&(this.#a=f,this.#s.writeParameter("viewport",{start:d,count:c}))}else this.#a=null;s=Math.max(s,o.start),a=Math.max(s,Math.min(a,l))}o||(this.#a=null);let u=this.parameters.loading||this.#a!==null;if(this.#p.hidden=!u,u?this.control.setAttribute("aria-busy","true"):this.control.removeAttribute("aria-busy"),e||s!==this.#$||a!==this.#F){let l=new Rr(this.#m,this.#s.format).read(this.#i.columns,this.#M.slice(s-(o?.start??0),a-(o?.start??0)));this.#oe(l,this.#i.columns,s),this.#$=s,this.#F=a,this.#x()}this.#Y(),this.#B(i)}#T(){let e=this.parameters.windowInfo;if(e===null)return null;if(!(e instanceof Go))throw new TypeError("Grid windowInfo requires a Bag");return Object.fromEntries(["start","total","revision","sortedBy"].map(r=>[r,e.getItem(r)]))}#ee(e,r,n){let i=this.#m.getRows(),s=this.#i.columns.filter(o=>o.edit),a=i.indexOf(e)*s.length+s.findIndex(o=>o.field===r)+(typeof n=="object"?n.row*s.length:n);a<0||a>=i.length*s.length||this.#X(Math.floor(a/s.length),s[a%s.length])}#X(e,r){let n=this.#m.getRows()[e];this.#N=!1;let i=this.#u.offset(e),s=this.#u.offset(e+1);i<this.#n.scrollTop?this.#B(i):s>this.#n.scrollTop+this.#n.clientHeight&&this.#B(Math.max(0,s-this.#n.clientHeight)),this.#q(!0);let a=this.#f.get(n).querySelector(`td[data-field="${r.field}"]`),o=a.getBoundingClientRect(),u=this.#n.getBoundingClientRect();o.left<u.left?this.#n.scrollLeft+=o.left-u.left:o.right>u.right&&(this.#n.scrollLeft+=Math.min(o.left-u.left,o.right-u.right)),this.#g.scrollLeft=this.#n.scrollLeft,this.#r.open(n,r,a)}#te(e){let r=this.#s.sourceNode.absDatapath(this.parameters.storepath)+".";if(!e.startsWith(r))return!1;let n=e.slice(r.length),i=this.parameters.rowMode==="attributes"?"?":".",s=n.indexOf(i);if(s<0)return!1;let a=this.#e.getNode(n.slice(0,s)),o=this.#i.columns.find(l=>l.field===n.slice(s+1)&&l.edit),u=this.#m.getRows().indexOf(a);return!o||u<0?!1:(this.#X(u,o),!0)}setSourceContext(e){this.#s=e,this.#r=new On(this,e,(n,i)=>this.#f.get(n)?.querySelector(`td[data-field="${i}"]`),()=>({bag:this.#e,mode:this.parameters.rowMode,window:this.parameters.windowInfo}),()=>this.#f,(n,i,s)=>this.#ee(n,i,s),n=>this.#te(n));let r=e.sourceNode;Object.hasOwn(r,"gridRowLayout")||Object.defineProperty(r,"gridRowLayout",{value:new Rn,configurable:!0}),this.#u=r.gridRowLayout}setStoreBag(e){if(!(e instanceof Go))throw new TypeError("grid storepath must resolve to a Bag");e!==this.#e&&this.#r?.replaceData(),this.#e=e,this.#u.bindStore(e)}setStructBag(e){this.#t=e,this.#o=!0}projectAttributes(e,r){let n=super.projectAttributes(e,r),i=this.#s.collectionView(this.#e,this.parameters.rowMode);this.#m!==i&&(this.#J(),this.#C?.(),this.#C=null,this.#m=i,this.#Z()),!this.#T()&&this.#j!==this.parameters.sortedBy&&(this.#m.sort(this.parameters.sortedBy),this.#j=this.parameters.sortedBy);let s=this.parameters.filter,a=JSON.stringify(s);return!this.#T()&&this.#z!==a&&(this.#m.applyFilter(s===null?null:{locale:this.#s.locale,timeZone:this.#s.timeZone,...s}),this.#z=a),this.#U({full:!0,rows:[]}),n}#Z(){this.isConnected&&this.#m&&!this.#C&&(this.#m.connect(),this.#C=this.#m.subscribe(e=>this.#U(e)))}#J(){this.#S!==null&&this.ownerDocument.defaultView.clearTimeout(this.#S),this.#S=null,this.#O=!1,this.#I.clear()}#U({full:e,rows:r}){if(this.#O||=e,this.#O)this.#I.clear();else for(let n of r)this.#I.add(n);!this.isConnected||this.#S!==null||(this.#S=this.ownerDocument.defaultView.setTimeout(()=>{let n=this.#O,i=[...this.#I];this.#S=null,this.#O=!1,this.#I.clear();try{n?this.#ne():this.#re(i)}catch(s){this.#O=!0,this.#s.reportError(s,"Grid refresh")}},0))}#re(e){for(let n of e)this.#u.forget(n);let r=new Rr(this.#m,this.#s.format).read(this.#i.columns,e.filter(n=>this.#f.has(n)));this.#E.cancel();for(let{node:n,cells:i}of r)this.#K(this.#f.get(n),i);this.#x()}#ne(){let e=this.#o?new In(this.#t):this.#i;this.#r.configure(e.columns);let r=this.#m.getRows();this.#E.cancel(),this.#E.cancelDrag(),this.#u.retain(this.#e.getNodes()),this.#o&&this.#u.resetMeasurements();let n=this.#T();this.#u.setWindow(n),this.#u.setRows(r),this.#M=r,n&&this.#c!==n.revision&&(this.#N=!1,this.#B(0),this.#a=null),this.#c=n?.revision,this.#i=e,this.#o=!1,$n(this.#s.sourceNode).update(this.#m,e.columns);let i=this.parameters.rowHeaders||this.parameters.rowResize,s=JSON.stringify([e.groups,i]);this.#_=i,s!==this.#y&&(this.#ae(e),this.#y=s),this.#se(),this.#q(!0),this.control.setAttribute("aria-colcount",String(e.columns.length+Number(this.#_))),this.control.setAttribute("aria-rowcount",String(this.#A+Math.max(this.#u.count,1))),this.#x()}#ie(e,r){try{let n=this.#T()?Zi(this.#T().sortedBy):this.#m.criteria,i=n.find(u=>u.field===e),s=i?.direction==="a"?"d":"a",a=r?n.filter(u=>u.field!==e):[];r&&i?a.splice(n.indexOf(i),0,{field:e,direction:s}):a.push({field:e,direction:s});let o=a.map(u=>`${u.field}:${u.direction}`).join(",");this.#T()?this.#s.writeParameter("sortRequest",o):this.#m.sort(o)}catch(n){this.#s.reportError(n,"Grid sort")}}#se(){let e=this.#T()?Zi(this.#T().sortedBy):this.#m.criteria;this.#G();for(let r of this.#h.querySelectorAll("th[scope=col]")){let n=e.findIndex(i=>i.field===r.dataset.field);if(r.removeAttribute("aria-sort"),n<0)delete r.dataset.sortDirection,delete r.dataset.sortPriority,r.removeAttribute("aria-label");else{let i=e[n].direction==="a"?"ascending":"descending";r.dataset.sortDirection=i,r.dataset.sortPriority=String(n+1),n===0&&r.setAttribute("aria-sort",i),r.setAttribute("aria-label",`${r.textContent}, sort ${n+1}, ${i}`)}}}#ae(e){this.#D.cancel();let r=this.shadowRoot.activeElement,n=r?.closest("th[data-field]")?.dataset.field,i=r?.classList.contains("column-resize"),s=this.ownerDocument,a=e.groups.some(f=>f.name!==null);this.#A=a?2:1;let o=s.createElement("tr"),u=s.createElement("tr");for(let[f,h]of[o,u].entries())h.setAttribute("role","row"),h.setAttribute("aria-rowindex",String(f+1));let l=(f,h,p,m,_,b="start")=>{let w=s.createElement("th");if(w.textContent=f,w.colSpan=h,w.rowSpan=p,w.scope=m,w.setAttribute("role","columnheader"),w.setAttribute("part",m==="colgroup"?"group-header":"column-header"),w.setAttribute("aria-colindex",String(_+1+Number(this.#_))),w.setAttribute("aria-colspan",String(h)),w.setAttribute("aria-rowspan",String(p)),w.style.textAlign=b,m==="col"){let y=s.createElement("span");y.className="column-caption",y.textContent=f,w.replaceChildren(y);let E=e.columns[_];w.dataset.field=E.field,w.draggable=!0,w.tabIndex=0,w.title="Click: ascending / descending \xB7 Shift-click: add or reverse this column without changing the others \xB7 Numbers show sort priority \xB7 Drag to reorder";let S=s.createElementNS(We,"svg");S.classList.add("sort-indicator"),S.setAttribute("viewBox","0 0 16 16"),S.setAttribute("aria-hidden","true");let R=s.createElementNS(We,"path");R.setAttribute("d","M4 10L8 6L12 10"),S.append(R),w.append(S);let $=s.createElement("span");$.className="column-resize",$.tabIndex=0,$.setAttribute("role","separator"),$.setAttribute("aria-orientation","vertical"),$.setAttribute("aria-valuemin","40"),$.setAttribute("aria-label",`Resize ${E.name}`),$.title="Drag to resize \xB7 Arrow keys adjust width",w.append($)}return w};if(this.#_){let f=s.createElement("th");f.textContent="#",f.scope="col",f.className="row-heading",f.rowSpan=this.#A,f.setAttribute("role","columnheader"),f.setAttribute("aria-colindex","1"),f.setAttribute("aria-rowspan",String(this.#A)),f.setAttribute("part","row-header");let h=s.createElement("span");h.className="row-number-measure",h.setAttribute("aria-hidden","true");let p=s.createElement("span");p.className="column-resize",p.tabIndex=0,p.setAttribute("role","separator"),p.setAttribute("aria-orientation","vertical"),p.setAttribute("aria-label","Resize row numbers"),p.title="Drag to resize \xB7 Arrow keys adjust width",f.append(h,p),o.append(f)}let c=0;for(let f of e.groups)if(a&&f.name!==null){let h=l(f.name,f.columns.length,1,"colgroup",c,"center");h.style.background=f.background??"",h.style.color=f.color??"",o.append(h);for(let p of f.columns)u.append(l(p.name,1,1,"col",c++,p.align))}else for(let h of f.columns){if(a){let p=s.createElement("td");p.className="group-spacer",p.setAttribute("aria-hidden","true"),o.append(p)}(a?u:o).append(l(h.name,1,1,"col",c++,h.align))}this.#h.replaceChildren(o,...a?[u]:[]),n&&this.#h.querySelector(`th[data-field="${n}"]${i?" .column-resize":""}`)?.focus({preventScroll:!0});let d=e.columns.map(f=>f.width??"var(--gramlot-grid-column-width, 10rem)");this.#_&&d.unshift("max(var(--grid-row-header-min-width, 0px), var(--grid-row-header-width, var(--gramlot-grid-row-header-width, 44px)))"),this.control.style.setProperty("--grid-columns-width",`calc(${d.join(" + ")})`);for(let f of[this.#v,this.#b]){for(let h of f.querySelectorAll(":scope > colgroup"))h.remove();if(f.prepend(...e.groups.map(h=>{let p=s.createElement("colgroup");for(let m of h.columns){let _=s.createElement("col");_.style.width=m.width??"var(--gramlot-grid-column-width, 10rem)",p.append(_)}return p})),this.#_){let h=s.createElement("colgroup"),p=s.createElement("col");p.style.width="max(var(--grid-row-header-min-width, 0px), var(--grid-row-header-width, var(--gramlot-grid-row-header-width, 44px)))",h.append(p),f.prepend(h)}}}#oe(e,r,n){this.#E.cancel();let i=new Set,s=null;this.#d.querySelector(".empty")?.parentElement.remove();for(let{node:a,cells:o}of e){let u=this.#f.get(a);u||(u=this.ownerDocument.createElement("tr"),u.setAttribute("part","row"),u.setAttribute("role","row"),u.dataset.row=a.label,this.#f.set(a,u)),u.classList.toggle("alternate",(n+i.size)%2===1),u.draggable=this.parameters.selfDragRows;let l=u.querySelector("th[scope=row]");if(this.#_){if(!l){l=this.ownerDocument.createElement("th"),l.scope="row",l.className="row-heading",l.setAttribute("role","rowheader"),l.setAttribute("part","row-header"),l.setAttribute("aria-colindex","1");let p=this.ownerDocument.createElement("span");p.className="row-number",l.append(p),u.prepend(l)}l.querySelector(".row-number").textContent=String(n+i.size+1);let h=l.querySelector(".row-height-handle");this.parameters.rowResize?(h||(h=this.ownerDocument.createElement("span"),h.className="row-height-handle",h.tabIndex=0,h.setAttribute("role","separator"),h.setAttribute("aria-orientation","horizontal"),h.title="Drag to resize row \xB7 Double-click or Home resets \xB7 Arrow keys adjust height",l.append(h)),h.setAttribute("aria-label",`Resize row ${n+i.size+1}`)):h?.remove()}else l?.remove();let c=Number(this.#_),d=new Map([...u.querySelectorAll("td[data-field]")].map(h=>[h.dataset.field,h]));for(let[h,p]of r.entries()){let m=d.get(p.field);m||(m=this.ownerDocument.createElement("td"),m.setAttribute("part","cell"),m.dataset.field=p.field,m.setAttribute("role","cell")),p.edit?m.tabIndex=0:m.removeAttribute("tabindex"),m.style.textAlign=p.align,m.style.whiteSpace=p.white_space??"",m.style.overflowWrap=p.white_space==="pre-wrap"||p.white_space==="normal"?"anywhere":"",m.setAttribute("aria-colindex",String(h+1+c)),m.classList.toggle("numeric",["L","R","N"].includes(p.dtype)),u.cells[h+c]!==m&&u.insertBefore(m,u.cells[h+c]??null),d.delete(p.field)}for(let h of d.values())h.remove();u.setAttribute("aria-rowindex",String(this.#A+n+i.size+1)),this.#K(u,o),this.#r.decorate(u,a);let f=s?s.nextSibling:this.#d.firstChild;f!==u&&this.#d.insertBefore(u,f),this.#E.project(u,a),s=u,i.add(a)}for(let[a,o]of this.#f)i.has(a)||(o.remove(),this.#f.delete(a));if(!e.length&&this.#u.count===0&&!this.parameters.loading){let a=this.ownerDocument.createElement("tr"),o=this.ownerDocument.createElement("td");a.setAttribute("role","row"),a.setAttribute("aria-rowindex",String(this.#A+1)),o.setAttribute("role","cell"),o.setAttribute("aria-colspan",String(r.length+Number(this.#_))),o.className="empty",o.colSpan=r.length+Number(this.#_),o.textContent="No rows",a.append(o),this.#d.append(a)}}#K(e,r){let n=Number(this.#_);r.forEach((i,s)=>{e.cells[s+n].textContent!==i&&(e.cells[s+n].textContent=i)})}}}),Qi=class extends we.ComponentCollection{toDocument(){let e=super.toDocument(),r=e.elements.grid.attributes.parameters;for(let n of["storepath","rowMode"]){let i=r.find(s=>s.name===n);i.has_default=!1,delete i.default,n==="rowMode"&&(i.annotation={kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(values|attributes)$",flags:0}]})}return Object.assign(e.elements,structuredClone(Wo.elements)),e}},K_=new Qi({name:"grid",components:[jf,Ho],dependencies:[Uf]});export{jf as Grid,K_ as default};
|
|
292
|
+
`;var al=(0,_e.defineComponent)({name:"searchBox",tag:"gramlot-search-box",base:Fr,sourceContext:!0,mixins:[Hn],parameters:{lbl_position:{dtype:"T",default:"L",binding:"read"},searchLiteral:{dtype:"B",default:!1,binding:"read"},searchHelp:{dtype:"B",default:!1,binding:"read"},searchOn:{dtype:["B","T"],default:!0,binding:"read"},searchTime:{dtype:"R",nullable:!0,default:null,binding:"write"}},implementation:t=>class extends t{#e;#s;#o;#l;#u;#d=null;#a;#r;#t;#_;#v;#k;#f;constructor(){super();let e=this.ownerDocument,r=e.createElement("style");r.textContent=sl;let n=d=>{let f=e.createElementNS(xe,"svg");f.setAttribute("viewBox","0 0 24 24"),f.setAttribute("aria-hidden","true");let h=e.createElementNS(xe,"path");return h.setAttribute("d",d),f.append(h),f};this.#a=e.createElement("input"),this.#a.type="text",this.#a.setAttribute("role","searchbox"),this.#a.setAttribute("aria-label","Filter rows"),this.#a.setAttribute("aria-describedby","search-error"),this.#a.placeholder=" ";let i=e.createElement("button");i.type="button",i.title="Clear filter",i.setAttribute("aria-label","Clear filter"),i.append(n("M6 6L18 18M18 6L6 18")),this.#r=e.createElement("span"),this.#r.id="search-error",this.#r.className="error",this.#r.setAttribute("role","alert");let s=e.createElement("span");s.className="search-entry";let a=n("M21 21L16 16M18 10A8 8 0 1 1 2 10A8 8 0 0 1 18 10");a.classList.add("search-lens"),i.className="clear";let o=this.#t=e.createElement("button");o.type="button",o.className="info",o.hidden=!0,o.setAttribute("aria-label","Search instructions"),o.title="Search instructions",o.setAttribute("aria-haspopup","dialog"),o.setAttribute("aria-expanded","false"),o.setAttribute("aria-controls","search-help"),o.append(n("M21 12A9 9 0 1 1 3 12A9 9 0 0 1 21 12M12 11V17M12 7V7.1"));let u=this.#_=e.createElement("div");u.id="search-help",u.className="search-help",u.setAttribute("popover","auto"),u.setAttribute("role","dialog"),u.setAttribute("aria-label","Search instructions");let l=e.createElement("strong");l.textContent="Search instructions",this.#v=e.createElement("p");let c=e.createElement("p");c.textContent="Clear with \xD7 or Escape. Changing column clears the query. An incomplete expression keeps the last valid result.",u.append(l,this.#v,c),this.shadowRoot.append(u),o.addEventListener("click",()=>{u.matches(":popover-open")?u.hidePopover():(u.showPopover(),Ur(u,o,{align:"end"}))}),u.addEventListener("toggle",()=>o.setAttribute("aria-expanded",String(u.matches(":popover-open")))),s.append(a,this.#a,i,o),this.control.replaceChildren(s,this.#r),this.shadowRoot.append(r),this.#a.addEventListener("input",()=>{this.#n(),this.#d=e.defaultView.setTimeout(()=>{this.#d=null,this.#E()},100)}),this.#a.addEventListener("keydown",d=>{d.isComposing||(d.key==="Enter"&&(d.preventDefault(),this.#n(),this.#E()),d.key==="Escape"&&(d.preventDefault(),this.#h()))}),i.addEventListener("click",()=>{this.#h(),this.#a.focus()})}setLabelbox(e){super.setLabelbox(e),e.box.classList.add("gramlot-search-labelbox");let r=this.ownerDocument.createElement("style");r.textContent=il,e.box.prepend(r)}focus(e){this.#a.focus(e)}clear(){this.#h()}setSourceContext(e){this.#e=e;let r=e.frameRecipient();if(r?.nodeTag!=="grid")throw new TypeError("searchBox requires a FrameGrid target");this.#s=$r(r)}projectAttributes(e,r){let n=this.parameters?.lbl_value,i=super.projectAttributes(e,r),s=!this.#t.hidden;return this.#t.hidden=!this.parameters.searchHelp,s&&this.#t.hidden&&this.#_.matches(":popover-open")&&this.#_.hidePopover(),this.isConnected&&(this.#p(),n!=null&&n!==this.parameters.lbl_value&&this.#u?.filter?.columns.join("+")!==this.parameters.lbl_value&&this.#h()),i}connectedCallback(){this.#o=this.#s.subscribe(()=>this.#p()),this.#p()}disconnectedCallback(){this.#n(),this.#o?.(),this.#l?.(),this.#o=this.#l=null}#n(){this.#d!==null&&this.ownerDocument.defaultView.clearTimeout(this.#d),this.#d=null}#p(){try{this.#y()}catch(e){this.#a.disabled=!0,this.#r.textContent=e.message}}#y(){if(!this.#s.view)return;(this.#u!==this.#s.view||this.#f!==this.#s.view.bag||!this.#l)&&(this.#n(),this.#l?.(),this.#u=this.#s.view,this.#f=this.#u.bag,this.#k=void 0,this.#l=this.#u.subscribe(()=>this.#b()));let e=rl(this.parameters.searchOn,this.#s.columns),r=this.#e.sourceNode,n=e.map(({field:s,name:a})=>`${s}:${a}`).join(","),i=e.some(s=>s.field===this.parameters.lbl_value)?this.parameters.lbl_value:e[0]?.field??"";r.getAttr("lbl_values")!==n&&r.setAttr({lbl_values:n}),this.parameters.lbl_value!==i&&this.box.labelbox.choose(i),this.#a.disabled=!e.length,this.#b(),this.#i()}#b(){let e=this.#u.filter,r=JSON.stringify(e);this.#k!==r&&(this.#k=r,this.#n(),this.#a.value=e?.value??"",e&&this.parameters.lbl_value!==e.columns.join("+")&&this.box.labelbox.choose(e.columns.join("+")),this.#r.textContent="",this.#a.removeAttribute("aria-invalid"),this.#i())}#g(){let e=this.#s.columns.find(r=>r.field===this.parameters.lbl_value);return["L","R","N","D"].includes(e?.dtype)?e.dtype:"T"}#i(){let e=this.#g();this.#v.textContent=e==="T"?this.parameters.searchLiteral?"Type literal text to find it anywhere. Matching is case-insensitive.":"Type a word to find it anywhere. Text is case-insensitive. You can also use expressions: lamp|desk matches either word; ^lamp matches the start.":e==="D"?"Compare dates: = 2026-10-15, >= 2026-10-15 or < 2026-10-15. ISO dates and your browser\u2019s local date notation are accepted.":"Compare numbers: = 12, > 100, <= 50 or ! 0 (not equal). Decimal punctuation follows your browser locale."}#h(){this.#n(),this.#a.value="",this.#E(),this.#i()}#E(){if(this.#u)try{let e=this.#a.value,r=performance.now();this.#u.applyFilter(e.trim()?{value:e,columns:this.parameters.lbl_value.split("+"),dtype:this.#g(),...this.parameters.searchLiteral?{literal:!0}:{},locale:this.#e.locale,timeZone:this.#e.timeZone}:null),this.#e.writeParameter("searchTime",performance.now()-r),this.#r.textContent="",this.#a.removeAttribute("aria-invalid")}catch(e){this.#r.textContent=e.message,this.#a.setAttribute("aria-invalid","true")}}}});var ol={elements:{struct:{doc:null,sub_tags:"column,colgroup",parent_tags:"grid",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0,gridStruct:!0}},column:{doc:null,sub_tags:"",parent_tags:"struct,colgroup",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[{name:"field",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[A-Za-z_][A-Za-z0-9_]*$",flags:0}]},has_default:!1},{name:"name",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"dtype",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(T|B|L|R|N|D|H|DHZ)$",flags:0}]},has_default:!0,default:null},{name:"width",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[0-9]+([.][0-9]+)?(px|em|rem|ch|%)$",flags:0}]},has_default:!0,default:null},{name:"max_height",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[0-9]+([.][0-9]+)?(px|em|rem)$",flags:0}]},has_default:!0,default:null},{name:"align",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(start|center|end)$",flags:0}]},has_default:!0,default:null},{name:"format",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"white_space",kind:"keyword_only",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(normal|nowrap|pre-wrap)$",flags:0}]},has_default:!0,default:null},{name:"edit",kind:"keyword_only",role:"attribute",annotation:{kind:"union",items:[{kind:"dtype",dtype:"B"},{kind:"type",module:"builtins",name:"dict"}]},has_default:!0,default:!1},{name:"check",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"checked",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"checkedField",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"title",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null}],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0}},colgroup:{doc:null,sub_tags:"column",parent_tags:"struct",inherits_from:null,ns:null,node_label:null,collection_key:null,attributes:{parameters:[{name:"code",kind:"positional_or_keyword",role:"attribute",annotation:{kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^[A-Za-z_][A-Za-z0-9_]*$",flags:0}]},has_default:!1},{name:"name",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"background",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null},{name:"color",kind:"keyword_only",role:"attribute",annotation:{kind:"dtype",dtype:"T"},has_default:!0,default:null}],accepts_var_keyword:!1,accepts_var_positional:!1},_meta:{data_element:!0}}}};var ih=(0,_e.defineComponent)({name:"grid",tag:"gramlot-grid",base:Fr,bagStore:!0,bagStruct:!0,sourceContext:!0,subTags:"struct,div",parameters:{columnFilters:{dtype:"B",default:!1,binding:"read"},setFilter:{dtype:"T",default:"",binding:"read"},windowInfo:{dtype:"X",nullable:!0,default:null,binding:"read"},loading:{dtype:"B",default:!1,binding:"read"},viewport:{dtype:"X",nullable:!0,default:null,binding:"write"},sortRequest:{dtype:"T",default:"",binding:"write"},storepath:{dtype:"T"},structpath:{dtype:"T"},rowMode:{dtype:"T"},rowHeaders:{dtype:"B",default:!1,binding:"read"},rowResize:{dtype:"B",default:!1,binding:"read"},selfDragRows:{dtype:"B",default:!1,binding:"read"},sortedBy:{dtype:"T",default:"",binding:"read"},filter:{annotation:{kind:"type",module:"builtins",name:"dict"},nullable:!0,default:null,binding:"read"}},implementation:t=>class extends t{#e;#s;#o;#l;#u=e=>{if(e.type==="keydown"&&!["Enter","F2"].includes(e.key))return;let r=e.target.closest("td[data-field]");if(!r||!this.#t)return;let n=[...this.#f].find(([,s])=>s===r.parentElement)?.[0],i=this.#t.columns.find(s=>s.field===r.dataset.field);if(n&&i.edit){e.preventDefault();try{this.#l.open(n,i,r)}catch(s){this.#r.reportError(s,"Grid editor")}}};#d;#a;#r;#t;#_;#v=!0;#k;#f=new Map;#n;#p;#y;#b;#g;#i;#h;#E;#A=null;#x=1;#w=!1;#O;#D;#c;#m;#V;#H;#B;#I=null;#M=!1;#R=new Set;#L=[];#q=-1;#P=-1;#F;#$;#W;#S=!1;#U=null;#G=e=>{e.target!==this.#i||!["Home","End"].includes(e.key)||!this.#t||(e.preventDefault(),this.#S=e.key==="End",this.#N(this.#S?Math.max(0,this.#c.totalHeight-this.#i.clientHeight):0),this.#C())};#Y=()=>{let e=this.#i;e.scrollTop!==this.#U&&(this.#S=e.scrollTop>0&&e.scrollHeight-e.clientHeight-e.scrollTop<=1),this.#U=null,this.#g.scrollLeft=this.#i.scrollLeft,this.#C()};constructor(){super();let e=this.ownerDocument,r=e.createElement("style");r.textContent=tl,this.control.setAttribute("role","table"),this.control.setAttribute("aria-label","Grid"),this.control.setAttribute("part","table");let n=e.createElement("div");n.className="header-frame",n.setAttribute("part","header"),this.#g=e.createElement("div"),this.#g.className="header-viewport",this.#g.setAttribute("part","header-viewport"),this.#i=e.createElement("div"),this.#i.className="body-viewport",this.#i.setAttribute("part","body-viewport"),this.#i.tabIndex=0,this.#i.setAttribute("role","rowgroup"),this.#y=e.createElement("table"),this.#b=e.createElement("table");for(let u of[this.#y,this.#b])u.setAttribute("role","presentation");this.#n=e.createElement("thead"),this.#n.setAttribute("role","rowgroup"),this.#p=e.createElement("tbody"),this.#p.setAttribute("role","presentation"),this.#y.append(this.#n),this.#b.append(this.#p),this.#g.append(this.#y),n.append(this.#g),this.#F=e.createElement("div"),this.#$=e.createElement("div");for(let u of[this.#F,this.#$])u.className="row-space",u.setAttribute("aria-hidden","true");this.#i.append(this.#F,this.#b,this.#$);let i=e.createElement("div");i.className="body-frame",this.#h=e.createElement("div"),this.#h.className="loading-status",this.#h.setAttribute("role","status"),this.#h.setAttribute("aria-label","Loading\u2026"),this.#h.hidden=!0;let s=e.createElementNS(xe,"svg");s.setAttribute("viewBox","0 0 24 24"),s.setAttribute("aria-hidden","true");let a=e.createElementNS(xe,"circle");a.setAttribute("cx","12"),a.setAttribute("cy","12"),a.setAttribute("r","9"),a.setAttribute("opacity",".2");let o=e.createElementNS(xe,"path");o.setAttribute("d","M12 3a9 9 0 0 1 9 9"),s.append(a,o),this.#h.append(s),i.append(this.#i,this.#h),this.control.replaceChildren(n,i),this.shadowRoot.append(r),this.#o=new Rn(this,this.#n),this.#O=new jn(this.#n,this.control,()=>this.#t,(u,l)=>this.#ae(u,l),()=>this.#c,()=>this.#C()),this.#D=new Vn(this.#p,this.control,()=>this.#c,u=>{for(let[l,c]of this.#f)if(c===u)return l;return null},()=>this.#m,()=>this.parameters.selfDragRows,()=>this.#C()),this.#E=new e.defaultView.ResizeObserver(()=>this.#C())}connectedCallback(){this.#p.addEventListener("dblclick",this.#u),this.#p.addEventListener("keydown",this.#u),this.#l?.connect(),this.#s?.connect(),this.#o.connect(),this.#Q(),this.#m&&this.#z({full:!0,rows:[]}),this.#O.connect(),this.#D.connect(),this.#i.addEventListener("scroll",this.#Y,{passive:!0}),this.#i.addEventListener("keydown",this.#G),this.#E.observe(this.#i),this.#E.observe(this.#b),this.#C()}disconnectedCallback(){this.#p.removeEventListener("dblclick",this.#u),this.#p.removeEventListener("keydown",this.#u),this.#l?.disconnect(),this.#s?.disconnect(),this.#o.disconnect(),this.#ee(),$r(this.#r.sourceNode).detach(this.#m),this.#m?.disconnect(),this.#B?.(),this.#B=null,this.#O.disconnect(),this.#D.disconnect(),this.#i.removeEventListener("scroll",this.#Y),this.#i.removeEventListener("keydown",this.#G),this.#E.disconnect(),this.#A!==null&&this.ownerDocument.defaultView.cancelAnimationFrame(this.#A),this.#A=null}#C(){!this.isConnected||this.#A!==null||(this.#A=this.ownerDocument.defaultView.requestAnimationFrame(()=>{this.#A=null;let r=`${this.#i.offsetWidth-this.#i.clientWidth}px`;this.control.style.getPropertyValue("--grid-scrollbar-width")!==r&&this.control.style.setProperty("--grid-scrollbar-width",r),this.#X();for(let n of this.#n.querySelectorAll("th[scope=col]"))n.querySelector(".column-resize").setAttribute("aria-valuenow",String(Math.round(n.getBoundingClientRect().width)));for(let n of this.#f.values()){let i=n.querySelector(".row-height-handle");i&&i.setAttribute("aria-valuenow",String(Math.round(n.getBoundingClientRect().height)))}if(this.#g.scrollLeft=this.#i.scrollLeft,!!this.#t)try{this.#Z(),this.#l.position()}catch(n){this.#r.reportError(n,"Grid viewport")}}))}#X(){if(!this.#w)return;let e=this.#n.querySelector(".row-number-measure");e.textContent=String(Math.max(1,this.#c.count));let r=Math.ceil(e.getBoundingClientRect().width);this.control.style.setProperty("--grid-row-header-min-width",`${r}px`),this.#c.headerWidth===null?this.control.style.removeProperty("--grid-row-header-width"):this.control.style.setProperty("--grid-row-header-width",`${this.#c.headerWidth}px`),this.#n.querySelector(".row-heading .column-resize").setAttribute("aria-valuemin",String(Math.max(40,r)))}#Z(){let e=this.#i,r=this.#c.indexAt(e.scrollTop),n=e.scrollTop-this.#c.offset(r),i=!1,s=this.#f.values().next().value;if(s){let a=this.ownerDocument.defaultView.getComputedStyle(s.querySelector("td")),o=JSON.stringify([this.#b.getBoundingClientRect().width,a.font,a.lineHeight,a.padding,a.getPropertyValue("--gramlot-grid-row-height")]);o!==this.#W&&(this.#c.resetMeasurements(),this.#W=o,i=!0)}for(let[a,o]of this.#f)i=this.#c.measure(a,o.getBoundingClientRect().height)||i;if(i&&this.#L.length){let a=this.#c.offset(r)+n;this.#K(),this.#N(this.#S?Math.max(0,this.#c.totalHeight-e.clientHeight):a)}this.#D.resizing||this.#j()}#K(){let e=Math.max(0,this.#q),r=Math.max(e,this.#P);this.#F.style.height=`${this.#c.offset(e)}px`,this.#$.style.height=`${Math.max(0,this.#c.totalHeight-this.#c.offset(r))}px`}#N(e){this.#i.scrollTop!==e&&(this.#i.scrollTop=e,this.#U=this.#i.scrollTop)}#j(e=!1){let r=this.#i,n=Math.max(0,this.#c.totalHeight-r.clientHeight),i=this.#S?n:Math.min(r.scrollTop,n),{start:s,end:a}=this.#c.window(i,r.clientHeight),o=this.#T();if(o){let l=o.start+this.#L.length;if(s<o.start||a>l){let c=Math.max(200,a-s),d=Math.max(0,Math.min(Math.max(0,o.total-c),s)),f=JSON.stringify([o.revision,d,c]);f!==this.#a&&(this.#a=f,this.#r.writeParameter("viewport",{start:d,count:c}))}else this.#a=null;s=Math.max(s,o.start),a=Math.max(s,Math.min(a,l))}o||(this.#a=null);let u=this.parameters.loading||this.#a!==null;if(this.#h.hidden=!u,u?this.control.setAttribute("aria-busy","true"):this.control.removeAttribute("aria-busy"),e||s!==this.#q||a!==this.#P){let l=new Ar(this.#m,this.#r.format).read(this.#t.columns,this.#L.slice(s-(o?.start??0),a-(o?.start??0)));this.#ue(l,this.#t.columns,s),this.#q=s,this.#P=a,this.#C()}this.#K(),this.#N(i)}#T(){let e=this.parameters.windowInfo;if(e===null)return null;if(!(e instanceof ll))throw new TypeError("Grid windowInfo requires a Bag");return Object.fromEntries(["start","total","revision","sortedBy"].map(r=>[r,e.getItem(r)]))}#re(e,r,n){let i=this.#m.getRows(),s=this.#t.columns.filter(o=>o.edit),a=i.indexOf(e)*s.length+s.findIndex(o=>o.field===r)+(typeof n=="object"?n.row*s.length:n);a<0||a>=i.length*s.length||this.#J(Math.floor(a/s.length),s[a%s.length])}#J(e,r){let n=this.#m.getRows()[e];this.#S=!1;let i=this.#c.offset(e),s=this.#c.offset(e+1);i<this.#i.scrollTop?this.#N(i):s>this.#i.scrollTop+this.#i.clientHeight&&this.#N(Math.max(0,s-this.#i.clientHeight)),this.#j(!0),this.#Z();let a=this.#f.get(n).querySelector(`td[data-field="${r.field}"]`),o=a.getBoundingClientRect(),u=this.#i.getBoundingClientRect();o.top<u.top?this.#N(Math.floor(this.#i.scrollTop+o.top-u.top)):o.bottom>u.bottom&&this.#N(Math.ceil(this.#i.scrollTop+Math.min(o.top-u.top,o.bottom-u.bottom))),o.left<u.left?this.#i.scrollLeft+=o.left-u.left:o.right>u.right&&(this.#i.scrollLeft+=Math.min(o.left-u.left,o.right-u.right)),this.#g.scrollLeft=this.#i.scrollLeft,this.#l.open(n,r,a)}#ne(e){let r=this.#r.sourceNode.absDatapath(this.parameters.storepath)+".";if(!e.startsWith(r))return!1;let n=e.slice(r.length),i=this.parameters.rowMode==="attributes"?"?":".",s=n.indexOf(i);if(s<0)return!1;let a=this.#e.getNode(n.slice(0,s)),o=this.#t.columns.find(l=>l.field===n.slice(s+1)&&l.edit),u=this.#m.getRows().indexOf(a);return!o||u<0?!1:(this.#J(u,o),!0)}setSourceContext(e){this.#r=e,this.#o.setSourceContext(e),this.#s=new qn(e.sourceNode,this.#p,()=>this.#t?.columns??[],n=>[...this.#f].find(([,i])=>i===n)?.[0],(n,i)=>this.#m.value(n,i),()=>this.parameters.setFilter,()=>this.#m),this.isConnected&&this.#s.connect(),this.#l=new $n(this,e,(n,i)=>this.#f.get(n)?.querySelector(`td[data-field="${i}"]`),()=>({bag:this.#e,mode:this.parameters.rowMode,window:this.parameters.windowInfo}),()=>this.#f,(n,i,s)=>this.#re(n,i,s),n=>this.#ne(n));let r=e.sourceNode;Object.hasOwn(r,"gridRowLayout")||Object.defineProperty(r,"gridRowLayout",{value:new zn,configurable:!0}),this.#c=r.gridRowLayout}setStoreBag(e){if(!(e instanceof ll))throw new TypeError("grid storepath must resolve to a Bag");e!==this.#e&&this.#l?.replaceData(),this.#e=e,this.#c.bindStore(e)}setStructBag(e){this.#_=e,this.#v=!0}projectAttributes(e,r){let n=super.projectAttributes(e,r);if(this.#T()&&(this.parameters.columnFilters||this.#m?.filterContributions.some(([o])=>o.startsWith("column:"))))throw new TypeError("grid columnFilters requires a complete resident store");if(this.#T()&&this.parameters.setFilter!=="")throw new TypeError("grid setFilter requires a complete resident store");let i=this.#r.collectionView(this.#e,this.parameters.rowMode);this.#m!==i&&(this.#ee(),this.#B?.(),this.#B=null,this.#m=i,this.#Q()),!this.#T()&&this.#V!==this.parameters.sortedBy&&(this.#m.sort(this.parameters.sortedBy),this.#V=this.parameters.sortedBy);let s=this.parameters.filter,a=JSON.stringify(s);return!this.#T()&&this.#H!==a&&(this.#m.applyFilter(s===null?null:{locale:this.#r.locale,timeZone:this.#r.timeZone,...s},"base"),this.#H=a),this.#z({full:!0,rows:[]}),n}#Q(){this.isConnected&&this.#m&&!this.#B&&(this.#m.connect(),this.#B=this.#m.subscribe(e=>this.#z(e)))}#ee(){this.#I!==null&&this.ownerDocument.defaultView.clearTimeout(this.#I),this.#I=null,this.#M=!1,this.#R.clear()}#z({full:e,rows:r}){if(this.#M||=e,this.#M)this.#R.clear();else for(let n of r)this.#R.add(n);!this.isConnected||this.#I!==null||(this.#I=this.ownerDocument.defaultView.setTimeout(()=>{let n=this.#M,i=[...this.#R];this.#I=null,this.#M=!1,this.#R.clear();try{n?this.#se():this.#ie(i)}catch(s){this.#M=!0,this.#r.reportError(s,"Grid refresh")}},0))}#ie(e){for(let n of e)this.#c.forget(n);let r=new Ar(this.#m,this.#r.format).read(this.#t.columns,e.filter(n=>this.#f.has(n)));this.#D.cancel();for(let{node:n,cells:i}of r)this.#te(this.#f.get(n),i,n);this.#C()}#se(){let e=this.#v?new Un(this.#_):this.#t;this.#l.configure(e.columns),this.#t=e,this.#s.configure();let r=this.#m.getRows();this.#D.cancel(),this.#D.cancelDrag(),this.#c.retain(this.#e.getNodes()),this.#v&&this.#c.resetMeasurements();let n=this.#T();this.#c.setWindow(n),this.#c.setRows(r),this.#L=r,n&&this.#d!==n.revision&&(this.#S=!1,this.#N(0),this.#a=null),this.#d=n?.revision,this.#v=!1,$r(this.#r.sourceNode).update(this.#m,e.columns.filter(a=>!a.check));let i=this.parameters.rowHeaders||this.parameters.rowResize,s=JSON.stringify([e.groups,i,this.parameters.columnFilters]);this.#w=i,s!==this.#k&&(this.#le(e),this.#k=s),this.#o.update(this.#m,e.columns,this.parameters.columnFilters,this.#r.format),this.#oe(),this.#j(!0),this.control.setAttribute("aria-colcount",String(e.columns.length+Number(this.#w))),this.control.setAttribute("aria-rowcount",String(this.#x+Math.max(this.#c.count,1))),this.#C()}#ae(e,r){if(!this.#t.columns.find(n=>n.field===e)?.check)try{let n=this.#T()?os(this.#T().sortedBy):this.#m.criteria,i=n.find(u=>u.field===e),s=i?.direction==="a"?"d":"a",a=r?n.filter(u=>u.field!==e):[];r&&i?a.splice(n.indexOf(i),0,{field:e,direction:s}):a.push({field:e,direction:s});let o=a.map(u=>`${u.field}:${u.direction}`).join(",");this.#T()?this.#r.writeParameter("sortRequest",o):this.#m.sort(o)}catch(n){this.#r.reportError(n,"Grid sort")}}#oe(){let e=this.#T()?os(this.#T().sortedBy):this.#m.criteria;this.#X();for(let r of this.#n.querySelectorAll("th[scope=col]")){let n=e.findIndex(i=>i.field===r.dataset.field);if(r.removeAttribute("aria-sort"),n<0)delete r.dataset.sortDirection,delete r.dataset.sortPriority,r.removeAttribute("aria-label");else{let i=e[n].direction==="a"?"ascending":"descending";r.dataset.sortDirection=i,r.dataset.sortPriority=String(n+1),n===0&&r.setAttribute("aria-sort",i),r.setAttribute("aria-label",`${r.textContent}, sort ${n+1}, ${i}`)}}}#le(e){this.#O.cancel();let r=this.shadowRoot.activeElement,n=r?.closest("th[data-field]")?.dataset.field,i=r?.classList.contains("column-resize"),s=this.ownerDocument,a=e.groups.some(f=>f.name!==null);this.#x=a?2:1;let o=s.createElement("tr"),u=s.createElement("tr");for(let[f,h]of[o,u].entries())h.setAttribute("role","row"),h.setAttribute("aria-rowindex",String(f+1));let l=(f,h,p,m,g,_="start")=>{let w=s.createElement("th");if(w.textContent=f,w.colSpan=h,w.rowSpan=p,w.scope=m,w.setAttribute("role","columnheader"),w.setAttribute("part",m==="colgroup"?"group-header":"column-header"),w.setAttribute("aria-colindex",String(g+1+Number(this.#w))),w.setAttribute("aria-colspan",String(h)),w.setAttribute("aria-rowspan",String(p)),w.style.textAlign=_,m==="col"){let y=s.createElement("span");y.className="column-caption",y.textContent=f,w.replaceChildren(y);let k=e.columns[g];w.dataset.field=k.field,w.draggable=!0,w.tabIndex=0,w.setAttribute("aria-label",k.title??k.name),w.title=k.check?(k.title??k.name)+" \xB7 Drag to reorder":"Click: ascending / descending \xB7 Shift-click: add or reverse this column without changing the others \xB7 Numbers show sort priority \xB7 Drag to reorder";let S=s.createElementNS(xe,"svg");S.classList.add("sort-indicator"),S.setAttribute("viewBox","0 0 16 16"),S.setAttribute("aria-hidden","true");let R=s.createElementNS(xe,"path");R.setAttribute("d","M4 10L8 6L12 10"),S.append(R),w.append(S),this.parameters.columnFilters&&!k.check&&w.append(this.#o.button(k));let F=s.createElement("span");F.className="column-resize",F.tabIndex=0,F.setAttribute("role","separator"),F.setAttribute("aria-orientation","vertical"),F.setAttribute("aria-valuemin","40"),F.setAttribute("aria-label",`Resize ${k.name}`),F.title="Drag to resize \xB7 Arrow keys adjust width",w.append(F)}return w};if(this.#w){let f=s.createElement("th");f.textContent="#",f.scope="col",f.className="row-heading",f.rowSpan=this.#x,f.setAttribute("role","columnheader"),f.setAttribute("aria-colindex","1"),f.setAttribute("aria-rowspan",String(this.#x)),f.setAttribute("part","row-header");let h=s.createElement("span");h.className="row-number-measure",h.setAttribute("aria-hidden","true");let p=s.createElement("span");p.className="column-resize",p.tabIndex=0,p.setAttribute("role","separator"),p.setAttribute("aria-orientation","vertical"),p.setAttribute("aria-label","Resize row numbers"),p.title="Drag to resize \xB7 Arrow keys adjust width",f.append(h,p),o.append(f)}let c=0;for(let f of e.groups)if(a&&f.name!==null){let h=l(f.name,f.columns.length,1,"colgroup",c,"center");h.style.background=f.background??"",h.style.color=f.color??"",o.append(h);for(let p of f.columns)u.append(l(p.name,1,1,"col",c++,p.align))}else for(let h of f.columns){if(a){let p=s.createElement("td");p.className="group-spacer",p.setAttribute("aria-hidden","true"),o.append(p)}(a?u:o).append(l(h.name,1,1,"col",c++,h.align))}this.#n.replaceChildren(o,...a?[u]:[]),n&&this.#n.querySelector(`th[data-field="${n}"]${i?" .column-resize":""}`)?.focus({preventScroll:!0});let d=e.columns.map(f=>f.width??"var(--gramlot-grid-column-width, 10rem)");this.#w&&d.unshift("max(var(--grid-row-header-min-width, 0px), var(--grid-row-header-width, var(--gramlot-grid-row-header-width, 44px)))"),this.control.style.setProperty("--grid-columns-width",`calc(${d.join(" + ")})`);for(let f of[this.#y,this.#b]){for(let h of f.querySelectorAll(":scope > colgroup"))h.remove();if(f.prepend(...e.groups.map(h=>{let p=s.createElement("colgroup");for(let m of h.columns){let g=s.createElement("col");g.style.width=m.width??"var(--gramlot-grid-column-width, 10rem)",p.append(g)}return p})),this.#w){let h=s.createElement("colgroup"),p=s.createElement("col");p.style.width="max(var(--grid-row-header-min-width, 0px), var(--grid-row-header-width, var(--gramlot-grid-row-header-width, 44px)))",h.append(p),f.prepend(h)}}}#ue(e,r,n){this.#D.cancel();let i=new Set,s=null;this.#p.querySelector(".empty")?.parentElement.remove();for(let{node:a,cells:o}of e){let u=this.#f.get(a);u||(u=this.ownerDocument.createElement("tr"),u.setAttribute("part","row"),u.setAttribute("role","row"),u.dataset.row=a.label,this.#f.set(a,u)),u.classList.toggle("alternate",(n+i.size)%2===1),u.draggable=this.parameters.selfDragRows;let l=u.querySelector("th[scope=row]");if(this.#w){if(!l){l=this.ownerDocument.createElement("th"),l.scope="row",l.className="row-heading",l.setAttribute("role","rowheader"),l.setAttribute("part","row-header"),l.setAttribute("aria-colindex","1");let p=this.ownerDocument.createElement("span");p.className="row-number",l.append(p),u.prepend(l)}l.querySelector(".row-number").textContent=String(n+i.size+1);let h=l.querySelector(".row-height-handle");this.parameters.rowResize?(h||(h=this.ownerDocument.createElement("span"),h.className="row-height-handle",h.tabIndex=0,h.setAttribute("role","separator"),h.setAttribute("aria-orientation","horizontal"),h.title="Drag to resize row \xB7 Double-click or Home resets \xB7 Arrow keys adjust height",l.append(h)),h.setAttribute("aria-label",`Resize row ${n+i.size+1}`)):h?.remove()}else l?.remove();let c=Number(this.#w),d=new Map([...u.querySelectorAll("td[data-field]")].map(h=>[h.dataset.field,h]));for(let[h,p]of r.entries()){let m=d.get(p.field);if(!m){m=this.ownerDocument.createElement("td"),m.setAttribute("part","cell"),m.dataset.field=p.field,m.setAttribute("role","cell");let w=this.ownerDocument.createElement("div");w.className="cell-content",w.setAttribute("part","cell-content"),m.append(w)}p.edit?m.tabIndex=0:m.removeAttribute("tabindex");let g=m.firstElementChild,_=p.max_height!=null;_?m.style.setProperty("--grid-cell-max-height",p.max_height):m.style.removeProperty("--grid-cell-max-height"),g.classList.toggle("cell-scroll",_),_?g.tabIndex=0:g.removeAttribute("tabindex"),m.style.textAlign=p.align,m.style.whiteSpace=p.white_space??"",m.style.overflowWrap=p.white_space==="pre-wrap"||p.white_space==="normal"?"anywhere":"",m.setAttribute("aria-colindex",String(h+1+c)),m.classList.toggle("numeric",["L","R","N"].includes(p.dtype)),u.cells[h+c]!==m&&u.insertBefore(m,u.cells[h+c]??null),d.delete(p.field)}for(let h of d.values())h.remove();u.setAttribute("aria-rowindex",String(this.#x+n+i.size+1)),this.#te(u,o,a),this.#l.decorate(u,a);let f=s?s.nextSibling:this.#p.firstChild;f!==u&&this.#p.insertBefore(u,f),this.#D.project(u,a),s=u,i.add(a)}for(let[a,o]of this.#f)i.has(a)||(o.remove(),this.#f.delete(a));if(!e.length&&this.#c.count===0&&!this.parameters.loading){let a=this.ownerDocument.createElement("tr"),o=this.ownerDocument.createElement("td");a.setAttribute("role","row"),a.setAttribute("aria-rowindex",String(this.#x+1)),o.setAttribute("role","cell"),o.setAttribute("aria-colspan",String(r.length+Number(this.#w))),o.className="empty",o.colSpan=r.length+Number(this.#w),o.textContent="No rows",a.append(o),this.#p.append(a)}}#te(e,r,n){let i=Number(this.#w);r.forEach((s,a)=>{let o=e.cells[a+i].firstElementChild,u=this.#t.columns[a];if(o.parentElement.classList.toggle("check-cell",!!u.check),u.check){this.#s.project(o,n,u);return}if(u.edit?.tag==="colorpicker"){let c=o.querySelector(".cell-color-swatch");c||(c=this.ownerDocument.createElement("span"),c.className="cell-color-swatch",c.setAttribute("role","img"),o.replaceChildren(c)),c.hidden=s==="",c.style.backgroundColor=s,c.title=s,c.setAttribute("aria-label",s)}else(o.firstElementChild||o.textContent!==s)&&(o.textContent=s)})}}}),fs=class extends _e.ComponentCollection{toDocument(){let e=super.toDocument(),r=e.elements.grid.attributes.parameters;for(let n of["storepath","rowMode"]){let i=r.find(s=>s.name===n);i.has_default=!1,delete i.default,n==="rowMode"&&(i.annotation={kind:"annotated",base:{kind:"dtype",dtype:"T"},metadata:[{kind:"regex",pattern:"^(values|attributes)$",flags:0}]})}return Object.assign(e.elements,structuredClone(ol.elements)),e}},X_=new fs({name:"grid",components:[ih,al],dependencies:[nh]});export{ih as Grid,X_ as default};
|