@banou/stub 0.0.62 → 0.0.63
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/README.md +1 -1
- package/build/_routes.json +1 -1
- package/build/assets/lib-ar-CF5bm-FC.js +1 -0
- package/build/assets/lib-ar-CWVutin3-DasjSN4g.js +1 -0
- package/build/assets/lib-base-text-D8O_fA66.js +9 -0
- package/build/assets/lib-build-B6JTcPFQ.js +1 -0
- package/build/assets/lib-chapters-EBYXcEml-0fd33E6j.js +3 -0
- package/build/assets/lib-cs-CmwRGxyE-6NRXZVON.js +1 -0
- package/build/assets/lib-cs-DIgnhGAi.js +1 -0
- package/build/assets/lib-de-BmwEFQjW.js +1 -0
- package/build/assets/lib-de-DLdKEf3t-BrnH-_PW.js +1 -0
- package/build/assets/lib-el-Ckj-z6DX-CGAcSJAq.js +1 -0
- package/build/assets/lib-el-Hf_OruC-.js +1 -0
- package/build/assets/lib-embed-B1q4WpLp.js +402 -0
- package/build/assets/lib-es-419-CTZKlAZT.js +1 -0
- package/build/assets/lib-es-419-zORhhU8D-CeeUCFRa.js +1 -0
- package/build/assets/lib-fr-BtPmNkri-Hie1msTo.js +1 -0
- package/build/assets/lib-fr-u5auJiyk.js +1 -0
- package/build/assets/lib-he-Bu79qEth-CsdNKnCH.js +1 -0
- package/build/assets/lib-he-IAw2NgT-.js +1 -0
- package/build/assets/lib-hi-BsH3tSHa-DdJFREf5.js +1 -0
- package/build/assets/lib-hi-BtXGatH7.js +1 -0
- package/build/assets/lib-hu-BkYBW-YP-BYIrZak1.js +1 -0
- package/build/assets/lib-hu-DEMIF-xB.js +1 -0
- package/build/assets/lib-id-D4C1S8JT.js +1 -0
- package/build/assets/lib-id-nUaBCV4o-D-Ujb-Hr.js +1 -0
- package/build/assets/lib-intl-_4f6zNc2.js +25 -0
- package/build/assets/lib-intl-k10B0i3O.js +1 -0
- package/build/assets/lib-it-CqPSHyFA-D79hiYXL.js +1 -0
- package/build/assets/lib-it-DmP6ZNxx.js +1 -0
- package/build/assets/lib-ja-DTjvriHw-DmCA-L-o.js +1 -0
- package/build/assets/lib-ja-MKNoDkOd.js +1 -0
- package/build/assets/lib-jassub-worker-C4wQFMLH.js +1089 -0
- package/build/assets/{jassub-worker-CkfUMbe_.wasm → lib-jassub-worker-ei4KTFIf.wasm} +0 -0
- package/build/assets/lib-jassub-worker-modern-DXyL4SjI.js +1094 -0
- package/build/assets/{lib-jassub-worker-modern-Bwy5Vua-.wasm → lib-jassub-worker-modern-fB_B5_2M.wasm} +0 -0
- package/build/assets/lib-ko-DEFYVF25.js +1 -0
- package/build/assets/lib-ko-dV8T7XOJ-D8qpVvbw.js +1 -0
- package/build/assets/lib-language-CNKEEyke.js +1 -0
- package/build/assets/lib-left-to-right-DWyD01IQ.js +1333 -0
- package/build/assets/lib-ms-DoqpQR1x.js +1 -0
- package/build/assets/lib-ms-VZQ7BI0z-Cckr4FFS.js +1 -0
- package/build/assets/lib-nl-HT_Xob2h.js +1 -0
- package/build/assets/lib-nl-Q6iDxbDz-DUxpni5S.js +1 -0
- package/build/assets/lib-pl-BN7bK74l-Dnn2r2Ko.js +1 -0
- package/build/assets/lib-pl-CMnpfI_I.js +1 -0
- package/build/assets/lib-pt-BR-CPFILeFW-CEzqpq0l.js +1 -0
- package/build/assets/lib-pt-BR-Dve6onJD.js +1 -0
- package/build/assets/lib-remote-CR3jTHJy.js +1 -0
- package/build/assets/lib-remote-jKc_HS0x.js +1 -0
- package/build/assets/lib-ro-Bwcm-i3k-BhF7xVq7.js +1 -0
- package/build/assets/lib-ro-DfJuZtVM.js +1 -0
- package/build/assets/lib-ru-Coz3ex4O.js +1 -0
- package/build/assets/lib-ru-D1FMz751-CSNPRieo.js +1 -0
- package/build/assets/lib-sv-B16RZrDC.js +1 -0
- package/build/assets/lib-sv-ci9K0Lkk-CqQQUp8e.js +1 -0
- package/build/assets/lib-th-BBxuZfe3.js +1 -0
- package/build/assets/lib-th-DR-UBONQ-M32Q8z0I.js +1 -0
- package/build/assets/lib-theme-player-x08-Mw61.js +1 -0
- package/build/assets/lib-tr-BqhdfT22-1QDWyzkL.js +1 -0
- package/build/assets/lib-tr-DU68sg-8.js +1 -0
- package/build/assets/lib-track-languages-D2Vjv2nS.js +72 -0
- package/build/assets/lib-uk-8pkZqdni-oYiPCZea.js +1 -0
- package/build/assets/lib-uk-iZ8aIcgg.js +1 -0
- package/build/assets/lib-vi-3mKZ9G_M-56GIblP3.js +1 -0
- package/build/assets/lib-vi-D9ouXmcr.js +1 -0
- package/build/assets/lib-worker-DlrvRXfj.js +1 -0
- package/build/assets/lib-worker-anime-index-D8xS0_6K.js +1 -0
- package/build/assets/lib-worker-anime-seasons-Dl2Ko8sm.js +1 -0
- package/build/assets/lib-worker-dbd5SmAo.js +1 -0
- package/build/assets/lib-worker-index-DAefvhWu.js +2899 -0
- package/build/assets/lib-worker-worker-CLZeXL0G.js +155 -0
- package/build/assets/lib-zh-Hans-CDgigWKY-CT8Xi5lc.js +1 -0
- package/build/assets/lib-zh-Hans-CGp8tTiT.js +1 -0
- package/build/assets/lib-zh-Hant-3WSNI0ne-DNbJLxsD.js +1 -0
- package/build/assets/lib-zh-Hant-DyOXZA47.js +1 -0
- package/build/embed.html +12 -10
- package/build/index.html +9 -8
- package/build/index.js +4512 -31665
- package/fkn.json +1 -1
- package/package.json +15 -5
- package/build/assets/anime-index-CfrFapfs.js +0 -1
- package/build/assets/anime-seasons-fOmVeWXJ.js +0 -1
- package/build/assets/build-CHRBRLpA.js +0 -1
- package/build/assets/country-DssWUNbC.js +0 -72
- package/build/assets/dist-B_MSi_-2.js +0 -1328
- package/build/assets/dist-sBTuRPnX.js +0 -1
- package/build/assets/embed-3a7RYKgR.css +0 -1
- package/build/assets/embed-CPr65eEs.js +0 -392
- package/build/assets/embed-title-BKQDbQFL.js +0 -1
- package/build/assets/fonts-pE_hQFbP.js +0 -1
- package/build/assets/frizbee_wasm_bg-FO8dlm9E.wasm +0 -0
- package/build/assets/index-B0QDga7q.js +0 -2640
- package/build/assets/jassub-worker-CoxWGl20.js +0 -1
- package/build/assets/jassub-worker-modern-Bwy5Vua-.wasm +0 -0
- package/build/assets/lib-build-Bg46lQMG.js +0 -1816
- package/build/assets/lib-dist-_sG6LAEa.js +0 -110
- package/build/assets/lib-jassub-worker-CkfUMbe_.wasm +0 -0
- package/build/assets/lib-player-volume-hbsJ_QQQ.js +0 -2734
- package/build/assets/lib-remote-CD-E7fNZ.js +0 -1
- package/build/assets/lib-remote-uPPe2_V1.js +0 -414
- package/build/assets/lib-theme-player-B_XpnzYA.js +0 -9004
- package/build/assets/lib-worker-D4qwcDLK.js +0 -1
- package/build/assets/lib-worker-DXFi0UeT.js +0 -12398
- package/build/assets/lib-worker-anime-index-CfrFapfs.js +0 -1
- package/build/assets/lib-worker-anime-seasons-fOmVeWXJ.js +0 -1
- package/build/assets/lib-worker-index-hY5YEjMb.js +0 -2640
- package/build/assets/lib-worker-jassub-worker-DmV75w1c.js +0 -1
- package/build/assets/lib-worker-worker-DFac1w45.js +0 -146
- package/build/assets/main-C24yl1pa.js +0 -5846
- package/build/assets/main-CSyC6ryz.css +0 -1
- package/build/assets/player-volume-DTOJyhLh.js +0 -1
- package/build/assets/remote-D8UjjUy7.js +0 -1
- package/build/assets/remote-Dk-srDMl.js +0 -1
- package/build/assets/sacha_bg-CNH7LeJ_.wasm +0 -0
- package/build/assets/theme-player-BsVznGeU.js +0 -1
- package/build/assets/worker-Bqm03xpO.js +0 -1
- package/build/assets/worker-D_yNUJG9.js +0 -146
- package/build/assets/worker-SLqI-fGd.js +0 -1
- /package/build/assets/{default-jVcJgvWm.woff2 → lib-default-jVcJgvWm.woff2} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#555;--xy-background-pattern-lines-color-default:#333;--xy-background-pattern-cross-color-default:#333;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;-moz-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;-moz-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e,i as t,r as n}from"./dist-sBTuRPnX.js";function r(e){e&&e.parentNode&&e.remove()}function i(e,t,n){var r,i,o,s={};for(o in t)o==`key`?r=t[o]:o==`ref`&&typeof e!=`function`?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?fe.call(arguments,2):n),a(e,s,r,i,null)}function a(e,t,n,r,i){var a={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:i??++re,__i:-1,__u:0};return i==null&&A.vnode!=null&&A.vnode(a),a}function o(){return{current:null}}function s(e){return e.children}function c(e,t){this.props=e,this.context=t,this.__g=0}function l(e,t){if(t==null)return e.__?l(e.__,e.__i+1):null;for(var n;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null)return n.__e;return typeof e.type==`function`?l(e):null}function u(e){var t,n;if((e=e.__)!=null&&e.__c!=null){for(e.__e=null,t=0;t<e.__k.length;t++)if((n=e.__k[t])!=null&&n.__e!=null){e.__e=n.__e;break}return u(e)}}function d(e){(8&e.__g||!(e.__g|=8)||!j.push(e)||ae++)&&ie==A.debounceRendering||((ie=A.debounceRendering)||queueMicrotask)(f)}function f(){for(var e,t,n,r,i,a,o,s,c=1;j.length;)j.length>c&&j.sort(M),e=j.shift(),c=j.length,8&e.__g&&(n=void 0,i=(r=(t=e).__v).__e,a=[],o=[],(s=t.__P)&&((n=F({},r)).__v=r.__v+1,A.vnode&&A.vnode(n),x(s,n,r,t.__n,s.namespaceURI,32&r.__u?[i]:null,a,i??l(r),!!(32&r.__u),o,s.ownerDocument),n.__v=r.__v,n.__.__k[n.__i]=n,C(a,n,o),n.__e!=i&&u(n)));ae=0}function p(e,t,n,r,i,a,o,s,c,l,u,d){var f,p,g,_,v,y,b,S=r&&r.__k||ue,C=t.length;for(c=m(n,t,S,c,C),f=0;f<C;f++)(g=n.__k[f])!=null&&(p=g.__i==-1?le:S[g.__i]||le,g.__i=f,y=x(e,g,p,i,a,o,s,c,l,u,d),_=g.__e,g.ref&&p.ref!=g.ref&&(p.ref&&E(p.ref,null,g),u.push(g.ref,g.__c||_,g)),v==null&&_!=null&&(v=_),(b=!!(4&g.__u))||p.__k===g.__k?c=h(g,c,e,b):typeof g.type==`function`&&y!==void 0?c=y:_&&(c=_.nextSibling),g.__u&=-7);return n.__e=v,c}function m(e,t,n,r,i){var o,c,u,d,f,p=n.length,m=p,h=0;for(e.__k=Array(i),o=0;o<i;o++)(c=t[o])!=null&&typeof c!=`boolean`&&typeof c!=`function`?(d=o+h,(c=e.__k[o]=typeof c==`string`||typeof c==`number`||typeof c==`bigint`||c.constructor==String?a(null,c,null,null,null):de(c)?a(s,{children:c},null,null,null):c.constructor==null&&c.__b>0?a(c.type,c.props,c.key,c.ref?c.ref:null,c.__v):c).__=e,c.__b=e.__b+1,u=null,(f=c.__i=_(c,n,d,m))!=-1&&(m--,(u=n[f])&&(u.__u|=2)),u==null||u.__v==null?(f==-1&&(i>p?h--:i<p&&h++),typeof c.type!=`function`&&(c.__u|=4)):f!=d&&(f==d-1?h--:f==d+1?h++:(f>d?h--:h++,c.__u|=4))):e.__k[o]=null;if(m)for(o=0;o<p;o++)(u=n[o])!=null&&!(2&u.__u)&&(u.__e==r&&(r=l(u)),ee(u,u));return r}function h(e,t,n,r){var i,a;if(typeof e.type==`function`){for(i=e.__k,a=0;i&&a<i.length;a++)i[a]&&(i[a].__=e,t=h(i[a],t,n,r));return t}e.__e!=t&&(r&&(t&&e.type&&!t.parentNode&&(t=l(e)),n.insertBefore(e.__e,t||null)),t=e.__e);do t&&=t.nextSibling;while(t!=null&&t.nodeType==8);return t}function g(e,t){return t||=[],e==null||typeof e==`boolean`||(de(e)?e.some(function(e){g(e,t)}):t.push(e)),t}function _(e,t,n,r){var i,a,o,s=e.key,c=e.type,l=t[n],u=l!=null&&!(2&l.__u);if(l===null&&e.key==null||u&&s==l.key&&c==l.type)return n;if(r>+!!u){for(i=n-1,a=n+1;i>=0||a<t.length;)if((l=t[o=i>=0?i--:a++])!=null&&!(2&l.__u)&&s==l.key&&c==l.type)return o}return-1}function v(e,t,n){t[0]==`-`?e.setProperty(t,n??``):e[t]=n??``}function y(e,t,n,r,i){var a;n:if(t==`style`){if(typeof n==`string`)e.style.cssText=n;else{if(typeof r==`string`&&(e.style.cssText=r=``),r)for(t in r)n&&t in n||v(e.style,t,``);if(n)for(t in n)r&&n[t]==r[t]||v(e.style,t,n[t])}}else if(t[0]==`o`&&t[1]==`n`)a=t!=(t=t.replace(N,`$1`)),(t=t.slice(2))[0].toLowerCase()!=t[0]&&(t=t.toLowerCase()),e.__l||={},e.__l[t+a]=n,n?r?n.l=r.l:(n.l=oe,e.addEventListener(t,a?se:P,a)):e.removeEventListener(t,a?se:P,a);else{if(i==`http://www.w3.org/2000/svg`)t=t.replace(/xlink(H|:h)/,`h`).replace(/sName$/,`s`);else if(t!=`width`&&t!=`height`&&t!=`href`&&t!=`list`&&t!=`form`&&t!=`tabIndex`&&t!=`download`&&t!=`rowSpan`&&t!=`colSpan`&&t!=`role`&&t!=`popover`&&t in e)try{e[t]=n??``;break n}catch{}typeof n==`function`||(n==null||!1===n&&t[4]!=`-`?e.removeAttribute(t):e.setAttribute(t,t==`popover`&&n==1?``:n))}}function b(e){return function(t){if(this.__l){var n=this.__l[t.type+e];if(t.u==null)t.u=oe++;else if(t.u<n.l)return;return n(A.event?A.event(t):t)}}}function x(e,t,n,i,a,o,l,u,d,f,m){var h,g,_,v,y,b,x,C,E,ee,D,O,ne,k,re,j,ie,ae,M,N,oe,P=t.type;if(t.constructor!=null)return null;128&n.__u&&(d=!!(32&n.__u),n.__c.__z&&(u=t.__e=n.__e=(o=n.__c.__z)[0],n.__c.__z=null)),(h=A.__b)&&h(t);n:if(typeof P==`function`)try{if(C=t.props,E=`prototype`in P&&P.prototype.render,ee=(h=P.contextType)&&i[h.__c],D=h?ee?ee.props.value:h.__:i,n.__c?2&(g=t.__c=n.__c).__g&&(g.__g|=1,x=!0):(E?t.__c=g=new P(C,D):(t.__c=g=new c(C,D),g.constructor=P,g.render=te),ee&&ee.sub(g),g.props=C,g.state||(g.state={}),g.context=D,g.__n=i,_=!0,g.__g|=8,g.__h=[],g._sb=[]),E&&g.__s==null&&(g.__s=g.state),E&&P.getDerivedStateFromProps!=null&&(g.__s==g.state&&(g.__s=F({},g.__s)),F(g.__s,P.getDerivedStateFromProps(C,g.__s))),v=g.props,y=g.state,g.__v=t,_)E&&P.getDerivedStateFromProps==null&&g.componentWillMount!=null&&g.componentWillMount(),E&&g.componentDidMount!=null&&g.__h.push(g.componentDidMount);else{if(E&&P.getDerivedStateFromProps==null&&C!==v&&g.componentWillReceiveProps!=null&&g.componentWillReceiveProps(C,D),!(4&g.__g)&&g.shouldComponentUpdate!=null&&!1===g.shouldComponentUpdate(C,g.__s,D)||t.__v==n.__v){for(t.__v!=n.__v&&(g.props=C,g.state=g.__s,g.__g&=-9),t.__e=n.__e,t.__k=n.__k,t.__k.some(function(e){e&&(e.__=t)}),O=0;O<g._sb.length;O++)g.__h.push(g._sb[O]);g._sb=[],g.__h.length&&l.push(g);break n}g.componentWillUpdate!=null&&g.componentWillUpdate(C,g.__s,D),E&&g.componentDidUpdate!=null&&g.__h.push(function(){g.componentDidUpdate(v,y,b)})}if(g.context=D,g.props=C,g.__P=e,g.__g&=-5,ne=A.__r,k=0,E){for(g.state=g.__s,g.__g&=-9,ne&&ne(t),h=g.render(g.props,g.state,g.context),re=0;re<g._sb.length;re++)g.__h.push(g._sb[re]);g._sb=[]}else do g.__g&=-9,ne&&ne(t),h=g.render(g.props,g.state,g.context),g.state=g.__s;while(8&g.__g&&++k<25);g.state=g.__s,g.getChildContext!=null&&(i=F({},i,g.getChildContext())),E&&!_&&g.getSnapshotBeforeUpdate!=null&&(b=g.getSnapshotBeforeUpdate(v,y)),j=h,h!=null&&h.type===s&&h.key==null&&(j=w(h.props.children)),u=p(e,de(j)?j:[j],t,n,i,a,o,l,u,d,f,m),t.__u&=-161,g.__h.length&&l.push(g),x&&(g.__g&=-4)}catch(e){if(t.__v=null,d||o!=null){if(e.then){for(ie=0,ae=!1,t.__u|=d?160:128,t.__c.__z=[],M=0;M<o.length;M++)(N=o[M])==null||ae||(N.nodeType==8&&N.data==`$s`?(ie>0&&t.__c.__z.push(N),ie++,o[M]=null):N.nodeType==8&&N.data==`/$s`?(--ie>0&&t.__c.__z.push(N),ae=ie===0,u=o[M],o[M]=null):ie>0&&(t.__c.__z.push(N),o[M]=null));if(!ae){for(;u&&u.nodeType==8&&u.nextSibling;)u=u.nextSibling;o[o.indexOf(u)]=null,t.__c.__z=[u]}t.__e=u}else{for(oe=o.length;oe--;)r(o[oe]);S(t)}}else t.__e=n.__e,t.__k=n.__k,e.then||S(t);A.__e(e,t,n)}else u=t.__e=T(n.__e,t,n,i,a,o,l,d,f,m);return(h=A.diffed)&&h(t),128&t.__u?void 0:u}function S(e){e&&e.__c&&(e.__c.__g|=4),e&&e.__k&&e.__k.forEach(S)}function C(e,t,n){for(var r=0;r<n.length;r++)E(n[r],n[++r],n[++r]);A.__c&&A.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(e){A.__e(e,t.__v)}})}function w(e){return typeof e!=`object`||!e||e.__b&&e.__b>0?e:de(e)?e.map(w):F({},e)}function T(e,t,n,i,a,o,s,c,u,d){var f,m,h,g,_,v,b,x,S=n.props,C=t.props,w=t.type;if(w==`svg`?a=`http://www.w3.org/2000/svg`:w==`math`?a=`http://www.w3.org/1998/Math/MathML`:a||=`http://www.w3.org/1999/xhtml`,o!=null){for(f=0;f<o.length;f++)if((_=o[f])&&`setAttribute`in _==!!w&&(w?_.localName==w:_.nodeType==3)){e=_,o[f]=null;break}}if(e==null){if(w==null)return d.createTextNode(C);e=d.createElementNS(a,w,C.is&&C),c&&=(A.__m&&A.__m(t,o),!1),o=null}if(w==null)S===C||c&&e.data==C||(e.data=C);else{if(o&&=fe.call(e.childNodes),S=n.props||le,!c&&o!=null)for(S={},f=0;f<e.attributes.length;f++)S[(_=e.attributes[f]).name]=_.value;for(f in S)if(_=S[f],f!=`children`){if(f==`dangerouslySetInnerHTML`)h=_;else if(!(f in C)){if(f==`value`&&`defaultValue`in C||f==`checked`&&`defaultChecked`in C)continue;y(e,f,null,_,a)}}for(f in x=1&n.__u,C)_=C[f],f==`children`?g=_:f==`dangerouslySetInnerHTML`?m=_:f==`value`?v=_:f==`checked`?b=_:c&&typeof _!=`function`||S[f]===_&&!x||y(e,f,_,S[f],a);if(m)c||h&&(m.__html==h.__html||m.__html==e.innerHTML)||(e.innerHTML=m.__html),t.__k=[];else if(h&&(e.innerHTML=``),p(w==`template`?e.content:e,de(g)?g:[g],t,n,i,w==`foreignObject`?`http://www.w3.org/1999/xhtml`:a,o,s,o?o[0]:n.__k&&l(n,0),c,u,d),o!=null)for(f=o.length;f--;)r(o[f]);c||(f=`value`,w==`progress`&&v==null?e.removeAttribute(`value`):v==null||v===e[f]&&(w!==`progress`||v)||y(e,f,v,S[f],a),f=`checked`,b!=null&&b!=e[f]&&y(e,f,b,S[f],a))}return e}function E(e,t,n){try{if(typeof e==`function`){var r=typeof e.__u==`function`;r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(e){A.__e(e,n)}}function ee(e,t,n){var i,a;if(A.unmount&&A.unmount(e),(i=e.ref)&&(i.current&&i.current!=e.__e||E(i,null,t)),(i=e.__c)!=null){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(e){A.__e(e,t)}i.__P=null}if(i=e.__k)for(a=0;a<i.length;a++)i[a]&&ee(i[a],t,n||typeof e.type!=`function`);n||r(e.__e),e.__e&&e.__e.__l&&(e.__e.__l=null),e.__e=e.__c=e.__=null}function te(e,t,n){return this.constructor(e,n)}function D(e,t){var n,r,a,o;t==document&&(t=document.documentElement),A.__&&A.__(e,t),r=(n=!!(e&&32&e.__u))?null:t.__k,e=t.__k=i(s,null,[e]),a=[],o=[],x(t,e,r||le,le,t.namespaceURI,r?null:t.firstChild?fe.call(t.childNodes):null,a,r?r.__e:t.firstChild,n,o,t.ownerDocument),C(a,e,o)}function O(e,t){e.__u|=32,D(e,t)}function ne(e,t,n){var r,i,o,s=F({},e.props);for(o in t)o==`key`?r=t[o]:o==`ref`&&typeof e.type!=`function`?i=t[o]:s[o]=t[o];return arguments.length>2&&(s.children=arguments.length>3?fe.call(arguments,2):n),a(e.type,s,r||e.key,i||e.ref,null)}function k(e){function t(e){var n,r;return this.getChildContext||(n=new Set,(r={})[t.__c]=this,this.getChildContext=function(){return r},this.componentWillUnmount=function(){n=null},this.shouldComponentUpdate=function(e){this.props.value!=e.value&&n.forEach(function(e){e.__g|=4,d(e)})},this.sub=function(e){n.add(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n&&n.delete(e),t&&t.call(e)}}),e.children}return t.__c=`__cC`+ce++,t.__=e,t.Provider=t.__l=(t.Consumer=function(e,t){return e.children(t)}).contextType=t,t}var A,re,j,ie,ae,M,N,oe,P,se,ce,le,ue,de,fe,F,pe=t((()=>{le={},ue=[],de=Array.isArray,fe=ue.slice,F=Object.assign,A={__e:function(e,t,n,r){for(var i,a,o;t=t.__;)if((i=t.__c)&&!(1&i.__g)){i.__g|=4;try{if((a=i.constructor)&&a.getDerivedStateFromError!=null&&(i.setState(a.getDerivedStateFromError(e)),o=8&i.__g),i.componentDidCatch!=null&&(i.componentDidCatch(e,r||{}),o=8&i.__g),o)return void(i.__g|=2)}catch(t){e=t}}throw ae=0,e}},re=0,c.prototype.setState=function(e,t){var n=this.__s!=null&&this.__s!=this.state?this.__s:this.__s=F({},this.state);typeof e==`function`&&(e=e(F({},n),this.props)),e&&F(n,e),e!=null&&this.__v&&(t&&this._sb.push(t),d(this))},c.prototype.forceUpdate=function(e){this.__v&&(this.__g|=4,e&&this.__h.push(e),d(this))},c.prototype.render=s,j=[],ae=0,M=function(e,t){return e.__v.__b-t.__v.__b},N=/(PointerCapture)$|Capture$/i,oe=0,P=b(!1),se=b(!0),ce=0}));function me(e,t){L.__h&&L.__h(I,e,Le||t),Le=0;var n=I.__H||(I.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({}),n.__[e]}function he(e){return Le=1,ge(Me,e)}function ge(e,t,n){var r=me(Ne++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):Me(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);Ie(t,n)||(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=I,!I.__f)){var i=function(e,t,n){if(!r.__c.__H)return!0;var i=r.__c.__H.__.filter(function(e){return!!e.__c});if(i.every(function(e){return!e.__N}))return!a||a.call(this,e,t,n);var o=r.__c.props!==e;return i.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,Ie(t,e.__[0])||(o=!0)}}),a&&a.call(this,e,t,n)||o};I.__f=!0;var a=I.shouldComponentUpdate,o=I.componentWillUpdate;I.componentWillUpdate=function(e,t,n){if(4&this.__g){var r=a;a=void 0,i(e,t,n),a=r}o&&o.call(this,e,t,n)},I.shouldComponentUpdate=i}return r.__N||r.__}function _e(e,t){var n=me(Ne++,3);!L.__s&&je(n.__H,t)&&(n.__=e,n.u=t,I.__H.__h.push(n))}function ve(e,t){var n=me(Ne++,4);!L.__s&&je(n.__H,t)&&(n.__=e,n.u=t,I.__h.push(n))}function ye(e){return Le=5,xe(function(){return{current:e}},[])}function be(e,t,n){Le=6,ve(function(){if(typeof e==`function`){var n=e(t());return function(){e(null),n&&typeof n==`function`&&n()}}if(e)return e.current=t(),function(){return e.current=null}},n==null?n:n.concat(e))}function xe(e,t){var n=me(Ne++,7);return je(n.__H,t)&&(n.__=e(),n.__H=t,n.__h=e),n.__}function Se(e,t){return Le=8,xe(function(){return e},t)}function Ce(e){var t=I.context[e.__c],n=me(Ne++,9);return n.c=e,t?(n.__??(n.__=!0,t.sub(I)),t.props.value):e.__}function we(e,t){L.useDebugValue&&L.useDebugValue(t?t(e):e)}function Te(e){var t=me(Ne++,10),n=he();return t.__=e,I.componentDidCatch||(I.componentDidCatch=function(e,r){t.__&&t.__(e,r),n[1](e)}),[n[0],function(){n[1](void 0)}]}function Ee(){var e=me(Ne++,11);if(!e.__){for(var t=I.__v;t!==null&&!t.__m&&t.__!==null;)t=t.__;var n=t.__m||(t.__m=[0,0]);e.__=`P`+n[0]+`-`+n[1]++}return e.__}function De(){for(var e;e=Re.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ke),e.__H.__h.forEach(Ae),e.__H.__h=[]}catch(t){e.__H.__h=[],L.__e(t,e.__v)}}function Oe(e){var t,n=function(){clearTimeout(r),Ge&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,35);Ge&&(t=requestAnimationFrame(n))}function ke(e){var t=I,n=e.__c;typeof n==`function`&&(e.__c=void 0,n()),I=t}function Ae(e){var t=I;e.__c=e.__(),I=t}function je(e,t){return!e||e.length!==t.length||t.some(function(t,n){return!Ie(t,e[n])})}function Me(e,t){return typeof t==`function`?t(e):t}var Ne,I,Pe,Fe,Ie,Le,Re,L,ze,Be,Ve,He,Ue,We,Ge,Ke=t((()=>{pe(),Ie=Object.is,Le=0,Re=[],L=A,ze=L.__b,Be=L.__r,Ve=L.diffed,He=L.__c,Ue=L.unmount,We=L.__,L.__b=function(e){I=null,ze&&ze(e)},L.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),We&&We(e,t)},L.__r=function(e){Be&&Be(e),Ne=0;var t=(I=e.__c).__H;t&&(Pe===I?(t.__h=[],I.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.u=e.__N=void 0})):(t.__h.forEach(ke),t.__h.forEach(Ae),t.__h=[],Ne=0)),Pe=I},L.diffed=function(e){Ve&&Ve(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(Re.push(t)!==1&&Fe===L.requestAnimationFrame||((Fe=L.requestAnimationFrame)||Oe)(De)),t.__H.__.forEach(function(e){e.u&&(e.__H=e.u),e.u=void 0})),Pe=I=null},L.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ke),e.__h=e.__h.filter(function(e){return!e.__||Ae(e)})}catch(n){t.some(function(e){e.__h&&=[]}),t=[],L.__e(n,e.__v)}}),He&&He(e,t)},L.unmount=function(e){Ue&&Ue(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ke(e)}catch(e){t=e}}),n.__H=void 0,t&&L.__e(t,n.__v))},Ge=typeof requestAnimationFrame==`function`})),qe=e({Children:()=>Ot,Component:()=>c,Fragment:()=>s,PureComponent:()=>et,StrictMode:()=>Gt,Suspense:()=>at,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:()=>Ht,cloneElement:()=>yt,createContext:()=>k,createElement:()=>i,createFactory:()=>ht,createPortal:()=>lt,createRef:()=>o,default:()=>qt,findDOMNode:()=>xt,flushSync:()=>Wt,forwardRef:()=>nt,hydrate:()=>dt,isElement:()=>Kt,isFragment:()=>_t,isMemo:()=>vt,isValidElement:()=>gt,lazy:()=>ot,memo:()=>tt,render:()=>ut,startTransition:()=>Xe,unmountComponentAtNode:()=>bt,unstable_batchedUpdates:()=>St,useCallback:()=>Se,useContext:()=>Ce,useDebugValue:()=>we,useDeferredValue:()=>Ze,useEffect:()=>_e,useErrorBoundary:()=>Te,useId:()=>Ee,useImperativeHandle:()=>be,useInsertionEffect:()=>Ct,useLayoutEffect:()=>ve,useMemo:()=>xe,useReducer:()=>ge,useRef:()=>ye,useState:()=>he,useSyncExternalStore:()=>Je,useTransition:()=>Qe,version:()=>Ut});function Je(e,t){var n=t(),r=he({t:{__:n,u:t}}),i=r[0].t,a=r[1];return ve(function(){i.__=n,i.u=t,Ye(i)&&a({t:i})},[e,n,t]),_e(function(){return Ye(i)&&a({t:i}),e(function(){Ye(i)&&a({t:i})})},[e]),n}function Ye(e){var t=e.u,n=e.__;try{var r=t();return!Object.is(n,r)}catch{return!0}}function Xe(e){e()}function Ze(e){return e}function Qe(){return[!1,Xe]}function $e(e,t){for(var n in e)if(n!==`__source`&&!(n in t))return!0;for(var r in t)if(r!==`__source`&&e[r]!==t[r])return!0;return!1}function et(e,t){this.props=e,this.context=t}function tt(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:$e(this.props,e)}function r(t){return this.shouldComponentUpdate=n,i(e,t)}return r.displayName=`Memo(`+(e.displayName||e.name)+`)`,r.prototype.isReactComponent=!0,r.type=e,r}function nt(e){function t(t){var n=wt({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=Et,t.render=e,t.prototype.isReactComponent=!0,t.displayName=`ForwardRef(`+(e.displayName||e.name)+`)`,t}function rt(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){typeof e.__c==`function`&&e.__c()}),e.__c.__H=null),(e=wt({},e)).__c!=null&&(e.__c.__P===n&&(e.__c.__P=t),e.__c.__g|=4,e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return rt(e,t,n)})),e}function it(e,t,n){return e&&n&&(typeof e.type==`string`&&(e.__u|=1),e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return it(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.appendChild(e.__e),e.__c.__g|=4,e.__c.__P=n)),e}function at(){this.__u=0,this.o=null,this.__b=null}function ot(e){var t,n,r;function a(a){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return i(n,a)}return a.displayName=`Lazy`,a}function st(e){return this.getChildContext=function(){return e.context},e.children}function ct(e){var t=this,n=e.i;if(t.componentWillUnmount=function(){D(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),!t.l){for(var r=t.__v;r!==null&&!r.__m&&r.__!==null;)r=r.__;t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],__k:{__m:r.__m},ownerDocument:n.ownerDocument,insertBefore:function(e,n){this.childNodes.push(e),t.i.insertBefore(e,n)}}}D(i(st,{context:t.context},e.__v),t.l)}function lt(e,t){var n=i(ct,{__v:e,i:t});return n.containerInfo=t,n}function ut(e,t,n){return t.__k??(t.textContent=``),D(e,t),typeof n==`function`&&n(),e?e.__c:null}function dt(e,t,n){return O(e,t),typeof n==`function`&&n(),e?e.__c:null}function ft(){}function pt(){return this.cancelBubble}function mt(){return this.defaultPrevented}function ht(e){return i.bind(null,e)}function gt(e){return!!e&&e.$$typeof===jt}function _t(e){return gt(e)&&e.type===s}function vt(e){return!!e&&!!e.displayName&&(typeof e.displayName==`string`||e.displayName instanceof String)&&e.displayName.startsWith(`Memo(`)}function yt(e){return gt(e)?ne.apply(null,arguments):e}function bt(e){return!!e.__k&&(D(null,e),!0)}function xt(e){return e&&(e.__v&&e.__v.__e||e.nodeType===1&&e)||null}function St(e,t){return e(t)}var Ct,wt,Tt,Et,Dt,Ot,kt,At,jt,Mt,Nt,Pt,Ft,It,Lt,Rt,zt,Bt,Vt,Ht,Ut,Wt,Gt,Kt,qt,Jt=t((()=>{pe(),Ke(),Ke(),Ct=ve,wt=Object.assign,Tt=/^(-|f[lo].*[^se]$|g.{5,}[^ps]$|z|o[pr]|(W.{5})?[lL]i.*(t|mp)$|an|(bo|s).{4}Im|sca|m.{6}[ds]|ta|c.*[st]$|wido|ini)/,(et.prototype=new c).isPureReactComponent=!0,et.prototype.shouldComponentUpdate=function(e,t){return $e(this.props,e)||$e(this.state,t)},Et=Symbol.for(`react.forward_ref`),Dt=function(e,t,n){return e==null?null:g(g(e).map(t.bind(n)))},Ot={map:Dt,forEach:Dt,count:function(e){return e?g(e).length:0},only:function(e){var t=g(e);if(t.length!==1)throw`Children.only`;return t[0]},toArray:g},kt=A.__e,A.__e=function(e,t,n,r){if(e.then){for(var i,a=t;a=a.__;)if((i=a.__c)&&i.__c)return t.__e??(t.__e=n.__e,t.__k=n.__k),i.__c(e,t)}kt(e,t,n,r)},At=A.unmount,A.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),At&&At(e)},(at.prototype=new c).__c=function(e,t){var n=t.__c,r=this;r.o??=[],r.o.push(n);var i=!1,a=function(){i||(i=!0,n.__R=null,o())};n.__R=a;var o=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=it(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.o.pop();)t.forceUpdate()}};r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(a,a)},at.prototype.componentWillUnmount=function(){this.o=[]},at.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement(`div`),r=this.__v.__k[0].__c;this.__v.__k[0]=rt(this.__b,n,r.__O=r.__P)}this.__b=null}return[i(s,null,t.__a?null:e.children),t.__a&&i(s,null,e.fallback)]},jt=Symbol.for(`react.element`),Mt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Nt=/[A-Z0-9]/g,Pt=typeof document<`u`,Ft=function(e){return/fil|che|rad/.test(e)},c.prototype.isReactComponent={},[`componentWillMount`,`componentWillReceiveProps`,`componentWillUpdate`].forEach(function(e){Object.defineProperty(c.prototype,e,{configurable:!0,get:function(){return this[`UNSAFE_`+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})}),It=A.event,A.event=function(e){return It&&(e=It(e)),e.persist=ft,e.isPropagationStopped=pt,e.isDefaultPrevented=mt,e.nativeEvent=e},Rt={enumerable:!1,configurable:!0,get:function(){return this.class}},zt=A.vnode,A.vnode=function(e){if(typeof e.type==`string`)(function(e){var t=e.props,n=e.type,r={},i=n.indexOf(`-`)===-1;for(var a in t){var o=t[a];if(!(a===`value`&&`defaultValue`in t&&o==null||Pt&&a===`children`&&n===`noscript`||a===`class`||a===`className`)){if(a===`style`&&typeof o==`object`)for(var s in o)typeof o[s]!=`number`||Tt.test(s)||(o[s]+=`px`);else if(a===`defaultValue`&&`value`in t&&t.value==null)a=`value`;else if(a===`download`&&!0===o)o=``;else if(a===`translate`&&o===`no`)o=!1;else if(a[0]===`o`&&a[1]===`n`){var c=a.toLowerCase();c===`ondoubleclick`?a=`ondblclick`:c!==`onchange`||n!==`input`&&n!==`textarea`||Ft(t.type)?c===`onfocus`?a=`onfocusin`:c===`onblur`&&(a=`onfocusout`):c=a=`oninput`,c===`oninput`&&r[a=c]&&(a=`oninputCapture`)}else i&&Mt.test(a)?a=a.replace(Nt,`-$&`).toLowerCase():o===null&&(o=void 0);r[a]=o}}n==`select`&&r.multiple&&Array.isArray(r.value)&&(r.value=g(t.children).forEach(function(e){e.props.selected=r.value.indexOf(e.props.value)!=-1})),n==`select`&&r.defaultValue!=null&&(r.value=g(t.children).forEach(function(e){e.props.selected=r.multiple?r.defaultValue.indexOf(e.props.value)!=-1:r.defaultValue==e.props.value})),t.class&&!t.className?(r.class=t.class,Object.defineProperty(r,"className",Rt)):(t.className&&!t.class||t.class&&t.className)&&(r.class=r.className=t.className),e.props=r})(e);else if(typeof e.type==`function`&&(`ref`in e.props&&`prototype`in e.type&&e.type.prototype.render&&(e.ref=e.props.ref,delete e.props.ref),e.type.defaultProps)){var t=wt({},e.props);for(var n in e.type.defaultProps)t[n]===void 0&&(t[n]=e.type.defaultProps[n]);e.props=t}e.$$typeof=jt,zt&&zt(e)},Bt=A.__r,A.__r=function(e){Bt&&Bt(e),Lt=e.__c},Vt=A.diffed,A.diffed=function(e){Vt&&Vt(e);var t=e.props,n=e.__e;n!=null&&e.type===`textarea`&&`value`in t&&t.value!==n.value&&(n.value=t.value==null?``:t.value),Lt=null},Ht={ReactCurrentDispatcher:{current:{readContext:function(e){return Lt.__n[e.__c].props.value},useCallback:Se,useContext:Ce,useDebugValue:we,useDeferredValue:Ze,useEffect:_e,useId:Ee,useImperativeHandle:be,useInsertionEffect:Ct,useLayoutEffect:ve,useMemo:xe,useReducer:ge,useRef:ye,useState:he,useSyncExternalStore:Je,useTransition:Qe}}},Ut=`18.3.1`,Wt=function(e,t){return e(t)},Gt=s,Kt=gt,qt={useState:he,useId:Ee,useReducer:ge,useEffect:_e,useLayoutEffect:ve,useInsertionEffect:Ct,useTransition:Qe,useDeferredValue:Ze,useSyncExternalStore:Je,startTransition:Xe,useRef:ye,useImperativeHandle:be,useMemo:xe,useCallback:Se,useContext:Ce,useDebugValue:we,version:`18.3.1`,Children:Ot,render:ut,hydrate:dt,unmountComponentAtNode:bt,createPortal:lt,createElement:i,createContext:k,createFactory:ht,cloneElement:yt,createRef:o,Fragment:s,isValidElement:gt,isElement:Kt,isFragment:_t,isMemo:vt,findDOMNode:xt,Component:c,PureComponent:et,memo:tt,forwardRef:nt,flushSync:Wt,unstable_batchedUpdates:St,StrictMode:Gt,Suspense:at,lazy:ot,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:Ht}}));Jt();function Yt(e){if(e.sheet)return e.sheet;for(var t=0;t<document.styleSheets.length;t++)if(document.styleSheets[t].ownerNode===e)return document.styleSheets[t]}function Xt(e){var t=document.createElement(`style`);return t.setAttribute(`data-emotion`,e.key),e.nonce!==void 0&&t.setAttribute(`nonce`,e.nonce),t.appendChild(document.createTextNode(``)),t.setAttribute(`data-s`,``),t}var Zt=function(){function e(e){var t=this;this._insertTag=function(e){var n=t.tags.length===0?t.insertionPoint?t.insertionPoint.nextSibling:t.prepend?t.container.firstChild:t.before:t.tags[t.tags.length-1].nextSibling;t.container.insertBefore(e,n),t.tags.push(e)},this.isSpeedy=e.speedy===void 0||e.speedy,this.tags=[],this.ctr=0,this.nonce=e.nonce,this.key=e.key,this.container=e.container,this.prepend=e.prepend,this.insertionPoint=e.insertionPoint,this.before=null}var t=e.prototype;return t.hydrate=function(e){e.forEach(this._insertTag)},t.insert=function(e){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(Xt(this));var t=this.tags[this.tags.length-1];if(this.isSpeedy){var n=Yt(t);try{n.insertRule(e,n.cssRules.length)}catch{}}else t.appendChild(document.createTextNode(e));this.ctr++},t.flush=function(){this.tags.forEach(function(e){return e.parentNode?.removeChild(e)}),this.tags=[],this.ctr=0},e}(),R=`-ms-`,Qt=`-moz-`,z=`-webkit-`,$t=`comm`,en=`rule`,tn=`decl`,nn=`@import`,rn=`@keyframes`,an=`@layer`,on=Math.abs,sn=String.fromCharCode,cn=Object.assign;function ln(e,t){return V(e,0)^45?(((t<<2^V(e,0))<<2^V(e,1))<<2^V(e,2))<<2^V(e,3):0}function un(e){return e.trim()}function dn(e,t){return(e=t.exec(e))?e[0]:e}function B(e,t,n){return e.replace(t,n)}function fn(e,t){return e.indexOf(t)}function V(e,t){return e.charCodeAt(t)|0}function pn(e,t,n){return e.slice(t,n)}function H(e){return e.length}function mn(e){return e.length}function hn(e,t){return t.push(e),e}function gn(e,t){return e.map(t).join(``)}var _n=1,vn=1,yn=0,U=0,W=0,bn=``;function xn(e,t,n,r,i,a,o){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:_n,column:vn,length:o,return:``}}function Sn(e,t){return cn(xn(``,null,null,``,null,null,0),e,{length:-e.length},t)}function Cn(){return W}function wn(){return W=U>0?V(bn,--U):0,vn--,W===10&&(vn=1,_n--),W}function G(){return W=U<yn?V(bn,U++):0,vn++,W===10&&(vn=1,_n++),W}function K(){return V(bn,U)}function Tn(){return U}function En(e,t){return pn(bn,e,t)}function Dn(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function On(e){return _n=vn=1,yn=H(bn=e),U=0,[]}function kn(e){return bn=``,e}function An(e){return un(En(U-1,Nn(e===91?e+2:e===40?e+1:e)))}function jn(e){for(;(W=K())&&W<33;)G();return Dn(e)>2||Dn(W)>3?``:` `}function Mn(e,t){for(;--t&&G()&&!(W<48||W>102||W>57&&W<65||W>70&&W<97););return En(e,Tn()+(t<6&&K()==32&&G()==32))}function Nn(e){for(;G();)switch(W){case e:return U;case 34:case 39:e!==34&&e!==39&&Nn(W);break;case 40:e===41&&Nn(e);break;case 92:G()}return U}function Pn(e,t){for(;G()&&e+W!==57&&(e+W!==84||K()!==47););return`/*`+En(t,U-1)+`*`+sn(e===47?e:G())}function Fn(e){for(;!Dn(K());)G();return En(e,U)}function In(e){return kn(Ln(``,null,null,null,[``],e=On(e),0,[0],e))}function Ln(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=G()){case 40:if(m!=108&&V(C,d-1)==58){fn(C+=B(An(v),`&`,`&\f`),`&\f`)!=-1&&(_=-1);break}case 34:case 39:case 91:C+=An(v);break;case 9:case 10:case 13:case 32:C+=jn(m);break;case 92:C+=Mn(Tn()-1,7);continue;case 47:switch(K()){case 42:case 47:hn(zn(Pn(G(),Tn()),t,n),c);break;default:C+=`/`}break;case 123*h:s[l++]=H(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=B(C,/\f/g,``)),p>0&&H(C)-d&&hn(p>32?Bn(C+`;`,r,n,d-1):Bn(B(C,` `,``)+`;`,r,n,d-2),c);break;case 59:C+=`;`;default:if(hn(S=Rn(C,t,n,l,u,i,s,y,b=[],x=[],d),a),v===123){if(u===0)Ln(C,t,S,S,b,a,d,s,x);else switch(f===99&&V(C,3)===110?100:f){case 100:case 108:case 109:case 115:Ln(e,S,S,r&&hn(Rn(e,S,S,0,0,i,s,y,i,b=[],d),x),i,x,d,s,r?b:x);break;default:Ln(C,S,S,S,[``],x,0,s,x)}}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+H(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&wn()==125)continue}switch(C+=sn(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(H(C)-1)*_,_=1;break;case 64:K()===45&&(C+=An(G())),f=K(),u=d=H(y=C+=Fn(Tn())),v++;break;case 45:m===45&&H(C)==2&&(h=0)}}return a}function Rn(e,t,n,r,i,a,o,s,c,l,u){for(var d=i-1,f=i===0?a:[``],p=mn(f),m=0,h=0,g=0;m<r;++m)for(var _=0,v=pn(e,d+1,d=on(h=o[m])),y=e;_<p;++_)(y=un(h>0?f[_]+` `+v:B(v,/&\f/g,f[_])))&&(c[g++]=y);return xn(e,t,n,i===0?en:s,c,l,u)}function zn(e,t,n){return xn(e,t,n,$t,sn(Cn()),pn(e,2,-2),0)}function Bn(e,t,n,r){return xn(e,t,n,tn,pn(e,0,r),pn(e,r+1,-1),r)}function Vn(e,t){for(var n=``,r=mn(e),i=0;i<r;i++)n+=t(e[i],i,e,t)||``;return n}function Hn(e,t,n,r){switch(e.type){case an:if(e.children.length)break;case nn:case tn:return e.return=e.return||e.value;case $t:return``;case rn:return e.return=e.value+`{`+Vn(e.children,r)+`}`;case en:e.value=e.props.join(`,`)}return H(n=Vn(e.children,r))?e.return=e.value+`{`+n+`}`:``}function Un(e){var t=mn(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}function Wn(e){return function(t){t.root||(t=t.return)&&e(t)}}function Gn(e){var t=Object.create(null);return function(n){return t[n]===void 0&&(t[n]=e(n)),t[n]}}var Kn=function(e,t,n){for(var r=0,i=0;r=i,i=K(),r===38&&i===12&&(t[n]=1),!Dn(i);)G();return En(e,U)},qn=function(e,t){var n=-1,r=44;do switch(Dn(r)){case 0:r===38&&K()===12&&(t[n]=1),e[n]+=Kn(U-1,t,n);break;case 2:e[n]+=An(r);break;case 4:if(r===44){e[++n]=K()===58?`&\f`:``,t[n]=e[n].length;break}default:e[n]+=sn(r)}while(r=G());return e},Jn=function(e,t){return kn(qn(On(e),t))},Yn=new WeakMap,Xn=function(e){if(!(e.type!==`rule`||!e.parent||e.length<1)){for(var t=e.value,n=e.parent,r=e.column===n.column&&e.line===n.line;n.type!==`rule`;)if(n=n.parent,!n)return;if((e.props.length!==1||t.charCodeAt(0)===58||Yn.get(n))&&!r){Yn.set(e,!0);for(var i=[],a=Jn(t,i),o=n.props,s=0,c=0;s<a.length;s++)for(var l=0;l<o.length;l++,c++)e.props[c]=i[s]?a[s].replace(/&\f/g,o[l]):o[l]+` `+a[s]}}},Zn=function(e){if(e.type===`decl`){var t=e.value;t.charCodeAt(0)===108&&t.charCodeAt(2)===98&&(e.return=``,e.value=``)}};function Qn(e,t){switch(ln(e,t)){case 5103:return z+`print-`+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return z+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return z+e+Qt+e+R+e+e;case 6828:case 4268:return z+e+R+e+e;case 6165:return z+e+R+`flex-`+e+e;case 5187:return z+e+B(e,/(\w+).+(:[^]+)/,z+`box-$1$2`+R+`flex-$1$2`)+e;case 5443:return z+e+R+`flex-item-`+B(e,/flex-|-self/,``)+e;case 4675:return z+e+R+`flex-line-pack`+B(e,/align-content|flex-|-self/,``)+e;case 5548:return z+e+R+B(e,`shrink`,`negative`)+e;case 5292:return z+e+R+B(e,`basis`,`preferred-size`)+e;case 6060:return z+`box-`+B(e,`-grow`,``)+z+e+R+B(e,`grow`,`positive`)+e;case 4554:return z+B(e,/([^-])(transform)/g,`$1`+z+`$2`)+e;case 6187:return B(B(B(e,/(zoom-|grab)/,z+`$1`),/(image-set)/,z+`$1`),e,``)+e;case 5495:case 3959:return B(e,/(image-set\([^]*)/,z+"$1$`$1");case 4968:return B(B(e,/(.+:)(flex-)?(.*)/,z+`box-pack:$3`+R+`flex-pack:$3`),/s.+-b[^;]+/,`justify`)+z+e+e;case 4095:case 3583:case 4068:case 2532:return B(e,/(.+)-inline(.+)/,z+`$1$2`)+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(H(e)-1-t>6)switch(V(e,t+1)){case 109:if(V(e,t+4)!==45)break;case 102:return B(e,/(.+:)(.+)-([^]+)/,`$1`+z+`$2-$3$1`+Qt+(V(e,t+3)==108?`$3`:`$2-$3`))+e;case 115:return~fn(e,`stretch`)?Qn(B(e,`stretch`,`fill-available`),t)+e:e}break;case 4949:if(V(e,t+1)!==115)break;case 6444:switch(V(e,H(e)-3-(~fn(e,`!important`)&&10))){case 107:return B(e,`:`,`:`+z)+e;case 101:return B(e,/(.+:)([^;!]+)(;|!.+)?/,`$1`+z+(V(e,14)===45?`inline-`:``)+`box$3$1`+z+`$2$3$1`+R+`$2box$3`)+e}break;case 5936:switch(V(e,t+11)){case 114:return z+e+R+B(e,/[svh]\w+-[tblr]{2}/,`tb`)+e;case 108:return z+e+R+B(e,/[svh]\w+-[tblr]{2}/,`tb-rl`)+e;case 45:return z+e+R+B(e,/[svh]\w+-[tblr]{2}/,`lr`)+e}return z+e+R+e+e}return e}var $n=[function(e,t,n,r){if(e.length>-1&&!e.return)switch(e.type){case tn:e.return=Qn(e.value,e.length);break;case rn:return Vn([Sn(e,{value:B(e.value,`@`,`@`+z)})],r);case en:if(e.length)return gn(e.props,function(t){switch(dn(t,/(::plac\w+|:read-\w+)/)){case`:read-only`:case`:read-write`:return Vn([Sn(e,{props:[B(t,/:(read-\w+)/,`:`+Qt+`$1`)]})],r);case`::placeholder`:return Vn([Sn(e,{props:[B(t,/:(plac\w+)/,`:`+z+`input-$1`)]}),Sn(e,{props:[B(t,/:(plac\w+)/,`:`+Qt+`$1`)]}),Sn(e,{props:[B(t,/:(plac\w+)/,R+`input-$1`)]})],r)}return``})}}],er=function(e){var t=e.key;if(t===`css`){var n=document.querySelectorAll(`style[data-emotion]:not([data-s])`);Array.prototype.forEach.call(n,function(e){e.getAttribute(`data-emotion`).indexOf(` `)!==-1&&(document.head.appendChild(e),e.setAttribute(`data-s`,``))})}var r=e.stylisPlugins||$n,i={},a,o=[];a=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll(`style[data-emotion^="`+t+` "]`),function(e){for(var t=e.getAttribute(`data-emotion`).split(` `),n=1;n<t.length;n++)i[t[n]]=!0;o.push(e)});var s,c=[Xn,Zn],l,u=[Hn,Wn(function(e){l.insert(e)})],d=Un(c.concat(r,u)),f=function(e){return Vn(In(e),d)};s=function(e,t,n,r){l=n,f(e?e+`{`+t.styles+`}`:t.styles),r&&(p.inserted[t.name]=!0)};var p={key:t,sheet:new Zt({key:t,container:a,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:i,registered:{},insert:s};return p.sheet.hydrate(o),p},tr=n((e=>{var t=typeof Symbol==`function`&&Symbol.for,n=t?Symbol.for(`react.element`):60103,r=t?Symbol.for(`react.portal`):60106,i=t?Symbol.for(`react.fragment`):60107,a=t?Symbol.for(`react.strict_mode`):60108,o=t?Symbol.for(`react.profiler`):60114,s=t?Symbol.for(`react.provider`):60109,c=t?Symbol.for(`react.context`):60110,l=t?Symbol.for(`react.async_mode`):60111,u=t?Symbol.for(`react.concurrent_mode`):60111,d=t?Symbol.for(`react.forward_ref`):60112,f=t?Symbol.for(`react.suspense`):60113,p=t?Symbol.for(`react.suspense_list`):60120,m=t?Symbol.for(`react.memo`):60115,h=t?Symbol.for(`react.lazy`):60116,g=t?Symbol.for(`react.block`):60121,_=t?Symbol.for(`react.fundamental`):60117,v=t?Symbol.for(`react.responder`):60118,y=t?Symbol.for(`react.scope`):60119;function b(e){if(typeof e==`object`&&e){var t=e.$$typeof;switch(t){case n:switch(e=e.type,e){case l:case u:case i:case o:case a:case f:return e;default:switch(e&&=e.$$typeof,e){case c:case d:case h:case m:case s:return e;default:return t}}case r:return t}}}function x(e){return b(e)===u}e.AsyncMode=l,e.ConcurrentMode=u,e.ContextConsumer=c,e.ContextProvider=s,e.Element=n,e.ForwardRef=d,e.Fragment=i,e.Lazy=h,e.Memo=m,e.Portal=r,e.Profiler=o,e.StrictMode=a,e.Suspense=f,e.isAsyncMode=function(e){return x(e)||b(e)===l},e.isConcurrentMode=x,e.isContextConsumer=function(e){return b(e)===c},e.isContextProvider=function(e){return b(e)===s},e.isElement=function(e){return typeof e==`object`&&!!e&&e.$$typeof===n},e.isForwardRef=function(e){return b(e)===d},e.isFragment=function(e){return b(e)===i},e.isLazy=function(e){return b(e)===h},e.isMemo=function(e){return b(e)===m},e.isPortal=function(e){return b(e)===r},e.isProfiler=function(e){return b(e)===o},e.isStrictMode=function(e){return b(e)===a},e.isSuspense=function(e){return b(e)===f},e.isValidElementType=function(e){return typeof e==`string`||typeof e==`function`||e===i||e===u||e===o||e===a||e===f||e===p||typeof e==`object`&&!!e&&(e.$$typeof===h||e.$$typeof===m||e.$$typeof===s||e.$$typeof===c||e.$$typeof===d||e.$$typeof===_||e.$$typeof===v||e.$$typeof===y||e.$$typeof===g)},e.typeOf=b})),nr=n(((e,t)=>{t.exports=tr()})),rr=n(((e,t)=>{var n=nr(),r={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},i={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},a={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},o={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},s={};s[n.ForwardRef]=a,s[n.Memo]=o;function c(e){return n.isMemo(e)?o:s[e.$$typeof]||r}var l=Object.defineProperty,u=Object.getOwnPropertyNames,d=Object.getOwnPropertySymbols,f=Object.getOwnPropertyDescriptor,p=Object.getPrototypeOf,m=Object.prototype;function h(e,t,n){if(typeof t!=`string`){if(m){var r=p(t);r&&r!==m&&h(e,r,n)}var a=u(t);d&&(a=a.concat(d(t)));for(var o=c(e),s=c(t),g=0;g<a.length;++g){var _=a[g];if(!i[_]&&!(n&&n[_])&&!(s&&s[_])&&!(o&&o[_])){var v=f(t,_);try{l(e,_,v)}catch{}}}}return e}t.exports=h}));function ir(e,t,n){var r=``;return n.split(` `).forEach(function(n){e[n]===void 0?n&&(r+=n+` `):t.push(e[n]+`;`)}),r}var ar=function(e,t,n){var r=e.key+`-`+t.name;n===!1&&e.registered[r]===void 0&&(e.registered[r]=t.styles)},or=function(e,t,n){ar(e,t,n);var r=e.key+`-`+t.name;if(e.inserted[t.name]===void 0){var i=t;do e.insert(t===i?`.`+r:``,i,e.sheet,!0),i=i.next;while(i!==void 0)}};function sr(e){for(var t=0,n,r=0,i=e.length;i>=4;++r,i-=4)n=e.charCodeAt(r)&255|(e.charCodeAt(++r)&255)<<8|(e.charCodeAt(++r)&255)<<16|(e.charCodeAt(++r)&255)<<24,n=(n&65535)*1540483477+((n>>>16)*59797<<16),n^=n>>>24,t=(n&65535)*1540483477+((n>>>16)*59797<<16)^(t&65535)*1540483477+((t>>>16)*59797<<16);switch(i){case 3:t^=(e.charCodeAt(r+2)&255)<<16;case 2:t^=(e.charCodeAt(r+1)&255)<<8;case 1:t^=e.charCodeAt(r)&255,t=(t&65535)*1540483477+((t>>>16)*59797<<16)}return t^=t>>>13,t=(t&65535)*1540483477+((t>>>16)*59797<<16),((t^t>>>15)>>>0).toString(36)}var cr={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},lr=/[A-Z]|^ms/g,ur=/_EMO_([^_]+?)_([^]*?)_EMO_/g,dr=function(e){return e.charCodeAt(1)===45},fr=function(e){return e!=null&&typeof e!=`boolean`},pr=Gn(function(e){return dr(e)?e:e.replace(lr,`-$&`).toLowerCase()}),mr=function(e,t){switch(e){case`animation`:case`animationName`:if(typeof t==`string`)return t.replace(ur,function(e,t,n){return q={name:t,styles:n,next:q},t})}return cr[e]!==1&&!dr(e)&&typeof t==`number`&&t!==0?t+`px`:t};function hr(e,t,n){if(n==null)return``;var r=n;if(r.__emotion_styles!==void 0)return r;switch(typeof n){case`boolean`:return``;case`object`:var i=n;if(i.anim===1)return q={name:i.name,styles:i.styles,next:q},i.name;var a=n;if(a.styles!==void 0){var o=a.next;if(o!==void 0)for(;o!==void 0;)q={name:o.name,styles:o.styles,next:q},o=o.next;return a.styles+`;`}return gr(e,t,n);case`function`:if(e!==void 0){var s=q,c=n(e);return q=s,hr(e,t,c)}}var l=n;if(t==null)return l;var u=t[l];return u===void 0?l:u}function gr(e,t,n){var r=``;if(Array.isArray(n))for(var i=0;i<n.length;i++)r+=hr(e,t,n[i])+`;`;else for(var a in n){var o=n[a];if(typeof o!=`object`){var s=o;t!=null&&t[s]!==void 0?r+=a+`{`+t[s]+`}`:fr(s)&&(r+=pr(a)+`:`+mr(a,s)+`;`)}else if(Array.isArray(o)&&typeof o[0]==`string`&&(t==null||t[o[0]]===void 0))for(var c=0;c<o.length;c++)fr(o[c])&&(r+=pr(a)+`:`+mr(a,o[c])+`;`);else{var l=hr(e,t,o);switch(a){case`animation`:case`animationName`:r+=pr(a)+`:`+l+`;`;break;default:r+=a+`{`+l+`}`}}}return r}var _r=/label:\s*([^\s;{]+)\s*(;|$)/g,q;function vr(e,t,n){if(e.length===1&&typeof e[0]==`object`&&e[0]!==null&&e[0].styles!==void 0)return e[0];var r=!0,i=``;q=void 0;var a=e[0];a==null||a.raw===void 0?(r=!1,i+=hr(n,t,a)):i+=a[0];for(var o=1;o<e.length;o++)i+=hr(n,t,e[o]),r&&(i+=a[o]);_r.lastIndex=0;for(var s=``,c;(c=_r.exec(i))!==null;)s+=`-`+c[1];return{name:sr(i)+s,styles:i,next:q}}var yr=function(e){return e()},br=Ct||!1,xr=br||yr,Sr=br||ve;Jt();var Cr=k(typeof HTMLElement<`u`?er({key:`css`}):null);Cr.Provider;var wr=function(e){return nt(function(t,n){return e(t,Ce(Cr),n)})},Tr=k({}),Er={}.hasOwnProperty,Dr=`__EMOTION_TYPE_PLEASE_DO_NOT_USE__`,Or=function(e,t){var n={};for(var r in t)Er.call(t,r)&&(n[r]=t[r]);return n[Dr]=e,n},kr=function(e){var t=e.cache,n=e.serialized,r=e.isStringTag;return ar(t,n,r),xr(function(){return or(t,n,r)}),null},Ar=wr(function(e,t,n){var r=e.css;typeof r==`string`&&t.registered[r]!==void 0&&(r=t.registered[r]);var a=e[Dr],o=[r],c=``;typeof e.className==`string`?c=ir(t.registered,o,e.className):e.className!=null&&(c=e.className+` `);var l=vr(o,void 0,Ce(Tr));c+=t.key+`-`+l.name;var u={};for(var d in e)Er.call(e,d)&&d!==`css`&&d!==Dr&&(u[d]=e[d]);return u.className=c,n&&(u.ref=n),i(s,null,i(kr,{cache:t,serialized:l,isStringTag:typeof a==`string`}),i(a,u))});Jt(),rr();var jr=function(e,t){var n=arguments;if(t==null||!Er.call(t,`css`))return i.apply(void 0,n);var r=n.length,a=Array(r);a[0]=Ar,a[1]=Or(e,t);for(var o=2;o<r;o++)a[o]=n[o];return i.apply(null,a)};(function(e){var t;t||=e.JSX||={}})(jr||={});var Mr=wr(function(e,t){var n=e.styles,r=vr([n],void 0,Ce(Tr)),i=ye();return Sr(function(){var e=t.key+`-global`,n=new t.sheet.constructor({key:e,nonce:t.sheet.nonce,container:t.sheet.container,speedy:t.sheet.isSpeedy}),a=!1,o=document.querySelector(`style[data-emotion="`+e+` `+r.name+`"]`);return t.sheet.tags.length&&(n.before=t.sheet.tags[0]),o!==null&&(a=!0,o.setAttribute(`data-emotion`,e),n.hydrate([o])),i.current=[n,a],function(){n.flush()}},[t]),Sr(function(){var e=i.current,n=e[0];e[1]?e[1]=!1:(r.next!==void 0&&or(t,r.next,!0),n.tags.length&&(n.before=n.tags[n.tags.length-1].nextElementSibling,n.flush()),t.insert(``,r,n,!1))},[t,r.name]),null});function Nr(){return vr([...arguments])}function Pr(){var e=Nr.apply(void 0,arguments),t=`animation-`+e.name;return{name:t,styles:`@keyframes `+t+`{`+e.styles+`}`,anim:1,toString:function(){return`_EMO_`+this.name+`_`+this.styles+`_EMO_`}}}function Fr(){return typeof window<`u`}function Ir(e){return Rr(e)?(e.nodeName||``).toLowerCase():`#document`}function J(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Lr(e){return((Rr(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function Rr(e){return Fr()?e instanceof Node||e instanceof J(e).Node:!1}function Y(e){return Fr()?e instanceof Element||e instanceof J(e).Element:!1}function X(e){return Fr()?e instanceof HTMLElement||e instanceof J(e).HTMLElement:!1}function zr(e){return!Fr()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof J(e).ShadowRoot}var Br=new Set([`inline`,`contents`]);function Vr(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=Z(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Br.has(i)}var Hr=new Set([`table`,`td`,`th`]);function Ur(e){return Hr.has(Ir(e))}var Wr=[`:popover-open`,`:modal`];function Gr(e){return Wr.some(t=>{try{return e.matches(t)}catch{return!1}})}var Kr=[`transform`,`translate`,`scale`,`rotate`,`perspective`],qr=[`transform`,`translate`,`scale`,`rotate`,`perspective`,`filter`],Jr=[`paint`,`layout`,`strict`,`content`];function Yr(e){let t=Zr(),n=Y(e)?Z(e):e;return Kr.some(e=>n[e]?n[e]!==`none`:!1)||(n.containerType?n.containerType!==`normal`:!1)||!t&&(n.backdropFilter?n.backdropFilter!==`none`:!1)||!t&&(n.filter?n.filter!==`none`:!1)||qr.some(e=>(n.willChange||``).includes(e))||Jr.some(e=>(n.contain||``).includes(e))}function Xr(e){let t=ti(e);for(;X(t)&&!$r(t);){if(Yr(t))return t;if(Gr(t))return null;t=ti(t)}return null}function Zr(){return typeof CSS>`u`||!CSS.supports?!1:CSS.supports(`-webkit-backdrop-filter`,`none`)}var Qr=new Set([`html`,`body`,`#document`]);function $r(e){return Qr.has(Ir(e))}function Z(e){return J(e).getComputedStyle(e)}function ei(e){return Y(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ti(e){if(Ir(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||zr(e)&&e.host||Lr(e);return zr(t)?t.host:t}function ni(e){let t=ti(e);return $r(t)?e.ownerDocument?e.ownerDocument.body:e.body:X(t)&&Vr(t)?t:ni(t)}function ri(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ni(e),i=r===e.ownerDocument?.body,a=J(r);if(i){let e=ii(a);return t.concat(a,a.visualViewport||[],Vr(r)?r:[],e&&n?ri(e):[])}return t.concat(r,ri(r,[],n))}function ii(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var ai=Math.min,Q=Math.max,oi=Math.round,si=Math.floor,ci=e=>({x:e,y:e}),li={left:`right`,right:`left`,bottom:`top`,top:`bottom`},ui={start:`end`,end:`start`};function di(e,t,n){return Q(e,ai(t,n))}function fi(e,t){return typeof e==`function`?e(t):e}function pi(e){return e.split(`-`)[0]}function mi(e){return e.split(`-`)[1]}function hi(e){return e===`x`?`y`:`x`}function gi(e){return e===`y`?`height`:`width`}var _i=new Set([`top`,`bottom`]);function vi(e){return _i.has(pi(e))?`y`:`x`}function yi(e){return hi(vi(e))}function bi(e,t,n){n===void 0&&(n=!1);let r=mi(e),i=yi(e),a=gi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=ki(o)),[o,ki(o)]}function xi(e){let t=ki(e);return[Si(e),t,Si(t)]}function Si(e){return e.replace(/start|end/g,e=>ui[e])}var Ci=[`left`,`right`],wi=[`right`,`left`],Ti=[`top`,`bottom`],Ei=[`bottom`,`top`];function Di(e,t,n){switch(e){case`top`:case`bottom`:return n?t?wi:Ci:t?Ci:wi;case`left`:case`right`:return t?Ti:Ei;default:return[]}}function Oi(e,t,n,r){let i=mi(e),a=Di(pi(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Si)))),a}function ki(e){return e.replace(/left|right|bottom|top/g,e=>li[e])}function Ai(e){return{top:0,right:0,bottom:0,left:0,...e}}function ji(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ai(e)}function Mi(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}pe();var Ni=0;Array.isArray;function Pi(e,t,n,r,i,a){t||={};var o,s,c=t;if(`ref`in c&&typeof e!=`function`)for(s in c={},t)s==`ref`?o=t[s]:c[s]=t[s];var l={type:e,props:c,key:n,ref:o,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Ni,__i:-1,__u:0,__source:i,__self:a};return A.vnode&&A.vnode(l),l}Jt();function Fi(e,t,n){let{reference:r,floating:i}=e,a=vi(t),o=yi(t),s=gi(o),c=pi(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}switch(mi(t)){case`start`:p[o]-=f*(n&&l?-1:1);break;case`end`:p[o]+=f*(n&&l?-1:1)}return p}var Ii=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=a.filter(Boolean),c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Fi(l,r,c),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:a,fn:h}=s[n],{x:g,y:_,data:v,reset:y}=await h({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:l,platform:o,elements:{reference:e,floating:t}});u=g??u,d=_??d,p={...p,[a]:{...p[a],...v}},y&&m<=50&&(m++,typeof y==`object`&&(y.placement&&(f=y.placement),y.rects&&(l=y.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):y.rects),{x:u,y:d}=Fi(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:p}};async function Li(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=fi(t,e),p=ji(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Mi(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Mi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ri=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=fi(e,t)||{};if(l==null)return{};let d=ji(u),f={x:n,y:r},p=yi(i),m=gi(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;C&&await(o.isElement==null?void 0:o.isElement(S))||(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,E=ai(d[_],T),ee=ai(d[v],T),te=E,D=C-h[m]-ee,O=C/2-h[m]/2+w,ne=di(te,O,D),k=!c.arrow&&mi(i)!=null&&O!==ne&&a.reference[m]/2-(O<te?E:ee)-h[m]/2<0,A=k?O<te?O-te:O-D:0;return{[p]:f[p]+A,data:{[p]:ne,centerOffset:O-ne-A,...k&&{alignmentOffset:A}},reset:k}}}),zi=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=fi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=pi(r),_=vi(o),v=pi(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[ki(o)]:xi(o)),x=p!==`none`;!d&&x&&b.push(...Oi(o,m,p,y));let S=[o,...b],C=await Li(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=bi(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===vi(t)||T.every(e=>vi(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=vi(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},Bi=new Set([`left`,`top`]);async function Vi(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=pi(n),s=mi(n),c=vi(n)===`y`,l=Bi.has(o)?-1:1,u=a&&c?-1:1,d=fi(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Hi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Vi(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},Ui=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i}=t,{mainAxis:a=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=fi(e,t),l={x:n,y:r},u=await Li(t,c),d=vi(pi(i)),f=hi(d),p=l[f],m=l[d];if(a){let e=f===`y`?`top`:`left`,t=f===`y`?`bottom`:`right`,n=p+u[e],r=p-u[t];p=di(n,p,r)}if(o){let e=d===`y`?`top`:`left`,t=d===`y`?`bottom`:`right`,n=m+u[e],r=m-u[t];m=di(n,m,r)}let h=s.fn({...t,[f]:p,[d]:m});return{...h,data:{x:h.x-n,y:h.y-r,enabled:{[f]:a,[d]:o}}}}}},Wi=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){var n,r;let{placement:i,rects:a,platform:o,elements:s}=t,{apply:c=()=>{},...l}=fi(e,t),u=await Li(t,l),d=pi(i),f=mi(i),p=vi(i)===`y`,{width:m,height:h}=a.floating,g,_;d===`top`||d===`bottom`?(g=d,_=f===(await(o.isRTL==null?void 0:o.isRTL(s.floating))?`start`:`end`)?`left`:`right`):(_=d,g=f===`end`?`top`:`bottom`);let v=h-u.top-u.bottom,y=m-u.left-u.right,b=ai(h-u[g],v),x=ai(m-u[_],y),S=!t.middlewareData.shift,C=b,w=x;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(w=y),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(C=v),S&&!f){let e=Q(u.left,0),t=Q(u.right,0),n=Q(u.top,0),r=Q(u.bottom,0);p?w=m-2*(e!==0||t!==0?e+t:Q(u.left,u.right)):C=h-2*(n!==0||r!==0?n+r:Q(u.top,u.bottom))}await c({...t,availableWidth:w,availableHeight:C});let T=await o.getDimensions(s.floating);return m!==T.width||h!==T.height?{reset:{rects:!0}}:{}}}};function Gi(e){let t=Z(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=X(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=oi(n)!==a||oi(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Ki(e){return Y(e)?e:e.contextElement}function qi(e){let t=Ki(e);if(!X(t))return ci(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Gi(t),o=(a?oi(n.width):n.width)/r,s=(a?oi(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}var Ji=ci(0);function Yi(e){let t=J(e);return!Zr()||!t.visualViewport?Ji:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xi(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==J(e)?!1:t}function Zi(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Ki(e),o=ci(1);t&&(r?Y(r)&&(o=qi(r)):o=qi(e));let s=Xi(a,n,r)?Yi(a):ci(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a){let e=J(a),t=r&&Y(r)?J(r):r,n=e,i=ii(n);for(;i&&r&&t!==n;){let e=qi(i),t=i.getBoundingClientRect(),r=Z(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=J(i),i=ii(n)}}return Mi({width:u,height:d,x:c,y:l})}function Qi(e,t){let n=ei(e).scrollLeft;return t?t.left+n:Zi(Lr(e)).left+n}function $i(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Qi(e,n),y:n.top+t.scrollTop}}function ea(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Lr(r),s=t?Gr(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ci(1),u=ci(0),d=X(r);if((d||!d&&!a)&&((Ir(r)!==`body`||Vr(o))&&(c=ei(r)),X(r))){let e=Zi(r);l=qi(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?$i(o,c):ci(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function ta(e){return Array.from(e.getClientRects())}function na(e){let t=Lr(e),n=ei(e),r=e.ownerDocument.body,i=Q(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Q(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight),o=-n.scrollLeft+Qi(e),s=-n.scrollTop;return Z(r).direction===`rtl`&&(o+=Q(t.clientWidth,r.clientWidth)-i),{width:i,height:a,x:o,y:s}}var ra=25;function ia(e,t){let n=J(e),r=Lr(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;let e=Zr();(!e||e&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}let l=Qi(r);if(l<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=ra&&(a-=o)}else l<=ra&&(a+=l);return{width:a,height:o,x:s,y:c}}var aa=new Set([`absolute`,`fixed`]);function oa(e,t){let n=Zi(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=X(e)?qi(e):ci(1);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function sa(e,t,n){let r;if(t===`viewport`)r=ia(e,n);else if(t===`document`)r=na(Lr(e));else if(Y(t))r=oa(t,n);else{let n=Yi(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Mi(r)}function ca(e,t){let n=ti(e);return n===t||!Y(n)||$r(n)?!1:Z(n).position===`fixed`||ca(n,t)}function la(e,t){let n=t.get(e);if(n)return n;let r=ri(e,[],!1).filter(e=>Y(e)&&Ir(e)!==`body`),i=null,a=Z(e).position===`fixed`,o=a?ti(e):e;for(;Y(o)&&!$r(o);){let t=Z(o),n=Yr(o);!n&&t.position===`fixed`&&(i=null),(a?!n&&!i:!n&&t.position===`static`&&i&&aa.has(i.position)||Vr(o)&&!n&&ca(e,o))?r=r.filter(e=>e!==o):i=t,o=ti(o)}return t.set(e,r),r}function ua(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Gr(t)?[]:la(t,this._c):[].concat(n),r],o=a[0],s=a.reduce((e,n)=>{let r=sa(t,n,i);return e.top=Q(r.top,e.top),e.right=ai(r.right,e.right),e.bottom=ai(r.bottom,e.bottom),e.left=Q(r.left,e.left),e},sa(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}}function da(e){let{width:t,height:n}=Gi(e);return{width:t,height:n}}function fa(e,t,n){let r=X(t),i=Lr(t),a=n===`fixed`,o=Zi(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ci(0);function l(){c.x=Qi(i)}if(r||!r&&!a){if((Ir(t)!==`body`||Vr(i))&&(s=ei(t)),r){let e=Zi(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}else i&&l()}a&&!r&&i&&l();let u=i&&!r&&!a?$i(i,s):ci(0);return{x:o.left+s.scrollLeft-c.x-u.x,y:o.top+s.scrollTop-c.y-u.y,width:o.width,height:o.height}}function pa(e){return Z(e).position===`static`}function ma(e,t){if(!X(e)||Z(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Lr(e)===n&&(n=n.ownerDocument.body),n}function ha(e,t){let n=J(e);if(Gr(e))return n;if(!X(e)){let t=ti(e);for(;t&&!$r(t);){if(Y(t)&&!pa(t))return t;t=ti(t)}return n}let r=ma(e,t);for(;r&&Ur(r)&&pa(r);)r=ma(r,t);return r&&$r(r)&&pa(r)&&!Yr(r)?n:r||Xr(e)||n}var ga=async function(e){let t=this.getOffsetParent||ha,n=this.getDimensions,r=await n(e.floating);return{reference:fa(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _a(e){return Z(e).direction===`rtl`}var va={convertOffsetParentRelativeRectToViewportRelativeRect:ea,getDocumentElement:Lr,getClippingRect:ua,getOffsetParent:ha,getElementRects:ga,getClientRects:ta,getDimensions:da,getScale:qi,isElement:Y,isRTL:_a};function ya(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function ba(e,t){let n=null,r,i=Lr(e);function a(){var e;clearTimeout(r),(e=n)==null||e.disconnect(),n=null}function o(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(s||t(),!f||!p)return;let m=si(d),h=si(i.clientWidth-(u+f)),g=si(i.clientHeight-(d+p)),_=si(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:Q(0,ai(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(n!==c){if(!y)return o();n?o(!1,n):r=setTimeout(()=>{o(!1,1e-7)},1e3)}n===1&&!ya(l,e.getBoundingClientRect())&&o(),y=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(e)}return o(!0),a}function xa(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=Ki(e),u=i||a?[...l?ri(l):[],...ri(t)]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n,{passive:!0}),a&&e.addEventListener(`resize`,n)});let d=l&&s?ba(l,n):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let m,h=c?Zi(e):null;c&&g();function g(){let t=Zi(e);h&&!ya(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Sa=Hi,Ca=Ui,wa=zi,Ta=Wi,Ea=Ri,Da=(e,t,n)=>{let r=new Map,i={platform:va,...n},a={...i.platform,_c:r};return Ii(e,t,{...i,platform:a})},Oa=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ka=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),Aa=e=>{let t=ka(e);return t.charAt(0).toUpperCase()+t.slice(1)},ja=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Ma=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0},Na={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};Jt();var Pa=nt(({color:e=`currentColor`,size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:a=``,children:o,iconNode:s,...c},l)=>i(`svg`,{ref:l,...Na,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:ja(`lucide`,a),...!o&&!Ma(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>i(e,t)),...Array.isArray(o)?o:[o]]));Jt();var $=(e,t)=>{let n=nt(({className:n,...r},a)=>i(Pa,{ref:a,iconNode:t,className:ja(`lucide-${Oa(Aa(e))}`,`lucide-${e}`,n),...r}));return n.displayName=Aa(e),n},Fa=$(`captions`,[[`rect`,{width:`18`,height:`14`,x:`3`,y:`5`,rx:`2`,ry:`2`,key:`12ruh7`}],[`path`,{d:`M7 15h4M15 15h2M7 11h2M13 11h4`,key:`1ueiar`}]]),Ia=$(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),La=$(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),Ra=$(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),za=$(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),Ba=$(`pause`,[[`rect`,{x:`14`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`kaeet6`}],[`rect`,{x:`5`,y:`3`,width:`5`,height:`18`,rx:`1`,key:`1wsw3u`}]]),Va=$(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),Ha=$(`settings`,[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]),Ua=$(`volume-1`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}]]),Wa=$(`volume-2`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`path`,{d:`M16 9a5 5 0 0 1 0 6`,key:`1q6k2b`}],[`path`,{d:`M19.364 18.364a9 9 0 0 0 0-12.728`,key:`ijwkga`}]]),Ga=$(`volume-x`,[[`path`,{d:`M11 4.702a.705.705 0 0 0-1.203-.498L6.413 7.587A1.4 1.4 0 0 1 5.416 8H3a1 1 0 0 0-1 1v6a1 1 0 0 0 1 1h2.416a1.4 1.4 0 0 1 .997.413l3.383 3.384A.705.705 0 0 0 11 19.298z`,key:`uqj9uw`}],[`line`,{x1:`22`,x2:`16`,y1:`9`,y2:`15`,key:`1ewh16`}],[`line`,{x1:`16`,x2:`22`,y1:`9`,y2:`15`,key:`5ykzw1`}]]);Jt();var Ka=s,qa=function(e,t,n){return Er.call(t,`css`)?Pi(Ar,Or(e,t),n):Pi(e,t,n)},Ja=function(e,t,n){return Er.call(t,`css`)?Pi(Ar,Or(e,t),n):Pi(e,t,n)},Ya=`modulepreload`,Xa=function(e,t){return new URL(e,t).href},Za={},Qa=function(e){return e.pathname.endsWith(`.css`)},$a=function(e,t,n){if(t in e)return e[t];let r=n();if(!r){e[t]=void 0;return}let i=r.then(()=>{e[t]=void 0},n=>{throw e[t]=void 0,n});return e[t]=i,i},eo=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=Xa(t,n);let r=s(t),i=Qa(r);return $a(Za,r.href,()=>{if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let t=document.createElement(`link`);if(t.rel=i?`stylesheet`:Ya,i||(t.as=`script`),t.crossOrigin=``,t.href=r.href,a&&t.setAttribute(`nonce`,a),document.head.appendChild(t),i)return new Promise((e,n)=>{t.addEventListener(`load`,e),t.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${r}`)))})})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},to=`stub.player.volume`,no=()=>{try{let e=JSON.parse(globalThis.localStorage.getItem(`stub.player.volume`)??`null`);if(typeof e!=`object`||!e)return;let{volume:t,muted:n}=e;return typeof t==`number`&&t>=0&&t<=1&&typeof n==`boolean`?{volume:t,muted:n}:void 0}catch{return}},ro=e=>{try{globalThis.localStorage.setItem(to,JSON.stringify(e))}catch{}},io=e=>{let t=no();t&&Object.assign(e,t);let n=()=>ro({volume:e.volume,muted:e.muted});return e.addEventListener(`volumechange`,n),()=>e.removeEventListener(`volumechange`,n)},ao=e=>{let t,n=!0,r=()=>{t&&(e.volume!==t.volume&&(e.volume=t.volume),e.muted!==t.muted&&(e.muted=t.muted))};return{media:new Proxy(e,{set:(e,r,i)=>Reflect.set(e,r,i)?((r===`volume`||r===`muted`)&&(t={...t??{volume:e.volume,muted:e.muted},[r]:i},n&&ro(t)),!0):!1}),served:e=>new Proxy(e,{set:(e,t,r)=>{n=!1;try{return Reflect.set(e,t,r)}finally{n=!0}}}),hold:()=>(t??=no(),r(),e.addEventListener(`volumechange`,r),()=>e.removeEventListener(`volumechange`,r))}};export{Ct as $,ri as A,Nr as B,wa as C,Pi as D,Ta as E,$r as F,Ot as G,tt as H,Rr as I,Wt as J,lt as K,zr as L,J as M,Y as N,Z as O,X as P,gt as Q,Zr as R,Da as S,Ca as T,Je as U,Pr as V,qt as W,yt as X,qe as Y,Jt as Z,Ia as _,Ka as a,Se as at,Ea as b,Ga as c,Ce as ct,Ha as d,D as dt,ve as et,Va as f,k as ft,La as g,c as gt,Ra as h,s as ht,eo as i,_e as it,ti as j,Ir as k,Wa as l,xe as lt,za as m,pe as mt,io as n,Ee as nt,qa as o,he as ot,Ba as p,i as pt,nt as q,ao as r,be as rt,Ja as s,Ke as st,to as t,ye as tt,Ua as u,ge as ut,Fa as v,Sa as w,xa as x,$ as y,Mr as z};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as e}from"./build-CHRBRLpA.js";var t=[`loadstart`,`loadedmetadata`,`loadeddata`,`durationchange`,`timeupdate`,`play`,`playing`,`pause`,`seeking`,`seeked`,`progress`,`ratechange`,`volumechange`,`ended`,`waiting`,`stalled`,`suspend`,`canplay`,`canplaythrough`,`emptied`,`resize`,`error`],n=[`currentTime`,`volume`,`muted`,`playbackRate`],r=[`play`,`pause`,`load`],i=e=>[`loadstart`,...e.readyState>=1?[`loadedmetadata`,`durationchange`]:[],...e.readyState>=2?[`loadeddata`]:[],...e.readyState>=3?[`canplay`]:[],`volumechange`,`ratechange`,`progress`,`resize`,e.paused?`pause`:`playing`,...e.ended?[`ended`]:[],...e.error?[`error`]:[]],a=e=>{if(!e)return[];let t=[];for(let n=0;n<e.length;n++)t.push([e.start(n),e.end(n)]);return t},o=e=>({currentTime:s(e.currentTime),duration:s(e.duration),paused:e.paused,ended:e.ended??!1,seeking:e.seeking,readyState:e.readyState,volume:e.volume??1,muted:e.muted??!1,playbackRate:e.playbackRate??1,src:e.src??``,currentSrc:e.currentSrc??``,buffered:a(e.buffered),seekable:a(e.seekable),error:e.error?{code:e.error.code,message:e.error.message}:null,videoWidth:e.videoWidth??0,videoHeight:e.videoHeight??0}),s=e=>Number.isNaN(e)?0:e,c={currentTime:0,duration:0,paused:!0,ended:!1,seeking:!1,readyState:0,volume:1,muted:!1,playbackRate:1,src:``,currentSrc:``,buffered:[],seekable:[],error:null,videoWidth:0,videoHeight:0},l=e=>({length:e.length,start:t=>e[t]?.[0]??0,end:t=>e[t]?.[1]??0}),u=1e4,d=1500,f=()=>new DOMException(`the far player did not start playing`,`NotAllowedError`),p=8,m=32,h=(e,t={})=>{C(t.origin);let n=typeof window<`u`&&window.parent!==window;return!t.transport&&!n?()=>{}:v(t).serve(e,t)},g=new WeakMap,_=new Map,v=a=>{let s=a.channel??`banou-media-player`,l=a.transport,u=`${s}|${a.origin??`*`}`,d=l?g.get(l)??(g.set(l,new Map),g.get(l)):_,f=d.get(u);if(f)return f;let h=new Map,v=new Map,y=e=>v.get(e)??v.set(e,new Set).get(e),b=(e,t)=>{v.get(e)?.delete(t);try{t.onmessage=null,t.close()}catch{}},x=(e,t,n)=>{for(let r of n?[n]:[...y(e)])try{r.postMessage(t)}catch{b(e,r)}},S=e=>{let t=h.get(e);return t?o(t):void 0},C=(e,t)=>{if(!v.get(e)?.size)return;let n=S(e);n&&x(e,{event:t,snapshot:n})},w={subscribe:(e,t)=>{if(typeof e!=`string`)throw TypeError(`a player id must be a string`);if(typeof MessagePort<`u`&&!(t instanceof MessagePort))throw TypeError(`subscribe takes a MessagePort`);if(!v.has(e)&&v.size>=m)throw RangeError(`too many players on this channel`);let n=y(e);if(n.size>=p)throw RangeError(`too many embedders for this player`);n.add(t),t.onmessage=()=>b(e,t),t.start?.();let r=S(e);r&&x(e,{event:`loadstart`,snapshot:r},t)},set:(e,t,r)=>{let i=h.get(e);if(i&&n.includes(t))try{i[t]=r}catch{}},call:async(e,t)=>{let n=h.get(e);if(n&&r.includes(t))try{t===`play`?await n.play():t===`pause`?n.pause():n.load?.()}finally{C(e,`timeupdate`)}}},T=new AbortController;T.signal.addEventListener(`abort`,()=>{d.delete(u);for(let[e,t]of v)for(let n of[...t])b(e,n);v.clear(),h.clear()},{once:!0}),e(w,{transport:a.transport??{emit:window.parent,receive:O(()=>window.parent,a.origin)},origin:a.origin,key:s,unregisterSignal:T.signal});let E={serve:(e,n)=>{let r=n.id??`default`,a=t.map(t=>[t,()=>{h.get(r)===e&&C(r,t)}]);for(let[t,n]of a)e.addEventListener(t,n);let s=h.has(r);h.set(r,e),s&&x(r,{event:`emptied`,snapshot:{...c}});for(let t of i(o(e)))C(r,t);let l=()=>{for(let[t,n]of a)e.removeEventListener(t,n);h.get(r)===e&&(h.delete(r),x(r,{event:`emptied`,snapshot:{...c}}))},u=()=>{l(),T.abort()};return n.signal&&(n.signal.aborted?u():n.signal.addEventListener(`abort`,u,{once:!0})),l}};return d.set(u,E),E},y=new WeakMap,b=(t,n)=>{let r=n.channel??`banou-media-player`,i=`${r}|${n.origin??`*`}`,a=y.get(t)??(y.set(t,new Map),y.get(t)),o=a.get(i);if(o)return o;let s=E(t,n.origin),c=new Set,l=new AbortController,u,d=e=>{try{e.port?.postMessage(`close`)}catch{}try{e.port?.close()}catch{}e.port=void 0},f=async e=>{d(e);let{port1:t,port2:n}=new MessageChannel;e.port=t,t.onmessage=({data:t})=>{l.signal.aborted||e.update(t)},await S(()=>u.subscribe(e.id,n)).catch(t=>{throw d(e),t})},p=()=>{l.abort();for(let e of c)d(e);c.clear(),a.delete(i)};(async()=>{for await(let t of e({},{transport:s,origin:n.origin,key:r,unregisterSignal:l.signal})){if(l.signal.aborted)return;u=t;for(let e of c)e.reset();await Promise.allSettled([...c].map(e=>f(e)))}u=void 0;for(let e of c)e.reset()})().catch(()=>{u=void 0;for(let e of c)e.reset()});let m={attach:e=>(c.add(e),u&&f(e).catch(()=>{}),()=>{d(e),c.delete(e),c.size||p()}),set:(e,t,n)=>u?.set(e,t,n),call:async(e,t)=>{if(!u)throw new DOMException(`the remote player was closed`,`AbortError`);await u.call(e,t)}};return a.set(i,m),m},x=(e,t={})=>{C(t.origin);let r=new AbortController,a=t.signal?AbortSignal.any([t.signal,r.signal]):r.signal,o=t.id??`default`,s={...c},u=new EventTarget,p=e=>u.dispatchEvent(new Event(e)),m,h,g=new Promise((e,t)=>{m=e,h=t});g.catch(()=>{});let _=()=>new DOMException(`the remote player was closed`,`AbortError`),v=new Set,y=()=>{for(let e of[...v])e(_());v.clear()},x=new Map,S=!1,w=b(e,t).attach({id:o,reset:()=>{S=!1,y()},update:({event:e,snapshot:t})=>{let n=!S;S=!0,Object.assign(s,t);for(let[e,t]of x)s[e]=t;if(!n)p(e);else{for(let e of i(s))p(e);m()}}}),T=()=>{w(),y(),h(_())};a.aborted?queueMicrotask(T):a.addEventListener(`abort`,T,{once:!0});let E=(e,t)=>Object.defineProperty(u,e,{get:()=>t?t(s[e]):s[e],enumerable:!0});for(let e of[`duration`,`paused`,`ended`,`seeking`,`readyState`,`src`,`currentSrc`,`error`,`videoWidth`,`videoHeight`])E(e);E(`buffered`,l),E(`seekable`,l);let D=e=>g.then(()=>a.aborted?void 0:e()).catch(()=>{}),O=b(e,t);for(let e of n)Object.defineProperty(u,e,{get:()=>s[e],set:t=>{s[e]=t,x.set(e,t),D(async()=>{await O.set(o,e,t),x.get(e)===t&&x.delete(e)})},enumerable:!0});let k=e=>g.then(()=>{if(a.aborted)throw _();let t=O.call(o,e);return new Promise((e,n)=>{v.add(n),t.then(()=>{v.delete(n),e()},e=>{v.delete(n),n(a.aborted?_():e)})})});u.play=()=>(s.paused=!1,k(`play`).catch(e=>{throw s.paused=!0,e}));let A=()=>new Promise(e=>{let t=t=>{clearTimeout(r),u.removeEventListener(`playing`,n),u.removeEventListener(`play`,n),e(t)},n=()=>t(!0);u.addEventListener(`playing`,n),u.addEventListener(`play`,n);let r=setTimeout(()=>t(!s.paused),d)}),j=async()=>{let e=!s.paused,t;try{await u.play()}catch(e){t=e}return e?{started:!0,refusal:t}:{started:await A(),refusal:t}};return u.autoplay=async()=>{let e=await j();if(e.started)return{muted:u.muted};if(u.muted||a.aborted)throw e.refusal??f();u.muted=!0;let t=await j();if(t.started)return{muted:!0};throw u.muted=!1,e.refusal??t.refusal??f()},u.pause=()=>{s.paused=!0,k(`pause`).catch(()=>{})},u.load=()=>{k(`load`).catch(()=>{})},Object.defineProperty(u,"ready",{value:g,enumerable:!1}),u.destroy=()=>r.abort(),u},S=async e=>{let t;try{return await Promise.race([e(),new Promise((e,n)=>{t=setTimeout(()=>n(Error(`the player did not answer`)),u)})])}finally{t&&clearTimeout(t)}},C=e=>{if(e===void 0||e===`*`)return;if(e===`null`)throw TypeError('an opaque origin ("null") cannot be spoken to; leave `origin` unset and the sender check stands alone');let t;try{t=new URL(e)}catch{throw TypeError(`\`origin\` must be an origin like https://example.com, not ${e}`)}if(t.origin!==e)throw TypeError(`\`origin\` must be an origin like ${t.origin}, not ${e}`)},w=e=>{try{return!!e&&typeof e==`object`&&e.window===e}catch{return!1}},T=e=>{if(w(e))return!1;try{return!!e&&typeof e==`object`&&`contentWindow`in e}catch{return!1}},E=(e,t)=>{if(w(e)){let n=D(t);return{emit:(t,r)=>{e.postMessage(t,n.target(),r??[])},receive:O(()=>e,t,n)}}if(T(e)){if(!e.contentWindow)throw TypeError(`mediaPlayer: the iframe has no window yet; append it to a document first`);let n=()=>e.contentWindow,r=D(t);return{emit:(e,t)=>{n()?.postMessage(e,r.target(),t??[])},receive:O(n,t,r)}}return e},D=e=>{let t=e&&e!==`*`?e:void 0;return{target:()=>t&&t!==`null`?t:`*`,admits:e=>t?e===t:(e&&(t=e),!0)}},O=(e,t,n=D(t))=>t=>{let r=r=>{r.source===e()&&n.admits(r.origin)&&t(r.data,{source:r.source,origin:r.origin,receiveTransport:window})};return window.addEventListener(`message`,r),()=>window.removeEventListener(`message`,r)};export{h as n,t as r,x as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{n as exposePlayer}from"./remote-D8UjjUy7.js";
|
|
Binary file
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{it as e,n as t,o as n,ot as r,st as i}from"./player-volume-DTOJyhLh.js";import{t as a}from"./dist-B_MSi_-2.js";i();var o=({url:i})=>{let[o,s]=r(null);return e(()=>o?t(o):void 0,[o]),e(()=>{o?.play().catch(()=>{})},[o]),n(a,{media:o,shortcuts:`player`,children:n(`video`,{ref:s,src:i,playsInline:!0})})};export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{t as exportAnswers,n as exportAsks,r as exportStore,i as graphCounts,a as handleRequest,o as registerRemoteSource,s as remotePicker,c as remotePlayer,l as searchScene,u as selectRemoteRelease,d as traceAnswer,f as traceGraph,p as trackerCheck,m as trackerFocused,h as unregisterRemoteSource}from"./worker-SLqI-fGd.js";
|
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
const e={RAW:`RAW`,PROXY:`PROXY`,THROW:`THROW`,HANDLER:`HANDLER`},t={GET:`GET`,SET:`SET`,APPLY:`APPLY`,CONSTRUCT:`CONSTRUCT`,RELEASE:`RELEASE`},n=Symbol(`Abslink.proxy`),r=Symbol(`Abslink.releaseProxy`),i=Symbol(`Abslink.finalizer`),a=Symbol(`Abslink.thrown`),o=e=>typeof e==`object`&&!!e||typeof e==`function`,s=/* @__PURE__ */ new Map([[`proxy`,{canHandle:e=>o(e)&&n in e,serialize(e,t){let r=e[n];return l(e,t,r),[r,[]]},deserialize(e,t){return u(t,e)}}],[`throw`,{canHandle:e=>o(e)&&a in e,serialize({value:e}){let t;return t=e instanceof Error?{isError:!0,value:{message:e.message,name:e.name,stack:e.stack}}:{isError:!1,value:e},[t,[]]},deserialize(e){throw e.isError?Object.assign(Error(e.value.message),e.value):e.value}}]]);function c(e,t){let n=t,r=e.slice(0,-1);for(let e of r)Object.prototype.hasOwnProperty.call(n,e)&&(n=n[e]);let i=e[e.length-1],a=i?n[i]:n;return{parent:n,RawValue:a,lastSegment:i}}function l(e,n,r){return n.on(`message`,function s(l){if(!l)return;let{id:u,type:d,path:f,markerID:p}={path:[],...l};if(p!==r)return;let m=(l.argumentList??[]).map(e=>b(e,n)),h;try{let{parent:r,RawValue:i,lastSegment:a}=c(f,e);switch(d){case t.GET:h=i;break;case t.SET:r[a]=b(l.value,n),h=!0;break;case t.APPLY:h=i.apply(r,m);break;case t.CONSTRUCT:h=new i(...m);break;case t.RELEASE:h=void 0;break;default:return}}catch(e){h={value:e,[a]:0}}Promise.resolve(h).catch(e=>({value:e,[a]:0})).then(c=>{d===t.CONSTRUCT&&!(o(c)&&a in c)&&(c=v(c));let[l,f]=y(c,n);n.postMessage({...l,id:u,markerID:r},f),d===t.RELEASE&&(n.off(`message`,s),e[i]?.())}).catch(e=>{let[t,i]=y({value:/* @__PURE__ */ TypeError(`Unserializable return value`),[a]:0},n);n.postMessage({...t,id:u,markerID:r},i)})}),e}function u(e,t){let n=/* @__PURE__ */ new Map;return e.on(`message`,e=>{if(!e?.id)return;let t=n.get(e.id);if(t)try{t(e)}finally{n.delete(e.id)}}),ee({endpoint:e,pendingListeners:n,rootMarkerID:t})}function d(e){if(e)throw Error(`Proxy has been released and is not useable`)}async function f(e){await x(e,{type:t.RELEASE})}const p=/* @__PURE__ */ new WeakMap,m=`FinalizationRegistry`in globalThis&&new FinalizationRegistry(e=>{let t=(p.get(e)??0)-1;p.set(e,t),t===0&&f(e).finally(()=>{e.pendingListeners.clear()})});function h(e,t){let n=(p.get(t)??0)+1;p.set(t,n),m&&m.register(e,t,e)}function g(e){m&&m.unregister(e)}function ee(e,n=[]){let i=!1,a=/* @__PURE__ */ new Map,o=new Proxy(function(){},{get(s,c){if(d(i),c===r)return async()=>{for(let e of a.values())e[r]();a.clear(),g(o),f(e).finally(()=>{e.pendingListeners.clear()}),i=!0};if(c===`then`){if(n.length===0)return{then:()=>o};let r=x(e,{type:t.GET,path:n.map(e=>e.toString())}).then(t=>b(t,e.endpoint));return r.then.bind(r)}let l=a.get(c);if(l)return l;let u=ee(e,[...n,c]);return a.set(c,u),u},set(r,a,o){d(i);let[s,c]=y(o,e.endpoint);return x(e,{type:t.SET,path:[...n,a].map(e=>e.toString()),value:s},c).then(t=>b(t,e.endpoint))},apply(r,a,o){if(d(i),n[n.length-1]===`bind`)return ee(e,n.slice(0,-1));let[s,c]=te(o,e);return x(e,{type:t.APPLY,path:n.map(e=>e.toString()),argumentList:s},c).then(t=>b(t,e.endpoint))},construct(r,a){d(i);let[o,s]=te(a,e);return x(e,{type:t.CONSTRUCT,path:n.map(e=>e.toString()),argumentList:o},s).then(t=>b(t,e.endpoint))}});return h(o,e),o}const _=/* @__PURE__ */ new WeakMap;function te(e,t){let n=[],r=[];for(let i of e){let[e,a]=y(i,t.endpoint);n.push(e),r.push(...a)}return[n,r]}function v(e){return Object.assign(e,{[n]:ie()})}function y(t,n){for(let[r,i]of s)if(i.canHandle(t)){let[a,o]=i.serialize(t,n);return[{type:e.HANDLER,name:r,value:a},o]}return[{type:e.RAW,value:t},_.get(t)??[]]}function b(t,n){switch(t.type){case e.HANDLER:return s.get(t.name).deserialize(t.value,n);case e.RAW:return t.value}}function x(e,t,n=[]){return new Promise(r=>{let i=ie();e.pendingListeners.set(i,r),e.endpoint.postMessage({id:i,...t,markerID:e.rootMarkerID},n)})}const ne=[],re=`0123456789abcdef`;for(let e=0;e<256;e++)ne[e]=re[e>>4&15]+re[e&15];let S=0,C=``;function ie(){let e=0;if(!C||S+16>512)for(C=``,S=0;e<256;++e)C+=ne[Math.random()*256|0];return C.substring(S,++S+16)}function w(e,t){let n=/* @__PURE__ */ new WeakMap;return e.start?.(),t.start?.(),{on(t,r){let i=e=>r(e.data);`addEventListener`in e?e.addEventListener(t,i):`addListener`in e?e.addListener(t,i):e.on(t,i),n.set(r,i)},off(t,r){let i=n.get(r);`removeEventListener`in e?e.removeEventListener(t,i):`removeListener`in e?e.removeListener(t,i):e.off(t,i),n.delete(r)},postMessage(e,n=[]){t.postMessage(e,n)}}}function T(e,t=globalThis,n=t){return l(e,w(t,n))}`queryLocalFonts`in globalThis&&globalThis.queryLocalFonts;const E={100:`Thin`,200:`ExtraLight`,300:`Light`,400:`Regular`,500:`Medium`,600:`SemiBold`,700:`Bold`,800:`ExtraBold`,900:`Black`,1e3:`UltraBlack`};var D=class{family;fullName;postscriptName;style;#e;#t;constructor({family:e,weight:t,isItalic:n,weightName:r}){this.family=e,this.#e=t,this.#t=n,this.style=r===`Regular`?n?`Italic`:`Regular`:r+(n?` Italic`:``),this.fullName=this.style===`Regular`?e:`${e} ${this.style}`,this.postscriptName=this.fullName.replace(/ /g,`-`)}async blob(){let e=await(await fetch(`https://fonts.googleapis.com/css2?family=${this.family}:${this.#t?`ital,`:``}wght@${this.#t?`1,`:``}${this.#e}`)).text();for(let t of[/\/\* latin-ext \*\/[\s\S]+url\(([^)]+)\)/,/\/\* latin \*\/[\s\S]+url\(([^)]+)\)/,/url\(([^)]+)\)/]){let n=e.match(t)?.[1];if(n){let e=await fetch(n);if(e.ok)return e.blob()}}throw Error(`Failed to load font blob`)}};function ae([e,t]){let n=[];for(let r of t){let t=``+r,i=t.endsWith(`i`),a=t.replace(`i`,``);if(a.includes(`a`)){let[t,r]=a.split(`a`).map(e=>parseInt(e)*100);for(let a=t;a<=r;a+=100)n.push(new D({family:e,weight:`${t}..${r}`,isItalic:i,weightName:E[a]}))}else n.push(new D({family:e,weight:`${a}00`,isItalic:i,weightName:E[parseInt(a)*100]}))}return n}let O=/* @__PURE__ */ new Map;async function k(){if(O.size===0){let e=await import(`./fonts-pE_hQFbP.js`);for(let t of e.default.flatMap(e=>ae(e)))O.set(t.postscriptName.toLowerCase().replace(/-/g,``),t)}return O}async function A({postscriptNames:e}={}){let t=await k();return e?e.length===0?[]:e.reduce((e,n)=>{let r=t.get(n.toLowerCase().replace(/regular$/,``).replace(/-reg$/,``).replace(/[- ]/g,``));return r&&e.push(r),e},[]):[...t.values()]}if(self.name.startsWith(`em-pthread`)){let e=self.name.split(`-`).slice(2).join(`-`),t=globalThis.fetch;globalThis.fetch=n=>t(e),self.name=`em-pthread`}async function j(e={}){var t=e,n=!0,r=!!globalThis.WorkerGlobalScope,i=(...e)=>console.log(...e),a=(...e)=>console.error(...e);function o(){s&&m()}var s=r&&globalThis.name==`em-pthread`;r&&(c=self.location.href);var c;if(n=!1,_=(e=>()=>{e(),self.HEAPU8RAW=(p(),P),self.WASMMEMORY=I})(_),i=e.__out||i,!self.name.startsWith(`em-pthread`)){let t=globalThis.Worker;globalThis.Worker=class extends t{constructor(t,n={}){super(t,{...n,name:`em-pthread-`+e.__url})}}}let l=Dr;Dr=function(){l(),$n=new Proxy({},{get(){return e=>ue(Q.toValue(e))}})};function u(e){throw e}class d{}class f extends d{}function p(){I.buffer!=v.buffer&&_()}var m;if(s){var h=!1;self.onunhandledrejection=e=>{throw e.reason||e};function e(n){try{var r=n.data,o=r.cmd;if(o==1){let n=[];self.onmessage=e=>n.push(e),m=()=>{postMessage({cmd:3});for(let t of n)e(t);self.onmessage=e};for(let e of r.handlers)(!t[e]||t[e].proxy)&&(t[e]=(...t)=>{postMessage({cmd:9,handler:e,args:t})},e==`print`&&(i=t[e]),e==`printErr`&&(a=t[e]));I=r.wasmMemory,_(),t.wasm=r.wasmModule,Dr()}else if(o==2){oe(r.pthread_ptr),ir(r.pthread_ptr,0,0,1,0,0),A.threadInitTLS(),Gt(r.pthread_ptr),h||=(rr(),!0);try{ce(r.start_routine,r.arg)}catch(e){if(e!=`unwind`)throw e}}else o==4?h&&Kt():o&&(a(`worker: received unknown command ${o}`),a(r))}catch(e){throw g&&or(),e}}self.onmessage=e}var g=!1;function ee(){var e=globalThis.navigator?.userAgent?.match(/Firefox\/(\d+)/);if(!e||Number(e[1])>=154)try{var t=I.toResizableBuffer();return p=()=>{},t}catch{}return I.buffer}function _(){if(!v?.buffer?.growable){var e=ee();v=new Int8Array(e),xe=new Int16Array(e),P=new Uint8Array(e),Se=new Uint16Array(e),k=new Int32Array(e),j=new Uint32Array(e),Ot=new Float32Array(e),w=new Float64Array(e),T=new BigInt64Array(e),Ce=new BigUint64Array(e)}}function te(){s||(I=new WebAssembly.Memory({initial:512,maximum:32768,shared:!0}),_())}te();var v,y=e=>{e.terminate(),e.onmessage=e=>{}},b=e=>{var t=A.pthreads[e];A.returnWorkerToPool(t)},x=e=>{for(;e.length>0;)e.shift()(t)},ne=[],re=e=>{var t=A.getNewWorker();if(!t)return 6;A.pthreads[e.pthread_ptr]=t,t.pthread_ptr=e.pthread_ptr;var n={cmd:2,start_routine:e.startRoutine,arg:e.arg,pthread_ptr:e.pthread_ptr};return t.postMessage(n,e.transferList),0},S=()=>_r(),C=e=>hr(e),ie=e=>gr(e),w,T,E=(e,t,n,...r)=>{var i=8*r.length*2,a=S(),o=ie(i),s=o>>3;for(var c of r)typeof c==`bigint`?((p(),T)[s++]=1n,(p(),T)[s++]=c):((p(),T)[s++]=0n,(p(),w)[s++]=c);var l=cr(e,t,i,o,n);return C(a),l};function D(e){if(s)return E(0,0,1,e);throw`exit(${e})`}var ae=D,O=!Atomics.waitAsync||globalThis.navigator?.userAgent&&Number((navigator.userAgent.match(/Chrom(e|ium)\/([0-9]+)\./)||[])[2])<91,k,A={unusedWorkers:[],tlsInitFunctions:[],pthreads:{},init(){s||A.initMainThread()},initMainThread(){for(var t=e.__poolSize|0;t--;)A.allocateUnusedWorker()},terminateAllThreads:()=>{for(var e of Object.values(A.pthreads))y(e);for(var e of A.unusedWorkers)y(e);A.unusedWorkers=[],A.pthreads={}},clearMailboxAwait:e=>{O||Atomics.notify((p(),k),e>>2)},terminateRuntime:()=>{A.terminateAllThreads();var e=er();ar(0,0,0,1),A.clearMailboxAwait(e)},returnWorkerToPool:e=>{var t=e.pthread_ptr;delete A.pthreads[t],A.unusedWorkers.push(e),e.pthread_ptr=0,A.clearMailboxAwait(t),lr(t)},threadInitTLS(){A.tlsInitFunctions.forEach(e=>e())},loadWasmModuleToWorker:e=>new Promise(n=>{e.onmessage=r=>{var i=r.data,o=i.cmd;if(i.targetThread&&i.targetThread!=er())A.pthreads[i.targetThread]?.postMessage(i);else if(i===`setimmediate`||i===`_si`)e.postMessage(i);else switch(o){case 4:Kt();break;case 5:re(i);break;case 6:Wt(()=>b(i.thread));break;case 3:n(e);break;case 9:t[i.handler](...i.args);break;default:o&&a(`worker sent an unknown command ${o}`)}},e.onerror=e=>{throw a(`worker sent an error! ${e.filename}:${e.lineno}: ${e.message}`),e};var r=[];for(var i of[])t.propertyIsEnumerable(i)&&r.push(i);e.postMessage({cmd:1,handlers:r,wasmMemory:I,wasmModule:Er})}),async loadWasmModuleToAllWorkers(){if(!s)return Promise.all(A.unusedWorkers.map(A.loadWasmModuleToWorker))},allocateUnusedWorker(){var e=new Worker(new URL(
|
|
2
|
-
/* @vite-ignore */
|
|
3
|
-
new URL(`jassub-worker-CoxWGl20.js`,import.meta.url).href,``+import.meta.url),{type:`module`,name:`em-pthread`});return A.unusedWorkers.push(e),e},getNewWorker(){if(A.unusedWorkers.length==0){var e=A.allocateUnusedWorker();A.loadWasmModuleToWorker(e)}return A.unusedWorkers.pop()}},j;function oe(e){var t=(p(),j)[e+48>>2],n=t-(p(),j)[e+52>>2];mr(t,n),C(t)}var se=[],M=e=>{var t=se[e];return t||(se[e]=t=vr.get(e)),t},ce=(e,t)=>{var n=M(e)(t);function r(e){ur(e)}r(n)},N=e=>{for(var t=0,n=0;n<e.length;++n){var r=e.charCodeAt(n);r<=127?t++:r<=2047?t+=2:r>=55296&&r<=57343?(t+=4,++n):t+=3}return t},le=(e,t,n,r)=>{if(!(r>0))return 0;for(var i=n,a=n+r-1,o=0;o<e.length;++o){var s=e.codePointAt(o);if(s<=127){if(n>=a)break;t[n++]=s}else if(s<=2047){if(n+1>=a)break;t[n++]=192|s>>6,t[n++]=128|s&63}else if(s<=65535){if(n+2>=a)break;t[n++]=224|s>>12,t[n++]=128|s>>6&63,t[n++]=128|s&63}else{if(n+3>=a)break;t[n++]=240|s>>18,t[n++]=128|s>>12&63,t[n++]=128|s>>6&63,t[n++]=128|s&63,o++}}return t[n]=0,n-i},P,F=(e,t,n)=>le(e,(p(),P),t,n),ue=e=>{var t=N(e)+1,n=tr(t);return n&&F(e,n,t),n},I,L=new TextDecoder,de=(e,t,n,r)=>{var i=t+n;if(r)return i;for(;e[t]&&!(t>=i);)++t;return t},R=(e,t,n)=>{if(!e)return``;var r=de((p(),P),e,t,n);return L.decode((p(),P).slice(e,r))},z=(e,t,n,r)=>u(`Assertion failed: ${R(e)}, at: `+[t?R(t):`unknown filename`,n,r?R(r):`unknown function`]);function fe(e,t,n,r){return s?E(1,0,1,e,t,n,r):me(e,t,n,r)}var pe=()=>!!globalThis.SharedArrayBuffer,me=(e,t,n,r)=>{if(!pe())return 6;var i=[];if(s&&!i.length)return fe(e,t,n,r);var a={startRoutine:n,pthread_ptr:e,arg:r,transferList:i};return s?(a.cmd=5,postMessage(a,i),0):re(a)};function B(e,t,n){return s?E(2,0,1,e,t,n):0}function he(e,t,n){if(s)return E(3,0,1,e,t,n)}function ge(e,t,n){return s?E(4,0,1,e,t,n):0}function _e(e,t,n,r){if(s)return E(5,0,1,e,t,n,r)}var ve=()=>u(``),V=e=>{for(var t=``;;){var n=(p(),P)[e++];if(!n)return t;t+=String.fromCharCode(n)}},H={},U={},ye={};class W extends Error{constructor(e){super(e),this.name=`BindingError`}}var G=e=>{throw new W(e)};function be(e,t,n={}){var r=t.name;if(e||G(`type "${r}" must have a positive integer typeid pointer`),U.hasOwnProperty(e)){if(n.ignoreDuplicateRegistrations)return;G(`Cannot register type '${r}' twice`)}if(U[e]=t,delete ye[e],H.hasOwnProperty(e)){var i=H[e];delete H[e],i.forEach(e=>e())}}function K(e,t,n={}){return be(e,t,n)}var xe,Se,Ce,we=(e,t,n)=>{switch(t){case 1:return n?e=>(p(),v)[e]:e=>(p(),P)[e];case 2:return n?e=>(p(),xe)[e>>1]:e=>(p(),Se)[e>>1];case 4:return n?e=>(p(),k)[e>>2]:e=>(p(),j)[e>>2];case 8:return n?e=>(p(),T)[e>>3]:e=>(p(),Ce)[e>>3];default:throw TypeError(`invalid integer width (${t}): ${e}`)}},Te=(e,t,n,r,i)=>{t=V(t);let a=r===0n,o=e=>e;if(a){let e=n*8;o=t=>BigInt.asUintN(e,t),i=o(i)}K(e,{name:t,fromWireType:o,toWireType:(e,t)=>(typeof t==`number`&&(t=BigInt(t)),t),readValueFromPointer:we(t,n,!a),destructorFunction:null})},Ee=(e,t,n,r)=>{t=V(t),K(e,{name:t,fromWireType:function(e){return!!e},toWireType:function(e,t){return t?n:r},readValueFromPointer:function(e){return this.fromWireType((p(),P)[e])},destructorFunction:null})},De=e=>({count:e.count,deleteScheduled:e.deleteScheduled,preservePointerOnDelete:e.preservePointerOnDelete,ptr:e.ptr,ptrType:e.ptrType,smartPtr:e.smartPtr,smartPtrType:e.smartPtrType}),Oe=e=>{function t(e){return e.$$.ptrType.registeredClass.name}G(t(e)+` instance already deleted`)},ke=!1,Ae=e=>{},je=e=>{e.smartPtr?e.smartPtrType.rawDestructor(e.smartPtr):e.ptrType.registeredClass.rawDestructor(e.ptr)},Me=e=>{--e.count.value,e.count.value===0&&je(e)},q=e=>globalThis.FinalizationRegistry?(ke=new FinalizationRegistry(e=>{Me(e.$$)}),q=e=>{var t=e.$$;if(t.smartPtr){var n={$$:t};ke.register(e,n,e)}return e},Ae=e=>ke.unregister(e),q(e)):(q=e=>e,e),Ne=[],Pe=()=>{for(;Ne.length;){var e=Ne.pop();e.$$.deleteScheduled=!1,e.delete()}},Fe,Ie=()=>{let e=Le.prototype;Object.assign(e,{isAliasOf(e){if(!(this instanceof Le)||!(e instanceof Le))return!1;var t=this.$$.ptrType.registeredClass,n=this.$$.ptr;e.$$=e.$$;for(var r=e.$$.ptrType.registeredClass,i=e.$$.ptr;t.baseClass;)n=t.upcast(n),t=t.baseClass;for(;r.baseClass;)i=r.upcast(i),r=r.baseClass;return t===r&&n===i},clone(){if(this.$$.ptr||Oe(this),this.$$.preservePointerOnDelete)return this.$$.count.value+=1,this;var e=q(Object.create(Object.getPrototypeOf(this),{$$:{value:De(this.$$)}}));return e.$$.count.value+=1,e.$$.deleteScheduled=!1,e},delete(){this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&G(`Object already scheduled for deletion`),Ae(this),Me(this.$$),this.$$.preservePointerOnDelete||(this.$$.smartPtr=void 0,this.$$.ptr=void 0)},isDeleted(){return!this.$$.ptr},deleteLater(){return this.$$.ptr||Oe(this),this.$$.deleteScheduled&&!this.$$.preservePointerOnDelete&&G(`Object already scheduled for deletion`),Ne.push(this),Ne.length===1&&Fe&&Fe(Pe),this.$$.deleteScheduled=!0,this}});let t=Symbol.dispose;t&&(e[t]=e.delete)};function Le(){}var Re=(e,t)=>Object.defineProperty(t,"name",{value:e}),ze={},Be=(e,t,n)=>{if(e[t].overloadTable===void 0){var r=e[t];e[t]=function(...r){return e[t].overloadTable.hasOwnProperty(r.length)||G(`Function '${n}' called with an invalid number of arguments (${r.length}) - expects one of (${e[t].overloadTable})!`),e[t].overloadTable[r.length].apply(this,r)},e[t].overloadTable=[],e[t].overloadTable[r.argCount]=r}},Ve=(e,n,r)=>{t.hasOwnProperty(e)?((r===void 0||t[e].overloadTable!==void 0&&t[e].overloadTable[r]!==void 0)&&G(`Cannot register public name '${e}' twice`),Be(t,e,e),t[e].overloadTable.hasOwnProperty(r)&&G(`Cannot register multiple overloads of a function with the same number of arguments (${r})!`),t[e].overloadTable[r]=n):(t[e]=n,t[e].argCount=r)},He=48,Ue=57,We=e=>{e=e.replace(/[^a-zA-Z0-9_]/g,`$`);var t=e.charCodeAt(0);return t>=He&&t<=Ue?`_${e}`:e};function Ge(e,t,n,r,i,a,o,s){this.name=e,this.constructor=t,this.instancePrototype=n,this.rawDestructor=r,this.baseClass=i,this.getActualType=a,this.upcast=o,this.downcast=s,this.pureVirtualFunctions=[]}var Ke=(e,t,n)=>{for(;t!==n;)t.upcast||G(`Expected null or instance of ${n.name}, got an instance of ${t.name}`),e=t.upcast(e),t=t.baseClass;return e},qe=e=>{if(e===null)return`null`;var t=typeof e;return t===`object`||t===`array`||t===`function`?e.toString():``+e};function Je(e,t){if(t===null)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${qe(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ke(t.$$.ptr,n,this.registeredClass)}function Ye(e,t){var n;if(t===null)return this.isReference&&G(`null is not a valid ${this.name}`),this.isSmartPointer?(n=this.rawConstructor(),e!==null&&e.push(this.rawDestructor,n),n):0;t&&t.$$||G(`Cannot pass "${qe(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),!this.isConst&&t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);var r=t.$$.ptrType.registeredClass;if(n=Ke(t.$$.ptr,r,this.registeredClass),this.isSmartPointer)switch(t.$$.smartPtr===void 0&&G(`Passing raw pointer to smart pointer is illegal`),this.sharingPolicy){case 0:t.$$.smartPtrType===this?n=t.$$.smartPtr:G(`Cannot convert argument of type ${t.$$.smartPtrType?t.$$.smartPtrType.name:t.$$.ptrType.name} to parameter type ${this.name}`);break;case 1:n=t.$$.smartPtr;break;case 2:if(t.$$.smartPtrType===this)n=t.$$.smartPtr;else{var i=t.clone();n=this.rawShare(n,Q.toHandle(()=>i.delete())),e!==null&&e.push(this.rawDestructor,n)}break;default:G(`Unsupported sharing policy`)}return n}function Xe(e,t){if(t===null)return this.isReference&&G(`null is not a valid ${this.name}`),0;t.$$||G(`Cannot pass "${qe(t)}" as a ${this.name}`),t.$$.ptr||G(`Cannot pass deleted object as a pointer of type ${this.name}`),t.$$.ptrType.isConst&&G(`Cannot convert argument of type ${t.$$.ptrType.name} to parameter type ${this.name}`);var n=t.$$.ptrType.registeredClass;return Ke(t.$$.ptr,n,this.registeredClass)}function Ze(e){return this.fromWireType((p(),j)[e>>2])}var Qe=(e,t,n)=>{if(t===n)return e;if(n.baseClass===void 0)return null;var r=Qe(e,t,n.baseClass);return r===null?null:n.downcast(r)},$e={},et=(e,t)=>{for(t===void 0&&G(`ptr should not be undefined`);e.baseClass;)t=e.upcast(t),e=e.baseClass;return t},tt=(e,t)=>(t=et(e,t),$e[t]);class nt extends Error{constructor(e){super(e),this.name=`InternalError`}}var rt=e=>{throw new nt(e)},it=(e,t)=>(t.ptrType&&t.ptr||rt(`makeClassHandle requires ptr and ptrType`),!!t.smartPtrType!=!!t.smartPtr&&rt(`Both smartPtrType and smartPtr must be specified`),t.count={value:1},q(Object.create(e,{$$:{value:t,writable:!0}})));function at(e){var t=this.getPointee(e);if(!t)return this.destructor(e),null;var n=tt(this.registeredClass,t);if(n!==void 0){if(n.$$.count.value===0)return n.$$.ptr=t,n.$$.smartPtr=e,n.clone();var r=n.clone();return this.destructor(e),r}function i(){return this.isSmartPointer?it(this.registeredClass.instancePrototype,{ptrType:this.pointeeType,ptr:t,smartPtrType:this,smartPtr:e}):it(this.registeredClass.instancePrototype,{ptrType:this,ptr:e})}var a=ze[this.registeredClass.getActualType(t)];if(!a)return i.call(this);var o=this.isConst?a.constPointerType:a.pointerType,s=Qe(t,this.registeredClass,o.registeredClass);return s===null?i.call(this):this.isSmartPointer?it(o.registeredClass.instancePrototype,{ptrType:o,ptr:s,smartPtrType:this,smartPtr:e}):it(o.registeredClass.instancePrototype,{ptrType:o,ptr:s})}var ot=()=>{Object.assign(st.prototype,{getPointee(e){return this.rawGetPointee&&(e=this.rawGetPointee(e)),e},destructor(e){this.rawDestructor?.(e)},readValueFromPointer:Ze,fromWireType:at})};function st(e,t,n,r,i,a,o,s,c,l,u){this.name=e,this.registeredClass=t,this.isReference=n,this.isConst=r,this.isSmartPointer=i,this.pointeeType=a,this.sharingPolicy=o,this.rawGetPointee=s,this.rawConstructor=c,this.rawShare=l,this.rawDestructor=u,!i&&t.baseClass===void 0?r?(this.toWireType=Je,this.destructorFunction=null):(this.toWireType=Xe,this.destructorFunction=null):this.toWireType=Ye}var ct=(e,n,r)=>{t.hasOwnProperty(e)||rt(`Replacing nonexistent public symbol`),t[e].overloadTable!==void 0&&r!==void 0?t[e].overloadTable[r]=n:(t[e]=n,t[e].argCount=r)},J=(e,t,n=!1)=>{e=V(e);function r(){return M(t)}var i=r();return typeof i!=`function`&&G(`unknown function pointer with signature ${e}: ${t}`),i};class lt extends Error{}var ut=e=>{var t=nr(e),n=V(t);return $(t),n},Y=(e,t)=>{var n=[],r={};function i(e){r[e]||U[e]||(ye[e]?ye[e].forEach(i):(n.push(e),r[e]=!0))}throw t.forEach(i),new lt(`${e}: `+n.map(ut).join([`, `]))},X=(e,t,n)=>{e.forEach(e=>ye[e]=t);function r(t){var r=n(t);r.length!==e.length&&rt(`Mismatched type converter count`);for(var i=0;i<e.length;++i)K(e[i],r[i])}var i=Array(t.length),a=[],o=0;for(let[e,n]of t.entries())U.hasOwnProperty(n)?i[e]=U[n]:(a.push(n),H.hasOwnProperty(n)||(H[n]=[]),H[n].push(()=>{i[e]=U[n],++o,o===a.length&&r(i)}));a.length===0&&r(i)},dt=(e,t,n,r,i,a,o,s,c,l,u,d,f)=>{u=V(u),a=J(i,a),s&&=J(o,s),l&&=J(c,l),f=J(d,f);var p=We(u);Ve(p,function(){Y(`Cannot construct ${u} due to unbound types`,[r])}),X([e,t,n],r?[r]:[],t=>{t=t[0];var n,i;r?(n=t.registeredClass,i=n.instancePrototype):i=Le.prototype;var o=Re(u,function(...e){if(Object.getPrototypeOf(this)!==c)throw new W(`Use 'new' to construct ${u}`);if(d.constructor_body===void 0)throw new W(`${u} has no accessible constructor`);var t=d.constructor_body[e.length];if(t===void 0)throw new W(`Tried to invoke ctor of ${u} with invalid number of parameters (${e.length}) - expected (${Object.keys(d.constructor_body).toString()}) parameters instead!`);return t.apply(this,e)}),c=Object.create(i,{constructor:{value:o}});o.prototype=c;var d=new Ge(u,o,c,f,n,a,s,l);d.baseClass&&(d.baseClass.__derivedClasses??=[],d.baseClass.__derivedClasses.push(d));var m=new st(u,d,!0,!1,!1),h=new st(u+`*`,d,!1,!1,!1),g=new st(u+` const*`,d,!1,!0,!1);return ze[e]={pointerType:h,constPointerType:g},ct(p,o),[m,h,g]})},ft=(e,t)=>{for(var n=[],r=0;r<e;r++)n.push((p(),j)[t+r*4>>2]);return n},pt=e=>{for(;e.length;){var t=e.pop();e.pop()(t)}};function mt(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].destructorFunction===void 0)return!0;return!1}function ht(e){for(var t=1;t<e.length;++t)if(e[t]!==null&&e[t].argStackAlloc)return!0;return!1}var gt={ftfnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){return a(n(r,s(null,e),c(null,t),l(null,i)))}},tffn:function(e,t,n,r,i,a,o){return function(){n(r,o(null,this))}},tffnn:function(e,t,n,r,i,a,o,s){return function(e){n(r,o(null,this),s(null,e))}},tffnnnnn:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t,i,a){n(r,o(null,this),s(null,e),c(null,t),l(null,i),u(null,a))}},tffnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){n(r,o(null,this),s(null,e),c(null,t))}},ttfnn:function(e,t,n,r,i,a,o,s){return function(e){return a(n(r,o(null,this),s(null,e)))}},tffnt:function(e,t,n,r,i,a,o,s,c){return function(e){var t=o(null,this),i=s(null,e);n(r,t,i),c(i)}},tffntnn:function(e,t,n,r,i,a,o,s,c,l,u){return function(e,t,i){var a=o(null,this),d=s(null,e);n(r,a,d,c(null,t),l(null,i)),u(d)}},tffnnnn:function(e,t,n,r,i,a,o,s,c,l){return function(e,t,i){n(r,o(null,this),s(null,e),c(null,t),l(null,i))}},ttfn:function(e,t,n,r,i,a,o){return function(){return a(n(r,o(null,this)))}},ttfnnn:function(e,t,n,r,i,a,o,s,c){return function(e,t){return a(n(r,o(null,this),s(null,e),c(null,t)))}}};function _t(e,t,n,r){let i=[t?`t`:`f`,n?`t`:`f`,r?`t`:`f`];for(let n=t?1:2;n<e.length;++n){let t=e[n],r=``;r=t.argStackAlloc?`s`:t.destructorFunction===void 0?`u`:t.destructorFunction===null?`n`:`t`,i.push(r)}return i.join(``)}function vt(e,t,n,r,i,a){var o=t.length;o<2&&G(`argTypes array size mismatch! Must at least get return value and receiver (this) types!`);var s=t[1]!==null&&n!==null,c=mt(t),l=ht(t),u=l&&!a&&!c;l&&!u&&(c=!0);var d=!t[0].isVoid,f=t[0],p=t[1],m=[e,G,r,i,pt,f.fromWireType.bind(f),p?.toWireType.bind(p)];u&&m.push(S,C);for(var h=2;h<o;++h){var g=t[h];m.push(g.toWireType.bind(g))}if(!c)for(var h=s?1:2;h<t.length;++h)t[h].destructorFunction!==null&&m.push(t[h].destructorFunction);return Re(e,gt[_t(t,s,d,a)](...m))}var yt=(e,t,n,r,i,a)=>{var o=ft(t,n);i=J(r,i),X([],[e],e=>{e=e[0];var n=`constructor ${e.name}`;if(e.registeredClass.constructor_body===void 0&&(e.registeredClass.constructor_body=[]),e.registeredClass.constructor_body[t-1]!==void 0)throw new W(`Cannot register multiple constructors with identical number of parameters (${t-1}) for class '${e.name}'! Overload resolution is currently only performed using the parameter count, not actual type info!`);return e.registeredClass.constructor_body[t-1]=()=>{Y(`Cannot construct ${e.name} due to unbound types`,o)},X([],o,r=>(r.splice(1,0,null),e.registeredClass.constructor_body[t-1]=vt(n,r,null,i,a),[])),[]})},bt=e=>{e=e.trim();let t=e.indexOf(`(`);return t===-1?e:e.slice(0,t)},xt=(e,t,n,r,i,a,o,s,c,l)=>{var u=ft(n,r);t=V(t),t=bt(t),a=J(i,a,c),X([],[e],e=>{e=e[0];var r=`${e.name}.${t}`;t.startsWith(`@@`)&&(t=Symbol[t.substring(2)]),s&&e.registeredClass.pureVirtualFunctions.push(t);function i(){Y(`Cannot call ${r} due to unbound types`,u)}var l=e.registeredClass.instancePrototype,d=l[t];return d===void 0||d.overloadTable===void 0&&d.className!==e.name&&d.argCount===n-2?(i.argCount=n-2,i.className=e.name,l[t]=i):(Be(l,t,r),l[t].overloadTable[n-2]=i),X([],u,i=>{var s=vt(r,i,e,a,o,c);return l[t].overloadTable===void 0?(s.argCount=n-2,l[t]=s):l[t].overloadTable[n-2]=s,[]}),[]})},St=(e,t,n)=>(e instanceof Object||G(`${n} with invalid "this": ${e}`),e instanceof t.registeredClass.constructor||G(`${n} incompatible with "this" of type ${e.constructor.name}`),e.$$.ptr||G(`cannot call emscripten binding method ${n} on deleted object`),Ke(e.$$.ptr,e.$$.ptrType.registeredClass,t.registeredClass)),Ct=(e,t,n,r,i,a,o,s,c,l)=>{t=V(t),i=J(r,i),X([],[e],e=>{e=e[0];var r=`${e.name}.${t}`,u={get(){Y(`Cannot access ${r} due to unbound types`,[n,o])},enumerable:!0,configurable:!0};return u.set=c?()=>Y(`Cannot access ${r} due to unbound types`,[n,o]):e=>G(r+` is a read-only property`),Object.defineProperty(e.registeredClass.instancePrototype,t,u),X([],c?[n,o]:[n],n=>{var o=n[0],u={get(){var t=St(this,e,r+` getter`);return o.fromWireType(i(a,t))},enumerable:!0};if(c){c=J(s,c);var d=n[1];u.set=function(t){var n=St(this,e,r+` setter`),i=[];c(l,n,d.toWireType(i,t)),pt(i)}}return Object.defineProperty(e.registeredClass.instancePrototype,t,u),[]}),[]})},wt=[],Z=[0,1,,1,null,1,!0,1,!1,1],Tt=e=>{e>9&&--Z[e+1]===0&&(Z[e],Z[e]=void 0,wt.push(e))},Q={toValue:e=>(e||G(`Cannot use deleted val. handle = ${e}`),Z[e]),toHandle:e=>{switch(e){case void 0:return 2;case null:return 4;case!0:return 6;case!1:return 8;default:{let t=wt.pop()||Z.length;return Z[t]=e,Z[t+1]=1,t}}}},Et={name:`emscripten::val`,fromWireType:e=>{var t=Q.toValue(e);return Tt(e),t},toWireType:(e,t)=>Q.toHandle(t),readValueFromPointer:Ze,destructorFunction:null},Dt=e=>K(e,Et),Ot,kt=(e,t)=>{switch(t){case 4:return function(e){return this.fromWireType((p(),Ot)[e>>2])};case 8:return function(e){return this.fromWireType((p(),w)[e>>3])};default:throw TypeError(`invalid float width (${t}): ${e}`)}},At=(e,t,n)=>{t=V(t),K(e,{name:t,fromWireType:e=>e,toWireType:(e,t)=>t,readValueFromPointer:kt(t,n),destructorFunction:null})},jt=(e,t,n,r,i)=>{t=V(t);let a=r===0,o=e=>e;if(a){var s=32-8*n;o=e=>e<<s>>>s,i=o(i)}K(e,{name:t,fromWireType:o,toWireType:(e,t)=>t,readValueFromPointer:we(t,n,r!==0),destructorFunction:null})},Mt=(e,t,n)=>{var r=[Int8Array,Uint8Array,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array,BigInt64Array,BigUint64Array][t];function i(e){var t=(p(),j)[e>>2],n=(p(),j)[e+4>>2];return new r((p(),v).buffer,n,t)}n=V(n),K(e,{name:n,fromWireType:i,readValueFromPointer:i},{ignoreDuplicateRegistrations:!0})},Nt=(e,t)=>{t=V(t);var n=!0;K(e,{name:t,fromWireType(e){var t=(p(),j)[e>>2],r=e+4,i;if(n)i=R(r,t,!0);else{i=``;for(var a=0;a<t;++a)i+=String.fromCharCode((p(),P)[r+a])}return $(e),i},toWireType(e,t){t instanceof ArrayBuffer&&(t=new Uint8Array(t));var r,i=typeof t==`string`;i||ArrayBuffer.isView(t)&&t.BYTES_PER_ELEMENT==1||G(`Cannot pass non-string to std::string`),r=n&&i?N(t):t.length;var a=tr(4+r+1),o=a+4;if((p(),j)[a>>2]=r,i){if(n)F(t,o,r+1);else for(var s=0;s<r;++s){var c=t.charCodeAt(s);c>255&&($(a),G(`String has UTF-16 code units that do not fit in 8 bits`)),(p(),P)[o+s]=c}}else(p(),P).set(t,o);return e!==null&&e.push($,a),a},readValueFromPointer:Ze,destructorFunction(e){$(e)}})},Pt=new TextDecoder(`utf-16le`),Ft=(e,t,n)=>{var r=e>>1,i=de((p(),Se),r,t/2,n);return Pt.decode((p(),Se).slice(r,i))},It=(e,t,n=2147483647)=>{if(n<2)return 0;n-=2;for(var r=t,i=n<e.length*2?n/2:e.length,a=0;a<i;++a){var o=e.charCodeAt(a);(p(),xe)[t>>1]=o,t+=2}return(p(),xe)[t>>1]=0,t-r},Lt=e=>e.length*2,Rt=(e,t,n)=>{for(var r=``,i=e>>2,a=0;!(a>=t/4);a++){var o=(p(),j)[i+a];if(!o&&!n)break;r+=String.fromCodePoint(o)}return r},zt=(e,t,n=2147483647)=>{if(n<4)return 0;for(var r=t,i=r+n-4,a=0;a<e.length;++a){var o=e.codePointAt(a);if(o>65535&&a++,(p(),k)[t>>2]=o,t+=4,t+4>i)break}return(p(),k)[t>>2]=0,t-r},Bt=e=>{for(var t=0,n=0;n<e.length;++n)e.codePointAt(n)>65535&&n++,t+=4;return t},Vt=(e,t,n)=>{n=V(n);var r,i,a;t===2?(r=Ft,i=It,a=Lt):(r=Rt,i=zt,a=Bt),K(e,{name:n,fromWireType:e=>{var n=(p(),j)[e>>2],i=r(e+4,n*t,!0);return $(e),i},toWireType:(e,r)=>{typeof r!=`string`&&G(`Cannot pass non-string to C++ string type ${n}`);var o=a(r),s=tr(4+o+t);return(p(),j)[s>>2]=o/t,i(r,s+4,o+t),e!==null&&e.push($,s),s},readValueFromPointer:Ze,destructorFunction(e){$(e)}})},Ht=(e,t)=>{t=V(t),K(e,{isVoid:!0,name:t,fromWireType:()=>void 0,toWireType:(e,t)=>void 0})},Ut=e=>{ir(e,!r,1,!n,262144,!1),A.threadInitTLS()},Wt=(e,...t)=>{e(...t)},Gt=e=>{if(!O){Atomics.waitAsync((p(),k),e>>2,e).value.then(Kt);var t=e+112;Atomics.store((p(),k),t>>2,1)}},Kt=()=>{var e=er();e&&Wt(()=>{Gt(e),fr()})},qt=(e,t)=>{if(e==t)setTimeout(Kt);else if(s)postMessage({targetThread:e,cmd:4});else{var n=A.pthreads[e];if(!n)return;n.postMessage({cmd:4})}},Jt=[],Yt=(e,t,n,r,i,a,o)=>{Jt.length=0;for(var s=i>>3,c=i+r>>3;s<c;){var l=(p(),T)[s++]?(p(),T)[s++]:(p(),w)[s++];Jt.push(l)}var u=t?$n[t]:Qn[e];A.currentProxiedOperationCallerThread=n;var d=u(...Jt);if(A.currentProxiedOperationCallerThread=0,a)Promise.resolve(d).then(e=>sr(a,o,e));else return d},Xt=()=>{},Zt=e=>{s?postMessage({cmd:6,thread:e}):b(e)},Qt=e=>{},$t=()=>{throw new f},en=[],tn=e=>{var t=en.length;return en.push(e),t},nn=(e,t)=>{var n=U[e];return n===void 0&&G(`${t} has unknown type ${ut(e)}`),n},rn=(e,t)=>{for(var n=Array(e),r=0;r<e;++r)n[r]=nn((p(),j)[t+r*4>>2],`parameter ${r}`);return n},an=(e,t,n)=>{var r=[],i=e(r,n);return r.length&&((p(),j)[t>>2]=Q.toHandle(r)),i},on={},sn=e=>{var t=on[e];return t===void 0?V(e):t},cn=(e,t,n)=>{var[r,...i]=rn(e,t),a=r.toWireType.bind(r),o=i.map(e=>e.readValueFromPointer.bind(e));e--;var s=Array(e);return tn(Re(`methodCaller<(${i.map(e=>e.name)}) => ${r.name}>`,(t,r,i,c)=>{for(var l=0,u=0;u<e;++u)s[u]=o[u](c+l),l+=8;var d;switch(n){case 0:d=Q.toValue(t).apply(null,s);break;case 2:d=Reflect.construct(Q.toValue(t),s);break;case 3:d=s[0];break;case 1:d=Q.toValue(t)[sn(r)](...s)}return an(a,i,d)}))},ln=(e,t)=>(e=Q.toValue(e),t=Q.toValue(t),Q.toHandle(e[t])),un=e=>{e>9&&(Z[e+1]+=1)},dn=(e,t,n,r,i)=>en[e](t,n,r,i),fn=()=>Q.toHandle([]),pn=e=>Q.toHandle(sn(e)),mn=()=>Q.toHandle({}),hn=e=>{pt(Q.toValue(e)),Tt(e)},gn=(e,t,n)=>{e=Q.toValue(e),t=Q.toValue(t),n=Q.toValue(n),e[t]=n},_n={},vn=()=>performance.timeOrigin+performance.now();function yn(e,t){return s?E(6,0,1,e,t):(_n[e]&&(clearTimeout(_n[e].id),delete _n[e]),t&&(_n[e]={id:setTimeout(()=>{delete _n[e],Wt(dr,e,vn())},t),timeout_ms:t}),0)}var bn=()=>Date.now(),xn=9007199254740992,Sn=-9007199254740992,Cn=e=>e<Sn||e>xn?NaN:Number(e),wn=[],Tn=(e,t)=>{wn.length=0;for(var n;n=(p(),P)[e++];){var r=n!=105;r&=n!=112,t+=r&&t%8?4:0,wn.push(n==112?(p(),j)[t>>2]:n==106?(p(),T)[t>>3]:n==105?(p(),k)[t>>2]:(p(),w)[t>>3]),t+=r?8:4}return wn},En=(e,t,n)=>{var r=Tn(t,n);return $n[e](...r)},Dn=(e,t,n)=>En(e,t,n),On=()=>{},kn=e=>a(R(e)),An=()=>{throw`unwind`},jn=()=>2147483648,Mn=()=>jn(),Nn=()=>navigator.hardwareConcurrency,Pn=(e,t)=>Math.ceil(e/t)*t,Fn=e=>{var t=(e-I.buffer.byteLength+65535)/65536|0;try{return I.grow(t),_(),1}catch{}},In=e=>{var t=(p(),P).length;if(e>>>=0,e<=t)return!1;var n=jn();if(e>n)return!1;for(var r=1;r<=4;r*=2){var i=t*(1+.2/r);if(i=Math.min(i,e+100663296),Fn(Math.min(n,Pn(Math.max(e,i),65536))))return!0}return!1},Ln={},Rn=()=>`./this.program`,zn=()=>{if(!zn.strings){var e={USER:`web_user`,LOGNAME:`web_user`,PATH:`/`,PWD:`/`,HOME:`/home/web_user`,LANG:(globalThis.navigator?.language??`C`).replace(`-`,`_`)+`.UTF-8`,_:Rn()};for(var t in Ln)Ln[t]===void 0?delete e[t]:e[t]=Ln[t];var n=[];for(var t in e)n.push(`${t}=${e[t]}`);zn.strings=n}return zn.strings};function Bn(e,t){if(s)return E(7,0,1,e,t);var n=0,r=0;for(var i of zn()){var a=t+n;(p(),j)[e+r>>2]=a,n+=F(i,a,1/0)+1,r+=4}return 0}function Vn(e,t){if(s)return E(8,0,1,e,t);var n=zn();(p(),j)[e>>2]=n.length;var r=0;for(var i of n)r+=N(i)+1;return(p(),j)[t>>2]=r,0}function Hn(e){return s?E(9,0,1,e):52}function Un(e,t,n,r){return s?E(10,0,1,e,t,n,r):52}function Wn(e,t,n,r){return s?E(11,0,1,e,t,n,r):(t=Cn(t),70)}var Gn=[null,[],[]],Kn=(e,t=0,n,r)=>{var i=de(e,t,n,r);return L.decode(e.buffer?e.buffer instanceof ArrayBuffer?e.subarray(t,i):e.slice(t,i):new Uint8Array(e.slice(t,i)))},qn=(e,t)=>{var n=Gn[e];!t||t===10?((e===1?i:a)(Kn(n)),n.length=0):n.push(t)};function Jn(e,t,n,r){if(s)return E(12,0,1,e,t,n,r);for(var i=0,a=0;a<n;a++){var o=(p(),j)[t>>2],c=(p(),j)[t+4>>2];t+=8;for(var l=0;l<c;l++)qn(e,(p(),P)[o+l]);i+=c}return(p(),j)[r>>2]=i,0}var Yn=()=>e=>(e.set(crypto.getRandomValues(new Uint8Array(e.byteLength))),0),Xn=e=>(Xn=Yn())(e),Zn=(e,t)=>Xn((p(),P).subarray(e,e+t));A.init(),Ie(),ot();var Qn=[D,fe,B,he,ge,_e,yn,Bn,Vn,Hn,Un,Wn,Jn],$n={614605:e=>ue(Q.toValue(e))},er,$,tr,nr,rr,ir,ar,or,sr,cr,lr,ur,dr,fr,pr,mr,hr,gr,_r,vr;function yr(e){t.__ZdlPvm=e.ha,er=e.ia,t.__Znwm=e.ja,$=e.ka,tr=t._malloc=e.la,t._calloc=e.ma,nr=e.na,rr=e.oa,t._emscripten_builtin_free=e.pa,e.qa,ir=e.sa,ar=e.ta,or=e.ua,t.___libc_free=e.va,t._emscripten_builtin_malloc=e.wa,t.___libc_malloc=e.xa,sr=e.ya,cr=e.za,lr=e.Aa,ur=e.Ba,dr=e.Ca,fr=e.Da,t.__ZdaPv=e.Ea,t.__ZdaPvm=e.Fa,t.__ZdlPv=e.Ga,t.__Znam=e.Ha,t.__ZnamSt11align_val_t=e.Ia,t.__ZnwmSt11align_val_t=e.Ja,t.___libc_calloc=e.Ka,t.___libc_realloc=e.La,t._emscripten_builtin_calloc=e.Ma,t._emscripten_builtin_realloc=e.Na,t._malloc_size=e.Oa,t._malloc_usable_size=e.Pa,t._reallocf=e.Qa,pr=e.Ra,mr=e.Sa,hr=e.Ta,gr=e.Ua,_r=e.Va,vr=e.ra}var br;function xr(){br={b:z,P:me,y:B,O:he,X:ge,z:_e,K:ve,B:Te,aa:Ee,fa:dt,ea:yt,d:xt,ca:Ct,_:Dt,A:At,l:jt,e:Mt,$:Nt,t:Vt,ba:Ht,S:Ut,L:qt,x:Yt,G:Xt,v:Zt,R:Gt,Z:Qt,E:$t,i:cn,c:Tt,da:ln,f:un,h:dn,p:fn,j:pn,s:mn,g:hn,k:gn,H:yn,n:Dn,w:On,m:bn,u:kn,Y:An,M:Mn,o:vn,N:Nn,I:In,T:Bn,U:Vn,q:ae,r:Hn,W:Un,Q:Wn,V:Jn,D:Sr,C:Cr,a:I,F:D,J:Zn}}function Sr(e,t,n){var r=S();try{return M(e)(t,n)}catch(e){if(C(r),!(e instanceof d))throw e;pr(1,0)}}function Cr(e,t,n,r,i){var a=S();try{return M(e)(t,n,r,i)}catch(e){if(C(a),!(e instanceof d))throw e;pr(1,0)}}function wr(e){g=!0,A.tlsInitFunctions.push(e.qa),!s&&e.ga()}var Tr,Er;function Dr(){xr();var e={a:br};Tr=WebAssembly.instantiateStreaming(fetch(new URL(new URL(`jassub-worker-CkfUMbe_.wasm`,import.meta.url).href,``+import.meta.url)),e).then(e=>{var n=(e.instance||e).exports;return Er=e.module||t.wasm,yr(n),x(ne),wr(n),A.loadWasmModuleToAllWorkers().then(o)})}return s||Dr(),await Tr,t}globalThis.name==`em-pthread`&&j();const oe=[`thin`,`extralight`,`light`,`regular`,`medium`,`semibold`,`bold`,`extrabold`,`black`,`ultrablack`],se=navigator.userAgent.toLowerCase(),M=se.includes(`firefox`),ce=/applewebkit\/[\d.]+ \(khtml, like gecko\)(?!.*chrome\/)/.test(se),N=`BT601`,le=`BT709`,P=`SMPTE240M`,F=[null,N,null,N,N,le,le,P,P,`FCC`,`FCC`],ue=globalThis.fetch;async function I(e){return await(await ue(e)).text()}const L=self.crossOriginIsolated?Math.min(Math.max(1,navigator.hardwareConcurrency-2),8):1,de=!!WebAssembly.Memory.prototype.toResizableBuffer,R=!M&&!ce&&(de||L>1),z=new Float32Array([1,0,0,0,1,0,0,0,1]),fe={BT601:{BT709:new Float32Array([1.0863,.0965,-.01411,-.0723,.8451,-.0277,-.0141,.0584,1.0418]),BT601:z},BT709:{BT601:new Float32Array([.9137,.0784,.0079,-.1049,1.1722,-.0671,.0096,.0322,.9582]),BT709:z},FCC:{BT709:new Float32Array([1.0873,-.0736,-.0137,.0974,.8494,.0531,-.0127,-.0251,1.0378]),BT601:new Float32Array([1.001,-8e-4,-2e-4,9e-4,1.005,-.006,.0013,.0027,.996])},SMPTE240M:{BT709:new Float32Array([.9993,6e-4,1e-4,-4e-4,.9812,.0192,-.0034,-.0114,1.0148]),BT601:new Float32Array([.913,.0774,.0096,-.1051,1.1508,-.0456,.0063,.0207,.973])}};function pe(e,t){return!e||!t?z:fe[e][t]}var me=class{canvas;_scheduledResize;constructor(e){this.canvas=e}resizeCanvas(e,t){e&&t&&(this.canvas.width!==e||this.canvas.height!==t)&&(this._scheduledResize={width:e,height:t})}applyScheduledResize(){if(!this._scheduledResize)return;let e=this._scheduledResize;return this._scheduledResize=void 0,this.canvas.width=e.width,this.canvas.height=e.height,e}};const B=e=>e<0?0:e>1?255:Math.round(e*255);var he=class extends me{ctx;bufferCanvas=new OffscreenCanvas(1,1);bufferCtx=this.bufferCanvas.getContext(`2d`,{alpha:!0,desynchronized:!0,willReadFrequently:!1});colorMatrix=z;constructor(e){if(super(e),this.ctx=e.getContext(`2d`,{alpha:!0,desynchronized:!0,willReadFrequently:!1}),!this.ctx||!this.bufferCtx)throw Error(`Could not get 2D context`)}setColorMatrix(e,t){this.colorMatrix=pe(e,t)}render(e,t){this.applyScheduledResize(),this.ctx.clearRect(0,0,this.canvas.width,this.canvas.height);for(let n of e){if(n.w<=0||n.h<=0)continue;let e=new ImageData(n.w,n.h),r=new Uint32Array(e.data.buffer),i=this.colorMatrix,a=(n.color>>>24&255)/255,o=(n.color>>>16&255)/255,s=(n.color>>>8&255)/255,c=B(i[0]*a+i[3]*o+i[6]*s),l=B(i[1]*a+i[4]*o+i[7]*s),u=B(i[2]*a+i[5]*o+i[8]*s)<<16|l<<8|c,d=(255-(n.color&255))/255,f=n.stride,p=n.h,m=n.w;for(let e=p+1,i=n.bitmap,a=0;--e;i+=f)for(let e=0;e<m;++e,++a){let n=t[i+e];n!==0&&(r[a]=Math.round(d*n)<<24|u)}this.bufferCanvas.width=m,this.bufferCanvas.height=p,this.bufferCtx.putImageData(e,0,0),this.ctx.drawImage(this.bufferCanvas,n.dst_x,n.dst_y)}}destroy(){this.ctx=this.bufferCtx=this.bufferCanvas=null}},ge=class extends me{gl;program;u_resolution=null;u_colorMatrix=null;colorMatrix=z;constructor(e){super(e),e.addEventListener(`webglcontextlost`,e=>{e.preventDefault(),this.gl=null}),e.addEventListener(`webglcontextrestored`,()=>this._initGL())}packAtlas(e,t,n=0,r=!1){let i=/* @__PURE__ */ new Map,a=0,o=0,s=0,c=0;for(let l of e){let{img:e,sourceKey:u}=l,d=l.packW??e.w,f=u&&i.get(u);f?(l.x=f.x,l.y=f.y,l.layer=f.layer):(o+d>t&&(o=0,s+=c+n,c=0),s+e.h>t&&(a++,o=0,s=0,c=0,r||(i=/* @__PURE__ */ new Map)),l.x=o,l.y=s,l.layer=a,c=Math.max(c,e.h),u&&i.set(u,l),o+=d+n)}return a+1}createProgram(e,t){let n=this.createShader(this.gl.VERTEX_SHADER,e),r=this.createShader(this.gl.FRAGMENT_SHADER,t),i=this.gl.createProgram();if(this.gl.attachShader(i,n),this.gl.attachShader(i,r),this.gl.linkProgram(i),!this.gl.getProgramParameter(i,this.gl.LINK_STATUS)){let e=this.gl.getProgramInfoLog(i);throw this.gl.deleteProgram(i),Error(`Failed to link program: `+e)}this.gl.deleteShader(n),this.gl.deleteShader(r),this.program=i}createShader(e,t){let n=this.gl.createShader(e);if(!n)throw Error(`Failed to create shader`);if(this.gl.shaderSource(n,t),this.gl.compileShader(n),!this.gl.getShaderParameter(n,this.gl.COMPILE_STATUS)){let e=this.gl.getShaderInfoLog(n);throw this.gl.deleteShader(n),Error(`Failed to compile shader: `+e)}return n}setColorMatrix(e,t){this.colorMatrix=pe(e,t),this.gl&&this.u_colorMatrix&&(this.gl.useProgram(this.program),this.gl.uniformMatrix3fv(this.u_colorMatrix,!1,this.colorMatrix))}beginFrame(e){let t=this.applyScheduledResize();return t&&(this.gl.viewport(0,0,t.width,t.height),this.gl.uniform2f(this.u_resolution,t.width,t.height)),this.gl.clear(this.gl.COLOR_BUFFER_BIT),e.length!==0||(this.gl.flush(),!1)}applyCommonState(e){this.gl.enable(this.gl.BLEND),this.gl.blendFunc(this.gl.ONE,this.gl.ONE_MINUS_SRC_ALPHA),this.gl.useProgram(this.program),this.gl.uniform1i(e,0),this.gl.uniformMatrix3fv(this.u_colorMatrix,!1,this.colorMatrix),this.gl.pixelStorei(this.gl.UNPACK_ALIGNMENT,1),this.gl.clearColor(0,0,0,0),this.gl.activeTexture(this.gl.TEXTURE0),this.gl.viewport(0,0,this.canvas.width,this.canvas.height),this.gl.uniform2f(this.u_resolution,this.canvas.width,this.canvas.height)}};const _e=268435456;var ve=class extends ge{instancedArraysExt;u_tex=null;u_atlasSize=null;a_quadPos=-1;a_destRect=-1;a_srcXY=-1;a_color=-1;quadPosBuffer;instanceDestRectBuffer;instanceSrcBuffer;instanceColorBuffer;instanceDestRectData=/* @__PURE__ */ new Float32Array(1024);instanceSrcData=/* @__PURE__ */ new Float32Array(512);instanceColorData=/* @__PURE__ */ new Float32Array(1024);instanceCapacity=0;atlasPages=[];atlasSize=0;maxTextureSize=0;uploadCache=/* @__PURE__ */ new Set;tightData=null;constructor(e){super(e),this._initGL()}_initGL(){let e=this.canvas.getContext(`webgl`,{alpha:!0,premultipliedAlpha:!0,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1,desynchronized:!0,powerPreference:`default`});if(!e)throw Error(`Could not get WebGL context`);if(this.gl=e,!e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT)?.precision)throw Error(`WebGL1 does not support highp texture coordinates`);this.atlasPages=[],this.atlasSize=0,this.uploadCache.clear(),this.maxTextureSize=e.getParameter(e.MAX_TEXTURE_SIZE);let t=this.gl.getExtension(`ANGLE_instanced_arrays`);if(!t)throw Error(`ANGLE_instanced_arrays extension not supported`);this.instancedArraysExt=t,this.createProgram(`
|
|
4
|
-
precision highp float;
|
|
5
|
-
|
|
6
|
-
// Quad position attribute (0,0), (1,0), (0,1), (1,0), (1,1), (0,1)
|
|
7
|
-
attribute vec2 a_quadPos;
|
|
8
|
-
|
|
9
|
-
uniform vec2 u_resolution;
|
|
10
|
-
uniform vec2 u_atlasSize;
|
|
11
|
-
|
|
12
|
-
// Instance attributes
|
|
13
|
-
attribute vec4 a_destRect; // x, y, w, h
|
|
14
|
-
attribute vec2 a_srcXY; // atlas x, y
|
|
15
|
-
attribute vec4 a_color; // r, g, b, a
|
|
16
|
-
|
|
17
|
-
varying highp vec2 v_quadPos;
|
|
18
|
-
varying highp vec2 v_srcUV;
|
|
19
|
-
varying highp vec2 v_sizeUV;
|
|
20
|
-
varying vec4 v_color;
|
|
21
|
-
|
|
22
|
-
void main() {
|
|
23
|
-
vec2 pixelPos = a_destRect.xy + a_quadPos * a_destRect.zw;
|
|
24
|
-
vec2 clipPos = (pixelPos / u_resolution) * 2.0 - 1.0;
|
|
25
|
-
clipPos.y = -clipPos.y;
|
|
26
|
-
|
|
27
|
-
gl_Position = vec4(clipPos, 0.0, 1.0);
|
|
28
|
-
v_quadPos = a_quadPos;
|
|
29
|
-
v_srcUV = a_srcXY / u_atlasSize;
|
|
30
|
-
v_sizeUV = a_destRect.zw / u_atlasSize;
|
|
31
|
-
v_color = a_color;
|
|
32
|
-
}
|
|
33
|
-
`,`
|
|
34
|
-
precision mediump float;
|
|
35
|
-
|
|
36
|
-
uniform sampler2D u_tex;
|
|
37
|
-
uniform mat3 u_colorMatrix;
|
|
38
|
-
|
|
39
|
-
varying highp vec2 v_quadPos;
|
|
40
|
-
varying highp vec2 v_srcUV;
|
|
41
|
-
varying highp vec2 v_sizeUV;
|
|
42
|
-
varying vec4 v_color;
|
|
43
|
-
|
|
44
|
-
void main() {
|
|
45
|
-
// The alpha channel contains the mask.
|
|
46
|
-
float mask = texture2D(u_tex, v_srcUV + v_quadPos * v_sizeUV).a;
|
|
47
|
-
|
|
48
|
-
// Apply color matrix conversion (identity if no conversion needed)
|
|
49
|
-
vec3 correctedColor = u_colorMatrix * v_color.rgb;
|
|
50
|
-
|
|
51
|
-
// libass color alpha: 0 = opaque, 255 = transparent (inverted)
|
|
52
|
-
float colorAlpha = 1.0 - v_color.a;
|
|
53
|
-
|
|
54
|
-
// Final alpha = colorAlpha * mask
|
|
55
|
-
float a = colorAlpha * mask;
|
|
56
|
-
|
|
57
|
-
// Premultiplied alpha output
|
|
58
|
-
gl_FragColor = vec4(correctedColor * a, a);
|
|
59
|
-
}
|
|
60
|
-
`),this.u_resolution=this.gl.getUniformLocation(this.program,`u_resolution`),this.u_tex=this.gl.getUniformLocation(this.program,`u_tex`),this.u_colorMatrix=this.gl.getUniformLocation(this.program,`u_colorMatrix`),this.u_atlasSize=this.gl.getUniformLocation(this.program,`u_atlasSize`),this.a_quadPos=this.gl.getAttribLocation(this.program,`a_quadPos`),this.a_destRect=this.gl.getAttribLocation(this.program,`a_destRect`),this.a_srcXY=this.gl.getAttribLocation(this.program,`a_srcXY`),this.a_color=this.gl.getAttribLocation(this.program,`a_color`),this.quadPosBuffer=this.gl.createBuffer(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quadPosBuffer);let n=new Float32Array([0,0,1,0,0,1,1,0,1,1,0,1]);this.gl.bufferData(this.gl.ARRAY_BUFFER,n,this.gl.STATIC_DRAW),this.instanceDestRectBuffer=this.gl.createBuffer(),this.instanceSrcBuffer=this.gl.createBuffer(),this.instanceColorBuffer=this.gl.createBuffer(),this.instanceCapacity=0,this.ensureInstanceCapacity(256),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.quadPosBuffer),this.gl.enableVertexAttribArray(this.a_quadPos),this.gl.vertexAttribPointer(this.a_quadPos,2,this.gl.FLOAT,!1,0,0),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceDestRectBuffer),this.gl.enableVertexAttribArray(this.a_destRect),this.gl.vertexAttribPointer(this.a_destRect,4,this.gl.FLOAT,!1,0,0),this.instancedArraysExt.vertexAttribDivisorANGLE(this.a_destRect,1),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceSrcBuffer),this.gl.enableVertexAttribArray(this.a_srcXY),this.gl.vertexAttribPointer(this.a_srcXY,2,this.gl.FLOAT,!1,0,0),this.instancedArraysExt.vertexAttribDivisorANGLE(this.a_srcXY,1),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceColorBuffer),this.gl.enableVertexAttribArray(this.a_color),this.gl.vertexAttribPointer(this.a_color,4,this.gl.FLOAT,!1,0,0),this.instancedArraysExt.vertexAttribDivisorANGLE(this.a_color,1),this.applyCommonState(this.u_tex),this.gl.uniform2f(this.u_atlasSize,1,1)}ensureInstanceCapacity(e){e<=this.instanceCapacity||(this.instanceCapacity=Math.max(e,this.instanceCapacity*2,256),this.instanceDestRectData=new Float32Array(this.instanceCapacity*4),this.instanceSrcData=new Float32Array(this.instanceCapacity*2),this.instanceColorData=new Float32Array(this.instanceCapacity*4),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceDestRectBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.instanceCapacity*16,this.gl.DYNAMIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceSrcBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.instanceCapacity*8,this.gl.DYNAMIC_DRAW),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceColorBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.instanceCapacity*16,this.gl.DYNAMIC_DRAW))}createAtlasPage(e){let t=this.gl.createTexture();return this.gl.bindTexture(this.gl.TEXTURE_2D,t),this.gl.texImage2D(this.gl.TEXTURE_2D,0,this.gl.ALPHA,e,e,0,this.gl.ALPHA,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),t}ensureAtlas(e,t){if(this.atlasSize!==e){for(let e of this.atlasPages)this.gl.deleteTexture(e);this.atlasPages=[],this.atlasSize=e,this.uploadCache.clear()}for(;this.atlasPages.length<t;)this.atlasPages.push(this.createAtlasPage(e))}render(e,t){if(!this.gl||!this.beginFrame(e))return;let n=[],r=0,i=0;for(let a of e){if(a.w<=0||a.h<=0||a.w>this.maxTextureSize||a.h>this.maxTextureSize)continue;let e=a.stride>=a.w&&a.stride<=this.maxTextureSize&&a.bitmap+a.stride*a.h<=t.length,o=e?a.stride:a.w;o>this.maxTextureSize&&(e=!1,o=a.w),n.push({img:a,packW:o,uploadStrided:e,x:0,y:0,layer:0,sourceKey:a.cache_id&&`${a.cache_id}:${a.bitmap}:${a.w}:${a.h}:${a.stride}`}),r=Math.max(r,o,a.h),i+=o*a.h}if(n.length===0){this.gl.flush();return}let a=Math.max(64,Math.ceil(Math.max(r,Math.ceil(Math.sqrt(i)))/64)*64),o=Math.min(this.maxTextureSize,Math.max(this.atlasSize,a)),s=Math.max(1,Math.min(64,Math.floor(_e/(o*o)))),c=this.packAtlas(n,o);if(c>s&&o<this.maxTextureSize&&(o=this.maxTextureSize,s=Math.max(1,Math.min(64,Math.floor(_e/(o*o)))),c=this.packAtlas(n,o)),c>s){console.warn(`JASSUB: frame exceeds WebGL1 atlas capacity`),this.gl.flush();return}this.ensureAtlas(o,c),this.ensureInstanceCapacity(n.length);let l=this.uploadCache;this.uploadCache=/* @__PURE__ */ new Set;let u=Array.from({length:c},()=>[]);for(let e of n)u[e.layer].push(e);for(let e=0;e<c;e++){let n=u[e];if(n.length){this.gl.bindTexture(this.gl.TEXTURE_2D,this.atlasPages[e]);for(let e of n){let n=e.sourceKey&&`${e.sourceKey}:${e.layer}:${e.x}:${e.y}`;if(n){if(l.has(n)||this.uploadCache.has(n)){this.uploadCache.add(n);continue}this.uploadCache.add(n)}let{img:r}=e;if(e.uploadStrided)this.gl.texSubImage2D(this.gl.TEXTURE_2D,0,e.x,e.y,e.packW,r.h,this.gl.ALPHA,this.gl.UNSIGNED_BYTE,t.subarray(r.bitmap,r.bitmap+r.stride*r.h));else{let n=r.w*r.h,i=this.tightData;(!i||i.length<n)&&(i=this.tightData=new Uint8Array(n));let a=t.subarray(r.bitmap,r.bitmap+r.stride*r.h);for(let e=0;e<r.h;e++){let t=e*r.stride;i.set(a.subarray(t,t+r.w),e*r.w)}this.gl.texSubImage2D(this.gl.TEXTURE_2D,0,e.x,e.y,r.w,r.h,this.gl.ALPHA,this.gl.UNSIGNED_BYTE,i.subarray(0,n))}}}}for(let e=0;e<c;e++){let t=u[e];if(t.length){for(let e=0;e<t.length;e++){let{img:n,x:r,y:i}=t[e],a=e*4,o=e*2,s=e*4;this.instanceDestRectData[a]=n.dst_x,this.instanceDestRectData[a+1]=n.dst_y,this.instanceDestRectData[a+2]=n.w,this.instanceDestRectData[a+3]=n.h,this.instanceSrcData[o]=r,this.instanceSrcData[o+1]=i,this.instanceColorData[s]=(n.color>>>24&255)/255,this.instanceColorData[s+1]=(n.color>>>16&255)/255,this.instanceColorData[s+2]=(n.color>>>8&255)/255,this.instanceColorData[s+3]=(n.color&255)/255}this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceDestRectBuffer),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,this.instanceDestRectData.subarray(0,t.length*4)),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceSrcBuffer),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,this.instanceSrcData.subarray(0,t.length*2)),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceColorBuffer),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,this.instanceColorData.subarray(0,t.length*4)),this.gl.bindTexture(this.gl.TEXTURE_2D,this.atlasPages[e]),this.gl.uniform2f(this.u_atlasSize,this.atlasSize,this.atlasSize),this.instancedArraysExt.drawArraysInstancedANGLE(this.gl.TRIANGLES,0,6,t.length)}}this.gl.flush()}destroy(){if(this.gl){for(let e of this.atlasPages)this.gl.deleteTexture(e);this.atlasPages=[],this.uploadCache.clear(),this.gl.deleteBuffer(this.quadPosBuffer),this.gl.deleteBuffer(this.instanceDestRectBuffer),this.gl.deleteBuffer(this.instanceSrcBuffer),this.gl.deleteBuffer(this.instanceColorBuffer),this.gl.deleteProgram(this.program),this.quadPosBuffer=this.instanceDestRectBuffer=this.instanceSrcBuffer=this.instanceColorBuffer=this.program=this.gl=this.tightData=null}}},V=class extends ge{vao;u_atlas=null;instanceBuffer;instanceData;instanceFloats;instanceBytes;instanceCapacity=0;atlas=null;maxTextureSize=0;maxArrayTextureLayers=0;uploadCache=/* @__PURE__ */ new Set;_createInstanceData(){this.instanceData=/* @__PURE__ */ new ArrayBuffer(this.instanceCapacity*32),this.instanceFloats=new Float32Array(this.instanceData),this.instanceBytes=new Uint8Array(this.instanceData)}ensureInstanceCapacity(e){e<=this.instanceCapacity||(this.instanceCapacity=Math.max(e,this.instanceCapacity*2,256),this._createInstanceData(),this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceBuffer),this.gl.bufferData(this.gl.ARRAY_BUFFER,this.instanceCapacity*32,this.gl.DYNAMIC_DRAW))}constructor(e){super(e),this._initGL()}_initGL(){let e=this.canvas.getContext(`webgl2`,{alpha:!0,premultipliedAlpha:!0,antialias:!1,depth:!1,preserveDrawingBuffer:!1,stencil:!1,desynchronized:!0,powerPreference:`default`});if(!e)throw Error(`Could not get WebGL2 context`);this.gl=e,this.maxTextureSize=this.gl.getParameter(this.gl.MAX_TEXTURE_SIZE),this.maxArrayTextureLayers=this.gl.getParameter(this.gl.MAX_ARRAY_TEXTURE_LAYERS),this.atlas=null,this.uploadCache.clear(),this.createProgram(`#version 300 es
|
|
61
|
-
precision highp float;
|
|
62
|
-
|
|
63
|
-
const vec2 QUAD_POSITIONS[6] = vec2[6](
|
|
64
|
-
vec2(0.0, 0.0),
|
|
65
|
-
vec2(1.0, 0.0),
|
|
66
|
-
vec2(0.0, 1.0),
|
|
67
|
-
vec2(1.0, 0.0),
|
|
68
|
-
vec2(1.0, 1.0),
|
|
69
|
-
vec2(0.0, 1.0)
|
|
70
|
-
);
|
|
71
|
-
|
|
72
|
-
uniform vec2 u_resolution;
|
|
73
|
-
|
|
74
|
-
// Instance attributes
|
|
75
|
-
in vec4 a_destRect; // x, y, w, h
|
|
76
|
-
in vec2 a_srcXY; // atlas x, y
|
|
77
|
-
in vec4 a_color; // r, g, b, a
|
|
78
|
-
in float a_layer; // atlas layer
|
|
79
|
-
|
|
80
|
-
flat out vec2 v_destXY;
|
|
81
|
-
flat out vec4 v_color;
|
|
82
|
-
flat out vec2 v_texSize;
|
|
83
|
-
flat out vec2 v_srcXY;
|
|
84
|
-
flat out float v_layer;
|
|
85
|
-
|
|
86
|
-
void main() {
|
|
87
|
-
vec2 quadPos = QUAD_POSITIONS[gl_VertexID];
|
|
88
|
-
vec2 pixelPos = a_destRect.xy + quadPos * a_destRect.zw;
|
|
89
|
-
vec2 clipPos = (pixelPos / u_resolution) * 2.0 - 1.0;
|
|
90
|
-
clipPos.y = -clipPos.y;
|
|
91
|
-
|
|
92
|
-
gl_Position = vec4(clipPos, 0.0, 1.0);
|
|
93
|
-
v_destXY = a_destRect.xy;
|
|
94
|
-
v_color = a_color;
|
|
95
|
-
v_texSize = a_destRect.zw;
|
|
96
|
-
v_srcXY = a_srcXY;
|
|
97
|
-
v_layer = a_layer;
|
|
98
|
-
}
|
|
99
|
-
`,`#version 300 es
|
|
100
|
-
precision highp float;
|
|
101
|
-
precision highp sampler2DArray;
|
|
102
|
-
|
|
103
|
-
uniform sampler2DArray u_atlas;
|
|
104
|
-
uniform mat3 u_colorMatrix;
|
|
105
|
-
uniform vec2 u_resolution;
|
|
106
|
-
|
|
107
|
-
flat in vec2 v_destXY;
|
|
108
|
-
flat in vec4 v_color;
|
|
109
|
-
flat in vec2 v_texSize;
|
|
110
|
-
flat in vec2 v_srcXY;
|
|
111
|
-
flat in float v_layer;
|
|
112
|
-
|
|
113
|
-
out vec4 fragColor;
|
|
114
|
-
|
|
115
|
-
void main() {
|
|
116
|
-
// Flip Y: WebGL's gl_FragCoord.y is 0 at bottom, but destXY.y is from top
|
|
117
|
-
vec2 fragPos = vec2(gl_FragCoord.x, u_resolution.y - gl_FragCoord.y);
|
|
118
|
-
|
|
119
|
-
// Calculate local position within the quad (screen coords)
|
|
120
|
-
vec2 localPos = fragPos - v_destXY;
|
|
121
|
-
|
|
122
|
-
// Convert to integer texel coordinates for texelFetch
|
|
123
|
-
ivec2 texCoord = ivec2(floor(localPos));
|
|
124
|
-
|
|
125
|
-
// Bounds check (prevents out-of-bounds access)
|
|
126
|
-
ivec2 texSizeI = ivec2(v_texSize);
|
|
127
|
-
if (texCoord.x < 0 || texCoord.y < 0 || texCoord.x >= texSizeI.x || texCoord.y >= texSizeI.y) {
|
|
128
|
-
discard;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
// texelFetch: integer coords, no interpolation, no precision issues
|
|
132
|
-
float mask = texelFetch(u_atlas, ivec3(ivec2(v_srcXY) + texCoord, int(v_layer)), 0).r;
|
|
133
|
-
|
|
134
|
-
// Apply color matrix conversion (identity if no conversion needed)
|
|
135
|
-
vec3 correctedColor = u_colorMatrix * v_color.rgb;
|
|
136
|
-
|
|
137
|
-
// libass color alpha: 0 = opaque, 255 = transparent (inverted)
|
|
138
|
-
float colorAlpha = 1.0 - v_color.a;
|
|
139
|
-
|
|
140
|
-
// Final alpha = colorAlpha * mask
|
|
141
|
-
float a = colorAlpha * mask;
|
|
142
|
-
|
|
143
|
-
// Premultiplied alpha output
|
|
144
|
-
fragColor = vec4(correctedColor * a, a);
|
|
145
|
-
}
|
|
146
|
-
`),this.u_resolution=this.gl.getUniformLocation(this.program,`u_resolution`),this.u_atlas=this.gl.getUniformLocation(this.program,`u_atlas`),this.u_colorMatrix=this.gl.getUniformLocation(this.program,`u_colorMatrix`),this.instanceBuffer=this.gl.createBuffer(),this.instanceCapacity=0,this.ensureInstanceCapacity(256),this.vao=this.gl.createVertexArray(),this.gl.bindVertexArray(this.vao);let t=this.gl.getAttribLocation(this.program,`a_destRect`);this.gl.enableVertexAttribArray(t),this.gl.vertexAttribPointer(t,4,this.gl.FLOAT,!1,32,0),this.gl.vertexAttribDivisor(t,1);let n=this.gl.getAttribLocation(this.program,`a_srcXY`);this.gl.enableVertexAttribArray(n),this.gl.vertexAttribPointer(n,2,this.gl.FLOAT,!1,32,16),this.gl.vertexAttribDivisor(n,1);let r=this.gl.getAttribLocation(this.program,`a_color`);this.gl.enableVertexAttribArray(r),this.gl.vertexAttribPointer(r,4,this.gl.UNSIGNED_BYTE,!0,32,24),this.gl.vertexAttribDivisor(r,1);let i=this.gl.getAttribLocation(this.program,`a_layer`);this.gl.enableVertexAttribArray(i),this.gl.vertexAttribPointer(i,1,this.gl.FLOAT,!1,32,28),this.gl.vertexAttribDivisor(i,1),this.applyCommonState(this.u_atlas)}createAtlasTexture(e,t){this.atlas&&this.gl.deleteTexture(this.atlas.texture);let n=this.gl.createTexture();this.gl.bindTexture(this.gl.TEXTURE_2D_ARRAY,n),this.gl.texImage3D(this.gl.TEXTURE_2D_ARRAY,0,this.gl.R8,e,e,t,0,this.gl.RED,this.gl.UNSIGNED_BYTE,null),this.gl.texParameteri(this.gl.TEXTURE_2D_ARRAY,this.gl.TEXTURE_MIN_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D_ARRAY,this.gl.TEXTURE_MAG_FILTER,this.gl.NEAREST),this.gl.texParameteri(this.gl.TEXTURE_2D_ARRAY,this.gl.TEXTURE_WRAP_S,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D_ARRAY,this.gl.TEXTURE_WRAP_T,this.gl.CLAMP_TO_EDGE),this.gl.texParameteri(this.gl.TEXTURE_2D_ARRAY,this.gl.TEXTURE_MAX_LEVEL,0),this.atlas={texture:n,size:e,depth:t}}render(e,t){if(!this.gl||!this.beginFrame(e))return;let n=0,r=[];for(let t of e)t.w<=0||t.h<=0||t.w>this.maxTextureSize||t.h>this.maxTextureSize||(r.push({img:t,x:0,y:0,layer:0,sourceKey:t.cache_id&&`${t.cache_id}:${t.bitmap}:${t.w}:${t.h}:${t.stride}`}),n=Math.max(n,t.w,t.h));if(r.length===0){this.gl.flush();return}let i=Math.min(this.maxTextureSize,2**Math.max(0,Math.ceil(Math.log2(n)))),a=Math.max(this.atlas?.size??0,i),o=this.maxArrayTextureLayers||256,s=[...r].sort((e,t)=>t.img.h-e.img.h),c=this.packAtlas(s,a,1,!0);for(;c>o&&a<this.maxTextureSize;)a=Math.min(this.maxTextureSize,a*2),c=this.packAtlas(s,a,1,!0);if(c>o){console.warn(`JASSUB: frame exceeds texture array capacity`),this.gl.flush();return}let l=this.uploadCache;(!this.atlas||this.atlas.size<a||this.atlas.depth<c)&&(this.createAtlasTexture(a,Math.max(this.atlas?.depth??0,c)),l.clear()),this.ensureInstanceCapacity(r.length),this.uploadCache=/* @__PURE__ */ new Set;let u=0;(self.HEAPU8RAW.buffer!==self.WASMMEMORY.buffer||R)&&(t=self.HEAPU8RAW=new Uint8Array(self.WASMMEMORY.buffer));for(let{img:e,x:n,y:i,layer:a,sourceKey:o}of r){let r=o&&`${o}:${n}:${i}:${a}`,s=!1;if(r&&(s=l.has(r)||this.uploadCache.has(r),this.uploadCache.add(r)),!s){if(this.gl.pixelStorei(this.gl.UNPACK_ROW_LENGTH,e.stride),M||ce){let r=new Uint8Array(t.buffer,e.bitmap,e.stride*e.h),o=new Uint8Array(r);this.gl.texSubImage3D(this.gl.TEXTURE_2D_ARRAY,0,n,i,a,e.w,e.h,1,this.gl.RED,this.gl.UNSIGNED_BYTE,o)}else this.gl.texSubImage3D(this.gl.TEXTURE_2D_ARRAY,0,n,i,a,e.w,e.h,1,this.gl.RED,this.gl.UNSIGNED_BYTE,t,e.bitmap)}let c=u*8;this.instanceFloats[c]=e.dst_x,this.instanceFloats[c+1]=e.dst_y,this.instanceFloats[c+2]=e.w,this.instanceFloats[c+3]=e.h,this.instanceFloats[c+4]=n,this.instanceFloats[c+5]=i,this.instanceFloats[c+7]=a;let d=u*32+24;this.instanceBytes[d]=e.color>>>24&255,this.instanceBytes[d+1]=e.color>>>16&255,this.instanceBytes[d+2]=e.color>>>8&255,this.instanceBytes[d+3]=e.color&255,u++}this.gl.pixelStorei(this.gl.UNPACK_ROW_LENGTH,0),u!==0&&(this.gl.bindBuffer(this.gl.ARRAY_BUFFER,this.instanceBuffer),this.gl.bufferSubData(this.gl.ARRAY_BUFFER,0,this.instanceBytes,0,u*32),this.gl.drawArraysInstanced(this.gl.TRIANGLES,0,6,u)),this.gl.flush()}destroy(){this.uploadCache.clear(),this.gl&&(this.atlas&&this.gl.deleteTexture(this.atlas.texture),this.gl.deleteBuffer(this.instanceBuffer),this.gl.deleteVertexArray(this.vao),this.gl.deleteProgram(this.program),this.instanceBuffer=this.vao=this.program=this.gl=this.atlas=null)}};const H=Symbol.for(`constructor`);var U=class{_wasm;_subtitleColorSpace;_videoColorSpace;_malloc;_gpurender;debug=!1;constructor(...e){return this[H](...e)}async[H](e,t,n){this._availableFonts=Object.fromEntries(Object.entries(e.availableFonts).map(([e,t])=>[e.trim().toLowerCase(),t])),this.debug=e.debug,this.queryFonts=e.queryFonts,this._getFont=t,this._defaultFont=e.defaultFont.trim().toLowerCase();let r=globalThis.fetch;globalThis.fetch=t=>r(e.wasmUrl);try{let e=new OffscreenCanvas(1,1);this._gpurender=e.getContext(`webgl2`)?new V(n):e.getContext(`webgl`)?.getExtension(`ANGLE_instanced_arrays`)?new ve(n):new he(n)}catch{this._gpurender=new he(n)}this._loadedInitialFonts=!e.fonts.length;let{_malloc:i,JASSUB:a}=await j({__url:e.wasmUrl,__poolSize:L>1?L:0,__out:e=>this._log(e)});return this._malloc=i,this._wasm=new a(e.width,e.height,this._defaultFont),this._wasm.setThreads(L),this._loadedInitialFonts||await this._loadInitialFonts(e.fonts),this._wasm.createTrackMem(e.subContent??await I(e.subUrl)),this._subtitleColorSpace=F[this._wasm.trackColorSpace],(e.libassMemoryLimit>0||e.libassGlyphLimit>0)&&this._wasm.setMemoryLimits(e.libassGlyphLimit||0,e.libassMemoryLimit||0),this._checkColorSpace(),this}processData(e){this._wasm.processData(e)}processChunk(e,t,n){this._wasm.processChunk(e,t,n)}createEvent(e){this._wasm.createEvent(e)}getEvents(){return this._wasm.getEvents()}setEvent(e,t){this._wasm.setEvent(t,e)}removeEvent(e){this._wasm.removeEvent(e)}createStyle(e){this._wasm.createStyle(e)}getStyles(){return this._wasm.getStyles()}setStyle(e,t){this._wasm.setStyle(t,e)}removeStyle(e){this._wasm.removeStyle(e)}styleOverride(e){this._wasm.styleOverride(e)}disableStyleOverride(){this._wasm.disableStyleOverride()}setTrack(e){this._wasm.createTrackMem(e),this._subtitleColorSpace=F[this._wasm.trackColorSpace]}freeTrack(){this._wasm.removeTrack()}async setTrackByUrl(e){this.setTrack(await I(e))}_checkColorSpace(){this._subtitleColorSpace&&this._videoColorSpace&&this._gpurender.setColorMatrix(this._subtitleColorSpace,this._videoColorSpace)}_defaultFont;setDefaultFont(e){this._defaultFont=e.trim().toLowerCase(),this._wasm.setDefaultFont(this._defaultFont)}async _log(e){console.debug(e);let t=e.match(/JASSUB: fontselect:[^(]+: \(([^,]*), (\d{1,4}), \d+\)/);t&&!await this._findAvailableFont(t[1].trim().toLowerCase(),oe[Math.ceil(parseInt(t[2])/100)-1])&&await this._findAvailableFont(this._defaultFont)}async addFonts(e){if(!e.length)return!1;let t=[],n=[];for(let r of e)typeof r==`string`?t.push(r):n.push(r);return n.length&&this._allocFonts(n),!!await Promise.allSettled(t.map(e=>this._asyncWrite(e)))}_loadedInitialFonts=!1;async _loadInitialFonts(e){await this.addFonts(e),this._loadedInitialFonts=!0,this._wasm.reloadFonts()}_getFont;_availableFonts={};_checkedFonts=/* @__PURE__ */ new Set;async _findAvailableFont(e,t){if(!this._loadedInitialFonts)return;for(let n of oe)if(e.includes(n)){e=e.replace(n,``).trim(),t??=n;break}t??=`regular`;let n=e+` `+t;if(!this._checkedFonts.has(n)){this._checkedFonts.add(n);try{let r=this._availableFonts[n]??this._availableFonts[e]??await this._queryLocalFont(e,t)??await this._queryRemoteFont([n,e]);if(r)return await this.addFonts([r])}catch(n){console.warn(`Error querying font`,e,t,n)}}}queryFonts;async _queryLocalFont(e,t){if(this.queryFonts)return await this._getFont(e,t)}async _queryRemoteFont(e){if(this.queryFonts!==`localandremote`)return;let t=await A({postscriptNames:e});if(!t.length)return;let n=await t[0].blob();return new Uint8Array(await n.arrayBuffer())}async _asyncWrite(e){let t=await ue(e);this._allocFonts([new Uint8Array(await t.arrayBuffer())])}_fontId=0;_allocFonts(e){for(let t of e){let e=this._malloc(t.byteLength);self.HEAPU8RAW.set(t,e),this._wasm.addFont(`font-`+this._fontId++,e,t.byteLength)}this._wasm.reloadFonts()}_resizeCanvas(e,t,n,r){this._wasm.resizeCanvas(e,t,n,r),this._gpurender.resizeCanvas(e,t)}async[i](){this._wasm.quitLibrary(),this._gpurender.destroy(),this._wasm=null,this._gpurender=null,this._availableFonts={}}_draw(e,t=!1){let n=this._wasm.rawRender(e,Number(t));n&&this._gpurender.render(n,self.HEAPU8RAW)}_drawCapture(e){let t=this._wasm.rawRender(e,1)??[];this._gpurender.render(t,self.HEAPU8RAW);let n=this._gpurender.canvas;if(!n)return;let{width:r,height:i}=n,a=new OffscreenCanvas(r,i).getContext(`2d`);if(a)return a.drawImage(n,0,0),{data:a.getImageData(0,0,r,i).data,width:r,height:i}}_setColorSpace(e){e!==`RGB`&&(this._videoColorSpace=e,this._checkColorSpace())}};self.name===`jassub-worker`&&T(U);
|