sideora 0.0.1-alpha.0 → 0.1.0-alpha.2
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/LICENSE.md +9 -0
- package/README.md +57 -6
- package/assets/sounds/freesound_community-mail-40275.mp3 +0 -0
- package/assets/sounds/mixkit-clear-announce-tones-2861.wav +0 -0
- package/assets/sounds/mixkit-happy-bells-notification-937.wav +0 -0
- package/assets/sounds/mixkit-musical-alert-notification-2309.wav +0 -0
- package/assets/sounds/nice-chime.mp3 +0 -0
- package/bin/sideora.js +2430 -12
- package/extension/dist/assets/background.ts-NW8YqAlO.js +1 -0
- package/extension/dist/assets/fillCode-Ci8IkBvY.js +1 -0
- package/extension/dist/assets/index.html-DrrPha1M.js +2 -0
- package/extension/dist/assets/modulepreload-polyfill-DcjICKwh.js +1 -0
- package/extension/dist/assets/shell-82MNMljp.css +1 -0
- package/extension/dist/assets/shell-QYBN1bx1.js +1 -0
- package/extension/dist/icons/icon-128.png +0 -0
- package/extension/dist/icons/icon-16.png +0 -0
- package/extension/dist/icons/icon-32.png +0 -0
- package/extension/dist/icons/icon-48.png +0 -0
- package/extension/dist/manifest.json +40 -0
- package/extension/dist/service-worker-loader.js +1 -0
- package/extension/dist/src/newtab/index.html +14 -0
- package/extension/dist/src/panel/index.html +15 -0
- package/extension/dist-web/assets/abnfDiagram-WEYOIA3C-CoXOc872.js +1 -0
- package/extension/dist-web/assets/apple-touch-icon-DSgRQASq.png +0 -0
- package/extension/dist-web/assets/architecture-WOLXFQ4H-BkJ4AerO.js +1 -0
- package/extension/dist-web/assets/architectureDiagram-ZHVYKT53-aPkSDlxA.js +36 -0
- package/extension/dist-web/assets/blockDiagram-RJAE7QA3-CH1G4NBZ.js +140 -0
- package/extension/dist-web/assets/c4Diagram-XDPPPE54-Baum1zDu.js +38 -0
- package/extension/dist-web/assets/channel-PsQg-mnK.js +1 -0
- package/extension/dist-web/assets/chunk-2E7WHVMD-CKvLrWRa.js +88 -0
- package/extension/dist-web/assets/chunk-2Q5K7J3B-C1jixKkw.js +1 -0
- package/extension/dist-web/assets/chunk-4EMNKR2T-6fjnroCZ.js +1 -0
- package/extension/dist-web/assets/chunk-55XCU76K-Ygs3sNpi.js +1 -0
- package/extension/dist-web/assets/chunk-5VM5RSS4-ZNzvKenW.js +15 -0
- package/extension/dist-web/assets/chunk-7S6XSTFO-iX5xYzfP.js +2 -0
- package/extension/dist-web/assets/chunk-AQDTSKZB-D9zwhFI8.js +72 -0
- package/extension/dist-web/assets/chunk-DSNLSHJZ-siGS-4qu.js +129 -0
- package/extension/dist-web/assets/chunk-DUW6YSOI-Dgx8z5s3.js +1 -0
- package/extension/dist-web/assets/chunk-HAGFOTED-_3dtnWXn.js +62 -0
- package/extension/dist-web/assets/chunk-HNE4Q36P-BPzRHi72.js +1 -0
- package/extension/dist-web/assets/chunk-J5ZVWO5B-oDCd-gWO.js +1 -0
- package/extension/dist-web/assets/chunk-JWPE2WC7-DVXcaiue.js +1 -0
- package/extension/dist-web/assets/chunk-NGNAAXSQ-DI_UYJZ4.js +136 -0
- package/extension/dist-web/assets/chunk-NQOKRVIF-AXbmOBjs.js +213 -0
- package/extension/dist-web/assets/chunk-UHW7PFBP-B3xrZ8sD.js +1 -0
- package/extension/dist-web/assets/chunk-VQ5W62QI-D_k7Pa6b.js +1 -0
- package/extension/dist-web/assets/chunk-WQQL4CDK-BBIrWwoZ.js +10 -0
- package/extension/dist-web/assets/chunk-XXDRQBXY-i7MKP1NY.js +1 -0
- package/extension/dist-web/assets/chunk-Y2CYZVJY-DsF7k-Jl.js +1 -0
- package/extension/dist-web/assets/chunk-YZO67HFG-Z7qp5QAI.js +1 -0
- package/extension/dist-web/assets/chunk-ZAUX2LTX-CSt3c0Rb.js +1 -0
- package/extension/dist-web/assets/chunk-ZCHMQSOR-g8XRABGK.js +2 -0
- package/extension/dist-web/assets/classDiagram-v2-4MYWR3UA-BL706wzc.js +217 -0
- package/extension/dist-web/assets/cose-bilkent-JH36ORCC-C6J2IoHg.js +1 -0
- package/extension/dist-web/assets/cynefin-EF2NZ3EQ-DLhQOiAy.js +1 -0
- package/extension/dist-web/assets/cynefinDiagram-WF24UDRP-Cv9Lx6_l.js +62 -0
- package/extension/dist-web/assets/cytoscape.esm-nTrd5EVq.js +321 -0
- package/extension/dist-web/assets/d3-scale-CElPUUud.js +1 -0
- package/extension/dist-web/assets/d3-selection-COWvaQNI.js +1 -0
- package/extension/dist-web/assets/dagre-NK4GIZVX-ngM-w2EC.js +4 -0
- package/extension/dist-web/assets/diagram-CBK3MWTC-kp8sayNG.js +24 -0
- package/extension/dist-web/assets/diagram-I5XIIV2D-BZ_Dgs6K.js +24 -0
- package/extension/dist-web/assets/diagram-ODIL2UCW-DWhUyArG.js +30 -0
- package/extension/dist-web/assets/diagram-PFBEJUXE-CBAdEK7l.js +3 -0
- package/extension/dist-web/assets/diagram-RJA3I4VV-kOdIr_3K.js +41 -0
- package/extension/dist-web/assets/diagram-TYUNFSNR-BrWGa0x5.js +200 -0
- package/extension/dist-web/assets/dist-DdXDFcej.js +1 -0
- package/extension/dist-web/assets/docx-preview-D1zbEiLy.js +20 -0
- package/extension/dist-web/assets/earth-Ce3xs8Cb.webp +0 -0
- package/extension/dist-web/assets/ebnfDiagram-V4P3TTPT-0r3weWmj.js +1 -0
- package/extension/dist-web/assets/elk-QONTBCTQ-D3oElRZ3.js +27 -0
- package/extension/dist-web/assets/erDiagram-KYQIGQAA-B9oU7_j_.js +99 -0
- package/extension/dist-web/assets/eventmodeling-K75KTNOO-CMKgc1nP.js +1 -0
- package/extension/dist-web/assets/favicon-D_X6tUVf.svg +5 -0
- package/extension/dist-web/assets/flowDiagram-IUGLLWBU-yRwks0Mw.js +1 -0
- package/extension/dist-web/assets/ganttDiagram-R7GPNTJY-cJqD1qwQ.js +292 -0
- package/extension/dist-web/assets/gitGraph-VSP46ZUC-CuBQqkbr.js +1 -0
- package/extension/dist-web/assets/gitGraphDiagram-PDYL7XHY-D7bHnQXC.js +106 -0
- package/extension/dist-web/assets/graphlib-DS17s2tU.js +1 -0
- package/extension/dist-web/assets/home-CV7-8Trs.js +1 -0
- package/extension/dist-web/assets/index-CQvw7Wy_.js +7 -0
- package/extension/dist-web/assets/index-CVKnZ21i.css +1 -0
- package/extension/dist-web/assets/info-OHQRW6UA-B8kyzV4O.js +1 -0
- package/extension/dist-web/assets/infoDiagram-MVDRKAX5-CEm6lezX.js +2 -0
- package/extension/dist-web/assets/ishikawaDiagram-HPEHV2GE-Ce3uv2wr.js +70 -0
- package/extension/dist-web/assets/journeyDiagram-BOSHW7O7-QgdahHCP.js +139 -0
- package/extension/dist-web/assets/jszip.min-3XXygzvy.js +2 -0
- package/extension/dist-web/assets/kanban-definition-FNSA4HC5-DPuTtWgR.js +89 -0
- package/extension/dist-web/assets/katex-MEuSR36T.js +257 -0
- package/extension/dist-web/assets/mermaid-parser.core-h7U7YGn_.js +7 -0
- package/extension/dist-web/assets/mermaid.core-DkGhophj.js +44 -0
- package/extension/dist-web/assets/mindmap-definition-6OY57UG3-D7VQxbda.js +98 -0
- package/extension/dist-web/assets/mount-CBzzf6KQ.js +195 -0
- package/extension/dist-web/assets/mount-DtvYnQXt.css +1 -0
- package/extension/dist-web/assets/officeparser.browser.slim-kEjhTrQ1.js +1989 -0
- package/extension/dist-web/assets/packet-JDAUHWVQ-oafHgw6X.js +1 -0
- package/extension/dist-web/assets/pegDiagram-ECIUJNBX-C3zo1naj.js +1 -0
- package/extension/dist-web/assets/peoria-B5TBlKDG.jpg +0 -0
- package/extension/dist-web/assets/peoria-thumb-CN8upAdZ.jpg +0 -0
- package/extension/dist-web/assets/pie-XZMESJXO-DXzeBQqF.js +1 -0
- package/extension/dist-web/assets/pieDiagram-GNMPY74T-S5NzPthl.js +39 -0
- package/extension/dist-web/assets/quadrantDiagram-D57K4MC3-C9glHQmk.js +7 -0
- package/extension/dist-web/assets/radar-ABXABTNO-CWTNqtbu.js +1 -0
- package/extension/dist-web/assets/railroad-I3PHUGI6-BTpD5_Bu.js +1 -0
- package/extension/dist-web/assets/railroad-abnf-LNEFI6M7-bWyxoXQG.js +1 -0
- package/extension/dist-web/assets/railroad-ebnf-DWYD2UWJ-ri5733DQ.js +1 -0
- package/extension/dist-web/assets/railroad-peg-JR7BVNR7-CmGfTubP.js +1 -0
- package/extension/dist-web/assets/railroadDiagram-Y72NRBL7-DTfe6Dh1.js +1 -0
- package/extension/dist-web/assets/requirementDiagram-EQYSW5RA-DQDzcS3L.js +84 -0
- package/extension/dist-web/assets/rolldown-runtime-COiEfhsA.js +1 -0
- package/extension/dist-web/assets/rough.esm-Dy-Kn_BL.js +1 -0
- package/extension/dist-web/assets/sankeyDiagram-SY24JHO5-DyMKWxdB.js +40 -0
- package/extension/dist-web/assets/sequenceDiagram-BLEHNHQU-dIkB1mCn.js +169 -0
- package/extension/dist-web/assets/sizeCapture-INFHLROL-3uHXrFqA.js +1 -0
- package/extension/dist-web/assets/stateDiagram-v2-A6IESKWZ-Bj_vxEVF.js +291 -0
- package/extension/dist-web/assets/swimlanes-B3ENRKFQ-BSkWEwHR.js +1 -0
- package/extension/dist-web/assets/swimlanesDiagram-AYQRV4AK-BTzSDlSM.js +8 -0
- package/extension/dist-web/assets/timeline-definition-JXYKGLGB-TwfWS0pw.js +120 -0
- package/extension/dist-web/assets/treeView-D4JQ5SDB-BzA_8YYb.js +1 -0
- package/extension/dist-web/assets/treemap-SAJKECNS-BI9d6--2.js +1 -0
- package/extension/dist-web/assets/usecaseDiagram-WPOLBNNX-BOVbAUPk.js +328 -0
- package/extension/dist-web/assets/vennDiagram-Q3Y3IDCW-X2kYAWaj.js +34 -0
- package/extension/dist-web/assets/wardley-7MLQ67FV-CItxqJ8G.js +1 -0
- package/extension/dist-web/assets/wardleyDiagram-IVAIDKWA-BnUXvKD_.js +78 -0
- package/extension/dist-web/assets/xychartDiagram-4URNHDU4-ysvBXvyE.js +7 -0
- package/extension/dist-web/icon-192.png +0 -0
- package/extension/dist-web/icon-512.png +0 -0
- package/extension/dist-web/index.html +25 -0
- package/extension/dist-web/manifest.webmanifest +14 -0
- package/package.json +64 -12
- package/plugin/.claude-plugin/icon.png +0 -0
- package/plugin/.claude-plugin/plugin.json +6 -0
- package/plugin/.mcp.json +8 -0
- package/plugin/README.md +72 -0
- package/plugin/mcp-launcher.mjs +48 -0
- package/src/account-probe.js +45 -0
- package/src/accounts.js +687 -0
- package/src/ai.js +269 -0
- package/src/assistant-runs.js +32 -0
- package/src/attached-mail.js +76 -0
- package/src/auth-gate.js +70 -0
- package/src/backup-cli.js +158 -0
- package/src/backup.js +329 -0
- package/src/bimi.js +233 -0
- package/src/bridge.js +101 -0
- package/src/calendar-alerts.js +56 -0
- package/src/chats.js +27 -0
- package/src/compose-editor.js +58 -0
- package/src/config.js +420 -0
- package/src/connections.d.ts +24 -0
- package/src/connections.js +37 -0
- package/src/core/agent.js +92 -0
- package/src/core/assistant.d.ts +13 -0
- package/src/core/assistant.js +790 -0
- package/src/core/chats.js +323 -0
- package/src/core/markdown.d.ts +8 -0
- package/src/core/markdown.js +239 -0
- package/src/core/notes.js +445 -0
- package/src/core/otp.js +152 -0
- package/src/core/rules.js +196 -0
- package/src/core/runs.d.ts +9 -0
- package/src/core/runs.js +211 -0
- package/src/core/thread.js +526 -0
- package/src/core/write.js +247 -0
- package/src/core-db.js +131 -0
- package/src/core.js +174 -0
- package/src/credentials.js +320 -0
- package/src/daemon.js +564 -0
- package/src/events.js +213 -0
- package/src/extension-id.d.ts +2 -0
- package/src/extension-id.js +5 -0
- package/src/file-lock.js +27 -0
- package/src/files-index.js +154 -0
- package/src/google-contacts.js +315 -0
- package/src/google-signin.js +306 -0
- package/src/host/assistant-html.js +44 -0
- package/src/host/chats-files.js +137 -0
- package/src/host/file-prep.js +122 -0
- package/src/host/notes-files.js +158 -0
- package/src/host/office-text.js +224 -0
- package/src/host/office-worker.js +8 -0
- package/src/host/rules-file.js +20 -0
- package/src/host/secrets-file.js +91 -0
- package/src/host/systemd.js +90 -0
- package/src/hub.js +245 -0
- package/src/identity.js +316 -0
- package/src/labels.js +5 -0
- package/src/mail-port.d.ts +79 -0
- package/src/mail-port.js +148 -0
- package/src/mcp-server.js +747 -0
- package/src/microsoft-app.js +20 -0
- package/src/microsoft-signin.js +194 -0
- package/src/migrate.js +327 -0
- package/src/notes-html.js +450 -0
- package/src/notes.js +19 -0
- package/src/notify.js +105 -0
- package/src/onepassword.js +223 -0
- package/src/op-registry.d.ts +14 -0
- package/src/op-registry.js +150 -0
- package/src/ops.js +1251 -0
- package/src/otp.js +6 -0
- package/src/panel-ops.js +273 -0
- package/src/pictures.js +735 -0
- package/src/postinstall.js +25 -0
- package/src/relay-passkey.js +122 -0
- package/src/relay-request.js +155 -0
- package/src/relay-seal.js +56 -0
- package/src/relay-settings.js +139 -0
- package/src/relay.js +876 -0
- package/src/render.js +82 -0
- package/src/rules-store.js +8 -0
- package/src/safe-fetch.js +215 -0
- package/src/sender-auth.js +270 -0
- package/src/site-match.js +77 -0
- package/src/tui-agenda.js +266 -0
- package/src/tui.js +670 -0
- package/src/vmc.js +376 -0
- package/src/wake.js +96 -0
- package/src/web-access.js +185 -0
- package/src/web-server.js +241 -0
- package/src/web-service.js +152 -0
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./mermaid.core-DkGhophj.js","./chunk-DSNLSHJZ-siGS-4qu.js","./d3-selection-COWvaQNI.js","./rolldown-runtime-COiEfhsA.js","./chunk-Y2CYZVJY-DsF7k-Jl.js","./index-CQvw7Wy_.js","./index-CVKnZ21i.css","./chunk-DUW6YSOI-Dgx8z5s3.js","./chunk-HNE4Q36P-BPzRHi72.js","./chunk-ZAUX2LTX-CSt3c0Rb.js","./chunk-HAGFOTED-_3dtnWXn.js","./chunk-UHW7PFBP-B3xrZ8sD.js","./chunk-AQDTSKZB-D9zwhFI8.js","./chunk-YZO67HFG-Z7qp5QAI.js","./chunk-7S6XSTFO-iX5xYzfP.js","./dist-DdXDFcej.js","./chunk-J5ZVWO5B-oDCd-gWO.js","./rough.esm-Dy-Kn_BL.js","./chunk-WQQL4CDK-BBIrWwoZ.js","./officeparser.browser.slim-kEjhTrQ1.js","./docx-preview-D1zbEiLy.js","./jszip.min-3XXygzvy.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,t}from"./rolldown-runtime-COiEfhsA.js";import{C as n,D as r,E as i,M as a,N as o,O as s,P as c,S as l,T as u,_ as d,a as f,b as p,c as m,d as h,f as g,g as _,h as v,i as y,j as b,k as x,l as S,m as C,n as w,o as T,p as E,r as D,s as O,t as k,u as A,v as j,w as ee,x as M,y as te}from"./index-CQvw7Wy_.js";import{a as ne,c as re,d as ie,f as ae,h as oe,i as se,l as N,m as ce,n as le,p as ue,r as de,s as fe,t as pe,u as me}from"./home-CV7-8Trs.js";var P=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m){if(n(c)!==null)m=!0,S||(S=!0,O());else{var t=n(l);t!==null&&j(x,t.startTime-e)}}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function D(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&j(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?O():S=!1}}}var O;if(typeof y==`function`)O=function(){y(D)};else if(typeof MessageChannel<`u`){var k=new MessageChannel,A=k.port2;k.port1.onmessage=D,O=function(){A.postMessage(null)}}else O=function(){_(D,0)};function j(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,j(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,O()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),he=t(((e,t)=>{t.exports=P()})),F=t((e=>{var t=c();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function l(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var u=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return l(e,t,null,r)},e.flushSync=function(e){var t=u.T,n=i.p;try{if(u.T=null,i.p=2,e)return e()}finally{u.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=d(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=d(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=d(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return u.H.useFormState(e,t,n)},e.useFormStatus=function(){return u.H.useHostTransitionStatus()},e.version=`19.3.1`})),I=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=F()})),ge=t((e=>{var t=he(),n=c(),r=I();function i(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function a(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function o(e){for(var t=e,n=t;n&&!n.alternate;)t=n,t.flags&4098&&(e=t.return),n=t.return;for(;t.return;)t=t.return;return t.tag===3?e:null}function s(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function l(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function u(e){if(o(e)!==e)throw Error(i(188))}function d(e){var t=e.alternate;if(!t){if(t=o(e),t===null)throw Error(i(188));return t===e?e:null}for(var n=e,r=t;;){var a=n.return;if(a===null)break;var s=a.alternate;if(s===null){if(r=a.return,r!==null){n=r;continue}break}if(a.child===s.child){for(s=a.child;s;){if(s===n)return u(a),e;if(s===r)return u(a),t;s=s.sibling}throw Error(i(188))}if(n.return!==r.return)n=a,r=s;else{for(var c=!1,l=a.child;l;){if(l===n){c=!0,n=a,r=s;break}if(l===r){c=!0,r=a,n=s;break}l=l.sibling}if(!c){for(l=s.child;l;){if(l===n){c=!0,n=s,r=a;break}if(l===r){c=!0,r=s,n=a;break}l=l.sibling}if(!c)throw Error(i(189))}}if(n.alternate!==r)throw Error(i(190))}if(n.tag!==3)throw Error(i(188));return n.stateNode.current===n?e:t}function f(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=f(e),t!==null)return t;e=e.sibling}return null}function p(e,t,n,r,i,a){for(;e!==null;){if((e.tag===5||e.tag===27||e.tag===6)&&n(e,r,i,a)||(e.tag!==22||e.memoizedState===null)&&(t||e.tag!==5&&e.tag!==27)&&p(e.child,t,n,r,i,a))return!0;e=e.sibling}return!1}function m(e){for(e=e.return;e!==null;){if(e.tag===3||e.tag===5||e.tag===27)return e;e=e.return}return null}function h(e){var t=!1;for(e=e.return;e!==null&&(e.tag===4&&(t=!0),e.tag!==3&&e.tag!==5&&e.tag!==27);)e=e.return;return t}function g(e){var t=[null,null],n=m(e);return n===null||_(t,e,n.child,{foundSelf:!1}),t}function _(e,t,n,r){for(;n!==null;){if(n===t)r.foundSelf=!0;else if(n.tag===5||n.tag===27||n.tag===6){if(r.foundSelf)return e[1]=n,!0;e[0]=n}else if((n.tag!==22||n.memoizedState===null)&&_(e,t,n.child,r))return!0;n=n.sibling}return!1}function v(e){switch(e.tag){case 5:case 27:case 6:return e.stateNode;case 3:return e.stateNode.containerInfo;default:throw Error(i(559))}}var y=null,b=null;function x(e,t,n){return e===n||e===t&&(y=e,!0)}function S(e,t,n){return e===n?(b=e,!1):e===t&&(b!==null&&(y=e),!0)}function C(e){if(e===null)return null;do e=e===null?null:e.return;while(e&&e.tag!==5&&e.tag!==27&&e.tag!==3);return e||null}function w(e,t,n){for(var r=0,i=e;i;i=n(i))r++;i=0;for(var a=t;a;a=n(a))i++;for(;0<r-i;)e=n(e),r--;for(;0<i-r;)t=n(t),i--;for(;r--;){if(e===t||t!==null&&e===t.alternate)return e;e=n(e),t=n(t)}return null}var T=Object.assign,E=Symbol.for(`react.element`),D=Symbol.for(`react.transitional.element`),O=Symbol.for(`react.portal`),k=Symbol.for(`react.fragment`),A=Symbol.for(`react.strict_mode`),j=Symbol.for(`react.profiler`),ee=Symbol.for(`react.consumer`),M=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),re=Symbol.for(`react.suspense_list`),ie=Symbol.for(`react.memo`),ae=Symbol.for(`react.lazy`),oe=Symbol.for(`react.activity`),se=Symbol.for(`react.legacy_hidden`),N=Symbol.for(`react.memo_cache_sentinel`),ce=Symbol.for(`react.view_transition`),le=Symbol.for(`react.recoverable`),ue=Symbol.iterator;function de(e){return typeof e!=`object`||!e?null:(e=ue&&e[ue]||e[`@@iterator`],typeof e==`function`?e:null)}var fe=Symbol.for(`react.client.reference`);function pe(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===fe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case k:return`Fragment`;case j:return`Profiler`;case A:return`StrictMode`;case ne:return`Suspense`;case re:return`SuspenseList`;case oe:return`Activity`;case ce:return`ViewTransition`}if(typeof e==`object`)switch(e.$$typeof){case O:return`Portal`;case M:return e.displayName||`Context`;case ee:return(e._context.displayName||`Context`)+`.Consumer`;case te:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ie:return t=e.displayName||null,t===null?pe(e.type)||`Memo`:t;case ae:t=e._payload,e=e._init;try{return pe(e(t))}catch{}}return null}var me=Array.isArray,P=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,F=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ge={pending:!1,data:null,method:null,action:null},_e=[],L=-1;function ve(e){return{current:e}}function ye(e){0>L||(e.current=_e[L],_e[L]=null,L--)}function be(e,t){L++,_e[L]=e.current,e.current=t}var xe=ve(null),Se=ve(null),Ce=ve(null),we=ve(null);function Te(e,t){switch(be(Ce,t),be(Se,e),be(xe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?mp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=mp(t),e=hp(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}ye(xe),be(xe,e)}function Ee(){ye(xe),ye(Se),ye(Ce)}function De(e){var t=e.memoizedState;t!==null&&(uh._currentValue=t.memoizedState,be(we,e)),t=xe.current;var n=hp(t,e.type);t!==n&&(be(Se,e),be(xe,n))}function Oe(e){Se.current===e&&(ye(xe),ye(Se)),we.current===e&&(ye(we),uh._currentValue=ge)}var R,ke;function Ae(e){if(R===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||``,ke=-1<e.stack.indexOf(`
|
|
3
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
|
+
`+R+e+ke}var je=!1;function Me(e,t){if(!e||je)return``;je=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}n=!1;try{var i=Object.getOwnPropertyDescriptor(e.prototype,`props`);Object.defineProperty(e.prototype,"props",{configurable:!0,set:function(){throw Error()}}),n=!0,new e}finally{n&&(i===void 0?delete e.prototype.props:Object.defineProperty(e.prototype,"props",i))}}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
|
+
`),l=s.split(`
|
|
6
|
+
`);for(i=r=0;r<c.length&&!c[r].includes(`DetermineComponentFrameRoot`);)r++;for(;i<l.length&&!l[i].includes(`DetermineComponentFrameRoot`);)i++;if(r===c.length||i===l.length)for(r=c.length-1,i=l.length-1;1<=r&&0<=i&&c[r]!==l[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==l[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==l[i]){var u=`
|
|
7
|
+
`+c[r].replace(` at new `,` at `);return e.displayName&&u.includes(`<anonymous>`)&&(u=u.replace(`<anonymous>`,e.displayName)),u}while(1<=r&&0<=i);break}}}finally{je=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:``)?Ae(n):``}function Ne(e,t){switch(e.tag){case 26:case 27:case 5:return Ae(e.type);case 16:return Ae(`Lazy`);case 13:return e.child!==t&&t!==null?Ae(`Suspense Fallback`):Ae(`Suspense`);case 19:return Ae(`SuspenseList`);case 0:case 15:return Me(e.type,!1);case 11:return Me(e.type.render,!1);case 1:return Me(e.type,!0);case 31:return Ae(`Activity`);case 30:return Ae(`ViewTransition`);default:return``}}function z(e){try{var t=``,n=null;do t+=Ne(e,n),n=e,e=e.return;while(e);return t}catch(e){return`
|
|
8
|
+
Error generating stack: `+e.message+`
|
|
9
|
+
`+e.stack}}var Pe=Object.prototype.hasOwnProperty,Fe=t.unstable_scheduleCallback,Ie=t.unstable_cancelCallback,Le=t.unstable_shouldYield,Re=t.unstable_requestPaint,B=t.unstable_now,ze=t.unstable_getCurrentPriorityLevel,Be=t.unstable_ImmediatePriority,Ve=t.unstable_UserBlockingPriority,He=t.unstable_NormalPriority,Ue=t.unstable_LowPriority,We=t.unstable_IdlePriority,Ge=t.log,Ke=t.unstable_setDisableYieldValue,qe=null,Je=null;function Ye(e){if(typeof Ge==`function`&&Ke(e),Je&&typeof Je.setStrictMode==`function`)try{Je.setStrictMode(qe,e)}catch{}}var Xe=Math.clz32?Math.clz32:$e,Ze=Math.log,Qe=Math.LN2;function $e(e){return e>>>=0,e===0?32:31-(Ze(e)/Qe|0)|0}var et=256,tt=262144,nt=4194304;function rt(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&-e;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function it(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,a=e.suspendedLanes,o=e.pingedLanes;e=e.warmLanes;var s=r&134217727;return s===0?(s=r&~a,s===0?o===0?n||(n=r&~e,n!==0&&(i=rt(n))):i=rt(o):i=rt(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=rt(n))):i=rt(o)):i=rt(r)),i===0?0:t!==0&&t!==i&&(t&a)===0&&(a=i&-i,n=t&-t,a>=n||a===32&&n&4194048)?t:i}function at(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ot(e,t){t&8&&(t|=t&32);var n=e.entangledLanes;if(n!==0)for(e=e.entanglements,n&=t;0<n;){var r=31-Xe(n),i=1<<r;t|=e[r],n&=~i}return t}function st(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ct(){var e=nt;return nt<<=1,!(nt&62914560)&&(nt=4194304),e}function lt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function V(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ut(e,t,n,r,i,a){var o=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var s=e.entanglements,c=e.expirationTimes,l=e.hiddenUpdates;for(n=o&~n;0<n;){var u=31-Xe(n),d=1<<u;s[u]=0,c[u]=-1;var f=l[u];if(f!==null)for(l[u]=null,u=0;u<f.length;u++){var p=f[u];p!==null&&(p.lane&=-536870913)}n&=~d}r!==0&&dt(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function dt(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Xe(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function ft(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Xe(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function pt(e,t){var n=t&-t;return n=n&42?1:mt(n),(n&(e.suspendedLanes|t))===0?n:0}function mt(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function ht(e){return e&=-e,2<e?8<e?e&134217727?32:268435456:8:2}function gt(){var e=F.p;return e===0?(e=window.event,e===void 0?32:Eh(e.type)):e}function _t(e,t){var n=F.p;try{return F.p=e,t()}finally{F.p=n}}var vt=Math.random().toString(36).slice(2),yt=`__reactFiber$`+vt,bt=`__reactProps$`+vt,xt=`__reactContainer$`+vt,St=`__reactEvents$`+vt,Ct=`__reactListeners$`+vt,wt=`__reactHandles$`+vt,Tt=`__reactResources$`+vt,Et=`__reactMarker$`+vt,Dt=`__reactLoad$`+vt;function Ot(e){delete e[yt],delete e[bt],delete e[Ct],delete e[wt]}function kt(e){var t;if(t=e[yt])return t;for(var n=e.parentNode;n;){if(t=n[xt]||n[yt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=hm(e);e!==null;){if(n=e[yt])return n;e=hm(e)}return t}e=n,n=e.parentNode}return null}function At(e){if(e=e[yt]||e[xt]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function jt(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(i(33))}function Mt(e){var t=e[Tt];return t||=e[Tt]={hoistableStyles:new Map,hoistableScripts:new Map},t}function Nt(e){e[Et]=!0}function Pt(e){e[Dt]=void 0}var Ft=new Set,It={};function Lt(e,t){Rt(e,t),Rt(e+`Capture`,t)}function Rt(e,t){for(It[e]=t,e=0;e<t.length;e++)Ft.add(t[e])}var zt=RegExp(`^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$`),Bt={},Vt={};function Ht(e){return Pe.call(Vt,e)?!0:Pe.call(Bt,e)?!1:zt.test(e)?Vt[e]=!0:(Bt[e]=!0,!1)}var Ut=!1;function Wt(){var e=Ut;return Ut=!1,e}function Gt(e,t,n){if(Ht(t)){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:e.removeAttribute(t);return;case`boolean`:var r=t.toLowerCase().slice(0,5);if(r!==`data-`&&r!==`aria-`){e.removeAttribute(t);return}}e.setAttribute(t,n)}}}function Kt(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(t);return}e.setAttribute(t,n)}}function qt(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:e.removeAttribute(n);return}e.setAttributeNS(t,n,r)}}function Jt(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return e;default:return``}}function Yt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function Xt(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&r!==void 0&&typeof r.get==`function`&&typeof r.set==`function`){var i=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Zt(e){if(!e._valueTracker){var t=Yt(e)?`checked`:`value`;e._valueTracker=Xt(e,t,``+e[t])}}function Qt(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=Yt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}var $t=/[\n"\\]/g;function en(e){return e.replace($t,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function tn(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?e.type=o:e.removeAttribute(`type`),t==null?o!==`submit`&&o!==`reset`||e.removeAttribute(`value`):o===`number`?(t===0&&e.value===``||e.value!=t)&&(e.value=``+Jt(t)):e.value!==``+Jt(t)&&(e.value=``+Jt(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):rn(e,Jt(n)):o===`number`&&e.value==t?rn(e,Jt(e.value)):rn(e,Jt(t)),i==null&&a!=null&&(e.defaultChecked=!!a),i!=null&&(e.checked=i&&typeof i!=`function`&&typeof i!=`symbol`),s!=null&&typeof s!=`function`&&typeof s!=`symbol`&&typeof s!=`boolean`?e.name=``+Jt(s):e.removeAttribute(`name`)}function nn(e,t,n,r,i,a,o,s){if(a!=null&&typeof a!=`function`&&typeof a!=`symbol`&&typeof a!=`boolean`&&(e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){Zt(e);return}n=n==null?``:``+Jt(n),t=t==null?n:``+Jt(t),s||t===e.value||(e.value=t),e.defaultValue=t}r??=i,r=typeof r!=`function`&&typeof r!=`symbol`&&!!r,e.checked=s?e.checked:!!r,e.defaultChecked=!!r,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`&&(e.name=o),Zt(e)}function rn(e,t){e.defaultValue!==``+t&&(e.defaultValue=``+t)}function an(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t[`$`+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty(`$`+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=``+Jt(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function on(e,t,n){t!=null&&(t=``+Jt(t),t!==e.value&&(e.value=t),n==null)?e.defaultValue!==t&&(e.defaultValue=t):e.defaultValue=n==null?``:``+Jt(n)}function sn(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(i(92));if(me(r)){if(1<r.length)throw Error(i(93));r=r[0]}n=r}n??=``,t=n}n=Jt(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),Zt(e)}function cn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var ln=new Set(`animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp`.split(` `));function un(e,t,n){var r=t.indexOf(`--`)===0;n==null||typeof n==`boolean`||n===``?r?e.setProperty(t,``):t===`float`?e.cssFloat=``:e[t]=``:r?e.setProperty(t,n):typeof n!=`number`||n===0||ln.has(t)?t===`float`?e.cssFloat=n:e[t]=(``+n).trim():e[t]=n+`px`}function dn(e,t,n){if(t!=null&&typeof t!=`object`)throw Error(i(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf(`--`)===0?e.setProperty(r,``):r===`float`?e.cssFloat=``:e[r]=``,Ut=!0);for(var a in t)r=t[a],t.hasOwnProperty(a)&&n[a]!==r&&(un(e,a,r),Ut=!0)}else for(var o in t)t.hasOwnProperty(o)&&un(e,o,t[o])}function fn(e){if(e.indexOf(`-`)===-1)return!1;switch(e){case`annotation-xml`:case`color-profile`:case`font-face`:case`font-face-src`:case`font-face-uri`:case`font-face-format`:case`font-face-name`:case`missing-glyph`:return!1;default:return!0}}var pn=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`maskType`,`mask-type`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),mn=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function hn(e){return mn.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function gn(){}var _n=null;function vn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var yn=null,bn=null;function xn(e){var t=At(e);if(t&&(e=t.stateNode)){var n=e[bt]||null;a:switch(e=t.stateNode,t.type){case`input`:if(tn(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type===`radio`&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll(`input[name="`+en(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var a=r[bt]||null;if(!a)throw Error(i(90));tn(r,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&Qt(r)}break a;case`textarea`:on(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&an(e,!!n.multiple,t,!1)}}}var Sn=!1;function Cn(e,t,n){if(Sn)return e(t,n);Sn=!0;try{return e(t)}finally{if(Sn=!1,(yn!==null||bn!==null)&&(Hd(),yn&&(t=yn,e=bn,bn=yn=null,xn(t),e)))for(t=0;t<e.length;t++)xn(e[t])}}function wn(e,t){var n=e.stateNode;if(n===null)return null;var r=n[bt]||null;if(r===null)return null;n=r[t];a:switch(t){case`onClick`:case`onClickCapture`:case`onDoubleClick`:case`onDoubleClickCapture`:case`onMouseDown`:case`onMouseDownCapture`:case`onMouseMove`:case`onMouseMoveCapture`:case`onMouseUp`:case`onMouseUpCapture`:case`onMouseEnter`:(r=!r.disabled)||(e=e.type,r=e!==`button`&&e!==`input`&&e!==`select`&&e!==`textarea`),e=!r;break a;default:e=!1}if(e)return null;if(n&&typeof n!=`function`)throw Error(i(231,t,typeof n));return n}var Tn=typeof window<`u`&&window.document!==void 0&&window.document.createElement!==void 0,En=!1;if(Tn)try{var Dn={};Object.defineProperty(Dn,"passive",{get:function(){En=!0}}),window.addEventListener(`test`,Dn,Dn),window.removeEventListener(`test`,Dn,Dn)}catch{En=!1}var On=null,kn=null,An=null;function jn(){if(An)return An;var e,t=kn,n=t.length,r,i=`value`in On?On.value:On.textContent,a=i.length;for(e=0;e<n&&t[e]===i[e];e++);var o=n-e;for(r=1;r<=o&&t[n-r]===i[a-r];r++);return An=i.slice(e,1<r?1-r:void 0)}function Mn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Nn(){return!0}function Pn(){return!1}function Fn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?Nn:Pn,this.isPropagationStopped=Pn,this}return T(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=Nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=Nn)},persist:function(){},isPersistent:Nn}),t}var In={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ln=Fn(In),Rn=T({},In,{view:0,detail:0}),zn=Fn(Rn),Bn,Vn,Hn,Un=T({},Rn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$n,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==Hn&&(Hn&&e.type===`mousemove`?(Bn=e.screenX-Hn.screenX,Vn=e.screenY-Hn.screenY):Vn=Bn=0,Hn=e),Bn)},movementY:function(e){return`movementY`in e?e.movementY:Vn}}),Wn=Fn(Un),Gn=Fn(T({},Un,{dataTransfer:0})),Kn=Fn(T({},Rn,{relatedTarget:0})),qn=Fn(T({},In,{animationName:0,elapsedTime:0,pseudoElement:0})),Jn=Fn(T({},In,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),Yn=Fn(T({},In,{data:0})),Xn={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},Zn={8:`Backspace`,9:`Tab`,12:`Clear`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,19:`Pause`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,45:`Insert`,46:`Delete`,112:`F1`,113:`F2`,114:`F3`,115:`F4`,116:`F5`,117:`F6`,118:`F7`,119:`F8`,120:`F9`,121:`F10`,122:`F11`,123:`F12`,144:`NumLock`,145:`ScrollLock`,224:`Meta`},H={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`};function Qn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=H[e])?!!t[e]:!1}function $n(){return Qn}var er=Fn(T({},Rn,{key:function(e){if(e.key){var t=Xn[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=Mn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?Zn[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$n,charCode:function(e){return e.type===`keypress`?Mn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?Mn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),tr=Fn(T({},Un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),nr=Fn(T({},In,{submitter:0})),rr=Fn(T({},Rn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$n})),ir=Fn(T({},In,{propertyName:0,elapsedTime:0,pseudoElement:0})),ar=Fn(T({},Un,{deltaX:function(e){return`deltaX`in e?e.deltaX:`wheelDeltaX`in e?-e.wheelDeltaX:0},deltaY:function(e){return`deltaY`in e?e.deltaY:`wheelDeltaY`in e?-e.wheelDeltaY:`wheelDelta`in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),or=Fn(T({},In,{newState:0,oldState:0,source:0})),sr=[9,13,27,32],cr=Tn&&`CompositionEvent`in window,lr=null;Tn&&`documentMode`in document&&(lr=document.documentMode);var ur=Tn&&`TextEvent`in window&&!lr,dr=Tn&&(!cr||lr&&8<lr&&11>=lr),fr=` `,pr=!1;function mr(e,t){switch(e){case`keyup`:return sr.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==229;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function hr(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}var gr=!1;function _r(e,t){switch(e){case`compositionend`:return hr(t);case`keypress`:return t.which===32?(pr=!0,fr):null;case`textInput`:return e=t.data,e===fr&&pr?null:e;default:return null}}function vr(e,t){if(gr)return e===`compositionend`||!cr&&mr(e,t)?(e=jn(),An=kn=On=null,gr=!1,e):null;switch(e){case`paste`:return null;case`keypress`:if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case`compositionend`:return dr&&t.locale!==`ko`?null:t.data;default:return null}}var yr={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function br(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!yr[e.type]:t===`textarea`}function xr(e,t,n,r){yn?bn?bn.push(r):bn=[r]:yn=r,t=Zf(t,`onChange`),0<t.length&&(n=new Ln(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}var Sr=null,Cr=null;function wr(e){Uf(e,0)}function Tr(e){if(Qt(jt(e)))return e}function Er(e,t){if(e===`change`)return t}var Dr=!1;if(Tn){var Or;if(Tn){var kr=`oninput`in document;if(!kr){var Ar=document.createElement(`div`);Ar.setAttribute(`oninput`,`return;`),kr=typeof Ar.oninput==`function`}Or=kr}else Or=!1;Dr=Or&&(!document.documentMode||9<document.documentMode)}function jr(){Sr&&(Sr.detachEvent(`onpropertychange`,Mr),Cr=Sr=null)}function Mr(e){if(e.propertyName===`value`&&Tr(Cr)){var t=[];xr(t,Cr,e,vn(e)),Cn(wr,t)}}function Nr(e,t,n){e===`focusin`?(jr(),Sr=t,Cr=n,Sr.attachEvent(`onpropertychange`,Mr)):e===`focusout`&&jr()}function Pr(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return Tr(Cr)}function Fr(e,t){if(e===`click`)return Tr(t)}function Ir(e,t){if(e===`input`||e===`change`)return Tr(t)}function Lr(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var Rr=typeof Object.is==`function`?Object.is:Lr;function zr(e,t){if(Rr(e,t))return!0;if(typeof e!=`object`||!e||typeof t!=`object`||!t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!Pe.call(t,i)||!Rr(e[i],t[i]))return!1}return!0}function Br(e){if(e||=typeof document<`u`?document:void 0,e===void 0)return null;try{return e.activeElement||e.body}catch{return e.body}}function Vr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Hr(e,t){var n=Vr(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}a:{for(;n;){if(n.nextSibling){n=n.nextSibling;break a}n=n.parentNode}n=void 0}n=Vr(n)}}function Ur(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ur(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Wr(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Br(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href==`string`}catch{n=!1}if(n)e=t.contentWindow;else break;t=Br(e.document)}return t}function Gr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t===`input`&&(e.type===`text`||e.type===`search`||e.type===`tel`||e.type===`url`||e.type===`password`)||t===`textarea`||e.contentEditable===`true`)}var Kr=Tn&&`documentMode`in document&&11>=document.documentMode,qr=null,Jr=null,Yr=null,Xr=!1;function Zr(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Xr||qr==null||qr!==Br(r)||(r=qr,`selectionStart`in r&&Gr(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),Yr&&zr(Yr,r)||(Yr=r,r=Zf(Jr,`onSelect`),0<r.length&&(t=new Ln(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=qr)))}function Qr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}var $r={animationend:Qr(`Animation`,`AnimationEnd`),animationiteration:Qr(`Animation`,`AnimationIteration`),animationstart:Qr(`Animation`,`AnimationStart`),transitionrun:Qr(`Transition`,`TransitionRun`),transitionstart:Qr(`Transition`,`TransitionStart`),transitioncancel:Qr(`Transition`,`TransitionCancel`),transitionend:Qr(`Transition`,`TransitionEnd`)},ei={},ti={};Tn&&(ti=document.createElement(`div`).style,`AnimationEvent`in window||(delete $r.animationend.animation,delete $r.animationiteration.animation,delete $r.animationstart.animation),`TransitionEvent`in window||delete $r.transitionend.transition);function ni(e){if(ei[e])return ei[e];if(!$r[e])return e;var t=$r[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in ti)return ei[e]=t[n];return e}var ri=ni(`animationend`),ii=ni(`animationiteration`),ai=ni(`animationstart`),oi=ni(`transitionrun`),si=ni(`transitionstart`),ci=ni(`transitioncancel`),li=ni(`transitionend`),ui=new Map,di=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error fullscreenChange fullscreenError gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);di.push(`scrollEnd`);function fi(e,t){ui.set(e,t),Lt(t,[e])}var pi=0;function mi(e,t){if(e.name!=null&&e.name!==`auto`)return e.name;if(t.autoName!==null)return t.autoName;e=Cd.identifierPrefix;var n=pi++;return e=`_`+e+`t_`+n.toString(32)+`_`,t.autoName=e}function hi(e){if(e==null||typeof e==`string`)return e;var t=null,n=jd;if(n!==null)for(var r=0;r<n.length;r++){var i=e[n[r]];if(i!=null){if(i===`none`)return`none`;t=t==null?i:t+(` `+i)}}return t??e.default}function gi(e,t){return e=hi(e),t=hi(t),t==null?e===`auto`?null:e:t===`auto`?null:t}var _i=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},vi=[],yi=0,bi=0;function xi(){for(var e=yi,t=bi=yi=0;t<e;){var n=vi[t];vi[t++]=null;var r=vi[t];vi[t++]=null;var i=vi[t];vi[t++]=null;var a=vi[t];if(vi[t++]=null,r!==null&&i!==null){var o=r.pending;o===null?i.next=i:(i.next=o.next,o.next=i),r.pending=i}a!==0&&Ti(n,i,a)}}function Si(e,t,n,r){vi[yi++]=e,vi[yi++]=t,vi[yi++]=n,vi[yi++]=r,bi|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Ci(e,t,n,r){return Si(e,t,n,r),Ei(e)}function wi(e,t){return Si(e,null,null,t),Ei(e)}function Ti(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,a=e.return;a!==null;)a.childLanes|=n,r=a.alternate,r!==null&&(r.childLanes|=n),a.tag===22&&(e=a.stateNode,e===null||e._visibility&1||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-Xe(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function Ei(e){if(50<Md)throw Md=0,Nd=null,Error(i(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var Di={};function Oi(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ki(e,t,n,r){return new Oi(e,t,n,r)}function Ai(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ji(e,t){var n=e.alternate;return n===null?(n=ki(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&1206910976,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function Mi(e,t){e.flags&=1206910978;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function Ni(e,t,n,r,a,o){var s=0;if(r=e,typeof r==`function`)Ai(r)&&(s=1);else if(typeof r==`string`)s=Xm(e,n,xe.current)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(r){case oe:return e=ki(31,n,t,a),e.elementType=oe,e.lanes=o,e;case k:return Pi(n.children,a,o,t);case A:s=8,a|=24;break;case j:return e=ki(12,n,t,a|2),e.elementType=j,e.lanes=o,e;case ne:return e=ki(13,n,t,a),e.elementType=ne,e.lanes=o,e;case re:return e=ki(19,n,t,a),e.elementType=re,e.lanes=o,e;case se:case ce:return e=a|32,e=ki(30,n,t,e),e.elementType=ce,e.lanes=o,e.stateNode={autoName:null,paired:null,clones:null,ref:null},e;default:if(typeof r==`object`&&r)switch(r.$$typeof){case M:s=10;break a;case ee:s=9;break a;case te:s=11;break a;case ie:s=14;break a;case ae:s=16,r=null;break a}s=29,n=Error(i(130,e===null?`null`:typeof e,``)),r=null}return t=ki(s,n,t,a),t.elementType=e,t.type=r,t.lanes=o,t}function Pi(e,t,n,r){return e=ki(7,e,r,t),e.lanes=n,e}function Fi(e,t,n){return e=ki(6,e,null,t),e.lanes=n,e}function Ii(e){var t=ki(18,null,null,0);return t.stateNode=e,t}function Li(e,t,n){return t=ki(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var Ri=new WeakMap;function zi(e,t){if(typeof e==`object`&&e){var n=Ri.get(e);return n===void 0?(t={value:e,source:t,stack:z(t)},Ri.set(e,t),t):n}return{value:e,source:t,stack:z(t)}}var Bi=[],Vi=0,Hi=null,Ui=0,Wi=[],Gi=0,Ki=null,qi=1,Ji=``;function Yi(e,t){Bi[Vi++]=Ui,Bi[Vi++]=Hi,Hi=e,Ui=t}function Xi(e,t,n){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,Ki=e;var r=qi;e=Ji;var i=32-Xe(r)-1;r&=~(1<<i),n+=1;var a=32-Xe(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,qi=1<<32-Xe(t)+i|n<<i|r,Ji=a+e}else qi=1<<a|n<<i|r,Ji=e}function Zi(e){e.return!==null&&(Yi(e,1),Xi(e,1,0))}function Qi(e){for(;e===Hi;)Hi=Bi[--Vi],Bi[Vi]=null,Ui=Bi[--Vi],Bi[Vi]=null;for(;e===Ki;)Ki=Wi[--Gi],Wi[Gi]=null,Ji=Wi[--Gi],Wi[Gi]=null,qi=Wi[--Gi],Wi[Gi]=null}function $i(e,t){Wi[Gi++]=qi,Wi[Gi++]=Ji,Wi[Gi++]=Ki,qi=t.id,Ji=t.overflow,Ki=e}var ea=null,ta=null,na=!1,ra=null,ia=!1,aa=Error(i(519));function oa(e){throw da(zi(Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?`text`:`HTML`,``)),e)),aa}function sa(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[yt]=e,t[bt]=r,n){case`dialog`:Wf(`cancel`,t),Wf(`close`,t);break;case`iframe`:case`object`:case`embed`:Wf(`load`,t);break;case`video`:case`audio`:for(n=0;n<Vf.length;n++)Wf(Vf[n],t);break;case`source`:Wf(`error`,t);break;case`img`:case`image`:case`link`:Wf(`error`,t),Wf(`load`,t);break;case`details`:Wf(`toggle`,t);break;case`input`:Wf(`invalid`,t),nn(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`select`:Wf(`invalid`,t);break;case`textarea`:Wf(`invalid`,t),sn(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||rp(t.textContent,n)?(r.popover!=null&&(Wf(`beforetoggle`,t),Wf(`toggle`,t)),r.onScroll!=null&&Wf(`scroll`,t),r.onScrollEnd!=null&&Wf(`scrollend`,t),r.onClick!=null&&(t.onclick=gn),t=!0):t=!1,t||oa(e,!0)}function ca(e){for(ea=e.return;ea;)switch(ea.tag){case 5:case 31:case 13:ia=!1;return;case 27:case 3:ia=!0;return;default:ea=ea.return}}function la(e){if(e!==ea)return!1;if(!na)return ca(e),na=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||_p(e.type,e.memoizedProps)),n=!n),n&&ta&&oa(e),ca(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=mm(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(317));ta=mm(e)}else t===27?(t=ta,Ep(e.type)?(e=pm,pm=null,ta=e):ta=t):ta=ea?fm(e.stateNode.nextSibling):null;return!0}function ua(){ta=ea=null,na=!1}function U(){var e=ra;return e!==null&&(hd===null?hd=e:hd.push.apply(hd,e),ra=null),e}function da(e){ra===null?ra=[e]:ra.push(e)}var fa=ve(null),pa=null,ma=null;function ha(e,t,n){be(fa,t._currentValue),t._currentValue=n}function ga(e){e._currentValue=fa.current,ye(fa)}function _a(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)===t?r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t):(e.childLanes|=t,r!==null&&(r.childLanes|=t)),e===n)break;e=e.return}}function va(e,t,n,r){var a=e.child;for(a!==null&&(a.return=e);a!==null;){var o=a.dependencies;if(o!==null){var s=a.child;o=o.firstContext;a:for(;o!==null;){var c=o;o=a;for(var l=0;l<t.length;l++)if(c.context===t[l]){o.lanes|=n,c=o.alternate,c!==null&&(c.lanes|=n),_a(o.return,n,e),r||(s=null);break a}o=c.next}}else if(a.tag===18){if(s=a.return,s===null)throw Error(i(341));s.lanes|=n,o=s.alternate,o!==null&&(o.lanes|=n),_a(s,n,e),s=null}else a.tag===13&&a.memoizedState!==null&&a.memoizedState.dehydrated===null?(a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),_a(a.return,n,e),s=a.child,s=s===null?null:s.sibling):s=a.child;if(s!==null)s.return=a;else for(s=a;s!==null;){if(s===e){s=null;break}if(a=s.sibling,a!==null){a.return=s.return,s=a;break}s=s.return}a=s}}function ya(e,t,n,r){e=null;for(var a=t,o=!1;a!==null;){if(!o){if(a.flags&524288)o=!0;else if(a.flags&262144)break}if(a.tag===10){var s=a.alternate;if(s===null)throw Error(i(387));if(s=s.memoizedProps,s!==null){var c=a.type;Rr(a.pendingProps.value,s.value)||(e===null?e=[c]:e.push(c))}}else if(a===we.current){if(s=a.alternate,s===null)throw Error(i(387));s.memoizedState.memoizedState!==a.memoizedState.memoizedState&&(e===null?e=[uh]:e.push(uh))}a=a.return}return e!==null&&va(t,e,n,r),t.flags|=262144,e!==null}function ba(e){for(e=e.firstContext;e!==null;){if(!Rr(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function xa(e){pa=e,ma=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Sa(e){return wa(pa,e)}function Ca(e,t){return pa===null&&xa(e),wa(e,t)}function wa(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ma===null){if(e===null)throw Error(i(308));ma=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ma=ma.next=t;return n}var Ta=typeof AbortController<`u`?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(t,n){e.push(n)}};this.abort=function(){t.aborted=!0,e.forEach(function(e){return e()})}},Ea=t.unstable_scheduleCallback,Da=t.unstable_NormalPriority,Oa={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function ka(){return{controller:new Ta,data:new Map,refCount:0}}function Aa(e){e.refCount--,e.refCount===0&&Ea(Da,function(){e.controller.abort()})}function ja(e,t){if(e.pendingLanes&4194048){var n=e.transitionTypes;for(n===null&&(n=e.transitionTypes=[]),e=0;e<t.length;e++){var r=t[e];n.indexOf(r)===-1&&n.push(r)}}}var Ma=null;function Na(e){var t=e.transitionTypes;return e.transitionTypes=null,t}var Pa=null,Fa=0,Ia=0,La=null;function Ra(e,t){if(Pa===null){var n=Pa=[];Fa=0,Ia=If(),La={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return Fa++,t.then(za,za),t}function za(){if(--Fa===0&&(Ma=null,Pa!==null)){La!==null&&(La.status=`fulfilled`);var e=Pa;Pa=null,Ia=0,La=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Ba(e,t){var n=[],r={status:`pending`,value:null,reason:null,then:function(e){n.push(e)}};return e.then(function(){r.status=`fulfilled`,r.value=t;for(var e=0;e<n.length;e++)(0,n[e])(t)},function(e){for(r.status=`rejected`,r.reason=e,e=0;e<n.length;e++)(0,n[e])(void 0)}),r}var Va=P.S;P.S=function(e,t){if(vd=B(),typeof t==`object`&&t&&typeof t.then==`function`&&Ra(e,t),Ma!==null)for(var n=Sf;n!==null;)ja(n,Ma),n=n.next;if(n=e.types,n!==null){for(var r=Sf;r!==null;)ja(r,n),r=r.next;if(Ia!==0){r=Ma,r===null&&(r=Ma=[]);for(var i=0;i<n.length;i++){var a=n[i];r.indexOf(a)===-1&&r.push(a)}}}Va!==null&&Va(e,t)};var Ha=ve(null);function Ua(){var e=Ha.current;return e===null?$u.pooledCache:e}function Wa(e,t){t===null?be(Ha,Ha.current):be(Ha,t.pool)}function Ga(){var e=Ua();return e===null?null:{parent:Oa._currentValue,pool:e}}var Ka=Error(i(460)),qa=Error(i(474)),Ja=Error(i(542)),Ya={then:function(){}};function Xa(e){return e=e.status,e===`fulfilled`||e===`rejected`}function Za(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(gn,gn),t=n),t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,to(e),e===void 0&&!(`reason`in t)?Error(i(600)):e;default:if(typeof t.status==`string`)t.then(gn,gn);else{if(e=$u,e!==null&&100<e.shellSuspendCounter)throw Error(i(482));e=t,e.status=`pending`,e.then(function(e){if(t.status===`pending`){var n=t;n.status=`fulfilled`,n.value=e}},function(e){if(t.status===`pending`){var n=t;n.status=`rejected`,n.reason=e}})}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,to(e),e}throw $a=t,Ka}}function Qa(e){try{var t=e._init;return t(e._payload)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?($a=e,Ka):e}}var $a=null;function eo(){if($a===null)throw Error(i(459));var e=$a;return $a=null,e}function to(e){if(e===Ka||e===Ja)throw Error(i(483))}var no=null,ro=0;function io(e){var t=ro;return ro+=1,no===null&&(no=[]),Za(no,e,t)}function W(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function ao(e,t){throw t.$$typeof===E?Error(i(525)):(e=Object.prototype.toString.call(t),Error(i(31,e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)))}function oo(e){function t(t,n){if(e){var r=t.deletions;r===null?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;r!==null;)t(n,r),r=r.sibling;return null}function r(e){for(var t=new Map;e!==null;)e.key===null?t.set(e.index,e):t.set(e.key,e),e=e.sibling;return t}function a(e,t){return e=ji(e,t),e.index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=134217730,n):(r=r.index,r<n?(t.flags|=2,n):r)):(t.flags|=1048576,n)}function s(t){return e&&t.alternate===null&&(t.flags|=134217730),t}function c(e,t,n,r){return t===null||t.tag!==6?(t=Fi(n,e.mode,r),t.return=e,t):(t=a(t,n),t.return=e,t)}function l(e,t,n,r){var i=n.type;return i===k?(e=d(e,t,n.props.children,r,n.key),W(e,n),e):t!==null&&(t.elementType===i||typeof i==`object`&&i&&i.$$typeof===ae&&Qa(i)===t.type)?(t=a(t,n.props),W(t,n),t.return=e,t):(t=Ni(n.type,n.key,n.props,null,e.mode,r),W(t,n),t.return=e,t)}function u(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Li(n,e.mode,r),t.return=e,t):(t=a(t,n.children||[]),t.return=e,t)}function d(e,t,n,r,i){return t===null||t.tag!==7?(t=Pi(n,e.mode,r,i),t.return=e,t):(t=a(t,n),t.return=e,t)}function f(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Fi(``+t,e.mode,n),t.return=e,t;if(typeof t==`object`&&t){switch(t.$$typeof){case D:return n=Ni(t.type,t.key,t.props,null,e.mode,n),W(n,t),n.return=e,n;case O:return t=Li(t,e.mode,n),t.return=e,t;case ae:return t=Qa(t),f(e,t,n)}if(me(t)||de(t))return t=Pi(t,e.mode,n,null),t.return=e,t;if(typeof t.then==`function`)return f(e,io(t),n);if(t.$$typeof===M)return f(e,Ca(e,t),n);ao(e,t)}return null}function p(e,t,n,r){var i=t===null?null:t.key;if(typeof n==`string`&&n!==``||typeof n==`number`||typeof n==`bigint`)return i===null?c(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case D:return n.key===i?l(e,t,n,r):null;case O:return n.key===i?u(e,t,n,r):null;case ae:return n=Qa(n),p(e,t,n,r)}if(me(n)||de(n))return i===null?d(e,t,n,r,null):null;if(typeof n.then==`function`)return p(e,t,io(n),r);if(n.$$typeof===M)return p(e,t,Ca(e,n),r);ao(e,n)}return null}function m(e,t,n,r,i){if(typeof r==`string`&&r!==``||typeof r==`number`||typeof r==`bigint`)return e=e.get(n)||null,c(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case D:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case O:return e=e.get(r.key===null?n:r.key)||null,u(t,e,r,i);case ae:return r=Qa(r),m(e,t,n,r,i)}if(me(r)||de(r))return e=e.get(n)||null,d(t,e,r,i,null);if(typeof r.then==`function`)return m(e,t,n,io(r),i);if(r.$$typeof===M)return m(e,t,n,Ca(t,r),i);ao(t,r)}return null}function h(i,a,s,c){for(var l=null,u=null,d=a,h=a=0,g=null;d!==null&&h<s.length;h++){d.index>h?(g=d,d=null):g=d.sibling;var _=p(i,d,s[h],c);if(_===null){d===null&&(d=g);break}e&&d&&_.alternate===null&&t(i,d),a=o(_,a,h),u===null?l=_:u.sibling=_,u=_,d=g}if(h===s.length)return n(i,d),na&&Yi(i,h),l;if(d===null){for(;h<s.length;h++)d=f(i,s[h],c),d!==null&&(a=o(d,a,h),u===null?l=d:u.sibling=d,u=d);return na&&Yi(i,h),l}for(d=r(d);h<s.length;h++)g=m(d,i,h,s[h],c),g!==null&&(e&&(_=g.alternate,_!==null&&d.delete(_.key===null?h:_.key)),a=o(g,a,h),u===null?l=g:u.sibling=g,u=g);return e&&d.forEach(function(e){return t(i,e)}),na&&Yi(i,h),l}function g(a,s,c,l){if(c==null)throw Error(i(151));for(var u=null,d=null,h=s,g=s=0,_=null,v=c.next();h!==null&&!v.done;g++,v=c.next()){h.index>g?(_=h,h=null):_=h.sibling;var y=p(a,h,v.value,l);if(y===null){h===null&&(h=_);break}e&&h&&y.alternate===null&&t(a,h),s=o(y,s,g),d===null?u=y:d.sibling=y,d=y,h=_}if(v.done)return n(a,h),na&&Yi(a,g),u;if(h===null){for(;!v.done;g++,v=c.next())v=f(a,v.value,l),v!==null&&(s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return na&&Yi(a,g),u}for(h=r(h);!v.done;g++,v=c.next())v=m(h,a,g,v.value,l),v!==null&&(e&&(_=v.alternate,_!==null&&h.delete(_.key===null?g:_.key)),s=o(v,s,g),d===null?u=v:d.sibling=v,d=v);return e&&h.forEach(function(e){return t(a,e)}),na&&Yi(a,g),u}function _(e,r,o,c){if(typeof o==`object`&&o&&o.type===k&&o.key===null&&o.props.ref===void 0&&(o=o.props.children),typeof o==`object`&&o){switch(o.$$typeof){case D:a:{for(var l=o.key;r!==null;){if(r.key===l){if(l=o.type,l===k){if(r.tag===7){n(e,r.sibling),c=a(r,o.props.children),W(c,o),c.return=e,e=c;break a}}else if(r.elementType===l||typeof l==`object`&&l&&l.$$typeof===ae&&Qa(l)===r.type){n(e,r.sibling),c=a(r,o.props),W(c,o),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}o.type===k?(c=Pi(o.props.children,e.mode,c,o.key),W(c,o),c.return=e,e=c):(c=Ni(o.type,o.key,o.props,null,e.mode,c),W(c,o),c.return=e,e=c)}return s(e);case O:a:{for(l=o.key;r!==null;){if(r.key===l){if(r.tag===4&&r.stateNode.containerInfo===o.containerInfo&&r.stateNode.implementation===o.implementation){n(e,r.sibling),c=a(r,o.children||[]),c.return=e,e=c;break a}n(e,r);break}t(e,r),r=r.sibling}c=Li(o,e.mode,c),c.return=e,e=c}return s(e);case ae:return o=Qa(o),_(e,r,o,c)}if(me(o))return h(e,r,o,c);if(de(o)){if(l=de(o),typeof l!=`function`)throw Error(i(150));return o=l.call(o),g(e,r,o,c)}if(typeof o.then==`function`)return _(e,r,io(o),c);if(o.$$typeof===M)return _(e,r,Ca(e,o),c);ao(e,o)}return typeof o==`string`&&o!==``||typeof o==`number`||typeof o==`bigint`?(o=``+o,r!==null&&r.tag===6?(n(e,r.sibling),c=a(r,o),c.return=e,e=c):(n(e,r),c=Fi(o,e.mode,c),c.return=e,e=c),s(e)):n(e,r)}return function(e,t,n,r){try{ro=0;var i=_(e,t,n,r);return no=null,i}catch(t){if(t===Ka||t===Ja)throw t;var a=ki(29,t,null,e.mode);return a.lanes=r,a.return=e,a}}}var so=oo(!0),co=oo(!1),lo=!1;function uo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function fo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function po(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,Qu&2){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=Ei(e),Ti(e,null,n),t}return Si(e,r,t,n),Ei(e)}function ho(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,n&4194048)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}function go(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n}else e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var _o=!1;function vo(){if(_o){var e=La;if(e!==null)throw e}}function yo(e,t,n,r){_o=!1;var i=e.updateQueue;lo=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var c=s,l=c.next;c.next=null,o===null?a=l:o.next=l,o=c;var u=e.alternate;u!==null&&(u=u.updateQueue,s=u.lastBaseUpdate,s!==o&&(s===null?u.firstBaseUpdate=l:s.next=l,u.lastBaseUpdate=c))}if(a!==null){var d=i.baseState;o=0,u=l=c=null,s=a;do{var f=s.lane&-536870913,p=f!==s.lane;if(p?(td&f)===f:(r&f)===f){f!==0&&f===Ia&&(_o=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{var m=e,h=s;f=t;var g=n;switch(h.tag){case 1:if(m=h.payload,typeof m==`function`){d=m.call(g,d,f);break a}d=m;break a;case 3:m.flags=m.flags&-65537|128;case 0:if(m=h.payload,f=typeof m==`function`?m.call(g,d,f):m,f==null)break a;d=T({},d,f);break a;case 2:lo=!0}}f=s.callback,f!==null&&(e.flags|=64,p&&(e.flags|=8192),p=i.callbacks,p===null?i.callbacks=[f]:p.push(f))}else p={lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},u===null?(l=u=p,c=d):u=u.next=p,o|=f;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;p=s,s=p.next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}while(1);u===null&&(c=d),i.baseState=c,i.firstBaseUpdate=l,i.lastBaseUpdate=u,a===null&&(i.shared.lanes=0),ld|=o,e.lanes=o,e.memoizedState=d}}function G(e,t){if(typeof e!=`function`)throw Error(i(191,e));e.call(t)}function bo(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)G(n[e],t)}var xo=ve(null),So=ve(0);function Co(e,t){e=sd,be(So,e),be(xo,t),sd=e|t.baseLanes}function wo(){be(So,sd),be(xo,xo.current)}function To(){sd=So.current,ye(xo),ye(So)}var Eo=ve(null),Do=null;function Oo(e){var t=e.alternate;be(No,No.current&1),be(Eo,e),Do===null&&(t===null||xo.current!==null||t.memoizedState!==null)&&(Do=e)}function ko(e){be(No,No.current),be(Eo,e),Do===null&&(Do=e)}function Ao(e){e.tag===22?(be(No,No.current),be(Eo,e),Do===null&&(Do=e)):jo()}function jo(){be(No,No.current),be(Eo,Eo.current)}function Mo(e){ye(Eo),Do===e&&(Do=null),ye(No)}var No=ve(0);function Po(e,t){be(Eo,Eo.current),be(No,t)}function K(e){ye(No),ye(Eo),Do===e&&(Do=null)}function Fo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||lm(n)||um(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==`independent`){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Io=0,Lo=null,Ro=null,zo=null,Bo=!1,Vo=!1,Ho=!1,Uo=0,Wo=0,Go=null,Ko=0;function qo(){throw Error(i(321))}function Jo(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Rr(e[n],t[n]))return!1;return!0}function Yo(e,t,n,r,i,a){return Io=a,Lo=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,P.H=e===null||e.memoizedState===null?pc:mc,Ho=!1,a=n(r,i),Ho=!1,Vo&&(a=Zo(t,n,r,i)),Xo(e),a}function Xo(e){P.H=fc;var t=Ro!==null&&Ro.next!==null;if(Io=0,zo=Ro=Lo=null,Bo=!1,Wo=0,Go=null,t)throw Error(i(300));e===null||jc||(e=e.dependencies,e!==null&&ba(e)&&(jc=!0))}function Zo(e,t,n,r){Lo=e;var a=0;do{if(Vo&&(Go=null),Wo=0,Vo=!1,25<=a)throw Error(i(301));if(a+=1,zo=Ro=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}P.H=hc,o=t(n,r)}while(Vo);return o}function Qo(){var e=P.H,t=e.useState()[0];return t=typeof t.then==`function`?as(t):t,e=e.useState()[0],(Ro===null?null:Ro.memoizedState)!==e&&(Lo.flags|=1024),t}function $o(){var e=Uo!==0;return Uo=0,e}function es(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ts(e){if(Bo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Bo=!1}Io=0,zo=Ro=Lo=null,Vo=!1,Wo=Uo=0,Go=null}function ns(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return zo===null?Lo.memoizedState=zo=e:zo=zo.next=e,zo}function rs(){if(Ro===null){var e=Lo.alternate;e=e===null?null:e.memoizedState}else e=Ro.next;var t=zo===null?Lo.memoizedState:zo.next;if(t!==null)zo=t,Ro=e;else{if(e===null)throw Lo.alternate===null?Error(i(467)):Error(i(310));Ro=e,e={memoizedState:Ro.memoizedState,baseState:Ro.baseState,baseQueue:Ro.baseQueue,queue:Ro.queue,next:null},zo===null?Lo.memoizedState=zo=e:zo=zo.next=e}return zo}function is(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function as(e){var t=Wo;return Wo+=1,Go===null&&(Go=[]),e=Za(Go,e,t),t=Lo,(zo===null?t.memoizedState:zo.next)===null&&(t=t.alternate,P.H=t===null||t.memoizedState===null?pc:mc),e}function ss(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return as(e);if(e.$$typeof===le)return;if(e.$$typeof===M)return Sa(e)}throw Error(i(438,String(e)))}function cs(e){var t=null,n=Lo.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Lo.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(e){return e.slice()}),index:0})))}if(t??={data:[],index:0},n===null&&(n=is(),Lo.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=N;return t.index++,n}function ls(e,t){return typeof t==`function`?t(e):t}function us(e){return ds(rs(),Ro,e)}function ds(e,t,n){var r=e.queue;if(r===null)throw Error(i(311));r.lastRenderedReducer=n;var a=e.baseQueue,o=r.pending;if(o!==null){if(a!==null){var s=a.next;a.next=o.next,o.next=s}t.baseQueue=a=o,r.pending=null}if(o=e.baseState,a===null)e.memoizedState=o;else{t=a.next;var c=s=null,l=null,u=t,d=!1;do{var f=u.lane&-536870913;if(f===u.lane?(Io&f)===f:(td&f)===f){var p=u.revertLane;if(p===0)l!==null&&(l=l.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),f===Ia&&(d=!0);else if((Io&p)===p){u=u.next,p===Ia&&(d=!0);continue}else f={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=f,s=o):l=l.next=f,Lo.lanes|=p,ld|=p;f=u.action,Ho&&n(o,f),o=u.hasEagerState?u.eagerState:n(o,f)}else p={lane:f,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},l===null?(c=l=p,s=o):l=l.next=p,Lo.lanes|=f,ld|=f;u=u.next}while(u!==null&&u!==t);if(l===null?s=o:l.next=c,!Rr(o,e.memoizedState)&&(jc=!0,d&&(n=La,n!==null)))throw n;e.memoizedState=o,e.baseState=s,e.baseQueue=l,r.lastRenderedState=o}return a===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function fs(e){var t=rs(),n=t.queue;if(n===null)throw Error(i(311));n.lastRenderedReducer=e;var r=n.dispatch,a=n.pending,o=t.memoizedState;if(a!==null){n.pending=null;var s=a=a.next;do o=e(o,s.action),s=s.next;while(s!==a);Rr(o,t.memoizedState)||(jc=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function ps(e,t,n){var r=Lo,a=rs(),o=na;if(o){if(n===void 0)throw Error(i(407));n=n()}else n=t();var s=!Rr((Ro||a).memoizedState,n);if(s&&(a.memoizedState=n,jc=!0),a=a.queue,Rs(gs.bind(null,r,a,e),[e]),e=a.getSnapshot!==t||s||zo!==null&&!!(zo.memoizedState.tag&1),Ns(e?9:8,{destroy:void 0},hs.bind(null,r,a,n,t),null),e){if(r.flags|=2048,$u===null)throw Error(i(349));o||Io&127||ms(r,t,n)}return n}function ms(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Lo.updateQueue,t===null?(t=is(),Lo.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function hs(e,t,n,r){t.value=n,t.getSnapshot=r,_s(t)&&vs(e)}function gs(e,t,n){return n(function(){_s(t)&&vs(e)})}function _s(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Rr(e,n)}catch{return!0}}function vs(e){var t=wi(e,2);t!==null&&Ld(t,e,2)}function ys(e){var t=ns();if(typeof e==`function`){var n=e;if(e=n(),Ho){Ye(!0);try{n()}finally{Ye(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:e},t}function bs(e,t,n,r){return e.baseState=n,ds(e,Ro,typeof r==`function`?r:ls)}function xs(e,t,n,r,a){if(lc(e))throw Error(i(485));if(e=t.action,e!==null){var o={payload:a,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){o.listeners.push(e)}};P.T===null?o.isTransition=!1:n(!0),r(o),n=t.pending,n===null?(o.next=t.pending=o,Ss(t,o)):(o.next=n.next,t.pending=n.next=o)}}function Ss(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=P.T,o={};o.types=a===null?null:a.types,P.T=o;try{var s=n(i,r),c=P.S;c!==null&&c(o,s),Cs(e,t,s)}catch(n){Ts(e,t,n)}finally{a!==null&&o.types!==null&&(a.types=o.types),P.T=a}}else try{a=n(i,r),Cs(e,t,a)}catch(n){Ts(e,t,n)}}function Cs(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?n.then(function(n){ws(e,t,n)},function(n){return Ts(e,t,n)}):ws(e,t,n)}function ws(e,t,n){t.status=`fulfilled`,t.value=n,Es(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Ss(e,n)))}function Ts(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,Es(t),t=t.next;while(t!==r)}e.action=null}function Es(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Ds(e,t){return t}function Os(e,t){if(na){var n=$u.formState;if(n!==null){a:{var r=Lo;if(na){if(ta){b:{for(var i=ta,a=ia;i.nodeType!==8;)if(!a||(i=fm(i.nextSibling),i===null)){i=null;break b}a=i.data,i=a===`F!`||a===`F`?i:null}if(i){ta=fm(i.nextSibling),r=i.data===`F!`;break a}}oa(r)}r=!1}r&&(t=n[0])}}return n=ns(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ds,lastRenderedState:t},n.queue=r,n=oc.bind(null,Lo,r),r.dispatch=n,r=ys(!1),a=cc.bind(null,Lo,!1,r.queue),r=ns(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=xs.bind(null,Lo,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function ks(e){return As(rs(),Ro,e)}function As(e,t,n){if(t=ds(e,t,Ds)[0],e=us(ls)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=as(t)}catch(e){throw e===Ka?Ja:e}else r=t;t=rs();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Lo.flags|=2048,Ns(9,{destroy:void 0},js.bind(null,i,n),null)),[r,a,e]}function js(e,t){e.action=t}function Ms(e){var t=rs(),n=Ro;if(n!==null)return As(t,n,e);rs(),t=t.memoizedState,n=rs();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ns(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Lo.updateQueue,t===null&&(t=is(),Lo.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Ps(){return rs().memoizedState}function Fs(e,t,n,r){var i=ns();Lo.flags|=e,i.memoizedState=Ns(1|t,{destroy:void 0},n,r===void 0?null:r)}function Is(e,t,n,r){var i=rs();r=r===void 0?null:r;var a=i.memoizedState.inst;Ro!==null&&r!==null&&Jo(r,Ro.memoizedState.deps)?i.memoizedState=Ns(t,a,n,r):(Lo.flags|=e,i.memoizedState=Ns(1|t,a,n,r))}function Ls(e,t){Fs(8390656,8,e,t)}function Rs(e,t){Is(2048,8,e,t)}function zs(e){Lo.flags|=4;var t=Lo.updateQueue;if(t===null)t=is(),Lo.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Bs(e){var t=rs().memoizedState;return zs({ref:t,nextImpl:e}),function(){if(Qu&2)throw Error(i(440));return t.impl.apply(void 0,arguments)}}function Vs(e,t){return Is(4,2,e,t)}function Hs(e,t){return Is(4,4,e,t)}function Us(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Ws(e,t,n){n=n==null?null:n.concat([e]),Is(4,4,Us.bind(null,t,e),n)}function Gs(){}function Ks(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&Jo(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=rs();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&Jo(t,r[1]))return r[0];if(r=e(),Ho){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r}function Js(e,t,n){return n===void 0||Io&1073741824&&!(td&261930)?e.memoizedState=t:(e.memoizedState=n,e=Fd(),Lo.lanes|=e,ld|=e,n)}function Ys(e,t,n,r){return Rr(n,t)?n:xo.current===null?!(Io&106)||Io&1073741824&&!(td&261930)?(jc=!0,e.memoizedState=n):(e=Fd(),Lo.lanes|=e,ld|=e,t):(e=Js(e,n,r),Rr(e,t)||(jc=!0),e)}function Xs(e,t,n,r,i){var a=F.p;F.p=a!==0&&8>a?a:8;var o=P.T,s={};s.types=o===null?null:o.types,P.T=s,cc(e,!1,t,n);try{var c=i(),l=P.S;l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`?sc(e,t,Ba(c,r),Pd(e)):sc(e,t,r,Pd(e))}catch(n){sc(e,t,{then:function(){},status:`rejected`,reason:n},Pd())}finally{F.p=a,o!==null&&s.types!==null&&(o.types=s.types),P.T=o}}function Zs(){}function Qs(e,t,n,r){if(e.tag!==5)throw Error(i(476));var a=$s(e).queue;Xs(e,a,t,ge,n===null?Zs:function(){return ec(e),n(r)})}function $s(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ge,baseState:ge,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:ge},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ls,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function ec(e){var t=$s(e);t.next===null&&(t=e.alternate.memoizedState),sc(e,t.next.queue,{},Pd())}function tc(){return Sa(uh)}function nc(){return rs().memoizedState}function rc(){return rs().memoizedState}function ic(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Pd();e=po(n);var r=mo(t,e,n);r!==null&&(Ld(r,t,n),ho(r,t,n)),t={cache:ka()},e.payload=t;return}t=t.return}}function ac(e,t,n){var r=Pd();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?uc(t,n):(n=Ci(e,t,n,r),n!==null&&(Ld(n,e,r),dc(n,t,r)))}function oc(e,t,n){sc(e,t,n,Pd())}function sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))uc(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Rr(s,o))return Si(e,t,i,0),$u===null&&xi(),!1}catch{}if(n=Ci(e,t,i,r),n!==null)return Ld(n,e,r),dc(n,t,r),!0}return!1}function cc(e,t,n,r){if(r={lane:2,revertLane:If(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(i(479))}else t=Ci(e,n,r,2),t!==null&&Ld(t,e,2)}function lc(e){var t=e.alternate;return e===Lo||t!==null&&t===Lo}function uc(e,t){Vo=Bo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function dc(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,ft(e,n)}}var fc={readContext:Sa,use:ss,useCallback:qo,useContext:qo,useEffect:qo,useImperativeHandle:qo,useLayoutEffect:qo,useInsertionEffect:qo,useMemo:qo,useReducer:qo,useRef:qo,useState:qo,useDebugValue:qo,useDeferredValue:qo,useTransition:qo,useSyncExternalStore:qo,useId:qo,useHostTransitionStatus:qo,useFormState:qo,useActionState:qo,useOptimistic:qo,useMemoCache:qo,useCacheRefresh:qo,useEffectEvent:qo},pc={readContext:Sa,use:ss,useCallback:function(e,t){return ns().memoizedState=[e,t===void 0?null:t],e},useContext:Sa,useEffect:Ls,useImperativeHandle:function(e,t,n){n=n==null?null:n.concat([e]),Fs(4194308,4,Us.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Fs(4194308,4,e,t)},useInsertionEffect:function(e,t){Fs(4,2,e,t)},useMemo:function(e,t){var n=ns();t=t===void 0?null:t;var r=e();if(Ho){Ye(!0);try{e()}finally{Ye(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=ns();if(n!==void 0){var i=n(t);if(Ho){Ye(!0);try{n(t)}finally{Ye(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=ac.bind(null,Lo,e),[r.memoizedState,e]},useRef:function(e){var t=ns();return e={current:e},t.memoizedState=e},useState:function(e){e=ys(e);var t=e.queue,n=oc.bind(null,Lo,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Gs,useDeferredValue:function(e,t){return Js(ns(),e,t)},useTransition:function(){var e=ys(!1);return e=Xs.bind(null,Lo,e.queue,!0,!1),ns().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=Lo,a=ns();if(na){if(n===void 0)throw Error(i(407));n=n()}else{if(n=t(),$u===null)throw Error(i(349));td&127||ms(r,t,n)}a.memoizedState=n;var o={value:n,getSnapshot:t};return a.queue=o,Ls(gs.bind(null,r,o,e),[e]),r.flags|=2048,Ns(9,{destroy:void 0},hs.bind(null,r,o,n,t),null),n},useId:function(){var e=ns(),t=$u.identifierPrefix;if(na){var n=Ji,r=qi;n=(r&~(1<<32-Xe(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Uo++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=Ko++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t},useHostTransitionStatus:tc,useFormState:Os,useActionState:Os,useOptimistic:function(e){var t=ns();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=cc.bind(null,Lo,!0,n),n.dispatch=t,[e,t]},useMemoCache:cs,useCacheRefresh:function(){return ns().memoizedState=ic.bind(null,Lo)},useEffectEvent:function(e){var t=ns(),n={impl:e};return t.memoizedState=n,function(){if(Qu&2)throw Error(i(440));return n.impl.apply(void 0,arguments)}}},mc={readContext:Sa,use:ss,useCallback:Ks,useContext:Sa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:us,useRef:Ps,useState:function(){return us(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){return Ys(rs(),Ro.memoizedState,e,t)},useTransition:function(){var e=us(ls)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:ks,useActionState:ks,useOptimistic:function(e,t){return bs(rs(),Ro,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs},hc={readContext:Sa,use:ss,useCallback:Ks,useContext:Sa,useEffect:Rs,useImperativeHandle:Ws,useInsertionEffect:Vs,useLayoutEffect:Hs,useMemo:qs,useReducer:fs,useRef:Ps,useState:function(){return fs(ls)},useDebugValue:Gs,useDeferredValue:function(e,t){var n=rs();return Ro===null?Js(n,e,t):Ys(n,Ro.memoizedState,e,t)},useTransition:function(){var e=fs(ls)[0],t=rs().memoizedState;return[typeof e==`boolean`?e:as(e),t]},useSyncExternalStore:ps,useId:nc,useHostTransitionStatus:tc,useFormState:Ms,useActionState:Ms,useOptimistic:function(e,t){var n=rs();return Ro===null?(n.baseState=e,[e,n.queue.dispatch]):bs(n,Ro,e,t)},useMemoCache:cs,useCacheRefresh:rc,useEffectEvent:Bs};function gc(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:T({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var _c={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=po(r);i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Ld(t,e,r),ho(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Pd(),i=po(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(Ld(t,e,r),ho(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Pd(),r=po(n);r.tag=2,t!=null&&(r.callback=t),t=mo(e,r,n),t!==null&&(Ld(t,e,n),ho(t,e,n))}};function vc(e,t,n,r,i,a,o){return e=e.stateNode,typeof e.shouldComponentUpdate==`function`?e.shouldComponentUpdate(r,a,o):t.prototype&&t.prototype.isPureReactComponent?!zr(n,r)||!zr(i,a):!0}function yc(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&_c.enqueueReplaceState(t,t.state,null)}function bc(e,t){var n=t;if(`ref`in t)for(var r in n={},t)r!==`ref`&&(n[r]=t[r]);if(e=e.defaultProps)for(var i in n===t&&(n=T({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function xc(e){_i(e)}function Sc(e){console.error(e)}function Cc(e){_i(e)}function wc(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(e){setTimeout(function(){throw e})}}function Tc(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function Ec(e,t,n){return n=po(n),n.tag=3,n.payload={element:null},n.callback=function(){wc(e,t)},n}function Dc(e){return e=po(e),e.tag=3,e}function Oc(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i==`function`){var a=r.value;e.payload=function(){return i(a)},e.callback=function(){Tc(t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){Tc(t,n,r),typeof i!=`function`&&(xd===null?xd=new Set([this]):xd.add(this));var e=r.stack;this.componentDidCatch(r.value,{componentStack:e===null?``:e})})}function kc(e,t,n,r,a){if(n.flags|=32768,typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&ya(t,n,a,!0),n=Eo.current,n!==null){switch(n.tag){case 31:case 13:case 19:return Do===null?Yd():n.alternate===null&&cd===0&&(cd=3),n.flags&=-257,n.flags|=65536,n.lanes=a,r===Ya?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),gf(e,r,a)),!1;case 22:return n.flags|=65536,r===Ya?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),gf(e,r,a)),!1}throw Error(i(435,n.tag))}return gf(e,r,a),Yd(),!1}if(na)return t=Eo.current,t===null?(r!==aa&&(t=Error(i(423),{cause:r}),da(zi(t,n))),e=e.current.alternate,e.flags|=65536,a&=-a,e.lanes|=a,r=zi(r,n),a=Ec(e.stateNode,r,a),go(e,a),cd!==4&&(cd=2)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=a,r!==aa&&(e=Error(i(422),{cause:r}),da(zi(e,n)))),!1;var o=Error(i(520),{cause:r});if(o=zi(o,n),md===null?md=[o]:md.push(o),cd!==4&&(cd=2),t===null)return!0;r=zi(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=a&-a,n.lanes|=e,e=Ec(n.stateNode,r,e),go(n,e),!1;case 1:if(t=n.type,o=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||o!==null&&typeof o.componentDidCatch==`function`&&(xd===null||!xd.has(o))))return n.flags|=65536,a&=-a,n.lanes|=a,a=Dc(a),Oc(a,e,n,r),go(n,a),!1;break;case 22:if(n.memoizedState!==null)return n.flags|=65536,!1}n=n.return}while(n!==null);return!1}var Ac=Error(i(461)),jc=!1;function Mc(e,t,n,r){t.child=e===null?co(t,null,n,r):so(t,e.child,n,r)}function Nc(e,t,n,r,i){n=n.render;var a=t.ref;if(`ref`in r){var o={};for(var s in r)s!==`ref`&&(o[s]=r[s])}else o=r;return xa(t),r=Yo(e,t,n,o,a,i),s=$o(),e!==null&&!jc?(es(e,t,i),sl(e,t,i)):(na&&s&&Zi(t),t.flags|=1,Mc(e,t,r,i),t.child)}function Pc(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!Ai(a)&&a.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=a,Fc(e,t,a,r,i)):(e=Ni(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!cl(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?zr:n,n(o,r)&&e.ref===t.ref)return sl(e,t,i)}return t.flags|=1,e=ji(a,r),e.ref=t.ref,e.return=t,t.child=e}function Fc(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(zr(a,r)&&e.ref===t.ref){if(jc=!1,t.pendingProps=r=a,cl(e,i))e.flags&131072&&(jc=!0);else return t.lanes=e.lanes,sl(e,t,i)}}return Uc(e,t,n,r,i)}function Ic(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode===`hidden`){if(t.flags&128){if(a=a===null?n:a.baseLanes|n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~a}else r=0,t.child=null;return Rc(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Wa(t,a===null?null:a.cachePool),a===null?wo():Co(t,a),Ao(t);else return r=t.lanes=536870912,Rc(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Wa(t,null),wo(),jo()):(Wa(t,a.cachePool),Co(t,a),jo(),t.memoizedState=null);return Mc(e,t,i,n),t.child}function Lc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Rc(e,t,n,r,i){var a=Ua();return a=a===null?null:{parent:Oa._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Wa(t,null),wo(),Ao(t),e!==null&&ya(e,t,r,!0),t.childLanes=i,null}function zc(e,t){return t=Qc({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Bc(e,t,n){return so(t,e.child,null,n),e=zc(t,t.pendingProps),e.flags|=2,Mo(t),t.memoizedState=null,e}function Vc(e,t,n){var r=t.pendingProps,a=!!(t.flags&128);if(t.flags&=-129,e===null){if(na){if(r.mode===`hidden`)return e=zc(t,r),t.lanes=536870912,e.memoizedState={baseLanes:0,cachePool:null},Lc(null,e);if(ko(t),(e=ta)?(e=cm(e,ia),e=e!==null&&e.data===`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=536870912,null}return zc(t,r)}var o=e.memoizedState;if(o!==null){var s=o.dehydrated;if(ko(t),a){if(t.flags&256)t.flags&=-257,t=Bc(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(i(558))}else if(jc||ya(e,t,n,!1),a=(n&e.childLanes)!==0,jc||a){if(xo.current===null){if(r=$u,r!==null&&(s=pt(r,n),s!==0&&s!==o.retryLane))throw o.retryLane=s,wi(e,s),Ld(r,e,s),Ac;Yd()}t=Bc(e,t,n)}else e=o.treeContext,ta=fm(s.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=zc(t,r),t.flags|=134221824;return t}return e=ji(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Hc(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!=`function`&&typeof n!=`object`)throw Error(i(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Uc(e,t,n,r,i){return xa(t),n=Yo(e,t,n,r,void 0,i),r=$o(),e!==null&&!jc?(es(e,t,i),sl(e,t,i)):(na&&r&&Zi(t),t.flags|=1,Mc(e,t,n,i),t.child)}function Wc(e,t,n,r,i,a){return xa(t),t.updateQueue=null,n=Zo(t,r,n,i),Xo(e),r=$o(),e!==null&&!jc?(es(e,t,a),sl(e,t,a)):(na&&r&&Zi(t),t.flags|=1,Mc(e,t,n,a),t.child)}function Gc(e,t,n,r,i){if(xa(t),t.stateNode===null){var a=Di,o=n.contextType;typeof o==`object`&&o&&(a=Sa(o)),a=new n(r,a),t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=_c,t.stateNode=a,a._reactInternals=t,a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},uo(t),o=n.contextType,a.context=typeof o==`object`&&o?Sa(o):Di,a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(gc(t,n,o,r),a.state=t.memoizedState),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(o=a.state,typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount(),o!==a.state&&_c.enqueueReplaceState(a,a.state,null),yo(t,r,a,i),vo(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!0}else if(e===null){a=t.stateNode;var s=t.memoizedProps,c=bc(n,s);a.props=c;var l=a.context,u=n.contextType;o=Di,typeof u==`object`&&u&&(o=Sa(u));var d=n.getDerivedStateFromProps;u=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`,s=t.pendingProps!==s,u||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(s||l!==o)&&yc(t,a,r,o),lo=!1;var f=t.memoizedState;a.state=f,yo(t,r,a,i),vo(),l=t.memoizedState,s||f!==l||lo?(typeof d==`function`&&(gc(t,n,d,r),l=t.memoizedState),(c=lo||vc(t,n,c,r,f,l,o))?(u||typeof a.UNSAFE_componentWillMount!=`function`&&typeof a.componentWillMount!=`function`||(typeof a.componentWillMount==`function`&&a.componentWillMount(),typeof a.UNSAFE_componentWillMount==`function`&&a.UNSAFE_componentWillMount()),typeof a.componentDidMount==`function`&&(t.flags|=4194308)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=o,r=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,fo(e,t),o=t.memoizedProps,u=bc(n,o),a.props=u,d=t.pendingProps,f=a.context,l=n.contextType,c=Di,typeof l==`object`&&l&&(c=Sa(l)),s=n.getDerivedStateFromProps,(l=typeof s==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==d||f!==c)&&yc(t,a,r,c),lo=!1,f=t.memoizedState,a.state=f,yo(t,r,a,i),vo();var p=t.memoizedState;o!==d||f!==p||lo||e!==null&&e.dependencies!==null&&ba(e.dependencies)?(typeof s==`function`&&(gc(t,n,s,r),p=t.memoizedState),(u=lo||vc(t,n,u,r,f,p,c)||e!==null&&e.dependencies!==null&&ba(e.dependencies))?(l||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,p,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,p,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=c,r=u):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),r=!1)}return a=r,Hc(e,t),r=!!(t.flags&128),a||r?(a=t.stateNode,n=r&&typeof n.getDerivedStateFromError!=`function`?null:a.render(),t.flags|=1,e!==null&&r?(t.child=so(t,e.child,null,i),t.child=so(t,null,n,i)):Mc(e,t,n,i),t.memoizedState=a.state,e=t.child):e=sl(e,t,i),e}function Kc(e,t,n,r){return ua(),t.flags|=256,Mc(e,t,n,r),t.child}var qc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Jc(e){return{baseLanes:e,cachePool:Ga()}}function Yc(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=fd),e}function Xc(e,t,n){var r=t.pendingProps,i=!1,a=!!(t.flags&128),o;if((o=a)||(o=e!==null&&e.memoizedState===null?!1:!!(No.current&2)),o&&(i=!0,t.flags&=-129),o=!!(t.flags&32),t.flags&=-33,e===null){if(na){if(i?Oo(t):jo(),(e=ta)?(e=cm(e,ia),e=e!==null&&e.data!==`&`?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Ki===null?null:{id:qi,overflow:Ji},retryLane:536870912,hydrationErrors:null},n=Ii(e),n.return=t,t.child=n,ea=t,ta=null)):e=null,e===null)throw oa(t);return t.lanes=um(e)?32:536870912,null}return a=r.children,r=r.fallback,i?(jo(),i=t.mode,a=Qc({mode:`hidden`,children:a},i),r=Pi(r,i,n,null),a.return=t,r.return=t,a.sibling=r,t.child=a,r=t.child,r.memoizedState=Jc(n),r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(null,r)):(Oo(t),Zc(t,a))}var s=e.memoizedState;if(s!==null){var c=s.dehydrated;if(c!==null)return el(e,t,a,o,r,c,s,n)}return i?(jo(),i=r.fallback,a=t.mode,s=e.child,c=s.sibling,r=ji(s,{mode:`hidden`,children:r.children}),r.subtreeFlags=s.subtreeFlags&1206910976,c===null?(i=Pi(i,a,n,null),i.flags|=2):i=ji(c,i),i.return=t,r.return=t,r.sibling=i,t.child=r,Lc(null,r),r=t.child,i=e.child.memoizedState,i===null?i=Jc(n):(a=i.cachePool,a===null?a=Ga():(s=Oa._currentValue,a=a.parent===s?a:{parent:s,pool:s}),i={baseLanes:i.baseLanes|n,cachePool:a}),r.memoizedState=i,r.childLanes=Yc(e,o,n),t.memoizedState=qc,Lc(e.child,r)):(Oo(t),n=e.child,e=n.sibling,n=ji(n,{mode:`visible`,children:r.children}),n.return=t,n.sibling=null,e!==null&&(o=t.deletions,o===null?(t.deletions=[e],t.flags|=16):o.push(e)),t.child=n,t.memoizedState=null,n)}function Zc(e,t){return t=Qc({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Qc(e,t){return e=ki(22,e,null,t),e.lanes=0,e}function $c(e,t,n){return so(t,e.child,null,n),e=Zc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function el(e,t,n,r,a,o,s,c){if(n)return t.flags&256?(Oo(t),t.flags&=-257,$c(e,t,c)):t.memoizedState===null?(jo(),o=a.fallback,s=t.mode,a=Qc({mode:`visible`,children:a.children},s),o=Pi(o,s,c,null),o.flags|=2,a.return=t,o.return=t,a.sibling=o,t.child=a,so(t,e.child,null,c),a=t.child,a.memoizedState=Jc(c),a.childLanes=Yc(e,r,c),t.memoizedState=qc,Lc(null,a)):(jo(),t.child=e.child,t.flags|=128,null);if(Oo(t),um(o)){if(r=o.nextSibling&&o.nextSibling.dataset,r)var l=r.dgst;return r=l,r!==``&&(a=Error(i(419)),a.stack=``,a.digest=r,da({value:a,source:null,stack:null})),$c(e,t,c)}if(jc||ya(e,t,c,!1),r=(c&e.childLanes)!==0,jc||r){if(xo.current!==null)return $c(e,t,c);if(r=$u,r!==null&&(a=pt(r,c),a!==0&&a!==s.retryLane))throw s.retryLane=a,wi(e,a),Ld(r,e,a),Ac;return lm(o)||Yd(),$c(e,t,c)}return lm(o)?(t.flags|=192,t.child=e.child,null):(e=s.treeContext,ta=fm(o.nextSibling),ea=t,na=!0,ra=null,ia=!1,e!==null&&$i(t,e),t=Zc(t,a.children),t.flags|=134221824,t)}function tl(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),_a(e.return,t,n)}function nl(e){for(var t=null;e!==null;){var n=e.alternate;n!==null&&Fo(n)===null&&(t=e),e=e.sibling}return t}function rl(e,t,n,r,i,a){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:a}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i,o.treeForkCount=a)}function il(e){var t=e.child;for(e.child=null;t!==null;){var n=t.sibling;t.sibling=e.child,e.child=t,t=n}}function al(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;r=r.children;var o=No.current;if(t.flags&128)return Po(t,o),null;var s=!!(o&2);if(s?(o=o&1|2,t.flags|=128):o&=1,Po(t,o),i===`backwards`&&e!==null?(il(e),Mc(e,t,r,n),il(e)):Mc(e,t,r,n),r=na?Ui:0,!s&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&tl(e,n,t);else if(e.tag===19)tl(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`backwards`:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null,il(t)),rl(t,!0,i,null,a,r);break;case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Fo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}rl(t,!0,n,null,a,r);break;case`together`:rl(t,!1,null,null,void 0,r);break;case`independent`:t.memoizedState=null;break;default:n=nl(t.child),n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),rl(t,!1,i,n,a,r)}return t.child}function ol(e,t,n){var r=t.pendingProps;return ha(t,t.type,r.value),Mc(e,t,r.children,n),t.child}function sl(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ld|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(ya(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(i(153));if(t.child!==null){for(e=t.child,n=ji(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ji(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function cl(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&ba(e)))}function ll(e,t,n){switch(t.tag){case 3:Te(t,t.stateNode.containerInfo),ha(t,Oa,e.memoizedState.cache),ua();break;case 27:case 5:De(t);break;case 4:Te(t,t.stateNode.containerInfo);break;case 10:ha(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,ko(t),null;break;case 13:var r=t.memoizedState;if(r!==null){if(r.dehydrated!==null)return Oo(t),t.flags|=128,null;r=ya(e,t,n,!1);var i=t.child.childLanes;return r||(n&i)!==0?Xc(e,t,n):(Oo(t),e=sl(e,t,n),e===null?null:e.sibling)}Oo(t);break;case 19:if(t.flags&128)return al(e,t,n);if(i=!!(e.flags&128),r=(n&t.childLanes)!==0,r||=(ya(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return al(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Po(t,No.current),r)break;return null;case 22:return t.lanes=0,Ic(e,t,n,t.pendingProps);case 24:ha(t,Oa,e.memoizedState.cache)}return sl(e,t,n)}function ul(e,t,n){if(e!==null){if(e.memoizedProps!==t.pendingProps)jc=!0;else{if(!cl(e,n)&&!(t.flags&128))return jc=!1,ll(e,t,n);jc=!!(e.flags&131072)}}else jc=!1,na&&t.flags&1048576&&Xi(t,Ui,t.index);switch(t.lanes=0,t.tag){case 16:a:{var r=t.pendingProps;if(e=Qa(t.elementType),t.type=e,typeof e==`function`)Ai(e)?(r=bc(e,r),t.tag=1,t=Gc(null,t,e,r,n)):(t.tag=0,t=Uc(null,t,e,r,n));else{if(e!=null){var a=e.$$typeof;if(a===te){t.tag=11,t=Nc(null,t,e,r,n);break a}if(a===ie){t.tag=14,t=Pc(null,t,e,r,n);break a}if(a===M){t.tag=10,t.type=e,t=ol(null,t,n);break a}}throw t=pe(e)||e,Error(i(306,t,``))}}return t;case 0:return Uc(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,a=bc(r,t.pendingProps),Gc(e,t,r,a,n);case 3:a:{if(Te(t,t.stateNode.containerInfo),e===null)throw Error(i(387));r=t.pendingProps;var o=t.memoizedState;a=o.element,fo(e,t),yo(t,r,null,n);var s=t.memoizedState;if(r=s.cache,ha(t,Oa,r),r!==o.cache&&va(t,[Oa],n,!0),vo(),r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=Kc(e,t,r,n);break a}if(r!==a){a=zi(Error(i(424)),t),da(a),t=Kc(e,t,r,n);break a}switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName===`HTML`?e.ownerDocument.body:e}for(ta=fm(e.firstChild),ea=t,na=!0,ra=null,ia=!0,n=co(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|134221824,n=n.sibling}else{if(ua(),r===a){t=sl(e,t,n);break a}Mc(e,t,r,n)}t=t.child}return t;case 26:return Hc(e,t),e===null?(n=Im(t.type,null,t.pendingProps,null))?t.memoizedState=n:na||(t.stateNode=gp(t.type,t.pendingProps,Ce.current,t)):t.memoizedState=Im(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return De(t),e===null&&na&&(r=t.stateNode=vm(t.type,t.pendingProps,Ce.current),ea=t,ia=!0,a=ta,Ep(t.type)?(pm=a,ta=fm(r.firstChild)):ta=a),Mc(e,t,t.pendingProps.children,n),Hc(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&na&&((a=r=ta)&&(r=om(r,t.type,t.pendingProps,ia),r===null?a=!1:(t.stateNode=r,ea=t,ta=fm(r.firstChild),ia=!1,a=!0)),a||oa(t)),De(t),a=t.type,o=t.pendingProps,s=e===null?null:e.memoizedProps,r=o.children,_p(a,o)?r=null:s!==null&&_p(a,s)&&(t.flags|=32),t.memoizedState!==null&&(a=Yo(e,t,Qo,null,null,n),uh._currentValue=a),Hc(e,t),Mc(e,t,r,n),t.child;case 6:return e===null&&na&&((e=n=ta)&&(n=sm(n,t.pendingProps,ia),n===null?e=!1:(t.stateNode=n,ea=t,ta=null,e=!0)),e||oa(t)),null;case 13:return Xc(e,t,n);case 4:return Te(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=so(t,null,r,n):Mc(e,t,r,n),t.child;case 11:return Nc(e,t,t.type,t.pendingProps,n);case 7:return r=t.pendingProps,Hc(e,t),Mc(e,t,r,n),t.child;case 8:return Mc(e,t,t.pendingProps.children,n),t.child;case 12:return Mc(e,t,t.pendingProps.children,n),t.child;case 10:return ol(e,t,n);case 9:return a=t.type._context,r=t.pendingProps.children,xa(t),a=Sa(a),r=r(a),t.flags|=1,Mc(e,t,r,n),t.child;case 14:return Pc(e,t,t.type,t.pendingProps,n);case 15:return Fc(e,t,t.type,t.pendingProps,n);case 19:return al(e,t,n);case 31:return Vc(e,t,n);case 22:return Ic(e,t,n,t.pendingProps);case 24:return xa(t),r=Sa(Oa),e===null?(a=Ua(),a===null&&(a=$u,o=ka(),a.pooledCache=o,o.refCount++,o!==null&&(a.pooledCacheLanes|=n),a=o),t.memoizedState={parent:r,cache:a},uo(t),ha(t,Oa,a)):((e.lanes&n)!==0&&(fo(e,t),yo(t,null,null,n),vo()),a=e.memoizedState,o=t.memoizedState,a.parent===r?(r=o.cache,ha(t,Oa,r),r!==a.cache&&va(t,[Oa],n,!0)):(a={parent:r,cache:r},t.memoizedState=a,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=a),ha(t,Oa,r))),Mc(e,t,t.pendingProps.children,n),t.child;case 30:return t.stateNode===null&&(t.stateNode={autoName:null,paired:null,clones:null,ref:null}),r=t.pendingProps,r.name!=null&&r.name!==`auto`?t.flags|=e===null?18882560:18874368:na&&Zi(t),e!==null&&e.memoizedProps.name!==r.name?t.flags|=4194816:Hc(e,t),Mc(e,t,r.children,n),t.child;case 29:throw t.pendingProps}throw Error(i(156,t.tag))}function dl(e){e.flags|=4}function fl(e,t,n,r,i){var a;if((a=!!(e.mode&32))&&(a=n===null?Zm(t,r):Zm(t,r)&&(r.src!==n.src||r.srcSet!==n.srcSet)),a){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(Kd())e.flags|=8192;else throw $a=Ya,qa}}else e.flags&=-16777217}function pl(e,t){if(t.type!==`stylesheet`||t.state.loading&4)e.flags&=-16777217;else if(e.flags|=16777216,!Qm(t)){if(Kd())e.flags|=8192;else throw $a=Ya,qa}}function ml(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:ct(),e.lanes|=t,pd|=t)}function hl(e,t){if(!na)switch(e.tailMode){case`visible`:break;case`collapsed`:for(var n=e.tail,r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null;break;default:for(t=e.tail,n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null}}function gl(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&1206910976,r|=i.flags&1206910976,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function _l(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return gl(t),null;case 1:return gl(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),ga(Oa),Ee(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(la(t)?dl(t):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,U())),gl(t),null;case 26:var a=t.type,o=t.memoizedState;return e===null?(dl(t),o===null?(gl(t),fl(t,a,null,r,n)):(gl(t),pl(t,o))):o?o===e.memoizedState?(gl(t),t.flags&=-16777217):(dl(t),gl(t),pl(t,o)):(e=e.memoizedProps,e!==r&&dl(t),gl(t),fl(t,a,e,r,n)),null;case 27:if(Oe(t),n=Ce.current,a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}e=xe.current,la(t)?sa(t,e):(e=vm(a,r,n),t.stateNode=e,dl(t))}return gl(t),t.subtreeFlags&=-33554433,null;case 5:if(Oe(t),a=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(!r){if(t.stateNode===null)throw Error(i(166));return gl(t),t.subtreeFlags&=-33554433,null}if(o=xe.current,la(t))sa(t,o);else{var s=pp(Ce.current);switch(o){case 1:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case 2:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;default:switch(a){case`svg`:o=s.createElementNS(`http://www.w3.org/2000/svg`,a);break;case`math`:o=s.createElementNS(`http://www.w3.org/1998/Math/MathML`,a);break;case`script`:o=s.createElement(`div`),o.innerHTML=`<script><\/script>`,o=o.removeChild(o.firstChild);break;case`select`:o=typeof r.is==`string`?s.createElement(`select`,{is:r.is}):s.createElement(`select`),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is==`string`?s.createElement(a,{is:r.is}):s.createElement(a)}}o[yt]=t,o[bt]=r;a:for(s=t.child;s!==null;){if(s.tag===5||s.tag===6)o.appendChild(s.stateNode);else if(s.tag!==4&&s.tag!==27&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===t)break a;for(;s.sibling===null;){if(s.return===null||s.return===t)break a;s=s.return}s.sibling.return=s.return,s=s.sibling}t.stateNode=o;a:switch(op(o,a,r),a){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&dl(t)}}return gl(t),t.subtreeFlags&=-33554433,fl(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&dl(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(i(166));if(e=Ce.current,la(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,a=ea,a!==null)switch(a.tag){case 27:case 5:r=a.memoizedProps}e[yt]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||rp(e.nodeValue,n)),e||oa(t,!0)}else e=pp(e).createTextNode(r),e[yt]=t,t.stateNode=e}return gl(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=la(t),n!==null){if(e===null){if(!r)throw Error(i(318));if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(i(557));e[yt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),e=!1}else n=U(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Mo(t),t):(Mo(t),null);if(t.flags&128)throw Error(i(558))}return gl(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(a=la(t),r!==null&&r.dehydrated!==null){if(e===null){if(!a)throw Error(i(318));if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(i(317));a[yt]=t}else ua(),!(t.flags&128)&&(t.memoizedState=null),t.flags|=4;gl(t),a=!1}else a=U(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),a=!0;if(!a)return t.flags&256?(Mo(t),t):(Mo(t),null)}return Mo(t),t.flags&128?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,a=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(a=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==a&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),ml(t,t.updateQueue),gl(t),null);case 4:return Ee(),e===null&&qf(t.stateNode.containerInfo),t.flags|=67108864,gl(t),null;case 10:return ga(t.type),gl(t),null;case 19:if(K(t),r=t.memoizedState,r===null)return gl(t),null;if(a=!!(t.flags&128),o=r.rendering,o===null){if(a)hl(r,!1);else{if(cd!==0||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(o=Fo(e),o!==null){for(t.flags|=128,hl(r,!1),e=o.updateQueue,t.updateQueue=e,ml(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Mi(n,e),n=n.sibling;return Po(t,No.current&1|2),na&&Yi(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&B()>yd&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}}else{if(!a){if(e=Fo(o),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,ml(t,e),hl(r,!0),r.tail===null&&r.tailMode!==`collapsed`&&r.tailMode!==`visible`&&!o.alternate&&!na)return gl(t),null}else 2*B()-r.renderingStartTime>yd&&n!==536870912&&(t.flags|=128,a=!0,hl(r,!1),t.lanes=4194304)}r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e===null?t.child=o:e.sibling=o,r.last=o)}if(r.tail!==null){e=r.tail;a:{for(n=e;n!==null;){if(n.alternate!==null){n=!1;break a}n=n.sibling}n=!0}return r.rendering=e,r.tail=e.sibling,r.renderingStartTime=B(),e.sibling=null,o=No.current,o=a?o&1|2:o&1,r.tailMode===`visible`||r.tailMode===`collapsed`||!n||na?Po(t,o):(n=o,be(Eo,t),be(No,n),Do===null&&(Do=t)),na&&Yi(t,r.treeForkCount),e}return gl(t),null;case 22:case 23:return Mo(t),To(),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(gl(t),t.subtreeFlags&6&&(t.flags|=8192)):gl(t),n=t.updateQueue,n!==null&&ml(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&ye(Ha),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),ga(Oa),gl(t),null;case 25:return null;case 30:return t.flags|=33554432,gl(t),null}throw Error(i(156,t.tag))}function vl(e,t){switch(Qi(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return ga(Oa),Ee(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return Oe(t),null;case 31:if(t.memoizedState!==null){if(Mo(t),t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Mo(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(i(340));ua()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return K(t),e=t.flags,e&65536?(t.flags=e&-65537|128,e=t.memoizedState,e!==null&&(e.rendering=null,e.tail=null),t.flags|=4,t):null;case 4:return Ee(),null;case 10:return ga(t.type),null;case 22:case 23:return Mo(t),To(),e!==null&&ye(Ha),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return ga(Oa),null;case 25:return null;default:return null}}function q(e,t){switch(Qi(t),t.tag){case 3:ga(Oa),Ee();break;case 26:case 27:case 5:Oe(t);break;case 4:Ee();break;case 31:t.memoizedState!==null&&Mo(t);break;case 13:Mo(t);break;case 19:K(t);break;case 10:ga(t.type);break;case 22:case 23:Mo(t),To(),e!==null&&ye(Ha);break;case 24:ga(Oa)}}function yl(e,t){try{var n=t.updateQueue,r=n===null?null:n.lastEffect;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var a=n.create,o=n.inst;r=a(),o.destroy=r}n=n.next}while(n!==i)}}catch(e){hf(t,t.return,e)}}function bl(e,t,n){try{var r=t.updateQueue,i=r===null?null:r.lastEffect;if(i!==null){var a=i.next;r=a;do{if((r.tag&e)===e){var o=r.inst,s=o.destroy;if(s!==void 0){o.destroy=void 0,i=t;var c=n,l=s;try{l()}catch(e){hf(i,c,e)}}}r=r.next}while(r!==a)}}catch(e){hf(t,t.return,e)}}function xl(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{bo(t,n)}catch(t){hf(e,e.return,t)}}}function Sl(e,t,n){n.props=bc(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(n){hf(e,t,n)}}function Cl(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:var i=e.stateNode,a=mi(e.memoizedProps,i);(i.ref===null||i.ref.name!==a)&&(i.ref=Lp(a)),r=i.ref;break;case 7:if(e.stateNode===null){var o=new Rp(e);p(e.child,!1,tm,o,void 0,void 0),e.stateNode=o}r=e.stateNode;break;default:r=e.stateNode}typeof n==`function`?e.refCleanup=n(r):n.current=r}}catch(n){hf(e,t,n)}}function J(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{r()}catch(n){hf(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{n(null)}catch(n){hf(e,t,n)}else n.current=null}}function wl(e,t){if((e.tag===5||e.tag===27||e.tag===6)&&e.alternate===null&&t!==null)for(var n=0;n<t.length;n++)rm(e.stateNode,t[n])}function Tl(e){for(var t=e.return;t!==null&&(Ol(t)&&rm(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function El(e){for(var t=e.return;t!==null&&(Ol(t)&&im(e.stateNode,t.stateNode),!Dl(t));)t=t.return}function Dl(e){return e.tag===5||e.tag===3||e.tag===27}function Ol(e){return e&&e.tag===7&&e.stateNode!==null}function kl(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{a:switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&r.focus();break a;case`img`:n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(t){hf(e,e.return,t)}}function Al(e,t,n){try{var r=e.stateNode;cp(r,e.type,n,t),r[bt]=t}catch(t){hf(e,e.return,t)}}function jl(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ep(e.type)||e.tag===4}function Ml(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||jl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Ep(e.type)||e.flags&2||e.child===null||e.tag===4)continue a;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Nl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(i,t):(t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(i),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=gn)),wl(e,r),Ut=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Ep(e.type)&&(n=e.stateNode,t=null)),e=e.child,e!==null))for(Nl(e,t,n,r),e=e.sibling;e!==null;)Nl(e,t,n,r),e=e.sibling}function Pl(e,t,n,r){var i=e.tag;if(i===5||i===6)i=e.stateNode,t?n.insertBefore(i,t):n.appendChild(i),wl(e,r),Ut=!0;else if(i!==4&&(i===27&&(wl(e,r),r=null,Ep(e.type)&&(n=e.stateNode)),e=e.child,e!==null))for(Pl(e,t,n,r),e=e.sibling;e!==null;)Pl(e,t,n,r),e=e.sibling}function Fl(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);op(t,r,n),t[yt]=e,t[bt]=n}catch(t){hf(e,e.return,t)}}var Il=!1,Ll=null;function Rl(e){(e.tag===30||e.subtreeFlags&33554432)&&(Il=!0)}var zl=null;function Bl(){var e=zl;return zl=null,e}var Vl=0;function Hl(e,t,n,r,i){return Vl=0,Ul(e.child,t,n,r,i)}function Ul(e,t,n,r,i){for(var a=!1;e!==null;){if(e.tag===5){var o=e.stateNode;if(r!==null){var s=Z(o);r.push(s),s.view&&(a=!0)}else a||Z(o).view&&(a=!0);Il=!0,kp(o,Vl===0?t:t+`_`+Vl,n),Vl++}else e.tag===22&&e.memoizedState!==null||e.tag===30&&i||Ul(e.child,t,n,r,i)&&(a=!0);e=e.sibling}return a}function Wl(e,t){for(;e!==null;)e.tag===5?Ap(e.stateNode,e.memoizedProps):e.tag===22&&e.memoizedState!==null||e.tag===30&&t||Wl(e.child,t),e=e.sibling}function Gl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if((e.tag!==22||e.memoizedState===null)&&(Gl(e),e.tag===30&&e.flags&18874368&&e.stateNode.paired)){var t=e.memoizedProps;if(t.name==null||t.name===`auto`)throw Error(i(544));var n=t.name;t=gi(t.default,t.share),t!==`none`&&(Hl(e,n,t,null,!1)||Wl(e.child,!1))}e=e.sibling}}function Kl(e,t){if(e.tag===30){var n=e.stateNode,r=e.memoizedProps,i=mi(r,n),a=gi(r.default,n.paired?r.share:r.enter);a===`none`?Gl(e):Hl(e,i,a,null,!1)?(Gl(e),n.paired||t||Id(e,r.onEnter)):Wl(e.child,!1)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Kl(e,t),e=e.sibling;else Gl(e)}function ql(e){if(Ll!==null&&Ll.size!==0){var t=Ll;if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var n=e.memoizedProps,r=n.name;if(r!=null&&r!==`auto`){var i=t.get(r);if(i!==void 0){var a=gi(n.default,n.share);if(a!==`none`&&(Hl(e,r,a,null,!1)?(a=e.stateNode,i.paired=a,a.paired=i,Id(e,n.onShare)):Wl(e.child,!1)),t.delete(r),t.size===0)break}}}ql(e)}e=e.sibling}}}function Jl(e){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode),r=Ll===null?void 0:Ll.get(n),i=gi(t.default,r===void 0?t.exit:t.share);i!==`none`&&(Hl(e,n,i,null,!1)?r===void 0?Id(e,t.onExit):(i=e.stateNode,r.paired=i,i.paired=r,Ll.delete(n),Id(e,t.onShare)):Wl(e.child,!1)),Ll!==null&&ql(e)}else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Jl(e),e=e.sibling;else Ll!==null&&ql(e)}function Yl(e){for(e=e.child;e!==null;){if(e.tag===30){var t=e.memoizedProps,n=mi(t,e.stateNode);t=gi(t.default,t.update),e.flags&=-5,t!==`none`&&Hl(e,n,t,e.memoizedState=[],!1)}else e.subtreeFlags&33554432&&Yl(e);e=e.sibling}}function Xl(e){if(e.subtreeFlags&18874368)for(e=e.child;e!==null;){if(e.tag!==22||e.memoizedState===null){if(e.tag===30&&e.flags&18874368){var t=e.stateNode;t.paired!==null&&(t.paired=null,Wl(e.child,!1))}Xl(e)}e=e.sibling}}function Zl(e){if(e.tag===30)e.stateNode.paired=null,Wl(e.child,!1),Xl(e);else if(e.subtreeFlags&33554432)for(e=e.child;e!==null;)Zl(e),e=e.sibling;else Xl(e)}function Ql(e){for(e=e.child;e!==null;)e.tag===30?Wl(e.child,!1):e.subtreeFlags&33554432&&Ql(e),e=e.sibling}function $l(e,t,n,r,i,a,o){for(var s=!1;t!==null;){if(t.tag===5){var c=t.stateNode;if(a!==null&&Vl<a.length){var l=a[Vl],u=Z(c);(l.view||u.view)&&(s=!0);var d;if(d=!(e.flags&4)){if(u.clip)d=!0;else{d=l.rect;var f=u.rect;d=d.y!==f.y||d.x!==f.x||d.height!==f.height||d.width!==f.width}}d&&(e.flags|=4),u.abs?u=!l.abs:(l=l.rect,u=u.rect,u=l.height!==u.height||l.width!==u.width),u&&(e.flags|=32)}else e.flags|=32;e.flags&4&&kp(c,Vl===0?n:n+`_`+Vl,i),s&&e.flags&4||(zl===null&&(zl=[]),zl.push(c,Vl===0?r:r+`_`+Vl,t.memoizedProps)),Vl++}else(t.tag!==22||t.memoizedState===null)&&(t.tag===30&&o?e.flags|=t.flags&32:$l(e,t.child,n,r,i,a,o)&&(s=!0));t=t.sibling}return s}function eu(e,t){for(e=e.child;e!==null;){if(e.tag===30){var n=e.memoizedProps,r=e.stateNode,i=mi(n,r),a=gi(n.default,n.update);if(t){r=r.clones;var o=r===null?null:r.map(Mp)}else o=e.memoizedState,e.memoizedState=null;r=e;var s=e.child;Vl=0,i=$l(r,s,i,i,a,o,!1),e.flags&4&&i&&(t||Id(e,n.onUpdate))}else e.subtreeFlags&33554432&&eu(e,t);e=e.sibling}}var tu=!1,nu=!1,ru=!1,iu=!1,au=typeof WeakSet==`function`?WeakSet:Set,ou=null,su=!1,cu=!1,lu=!1,uu=!1;function du(e,t,n){if(e=e.containerInfo,dp=yh,e=Wr(e),Gr(e)){if(`selectionStart`in e)var r={start:e.selectionStart,end:e.selectionEnd};else a:{r=(r=e.ownerDocument)&&r.defaultView||window;var i=r.getSelection&&r.getSelection();if(i&&i.rangeCount!==0){r=i.anchorNode;var a=i.anchorOffset,o=i.focusNode;i=i.focusOffset;try{r.nodeType,o.nodeType}catch{r=null;break a}var s=0,c=-1,l=-1,u=0,d=0,f=e,p=null;b:for(;;){for(var m;f!==r||a!==0&&f.nodeType!==3||(c=s+a),f!==o||i!==0&&f.nodeType!==3||(l=s+i),f.nodeType===3&&(s+=f.nodeValue.length),(m=f.firstChild)!==null;)p=f,f=m;for(;;){if(f===e)break b;if(p===r&&++u===a&&(c=s),p===o&&++d===i&&(l=s),(m=f.nextSibling)!==null)break;f=p,p=f.parentNode}f=m}r=c===-1||l===-1?null:{start:c,end:l}}else r=null}r||={start:0,end:0}}else r=null;for(fp={focusedElem:e,selectionRange:r},yh=!1,n=(n&335544064)===n,ou=t,t=n?9270:1024;ou!==null;){if(e=ou,n&&(r=e.deletions,r!==null))for(a=0;a<r.length;a++)n&&Jl(r[a]);if(e.alternate===null&&e.flags&2)n&&Rl(e),fu(n);else{if(e.tag===22){if(r=e.alternate,e.memoizedState!==null){r!==null&&r.memoizedState===null&&n&&Jl(r),fu(n);continue}if(r!==null&&r.memoizedState!==null){n&&Rl(e),fu(n);continue}}r=e.child,(e.subtreeFlags&t)!==0&&r!==null?(r.return=e,ou=r):(n&&Yl(e),fu(n))}}Ll=null}function fu(e){for(;ou!==null;){var t=ou,n=e,r=t.alternate,a=t.flags;switch(t.tag){case 0:case 11:case 15:break;case 1:if(a&1024&&r!==null){n=void 0,a=r.memoizedProps,r=r.memoizedState;var o=t.stateNode;try{var s=bc(t.type,a);n=o.getSnapshotBeforeUpdate(s,r),o.__reactInternalSnapshotBeforeUpdate=n}catch(e){hf(t,t.return,e)}}break;case 3:if(a&1024){if(r=t.stateNode.containerInfo,n=r.nodeType,n===9)am(r);else if(n===1)switch(r.nodeName){case`HEAD`:case`HTML`:case`BODY`:am(r);break;default:r.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;case 30:n&&r!==null&&(n=mi(r.memoizedProps,r.stateNode),a=t.memoizedProps,a=gi(a.default,a.update),a!==`none`&&Hl(r,n,a,r.memoizedState=[],!0));break;default:if(a&1024)throw Error(i(163))}if(r=t.sibling,r!==null){r.return=t.return,ou=r;break}ou=t.return}}function pu(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:Nu(e,n),r&4&&yl(5,n);break;case 1:if(Nu(e,n),r&4){if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(e){hf(n,n.return,e)}else{var i=bc(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(e){hf(n,n.return,e)}}}r&64&&xl(n),r&512&&Cl(n,n.return);break;case 3:if(Nu(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{bo(e,t)}catch(e){hf(n,n.return,e)}}break;case 27:t===null&&r&4&&Fl(n);case 26:case 5:Nu(e,n),t===null&&r&4&&kl(n),r&512&&Cl(n,n.return);break;case 12:Nu(e,n);break;case 31:Nu(e,n),r&4&&Su(e,n);break;case 13:Nu(e,n),r&4&&Cu(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=yf.bind(null,n),dm(e,n))));break;case 22:if(r=n.memoizedState!==null||tu,!r){var a=t!==null&&t.memoizedState!==null||nu;t=tu,i=nu,tu=r,(nu=a)&&!i?(r=2,n.subtreeFlags&8772&&(r|=1),Fu(e,n,r)):Nu(e,n),tu=t,nu=i}break;case 30:Nu(e,n),r&512&&Cl(n,n.return);break;case 7:r&512&&Cl(n,n.return);default:Nu(e,n)}}function mu(e,t){for(e=e.child;e!==null;)hu(e,t),e=e.sibling}function hu(e,t){switch(e.tag){case 5:case 26:try{var n=e.stateNode;if(t){var r=n.style;typeof r.setProperty==`function`?r.setProperty(`display`,`none`,`important`):r.display=`none`}else{var i=e.stateNode,a=e.memoizedProps.style,o=a!=null&&a.hasOwnProperty(`display`)?a.display:null;i.style.display=o==null||typeof o==`boolean`?``:(``+o).trim()}}catch(t){hf(e,e.return,t)}gu(e,t);break;case 6:try{e.stateNode.nodeValue=t?``:e.memoizedProps,Ut=!0}catch(t){hf(e,e.return,t)}break;case 18:try{var s=e.stateNode;t?Op(s,!0):Op(e.stateNode,!1)}catch(t){hf(e,e.return,t)}break;case 22:case 23:e.memoizedState===null&&mu(e,t);break;default:mu(e,t)}}function gu(e,t){if(e.subtreeFlags&67108864)for(e=e.child;e!==null;){a:{var n=e,r=t;switch(n.tag){case 4:hu(n,r);break a;case 22:n.memoizedState===null&&gu(n,r);break a;default:gu(n,r)}}e=e.sibling}}function _u(e){var t=e.alternate;t!==null&&(e.alternate=null,_u(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Ot(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vu=null,yu=!1;function bu(e,t,n){for(n=n.child;n!==null;)xu(e,t,n),n=n.sibling}function xu(e,t,n){if(Je&&typeof Je.onCommitFiberUnmount==`function`)try{Je.onCommitFiberUnmount(qe,n)}catch{}switch(n.tag){case 26:nu||J(n,t),bu(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&!nu&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:nu||J(n,t),El(n);var r=vu,i=yu;Ep(n.type)&&(vu=n.stateNode,yu=!1),bu(e,t,n),ym(n.stateNode,n.type,n.memoizedProps),vu=r,yu=i;break;case 5:nu||J(n,t),El(n);case 6:if(n.tag===6&&El(n),r=vu,i=yu,vu=null,bu(e,t,n),vu=r,yu=i,vu!==null){if(yu)try{(vu.nodeType===9?vu.body:vu.nodeName===`HTML`?vu.ownerDocument.body:vu).removeChild(n.stateNode),Ut=!0}catch(e){hf(n,t,e)}else try{vu.removeChild(n.stateNode),Ut=!0}catch(e){hf(n,t,e)}}break;case 18:vu!==null&&(yu?(e=vu,Dp(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),Gh(e)):Dp(vu,n.stateNode));break;case 4:r=vu,i=yu,vu=n.stateNode.containerInfo,yu=!0,bu(e,t,n),vu=r,yu=i;break;case 0:case 11:case 14:case 15:bl(2,n,t),nu||bl(4,n,t),bu(e,t,n);break;case 1:nu||(J(n,t),r=n.stateNode,typeof r.componentWillUnmount==`function`&&Sl(n,t,r)),bu(e,t,n);break;case 21:bu(e,t,n);break;case 22:nu=(r=nu)||n.memoizedState!==null,bu(e,t,n),nu=r;break;case 30:J(n,t),bu(e,t,n);break;case 7:nu||J(n,t),bu(e,t,n);break;default:bu(e,t,n)}}function Su(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Gh(e)}catch(e){hf(t,t.return,e)}}}function Cu(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Gh(e)}catch(e){hf(t,t.return,e)}}function wu(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new au),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new au),t;default:throw Error(i(435,e.tag))}}function Tu(e,t){var n=wu(e);t.forEach(function(t){if(!n.has(t)){n.add(t);var r=bf.bind(null,e,t);t.then(r,r)}})}function Eu(e,t,n){var r=t.deletions;if(r!==null)for(var a=0;a<r.length;a++){var o=r[a],s=e,c=t,l=c;a:for(;l!==null;){switch(l.tag){case 27:if(Ep(l.type)){vu=l.stateNode,yu=!1;break a}break;case 5:vu=l.stateNode,yu=!1;break a;case 3:case 4:vu=l.stateNode.containerInfo,yu=!0;break a}l=l.return}if(vu===null)throw Error(i(160));xu(s,c,o),vu=null,yu=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Ou(t,e,n),t=t.sibling}var Du=null;function Ou(e,t,n){var r=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(a&4&&(r=e.updateQueue,r=r===null?null:r.events,r!==null))for(var o=0;o<r.length;o++){var s=r[o];s.ref.impl=s.nextImpl}Eu(t,e,n),ku(e),a&4&&(bl(3,e,e.return),yl(3,e),bl(5,e,e.return));break;case 1:Eu(t,e,n),ku(e),a&512&&(nu||r===null||J(r,r.return)),a&64&&tu&&(e=e.updateQueue,e!==null&&(t=e.callbacks,t!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?t:n.concat(t))));break;case 26:if(o=Du,Eu(t,e,n),ku(e),a&512&&(nu||r===null||J(r,r.return)),a&4){if(a=r===null?null:r.memoizedState,n=e.memoizedState,r===null){if(n===null){if(e.stateNode===null){if(tu)e.stateNode=gp(e.type,e.memoizedProps,t.containerInfo,e);else{a:{t=e.type,n=e.memoizedProps,a=o.ownerDocument||o;b:switch(t){case`title`:r=a.getElementsByTagName(`title`)[0],(!r||r[Et]||r[yt]||r.namespaceURI===`http://www.w3.org/2000/svg`||r.hasAttribute(`itemprop`))&&(r=a.createElement(t),a.head.insertBefore(r,a.querySelector(`head > title`))),op(r,t,n),r[yt]=e,Nt(r),t=r;break a;case`link`:if(o=Jm(`link`,`href`,a).get(t+(n.href||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`href`)===(n.href==null||n.href===``?null:n.href)&&r.getAttribute(`rel`)===(n.rel==null?null:n.rel)&&r.getAttribute(`title`)===(n.title==null?null:n.title)&&r.getAttribute(`crossorigin`)===(n.crossOrigin==null?null:n.crossOrigin)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;case`meta`:if(o=Jm(`meta`,`content`,a).get(t+(n.content||``))){for(s=0;s<o.length;s++)if(r=o[s],r.getAttribute(`content`)===(n.content==null?null:``+n.content)&&r.getAttribute(`name`)===(n.name==null?null:n.name)&&r.getAttribute(`property`)===(n.property==null?null:n.property)&&r.getAttribute(`http-equiv`)===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute(`charset`)===(n.charSet==null?null:n.charSet)){o.splice(s,1);break b}}r=a.createElement(t),op(r,t,n),a.head.appendChild(r);break;default:throw Error(i(468,t))}r[yt]=e,Nt(r),t=r}e.stateNode=t}}else tu||Ym(o,e.type,e.stateNode)}else e.stateNode=Um(o,n,e.memoizedProps)}else a===n?n===null&&e.stateNode!==null&&Al(e,e.memoizedProps,r.memoizedProps):(a===null?(t=r.stateNode,t===null||nu||t.parentNode.removeChild(t)):a.count--,n===null?tu||Ym(o,e.type,e.stateNode):Um(o,n,e.memoizedProps))}break;case 27:Eu(t,e,n),ku(e),a&512&&(nu||r===null||J(r,r.return)),r!==null&&a&4&&Al(e,e.memoizedProps,r.memoizedProps);break;case 5:if(o=ru,ru=!1,Eu(t,e,n),ru=o,ku(e),a&512&&(nu||r===null||J(r,r.return)),e.flags&32){t=e.stateNode;try{cn(t,``),Ut=!0}catch(t){hf(e,e.return,t)}}a&4&&e.stateNode!=null&&(t=e.memoizedProps,Al(e,t,r===null?t:r.memoizedProps)),a&1024&&(iu=!0);break;case 6:if(Eu(t,e,n),ku(e),a&4){if(e.stateNode===null)throw Error(i(162));t=e.memoizedProps,n=e.stateNode;try{n.nodeValue=t,Ut=!0}catch(t){hf(e,e.return,t)}}break;case 3:if(Ut=!1,qm=null,o=Du,Du=Cm(t.containerInfo),Eu(t,e,n),Du=o,ku(e),a&4&&r!==null&&r.memoizedState.isDehydrated)try{Gh(t.containerInfo)}catch(t){hf(e,e.return,t)}iu&&(iu=!1,Au(e)),Ut=!1;break;case 4:a=ru,ru=tu,r=Wt(),o=Du,Du=Cm(e.stateNode.containerInfo),Eu(t,e,n),ku(e),Du=o,Ut&&cu&&(lu=!0),Ut=r,ru=a;break;case 12:Eu(t,e,n),ku(e);break;case 31:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 13:Eu(t,e,n),ku(e),e.child.flags&8192&&e.memoizedState!==null!=(r!==null&&r.memoizedState!==null)&&(_d=B()),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 22:o=e.memoizedState!==null,s=r!==null&&r.memoizedState!==null;var c=tu,l=nu,u=ru;tu=c||o,ru=u||o,nu=l||s,Eu(t,e,n),nu=l,ru=u,tu=c,ku(e),a&8192&&(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,!o||r===null||s||tu||nu||(t=s||nu,n=tu,r=nu,tu=o||tu,nu=t,Pu(e,2),tu=n,nu=r),!o&&ru||mu(e,o)),a&4&&(t=e.updateQueue,t!==null&&(n=t.retryQueue,n!==null&&(t.retryQueue=null,Tu(e,n))));break;case 19:Eu(t,e,n),ku(e),a&4&&(t=e.updateQueue,t!==null&&(e.updateQueue=null,Tu(e,t)));break;case 30:a&512&&(nu||r===null||J(r,r.return)),a=Wt(),o=cu,s=(n&335544064)===n,c=e.memoizedProps,cu=s&&gi(c.default,c.update)!==`none`,Eu(t,e,n),ku(e),s&&r!==null&&Ut&&(e.flags|=4),cu=o,Ut=a;break;case 21:break;case 7:a&512&&(nu||r===null||J(r,r.return)),r&&r.stateNode!==null&&(r.stateNode._fragmentFiber=e);default:Eu(t,e,n),ku(e)}}function ku(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(jl(r)){n=r;break}r=r.return}r=null;for(var a=e.return;a!==null;){if(Ol(a)){var o=a.stateNode;r===null?r=[o]:r.push(o)}if(Dl(a))break;a=a.return}var s=r;if(n==null)throw Error(i(160));switch(n.tag){case 27:var c=n.stateNode;Pl(e,Ml(e),c,s);break;case 5:var l=n.stateNode;n.flags&32&&(cn(l,``),n.flags&=-33),Pl(e,Ml(e),l,s);break;case 3:case 4:var u=n.stateNode.containerInfo;Nl(e,Ml(e),u,s);break;default:throw Error(i(161))}}catch(t){hf(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Au(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Au(t),t.tag===5&&t.flags&1024&&(t=t.stateNode,yh=!0,t.reset(),yh=!1),e=e.sibling}}function ju(e,t){if(t.subtreeFlags&9270)for(t=t.child;t!==null;)Mu(t,e),t=t.sibling;else eu(t,!1)}function Mu(e,t){var n=e.alternate;if(n===null)Kl(e,!1);else switch(e.tag){case 3:if(uu=su=!1,Bl(),ju(t,e),!su&&!lu){if(e=zl,e!==null)for(var r=0;r<e.length;r+=3){n=e[r];var i=e[r+1];Ap(n,e[r+2]),n=n.ownerDocument.documentElement,n!==null&&n.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(`+i+`)`})}e=t.containerInfo,e=e.nodeType===9?e.documentElement:e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===``&&(e.style.viewTransitionName=`none`,e.animate({opacity:[0,0],pointerEvents:[`none`,`none`]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition-group(root)`}),e.animate({width:[0,0],height:[0,0]},{duration:0,fill:`forwards`,pseudoElement:`::view-transition`})),uu=!0}zl=null;break;case 5:ju(t,e);break;case 4:r=su,su=!1,ju(t,e),su&&(lu=!0),su=r;break;case 22:e.memoizedState===null&&(n.memoizedState===null?ju(t,e):Kl(e,!1));break;case 30:r=su,i=Bl(),su=!1,ju(t,e),su&&(e.flags|=4);var a=e.memoizedProps,o=e.stateNode;t=mi(a,o),o=mi(n.memoizedProps,o);var s=gi(a.default,a.update);s===`none`?t=!1:(a=n.memoizedState,n.memoizedState=null,n=e.child,Vl=0,t=$l(e,n,t,o,s,a,!0),Vl!==(a===null?0:a.length)&&(e.flags|=32)),e.flags&4&&t?(Id(e,e.memoizedProps.onUpdate),zl=i):i!==null&&(i.push.apply(i,zl),zl=i),su=e.flags&32?!0:r;break;default:ju(t,e)}}function Nu(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)pu(e,t.alternate,t),t=t.sibling}function Pu(e,t){for(e=e.child;e!==null;){var n=e,r=t;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Pu(n,r);break;case 1:J(n,n.return);var i=n.stateNode;typeof i.componentWillUnmount==`function`&&Sl(n,n.return,i),Pu(n,r);break;case 27:r&2&&ym(n.stateNode,n.type,n.memoizedProps);case 5:J(n,n.return),n.tag!==5&&n.tag!==27||El(n),Pu(n,r);break;case 6:El(n);break;case 26:J(n,n.return),i=n.stateNode,n.memoizedState!==null||i===null||nu||i.parentNode.removeChild(i),Pu(n,r);break;case 22:n.memoizedState===null&&Pu(n,r);break;case 30:J(n,n.return),Pu(n,r);break;case 7:J(n,n.return);default:Pu(n,r)}e=e.sibling}}function Fu(e,t,n){for(n=t.subtreeFlags&8772?n:n&-2,t=t.child;t!==null;){var r=t.alternate,i=e,a=t,o=a.flags,s=!!(n&1);switch(a.tag){case 0:case 11:case 15:Fu(i,a,n),yl(4,a);break;case 1:if(Fu(i,a,n),r=a,i=r.stateNode,typeof i.componentDidMount==`function`)try{i.componentDidMount()}catch(e){hf(r,r.return,e)}if(r=a,i=r.updateQueue,i!==null){var c=r.stateNode;try{var l=i.shared.hiddenCallbacks;if(l!==null)for(i.shared.hiddenCallbacks=null,i=0;i<l.length;i++)G(l[i],c)}catch(e){hf(r,r.return,e)}}s&&o&64&&xl(a),Cl(a,a.return);break;case 27:n&2&&Fl(a);case 5:a.tag!==5&&a.tag!==27||Tl(a),Fu(i,a,n),s&&r===null&&o&4&&kl(a),Cl(a,a.return);break;case 6:Tl(a);break;case 26:c=a.stateNode,a.memoizedState!==null||c===null||tu||Ym(Cm(c.ownerDocument),a.type,c),Fu(i,a,n),s&&r===null&&o&4&&kl(a),Cl(a,a.return);break;case 12:Fu(i,a,n);break;case 31:Fu(i,a,n),s&&o&4&&Su(i,a);break;case 13:Fu(i,a,n),s&&o&4&&Cu(i,a);break;case 22:a.memoizedState===null&&Fu(i,a,n),Cl(a,a.return);break;case 30:Fu(i,a,n),Cl(a,a.return);break;case 7:Cl(a,a.return);default:Fu(i,a,n)}t=t.sibling}}function Iu(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Aa(n))}function Lu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Aa(e))}function Ru(e,t,n,r){var i=(n&335544064)===n;if(t.subtreeFlags&(i?10262:10256))for(t=t.child;t!==null;)zu(e,t,n,r),t=t.sibling;else i&&Ql(t)}function zu(e,t,n,r){var i=(n&335544064)===n;i&&t.alternate===null&&t.return!==null&&t.return.alternate!==null&&Zl(t);var a=t.flags;switch(t.tag){case 0:case 11:case 15:Ru(e,t,n,r),a&2048&&yl(9,t);break;case 1:Ru(e,t,n,r);break;case 3:Ru(e,t,n,r),i&&uu&&(e=e.containerInfo,e=e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,e.style.viewTransitionName===`root`&&(e.style.viewTransitionName=``),e=e.ownerDocument.documentElement,e!==null&&e.style.viewTransitionName===`none`&&(e.style.viewTransitionName=``)),a&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==a&&(t.refCount++,a!=null&&Aa(a)));break;case 12:if(a&2048){Ru(e,t,n,r),a=t.stateNode;try{var o=t.memoizedProps,s=o.id,c=o.onPostCommit;typeof c==`function`&&c(s,t.alternate===null?`mount`:`update`,a.passiveEffectDuration,-0)}catch(e){hf(t,t.return,e)}}else Ru(e,t,n,r);break;case 31:Ru(e,t,n,r);break;case 13:Ru(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,s=t.alternate,t.memoizedState===null?(i&&s!==null&&s.memoizedState!==null&&Zl(t),o._visibility&2?Ru(e,t,n,r):(o._visibility|=2,Bu(e,t,n,r,!!(t.subtreeFlags&10256)||!1))):(i&&s!==null&&s.memoizedState===null&&Zl(s),o._visibility&2?Ru(e,t,n,r):Vu(e,t)),a&2048&&Iu(s,t);break;case 24:Ru(e,t,n,r),a&2048&&Lu(t.alternate,t);break;case 30:i&&(a=t.alternate,a!==null&&(Wl(a.child,!0),Wl(t.child,!0))),Ru(e,t,n,r);break;default:Ru(e,t,n,r)}}function Bu(e,t,n,r,i){for(i&&=!!(t.subtreeFlags&10256)||!1,t=t.child;t!==null;){var a=e,o=t,s=n,c=r,l=o.flags;switch(o.tag){case 0:case 11:case 15:Bu(a,o,s,c,i),yl(8,o);break;case 23:break;case 22:var u=o.stateNode;o.memoizedState===null?(u._visibility|=2,Bu(a,o,s,c,i)):u._visibility&2?Bu(a,o,s,c,i):Vu(a,o),i&&l&2048&&Iu(o.alternate,o);break;case 24:Bu(a,o,s,c,i),i&&l&2048&&Lu(o.alternate,o);break;default:Bu(a,o,s,c,i)}t=t.sibling}}function Vu(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:Vu(n,r),i&2048&&Iu(r.alternate,r);break;case 24:Vu(n,r),i&2048&&Lu(r.alternate,r);break;default:Vu(n,r)}t=t.sibling}}var Hu=8192;function Uu(e,t,n){if(e.subtreeFlags&Hu)for(e=e.child;e!==null;)Wu(e,t,n),e=e.sibling}function Wu(e,t,n){switch(e.tag){case 26:Uu(e,t,n),e.flags&Hu&&(e.memoizedState===null?(e=e.stateNode,(t&335544128)===t&&eh(n,e)):th(n,Du,e.memoizedState,e.memoizedProps));break;case 5:Uu(e,t,n),e.flags&Hu&&(e=e.stateNode,(t&335544128)===t&&eh(n,e));break;case 3:case 4:var r=Du;Du=Cm(e.stateNode.containerInfo),Uu(e,t,n),Du=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Hu,Hu=16777216,Uu(e,t,n),Hu=r):Uu(e,t,n));break;case 30:if((e.flags&Hu)!==0&&(r=e.memoizedProps.name,r!=null&&r!==`auto`)){var i=e.stateNode;i.paired=null,Ll===null&&(Ll=new Map),Ll.set(r,i)}Uu(e,t,n);break;default:Uu(e,t,n)}}function Gu(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function Ku(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)qu(e),e=e.sibling}function qu(e){switch(e.tag){case 0:case 11:case 15:Ku(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Ku(e);break;case 12:Ku(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Ju(e)):Ku(e);break;default:Ku(e)}}function Ju(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];ou=r,Yu(r,e)}Gu(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:bl(8,t,t.return),Ju(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Ju(t));break;default:Ju(t)}e=e.sibling}}function Yu(e,t){for(;ou!==null;){var n=ou;switch(n.tag){case 0:case 11:case 15:bl(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Aa(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,ou=r;else a:for(n=e;ou!==null;){r=ou;var i=r.sibling,a=r.return;if(_u(r),r===n){ou=null;break a}if(i!==null){i.return=a,ou=i;break a}ou=a}}}var Xu={getCacheForType:function(e){var t=Sa(Oa),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return Sa(Oa).controller.signal}},Zu=typeof WeakMap==`function`?WeakMap:Map,Qu=0,$u=null,ed=null,td=0,nd=0,rd=null,id=!1,ad=!1,od=!1,sd=0,cd=0,ld=0,ud=0,dd=0,fd=0,pd=0,md=null,hd=null,gd=!1,_d=0,vd=0,yd=1/0,bd=null,xd=null,Sd=0,Cd=null,wd=null,Td=0,Ed=0,Dd=null,Od=null,kd=null,Ad=null,jd=null,Md=0,Nd=null;function Pd(){return Qu&2&&td!==0?td&-td:P.T===null?gt():If()}function Fd(){if(fd===0){if(!(td&536870912)||na){var e=tt;tt<<=1,!(tt&3932160)&&(tt=262144),fd=e}else fd=536870912}return e=Eo.current,e!==null&&(e.flags|=32),fd}function Id(e,t){if(t!=null){var n=e.stateNode,r=n.ref;r===null&&(r=n.ref=Lp(mi(e.memoizedProps,n))),Ad===null&&(Ad=[]),Ad.push(t.bind(null,r))}}function Ld(e,t,n){(e===$u&&(nd===2||nd===9)||e.cancelPendingCommit!==null)&&(Wd(e,0),Vd(e,td,fd,!1)),V(e,n),Qu&2&&e===$u||(e===$u&&(!(Qu&2)&&(ud|=n),cd===4&&Vd(e,td,fd,!1)),Of(e))}function Rd(e,t,n){if(Qu&6)throw Error(i(327));var r=!n&&!(t&127)&&(t&e.expiredLanes)===0||at(e,t),a=r?Qd(e,t):Xd(e,t,!0),o=r;do{if(a===0){ad&&!r&&Vd(e,t,0,!1);break}if(n=e.current.alternate,o&&!Bd(n))a=Xd(e,t,!1),o=!1;else{if(a===2){if(o=t,e.errorRecoveryDisabledLanes&o)var s=0;else s=e.pendingLanes&-536870913,s=s===0?s&536870912?536870912:0:s;if(s!==0){t=s;a:{var c=e;a=md;var l=c.current.memoizedState.isDehydrated;if(l&&(Wd(c,s).flags|=256),s=Xd(c,s,!1),s!==2&&s!==6){if(od&&!l){c.errorRecoveryDisabledLanes|=o,ud|=o,a=4;break a}o=hd,hd=a,o!==null&&(hd===null?hd=o:hd.push.apply(hd,o))}a=s}if(o=!1,a!==2)continue}}if(a===1){Wd(e,0),Vd(e,t,0,!0);break}a:{switch(r=e,o=a,o){case 0:case 1:throw Error(i(345));case 4:if((t&4194048)!==t&&(t&62914560)!==t)break;case 6:Vd(r,t,fd,!id);break a;case 2:hd=null;break;case 3:case 5:break;default:throw Error(i(329))}if((t&62914560)===t&&(a=_d+300-B(),10<a)){if(Vd(r,t,fd,!id),it(r,0,!0)!==0)break a;Td=t,r.timeoutHandle=bp(zd.bind(null,r,n,hd,bd,gd,t,fd,ud,pd,id,o,`Throttled`,-0,0),a);break a}zd(r,n,hd,bd,gd,t,fd,ud,pd,id,o,null,-0,0)}break}}while(1);Of(e)}function zd(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=-1;var m=t.subtreeFlags,h=(a&335544064)===a;d=null,(h||m&8192||(m&16785408)==16785408)&&(d={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:gn},Ll=null,Wu(t,a,d),h&&(m=d,h=e.containerInfo,h=(h.nodeType===9?h:h.ownerDocument).__reactViewTransition,h!=null&&(m.count++,m.waitingForViewTransition=!0,m=ah.bind(m),h.finished.then(m,m))),m=(a&62914560)===a?_d-B():(a&4194048)===a?vd-B():0,m=rh(d,m),m!==null)?(Td=a,e.cancelPendingCommit=m(af.bind(null,e,t,a,n,r,i,o,s,c,l,u,d,null,f,p)),Vd(e,a,o,!l)):af(e,t,a,n,r,i,o,s,c,l,u,d)}function Bd(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Rr(a(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function Vd(e,t,n,r){t=ot(e,t),t&=~dd,t&=~ud,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-Xe(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&dt(e,n,t)}function Hd(){return Qu&6?!0:(kf(0,!1),!1)}function Ud(){if(ed!==null){if(nd===0)var e=ed.return;else e=ed,ma=pa=null,ts(e),no=null,ro=0,e=ed;for(;e!==null;)q(e.alternate,e),e=e.return;ed=null}}function Wd(e,t){var n=e.timeoutHandle;return n!==-1&&(e.timeoutHandle=-1,xp(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Td=0,Ud(),$u=e,ed=n=ji(e.current,null),td=t,nd=0,rd=null,id=!1,ad=at(e,t),od=!1,pd=fd=dd=ud=ld=cd=0,hd=md=null,gd=!1,sd=ot(e,t),xi(),n}function Gd(e,t){Lo=null,P.H=fc,t===Ka||t===Ja?(t=eo(),nd=3):t===qa?(t=eo(),nd=4):nd=t===Ac?8:typeof t==`object`&&t&&typeof t.then==`function`?6:1,rd=t,ed===null&&(cd=1,wc(e,zi(t,e.current)))}function Kd(){var e=Eo.current;return e===null?!0:(td&4194048)===td?Do===null:(td&62914560)===td||td&536870912?e===Do:!1}function qd(){var e=P.H;return P.H=fc,e===null?fc:e}function Jd(){var e=P.A;return P.A=Xu,e}function Yd(){cd=4,id||(td&4194048)!==td&&Eo.current!==null||(ad=!0),!(ld&134217727)&&!(ud&134217727)||$u===null||Vd($u,td,fd,!1)}function Xd(e,t,n){var r=Qu;Qu|=2;var i=qd(),a=Jd();($u!==e||td!==t)&&(bd=null,Wd(e,t)),t=!1;var o=cd;a:do try{if(nd!==0&&ed!==null){var s=ed,c=rd;switch(nd){case 8:Ud(),o=6;break a;case 3:case 2:case 9:case 6:Eo.current===null&&(t=!0);var l=nd;if(nd=0,rd=null,Y(e,s,c,l),n&&ad){o=0;break a}break;default:l=nd,nd=0,rd=null,Y(e,s,c,l)}}Zd(),o=cd;break}catch(t){Gd(e,t)}while(1);return t&&e.shellSuspendCounter++,ma=pa=null,Qu=r,P.H=i,P.A=a,ed===null&&($u=null,td=0,xi()),o}function Zd(){for(;ed!==null;)ef(ed)}function Qd(e,t){var n=Qu;Qu|=2;var r=qd(),a=Jd();$u!==e||td!==t?(bd=null,yd=B()+500,Wd(e,t)):ad=at(e,t);a:do try{if(nd!==0&&ed!==null){t=ed;var o=rd;b:switch(nd){case 1:nd=0,rd=null,Y(e,t,o,1);break;case 2:case 9:if(Xa(o)){nd=0,rd=null,tf(t);break}t=function(){nd!==2&&nd!==9||$u!==e||(nd=7),Of(e)},o.then(t,t);break a;case 3:nd=7;break a;case 4:nd=5;break a;case 7:Xa(o)?(nd=0,rd=null,tf(t)):(nd=0,rd=null,Y(e,t,o,7));break;case 5:var s=null;switch(ed.tag){case 26:s=ed.memoizedState;case 5:case 27:var c=ed;if(s?Qm(s):c.stateNode.complete){nd=0,rd=null;var l=c.sibling;if(l!==null)ed=l;else{var u=c.return;u===null?ed=null:(ed=u,nf(u))}break b}}nd=0,rd=null,Y(e,t,o,5);break;case 6:nd=0,rd=null,Y(e,t,o,6);break;case 8:Ud(),cd=6;break a;default:throw Error(i(462))}}$d();break}catch(t){Gd(e,t)}while(1);return ma=pa=null,P.H=r,P.A=a,Qu=n,ed===null?($u=null,td=0,xi(),cd):0}function $d(){for(;ed!==null&&!Le();)ef(ed)}function ef(e){var t=ul(e.alternate,e,sd);e.memoizedProps=e.pendingProps,t===null?nf(e):ed=t}function tf(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Wc(n,t,t.pendingProps,t.type,void 0,td);break;case 11:t=Wc(n,t,t.pendingProps,t.type.render,t.ref,td);break;case 5:ts(t);var r=t;r===ea&&(na?(ca(r),r.tag===5&&r.stateNode!=null&&(ta=r.stateNode)):(ca(r),na=!0));default:q(n,t),t=ed=Mi(t,sd),t=ul(n,t,sd)}e.memoizedProps=e.pendingProps,t===null?nf(e):ed=t}function Y(e,t,n,r){ma=pa=null,ts(t),no=null,ro=0;var i=t.return;try{if(kc(e,i,t,n,td)){cd=1,wc(e,zi(n,e.current)),ed=null;return}}catch(t){if(i!==null)throw ed=i,t;cd=1,wc(e,zi(n,e.current)),ed=null;return}t.flags&32768?(na||r===1?e=!0:ad||td&536870912?e=!1:(id=e=!0,(r===2||r===9||r===3||r===6)&&(r=Eo.current,r!==null&&r.tag===13&&(r.flags|=16384))),rf(t,e)):nf(t)}function nf(e){var t=e;do{if(t.flags&32768){rf(t,id);return}e=t.return;var n=_l(t.alternate,t,sd);if(n!==null){ed=n;return}if(t=t.sibling,t!==null){ed=t;return}ed=t=e}while(t!==null);cd===0&&(cd=5)}function rf(e,t){do{var n=vl(e.alternate,e);if(n!==null){n.flags&=32767,ed=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ed=e;return}ed=e=n}while(e!==null);cd=6,ed=null}function af(e,t,n,r,a,o,s,c,l,u,d,f){e.cancelPendingCommit=null;do ff();while(Sd!==0);if(Qu&6)throw Error(i(327));if(t!==null){if(t===e.current)throw Error(i(177));e===$u&&(ed=$u=null,td=0),wd=t,Cd=e,Td=n,Dd=a,Od=r,X(e,t,n,s,c,l,f)}}function X(e,t,n,r,i,a,o){var s=t.lanes|t.childLanes;if(Ed=s,s|=bi,ut(e,n,s,r,i,a),Ad=null,(n&335544064)===n?(jd=Na(e),r=10262):(jd=null,r=10256),(t.subtreeFlags&r)!==0||(t.flags&r)!==0?(e.callbackNode=null,e.callbackPriority=0,xf(He,function(){return pf(),null})):(e.callbackNode=null,e.callbackPriority=0),Il=!1,r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=P.T,P.T=null,i=F.p,F.p=2,a=Qu,Qu|=4;try{du(e,t,n)}finally{Qu=a,F.p=i,P.T=r}}Sd=1,Il?kd=Fp(o,e.containerInfo,jd,cf,lf,sf,uf,pf,of,null,null):(cf(),lf(),uf())}function of(e){if(Sd!==0){var t=Cd.onRecoverableError;t(e,{componentStack:null})}}function sf(){Sd===3&&(Sd=0,Mu(wd,Cd),Sd=4)}function cf(){if(Sd===1){Sd=0;var e=Cd,t=wd,n=Td,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=P.T,P.T=null;var i=F.p;F.p=2;var a=Qu;Qu|=4;try{cu=lu=!1,Ou(t,e,n),n=fp;var o=Wr(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Ur(s.ownerDocument.documentElement,s)){if(c!==null&&Gr(s)){var l=c.start,u=c.end;if(u===void 0&&(u=l),`selectionStart`in s)s.selectionStart=l,s.selectionEnd=Math.min(u,s.value.length);else{var d=s.ownerDocument||document,f=d&&d.defaultView||window;if(f.getSelection){var p=f.getSelection(),m=s.textContent.length,h=Math.min(c.start,m),g=c.end===void 0?h:Math.min(c.end,m);!p.extend&&h>g&&(o=g,g=h,h=o);var _=Hr(s,h),v=Hr(s,g);if(_&&v&&(p.rangeCount!==1||p.anchorNode!==_.node||p.anchorOffset!==_.offset||p.focusNode!==v.node||p.focusOffset!==v.offset)){var y=d.createRange();y.setStart(_.node,_.offset),p.removeAllRanges(),h>g?(p.addRange(y),p.extend(v.node,v.offset)):(y.setEnd(v.node,v.offset),p.addRange(y))}}}}for(d=[],p=s;p=p.parentNode;)p.nodeType===1&&d.push({element:p,left:p.scrollLeft,top:p.scrollTop});for(typeof s.focus==`function`&&s.focus(),s=0;s<d.length;s++){var b=d[s];b.element.scrollLeft=b.left,b.element.scrollTop=b.top}}yh=!!dp,fp=dp=null}finally{Qu=a,F.p=i,P.T=r}}e.current=t,Sd=2}}function lf(){if(Sd===2){Sd=0;var e=Cd,t=wd,n=!!(t.flags&8772);if(t.subtreeFlags&8772||n){n=P.T,P.T=null;var r=F.p;F.p=2;var i=Qu;Qu|=4;try{pu(e,t.alternate,t)}finally{Qu=i,F.p=r,P.T=n}}Sd=3}}function uf(){if(Sd===4||Sd===3){Sd=0;var e=kd;kd=null,Re();var t=Cd,n=wd,r=Td,i=Od,a=(r&335544064)===r?10262:10256;if((n.subtreeFlags&a)!==0||(n.flags&a)!==0?Sd=5:(Sd=0,wd=Cd=null,df(t,t.pendingLanes)),a=t.pendingLanes,a===0&&(xd=null),ht(r),n=n.stateNode,Je&&typeof Je.onCommitFiberRoot==`function`)try{Je.onCommitFiberRoot(qe,n,void 0,(n.current.flags&128)==128)}catch{}if(i!==null){n=P.T,a=F.p,F.p=2,P.T=null;try{for(var o=t.onRecoverableError,s=0;s<i.length;s++){var c=i[s];o(c.value,{componentStack:c.stack})}}finally{P.T=n,F.p=a}}if(i=Ad,o=jd,jd=null,i!==null&&(Ad=null,o===null&&(o=[]),e!==null))for(c=0;c<i.length;c++)n=(0,i[c])(o),n!==void 0&&e.finished.finally(n);Td&3&&ff(),Of(t),a=t.pendingLanes,r&261930&&a&42?t===Nd?Md++:(Md=0,Nd=t):(Md=0,Nd=null),kf(0,!1)}}function df(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Aa(t)))}function ff(){return kd!==null&&(kd.skipTransition(),kd=null),cf(),lf(),uf(),pf()}function pf(){if(Sd!==5)return!1;var e=Cd,t=Ed;Ed=0;var n=ht(Td),r=P.T,a=F.p;try{F.p=32>n?32:n,P.T=null,n=Dd,Dd=null;var o=Cd,s=Td;if(Sd=0,wd=Cd=null,Td=0,Qu&6)throw Error(i(331));var c=Qu;if(Qu|=4,qu(o.current),zu(o,o.current,s,n),Qu=c,kf(0,!1),Je&&typeof Je.onPostCommitFiberRoot==`function`)try{Je.onPostCommitFiberRoot(qe,o)}catch{}return!0}finally{F.p=a,P.T=r,df(e,t)}}function mf(e,t,n){t=zi(n,t),t=Ec(e.stateNode,t,2),e=mo(e,t,2),e!==null&&(V(e,2),Of(e))}function hf(e,t,n){if(e.tag===3)mf(e,e,n);else for(;t!==null;){if(t.tag===3){mf(t,e,n);break}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(xd===null||!xd.has(r))){e=zi(n,e),n=Dc(2),r=mo(t,n,2),r!==null&&(Oc(n,r,t,e),V(r,2),Of(r));break}}t=t.return}}function gf(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new Zu;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(od=!0,i.add(n),e=_f.bind(null,e,t,n),t.then(e,e))}function _f(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,$u===e&&(td&n)===n&&(cd===4||cd===3&&(td&62914560)===td&&300>B()-_d?Qu&2?dd|=n:Wd(e,0):dd|=n,pd===td&&(pd=0)),Of(e)}function vf(e,t){t===0&&(t=ct()),e=wi(e,t),e!==null&&(V(e,t),Of(e))}function yf(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),vf(e,n)}function bf(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,a=e.memoizedState;a!==null&&(n=a.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(i(314))}r!==null&&r.delete(t),vf(e,n)}function xf(e,t){return Fe(e,t)}var Sf=null,Cf=null,wf=!1,Tf=!1,Ef=!1,Df=0;function Of(e){e!==Cf&&e.next===null&&(Cf===null?Sf=Cf=e:Cf=Cf.next=e),Tf=!0,wf||(wf=!0,Ff())}function kf(e,t){if(!Ef&&Tf){Ef=!0;do for(var n=!1,r=Sf;r!==null;){if(!t){if(e!==0){var i=r.pendingLanes;if(i===0)var a=0;else{var o=r.suspendedLanes,s=r.pingedLanes;a=(1<<31-Xe(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Pf(r,a))}else a=td,a=it(r,r===$u?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),!(a&3)||at(r,a)||(n=!0,Pf(r,a))}r=r.next}while(n);Ef=!1}}function Af(){jf()}function jf(){Tf=wf=!1;var e=0;Df!==0&&yp()&&(e=Df);for(var t=B(),n=null,r=Sf;r!==null;){var i=r.next,a=Mf(r,t);a===0?(r.next=null,n===null?Sf=i:n.next=i,i===null&&(Cf=n)):(n=r,(e!==0||a&3)&&(Tf=!0)),r=i}Sd!==0&&Sd!==5||kf(e,!1),Df!==0&&(Df=0)}function Mf(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-Xe(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=st(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=$u,n=td,n=it(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(nd===2||nd===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Ie(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||at(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Ie(r),ht(n)){case 2:case 8:n=Ve;break;case 32:n=He;break;case 268435456:n=We;break;default:n=He}return r=Nf.bind(null,e),n=Fe(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Ie(r),e.callbackPriority=2,e.callbackNode=null,2}function Nf(e,t){if(Sd!==0&&Sd!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(ff()&&e.callbackNode!==n)return null;var r=td;return r=it(e,e===$u?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Rd(e,r,t),Mf(e,B()),e.callbackNode!=null&&e.callbackNode===n?Nf.bind(null,e):null)}function Pf(e,t){if(ff())return null;Rd(e,t,!0)}function Ff(){wp(function(){Qu&6?Fe(Be,Af):jf()})}function If(){if(Df===0){var e=Ia;e===0&&(e=et,et<<=1,!(et&261888)&&(et=256)),Df=e}return Df}function Lf(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:hn(e)}function Rf(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Lf((i[bt]||null).action),o=r.submitter;o&&(t=(t=o[bt]||null)?Lf(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new Ln(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(Df!==0){var e=new FormData(i,o);Qs(n,{pending:!0,data:e,method:i.method,action:a},null,e)}}else typeof a==`function`&&(s.preventDefault(),e=new FormData(i,o),Qs(n,{pending:!0,data:e,method:i.method,action:a},a,e))},currentTarget:i}]})}}for(var zf=0;zf<di.length;zf++){var Bf=di[zf];fi(Bf.toLowerCase(),`on`+(Bf[0].toUpperCase()+Bf.slice(1)))}fi(ri,`onAnimationEnd`),fi(ii,`onAnimationIteration`),fi(ai,`onAnimationStart`),fi(`dblclick`,`onDoubleClick`),fi(`focusin`,`onFocus`),fi(`focusout`,`onBlur`),fi(oi,`onTransitionRun`),fi(si,`onTransitionStart`),fi(ci,`onTransitionCancel`),fi(li,`onTransitionEnd`),Rt(`onMouseEnter`,[`mouseout`,`mouseover`]),Rt(`onMouseLeave`,[`mouseout`,`mouseover`]),Rt(`onPointerEnter`,[`pointerout`,`pointerover`]),Rt(`onPointerLeave`,[`pointerout`,`pointerover`]),Lt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),Lt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),Lt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),Lt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),Lt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var Vf=`abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting`.split(` `),Hf=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(Vf));function Uf(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;a:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],c=s.instance,l=s.currentTarget;if(s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==a&&i.isPropagationStopped())break a;a=s,i.currentTarget=l;try{a(i)}catch(e){_i(e)}i.currentTarget=null,a=c}}}}function Wf(e,t){var n=t[St];n===void 0&&(n=t[St]=new Set);var r=e+`__bubble`;n.has(r)||(Jf(t,e,2,!1),n.add(r))}function Gf(e,t,n){var r=0;t&&(r|=4),Jf(n,e,r,t)}var Kf=`_reactListening`+Math.random().toString(36).slice(2);function qf(e){if(!e[Kf]){e[Kf]=!0,Ft.forEach(function(t){t!==`selectionchange`&&(Hf.has(t)||Gf(t,!1,e),Gf(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Kf]||(t[Kf]=!0,Gf(`selectionchange`,!1,t))}}function Jf(e,t,n,r){switch(Eh(t)){case 2:var i=bh;break;case 8:i=xh;break;default:i=Sh}n=i.bind(null,t,n,e),i=void 0,!En||t!==`touchstart`&&t!==`touchmove`&&t!==`wheel`||(i=!0),r?i===void 0?e.addEventListener(t,n,!0):e.addEventListener(t,n,{capture:!0,passive:i}):i===void 0?e.addEventListener(t,n,!1):e.addEventListener(t,n,{passive:i})}function Yf(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var s=r.tag;if(s===3||s===4){var c=r.stateNode.containerInfo;if(c===i)break;if(s===4)for(s=r.return;s!==null;){var l=s.tag;if((l===3||l===4)&&s.stateNode.containerInfo===i)return;s=s.return}for(;c!==null;){if(s=kt(c),s===null)return;if(l=s.tag,l===5||l===6||l===26||l===27){r=a=s;continue a}c=c.parentNode}}r=r.return}Cn(function(){var r=a,i=vn(n),s=[];a:{var c=ui.get(e);if(c!==void 0){var l=Ln,u=e;switch(e){case`keypress`:if(Mn(n)===0)break a;case`keydown`:case`keyup`:l=er;break;case`focusin`:u=`focus`,l=Kn;break;case`focusout`:u=`blur`,l=Kn;break;case`beforeblur`:case`afterblur`:l=Kn;break;case`click`:if(n.button===2)break a;case`auxclick`:case`dblclick`:case`mousedown`:case`mousemove`:case`mouseup`:case`mouseout`:case`mouseover`:case`contextmenu`:l=Wn;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:l=Gn;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:l=rr;break;case ri:case ii:case ai:l=qn;break;case li:l=ir;break;case`scroll`:case`scrollend`:l=zn;break;case`wheel`:l=ar;break;case`copy`:case`cut`:case`paste`:l=Jn;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:l=tr;break;case`submit`:l=nr;break;case`toggle`:case`beforetoggle`:l=or}var d=!!(t&4),f=!d&&(e===`scroll`||e===`scrollend`),p=d?c===null?null:c+`Capture`:c;d=[];for(var m=r,h;m!==null;){var g=m;if(h=g.stateNode,g=g.tag,g!==5&&g!==26&&g!==27||h===null||p===null||(g=wn(m,p),g!=null&&d.push(Xf(m,g,h))),f)break;m=m.return}0<d.length&&(c=new l(c,u,null,n,i),s.push({event:c,listeners:d}))}}if(!(t&7)){a:{if(l=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,l&&n!==_n&&(u=n.relatedTarget||n.fromElement)&&(kt(u)||u[xt]))break a;(c||l)&&(u=i.window===i?i:(l=i.ownerDocument)?l.defaultView||l.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?kt(l):null,l!==null&&(f=o(l),d=l.tag,l!==f||d!==5&&d!==27&&d!==6)&&(l=null)):(c=null,l=r),c!==l&&(d=Wn,g=`onMouseLeave`,p=`onMouseEnter`,m=`mouse`,(e===`pointerout`||e===`pointerover`)&&(d=tr,g=`onPointerLeave`,p=`onPointerEnter`,m=`pointer`),f=c==null?u:jt(c),h=l==null?u:jt(l),u=new d(g,m+`leave`,c,n,i),u.target=f,u.relatedTarget=h,g=null,kt(i)===r&&(d=new d(p,m+`enter`,l,n,i),d.target=h,d.relatedTarget=f,g=d),f=g,d=c&&l?w(c,l,Qf):null,c!==null&&$f(s,u,c,d,!1),l!==null&&f!==null&&$f(s,f,l,d,!0)))}a:{if(c=r?jt(r):window,l=c.nodeName&&c.nodeName.toLowerCase(),l===`select`||l===`input`&&c.type===`file`)var _=Er;else if(br(c)){if(Dr)_=Ir;else{_=Pr;var v=Nr}}else l=c.nodeName,!l||l.toLowerCase()!==`input`||c.type!==`checkbox`&&c.type!==`radio`?r&&fn(r.elementType)&&(_=Er):_=Fr;if(_&&=_(e,r)){xr(s,_,n,i);break a}v&&v(e,c,r)}switch(v=r?jt(r):window,e){case`focusin`:(br(v)||v.contentEditable===`true`)&&(qr=v,Jr=r,Yr=null);break;case`focusout`:Yr=Jr=qr=null;break;case`mousedown`:Xr=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Xr=!1,Zr(s,n,i);break;case`selectionchange`:if(Kr)break;case`keydown`:case`keyup`:Zr(s,n,i)}var y;if(cr)b:{switch(e){case`compositionstart`:var b=`onCompositionStart`;break b;case`compositionend`:b=`onCompositionEnd`;break b;case`compositionupdate`:b=`onCompositionUpdate`;break b}b=void 0}else gr?mr(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===229&&(b=`onCompositionStart`);b&&(dr&&n.locale!==`ko`&&(gr||b!==`onCompositionStart`?b===`onCompositionEnd`&&gr&&(y=jn()):(On=i,kn=`value`in On?On.value:On.textContent,gr=!0)),v=Zf(r,b),0<v.length&&(b=new Yn(b,e,null,n,i),s.push({event:b,listeners:v}),y?b.data=y:(y=hr(n),y!==null&&(b.data=y)))),(y=ur?_r(e,n):vr(e,n))&&(b=Zf(r,`onBeforeInput`),0<b.length&&(v=new Yn(`onBeforeInput`,`beforeinput`,null,n,i),s.push({event:v,listeners:b}),v.data=y)),Rf(s,e,r,n,i)}Uf(s,t)})}function Xf(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Zf(e,t){for(var n=t+`Capture`,r=[];e!==null;){var i=e,a=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||a===null||(i=wn(e,n),i!=null&&r.unshift(Xf(e,i,a)),i=wn(e,t),i!=null&&r.push(Xf(e,i,a))),e.tag===3)return r;e=e.return}return[]}function Qf(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $f(e,t,n,r,i){for(var a=t._reactName,o=[];n!==null&&n!==r;){var s=n,c=s.alternate,l=s.stateNode;if(s=s.tag,c!==null&&c===r)break;s!==5&&s!==26&&s!==27||l===null||(c=l,i?(l=wn(n,a),l!=null&&o.unshift(Xf(n,l,c))):i||(l=wn(n,a),l!=null&&o.push(Xf(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}var ep=/\r\n?/g,tp=/\u0000|\uFFFD/g;function np(e){return(typeof e==`string`?e:``+e).replace(ep,`
|
|
10
|
+
`).replace(tp,``)}function rp(e,t){return t=np(t),np(e)===t}function ip(e,t,n,r,a,o){switch(n){case`children`:if(typeof r==`string`)t===`body`||t===`textarea`&&r===``||cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)t!==`body`&&cn(e,``+r);else return;break;case`className`:Kt(e,`class`,r);break;case`tabIndex`:Kt(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:Kt(e,n,r);break;case`style`:dn(e,r,o);return;case`data`:if(t!==`object`){Kt(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)||r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(typeof r==`function`){e.setAttribute(n,`javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')`);break}if(typeof o==`function`&&(n===`formAction`?(t!==`input`&&ip(e,t,`name`,a.name,a,null),ip(e,t,`formEncType`,a.formEncType,a,null),ip(e,t,`formMethod`,a.formMethod,a,null),ip(e,t,`formTarget`,a.formTarget,a,null)):(ip(e,t,`encType`,a.encType,a,null),ip(e,t,`method`,a.method,a,null),ip(e,t,`target`,a.target,a,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}r=hn(r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(e.onclick=gn);return;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`multiple`:e.multiple=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`muted`:e.muted=r&&typeof r!=`function`&&typeof r!=`symbol`;break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:break;case`autoFocus`:break;case`xlinkHref`:if(r==null||typeof r==`function`||typeof r==`boolean`||typeof r==`symbol`){e.removeAttribute(`xlink:href`);break}n=hn(r),e.setAttributeNS(`http://www.w3.org/1999/xlink`,`xlink:href`,n);break;case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`inert`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`credentialless`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,r):e.removeAttribute(n);break;case`cols`:case`rows`:case`size`:case`span`:r!=null&&typeof r!=`function`&&typeof r!=`symbol`&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case`rowSpan`:case`start`:r==null||typeof r==`function`||typeof r==`symbol`||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case`popover`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Gt(e,`popover`,r);break;case`xlinkActuate`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:actuate`,r);break;case`xlinkArcrole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:arcrole`,r);break;case`xlinkRole`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:role`,r);break;case`xlinkShow`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:show`,r);break;case`xlinkTitle`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:title`,r);break;case`xlinkType`:qt(e,`http://www.w3.org/1999/xlink`,`xlink:type`,r);break;case`xmlBase`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:base`,r);break;case`xmlLang`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:lang`,r);break;case`xmlSpace`:qt(e,`http://www.w3.org/XML/1998/namespace`,`xml:space`,r);break;case`is`:Gt(e,`is`,r);break;case`innerText`:case`textContent`:return;default:if(!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`)n=pn.get(n)||n,Gt(e,n,r);else return}Ut=!0}function ap(e,t,n,r,a,o){switch(n){case`style`:dn(e,r,o);return;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error(i(61));if(n=r.__html,n!=null){if(a.children!=null)throw Error(i(60));o?.__html!==n&&(e.innerHTML=n)}}break;case`children`:if(typeof r==`string`)cn(e,r);else if(typeof r==`number`||typeof r==`bigint`)cn(e,``+r);else return;break;case`onScroll`:r!=null&&Wf(`scroll`,e);return;case`onScrollEnd`:r!=null&&Wf(`scrollend`,e);return;case`onClick`:r!=null&&(e.onclick=gn);return;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:return;case`innerText`:case`textContent`:return;default:if(!It.hasOwnProperty(n))a:{if(n[0]===`o`&&n[1]===`n`&&(a=n.endsWith(`Capture`),o=n.slice(2,a?n.length-7:void 0),t=e[bt]||null,t=t==null?null:t[n],typeof t==`function`&&e.removeEventListener(o,t,a),typeof r==`function`)){typeof t!=`function`&&t!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(o,r,a);break a}Ut=!0,n in e?e[n]=r:!0===r?e.setAttribute(n,``):Gt(e,n,r)}return}Ut=!0}function op(e,t,n){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:Wf(`error`,e),Wf(`load`,e);var r=!1,a=!1,o;for(o in n)if(n.hasOwnProperty(o)){var s=n[o];if(s!=null)switch(o){case`src`:r=!0;break;case`srcSet`:a=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,o,s,n,null)}}a&&ip(e,t,`srcSet`,n.srcSet,n,null),r&&ip(e,t,`src`,n.src,n,null);return;case`input`:Wf(`invalid`,e);var c=o=s=a=null,l=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case`name`:a=d;break;case`type`:s=d;break;case`checked`:l=d;break;case`defaultChecked`:u=d;break;case`value`:o=d;break;case`defaultValue`:c=d;break;case`children`:case`dangerouslySetInnerHTML`:if(d!=null)throw Error(i(137,t));break;default:ip(e,t,r,d,n,null)}}nn(e,o,c,l,u,s,a,!1);return;case`select`:for(a in Wf(`invalid`,e),r=s=o=null,n)if(n.hasOwnProperty(a)&&(c=n[a],c!=null))switch(a){case`value`:o=c;break;case`defaultValue`:s=c;break;case`multiple`:r=c;default:ip(e,t,a,c,n,null)}t=o,n=s,e.multiple=!!r,t==null?n!=null&&an(e,!!r,n,!0):an(e,!!r,t,!1);return;case`textarea`:for(s in Wf(`invalid`,e),o=a=r=null,n)if(n.hasOwnProperty(s)&&(c=n[s],c!=null))switch(s){case`value`:r=c;break;case`defaultValue`:a=c;break;case`children`:o=c;break;case`dangerouslySetInnerHTML`:if(c!=null)throw Error(i(91));break;default:ip(e,t,s,c,n,null)}sn(e,r,a,o);return;case`option`:for(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:ip(e,t,l,r,n,null)}return;case`dialog`:Wf(`beforetoggle`,e),Wf(`toggle`,e),Wf(`cancel`,e),Wf(`close`,e);break;case`iframe`:case`object`:Wf(`load`,e);break;case`video`:case`audio`:for(r=0;r<Vf.length;r++)Wf(Vf[r],e);break;case`image`:Wf(`error`,e),Wf(`load`,e);break;case`details`:Wf(`toggle`,e);break;case`embed`:case`source`:case`link`:Wf(`error`,e),Wf(`load`,e);case`area`:case`base`:case`br`:case`col`:case`hr`:case`keygen`:case`meta`:case`param`:case`track`:case`wbr`:case`menuitem`:for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:throw Error(i(137,t));default:ip(e,t,u,r,n,null)}return;default:if(fn(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&ap(e,t,d,r,n,void 0));return}}for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null&&ip(e,t,c,r,n,null))}var sp={};function cp(e,t,n,r){switch(t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var a=null,o=null,s=null,c=null,l=null,u=null,d=null;for(m in n){var f=n[m];if(n.hasOwnProperty(m)&&f!=null)switch(m){case`checked`:break;case`value`:break;case`defaultValue`:l=f;default:r.hasOwnProperty(m)||ip(e,t,m,null,r,f)}}for(var p in r){var m=r[p];if(f=n[p],r.hasOwnProperty(p)&&(m!=null||f!=null))switch(p){case`type`:m!==f&&(Ut=!0),o=m;break;case`name`:m!==f&&(Ut=!0),a=m;break;case`checked`:m!==f&&(Ut=!0),u=m;break;case`defaultChecked`:m!==f&&(Ut=!0),d=m;break;case`value`:m!==f&&(Ut=!0),s=m;break;case`defaultValue`:m!==f&&(Ut=!0),c=m;break;case`children`:case`dangerouslySetInnerHTML`:if(m!=null)throw Error(i(137,t));break;default:m!==f&&ip(e,t,p,m,r,f)}}tn(e,s,c,l,u,d,o,a);return;case`select`:for(o in m=s=c=p=null,n)if(l=n[o],n.hasOwnProperty(o)&&l!=null)switch(o){case`value`:break;case`multiple`:m=l;default:r.hasOwnProperty(o)||ip(e,t,o,null,r,l)}for(a in r)if(o=r[a],l=n[a],r.hasOwnProperty(a)&&(o!=null||l!=null))switch(a){case`value`:o!==l&&(Ut=!0),p=o;break;case`defaultValue`:o!==l&&(Ut=!0),c=o;break;case`multiple`:o!==l&&(Ut=!0),s=o;default:o!==l&&ip(e,t,a,o,r,l)}t=c,n=s,r=m,p==null?!!r!=!!n&&(t==null?an(e,!!n,n?[]:``,!1):an(e,!!n,t,!0)):an(e,!!n,p,!1);return;case`textarea`:for(c in m=p=null,n)if(a=n[c],n.hasOwnProperty(c)&&a!=null&&!r.hasOwnProperty(c))switch(c){case`value`:break;case`children`:break;default:ip(e,t,c,null,r,a)}for(s in r)if(a=r[s],o=n[s],r.hasOwnProperty(s)&&(a!=null||o!=null))switch(s){case`value`:a!==o&&(Ut=!0),p=a;break;case`defaultValue`:a!==o&&(Ut=!0),m=a;break;case`children`:break;case`dangerouslySetInnerHTML`:if(a!=null)throw Error(i(91));break;default:a!==o&&ip(e,t,s,a,r,o)}on(e,p,m);return;case`option`:for(var h in n)if(p=n[h],n.hasOwnProperty(h)&&p!=null&&!r.hasOwnProperty(h))switch(h){case`selected`:e.selected=!1;break;default:ip(e,t,h,null,r,p)}for(l in r)if(p=r[l],m=n[l],r.hasOwnProperty(l)&&p!==m&&(p!=null||m!=null))switch(l){case`selected`:p!==m&&(Ut=!0),e.selected=p&&typeof p!=`function`&&typeof p!=`symbol`;break;default:ip(e,t,l,p,r,m)}return;case`img`:case`link`:case`area`:case`base`:case`br`:case`col`:case`embed`:case`hr`:case`keygen`:case`meta`:case`param`:case`source`:case`track`:case`wbr`:case`menuitem`:for(var g in n)p=n[g],n.hasOwnProperty(g)&&p!=null&&!r.hasOwnProperty(g)&&ip(e,t,g,null,r,p);for(u in r)if(p=r[u],m=n[u],r.hasOwnProperty(u)&&p!==m&&(p!=null||m!=null))switch(u){case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(i(137,t));break;default:ip(e,t,u,p,r,m)}return;default:if(fn(t)){for(var _ in n)p=n[_],n.hasOwnProperty(_)&&p!==void 0&&!r.hasOwnProperty(_)&&ap(e,t,_,void 0,r,p);for(d in r)p=r[d],m=n[d],!r.hasOwnProperty(d)||p===m||p===void 0&&m===void 0||ap(e,t,d,p,r,m);return}}for(var v in n)p=n[v],n.hasOwnProperty(v)&&p!=null&&!r.hasOwnProperty(v)&&ip(e,t,v,null,r,p);for(f in r)p=r[f],m=n[f],!r.hasOwnProperty(f)||p===m||p==null&&m==null||ip(e,t,f,p,r,m)}function lp(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function up(){if(typeof performance.getEntriesByType==`function`){for(var e=0,t=0,n=performance.getEntriesByType(`resource`),r=0;r<n.length;r++){var i=n[r],a=i.transferSize,o=i.initiatorType,s=i.duration;if(a&&s&&lp(o)){for(o=0,s=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],l=c.startTime;if(l>s)break;var u=c.transferSize,d=c.initiatorType;u&&lp(d)&&(c=c.responseEnd,o+=u*(c<s?1:(s-l)/(c-l)))}if(--r,t+=8*(a+o)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e==`number`)?e:5}var dp=null,fp=null;function pp(e){return e.nodeType===9?e:e.ownerDocument}function mp(e){switch(e){case`http://www.w3.org/2000/svg`:return 1;case`http://www.w3.org/1998/Math/MathML`:return 2;default:return 0}}function hp(e,t){if(e===0)switch(t){case`svg`:return 1;case`math`:return 2;default:return 0}return e===1&&t===`foreignObject`?0:e}function gp(e,t,n,r){return n=pp(n).createElement(e),n[yt]=r,n[bt]=t,op(n,e,t),Nt(n),n}function _p(e,t){return e===`textarea`||e===`noscript`||typeof t.children==`string`||typeof t.children==`number`||typeof t.children==`bigint`||typeof t.dangerouslySetInnerHTML==`object`&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var vp=null;function yp(){var e=window.event;return e&&e.type===`popstate`?e!==vp&&(vp=e,!0):(vp=null,!1)}var bp=typeof setTimeout==`function`?setTimeout:void 0,xp=typeof clearTimeout==`function`?clearTimeout:void 0,Sp=typeof Promise==`function`?Promise:void 0,Cp=typeof requestAnimationFrame==`function`?requestAnimationFrame:bp,wp=typeof queueMicrotask==`function`?queueMicrotask:Sp===void 0?bp:function(e){return Sp.resolve(null).then(e).catch(Tp)};function Tp(e){setTimeout(function(){throw e})}function Ep(e){return e===`head`}function Dp(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8){if(n=i.data,n===`/$`||n===`/&`){if(r===0){e.removeChild(i),Gh(t);return}r--}else if(n===`$`||n===`$?`||n===`$~`||n===`$!`||n===`&`)r++;else if(n===`html`)bm(e.ownerDocument.documentElement);else if(n===`head`){n=e.ownerDocument.head,bm(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Et]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===`body`&&bm(e.ownerDocument.body)}n=i}while(n);Gh(t)}function Op(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display=`none`):(n.style.display=n._stashedDisplay||``,n.getAttribute(`style`)===``&&n.removeAttribute(`style`)):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=``):n.nodeValue=n._stashedText||``),r&&r.nodeType===8){if(n=r.data,n===`/$`){if(e===0)break;e--}else n!==`$`&&n!==`$?`&&n!==`$~`&&n!==`$!`||e++}n=r}while(n)}function kp(e,t,n){if(t=CSS.escape(t)===t?t:`r-`+btoa(t).replace(/=/g,``),e.style.viewTransitionName=t,n!=null&&(e.style.viewTransitionClass=n),n=getComputedStyle(e),n.display===`inline`){if(t=e.getClientRects(),t.length===1)var r=1;else for(var i=r=0;i<t.length;i++){var a=t[i];0<a.width&&0<a.height&&r++}r===1&&(e=e.style,e.display=t.length===1?`inline-block`:`block`,e.marginTop=`-`+n.paddingTop,e.marginBottom=`-`+n.paddingBottom)}}function Ap(e,t){e=e.style,t=t.style;var n=t==null?null:t.hasOwnProperty(`viewTransitionName`)?t.viewTransitionName:t.hasOwnProperty(`view-transition-name`)?t[`view-transition-name`]:null;e.viewTransitionName=n==null||typeof n==`boolean`?``:(``+n).trim(),n=t==null?null:t.hasOwnProperty(`viewTransitionClass`)?t.viewTransitionClass:t.hasOwnProperty(`view-transition-class`)?t[`view-transition-class`]:null,e.viewTransitionClass=n==null||typeof n==`boolean`?``:(``+n).trim(),e.display===`inline-block`&&(t==null?e.display=e.margin=``:(n=t.display,e.display=n==null||typeof n==`boolean`?``:n,n=t.margin,n==null?(n=t.hasOwnProperty(`marginTop`)?t.marginTop:t[`margin-top`],e.marginTop=n==null||typeof n==`boolean`?``:n,t=t.hasOwnProperty(`marginBottom`)?t.marginBottom:t[`margin-bottom`],e.marginBottom=t==null||typeof t==`boolean`?``:t):e.margin=n))}function jp(e,t,n){return n=n.ownerDocument.defaultView,{rect:e,abs:t.position===`absolute`||t.position===`fixed`,clip:t.clipPath!==`none`||t.overflow!==`visible`||t.filter!==`none`||t.mask!==`none`||t.mask!==`none`||t.borderRadius!==`0px`,view:0<=e.bottom&&0<=e.right&&e.top<=n.innerHeight&&e.left<=n.innerWidth}}function Z(e){return jp(e.getBoundingClientRect(),getComputedStyle(e),e)}function Mp(e){var t=e.getBoundingClientRect();t=new DOMRect(t.x+2e4,t.y+2e4,t.width,t.height);var n=getComputedStyle(e);return jp(t,n,e)}function Np(e){return e.documentElement.clientHeight}function Pp(e){this.addEventListener(`load`,e),this.addEventListener(`error`,e)}function Fp(e,t,n,r,i,a,o,s,c){var l=t.nodeType===9?t:t.ownerDocument;try{var u=l.startViewTransition({update:function(){var t=l.defaultView,n=t.navigation&&t.navigation.transition,o=l.fonts.status;r();var s=[];if(o===`loaded`&&(Np(l),l.fonts.status===`loading`&&s.push(l.fonts.ready)),o=s.length,e!==null)for(var c=e.suspenseyImages,u=0,d=0;d<c.length;d++){var f=c[d];if(!f.complete){var p=f.getBoundingClientRect();if(0<p.bottom&&0<p.right&&p.top<t.innerHeight&&p.left<t.innerWidth){if(u+=$m(f),u>nh){s.length=o;break}f=new Promise(Pp.bind(f)),s.push(f)}}}if(0<s.length)return t=Promise.race([Promise.all(s),new Promise(function(e){return setTimeout(e,500)})]).then(i,i),(n?Promise.allSettled([n.finished,t]):t).then(a,a);if(i(),n)return n.finished.then(a,a);a()},types:n});l.__reactViewTransition=u;var d=[];return u.ready.then(function(){for(var e=l.documentElement.getAnimations({subtree:!0}),t=0;t<e.length;t++){var n=e[t],r=n.effect,i=r.pseudoElement;if(i!=null&&i.startsWith(`::view-transition`)){d.push(n),n=r.getKeyframes();for(var a=i=void 0,s=!0,c=0;c<n.length;c++){var u=n[c],f=u.width;if(i===void 0)i=f;else if(i!==f){s=!1;break}if(f=u.height,a===void 0)a=f;else if(a!==f){s=!1;break}delete u.width,delete u.height,u.transform===`none`&&delete u.transform}s&&i!==void 0&&a!==void 0&&(r.setKeyframes(n),s=getComputedStyle(r.target,r.pseudoElement),s.width!==i||s.height!==a)&&(s=n[0],s.width=i,s.height=a,s=n[n.length-1],s.width=i,s.height=a,r.setKeyframes(n))}}o()},function(e){l.__reactViewTransition===u&&(l.__reactViewTransition=null);try{if(typeof e==`object`&&e)switch(e.name){case`InvalidStateError`:(e.message===`View transition was skipped because document visibility state is hidden.`||e.message===`Skipping view transition because document visibility state has become hidden.`||e.message===`Skipping view transition because viewport size changed.`||e.message===`Transition was aborted because of invalid state`)&&(e=null)}e!==null&&c(e)}finally{r(),i(),o()}}),u.finished.finally(function(){for(var e=0;e<d.length;e++)d[e].cancel();l.__reactViewTransition===u&&(l.__reactViewTransition=null),s()}),u}catch{return r(),i(),o(),null}}function Ip(e,t){this._scope=document.documentElement,this._selector=`::view-transition-`+e+`(`+t+`)`}Ip.prototype.animate=function(e,t){return t=typeof t==`number`?{duration:t}:T({},t),t.pseudoElement=this._selector,this._scope.animate(e,t)},Ip.prototype.getAnimations=function(){for(var e=this._scope,t=this._selector,n=e.getAnimations({subtree:!0}),r=[],i=0;i<n.length;i++){var a=n[i].effect;a!==null&&a.target===e&&a.pseudoElement===t&&r.push(n[i])}return r},Ip.prototype.getComputedStyle=function(){return getComputedStyle(this._scope,this._selector)};function Lp(e){return{name:e,group:new Ip(`group`,e),imagePair:new Ip(`image-pair`,e),old:new Ip(`old`,e),new:new Ip(`new`,e)}}function Rp(e){this._fragmentFiber=e,this._observers=this._eventListeners=null}Rp.prototype.addEventListener=function(e,t,n){var r=null,i=null;if(!(n!=null&&typeof n!=`boolean`&&(r=n.signal||null,r!==null&&r.aborted))){this._eventListeners===null&&(this._eventListeners=[]);var a=this._eventListeners;if(Up(a,e,t,n)===-1){var o=this,s=t;n!=null&&typeof n!=`boolean`&&!0===n.once&&(s=function(r){o.removeEventListener(e,t,n),typeof t==`function`?t.call(this,r):t.handleEvent(r)}),r!==null&&(i=o.removeEventListener.bind(o,e,t,n),r.addEventListener(`abort`,i,{once:!0}),i=r.removeEventListener.bind(r,`abort`,i)),r=Vp(n),a.push({type:e,listener:t,optionsOrUseCapture:n,attachedListener:s,cleanup:i}),p(this._fragmentFiber.child,!1,zp,e,s,r)}this._eventListeners=a}};function zp(e,t,n,r){return v(e).addEventListener(t,n,r),!1}Rp.prototype.removeEventListener=function(e,t,n){var r=this._eventListeners;if(r!==null&&(t=Up(r,e,t,n),t!==-1)){var i=r[t];n=i.attachedListener;var a=i.cleanup;i=Vp(i.optionsOrUseCapture),p(this._fragmentFiber.child,!1,Bp,e,n,i),r.splice(t,1),a!==null&&a()}};function Bp(e,t,n,r){return v(e).removeEventListener(t,n,r),!1}function Vp(e){return e!=null&&typeof e!=`boolean`&&(!0===e.once||e.signal instanceof AbortSignal)?{capture:e.capture,passive:e.passive}:e}function Hp(e){return e==null?`c=0`:typeof e==`boolean`?`c=`+(e?`1`:`0`):`c=`+(e.capture?`1`:`0`)}function Up(e,t,n,r){if(e.length===0)return-1;r=Hp(r);for(var i=0;i<e.length;i++){var a=e[i];if(a.type===t&&a.listener===n&&Hp(a.optionsOrUseCapture)===r)return i}return-1}Rp.prototype.dispatchEvent=function(e){var t=m(this._fragmentFiber);if(t===null)return!0;t=v(t);var n=this._eventListeners;if(n!==null&&0<n.length||!e.bubbles){var r=t.nodeType===9?t.createComment(``):document.createTextNode(``);if(n)for(var i=0;i<n.length;i++){var a=n[i];r.addEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture))}if(t.appendChild(r),e=r.dispatchEvent(e),n)for(i=0;i<n.length;i++)a=n[i],r.removeEventListener(a.type,a.attachedListener,Vp(a.optionsOrUseCapture));return t.removeChild(r),e}return t.dispatchEvent(e)},Rp.prototype.focus=function(e){p(this._fragmentFiber.child,!0,Wp,e,void 0,void 0)};function Wp(e,t){return e.tag!==6&&(e=v(e),gm(e,t))}Rp.prototype.focusLast=function(e){var t=[];p(this._fragmentFiber.child,!0,Gp,t,void 0,void 0);for(var n=t.length-1;0<=n&&!Wp(t[n],e);n--);};function Gp(e,t){return t.push(e),!1}Rp.prototype.blur=function(){var e=m(this._fragmentFiber);e!==null&&(e=v(e),e=pp(e).activeElement,e!==null&&p(this._fragmentFiber.child,!1,Kp,e,void 0,void 0))};function Kp(e,t){return e.tag!==6&&(e=v(e),e===t||e.contains(t)?(t.blur(),!0):!1)}Rp.prototype.observeUsing=function(e){this._observers===null&&(this._observers=new Set),this._observers.add(e),p(this._fragmentFiber.child,!1,qp,e,void 0,void 0)};function qp(e,t){return e.tag===6||(e=v(e),t.observe(e)),!1}Rp.prototype.unobserveUsing=function(e){var t=this._observers;if(t!==null&&t.has(e)){t.delete(e),p(this._fragmentFiber.child,!1,Jp,e,void 0,void 0);for(var n=t=0;n<Yp.length;n++){var r=Yp[n];r.fragmentInstance===this&&r.observer===e?e.unobserve(r.instance):Yp[t++]=r}Yp.length=t}};function Jp(e,t){return e.tag===6||(e=v(e),t.unobserve(e)),!1}var Yp=[],Xp=!1;function Zp(e,t,n){Yp.push({fragmentInstance:e,observer:t,instance:n}),Xp||(Xp=!0,_m(function(){Xp=!1;var e=Yp;Yp=[];for(var t=0;t<e.length;t++){var n=e[t];n.observer.unobserve(n.instance)}}))}Rp.prototype.getClientRects=function(){var e=[];return p(this._fragmentFiber.child,!1,Qp,e,void 0,void 0),e};function Qp(e,t){if(e.tag===6){e=e.stateNode;var n=e.ownerDocument.createRange();n.selectNodeContents(e),t.push.apply(t,n.getClientRects())}else e=v(e),t.push.apply(t,e.getClientRects());return!1}Rp.prototype.getRootNode=function(e){var t=m(this._fragmentFiber);return t===null?this:v(t).getRootNode(e)},Rp.prototype.compareDocumentPosition=function(e){var t=m(this._fragmentFiber);if(t===null)return Node.DOCUMENT_POSITION_DISCONNECTED;var n=[];p(this._fragmentFiber.child,!1,Gp,n,void 0,void 0);var r=v(t);if(n.length===0){if(n=r,h(this._fragmentFiber)){a:{for(t=this._fragmentFiber.return;t!==null;){if(t.tag===4){t=t.stateNode.containerInfo;break a}if(t.tag===3||t.tag===5||t.tag===27)break;t=t.return}t=null}t!=null&&(n=t)}t=this._fragmentFiber;var i=r=n.compareDocumentPosition(e);return n===e?i=Node.DOCUMENT_POSITION_CONTAINS:r&Node.DOCUMENT_POSITION_CONTAINED_BY&&(n=g(t)[1],n===null?i=Node.DOCUMENT_POSITION_PRECEDING:(e=v(n).compareDocumentPosition(e),i=e===0||e&Node.DOCUMENT_POSITION_FOLLOWING?Node.DOCUMENT_POSITION_FOLLOWING:Node.DOCUMENT_POSITION_PRECEDING)),i|=Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC}t=v(n[0]),i=v(n[n.length-1]);var a=h(this._fragmentFiber)?t.parentElement:r;if(a==null)return Node.DOCUMENT_POSITION_DISCONNECTED;r=a.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY,a=a.compareDocumentPosition(i)&Node.DOCUMENT_POSITION_CONTAINED_BY;var o=t.compareDocumentPosition(e),s=i.compareDocumentPosition(e),c=o&Node.DOCUMENT_POSITION_CONTAINED_BY||s&Node.DOCUMENT_POSITION_CONTAINED_BY;return s=r&&a&&o&Node.DOCUMENT_POSITION_FOLLOWING&&s&Node.DOCUMENT_POSITION_PRECEDING,t=r&&t===e||a&&i===e||c||s?Node.DOCUMENT_POSITION_CONTAINED_BY:!r&&t===e||!a&&i===e?Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC:o,t&Node.DOCUMENT_POSITION_DISCONNECTED||t&Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC||$p(t,this._fragmentFiber,n[0],n[n.length-1],e)?t:Node.DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC};function $p(e,t,n,r,i){var a=kt(i);if(e&Node.DOCUMENT_POSITION_CONTAINED_BY){if(n=!!a)a:{for(;a!==null;){if(a.tag===7&&(a===t||a.alternate===t)){n=!0;break a}a=a.return}n=!1}return n}if(e&Node.DOCUMENT_POSITION_CONTAINS){if(a===null)return a=i.ownerDocument,i===a||i===a.documentElement||i===a.body;a:{for(a=t,t=m(t);a!==null;){if(!(a.tag!==5&&a.tag!==3&&a.tag!==27||a!==t&&a.alternate!==t)){a=!0;break a}a=a.return}a=!1}return a}return e&Node.DOCUMENT_POSITION_PRECEDING?((t=!!a)&&!(t=a===n)&&(t=w(n,a,C),t===null?t=!1:(p(t,!0,x,a,n),a=y,y=null,t=a!==null)),t):e&Node.DOCUMENT_POSITION_FOLLOWING?((t=!!a)&&!(t=a===r)&&(t=w(r,a,C),t===null?t=!1:(p(t,!0,S,a,r),a=y,b=y=null,t=a!==null)),t):!1}function em(e,t){var n=e.ownerDocument.createRange();n.selectNodeContents(e),e=n.getBoundingClientRect(),window.scrollTo(window.scrollX+e.left,t?window.scrollY+e.top:window.scrollY+e.bottom-window.innerHeight)}Rp.prototype.scrollIntoView=function(e){if(typeof e==`object`)throw Error(i(566));var t=[];p(this._fragmentFiber.child,!1,Gp,t,void 0,void 0);var n=!1!==e;if(t.length===0){var r=g(this._fragmentFiber);if(r=n?r[1]||r[0]||m(this._fragmentFiber):r[0]||r[1],r===null)return;if(r.tag===6){e=v(r),em(e,n);return}if(r=v(r),r.nodeType!==9){if(r.nodeType===11){n=`host`in r?r.host:null,n!==null&&n.scrollIntoView(e);return}r.scrollIntoView(e)}}for(r=n?t.length-1:0;r!==(n?-1:t.length);){var a=t[r];a.tag===6?(a=v(a),em(a,n)):v(a).scrollIntoView(e),r+=n?-1:1}};function tm(e,t){return e=v(e),nm(e,t),!1}function nm(e,t){e.reactFragments??=new Set,e.reactFragments.add(t)}function rm(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.addEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){for(var r=0,i=0;i<Yp.length;i++){var a=Yp[i];(a.fragmentInstance!==t||a.observer!==n||a.instance!==e)&&(Yp[r++]=a)}Yp.length=r,n.observe(e)}),nm(e,t))}function im(e,t){var n=t._eventListeners;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r];e.removeEventListener(i.type,i.attachedListener,Vp(i.optionsOrUseCapture))}e.nodeType!==3&&(n=t._observers,n!==null&&n.forEach(function(n){typeof n.rootMargin==`string`?Zp(t,n,e):n.unobserve(e)}),e.reactFragments!=null&&e.reactFragments.delete(t))}function am(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case`HTML`:case`HEAD`:case`BODY`:am(n),Ot(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function om(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!==`INPUT`||e.type!==`hidden`))break}else if(!r){if(t===`input`&&e.type===`hidden`){var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Et])switch(t){case`meta`:if(!e.hasAttribute(`itemprop`))break;return e;case`link`:if(a=e.getAttribute(`rel`),a===`stylesheet`&&e.hasAttribute(`data-precedence`)||a!==i.rel||e.getAttribute(`href`)!==(i.href==null||i.href===``?null:i.href)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute(`title`)!==(i.title==null?null:i.title))break;return e;case`style`:if(e.hasAttribute(`data-precedence`))break;return e;case`script`:if(a=e.getAttribute(`src`),(a!==(i.src==null?null:i.src)||e.getAttribute(`type`)!==(i.type==null?null:i.type)||e.getAttribute(`crossorigin`)!==(i.crossOrigin==null?null:i.crossOrigin))&&a&&e.hasAttribute(`async`)&&!e.hasAttribute(`itemprop`))break;return e;default:return e}if(e=fm(e.nextSibling),e===null)break}return null}function sm(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fm(e.nextSibling),e===null))return null;return e}function cm(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fm(e.nextSibling),e===null))return null;return e}function lm(e){return e.data===`$?`||e.data===`$~`}function um(e){return e.data===`$!`||e.data===`$?`&&e.ownerDocument.readyState!==`loading`}function dm(e,t){var n=e.ownerDocument;if(e.data===`$~`)e._reactRetry=t;else if(e.data!==`$?`||n.readyState!==`loading`)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fm(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t===`$`||t===`$!`||t===`$?`||t===`$~`||t===`&`||t===`F!`||t===`F`)break;if(t===`/$`||t===`/&`)return null}}return e}var pm=null;function mm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`/$`||n===`/&`){if(t===0)return fm(e.nextSibling);t--}else n!==`$`&&n!==`$!`&&n!==`$?`&&n!==`$~`&&n!==`&`||t++}e=e.nextSibling}return null}function hm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===`$`||n===`$!`||n===`$?`||n===`$~`||n===`&`){if(t===0)return e;t--}else n!==`/$`&&n!==`/&`||t++}e=e.previousSibling}return null}function gm(e,t){function n(){r=!0}if(e.ownerDocument.activeElement===e)return!0;var r=!1;try{e.ownerDocument.addEventListener(`focus`,n,!0),(e.focus||HTMLElement.prototype.focus).call(e,t)}finally{e.ownerDocument.removeEventListener(`focus`,n,!0)}return r}function _m(e){Cp(function(){Cp(function(t){return e(t)})})}function vm(e,t,n){switch(t=pp(n),e){case`html`:if(e=t.documentElement,!e)throw Error(i(452));return e;case`head`:if(e=t.head,!e)throw Error(i(453));return e;case`body`:if(e=t.body,!e)throw Error(i(454));return e;default:throw Error(i(451))}}function ym(e,t,n){for(var r in n){var i=n[r];n.hasOwnProperty(r)&&i!=null&&ip(e,t,r,null,sp,i)}n.dangerouslySetInnerHTML!=null&&(e.textContent=``),e.onclick===gn&&(e.onclick=null),Ot(e)}function bm(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Ot(e)}var xm=new Map,Sm=new Set;function Cm(e){if(typeof e.getRootNode==`function`){var t=e.getRootNode();if(t.nodeType===9||t.nodeType===11)return t}return e.nodeType===9?e:e.ownerDocument}var wm=F.d;F.d={f:Tm,r:Em,D:km,C:Am,L:jm,m:Mm,X:Pm,S:Nm,M:Fm};function Tm(){var e=wm.f(),t=Hd();return e||t}function Em(e){var t=At(e);t!==null&&t.tag===5&&t.type===`form`?ec(t):wm.r(e)}var Dm=typeof document>`u`?null:document;function Om(e,t,n){var r=Dm;if(r&&typeof t==`string`&&t){var i=en(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),Sm.has(i)||(Sm.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),op(t,`link`,e),Nt(t),r.head.appendChild(t)))}}function km(e){wm.D(e),Om(`dns-prefetch`,e,null)}function Am(e,t){wm.C(e,t),Om(`preconnect`,e,t)}function jm(e,t,n){wm.L(e,t,n);var r=Dm;if(r&&e&&t){var i=`link[rel="preload"][as="`+en(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+en(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+en(n.imageSizes)+`"]`)):i+=`[href="`+en(e)+`"]`;var a=i;switch(t){case`style`:a=Lm(e);break;case`script`:a=Vm(e)}if(!(xm.has(a)||(e=T({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),xm.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Rm(a))||t===`script`&&r.querySelector(Hm(a))))){var o=r.createElement(`link`);op(o,`link`,e),t===`style`&&(o[Dt]=!0,o.onload=o.onerror=function(){Pt(o)}),Nt(o),r.head.appendChild(o)}}}function Mm(e,t){wm.m(e,t);var n=Dm;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+en(r)+`"][href="`+en(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=Vm(e)}if(!xm.has(a)&&(e=T({rel:`modulepreload`,href:e},t),xm.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Hm(a)))return}r=n.createElement(`link`),op(r,`link`,e),Nt(r),n.head.appendChild(r)}}}function Nm(e,t,n){wm.S(e,t,n);var r=Dm;if(r&&e){var i=Mt(r).hoistableStyles,a=Lm(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:0,preload:null};if(o=r.querySelector(Rm(a)))s.loading=5;else{e=T({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=xm.get(a))&&Gm(e,n);var c=o=r.createElement(`link`);Nt(c),op(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=1}),c.addEventListener(`error`,function(){s.loading|=2}),s.loading|=4,Wm(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}}function Pm(e,t){wm.X(e,t);var n=Dm;if(n&&e){var r=Mt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=T({src:e,async:!0},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Nt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Fm(e,t){wm.M(e,t);var n=Dm;if(n&&e){var r=Mt(n).hoistableScripts,i=Vm(e),a=r.get(i);a||(a=n.querySelector(Hm(i)),a||(e=T({src:e,async:!0,type:`module`},t),(t=xm.get(i))&&Km(e,t),a=n.createElement(`script`),Nt(a),op(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}function Im(e,t,n,r){var a=(a=Ce.current)?Cm(a):null;if(!a)throw Error(i(446));switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Lm(n.href),t=Mt(a).hoistableStyles,r=t.get(n),r||(r={type:`style`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};case`link`:if(n.rel===`stylesheet`&&typeof n.href==`string`&&typeof n.precedence==`string`){e=Lm(n.href);var o=Mt(a).hoistableStyles,s=o.get(e);if(s||(a=a.ownerDocument||a,s={type:`stylesheet`,instance:null,count:0,state:{loading:0,preload:null}},o.set(e,s),(o=a.querySelector(Rm(e)))?o._p||(s.instance=o,s.state.loading=5):(o=xm.get(e),o||(o={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},xm.set(e,o)),Bm(a,e,o,s.state))),t&&r===null)throw Error(i(528,``));return s}if(t&&r!==null)throw Error(i(529,``));return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=Vm(n),t=Mt(a).hoistableScripts,r=t.get(n),r||(r={type:`script`,instance:null,count:0,state:null},t.set(n,r)),r):{type:`void`,instance:null,count:0,state:null};default:throw Error(i(444,e))}}function Lm(e){return`href="`+en(e)+`"`}function Rm(e){return`link[rel="stylesheet"][`+e+`]`}function zm(e){return T({},e,{"data-precedence":e.precedence,precedence:null})}function Bm(e,t,n,r){if(t=e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)){if(!0!==t[Dt]){r.loading=1;return}}else t=e.createElement(`link`),t[Dt]=!0,t.onload=t.onerror=Pt.bind(null,t),op(t,`link`,n),Nt(t),e.head.appendChild(t);r.preload=t,t.addEventListener(`load`,function(){return r.loading|=1}),t.addEventListener(`error`,function(){return r.loading|=2})}function Vm(e){return`[src="`+en(e)+`"]`}function Hm(e){return`script[async]`+e}function Um(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+en(n.href)+`"]`);if(r)return t.instance=r,Nt(r),r;var a=T({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),Nt(r),op(r,`style`,a),Wm(r,n.precedence,e),t.instance=r;case`stylesheet`:a=Lm(n.href);var o=e.querySelector(Rm(a));if(o)return t.state.loading|=4,t.instance=o,Nt(o),o;r=zm(n),(a=xm.get(a))&&Gm(r,a),o=(e.ownerDocument||e).createElement(`link`),Nt(o);var s=o;return s._p=new Promise(function(e,t){s.onload=e,s.onerror=t}),op(o,`link`,r),t.state.loading|=4,Wm(o,n.precedence,e),t.instance=o;case`script`:return o=Vm(n.src),(a=e.querySelector(Hm(o)))?(t.instance=a,Nt(a),a):(r=n,(a=xm.get(o))&&(r=T({},n),Km(r,a)),e=e.ownerDocument||e,a=e.createElement(`script`),Nt(a),op(a,`link`,r),e.head.appendChild(a),t.instance=a);case`void`:return null;default:throw Error(i(443,t.type))}else t.type===`stylesheet`&&!(t.state.loading&4)&&(r=t.instance,t.state.loading|=4,Wm(r,n.precedence,e));return t.instance}function Wm(e,t,n){for(var r=n.querySelectorAll(`link[rel="stylesheet"][data-precedence],style[data-precedence]`),i=r.length?r[r.length-1]:null,a=i,o=0;o<r.length;o++){var s=r[o];if(s.dataset.precedence===t)a=s;else if(a!==i)break}a?a.parentNode.insertBefore(e,a.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Gm(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Km(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}var qm=null;function Jm(e,t,n){if(qm===null){var r=new Map,i=qm=new Map;i.set(n,r)}else i=qm,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var a=n[i];if(!(a[Et]||a[yt]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==`http://www.w3.org/2000/svg`){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Ym(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function Xm(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``)break;return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError)break;switch(t.rel){case`stylesheet`:return e=t.disabled,typeof t.precedence==`string`&&e==null;default:return!0}case`script`:if(t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`&&!t.onLoad&&!t.onError&&t.src&&typeof t.src==`string`)return!0}return!1}function Zm(e,t){return e===`img`&&t.src!=null&&t.src!==``&&t.onLoad==null&&t.loading!==`lazy`}function Qm(e){return!(e.type===`stylesheet`&&!(e.state.loading&3))}function $m(e){return(e.width||100)*(e.height||100)*(typeof devicePixelRatio==`number`?devicePixelRatio:1)*.25}function eh(e,t){typeof t.decode==`function`&&(e.imgCount++,t.complete||(e.imgBytes+=$m(t),e.suspenseyImages.push(t)),e=oh.bind(e),t.decode().then(e,e))}function th(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&!(n.state.loading&4)){if(n.instance===null){var i=Lm(r.href),a=t.querySelector(Rm(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=ah.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=a,Nt(a);return}a=t.ownerDocument||t,r=zm(r),(i=xm.get(i))&&Gm(r,i),a=a.createElement(`link`),Nt(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),op(a,`link`,r),n.instance=a}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&!(n.state.loading&3)&&(e.count++,n=ah.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}var nh=0;function rh(e,t){return e.stylesheets&&e.count===0&&ch(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},6e4+t);0<e.imgBytes&&nh===0&&(nh=62500*up());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&ch(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>nh?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function ih(e){if(e.count===0&&(e.imgCount===0||!e.waitingForImages)){if(e.stylesheets)ch(e,e.stylesheets);else if(e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}}}function ah(){this.count--,ih(this)}function oh(){this.imgCount--,ih(this)}var sh=null;function ch(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,sh=new Map,t.forEach(lh,e),sh=null,ah.call(e))}function lh(e,t){if(!(t.state.loading&4)){var n=sh.get(e);if(n)var r=n.get(null);else{n=new Map,sh.set(e,n);for(var i=e.querySelectorAll(`link[data-precedence],style[data-precedence]`),a=0;a<i.length;a++){var o=i[a];(o.nodeName===`LINK`||o.getAttribute(`media`)!==`not all`)&&(n.set(o.dataset.precedence,o),r=o)}r&&n.set(null,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(null,i),n.set(o,i),this.count++,r=ah.bind(this),i.addEventListener(`load`,r),i.addEventListener(`error`,r),a?a.parentNode.insertBefore(i,a.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var uh={$$typeof:M,Provider:null,Consumer:null,_currentValue:ge,_currentValue2:ge,_threadCount:0};function dh(e,t,n,r,i,a,o,s,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=lt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lt(0),this.hiddenUpdates=lt(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.transitionTypes=null,this.incompleteTransitions=new Map}function fh(e,t,n,r,i,a,o,s,c,l,u,d){return e=new dh(e,t,n,o,c,l,u,d,s),t=1,!0===a&&(t|=24),a=ki(3,null,null,t),e.current=a,a.stateNode=e,t=ka(),t.refCount++,e.pooledCache=t,t.refCount++,a.memoizedState={element:r,isDehydrated:n,cache:t},uo(a),e}function ph(e){return e?(e=Di,e):Di}function mh(e,t,n,r,i,a){i=ph(i),r.context===null?r.context=i:r.pendingContext=i,r=po(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(r.callback=a),n=mo(e,r,t),n!==null&&(Ld(n,e,t),ho(n,e,t))}function hh(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function gh(e,t){hh(e,t),(e=e.alternate)&&hh(e,t)}function _h(e){if(e.tag===13||e.tag===31){var t=wi(e,67108864);t!==null&&Ld(t,e,67108864),gh(e,67108864)}}function vh(e){if(e.tag===13||e.tag===31){var t=Pd();t=mt(t);var n=wi(e,t);n!==null&&Ld(n,e,t),gh(e,t)}}var yh=!0;function bh(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=2,Sh(e,t,n,r)}finally{F.p=a,P.T=i}}function xh(e,t,n,r){var i=P.T;P.T=null;var a=F.p;try{F.p=8,Sh(e,t,n,r)}finally{F.p=a,P.T=i}}function Sh(e,t,n,r){if(yh){var i=Ch(r);if(i===null)Yf(e,t,r,wh,n),Fh(e,r);else if(Lh(i,e,t,n,r))r.stopPropagation();else if(Fh(e,r),t&4&&-1<Ph.indexOf(e)){for(;i!==null;){var a=At(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=rt(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-Xe(o);s.entanglements[1]|=c,o&=~c}Of(a),!(Qu&6)&&(yd=B()+500,kf(0,!1))}}break;case 31:case 13:s=wi(a,2),s!==null&&Ld(s,a,2),Hd(),gh(a,2)}if(a=Ch(r),a===null&&Yf(e,t,r,wh,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else Yf(e,t,r,null,n)}}function Ch(e){return e=vn(e),Th(e)}var wh=null;function Th(e){if(wh=null,e=kt(e),e!==null){var t=o(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=s(t),e!==null)return e;e=null}else if(n===31){if(e=l(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return wh=e,null}function Eh(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`fullscreenerror`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return 2;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`resize`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return 8;case`message`:switch(ze()){case Be:return 2;case Ve:return 8;case He:case Ue:return 32;case We:return 268435456;default:return 32}default:return 32}}var Dh=!1,Oh=null,kh=null,Ah=null,jh=new Map,Mh=new Map,Nh=[],Ph=`mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset`.split(` `);function Fh(e,t){switch(e){case`focusin`:case`focusout`:Oh=null;break;case`dragenter`:case`dragleave`:kh=null;break;case`mouseover`:case`mouseout`:Ah=null;break;case`pointerover`:case`pointerout`:jh.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:Mh.delete(t.pointerId)}}function Ih(e,t,n,r,i,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},t!==null&&(t=At(t),t!==null&&_h(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function Lh(e,t,n,r,i){switch(t){case`focusin`:return Oh=Ih(Oh,e,t,n,r,i),!0;case`dragenter`:return kh=Ih(kh,e,t,n,r,i),!0;case`mouseover`:return Ah=Ih(Ah,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return jh.set(a,Ih(jh.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,Mh.set(a,Ih(Mh.get(a)||null,e,t,n,r,i)),!0}return!1}function Rh(e){var t=kt(e.target);if(t!==null){var n=o(t);if(n!==null){if(t=n.tag,t===13){if(t=s(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vh(n)});return}}else if(t===31){if(t=l(n),t!==null){e.blockedOn=t,_t(e.priority,function(){vh(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function zh(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ch(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);_n=r,n.target.dispatchEvent(r),_n=null}else return t=At(n),t!==null&&_h(t),e.blockedOn=n,!1;t.shift()}return!0}function Bh(e,t,n){zh(e)&&n.delete(t)}function Vh(){Dh=!1,Oh!==null&&zh(Oh)&&(Oh=null),kh!==null&&zh(kh)&&(kh=null),Ah!==null&&zh(Ah)&&(Ah=null),jh.forEach(Bh),Mh.forEach(Bh)}function Hh(e,n){e.blockedOn===n&&(e.blockedOn=null,Dh||(Dh=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Vh)))}var Uh=null;function Wh(e){Uh!==e&&(Uh=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Uh===e&&(Uh=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!=`function`){if(Th(r||n)===null)continue;break}var a=At(n);a!==null&&(e.splice(t,3),t-=3,Qs(a,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Gh(e){function t(t){return Hh(t,e)}Oh!==null&&Hh(Oh,e),kh!==null&&Hh(kh,e),Ah!==null&&Hh(Ah,e),jh.forEach(t),Mh.forEach(t);for(var n=0;n<Nh.length;n++){var r=Nh[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<Nh.length&&(n=Nh[0],n.blockedOn===null);)Rh(n),n.blockedOn===null&&Nh.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],a=n[r+1],o=i[bt]||null;if(typeof a==`function`)o||Wh(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[bt]||null)s=o.formAction;else if(Th(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),Wh(n)}}}function Kh(){function e(e){e.canIntercept&&e.info===`react-transition`&&e.intercept({handler:function(){return new Promise(function(e){return i=e})},focusReset:`manual`,scroll:`manual`})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var e=navigation.currentEntry;e&&e.url!=null&&navigation.navigate(e.url,{state:e.getState(),info:`react-transition`,history:`replace`})}}if(typeof navigation==`object`){var r=!1,i=null;return navigation.addEventListener(`navigate`,e),navigation.addEventListener(`navigatesuccess`,t),navigation.addEventListener(`navigateerror`,t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener(`navigate`,e),navigation.removeEventListener(`navigatesuccess`,t),navigation.removeEventListener(`navigateerror`,t),i!==null&&(i(),i=null)}}}function qh(e){this._internalRoot=e}Jh.prototype.render=qh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(i(409));var n=t.current;mh(n,Pd(),e,t,null,null)},Jh.prototype.unmount=qh.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;mh(e.current,2,null,e,null,null),Hd(),t[xt]=null}};function Jh(e){this._internalRoot=e}Jh.prototype.unstable_scheduleHydration=function(e){if(e){var t=gt();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Nh.length&&t!==0&&t<Nh[n].priority;n++);Nh.splice(n,0,e),n===0&&Rh(e)}};var Yh=n.version;if(Yh!==`19.3.1`)throw Error(i(527,Yh,`19.3.1`));F.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(i(188)):(e=Object.keys(e).join(`,`),Error(i(268,e)));return e=d(t),e=e===null?null:f(e),e=e===null?null:e.stateNode,e};var Xh={bundleType:0,version:`19.3.1`,rendererPackageName:`react-dom`,currentDispatcherRef:P,reconcilerVersion:`19.3.1`};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`){var Zh=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zh.isDisabled&&Zh.supportsFiber)try{qe=Zh.inject(Xh),Je=Zh}catch{}}e.createRoot=function(e,t){if(!a(e))throw Error(i(299));var n=!1,r=``,o=xc,s=Sc,c=Cc;return t!=null&&(!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(c=t.onRecoverableError)),t=fh(e,1,!1,null,null,n,r,null,o,s,c,Kh),e[xt]=t.current,qf(e),new qh(t)}})),_e=t(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=ge()})),L=e(c(),1),ve=_e(),ye=new Map;function be(e){ye=new Map(e.filter(e=>e.label).map(e=>[e.name,e.label]))}var xe=e=>ye.get(e)??e,Se=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Ce(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:Se(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var we=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Te=e=>{let t=we(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ee=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),De={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Oe(e){return e!=null}function R(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??De.width,a=e.size??e.height??De.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ee(...c):Ee(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??De[`stroke-width`])*Number(e.size??e.width??De.width)/Number(t.size??t.width??De.width):t.strokeWidth??De[`stroke-width`];return[`svg`,{...Object.entries(De).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Oe(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Oe(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Oe(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function ke(e,t={}){return R(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Ae=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},je=(0,L.createContext)({}),Me=()=>(0,L.useContext)(je),Ne=(0,L.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Me()??{},y=!!c||Ae(d),[b,x,S=[]]=ke(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Ee(v,s),hasA11yProp:y,attributes:d});return(0,L.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,L.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function z(e,t=[],n=[]){let r=typeof e==`string`?Ce(e,t,n):e,i=(0,L.forwardRef)(({className:e,...t},n)=>(0,L.createElement)(Ne,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Te(r.name)),i}var Pe={name:`archive`,size:24,node:[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]};Pe.node;var Fe=z(Pe),Ie={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]};Ie.node;var Le=z(Ie),Re={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};Re.node;var B=z(Re),ze={name:`bell-off`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742`,key:`178tsu`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05`,key:`1hqiys`}]]};ze.node;var Be=z(ze),Ve={name:`bell-plus`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M15 8h6`,key:`8ybuxh`}],[`path`,{d:`M18 5v6`,key:`g5ayrv`}],[`path`,{d:`M20.002 14.464a9 9 0 0 0 .738.863A1 1 0 0 1 20 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 8.75-5.332`,key:`1abcvy`}]]};Ve.node;var He=z(Ve),Ue={name:`bell`,size:24,node:[[`path`,{d:`M10.268 21a2 2 0 0 0 3.464 0`,key:`vwvbt9`}],[`path`,{d:`M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326`,key:`11g9vi`}]]};Ue.node;var We=z(Ue),Ge={name:`between-horizontal-end`,size:24,node:[[`rect`,{width:`13`,height:`7`,x:`3`,y:`3`,rx:`1`,key:`11xb64`}],[`path`,{d:`m22 15-3-3 3-3`,key:`26chmm`}],[`rect`,{width:`13`,height:`7`,x:`3`,y:`14`,rx:`1`,key:`k6ky7n`}]],aliases:[`between-horizonal-end`]};Ge.node;var Ke=z(Ge),qe={name:`between-vertical-end`,size:24,node:[[`rect`,{width:`7`,height:`13`,x:`3`,y:`3`,rx:`1`,key:`1fdu0f`}],[`path`,{d:`m9 22 3-3 3 3`,key:`17z65a`}],[`rect`,{width:`7`,height:`13`,x:`14`,y:`3`,rx:`1`,key:`1squn4`}]]};qe.node;var Je=z(qe),Ye={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};Ye.node;var Xe=z(Ye),Ze={name:`building-complex`,size:24,node:[[`path`,{d:`M10 12h4`,key:`a56b0p`}],[`path`,{d:`M10 8h4`,key:`1sr2af`}],[`path`,{d:`M14 21v-3a2 2 0 0 0-4 0v3`,key:`1rgiei`}],[`path`,{d:`M6 10H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2`,key:`secmi2`}],[`path`,{d:`M6 21V5a2 2 0 0 1 2-2h8a2 2 0 0 1 2 2v16`,key:`16ra0t`}]],aliases:[`building-2`]};Ze.node;var Qe=z(Ze),$e={name:`cake`,size:24,node:[[`path`,{d:`M20 21v-8a2 2 0 0 0-2-2H6a2 2 0 0 0-2 2v8`,key:`1w3rig`}],[`path`,{d:`M4 16s.5-1 2-1 2.5 2 4 2 2.5-2 4-2 2.5 2 4 2 2-1 2-1`,key:`n2jgmb`}],[`path`,{d:`M2 21h20`,key:`1nyx9w`}],[`path`,{d:`M7 8v3`,key:`1qtyvj`}],[`path`,{d:`M12 8v3`,key:`hwp4zt`}],[`path`,{d:`M17 8v3`,key:`1i6e5u`}],[`path`,{d:`M7 4h.01`,key:`1bh4kh`}],[`path`,{d:`M12 4h.01`,key:`1ujb9j`}],[`path`,{d:`M17 4h.01`,key:`1upcoc`}]]};$e.node;var et=z($e),tt={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};tt.node;var nt=z(tt),rt={name:`calendar-days`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 13h.01`,key:`1sbv64`}],[`path`,{d:`M12 13h.01`,key:`y0uutt`}],[`path`,{d:`M16 13h.01`,key:`wip0gl`}],[`path`,{d:`M8 17h.01`,key:`p3bg7i`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M16 17h.01`,key:`ql8jdd`}]]};rt.node;var it=z(rt),at={name:`calendar-plus`,size:24,node:[[`path`,{d:`M16 18h6`,key:`987eiv`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M19 15v6`,key:`10aioa`}],[`path`,{d:`M21 11.5V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h8.3`,key:`jgwkxf`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}]]};at.node;var ot=z(at),st={name:`calendar-x-2`,size:24,node:[[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`m17 16 5 5`,key:`1a37d9`}],[`path`,{d:`m17 21 5-5`,key:`1b797a`}],[`path`,{d:`M21 12V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h8`,key:`14ws7l`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}]]};st.node;var ct=z(st),lt={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};lt.node;var V=z(lt),ut={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};ut.node;var dt=z(ut),ft={name:`chevron-left`,size:24,node:[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]};ft.node;var pt=z(ft),mt={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]};mt.node;var ht=z(mt),gt={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};gt.node;var _t=z(gt),vt={name:`circle-exclamation-point`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`,`circle-alert`]};vt.node;var yt=z(vt),bt={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`help-circle`,`circle-help`]};bt.node;var xt=z(bt),St={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};St.node;var Ct=z(St),wt={name:`cloud-drizzle`,size:24,node:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M8 19v1`,key:`1dk2by`}],[`path`,{d:`M8 14v1`,key:`84yxot`}],[`path`,{d:`M16 19v1`,key:`v220m7`}],[`path`,{d:`M16 14v1`,key:`g12gj6`}],[`path`,{d:`M12 21v1`,key:`q8vafk`}],[`path`,{d:`M12 16v1`,key:`1mx6rx`}]]};wt.node;var Tt=z(wt),Et={name:`cloud-fog`,size:24,node:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 17H7`,key:`pygtm1`}],[`path`,{d:`M17 21H9`,key:`1u2q02`}]]};Et.node;var Dt=z(Et),Ot={name:`cloud-lightning`,size:24,node:[[`path`,{d:`M6 16.326A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 .5 8.973`,key:`1cez44`}],[`path`,{d:`m13 12-3 5h4l-3 5`,key:`1t22er`}]]};Ot.node;var kt=z(Ot),At={name:`cloud-moon`,size:24,node:[[`path`,{d:`M13 16a3 3 0 0 1 0 6H7a5 5 0 1 1 4.9-6z`,key:`ie2ih4`}],[`path`,{d:`M18.376 14.512a6 6 0 0 0 3.461-4.127c.148-.625-.659-.97-1.248-.714a4 4 0 0 1-5.259-5.26c.255-.589-.09-1.395-.716-1.248a6 6 0 0 0-4.594 5.36`,key:`zwnc1e`}]]};At.node;var jt=z(At),Mt={name:`cloud-rain`,size:24,node:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M16 14v6`,key:`1j4efv`}],[`path`,{d:`M8 14v6`,key:`17c4r9`}],[`path`,{d:`M12 16v6`,key:`c8a4gj`}]]};Mt.node;var Nt=z(Mt),Pt={name:`cloud-snow`,size:24,node:[[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`M8 15h.01`,key:`a7atzg`}],[`path`,{d:`M8 19h.01`,key:`puxtts`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}],[`path`,{d:`M12 21h.01`,key:`h35vbk`}],[`path`,{d:`M16 15h.01`,key:`rnfrdf`}],[`path`,{d:`M16 19h.01`,key:`1vcnzz`}]]};Pt.node;var Ft=z(Pt),It={name:`cloud-sun`,size:24,node:[[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}],[`path`,{d:`M15.947 12.65a4 4 0 0 0-5.925-4.128`,key:`dpwdj0`}],[`path`,{d:`M13 22H7a5 5 0 1 1 4.9-6H13a3 3 0 0 1 0 6Z`,key:`s09mg5`}]]};It.node;var Lt=z(It),Rt={name:`cloud`,size:24,node:[[`path`,{d:`M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z`,key:`p7xjir`}]]};Rt.node;var zt=z(Rt),Bt={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};Bt.node;var Vt=z(Bt),Ht={name:`copy`,size:24,node:[[`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`}]]};Ht.node;var Ut=z(Ht),Wt={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]};Wt.node;var Gt=z(Wt),Kt={name:`droplets`,size:24,node:[[`path`,{d:`M7 16.3c2.2 0 4-1.83 4-4.05 0-1.16-.57-2.26-1.71-3.19S7.29 6.75 7 5.3c-.29 1.45-1.14 2.84-2.29 3.76S3 11.1 3 12.25c0 2.22 1.8 4.05 4 4.05z`,key:`1ptgy4`}],[`path`,{d:`M12.56 6.6A10.97 10.97 0 0 0 14 3.02c.5 2.5 2 4.9 4 6.5s3 3.5 3 5.5a6.98 6.98 0 0 1-11.91 4.97`,key:`1sl1rz`}]]};Kt.node;var qt=z(Kt),Jt={name:`eighth-notes`,size:24,node:[[`path`,{d:`M21 16V3a1 1 0 0 0-1.28-.96l-10 2.917a1 1 0 0 0-.72.96V19`,key:`uy6ho8`}],[`circle`,{cx:`18`,cy:`16`,r:`3`,key:`1hluhg`}],[`circle`,{cx:`6`,cy:`19`,r:`3`,key:`1kj8tv`}]],aliases:[`music`]};Jt.node;var Yt=z(Jt),Xt={name:`ellipsis`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`19`,cy:`12`,r:`1`,key:`1wjl8i`}],[`circle`,{cx:`5`,cy:`12`,r:`1`,key:`1pcz8c`}]],aliases:[`more-horizontal`]};Xt.node;var Zt=z(Xt),Qt={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};Qt.node;var $t=z(Qt),en={name:`file-archive`,size:24,node:[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]};en.node;var tn=z(en),nn={name:`file-spreadsheet`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]};nn.node;var rn=z(nn),an={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M10 9H8`,key:`b1mrlr`}],[`path`,{d:`M16 13H8`,key:`t4e002`}],[`path`,{d:`M16 17H8`,key:`z1uh3a`}]]};an.node;var on=z(an),sn={name:`file`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}]]};sn.node;var cn=z(sn),ln={name:`film`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M7 3v18`,key:`bbkbws`}],[`path`,{d:`M3 7.5h4`,key:`zfgn84`}],[`path`,{d:`M3 12h18`,key:`1i2n21`}],[`path`,{d:`M3 16.5h4`,key:`1230mu`}],[`path`,{d:`M17 3v18`,key:`in4fa5`}],[`path`,{d:`M17 7.5h4`,key:`myr1c1`}],[`path`,{d:`M17 16.5h4`,key:`go4c1d`}]]};ln.node;var un=z(ln),dn={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};dn.node;var fn=z(dn),pn={name:`folder-open`,size:24,node:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]};pn.node;var mn=z(pn),hn={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]};hn.node;var gn=z(hn),_n={name:`forward`,size:24,node:[[`path`,{d:`m15 17 5-5-5-5`,key:`nf172w`}],[`path`,{d:`M4 18v-2a4 4 0 0 1 4-4h12`,key:`jmiej9`}]]};_n.node;var vn=z(_n),yn={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]};yn.node;var bn=z(yn),xn={name:`house`,size:24,node:[[`path`,{d:`M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8`,key:`5wwlr5`}],[`path`,{d:`M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z`,key:`r6nss1`}]],aliases:[`home`]};xn.node;var Sn=z(xn),Cn={name:`image-off`,size:24,node:[[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`,key:`a6p6uj`}],[`path`,{d:`M10.41 10.41a2 2 0 1 1-2.83-2.83`,key:`1bzlo9`}],[`line`,{x1:`13.5`,x2:`6`,y1:`13.5`,y2:`21`,key:`1q0aeu`}],[`line`,{x1:`18`,x2:`21`,y1:`12`,y2:`15`,key:`5mozeu`}],[`path`,{d:`M3.59 3.59A1.99 1.99 0 0 0 3 5v14a2 2 0 0 0 2 2h14c.55 0 1.052-.22 1.41-.59`,key:`mmje98`}],[`path`,{d:`M21 15V5a2 2 0 0 0-2-2H9`,key:`43el77`}]]};Cn.node;var wn=z(Cn),Tn={name:`image-plus`,size:24,node:[[`path`,{d:`M16 5h6`,key:`1vod17`}],[`path`,{d:`M19 2v6`,key:`4bpg5p`}],[`path`,{d:`M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5`,key:`1ue2ih`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};Tn.node;var En=z(Tn),Dn={name:`image-up`,size:24,node:[[`path`,{d:`M10.3 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v10l-3.1-3.1a2 2 0 0 0-2.814.014L6 21`,key:`9csbqa`}],[`path`,{d:`m14 19.5 3-3 3 3`,key:`9vmjn0`}],[`path`,{d:`M17 22v-5.5`,key:`1aa6fl`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}]]};Dn.node;var On=z(Dn),kn={name:`image`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}],[`circle`,{cx:`9`,cy:`9`,r:`2`,key:`af1f0g`}],[`path`,{d:`m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21`,key:`1xmnt7`}]]};kn.node;var An=z(kn),jn={name:`inbox`,size:24,node:[[`polyline`,{points:`22 12 16 12 14 15 10 15 8 12 2 12`,key:`o97t9d`}],[`path`,{d:`M5.45 5.11 2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z`,key:`oot6mr`}]]};jn.node;var Mn=z(jn),Nn={name:`italic`,size:24,node:[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`,key:`15jd3p`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`,key:`bu0au3`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`,key:`uljnxc`}]]};Nn.node;var Pn=z(Nn),Fn={name:`key-round`,size:24,node:[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]};Fn.node;var In=z(Fn),Ln={name:`layers`,size:24,node:[[`path`,{d:`M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z`,key:`zw3jo`}],[`path`,{d:`M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12`,key:`1wduqc`}],[`path`,{d:`M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17`,key:`kqbvx6`}]],aliases:[`layers-3`]};Ln.node;var Rn=z(Ln),zn={name:`letter-b`,size:24,node:[[`path`,{d:`M6 12h9a4 4 0 010 8H7a1 1 0 01-1-1V5a1 1 0 011-1h7a4 4 0 010 8`,key:`n8tvfh`}]],aliases:[`bold`]};zn.node;var Bn=z(zn),Vn={name:`letter-h`,size:24,node:[[`path`,{d:`M18 20V4`,key:`o2hl4u`}],[`path`,{d:`M6 12H18`,key:`1fx1vx`}],[`path`,{d:`M6 20V4`,key:`1w1bmo`}]],aliases:[`heading`]};Vn.node;var Hn=z(Vn),Un={name:`link`,size:24,node:[[`path`,{d:`M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71`,key:`1cjeqo`}],[`path`,{d:`M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71`,key:`19qd67`}]]};Un.node;var Wn=z(Un),Gn={name:`list-ordered`,size:24,node:[[`path`,{d:`M11 5h10`,key:`1cz7ny`}],[`path`,{d:`M11 12h10`,key:`1438ji`}],[`path`,{d:`M11 19h10`,key:`11t30w`}],[`path`,{d:`M4 4h1v5`,key:`10yrso`}],[`path`,{d:`M4 9h2`,key:`r1h2o0`}],[`path`,{d:`M6.5 20H3.4c0-1 2.6-1.925 2.6-3.5a1.5 1.5 0 0 0-2.6-1.02`,key:`xtkcd5`}]]};Gn.node;var Kn=z(Gn),qn={name:`list-todo`,size:24,node:[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`rect`,{x:`3`,y:`4`,width:`6`,height:`6`,rx:`1`,key:`cif1o7`}]]};qn.node;var Jn=z(qn),Yn={name:`list`,size:24,node:[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]};Yn.node;var Xn=z(Yn),Zn={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Zn.node;var H=z(Zn),Qn={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`,key:`1w4ew1`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`,key:`fwvmzm`}]]};Qn.node;var $n=z(Qn),er={name:`mail-check`,size:24,node:[[`path`,{d:`M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8`,key:`12jkf8`}],[`path`,{d:`m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7`,key:`1ocrg3`}],[`path`,{d:`m16 19 2 2 4-4`,key:`1b14m6`}]]};er.node;var tr=z(er),nr={name:`mail-open`,size:24,node:[[`path`,{d:`M21.2 8.4c.5.38.8.97.8 1.6v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V10a2 2 0 0 1 .8-1.6l8-6a2 2 0 0 1 2.4 0l8 6Z`,key:`1jhwl8`}],[`path`,{d:`m22 10-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 10`,key:`1qfld7`}]]};nr.node;var rr=z(nr),ir={name:`mail`,size:24,node:[[`path`,{d:`m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7`,key:`132q7q`}],[`rect`,{x:`2`,y:`4`,width:`20`,height:`16`,rx:`2`,key:`izxlao`}]]};ir.node;var ar=z(ir),or={name:`map-pin`,size:24,node:[[`path`,{d:`M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0`,key:`1r0f0z`}],[`circle`,{cx:`12`,cy:`10`,r:`3`,key:`ilqhr7`}]]};or.node;var sr=z(or),cr={name:`maximize-2`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]};cr.node;var lr=z(cr),ur={name:`message-square`,size:24,node:[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]};ur.node;var dr=z(ur),fr={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};fr.node;var pr=z(fr),mr={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]};mr.node;var hr=z(mr),gr={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`,key:`re6nr2`}],[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`,key:`pqwjuv`}]]};gr.node;var _r=z(gr),vr={name:`notebook-text`,size:24,node:[[`path`,{d:`M2 6h4`,key:`aawbzj`}],[`path`,{d:`M2 10h4`,key:`l0bgd4`}],[`path`,{d:`M2 14h4`,key:`1gsvsf`}],[`path`,{d:`M2 18h4`,key:`1bu2t1`}],[`rect`,{width:`16`,height:`20`,x:`4`,y:`2`,rx:`2`,key:`1nb95v`}],[`path`,{d:`M9.5 8h5`,key:`11mslq`}],[`path`,{d:`M9.5 12H16`,key:`ktog6x`}],[`path`,{d:`M9.5 16H14`,key:`p1seyn`}]]};vr.node;var yr=z(vr),br={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]};br.node;var xr=z(br),Sr={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`,key:`1miecu`}]]};Sr.node;var Cr=z(Sr),wr={name:`pen-line`,size:24,node:[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]],aliases:[`edit-3`]};wr.node;var Tr=z(wr),Er={name:`pencil`,size:24,node:[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]};Er.node;var Dr=z(Er),Or={name:`phone`,size:24,node:[[`path`,{d:`M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384`,key:`9njp5v`}]]};Or.node;var kr=z(Or),Ar={name:`pin-off`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]};Ar.node;var jr=z(Ar),Mr={name:`pin`,size:24,node:[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]};Mr.node;var Nr=z(Mr),Pr={name:`play`,size:24,node:[[`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`}]]};Pr.node;var Fr=z(Pr),Ir={name:`plus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]};Ir.node;var Lr=z(Ir),Rr={name:`presentation`,size:24,node:[[`path`,{d:`M2 3h20`,key:`91anmk`}],[`path`,{d:`M21 3v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V3`,key:`2k9sn8`}],[`path`,{d:`m7 21 5-5 5 5`,key:`bip4we`}]]};Rr.node;var zr=z(Rr),Br={name:`qr-code`,size:24,node:[[`rect`,{width:`5`,height:`5`,x:`3`,y:`3`,rx:`1`,key:`1tu5fj`}],[`rect`,{width:`5`,height:`5`,x:`16`,y:`3`,rx:`1`,key:`1v8r4q`}],[`rect`,{width:`5`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`1x03jg`}],[`path`,{d:`M21 16h-3a2 2 0 0 0-2 2v3`,key:`177gqh`}],[`path`,{d:`M21 21v.01`,key:`ents32`}],[`path`,{d:`M12 7v3a2 2 0 0 1-2 2H7`,key:`8crl2c`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M12 3h.01`,key:`n36tog`}],[`path`,{d:`M12 16v.01`,key:`133mhm`}],[`path`,{d:`M16 12h1`,key:`1slzba`}],[`path`,{d:`M21 12v.01`,key:`1lwtk9`}],[`path`,{d:`M12 21v-1`,key:`1880an`}]]};Br.node;var Vr=z(Br),Hr={name:`quote`,size:24,node:[[`path`,{d:`M16 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`rib7q0`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2 1 1 0 0 1 1 1v1a2 2 0 0 1-2 2 1 1 0 0 0-1 1v2a1 1 0 0 0 1 1 6 6 0 0 0 6-6V5a2 2 0 0 0-2-2z`,key:`1ymkrd`}]]};Hr.node;var Ur=z(Hr),Wr={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]};Wr.node;var Gr=z(Wr),Kr={name:`remove-formatting`,size:24,node:[[`path`,{d:`M4 7V4h16v3`,key:`9msm58`}],[`path`,{d:`M5 20h6`,key:`1h6pxn`}],[`path`,{d:`M13 4 8 20`,key:`kqq6aj`}],[`path`,{d:`m15 15 5 5`,key:`me55sn`}],[`path`,{d:`m20 15-5 5`,key:`11p7ol`}]]};Kr.node;var qr=z(Kr),Jr={name:`repeat`,size:24,node:[[`path`,{d:`m17 2 4 4-4 4`,key:`nntrym`}],[`path`,{d:`M3 11v-1a4 4 0 0 1 4-4h14`,key:`84bu3i`}],[`path`,{d:`m7 22-4-4 4-4`,key:`1wqhfi`}],[`path`,{d:`M21 13v1a4 4 0 0 1-4 4H3`,key:`1rx37r`}]]};Jr.node;var Yr=z(Jr),Xr={name:`reply-all`,size:24,node:[[`path`,{d:`m12 17-5-5 5-5`,key:`1s3y5u`}],[`path`,{d:`M22 18v-2a4 4 0 0 0-4-4H7`,key:`1fcyog`}],[`path`,{d:`m7 17-5-5 5-5`,key:`1ed8i2`}]]};Xr.node;var Zr=z(Xr),Qr={name:`reply`,size:24,node:[[`path`,{d:`M20 18v-2a4 4 0 0 0-4-4H4`,key:`5vmcpk`}],[`path`,{d:`m9 17-5-5 5-5`,key:`nvlc11`}]]};Qr.node;var $r=z(Qr),ei={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};ei.node;var ti=z(ei),ni={name:`send`,size:24,node:[[`path`,{d:`M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z`,key:`1ffxy3`}],[`path`,{d:`m21.854 2.147-10.94 10.939`,key:`12cjpa`}]]};ni.node;var ri=z(ni),ii={name:`settings`,size:24,node:[[`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`}]]};ii.node;var ai=z(ii),oi={name:`shield-ban`,size:24,node:[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m4.243 5.21 14.39 12.472`,key:`1c9a7c`}]]};oi.node;var si=z(oi),ci={name:`signature`,size:24,node:[[`path`,{d:`m21 17-2.156-1.868A.5.5 0 0 0 18 15.5v.5a1 1 0 0 1-1 1h-2a1 1 0 0 1-1-1c0-2.545-3.991-3.97-8.5-4a1 1 0 0 0 0 5c4.153 0 4.745-11.295 5.708-13.5a2.5 2.5 0 1 1 3.31 3.284`,key:`y32ogt`}],[`path`,{d:`M3 21h18`,key:`itz85i`}]]};ci.node;var li=z(ci),ui={name:`sliders-horizontal`,size:24,node:[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]};ui.node;var di=z(ui),fi={name:`smartphone`,size:24,node:[[`rect`,{width:`14`,height:`20`,x:`5`,y:`2`,rx:`2`,ry:`2`,key:`1yt0o3`}],[`path`,{d:`M12 18h.01`,key:`mhygvu`}]]};fi.node;var pi=z(fi),mi={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};mi.node;var hi=z(mi),gi={name:`square-arrow-out-up-right`,size:24,node:[[`path`,{d:`M21 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h6`,key:`y09zxi`}],[`path`,{d:`m21 3-9 9`,key:`mpx6sq`}],[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}]],aliases:[`arrow-up-right-from-square`]};gi.node;var _i=z(gi),vi={name:`square-dashed-mouse-pointer`,size:24,node:[[`path`,{d:`M12.034 12.681a.498.498 0 0 1 .647-.647l9 3.5a.5.5 0 0 1-.033.943l-3.444 1.068a1 1 0 0 0-.66.66l-1.067 3.443a.5.5 0 0 1-.943.033z`,key:`xwnzip`}],[`path`,{d:`M5 3a2 2 0 0 0-2 2`,key:`y57alp`}],[`path`,{d:`M19 3a2 2 0 0 1 2 2`,key:`18rm91`}],[`path`,{d:`M5 21a2 2 0 0 1-2-2`,key:`sbafld`}],[`path`,{d:`M9 3h1`,key:`1yesri`}],[`path`,{d:`M9 21h2`,key:`1qve2z`}],[`path`,{d:`M14 3h1`,key:`1ec4yj`}],[`path`,{d:`M3 9v1`,key:`1r0deq`}],[`path`,{d:`M21 9v2`,key:`p14lih`}],[`path`,{d:`M3 14v1`,key:`vnatye`}]],aliases:[`mouse-pointer-square-dashed`]};vi.node;var yi=z(vi),bi={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`,key:`1m0v6g`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`,key:`ohrbg2`}]],aliases:[`pen-box`,`edit`,`pen-square`]};bi.node;var xi=z(bi),Si={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]};Si.node;var Ci=z(Si),wi={name:`star`,size:24,node:[[`path`,{d:`M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z`,key:`r04s7s`}]]};wi.node;var Ti=z(wi),Ei={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]};Ei.node;var Di=z(Ei),Oi={name:`sunrise`,size:24,node:[[`path`,{d:`M12 2v8`,key:`1q4o3n`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m8 6 4-4 4 4`,key:`ybng9g`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]};Oi.node;var ki=z(Oi),Ai={name:`sunset`,size:24,node:[[`path`,{d:`M12 10V2`,key:`16sf7g`}],[`path`,{d:`m4.93 10.93 1.41 1.41`,key:`2a7f42`}],[`path`,{d:`M2 18h2`,key:`j10viu`}],[`path`,{d:`M20 18h2`,key:`wocana`}],[`path`,{d:`m19.07 10.93-1.41 1.41`,key:`15zs5n`}],[`path`,{d:`M22 22H2`,key:`19qnx5`}],[`path`,{d:`m16 6-4 4-4-4`,key:`6wukr`}],[`path`,{d:`M16 18a4 4 0 0 0-8 0`,key:`1lzouq`}]]};Ai.node;var ji=z(Ai),Mi={name:`table-2`,size:24,node:[[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}]]};Mi.node;var Ni=z(Mi),Pi={name:`text-cursor-input`,size:24,node:[[`path`,{d:`M12 20h-1a2 2 0 0 1-2-2 2 2 0 0 1-2 2H6`,key:`1528k5`}],[`path`,{d:`M13 8h7a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2h-7`,key:`13ksps`}],[`path`,{d:`M5 16H4a2 2 0 0 1-2-2v-4a2 2 0 0 1 2-2h1`,key:`1n9rhb`}],[`path`,{d:`M6 4h1a2 2 0 0 1 2 2 2 2 0 0 1 2-2h1`,key:`1mj8rg`}],[`path`,{d:`M9 6v12`,key:`velyjx`}]]};Pi.node;var Fi=z(Pi),Ii={name:`thermometer`,size:24,node:[[`path`,{d:`M14 4v10.54a4 4 0 1 1-4 0V4a2 2 0 0 1 4 0Z`,key:`17jzev`}]]};Ii.node;var Li=z(Ii),Ri={name:`trash`,size:24,node:[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]],aliases:[`trash-2`]};Ri.node;var zi=z(Ri),Bi={name:`triangle-exclamation-point`,size:24,node:[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`alert-triangle`,`triangle-alert`]};Bi.node;var Vi=z(Bi),Hi={name:`underline`,size:24,node:[[`path`,{d:`M6 4v6a6 6 0 0 0 12 0V4`,key:`9kb039`}],[`line`,{x1:`4`,x2:`20`,y1:`20`,y2:`20`,key:`nun2al`}]]};Hi.node;var Ui=z(Hi),Wi={name:`undo-2`,size:24,node:[[`path`,{d:`M9 14 4 9l5-5`,key:`102s5s`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`,key:`f3b9sd`}]]};Wi.node;var Gi=z(Wi),Ki={name:`user-plus`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]};Ki.node;var qi=z(Ki),Ji={name:`user`,size:24,node:[[`path`,{d:`M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2`,key:`975kel`}],[`circle`,{cx:`12`,cy:`7`,r:`4`,key:`17ys0d`}]]};Ji.node;var Yi=z(Ji),Xi={name:`users`,size:24,node:[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`path`,{d:`M16 3.128a4 4 0 0 1 0 7.744`,key:`16gr8j`}],[`path`,{d:`M22 21v-2a4 4 0 0 0-3-3.87`,key:`kshegd`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}]]};Xi.node;var Zi=z(Xi),Qi={name:`video`,size:24,node:[[`path`,{d:`m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5`,key:`ftymec`}],[`rect`,{x:`2`,y:`6`,width:`14`,height:`12`,rx:`2`,key:`158x01`}]]};Qi.node;var $i=z(Qi),ea={name:`volume-2`,size:24,node:[[`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`}]]};ea.node;var ta=z(ea),na={name:`volume-x`,size:24,node:[[`path`,{d:`M11 4.702a.7.7 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.7.7 0 0 0 11 19.298z`,key:`1p7khw`}],[`path`,{d:`m16.5 14.5 5-5`,key:`cul3yw`}],[`path`,{d:`m16.5 9.5 5 5`,key:`1akey5`}]]};na.node;var ra=z(na),ia={name:`wind`,size:24,node:[[`path`,{d:`M12.8 19.6A2 2 0 1 0 14 16H2`,key:`148xed`}],[`path`,{d:`M17.5 8a2.5 2.5 0 1 1 2 4H2`,key:`1u4tom`}],[`path`,{d:`M9.8 4.4A2 2 0 1 1 11 8H2`,key:`75valh`}]]};ia.node;var aa=z(ia),oa={name:`workflow`,size:24,node:[[`rect`,{width:`8`,height:`8`,x:`3`,y:`3`,rx:`2`,key:`by2w9f`}],[`path`,{d:`M7 11v4a2 2 0 0 0 2 2h4`,key:`xkn7yn`}],[`rect`,{width:`8`,height:`8`,x:`13`,y:`13`,rx:`2`,key:`1cgmvn`}]]};oa.node;var sa=z(oa),ca={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};ca.node;var la=z(ca),ua=class extends Error{state;constructor(e,t){super(e),this.state=t}};async function U(e,...t){let r=await n({op:e,args:t[0]});if(!r)throw Error(`no answer from Sideora on this computer`);if(!r.ok)throw new ua(r.error,r.state);return r.result}var da=864e5,fa=e=>new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime();function pa(e){let t=new Date(e);if(isNaN(t.getTime()))return``;let n=new Date,r=Math.round((fa(n)-fa(t))/da);return r<=0?t.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}):r<7?t.toLocaleDateString([],{weekday:`short`}):t.getFullYear()===n.getFullYear()?t.toLocaleDateString([],{month:`short`,day:`numeric`}):t.toLocaleDateString([],{year:`2-digit`,month:`numeric`,day:`numeric`})}function ma(e){let t=new Date(e);return isNaN(t.getTime())?``:t.toLocaleString([],{weekday:`short`,month:`short`,day:`numeric`,year:t.getFullYear()===new Date().getFullYear()?void 0:`numeric`,hour:`numeric`,minute:`2-digit`})}function ha(e){let t=new Date(e);return isNaN(t.getTime())?``:t.toLocaleString([],{weekday:`short`,month:`short`,day:`numeric`,year:`numeric`,hour:`numeric`,minute:`2-digit`})}function ga(e,t=Date.now()){let n=new Date(e).getTime();if(isNaN(n)||t-n<-6e4)return``;let r=Math.floor((t-n)/6e4);if(r<1)return`just now`;if(r<60)return`${r} min ago`;let i=Math.floor(r/60);if(i<24)return`${i} hour${i===1?``:`s`} ago`;let a=Math.floor(i/24);return a<7?`${a} day${a===1?``:`s`} ago`:``}function _a(e,t=Date.now()){let n=new Date(e);if(isNaN(n.getTime()))return``;let r=new Date(t),i=Math.round((fa(r)-fa(n))/da),a=n.toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}),o=ga(e,t);return i===0?o?`${a} (${o})`:a:o?`${n.toLocaleDateString([],{weekday:`short`})} ${a} (${o})`:n.getFullYear()===r.getFullYear()?n.toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}):n.toLocaleDateString([],{month:`short`,day:`numeric`,year:`numeric`})}function va(e){let t=new Date(e);if(isNaN(t.getTime()))return``;let n=new Date,r=Math.round((fa(n)-fa(t))/da);return r<=0?`Today`:r===1?`Yesterday`:r<7?`This week`:r<14?`Last week`:t.toLocaleDateString([],t.getFullYear()===n.getFullYear()?{month:`long`}:{month:`long`,year:`numeric`})}var ya=e=>e.fromName||e.fromEmail||`Unknown sender`;function ba(e){let t=(e.fromName||``).replace(/\(.*?\)/g,``).trim();return!t||t.includes(`@`)?(e.fromEmail||t||`Unknown`).split(`@`)[0]:t.split(/\s+/)[0]}function xa(e,t=``){let n=e.replace(/\(.*?\)|[^\p{L}\p{N}\s@.]/gu,` `).trim(),r=(n.includes(`@`)?n.split(`@`)[0].split(/[._-]/):n.split(/\s+/)).filter(Boolean);return(r.length>1?r[0][0]+r[r.length-1][0]:(r[0]||t||`?`).slice(0,2)).toUpperCase()}function Sa(e){let t=0;for(let n=0;n<e.length;n++)t=t*31+e.charCodeAt(n)>>>0;return t%360}function Ca(e){return e?e<1024?`${e} B`:e<1048576?`${Math.round(e/1024)} KB`:`${(e/1024/1024).toFixed(1)} MB`:``}var wa=`mw-pictures`,Ta=1,Ea=4e3,Da=null;function Oa(){return Da??=new Promise(e=>{try{let t=indexedDB.open(wa,Ta);t.onupgradeneeded=()=>{t.result.createObjectStore(`rows`),t.result.createObjectStore(`images`)},t.onsuccess=()=>e(t.result),t.onerror=()=>e(null),t.onblocked=()=>e(null)}catch{e(null)}}),Da}var ka=e=>new Promise((t,n)=>{let r=e.getAllKeys(),i=e.getAll();i.onsuccess=()=>t({keys:r.result??[],values:i.result??[]}),i.onerror=()=>n(i.error)});async function Aa(){let e=new Map,t=await Oa();if(!t)return e;try{let n=t.transaction([`rows`,`images`],`readonly`),[r,i]=await Promise.all([ka(n.objectStore(`rows`)),ka(n.objectStore(`images`))]);if(r.keys.length>Ea)return await Ma(),e;let a=new Map(i.keys.map((e,t)=>[String(e),i.values[t]]));r.keys.forEach((t,n)=>{let i=r.values[n],o=i.img?a.get(i.img):null;(!i.img||o)&&e.set(String(t),{pic:o??null,at:i.at})})}catch{}return e}async function ja(e,t,n,r=Date.now()){let i=await Oa();if(i)try{let a=i.transaction([`rows`,`images`],`readwrite`);t&&n&&a.objectStore(`images`).put(n,t),a.objectStore(`rows`).put({img:t&&n?t:null,at:r},e)}catch{}}async function Ma(){let e=await Oa();if(e)try{let t=e.transaction([`rows`,`images`],`readwrite`);t.objectStore(`rows`).clear(),t.objectStore(`images`).clear()}catch{}}var Na=40,Pa=60,Fa=15e3,Ia=6e4,La=3e3,Ra=864e5,za=new Map,Ba=new Set,Va=new Map,Ha=new Set,Ua=new Set,Wa,Ga=!1,Ka=0,qa=new Map,Ja=Aa().then(e=>{qa=e},()=>{});function Ya(e){let t=qa.get(e);return t?($a(e,t.pic),Date.now()-t.at<Ra):!1}var Xa=(e,t)=>`${e.trim().toLowerCase()}\n${t??``}`;function Za(){for(let e of Ua)e()}function Qa(e){return Ua.add(e),()=>{Ua.delete(e)}}function $a(e,t){za.size>=La&&za.delete(za.keys().next().value),za.set(e,t)}function eo(e,t){let n=Xa(e,t);Ga||za.has(n)||Ba.has(n)||(Ba.add(n),Va.set(n,{email:e.trim().toLowerCase(),...t?{id:t}:{}}),Wa||=setTimeout(to,Pa))}async function to(){Wa=void 0,await Ja;let e=!1;for(let[t]of[...Va])qa.has(t)&&(e=!0,Ya(t)&&(Va.delete(t),Ba.delete(t)));e&&Za();let t=[...Va].slice(0,Na);for(let[e]of t)Va.delete(e);if(Va.size&&(Wa=setTimeout(to,Pa)),!t.length)return;let n=Ka;try{let e=await U(`senderPictures`,{items:t.map(([,e])=>e)});if(n!==Ka)return;e.off&&(Ga=!0,Va.clear(),qa=new Map,Ma());let r=new Set(e.pending??[]);for(let[i]of t){if(Ba.delete(i),r.has(i)){Ha.has(i)||(Ha.add(i),setTimeout(()=>{if(n!==Ka)return;let[e,t]=i.split(`
|
|
11
|
+
`);eo(e,t||void 0)},Fa));continue}let t=e.pictures[i],a=t?e.images[t]??null:null;$a(i,a),qa.set(i,{pic:a,at:Date.now()}),ja(i,t,a)}}catch{if(n!==Ka)return;for(let[e]of t)Ba.delete(e),$a(e,null);setTimeout(()=>{for(let[e]of t)za.get(e)===null&&za.delete(e)},Ia)}Za()}function no(e,t,n=!0){let r=n&&e.includes(`@`)?Xa(e,t):``,i=(0,L.useSyncExternalStore)(Qa,()=>r?za.get(r):void 0),a=(0,L.useSyncExternalStore)(Qa,()=>Ka);return(0,L.useEffect)(()=>{r&&!za.has(r)&&eo(e,t)},[r,a]),i??null}function ro(){Ka++,qa=new Map,Ja=Ma(),clearTimeout(Wa),Wa=void 0,za.clear(),Ba.clear(),Va.clear(),Ha.clear(),Ga=!1,Za()}var io=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),W=t(((e,t)=>{t.exports=io()}))();function ao({name:e,email:t=``,size:n=32,picture:r=!1,id:i}){let a=no(t,i,r);if(a)return(0,W.jsxs)(`span`,{className:`avatar pic ${a.fit}`,style:{width:n,height:n},"aria-hidden":`true`,children:[(0,W.jsx)(`img`,{src:a.src,alt:``,width:n,height:n,draggable:!1,decoding:`async`,referrerPolicy:`no-referrer`}),a.verified&&(0,W.jsx)(`span`,{className:`avatar-verified`,title:`Verified logo`,children:(0,W.jsx)(`svg`,{viewBox:`0 0 16 16`,width:`100%`,height:`100%`,children:(0,W.jsx)(`path`,{d:`M4.5 8.2l2.3 2.3 4.7-4.9`,fill:`none`,stroke:`currentColor`,strokeWidth:`2`,strokeLinecap:`round`,strokeLinejoin:`round`})})})]});let o={"--h":Sa((t||e).toLowerCase()),width:n,height:n,fontSize:Math.round(n*.38)};return(0,W.jsx)(`span`,{className:`avatar`,style:o,"aria-hidden":`true`,children:xa(e,t)})}var oo=typeof CSS<`u`&&CSS.supports(`position-area: block-end`);function so({calendars:e,hidden:t,onHidden:n,showAccount:r,tint:i}){let a=(0,L.useId)(),o=(0,L.useRef)(null),s=(0,L.useRef)(null),c=e.map(e=>e.key),l=t.filter(e=>c.includes(e)).length,u=e.length-l;(0,L.useEffect)(()=>{let e=s.current;if(!e||oo)return;let t=t=>{if(t.newState!==`open`||!o.current||matchMedia(`(max-width: 560px)`).matches)return;let n=o.current.getBoundingClientRect(),r=e.offsetWidth;e.style.left=`${Math.max(8,Math.min(n.right-r,innerWidth-r-8))}px`,e.style.top=`${n.bottom+4}px`};return e.addEventListener(`toggle`,t),()=>e.removeEventListener(`toggle`,t)},[]);let d=e=>n(t.includes(e)?t.filter(t=>t!==e):[...t,e]),f=e=>n([...t.filter(e=>!c.includes(e)),...c.filter(t=>t!==e)]),p=()=>n(t.filter(e=>!c.includes(e))),m=[];for(let t of e){let e=m.find(([e])=>e===t.account);e?e[1].push(t):m.push([t.account,[t]])}let h=l?`Calendars: ${u} of ${e.length} shown`:`Which calendars are shown`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{ref:o,type:`button`,className:`btn icon bare cal-pick-btn${l?` some`:``}`,popoverTarget:a,title:h,"aria-label":h,children:[(0,W.jsx)(Rn,{size:15}),l>0&&(0,W.jsxs)(`span`,{className:`cal-pick-n`,"aria-hidden":`true`,children:[u,`/`,e.length]})]}),(0,W.jsxs)(`div`,{ref:s,id:a,popover:`auto`,role:`group`,className:`cal-pop${oo?` anchored`:``}`,"aria-label":`Calendars shown`,children:[(0,W.jsxs)(`div`,{className:`cal-pop-head`,children:[(0,W.jsx)(`span`,{children:`Calendars`}),(0,W.jsx)(`button`,{type:`button`,className:`cal-pop-all`,onClick:p,disabled:!l,children:`Show all`})]}),(0,W.jsx)(`div`,{className:`cal-pop-list`,children:m.map(([n,a])=>(0,W.jsxs)(`div`,{className:`cal-pop-group`,role:`group`,"aria-label":r?xe(n):`Calendars`,children:[r&&(0,W.jsx)(`span`,{className:`cal-pop-h`,children:xe(n)}),a.map(n=>(0,W.jsxs)(`div`,{className:`cal-pop-row${n.failed?` off`:``}`,style:i(n.key,n.isDefault),children:[(0,W.jsxs)(`label`,{title:n.failed?`Could not be read: ${n.failed}`:n.shared?`Shared with you`:void 0,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:!t.includes(n.key),onChange:()=>d(n.key)}),(0,W.jsx)(`span`,{className:`cal-dot`}),(0,W.jsx)(`span`,{className:`cal-pick-name`,children:n.name}),n.failed&&(0,W.jsx)(`span`,{className:`cal-pick-note`,children:`unavailable`})]}),e.length>1&&(0,W.jsx)(`button`,{type:`button`,className:`cal-pop-only`,onClick:()=>f(n.key),title:`Show only ${n.name}`,"aria-label":`Show only ${n.name}`,children:`only`})]},n.key))]},n))})]})]})}function co({onDiscard:e,immediate:t=!1,title:n=`Discard this draft`,confirmLabel:r=`Discard`,keepLabel:i=`Keep`,label:a,className:o=`btn icon bare`,disabled:s}){let[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(null),f=e=>{l(e),requestAnimationFrame(()=>(e?u:d).current?.focus())};return c?(0,W.jsxs)(`span`,{className:`confirm`,role:`group`,"aria-label":`${n}?`,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),f(!1))},onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||l(!1)},children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,onClick:()=>{l(!1),e()},children:r}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,ref:u,onClick:()=>f(!1),children:i})]}):(0,W.jsx)(`button`,{type:`button`,className:o,ref:d,disabled:s,onClick:()=>t?e():f(!0),title:n,"aria-label":a??n,children:(0,W.jsx)(zi,{size:15})})}var lo=null,uo=null,fo={set(e){return lo=e,()=>{lo===e&&(lo=null,uo=null)}},mayLeave(e){return!lo||lo()?!0:(uo=e??null,!1)},takePending(){let e=uo;return uo=null,e}},po=`mw:composers-open`,mo={beat(e){try{let t=JSON.parse(localStorage.getItem(po)||`{}`);t[e]=Date.now(),localStorage.setItem(po,JSON.stringify(t))}catch{}},gone(e){try{let t=JSON.parse(localStorage.getItem(po)||`{}`);delete t[e],localStorage.setItem(po,JSON.stringify(t))}catch{}},isOpen(e){try{let t=JSON.parse(localStorage.getItem(po)||`{}`)[e];return typeof t==`number`&&Date.now()-t<12e3}catch{return!1}}};function ho(e,t){try{let n=localStorage.getItem(e);return n==null?t:JSON.parse(n)}catch{return t}}function go(e,t){try{t==null?localStorage.removeItem(e):localStorage.setItem(e,JSON.stringify(t))}catch{}}var _o=new Set,vo=0,yo=()=>{vo++,_o.forEach(e=>e())},G={key(e,t){return e===`new`?t?`mw:d2:new:${t}`:`mw:d2:new`:t?`mw:d2:${e===`replyAll`?`reply`:e}:${t}`:`mw:d2:new`},get:e=>ho(e,null),set(e,t){let n=G.get(e);go(e,t),n&&n.kind===t.kind&&!!n.sending==!!t.sending&&n.ref?.draftId===t.ref?.draftId||yo()},patch(e,t){let n=G.get(e);n&&G.set(e,{...n,...t})},byRef(){let e=new Map;try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t),r=n?.startsWith(`mw:d2:`)?G.get(n):null;n&&r?.ref?.draftId&&e.set(r.ref.draftId,{key:n,draft:r})}}catch{}return e},sources(){let e=new Set;try{for(let t=0;t<localStorage.length;t++){let n=/^mw:d2:(?:reply|forward):(.+)$/.exec(localStorage.key(t)??``);n&&e.add(n[1])}}catch{}return e},unsavedNew(){let e=[];try{for(let t=0;t<localStorage.length;t++){let n=localStorage.key(t)??``;if(!n.startsWith(`mw:d2:new:`)||mo.isOpen(n))continue;let r=G.get(n);if(!r)continue;let i=Date.now()-(r.editedAt??0)>12e4;r.ref&&!r.dirty||r.savingAt&&Date.now()-r.savingAt<6e4||r.sending&&!i||(r.html.replace(/<[^>]+>| |\s/g,``)||r.subject.trim()||r.to.trim())&&e.push({key:n,slot:n.slice(10),draft:r,at:r.editedAt??0})}}catch{}return e.sort((e,t)=>t.at-e.at)},sourceOf:e=>e.split(`:`).slice(3).join(`:`),remove(e){go(e,null),yo()},subscribe(e){return _o.add(e),()=>{_o.delete(e)}}};function bo(){return(0,L.useSyncExternalStore)(G.subscribe,()=>vo)}var xo={all:()=>ho(`mw:recent`,[]),add(e){let t=Date.now(),n=e.filter(e=>e.email).map(e=>({email:e.email,...e.name?{name:e.name}:{},at:t})),r=new Set(n.map(e=>e.email.toLowerCase()));go(`mw:recent`,[...n,...xo.all().filter(e=>!r.has(e.email.toLowerCase()))].slice(0,200))}},So={folder:()=>ho(`mw:folder`,`inbox`),setFolder:e=>go(`mw:folder`,e),account:()=>ho(`mw:account`,``),setAccount:e=>go(`mw:account`,e||null),calendarView:()=>{let e=ho(`mw:cal:view`,`week`);return e===`day`||e===`month`||e===`year`?e:`week`},setCalendarView:e=>go(`mw:cal:view`,e),calendarList:()=>ho(`mw:cal:list`,null)??ho(`mw:cal:view`,`week`)===`list`,setCalendarList:e=>go(`mw:cal:list`,e),hiddenCalendars:()=>ho(`mw:cal:hidden`,[]),setHiddenCalendars:e=>go(`mw:cal:hidden`,e.length?e:null),imagesFrom:e=>ho(`mw:images`,[]).includes(e.toLowerCase()),allowImagesFrom(e){let t=ho(`mw:images`,[]);e&&!t.includes(e.toLowerCase())&&go(`mw:images`,[...t,e.toLowerCase()].slice(-500))}},Co=/^[^\s@<>,;]+@[^\s@<>,;]+\.[^\s@<>,;]+$/,wo=e=>e.split(/[,;\s]+/).filter(Boolean),To=e=>e.join(`, `);function Eo(e){return e.match(/[^\s<>,;"'()]+@[^\s<>,;"'()]+/g)??wo(e)}var Do=new Map,Oo=e=>Do.get(e.toLowerCase())??xo.all().find(t=>t.email.toLowerCase()===e.toLowerCase())?.name;function ko(e){for(let t of e){let e=t.email?.trim().toLowerCase(),n=t.name?.trim();e&&n&&n.toLowerCase()!==e&&Do.set(e,n)}}function Ao(e,t,n){let r=e.trim().toLowerCase(),i=!0,a=[[],[],[]],o=()=>{if(!i)return;let e=new Set;n(a.flat().filter(t=>{let n=t.email.toLowerCase();return!e.has(n)&&e.add(n)}).slice(0,8))};if(!r)return n([]),()=>{};a[0]=xo.all().filter(e=>e.email.toLowerCase().includes(r)||e.name?.toLowerCase().includes(r)).slice(0,5).map(e=>({name:e.name??``,email:e.email,source:`recent`})),o();let s=(e,n)=>U(`contacts`,{q:r,account:t,directory:e}).then(e=>{i&&(ko(e.people),a[n]=e.people,o())},()=>{});return s(!1,1),r.length>=2&&s(!0,2),()=>{i=!1}}var jo=[],Mo=1,No=new Set,Po=()=>No.forEach(e=>e()),K={show(e){let t={duration:3500,...e,id:Mo++};return jo=[...jo.slice(-2),t],Po(),t.duration>0&&setTimeout(()=>K.dismiss(t.id),t.duration),t.id},dismiss(e){jo.some(t=>t.id===e)&&(jo=jo.filter(t=>t.id!==e),Po())},error:(e,t=``)=>K.show({kind:`error`,duration:7e3,text:t+(e instanceof Error?e.message:String(e))})};function Fo(){return(0,L.useSyncExternalStore)(e=>(No.add(e),()=>No.delete(e)),()=>jo)}var Io=e=>(/<([^<>]+)>\s*$/.exec(e)?.[1]??e).trim(),Lo=e=>e.split(/[,;\n]/).map(e=>e.trim()).filter(Boolean);function Ro({label:e,value:t,onChange:n,account:r,autoFocus:i,placeholder:a,children:o,terms:s=!1,boxed:c=!1,disabled:l=!1,onPending:u}){let d=s?Lo(t):wo(t),f=s?-1:0,[p,m]=(0,L.useState)(``),[h,g]=(0,L.useState)([]),[_,v]=(0,L.useState)(f),[y,b]=(0,L.useState)(!1),x=(0,L.useRef)(null),S=(0,L.useRef)(!1),C=new Set(d.map(e=>e.toLowerCase())),w=y?h.filter(e=>!C.has(e.email.toLowerCase())):[];(0,L.useEffect)(()=>{let e=p.trim();if(!e){g([]);return}let t=()=>{},n=setTimeout(()=>{t=Ao(e,r,e=>{g(e),v(f),S.current=!1})},120);return()=>{clearTimeout(n),t()}},[p,r,f]),(0,L.useEffect)(()=>{u?.(p.trim())},[p,u]);let T=e=>{let t=e.filter(e=>e&&!C.has(e.toLowerCase()));t.length&&n(To([...d,...t.filter((e,n)=>t.findIndex(t=>t.toLowerCase()===e.toLowerCase())===n)])),m(``),b(!1)},E=()=>{p.trim()&&T(s?Lo(p):Eo(p))},D=e=>!s&&!Co.test(e),O=s||Co.test(p.trim()),k=e=>{ko([e]),T([e.email])},A=e=>n(To(d.filter(t=>t!==e)));return(0,W.jsxs)(`div`,{className:`field recips${c?` boxed`:``}${l?` off`:``}`,onMouseDown:e=>{e.target.closest(`button, input, .suggest`)||(e.preventDefault(),x.current?.focus())},children:[!c&&(0,W.jsx)(`span`,{children:e}),(0,W.jsxs)(`div`,{className:`pills`,children:[d.map(e=>(0,W.jsxs)(`span`,{className:`pill${D(e)?` bad`:``}`,title:D(e)?`${e} is not an email address`:e,children:[!s&&!D(e)&&(0,W.jsx)(ao,{name:Oo(e)??Io(e),email:Io(e),size:17,picture:!0}),(0,W.jsx)(`span`,{className:`pill-name`,children:s?e:Oo(e)??e}),!l&&(0,W.jsx)(`button`,{type:`button`,tabIndex:-1,onClick:()=>A(e),"aria-label":`Remove ${e}`,children:(0,W.jsx)(la,{size:12})})]},e)),(0,W.jsx)(`input`,{ref:x,type:`text`,value:p,onChange:e=>{m(e.target.value),b(!0)},onKeyDown:e=>{let t=w[_];if(e.key===`ArrowDown`&&w.length)e.preventDefault(),S.current=!0,v(e=>(e+1)%w.length);else if(e.key===`ArrowUp`&&w.length)e.preventDefault(),S.current=!0,v(e=>e<0?w.length-1:(e-1+w.length)%w.length);else if(e.key===`Enter`){if(e.metaKey||e.ctrlKey)return E();if(s&&!p.trim()&&!S.current)return;e.preventDefault(),t&&(S.current||!O)?k(t):E()}else e.key===`Tab`&&p.trim()?t&&(S.current||!O)?k(t):E():(e.key===`,`||e.key===`;`)&&p.trim()||e.key===` `&&!s&&Co.test(p.trim())?(e.preventDefault(),E()):e.key===`Backspace`&&!p&&d.length?A(d[d.length-1]):e.key===`Escape`&&w.length&&(e.stopPropagation(),b(!1))},onBlur:()=>{E(),b(!1)},onPaste:e=>{let t=e.clipboardData.getData(`text`);(s?/[,;\n]/:/[@,;\n]/).test(t)&&(e.preventDefault(),T(s?Lo(`${p}${t}`):Eo(`${p} ${t}`)))},placeholder:d.length?``:a,autoFocus:i,disabled:l,spellCheck:!1,autoComplete:`off`,role:`combobox`,"aria-label":e,"aria-expanded":w.length>0,"aria-autocomplete":`list`})]}),o,w.length>0&&(0,W.jsx)(`ul`,{className:`suggest`,role:`listbox`,"aria-label":`People for ${e}`,children:w.map((e,t)=>(0,W.jsxs)(`li`,{role:`option`,"aria-selected":t===_,className:t===_?`active`:void 0,onMouseDown:t=>{t.preventDefault(),k(e)},onMouseEnter:()=>v(t),children:[(0,W.jsx)(ao,{name:e.name||e.email,email:e.email,size:24,picture:!0}),(0,W.jsxs)(`span`,{className:`suggest-who`,children:[(0,W.jsx)(`span`,{className:`suggest-name`,children:e.name||e.email}),e.name&&(0,W.jsx)(`span`,{className:`suggest-email`,children:e.email})]})]},e.email))})]})}var zo=`Hold: `;function Bo(e,t){let n={...t},r=[];for(let t of e)t.start<=n.end&&t.end>=n.start?n={start:Math.min(t.start,n.start),end:Math.max(t.end,n.end)}:r.push(t);return[...r,n].sort((e,t)=>e.start-t.start)}var Vo=(e,t)=>e.start===t.start&&e.end===t.end,Ho=e=>e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).replace(/[\u00a0\u2000-\u200b\u202f\u205f\u3000]/g,` `).replace(/[\u2010-\u2015\u2212]/g,`-`).replace(/[^\x20-\x7e]/g,``),Uo=()=>{try{let e=new Intl.DateTimeFormat([],{hour:`numeric`}).resolvedOptions().hourCycle;return e===`h12`||e===`h11`}catch{return!1}};function Wo(e,t=Uo()){let n=new Date(e);return Ho(t?n.toLocaleTimeString(`en-US`,{hour:`numeric`,minute:`2-digit`,hour12:!0}):n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,hourCycle:`h23`}))}function Go(e,t=Uo()){let n=new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`});return t?n.replace(`:00`,``):n}function Ko(e,t=Date.now()){let n=new Date(e),r=n.toLocaleDateString(`en-GB`,{weekday:`short`}),i=n.toLocaleDateString(`en-GB`,{month:`short`}),a=n.getFullYear()===new Date(t).getFullYear()?``:` ${n.getFullYear()}`;return Ho(`${r} ${n.getDate()} ${i}${a}`)}var qo=(e,t)=>{let n=new Date(e),r=new Date(t);return n.getFullYear()===r.getFullYear()&&n.getMonth()===r.getMonth()&&n.getDate()===r.getDate()};function Jo(e,t=Date.now(),n=Uo()){let r=qo(e.start,e.end)?Wo(e.end,n):`${Ko(e.end,t)}, ${Wo(e.end,n)}`;return`${Ko(e.start,t)}, ${Wo(e.start,n)} to ${r}`}function Yo(e=Date.now()){for(let t of[`longGeneric`,`long`])try{let n=new Intl.DateTimeFormat(`en-US`,{timeZoneName:t}).formatToParts(new Date(e)).find(e=>e.type===`timeZoneName`)?.value;if(n)return Ho(n)}catch{}return Ho(Intl.DateTimeFormat().resolvedOptions().timeZone??`local time`)}var Xo=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);function Zo(e,t=Date.now()){let n=[...e].sort((e,t)=>e.start-t.start);return[n.length===1?`Would this time work for you?`:`Would any of these times work for you?`,...n.map(e=>`- ${Jo(e,t)}`),`(Times are ${Yo(n[0]?.start??t)}.)`]}function Qo(e,t=Date.now()){let[n,...r]=Zo(e,t),i=r.pop();return`<p>${Xo(n)}</p><p>${r.map(Xo).join(`<br>`)}</p><p>${Xo(i)}</p><p></p>`}var $o=e=>`${zo}${e.replace(/^\s*((re|fwd?|aw|tr|sv)\s*:\s*)+/i,``).trim()||`proposed time`}`;function es(e,t={}){let n=e.filter(e=>e.writable!==!1&&!e.failed),r=n.filter(e=>!(t.hidden??[]).includes(e.key)),i=(e,t)=>t?e.find(e=>e.account===t&&e.isDefault&&!e.shared):void 0;return(i(n,t.account)??i(r,t.defaultAccount)??r.find(e=>e.isDefault)??n.find(e=>e.isDefault)??n[0])?.key??``}var ts=5e3,ns=e=>String(e).padStart(2,`0`),rs=e=>{let t=new Date(e);return`${t.getFullYear()}-${ns(t.getMonth()+1)}-${ns(t.getDate())}`},is=e=>{let t=new Date(e);return`${ns(t.getHours())}:${ns(t.getMinutes())}`},as=(e,t=`00:00`)=>{let[n,r,i]=e.split(`-`).map(Number),[a,o]=t.split(`:`).map(Number);return new Date(n,r-1,i,a,o).getTime()},ss=(e,t=1)=>{let n=new Date(e);return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t).getTime()},cs=[[null,`None`],[0,`At the start`],[5,`5 minutes before`],[10,`10 minutes before`],[15,`15 minutes before`],[30,`30 minutes before`],[60,`1 hour before`],[1440,`1 day before`]],ls=[[`Busy`,`Busy`],[`Free`,`Free`],[`Tentative`,`Tentative`],[`OOF`,`Out of office`],[`WorkingElsewhere`,`Working elsewhere`]];function us(e,t,n,r,i,a){if(e){let t=new Date(e.start).getTime(),n=new Date(e.end).getTime(),r=e.organizerEmail.toLowerCase();return{subject:e.subject,allDay:e.allDay,startDate:rs(t),startTime:is(t),endDate:rs(e.allDay?ss(n,-1):n),endTime:is(n),location:e.location,attendees:To(e.attendees.filter(e=>e.role===`required`&&e.email&&e.email.toLowerCase()!==r).map(e=>e.email)),reminder:e.reminderMinutes??null,showAs:e.showAs,body:e.body.trim(),calendar:e.calendarKey??``}}let o=Date.now(),s=new Date(o);s.setHours(0,0,0,0);let c=i?.start===void 0?r===void 0?t===s.getTime()?Math.ceil((o+6e4)/18e5)*18e5:t+324e5:r:i.start,l=!!i?.allDay,u=i?.end!==void 0&&i.end>c?i.end:c+(l?864e5:18e5);return{subject:i?.subject??``,allDay:l,startDate:rs(c),startTime:is(c),endDate:rs(l?ss(u,-1):u),endTime:is(u),location:i?.location??``,attendees:i?.attendees??``,reminder:15,showAs:`Busy`,body:i?.body??``,calendar:a||(n.find(e=>e.isDefault)?.key??``)}}var ds=e=>e.allDay?{start:as(e.startDate),end:ss(as(e.endDate))}:{start:as(e.startDate,e.startTime),end:as(e.endDate,e.endTime)};function fs({calendars:e,value:t,onChange:n}){let r=e.filter(e=>e.writable!==!1&&!e.failed),i=e.find(e=>e.key===t);return r.length<2?null:(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Calendar`}),(0,W.jsx)(`select`,{value:t,onChange:e=>n(e.target.value),children:[...new Set(r.map(e=>e.account))].map(e=>(0,W.jsx)(`optgroup`,{label:xe(e),children:r.filter(t=>t.account===e).map(e=>(0,W.jsx)(`option`,{value:e.key,children:e.shared?`${e.name} (shared)`:e.name},e.key))},e))}),i?.shared&&(0,W.jsx)(`small`,{children:`It goes into this shared calendar, not your own: everyone who sees that calendar sees it.`})]})}function ps({event:e,day:t,at:n,prefill:r,calendars:i,calendar:a,slots:o,onSlots:s,onBusy:c,onClose:l}){let u=(0,L.useMemo)(()=>us(e,t,i,n,r,a),[e,t,i,n,r,a]),d=!e&&!!o?.length,[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(u),[g,_]=(0,L.useState)(!1),v=(0,L.useRef)(null),y=e=>h(t=>({...t,...e}));(0,L.useEffect)(()=>()=>v.current?.(),[]),(0,L.useEffect)(()=>{!e&&u.calendar&&h(e=>e.calendar?e:{...e,calendar:u.calendar})},[e,u.calendar]);let b=f!==null;(0,L.useEffect)(()=>{c?.(b)},[b,c]);let x=()=>{b||l(!1)},S=e=>h(t=>{let n={...t,...e},r=ds(t),i=ds(n);if([r.start,r.end,i.start].some(Number.isNaN))return n;let a=i.start+(r.end-r.start);return n.allDay?{...n,endDate:rs(ss(a,-1))}:{...n,endDate:rs(a),endTime:is(a)}}),C=wo(m.attendees),w=C.filter(e=>!Co.test(e)),{start:T,end:E}=ds(m),D=m.subject.trim()?d?w.length?`${w[0]} is not an email address.`:null:Number.isNaN(T)||Number.isNaN(E)?`Set when it starts and ends.`:E<=T?`It ends before it starts.`:w.length?`${w[0]} is not an email address.`:null:`Give it a title.`,O=!!e?.isMeeting,k=C.length>0||O,A=O&&e?.myResponse===`Organizer`,j=()=>{let t={start:new Date(T).toISOString(),end:new Date(E).toISOString(),allDay:m.allDay},n={subject:m.subject.trim(),...t,location:m.location.trim(),attendees:To(C),reminderMinutes:m.reminder,showAs:m.showAs,body:m.body};if(!e)return{...n,calendar:m.calendar||void 0};let r=ds(u),i={id:e.id};return n.subject!==u.subject&&(i.subject=n.subject),(T!==r.start||E!==r.end||m.allDay!==u.allDay)&&Object.assign(i,t),n.location!==u.location.trim()&&(i.location=n.location),n.attendees!==u.attendees&&(i.attendees=n.attendees),m.reminder!==u.reminder&&(i.reminderMinutes=m.reminder),m.showAs!==u.showAs&&(i.showAs=m.showAs),m.body!==u.body&&(i.body=m.body),Object.keys(i).length>1?i:null},ee=async()=>{let e=o??[],t=[],n=[],r=!1;p(0);for(let[i,a]of e.entries()){try{let e=await U(`saveEvent`,{subject:m.subject.trim(),start:new Date(a.start).toISOString(),end:new Date(a.end).toISOString(),allDay:!1,location:m.location.trim(),attendees:To(C),reminderMinutes:m.reminder,showAs:m.showAs,body:m.body,calendar:m.calendar||void 0});r||=e.invitationsSent,n.push(a)}catch(e){t.push({slot:a,error:e instanceof Error?e.message:String(e)})}p(i+1)}C.length&&t.length<e.length&&xo.add(C.map(e=>({email:e}))),_(!1),p(null),s?.({made:n,failed:t,invited:r})},M=()=>{if(D)return K.show({kind:`error`,text:D});if(d){if(_(!0),!k){ee();return}let e=setTimeout(()=>{v.current=null,ee()},ts),t=()=>{clearTimeout(e),v.current=null,K.dismiss(n),_(!1)},n=K.show({text:`Inviting ${C.length===1?C[0]:`${C.length} people`} to ${o.length===1?`an event`:`${o.length} events`}…`,duration:ts,countdown:!0,action:{label:`Undo`,run:t}});v.current=t;return}let t=j();if(!t)return l(!1);let n=async()=>{try{let n=await U(`saveEvent`,t);C.length&&xo.add(C.map(e=>({email:e}))),K.show({kind:`ok`,text:n.invitationsSent?e?`Saved. The people invited are told.`:`Saved. Invitations sent.`:`Saved`}),l(!0)}catch(e){_(!1),K.error(e,`Could not save the event: `)}};if(_(!0),!k){n();return}let r=setTimeout(()=>{v.current=null,n()},ts),i=()=>{clearTimeout(r),v.current=null,K.dismiss(a),_(!1)},a=K.show({text:e?`Sending the update…`:`Inviting ${C.length===1?C[0]:`${C.length} people`}…`,duration:ts,countdown:!0,action:{label:`Undo`,run:i}});v.current=i},te=async()=>{if(e){_(!0);try{await U(`deleteEvent`,{id:e.id}),K.show({text:A?`Meeting cancelled. The people invited are told.`:`Event deleted`}),l(!0)}catch(e){_(!1),K.error(e,`Could not delete the event: `)}}},ne=cs.some(([e])=>e===m.reminder)?cs:[...cs,[m.reminder,`${m.reminder} minutes before`]];return(0,W.jsxs)(`section`,{className:`view`,children:[(0,W.jsxs)(`header`,{className:`thread-head`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:x,disabled:b,title:`Back without saving (Esc)`,"aria-label":`Back without saving`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`h1`,{children:e?`Edit event`:d?o.length===1?`An event for this slot`:`An event for each of ${o.length} slots`:`New event`})]}),(0,W.jsx)(`form`,{className:`thread-scroll ev-form`,onSubmit:e=>{e.preventDefault(),g||M()},children:(0,W.jsxs)(`fieldset`,{disabled:g,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Title`}),(0,W.jsx)(`input`,{type:`text`,value:m.subject,onChange:e=>y({subject:e.target.value}),maxLength:255,autoFocus:!e,autoComplete:`off`})]}),d?(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`When`}),(0,W.jsx)(`ul`,{className:`ev-slots`,"aria-label":`The slots`,children:o.map(e=>(0,W.jsx)(`li`,{children:Jo(e)},`${e.start}:${e.end}`))})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:m.allDay,onChange:e=>y({allDay:e.target.checked})}),` All day`]}),(0,W.jsxs)(`div`,{className:`ev-times`,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Starts`}),(0,W.jsxs)(`span`,{className:`ev-when-in`,children:[(0,W.jsx)(`input`,{type:`date`,value:m.startDate,onChange:e=>S({startDate:e.target.value}),required:!0}),!m.allDay&&(0,W.jsx)(`input`,{type:`time`,value:m.startTime,onChange:e=>S({startTime:e.target.value}),required:!0})]})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Ends`}),(0,W.jsxs)(`span`,{className:`ev-when-in`,children:[(0,W.jsx)(`input`,{type:`date`,value:m.endDate,min:m.startDate,onChange:e=>y({endDate:e.target.value}),required:!0}),!m.allDay&&(0,W.jsx)(`input`,{type:`time`,value:m.endTime,onChange:e=>y({endTime:e.target.value}),required:!0})]})]})]})]}),e?.isRecurring&&(0,W.jsx)(`p`,{className:`set-note`,children:`This event repeats. Changes here apply to this occurrence only.`}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Where`}),(0,W.jsx)(`input`,{type:`text`,value:m.location,onChange:e=>y({location:e.target.value}),maxLength:255,placeholder:`A room, an address, a link`,autoComplete:`off`})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Invite`}),(0,W.jsx)(Ro,{label:`Invite`,boxed:!0,value:m.attendees,onChange:e=>y({attendees:e}),placeholder:`Name or address`,account:e?.account,disabled:g}),(0,W.jsx)(`small`,{children:C.length?e&&!O?`Saving sends them an invitation.`:e?`Saving sends everyone invited the update.`:`Saving sends them an invitation.`:O?`Saving sends everyone invited the update.`:`Nobody: an appointment of your own.`})]}),(0,W.jsxs)(`div`,{className:`ev-times`,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Remind me`}),(0,W.jsx)(`select`,{value:m.reminder??``,onChange:e=>y({reminder:e.target.value===``?null:Number(e.target.value)}),children:ne.map(([e,t])=>(0,W.jsx)(`option`,{value:e??``,children:t},String(e)))})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Show as`}),(0,W.jsx)(`select`,{value:m.showAs,onChange:e=>y({showAs:e.target.value}),children:ls.map(([e,t])=>(0,W.jsx)(`option`,{value:e,children:t},e))})]})]}),!e&&(0,W.jsx)(fs,{calendars:i,value:m.calendar,onChange:e=>y({calendar:e})}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Description`}),(0,W.jsx)(`textarea`,{value:m.body,onChange:e=>y({body:e.target.value}),rows:5})]})]})}),(0,W.jsxs)(`footer`,{className:`ev-foot`,children:[e&&!g&&(0,W.jsx)(co,{onDiscard:te,title:A?`Cancel this meeting`:`Delete this event`,confirmLabel:A?`Cancel meeting`:`Delete`,keepLabel:`Keep`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:x,disabled:b,children:`Cancel`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:M,disabled:g,children:[g&&(0,W.jsx)(H,{size:14,className:`spin`}),d?f===null?k?o.length===1?`Send 1 invitation`:`Send ${o.length} invitations`:o.length===1?`Create 1 event`:`Create ${o.length} events`:`Made ${f} of ${o.length}…`:k?e?`Save and send`:`Send invitation`:`Save`]})]})]})}var ms=(e,t=1)=>{let n=new Date(e);return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t).getTime()},hs=e=>new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}).replace(`:00`,``).replace(/\s?([AP])M/i,(e,t)=>t.toLowerCase()),gs=Array.from({length:7},(e,t)=>new Date(2024,0,1+t).toLocaleDateString([],{weekday:`short`}));function _s({month:e,from:t,weeks:n,events:r,now:i,tint:a,unsure:o,onOpen:s,onDay:c,onCreate:l}){let u=Array.from({length:n*7},(e,n)=>ms(t,n)),d=(0,L.useRef)(null),[f,p]=(0,L.useState)(3);(0,L.useLayoutEffect)(()=>{let e=d.current;if(!e)return;let t=()=>p(Math.max(1,Math.floor((e.clientHeight/n-27)/18)));t();let r=new ResizeObserver(()=>{requestAnimationFrame(t)});return r.observe(e),()=>r.disconnect()},[n]);let[m,h]=(0,L.useState)(null),g=(0,L.useRef)(null),_=(e,t)=>{let n=document.elementFromPoint(e,t)?.closest(`.mo-day`);return n?.dataset.day?Number(n.dataset.day):null},v=e=>{if(e.pointerType!==`mouse`||e.button!==0||e.target.closest(`button`))return;let t=_(e.clientX,e.clientY);t!==null&&(g.current={day:t,moved:!1,el:e.currentTarget,id:e.pointerId})},y=()=>{let e=g.current;if(g.current=null,e)try{e.el.releasePointerCapture(e.id)}catch{}return h(null),e},b=e=>{let t=g.current;if(!t)return;if(!(e.buttons&1)){y();return}let n=_(e.clientX,e.clientY);if(!(n===null||n===t.day&&!t.moved)){if(!t.moved){t.moved=!0;try{t.el.setPointerCapture(t.id)}catch{}}t.span={a:Math.min(t.day,n),b:Math.max(t.day,n)},h(t.span)}},x=()=>{let e=y();e?.moved&&e.span&&e.span.b>=e.span.a&&l(e.span.a,e.span.b)},S=new Date(e).getMonth(),C=(()=>{let e=new Date(i);return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()})(),w=e=>e.allDay||new Date(e.end).getTime()-new Date(e.start).getTime()>=864e5,T=e=>r.filter(t=>new Date(t.start).getTime()<ms(e)&&new Date(t.end).getTime()>e).sort((e,t)=>Number(w(t))-Number(w(e))||new Date(e.start).getTime()-new Date(t.start).getTime());return(0,W.jsxs)(`div`,{className:`mo`,children:[(0,W.jsx)(`div`,{className:`mo-head`,children:gs.map(e=>(0,W.jsx)(`span`,{children:e},e))}),(0,W.jsx)(`div`,{className:`mo-grid${m?` dragging`:``}`,ref:d,style:{gridTemplateRows:`repeat(${n}, minmax(0, 1fr))`},onPointerDown:v,onPointerMove:b,onPointerUp:x,onPointerCancel:()=>{y()},onLostPointerCapture:()=>{g.current?.moved&&y()},children:u.map(e=>{let t=T(e),n=t.length-f;return(0,W.jsxs)(`div`,{className:`mo-day${new Date(e).getMonth()===S?``:` other`}${e===C?` today`:``}${m&&e>=m.a&&e<=m.b?` dragged`:``}`,"data-day":e,onDoubleClick:t=>{t.target.closest(`button`)||l(e+324e5)},children:[(0,W.jsx)(`button`,{type:`button`,className:`mo-num`,onClick:()=>c(e),title:`Show this week`,children:new Date(e).getDate()}),t.slice(0,n>0?f-1:f).map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`mo-ev${w(e)?` long`:``}${e.isCancelled?` cancelled`:``}${o(e)?` unsure`:``}${new Date(e.end).getTime()<=i?` over`:``}`,style:a(e),onClick:()=>s(e),title:`${e.subject}${w(e)?``:`\n${new Date(e.start).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`}${e.location?`\n${e.location}`:``}`,children:[!w(e)&&(0,W.jsx)(`span`,{className:`mo-time`,children:hs(e.start)}),(0,W.jsx)(`span`,{className:`mo-title`,children:e.subject||`(no title)`})]},e.id)),n>0&&(0,W.jsxs)(`button`,{type:`button`,className:`mo-more`,onClick:()=>c(e),children:[`+`,n+1,` more`]})]},e)})})]})}var vs=44,ys=18,bs=9e5,xs=e=>new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}).replace(`:00`,``),Ss=e=>new Date(2e3,0,1,e).toLocaleTimeString([],{hour:`numeric`});function Cs(e,t,n){let r=n.map(n=>({e:n,s:Math.max(new Date(n.start).getTime(),e),en:Math.min(new Date(n.end).getTime(),t)})).filter(e=>e.en>e.s).sort((e,t)=>e.s-t.s||t.en-e.en),i=[],a=[],o=0,s=()=>{let e=Math.max(1,...a.map(e=>e.col+1));for(let t of a)i.push({...t,cols:e});a=[]};for(let t of r){let n=(t.s-e)/36e5*vs,r=Math.max(ys,(t.en-t.s)/36e5*vs-1),i=Math.max(t.en,t.s+ys/vs*36e5);a.length&&t.s>=o&&s();let c=new Set(a.filter(e=>e.en>t.s).map(e=>e.col)),l=0;for(;c.has(l);)l++;a.push({e:t.e,top:n,height:r,col:l,cols:1,start:t.s,en:i}),o=Math.max(o,i)}return s(),i}function ws({days:e,events:t,now:n,tint:r,unsure:i,onOpen:a,onCreate:o,slots:s=[],picking:c=!1,onSlot:l,onUnslot:u}){let d=(0,L.useRef)(null),f=e[0],p=t=>t+1<e.length?e[t+1]:new Date(new Date(e[t]).getFullYear(),new Date(e[t]).getMonth(),new Date(e[t]).getDate()+1).getTime(),m=p(e.length-1),h=t=>{let n=0;for(;n+1<e.length&&e[n+1]<=t;)n++;return n},g=e=>e.allDay,_=t.filter(g).filter(e=>new Date(e.start).getTime()<m&&new Date(e.end).getTime()>f),v=t.filter(e=>!g(e)),y=e.findIndex((e,t)=>e<=n&&n<p(t)),[b,x]=(0,L.useState)(null),S=(0,L.useRef)(null),C=(0,L.useRef)(0),w=(e,t,n)=>{let r=document.elementFromPoint(e,t)?.closest(`.wk-col`);if(!r||r.dataset.day===void 0)return null;let i=new Date(Number(r.dataset.day)),a=(t-r.getBoundingClientRect().top)/vs*60,o=Math.max(0,Math.min(1440,(n?Math.ceil:Math.floor)(a/15)*15));return new Date(i.getFullYear(),i.getMonth(),i.getDate(),0,o).getTime()},T=(e,t)=>{let n=new Date(e);return e>=E(t)?1056:(n.getHours()*60+n.getMinutes())/60*vs},E=e=>{let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1).getTime()},D=()=>{let e=S.current;if(S.current=null,cancelAnimationFrame(C.current),C.current=0,e)try{e.el.releasePointerCapture(e.id)}catch{}return x(null),e},O=(e,t)=>{let n=S.current;if(!n)return;let r=w(e,t,!0);if(r===null)return;let i=r<=n.at?w(e,t,!1)??r:r;n.span=i<n.at?{from:i,to:n.at+bs}:{from:n.at,to:Math.max(n.at+bs,i)},x(n.span)},k=()=>{let e=S.current,t=d.current;if(!e||!t){C.current=0;return}let n=t.getBoundingClientRect(),r=Math.max(n.top,t.querySelector(`.wk-top`)?.getBoundingClientRect().bottom??n.top),i=e.last.y>n.bottom-28?10:e.last.y<r+24?-10:0;i?(t.scrollTop+=i,O(e.last.x,Math.max(r+1,Math.min(n.bottom-1,e.last.y))),C.current=requestAnimationFrame(k)):C.current=0},A=e=>{if(e.pointerType!==`mouse`||e.button!==0||e.target.closest(`.wk-ev, .wk-slot-x`))return;let t=w(e.clientX,e.clientY,!1);t!==null&&(S.current={at:t,x:e.clientX,y:e.clientY,moved:!1,el:e.currentTarget,id:e.pointerId,last:{x:e.clientX,y:e.clientY},shift:e.shiftKey})},j=e=>{let t=S.current;if(t){if(!(e.buttons&1))D();else{if(t.last={x:e.clientX,y:e.clientY},!t.moved){if(Math.hypot(e.clientX-t.x,e.clientY-t.y)<5)return;t.moved=!0;try{t.el.setPointerCapture(t.id)}catch{}}O(e.clientX,e.clientY),C.current||=requestAnimationFrame(k)}}},ee=e=>{let t=D();!t?.moved||!t.span||t.span.to<=t.span.from||(l&&(c||t.shift||e.shiftKey)?(l({start:t.span.from,end:t.span.to}),M.current=Date.now()):o(t.span.from,t.span.to))},M=(0,L.useRef)(0),te=e=>{if(Date.now()-M.current<400||!l||!(c||e.shiftKey)||e.target.closest(`.wk-ev, .wk-slot-x`))return;let t=w(e.clientX,e.clientY,!1);if(t===null)return;let n=t-new Date(t).getMinutes()%30*6e4;l({start:n,end:n+18e5})},ne=(0,L.useRef)(null);return(0,L.useLayoutEffect)(()=>{if(ne.current===f||!d.current)return;ne.current=f;let t=y>=0?(n-e[y])/36e5-1.5:7.5;d.current.scrollTop=Math.max(0,t)*vs}),(0,W.jsxs)(`div`,{className:`wk`,ref:d,children:[(0,W.jsxs)(`div`,{className:`wk-top`,children:[(0,W.jsx)(`div`,{className:`wk-head`,children:e.map((e,t)=>(0,W.jsxs)(`div`,{className:t===y?`today`:void 0,children:[(0,W.jsx)(`span`,{className:`wk-dow`,children:new Date(e).toLocaleDateString([],{weekday:`short`})}),(0,W.jsx)(`span`,{className:`wk-date`,children:new Date(e).getDate()})]},e))}),_.length>0&&(0,W.jsx)(`div`,{className:`wk-band`,style:{gridTemplateColumns:`repeat(${e.length}, minmax(0, 1fr))`},children:_.map(e=>{let t=h(Math.max(new Date(e.start).getTime(),f)),n=h(Math.min(new Date(e.end).getTime()-1,m-1));return(0,W.jsx)(`button`,{type:`button`,className:`wk-ev band${e.isCancelled?` cancelled`:``}${i(e)?` unsure`:``}${e.showAs===`Free`?` free`:``}`,style:{...r(e),gridColumn:`${t+1} / ${n+2}`},onClick:()=>a(e),title:e.subject,children:(0,W.jsx)(`span`,{className:`wk-title`,children:e.subject||`(no title)`})},e.id)})})]}),(0,W.jsxs)(`div`,{className:`wk-body${b?` dragging`:``}${c?` picking`:``}`,style:{height:1056,gridTemplateColumns:`40px repeat(${e.length}, minmax(0, 1fr))`},onPointerDown:A,onPointerMove:j,onPointerUp:ee,onClick:te,onPointerCancel:()=>{D()},onLostPointerCapture:()=>{S.current?.moved&&D()},children:[(0,W.jsx)(`div`,{className:`wk-hours`,"aria-hidden":`true`,children:Array.from({length:23},(e,t)=>(0,W.jsx)(`span`,{style:{top:(t+1)*vs},children:Ss(t+1)},t))}),e.map((e,t)=>(0,W.jsxs)(`div`,{className:`wk-col${t===y?` today`:``}`,"data-day":e,style:{backgroundSize:`100% ${vs}px`},onDoubleClick:t=>{if(t.target.closest(`.wk-ev, .wk-slot-x`)||c||t.shiftKey)return;let n=t.clientY-t.currentTarget.getBoundingClientRect().top;o(e+Math.floor(n/vs*2)*18e5)},children:[t===y&&(0,W.jsx)(`span`,{className:`wk-now`,style:{top:(n-e)/36e5*vs}}),b&&b.from<p(t)&&b.to>e&&(()=>{let n=Math.max(b.from,e),r=Math.min(b.to,p(t)),i=T(n,e);return(0,W.jsx)(`span`,{className:`wk-ghost`,style:{top:i,height:Math.max(8,T(r,e)-i)},"aria-hidden":`true`,children:n===b.from&&(0,W.jsxs)(`span`,{children:[xs(b.from),` – `,xs(b.to),b.to-b.from>=864e5||new Date(b.from).getDate()!==new Date(b.to-1).getDate()?`, ${new Date(b.to).toLocaleDateString([],{weekday:`short`})}`:``]})})})(),s.filter(n=>n.start<p(t)&&n.end>e).map(n=>{let r=Math.max(n.start,e),i=T(r,e),a=`${Go(n.start)} – ${Go(n.end)}`;return(0,W.jsxs)(`span`,{className:`wk-slot`,style:{top:i,height:Math.max(14,T(Math.min(n.end,p(t)),e)-i)},children:[r===n.start&&(0,W.jsx)(`span`,{className:`wk-slot-label`,children:a}),r===n.start&&u&&(0,W.jsx)(`button`,{type:`button`,className:`wk-slot-x`,onClick:e=>{e.stopPropagation(),u(n)},title:`Remove the slot ${a}`,"aria-label":`Remove the slot ${a}`,children:(0,W.jsx)(la,{size:11})})]},`${n.start}:${n.end}`)}),Cs(e,p(t),v).map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`wk-ev${e.height<30?` short`:``}${new Date(e.e.end).getTime()<=n?` over`:``}${e.e.isCancelled?` cancelled`:``}${i(e.e)?` unsure`:``}${e.e.showAs===`Free`?` free`:``}`,style:{...r(e.e),top:e.top,height:e.height,left:`${e.col/e.cols*100}%`,width:`calc(${100/e.cols}% - 2px)`},onClick:()=>a(e.e),title:`${e.e.subject}\n${xs(new Date(e.e.start).getTime())} – ${xs(new Date(e.e.end).getTime())}${e.e.location?`\n${e.e.location}`:``}`,children:[(0,W.jsx)(`span`,{className:`wk-title`,children:e.e.subject||`(no title)`}),(0,W.jsx)(`span`,{className:`wk-time`,children:xs(e.start)})]},e.e.id))]},e))]})]})}var Ts=e=>e.getFullYear()*1e4+e.getMonth()*100+e.getDate();function Es({year:e,events:t,now:n,onDay:r,onMonth:i}){let a=new Map,o=new Date(e,0,1).getTime(),s=new Date(e+1,0,1).getTime();for(let e of t){let t=Math.max(new Date(e.start).getTime(),o),n=Math.min(new Date(e.end).getTime(),s),r=new Date(t);r.setHours(0,0,0,0);for(let e=0;r.getTime()<n&&e<400;e++,r.setDate(r.getDate()+1))a.set(Ts(r),(a.get(Ts(r))??0)+1)}let c=Ts(new Date(n));return(0,W.jsx)(`div`,{className:`yr`,children:Array.from({length:12},(t,n)=>{let o=new Date(e,n,1),s=(o.getDay()+6)%7,l=new Date(e,n+1,0).getDate();return(0,W.jsxs)(`section`,{className:`yr-month`,children:[(0,W.jsx)(`button`,{type:`button`,className:`yr-name`,onClick:()=>i(o.getTime()),title:`Show this month`,children:o.toLocaleDateString([],{month:`long`})}),(0,W.jsxs)(`div`,{className:`yr-days`,children:[gs.map((e,t)=>(0,W.jsx)(`span`,{className:`yr-dow`,children:e.slice(0,1)},t)),Array.from({length:s},(e,t)=>(0,W.jsx)(`span`,{},`b${t}`)),Array.from({length:l},(t,i)=>{let o=new Date(e,n,i+1),s=a.get(Ts(o))??0;return(0,W.jsx)(`button`,{type:`button`,className:`yr-day${s>=4?` n3`:s>=2?` n2`:s?` n1`:``}${Ts(o)===c?` today`:``}`,onClick:()=>r(o.getTime()),title:`${o.toLocaleDateString([],{weekday:`long`,month:`long`,day:`numeric`})}${s?` · ${s} event${s>1?`s`:``}`:``}`,children:i+1},i)})]})]},n)})})}var Ds=41943040,Os=3145728,ks=`v`,As=`m`,js=6e4,Ms=3e3,Ns=0,Ps=null,Fs=0,Is=e=>new Promise((t,n)=>{e.onsuccess=()=>t(e.result),e.onerror=()=>n(e.error)}),Ls=e=>new Promise((t,n)=>{e.oncomplete=()=>t(),e.onabort=e.onerror=()=>n(e.error)});function Rs(e,t){return new Promise((n,r)=>{let i=indexedDB.open(e,2);i.onupgradeneeded=()=>{for(let e of[...i.result.objectStoreNames])t.includes(e)||i.result.deleteObjectStore(e);for(let e of t)i.result.objectStoreNames.contains(e)||i.result.createObjectStore(e,{keyPath:`k`})},i.onsuccess=()=>{i.result.onversionchange=()=>{i.result.close(),Vs()},n(i.result)},i.onerror=()=>r(i.error)})}async function zs(){let e=await Rs(`mw-kept-key`,[ks]);try{let t=await Is(e.transaction(ks).objectStore(ks).get(`keys`));if(t?.seal&&t?.name)return t;let n={seal:await crypto.subtle.generateKey({name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`]),name:await crypto.subtle.generateKey({name:`HMAC`,hash:`SHA-256`},!1,[`sign`])},r=e.transaction(ks,`readwrite`),i=r.objectStore(ks),a=n,o=i.get(`keys`);return o.onsuccess=()=>{o.result?.seal&&o.result?.name?a=o.result:i.put({k:`keys`,...n})},await Ls(r),a}finally{e.close()}}async function Bs(e){let t=await crypto.subtle.importKey(`raw`,e,`HKDF`,!1,[`deriveKey`]),n=new TextEncoder().encode(`mailwatcher kept`);return{seal:await crypto.subtle.deriveKey({name:`HKDF`,hash:`SHA-256`,salt:n,info:new TextEncoder().encode(`seal`)},t,{name:`AES-GCM`,length:256},!1,[`encrypt`,`decrypt`]),name:await crypto.subtle.deriveKey({name:`HKDF`,hash:`SHA-256`,salt:n,info:new TextEncoder().encode(`name`)},t,{name:`HMAC`,hash:`SHA-256`,length:256},!1,[`sign`])}}function Vs(){Ns++,Fs=0;let e=Ps;Ps=null,e?.then(e=>{try{e?.db.close()}catch{}})}typeof window<`u`&&window.addEventListener(`mw:kept-revoked`,Vs);function Hs(){if(Ps)return Ps;if(Date.now()-Fs<js)return Promise.resolve(null);let e=Ns;return Ps=(async()=>{try{if(typeof indexedDB>`u`||!crypto.subtle)return null;let t=await _();if(!t)return e===Ns&&(Fs=Date.now()),null;let n=t.kind===`local`?await zs():await Bs(t.raw),r=await Rs(t.store,[ks,As]);return e===Ns?{db:r,...n,gen:e}:(r.close(),null)}catch{return e===Ns&&(Fs=Date.now()-js+Ms),null}})(),Ps.then(t=>{!t&&e===Ns&&(Ps=null)}),Ps}var Us=()=>{Hs()},Ws=new TextEncoder,Gs=e=>Array.from(new Uint8Array(e),e=>e.toString(16).padStart(2,`0`)).join(``),Ks=async(e,t)=>Gs(await crypto.subtle.sign(`HMAC`,e.name,Ws.encode(t)));async function qs(e){let t=await Hs();if(t)try{let n=await Ks(t,e),r=await Is(t.db.transaction(ks).objectStore(ks).get(n));if(!r||t.gen!==Ns)return;let i;try{i=await crypto.subtle.decrypt({name:`AES-GCM`,iv:r.iv,additionalData:Ws.encode(n)},t.seal,r.data)}catch{await Ys(t).catch(()=>{});return}return t.gen===Ns?JSON.parse(new TextDecoder().decode(i)):void 0}catch{return}}async function Js(e,t){let n=await Hs();if(n)try{let r=Ws.encode(JSON.stringify(t));if(r.length>Os)return;let i=await Ks(n,e),a=crypto.getRandomValues(new Uint8Array(12)),o=await crypto.subtle.encrypt({name:`AES-GCM`,iv:a,additionalData:Ws.encode(i)},n.seal,r);if(n.gen!==Ns)return;let s=async()=>{let e=n.db.transaction([ks,As],`readwrite`);e.objectStore(ks).put({k:i,iv:a,data:o}),e.objectStore(As).put({k:i,at:Date.now(),size:o.byteLength}),await Ls(e)};try{await s()}catch(e){if(e?.name!==`QuotaExceededError`)throw e;await Zs(n,.5),await s()}await Zs(n)}catch{}}async function Ys(e){let t=e.db.transaction([ks,As],`readwrite`);t.objectStore(ks).clear(),t.objectStore(As).clear(),await Ls(t)}var Xs=0;async function Zs(e,t=.75){if(t===.75&&Date.now()-Xs<5e3)return;Xs=Date.now();let n=await Is(e.db.transaction(As).objectStore(As).getAll()),r=n.reduce((e,t)=>e+t.size,0);if(t===.75&&r<=Ds)return;let i=t===.5?r/2:Ds*t,a=e.db.transaction([ks,As],`readwrite`);for(let e of n.sort((e,t)=>e.at-t.at)){if(r<=i)break;a.objectStore(ks).delete(e.k),a.objectStore(As).delete(e.k),r-=e.size}await Ls(a)}var Qs={signatures:[],accounts:[],defaultAccount:null,details:null},$s=null,ec=null,tc=!1,nc=new Set,rc=()=>nc.forEach(e=>e()),ic={get:()=>$s??Qs,known:()=>$s!==null,set(e){$s=e,rc()},load(){return ec??=U(`signatures`).then(e=>{$s=e,tc=!1,rc()},()=>{tc=!0}).finally(()=>{ec=null}),ec},ready(){return $s?Promise.resolve():tc?(ic.load(),Promise.resolve()):ic.load()},subscribe(e){return nc.add(e),$s||ic.load(),()=>{nc.delete(e)}}};function ac(){return(0,L.useSyncExternalStore)(ic.subscribe,ic.get)}function oc(e,t,n){if(n===null)return null;let r=n??e.accounts.find(n=>n.account===(t??e.defaultAccount))?.signature;return r&&e.signatures.find(e=>e.id===r)||null}var sc=new Set([`P`,`BR`,`DIV`,`SPAN`,`B`,`STRONG`,`I`,`EM`,`U`,`S`,`A`,`UL`,`OL`,`LI`,`PRE`,`CODE`,`IMG`,`TABLE`,`TBODY`,`TR`,`TD`]),cc=new Set(`SCRIPT.STYLE.IFRAME.FRAME.FRAMESET.OBJECT.EMBED.TEMPLATE.NOSCRIPT.SVG.MATH.HEAD.TITLE.META.LINK.BASE.FORM.INPUT.BUTTON.SELECT.TEXTAREA.PICTURE.VIDEO.AUDIO.CANVAS.MAP.APPLET.COLGROUP.CAPTION`.split(`.`)),lc=40,uc=/^data:image\/(png|jpeg|gif);base64,[A-Za-z0-9+/]+={0,2}$/,dc=9e4,fc=/^cid:mw-sig-[\w.-]{1,100}@(?:sideora|mailwatcher)$/,pc=e=>{let t=(e??``).trim();return t.length<=dc&&uc.test(t)||fc.test(t)?t:null},mc=e=>/^\d{1,4}$/.test((e??``).trim())&&+e>0&&+e<=2e3?String(+e):null,hc=e=>new DOMParser().parseFromString(e,`text/html`);function gc(e){let t=(e??``).trim();if(!t)return null;try{let e=new URL(t);return[`http:`,`https:`,`mailto:`,`tel:`].includes(e.protocol)?t:null}catch{return null}}function _c(e,t,n,r,i=!1){for(let a of e.childNodes){if(a.nodeType===Node.TEXT_NODE){t.appendChild(n.createTextNode(a.nodeValue??``));continue}if(a instanceof HTMLFormElement||a.nodeType!==Node.ELEMENT_NODE)continue;let e=a,o=e.tagName.toUpperCase();if(cc.has(o)||r>lc)continue;if(!sc.has(o)){_c(e,t,n,r+1,i);continue}if(o===`IMG`){let r=pc(e.getAttribute(`src`));if(!r)continue;let i=n.createElement(`img`);i.setAttribute(`src`,r);for(let t of[`width`,`height`]){let n=mc(e.getAttribute(t));n&&i.setAttribute(t,n)}i.setAttribute(`alt`,(e.getAttribute(`alt`)??``).replace(/\s+/g,` `).trim().slice(0,120)),t.appendChild(i);continue}let s=n.createElement(i&&o===`P`?`div`:o.toLowerCase());if(o===`A`){let t=gc(e.getAttribute(`href`));t&&s.setAttribute(`href`,t)}_c(e,s,n,r+1,i),i&&o===`P`&&!s.childNodes.length&&s.appendChild(n.createElement(`br`)),t.appendChild(s)}}var vc=new Map,yc=0;function bc(e,t){let n=`${t?`m`:`e`}${e}`,r=vc.get(n);if(r===void 0){let i=document.implementation.createHTMLDocument(``);_c(hc(e).body,i.body,i,0,t);let a=i.createElement(`div`);a.innerHTML=i.body.innerHTML,r=a.innerHTML,(vc.size>400||yc>8e6)&&(vc.clear(),yc=0),vc.set(n,r),yc+=n.length+r.length}return r}var xc=e=>bc(e,!1),Sc=e=>bc(e,!0),Cc=e=>{let t=hc(xc(e)).body;return!(t.textContent??``).trim()&&!t.querySelector(`img`)},wc=e=>(hc(xc(e).replace(/<br>|<\/(p|div|li)>/g,`$& `)).body.textContent??``).replace(/\s+/g,` `).trim(),Tc=`mw-signature`,Ec=`mw-sig-`,Dc=`mw-signature-sep`,Oc=`#5f6368`,kc=`#3c4043`;function Ac(e,t){let n=hc(`<div>${e}</div>`).body.firstElementChild;for(let e of n.querySelectorAll(`a`))e.setAttribute(`style`,`color:${Oc};text-decoration:none`);for(let e of n.querySelectorAll(`strong, b`))e.setAttribute(`style`,`color:${kc}`);for(let e of n.querySelectorAll(`img`)){let n=t.get(e.getAttribute(`src`)??``);n&&e.setAttribute(`src`,`cid:${n}`),e.setAttribute(`style`,`display:block;border:0`)}for(let e of n.querySelectorAll(`table`))for(let[t,n]of[[`cellpadding`,`0`],[`cellspacing`,`0`],[`border`,`0`],[`role`,`presentation`],[`style`,`border-collapse:collapse`]])e.setAttribute(t,n);for(let e of n.querySelectorAll(`td`))e.setAttribute(`style`,`vertical-align:top;color:${Oc}${e.nextElementSibling?`;padding:0 14px 0 0`:``}`);return n.innerHTML}function jc(e){let t=2166136261;for(let n=0;n<e.length;n++)t^=e.charCodeAt(n),t=Math.imul(t,16777619);return(t>>>0).toString(16).padStart(8,`0`)}var Mc=e=>/^mw-sig-/.test(e),Nc=()=>[...crypto.getRandomValues(new Uint8Array(4))].map(e=>e.toString(16).padStart(2,`0`)).join(``),Pc=/^mw-sig-(.+)-([0-9a-f]{8})-([0-9a-f]{8})@(?:sideora|mailwatcher)$/;function Fc(e){let t=Pc.exec(e);return t?{sig:t[1],salt:t[3]}:null}var Ic=(e,t)=>Fc(e)?.salt===t;function Lc(e,t){if(!e)return[];let n=new Map;for(let r of hc(Sc(e.html)).querySelectorAll(`img`)){let i=r.getAttribute(`src`)??``,a=/^data:(image\/(png|jpeg|gif));base64,(.*)$/.exec(i);if(!a||n.has(i))continue;let o=jc(i);n.set(i,{cid:`mw-sig-${e.id}-${o}-${t}@sideora`,src:i,contentType:a[1],name:`signature-${o}-${t}.${a[2]===`jpeg`?`jpg`:a[2]}`,data:a[3]})}return[...n.values()]}function Rc(e,t,n){if(!t)return e;let r=Sc(t.html);if(!r)return e;let i=new Map(Lc(t,n).map(e=>[e.src,e.cid]));return`${e}<div class="${Dc}" style="width:24px;height:0;border-top:1px solid ${Oc};margin:16px 0 10px;font-size:0;line-height:0"></div><div class="${Tc}" id="${Ec}${t.id}" style="color:${Oc};font-size:90%">${Ac(r,i)}</div>`}var zc=e=>(e??``).replace(/\s+/g,``);function Bc(e,t,n){if(!e.includes(Ec))return{html:e,sig:null};let r=hc(e),i=r.body.querySelectorAll(`div[id^="${Ec}"]`),a=i[i.length-1],o=a?a.id.slice(7):``,s=t.find(e=>e.id===o);if(!a||!s||zc(a.textContent)!==zc(hc(Sc(s.html)).body.textContent))return{html:e,sig:null};let c=[...a.querySelectorAll(`img`)];if(c.length!==hc(Sc(s.html)).body.querySelectorAll(`img`).length)return{html:e,sig:null};let l=n,u=[];for(let t of c){let n=/^cid:/i.test(t.getAttribute(`src`)??``)?t.getAttribute(`src`).slice(4):``,r=Fc(n);if(!r||r.sig!==s.id||l!==void 0&&r.salt!==l)return{html:e,sig:null};l=r.salt,u.push(n)}let d=a.previousElementSibling;return d?.classList.contains(Dc)&&d.remove(),a.remove(),{html:r.body.innerHTML,sig:o,...u.length?{salt:l,cids:u}:{}}}var Vc=`mw:calendar`,Hc=`mw:calendar-changed`,Uc=e=>!e.shared&&e.isMeeting&&!e.isCancelled&&(e.myResponse===`NoResponseReceived`||e.myResponse===`Unknown`),Wc=5e3,Gc=e=>{let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),t.getDate()).getTime()},Kc=(e,t)=>{let n=new Date(e);return new Date(n.getFullYear(),n.getMonth(),n.getDate()+t).getTime()},qc=e=>Kc(Gc(e),-((new Date(e).getDay()+6)%7)),Jc=e=>{let t=new Date(e);return new Date(t.getFullYear(),t.getMonth(),1).getTime()},Yc=(e,t)=>{let n=new Date(e);return new Date(n.getFullYear(),n.getMonth()+t,1).getTime()},Xc=e=>new Date(e).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`}),Zc=(e,t=!1)=>new Date(e).toLocaleDateString([],t?{weekday:`long`,month:`long`,day:`numeric`}:{weekday:`short`,month:`short`,day:`numeric`});function Qc(e){let t=Gc(Date.now());return e===t?`Today · ${Zc(e)}`:e===Kc(t,1)?`Tomorrow · ${Zc(e)}`:e===Kc(t,-1)?`Yesterday · ${Zc(e)}`:Zc(e,!0)}function $c(e){let t=new Date(e),n=new Date(Kc(e,6)),r=e=>e.toLocaleDateString([],{month:`short`}),i=n.getFullYear()===new Date().getFullYear()?``:`, ${n.getFullYear()}`;return t.getMonth()===n.getMonth()?`${r(t)} ${t.getDate()} – ${n.getDate()}${i}`:`${r(t)} ${t.getDate()} – ${r(n)} ${n.getDate()}${i}`}function el(e){let t=e=>Go(e),n=e=>`${new Date(e).toLocaleDateString([],{weekday:`short`})} ${new Date(e).getDate()}`;return Gc(e.start)===Gc(e.end-1)?`${n(e.start)}, ${t(e.start)} – ${t(e.end)}`:`${n(e.start)}, ${t(e.start)} – ${n(e.end)}, ${t(e.end)}`}function tl(e){let t=new Date(e.start).getTime(),n=new Date(e.end).getTime(),r=Gc(e.allDay?n-1:n),i=Gc(t)===r;return e.allDay?i?`${Zc(t,!0)} · All day`:`${Zc(t)} – ${Zc(r)} · All day`:i?`${Zc(t,!0)} · ${Xc(e.start)} – ${Xc(e.end)}`:`${Zc(t)} ${Xc(e.start)} – ${Zc(n)} ${Xc(e.end)}`}var nl=(e,t)=>t?{}:{"--cal":`hsl(${Sa(e)} 58% 48%)`},rl=e=>e.myResponse===`Organizer`||!e.isMeeting,il=Uc,al={Accept:`Accepted`,Tentative:`Tentative`,Decline:`Declined`,NoResponseReceived:`No answer yet`,Organizer:`Organizer`,Unknown:`No answer yet`};function ol({text:e}){let t=e.split(/(https?:\/\/[^\s<>"')\]]+)/g);return(0,W.jsx)(W.Fragment,{children:t.map((e,t)=>t%2?(0,W.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,children:e},t):(0,W.jsx)(L.Fragment,{children:e},t))})}function sl(e,t){if(e===`year`){let e=new Date(t).getFullYear();return{from:new Date(e,0,1).getTime(),to:new Date(e+1,0,1).getTime()}}if(e===`month`){let e=Jc(t),n=Kc(Yc(e,1),-1);return{from:qc(e),to:Kc(qc(n),7)}}if(e===`day`){let e=Gc(t);return{from:e,to:Kc(e,1)}}let n=qc(t);return{from:n,to:Kc(n,7)}}function cl(e,t){let n=new Date(t),r=n.getFullYear()===new Date().getFullYear();return e===`year`?String(n.getFullYear()):e===`month`?n.toLocaleDateString([],r?{month:`long`}:{month:`long`,year:`numeric`}):e===`day`?n.toLocaleDateString([],r?{weekday:`short`,month:`short`,day:`numeric`}:{month:`short`,day:`numeric`,year:`numeric`}):$c(qc(t))}var ll=[[`day`,`Day`],[`week`,`Week`],[`month`,`Month`],[`year`,`Year`]];function ul({showAccount:e,active:t,compose:n,account:r,replyTo:i,onPropose:a}){let[o,s]=(0,L.useState)(So.calendarView),[c,l]=(0,L.useState)(So.calendarList),[u,d]=(0,L.useState)(()=>Gc(Date.now())),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)([]),[g,_]=(0,L.useState)([]),[v,y]=(0,L.useState)(So.hiddenCalendars),b=(0,L.useRef)(0),[x,S]=(0,L.useState)(null),[C,w]=(0,L.useState)(!0),[T,E]=(0,L.useState)(null),[D,O]=(0,L.useState)(null),[k,A]=(0,L.useState)([]),[j,ee]=(0,L.useState)(!1),[M,te]=(0,L.useState)(null),[ne,re]=(0,L.useState)(null),ie=(0,L.useRef)(!1),ae=(0,L.useCallback)(e=>{ie.current=e},[]),oe=ac().defaultAccount,se=(0,L.useCallback)(e=>{A(t=>Bo(t,e)),re(null)},[]),N=(0,L.useCallback)(e=>{A(t=>t.filter(t=>!Vo(t,e))),re(null)},[]),le=(0,L.useCallback)(()=>{A([]),te(null),re(null)},[]),ue=n?.id;(0,L.useEffect)(()=>{n&&(E(null),O({event:null,prefill:n.prefill}),n.prefill.start!==void 0&&d(Gc(n.prefill.start)))},[ue]);let de=(0,L.useRef)(0),{from:fe,to:pe}=sl(o,u),me=(0,L.useRef)({from:fe,to:pe});me.current={from:fe,to:pe};let P=(0,L.useCallback)(e=>{So.setCalendarView(e),s(e)},[]),he=(0,L.useCallback)(e=>{So.setCalendarList(e),l(e)},[]),F=(0,L.useCallback)(async(e=!1)=>{let t=++de.current,n=!1,{from:r,to:i}=me.current;e||w(!0);try{let a=[r];for(;Yc(a[a.length-1],3)<i&&i-r>864e7;)a.push(Yc(a[a.length-1],3));a.push(i);let o=`cal:${r}:${i}`,s=!1;e||qs(o).then(e=>{e&&!s&&t===de.current&&(n=!0,p(e.items),_(e.calendars))});let c=await Promise.all(a.slice(0,-1).map((e,t)=>U(`events`,{start:new Date(e).toISOString(),end:new Date(a[t+1]).toISOString()})));s=!0;let l=new Set,u=c.flatMap(e=>e.items).filter(e=>!l.has(e.id)&&l.add(e.id));if(t!==de.current)return;Js(o,{items:u,calendars:c[0].calendars??[]}),p(u),_(c[0].calendars??[]),h([...new Set(c.flatMap(e=>e.failed??[]))]);let d=b.current;U(`calendarView`).then(({hidden:e})=>{t===de.current&&d===b.current&&(e?(y(e),So.setHiddenCalendars(e)):So.hiddenCalendars().length&&U(`setCalendarView`,{hidden:So.hiddenCalendars()}).catch(()=>{}))},()=>{}),S(null)}catch(r){if(t!==de.current)return;e||(n||p([]),S(r instanceof Error?r.message:String(r)))}finally{t===de.current&&w(!1)}},[]);(0,L.useEffect)(()=>{p(null),F()},[fe,pe,F]),(0,L.useEffect)(()=>{let e=()=>{F(!0)};window.addEventListener(Vc,e);let t=ce(e=>{e===`focus`&&F(!0)}),n=setInterval(()=>p(e=>e&&[...e]),6e4);return()=>{window.removeEventListener(Vc,e),t(),clearInterval(n)}},[F]);let I=(0,L.useCallback)(e=>d(t=>{let n=new Date(t);return o===`year`?new Date(n.getFullYear()+e,n.getMonth(),1).getTime():o===`month`?Yc(Jc(t),e):Kc(t,o===`day`?e:7*e)}),[o]),ge=(e,t)=>{d(e),P(t)};(0,L.useEffect)(()=>{let e=e=>{let n=e.target;if(!(!t||n.closest?.(`input, textarea, select, [contenteditable="true"]`)||e.metaKey||e.ctrlKey||e.altKey)&&!document.querySelector(`.cal-pop:popover-open`)){if(D)e.key===`Escape`&&!ie.current&&O(null);else if(e.key===`Escape`)T?E(null):M?te(null):k.length?le():j&&ee(!1);else if(T)return;else e.key===`s`&&!c&&(o===`week`||o===`day`)?ee(e=>!e):e.key===`c`?(e.preventDefault(),O({event:null})):e.key===`t`?d(Gc(Date.now())):e.key===`j`||e.key===`ArrowRight`?I(1):e.key===`k`||e.key===`ArrowLeft`?I(-1):e.key===`d`?P(`day`):e.key===`w`?P(`week`):e.key===`m`?P(`month`):e.key===`y`?P(`year`):e.key===`l`&&he(!c)}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[t,T,D,I,P,he,c,o,M,k.length,j,le]);let _e=(0,L.useRef)(null),ve=(0,L.useRef)(null),ye=(0,L.useRef)(null),be=!!f&&!x,Se=be&&c&&!T&&!D;(0,L.useLayoutEffect)(()=>{Se&&_e.current&&(ye.current?.range===`${fe}:${pe}`?_e.current.scrollTop=ye.current.top:ve.current&&o!==`day`&&o!==`week`?ve.current.scrollIntoView({block:`start`}):_e.current.scrollTop=0)},[Se,o,fe,pe]);let Ce=e=>{b.current++,y(e),So.setHiddenCalendars(e),U(`setCalendarView`,{hidden:e}).catch(e=>K.error(e,`Your other devices will not see this choice: `))},we=new Set(g.filter(e=>e.isDefault).map(e=>e.key)),Te=es(g,{account:r,defaultAccount:oe,hidden:v}),Ee=()=>{F(!0),window.dispatchEvent(new CustomEvent(Hc))},De=({made:e,failed:t,invited:n})=>{let r=e.length;if(ie.current=!1,O(null),r&&Ee(),A(t=>t.filter(t=>!e.some(e=>Vo(e,t)))),te(null),!t.length){ee(!1),re(null),K.show({kind:`ok`,text:`${r===1?`1 event`:`${r} events`} created${n?`. Invitations sent.`:``}`});return}let i=t.map(e=>Jo(e.slot)).join(`; `);re(`Not created: ${i} (${t[0].error})`),K.show({kind:`error`,text:r?`${r} of ${r+t.length} events created. The ${t.length===1?`slot`:`${t.length} slots`} not created ${t.length===1?`is`:`are`} still picked.`:`Could not create the events: ${t[0].error}`})},Oe=()=>{if(!M||!a||!k.length)return;let e=k,t=M.reply&&!!i,n=t?i.subject:M.subject.trim(),o=g.find(e=>e.key===(M.calendar||Te)),s=M.hold;a({html:Qo(e),subject:n,reply:t,account:o?.account??(r||void 0),opened:()=>{le(),ee(!1),s&&o&&R(e,$o(n),o.key)}})},R=async(e,t,n)=>{let r=[];for(let i of e)try{await U(`saveEvent`,{subject:t,start:new Date(i.start).toISOString(),end:new Date(i.end).toISOString(),allDay:!1,location:``,attendees:``,reminderMinutes:null,showAs:`Tentative`,body:``,calendar:n})}catch{r.push(i)}r.length<e.length&&Ee(),r.length?K.show({kind:`error`,text:`Could not hold ${r.map(e=>Jo(e)).join(`; `)} in your calendar.`,duration:8e3}):K.show({kind:`ok`,text:`${e.length===1?`The time is`:`${e.length} times are`} held in your calendar, as tentative "${t}".`})};if(D)return(0,W.jsx)(ps,{event:D.event,day:o===`week`?fe:u,at:D.at,prefill:D.prefill,calendars:g,calendar:Te,slots:D.slots,onSlots:De,onBusy:ae,onClose:e=>{O(null),e&&(E(null),Ee())}});if(T)return(0,W.jsx)(fl,{event:T,showAccount:e,onBack:()=>E(null),onChanged:()=>{F(!0),window.dispatchEvent(new CustomEvent(Hc))},onEdit:e=>O({event:e}),writable:g.find(e=>e.key===T.calendarKey)?.writable!==!1});let ke=Date.now(),Ae=Gc(ke),je=(f??[]).filter(e=>!v.includes(e.calendarKey)),Me=o===`day`?[fe]:Array.from({length:7},(e,t)=>Kc(fe,t)),Ne=c?je.map(e=>({e,s:new Date(e.start).getTime(),end:new Date(e.end).getTime()})):[],z=[],[Pe,Fe]=o===`month`?[Jc(u),Yc(Jc(u),1)]:[fe,pe];for(let e=Pe;c&&e<Fe;e=Kc(e,1)){let t=Kc(e,1),n=Ne.filter(n=>n.s<t&&n.end>e).map(e=>e.e);(e===Ae||n.length)&&z.push({day:e,events:n})}let Ie=e=>nl(e.calendarKey,we.has(e.calendarKey)),Le=e=>e.myResponse===`Tentative`||il(e),Re=be,B=o;return(0,W.jsxs)(`section`,{className:`view`,children:[(0,W.jsxs)(`header`,{className:`thread-head cal-head`,children:[(0,W.jsx)(`h1`,{title:cl(o,u),children:cl(o,u)}),C&&f&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Loading`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>d(Ae),disabled:fe<=Ae&&Ae<pe,title:`This ${B} (t)`,children:`Today`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>I(-1),title:`The ${B} before (k)`,"aria-label":`The ${B} before`,children:(0,W.jsx)(pt,{size:17})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>I(1),title:`The ${B} after (j)`,"aria-label":`The ${B} after`,children:(0,W.jsx)(ht,{size:17})}),(0,W.jsx)(`span`,{className:`cal-break`,"aria-hidden":`true`}),(0,W.jsx)(`select`,{className:`btn cal-layout`,value:o,onChange:e=>P(e.target.value),"aria-label":`How much to show`,title:`Day, week, month or year (d, w, m, y)`,children:ll.map(([e,t])=>(0,W.jsx)(`option`,{value:e,children:t},e))}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,"aria-pressed":c,onClick:()=>he(!c),title:c?`Shown as a list: back to the grid (l)`:`Show as a list (l)`,"aria-label":`Show as a list`,children:(0,W.jsx)(Xn,{size:16})}),(0,W.jsx)(`span`,{className:`cal-gap`,"aria-hidden":`true`}),g.length>1&&(0,W.jsx)(so,{calendars:g,hidden:v,onHidden:Ce,showAccount:e,tint:nl}),(o===`week`||o===`day`)&&!c&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,"aria-pressed":j,onClick:()=>ee(e=>!e),title:j?`Picking slots: a drag or a click picks one (s)`:`Select slots: to propose in a mail, or an event for each (s, or Shift-drag)`,"aria-label":`Select slots`,children:(0,W.jsx)(yi,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>F(),title:`Refresh`,"aria-label":`Refresh`,children:(0,W.jsx)(Gr,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon primary`,onClick:()=>O({event:null}),title:`New event (c)`,"aria-label":`New event`,children:(0,W.jsx)(Lr,{size:16})})]}),m.length>0&&(0,W.jsxs)(`div`,{className:`notice`,children:[`Not every calendar could be read: `,m.join(`; `)]}),(0,W.jsx)(`span`,{className:`slot-live`,"aria-live":`polite`,role:`status`,children:k.length?`${k.length===1?`1 slot`:`${k.length} slots`} picked`:j?`Picking slots: drag over free time`:``}),(k.length>0||j&&!c&&(o===`week`||o===`day`))&&(0,W.jsxs)(`div`,{className:`slot-bar`,role:`region`,"aria-label":`Slots picked`,children:[(0,W.jsxs)(`div`,{className:`slot-row`,children:[k.length===0?(0,W.jsx)(`span`,{className:`slot-count`,children:`Drag over free time to pick slots, or click for half an hour.`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`slot-count`,children:k.length===1?`1 slot`:`${k.length} slots`}),(0,W.jsx)(`span`,{className:`slot-sep`,"aria-hidden":`true`,children:`—`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,"aria-expanded":!!M,onClick:()=>te(e=>e?null:{reply:!!i,subject:``,hold:!1,calendar:Te}),disabled:!a,children:`Propose in a mail`}),(0,W.jsx)(`span`,{className:`slot-sep`,"aria-hidden":`true`,children:`·`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{te(null),O({event:null,slots:k})},children:`Create an event for each`}),(0,W.jsx)(`span`,{className:`slot-sep`,"aria-hidden":`true`,children:`·`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:le,title:`Clear the slots (Esc)`,children:`Clear`})]}),(0,W.jsx)(`span`,{className:`grow`}),j&&(0,W.jsx)(`button`,{type:`button`,className:`btn slot-done`,onClick:()=>ee(!1),title:`Stop picking: a drag makes one event again (s)`,children:`Done`})]}),k.length>0&&(0,W.jsx)(`ul`,{className:`slot-chips`,"aria-label":`The slots`,children:k.map(e=>(0,W.jsxs)(`li`,{className:`slot-chip`,children:[(0,W.jsx)(`button`,{type:`button`,className:`slot-chip-when`,onClick:()=>d(Gc(e.start)),title:`${Jo(e)}: show its ${o===`day`?`day`:`week`}`,children:el(e)}),(0,W.jsx)(`button`,{type:`button`,className:`slot-chip-x`,onClick:()=>N(e),title:`Remove the slot ${el(e)}`,"aria-label":`Remove the slot ${el(e)}`,children:(0,W.jsx)(la,{size:12})})]},`${e.start}:${e.end}`))}),ne&&(0,W.jsx)(`p`,{className:`slot-note`,role:`alert`,children:ne}),M&&k.length>0&&(0,W.jsxs)(`form`,{className:`slot-propose`,onSubmit:e=>{e.preventDefault(),Oe()},onKeyDown:e=>{e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),te(null))},children:[i&&(0,W.jsxs)(`div`,{className:`slot-choice`,role:`radiogroup`,"aria-label":`Which mail`,children:[(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`radio`,name:`slot-mail`,checked:M.reply,onChange:()=>te({...M,reply:!0})}),` `,(0,W.jsxs)(`span`,{children:[`A reply to `,(0,W.jsx)(`q`,{children:i.subject||`(no subject)`})]})]}),(0,W.jsxs)(`label`,{children:[(0,W.jsx)(`input`,{type:`radio`,name:`slot-mail`,checked:!M.reply,onChange:()=>te({...M,reply:!1})}),` `,(0,W.jsx)(`span`,{children:`A new mail`})]})]}),!(M.reply&&i)&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Subject`}),(0,W.jsx)(`input`,{type:`text`,value:M.subject,onChange:e=>te({...M,subject:e.target.value}),placeholder:`What the meeting is about`,maxLength:255,autoComplete:`off`})]}),(0,W.jsxs)(`label`,{className:`set-check`,title:`Tentative events titled "Hold: …", one for each slot: delete the others once a time is chosen`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:M.hold,onChange:e=>te({...M,hold:e.target.checked})}),` Hold these times in my calendar (tentative)`]}),M.hold&&(0,W.jsx)(fs,{calendars:g,value:M.calendar||Te,onChange:e=>te({...M,calendar:e})}),(0,W.jsxs)(`div`,{className:`slot-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>te(null),children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,children:M.reply&&i?`Write the reply`:`Write the mail`})]})]})]}),Re&&!c&&(o===`week`||o===`day`)&&(0,W.jsx)(ws,{days:Me,events:je,now:ke,tint:Ie,unsure:Le,onOpen:E,onCreate:(e,t)=>O({event:null,at:e,prefill:t===void 0?void 0:{start:e,end:t}}),slots:k,picking:j,onSlot:se,onUnslot:N}),Re&&!c&&o===`month`&&(0,W.jsx)(_s,{month:Jc(u),from:fe,weeks:Math.round((pe-fe)/6048e5),events:je,now:ke,tint:Ie,unsure:Le,onOpen:E,onDay:e=>ge(e,`week`),onCreate:(e,t)=>O(t===void 0?{event:null,at:e}:{event:null,at:e,prefill:{start:e,end:new Date(new Date(t).getFullYear(),new Date(t).getMonth(),new Date(t).getDate()+1).getTime(),allDay:!0}})}),Re&&!c&&o===`year`&&(0,W.jsx)(Es,{year:new Date(u).getFullYear(),events:je,now:ke,onDay:e=>ge(e,`week`),onMonth:e=>ge(e,`month`)}),(0,W.jsxs)(`div`,{className:`thread-scroll agenda`,ref:_e,hidden:Re&&!c,onScroll:e=>{Re&&c&&(ye.current={range:`${fe}:${pe}`,top:e.currentTarget.scrollTop})},children:[!f&&(0,W.jsx)(`div`,{"aria-busy":`true`,"aria-label":`Loading`,children:Array.from({length:5},(e,t)=>(0,W.jsxs)(`div`,{className:`cal-row skeleton`,children:[(0,W.jsx)(`span`,{className:`sk line w60`}),(0,W.jsx)(`span`,{className:`sk line w80`})]},t))}),f&&x&&(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(ct,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:x})]}),Re&&c&&z.length===0&&(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(ct,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:o===`day`?`Nothing scheduled.`:`Nothing scheduled this ${o}.`})]}),Re&&c&&z.map(({day:t,events:n})=>(0,W.jsxs)(`section`,{className:`cal-day`,ref:t===Ae?ve:void 0,children:[(0,W.jsx)(`h2`,{className:`group${t===Ae?` today`:``}`,children:Qc(t)}),n.length===0&&(0,W.jsx)(`p`,{className:`cal-none`,children:`Nothing scheduled.`}),(0,W.jsx)(`ul`,{className:`convs`,children:n.map(n=>{let r=new Date(n.start).getTime(),i=new Date(n.end).getTime(),a=i<=ke,o=!n.allDay&&r<=ke&&ke<i,s=r>=t,c=i<=Kc(t,1);return(0,W.jsxs)(`li`,{className:`cal-row show-${n.showAs.toLowerCase()}${a?` over`:``}${n.isCancelled?` cancelled`:``}${n.myResponse===`Tentative`||il(n)?` unsure`:``}`,style:nl(n.calendarKey,we.has(n.calendarKey)),tabIndex:0,onClick:()=>E(n),onKeyDown:e=>{e.key===`Enter`&&e.target===e.currentTarget&&E(n)},children:[(0,W.jsx)(`span`,{className:`cal-time`,children:n.allDay?(0,W.jsx)(`span`,{children:`All day`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{children:s?Xc(n.start):`Until`}),(0,W.jsx)(`span`,{className:`cal-end`,children:c?Xc(n.end):`to ${new Date(i).toLocaleDateString([],{weekday:`short`})}`})]})}),(0,W.jsxs)(`span`,{className:`cal-main`,children:[(0,W.jsxs)(`span`,{className:`cal-l1`,children:[(0,W.jsx)(`span`,{className:`cal-subject`,children:n.private&&!n.subject?`Private`:n.subject||`(no title)`}),o&&(0,W.jsx)(`span`,{className:`tag now`,children:`Now`}),n.isCancelled&&(0,W.jsx)(`span`,{className:`tag`,children:`Cancelled`}),il(n)&&(0,W.jsx)(`span`,{className:`tag draft`,children:`Invitation`}),n.myResponse===`Tentative`&&(0,W.jsx)(`span`,{className:`tag`,children:`Tentative`}),!we.has(n.calendarKey)&&(0,W.jsx)(`span`,{className:`tag cal-tag`,title:n.shared?`A calendar shared with you`:`One of your calendars`,children:n.calendarName}),e&&(0,W.jsx)(`span`,{className:`tag`,children:xe(n.account)})]}),(0,W.jsxs)(`span`,{className:`cal-l2`,children:[n.isRecurring&&(0,W.jsx)(Yr,{size:11,"aria-label":`Repeats`}),n.location?(0,W.jsx)(`span`,{className:`cal-where`,children:n.location}):!rl(n)&&(0,W.jsx)(`span`,{className:`cal-where`,children:n.organizerName||n.organizerEmail})]})]}),n.joinUrl&&!a&&(0,W.jsx)(`a`,{className:`btn icon bare`,href:n.joinUrl,target:`_blank`,rel:`noreferrer`,onClick:e=>e.stopPropagation(),title:`Join the meeting`,"aria-label":`Join the meeting`,children:(0,W.jsx)($i,{size:16})})]},n.id)})})]},t))]})]})}var dl={Accept:(0,W.jsx)(V,{size:13,className:`ok`,"aria-label":`Accepted`}),Decline:(0,W.jsx)(la,{size:13,className:`no`,"aria-label":`Declined`}),Tentative:(0,W.jsx)(xt,{size:13,"aria-label":`Tentative`})};function fl({event:e,showAccount:t,onBack:n,onChanged:r,onEdit:i,writable:a}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(e.myResponse),[f,p]=(0,L.useState)(!1),m=o??e;(0,L.useEffect)(()=>{let t=!0;return U(`event`,{id:e.id}).then(e=>{t&&(s(e),d(e.myResponse))},e=>{t&&l(e.message)}),()=>{t=!1}},[e.id]);let h=t=>{let i=u,a=t===`accept`?`Accept`:t===`tentative`?`Tentative`:`Decline`,o={accept:`Accepting`,tentative:`Answering maybe`,decline:`Declining`}[t],s=!1;d(a),p(!0);let c=K.show({text:`${o}…`,duration:Wc,countdown:!0,action:{label:`Undo`,run:()=>{s=!0,d(i),p(!1),K.dismiss(c)}}});setTimeout(async()=>{if(!s)try{await U(`respondToEvent`,{id:e.id,response:t}),K.show({kind:`ok`,text:t===`decline`?`Declined. The organizer is told.`:`Answered. The organizer is told.`}),r(),t===`decline`&&n()}catch(e){d(i),K.error(e,`Could not answer the invitation: `)}finally{p(!1)}},Wc)},g=!e.shared&&m.isMeeting&&m.myResponse!==`Organizer`&&!m.isCancelled,_=o?.attendees??[],v=e=>_.filter(t=>t.role===e);return(0,W.jsxs)(`section`,{className:`view`,children:[(0,W.jsxs)(`header`,{className:`thread-head`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:n,title:`Back to the calendar (Esc)`,"aria-label":`Back to the calendar`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`h1`,{title:m.subject,children:m.subject||`(no title)`}),!o&&!c&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Loading`}),o&&!m.isCancelled&&(e.shared?a&&!m.isMeeting:rl(m))&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>i({...o,calendarKey:e.calendarKey,calendarName:e.calendarName,shared:e.shared}),title:`Edit or delete this event`,"aria-label":`Edit or delete this event`,children:(0,W.jsx)(Dr,{size:15})})]}),(0,W.jsxs)(`div`,{className:`thread-scroll event`,children:[(0,W.jsxs)(`div`,{className:`ev-facts`,children:[(0,W.jsxs)(`p`,{className:`ev-when`,children:[tl(m),m.isRecurring&&(0,W.jsxs)(`span`,{className:`ev-repeat`,children:[(0,W.jsx)(Yr,{size:12}),` Repeats`]})]}),m.isCancelled&&(0,W.jsx)(`p`,{className:`ev-cancelled`,children:`This meeting was cancelled.`}),m.location&&(0,W.jsxs)(`p`,{className:`ev-line`,children:[(0,W.jsx)(sr,{size:14}),(0,W.jsx)(`span`,{children:(0,W.jsx)(ol,{text:m.location})})]}),m.joinUrl&&(0,W.jsx)(`p`,{children:(0,W.jsxs)(`a`,{className:`btn primary`,href:m.joinUrl,target:`_blank`,rel:`noreferrer`,children:[(0,W.jsx)($i,{size:15}),` Join the meeting`]})}),(e.shared||t)&&(0,W.jsx)(`p`,{className:`ev-line dim`,children:e.shared?`In the shared calendar ${e.calendarName}`:`Calendar of ${xe(m.account)}`})]}),c&&(0,W.jsx)(`div`,{className:`msg-error ev-pad`,children:c}),m.isMeeting&&(m.organizerName||m.organizerEmail||_.length>0)&&(0,W.jsxs)(`div`,{className:`ev-people`,children:[(0,W.jsxs)(`h2`,{children:[(0,W.jsx)(Zi,{size:14}),` `,_.length?`${_.length} invited`:`People`]}),(0,W.jsxs)(`ul`,{children:[(m.organizerName||m.organizerEmail)&&(0,W.jsxs)(`li`,{children:[(0,W.jsx)(ao,{name:m.organizerName||m.organizerEmail,email:m.organizerEmail,size:24}),(0,W.jsx)(`span`,{className:`ev-who`,children:m.organizerName||m.organizerEmail}),(0,W.jsx)(`span`,{className:`ev-answer`,children:`Organizer`})]}),[...v(`required`),...v(`optional`),...v(`resource`)].filter(e=>!m.organizerEmail||e.email?.toLowerCase()!==m.organizerEmail.toLowerCase()).map((e,t)=>(0,W.jsxs)(`li`,{title:e.email,children:[(0,W.jsx)(ao,{name:e.name||e.email||`?`,email:e.email,size:24}),(0,W.jsxs)(`span`,{className:`ev-who`,children:[e.name||e.email,e.role!==`required`&&(0,W.jsxs)(`span`,{className:`ev-role`,children:[` · `,e.role===`optional`?`optional`:`room`]})]}),(0,W.jsxs)(`span`,{className:`ev-answer`,children:[dl[e.response],al[e.response]]})]},`${e.email}:${t}`))]})]}),o?.body.trim()&&(0,W.jsx)(`div`,{className:`ev-body`,children:(0,W.jsx)(ol,{text:o.body.trim()})})]}),g&&(0,W.jsxs)(`footer`,{className:`ev-foot`,children:[(0,W.jsxs)(`span`,{className:`ev-mine`,children:[f?(0,W.jsx)(H,{size:13,className:`spin`}):dl[u],u===`Accept`?`You accepted`:u===`Tentative`?`You answered maybe`:u===`Decline`?`You declined`:`Not answered yet`]}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`span`,{className:`ev-answers`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>h(`decline`),disabled:f||u===`Decline`,children:`Decline`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>h(`tentative`),disabled:f||u===`Tentative`,children:`Maybe`}),(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>h(`accept`),disabled:f||u===`Accept`,children:`Accept`})]})]})]})}var pl=e(I(),1);function ml(e){this.content=e}ml.prototype={constructor:ml,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return t==-1?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,i=r.find(e),a=r.content.slice();return i==-1?a.push(n||e,t):(a[i+1]=t,n&&(a[i]=n)),new ml(a)},remove:function(e){var t=this.find(e);if(t==-1)return this;var n=this.content.slice();return n.splice(t,2),new ml(n)},addToStart:function(e,t){return new ml([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new ml(n)},addBefore:function(e,t,n){var r=this.remove(t),i=r.content.slice(),a=r.find(e);return i.splice(a==-1?i.length:a,0,t,n),new ml(i)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return e=ml.from(e),e.size?new ml(e.content.concat(this.subtract(e).content)):this},append:function(e){return e=ml.from(e),e.size?new ml(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=ml.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},toObject:function(){var e={};return this.forEach(function(t,n){e[t]=n}),e},get size(){return this.content.length>>1}},ml.from=function(e){if(e instanceof ml)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new ml(t)};function hl(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let i=e.child(r),a=t.child(r);if(i==a)n+=i.nodeSize;else{if(!i.sameMarkup(a))return n;if(i.isText&&i.text!=a.text){let e=i.text,t=a.text,r=0;for(;e[r]==t[r];r++)n++;return r&&r<e.length&&r<t.length&&vl(e.charCodeAt(r-1))&&_l(e.charCodeAt(r))&&n--,n}if(i.content.size||a.content.size){let e=hl(i.content,a.content,n+1);if(e!=null)return e}n+=i.nodeSize}}}function gl(e,t,n,r){for(let i=e.childCount,a=t.childCount;;){if(i==0||a==0)return i==a?null:{a:n,b:r};let o=e.child(--i),s=t.child(--a),c=o.nodeSize;if(o==s)n-=c,r-=c;else{if(!o.sameMarkup(s))return{a:n,b:r};if(o.isText&&o.text!=s.text){let e=o.text,t=s.text,i=e.length,a=t.length;for(;i>0&&a>0&&e[i-1]==t[a-1];)i--,a--,n--,r--;return i&&a&&i<e.length&&vl(e.charCodeAt(i-1))&&_l(e.charCodeAt(i))&&(n++,r++),{a:n,b:r}}if(o.content.size||s.content.size){let e=gl(o.content,s.content,n-1,r-1);if(e)return e}n-=c,r-=c}}}function _l(e){return e>=56320&&e<57344}function vl(e){return e>=55296&&e<56320}var q=class e{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,i){for(let a=0,o=0;o<t;a++){let s=this.content[a],c=o+s.nodeSize;if(c>e&&n(s,r+o,i||null,a)!==!1&&s.content.size){let i=o+1;s.nodesBetween(Math.max(0,e-i),Math.min(s.content.size,t-i),n,r+i)}o=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let i=``,a=!0;return this.nodesBetween(e,t,(o,s)=>{let c=o.isText?o.text.slice(Math.max(e,s)-s,t-s):o.isLeaf?r?typeof r==`function`?r(o):r:o.type.spec.leafText?o.type.spec.leafText(o):``:``;o.isBlock&&(o.isLeaf&&c||o.isTextblock)&&n&&(a?a=!1:i+=n),i+=c},0),i}append(t){if(!t.size)return this;if(!this.size)return t;let n=this.lastChild,r=t.firstChild,i=this.content.slice(),a=0;for(n.isText&&n.sameMarkup(r)&&(i[i.length-1]=n.withText(n.text+r.text),a=1);a<t.content.length;a++)i.push(t.content[a]);return new e(i,this.size+t.size)}cut(t,n=this.size){if(t==0&&n==this.size)return this;let r=[],i=0;if(n>t)for(let e=0,a=0;a<n;e++){let o=this.content[e],s=a+o.nodeSize;s>t&&((a<t||s>n)&&(o=o.isText?o.cut(Math.max(0,t-a),Math.min(o.text.length,n-a)):o.cut(Math.max(0,t-a-1),Math.min(o.content.size,n-a-1))),r.push(o),i+=o.nodeSize),a=s}return new e(r,i)}cutByIndex(t,n){return t==n?e.empty:t==0&&n==this.content.length?this:new e(this.content.slice(t,n))}replaceChild(t,n){let r=this.content[t];if(r==n)return this;let i=this.content.slice(),a=this.size+n.nodeSize-r.nodeSize;return i[t]=n,new e(i,a)}addToStart(t){return new e([t].concat(this.content),this.size+t.nodeSize)}addToEnd(t){return new e(this.content.concat(t),this.size+t.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw RangeError(`Index `+e+` out of range for `+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return hl(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return gl(this,e,t,n)}findIndex(e){if(e==0)return bl(0,e);if(e==this.size)return bl(this.content.length,e);if(e>this.size||e<0)throw RangeError(`Position ${e} outside of fragment (${this})`);for(let t=0,n=0;;t++){let r=this.child(t),i=n+r.nodeSize;if(i>=e)return i==e?bl(t+1,i):bl(t,n);n=i}}toString(){return`<`+this.toStringInner()+`>`}toStringInner(){return this.content.join(`, `)}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(t,n){if(!n)return e.empty;if(!Array.isArray(n))throw RangeError(`Invalid input for Fragment.fromJSON`);return e.fromArray(n.map(t.nodeFromJSON))}static fromArray(t){if(!t.length)return e.empty;let n,r=0;for(let e=0;e<t.length;e++){let i=t[e];r+=i.nodeSize,e&&i.isText&&t[e-1].sameMarkup(i)?(n||=t.slice(0,e),n[n.length-1]=i.withText(n[n.length-1].text+i.text)):n&&n.push(i)}return new e(n||t,r)}static from(t){if(!t)return e.empty;if(t instanceof e)return t;if(Array.isArray(t))return this.fromArray(t);if(t.attrs)return new e([t],t.nodeSize);throw RangeError(`Can not convert `+t+` to a Fragment`+(t.nodesBetween?` (looks like multiple versions of prosemirror-model were loaded)`:``))}};q.empty=new q([],0);var yl={index:0,offset:0};function bl(e,t){return yl.index=e,yl.offset=t,yl}function xl(e,t){if(e===t)return!0;if(!(e&&typeof e==`object`)||!(t&&typeof t==`object`))return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!xl(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!xl(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}var Sl=class e{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let i=e[r];if(this.eq(i))return e;if(this.type.excludes(i.type))t||=e.slice(0,r);else if(i.type.excludes(this.type))return e;else!n&&i.type.rank>this.type.rank&&(t||=e.slice(0,r),t.push(this),n=!0),t&&t.push(i)}return t||=e.slice(),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&xl(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Mark.fromJSON`);let n=e.marks[t.type];if(!n)throw RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(t){if(!t||Array.isArray(t)&&t.length==0)return e.none;if(t instanceof e)return[t];let n=t.slice();return n.sort((e,t)=>e.type.rank-t.type.rank),n}};Sl.none=[];var Cl=class extends Error{},J=class e{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(t,n){let r=Tl(this.content,t+this.openStart,n,this.openStart+1,this.openEnd+1);return r&&new e(r,this.openStart,this.openEnd)}removeBetween(t,n){return new e(wl(this.content,t+this.openStart,n+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+`(`+this.openStart+`,`+this.openEnd+`)`}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(t,n){if(!n)return e.empty;let r=n.openStart||0,i=n.openEnd||0;if(typeof r!=`number`||typeof i!=`number`)throw RangeError(`Invalid input for Slice.fromJSON`);return new e(q.fromJSON(t,n.content),r,i)}static maxOpen(t,n=!0){let r=0,i=0;for(let e=t.firstChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.firstChild)r++;for(let e=t.lastChild;e&&!e.isLeaf&&(n||!e.type.spec.isolating);e=e.lastChild)i++;return new e(t,r,i)}};J.empty=new J(q.empty,0,0);function wl(e,t,n){let{index:r,offset:i}=e.findIndex(t),a=e.maybeChild(r),{index:o,offset:s}=e.findIndex(n);if(i==t||a.isText){if(s!=n&&!e.child(o).isText)throw RangeError(`Removing non-flat range`);return e.cut(0,t).append(e.cut(n))}if(r!=o)throw RangeError(`Removing non-flat range`);return e.replaceChild(r,a.copy(wl(a.content,t-i-1,n-i-1)))}function Tl(e,t,n,r,i,a){let{index:o,offset:s}=e.findIndex(t),c=e.maybeChild(o);if(s==t||c.isText)return a&&r<=0&&i<=0&&!a.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let l=Tl(c.content,t-s-1,n,o==0?r-1:0,o==e.childCount-1?i-1:0,c);return l&&e.replaceChild(o,c.copy(l))}function El(e,t,n){if(n.openStart>e.depth)throw new Cl(`Inserted content deeper than insertion position`);if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Cl(`Inconsistent open depths`);return Dl(e,t,n,0)}function Dl(e,t,n,r){let i=e.index(r),a=e.node(r);if(i==t.index(r)&&r<e.depth-n.openStart){let o=Dl(e,t,n,r+1);return a.copy(a.content.replaceChild(i,o))}if(!n.content.size)return Ml(a,Pl(e,t,r));if(!n.openStart&&!n.openEnd&&e.depth==r&&t.depth==r){let r=e.parent,i=r.content;return Ml(r,i.cut(0,e.parentOffset).append(n.content).append(i.cut(t.parentOffset)))}{let{start:i,end:o}=Fl(n,e);return Ml(a,Nl(e,i,o,t,r))}}function Ol(e,t){if(!t.type.compatibleContent(e.type))throw new Cl(`Cannot join `+t.type.name+` onto `+e.type.name)}function kl(e,t,n){let r=e.node(n);return Ol(r,t.node(n)),r}function Al(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function jl(e,t,n,r){let i=(t||e).node(n),a=0,o=t?t.index(n):i.childCount;e&&(a=e.index(n),e.depth>n?a++:e.textOffset&&(Al(e.nodeAfter,r),a++));for(let e=a;e<o;e++)Al(i.child(e),r);t&&t.depth==n&&t.textOffset&&Al(t.nodeBefore,r)}function Ml(e,t){if(!e.type.validContent(t))throw new Cl(`Invalid content for node `+e.type.name);return e.copy(t)}function Nl(e,t,n,r,i){let a=e.depth>i&&kl(e,t,i+1),o=r.depth>i&&kl(n,r,i+1),s=[];return jl(null,e,i,s),a&&o&&t.index(i)==n.index(i)?(Ol(a,o),Al(Ml(a,Nl(e,t,n,r,i+1)),s)):(a&&Al(Ml(a,Pl(e,t,i+1)),s),jl(t,n,i,s),o&&Al(Ml(o,Pl(n,r,i+1)),s)),jl(r,null,i,s),new q(s)}function Pl(e,t,n){let r=[];return jl(null,e,n,r),e.depth>n&&Al(Ml(kl(e,t,n+1),Pl(e,t,n+1)),r),jl(t,null,n,r),new q(r)}function Fl(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(q.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}var Il=class e{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position before the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw RangeError(`There is no position after the top-level node`);return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[t*3],r=t==0?0:this.path[t*3-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return Sl.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let i=n.marks;for(var a=0;a<i.length;a++)i[a].type.spec.inclusive!==!1||r&&i[a].isInSet(r.marks)||(i=i[a--].removeFromSet(i));return i}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var i=0;i<n.length;i++)n[i].type.spec.inclusive!==!1||r&&n[i].isInSet(r.marks)||(n=n[i--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new Bl(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e=``;for(let t=1;t<=this.depth;t++)e+=(e?`/`:``)+this.node(t).type.name+`_`+this.index(t-1);return e+`:`+this.parentOffset}static resolve(t,n){if(!(n>=0&&n<=t.content.size))throw RangeError(`Position `+n+` out of range`);let r=[],i=0,a=n;for(let e=t;;){let{index:t,offset:n}=e.content.findIndex(a),o=a-n;if(r.push(e,t,i+n),!o||(e=e.child(t),e.isText))break;a=o-1,i+=n+1}return new e(n,r,a)}static resolveCached(t,n){let r=zl.get(t);if(r)for(let e=0;e<r.elts.length;e++){let t=r.elts[e];if(t.pos==n)return t}else zl.set(t,r=new Ll);let i=r.elts[r.i]=e.resolve(t,n);return r.i=(r.i+1)%Rl,i}},Ll=class{constructor(){this.elts=[],this.i=0}},Rl=12,zl=new WeakMap,Bl=class{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}},Vl=Object.create(null),Hl=class e{constructor(e,t,n,r=Sl.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||q.empty}get children(){return this.content.content}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,``)}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&xl(this.attrs,t||e.defaultAttrs||Vl)&&Sl.sameSet(this.marks,n||Sl.none)}copy(t=null){return t==this.content?this:new e(this.type,this.attrs,t,this.marks)}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.content,t)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return J.empty;let r=this.resolve(e),i=this.resolve(t),a=n?0:r.sharedDepth(t),o=r.start(a);return new J(r.node(a).content.cut(r.pos-o,i.pos-o),r.depth-a,i.depth-a)}replace(e,t,n){return El(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return Il.resolveCached(this,e)}resolveNoCache(e){return Il.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,e=>(n.isInSet(e.marks)&&(r=!0),!r)),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+=`(`+this.content.toStringInner()+`)`),Gl(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw Error(`Called contentMatchAt on a node with invalid content`);return t}canReplace(e,t,n=q.empty,r=0,i=n.childCount){let a=this.contentMatchAt(e).matchFragment(n,r,i),o=a&&a.matchFragment(this.content,t);if(!o||!o.validEnd)return!1;for(let e=r;e<i;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let i=this.contentMatchAt(e).matchType(n),a=i&&i.matchFragment(this.content,t);return a?a.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content),Kl(this.type.attrs,this.attrs,`node`,this.type.name);let e=Sl.none;for(let t=0;t<this.marks.length;t++){let n=this.marks[t];Kl(n.type.attrs,n.attrs,`mark`,n.type.name),e=n.addToSet(e)}if(!Sl.sameSet(e,this.marks))throw RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(e=>e.type.name)}`);this.content.forEach(e=>e.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(e=>e.toJSON())),e}static fromJSON(e,t){if(!t)throw RangeError(`Invalid input for Node.fromJSON`);let n;if(t.marks){if(!Array.isArray(t.marks))throw RangeError(`Invalid mark data for Node.fromJSON`);n=t.marks.map(e.markFromJSON)}if(t.type==`text`){if(typeof t.text!=`string`)throw RangeError(`Invalid text node in JSON`);return e.text(t.text,n)}let r=q.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}};Hl.prototype.text=void 0;var Ul=(()=>{let{stack:e}=Error(`/`);if(!e||!/\n\s*at\s/.test(e))return e=>e;let t=Object.create(null);return e=>(t[e],e)})(),Wl=class e extends Hl{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw RangeError(`Empty text nodes are not allowed`);this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):Gl(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return Ul(this.text.slice(e,t))}get nodeSize(){return this.text.length}mark(t){return t==this.marks?this:new e(this.type,this.attrs,this.text,t)}withText(t){return t==this.text?this:new e(this.type,this.attrs,t,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(Ul(this.text.slice(e,t)))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}};function Gl(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+`(`+t+`)`;return t}function Kl(e,t,n,r){for(let i in t)if(!(i in e))throw RangeError(`Unsupported attribute ${i} for ${n} of type ${r}`);for(let n in e)e[n].validate&&e[n].validate(t[n])}var ql=class e{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(t,n){let r=new Jl(t,n);if(r.next==null)return e.empty;let i=Yl(r);r.next&&r.err(`Unexpected trailing text`);let a=au(nu(i));return ou(a,r),a}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let i=t;r&&i<n;i++)r=r.matchType(e.child(i).type);return r}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];function i(a,o){let s=a.matchFragment(e,n);if(s&&(!t||s.validEnd))return q.from(o.map(e=>e.createAndFill()));for(let e=0;e<a.next.length;e++){let{type:t,next:n}=a.next[e];if(!(t.isText||t.hasRequiredAttrs())&&r.indexOf(n)==-1){r.push(n);let e=i(n,o.concat(t));if(e)return e}}return null}return i(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),i=r.match;if(i.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<i.next.length;e++){let{type:a,next:o}=i.next[e];a.isLeaf||a.hasRequiredAttrs()||a.name in t||r.type&&!o.validEnd||(n.push({match:a.contentMatch,type:a,via:r}),t[a.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(n){e.push(n);for(let r=0;r<n.next.length;r++)e.indexOf(n.next[r].next)==-1&&t(n.next[r].next)}return t(this),e.map((t,n)=>{let r=n+(t.validEnd?`*`:` `)+` `;for(let n=0;n<t.next.length;n++)r+=(n?`, `:``)+t.next[n].type.name+`->`+e.indexOf(t.next[n].next);return r}).join(`
|
|
12
|
+
`)}};ql.empty=new ql(!0);var Jl=class{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==``&&this.tokens.pop(),this.tokens[0]==``&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw SyntaxError(e+` (in content expression '`+this.string+`')`)}};function Yl(e){let t=[];do t.push(Xl(e));while(e.eat(`|`));return t.length==1?t[0]:{type:`choice`,exprs:t}}function Xl(e){let t=[];do t.push(Zl(e));while(e.next&&e.next!=`)`&&e.next!=`|`);return t.length==1?t[0]:{type:`seq`,exprs:t}}function Zl(e){let t=tu(e);for(;;)if(e.eat(`+`))t={type:`plus`,expr:t};else if(e.eat(`*`))t={type:`star`,expr:t};else if(e.eat(`?`))t={type:`opt`,expr:t};else if(e.eat(`{`))t=$l(e,t);else break;return t}function Ql(e){/\D/.test(e.next)&&e.err(`Expected number, got '`+e.next+`'`);let t=Number(e.next);return e.pos++,t}function $l(e,t){let n=Ql(e),r=n;return e.eat(`,`)&&(r=e.next==`}`?-1:Ql(e)),e.eat(`}`)||e.err(`Unclosed braced range`),{type:`range`,min:n,max:r,expr:t}}function eu(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let i=[];for(let e in n){let r=n[e];r.isInGroup(t)&&i.push(r)}return i.length==0&&e.err(`No node type or group '`+t+`' found`),i}function tu(e){if(e.eat(`(`)){let t=Yl(e);return e.eat(`)`)||e.err(`Missing closing paren`),t}if(/\W/.test(e.next))e.err(`Unexpected token '`+e.next+`'`);else{let t=eu(e,e.next).map(t=>(e.inline==null?e.inline=t.isInline:e.inline!=t.isInline&&e.err(`Mixing inline and block content`),{type:`name`,value:t}));return e.pos++,t.length==1?t[0]:{type:`choice`,exprs:t}}}function nu(e){let t=[[]];return i(a(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let i={term:r,to:n};return t[e].push(i),i}function i(e,t){e.forEach(e=>e.to=t)}function a(e,t){if(e.type==`choice`)return e.exprs.reduce((e,n)=>e.concat(a(n,t)),[]);if(e.type==`seq`)for(let r=0;;r++){let o=a(e.exprs[r],t);if(r==e.exprs.length-1)return o;i(o,t=n())}else if(e.type==`star`){let o=n();return r(t,o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`plus`){let o=n();return i(a(e.expr,t),o),i(a(e.expr,o),o),[r(o)]}else if(e.type==`opt`)return[r(t)].concat(a(e.expr,t));else if(e.type==`range`){let o=t;for(let t=0;t<e.min;t++){let t=n();i(a(e.expr,o),t),o=t}if(e.max==-1)i(a(e.expr,o),o);else for(let t=e.min;t<e.max;t++){let t=n();r(o,t),i(a(e.expr,o),t),o=t}return[r(o)]}else if(e.type==`name`)return[r(t,void 0,e.value)];else throw Error(`Unknown expr type`)}}function ru(e,t){return t-e}function iu(e,t){let n=[];return r(t),n.sort(ru);function r(t){let i=e[t];if(i.length==1&&!i[0].term)return r(i[0].to);n.push(t);for(let e=0;e<i.length;e++){let{term:t,to:a}=i[e];!t&&n.indexOf(a)==-1&&r(a)}}}function au(e){let t=Object.create(null);return n(iu(e,0));function n(r){let i=[];r.forEach(t=>{e[t].forEach(({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<i.length;e++)i[e][0]==t&&(r=i[e][1]);iu(e,n).forEach(e=>{r||i.push([t,r=[]]),r.indexOf(e)==-1&&r.push(e)})})});let a=t[r.join(`,`)]=new ql(r.indexOf(e.length-1)>-1);for(let e=0;e<i.length;e++){let r=i[e][1].sort(ru);a.next.push({type:i[e][0],next:t[r.join(`,`)]||n(r)})}return a}}function ou(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],i=!e.validEnd,a=[];for(let t=0;t<e.next.length;t++){let{type:n,next:o}=e.next[t];a.push(n.name),i&&!(n.isText||n.hasRequiredAttrs())&&(i=!1),r.indexOf(o)==-1&&r.push(o)}i&&t.err(`Only non-generatable nodes (`+a.join(`, `)+`) in a required position (see https://prosemirror.net/docs/guide/#generatable)`)}}function su(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function cu(e,t){let n=Object.create(null);for(let r in e){let i=e[r],a=t&&t[r];if(a===void 0){if(i.hasDefault)a=i.default;else throw RangeError(`No value supplied for attribute `+r)}else i.validate&&i.validate(a);n[r]=a}return n}function lu(e,t){let n=Object.create(null);if(t)for(let r in t)n[r]=new fu(e,r,t[r]);return n}var uu=class e{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(` `):[],this.attrs=lu(e,n.attrs),this.defaultAttrs=su(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||e==`text`),this.isText=e==`text`}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ql.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}isInGroup(e){return this.groups.indexOf(e)>-1}get whitespace(){return this.spec.whitespace||(this.spec.code?`pre`:`normal`)}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:cu(this.attrs,e)}create(e=null,t,n){if(this.isText)throw Error(`NodeType.create can't construct text nodes`);return new Hl(this,this.computeAttrs(e),q.from(t),Sl.setFrom(n))}createChecked(e=null,t,n){return t=q.from(t),this.checkContent(t),new Hl(this,this.computeAttrs(e),t,Sl.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),t=q.from(t),t.size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),i=r&&r.fillBefore(q.empty,!0);return i?new Hl(this,e,t.append(i),Sl.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}checkAttrs(e){}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||=e.slice(0,n);return t?t.length?t:Sl.none:e}static compile(t,n){let r=Object.create(null);t.forEach((t,i)=>r[t]=new e(t,n,i));let i=n.spec.topNode||`doc`;if(!r[i])throw RangeError(`Schema is missing its top node type ('`+i+`')`);if(!r.text)throw RangeError(`Every schema needs a 'text' type`);for(let e in r.text.attrs)throw RangeError(`The text node type should not have attributes`);return r}};function du(e,t,n){let r=n.split(`|`);return n=>{let i=n===null?`null`:typeof n;if(r.indexOf(i)<0)throw RangeError(`Expected value of type ${r} for attribute ${t} on type ${e}, got ${i}`)}}var fu=class{constructor(e,t,n){this.hasDefault=Object.prototype.hasOwnProperty.call(n,`default`),this.default=n.default,this.validate=typeof n.validate==`string`?du(e,t,n.validate):n.validate}get isRequired(){return!this.hasDefault}},pu=class e{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=lu(e,r.attrs),this.excluded=null;let i=su(this.attrs);this.instance=i?new Sl(this,i):null}create(e=null){return!e&&this.instance?this.instance:new Sl(this,cu(this.attrs,e))}static compile(t,n){let r=Object.create(null),i=0;return t.forEach((t,a)=>r[t]=new e(t,i++,n,a)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}},mu=class{constructor(e){this.linebreakReplacement=null,this.cached=Object.create(null);let t=this.spec={};for(let n in e)t[n]=e[n];t.nodes=ml.from(e.nodes),t.marks=ml.from(e.marks||{}),this.nodes=uu.compile(this.spec.nodes,this),this.marks=pu.compile(this.spec.marks,this);let n=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw RangeError(e+` can not be both a node and a mark`);let t=this.nodes[e],r=t.spec.content||``,i=t.spec.marks;if(t.contentMatch=n[r]||(n[r]=ql.parse(r,this.nodes)),t.inlineContent=t.contentMatch.inlineContent,t.spec.linebreakReplacement){if(this.linebreakReplacement)throw RangeError(`Multiple linebreak nodes defined`);if(!t.isInline||!t.isLeaf)throw RangeError(`Linebreak replacement nodes must be inline leaf nodes`);this.linebreakReplacement=t}t.markSet=i==`_`?null:i?hu(this,i.split(` `)):i==``||!t.inlineContent?[]:null}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=n==null?[t]:n==``?[]:hu(this,n.split(` `))}this.nodeFromJSON=e=>Hl.fromJSON(this,e),this.markFromJSON=e=>Sl.fromJSON(this,e),this.topNodeType=this.nodes[this.spec.topNode||`doc`],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if(typeof e==`string`)e=this.nodeType(e);else if(!(e instanceof uu))throw RangeError(`Invalid node type: `+e);else if(e.schema!=this)throw RangeError(`Node type from different schema used (`+e.name+`)`);return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new Wl(n,n.defaultAttrs,e,Sl.setFrom(t))}mark(e,t){return typeof e==`string`&&(e=this.marks[e]),e.create(t)}nodeType(e){let t=this.nodes[e];if(!t)throw RangeError(`Unknown node type: `+e);return t}};function hu(e,t){let n=[];for(let r=0;r<t.length;r++){let i=t[r],a=e.marks[i],o=a;if(a)n.push(a);else for(let t in e.marks){let r=e.marks[t];(i==`_`||r.spec.group&&r.spec.group.split(` `).indexOf(i)>-1)&&n.push(o=r)}if(!o)throw SyntaxError(`Unknown mark type: '`+t[r]+`'`)}return n}function gu(e){return e.tag!=null}function _u(e){return e.style!=null}var vu=class e{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[];let n=this.matchedStyles=[];t.forEach(e=>{if(gu(e))this.tags.push(e);else if(_u(e)){let t=/[^=]*/.exec(e.style)[0];n.indexOf(t)<0&&n.push(t),this.styles.push(e)}}),this.normalizeLists=!this.tags.some(t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)})}parse(e,t={}){let n=new Du(this,t,!1);return n.addAll(e,Sl.none,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Du(this,t,!0);return n.addAll(e,Sl.none,t.from,t.to),J.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if(ku(e,n.tag)&&(n.namespace===void 0||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(t===!1)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let i=r?this.styles.indexOf(r)+1:0;i<this.styles.length;i++){let r=this.styles[i],a=r.style;if(!(a.indexOf(e)!=0||r.context&&!n.matchesContext(r.context)||a.length>e.length&&(a.charCodeAt(e.length)!=61||a.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(e===!1)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=e.priority==null?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((e.priority==null?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Au(e)),e.mark||e.ignore||e.clearMark||(e.mark=t)})}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach(e=>{n(e=Au(e)),e.node||e.ignore||e.mark||(e.node=t)})}return t}static fromSchema(t){return t.cached.domParser||(t.cached.domParser=new e(t,e.schemaRules(t)))}},yu={address:!0,article:!0,aside:!0,blockquote:!0,body:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},bu={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},xu={ol:!0,ul:!0},Su=1,Cu=2,wu=4;function Tu(e,t,n){return t==null?e&&e.whitespace==`pre`?3:n&-5:(t?Su:0)|(t===`full`?Cu:0)}var Eu=class{constructor(e,t,n,r,i,a){this.type=e,this.attrs=t,this.marks=n,this.solid=r,this.options=a,this.content=[],this.activeMarks=Sl.none,this.match=i||(a&wu?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(q.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let t=this.type.contentMatch,n;return(n=t.findWrapping(e.type))?(this.match=t,n):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&Su)){let e=this.content[this.content.length-1],t;if(e&&e.isText&&(t=/[ \t\r\n\u000c]+$/.exec(e.text))){let n=e;e.text.length==t[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-t[0].length))}}let t=q.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(q.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!yu.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}},Du=class{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0,this.localPreserveWS=!1;let r=t.topNode,i,a=Tu(null,t.preserveWhitespace,0)|(n?wu:0);i=r?new Eu(r.type,r.attrs,Sl.none,!0,t.topMatch||r.type.contentMatch,a):n?new Eu(null,null,Sl.none,!0,null,a):new Eu(e.schema.topNodeType,null,Sl.none,!0,null,a),this.nodes=[i],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e,t){e.nodeType==3?this.addTextNode(e,t):e.nodeType==1&&this.addElement(e,t)}addTextNode(e,t){let n=e.nodeValue,r=this.top,i=r.options&Cu?`full`:this.localPreserveWS||(r.options&Su)>0,{schema:a}=this.parser;if(i===`full`||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(n)){if(!i){if(n=n.replace(/[ \t\r\n\u000c]+/g,` `),/^[ \t\r\n\u000c]/.test(n)&&this.open==this.nodes.length-1){let t=r.content[r.content.length-1],i=e.previousSibling;(!t||i&&i.nodeName==`BR`||t.isText&&/[ \t\r\n\u000c]$/.test(t.text))&&(n=n.slice(1))}}else if(i===`full`)n=n.replace(/\r\n?/g,`
|
|
13
|
+
`);else if(a.linebreakReplacement&&/[\r\n]/.test(n)&&this.top.findWrapping(a.linebreakReplacement.create())){let e=n.split(/\r?\n|\r/);for(let n=0;n<e.length;n++)n&&this.insertNode(a.linebreakReplacement.create(),t,!0),e[n]&&this.insertNode(a.text(e[n]),t,!/\S/.test(e[n]));n=``}else n=n.replace(/\r?\n|\r/g,` `);n&&this.insertNode(a.text(n),t,!/\S/.test(n)),this.findInText(e)}else this.findInside(e)}addElement(e,t,n){let r=this.localPreserveWS,i=this.top;(e.tagName==`PRE`||/pre/.test(e.style&&e.style.whiteSpace))&&(this.localPreserveWS=!0);let a=e.nodeName.toLowerCase(),o;xu.hasOwnProperty(a)&&this.parser.normalizeLists&&Ou(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(o=this.parser.matchTag(e,this,n));out:if(s?s.ignore:bu.hasOwnProperty(a))this.findInside(e),this.ignoreFallback(e,t);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let n,r=this.needsBlock;if(yu.hasOwnProperty(a))i.content.length&&i.content[0].isInline&&this.open&&(this.open--,i=this.top),n=!0,i.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e,t);break out}let o=s&&s.skip?t:this.readStyles(e,t);o&&this.addAll(e,o),n&&this.sync(i),this.needsBlock=r}else{let n=this.readStyles(e,t);n&&this.addElementByRule(e,s,n,s.consuming===!1?o:void 0)}this.localPreserveWS=r}leafFallback(e,t){e.nodeName==`BR`&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
|
|
14
|
+
`),t)}ignoreFallback(e,t){e.nodeName!=`BR`||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text(`-`),t,!0)}readStyles(e,t){let n=e.style;if(n&&n.length)for(let e=0;e<this.parser.matchedStyles.length;e++){let r=this.parser.matchedStyles[e],i=n.getPropertyValue(r);if(i)for(let e;;){let n=this.parser.matchStyle(r,i,this,e);if(!n)break;if(n.ignore)return null;if(t=n.clearMark?t.filter(e=>!n.clearMark(e)):t.concat(this.parser.schema.marks[n.mark].create(n.attrs)),n.consuming===!1)e=n;else break}}return t}addElementByRule(e,t,n,r){let i,a;if(t.node){if(a=this.parser.schema.nodes[t.node],a.isLeaf)this.insertNode(a.create(t.attrs),n,e.nodeName==`BR`)||this.leafFallback(e,n);else{let e=this.enter(a,t.attrs||null,n,t.preserveWhitespace);e&&(i=!0,n=e)}}else{let e=this.parser.schema.marks[t.mark];n=n.concat(e.create(t.attrs))}let o=this.top;if(a&&a.isLeaf)this.findInside(e);else if(r)this.addElement(e,n,r);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach(e=>this.insertNode(e,n,!1));else{let r=e;typeof t.contentElement==`string`?r=e.querySelector(t.contentElement):typeof t.contentElement==`function`?r=t.contentElement(e):t.contentElement&&(r=t.contentElement),this.findAround(e,r,!0),this.addAll(r,n),this.findAround(e,r,!1)}i&&this.sync(o)&&this.open--}addAll(e,t,n,r){let i=n||0;for(let a=n?e.childNodes[n]:e.firstChild,o=r==null?null:e.childNodes[r];a!=o;a=a.nextSibling,++i)this.findAtPoint(e,i),this.addDOM(a,t);this.findAtPoint(e,i)}findPlace(e,t,n){let r,i;for(let t=this.open,a=0;t>=0;t--){let o=this.nodes[t],s=o.findWrapping(e);if(s&&(!r||r.length>s.length+a)&&(r=s,i=o,!s.length))break;if(o.solid){if(n)break;a+=2}}if(!r)return null;this.sync(i);for(let e=0;e<r.length;e++)t=this.enterInner(r[e],null,t,!1);return t}insertNode(e,t,n){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&(t=this.enterInner(e,null,t))}let r=this.findPlace(e,t,n);if(r){this.closeExtra();let t=this.top;t.match&&=t.match.matchType(e.type);let n=Sl.none;for(let i of r.concat(e.marks))(t.type?t.type.allowsMarkType(i.type):ju(i.type,e.type))&&(n=i.addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n,r){let i=this.findPlace(e.create(t),n,!1);return i&&=this.enterInner(e,t,n,!0,r),i}enterInner(e,t,n,r=!1,i){this.closeExtra();let a=this.top;a.match=a.match&&a.match.matchType(e);let o=Tu(e,i,a.options);a.options&wu&&a.content.length==0&&(o|=wu);let s=Sl.none;return n=n.filter(t=>!(a.type?a.type.allowsMarkType(t.type):ju(t.type,e))||(s=t.addToSet(s),!1)),this.nodes.push(new Eu(e,t,s,r,null,o)),this.open++,n}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(!!(this.isOpen||this.options.topOpen))}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;else this.localPreserveWS&&(this.nodes[t].options|=Su);return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].pos==null&&e.nodeType==1&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)this.find[r].pos==null&&e.nodeType==1&&e.contains(this.find[r].node)&&t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf(`|`)>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split(`/`),n=this.options.context,r=!this.isOpen&&(!n||n.parent.type==this.nodes[0].type),i=-(n?n.depth+1:0)+ +!r,a=(e,o)=>{for(;e>=0;e--){let s=t[e];if(s==``){if(e==t.length-1||e==0)continue;for(;o>=i;o--)if(a(e-1,o))return!0;return!1}{let e=o>0||o==0&&r?this.nodes[o].type:n&&o>=i?n.node(o-i).type:null;if(!e||e.name!=s&&!e.isInGroup(s))return!1;o--}}return!0};return a(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}};function Ou(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=t.nodeType==1?t.nodeName.toLowerCase():null;e&&xu.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):e==`li`?n=t:e&&(n=null)}}function ku(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Au(e){let t={};for(let n in e)t[n]=e[n];return t}function ju(e,t){let n=t.schema.nodes;for(let r in n){let i=n[r];if(!i.allowsMarkType(e))continue;let a=[],o=e=>{a.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:i}=e.edge(n);if(r==t||a.indexOf(i)<0&&o(i))return!0}};if(o(i.contentMatch))return!0}}var Mu=class e{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||=Pu(t).createDocumentFragment();let r=n,i=[];return e.forEach(e=>{if(i.length||e.marks.length){let n=0,a=0;for(;n<i.length&&a<e.marks.length;){let t=e.marks[a];if(!this.marks[t.type.name])a++;else{if(!t.eq(i[n][0])||t.type.spec.spanning===!1)break;n++,a++}}for(;n<i.length;)r=i.pop()[1];for(;a<e.marks.length;){let n=e.marks[a++],o=this.serializeMark(n,e.isInline,t);o&&(i.push([n,r]),r.appendChild(o.dom),r=o.contentDOM||o.dom)}}r.appendChild(this.serializeNodeInner(e,t))}),n}serializeNodeInner(e,t){if(e.isText)return Pu(t).createTextNode(e.text);let{dom:n,contentDOM:r}=Ru(Pu(t),this.nodes[e.type.name](e),null,e.attrs);if(r){if(e.isLeaf)throw RangeError(`Content hole not allowed in a leaf node spec`);this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let i=this.serializeMark(e.marks[r],e.isInline,t);i&&((i.contentDOM||i.dom).appendChild(n),n=i.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Ru(Pu(n),r(e,t),null,e.attrs)}static renderSpec(e,t,n=null,r){return typeof t==`string`?{dom:e.createTextNode(t)}:Ru(e,t,n,r)}static fromSchema(t){return t.cached.domSerializer||(t.cached.domSerializer=new e(this.nodesFromSchema(t),this.marksFromSchema(t)))}static nodesFromSchema(e){let t=Nu(e.nodes);return t.text||=e=>e.text,t}static marksFromSchema(e){return Nu(e.marks)}};function Nu(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function Pu(e){return e.document||window.document}var Fu=new WeakMap;function Iu(e){let t=Fu.get(e);return t===void 0&&Fu.set(e,t=Lu(e)),t}function Lu(e){let t=null;function n(e){if(e&&typeof e==`object`){if(Array.isArray(e)){if(typeof e[0]==`string`)t||=[],t.push(e);else for(let t=0;t<e.length;t++)n(e[t])}else for(let t in e)n(e[t])}}return n(e),t}function Ru(e,t,n,r){if(t.nodeType==1)return{dom:t};if(t.dom&&t.dom.nodeType==1)return t;let i=t[0],a;if(typeof i!=`string`)throw RangeError(`Invalid array passed to renderSpec`);if(r&&(a=Iu(r))&&a.indexOf(t)>-1)throw RangeError(`Using an array from an attribute object as a DOM spec. This may be an attempted cross site scripting attack.`);let o=i.indexOf(` `);o>0&&(n=i.slice(0,o),i=i.slice(o+1));let s,c=n?e.createElementNS(n,i):e.createElement(i),l=t[1],u=1;if(l&&typeof l==`object`&&l.nodeType==null&&!Array.isArray(l)){u=2;for(let e in l)if(l[e]!=null){let t=e.indexOf(` `);t>0?c.setAttributeNS(e.slice(0,t),e.slice(t+1),l[e]):e==`style`&&c.style?c.style.cssText=l[e]:c.setAttribute(e,l[e])}}for(let i=u;i<t.length;i++){let a=t[i];if(a===0){if(i<t.length-1||i>u)throw RangeError(`Content hole must be the only child of its parent node`);return{dom:c,contentDOM:c}}if(typeof a==`string`)c.appendChild(e.createTextNode(a));else{let{dom:t,contentDOM:i}=Ru(e,a,n,r);if(c.appendChild(t),i){if(s)throw RangeError(`Multiple content holes`);s=i}}}return{dom:c,contentDOM:s}}var zu=65535,Bu=2**16;function Vu(e,t){return e+t*Bu}function Hu(e){return e&zu}function Uu(e){return(e-(e&zu))/Bu}var Wu=1,Gu=2,Ku=4,qu=8,Ju=class{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(this.delInfo&qu)>0}get deletedBefore(){return(this.delInfo&5)>0}get deletedAfter(){return(this.delInfo&6)>0}get deletedAcross(){return(this.delInfo&Ku)>0}},Yu=class e{constructor(t,n=!1){if(this.ranges=t,this.inverted=n,!t.length&&e.empty)return e.empty}recover(e){let t=0,n=Hu(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[e*3+2]-this.ranges[e*3+1];return this.ranges[n*3]+t+Uu(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,i=this.inverted?2:1,a=this.inverted?1:2;for(let o=0;o<this.ranges.length;o+=3){let s=this.ranges[o]-(this.inverted?r:0);if(s>e)break;let c=this.ranges[o+i],l=this.ranges[o+a],u=s+c;if(e<=u){let i=c?e==s?-1:e==u?1:t:t,a=s+r+(i<0?0:l);if(n)return a;let d=e==(t<0?s:u)?null:Vu(o/3,e-s),f=0;return c&&(f|=e==s?Gu:e==u?Wu:Ku,(t<0?e!=s:e!=u)&&(f|=qu)),new Ju(a,f,d)}r+=l-c}return n?e+r:new Ju(e+r,0,null)}touches(e,t){let n=0,r=Hu(t),i=this.inverted?2:1,a=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let o=this.ranges[t]-(this.inverted?n:0);if(o>e)break;let s=this.ranges[t+i];if(e<=o+s&&t==r*3)return!0;n+=this.ranges[t+a]-s}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,i=0;r<this.ranges.length;r+=3){let a=this.ranges[r],o=a-(this.inverted?i:0),s=a+(this.inverted?0:i),c=this.ranges[r+t],l=this.ranges[r+n];e(o,o+c,s,s+l),i+=l-c}}invert(){return new e(this.ranges,!this.inverted)}toString(){return(this.inverted?`-`:``)+JSON.stringify(this.ranges)}static offset(t){return t==0?e.empty:new e(t<0?[0,-t,0]:[0,0,t])}};Yu.empty=new Yu([]);var Xu=class e{constructor(e,t,n=0,r=e?e.length:0){this.mirror=t,this.from=n,this.to=r,this._maps=e||[],this.ownData=!(e||t)}get maps(){return this._maps}slice(t=0,n=this.maps.length){return new e(this._maps,this.mirror,t,n)}appendMap(e,t){this.ownData||=(this._maps=this._maps.slice(),this.mirror=this.mirror&&this.mirror.slice(),!0),this.to=this._maps.push(e),t!=null&&this.setMirror(this._maps.length-1,t)}appendMapping(e){for(let t=0,n=this._maps.length;t<e._maps.length;t++){let r=e.getMirror(t);this.appendMap(e._maps[t],r!=null&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror){for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}}setMirror(e,t){this.mirror||=[],this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this._maps.length+e._maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e._maps[t].invert(),r!=null&&r>t?n-r-1:void 0)}}invert(){let t=new e;return t.appendMappingInverted(this),t}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this._maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let i=this._maps[n].mapResult(e,t);if(i.recover!=null){let t=this.getMirror(n);if(t!=null&&t>n&&t<this.to){n=t,e=this._maps[t].recover(i.recover);continue}}r|=i.delInfo,e=i.pos}return n?e:new Ju(e,r,null)}},Zu=Object.create(null),Qu=class{getMap(){return Yu.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw RangeError(`Invalid input for Step.fromJSON`);let n=Zu[t.stepType];if(!n)throw RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Zu)throw RangeError(`Duplicate use of step JSON ID `+e);return Zu[e]=t,t.prototype.jsonID=e,t}},$u=class e{constructor(e,t){this.doc=e,this.failed=t}static ok(t){return new e(t,null)}static fail(t){return new e(null,t)}static fromReplace(t,n,r,i){try{return e.ok(t.replace(n,r,i))}catch(t){if(t instanceof Cl)return e.fail(t.message);throw t}}};function ed(e,t,n){let r=[];for(let i=0;i<e.childCount;i++){let a=e.child(i);a.content.size&&(a=a.copy(ed(a.content,t,a))),a.isInline&&(a=t(a,n,i)),r.push(a)}return q.fromArray(r)}var td=class e extends Qu{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),i=new J(ed(t.content,(e,t)=>!e.isAtom||!t.type.allowsMarkType(this.mark.type)?e:e.mark(this.mark.addToSet(e.marks)),r),t.openStart,t.openEnd);return $u.fromReplace(e,this.from,this.to,i)}invert(t){let n=[];return t.nodesBetween(this.from,this.to,(t,r)=>{if(t.isInline&&t.isAtom){let i=this.mark.addToSet(t.marks);if(!Sl.sameSet(i,t.marks)){let a=Math.max(this.from,r),o=Math.min(this.to,r+t.nodeSize);rd(nd,a,o,this.mark,n);for(let r of t.marks)r.isInSet(i)||rd(e,a,o,r,n)}}}),n.length==1?n[0]:new id(n)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`addMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for AddMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qu.jsonID(`addMark`,td);var nd=class e extends Qu{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new J(ed(t.content,e=>e.mark(this.mark.removeFromSet(e.marks)),e),t.openStart,t.openEnd);return $u.fromReplace(e,this.from,this.to,n)}invert(e){let t=[];return e.nodesBetween(this.from,this.to,(e,n)=>{e.isInline&&e.isAtom&&this.mark.isInSet(e.marks)&&rd(td,Math.max(this.from,n),Math.min(this.to,n+e.nodeSize),this.mark,t)}),t.length==1?t[0]:new id(t)}map(t){let n=t.map(this.from,1),r=t.map(this.to,-1);return n>=r?null:new e(n,r,this.mark)}merge(t){return t instanceof e&&t.mark.eq(this.mark)&&this.from<=t.to&&this.to>=t.from?new e(Math.min(this.from,t.from),Math.max(this.to,t.to),this.mark):null}toJSON(){return{stepType:`removeMark`,mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for RemoveMarkStep.fromJSON`);return new e(n.from,n.to,t.markFromJSON(n.mark))}};Qu.jsonID(`removeMark`,nd);function rd(e,t,n,r,i){let a=i.length?i[i.length-1]:null;a&&a instanceof e&&a.to==t&&a.mark.eq(r)?i[i.length-1]=new e(a.from,n,r):i.push(new e(t,n,r))}var id=class e extends Qu{constructor(e){super(),this.steps=e}apply(e){for(let t of this.steps){let n=t.apply(e);if(!n.doc)return n;e=n.doc}return new $u(e,null)}invert(t){return new e(this.steps.map(e=>e.invert(t)))}map(t){let n=[];for(let e of this.steps){let r=e.map(t);r&&n.push(r)}return n.length?new e(n):null}toJSON(){return{stepType:`markSet`,steps:this.steps.map(e=>e.toJSON())}}static fromJSON(t,n){if(!Array.isArray(n.steps)||!n.steps.every(e=>e.stepType==`addMark`||e.stepType==`removeMark`))throw RangeError(`Invalid JSON for MarkSetStep`);return new e(n.steps.map(e=>Qu.fromJSON(t,e)))}};Qu.jsonID(`markSet`,id);var ad=class e extends Qu{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $u.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.addToSet(t.marks));return $u.fromReplace(e,this.pos,this.pos+1,new J(q.from(n),0,+!t.isLeaf))}invert(t){let n=t.nodeAt(this.pos);if(n){let t=this.mark.addToSet(n.marks);if(t.length==n.marks.length){for(let r=0;r<n.marks.length;r++)if(!n.marks[r].isInSet(t))return new e(this.pos,n.marks[r]);return new e(this.pos,this.mark)}}return new od(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`addNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for AddNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Qu.jsonID(`addNodeMark`,ad);var od=class e extends Qu{constructor(e,t){super(),this.pos=e,this.mark=t}apply(e){let t=e.nodeAt(this.pos);if(!t)return $u.fail(`No node at mark step's position`);let n=t.type.create(t.attrs,null,this.mark.removeFromSet(t.marks));return $u.fromReplace(e,this.pos,this.pos+1,new J(q.from(n),0,+!t.isLeaf))}invert(e){let t=e.nodeAt(this.pos);return!t||!this.mark.isInSet(t.marks)?this:new ad(this.pos,this.mark)}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.mark)}toJSON(){return{stepType:`removeNodeMark`,pos:this.pos,mark:this.mark.toJSON()}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for RemoveNodeMarkStep.fromJSON`);return new e(n.pos,t.markFromJSON(n.mark))}};Qu.jsonID(`removeNodeMark`,od);var sd=class e extends Qu{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&ld(e,this.from,this.to)?$u.fail(`Structure replace would overwrite content`):$u.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Yu([this.from,this.to-this.from,this.slice.size])}invert(t){return new e(this.from,this.from+this.slice.size,t.slice(this.from,this.to))}map(t){let n=t.mapResult(this.to,-1),r=this.from==this.to&&e.MAP_BIAS<0?n:t.mapResult(this.from,1);return r.deletedAcross&&n.deletedAcross?null:new e(r.pos,Math.max(r.pos,n.pos),this.slice,this.structure)}merge(t){if(!(t instanceof e)||t.structure||this.structure)return null;if(this.from+this.slice.size==t.from&&!this.slice.openEnd&&!t.slice.openStart){let n=this.slice.size+t.slice.size==0?J.empty:new J(this.slice.content.append(t.slice.content),this.slice.openStart,t.slice.openEnd);return new e(this.from,this.to+(t.to-t.from),n,this.structure)}if(t.to==this.from&&!this.slice.openStart&&!t.slice.openEnd){let n=this.slice.size+t.slice.size==0?J.empty:new J(t.slice.content.append(this.slice.content),t.slice.openStart,this.slice.openEnd);return new e(t.from,this.to,n,this.structure)}return null}toJSON(){let e={stepType:`replace`,from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`)throw RangeError(`Invalid input for ReplaceStep.fromJSON`);return new e(n.from,n.to,J.fromJSON(t,n.slice),!!n.structure)}};sd.MAP_BIAS=1,Qu.jsonID(`replace`,sd);var cd=class e extends Qu{constructor(e,t,n,r,i,a,o=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=i,this.insert=a,this.structure=o}apply(e){if(this.structure&&(ld(e,this.from,this.gapFrom)||ld(e,this.gapTo,this.to)))return $u.fail(`Structure gap-replace would overwrite content`);let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return $u.fail(`Gap is not a flat range`);let n=this.slice.insertAt(this.insert,t.content);return n?$u.fromReplace(e,this.from,this.to,n):$u.fail(`Content does not fit in gap`)}getMap(){return new Yu([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(t){let n=this.gapTo-this.gapFrom;return new e(this.from,this.from+this.slice.size+n,this.from+this.insert,this.from+this.insert+n,t.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(t){let n=t.mapResult(this.from,1),r=t.mapResult(this.to,-1),i=this.from==this.gapFrom?n.pos:t.map(this.gapFrom,-1),a=this.to==this.gapTo?r.pos:t.map(this.gapTo,1);return n.deletedAcross&&r.deletedAcross||i<n.pos||a>r.pos||i>a?null:new e(n.pos,r.pos,i,a,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:`replaceAround`,from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(t,n){if(typeof n.from!=`number`||typeof n.to!=`number`||typeof n.gapFrom!=`number`||typeof n.gapTo!=`number`||typeof n.insert!=`number`)throw RangeError(`Invalid input for ReplaceAroundStep.fromJSON`);return new e(n.from,n.to,n.gapFrom,n.gapTo,J.fromJSON(t,n.slice),n.insert,!!n.structure)}};Qu.jsonID(`replaceAround`,cd);function ld(e,t,n){let r=e.resolve(t),i=n-t,a=r.depth;for(;i>0&&a>0&&r.indexAfter(a)==r.node(a).childCount;)a--,i--;if(i>0){let e=r.node(a).maybeChild(r.indexAfter(a));for(;i>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,i--}}return!1}function ud(e,t,n,r){let i=[];e.doc.nodesBetween(t,n,(e,a,o)=>{if(!e.isInline)return;let s=e.marks;!r.isInSet(s)&&o.type.allowsMarkType(r.type)&&rd(td,Math.max(a,t),Math.min(a+e.nodeSize,n),r,i)}),i.forEach(t=>e.step(t))}function dd(e,t,n,r){let i=[],a=0;e.doc.nodesBetween(t,n,(e,o)=>{if(!e.isInline||!e.isAtom)return;a++;let s=null;if(r instanceof pu){let t=e.marks,n;for(;n=r.isInSet(t);)(s||=[]).push(n),t=n.removeFromSet(t)}else r?r.isInSet(e.marks)&&(s=[r]):s=e.marks;if(s&&s.length){let r=Math.min(o+e.nodeSize,n);for(let e=0;e<s.length;e++){let n=s[e],c;for(let e=0;e<i.length;e++){let t=i[e];t.step==a-1&&n.eq(i[e].style)&&(c=t)}c?(c.to=r,c.step=a):i.push({style:n,from:Math.max(o,t),to:r,step:a})}}}),i.forEach(t=>e.step(new nd(t.from,t.to,t.style)))}function fd(e,t,n,r=n.contentMatch,i=!0){let a=e.doc.nodeAt(t),o=[],s=t+1;for(let t=0;t<a.childCount;t++){let c=a.child(t),l=s+c.nodeSize,u=r.matchType(c.type);if(!u)o.push(new sd(s,l,J.empty));else{r=u;for(let t=0;t<c.marks.length;t++)n.allowsMarkType(c.marks[t].type)||e.step(new nd(s,l,c.marks[t]));if(i&&c.isText&&n.whitespace!=`pre`){let e,t=/\r?\n|\r/g,r;for(;e=t.exec(c.text);)r||=new J(q.from(n.schema.text(` `,n.allowedMarks(c.marks))),0,0),o.push(new sd(s+e.index,s+e.index+e[0].length,r))}}s=l}if(!r.validEnd){let t=r.fillBefore(q.empty,!0);e.replace(s,s,new J(t,0,0))}for(let t=o.length-1;t>=0;t--)e.step(o[t])}function pd(e,t,n){return(t==0||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function md(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth,r=0,i=0;;--n){let a=e.$from.node(n),o=e.$from.index(n)+r,s=e.$to.indexAfter(n)-i;if(n<e.depth&&a.canReplace(o,s,t))return n;if(n==0||a.type.spec.isolating||!pd(a,o,s))break;o&&(r=1),s<a.childCount&&(i=1)}return null}function hd(e,t,n){let{$from:r,$to:i,depth:a}=t,o=r.before(a+1),s=i.after(a+1),c=o,l=s,u=q.empty,d=0;for(let e=a,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=q.from(r.node(e).copy(u)),d++):c--;let f=q.empty,p=0;for(let e=a,t=!1;e>n;e--)t||i.after(e+1)<i.end(e)?(t=!0,f=q.from(i.node(e).copy(f)),p++):l++;e.step(new cd(c,l,o,s,new J(u.append(f),d,p),u.size-d,!0))}function gd(e,t,n=null,r=e){let i=vd(e,t),a=i&&yd(r,t);return a?i.map(_d).concat({type:t,attrs:n}).concat(a.map(_d)):null}function _d(e){return{type:e,attrs:null}}function vd(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.contentMatchAt(r).findWrapping(t);if(!a)return null;let o=a.length?a[0]:t;return n.canReplaceWith(r,i,o)?a:null}function yd(e,t){let{parent:n,startIndex:r,endIndex:i}=e,a=n.child(r),o=t.contentMatch.findWrapping(a.type);if(!o)return null;let s=(o.length?o[o.length-1]:t).contentMatch;for(let e=r;s&&e<i;e++)s=s.matchType(n.child(e).type);return!s||!s.validEnd?null:o}function bd(e,t,n){let r=q.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw RangeError(`Wrapper type given to Transform.wrap does not form valid content of its parent wrapper`)}r=q.from(n[e].type.create(n[e].attrs,r))}let i=t.start,a=t.end;e.step(new cd(i,a,i,a,new J(r,0,0),n.length,!0))}function xd(e,t,n,r,i){if(!r.isTextblock)throw RangeError(`Type given to setBlockType should be a textblock`);let a=e.steps.length;e.doc.nodesBetween(t,n,(t,n)=>{let o=typeof i==`function`?i(t):i;if(t.isTextblock&&!t.hasMarkup(r,o)&&wd(e.doc,e.mapping.slice(a).map(n),r)){let i=null;if(r.schema.linebreakReplacement){let e=r.whitespace==`pre`,t=!!r.contentMatch.matchType(r.schema.linebreakReplacement);e&&!t?i=!1:!e&&t&&(i=!0)}i===!1&&Cd(e,t,n,a),fd(e,e.mapping.slice(a).map(n,1),r,void 0,i===null);let s=e.mapping.slice(a),c=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new cd(c,l,c+1,l-1,new J(q.from(r.create(o,null,t.marks)),0,0),1,!0)),i===!0&&Sd(e,t,n,a),!1}})}function Sd(e,t,n,r){t.forEach((i,a)=>{if(i.isText){let o,s=/\r?\n|\r/g;for(;o=s.exec(i.text);){let i=e.mapping.slice(r).map(n+1+a+o.index);e.replaceWith(i,i+1,t.type.schema.linebreakReplacement.create())}}})}function Cd(e,t,n,r){t.forEach((i,a)=>{if(i.type==i.type.schema.linebreakReplacement){let i=e.mapping.slice(r).map(n+1+a);e.replaceWith(i,i+1,t.type.schema.text(`
|
|
15
|
+
`))}})}function wd(e,t,n){let r=e.resolve(t),i=r.index();return r.parent.canReplaceWith(i,i+1,n)}function Td(e,t,n,r,i){let a=e.doc.nodeAt(t);if(!a)throw RangeError(`No node at given position`);n||=a.type;let o=n.create(r,null,i||a.marks);if(a.isLeaf)return e.replaceWith(t,t+a.nodeSize,o);if(!n.validContent(a.content))throw RangeError(`Invalid content for node type `+n.name);e.step(new cd(t,t+a.nodeSize,t+1,t+a.nodeSize-1,new J(q.from(o),0,0),1,!0))}function Ed(e,t,n=1,r){let i=e.resolve(t),a=i.depth-n,o=r&&r[r.length-1]||i.parent;if(a<0||i.parent.type.spec.isolating||!i.parent.canReplace(i.index(),i.parent.childCount)||!o.type.validContent(i.parent.content.cutByIndex(i.index(),i.parent.childCount)))return!1;for(let e=i.depth-1,t=n-2;e>a;e--,t--){let n=i.node(e),a=i.index(e);if(n.type.spec.isolating)return!1;let o=n.content.cutByIndex(a,n.childCount),s=r&&r[t+1];s&&(o=o.replaceChild(0,s.type.create(s.attrs)));let c=r&&r[t]||n;if(!n.canReplace(a+1,n.childCount)||!c.type.validContent(o))return!1}let s=i.indexAfter(a),c=r&&r[0];return i.node(a).canReplaceWith(s,s,c?c.type:i.node(a+1).type)}function Dd(e,t,n=1,r){let i=e.doc.resolve(t),a=q.empty,o=q.empty;for(let e=i.depth,t=i.depth-n,s=n-1;e>t;e--,s--){a=q.from(i.node(e).copy(a));let t=r&&r[s];o=q.from(t?t.type.create(t.attrs,o):i.node(e).copy(o))}e.step(new sd(t,t,new J(a.append(o),n,n),!0))}function Od(e,t){let n=e.resolve(t),r=n.index();return Ad(n.nodeBefore,n.nodeAfter)&&n.parent.canReplace(r,r+1)}function kd(e,t){t.content.size||e.type.compatibleContent(t.type);let n=e.contentMatchAt(e.childCount),{linebreakReplacement:r}=e.type.schema;for(let i=0;i<t.childCount;i++){let a=t.child(i),o=a.type==r?e.type.schema.nodes.text:a.type;if(n=n.matchType(o),!n||!e.type.allowsMarks(a.marks))return!1}return n.validEnd}function Ad(e,t){return!!(e&&t&&!e.isLeaf&&kd(e,t))}function jd(e,t,n=-1){let r=e.resolve(t);for(let e=r.depth;;e--){let i,a,o=r.index(e);if(e==r.depth?(i=r.nodeBefore,a=r.nodeAfter):n>0?(i=r.node(e+1),o++,a=r.node(e).maybeChild(o)):(i=r.node(e).maybeChild(o-1),a=r.node(e+1)),i&&!i.isTextblock&&Ad(i,a)&&r.node(e).canReplace(o,o+1))return t;if(e==0)break;t=n<0?r.before(e):r.after(e)}}function Md(e,t,n){let r=null,{linebreakReplacement:i}=e.doc.type.schema,a=e.doc.resolve(t-n),o=a.node().type;if(i&&o.inlineContent){let e=o.whitespace==`pre`,t=!!o.contentMatch.matchType(i);e&&!t?r=!1:!e&&t&&(r=!0)}let s=e.steps.length;if(r===!1){let r=e.doc.resolve(t+n);Cd(e,r.node(),r.before(),s)}o.inlineContent&&fd(e,t+n-1,o,a.node().contentMatchAt(a.index()),r==null);let c=e.mapping.slice(s),l=c.map(t-n);if(e.step(new sd(l,c.map(t+n,-1),J.empty,!0)),r===!0){let t=e.doc.resolve(l);Sd(e,t.node(),t.before(),e.steps.length)}return e}function Nd(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(r.parentOffset==0)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}function Pd(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let i=n.content;for(let e=0;e<n.openStart;e++)i=i.firstChild.content;for(let e=1;e<=(n.openStart==0&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,a=r.index(t)+ +(n>0),o=r.node(t),s=!1;if(e==1)s=o.canReplace(a,a,i);else{let e=o.contentMatchAt(a).findWrapping(i.firstChild.type);s=e&&o.canReplaceWith(a,a,e[0])}if(s)return n==0?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}function Fd(e,t,n=t,r=J.empty){if(t==n&&!r.size)return null;let i=e.resolve(t),a=e.resolve(n);return Id(i,a,r)?new sd(t,n,r):new Ld(i,a,r).fit()}function Id(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}var Ld=class{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=q.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=q.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let i=this.placed,a=n.depth,o=r.depth;for(;a&&o&&i.childCount==1;)i=i.firstChild.content,a--,o--;let s=new J(i,a,o);return e>-1?new cd(n.pos,e,this.$to.pos,this.$to.end(),s,t):s.size||n.pos!=this.$to.pos?new sd(n.pos,r.pos,s):null}findFittable(){let e=this.unplaced.openStart;for(let t=this.unplaced.content,n=0,r=this.unplaced.openEnd;n<e;n++){let i=t.firstChild;if(t.childCount>1&&(r=0),i.type.spec.isolating&&r<=n){e=n;break}t=i.content}for(let t=1;t<=2;t++)for(let n=t==1?e:this.unplaced.openStart;n>=0;n--){let e,r=null;n?(r=Bd(this.unplaced.content,n-1).firstChild,e=r.content):e=this.unplaced.content;let i=e.firstChild;for(let e=this.depth;e>=0;e--){let{type:a,match:o}=this.frontier[e],s,c=null;if(t==1&&(i?o.matchType(i.type)||(c=o.fillBefore(q.from(i),!1)):r&&a.compatibleContent(r.type)))return{sliceDepth:n,frontierDepth:e,parent:r,inject:c};if(t==2&&i&&(s=o.findWrapping(i.type)))return{sliceDepth:n,frontierDepth:e,parent:r,wrap:s};if(r&&o.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced;return Gd(e,-1)<=t?!1:(this.unplaced.size>1&&Gd(e,1)>n&&n++,this.unplaced=new J(e,t+1,n),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=Bd(e,t);if(r.childCount<=1&&t>0){let i=e.size-t<=t+r.size;this.unplaced=new J(Rd(e,t-1,1),t-1,i?t-1:n)}else this.unplaced=new J(Rd(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:i}){for(;this.depth>t;)this.closeFrontierNode();if(i)for(let e=0;e<i.length;e++)this.openFrontierNode(i[e]);let a=this.unplaced,o=n?n.content:a.content,s=a.openStart-e,c=0,l=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)l.push(r.child(e));u=u.matchFragment(r)}let f=o.size+e-(a.content.size-a.openEnd);for(;c<o.childCount;){let e=o.child(c),t=u.matchType(e.type);if(!t)break;c++,(c>1||s==0||e.content.size)&&(u=t,l.push(Vd(e.mark(d.allowedMarks(e.marks)),c==1?s:0,c==o.childCount?f:-1)))}let p=c==o.childCount;p||(f=-1),this.placed=zd(this.placed,t,q.from(l)),this.frontier[t].match=u,p&&f<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=l[l.length-1];t&&e<f;e++)this.frontier.push({type:t.type,match:t.contentMatchAt(t.childCount)}),t=t.lastChild;this.unplaced=p?e==0?J.empty:new J(Rd(a.content,e-1,1),e-1,f<0?a.openEnd:e-1):new J(Rd(a.content,e,c),e,a.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e=this.frontier[this.depth],t;if(!e.type.isTextblock||!Hd(this.$to,this.$to.depth,e.type,e.match,!1)||this.$to.depth==this.depth&&(t=this.findCloseLevel(this.$to))&&t.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){scan:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],i=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),a=Hd(e,t,r,n,i);if(a){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],i=Hd(e,n,r,t,!0);if(!i||i.childCount)continue scan}return{depth:t,fit:a,move:i?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=zd(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=zd(this.placed,this.depth,q.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(q.empty,!0);e.childCount&&(this.placed=zd(this.placed,this.frontier.length,e))}};function Rd(e,t,n){return t==0?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(Rd(e.firstChild.content,t-1,n)))}function zd(e,t,n){return t==0?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(zd(e.lastChild.content,t-1,n)))}function Bd(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function Vd(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,Vd(r.firstChild,t-1,r.childCount==1?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(q.empty,!0)))),e.copy(r)}function Hd(e,t,n,r,i){let a=e.node(t),o=i?e.indexAfter(t):e.index(t);if(o==a.childCount&&!n.compatibleContent(a.type))return null;let s=r.fillBefore(a.content,!0,o);return s&&!Ud(n,a.content,o)?s:null}function Ud(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}function Wd(e){return e.spec.defining||e.spec.definingForContent}function Gd(e,t){for(let n=0;;n++){let r=t<0?e.firstChild:e.lastChild;if(!r||r.isAtom)return n;e=r.content}}function Kd(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let i=e.doc.resolve(t),a=e.doc.resolve(n);if(Id(i,a,r))return e.step(new sd(t,n,r));let o=Xd(i,a);o[o.length-1]==0&&o.pop();let s=-(i.depth+1);o.unshift(s);for(let e=i.depth,t=i.pos-1;e>0;e--,t--){let n=i.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;o.indexOf(e)>-1?s=e:i.before(e)==t&&o.splice(1,0,-e)}let c=o.indexOf(s),l=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(l.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=l[e],n=Wd(t.type);if(n&&!t.sameMarkup(i.node(Math.abs(s)-1)))u=e;else if(n||!t.type.isTextblock)break}for(let t=r.openStart;t>=0;t--){let s=(t+u+1)%(r.openStart+1),d=l[s];if(d)for(let t=0;t<o.length;t++){let l=o[(t+c)%o.length],u=!0;l<0&&(u=!1,l=-l);let f=i.node(l-1),p=i.index(l-1);if(f.canReplaceWith(p,p,d.type,d.marks))return e.replace(i.before(l),u?a.after(l):n,new J(qd(r.content,0,r.openStart,s),s,r.openEnd))}}let d=e.steps.length;for(let s=o.length-1;s>=0&&(e.replace(t,n,r),!(e.steps.length>d));s--){let e=o[s];e<0||(t=i.before(e),n=a.after(e))}}function qd(e,t,n,r,i){if(t<n){let i=e.firstChild;e=e.replaceChild(0,i.copy(qd(i.content,t+1,n,r,i)))}if(t>r){let t=i.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(q.empty,!0))}return e}function Jd(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let i=Nd(e.doc,t,r.type);i!=null&&(t=n=i)}e.replaceRange(t,n,new J(q.from(r),0,0))}function Yd(e,t,n){let r=e.doc.resolve(t),i=e.doc.resolve(n);if(r.parent.isTextblock&&i.parent.isTextblock&&r.start()!=i.start()&&r.parentOffset==0&&i.parentOffset==0){let a=r.sharedDepth(n),o=!1;for(let e=r.depth;e>a;e--)r.node(e).type.spec.isolating&&(o=!0);for(let e=i.depth;e>a;e--)i.node(e).type.spec.isolating&&(o=!0);if(!o){for(let e=r.depth;e>0&&t==r.start(e);e--)t=r.before(e);for(let e=i.depth;e>0&&n==i.start(e);e--)n=i.before(e);r=e.doc.resolve(t),i=e.doc.resolve(n)}}let a=Xd(r,i);for(let t=0;t<a.length;t++){let n=a[t],o=t==a.length-1;if(o&&n==0||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),i.end(n));if(n>0&&(o||r.node(n-1).canReplace(r.index(n-1),i.indexAfter(n-1))))return e.delete(r.before(n),i.after(n))}for(let a=1;a<=r.depth&&a<=i.depth;a++)if(t-r.start(a)==r.depth-a&&n>r.end(a)&&i.end(a)-n!=i.depth-a&&r.start(a-1)==i.start(a-1)&&r.node(a-1).canReplace(r.index(a-1),i.index(a-1)))return e.delete(r.before(a),n);e.delete(t,n)}function Xd(e,t){let n=[],r=Math.min(e.depth,t.depth);for(let i=r;i>=0;i--){let r=e.start(i);if(r<e.pos-(e.depth-i)||t.end(i)>t.pos+(t.depth-i)||e.node(i).type.spec.isolating||t.node(i).type.spec.isolating)break;(r==t.start(i)||i==e.depth&&i==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&i&&t.start(i-1)==r-1)&&n.push(i)}return n}var Zd=class e extends Qu{constructor(e,t,n){super(),this.pos=e,this.attr=t,this.value=n}apply(e){let t=e.nodeAt(this.pos);if(!t)return $u.fail(`No node at attribute step's position`);let n=Object.create(null);for(let e in t.attrs)n[e]=t.attrs[e];n[this.attr]=this.value;let r=t.type.create(n,null,t.marks);return $u.fromReplace(e,this.pos,this.pos+1,new J(q.from(r),0,+!t.isLeaf))}getMap(){return Yu.empty}invert(t){return new e(this.pos,this.attr,t.nodeAt(this.pos).attrs[this.attr])}map(t){let n=t.mapResult(this.pos,1);return n.deletedAfter?null:new e(n.pos,this.attr,this.value)}toJSON(){return{stepType:`attr`,pos:this.pos,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.pos!=`number`||typeof n.attr!=`string`)throw RangeError(`Invalid input for AttrStep.fromJSON`);return new e(n.pos,n.attr,n.value)}};Qu.jsonID(`attr`,Zd);var Qd=class e extends Qu{constructor(e,t){super(),this.attr=e,this.value=t}apply(e){let t=Object.create(null);for(let n in e.attrs)t[n]=e.attrs[n];t[this.attr]=this.value;let n=e.type.create(t,e.content,e.marks);return $u.ok(n)}getMap(){return Yu.empty}invert(t){return new e(this.attr,t.attrs[this.attr])}map(e){return this}toJSON(){return{stepType:`docAttr`,attr:this.attr,value:this.value}}static fromJSON(t,n){if(typeof n.attr!=`string`)throw RangeError(`Invalid input for DocAttrStep.fromJSON`);return new e(n.attr,n.value)}};Qu.jsonID(`docAttr`,Qd);var $d=class extends Error{};$d=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},$d.prototype=Object.create(Error.prototype),$d.prototype.constructor=$d,$d.prototype.name=`TransformError`;var ef=class{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Xu}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new $d(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}changedRange(){let e=1e9,t=-1e9;for(let n=0;n<this.mapping.maps.length;n++){let r=this.mapping.maps[n];n&&(e=r.map(e,1),t=r.map(t,-1)),r.forEach((n,r,i,a)=>{e=Math.min(e,i),t=Math.max(t,a)})}return e==1e9?null:{from:e,to:t}}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=J.empty){let r=Fd(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new J(q.from(n),0,0))}delete(e,t){return this.replace(e,t,J.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return Kd(this,e,t,n),this}replaceRangeWith(e,t,n){return Jd(this,e,t,n),this}deleteRange(e,t){return Yd(this,e,t),this}lift(e,t){return hd(this,e,t),this}join(e,t=1){return Md(this,e,t),this}wrap(e,t){return bd(this,e,t),this}setBlockType(e,t=e,n,r=null){return xd(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r){return Td(this,e,t,n,r),this}setNodeAttribute(e,t,n){return this.step(new Zd(e,t,n)),this}setDocAttribute(e,t){return this.step(new Qd(e,t)),this}addNodeMark(e,t){return this.step(new ad(e,t)),this}removeNodeMark(e,t){let n=this.doc.nodeAt(e);if(!n)throw RangeError(`No node at position `+e);if(t instanceof Sl)t.isInSet(n.marks)&&this.step(new od(e,t));else{let r=n.marks,i,a=[];for(;i=t.isInSet(r);)a.push(new od(e,i)),r=i.removeFromSet(r);for(let e=a.length-1;e>=0;e--)this.step(a[e])}return this}split(e,t=1,n){return Dd(this,e,t,n),this}addMark(e,t,n){return ud(this,e,t,n),this}removeMark(e,t,n){return dd(this,e,t,n),this}clearIncompatible(e,t,n){return fd(this,e,t,n),this}},tf=Object.create(null),Y=class{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new nf(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=J.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let i=e.steps.length,a=this.ranges;for(let o=0;o<a.length;o++){let{$from:s,$to:c}=a[o],l=e.mapping.slice(i);e.replaceRange(l.map(s.pos),l.map(c.pos),o?J.empty:t),o==0&&ff(e,i,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n),c=s.map(a.pos),l=s.map(o.pos);i?e.deleteRange(c,l):(e.replaceRangeWith(c,l,t),ff(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new X(e):df(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let i=t<0?df(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):df(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(i)return i}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new lf(e.node(0))}static atStart(e){return df(e,e,0,0,1)||new lf(e)}static atEnd(e){return df(e,e,e.content.size,e.childCount,-1)||new lf(e)}static fromJSON(e,t){if(!t||!t.type)throw RangeError(`Invalid input for Selection.fromJSON`);let n=tf[t.type];if(!n)throw RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in tf)throw RangeError(`Duplicate use of selection JSON ID `+e);return tf[e]=t,t.prototype.jsonID=e,t}getBookmark(){return X.between(this.$anchor,this.$head).getBookmark()}};Y.prototype.visible=!0;var nf=class{constructor(e,t){this.$from=e,this.$to=t}},rf=!1;function af(e){!rf&&!e.parent.inlineContent&&(rf=!0,console.warn(`TextSelection endpoint not pointing into a node with inline content (`+e.parent.type.name+`)`))}var X=class e extends Y{constructor(e,t=e){af(e),af(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(t,n){let r=t.resolve(n.map(this.head));if(!r.parent.inlineContent)return Y.near(r);let i=t.resolve(n.map(this.anchor));return new e(i.parent.inlineContent?i:r,r)}replace(e,t=J.empty){if(super.replace(e,t),t==J.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(t){return t instanceof e&&t.anchor==this.anchor&&t.head==this.head}getBookmark(){return new of(this.anchor,this.head)}toJSON(){return{type:`text`,anchor:this.anchor,head:this.head}}static fromJSON(t,n){if(typeof n.anchor!=`number`||typeof n.head!=`number`)throw RangeError(`Invalid input for TextSelection.fromJSON`);return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(t,n,r){let i=t.pos-n.pos;if((!r||i)&&(r=i>=0?1:-1),!n.parent.inlineContent){let e=Y.findFrom(n,r,!0)||Y.findFrom(n,-r,!0);if(e)n=e.$head;else return Y.near(n,r)}return t.parent.inlineContent||(i==0?t=n:(t=(Y.findFrom(t,-r,!0)||Y.findFrom(t,r,!0)).$anchor,t.pos<n.pos!=i<0&&(t=n))),new e(t,n)}};Y.jsonID(`text`,X);var of=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){return X.between(e.resolve(this.anchor),e.resolve(this.head))}},sf=class e extends Y{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(t,n){let{deleted:r,pos:i}=n.mapResult(this.anchor),a=t.resolve(i);return r?Y.near(a):new e(a)}content(){return new J(q.from(this.node),0,0)}eq(t){return t instanceof e&&t.anchor==this.anchor}toJSON(){return{type:`node`,anchor:this.anchor}}getBookmark(){return new cf(this.anchor)}static fromJSON(t,n){if(typeof n.anchor!=`number`)throw RangeError(`Invalid input for NodeSelection.fromJSON`);return new e(t.resolve(n.anchor))}static create(t,n){return new e(t.resolve(n))}static isSelectable(e){return!e.isText&&e.type.spec.selectable!==!1}};sf.prototype.visible=!1,Y.jsonID(`node`,sf);var cf=class e{constructor(e){this.anchor=e}map(t){let{deleted:n,pos:r}=t.mapResult(this.anchor);return n?new of(r,r):new e(r)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&sf.isSelectable(n)?new sf(t):Y.near(t)}},lf=class e extends Y{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=J.empty){if(t==J.empty){e.delete(0,e.doc.content.size);let t=Y.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:`all`}}static fromJSON(t){return new e(t)}map(t){return new e(t)}eq(t){return t instanceof e}getBookmark(){return uf}};Y.jsonID(`all`,lf);var uf={map(){return this},resolve(e){return new lf(e)}};function df(e,t,n,r,i,a=!1){if(t.inlineContent)return X.create(e,n);for(let o=r-(i>0?0:1);i>0?o<t.childCount:o>=0;o+=i){let r=t.child(o);if(!r.isAtom){let t=df(e,r,n+i,i<0?r.childCount:0,i,a);if(t)return t}else if(!a&&sf.isSelectable(r))return sf.create(e,n-(i<0?r.nodeSize:0));n+=r.nodeSize*i}return null}function ff(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof sd||i instanceof cd))return;let a=e.mapping.maps[r],o;a.forEach((e,t,n,r)=>{o??=r}),e.setSelection(Y.near(e.doc.resolve(o),n))}var pf=1,mf=2,hf=4,gf=class extends ef{constructor(e){super(e.doc),this.curSelectionFor=0,this.updated=0,this.meta=Object.create(null),this.time=Date.now(),this.curSelection=e.selection,this.storedMarks=e.storedMarks}get selection(){return this.curSelectionFor<this.steps.length&&(this.curSelection=this.curSelection.map(this.doc,this.mapping.slice(this.curSelectionFor)),this.curSelectionFor=this.steps.length),this.curSelection}setSelection(e){if(e.$from.doc!=this.doc)throw RangeError(`Selection passed to setSelection must point at the current document`);return this.curSelection=e,this.curSelectionFor=this.steps.length,this.updated=(this.updated|pf)&-3,this.storedMarks=null,this}get selectionSet(){return(this.updated&pf)>0}setStoredMarks(e){return this.storedMarks=e,this.updated|=mf,this}ensureMarks(e){return Sl.sameSet(this.storedMarks||this.selection.$from.marks(),e)||this.setStoredMarks(e),this}addStoredMark(e){return this.ensureMarks(e.addToSet(this.storedMarks||this.selection.$head.marks()))}removeStoredMark(e){return this.ensureMarks(e.removeFromSet(this.storedMarks||this.selection.$head.marks()))}get storedMarksSet(){return(this.updated&mf)>0}addStep(e,t){super.addStep(e,t),this.updated&=-3,this.storedMarks=null}setTime(e){return this.time=e,this}replaceSelection(e){return this.selection.replace(this,e),this}replaceSelectionWith(e,t=!0){let n=this.selection;return t&&(e=e.mark(this.storedMarks||(n.empty?n.$from.marks():n.$from.marksAcross(n.$to)||Sl.none))),n.replaceWith(this,e),this}deleteSelection(){return this.selection.replace(this),this}insertText(e,t,n){let r=this.doc.type.schema;if(t==null)return e?this.replaceSelectionWith(r.text(e),!0):this.deleteSelection();{if(n??=t,!e)return this.deleteRange(t,n);let i=this.storedMarks;if(!i){let e=this.doc.resolve(t);i=n==t?e.marks():e.marksAcross(this.doc.resolve(n))}return this.replaceRangeWith(t,n,r.text(e,i)),!this.selection.empty&&this.selection.to==t+e.length&&this.setSelection(Y.near(this.selection.$to)),this}}setMeta(e,t){return this.meta[typeof e==`string`?e:e.key]=t,this}getMeta(e){return this.meta[typeof e==`string`?e:e.key]}get isGeneric(){for(let e in this.meta)return!1;return!0}scrollIntoView(){return this.updated|=hf,this}get scrolledIntoView(){return(this.updated&hf)>0}};function _f(e,t){return!t||!e?e:e.bind(t)}var vf=class{constructor(e,t,n){this.name=e,this.init=_f(t.init,n),this.apply=_f(t.apply,n)}},yf=[new vf(`doc`,{init(e){return e.doc||e.schema.topNodeType.createAndFill()},apply(e){return e.doc}}),new vf(`selection`,{init(e,t){return e.selection||Y.atStart(t.doc)},apply(e){return e.selection}}),new vf(`storedMarks`,{init(e){return e.storedMarks||null},apply(e,t,n,r){return r.selection.$cursor?e.storedMarks:null}}),new vf(`scrollToSelection`,{init(){return 0},apply(e,t){return e.scrolledIntoView?t+1:t}})],bf=class{constructor(e,t){this.schema=e,this.plugins=[],this.pluginsByKey=Object.create(null),this.fields=yf.slice(),t&&t.forEach(e=>{if(this.pluginsByKey[e.key])throw RangeError(`Adding different instances of a keyed plugin (`+e.key+`)`);this.plugins.push(e),this.pluginsByKey[e.key]=e,e.spec.state&&this.fields.push(new vf(e.key,e.spec.state,e))})}},xf=class e{constructor(e){this.config=e}get schema(){return this.config.schema}get plugins(){return this.config.plugins}apply(e){return this.applyTransaction(e).state}filterTransaction(e,t=-1){for(let n=0;n<this.config.plugins.length;n++)if(n!=t){let t=this.config.plugins[n];if(t.spec.filterTransaction&&!t.spec.filterTransaction.call(t,e,this))return!1}return!0}applyTransaction(e){if(!this.filterTransaction(e))return{state:this,transactions:[]};let t=[e],n=this.applyInner(e),r=null;for(;;){let i=!1;for(let a=0;a<this.config.plugins.length;a++){let o=this.config.plugins[a];if(o.spec.appendTransaction){let s=r?r[a].n:0,c=r?r[a].state:this,l=s<t.length&&o.spec.appendTransaction.call(o,s?t.slice(s):t,c,n);if(l&&n.filterTransaction(l,a)){if(l.setMeta(`appendedTransaction`,e),!r){r=[];for(let e=0;e<this.config.plugins.length;e++)r.push(e<a?{state:n,n:t.length}:{state:this,n:0})}t.push(l),n=n.applyInner(l),i=!0}r&&(r[a]={state:n,n:t.length})}}if(!i)return{state:n,transactions:t}}}applyInner(t){if(!t.before.eq(this.doc))throw RangeError(`Applying a mismatched transaction`);let n=new e(this.config),r=this.config.fields;for(let e=0;e<r.length;e++){let i=r[e];n[i.name]=i.apply(t,this[i.name],this,n)}return n}get tr(){return new gf(this)}static create(t){let n=new bf(t.doc?t.doc.type.schema:t.schema,t.plugins),r=new e(n);for(let e=0;e<n.fields.length;e++)r[n.fields[e].name]=n.fields[e].init(t,r);return r}reconfigure(t){let n=new bf(this.schema,t.plugins),r=n.fields,i=new e(n);for(let e=0;e<r.length;e++){let n=r[e].name;i[n]=this.hasOwnProperty(n)?this[n]:r[e].init(t,i)}return i}toJSON(e){let t={doc:this.doc.toJSON(),selection:this.selection.toJSON()};if(this.storedMarks&&(t.storedMarks=this.storedMarks.map(e=>e.toJSON())),e&&typeof e==`object`)for(let n in e){if(n==`doc`||n==`selection`)throw RangeError("The JSON fields `doc` and `selection` are reserved");let r=e[n],i=r.spec.state;i&&i.toJSON&&(t[n]=i.toJSON.call(r,this[r.key]))}return t}static fromJSON(t,n,r){if(!n)throw RangeError(`Invalid input for EditorState.fromJSON`);if(!t.schema)throw RangeError(`Required config field 'schema' missing`);let i=new bf(t.schema,t.plugins),a=new e(i);return i.fields.forEach(e=>{if(e.name==`doc`)a.doc=Hl.fromJSON(t.schema,n.doc);else if(e.name==`selection`)a.selection=Y.fromJSON(a.doc,n.selection);else if(e.name==`storedMarks`)n.storedMarks&&(a.storedMarks=n.storedMarks.map(t.schema.markFromJSON));else{if(r)for(let i in r){let o=r[i],s=o.spec.state;if(o.key==e.name&&s&&s.fromJSON&&Object.prototype.hasOwnProperty.call(n,i)){a[e.name]=s.fromJSON.call(o,t,n[i],a);return}}a[e.name]=e.init(t,a)}}),a}};function Sf(e,t,n){for(let r in e){let i=e[r];i instanceof Function?i=i.bind(t):r==`handleDOMEvents`&&(i=Sf(i,t,{})),n[r]=i}return n}var Cf=class{constructor(e){this.spec=e,this.props={},e.props&&Sf(e.props,this,this.props),this.key=e.key?e.key.key:Tf(`plugin`)}getState(e){return e[this.key]}},wf=Object.create(null);function Tf(e){return e in wf?e+`$`+ ++wf[e]:(wf[e]=0,e+`$`)}var Ef=class{constructor(e=`key`){this.key=Tf(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}},Df=t((e=>{var t=c();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function l(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,l=r[1];return o(function(){c.value=n,c.getSnapshot=t,u(c)&&l({inst:c})},[e,n,t]),a(function(){return u(c)&&l({inst:c}),e(function(){u(c)&&l({inst:c})})},[e]),s(n),n}function u(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function d(e,t){return t()}var f=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?d:l;e.useSyncExternalStore=t.useSyncExternalStore===void 0?f:t.useSyncExternalStore})),Of=t(((e,t)=>{t.exports=Df()})),kf=Of(),Af=Object.defineProperty,jf=(e,t)=>{let n={};for(var r in e)Af(n,r,{get:e[r],enumerable:!0});return t||Af(n,Symbol.toStringTag,{value:`Module`}),n},Mf=(e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0);function Nf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`backward`,e):n.parentOffset>0)?null:n}var Pf=(e,t,n)=>{let r=Nf(e,n);if(!r)return!1;let i=Bf(r);if(!i){let n=r.blockRange(),i=n&&md(n);return i!=null&&(t&&t(e.tr.lift(n,i).scrollIntoView()),!0)}let a=i.nodeBefore;if(ip(e,i,t,-1))return!0;if(r.parent.content.size==0&&(Rf(a,`end`)||sf.isSelectable(a)))for(let n=r.depth;;n--){let o=Fd(e.doc,r.before(n),r.after(n),J.empty);if(o&&o.slice.size<o.to-o.from){if(t){let n=e.tr.step(o);n.setSelection(Rf(a,`end`)?Y.findFrom(n.doc.resolve(n.mapping.map(i.pos,-1)),-1):sf.create(n.doc,i.pos-a.nodeSize)),t(n.scrollIntoView())}return!0}if(n==1||r.node(n-1).childCount>1)break}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos-a.nodeSize,i.pos).scrollIntoView()),!0):!1},Ff=(e,t,n)=>{let r=Nf(e,n);if(!r)return!1;let i=Bf(r);return i?Lf(e,i,t):!1},If=(e,t,n)=>{let r=Vf(e,n);if(!r)return!1;let i=Wf(r);return i?Lf(e,i,t):!1};function Lf(e,t,n){let r=t.nodeBefore,i=t.pos-1;for(;!r.isTextblock;i--){if(r.type.spec.isolating)return!1;let e=r.lastChild;if(!e)return!1;r=e}let a=t.nodeAfter,o=t.pos+1;for(;!a.isTextblock;o++){if(a.type.spec.isolating)return!1;let e=a.firstChild;if(!e)return!1;a=e}let s=Fd(e.doc,i,o,J.empty);if(!s||s.from!=i||s instanceof sd&&s.slice.size>=o-i)return!1;if(n){let t=e.tr.step(s);t.setSelection(X.create(t.doc,i)),n(t.scrollIntoView())}return!0}function Rf(e,t,n=!1){for(let r=e;r;r=t==`start`?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&r.childCount!=1)return!1}return!1}var zf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`backward`,e):r.parentOffset>0)return!1;a=Bf(r)}let o=a&&a.nodeBefore;return!o||!sf.isSelectable(o)?!1:(t&&t(e.tr.setSelection(sf.create(e.doc,a.pos-o.nodeSize)).scrollIntoView()),!0)};function Bf(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Vf(e,t){let{$cursor:n}=e.selection;return!n||(t?!t.endOfTextblock(`forward`,e):n.parentOffset<n.parent.content.size)?null:n}var Hf=(e,t,n)=>{let r=Vf(e,n);if(!r)return!1;let i=Wf(r);if(!i)return!1;let a=i.nodeAfter;if(ip(e,i,t,1))return!0;if(r.parent.content.size==0&&(Rf(a,`start`)||sf.isSelectable(a))){let n=Fd(e.doc,r.before(),r.after(),J.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Rf(a,`start`)?Y.findFrom(r.doc.resolve(r.mapping.map(i.pos)),1):sf.create(r.doc,r.mapping.map(i.pos))),t(r.scrollIntoView())}return!0}}return a.isAtom&&i.depth==r.depth-1?(t&&t(e.tr.delete(i.pos,i.pos+a.nodeSize).scrollIntoView()),!0):!1},Uf=(e,t,n)=>{let{$head:r,empty:i}=e.selection,a=r;if(!i)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock(`forward`,e):r.parentOffset<r.parent.content.size)return!1;a=Wf(r)}let o=a&&a.nodeAfter;return!o||!sf.isSelectable(o)?!1:(t&&t(e.tr.setSelection(sf.create(e.doc,a.pos)).scrollIntoView()),!0)};function Wf(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}var Gf=(e,t)=>{let n=e.selection,r=n instanceof sf,i;if(r){if(n.node.isTextblock||!Od(e.doc,n.from))return!1;i=n.from}else if(i=jd(e.doc,n.from,-1),i==null)return!1;if(t){let n=e.tr.join(i);r&&n.setSelection(sf.create(n.doc,i-e.doc.resolve(i).nodeBefore.nodeSize)),t(n.scrollIntoView())}return!0},Kf=(e,t)=>{let n=e.selection,r;if(n instanceof sf){if(n.node.isTextblock||!Od(e.doc,n.to))return!1;r=n.to}else if(r=jd(e.doc,n.to,1),r==null)return!1;return t&&t(e.tr.join(r).scrollIntoView()),!0},qf=(e,t)=>{let{$from:n,$to:r}=e.selection,i=n.blockRange(r),a=i&&md(i);return a!=null&&(t&&t(e.tr.lift(i,a).scrollIntoView()),!0)},Jf=(e,t)=>{let{$head:n,$anchor:r}=e.selection;return!n.parent.type.spec.code||!n.sameParent(r)?!1:(t&&t(e.tr.insertText(`
|
|
16
|
+
`).scrollIntoView()),!0)};function Yf(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Xf=(e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let i=n.node(-1),a=n.indexAfter(-1),o=Yf(i.contentMatchAt(a));if(!o||!i.canReplaceWith(a,a,o))return!1;if(t){let r=n.after(),i=e.tr.replaceWith(r,r,o.createAndFill());i.setSelection(Y.near(i.doc.resolve(r),1)),t(i.scrollIntoView())}return!0},Zf=(e,t)=>{let n=e.selection,{$from:r,$to:i}=n;if(n instanceof lf||r.parent.inlineContent||i.parent.inlineContent)return!1;let a=Yf(i.parent.contentMatchAt(i.indexAfter()));if(!a||!a.isTextblock)return!1;if(t){let n=(!r.parentOffset&&i.index()<i.parent.childCount?r:i).pos,o=e.tr.insert(n,a.createAndFill());o.setSelection(X.create(o.doc,n+1)),t(o.scrollIntoView())}return!0},Qf=(e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(Ed(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),i=r&&md(r);return i!=null&&(t&&t(e.tr.lift(r,i).scrollIntoView()),!0)};function $f(e){return(t,n)=>{if(t.selection instanceof sf&&t.selection.node.isBlock){let{$from:e}=t.selection;return!e.parentOffset||!Ed(t.doc,e.pos)?!1:(n&&n(t.tr.split(e.pos).scrollIntoView()),!0)}if(!t.selection.$from.depth)return!1;let r=t.tr;!t.selection.empty&&(t.selection instanceof X||t.selection instanceof lf)&&r.deleteSelection();let{$from:i}=r.selection,a=r.steps.length,o=[],s,c,l=!1,u=!1;for(let t=i.depth;;t--)if(i.node(t).isBlock){l=i.end(t)==i.pos+(i.depth-t),u=i.start(t)==i.pos-(i.depth-t),c=Yf(i.node(t-1).contentMatchAt(i.indexAfter(t-1)));let n=e&&e(i.parent,l,i);o.unshift(n||(l&&c?{type:c}:null)),s=t;break}else{if(t==1)return!1;o.unshift(null)}let d=i.pos,f=Ed(r.doc,d,o.length,o);if(f||=(o[0]=c?{type:c}:null,Ed(r.doc,d,o.length,o)),!f)return!1;if(r.split(d,o.length,o),!l&&u&&i.node(s).type!=c){let e=r.mapping.slice(a),t=e.map(i.before(s)),n=r.doc.resolve(t);c&&i.node(s-1).canReplaceWith(n.index(),n.index()+1,c)&&r.setNodeMarkup(e.map(i.before(s)),c)}return n&&n(r.scrollIntoView()),!0}}var ep=$f(),tp=(e,t)=>{let{$from:n,to:r}=e.selection,i,a=n.sharedDepth(r);return a!=0&&(i=n.before(a),t&&t(e.tr.setSelection(sf.create(e.doc,i))),!0)},np=(e,t)=>(t&&t(e.tr.setSelection(new lf(e.doc))),!0);function rp(e,t,n){let r=t.nodeBefore,i=t.nodeAfter,a=t.index();return!r||!i||!r.type.compatibleContent(i.type)?!1:!r.content.size&&t.parent.canReplace(a-1,a)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),!0):!t.parent.canReplace(a,a+1)||!(i.isTextblock||Od(e.doc,t.pos))?!1:(n&&n(e.tr.join(t.pos).scrollIntoView()),!0)}function ip(e,t,n,r){let i=t.nodeBefore,a=t.nodeAfter,o,s,c=i.type.spec.isolating||a.type.spec.isolating;if(!c&&rp(e,t,n))return!0;let l=!c&&t.parent.canReplace(t.index(),t.index()+1);if(l&&(o=(s=i.contentMatchAt(i.childCount)).findWrapping(a.type))&&s.matchType(o[0]||a.type).validEnd){if(n){let r=t.pos+a.nodeSize,s=q.empty;for(let e=o.length-1;e>=0;e--)s=q.from(o[e].create(null,s));s=q.from(i.copy(s));let c=e.tr.step(new cd(t.pos-1,r,t.pos,r,new J(s,1,0),o.length,!0)),l=c.doc.resolve(r+2*o.length);l.nodeAfter&&l.nodeAfter.type==i.type&&Od(c.doc,l.pos)&&c.join(l.pos),n(c.scrollIntoView())}return!0}let u=a.type.spec.isolating||r>0&&c?null:Y.findFrom(t,1),d=u&&u.$from.blockRange(u.$to),f=d&&md(d);if(f!=null&&f>=t.depth)return n&&n(e.tr.lift(d,f).scrollIntoView()),!0;if(l&&Rf(a,`start`,!0)&&Rf(i,`end`)){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let s=a,c=1;for(;!s.isTextblock;s=s.firstChild)c++;if(r.canReplace(r.childCount,r.childCount,s.content)){if(n){let r=q.empty;for(let e=o.length-1;e>=0;e--)r=q.from(o[e].copy(r));n(e.tr.step(new cd(t.pos-o.length,t.pos+a.nodeSize,t.pos+c,t.pos+a.nodeSize-c,new J(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function ap(e){return function(t,n){let r=t.selection,i=e<0?r.$from:r.$to,a=i.depth;for(;i.node(a).isInline;){if(!a)return!1;a--}return i.node(a).isTextblock?(n&&n(t.tr.setSelection(X.create(t.doc,e<0?i.start(a):i.end(a)))),!0):!1}}var op=ap(-1),sp=ap(1);function cp(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a),s=o&&gd(o,e,t);return s?(r&&r(n.tr.wrap(o,s).scrollIntoView()),!0):!1}}function lp(e,t=null){return function(n,r){let i=!1;for(let r=0;r<n.selection.ranges.length&&!i;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];n.doc.nodesBetween(a,o,(r,a)=>{if(i)return!1;if(r.isTextblock&&!r.hasMarkup(e,t)){if(r.type==e)i=!0;else{let t=n.doc.resolve(a),r=t.index();i=t.parent.canReplaceWith(r,r+1,e)}}})}if(!i)return!1;if(r){let i=n.tr;for(let r=0;r<n.selection.ranges.length;r++){let{$from:{pos:a},$to:{pos:o}}=n.selection.ranges[r];i.setBlockType(a,o,e,t)}r(i.scrollIntoView())}return!0}}function up(...e){return function(t,n,r){for(let i=0;i<e.length;i++)if(e[i](t,n,r))return!0;return!1}}var dp=up(Mf,Pf,zf),fp=up(Mf,Hf,Uf),pp={Enter:up(Jf,Zf,Qf,ep),"Mod-Enter":Xf,Backspace:dp,"Mod-Backspace":dp,"Shift-Backspace":dp,Delete:fp,"Mod-Delete":fp,"Mod-a":np},mp={"Ctrl-h":pp.Backspace,"Alt-Backspace":pp[`Mod-Backspace`],"Ctrl-d":pp.Delete,"Ctrl-Alt-Backspace":pp[`Mod-Delete`],"Alt-Delete":pp[`Mod-Delete`],"Alt-d":pp[`Mod-Delete`],"Ctrl-a":op,"Ctrl-e":sp};for(let e in pp)mp[e]=pp[e];typeof navigator<`u`?/Mac|iP(hone|[oa]d)/.test(navigator.platform):typeof os<`u`&&os.platform&&os.platform();function hp(e,t=null){return function(n,r){let{$from:i,$to:a}=n.selection,o=i.blockRange(a);if(!o)return!1;let s=r?n.tr:null;return gp(s,o,e,t)?(r&&r(s.scrollIntoView()),!0):!1}}function gp(e,t,n,r=null){let i=!1,a=t,o=t.$from.doc;if(t.depth>=2&&t.$from.node(t.depth-1).type.compatibleContent(n)&&t.startIndex==0){if(t.$from.index(t.depth-1)==0)return!1;let e=o.resolve(t.start-2);a=new Bl(e,e,t.depth),t.endIndex<t.parent.childCount&&(t=new Bl(t.$from,o.resolve(t.$to.end(t.depth)),t.depth)),i=!0}let s=gd(a,n,r,t);return s?(e&&_p(e,t,s,i,n),!0):!1}function _p(e,t,n,r,i){let a=q.empty;for(let e=n.length-1;e>=0;e--)a=q.from(n[e].type.create(n[e].attrs,a));e.step(new cd(t.start-(r?2:0),t.end,t.start,t.end,new J(a,0,0),n.length,!0));let o=0;for(let e=0;e<n.length;e++)n[e].type==i&&(o=e+1);let s=n.length-o,c=t.start+n.length-(r?2:0),l=t.parent;for(let n=t.startIndex,r=t.endIndex,i=!0;n<r;n++,i=!1)!i&&s&&Ed(e.doc,c,s)&&(e.split(c,s),c+=2*s),c+=l.child(n).nodeSize;return e}function vp(e,t){return e instanceof uu?t==e:e.indexOf(t)>-1}function yp(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&vp(e,t.firstChild.type));return a?n?vp(e,r.node(a.depth-1).type)?bp(t,n,a):xp(t,n,a):!0:!1}}function bp(e,t,n){let r=e.tr,i=n.end,a=n.$to.end(n.depth),o=n.parent.child(n.endIndex-1).type;i<a&&(r.step(new cd(i-1,a,i,a,new J(q.from(o.create(null,n.parent.copy())),1,0),1,!0)),n=new Bl(r.doc.resolve(n.$from.pos),r.doc.resolve(a),n.depth));let s=md(n);if(s==null)return!1;r.lift(n,s);let c=r.doc.resolve(r.mapping.map(i,-1)-1);return Od(r.doc,c.pos)&&c.nodeBefore.type==c.nodeAfter.type&&r.join(c.pos),t(r.scrollIntoView()),!0}function xp(e,t,n){let r=e.tr,i=n.parent;for(let e=n.end,t=n.endIndex-1,a=n.startIndex;t>a;t--)e-=i.child(t).nodeSize,r.delete(e-1,e+1);let a=r.doc.resolve(n.start),o=a.nodeAfter;if(r.mapping.map(n.end)!=n.start+a.nodeAfter.nodeSize)return!1;let s=n.startIndex==0,c=n.endIndex==i.childCount,l=a.node(-1),u=a.index(-1);if(!l.canReplace(u+ +!s,u+1,o.content.append(c?q.empty:q.from(i))))return!1;let d=a.pos,f=d+o.nodeSize;return r.step(new cd(d-+!!s,f+ +!!c,d+1,f-1,new J((s?q.empty:q.from(i.copy(q.empty))).append(c?q.empty:q.from(i.copy(q.empty))),+!s,+!c),+!s)),t(r.scrollIntoView()),!0}function Sp(e){return function(t,n){let{$from:r,$to:i}=t.selection,a=r.blockRange(i,t=>t.childCount>0&&vp(e,t.firstChild.type));if(!a)return!1;let o=a.startIndex;if(o==0)return!1;let s=a.parent,c=s.child(o-1);if(!vp(e,c.type))return!1;if(n){let e=c.lastChild&&c.lastChild.type==s.type,r=q.from(e?c.lastChild.lastChild.type.create():null),i=new J(q.from(c.type.create(null,q.from(s.type.create(null,r)))),e?3:1,0),o=a.start,l=a.end;n(t.tr.step(new cd(o-(e?3:1),l,o,l,i,1,!0)).scrollIntoView())}return!0}}var Cp=function(e){for(var t=0;;t++)if(e=e.previousSibling,!e)return t},wp=function(e){let t=e.assignedSlot||e.parentNode;return t&&t.nodeType==11?t.host:t},Tp=null,Ep=function(e,t,n){let r=Tp||=document.createRange();return r.setEnd(e,n??e.nodeValue.length),r.setStart(e,t||0),r},Dp=function(){Tp=null},Op=function(e,t,n,r){return n&&(Ap(e,t,n,r,-1)||Ap(e,t,n,r,1))},kp=/^(img|br|input|textarea|hr)$/i;function Ap(e,t,n,r,i){for(;;){if(e==n&&t==r)return!0;if(t==(i<0?0:jp(e))){let n=e.parentNode;if(!n||!Z(n)||Lp(e)||kp.test(e.nodeName)||e.contentEditable==`false`)return!1;t=Cp(e)+(i<0?0:1),e=n}else if(Z(e)){let n=e.childNodes[t+(i<0?-1:0)];if(Z(n)&&n.contentEditable==`false`){if(n.pmViewDesc?.ignoreForSelection)t+=i;else return!1}else e=n,t=i<0?jp(e):0}else return!1}}function jp(e){return e.nodeType==3?e.nodeValue.length:e.childNodes.length}function Z(e){return e.nodeType==1}function Mp(e){return e.nodeType==3}function Np(e,t){return t?e.contains(Z(t)?t:t.parentNode):!1}function Pp(e,t){for(;;){if(Mp(e)&&t)return e;if(Z(e)&&t>0){if(e.contentEditable==`false`)return null;e=e.childNodes[t-1],t=jp(e)}else if(e.parentNode&&!Lp(e))t=Cp(e),e=e.parentNode;else return null}}function Fp(e,t){for(;;){if(Mp(e)&&t<e.nodeValue.length)return e;if(Z(e)&&t<e.childNodes.length){if(e.contentEditable==`false`)return null;e=e.childNodes[t],t=0}else if(e.parentNode&&!Lp(e))t=Cp(e)+1,e=e.parentNode;else return null}}function Ip(e,t,n){for(let r=t==0,i=t==jp(e);r||i;){if(e==n)return!0;let t=Cp(e);if(e=e.parentNode,!e)return!1;r&&=t==0,i&&=t==jp(e)}}function Lp(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}var Rp=function(e){return e.focusNode&&Op(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)};function zp(e,t){let n=document.createEvent(`Event`);return n.initEvent(`keydown`,!0,!0),n.keyCode=e,n.key=n.code=t,n}function Bp(e){let t=e.activeElement;for(;t&&t.shadowRoot;)t=t.shadowRoot.activeElement;return t}function Vp(e,t,n){if(e.caretPositionFromPoint)try{let r=e.caretPositionFromPoint(t,n);if(r)return{node:r.offsetNode,offset:Math.min(jp(r.offsetNode),r.offset)}}catch{}if(e.caretRangeFromPoint){let r=e.caretRangeFromPoint(t,n);if(r)return{node:r.startContainer,offset:Math.min(jp(r.startContainer),r.startOffset)}}}var Hp=typeof navigator<`u`?navigator:null,Up=typeof document<`u`?document:null,Wp=Hp&&Hp.userAgent||``,Gp=/Edge\/(\d+)/.exec(Wp),Kp=/MSIE \d/.exec(Wp),qp=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Wp),Jp=!!(Kp||qp||Gp),Yp=Kp?document.documentMode:qp?+qp[1]:Gp?+Gp[1]:0,Xp=!Jp&&/gecko\/(\d+)/i.test(Wp);Xp&&+(/Firefox\/(\d+)/.exec(Wp)||[0,0])[1];var Zp=!Jp&&/Chrome\/(\d+)/.exec(Wp),Qp=!!Zp,$p=Zp?+Zp[1]:0,em=!Jp&&!!Hp&&/Apple Computer/.test(Hp.vendor),tm=em&&(/Mobile\/\w+/.test(Wp)||!!Hp&&Hp.maxTouchPoints>2),nm=tm||(Hp?/Mac/.test(Hp.platform):!1),rm=Hp?/Win/.test(Hp.platform):!1,im=/Android \d/.test(Wp),am=!!Up&&`webkitFontSmoothing`in Up.documentElement.style,om=am?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0;function sm(e){let t=e.defaultView&&e.defaultView.visualViewport;return t?{left:0,right:t.width,top:0,bottom:t.height}:{left:0,right:e.documentElement.clientWidth,top:0,bottom:e.documentElement.clientHeight}}function cm(e,t){return typeof e==`number`?e:e[t]}function lm(e){let t=e.getBoundingClientRect(),n=t.width/e.offsetWidth||1,r=t.height/e.offsetHeight||1;return{left:t.left,right:t.left+e.clientWidth*n,top:t.top,bottom:t.top+e.clientHeight*r}}function um(e,t,n){if(!Tm(t)&&t.left==0)return;let r=e.someProp(`scrollThreshold`)||0,i=e.someProp(`scrollMargin`)||5,a=e.dom.ownerDocument;for(let o=n||e.dom;o;){if(!Z(o)){o=wp(o);continue}let e=o==a.body,n=e?sm(a):lm(o),s=0,c=0;if(t.top<n.top+cm(r,`top`)?c=-(n.top-t.top+cm(i,`top`)):t.bottom>n.bottom-cm(r,`bottom`)&&(c=t.bottom-t.top>n.bottom-n.top?t.top+cm(i,`top`)-n.top:t.bottom-n.bottom+cm(i,`bottom`)),t.left<n.left+cm(r,`left`)?s=-(n.left-t.left+cm(i,`left`)):t.right>n.right-cm(r,`right`)&&(s=t.right-n.right+cm(i,`right`)),s||c){if(e)a.defaultView.scrollBy(s,c);else{let e=o.scrollLeft,n=o.scrollTop;c&&(o.scrollTop+=c),s&&(o.scrollLeft+=s);let r=o.scrollLeft-e,i=o.scrollTop-n;t={left:t.left-r,top:t.top-i,right:t.right-r,bottom:t.bottom-i}}}let l=e?`fixed`:getComputedStyle(o).position;if(/^(fixed|sticky)$/.test(l))break;o=l==`absolute`?o.offsetParent:wp(o)}}function dm(e){let t=e.dom.getBoundingClientRect(),n=Math.max(0,t.top),r,i;for(let a=(t.left+t.right)/2,o=n+1;o<Math.min(innerHeight,t.bottom);o+=5){let t=e.root.elementFromPoint(a,o);if(!t||t==e.dom||!e.dom.contains(t))continue;let s=t.getBoundingClientRect();if(s.top>=n-20){r=t,i=s.top;break}}return{refDOM:r,refTop:i,stack:fm(e.dom)}}function fm(e){let t=[],n=e.ownerDocument;for(let r=e;r&&(t.push({dom:r,top:r.scrollTop,left:r.scrollLeft}),e!=n);r=wp(r));return t}function pm({refDOM:e,refTop:t,stack:n}){let r=e?e.getBoundingClientRect().top:0;mm(n,r==0?0:r-t)}function mm(e,t){for(let n=0;n<e.length;n++){let{dom:r,top:i,left:a}=e[n];r.scrollTop!=i+t&&(r.scrollTop=i+t),r.scrollLeft!=a&&(r.scrollLeft=a)}}var hm=null;function gm(e){if(e.setActive)return e.setActive();if(hm)return e.focus(hm);let t=fm(e);e.focus(hm==null?{get preventScroll(){return hm={preventScroll:!0},!0}}:void 0),hm||(hm=!1,mm(t,0))}function _m(e,t){let n,r=2e8,i,a=0,o=t.top,s=t.top,c,l;for(let u=e.firstChild,d=0;u;u=u.nextSibling,d++){let e;if(Z(u))e=u.getClientRects();else if(Mp(u))e=Ep(u).getClientRects();else continue;for(let f=0;f<e.length;f++){let p=e[f];if(p.top<=o&&p.bottom>=s){o=Math.max(p.bottom,o),s=Math.min(p.top,s);let e=p.left>t.left?p.left-t.left:p.right<t.left?t.left-p.right:0;if(e<r){n=u,r=e,i=e&&Mp(n)?{left:p.right<t.left?p.right:p.left,top:t.top}:t,Z(u)&&e&&(a=d+ +(t.left>=(p.left+p.right)/2));continue}}else p.top>t.top&&!c&&p.left<=t.left&&p.right>=t.left&&(c=u,l={left:Math.max(p.left,Math.min(p.right,t.left)),top:p.top});!n&&(t.left>=p.right&&t.top>=p.top||t.left>=p.left&&t.top>=p.bottom)&&(a=d+1)}}return!n&&c&&(n=c,i=l,r=0),n&&Mp(n)?vm(n,i):!n||r?{node:e,offset:a}:_m(n,i)}function vm(e,t){let n=e.nodeValue.length,r=document.createRange(),i;for(let a=0;a<n;a++){r.setEnd(e,a+1),r.setStart(e,a);let n=Em(r,1);if(n.top!=n.bottom&&ym(t,n)){i={node:e,offset:a+ +(t.left>=(n.left+n.right)/2)};break}}return r.detach(),i||{node:e,offset:0}}function ym(e,t){return e.left>=t.left-1&&e.left<=t.right+1&&e.top>=t.top-1&&e.top<=t.bottom+1}function bm(e,t){let n=e.parentNode;return n&&/^li$/i.test(n.nodeName)&&t.left<e.getBoundingClientRect().left?n:e}function xm(e,t,n){let{node:r,offset:i}=_m(t,n),a=-1;if(Z(r)&&!r.firstChild){let e=r.getBoundingClientRect();a=e.left!=e.right&&n.left>(e.left+e.right)/2?1:-1}return e.docView.posFromDOM(r,i,a)}function Sm(e,t,n,r){let i=-1;for(let n=t,a=!1;n!=e.dom;){let t=e.docView.nearestDesc(n,!0),o;if(!t)return null;if(Z(t.dom)&&(t.node.isBlock&&t.parent||!t.contentDOM)&&((o=t.dom.getBoundingClientRect()).width||o.height)&&(t.node.isBlock&&t.parent&&!/^T(R|BODY|HEAD|FOOT)$/.test(t.dom.nodeName)&&(!a&&o.left>r.left||o.top>r.top?i=t.posBefore:(!a&&o.right<r.left||o.bottom<r.top)&&(i=t.posAfter),a=!0),!t.contentDOM&&i<0&&!t.node.isText))return(t.node.isBlock?r.top<(o.top+o.bottom)/2:r.left<(o.left+o.right)/2)?t.posBefore:t.posAfter;n=t.dom.parentNode}return i>-1?i:e.docView.posFromDOM(t,n,-1)}function Cm(e,t,n){let r=e.childNodes.length;if(r&&n.top<n.bottom)for(let i=Math.max(0,Math.min(r-1,Math.floor(r*(t.top-n.top)/(n.bottom-n.top))-2)),a=i;;){let n=e.childNodes[a];if(Z(n)){let e=n.getClientRects();for(let r=0;r<e.length;r++){let i=e[r];if(ym(t,i))return Cm(n,t,i)}}if((a=(a+1)%r)==i)break}return e}function wm(e,t){let n=e.dom.ownerDocument,r,i=0,a=Vp(n,t.left,t.top);a&&({node:r,offset:i}=a);let o=(e.root.elementFromPoint?e.root:n).elementFromPoint(t.left,t.top),s;if(!o||!e.dom.contains(o)){let n=e.dom.getBoundingClientRect();if(!ym(t,n)||(o=Cm(e.dom,t,n),!o))return null}if(em)for(let e=o;r&&e;e=wp(e))e.draggable&&(r=void 0);if(o=bm(o,t),r){if(Xp&&Z(r)&&(i=Math.min(i,r.childNodes.length),i<r.childNodes.length)){let e=r.childNodes[i],n;e.nodeName==`IMG`&&(n=e.getBoundingClientRect()).right<=t.left&&n.bottom>t.top&&i++}let n;am&&i&&Z(r)&&Z(n=r.childNodes[i-1])&&n.contentEditable==`false`&&n.getBoundingClientRect().top>=t.top&&i--,r==e.dom&&i==r.childNodes.length-1&&Z(r.lastChild)&&t.top>r.lastChild.getBoundingClientRect().bottom?s=e.state.doc.content.size:i!=0&&Z(r)&&r.childNodes[i-1].nodeName==`BR`||(s=Sm(e,r,i,t))}s??=xm(e,o,t);let c=e.docView.nearestDesc(o,!0);return{pos:s,inside:c?c.posAtStart-c.border:-1}}function Tm(e){return e.top<e.bottom||e.left<e.right}function Em(e,t){let n=e.getClientRects();if(n.length){let e=n[t<0?0:n.length-1];if(Tm(e))return e}return Array.prototype.find.call(n,Tm)||e.getBoundingClientRect()}var Dm=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/;function Om(e,t,n){let{node:r,offset:i,atom:a}=e.docView.domFromPos(t,n<0?-1:1),o=am||Xp;if(Mp(r)){if(o&&(Dm.test(r.nodeValue)||(n<0?!i:i==r.nodeValue.length))){let e=Em(Ep(r,i,i),n);if(Xp&&i&&/\s/.test(r.nodeValue[i-1])&&i<r.nodeValue.length){let t=Em(Ep(r,i-1,i-1),-1);if(t.top==e.top){let n=Em(Ep(r,i,i+1),-1);if(n.top!=e.top)return km(n,n.left<t.left)}}return e}{let e=i,t=i,a=n<0?1:-1;return n<0&&!i?(t++,a=-1):n>=0&&i==r.nodeValue.length?(e--,a=1):n<0?e--:t++,km(Em(Ep(r,e,t),a),a<0)}}if(!e.state.doc.resolve(t-(a||0)).parent.inlineContent){if(a==null&&i&&(n<0||i==jp(r))){let e=r.childNodes[i-1];if(Z(e))return Am(e.getBoundingClientRect(),!1)}if(a==null&&i<jp(r)){let e=r.childNodes[i];if(Z(e))return Am(e.getBoundingClientRect(),!0)}return Am(r.getBoundingClientRect(),n>=0)}if(a==null&&i&&(n<0||i==jp(r))){let e=r.childNodes[i-1],t=Mp(e)?Ep(e,jp(e)-+!o):Z(e)&&(e.nodeName!=`BR`||!e.nextSibling)?e:null;if(t)return km(Em(t,1),!1)}if(a==null&&i<jp(r)){let e=r.childNodes[i];for(;e.pmViewDesc&&e.pmViewDesc.ignoreForCoords;)e=e.nextSibling;let t=e?Mp(e)?Ep(e,0,+!o):Z(e)?e:null:null;if(t)return km(Em(t,-1),!0)}return km(Em(Mp(r)?Ep(r):r,-n),n>=0)}function km(e,t){if(e.width==0)return e;let n=t?e.left:e.right;return{top:e.top,bottom:e.bottom,left:n,right:n}}function Am(e,t){if(e.height==0)return e;let n=t?e.top:e.bottom;return{top:n,bottom:n,left:e.left,right:e.right}}function jm(e,t,n){let r=e.state,i=e.root.activeElement;r!=t&&e.updateState(t),i!=e.dom&&e.focus();try{return n()}finally{r!=t&&e.updateState(r),i!=e.dom&&i&&i.focus()}}function Mm(e,t,n){let r=t.selection,i=n==`up`?r.$from:r.$to;return jm(e,t,()=>{let{node:t}=e.docView.domFromPos(i.pos,n==`up`?-1:1);for(;;){let n=e.docView.nearestDesc(t,!0);if(!n)break;if(n.node.isBlock){t=n.contentDOM||n.dom;break}t=n.dom.parentNode}let r=Om(e,i.pos,1);for(let e=t.firstChild;e;e=e.nextSibling){let t;if(Z(e))t=e.getClientRects();else if(Mp(e))t=Ep(e,0,e.nodeValue.length).getClientRects();else continue;for(let e=0;e<t.length;e++){let i=t[e];if(i.bottom>i.top+1&&(n==`up`?r.top-i.top>(i.bottom-r.top)*2:i.bottom-r.bottom>(r.bottom-i.top)*2))return!1}}return!0})}var Nm=/[\u0590-\u08ac]/;function Pm(e,t,n){let{$head:r}=t.selection;if(!r.parent.isTextblock)return!1;let i=r.parentOffset,a=!i,o=i==r.parent.content.size,s=e.domSelection();return s?!Nm.test(r.parent.textContent)||!s.modify?n==`left`||n==`backward`?a:o:jm(e,t,()=>{let{focusNode:t,focusOffset:i,anchorNode:a,anchorOffset:o}=e.domSelectionRange(),c=s.caretBidiLevel;s.modify(`move`,n,`character`);let l=r.depth?e.docView.domAfterPos(r.before()):e.dom,{focusNode:u,focusOffset:d}=e.domSelectionRange(),f=u&&!Np(l,u)||t==u&&i==d;try{s.collapse(a,o),t&&(t!=a||i!=o)&&s.extend&&s.extend(t,i)}catch{}return c!=null&&(s.caretBidiLevel=c),f}):r.pos==r.start()||r.pos==r.end()}var Fm=null,Im=null,Lm=!1;function Rm(e,t,n){return Fm==t&&Im==n?Lm:(Fm=t,Im=n,Lm=n==`up`||n==`down`?Mm(e,t,n):Pm(e,t,n))}var zm=0,Bm=1,Vm=2,Hm=3,Um=class{constructor(e,t,n,r){this.parent=e,this.children=t,this.dom=n,this.contentDOM=r,this.dirty=zm,n.pmViewDesc=this}matchesWidget(e){return!1}matchesMark(e){return!1}matchesNode(e,t,n){return!1}matchesHack(e){return!1}parseRule(e){return null}stopEvent(e){return!1}get size(){let e=0;for(let t=0;t<this.children.length;t++)e+=this.children[t].size;return e}get border(){return 0}destroy(){this.parent=void 0,this.dom.pmViewDesc==this&&(this.dom.pmViewDesc=void 0);for(let e=0;e<this.children.length;e++)this.children[e].destroy()}posBeforeChild(e){for(let t=0,n=this.posAtStart;;t++){let r=this.children[t];if(r==e)return n;n+=r.size}}get posBefore(){return this.parent.posBeforeChild(this)}get posAtStart(){return this.parent?this.parent.posBeforeChild(this)+this.border:0}get posAfter(){return this.posBefore+this.size}get posAtEnd(){return this.posAtStart+this.size-2*this.border}localPosFromDOM(e,t,n){if(this.contentDOM&&Np(this.contentDOM,e)){if(n<0){let n,r;if(e==this.contentDOM)n=e.childNodes[t-1];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.previousSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.previousSibling;return n?this.posBeforeChild(r)+r.size:this.posAtStart}{let n,r;if(e==this.contentDOM)n=e.childNodes[t];else{for(;e.parentNode!=this.contentDOM;)e=e.parentNode;n=e.nextSibling}for(;n&&!((r=n.pmViewDesc)&&r.parent==this);)n=n.nextSibling;return n?this.posBeforeChild(r):this.posAtEnd}}let r;if(e==this.dom&&this.contentDOM)r=t>Cp(this.contentDOM);else if(this.contentDOM&&this.contentDOM!=this.dom&&this.dom.contains(this.contentDOM)){let n=e.compareDocumentPosition(this.contentDOM);r=n&16?t>Array.from(e.childNodes).findIndex(e=>e.contains(this.contentDOM)):!(n&4)}else if(this.dom.firstChild){if(t==0)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!1;break}if(t.previousSibling)break}if(r==null&&t==e.childNodes.length)for(let t=e;;t=t.parentNode){if(t==this.dom){r=!0;break}if(t.nextSibling)break}}return r??n>0?this.posAtEnd:this.posAtStart}nearestDesc(e,t=!1){for(let n=!0,r=e;r;r=r.parentNode){let i=this.getDesc(r),a;if(i&&(!t||i.node)){if(n&&(a=i.nodeDOM)&&!(Z(a)?Np(a,e):a==e))n=!1;else return i}}}getDesc(e){let t=e.pmViewDesc;for(let e=t;e;e=e.parent)if(e==this)return t}posFromDOM(e,t,n){for(let r=e;r;r=r.parentNode){let i=this.getDesc(r);if(i)return i.localPosFromDOM(e,t,n)}return-1}descAt(e){for(let t=0,n=0;t<this.children.length;t++){let r=this.children[t],i=n+r.size;if(n==e&&i!=n){for(;!r.border&&r.children.length;)for(let e=0;e<r.children.length;e++){let t=r.children[e];if(t.size){r=t;break}}return r}if(e<i)return r.descAt(e-n-r.border);n=i}}domFromPos(e,t){if(!this.contentDOM)return{node:this.dom,offset:0,atom:e+1};let n=0,r=0;for(let t=0;n<this.children.length;n++){let i=this.children[n],a=t+i.size;if(a>e){r=e-t;break}t=a}if(r)return this.children[n].domFromPos(r-this.children[n].border,t);for(;n>0;n--){let e=this.children[n-1];if(e.size||!(e instanceof Xm||e instanceof Wm&&e.side>=0))break}if(t<=0){let e,r=!0;for(;e=n?this.children[n-1]:null,e&&e.dom.parentNode!=this.contentDOM;n--,r=!1);return e&&t&&r&&!e.border&&!e.domAtom?e.domFromPos(e.size,t):{node:this.contentDOM,offset:e?Cp(e.dom)+1:0}}{let e,r=!0;for(;e=n<this.children.length?this.children[n]:null,e&&e.dom.parentNode!=this.contentDOM;n++,r=!1);return e&&r&&!e.border&&!e.domAtom?e.domFromPos(0,t):{node:this.contentDOM,offset:e?Cp(e.dom):this.contentDOM.childNodes.length}}}parseRange(e,t,n=0){if(this.children.length==0)return{node:this.contentDOM,from:e,to:t,fromOffset:0,toOffset:this.contentDOM.childNodes.length};let r=-1,i=-1;for(let a=n,o=0;;o++){let n=this.children[o],s=a+n.size;if(r==-1&&e<=s){let i=a+n.border;if(e>=i&&t<=s-n.border&&n.node&&n.contentDOM&&this.contentDOM.contains(n.contentDOM))return n.parseRange(e,t,i);e=a;for(let t=o;t>0;t--){let n=this.children[t-1];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(1)){r=Cp(n.dom)+1;break}e-=n.size}r==-1&&(r=0)}if(r>-1&&(s>t||o==this.children.length-1)){t=s;for(let e=o+1;e<this.children.length;e++){let n=this.children[e];if(n.size&&n.dom.parentNode==this.contentDOM&&!n.emptyChildAt(-1)){i=Cp(n.dom);break}t+=n.size}i==-1&&(i=this.contentDOM.childNodes.length);break}a=s}return{node:this.contentDOM,from:e,to:t,fromOffset:r,toOffset:i}}emptyChildAt(e){if(this.border||!this.contentDOM||!this.children.length)return!1;let t=this.children[e<0?0:this.children.length-1];return t.size==0||t.emptyChildAt(e)}domAfterPos(e){let{node:t,offset:n}=this.domFromPos(e,0);if(!Z(t)||n==t.childNodes.length)throw RangeError(`No node after pos `+e);return t.childNodes[n]}setSelection(e,t,n,r=!1){let i=Math.min(e,t),a=Math.max(e,t);for(let o=0,s=0;o<this.children.length;o++){let c=this.children[o],l=s+c.size;if(i>s&&a<l)return c.setSelection(e-s-c.border,t-s-c.border,n,r);s=l}let o=this.domFromPos(e,e?-1:1),s=t==e?o:this.domFromPos(t,t?-1:1),c=n.root.getSelection(),l=n.domSelectionRange(),u=!1;if((Xp||em)&&e==t){let{node:e,offset:t}=o;if(Mp(e)){if(u=!!(t&&e.nodeValue[t-1]==`
|
|
17
|
+
`),u&&t==e.nodeValue.length)for(let t=e,n;t;t=t.parentNode){if(n=t.nextSibling){n.nodeName==`BR`&&(o=s={node:n.parentNode,offset:Cp(n)+1});break}let e=t.pmViewDesc;if(e&&e.node&&e.node.isBlock)break}}else{let n=e.childNodes[t-1];u=n&&(n.nodeName==`BR`||n.contentEditable==`false`)}}if(Xp&&l.focusNode&&l.focusNode!=s.node&&Z(l.focusNode)){let e=l.focusNode.childNodes[l.focusOffset];e&&e.contentEditable==`false`&&(r=!0)}if(!(r||u&&em)&&Op(o.node,o.offset,l.anchorNode,l.anchorOffset)&&Op(s.node,s.offset,l.focusNode,l.focusOffset))return;let d=!1;if((c.extend||e==t)&&!(u&&Xp)){c.collapse(o.node,o.offset);try{e!=t&&c.extend(s.node,s.offset),d=!0}catch{}}if(!d){if(e>t){let e=o;o=s,s=e}let n=document.createRange();n.setEnd(s.node,s.offset),n.setStart(o.node,o.offset),c.removeAllRanges(),c.addRange(n)}}ignoreMutation(e){return!this.contentDOM&&e.type!=`selection`}get contentLost(){return this.contentDOM&&this.contentDOM!=this.dom&&!this.dom.contains(this.contentDOM)}markDirty(e,t){for(let n=0,r=0;r<this.children.length;r++){let i=this.children[r],a=n+i.size;if(n==a?e<=a&&t>=n:e<a&&t>n){let r=n+i.border,o=a-i.border;if(e>=r&&t<=o){this.dirty=e==n||t==a?Vm:Bm,e==r&&t==o&&(i.contentLost||i.dom.parentNode!=this.contentDOM)?i.dirty=Hm:i.markDirty(e-r,t-r);return}i.dirty=i.dom==i.contentDOM&&i.dom.parentNode==this.contentDOM&&!i.children.length?Vm:Hm}n=a}this.dirty=Vm}markParentsDirty(){let e=1;for(let t=this.parent;t;t=t.parent,e++){let n=e==1?Vm:Bm;t.dirty<n&&(t.dirty=n)}}get domAtom(){return!1}get ignoreForCoords(){return!1}get ignoreForSelection(){return!1}isText(e){return!1}},Wm=class extends Um{constructor(e,t,n,r){let i,a=t.type.toDOM;if(typeof a==`function`&&(a=a(n,()=>{if(!i)return r;if(i.parent)return i.parent.posBeforeChild(i)})),!t.type.spec.raw){let e=Z(a)?a:document.createElement(`span`);e!=a&&(e.appendChild(a),a=e),e.hasAttribute(`contenteditable`)||(e.contentEditable=`false`),e.classList.add(`ProseMirror-widget`)}super(e,[],a,null),this.widget=t,this.widget=t,i=this}matchesWidget(e){return this.dirty==zm&&e.type.eq(this.widget.type)}parseRule(){return{ignore:!0}}stopEvent(e){let t=this.widget.spec.stopEvent;return t?t(e):!1}ignoreMutation(e){return e.type!=`selection`||this.widget.spec.ignoreSelection}destroy(){this.widget.type.destroy(this.dom),super.destroy()}get domAtom(){return!0}get ignoreForSelection(){return!!this.widget.type.spec.relaxedSide}get side(){return this.widget.type.side}},Gm=class extends Um{constructor(e,t,n,r){super(e,[],t,null),this.textDOM=n,this.text=r}get size(){return this.text.length}localPosFromDOM(e,t){return e==this.textDOM?this.posAtStart+t:this.posAtStart+(t?this.size:0)}domFromPos(e){return{node:this.textDOM,offset:e}}ignoreMutation(e){return e.type===`characterData`&&e.target.nodeValue==e.oldValue}},Km=class e extends Um{constructor(e,t,n,r,i){super(e,[],n,r),this.mark=t,this.spec=i}static create(t,n,r,i){let a=i.nodeViews[n.type.name],o=a&&a(n,i,r);return o&&o.dom||(o=Mu.renderSpec(document,n.type.spec.toDOM(n,r),null,n.attrs)),new e(t,n,o.dom,o.contentDOM||o.dom,o)}parseRule(){return this.dirty&Hm||this.mark.type.spec.reparseInView?null:{mark:this.mark.type.name,attrs:this.mark.attrs,contentElement:this.contentDOM}}matchesMark(e){return this.dirty!=Hm&&this.mark.eq(e)}markDirty(e,t){if(super.markDirty(e,t),this.dirty!=zm){let e=this.parent;for(;!e.node;)e=e.parent;e.dirty<this.dirty&&(e.dirty=this.dirty),this.dirty=zm}}slice(t,n,r){let i=e.create(this.parent,this.mark,!0,r),a=this.children,o=this.size;n<o&&(a=ph(a,n,o,r)),t>0&&(a=ph(a,0,t,r));for(let e=0;e<a.length;e++)a[e].parent=i;return i.children=a,i}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}},qm=class e extends Um{constructor(e,t,n,r,i,a,o){super(e,[],i,a),this.node=t,this.outerDeco=n,this.innerDeco=r,this.nodeDOM=o}static create(t,n,r,i,a,o){let s=a.nodeViews[n.type.name],c,l=s&&s(n,a,()=>{if(!c)return o;if(c.parent)return c.parent.posBeforeChild(c)},r,i),u=l&&l.dom,d=l&&l.contentDOM;if(n.isText){if(!u)u=document.createTextNode(n.text);else if(!Mp(u))throw RangeError(`Text must be rendered as a DOM text node`)}else if(!u){let e=Mu.renderSpec(document,n.type.spec.toDOM(n),null,n.attrs);({dom:u,contentDOM:d}=e)}!d&&!n.isText&&u.nodeName!=`BR`&&(u.hasAttribute(`contenteditable`)||(u.contentEditable=`false`),n.type.spec.draggable&&(u.draggable=!0));let f=u;return u=ih(u,r,n),l?c=new Zm(t,n,r,i,u,d||null,f,l):n.isText?new Ym(t,n,r,i,u,f):new e(t,n,r,i,u,d||null,f)}parseRule(e){if(this.node.type.spec.reparseInView)return null;let t={node:this.node.type.name,attrs:this.node.attrs};if(this.node.type.whitespace==`pre`&&(t.preserveWhitespace=`full`),!this.contentDOM)t.getContent=()=>this.node.content;else if(!this.contentLost)t.contentElement=this.contentDOM;else{for(let e=this.children.length-1;e>=0;e--){let n=this.children[e];if(this.dom.contains(n.dom.parentNode)){t.contentElement=n.dom.parentNode;break}}if(!t.contentElement){let n=e&&e.find(t=>Z(t)&&e.indexOf(t.parentNode)<0&&this.dom.contains(t));n?t.contentElement=n:t.getContent=()=>q.empty}}return t}matchesNode(e,t,n){return this.dirty==zm&&e.eq(this.node)&&ah(t,this.outerDeco)&&n.eq(this.innerDeco)}get size(){return this.node.nodeSize}get border(){return+!this.node.isLeaf}updateChildren(e,t){let n=this.node.inlineContent,r=t,i=e.composing?this.localCompositionInfo(e,t):null,a=i&&i.pos>-1?i:null,o=i&&i.pos<0,s=new sh(this,a&&a.node,e),c=this.node.inlineContent,l=c&&this.node.isBlock;uh(this.node,this.innerDeco,(t,i,a)=>{t.spec.marks?s.syncToMarks(t.spec.marks,n,e,i):t.type.side>=0&&!a&&s.syncToMarks(i==this.node.childCount?Sl.none:this.node.child(i).marks,n,e,i),s.placeWidget(t,e,r)},(t,a,u,d)=>{s.syncToMarks(t.marks,n,e,d),l&&t.isAtom&&!t.isText&&s.addHackNode(`IMG`,s.top);let f;s.findNodeMatch(t,a,u,d)||o&&e.state.selection.from>r&&e.state.selection.to<r+t.nodeSize&&(f=s.findIndexWithChild(i.node))>-1&&s.updateNodeAt(t,a,u,f,e)||s.updateNextNode(t,a,u,e,d,r)||s.addNode(t,a,u,e,r),r+=t.nodeSize,c&&(l=t.isAtom&&!t.isText)}),s.syncToMarks([],n,e,0),this.node.isTextblock&&s.addTextblockHacks(),s.destroyRest(),(s.changed||this.dirty==Vm)&&(a&&this.protectLocalComposition(e,a),Qm(this.contentDOM,this.children,e),tm&&dh(this.dom))}localCompositionInfo(e,t){let{from:n,to:r}=e.state.selection;if(!(e.state.selection instanceof X)||n<t||r>t+this.node.content.size)return null;let i=e.input.compositionNode;if(!i||!this.dom.contains(i.parentNode))return null;if(this.node.inlineContent){let e=i.nodeValue,a=fh(this.node.content,e,n-t,r-t);return a<0?null:{node:i,pos:a,text:e}}return{node:i,pos:-1,text:``}}protectLocalComposition(e,{node:t,pos:n,text:r}){if(this.getDesc(t))return;let i=t;for(;i.parentNode!=this.contentDOM;i=i.parentNode){for(;i.previousSibling;)i.parentNode.removeChild(i.previousSibling);for(;i.nextSibling;)i.parentNode.removeChild(i.nextSibling);i.pmViewDesc&&(i.pmViewDesc=void 0)}let a=new Gm(this,i,t,r);e.input.compositionNodes.push(a),this.children=ph(this.children,n,n+r.length,e,a)}update(e,t,n,r){return this.dirty==Hm||!e.sameMarkup(this.node)?!1:(this.updateInner(e,t,n,r),!0)}updateInner(e,t,n,r){this.updateOuterDeco(t),this.node=e,this.innerDeco=n,this.contentDOM&&this.updateChildren(r,this.posAtStart),this.dirty=zm}updateOuterDeco(e){if(ah(e,this.outerDeco))return;let t=!Z(this.nodeDOM),n=this.dom;this.dom=nh(this.dom,this.nodeDOM,th(this.outerDeco,this.node,t),th(e,this.node,t)),this.dom!=n&&(n.pmViewDesc=void 0,this.dom.pmViewDesc=this),this.outerDeco=e}selectNode(){Z(this.nodeDOM)&&(this.nodeDOM.classList.add(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&(this.nodeDOM.draggable=!0))}deselectNode(){Z(this.nodeDOM)&&(this.nodeDOM.classList.remove(`ProseMirror-selectednode`),(this.contentDOM||!this.node.type.spec.draggable)&&this.nodeDOM.removeAttribute(`draggable`))}get domAtom(){return this.node.isAtom}};function Jm(e,t,n,r,i){ih(r,t,e);let a=new qm(void 0,e,t,n,r,r,r);return a.contentDOM&&a.updateChildren(i,0),a}var Ym=class e extends qm{constructor(e,t,n,r,i,a){super(e,t,n,r,i,null,a)}parseRule(){let e=this.nodeDOM.parentNode;for(;e&&e!=this.dom&&!e.pmIsDeco;)e=e.parentNode;return{skip:e||!0}}update(e,t,n,r){return this.dirty==Hm||this.dirty!=zm&&!this.inParent()||!e.sameMarkup(this.node)?!1:(this.updateOuterDeco(t),(this.dirty!=zm||e.text!=this.node.text)&&e.text!=this.nodeDOM.nodeValue&&(this.nodeDOM.nodeValue=e.text,r.trackWrites==this.nodeDOM&&(r.trackWrites=null)),this.node=e,this.dirty=zm,!0)}inParent(){let e=this.parent.contentDOM;for(let t=this.nodeDOM;t;t=t.parentNode)if(t==e)return!0;return!1}domFromPos(e){return{node:this.nodeDOM,offset:e}}localPosFromDOM(e,t,n){return e==this.nodeDOM?this.posAtStart+Math.min(t,this.node.text.length):super.localPosFromDOM(e,t,n)}ignoreMutation(e){return e.type!=`characterData`&&e.type!=`selection`}slice(t,n,r){let i=this.node.cut(t,n),a=document.createTextNode(i.text);return new e(this.parent,i,this.outerDeco,this.innerDeco,a,a)}markDirty(e,t){super.markDirty(e,t),this.dom!=this.nodeDOM&&(e==0||t==this.nodeDOM.nodeValue.length)&&(this.dirty=Hm)}get domAtom(){return!1}isText(e){return this.node.text==e}},Xm=class extends Um{parseRule(){return{ignore:!0}}matchesHack(e){return this.dirty==zm&&this.dom.nodeName==e}get domAtom(){return!0}get ignoreForCoords(){return this.dom.nodeName==`IMG`}},Zm=class extends qm{constructor(e,t,n,r,i,a,o,s){super(e,t,n,r,i,a,o),this.spec=s}update(e,t,n,r){if(this.dirty==Hm)return!1;if(this.spec.update&&(this.node.type==e.type||this.spec.multiType)){let i=this.spec.update(e,t,n);return i&&this.updateInner(e,t,n,r),i}return!this.contentDOM&&!e.isLeaf?!1:super.update(e,t,n,r)}selectNode(){this.spec.selectNode?this.spec.selectNode():super.selectNode()}deselectNode(){this.spec.deselectNode?this.spec.deselectNode():super.deselectNode()}setSelection(e,t,n,r){this.spec.setSelection?this.spec.setSelection(e,t,n.root):super.setSelection(e,t,n,r)}destroy(){this.spec.destroy&&this.spec.destroy(),super.destroy()}stopEvent(e){return this.spec.stopEvent?this.spec.stopEvent(e):!1}ignoreMutation(e){return this.spec.ignoreMutation?this.spec.ignoreMutation(e):super.ignoreMutation(e)}};function Qm(e,t,n){let r=e.firstChild,i=!1;for(let a=0;a<t.length;a++){let o=t[a],s=o.dom;if(s.parentNode==e){for(;s!=r;)r=oh(r),i=!0;r=r.nextSibling}else i=!0,e.insertBefore(s,r);if(o instanceof Km){let t=r?r.previousSibling:e.lastChild;Qm(o.contentDOM,o.children,n),r=t?t.nextSibling:e.firstChild}}for(;r;)r=oh(r),i=!0;i&&n.trackWrites==e&&(n.trackWrites=null)}var $m=function(e){e&&(this.nodeName=e)};$m.prototype=Object.create(null);var eh=[new $m];function th(e,t,n){if(e.length==0)return eh;let r=n?eh[0]:new $m,i=[r];for(let a=0;a<e.length;a++){let o=e[a].type.attrs;if(o){o.nodeName&&i.push(r=new $m(o.nodeName));for(let e in o){let a=o[e];a!=null&&(n&&i.length==1&&i.push(r=new $m(t.isInline?`span`:`div`)),e==`class`?r.class=(r.class?r.class+` `:``)+a:e==`style`?r.style=(r.style?r.style+`;`:``)+a:e!=`nodeName`&&(r[e]=a))}}}return i}function nh(e,t,n,r){if(n==eh&&r==eh)return t;let i=t;for(let t=0;t<r.length;t++){let a=r[t],o=n[t];if(t){let t;o&&o.nodeName==a.nodeName&&i!=e&&(t=i.parentNode)&&t.nodeName.toLowerCase()==a.nodeName||(t=document.createElement(a.nodeName),t.pmIsDeco=!0,t.appendChild(i),o=eh[0]),i=t}rh(i,o||eh[0],a)}return i}function rh(e,t,n){for(let r in t)r!=`class`&&r!=`style`&&r!=`nodeName`&&!(r in n)&&e.removeAttribute(r);for(let r in n)r!=`class`&&r!=`style`&&r!=`nodeName`&&n[r]!=t[r]&&e.setAttribute(r,n[r]);if(t.class!=n.class){let r=t.class?t.class.split(` `).filter(Boolean):[],i=n.class?n.class.split(` `).filter(Boolean):[];for(let t=0;t<r.length;t++)i.indexOf(r[t])==-1&&e.classList.remove(r[t]);for(let t=0;t<i.length;t++)r.indexOf(i[t])==-1&&e.classList.add(i[t]);e.classList.length==0&&e.removeAttribute(`class`)}if(t.style!=n.style){if(t.style){let n=/\s*([\w\-\xa1-\uffff]+)\s*:(?:"(?:\\.|[^"])*"|'(?:\\.|[^'])*'|\(.*?\)|[^;])*/g,r;for(;r=n.exec(t.style);)e.style.removeProperty(r[1])}n.style&&(e.style.cssText+=n.style)}}function ih(e,t,n){return nh(e,e,eh,th(t,n,!Z(e)))}function ah(e,t){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].type.eq(t[n].type))return!1;return!0}function oh(e){let t=e.nextSibling;return e.parentNode.removeChild(e),t}var sh=class{constructor(e,t,n){this.lock=t,this.view=n,this.index=0,this.stack=[],this.changed=!1,this.top=e,this.preMatch=ch(e.node.content,e)}destroyBetween(e,t){if(e!=t){for(let n=e;n<t;n++)this.top.children[n].destroy();this.top.children.splice(e,t-e),this.changed=!0}}destroyRest(){this.destroyBetween(this.index,this.top.children.length)}syncToMarks(e,t,n,r){let i=0,a=this.stack.length>>1,o=Math.min(a,e.length);for(;i<o&&(i==a-1?this.top:this.stack[i+1<<1]).matchesMark(e[i])&&e[i].type.spec.spanning!==!1;)i++;for(;i<a;)this.destroyRest(),this.top.dirty=zm,this.index=this.stack.pop(),this.top=this.stack.pop(),a--;for(;a<e.length;){this.stack.push(this.top,this.index+1);let i=-1,o=this.top.children.length;r<this.preMatch.index&&(o=Math.min(this.index+3,o));for(let t=this.index;t<o;t++){let n=this.top.children[t];if(n.matchesMark(e[a])&&!this.isLocked(n.dom)){i=t;break}}if(i<0&&this.index<this.top.children.length){let t=this.top.children[this.index];t instanceof Km&&t.dirty!=Hm&&t.mark.type==e[a].type&&t.spec.update&&!this.isLocked(t.dom)&&t.spec.update(e[a])&&(t.mark=e[a],i=this.index,this.changed=!0)}if(i>-1)i>this.index&&(this.changed=!0,this.destroyBetween(this.index,i)),this.top=this.top.children[this.index];else{let r=Km.create(this.top,e[a],t,n);this.top.children.splice(this.index,0,r),this.top=r,this.changed=!0}this.index=0,a++}}findNodeMatch(e,t,n,r){let i=-1,a;if(r>=this.preMatch.index&&(a=this.preMatch.matches[r-this.preMatch.index]).parent==this.top&&a.matchesNode(e,t,n))i=this.top.children.indexOf(a,this.index);else for(let r=this.index,a=Math.min(this.top.children.length,r+5);r<a;r++){let a=this.top.children[r];if(a.matchesNode(e,t,n)&&!this.preMatch.matched.has(a)){i=r;break}}return i<0?!1:(this.destroyBetween(this.index,i),this.index++,!0)}updateNodeAt(e,t,n,r,i){let a=this.top.children[r];return a.dirty==Hm&&a.dom==a.contentDOM&&(a.dirty=Vm),a.update(e,t,n,i)?(this.destroyBetween(this.index,r),this.index++,!0):!1}findIndexWithChild(e){for(;;){let t=e.parentNode;if(!t)return-1;if(t==this.top.contentDOM){let t=e.pmViewDesc;if(t){for(let e=this.index;e<this.top.children.length;e++)if(this.top.children[e]==t)return e}return-1}e=t}}updateNextNode(e,t,n,r,i,a){for(let o=this.index;o<this.top.children.length;o++){let s=this.top.children[o];if(s instanceof qm){let c=this.preMatch.matched.get(s);if(c!=null&&c!=i)return!1;let l=s.dom,u,d=this.isLocked(l)&&!(e.isText&&s.node&&s.node.isText&&s.nodeDOM.nodeValue==e.text&&s.dirty!=Hm&&ah(t,s.outerDeco));if(!d&&s.update(e,t,n,r))return this.destroyBetween(this.index,o),s.dom!=l&&(this.changed=!0),this.index++,!0;if(!d&&(u=this.recreateWrapper(s,e,t,n,r,a)))return this.destroyBetween(this.index,o),this.top.children[this.index]=u,u.contentDOM&&(u.dirty=Vm,u.updateChildren(r,a+1),u.dirty=zm),this.changed=!0,this.index++,!0;break}}return!1}recreateWrapper(e,t,n,r,i,a){if(e.dirty||t.isAtom||!e.children.length||!e.node.content.eq(t.content)||!ah(n,e.outerDeco)||!r.eq(e.innerDeco))return null;let o=qm.create(this.top,t,n,r,i,a);if(o.contentDOM){o.children=e.children,e.children=[];for(let e of o.children)e.parent=o}return e.destroy(),o}addNode(e,t,n,r,i){let a=qm.create(this.top,e,t,n,r,i);a.contentDOM&&a.updateChildren(r,i+1),this.top.children.splice(this.index++,0,a),this.changed=!0}placeWidget(e,t,n){let r=this.index<this.top.children.length?this.top.children[this.index]:null;if(r&&r.matchesWidget(e)&&(e==r.widget||!r.widget.type.toDOM.parentNode))this.index++;else{let r=new Wm(this.top,e,t,n);this.top.children.splice(this.index++,0,r),this.changed=!0}}addTextblockHacks(){let e=this.top.children[this.index-1],t=this.top;for(;e instanceof Km;)t=e,e=t.children[t.children.length-1];(!e||!(e instanceof Ym)||/\n$/.test(e.node.text)||this.view.requiresGeckoHackNode&&/\s$/.test(e.node.text))&&((em||Qp)&&e&&e.dom.contentEditable==`false`&&this.addHackNode(`IMG`,t),this.addHackNode(`BR`,this.top))}addHackNode(e,t){if(t==this.top&&this.index<t.children.length&&t.children[this.index].matchesHack(e))this.index++;else{let n=document.createElement(e);e==`IMG`&&(n.className=`ProseMirror-separator`,n.alt=``),e==`BR`&&(n.className=`ProseMirror-trailingBreak`);let r=new Xm(this.top,[],n,null);t==this.top?t.children.splice(this.index++,0,r):t.children.push(r),this.changed=!0}}isLocked(e){return this.lock&&(e==this.lock||Z(e)&&e.contains(this.lock.parentNode))}};function ch(e,t){let n=t,r=n.children.length,i=e.childCount,a=new Map,o=[];outer:for(;i>0;){let s;for(;;)if(r){let e=n.children[r-1];if(e instanceof Km)n=e,r=e.children.length;else{s=e,r--;break}}else if(n==t)break outer;else r=n.parent.children.indexOf(n),n=n.parent;let c=s.node;if(c){if(c!=e.child(i-1))break;--i,a.set(s,i),o.push(s)}}return{index:i,matched:a,matches:o.reverse()}}function lh(e,t){return e.type.side-t.type.side}function uh(e,t,n,r){let i=t.locals(e),a=0;if(i.length==0){for(let n=0;n<e.childCount;n++){let o=e.child(n);r(o,i,t.forChild(a,o),n),a+=o.nodeSize}return}let o=0,s=[],c=null;for(let l=0;;){let u,d;for(;o<i.length&&i[o].to==a;){let e=i[o++];e.widget&&(u?(d||=[u]).push(e):u=e)}if(u){if(d){d.sort(lh);for(let e=0;e<d.length;e++)n(d[e],l,!!c)}else n(u,l,!!c)}let f,p;if(c)p=-1,f=c,c=null;else if(l<e.childCount)p=l,f=e.child(l++);else break;for(let e=0;e<s.length;e++)s[e].to<=a&&s.splice(e--,1);for(;o<i.length&&i[o].from<=a&&i[o].to>a;)s.push(i[o++]);let m=a+f.nodeSize;if(f.isText){let e=m;o<i.length&&i[o].from<e&&(e=i[o].from);for(let t=0;t<s.length;t++)s[t].to<e&&(e=s[t].to);e<m&&(c=f.cut(e-a),f=f.cut(0,e-a),m=e,p=-1)}else for(;o<i.length&&i[o].to<m;)o++;let h=f.isInline&&!f.isLeaf?s.filter(e=>!e.inline):s.slice();r(f,h,t.forChild(a,f),p),a=m}}function dh(e){if(e.nodeName==`UL`||e.nodeName==`OL`){let t=e.style.cssText;e.style.cssText=t+`; list-style: square !important`,window.getComputedStyle(e).listStyle,e.style.cssText=t}}function fh(e,t,n,r){for(let i=0,a=0;i<e.childCount&&a<=r;){let o=e.child(i++),s=a;if(a+=o.nodeSize,!o.isText)continue;let c=o.text;for(;i<e.childCount;){let t=e.child(i++);if(a+=t.nodeSize,!t.isText)break;c+=t.text}if(a>=n){if(a>=r&&c.slice(r-t.length-s,r-s)==t)return r-t.length;let e=s<r?c.lastIndexOf(t,r-s-1):-1;if(e>=0&&e+t.length+s>=n)return s+e;if(n==r&&c.length>=r+t.length-s&&c.slice(r-s,r-s+t.length)==t)return r}}return-1}function ph(e,t,n,r,i){let a=[];for(let o=0,s=0;o<e.length;o++){let c=e[o],l=s,u=s+=c.size;l>=n||u<=t?a.push(c):(l<t&&a.push(c.slice(0,t-l,r)),i&&=(a.push(i),void 0),u>n&&a.push(c.slice(n-l,c.size,r)))}return a}function mh(e,t=null){let n=e.domSelectionRange(),r=e.state.doc;if(!n.focusNode)return null;let i=e.docView.nearestDesc(n.focusNode),a=i&&i.size==0,o=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(o<0)return null;let s=r.resolve(o),c,l;if(Rp(n)){for(c=o;i&&!i.node;)i=i.parent;if(i&&i.node.isAtom&&sf.isSelectable(i.node)&&i.parent&&!(i.node.isInline&&Ip(n.focusNode,n.focusOffset,i.dom))){let e=i.posBefore;l=new sf(o==e?s:r.resolve(e))}else if(Xp&&t==`key`&&o>e.state.selection.to&&Z(n.focusNode)&&n.focusOffset==n.focusNode.childNodes.length&&i&&i.posAtStart>e.state.selection.to)for(let e=n.focusNode;;e=e.parentNode){if(getComputedStyle(e).overflow!=`visible`){l=Y.findFrom(r.resolve(i.posAtStart),1);break}if(e==i.dom||e.nextSibling||!e.parentNode||!Z(e.parentNode))break}}else{if(n instanceof e.dom.ownerDocument.defaultView.Selection&&n.rangeCount>1){let t=o,i=o;for(let r=0;r<n.rangeCount;r++){let a=n.getRangeAt(r);t=Math.min(t,e.docView.posFromDOM(a.startContainer,a.startOffset,1)),i=Math.max(i,e.docView.posFromDOM(a.endContainer,a.endOffset,-1))}if(t<0)return null;[c,o]=i==e.state.selection.anchor?[i,t]:[t,i],s=r.resolve(o)}else c=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(c<0)return null}let u=r.resolve(c);if(!l){let n=t==`pointer`||e.state.selection.head<s.pos&&!a?1:-1;l=Th(e,u,s,n)}return l}function hh(e){return e.editable?e.hasFocus():Dh(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function gh(e,t=!1){let n=e.state.selection;if(Ch(e,n),!hh(e))return;let r=e.input.mouseDown;if(!t&&Qp&&r){let t=e.domSelectionRange(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&Op(t.anchorNode,t.anchorOffset,n.anchorNode,n.anchorOffset)&&r.delaySelUpdate()){e.domObserver.setCurSelection();return}}if(e.domObserver.disconnectSelection(),e.cursorWrapper)Sh(e);else{let{anchor:r,head:i}=n,a,o;_h&&!(n instanceof X)&&(n.$from.parent.inlineContent||(a=vh(e,n.from)),!n.empty&&!n.$from.parent.inlineContent&&(o=vh(e,n.to))),e.docView.setSelection(r,i,e,t),_h&&(a&&bh(a),o&&bh(o)),n.visible?e.dom.classList.remove(`ProseMirror-hideselection`):(e.dom.classList.add(`ProseMirror-hideselection`),`onselectionchange`in document&&xh(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}var _h=em||Qp&&$p<63;function vh(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),i=r<n.childNodes.length?n.childNodes[r]:null,a=r?n.childNodes[r-1]:null;if(em&&i&&i.contentEditable==`false`)return yh(i);if((!i||i.contentEditable==`false`)&&(!a||a.contentEditable==`false`)){if(i)return yh(i);if(a)return yh(a)}}function yh(e){return e.contentEditable=`true`,em&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function bh(e){e.contentEditable=`false`,e.wasDraggable&&=(e.draggable=!0,null)}function xh(e){let t=e.dom.ownerDocument;t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard);let n=e.domSelectionRange(),r=n.anchorNode,i=n.anchorOffset;t.addEventListener(`selectionchange`,e.input.hideSelectionGuard=()=>{(n.anchorNode!=r||n.anchorOffset!=i)&&(t.removeEventListener(`selectionchange`,e.input.hideSelectionGuard),setTimeout(()=>{(!hh(e)||e.state.selection.visible)&&e.dom.classList.remove(`ProseMirror-hideselection`)},20))})}function Sh(e){let t=e.domSelection();if(!t)return;let n=e.cursorWrapper.dom,r=n.nodeName==`IMG`;r?t.collapse(n.parentNode,Cp(n)+1):t.collapse(n,0),!r&&!e.state.selection.visible&&Jp&&Yp<=11&&(n.disabled=!0,n.disabled=!1)}function Ch(e,t){if(t instanceof sf){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(wh(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else wh(e)}function wh(e){e.lastSelectedViewDesc&&=(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),void 0)}function Th(e,t,n,r){return e.someProp(`createSelectionBetween`,r=>r(e,t,n))||X.between(t,n,r)}function Eh(e){return e.editable&&!e.hasFocus()?!1:Dh(e)}function Dh(e){let t=e.domSelectionRange();if(!t.anchorNode)return!1;try{return Np(e.dom,t.anchorNode)&&(e.editable||Np(e.dom,t.focusNode))}catch{return!1}}function Oh(e){let t=e.docView.domFromPos(e.state.selection.anchor,0),n=e.domSelectionRange();return Op(t.node,t.offset,n.anchorNode,n.anchorOffset)}function kh(e,t){let{$anchor:n,$head:r}=e.selection,i=t>0?n.max(r):n.min(r),a=i.parent.inlineContent?i.depth?e.doc.resolve(t>0?i.after():i.before()):null:i;return a&&Y.findFrom(a,t)}function Ah(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function jh(e,t,n){let r=e.state.selection;if(r instanceof X){if(n.indexOf(`s`)>-1){let{$head:n}=r,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter;if(!i||i.isText||!i.isLeaf)return!1;let a=e.state.doc.resolve(n.pos+i.nodeSize*(t<0?-1:1));return Ah(e,new X(r.$anchor,a))}if(!r.empty)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`)){let n=kh(e.state,t);return n&&n instanceof sf?Ah(e,n):!1}if(!nm||n.indexOf(`m`)<0){let n=r.$head,i=n.textOffset?null:t<0?n.nodeBefore:n.nodeAfter,a;if(!i||i.isText)return!1;let o=t<0?n.pos-i.nodeSize:n.pos;return i.isAtom||(a=e.docView.descAt(o))&&!a.contentDOM?sf.isSelectable(i)?Ah(e,new sf(t<0?e.state.doc.resolve(n.pos-i.nodeSize):n)):Ah(e,new X(e.state.doc.resolve(t<0?o:o+i.nodeSize))):!1}}else if(r instanceof sf&&r.node.isInline)return Ah(e,new X(t>0?r.$to:r.$from));else{let n=kh(e.state,t);return n?Ah(e,n):!1}}function Mh(e,t){let n=e.pmViewDesc;return n?n.size==0&&(t<0||e.nextSibling||e.nodeName!=`BR`):Z(e)&&e.contentEditable==`false`}function Nh(e,t){return t<0?Ph(e):Fh(e)}function Ph(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i,a,o=!1;for(Xp&&Z(n)&&r<jp(n)&&Mh(n.childNodes[r],-1)&&(o=!0);;)if(r>0){if(!Z(n))break;let e=n.childNodes[r-1];if(Mh(e,-1))i=n,a=--r;else if(Mp(e))n=e,r=n.nodeValue.length;else break}else if(Ih(n))break;else{let t=n.previousSibling;for(;t&&Mh(t,-1);)i=n.parentNode,a=Cp(t),t=t.previousSibling;if(t)n=t,r=jp(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}o?zh(e,n,r):i&&zh(e,i,a)}function Fh(e){let t=e.domSelectionRange(),n=t.focusNode,r=t.focusOffset;if(!n)return;let i=jp(n),a,o;for(;;)if(r<i){if(!Z(n))break;let e=n.childNodes[r];if(Mh(e,1))a=n,o=++r;else break}else if(Ih(n))break;else{let t=n.nextSibling;for(;t&&Mh(t,1);)a=t.parentNode,o=Cp(t)+1,t=t.nextSibling;if(t)n=t,r=0,i=jp(n);else{if(n=n.parentNode,n==e.dom)break;r=i=0}}a&&zh(e,a,o)}function Ih(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Lh(e,t){for(;e&&t==e.childNodes.length&&!Lp(e);)t=Cp(e)+1,e=e.parentNode;for(;e&&t<e.childNodes.length;){let n=e.childNodes[t];if(Mp(n))return n;if(Z(n)&&n.contentEditable==`false`)break;e=n,t=0}}function Rh(e,t){for(;e&&!t&&!Lp(e);)t=Cp(e),e=e.parentNode;for(;e&&t;){let n=e.childNodes[t-1];if(Mp(n))return n;if(Z(n)&&n.contentEditable==`false`)break;e=n,t=e.childNodes.length}}function zh(e,t,n){if(!Mp(t)){let e,r;(r=Lh(t,n))?(t=r,n=0):(e=Rh(t,n))&&(t=e,n=e.nodeValue.length)}let r=e.domSelection(),i=e.domSelectionRange();if(!r)return;Rp(i)?r.collapse(t,n):r.extend&&(r.collapse(i.anchorNode,i.anchorOffset),r.extend(t,n)),e.domObserver.setCurSelection();let{state:a}=e;setTimeout(()=>{e.state==a&&gh(e)},50)}function Bh(e,t){let n=e.state.doc.resolve(t);if(!(Qp||rm)&&n.parent.inlineContent){let r=e.coordsAtPos(t);if(t>n.start()){let n=e.coordsAtPos(t-1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left<r.left?`ltr`:`rtl`}if(t<n.end()){let n=e.coordsAtPos(t+1),i=(n.top+n.bottom)/2;if(i>r.top&&i<r.bottom&&Math.abs(n.left-r.left)>1)return n.left>r.left?`ltr`:`rtl`}}let r=e.dom;for(let t=n.depth;t>0;t--)if(n.node(t).isBlock){r=e.nodeDOM(n.before(t))||r;break}return getComputedStyle(r).direction==`rtl`?`rtl`:`ltr`}function Vh(e,t,n){let r=e.state.selection;if(r instanceof X&&!r.empty||n.indexOf(`s`)>-1||nm&&n.indexOf(`m`)>-1)return!1;let{$from:i,$to:a}=r;if(!i.parent.inlineContent||e.endOfTextblock(t<0?`up`:`down`)){let n=kh(e.state,t);if(n&&n instanceof sf)return Ah(e,n)}if(!i.parent.inlineContent){let n=t<0?i:a,o=r instanceof lf?Y.near(n,t):Y.findFrom(n,t);return o?Ah(e,o):!1}return!1}function Hh(e,t){if(!(e.state.selection instanceof X))return!0;let{$head:n,$anchor:r,empty:i}=e.state.selection;if(!n.sameParent(r))return!0;if(!i)return!1;if(e.endOfTextblock(t>0?`forward`:`backward`))return!0;let a=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(a&&!a.isText){let r=e.state.tr;return t<0?r.delete(n.pos-a.nodeSize,n.pos):r.delete(n.pos,n.pos+a.nodeSize),e.dispatch(r),!0}return!1}function Uh(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Wh(e){if(!em||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(t&&Z(t)&&n==0&&t.firstChild&&Z(t.firstChild)&&t.firstChild.contentEditable==`false`){let n=t.firstChild;Uh(e,n,`true`),setTimeout(()=>Uh(e,n,`false`),20)}return!1}function Gh(e){let t=``;return e.ctrlKey&&(t+=`c`),e.metaKey&&(t+=`m`),e.altKey&&(t+=`a`),e.shiftKey&&(t+=`s`),t}function Kh(e,t){let n=t.keyCode,r=Gh(t);if(n==8||nm&&n==72&&r==`c`)return Hh(e,-1)||Nh(e,-1);if(n==46&&!t.shiftKey||nm&&n==68&&r==`c`)return Hh(e,1)||Nh(e,1);if(n==13||n==27)return!0;if(n==37||nm&&n==66&&r==`c`){let t=n==37?Bh(e,e.state.selection.from)==`ltr`?-1:1:-1;return jh(e,t,r)||Nh(e,t)}if(n==39||nm&&n==70&&r==`c`){let t=n==39?Bh(e,e.state.selection.from)==`ltr`?1:-1:1;return jh(e,t,r)||Nh(e,t)}return n==38||nm&&n==80&&r==`c`?Vh(e,-1,r)||Nh(e,-1):n==40||nm&&n==78&&r==`c`?Wh(e)||Vh(e,1,r)||Nh(e,1):!(r!=(nm?`m`:`c`)||n!=66&&n!=73&&n!=89&&n!=90)}function qh(e,t){e.someProp(`transformCopied`,n=>{t=n(t,e)});let n=[],{content:r,openStart:i,openEnd:a}=t;for(;i>1&&a>1&&r.childCount==1&&r.firstChild.childCount==1;){i--,a--;let e=r.firstChild;n.push(e.type.name,e.attrs==e.type.defaultAttrs?null:e.attrs),r=e.content}let o=e.someProp(`clipboardSerializer`)||Mu.fromSchema(e.state.schema),s=rg(),c=s.createElement(`div`);c.appendChild(o.serializeFragment(r,{document:s}));let l=c.firstChild,u,d=0;for(;l&&Z(l)&&(u=ng[l.nodeName.toLowerCase()]);){for(let e=u.length-1;e>=0;e--){let t=s.createElement(u[e]);for(;c.firstChild;)t.appendChild(c.firstChild);c.appendChild(t),d++}l=c.firstChild}return l&&Z(l)&&l.setAttribute(`data-pm-slice`,`${i} ${a}${d?` -${d}`:``} ${JSON.stringify(n)}`),{dom:c,text:e.someProp(`clipboardTextSerializer`,n=>n(t,e))||t.content.textBetween(0,t.content.size,`
|
|
18
|
+
|
|
19
|
+
`),slice:t}}function Jh(e,t,n,r,i){let a=i.parent.type.spec.code,o,s;if(!n&&!t)return null;let c=!!t&&(r||a||!n);if(c){if(e.someProp(`transformPastedText`,n=>{t=n(t,a||r,e)}),a)return s=new J(q.from(e.state.schema.text(t.replace(/\r\n?/g,`
|
|
20
|
+
`))),0,0),e.someProp(`transformPasted`,t=>{s=t(s,e,!0)}),s;let n=e.someProp(`clipboardTextParser`,n=>n(t,i,r,e));if(n)s=n;else{let n=i.marks(),{schema:r}=e.state,a=Mu.fromSchema(r);o=document.createElement(`div`),t.split(/(?:\r\n?|\n)+/).forEach(e=>{let t=o.appendChild(document.createElement(`p`));e&&t.appendChild(a.serializeNode(r.text(e,n)))})}}else e.someProp(`transformPastedHTML`,t=>{n=t(n,e)}),o=og(n),am&&sg(o);let l=o&&o.querySelector(`[data-pm-slice]`),u=l&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(l.getAttribute(`data-pm-slice`)||``);if(u&&u[3])for(let e=+u[3];e>0;e--){let e=o.firstChild;for(;e&&!Z(e);)e=e.nextSibling;if(!e)break;o=e}if(s||=(e.someProp(`clipboardParser`)||e.someProp(`domParser`)||vu.fromSchema(e.state.schema)).parseSlice(o,{preserveWhitespace:!!(c||u),context:i,ruleFromNode(e){return e.nodeName==`BR`&&!e.nextSibling&&e.parentNode&&!Yh.test(e.parentNode.nodeName)?{ignore:!0}:null}}),u)s=cg(tg(s,+u[1],+u[2]),u[4]);else if(s=J.maxOpen(Xh(s.content,i),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=tg(s,e,t)}return e.someProp(`transformPasted`,t=>{s=t(s,e,c)}),s}var Yh=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Xh(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r=t.node(n).contentMatchAt(t.index(n)),i,a=[];if(e.forEach(e=>{if(!a)return;let t=r.findWrapping(e.type),n;if(!t)return a=null;if(n=a.length&&i.length&&Qh(t,i,e,a[a.length-1],0))a[a.length-1]=n;else{a.length&&(a[a.length-1]=$h(a[a.length-1],i.length));let n=Zh(e,t);a.push(n),r=r.matchType(n.type),i=t}}),a)return q.from(a)}return e}function Zh(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,q.from(e));return e}function Qh(e,t,n,r,i){if(i<e.length&&i<t.length&&e[i]==t[i]){let a=Qh(e,t,n,r.lastChild,i+1);if(a)return r.copy(r.content.replaceChild(r.childCount-1,a));if(r.contentMatchAt(r.childCount).matchType(i==e.length-1?n.type:e[i+1]))return r.copy(r.content.append(q.from(Zh(n,e,i+1))))}}function $h(e,t){if(t==0)return e;let n=e.content.replaceChild(e.childCount-1,$h(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(q.empty,!0);return e.copy(n.append(r))}function eg(e,t,n,r,i,a){let o=t<0?e.firstChild:e.lastChild,s=o.content;return e.childCount>1&&(a=0),i<r-1&&(s=eg(s,t,n,r,i+1,a)),i>=n&&(s=t<0?o.contentMatchAt(0).fillBefore(s,a<=i).append(s):s.append(o.contentMatchAt(o.childCount).fillBefore(q.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,o.copy(s))}function tg(e,t,n){return t<e.openStart&&(e=new J(eg(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new J(eg(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}var ng={thead:[`table`],tbody:[`table`],tfoot:[`table`],caption:[`table`],colgroup:[`table`],col:[`table`,`colgroup`],tr:[`table`,`tbody`],td:[`table`,`tbody`,`tr`],th:[`table`,`tbody`,`tr`]};function rg(){return document.implementation.createHTMLDocument(`title`)}var ig=null;function ag(e){let t=window.trustedTypes;if(!t)return e;if(!ig){if(ig=t.defaultPolicy)try{return ig.createHTML(e)}catch{}ig=t.createPolicy(`ProseMirrorClipboard`,{createHTML:e=>e})}return ig.createHTML(e)}function og(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n=rg(),r=n.body,i=/<([a-z][^>\s]+)/i.exec(e),a;if((a=i&&ng[i[1].toLowerCase()])&&(e=a.map(e=>`<`+e+`>`).join(``)+e+a.map(e=>`</`+e+`>`).reverse().join(``)),r.innerHTML=ag(e),a)for(let e=0;e<a.length;e++)r=r.querySelector(a[e])||r;for(let e=0;e<n.styleSheets.length;e++){let t=n.styleSheets[e];for(let e=0;e<t.rules.length;e++){let n=t.rules[e];if(n instanceof CSSStyleRule){let e=r.querySelectorAll(n.selectorText);for(let t=0;t<e.length;t++)e[t].style.cssText+=n.style.cssText}}}return r}function sg(e){let t=e.querySelectorAll(Qp?`span:not([class]):not([style])`:`span.Apple-converted-space`);for(let n=0;n<t.length;n++){let r=t[n];r.childNodes.length==1&&r.textContent==`\xA0`&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(` `),r)}}function cg(e,t){if(!e.size)return e;let n=e.content.firstChild.type.schema,r;try{r=JSON.parse(t)}catch{return e}let{content:i,openStart:a,openEnd:o}=e;for(let e=r.length-2;e>=0;e-=2){let t=n.nodes[r[e]];if(!t||t.hasRequiredAttrs())break;try{i=q.from(t.create(r[e+1],i))}catch{break}a++,o++}return new J(i,a,o)}var lg={},ug={},dg={touchstart:!0,touchmove:!0},fg=class{constructor(){this.shiftKey=!1,this.mouseDown=null,this.lastKeyCode=null,this.lastKeyCodeTime=0,this.lastKeyDispatched=!1,this.lastClick={time:0,x:0,y:0,type:``,button:0},this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastIOSEnter=0,this.lastIOSEnterFallbackTimeout=-1,this.lastFocus=0,this.lastTouch=0,this.lastChromeDelete=0,this.composing=!1,this.compositionNode=null,this.composingTimeout=-1,this.compositionNodes=[],this.compositionEndedAt=-2e8,this.compositionID=1,this.badSafariComposition=!1,this.compositionPendingChanges=0,this.domChangeCount=0,this.eventHandlers=Object.create(null),this.hideSelectionGuard=null}};function pg(e){for(let t in lg){let n=lg[t];e.dom.addEventListener(t,e.input.eventHandlers[t]=t=>{vg(e,t)&&!_g(e,t)&&(e.editable||!(t.type in ug))&&n(e,t)},dg[t]?{passive:!0}:void 0)}em&&e.dom.addEventListener(`input`,()=>null),gg(e)}function mg(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function hg(e){e.input.mouseDown&&e.input.mouseDown.done(),e.domObserver.stop();for(let t in e.input.eventHandlers)e.dom.removeEventListener(t,e.input.eventHandlers[t]);clearTimeout(e.input.composingTimeout),clearTimeout(e.input.lastIOSEnterFallbackTimeout)}function gg(e){e.someProp(`handleDOMEvents`,t=>{for(let n in t)e.input.eventHandlers[n]||e.dom.addEventListener(n,e.input.eventHandlers[n]=t=>_g(e,t))})}function _g(e,t){return e.someProp(`handleDOMEvents`,n=>{let r=n[t.type];return r?r(e,t)||t.defaultPrevented:!1})}function vg(e,t){if(!t.bubbles)return!0;if(t.defaultPrevented)return!1;for(let n=t.target;n!=e.dom;n=n.parentNode)if(!n||n.nodeType==11||n.pmViewDesc&&n.pmViewDesc.stopEvent(t))return!1;return!0}function yg(e,t){!_g(e,t)&&lg[t.type]&&(e.editable||!(t.type in ug))&&lg[t.type](e,t)}function bg(e,t){let{input:n}=e;return n.lastKeyDispatched||e.composing?!1:(n.lastKeyDispatched=!0,typeof t==`string`&&(t=zp(t==`Backspace`?8:13,t)),e.someProp(`handleKeyDown`,n=>n(e,t)))}ug.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=n.keyCode==16||n.shiftKey,!Lg(e)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),e.input.lastKeyDispatched=!1,!(im&&Qp&&n.keyCode==13))){if(n.keyCode!=229&&e.domObserver.forceFlush(),tm&&n.keyCode==13&&!n.ctrlKey&&!n.altKey&&!n.metaKey){let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout(()=>{e.input.lastIOSEnter==t&&(bg(e,`Enter`),e.input.lastIOSEnter=0)},200)}else bg(e,n)||Kh(e,n)?n.preventDefault():mg(e,`key`)}},ug.keyup=(e,t)=>{t.keyCode==16&&(e.input.shiftKey=!1)},ug.keypress=(e,t)=>{let n=t;if(Lg(e)||!n.charCode||n.ctrlKey&&!n.altKey||nm&&n.metaKey)return;if(e.someProp(`handleKeyPress`,t=>t(e,n))){n.preventDefault();return}let r=e.state.selection;if(!(r instanceof X)||!r.$from.sameParent(r.$to)){let t=String.fromCharCode(n.charCode),i=()=>e.state.tr.insertText(t).scrollIntoView();!/[\r\n]/.test(t)&&!e.someProp(`handleTextInput`,n=>n(e,r.$from.pos,r.$to.pos,t,i))&&e.dispatch(i()),n.preventDefault()}};function xg(e){return{left:e.clientX,top:e.clientY}}function Sg(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}function Cg(e,t,n,r,i){if(r==-1)return!1;let a=e.state.doc.resolve(r);for(let r=a.depth+1;r>0;r--)if(e.someProp(t,t=>r>a.depth?t(e,n,a.nodeAfter,a.before(r),i,!0):t(e,n,a.node(r),a.before(r),i,!1)))return!0;return!1}function wg(e,t,n){if(e.focused||e.focus(),e.state.selection.eq(t))return;let r=e.state.tr.setSelection(t);r.setMeta(`pointer`,!0),e.dispatch(r)}function Tg(e,t){if(t==-1)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return r&&r.isAtom&&sf.isSelectable(r)?(wg(e,new sf(n)),!0):!1}function Eg(e,t){if(t==-1)return!1;let n=e.state.selection,r,i;n instanceof sf&&(r=n.node);let a=e.state.doc.resolve(t);for(let e=a.depth+1;e>0;e--){let t=e>a.depth?a.nodeAfter:a.node(e);if(sf.isSelectable(t)){i=r&&n.$from.depth>0&&e>=n.$from.depth&&a.before(n.$from.depth+1)==n.$from.pos?a.before(n.$from.depth):a.before(e);break}}return i!=null&&(wg(e,sf.create(e.state.doc,i)),!0)}function Dg(e,t,n,r,i){return Cg(e,`handleClickOn`,t,n,r)||e.someProp(`handleClick`,n=>n(e,t,r))||(i?Eg(e,n):Tg(e,n))}function Og(e,t,n,r){return Cg(e,`handleDoubleClickOn`,t,n,r)||e.someProp(`handleDoubleClick`,n=>n(e,t,r))}function kg(e,t,n,r){return Cg(e,`handleTripleClickOn`,t,n,r)||e.someProp(`handleTripleClick`,n=>n(e,t,r))||Ag(e,n,r)}function Ag(e,t,n){if(n.button!=0)return!1;let r=jg(e,t,!0),i=e.state.doc;return r?(wg(e,r),r instanceof X&&i.eq(e.state.doc)&&(e.input.mouseDown=new Ig(e,r)),!0):!1}function jg(e,t,n){let r=e.state.doc;if(t==-1)return r.inlineContent?X.create(r,0,r.content.size):null;let i=r.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e),a=i.before(e);if(t.inlineContent)return X.create(r,a+1,a+1+t.content.size);if(n&&sf.isSelectable(t))return sf.create(r,a)}return null}function Mg(e){return Ug(e)}var Ng=nm?`metaKey`:`ctrlKey`;lg.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=Mg(e),i=Date.now(),a=`singleClick`;i-e.input.lastClick.time<500&&Sg(n,e.input.lastClick)&&!n[Ng]&&e.input.lastClick.button==n.button&&(e.input.lastClick.type==`singleClick`?a=`doubleClick`:e.input.lastClick.type==`doubleClick`&&(a=`tripleClick`)),e.input.lastClick={time:i,x:n.clientX,y:n.clientY,type:a,button:n.button},e.input.mouseDown&&e.input.mouseDown.done();let o=e.posAtCoords(xg(n));o&&(a==`singleClick`?e.input.mouseDown=new Fg(e,o,n,!!r):(a==`doubleClick`?Og:kg)(e,o.pos,o.inside,n)?n.preventDefault():mg(e,`pointer`))};var Pg=class{constructor(e){this.view=e,this.mightDrag=null,e.root.addEventListener(`mouseup`,this.up=this.up.bind(this)),e.root.addEventListener(`mousemove`,this.move=this.move.bind(this))}up(e){this.done()}move(e){e.buttons==0&&this.done()}done(){this.view.root.removeEventListener(`mouseup`,this.up),this.view.root.removeEventListener(`mousemove`,this.move),this.view.input.mouseDown==this&&(this.view.input.mouseDown=null)}delaySelUpdate(){return!1}},Fg=class extends Pg{constructor(e,t,n,r){super(e),this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.startDoc=e.state.doc,this.selectNode=!!n[Ng],this.allowDefault=n.shiftKey;let i,a;if(t.inside>-1)i=e.state.doc.nodeAt(t.inside),a=t.inside;else{let n=e.state.doc.resolve(t.pos);i=n.parent,a=n.depth?n.before():0}let o=r?null:n.target,s=o?e.docView.nearestDesc(o,!0):null;this.target=s&&Z(s.nodeDOM)?s.nodeDOM:null;let{selection:c}=e.state;n.button==0&&(i.type.spec.draggable&&i.type.spec.selectable!==!1||c instanceof sf&&c.from<=a&&c.to>a)&&(this.mightDrag={node:i,pos:a,addAttr:!(!this.target||this.target.draggable),setUneditable:!!(this.target&&Xp&&!this.target.hasAttribute(`contentEditable`))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout(()=>{this.view.input.mouseDown==this&&this.target.setAttribute(`contentEditable`,`false`)},20),this.view.domObserver.start()),mg(e,`pointer`)}done(){super.done(),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute(`draggable`),this.mightDrag.setUneditable&&this.target.removeAttribute(`contentEditable`),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout(()=>{this.view.isDestroyed||gh(this.view)})}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(xg(e))),this.updateAllowDefault(e),this.allowDefault||!t?mg(this.view,`pointer`):Dg(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():e.button==0&&(this.flushed||em&&this.mightDrag&&!this.mightDrag.node.isAtom||Qp&&!this.view.state.selection.visible&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(wg(this.view,Y.near(this.view.state.doc.resolve(t.pos))),e.preventDefault()):mg(this.view,`pointer`)}move(e){this.updateAllowDefault(e),mg(this.view,`pointer`),super.move(e)}updateAllowDefault(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0)}delaySelUpdate(){return this.allowDefault?(this.delayedSelectionSync=!0,!0):!1}},Ig=class extends Pg{constructor(e,t){super(e),this.startSelection=t,this.startDoc=e.state.doc}move(e){if(e.buttons==0||this.view.isDestroyed||!this.view.state.doc.eq(this.startDoc)){this.done();return}e.preventDefault(),mg(this.view,`pointer`);let t=this.view.posAtCoords(xg(e)),n=t&&jg(this.view,t.inside,!1);if(!n)return;let{doc:r}=this.view.state,i=this.startSelection,[a,o]=n.from<i.from?[i.to,n.from]:[i.from,n.to];wg(this.view,X.create(r,a,o))}};lg.touchstart=e=>{e.input.lastTouch=Date.now(),Mg(e),mg(e,`pointer`)},lg.touchmove=e=>{e.input.lastTouch=Date.now(),mg(e,`pointer`)},lg.contextmenu=e=>Mg(e);function Lg(e,t){return e.composing?!0:em&&Math.abs(Date.now()-e.input.compositionEndedAt)<500?(e.input.compositionEndedAt=-2e8,!0):!1}var Rg=im?5e3:-1;ug.compositionstart=ug.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$to;if(t.selection instanceof X&&t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some(e=>e.type.spec.inclusive===!1)||Qp&&rm&&zg(e)))e.markCursor=e.state.storedMarks||n.marks(),Ug(e,!0),e.markCursor=null;else if(Ug(e,!t.selection.empty),Xp&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelectionRange();for(let n=t.focusNode,r=t.focusOffset;n&&Z(n)&&r!=0;){let t=r<0?n.lastChild:n.childNodes[r-1];if(!t)break;if(Mp(t)){let n=e.domSelection();n&&n.collapse(t,t.nodeValue.length);break}n=t,r=-1}}e.input.composing=!0}Bg(e,Rg)};function zg(e){let{focusNode:t,focusOffset:n}=e.domSelectionRange();if(!t||!Z(t)||n>=t.childNodes.length)return!1;let r=t.childNodes[n];return Z(r)&&r.contentEditable==`false`}ug.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now(),e.input.compositionPendingChanges=e.domObserver.pendingRecords().length?e.input.compositionID:0,e.input.compositionNode=null,e.input.badSafariComposition?e.domObserver.forceFlush():e.input.compositionPendingChanges&&Promise.resolve().then(()=>e.domObserver.flush()),e.input.compositionID++,Bg(e,20))};function Bg(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout(()=>Ug(e),t))}function Vg(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=Date.now());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function Hg(e){let t=e.domSelectionRange();if(!t.focusNode)return null;let n=Pp(t.focusNode,t.focusOffset),r=Fp(t.focusNode,t.focusOffset);if(n&&r&&n!=r){let t=r.pmViewDesc,i=e.domObserver.lastChangedTextNode;if(n==i||r==i)return i;if(!t||!t.isText(r.nodeValue))return r;if(e.input.compositionNode==r){let e=n.pmViewDesc;if(e&&e.isText(n.nodeValue))return r}}return n||r}function Ug(e,t=!1){if(!(im&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),Vg(e),t||e.docView&&e.docView.dirty){let n=mh(e),r=e.state.selection;return n&&!n.eq(r)?e.dispatch(e.state.tr.setSelection(n)):(e.markCursor||t)&&!r.$from.node(r.$from.sharedDepth(r.to)).inlineContent?e.dispatch(e.state.tr.deleteSelection()):e.updateState(e.state),!0}return!1}}function Wg(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement(`div`));n.appendChild(t),n.style.cssText=`position: fixed; left: -10000px; top: 10px`;let r=getSelection(),i=document.createRange();i.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(i),setTimeout(()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()},50)}var Gg=Jp&&Yp<15||tm&&om<604;lg.copy=ug.cut=(e,t)=>{let n=t,r=e.state.selection,i=n.type==`cut`;if(r.empty)return;let a=Gg?null:n.clipboardData,{dom:o,text:s}=qh(e,r.content());a?(n.preventDefault(),a.clearData(),a.setData(`text/html`,o.innerHTML),a.setData(`text/plain`,s)):Wg(e,o),i&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta(`uiEvent`,`cut`))};function Kg(e){return e.openStart==0&&e.openEnd==0&&e.content.childCount==1?e.content.firstChild:null}function qg(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?`textarea`:`div`));n||(r.contentEditable=`true`),r.style.cssText=`position: fixed; left: -10000px; top: 10px`,r.focus();let i=e.input.shiftKey&&e.input.lastKeyCode!=45;setTimeout(()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?Jg(e,r.value,null,i,t):Jg(e,r.textContent,r.innerHTML,i,t)},50)}function Jg(e,t,n,r,i){let a=Jh(e,t,n,r,e.state.selection.$from);if(e.someProp(`handlePaste`,t=>t(e,i,a||J.empty)))return!0;if(!a)return!1;let o=Kg(a),s=o?e.state.tr.replaceSelectionWith(o,r):e.state.tr.replaceSelection(a);return e.dispatch(s.scrollIntoView().setMeta(`paste`,!0).setMeta(`uiEvent`,`paste`)),!0}function Yg(e){let t=e.getData(`text/plain`)||e.getData(`Text`);if(t)return t;let n=e.getData(`text/uri-list`);return n?n.replace(/\r?\n/g,` `):``}ug.paste=(e,t)=>{let n=t;if(e.composing&&!im)return;let r=Gg?null:n.clipboardData,i=e.input.shiftKey&&e.input.lastKeyCode!=45;r&&Jg(e,Yg(r),r.getData(`text/html`),i,n)?n.preventDefault():qg(e,n)};var Xg=class{constructor(e,t,n){this.slice=e,this.move=t,this.node=n}},Zg=nm?`altKey`:`ctrlKey`;function Qg(e,t){let n;return e.someProp(`dragCopies`,e=>{n||=e(t)}),n==null?!t[Zg]:!n}lg.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let i=e.state.selection,a=i.empty?null:e.posAtCoords(xg(n)),o;if(!(a&&a.pos>=i.from&&a.pos<=(i instanceof sf?i.to-1:i.to))){if(r&&r.mightDrag)o=sf.create(e.state.doc,r.mightDrag.pos);else if(n.target&&Z(n.target)){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&(o=sf.create(e.state.doc,t.posBefore))}}let{dom:s,text:c,slice:l}=qh(e,(o||e.state.selection).content());(!n.dataTransfer.files.length||!Qp||$p>120)&&n.dataTransfer.clearData(),n.dataTransfer.setData(Gg?`Text`:`text/html`,s.innerHTML),n.dataTransfer.effectAllowed=`copyMove`,Gg||n.dataTransfer.setData(`text/plain`,c),e.dragging=new Xg(l,Qg(e,n),o)},lg.dragend=e=>{let t=e.dragging;window.setTimeout(()=>{e.dragging==t&&(e.dragging=null)},50)},ug.dragover=ug.dragenter=(e,t)=>t.preventDefault(),ug.drop=(e,t)=>{try{$g(e,t,e.dragging)}finally{e.dragging=null}};function $g(e,t,n){if(!t.dataTransfer)return;let r=e.posAtCoords(xg(t));if(!r)return;let i=e.state.doc.resolve(r.pos),a=n&&n.slice;a?e.someProp(`transformPasted`,t=>{a=t(a,e,!1)}):a=Jh(e,Yg(t.dataTransfer),Gg?null:t.dataTransfer.getData(`text/html`),!1,i);let o=!!(n&&Qg(e,t));if(e.someProp(`handleDrop`,n=>n(e,t,a||J.empty,o))){t.preventDefault();return}if(!a)return;t.preventDefault();let s=a?Pd(e.state.doc,i.pos,a):i.pos;s??=i.pos;let c=e.state.tr;if(o){let{node:e}=n;e?e.replace(c):c.deleteSelection()}let l=c.mapping.map(s),u=a.openStart==0&&a.openEnd==0&&a.content.childCount==1,d=c.doc;if(u?c.replaceRangeWith(l,l,a.content.firstChild):c.replaceRange(l,l,a),c.doc.eq(d))return;let f=c.doc.resolve(l);if(u&&sf.isSelectable(a.content.firstChild)&&f.nodeAfter&&f.nodeAfter.sameMarkup(a.content.firstChild))c.setSelection(new sf(f));else{let t=c.mapping.map(s);c.mapping.maps[c.mapping.maps.length-1].forEach((e,n,r,i)=>t=i),c.setSelection(Th(e,f,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta(`uiEvent`,`drop`))}lg.focus=e=>{if(e.input.lastFocus=Date.now(),!e.focused){e.domObserver.stop(),e.dom.classList.add(`ProseMirror-focused`),e.domObserver.start(),e.focused=!0;let t=e.domSelectionRange();if(!e.domObserver.currentSelection.eq(t)){let{focusNode:n,focusOffset:r}=t;setTimeout(()=>{let t=e.domSelectionRange();t.focusNode==n&&t.focusOffset==r&&e.docView&&e.hasFocus()&&gh(e)},20)}}},lg.blur=(e,t)=>{let n=t;e.focused&&=(e.domObserver.stop(),e.dom.classList.remove(`ProseMirror-focused`),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),!1)},lg.beforeinput=(e,t)=>{if(im&&t.inputType==`deleteContentBackward`){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout(()=>{if(e.input.domChangeCount!=t||e.domObserver.pendingRecords().length||(e.dom.blur(),e.focus(),bg(e,`Backspace`)))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())},50)}};for(let e in ug)lg[e]=ug[e];function e_(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}var t_=class{constructor(e){this.frag=e,this.index=0,this.off=0}nodeAt(e){for(;this.off<=e&&this.index<this.frag.childCount;){let t=this.frag.child(this.index);if(this.off==e)return t;this.off+=t.nodeSize,this.index++}return null}},n_=class e{constructor(e,t){this.toDOM=e,this.spec=t||s_,this.side=this.spec.side||0}map(e,t,n,r){let{pos:i,deleted:a}=e.mapResult(t.from+r,this.side<0?-1:1);return a?null:new a_(i-n,i-n,this)}valid(){return!0}eq(t){return this==t||t instanceof e&&(this.spec.key&&this.spec.key==t.spec.key||this.toDOM==t.toDOM&&e_(this.spec,t.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}},r_=class e{constructor(e,t){this.attrs=e,this.spec=t||s_}map(e,t,n,r){let i=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,a=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return i>=a?null:new a_(i,a,this)}valid(e,t){return t.from<t.to}eq(t){return this==t||t instanceof e&&e_(this.attrs,t.attrs)&&e_(this.spec,t.spec)}static is(t){return t.type instanceof e}destroy(){}},i_=class e{constructor(e,t){this.attrs=e,this.spec=t||s_}map(e,t,n,r){let i=e.mapResult(t.from+r,1);if(i.deleted)return null;let a=e.mapResult(t.to+r,-1);return a.deleted||a.pos<=i.pos?null:new a_(i.pos-n,a.pos-n,this)}valid(e,t,n){let r=n.nodeAt(t.from);return!!r&&!r.isText&&t.from+r.nodeSize==t.to}eq(t){return this==t||t instanceof e&&e_(this.attrs,t.attrs)&&e_(this.spec,t.spec)}destroy(){}},a_=class e{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(t,n){return new e(t,n,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(t,n,r){return new e(t,t,new n_(n,r))}static inline(t,n,r,i){return new e(t,n,new r_(r,i))}static node(t,n,r,i){return new e(t,n,new i_(r,i))}get spec(){return this.type.spec}get inline(){return this.type instanceof r_}get widget(){return this.type instanceof n_}},o_=[],s_={},c_=class e{constructor(e,t){this.local=e.length?e:o_,this.children=t.length?t:o_}static create(e,t){return t.length?g_(t,e,0,s_):l_}find(e,t,n){let r=[];return this.findInner(e??0,t??1e9,r,0,n),r}findInner(e,t,n,r,i){for(let a=0;a<this.local.length;a++){let o=this.local[a];o.from<=t&&o.to>=e&&(!i||i(o.spec))&&n.push(o.copy(o.from+r,o.to+r))}for(let a=0;a<this.children.length;a+=3)if(this.children[a]<t&&this.children[a+1]>e){let o=this.children[a]+1;this.children[a+2].findInner(e-o,t-o,n,r+o,i)}}map(e,t,n){return this==l_||e.maps.length==0?this:this.mapInner(e,t,0,0,n||s_)}mapInner(t,n,r,i,a){let o;if(this.local.length){let e=new t_(n.content);for(let s=0;s<this.local.length;s++){let c=this.local[s].map(t,r,i);c&&c.type.valid(n,c,e)?(o||=[]).push(c):a.onRemove&&a.onRemove(this.local[s].spec)}}return this.children.length?d_(this.children,o||[],t,n,r,i,a):o?new e(o.sort(__),o_):l_}add(t,n){return n.length?this==l_?e.create(t,n):this.addInner(t,n,0):this}addInner(t,n,r){let i,a=0;t.forEach((e,t)=>{let o=t+r,s;if(s=m_(n,e,o)){for(i||=this.children.slice();a<i.length&&i[a]<t;)a+=3;i[a]==t?i[a+2]=i[a+2].addInner(e,s,o+1):i.splice(a,0,t,t+e.nodeSize,g_(s,e,o+1,s_)),a+=3}});let o=f_(a?h_(n):n,-r);if(o.length){let e=new t_(t.content);for(let n=0;n<o.length;n++)o[n].type.valid(t,o[n],e)||o.splice(n--,1)}return new e(o.length?this.local.concat(o).sort(__):this.local,i||this.children)}remove(e){return e.length==0||this==l_?this:this.removeInner(e,0)}removeInner(t,n){let r=this.children,i=this.local;for(let e=0;e<r.length;e+=3){let i,a=r[e]+n,o=r[e+1]+n;for(let e=0,n;e<t.length;e++)(n=t[e])&&n.from>a&&n.to<o&&(t[e]=null,(i||=[]).push(n));if(!i)continue;r==this.children&&(r=this.children.slice());let s=r[e+2].removeInner(i,a+1);s==l_?(r.splice(e,3),e-=3):r[e+2]=s}if(i.length){for(let e=0,r;e<t.length;e++)if(r=t[e])for(let e=0;e<i.length;e++)i[e].eq(r,n)&&(i==this.local&&(i=this.local.slice()),i.splice(e--,1))}return r==this.children&&i==this.local?this:i.length||r.length?new e(i,r):l_}forChild(t,n){if(this==l_)return this;if(n.isLeaf)return e.empty;let r,i;for(let e=0;e<this.children.length;e+=3)if(this.children[e]>=t){this.children[e]==t&&(r=this.children[e+2]);break}let a=t+1,o=a+n.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<o&&t.to>a&&t.type instanceof r_){let e=Math.max(a,t.from)-a,n=Math.min(o,t.to)-a;e<n&&(i||=[]).push(t.copy(e,n))}}if(i){let t=new e(i.sort(__),o_);return r?new u_([t,r]):t}return r||l_}eq(t){if(this==t)return!0;if(!(t instanceof e)||this.local.length!=t.local.length||this.children.length!=t.children.length)return!1;for(let e=0;e<this.local.length;e++)if(!this.local[e].eq(t.local[e]))return!1;for(let e=0;e<this.children.length;e+=3)if(this.children[e]!=t.children[e]||this.children[e+1]!=t.children[e+1]||!this.children[e+2].eq(t.children[e+2]))return!1;return!0}locals(e){return v_(this.localsInner(e))}localsInner(e){if(this==l_)return o_;if(e.inlineContent||!this.local.some(r_.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof r_||t.push(this.local[e]);return t}forEachSet(e){e(this)}};c_.empty=new c_([],[]),c_.removeOverlap=v_;var l_=c_.empty,u_=class e{constructor(e){this.members=e}map(t,n){let r=this.members.map(e=>e.map(t,n,s_));return e.from(r)}forChild(t,n){if(n.isLeaf)return c_.empty;let r=[];for(let i=0;i<this.members.length;i++){let a=this.members[i].forChild(t,n);a!=l_&&(a instanceof e?r=r.concat(a.members):r.push(a))}return e.from(r)}eq(t){if(!(t instanceof e)||t.members.length!=this.members.length)return!1;for(let e=0;e<this.members.length;e++)if(!this.members[e].eq(t.members[e]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let i=this.members[r].localsInner(e);if(i.length){if(!t)t=i;else{n&&=(t=t.slice(),!1);for(let e=0;e<i.length;e++)t.push(i[e])}}}return t?v_(n?t:t.sort(__)):o_}static from(t){switch(t.length){case 0:return l_;case 1:return t[0];default:return new e(t.every(e=>e instanceof c_)?t:t.reduce((e,t)=>e.concat(t instanceof c_?t:t.members),[]))}}forEachSet(e){for(let t=0;t<this.members.length;t++)this.members[t].forEachSet(e)}};function d_(e,t,n,r,i,a,o){let s=e.slice();for(let e=0,t=a;e<n.maps.length;e++){let r=0;n.maps[e].forEach((e,n,i,a)=>{let o=a-i-(n-e);for(let i=0;i<s.length;i+=3){let a=s[i+1];if(a<0||e>a+t-r)continue;let c=s[i]+t-r;n>=c?s[i+1]=e<=c?-2:-1:e>=t&&o&&(s[i]+=o,s[i+1]+=o)}r+=o}),t=n.maps[e].map(t,-1)}let c=!1;for(let t=0;t<s.length;t+=3)if(s[t+1]<0){if(s[t+1]==-2){c=!0,s[t+1]=-1;continue}let l=n.map(e[t]+a),u=l-i;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+a,-1)-i,{index:f,offset:p}=r.content.findIndex(u),m=r.maybeChild(f);if(m&&p==u&&p+m.nodeSize==d){let r=s[t+2].mapInner(n,m,l+1,e[t]+a+1,o);r==l_?(s[t+1]=-2,c=!0):(s[t]=u,s[t+1]=d,s[t+2]=r)}else c=!0}if(c){let c=g_(p_(s,e,t,n,i,a,o),r,0,o);t=c.local;for(let e=0;e<s.length;e+=3)s[e+1]<0&&(s.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<s.length&&s[t]<n;)t+=3;s.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new c_(t.sort(__),s)}function f_(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let i=e[r];n.push(new a_(i.from+t,i.to+t,i.type))}return n}function p_(e,t,n,r,i,a,o){function s(e,t){for(let a=0;a<e.local.length;a++){let s=e.local[a].map(r,i,t);s?n.push(s):o.onRemove&&o.onRemove(e.local[a].spec)}for(let n=0;n<e.children.length;n+=3)s(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)e[n+1]==-1&&s(e[n+2],t[n]+a+1);return n}function m_(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,i=null;for(let t=0,a;t<e.length;t++)(a=e[t])&&a.from>n&&a.to<r&&((i||=[]).push(a),e[t]=null);return i}function h_(e){let t=[];for(let n=0;n<e.length;n++)e[n]!=null&&t.push(e[n]);return t}function g_(e,t,n,r){let i=[],a=!1;t.forEach((t,o)=>{let s=m_(e,t,o+n);if(s){a=!0;let e=g_(s,t,n+o+1,r);e!=l_&&i.push(o,o+t.nodeSize,e)}});let o=f_(a?h_(e):e,-n).sort(__);if(o.length){let e=new t_(t.content);for(let n=0;n<o.length;n++)o[n].type.valid(t,o[n],e)||(r.onRemove&&r.onRemove(o[n].spec),o.splice(n--,1))}return o.length||i.length?new c_(o,i):l_}function __(e,t){return e.from-t.from||e.to-t.to}function v_(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let i=n+1;i<t.length;i++){let a=t[i];if(a.from==r.from)a.to!=r.to&&(t==e&&(t=e.slice()),t[i]=a.copy(a.from,r.to),y_(t,i+1,a.copy(r.to,a.to)));else{a.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,a.from),y_(t,i,r.copy(a.from,r.to)));break}}}return t}function y_(e,t,n){for(;t<e.length&&__(n,e[t])>0;)t++;e.splice(t,0,n)}function b_(e){let t=[];return e.someProp(`decorations`,n=>{let r=n(e.state);r&&r!=l_&&t.push(r)}),e.cursorWrapper&&t.push(c_.create(e.state.doc,[e.cursorWrapper.deco])),u_.from(t)}var x_={childList:!0,characterData:!0,characterDataOldValue:!0,attributes:!0,attributeOldValue:!0,subtree:!0},S_=Jp&&Yp<=11,C_=class{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}set(e){this.anchorNode=e.anchorNode,this.anchorOffset=e.anchorOffset,this.focusNode=e.focusNode,this.focusOffset=e.focusOffset}clear(){this.anchorNode=this.focusNode=null}eq(e){return e.anchorNode==this.anchorNode&&e.anchorOffset==this.anchorOffset&&e.focusNode==this.focusNode&&e.focusOffset==this.focusOffset}},w_=class{constructor(e,t){this.view=e,this.handleDOMChange=t,this.queue=[],this.flushingSoon=-1,this.observer=null,this.currentSelection=new C_,this.onCharData=null,this.suppressingSelectionUpdates=!1,this.lastChangedTextNode=null,this.observer=window.MutationObserver&&new window.MutationObserver(t=>{for(let e=0;e<t.length;e++)this.queue.push(t[e]);Jp&&Yp<=11&&t.some(e=>e.type==`childList`&&e.removedNodes.length||e.type==`characterData`&&e.oldValue.length>e.target.nodeValue.length)?this.flushSoon():em&&e.composing&&t.some(e=>e.type==`childList`&&e.target.nodeName==`TR`)?(e.input.badSafariComposition=!0,this.flushSoon()):this.flush()}),S_&&(this.onCharData=e=>{this.queue.push({target:e.target,type:`characterData`,oldValue:e.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this)}flushSoon(){this.flushingSoon<0&&(this.flushingSoon=window.setTimeout(()=>{this.flushingSoon=-1,this.flush()},20))}forceFlush(){this.flushingSoon>-1&&(window.clearTimeout(this.flushingSoon),this.flushingSoon=-1,this.flush())}start(){this.observer&&(this.observer.takeRecords(),this.observer.observe(this.view.dom,x_)),this.onCharData&&this.view.dom.addEventListener(`DOMCharacterDataModified`,this.onCharData),this.connectSelection()}stop(){if(this.observer){let e=this.observer.takeRecords();if(e.length){for(let t=0;t<e.length;t++)this.queue.push(e[t]);window.setTimeout(()=>this.flush(),20)}this.observer.disconnect()}this.onCharData&&this.view.dom.removeEventListener(`DOMCharacterDataModified`,this.onCharData),this.disconnectSelection()}connectSelection(){this.view.dom.ownerDocument.addEventListener(`selectionchange`,this.onSelectionChange)}disconnectSelection(){this.view.dom.ownerDocument.removeEventListener(`selectionchange`,this.onSelectionChange)}suppressSelectionUpdates(){this.suppressingSelectionUpdates=!0,setTimeout(()=>this.suppressingSelectionUpdates=!1,50)}onSelectionChange(){if(Eh(this.view)){if(this.suppressingSelectionUpdates)return gh(this.view);if(Jp&&Yp<=11&&!this.view.state.selection.empty){let e=this.view.domSelectionRange();if(e.focusNode&&Op(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset))return this.flushSoon()}this.flush()}}setCurSelection(){this.currentSelection.set(this.view.domSelectionRange())}ignoreSelectionChange(e){if(!e.focusNode)return!0;let t=new Set,n;for(let n=e.focusNode;n;n=wp(n))t.add(n);for(let r=e.anchorNode;r;r=wp(r))if(t.has(r)){n=r;break}let r=n&&this.view.docView.nearestDesc(n);if(r&&r.ignoreMutation({type:`selection`,target:Mp(n)?n.parentNode:n}))return this.setCurSelection(),!0}pendingRecords(){if(this.observer)for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}flush(){let{view:e}=this;if(!e.docView||this.flushingSoon>-1)return;let t=this.pendingRecords();t.length&&(this.queue=[]);let n,r=!1;!this.suppressingSelectionUpdates&&Eh(e)&&(n=e.domSelectionRange(),r=!this.currentSelection.eq(n)&&!this.ignoreSelectionChange(n));let i=-1,a=-1,o=!1,s=[];if(e.editable)for(let e=0;e<t.length;e++){let n=this.registerMutation(t[e],s);n&&(i=i<0?n.from:Math.min(n.from,i),a=a<0?n.to:Math.max(n.to,a),n.typeOver&&(o=!0))}if(s.some(e=>e.nodeName==`BR`)&&(e.input.lastKeyCode==8||e.input.lastKeyCode==46||Qp&&(e.composing||e.input.compositionEndedAt>Date.now()-50)&&t.some(e=>e.type==`childList`&&e.removedNodes.length))){for(let e of s)if(e.nodeName==`BR`&&e.parentNode){let t=e.nextSibling;for(;t&&Z(t);){if(t.contentEditable==`false`){e.parentNode.removeChild(e);break}t=t.firstChild}}}else if(Xp&&s.length){let t=s.filter(e=>e.nodeName==`BR`);if(t.length==2){let[e,n]=t;e.parentNode&&e.parentNode.parentNode==n.parentNode?n.remove():e.remove()}else{let{focusNode:n}=this.currentSelection;for(let r of t){let t=r.parentNode;t&&t.nodeName==`LI`&&(!n||A_(e,n)!=t)&&r.remove()}}}let c=null;i<0&&r&&e.input.lastFocus>Date.now()-200&&Math.max(e.input.lastTouch,e.input.lastClick.time)<Date.now()-300&&Rp(n)&&(c=mh(e))&&c.eq(Y.near(e.state.doc.resolve(0),1))?(e.input.lastFocus=0,gh(e),this.currentSelection.set(n),e.scrollToSelection()):(i>-1||r)&&(i>-1&&(e.docView.markDirty(i,a),D_(e)),e.input.badSafariComposition&&(e.input.badSafariComposition=!1,j_(e,s)),this.handleDOMChange(i,a,o,s),e.docView&&e.docView.dirty?e.updateState(e.state):n&&!this.currentSelection.eq(n)&&gh(e),n&&this.currentSelection.set(n))}registerMutation(e,t){if(t.indexOf(e.target)>-1)return null;let n=this.view.docView.nearestDesc(e.target);if(e.type==`attributes`&&(n==this.view.docView||e.attributeName==`contenteditable`||e.attributeName==`style`&&!e.oldValue&&!e.target.getAttribute(`style`))||!n||n.ignoreMutation(e))return null;if(e.type==`childList`){for(let n=0;n<e.addedNodes.length;n++){let r=e.addedNodes[n];t.push(r),Mp(r)&&(this.lastChangedTextNode=r)}if(n.contentDOM&&n.contentDOM!=n.dom&&!n.contentDOM.contains(e.target))return{from:n.posBefore,to:n.posAfter};let r=e.previousSibling,i=e.nextSibling;if(Jp&&Yp<=11&&e.addedNodes.length)for(let t=0;t<e.addedNodes.length;t++){let{previousSibling:n,nextSibling:a}=e.addedNodes[t];(!n||Array.prototype.indexOf.call(e.addedNodes,n)<0)&&(r=n),(!a||Array.prototype.indexOf.call(e.addedNodes,a)<0)&&(i=a)}let a=r&&r.parentNode==e.target?Cp(r)+1:0,o=n.localPosFromDOM(e.target,a,-1),s=i&&i.parentNode==e.target?Cp(i):e.target.childNodes.length;return{from:o,to:n.localPosFromDOM(e.target,s,1)}}return e.type==`attributes`?{from:n.posAtStart-n.border,to:n.posAtEnd+n.border}:(this.lastChangedTextNode=e.target,{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue})}},T_=new WeakMap,E_=!1;function D_(e){if(!T_.has(e)&&(T_.set(e,null),[`normal`,`nowrap`,`pre-line`].indexOf(getComputedStyle(e.dom).whiteSpace)!==-1)){if(e.requiresGeckoHackNode=Xp,E_)return;console.warn(`ProseMirror expects the CSS white-space property to be set, preferably to 'pre-wrap'. It is recommended to load style/prosemirror.css from the prosemirror-view package.`),E_=!0}}function O_(e,t){let n=t.startContainer,r=t.startOffset,i=t.endContainer,a=t.endOffset,o=e.domAtPos(e.state.selection.anchor);return Op(o.node,o.offset,i,a)&&([n,r,i,a]=[i,a,n,r]),{anchorNode:n,anchorOffset:r,focusNode:i,focusOffset:a}}function k_(e,t){if(t.getComposedRanges){let n=t.getComposedRanges(e.root)[0];if(n)return O_(e,n)}let n;function r(e){e.preventDefault(),e.stopImmediatePropagation(),n=e.getTargetRanges()[0]}return e.dom.addEventListener(`beforeinput`,r,!0),document.execCommand(`indent`),e.dom.removeEventListener(`beforeinput`,r,!0),n?O_(e,n):null}function A_(e,t){for(let n=t.parentNode;n&&n!=e.dom;n=n.parentNode){let t=e.docView.nearestDesc(n,!0);if(t&&t.node.isBlock)return n}return null}function j_(e,t){let{focusNode:n,focusOffset:r}=e.domSelectionRange();for(let i of t)if(i.parentNode?.nodeName==`TR`){let t=i.nextSibling;for(;t&&t.nodeName!=`TD`&&t.nodeName!=`TH`;)t=t.nextSibling;if(t){let a=t;for(;;){let e=a.firstChild;if(!e||!Z(e)||e.contentEditable==`false`||/^(BR|IMG)$/.test(e.nodeName))break;a=e}a.insertBefore(i,a.firstChild),n==i&&e.domSelection().collapse(i,r)}else i.parentNode.removeChild(i)}}function M_(e,t,n,r){let{node:i,fromOffset:a,toOffset:o,from:s,to:c}=e.docView.parseRange(t,n),l=e.domSelectionRange(),u,d=l.anchorNode;if(d&&Np(e.dom,d)&&(u=[{node:d,offset:l.anchorOffset}],Rp(l)||u.push({node:l.focusNode,offset:l.focusOffset})),Qp&&e.input.lastKeyCode===8)for(let e=o;e>a;e--){let t=i.childNodes[e-1],n=t.pmViewDesc;if(t.nodeName==`BR`&&!n){o=e;break}if(!n||n.size)break}let f=e.state.doc,p=e.someProp(`domParser`)||vu.fromSchema(e.state.schema),m=f.resolve(s),h=null,g=p.parse(i,{topNode:m.parent,topMatch:m.parent.contentMatchAt(m.index()),topOpen:!0,from:a,to:o,preserveWhitespace:m.parent.type.whitespace!=`pre`||`full`,findPositions:u,ruleFromNode:N_(r),context:m});if(u&&u[0].pos!=null){let e=u[0].pos,t=u[1]&&u[1].pos;t??=e,h={anchor:e+s,head:t+s}}return{doc:g,sel:h,from:s,to:c}}var N_=e=>t=>{let n=t.pmViewDesc;if(n)return n.parseRule(e);if(t.nodeName==`BR`&&t.parentNode){if(em&&/^(ul|ol)$/i.test(t.parentNode.nodeName)){let e=document.createElement(`div`);return e.appendChild(document.createElement(`li`)),{skip:e}}if(t.parentNode.lastChild==t||em&&/^(tr|table)$/i.test(t.parentNode.nodeName))return{ignore:!0}}else if(t.nodeName==`IMG`&&t.getAttribute(`mark-placeholder`))return{ignore:!0};return null},P_=/^(a|abbr|acronym|b|bd[io]|big|br|button|cite|code|data(list)?|del|dfn|em|i|img|ins|kbd|label|map|mark|meter|output|q|ruby|s|samp|small|span|strong|su[bp]|time|u|tt|var)$/i;function F_(e,t,n,r,i){let a=e.input.compositionPendingChanges||(e.composing?e.input.compositionID:0);if(e.input.compositionPendingChanges=0,t<0){let t=e.input.lastSelectionTime>Date.now()-50?e.input.lastSelectionOrigin:null,n=mh(e,t);if(n&&!e.state.selection.eq(n)){if(Qp&&im&&e.input.lastKeyCode===13&&Date.now()-100<e.input.lastKeyCodeTime&&bg(e,`Enter`))return;let r=e.state.tr.setSelection(n);t==`pointer`?r.setMeta(`pointer`,!0):t==`key`&&r.scrollIntoView(),a&&r.setMeta(`composition`,a),e.dispatch(r)}return}let o=e.state.doc.resolve(t),s=o.sharedDepth(n);t=o.before(s+1),n=e.state.doc.resolve(n).after(s+1);let c=e.state.selection,l=M_(e,t,n,i),u=e.state.doc,d=u.slice(l.from,l.to),f,p;e.input.lastKeyCode===8&&Date.now()-100<e.input.lastKeyCodeTime?(f=e.state.selection.to,p=`end`):(f=e.state.selection.from,p=`start`),e.input.lastKeyCode=null;let m=V_(d.content,l.doc.content,l.from,f,p);if(m&&e.input.domChangeCount++,(tm&&e.input.lastIOSEnter>Date.now()-225||im)&&i.some(e=>Z(e)&&!P_.test(e.nodeName))&&(!m||m.endA>=m.endB)&&bg(e,`Enter`)){e.input.lastIOSEnter=0;return}if(!m){if(r&&c instanceof X&&!c.empty&&c.$head.sameParent(c.$anchor)&&!e.composing&&!(l.sel&&l.sel.anchor!=l.sel.head))m={start:c.from,endA:c.to,endB:c.to};else{if(l.sel){let t=I_(e,e.state.doc,l.sel);if(t&&!t.eq(e.state.selection)){let n=e.state.tr.setSelection(t);a&&n.setMeta(`composition`,a),e.dispatch(n)}}return}}e.state.selection.from<e.state.selection.to&&m.start==m.endB&&e.state.selection instanceof X&&(m.start>e.state.selection.from&&m.start<=e.state.selection.from+2&&e.state.selection.from>=l.from?m.start=e.state.selection.from:m.endA<e.state.selection.to&&m.endA>=e.state.selection.to-2&&e.state.selection.to<=l.to&&(m.endB+=e.state.selection.to-m.endA,m.endA=e.state.selection.to)),Jp&&Yp<=11&&m.endB==m.start+1&&m.endA==m.start&&m.start>l.from&&l.doc.textBetween(m.start-l.from-1,m.start-l.from+1)==` \xA0`&&(m.start--,m.endA--,m.endB--);let h=l.doc.resolveNoCache(m.start-l.from),g=l.doc.resolveNoCache(m.endB-l.from),_=u.resolve(m.start),v=h.sameParent(g)&&h.parent.inlineContent&&_.end()>=m.endA;if((tm&&e.input.lastIOSEnter>Date.now()-225&&(!v||i.some(e=>e.nodeName==`DIV`||e.nodeName==`P`))||!v&&z_(l.doc,h.pos,g.pos))&&bg(e,`Enter`)){e.input.lastIOSEnter=0;return}if(e.state.selection.anchor>m.start&&(v?m.endA>m.start&&m.endB==m.start:R_(u,m.start,m.endA,h,g))&&bg(e,`Backspace`)){im&&Qp&&e.domObserver.suppressSelectionUpdates();return}Qp&&m.endB==m.start&&(e.input.lastChromeDelete=Date.now()),im&&!v&&h.start()!=g.start()&&g.parentOffset==0&&h.depth==g.depth&&l.sel&&l.sel.anchor==l.sel.head&&l.sel.head==m.endA&&(m.endB-=2,g=l.doc.resolveNoCache(m.endB-l.from),setTimeout(()=>bg(e,`Enter`),20));let y=m.start,b=m.endA,x=t=>{let n=t||e.state.tr.replace(y,b,l.doc.slice(m.start-l.from,m.endB-l.from));if(l.sel){let t=I_(e,n.doc,l.sel);t&&!(Qp&&e.composing&&t.empty&&(m.start!=m.endB||e.input.lastChromeDelete<Date.now()-100)&&(t.head==y||t.head==n.mapping.map(b)-1)||Jp&&t.empty&&t.head==y)&&n.setSelection(t)}return a&&n.setMeta(`composition`,a),n.scrollIntoView()},S;if(v){if(h.pos==g.pos){Jp&&Yp<=11&&h.parentOffset==0&&(e.domObserver.suppressSelectionUpdates(),setTimeout(()=>gh(e),20));let t=x(e.state.tr.delete(y,b)),n=u.resolve(m.start).marksAcross(u.resolve(m.endA));n&&t.ensureMarks(n),e.dispatch(t)}else if(m.endA==m.endB&&(S=L_(h.parent.content.cut(h.parentOffset,g.parentOffset),_.parent.content.cut(_.parentOffset,m.endA-_.start())))){let t=x(e.state.tr);S.type==`add`?t.addMark(y,b,S.mark):t.removeMark(y,b,S.mark),e.dispatch(t)}else if(h.parent.child(h.index()).isText&&h.index()==g.index()-+!g.textOffset){let t=h.parent.textBetween(h.parentOffset,g.parentOffset),n=()=>x(e.state.tr.insertText(t,y,b));e.someProp(`handleTextInput`,r=>r(e,y,b,t,n))||e.dispatch(n())}else e.dispatch(x())}else e.dispatch(x())}function I_(e,t,n){return Math.max(n.anchor,n.head)>t.content.size?null:Th(e,t.resolve(n.anchor),t.resolve(n.head))}function L_(e,t){let n=e.firstChild.marks,r=t.firstChild.marks,i=n,a=r,o,s,c;for(let e=0;e<r.length;e++)i=r[e].removeFromSet(i);for(let e=0;e<n.length;e++)a=n[e].removeFromSet(a);if(i.length==1&&a.length==0)s=i[0],o=`add`,c=e=>e.mark(s.addToSet(e.marks));else if(i.length==0&&a.length==1)s=a[0],o=`remove`,c=e=>e.mark(s.removeFromSet(e.marks));else return null;let l=[];for(let e=0;e<t.childCount;e++)l.push(c(t.child(e)));if(q.from(l).eq(e))return{mark:s,type:o}}function R_(e,t,n,r,i){if(n-t<=i.pos-r.pos||B_(r,!0,!1)<i.pos)return!1;let a=e.resolve(t);if(!r.parent.inlineContent){let e=a.nodeAfter;return e!=null&&n==t+e.nodeSize}if(a.parentOffset<a.parent.content.size||!a.parent.isTextblock)return!1;let o=e.resolve(B_(a,!0,!0));return!o.parent.isTextblock||o.pos>n||B_(o,!0,!1)<n?!1:r.parent.content.cut(r.parentOffset).eq(o.parent.content)}function z_(e,t,n){let r=0,i=0;return e.nodesBetween(t,n,(e,a)=>{e.isTextblock&&a>=t&&a<n?r++:(e.isText?/\S/.test(e.text.slice(Math.max(0,t-a),Math.min(e.nodeSize,n-a))):e.isLeaf)&&i++}),i==0&&r==1}function B_(e,t,n){let r=e.depth,i=t?e.end():e.pos;for(;r>0&&(t||e.indexAfter(r)==e.node(r).childCount);)r--,i++,t=!1;if(n){let t=e.node(r).maybeChild(e.indexAfter(r));for(;t&&!t.isLeaf;)t=t.firstChild,i++}return i}function V_(e,t,n,r,i){let a=e.findDiffStart(t,n),o=n+e.size,s=n+t.size;if(a==null)return null;let{a:c,b:l}=e.findDiffEnd(t,o,s);if(i==`end`){let e=Math.max(0,a-Math.min(c,l));r-=c+e-a}if(c<a&&o<s){let e=r<=a&&r>=c?a-r:0;a-=e,l=a+(l-c),c=a}else if(l<a){let e=r<=a&&r>=l?a-r:0;a-=e,c=a+(c-l),l=a}return{start:a,endA:c,endB:l}}var H_=class{constructor(e,t){this._root=null,this.focused=!1,this.trackWrites=null,this.mounted=!1,this.markCursor=null,this.cursorWrapper=null,this.lastSelectedViewDesc=void 0,this.input=new fg,this.prevDirectPlugins=[],this.pluginViews=[],this.requiresGeckoHackNode=!1,this.dragging=null,this._props=t,this.state=t.state,this.directPlugins=t.plugins||[],this.directPlugins.forEach(Y_),this.dispatch=this.dispatch.bind(this),this.dom=e&&e.mount||document.createElement(`div`),e&&(e.appendChild?e.appendChild(this.dom):typeof e==`function`?e(this.dom):e.mount&&(this.mounted=!0)),this.editable=G_(this),W_(this),this.nodeViews=q_(this),this.docView=Jm(this.state.doc,U_(this),b_(this),this.dom,this),this.domObserver=new w_(this,(e,t,n,r)=>F_(this,e,t,n,r)),this.domObserver.start(),pg(this),this.updatePluginViews()}get composing(){return this.input.composing}get props(){if(this._props.state!=this.state){let e=this._props;this._props={};for(let t in e)this._props[t]=e[t];this._props.state=this.state}return this._props}update(e){e.handleDOMEvents!=this._props.handleDOMEvents&&gg(this);let t=this._props;this._props=e,e.plugins&&(e.plugins.forEach(Y_),this.directPlugins=e.plugins),this.updateStateInner(e.state,t)}setProps(e){let t={};for(let e in this._props)t[e]=this._props[e];t.state=this.state;for(let n in e)t[n]=e[n];this.update(t)}updateState(e){this.updateStateInner(e,this._props)}updateStateInner(e,t){let n=this.state,r=!1,i=!1;e.storedMarks&&this.composing&&(Vg(this),i=!0),this.state=e;let a=n.plugins!=e.plugins||this._props.plugins!=t.plugins;if(a||this._props.plugins!=t.plugins||this._props.nodeViews!=t.nodeViews){let e=q_(this);J_(e,this.nodeViews)&&(this.nodeViews=e,r=!0)}(a||t.handleDOMEvents!=this._props.handleDOMEvents)&&gg(this),this.editable=G_(this),W_(this);let o=b_(this),s=U_(this),c=n.plugins!=e.plugins&&!n.doc.eq(e.doc)?`reset`:e.scrollToSelection>n.scrollToSelection?`to selection`:`preserve`,l=r||!this.docView.matchesNode(e.doc,s,o);(l||!e.selection.eq(n.selection))&&(i=!0);let u=c==`preserve`&&i&&this.dom.style.overflowAnchor==null&&dm(this);if(i){this.domObserver.stop();let t=l&&(Jp||Qp)&&!this.composing&&!n.selection.empty&&!e.selection.empty&&K_(n.selection,e.selection);if(l){let n=Qp?this.trackWrites=this.domSelectionRange().focusNode:null;this.composing&&(this.input.compositionNode=Hg(this)),(r||!this.docView.update(e.doc,s,o,this))&&(this.docView.updateOuterDeco(s),this.docView.destroy(),this.docView=Jm(e.doc,s,o,this.dom,this)),!n||this.trackWrites&&this.dom.contains(this.trackWrites)||(t=!0)}let i=this.input.mouseDown;t||!(i&&this.domObserver.currentSelection.eq(this.domSelectionRange())&&Oh(this)&&i.delaySelUpdate())?gh(this,t):(Ch(this,e.selection),this.domObserver.setCurSelection()),this.domObserver.start()}this.updatePluginViews(n),this.dragging?.node&&!n.doc.eq(e.doc)&&this.updateDraggedNode(this.dragging,n),c==`reset`?this.dom.scrollTop=0:c==`to selection`?this.scrollToSelection():u&&pm(u)}scrollToSelection(){let e=this.domSelectionRange().focusNode;if(e&&Np(this.dom,e)&&!this.someProp(`handleScrollToSelection`,e=>e(this))){if(this.state.selection instanceof sf){let t=this.docView.domAfterPos(this.state.selection.from);Z(t)&&um(this,t.getBoundingClientRect(),e)}else um(this,this.coordsAtPos(this.state.selection.head,1),e)}}destroyPluginViews(){let e;for(;e=this.pluginViews.pop();)e.destroy&&e.destroy()}updatePluginViews(e){if(!e||e.plugins!=this.state.plugins||this.directPlugins!=this.prevDirectPlugins){this.prevDirectPlugins=this.directPlugins,this.destroyPluginViews();for(let e=0;e<this.directPlugins.length;e++){let t=this.directPlugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}for(let e=0;e<this.state.plugins.length;e++){let t=this.state.plugins[e];t.spec.view&&this.pluginViews.push(t.spec.view(this))}}else for(let t=0;t<this.pluginViews.length;t++){let n=this.pluginViews[t];n.update&&n.update(this,e)}}updateDraggedNode(e,t){let n=e.node,r=-1;if(n.from<this.state.doc.content.size&&this.state.doc.nodeAt(n.from)==n.node)r=n.from;else{let e=n.from+(this.state.doc.content.size-t.doc.content.size);(e>0&&e<this.state.doc.content.size&&this.state.doc.nodeAt(e))==n.node&&(r=e)}this.dragging=new Xg(e.slice,e.move,r<0?void 0:sf.create(this.state.doc,r))}someProp(e,t){let n=this._props&&this._props[e],r;if(n!=null&&(r=t?t(n):n))return r;for(let n=0;n<this.directPlugins.length;n++){let i=this.directPlugins[n].props[e];if(i!=null&&(r=t?t(i):i))return r}let i=this.state.plugins;if(i)for(let n=0;n<i.length;n++){let a=i[n].props[e];if(a!=null&&(r=t?t(a):a))return r}}hasFocus(){if(Jp){let e=this.root.activeElement;if(e==this.dom)return!0;if(!e||!this.dom.contains(e))return!1;for(;e&&this.dom!=e&&this.dom.contains(e);){if(e.contentEditable==`false`)return!1;e=e.parentElement}return!0}return this.root.activeElement==this.dom}focus(){this.domObserver.stop(),this.editable&&gm(this.dom),gh(this),this.domObserver.start()}get root(){let e=this._root;if(e==null){for(let e=this.dom.parentNode;e;e=e.parentNode)if(e.nodeType==9||e.nodeType==11&&e.host)return e.getSelection||(Object.getPrototypeOf(e).getSelection=()=>e.ownerDocument.getSelection()),this._root=e}return e||document}updateRoot(){this._root=null}posAtCoords(e){return wm(this,e)}coordsAtPos(e,t=1){return Om(this,e,t)}domAtPos(e,t=0){return this.docView.domFromPos(e,t)}nodeDOM(e){let t=this.docView.descAt(e);return t?t.nodeDOM:null}posAtDOM(e,t,n=-1){let r=this.docView.posFromDOM(e,t,n);if(r==null)throw RangeError(`DOM position not inside the editor`);return r}endOfTextblock(e,t){return Rm(this,t||this.state,e)}pasteHTML(e,t){return Jg(this,``,e,!1,t||new ClipboardEvent(`paste`))}pasteText(e,t){return Jg(this,e,null,!0,t||new ClipboardEvent(`paste`))}serializeForClipboard(e){return qh(this,e)}destroy(){this.docView&&(hg(this),this.destroyPluginViews(),this.mounted?(this.docView.update(this.state.doc,[],b_(this),this),this.dom.textContent=``):this.dom.parentNode&&this.dom.parentNode.removeChild(this.dom),this.docView.destroy(),this.docView=null,Dp())}get isDestroyed(){return this.docView==null}dispatchEvent(e){return yg(this,e)}domSelectionRange(){let e=this.dom.isConnected!==!1&&this.domSelection();return e?em&&this.root.nodeType===11&&Bp(this.dom.ownerDocument)==this.dom&&k_(this,e)||e:{focusNode:null,focusOffset:0,anchorNode:null,anchorOffset:0}}domSelection(){return this.root.getSelection()}};H_.prototype.dispatch=function(e){let t=this._props.dispatchTransaction;t?t.call(this,e):this.updateState(this.state.apply(e))};function U_(e){let t=Object.create(null);return t.class=`ProseMirror`,t.contenteditable=String(e.editable),e.someProp(`attributes`,n=>{if(typeof n==`function`&&(n=n(e.state)),n)for(let e in n)e==`class`?t.class+=` `+n[e]:e==`style`?t.style=(t.style?t.style+`;`:``)+n[e]:!t[e]&&e!=`contenteditable`&&e!=`nodeName`&&(t[e]=String(n[e]))}),t.translate||=`no`,[a_.node(0,e.state.doc.content.size,t)]}function W_(e){if(e.markCursor){let t=document.createElement(`img`);t.className=`ProseMirror-separator`,t.setAttribute(`mark-placeholder`,`true`),t.setAttribute(`alt`,``),e.cursorWrapper={dom:t,deco:a_.widget(e.state.selection.from,t,{raw:!0,marks:e.markCursor})}}else e.cursorWrapper=null}function G_(e){return!e.someProp(`editable`,t=>t(e.state)===!1)}function K_(e,t){let n=Math.min(e.$anchor.sharedDepth(e.head),t.$anchor.sharedDepth(t.head));return e.$anchor.start(n)!=t.$anchor.start(n)}function q_(e){let t=Object.create(null);function n(e){for(let n in e)Object.prototype.hasOwnProperty.call(t,n)||(t[n]=e[n])}return e.someProp(`nodeViews`,n),e.someProp(`markViews`,n),t}function J_(e,t){let n=0,r=0;for(let r in e){if(e[r]!=t[r])return!0;n++}for(let e in t)r++;return n!=r}function Y_(e){if(e.spec.state||e.spec.filterTransaction||e.spec.appendTransaction)throw RangeError(`Plugins passed directly to the view must not have a state component`)}for(var X_={8:`Backspace`,9:`Tab`,10:`Enter`,12:`NumLock`,13:`Enter`,16:`Shift`,17:`Control`,18:`Alt`,20:`CapsLock`,27:`Escape`,32:` `,33:`PageUp`,34:`PageDown`,35:`End`,36:`Home`,37:`ArrowLeft`,38:`ArrowUp`,39:`ArrowRight`,40:`ArrowDown`,44:`PrintScreen`,45:`Insert`,46:`Delete`,59:`;`,61:`=`,91:`Meta`,92:`Meta`,106:`*`,107:`+`,108:`,`,109:`-`,110:`.`,111:`/`,144:`NumLock`,145:`ScrollLock`,160:`Shift`,161:`Shift`,162:`Control`,163:`Control`,164:`Alt`,165:`Alt`,173:`-`,186:`;`,187:`=`,188:`,`,189:`-`,190:`.`,191:`/`,192:"`",219:`[`,220:`\\`,221:`]`,222:`'`},Z_={48:`)`,49:`!`,50:`@`,51:`#`,52:`$`,53:`%`,54:`^`,55:`&`,56:`*`,57:`(`,59:`:`,61:`+`,173:`_`,186:`:`,187:`+`,188:`<`,189:`_`,190:`>`,191:`?`,192:`~`,219:`{`,220:`|`,221:`}`,222:`"`},Q_=typeof navigator<`u`&&/Mac/.test(navigator.platform),$_=typeof navigator<`u`&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),ev=0;ev<10;ev++)X_[48+ev]=X_[96+ev]=String(ev);for(var ev=1;ev<=24;ev++)X_[ev+111]=`F`+ev;for(var ev=65;ev<=90;ev++)X_[ev]=String.fromCharCode(ev+32),Z_[ev]=String.fromCharCode(ev);for(var tv in X_)Z_.hasOwnProperty(tv)||(Z_[tv]=X_[tv]);function nv(e){var t=!(Q_&&e.metaKey&&e.shiftKey&&!e.ctrlKey&&!e.altKey||$_&&e.shiftKey&&e.key&&e.key.length==1||e.key==`Unidentified`)&&e.key||(e.shiftKey?Z_:X_)[e.keyCode]||e.key||`Unidentified`;return t==`Esc`&&(t=`Escape`),t==`Del`&&(t=`Delete`),t==`Left`&&(t=`ArrowLeft`),t==`Up`&&(t=`ArrowUp`),t==`Right`&&(t=`ArrowRight`),t==`Down`&&(t=`ArrowDown`),t}var rv=typeof navigator<`u`&&/Mac|iP(hone|[oa]d)/.test(navigator.platform),iv=typeof navigator<`u`&&/Win/.test(navigator.platform);function av(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n==`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e++){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))rv?o=!0:i=!0;else throw Error(`Unrecognized modifier name: `+n)}return r&&(n=`Alt-`+n),i&&(n=`Ctrl-`+n),o&&(n=`Meta-`+n),a&&(n=`Shift-`+n),n}function ov(e){let t=Object.create(null);for(let n in e)t[av(n)]=e[n];return t}function sv(e,t,n=!0){return t.altKey&&(e=`Alt-`+e),t.ctrlKey&&(e=`Ctrl-`+e),t.metaKey&&(e=`Meta-`+e),n&&t.shiftKey&&(e=`Shift-`+e),e}function cv(e){return new Cf({props:{handleKeyDown:lv(e)}})}function lv(e){let t=ov(e);return function(e,n){let r=nv(n),i,a=t[sv(r,n)];if(a&&a(e.state,e.dispatch,e))return!0;if(r.length==1&&r!=` `){if(n.shiftKey){let i=t[sv(r,n,!1)];if(i&&i(e.state,e.dispatch,e))return!0}if((n.altKey||n.metaKey||n.ctrlKey)&&!(iv&&n.ctrlKey&&n.altKey)&&(i=X_[n.keyCode])&&i!=r){let r=t[sv(i,n)];if(r&&r(e.state,e.dispatch,e))return!0}}return!1}}var uv=200,dv=function(){};dv.prototype.append=function(e){return e.length?(e=dv.from(e),!this.length&&e||e.length<uv&&this.leafAppend(e)||this.length<uv&&e.leafPrepend(this)||this.appendInner(e)):this},dv.prototype.prepend=function(e){return e.length?dv.from(e).append(this):this},dv.prototype.appendInner=function(e){return new pv(this,e)},dv.prototype.slice=function(e,t){return e===void 0&&(e=0),t===void 0&&(t=this.length),e>=t?dv.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},dv.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},dv.prototype.forEach=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},dv.prototype.map=function(e,t,n){t===void 0&&(t=0),n===void 0&&(n=this.length);var r=[];return this.forEach(function(t,n){return r.push(e(t,n))},t,n),r},dv.from=function(e){return e instanceof dv?e:e&&e.length?new fv(e):dv.empty};var fv=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return e==0&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var i=t;i<n;i++)if(e(this.values[i],r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var i=t-1;i>=n;i--)if(e(this.values[i],r+i)===!1)return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=uv)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=uv)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(dv);dv.empty=new fv([]);var pv=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var i=this.left.length;if(t<i&&this.left.forEachInner(e,t,Math.min(n,i),r)===!1||n>i&&this.right.forEachInner(e,Math.max(t-i,0),Math.min(this.length,n)-i,r+i)===!1)return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){var i=this.left.length;if(t>i&&this.right.forEachInvertedInner(e,t-i,Math.max(n,i)-i,r+i)===!1||n<i&&this.left.forEachInvertedInner(e,Math.min(t,i),n,r)===!1)return!1},t.prototype.sliceInner=function(e,t){if(e==0&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(dv),mv=500,hv=class e{constructor(e,t){this.items=e,this.eventCount=t}popEvent(t,n){if(this.eventCount==0)return null;let r=this.items.length;for(;;r--)if(this.items.get(r-1).selection){--r;break}let i,a;n&&(i=this.remapping(r,this.items.length),a=i.maps.length);let o=t.tr,s,c,l=[],u=[];return this.items.forEach((t,n)=>{if(!t.step)i||(i=this.remapping(r,n+1),a=i.maps.length),a--,u.push(t);else{if(i){u.push(new _v(t.map));let e=t.step.map(i.slice(a)),n;e&&o.maybeStep(e).doc&&(n=o.mapping.maps[o.mapping.maps.length-1],l.push(new _v(n,void 0,void 0,l.length+u.length))),a--,n&&i.appendMap(n,a)}else o.maybeStep(t.step);if(t.selection)return s=i?t.selection.map(i.slice(a)):t.selection,c=new e(this.items.slice(0,r).append(u.reverse().concat(l)),this.eventCount-1),!1}},this.items.length,0),{remaining:c,transform:o,selection:s}}addTransform(t,n,r,i){let a=[],o=this.eventCount,s=this.items,c=!i&&s.length?s.get(s.length-1):null;for(let e=0;e<t.steps.length;e++){let r=t.steps[e].invert(t.docs[e]),l=new _v(t.mapping.maps[e],r,n),u;(u=c&&c.merge(l))&&(l=u,e?a.pop():s=s.slice(0,s.length-1)),a.push(l),n&&=(o++,void 0),i||(c=l)}let l=o-r.depth;return l>yv&&(s=gv(s,l),o-=l),new e(s.append(a),o)}remapping(e,t){let n=new Xu;return this.items.forEach((t,r)=>{let i=t.mirrorOffset!=null&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,i)},e,t),n}addMaps(t){return this.eventCount==0?this:new e(this.items.append(t.map(e=>new _v(e))),this.eventCount)}rebased(t,n){if(!this.eventCount)return this;n=Math.min(this.items.length,n);let r=[],i=this.items.length-n,a=t.mapping,o=t.steps.length,s=this.eventCount;this.items.forEach(e=>{e.selection&&s--},i);let c=n;this.items.forEach(e=>{let n=a.getMirror(--c);if(n==null)return;o=Math.min(o,n);let i=a.maps[n];if(e.step){let o=t.steps[n].invert(t.docs[n]),l=e.selection&&e.selection.map(a.slice(c+1,n));l&&s++,r.push(new _v(i,o,l))}else r.push(new _v(i))},i);let l=[];for(let e=n;e<o;e++)l.push(new _v(a.maps[e]));let u=this.items.slice(0,i).append(l).append(r),d=new e(u,s);return d.emptyItemCount()>mv&&(d=d.compress(this.items.length-r.length)),d}emptyItemCount(){let e=0;return this.items.forEach(t=>{t.step||e++}),e}compress(t=this.items.length){let n=this.remapping(0,t),r=n.maps.length,i=[],a=0;return this.items.forEach((e,o)=>{if(o>=t)i.push(e),e.selection&&a++;else if(e.step){let t=e.step.map(n.slice(r)),o=t&&t.getMap();if(r--,o&&n.appendMap(o,r),t){let s=e.selection&&e.selection.map(n.slice(r));s&&a++;let c=new _v(o.invert(),t,s),l,u=i.length-1;(l=i.length&&i[u].merge(c))?i[u]=l:i.push(c)}}else e.map&&r--},this.items.length,0),new e(dv.from(i.reverse()),a)}};hv.empty=new hv(dv.empty,0);function gv(e,t){let n;return e.forEach((e,r)=>{if(e.selection&&t--==0)return n=r,!1}),e.slice(n)}var _v=class e{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(t){if(this.step&&t.step&&!t.selection){let n=t.step.merge(this.step);if(n)return new e(n.getMap().invert(),n,this.selection)}}},vv=class{constructor(e,t,n,r,i){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r,this.prevComposition=i}},yv=20;function bv(e,t,n,r){let i=n.getMeta(kv),a;if(i)return i.historyState;n.getMeta(Av)&&(e=new vv(e.done,e.undone,null,0,-1));let o=n.getMeta(`appendedTransaction`);if(n.steps.length==0)return e;if(o&&o.getMeta(kv))return o.getMeta(kv).redo?new vv(e.done.addTransform(n,void 0,r,Dv(t)),e.undone,Sv(n.mapping.maps),e.prevTime,e.prevComposition):new vv(e.done,e.undone.addTransform(n,void 0,r,Dv(t)),null,e.prevTime,e.prevComposition);if(n.getMeta(`addToHistory`)!==!1&&!(o&&o.getMeta(`addToHistory`)===!1)){let i=n.getMeta(`composition`),a=e.prevTime==0||!o&&e.prevComposition!=i&&(e.prevTime<(n.time||0)-r.newGroupDelay||!xv(n,e.prevRanges)),s=o?Cv(e.prevRanges,n.mapping):Sv(n.mapping.maps);return new vv(e.done.addTransform(n,a?t.selection.getBookmark():void 0,r,Dv(t)),hv.empty,s,n.time,i??e.prevComposition)}return(a=n.getMeta(`rebased`))?new vv(e.done.rebased(n,a),e.undone.rebased(n,a),Cv(e.prevRanges,n.mapping),e.prevTime,e.prevComposition):new vv(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),Cv(e.prevRanges,n.mapping),e.prevTime,e.prevComposition)}function xv(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach((e,r)=>{for(let i=0;i<t.length;i+=2)e<=t[i+1]&&r>=t[i]&&(n=!0)}),n}function Sv(e){let t=[];for(let n=e.length-1;n>=0&&t.length==0;n--)e[n].forEach((e,n,r,i)=>t.push(r,i));return t}function Cv(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let i=t.map(e[r],1),a=t.map(e[r+1],-1);i<=a&&n.push(i,a)}return n}function wv(e,t,n){let r=Dv(t),i=kv.get(t).spec.config,a=(n?e.undone:e.done).popEvent(t,r);if(!a)return null;let o=a.selection.resolve(a.transform.doc),s=(n?e.done:e.undone).addTransform(a.transform,t.selection.getBookmark(),i,r),c=new vv(n?s:a.remaining,n?a.remaining:s,null,0,-1);return a.transform.setSelection(o).setMeta(kv,{redo:n,historyState:c})}var Tv=!1,Ev=null;function Dv(e){let t=e.plugins;if(Ev!=t){Tv=!1,Ev=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){Tv=!0;break}}return Tv}function Ov(e){return e.setMeta(Av,!0)}var kv=new Ef(`history`),Av=new Ef(`closeHistory`);function jv(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Cf({key:kv,state:{init(){return new vv(hv.empty,hv.empty,null,0,-1)},apply(t,n,r){return bv(n,r,t,e)}},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r=n==`historyUndo`?Nv:n==`historyRedo`?Pv:null;return!r||!e.editable?!1:(t.preventDefault(),r(e.state,e.dispatch))}}}})}function Mv(e,t){return(n,r)=>{let i=kv.getState(n);if(!i||(e?i.undone:i.done).eventCount==0)return!1;if(r){let a=wv(i,n,e);a&&r(t?a.scrollIntoView():a)}return!0}}var Nv=Mv(!1,!0),Pv=Mv(!0,!0);function Fv(e){return e.getMeta(kv)!=null}function Iv(e){let{state:t,transaction:n}=e,{selection:r}=n,{doc:i}=n,{storedMarks:a}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return a},get selection(){return r},get doc(){return i},get tr(){return r=n.selection,i=n.doc,a=n.storedMarks,n}}}var Lv=class e{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){let{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:i}=n,a=this.buildProps(i);return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,(...e)=>{let n=t(...e)(a);return!i.getMeta(`preventDispatch`)&&!this.hasCustomState&&r.dispatch(i),n}]))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o=[],s=!!e,c=e||i.tr,l=()=>(!s&&t&&!c.getMeta(`preventDispatch`)&&!this.hasCustomState&&a.dispatch(c),o.every(e=>e===!0)),u={...Object.fromEntries(Object.entries(n).map(([e,n])=>[e,(...e)=>{let r=this.buildProps(c,t),i=n(...e)(r);return o.push(i),u}])),run:l};return u}static createFakeChain(){let e=new Proxy({},{get:(t,n)=>{if(n!==`then`)return n===`run`?()=>!1:()=>e}});return e}createCan(e){let{rawCommands:t,state:n}=this,r=e||n.tr,i=this.buildProps(r,!1);return{...Object.fromEntries(Object.entries(t).map(([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:void 0})])),chain:()=>this.createChain(r,!1)}}static createFallbackCan(){let t=e.createFakeChain();return new Proxy({chain:()=>t},{get:(e,t)=>{if(t!==`then`)return t===`chain`?e.chain:()=>!1}})}buildProps(e,t=!0){let{rawCommands:n,editor:r,state:i}=this,{view:a}=r,o={tr:e,editor:r,view:a,state:Iv({state:i,transaction:e}),dispatch:t?()=>void 0:void 0,chain:()=>this.createChain(e,t),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map(([e,t])=>[e,(...e)=>t(...e)(o)]))}};return o}},Rv=()=>({editor:e,view:t})=>(requestAnimationFrame(()=>{if(!e.isDestroyed){var n;t.dom.blur(),(n=window)==null||(n=n.getSelection())==null||n.removeAllRanges()}}),!0),zv=(e=!0)=>({commands:t})=>t.setContent(``,{emitUpdate:e}),Bv=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,{ranges:r}=n;if(!t)return!0;let i=e.mapping.maps.length;return r.forEach(({$from:t,$to:n})=>{let r=t.pos,a=n.pos,o=e.mapping.slice(i),s=1;e.doc.nodesBetween(o.map(r),o.map(a),(t,n)=>{s=Math.max(s,e.doc.resolve(n).depth+1)});for(let t=0;t<s;t+=1){let t=e.doc,n=e.mapping.maps.length,o=e.mapping.slice(i),s=n,c=e.mapping.slice(n),l=o.map(r),u=o.map(a);if(t.nodesBetween(l,u,(t,r)=>{if(t.type.isText)return;e.mapping.maps.length!==s&&(s=e.mapping.maps.length,c=e.mapping.slice(n));let i=e.doc.resolve(c.map(r)),a=e.doc.resolve(c.map(r+t.nodeSize)),o=i.blockRange(a);if(!o)return;let l=md(o);if(t.type.isTextblock){let{defaultType:t}=i.parent.contentMatchAt(i.index()),n=e.doc.nodeAt(o.start);t&&n&&!n.hasMarkup(t)&&t.validContent(n.content)&&e.setNodeMarkup(o.start,t)}(l||l===0)&&e.lift(o,l)}),e.doc.eq(t))break}}),!0},Vv=e=>t=>e(t),Hv=()=>({state:e,dispatch:t})=>Zf(e,t),Uv=(e,t)=>({editor:n,tr:r})=>{let{state:i}=n,a=i.doc.slice(e.from,e.to);r.deleteRange(e.from,e.to);let o=r.mapping.map(t);return r.insert(o,a.content),r.setSelection(new X(r.doc.resolve(Math.max(o-1,0)))),!0},Wv=()=>({tr:e,dispatch:t})=>{let{selection:n}=e,r=n.$anchor.node();if(r.content.size>0)return!1;let i=e.selection.$anchor;for(let n=i.depth;n>0;--n)if(i.node(n).type===r.type){if(t){let t=i.before(n),r=i.after(n);e.delete(t,r).scrollIntoView()}return!0}return!1};function Gv(e,t){if(typeof e==`string`){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}var Kv=e=>({tr:t,state:n,dispatch:r})=>{let i=Gv(e,n.schema),a=t.selection.$anchor;for(let e=a.depth;e>0;--e)if(a.node(e).type===i){if(r){let n=a.before(e),r=a.after(e);t.delete(n,r).scrollIntoView()}return!0}return!1},qv=e=>({tr:t,dispatch:n})=>{let{from:r,to:i}=e;return n&&t.delete(r,i),!0},Jv=e=>e.content?/^text(\*|\+)/.test(e.content):!1,Yv=(e,t,n)=>{if(!e.parent.isInline||n===`left`&&e.pos>e.start()||n===`right`&&e.pos<e.end())return e.pos;let r=t.nodes[e.parent.type.name].spec;return Jv(r)?n===`left`?e.start()-1:e.end()+1:e.pos},Xv=(e,t,n)=>({from:Yv(e,n,`left`),to:Yv(t,n,`right`)}),Zv=()=>({state:e,dispatch:t})=>{if(e.selection.empty)return!1;if(t){let n=e.tr,{ranges:r}=e.selection,i=e.selection instanceof X?e.selection.$from.marksAcross(e.selection.$to):null,a=n.steps.length;r.forEach(t=>{let r=n.mapping.slice(a),{from:i,to:o}=Xv(n.doc.resolve(r.map(t.$from.pos)),n.doc.resolve(r.map(t.$to.pos)),e.schema);n.deleteRange(i,o)}),n.selection.empty||n.setSelection(X.near(n.doc.resolve(n.selection.from))),i&&n.ensureMarks(i),n.scrollIntoView(),t(n)}return!0},Qv=()=>({commands:e})=>e.keyboardShortcut(`Enter`),$v=()=>({state:e,dispatch:t})=>Xf(e,t);function ey(e){return Object.prototype.toString.call(e)===`[object RegExp]`}function ty(e,t,n={strict:!0}){let r=Object.keys(t);return!r.length||r.every(r=>n.strict?t[r]===e[r]:ey(t[r])?t[r].test(e[r]):t[r]===e[r])}function ny(e,t,n={}){return e.find(e=>e.type===t&&ty(Object.fromEntries(Object.keys(n).map(t=>[t,e.attrs[t]])),n))}function ry(e,t,n={}){return!!ny(e,t,n)}function iy(e,t,n){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(r.node&&r.node.marks.some(e=>e.type===t)||(r=e.parent.childBefore(e.parentOffset)),!r.node||!r.node.marks.some(e=>e.type===t))return;if(!n){let e=r.node.marks.find(e=>e.type===t);e&&(n=e.attrs)}if(!ny([...r.node.marks],t,n))return;let i=r.index,a=e.start()+r.offset,o=i+1,s=a+r.node.nodeSize;for(;i>0&&ry([...e.parent.child(i-1).marks],t,n);)--i,a-=e.parent.child(i).nodeSize;for(;o<e.parent.childCount&&ry([...e.parent.child(o).marks],t,n);)s+=e.parent.child(o).nodeSize,o+=1;return{from:a,to:s}}function ay(e,t){if(typeof e==`string`){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}var oy=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=ay(e,r.schema),{doc:o,selection:s}=n,{$from:c,from:l,to:u}=s;if(i){let e=iy(c,a,t);if(e&&e.from<=l&&e.to>=u){let t=X.create(o,e.from,e.to);n.setSelection(t)}}return!0},sy=e=>t=>{let n=typeof e==`function`?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1};function cy(e){return e instanceof X}function ly(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function uy(e,t=null){if(!t)return null;let n=Y.atStart(e),r=Y.atEnd(e);if(t===`start`||t===!0)return n;if(t===`end`)return r;let i=n.from,a=r.to;return t===`all`?X.create(e,ly(0,i,a),ly(e.content.size,i,a)):X.create(e,ly(t,i,a),ly(t,i,a))}function dy(){return[`Android`].includes(navigator.platform)||/android/i.test(navigator.userAgent)}function fy(){return[`iPad Simulator`,`iPhone Simulator`,`iPod Simulator`,`iPad`,`iPhone`,`iPod`].includes(navigator.platform)||navigator.userAgent.includes(`Mac`)&&`ontouchend`in document}function py(){return typeof navigator<`u`&&/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}var my=(e=null,t={})=>({editor:n,view:r,tr:i,dispatch:a})=>{t={scrollIntoView:!0,...t};let o=()=>{(fy()||dy())&&r.dom.focus(),py()&&!fy()&&!dy()&&r.dom.focus({preventScroll:!0}),requestAnimationFrame(()=>{n.isDestroyed||(r.focus(),t?.scrollIntoView&&n.commands.scrollIntoView())})};try{if(r.hasFocus()&&e===null||e===!1)return!0}catch{return!1}if(a&&e===null&&!cy(n.state.selection))return o(),!0;let s=uy(i.doc,e)||n.state.selection,c=n.state.selection.eq(s);return a&&(c||i.setSelection(s),c&&i.storedMarks&&i.setStoredMarks(i.storedMarks),o()),!0},hy=(e,t)=>n=>e.every((e,r)=>t(e,{...n,index:r})),gy=(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),_y=e=>{let t=e.childNodes;for(let n=t.length-1;n>=0;--n){let r=t[n];r.nodeType===3&&r.nodeValue&&/^(\n\s\s|\n)$/.test(r.nodeValue)?e.removeChild(r):r.nodeType===1&&_y(r)}return e};function vy(e){if(typeof window>`u`)throw Error(`[tiptap error]: there is no window object available, so this function cannot be used`);let t=`<body>${e}</body>`,n=new window.DOMParser().parseFromString(t,`text/html`).body;return _y(n)}function yy(e){return typeof e?.nodesBetween==`function`}function by(e,t,n){if(yy(e))return e;let r=typeof e==`object`&&!!e;n={slice:!0,parseOptions:{},...n};let i=typeof e==`string`;if(r)try{if(Array.isArray(e)&&e.length>0)return q.fromArray(e.map(e=>t.nodeFromJSON(e)));let r=t.nodeFromJSON(e);return n.errorOnInvalidContent&&r.check(),r}catch(r){if(n.errorOnInvalidContent)throw Error(`[tiptap error]: Invalid JSON content`,{cause:r});return console.warn(`[tiptap warn]: Invalid content.`,`Passed value:`,e,`Error:`,r),by(``,t,n)}if(i){if(n.errorOnInvalidContent){let r=!1,i=``,a=new mu({topNode:t.spec.topNode,marks:t.spec.marks,nodes:t.spec.nodes.append({__tiptap__private__unknown__catch__all__node:{content:`inline*`,group:`block`,parseDOM:[{tag:`*`,getAttrs:e=>(r=!0,i=typeof e==`string`?e:e.outerHTML,null)}]}})});if(n.slice?vu.fromSchema(a).parseSlice(vy(e),n.parseOptions):vu.fromSchema(a).parse(vy(e),n.parseOptions),n.errorOnInvalidContent&&r)throw Error(`[tiptap error]: Invalid HTML content`,{cause:Error(`Invalid element found: ${i}`)})}let r=vu.fromSchema(t);return n.slice?r.parseSlice(vy(e),n.parseOptions).content:r.parse(vy(e),n.parseOptions)}return by(``,t,n)}function xy(e){return!(`type`in e)}function Sy(e,t,n){let r=e.steps.length-1;if(r<t)return;let i=e.steps[r];if(!(i instanceof sd||i instanceof cd))return;let a=e.mapping.maps[r],o=0;a.forEach((e,t,n,r)=>{o===0&&(o=r)}),e.setSelection(Y.near(e.doc.resolve(o),n))}var Cy=(e,t,n)=>({tr:r,dispatch:i,editor:a})=>{if(i){n={parseOptions:a.options.parseOptions,updateSelection:!0,applyInputRules:!1,applyPasteRules:!1,...n};let i,o=e=>{a.emit(`contentError`,{editor:a,error:e,disableCollaboration:()=>{`collaboration`in a.storage&&typeof a.storage.collaboration==`object`&&a.storage.collaboration&&(a.storage.collaboration.isDisabled=!0)}})},s={preserveWhitespace:`full`,...n.parseOptions};if(!n.errorOnInvalidContent&&!a.options.enableContentCheck&&a.options.emitContentError)try{by(t,a.schema,{parseOptions:s,errorOnInvalidContent:!0})}catch(e){o(e)}try{i=by(t,a.schema,{parseOptions:s,errorOnInvalidContent:n.errorOnInvalidContent??a.options.enableContentCheck})}catch(e){return o(e),!1}let{from:c,to:l}=typeof e==`number`?{from:e,to:e}:{from:e.from,to:e.to},u=!0,d=!0,f=xy(i)?i.content:[i];if(f.forEach(e=>{e.check(),u=u?e.isText&&e.marks.length===0:!1,d=d?e.isBlock:!1}),c===l&&d){let{parent:e}=r.doc.resolve(c);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(--c,l+=1)}let p;if(u)p=Array.isArray(t)?t.map(e=>e.text||``).join(``):yy(t)?f.map(e=>e.text??``).join(``):typeof t==`object`&&t&&t.text?t.text:t,r.insertText(p,c,l);else{p=q.from(f);let e=r.doc.resolve(c),t=e.node(),n=e.parentOffset===0,i=t.isText||t.isTextblock,a=t.content.size>0;n&&i&&a&&d&&(c=Math.max(0,c-1)),r.replaceWith(c,l,f)}n.updateSelection&&Sy(r,r.steps.length-1,-1),n.applyInputRules&&r.setMeta(`applyInputRules`,{from:c,text:p}),n.applyPasteRules&&r.setMeta(`applyPasteRules`,{from:c,text:p})}return!0};function wy(e){for(let t=0;t<e.edgeCount;t+=1){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}var Ty=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{pos:i,attrs:a,content:o,updateSelection:s=!0}=e,c;c=typeof i==`number`?t.doc.resolve(i):i||t.selection.$from;let l=wy(c.parent.contentMatchAt(c.index()));if(!l)return!1;let u=Object.keys(l.spec.attrs||{}),d=a?Object.fromEntries(Object.entries(a).filter(([e])=>u.includes(e))):{},f;if(o){let e=by(o,r.schema);f=l.createAndFill(d,e)}else f=l.createAndFill(d);return f?(n&&(t.insert(c.pos,f),s&&Sy(t,t.steps.length-1,-1)),!0):!1},Ey=()=>({state:e,dispatch:t})=>Gf(e,t),Dy=()=>({state:e,dispatch:t})=>Kf(e,t),Oy=()=>({state:e,dispatch:t})=>Pf(e,t),ky=()=>({state:e,dispatch:t})=>Hf(e,t),Ay=(e,t)=>{let n=e.resolve(t),r=n.nodeBefore,i=n.nodeAfter;return!r||!i?!1:!r.type.spec.isolating&&!i.type.spec.isolating},jy=()=>({state:e,dispatch:t,tr:n})=>{try{let r=jd(e.doc,e.selection.$from.pos,-1);return r==null||!Ay(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},My=()=>({state:e,dispatch:t,tr:n})=>{try{let r=jd(e.doc,e.selection.$from.pos,1);return r==null||!Ay(e.doc,r)?!1:(n.join(r,2),t&&t(n),!0)}catch{return!1}},Ny=()=>({state:e,dispatch:t})=>Ff(e,t),Py=()=>({state:e,dispatch:t})=>If(e,t);function Fy(){return typeof navigator<`u`&&/Mac/.test(navigator.platform)}function Iy(e){let t=e.split(/-(?!$)/),n=t[t.length-1];n===`Space`&&(n=` `);let r,i,a,o;for(let e=0;e<t.length-1;e+=1){let n=t[e];if(/^(cmd|meta|m)$/i.test(n))o=!0;else if(/^a(lt)?$/i.test(n))r=!0;else if(/^(c|ctrl|control)$/i.test(n))i=!0;else if(/^s(hift)?$/i.test(n))a=!0;else if(/^mod$/i.test(n))fy()||Fy()?o=!0:i=!0;else throw Error(`Unrecognized modifier name: ${n}`)}return r&&(n=`Alt-${n}`),i&&(n=`Ctrl-${n}`),o&&(n=`Meta-${n}`),a&&(n=`Shift-${n}`),n}var Ly=e=>({editor:t,view:n,tr:r,dispatch:i})=>{let a=Iy(e).split(/-(?!$)/),o=a.find(e=>![`Alt`,`Ctrl`,`Meta`,`Shift`].includes(e)),s=new KeyboardEvent(`keydown`,{key:o===`Space`?` `:o,altKey:a.includes(`Alt`),ctrlKey:a.includes(`Ctrl`),metaKey:a.includes(`Meta`),shiftKey:a.includes(`Shift`),bubbles:!0,cancelable:!0});return t.captureTransaction(()=>{n.someProp(`handleKeyDown`,e=>e(n,s))})?.steps.forEach(e=>{let t=e.map(r.mapping);t&&i&&r.maybeStep(t)}),!0};function Ry(e,t,n={}){let{from:r,to:i,empty:a}=e.selection,o=t?Gv(t,e.schema):null,s=[];e.doc.nodesBetween(r,i,(e,t)=>{if(e.isText)return;let n=Math.max(r,t),a=Math.min(i,t+e.nodeSize);s.push({node:e,from:n,to:a})});let c=i-r,l=s.filter(e=>!o||o.name===e.node.type.name).filter(e=>ty(e.node.attrs,n,{strict:!1}));return a?!!l.length:l.reduce((e,t)=>e+t.to-t.from,0)>=c}var zy=(e,t={})=>({state:n,dispatch:r})=>Ry(n,Gv(e,n.schema),t)?qf(n,r):!1,By=()=>({state:e,dispatch:t})=>Qf(e,t),Vy=e=>({state:t,dispatch:n})=>yp(Gv(e,t.schema))(t,n),Hy=()=>({state:e,dispatch:t})=>Jf(e,t);function Uy(e,t){return t.nodes[e]?`node`:t.marks[e]?`mark`:null}function Wy(e,t){let n=typeof t==`string`?[t]:t;return Object.keys(e).reduce((t,r)=>(n.includes(r)||(t[r]=e[r]),t),{})}var Gy=(e,t)=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=Uy(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Gv(e,r.schema)),s===`mark`&&(o=ay(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,(e,r)=>{a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,Wy(e.attrs,t))),o&&e.marks.length&&e.marks.forEach(a=>{o===a.type&&(c=!0,i&&n.addMark(r,r+e.nodeSize,o.create(Wy(a.attrs,t))))})})}),c},Ky=()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),qy=()=>({tr:e,dispatch:t})=>{if(t){let t=new lf(e.doc);e.setSelection(t)}return!0},Jy=()=>({state:e,dispatch:t})=>zf(e,t),Yy=()=>({state:e,dispatch:t})=>Uf(e,t),Xy=()=>({state:e,dispatch:t})=>tp(e,t),Zy=()=>({state:e,dispatch:t})=>sp(e,t),Qy=()=>({state:e,dispatch:t})=>op(e,t);function $y(e,t,n={},r={}){return by(e,t,{slice:!1,parseOptions:n,errorOnInvalidContent:r.errorOnInvalidContent})}var eb=(e,{errorOnInvalidContent:t,emitUpdate:n=!0,parseOptions:r={}}={})=>({editor:i,tr:a,dispatch:o,commands:s})=>{let{doc:c}=a;if(r.preserveWhitespace!==`full`){let s=$y(e,i.schema,r,{errorOnInvalidContent:t??i.options.enableContentCheck});if(o){let e=xy(s)?s.content:[s];a.replaceWith(0,c.content.size,e).setMeta(`preventUpdate`,!n)}return!0}return o&&a.setMeta(`preventUpdate`,!n),s.insertContentAt({from:0,to:c.content.size},e,{parseOptions:r,errorOnInvalidContent:t??i.options.enableContentCheck})};function tb(e,t){let n=ay(t,e.schema),{from:r,to:i,empty:a}=e.selection,o=[];a?(e.storedMarks&&o.push(...e.storedMarks),o.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,i,e=>{o.push(...e.marks)});let s=o.find(e=>e.type.name===n.name);return s?{...s.attrs}:{}}function nb(e,t){let n=new ef(e);return t.forEach(e=>{e.steps.forEach(e=>{n.step(e)})}),n}function rb(e,t,n){let r=[];return e.nodesBetween(t.from,t.to,(e,t)=>{n(e)&&r.push({node:e,pos:t})}),r}function ib(e,t){for(let n=e.depth;n>0;--n){let r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}function ab(e){return t=>ib(t.$from,e)}function Q(e,t,n){return e.config[t]===void 0&&e.parent?Q(e.parent,t,n):typeof e.config[t]==`function`?e.config[t].bind({...n,parent:e.parent?Q(e.parent,t,n):null}):e.config[t]}function ob(e){return e.map(e=>{let t=Q(e,`addExtensions`,{name:e.name,options:e.options,storage:e.storage});return t?[e,...ob(t())]:e}).flat(10)}function sb(e,t){let n=Mu.fromSchema(t).serializeFragment(e),r=document.implementation.createHTMLDocument().createElement(`div`);return r.appendChild(n),r.innerHTML}function cb(e,t){let n=new Map;for(let t of e){let e=n.get(t.type)??new Map;e.set(t.name,t),n.set(t.type,e)}return[...Object.values(t.nodes),...Object.values(t.marks)].flatMap(e=>Object.entries(e.spec.attrs??{}).map(([t,r])=>{let i=n.get(e.name)?.get(t),a=Object.hasOwn(r,`default`);return{type:e.name,name:t,attribute:{rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,...i?.attribute,default:r.default,isRequired:!a,validate:r.validate}}}))}var lb={content:`string`,marks:`string`,group:`string`,inline:`boolean`,atom:`boolean`,selectable:`boolean`,draggable:`boolean`,code:`boolean`,whitespace:[`pre`,`normal`],definingAsContext:`boolean`,definingForContent:`boolean`,defining:`boolean`,isolating:`boolean`,linebreakReplacement:`boolean`},ub={inclusive:`boolean`,excludes:`string`,group:`string`,spanning:`boolean`,code:`boolean`};function db(e,t,n){return Object.fromEntries(Object.entries(t).flatMap(([t,r])=>{let i=e[t];if(i===void 0)return[];if(!(typeof r==`string`?typeof i===r:typeof i==`string`&&r.includes(i)))throw RangeError(`Invalid schemaSpec field '${n}.${t}'`);return[[t,i]]}))}function fb(e,t,n,r){return{...Object.fromEntries(Object.entries(t).filter(([e])=>e!==`attrs`&&!Object.hasOwn(r,e))),...db(n,r,e),attrs:n.attrs}}function pb(e,t,n){for(let r of Object.keys(t))if(!Object.hasOwn(e,r))throw RangeError(`schemaSpec requires a local ${n} extension named '${r}'`);for(let r of Object.keys(e))if(!Object.hasOwn(t,r))throw RangeError(`Local ${n} extension '${r}' is not in schemaSpec`)}function mb(e,t){pb(e.nodes,t.nodes,`node`),pb(e.marks,t.marks,`mark`);let n=t.spec.nodes,r=t.spec.marks;return t.spec.nodes.forEach((t,r)=>{n=n.update(t,fb(t,e.nodes[t],r,lb))}),t.spec.marks.forEach((t,n)=>{r=r.update(t,fb(t,e.marks[t],n,ub))}),{topNode:t.topNodeType.name,nodes:n,marks:r}}function hb(e){let t=e.filter((t,n)=>e.indexOf(t)!==n);return Array.from(new Set(t))}function gb(e){return{baseExtensions:e.filter(e=>e.type===`extension`),nodeExtensions:e.filter(e=>e.type===`node`),markExtensions:e.filter(e=>e.type===`mark`)}}function _b(e){let t=[],{nodeExtensions:n,markExtensions:r}=gb(e),i=[...n,...r],a={default:null,validate:void 0,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1},o=n.filter(e=>e.name!==`text`).map(e=>e.name),s=r.map(e=>e.name),c=[...o,...s];return e.forEach(e=>{let n=Q(e,`addGlobalAttributes`,{name:e.name,options:e.options,storage:e.storage,extensions:i});n&&n().forEach(e=>{let n;n=Array.isArray(e.types)?e.types:e.types===`*`?c:e.types===`nodes`?o:e.types===`marks`?s:[],n.forEach(n=>{Object.entries(e.attributes).forEach(([e,r])=>{t.push({type:n,name:e,attribute:{...a,...r}})})})})}),i.forEach(e=>{let n=Q(e,`addAttributes`,{name:e.name,options:e.options,storage:e.storage});if(!n)return;let r=n();Object.entries(r).forEach(([n,r])=>{let i={...a,...r};typeof i?.default==`function`&&(i.default=i.default()),i?.isRequired&&i?.default===void 0&&delete i.default,t.push({type:e.name,name:n,attribute:i})})}),t}function vb(e){return typeof e==`function`}function yb(e,t=void 0,...n){return vb(e)?t?e.bind(t)(...n):e(...n):e}function bb(e={}){return Object.keys(e).length===0&&e.constructor===Object}function xb(e){let t=[],n=``,r=!1,i=!1,a=0,o=e.length;for(let s=0;s<o;s+=1){let o=e[s];if(o===`'`&&!i)r=!r,n+=o;else if(o===`"`&&!r)i=!i,n+=o;else{if(!r&&!i){if(o===`(`){a+=1,n+=o;continue}if(o===`)`&&a>0){--a,n+=o;continue}if(o===`;`&&a===0){t.push(n),n=``;continue}}n+=o}}return n&&t.push(n),t}function Sb(e){let t=[],n=xb(e||``),r=n.length;for(let e=0;e<r;e+=1){let r=n[e],i=r.indexOf(`:`);if(i===-1)continue;let a=r.slice(0,i).trim(),o=r.slice(i+1).trim();a&&o&&t.push([a,o])}return t}function Cb(...e){return e.filter(e=>!!e).reduce((e,t)=>{let n={...e};return Object.entries(t).forEach(([e,t])=>{if(e===`__proto__`)Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:t,writable:!0});else if(!n[e])n[e]=t;else if(e===`class`){let r=t?String(t).split(` `):[],i=n[e]?n[e].split(` `):[],a=r.filter(e=>!i.includes(e));n[e]=[...i,...a].join(` `)}else if(e===`style`){let r=new Map([...Sb(n[e]),...Sb(t)]);n[e]=Array.from(r.entries()).map(([e,t])=>`${e}: ${t}`).join(`; `)}else n[e]=t}),n},{})}function wb(e,t){return t.filter(t=>t.type===e.type.name).filter(e=>e.attribute.rendered).map(t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]}).reduce((e,t)=>Cb(e,t),{})}function Tb(e){return typeof e==`string`?e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):e===`true`||e!==`false`&&e:e}function Eb(e,t){return`style`in e?e:{...e,getAttrs:n=>{let r=e.getAttrs?e.getAttrs(n):e.attrs;if(r===!1)return!1;let i=t.reduce((e,t)=>{let r=t.attribute.parseHTML?t.attribute.parseHTML(n):Tb(n.getAttribute(t.name));return r==null?e:{...e,[t.name]:r}},{});return{...r,...i}}}}function Db(e){return Object.fromEntries(Object.entries(e).filter(([e,t])=>e===`attrs`&&bb(t)?!1:t!=null))}function Ob(e){var t,n;let r={};return!(e!=null&&(t=e.attribute)!=null&&t.isRequired)&&`default`in(e?.attribute||{})&&(r.default=e.attribute.default),(e==null||(n=e.attribute)==null?void 0:n.validate)!==void 0&&(r.validate=e.attribute.validate),[e.name,r]}function kb(e,t,n=_b(e)){let{nodeExtensions:r,markExtensions:i}=gb(e);return{topNode:r.find(e=>Q(e,`topNode`))?.name,nodes:Object.fromEntries(r.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=Db({...e.reduce((e,t)=>{let n=Q(t,`extendNodeSchema`,a);return{...e,...n?n(r):{}}},{}),content:yb(Q(r,`content`,a)),marks:yb(Q(r,`marks`,a)),group:yb(Q(r,`group`,a)),inline:yb(Q(r,`inline`,a)),atom:yb(Q(r,`atom`,a)),selectable:yb(Q(r,`selectable`,a)),draggable:yb(Q(r,`draggable`,a)),code:yb(Q(r,`code`,a)),whitespace:yb(Q(r,`whitespace`,a)),linebreakReplacement:yb(Q(r,`linebreakReplacement`,a)),defining:yb(Q(r,`defining`,a)),isolating:yb(Q(r,`isolating`,a)),attrs:Object.fromEntries(i.map(Ob))}),s=yb(Q(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>Eb(e,i)));let c=Q(r,`renderHTML`,a);c&&(o.toDOM=e=>c({node:e,HTMLAttributes:wb(e,i)}));let l=Q(r,`renderText`,a);return l&&(o.toText=l),[r.name,o]})),marks:Object.fromEntries(i.map(r=>{let i=n.filter(e=>e.type===r.name),a={name:r.name,options:r.options,storage:r.storage,editor:t},o=Db({...e.reduce((e,t)=>{let n=Q(t,`extendMarkSchema`,a);return{...e,...n?n(r):{}}},{}),inclusive:yb(Q(r,`inclusive`,a)),excludes:yb(Q(r,`excludes`,a)),group:yb(Q(r,`group`,a)),spanning:yb(Q(r,`spanning`,a)),code:yb(Q(r,`code`,a)),attrs:Object.fromEntries(i.map(Ob))}),s=yb(Q(r,`parseHTML`,a));s&&(o.parseDOM=s.map(e=>Eb(e,i)));let c=Q(r,`renderHTML`,a);return c&&(o.toDOM=e=>c({mark:e,HTMLAttributes:wb(e,i)})),[r.name,o]}))}}function Ab(e,t,n){if(n===void 0)return new mu(kb(e,t));let r=hb(e.filter(e=>e.type!==`extension`).map(e=>e.name));if(r.length)throw RangeError(`Duplicate local schema types: ${r.join(`, `)}`);let i=new mu(n);return new mu(mb(kb(e,t,cb(_b(e),i)),i))}function jb(e){return e.sort((e,t)=>{let n=Q(e,`priority`)||100,r=Q(t,`priority`)||100;return n>r?-1:+(n<r)})}function Mb(e){let t=jb(ob(e)),n=hb(t.map(e=>e.name));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map(e=>`'${e}'`).join(`, `)}]. This can lead to issues.`),t}function Nb(e,t,n){let{from:r,to:i}=t,{blockSeparator:a=`
|
|
21
|
+
|
|
22
|
+
`,textSerializers:o={}}=n||{},s=``;return e.nodesBetween(r,i,(e,n,c,l)=>{e.isBlock&&n>r&&(s+=a);let u=o?.[e.type.name];if(u)return c&&(s+=u({node:e,pos:n,parent:c,index:l,range:t})),!1;if(e.isText){var d;s+=e==null||(d=e.text)==null?void 0:d.slice(Math.max(r,n)-n,i-n)}}),s}function Pb(e,t){return Nb(e,{from:0,to:e.content.size},t)}function Fb(e){return Object.fromEntries(Object.entries(e.nodes).filter(([,e])=>e.spec.toText).map(([e,t])=>[e,t.spec.toText]))}function Ib(e,t){let n=Gv(t,e.schema),{from:r,to:i}=e.selection,a=[];e.doc.nodesBetween(r,i,e=>{a.push(e)});let o=a.reverse().find(e=>e.type.name===n.name);return o?{...o.attrs}:{}}function Lb(e,t){let n=Uy(typeof t==`string`?t:t.name,e.schema);return n===`node`?Ib(e,t):n===`mark`?tb(e,t):{}}function Rb(e,t=JSON.stringify){let n={};return e.filter(e=>{let r=t(e);return Object.prototype.hasOwnProperty.call(n,r)?!1:n[r]=!0})}function zb(e){let t=Rb(e);return t.length===1?t:t.filter((e,n)=>!t.filter((e,t)=>t!==n).some(t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}function Bb(e){let{mapping:t,steps:n}=e,r=[],i=t.invert();return t.maps.forEach((e,a)=>{let o=[];if(e.ranges.length)e.forEach((e,t)=>{o.push({from:e,to:t})});else{let{from:e,to:t}=n[a];if(e===void 0||t===void 0)return;o.push({from:e,to:t})}let s=t.slice(a);o.forEach(({from:e,to:t})=>{let n=s.map(e,-1),a=s.map(t),o=i.map(n,-1),c=i.map(a);r.push({oldRange:{from:o,to:c},newRange:{from:n,to:a}})})}),zb(r)}function Vb(e,t,n){let r=[];return e===t?n.resolve(e).marks().forEach(t=>{let i=iy(n.resolve(e),t.type);i&&r.push({mark:t,...i})}):n.nodesBetween(e,t,(e,t)=>{e&&e?.nodeSize!==void 0&&r.push(...e.marks.map(n=>({from:t,to:t+e.nodeSize,mark:n})))}),r}var Hb=(e,t,n,r=20)=>{let i=e.doc.resolve(n),a=r,o=null;for(;a>0&&o===null;){let e=i.node(a);e?.type.name===t?o=e:--a}return[o,a]},Ub=e=>{let t=e.depth-1;if(t<0)return null;let n=e.index(t);return n===0?null:e.node(t).child(n-1)};function Wb(e,t){return t.nodes[e]||t.marks[e]||null}function Gb(e,t,n){return Object.fromEntries(Object.entries(n).filter(([n])=>{let r=e.find(e=>e.type===t&&e.name===n);return r?r.attribute.keepOnSplit:!1}))}var Kb=(e,t=500)=>{let n=``,r=e.parentOffset;return e.parent.nodesBetween(Math.max(0,r-t),r,(e,t,i,a)=>{var o;let s=(o=e.type.spec).toText?.call(o,{node:e,pos:t,parent:i,index:a})||e.textContent||`%leaf%`;n+=e.isAtom&&!e.isText?s:s.slice(0,Math.max(0,r-t))}),n};function qb(e,t,n={}){let{empty:r,ranges:i}=e.selection,a=t?ay(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter(e=>!a||a.name===e.type.name).find(e=>ty(e.attrs,n,{strict:!1}));let o=0,s=[];if(i.forEach(({$from:t,$to:n})=>{let r=t.pos,i=n.pos;e.doc.nodesBetween(r,i,(e,t)=>{if(a&&e.inlineContent&&!e.type.allowsMarkType(a))return!1;if(!e.isText&&!e.marks.length)return;let n=Math.max(r,t),c=Math.min(i,t+e.nodeSize),l=c-n;o+=l,s.push(...e.marks.map(e=>({mark:e,from:n,to:c})))})}),o===0)return!1;let c=s.filter(e=>!a||a.name===e.mark.type.name).filter(e=>ty(e.mark.attrs,n,{strict:!1})).reduce((e,t)=>e+t.to-t.from,0),l=s.filter(e=>!a||e.mark.type!==a&&e.mark.type.excludes(a)).reduce((e,t)=>e+t.to-t.from,0);return(c>0?c+l:c)>=o}function Jb(e,t,n={}){if(!t)return Ry(e,null,n)||qb(e,null,n);let r=Uy(t,e.schema);return r===`node`?Ry(e,t,n):r===`mark`&&qb(e,t,n)}var Yb=(e,t)=>{let{$from:n,$to:r,$anchor:i}=e.selection;if(t){let n=ab(e=>e.type.name===t)(e.selection);if(!n)return!1;let r=e.doc.resolve(n.pos+1);return i.pos+1===r.end()}return!(r.parentOffset<r.parent.nodeSize-2||n.pos!==r.pos)},Xb=e=>{let{$from:t,$to:n}=e.selection;return!(t.parentOffset>0||t.pos!==n.pos)};function Zb(e,t){return Array.isArray(t)?t.some(t=>(typeof t==`string`?t:t.name)===e.name):t}function Qb(e,t){let{nodeExtensions:n}=gb(t),r=n.find(t=>t.name===e);if(!r)return!1;let i=yb(Q(r,`group`,{name:r.name,options:r.options,storage:r.storage}));return typeof i==`string`&&i.split(` `).includes(`list`)}function $b(e,{checkChildren:t=!0,ignoreWhitespace:n=!1}={}){if(n){if(e.type.name===`hardBreak`)return!0;if(e.isText)return!/\S/.test(e.text??``)}if(e.isText)return!e.text;if(e.isAtom||e.isLeaf)return!1;if(e.content.childCount===0)return!0;if(t){let r=!0;return e.content.forEach(e=>{r!==!1&&($b(e,{ignoreWhitespace:n,checkChildren:t})||(r=!1))}),r}return!1}function ex(e){return e instanceof sf}function tx(e){if(typeof e!=`object`||!e)return!1;let t=e;return typeof t.apply==`function`&&typeof t.getMap==`function`&&typeof t.invert==`function`&&typeof t.map==`function`&&typeof t.merge==`function`&&typeof t.toJSON==`function`}function nx(e){if(typeof e!=`object`||!e)return!1;let t=e;if(!tx(t))return!1;let n=t.toJSON();return!(typeof n!=`object`||!n||n.stepType!==`replace`)}var rx=class e{constructor(e){this.position=e}static fromJSON(t){return new e(t.position)}toJSON(){return{position:this.position}}};function ix(e,t){let n=t.mapping.mapResult(e.position);return{position:new rx(n.pos),mapResult:n}}function ax(e){return new rx(e)}function ox(e,t,n){let{selection:r}=t,i=null;if(cy(r)&&(i=r.$cursor),i){let t=e.storedMarks??i.marks();return i.parent.type.allowsMarkType(n)&&(!!n.isInSet(t)||!t.some(e=>e.type.excludes(n)))}let{ranges:a}=r;return a.some(({$from:t,$to:r})=>{let i=t.depth===0&&e.doc.inlineContent&&e.doc.type.allowsMarkType(n);return e.doc.nodesBetween(t.pos,r.pos,(e,t,r)=>{if(i)return!1;if(e.isInline){let t=!r||r.type.allowsMarkType(n),a=!!n.isInSet(e.marks)||!e.marks.some(e=>e.type.excludes(n));i=t&&a}return!i}),i})}var sx=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=n,{empty:o,ranges:s}=a,c=ay(e,r.schema);if(i){if(o){let e=tb(r,c);n.addStoredMark(c.create({...e,...t}))}else s.forEach(e=>{let i=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(i,a,(e,r)=>{let o=Math.max(r,i),s=Math.min(r+e.nodeSize,a);e.marks.find(e=>e.type===c)?e.marks.forEach(e=>{c===e.type&&n.addMark(o,s,c.create({...e.attrs,...t}))}):n.addMark(o,s,c.create(t))})})}return ox(r,n,c)},cx=(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),lx=(e,t={})=>({state:n,dispatch:r,chain:i})=>{let a=Gv(e,n.schema),o;return n.selection.$anchor.sameParent(n.selection.$head)&&(o=n.selection.$anchor.parent.attrs),a.isTextblock?i().command(({commands:e})=>lp(a,{...o,...t})(n)?!0:e.clearNodes()).command(({state:e})=>lp(a,{...o,...t})(e,r)).run():(console.warn(`[tiptap warn]: Currently "setNode()" only supports text block nodes.`),!1)},ux=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,r=ly(e,0,n.content.size),i=sf.create(n,r);t.setSelection(i)}return!0},dx=(e,t)=>({tr:n,state:r,dispatch:i})=>{let{selection:a}=r,o,s;return typeof t==`number`?(o=t,s=t):t&&`from`in t&&`to`in t?(o=t.from,s=t.to):(o=a.from,s=a.to),i&&n.doc.nodesBetween(o,s,(t,r)=>{t.isText||n.setNodeMarkup(r,void 0,{...t.attrs,dir:e})}),!0},fx=e=>({tr:t,dispatch:n})=>{if(n){let{doc:n}=t,{from:r,to:i}=typeof e==`number`?{from:e,to:e}:e,a=X.atStart(n).from,o=X.atEnd(n).to,s=ly(r,a,o),c=ly(i,a,o),l=X.create(n,s,c);t.setSelection(l)}return!0},px=e=>({state:t,dispatch:n})=>Sp(Gv(e,t.schema))(t,n);function mx(e,t){let n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){let r=n.filter(e=>t?.includes(e.type.name));e.tr.ensureMarks(r)}}var hx=({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:i})=>{let{selection:a,doc:o}=t,{$from:s,$to:c}=a,l=i.extensionManager.attributes,u=Gb(l,s.node().type.name,s.node().attrs);if(a instanceof sf&&a.node.isBlock)return!s.parentOffset||!Ed(o,s.pos)?!1:(r&&(e&&mx(n,i.extensionManager.splittableMarks),t.split(s.pos).scrollIntoView()),!0);if(!s.parent.isBlock)return!1;let d=c.parentOffset===c.parent.content.size,f=s.depth===0?void 0:wy(s.node(-1).contentMatchAt(s.indexAfter(-1))),p=d&&f?[{type:f,attrs:u}]:void 0,m=a instanceof X&&!a.empty?xf.create({doc:t.doc,selection:a}).tr.deleteSelection():null,h=m?m.doc:t.doc,g=m?m.mapping.map(s.pos):s.pos,_=Ed(h,g,1,p);if(!p&&!_&&Ed(h,g,1,f?[{type:f}]:void 0)&&(_=!0,p=f?[{type:f,attrs:u}]:void 0),r){if(_){let e=t.steps.length;if(a instanceof X&&t.deleteSelection(),t.split(t.mapping.slice(e).map(s.pos),1,p),f&&!d&&!s.parentOffset&&s.parent.type!==f){let n=t.mapping.slice(e).map(s.before()),r=t.doc.resolve(n);s.node(-1).canReplaceWith(r.index(),r.index()+1,f)&&t.setNodeMarkup(t.mapping.slice(e).map(s.before()),f)}}e&&mx(n,i.extensionManager.splittableMarks),t.scrollIntoView()}return _},gx=(e,t={})=>({tr:n,state:r,dispatch:i,editor:a})=>{let o=Gv(e,r.schema),{$from:s,$to:c}=r.selection,l=r.selection.node;if(l&&l.isBlock||s.depth<2||!s.sameParent(c))return!1;let u=s.node(-1);if(u.type!==o)return!1;let d=a.extensionManager.attributes;if(s.parent.content.size===0&&s.node(-1).childCount===s.indexAfter(-1)){if(s.depth===2||s.node(-3).type!==o||s.index(-2)!==s.node(-2).childCount-1)return!1;if(i){let e=q.empty,r=s.index(-1)?1:s.index(-2)?2:3;for(let t=s.depth-r;t>=s.depth-3;--t)e=q.from(s.node(t).copy(e));let i=s.indexAfter(-1)<s.node(-2).childCount?1:s.indexAfter(-2)<s.node(-3).childCount?2:3,a={...Gb(d,s.node().type.name,s.node().attrs),...t},c=o.contentMatch.defaultType?.createAndFill(a)||void 0;e=e.append(q.from(o.createAndFill(null,c)||void 0));let l=s.before(s.depth-(r-1));n.replace(l,s.after(-i),new J(e,4-r,0));let u=-1;n.doc.nodesBetween(l,n.doc.content.size,(e,t)=>{if(u>-1)return!1;e.isTextblock&&e.content.size===0&&(u=t+1)}),u>-1&&n.setSelection(X.near(n.doc.resolve(u))),n.scrollIntoView()}return!0}let f=c.pos===s.end()?u.contentMatchAt(0).defaultType:null,p={...Gb(d,u.type.name,u.attrs),...t},m={...Gb(d,s.node().type.name,s.node().attrs),...t},h=s.parentOffset===0&&s.index(-1)===0,g=s.before(-1);n.delete(s.pos,c.pos);let _=h?u.attrs:p,v=f?[{type:o,attrs:_},{type:f,attrs:m}]:[{type:o,attrs:_}];if(!Ed(n.doc,s.pos,2))return!1;if(i){let{selection:e,storedMarks:t}=r,{splittableMarks:o}=a.extensionManager,c=t||e.$to.parentOffset&&e.$from.marks();if(n.split(s.pos,2,v).scrollIntoView(),h&&n.setNodeMarkup(g,void 0,p),!c||!i)return!0;let l=c.filter(e=>o.includes(e.type.name));n.ensureMarks(l)}return!0};function _x(e,t,n){if(!e.validContent(t))return null;try{return e.create(n,t)}catch{return null}}function vx(e,t){if(e.pendingContent.length===0)return!0;let n=_x(t,q.from(e.pendingContent));return n?(e.items.push(n),e.pendingContent=[],!0):!1}function yx(e,t,n){return n.validContent(q.from([...t.pendingContent,e]))?(t.pendingContent.push(e),!0):!vx(t,n)||!n.validContent(q.from(e))?!1:(t.pendingContent.push(e),!0)}function bx(e,t,n,r){let i=r(e,n);if(!i)return!1;let a=_x(n.listType,q.from(i),e.attrs);return a?n.itemType.validContent(q.from([...t.pendingContent,a]))?(t.pendingContent.push(a),!0):vx(t,n.itemType)?(t.items.push(...i),!0):!1:!1}function xx(e,t,n){let r={items:[],pendingContent:[]};for(let i=0;i<e.childCount;i+=1){let a=e.child(i);if(!(t.isListNode(a)?bx(a,r,t,n):yx(a,r,t.itemType)))return null}return vx(r,t.itemType)?r.items:null}function Sx(e,t){let n=[];for(let r=0;r<e.childCount;r+=1){let i=xx(e.child(r),t,Sx);if(!i)return null;n.push(...i)}return n}function Cx(e,t){let n=null;return e.descendants((e,r)=>e!==t||(n=r,!1)),n}function wx(e){return!e||e===`1`?null:e}function Tx(e,t){return wx(e)===wx(t)}var Ex=(e,t)=>{let n=ab(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Od(e.doc,n.pos))||!Tx(n.node.attrs.type,i?.attrs.type)||e.join(n.pos),!0},Dx=(e,t)=>{let n=ab(e=>e.type===t)(e.selection);if(!n)return!0;let r=e.doc.resolve(n.start).after(n.depth);if(r===void 0)return!0;let i=e.doc.nodeAt(r);return!(n.node.type===i?.type&&Od(e.doc,r))||!Tx(n.node.attrs.type,i?.attrs.type)||e.join(r),!0};function Ox(e){let t=e.doc,n=t.firstChild;if(!n)return null;let r=t.resolve(1),i=t.resolve(n.nodeSize-1);return X.between(r,i)}var kx=(e,t,n,r={})=>({editor:i,tr:a,state:o,dispatch:s,chain:c,commands:l,can:u})=>{let{extensions:d,splittableMarks:f}=i.extensionManager,p=Gv(e,o.schema),m=Gv(t,o.schema),{selection:h,storedMarks:g}=o,{$from:_,$to:v}=h,y=_.blockRange(v),b=g||h.$to.parentOffset&&h.$from.marks();if(!y)return!1;let x=ab(e=>Qb(e.type.name,d))(h),S=h.from===0&&h.to===o.doc.content.size,C=o.doc.content.content,w=C.length===1?C[0]:null,T=S&&w&&Qb(w.type.name,d)?{node:w,pos:0,depth:0}:null,E=x??T,D=!!x&&y.depth>=1&&y.depth-x.depth<=1,O=!!T;if((D||O)&&E){if(E.node.type===p)return S&&O?c().command(({tr:e,dispatch:t})=>{let n=Ox(e);return n?(e.setSelection(n),t&&t(e),!0):!1}).liftListItem(m).run():l.liftListItem(m);if(Qb(E.node.type.name,d)&&p.validContent(E.node.content))return c().command(()=>(a.setNodeMarkup(E.pos,p),!0)).command(()=>Ex(a,p)).command(()=>Dx(a,p)).run();if(Qb(E.node.type.name,d)){let e=E.node.firstChild?.type;if(e&&e!==m){let e=Sx(E.node,{listType:p,itemType:m,isListNode:e=>Qb(e.type.name,d)}),t=e?q.from(e):null;return!t||!p.validContent(t)?!1:c().command(()=>{let{$anchor:e,$head:n}=a.selection,i=e.parent,o=n.parent,s=e.parentOffset,c=n.parentOffset,l;try{l=p.create(r,t)}catch{return!1}if(a.replaceWith(E.pos,E.pos+E.node.nodeSize,l),i.inlineContent&&o.inlineContent){let e=Cx(l,i),t=Cx(l,o);if(e!==null&&t!==null){let n=E.pos+e+2+s,r=E.pos+t+2+c;a.setSelection(X.create(a.doc,n,r))}}return!0}).command(()=>Ex(a,p)).command(()=>Dx(a,p)).run()}}}return!n||!b||!s?c().command(()=>u().wrapInList(p,r)?!0:l.clearNodes()).wrapInList(p,r).command(()=>Ex(a,p)).command(()=>Dx(a,p)).run():c().command(()=>{let e=u().wrapInList(p,r),t=b.filter(e=>f.includes(e.type.name));return a.ensureMarks(t),e?!0:l.clearNodes()}).wrapInList(p,r).command(()=>Ex(a,p)).command(()=>Dx(a,p)).run()},Ax=(e,t={},n={})=>({state:r,commands:i})=>{let{extendEmptyMarkRange:a=!1}=n,o=ay(e,r.schema);return qb(r,o,t)?i.unsetMark(o,{extendEmptyMarkRange:a}):i.setMark(o,t)},jx=(e,t,n={})=>({state:r,commands:i})=>{let a=Gv(e,r.schema),o=Gv(t,r.schema),s=Ry(r,a,n),c;return r.selection.$anchor.sameParent(r.selection.$head)&&(c=r.selection.$anchor.parent.attrs),s?i.setNode(o,c):i.setNode(a,{...c,...n})},Mx=(e,t={})=>({state:n,commands:r})=>{let i=Gv(e,n.schema);return Ry(n,i,t)?r.lift(i):r.wrapIn(i,t)},Nx=()=>({state:e,dispatch:t})=>{let n=e.plugins;for(let r=0;r<n.length;r+=1){let i=n[r],a;if(i.spec.isInputRules&&(a=i.getState(e))){if(t){let t=e.tr,n=a.transform;for(let e=n.steps.length-1;e>=0;--e)t.step(n.steps[e].invert(n.docs[e]));if(a.text){let n=t.doc.resolve(a.from).marks();t.replaceWith(a.from,a.to,e.schema.text(a.text,n))}else t.delete(a.from,a.to)}return!0}}return!1},Px=(e={})=>({tr:t,dispatch:n,editor:r})=>{let{ignoreClearable:i=!1}=e,{selection:a}=t,{empty:o,ranges:s}=a;if(o)return!0;let{nonClearableMarks:c}=r.extensionManager;if(n){let e=Object.values(r.schema.marks).filter(e=>i||!c.includes(e.name));s.forEach(n=>{for(let r of e)t.removeMark(n.$from.pos,n.$to.pos,r)})}return!0},Fx=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let{extendEmptyMarkRange:a=!1}=t,{selection:o}=n,s=ay(e,r.schema),{$from:c,empty:l,ranges:u}=o;if(!i)return!0;if(l&&a){let{from:e,to:t}=o,r=iy(c,s,c.marks().find(e=>e.type===s)?.attrs);r&&(e=r.from,t=r.to),n.removeMark(e,t,s)}else u.forEach(e=>{n.removeMark(e.$from.pos,e.$to.pos,s)});return n.removeStoredMark(s),!0},Ix=e=>({tr:t,state:n,dispatch:r})=>{let{selection:i}=n,a,o;return typeof e==`number`?(a=e,o=e):e&&`from`in e&&`to`in e?(a=e.from,o=e.to):(a=i.from,o=i.to),r&&t.doc.nodesBetween(a,o,(e,n)=>{if(e.isText)return;let r={...e.attrs};delete r.dir,t.setNodeMarkup(n,void 0,r)}),!0},Lx=(e,t={})=>({tr:n,state:r,dispatch:i})=>{let a=null,o=null,s=Uy(typeof e==`string`?e:e.name,r.schema);if(!s)return!1;s===`node`&&(a=Gv(e,r.schema)),s===`mark`&&(o=ay(e,r.schema));let c=!1;return n.selection.ranges.forEach(e=>{let s=e.$from.pos,l=e.$to.pos,u,d,f,p;n.selection.empty?r.doc.nodesBetween(s,l,(e,t)=>{a&&a===e.type&&(c=!0,f=Math.max(t,s),p=Math.min(t+e.nodeSize,l),u=t,d=e)}):r.doc.nodesBetween(s,l,(e,r)=>{r<s&&a&&a===e.type&&(c=!0,f=Math.max(r,s),p=Math.min(r+e.nodeSize,l),u=r,d=e),r>=s&&r<=l&&(a&&a===e.type&&(c=!0,i&&n.setNodeMarkup(r,void 0,{...e.attrs,...t})),o&&e.marks.length&&e.marks.forEach(a=>{if(o===a.type&&(c=!0,i)){let i=Math.max(r,s),c=Math.min(r+e.nodeSize,l);n.addMark(i,c,o.create({...a.attrs,...t}))}}))}),d&&(u!==void 0&&i&&n.setNodeMarkup(u,void 0,{...d.attrs,...t}),o&&d.marks.length&&d.marks.forEach(e=>{o===e.type&&i&&n.addMark(f,p,o.create({...e.attrs,...t}))}))}),c},Rx=new Ef(`__tiptap_decorations__`),zx=e=>({tr:t,dispatch:n})=>(n&&t.setMeta(Rx,{type:`force`,name:e}),!0),Bx=(e,t={})=>({state:n,dispatch:r})=>cp(Gv(e,n.schema),t)(n,r),Vx=(e,t={})=>({state:n,dispatch:r})=>hp(Gv(e,n.schema),t)(n,r),Hx=jf({blur:()=>Rv,clearContent:()=>zv,clearNodes:()=>Bv,command:()=>Vv,createParagraphNear:()=>Hv,cut:()=>Uv,deleteCurrentNode:()=>Wv,deleteNode:()=>Kv,deleteRange:()=>qv,deleteSelection:()=>Zv,enter:()=>Qv,exitCode:()=>$v,extendMarkRange:()=>oy,first:()=>sy,focus:()=>my,forEach:()=>hy,insertContent:()=>gy,insertContentAt:()=>Cy,insertDefaultBlock:()=>Ty,joinBackward:()=>Oy,joinDown:()=>Dy,joinForward:()=>ky,joinItemBackward:()=>jy,joinItemForward:()=>My,joinTextblockBackward:()=>Ny,joinTextblockForward:()=>Py,joinUp:()=>Ey,keyboardShortcut:()=>Ly,lift:()=>zy,liftEmptyBlock:()=>By,liftListItem:()=>Vy,newlineInCode:()=>Hy,resetAttributes:()=>Gy,scrollIntoView:()=>Ky,selectAll:()=>qy,selectNodeBackward:()=>Jy,selectNodeForward:()=>Yy,selectParentNode:()=>Xy,selectTextblockEnd:()=>Zy,selectTextblockStart:()=>Qy,setContent:()=>eb,setMark:()=>sx,setMeta:()=>cx,setNode:()=>lx,setNodeSelection:()=>ux,setTextDirection:()=>dx,setTextSelection:()=>fx,sinkListItem:()=>px,splitBlock:()=>hx,splitListItem:()=>gx,toggleList:()=>kx,toggleMark:()=>Ax,toggleNode:()=>jx,toggleWrap:()=>Mx,undoInputRule:()=>Nx,unsetAllMarks:()=>Px,unsetMark:()=>Fx,unsetTextDirection:()=>Ix,updateAttributes:()=>Lx,updateDecorations:()=>zx,wrapIn:()=>Bx,wrapInList:()=>Vx}),Ux=new WeakMap;function Wx(e,t){Ux.set(e,(Ux.get(e)??0)+1);try{return t()}finally{let t=(Ux.get(e)??1)-1;t>0?Ux.set(e,t):Ux.delete(e)}}function Gx(e){return Ux.has(e)}var Kx=class{constructor(){this.callbacks={}}on(e,t){return this.callbacks[e]||(this.callbacks[e]=[]),this.callbacks[e].push(t),this}emit(e,...t){let n=this.callbacks[e];return n&&n.forEach(e=>e.apply(this,t)),this}off(e,t){let n=this.callbacks[e];return n&&(t?this.callbacks[e]=n.filter(e=>e!==t):delete this.callbacks[e]),this}once(e,t){let n=(...r)=>{this.off(e,n),t.apply(this,r)};return this.on(e,n)}removeAllListeners(){this.callbacks={}}},qx=typeof process<`u`&&!1;function Jx(e){return e.kind===`widget`}function Yx(e,t){let n=[],r=new Set;for(let i of e)i.kind===`widget`&&Jx(i)&&r.add(i.key),n.push(i.toPMDecoration(t));return{decorations:n,widgetKeys:r}}function Xx(e,t,n){let{decorations:r,widgetKeys:i}=Yx(t,n);return{set:c_.create(e,r),widgetKeys:i}}function Zx({position:e,from:t,to:n,docSize:r}){return e<t?!1:e<n||e===n&&n===r}function Qx({decorations:e,from:t,to:n,docSize:r,extensionName:i,warnedExtensions:a}){return e.filter(e=>Zx({position:e.anchor,from:t,to:n,docSize:r})?!0:(e.anchor===n||a.has(i)||(a.add(i),console.warn(`[tiptap warn]: Extension "${i}" returned a decoration outside the requested range [${t}, ${n}). It was ignored.`)),!1))}function $x(e){let t=e.spec?.key;return typeof t==`string`?t:void 0}function eS(e){let t=new Map,n=new Map;for(let r of e.find()){let e=$x(r);if(!e)continue;let i=r.spec.extensionName??`unknown`,a=t.get(e)??new Set;a.add(i),t.set(e,a),n.set(e,(n.get(e)??0)+1)}return Array.from(t,([e,t])=>({key:e,extensions:t})).filter(({key:e})=>(n.get(e)??0)>1)}function tS(e){return e.jsonID===`attr`}function nS(e){let t=!1;if(e.getMap().forEach(()=>{t=!0}),t||tS(e))return!0;let n=e;return typeof n.from==`number`&&typeof n.to==`number`}function rS(e,t){let n=null,r=0,i=0;for(let a=0;a<e.childCount&&!(i>t.to);a+=1){let o=i+e.child(a).nodeSize;o>=t.from&&(n===null&&(n=i),r=o),i=o}return n===null?null:{from:n,to:r}}function iS(e,t){if(e.steps.some(e=>!nS(e)))return{type:`full`};let n=Bb(e).map(({newRange:e})=>e);e.steps.forEach((t,r)=>{if(!tS(t))return;let i=e.mapping.slice(r);n.push({from:i.map(t.pos,-1),to:i.map(t.pos+1)})});let r=[];for(let e of n){let n=rS(t,e);n&&r.push(n)}r.sort((e,t)=>e.from-t.from);let i=[];for(let e of r){let t=i[i.length-1];t&&e.from<=t.to?t.to=Math.max(t.to,e.to):i.push({...e})}return{type:`ranges`,ranges:i}}function aS(e,t,n,r){return e.map(t,n,{onRemove:e=>{let t=e?.key;typeof t==`string`&&r.delete(t)}})}function oS(e,t,n){let r=t.decorationSetsByExtension[e]??c_.empty,i=new Set(t.widgetKeysByExtension[e]??[]);return{set:aS(r,n.mapping,n.doc,i),widgetKeys:i}}function sS(e,t){let n=Object.values(t).flatMap(e=>e.find());return c_.create(e,n)}function cS(e){let t=new Set;for(let n of Object.values(e))for(let e of n)t.add(e);return t}function lS(e,t){switch(t.update??`document`){case`document`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" provides createInRange() but does not use the "changedRanges" decoration update strategy.`);return;case`changedRanges`:if(!t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "changedRanges" decoration update strategy but does not provide createInRange().`);return;case`manual`:if(t.createInRange)throw Error(`[tiptap error]: Extension "${e}" uses the "manual" decoration update strategy, which is not compatible with createInRange(). createInRange() requires the "changedRanges" strategy.`);if(t.shouldUpdate)throw Error(`[tiptap error]: Extension "${e}" cannot combine the "manual" decoration update strategy with shouldUpdate().`);return;default:throw Error(`[tiptap error]: Extension "${e}" uses an unknown decoration update strategy. Expected "document", "changedRanges", or "manual".`)}}function uS(e,t,n){return n?!0:e.update===`manual`?!1:e.shouldUpdate?e.shouldUpdate(t):t.tr.docChanged}var dS=new Set,fS=class{constructor(e){this.warnedWidgetKeys=new Set,this.warnedOutOfRangeExtensions=new Set,this.handleBeforeTransaction=({nextState:e})=>{let t=Rx.getState(e);t&&this.warnDuplicateWidgetKeys(t)},this.editor=e.editor,this.entries=this.resolveEntries(e.entries),this.entries.forEach(({name:e,spec:t})=>lS(e,t)),this.plugin=this.entries.length>0?this.createPlugin():null,this.editor.on(`beforeTransaction`,this.handleBeforeTransaction)}destroy(){this.editor.off(`beforeTransaction`,this.handleBeforeTransaction)}liveWidgetKeys(){return Rx.getState(this.editor.state)?.widgetKeys??dS}get mountedView(){return this.editor.isDestroyed?null:this.editor.view}resolveEntries(e){let t=[];for(let{name:n,addDecorations:r}of e){let e=r();e&&t.push({name:n,spec:e})}return t}createPlugin(){let{editor:e,entries:t}=this;return new Cf({key:Rx,state:{init:(e,n)=>{let r={},i={};for(let{name:e,spec:a}of t){let{set:t,widgetKeys:o}=this.buildFullSet(e,a,n);r[e]=t,i[e]=o}let a={decorationSetsByExtension:r,widgetKeysByExtension:i,mergedDecorationSet:this.buildMergedSet(n.doc,r),widgetKeys:cS(i)};return this.warnDuplicateWidgetKeys(a),a},apply:(n,r,i,a)=>{let o=n.getMeta(Rx),s=o?.type===`force`&&!o.name,c=o?.type===`force`?o.name:void 0,l={},u={},d=new Set;return Wx(e,()=>{for(let{name:o,spec:f}of t){let t=s||c===o;if(!uS(f,{editor:e,tr:n,oldState:i,newState:a},t)){let e=oS(o,r,n);l[o]=e.set,u[o]=e.widgetKeys}else if(f.update===`changedRanges`&&n.docChanged&&!t){let e=this.applyChangedRangesRecompute(o,f,r,n,a);l[o]=e.set,u[o]=e.widgetKeys,d.add(o)}else{let{set:e,widgetKeys:t}=this.buildFullSet(o,f,a);l[o]=e,u[o]=t,d.add(o)}}}),d.size===0&&!n.docChanged?r:{decorationSetsByExtension:l,widgetKeysByExtension:u,mergedDecorationSet:this.mergeAfterApply({entries:t,previous:r,tr:n,decorationSetsByExtension:l,recomputedNames:d}),widgetKeys:cS(u)}}},props:{decorations(e){return Rx.getState(e)?.mergedDecorationSet??c_.empty}}})}applyChangedRangesRecompute(e,t,n,r,i){let a=iS(r,i.doc);return a.type===`full`?this.buildFullSet(e,t,i):this.rebuildRanges(e,t,n,r,i,a.ranges)}rebuildRanges(e,t,n,r,i,a){let o=n.decorationSetsByExtension[e]??c_.empty,s=new Set(n.widgetKeysByExtension[e]??[]),c=aS(o,r.mapping,r.doc,s),l=i.doc.content.size;for(let{from:n,to:r}of a){let a=c.find(n,r).filter(e=>Zx({position:e.from,from:n,to:r,docSize:l}));for(let e of a){let t=$x(e);t&&s.delete(t)}c=c.remove(a);let{decorations:o,widgetKeys:u}=Yx(Qx({decorations:this.runCreate(e,`createInRange`,()=>t.createInRange({editor:this.editor,state:i,view:this.mountedView,from:n,to:r})),from:n,to:r,docSize:l,extensionName:e,warnedExtensions:this.warnedOutOfRangeExtensions}),e);c=c.add(i.doc,o);for(let e of u)s.add(e)}return{set:c,widgetKeys:s}}buildFullSet(e,t,n){let r=this.runCreate(e,`create`,()=>t.create({editor:this.editor,state:n,view:this.mountedView}));return Xx(n.doc,r,e)}runCreate(e,t,n){try{return n()}catch(n){return console.error(`[tiptap error]: Extension "${e}" threw in \`addDecorations().${t}()\`. Its decorations were dropped for this update.`,n),[]}}warnDuplicateWidgetKeys(e){if(!qx)return;if(e.widgetKeys.size===0){this.warnedWidgetKeys.clear();return}let t=eS(e.mergedDecorationSet),n=new Set(t.map(({key:e})=>e));for(let{key:e,extensions:n}of t){if(this.warnedWidgetKeys.has(e))continue;let t=Array.from(n).map(e=>`"${e}"`).join(`, `);console.warn(`[tiptap warn]: Duplicate widget decoration key "${e}" in extension${n.size===1?``:`s`} ${t}. Widget decoration keys must be globally unique, otherwise ProseMirror misplaces the widget DOM. Use a stable, unique key (e.g. \`comment-\${id}\`).`)}this.warnedWidgetKeys=n}buildMergedSet(e,t){let n=Object.keys(t);return n.length===1?t[n[0]]:sS(e,t)}mergeAfterApply({entries:e,previous:t,tr:n,decorationSetsByExtension:r,recomputedNames:i}){return e.length===1?r[e[0].name]:i.size===0?t.mergedDecorationSet.map(n.mapping,n.doc):sS(n.doc,r)}};function pS(e,t){let{selection:n}=e,{$from:r}=n;if(n instanceof sf){let e=r.index();return r.parent.canReplaceWith(e,e+1,t)}let i=r.depth;for(;i>=0;){let e=r.index(i);if(r.node(i).contentMatchAt(e).matchType(t))return!0;--i}return!1}function mS(e,t,n){let r=document.querySelector(`style[data-tiptap-style${n?`-${n}`:``}]`);if(r!==null)return r;let i=document.createElement(`style`);return t&&i.setAttribute(`nonce`,t),i.setAttribute(`data-tiptap-style${n?`-${n}`:``}`,``),i.innerHTML=e,document.getElementsByTagName(`head`)[0].appendChild(i),i}function hS(e){return typeof e==`number`}function gS(e){return Object.prototype.toString.call(e).slice(8,-1)}function _S(e){return gS(e)===`Object`&&e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype}function vS(e){return typeof e==`string`&&e.trim().length>0&&!/[;{}]/.test(e)}function yS(e,t){return e.replace(/^[ \t]*/,e=>{let n=0;for(let t of e)n+=t===` `?4-n%4:1;return` `.repeat(Math.max(0,n-t))})}function bS(e,t){let n=`text\n${e}\n`,r=t(n)[0];return(r?.type===`paragraph`||r?.type===`text`)&&r.raw===n}function xS(e,t,n){let r=t.split(`
|
|
23
|
+
`),i=n.isParagraphContinuation??(e=>bS(e,n.blockTokens)),a=0;for(let e of r){if(!e.trim()||!i(e))break;a+=1}return{mainContent:[e,...r.slice(0,a).map(e=>e.trimStart())].join(`
|
|
24
|
+
`),nestedContent:r.slice(a).join(`
|
|
25
|
+
`)}}function SS(e,t,n){let r=e.split(`
|
|
26
|
+
`),i=[],a=``,o=0,s=t.baseIndentSize||2;for(;o<r.length;){let e=r[o],u=e.match(t.itemPattern);if(!u){if(i.length>0)break;if(e.trim()===``){o+=1,a=`${a}${e}\n`;continue}return}let d=t.extractItemData(u),{indentLevel:f,mainContent:p}=d;a=`${a}${e}\n`;let m=[p];for(o+=1;o<r.length;){var c;let e=r[o];if(e.trim()===``){var l;let t=r.slice(o+1).findIndex(e=>e.trim()!==``);if(t===-1)break;if((((l=r[o+1+t].match(/^(\s*)/))==null||(l=l[1])==null?void 0:l.length)||0)>f){m.push(e),a=`${a}${e}\n`,o+=1;continue}break}if((((c=e.match(/^(\s*)/))==null||(c=c[1])==null?void 0:c.length)||0)>f)m.push(e),a=`${a}${e}\n`,o+=1;else break}let h,g=m.slice(1);if(g.length>0){let e=xS(p,g.map(e=>yS(e,f+s)).join(`
|
|
27
|
+
`),n);d.mainContent=e.mainContent;let r=e.nestedContent;r.trim()&&(h=t.customNestedParser?t.customNestedParser(r):n.blockTokens(r))}let _=t.createToken(d,h);i.push(_)}if(i.length!==0)return{items:i,raw:a.slice(0,e.length)}}var CS=4;function wS(e){let t=0;for(let n of e)t=n===` `?t+CS-t%CS:t+1;return t}function TS(e,t,n,r,i){if(!e||!Array.isArray(e.content))return``;let a=typeof n==`function`?n(r):n,[o,...s]=e.content,c=t.renderChildren([o]),l=`${a}${i?.indentMainContent?c.split(`
|
|
28
|
+
`).map((e,n)=>n===0?e:t.indent(e)).join(`
|
|
29
|
+
`):c}`;return s&&s.length>0&&s.forEach((e,n)=>{let r=t.renderChild?.call(t,e,n+1)??t.renderChildren([e]);if(r!=null){let n=e=>{if(!i?.alignNestedToPrefix)return t.indent(e);let n=t.indent(``),r=wS(a);return(wS(n)>=r?n:` `.repeat(r))+e},o=r.split(`
|
|
30
|
+
`).map(e=>n(e||``)).join(`
|
|
31
|
+
`);l+=e.type===`paragraph`?`\n\n${o}`:`\n${o}`}}),l}function ES(e,t){let n={...e};return _S(e)&&_S(t)&&Object.keys(t).forEach(r=>{_S(t[r])&&_S(e[r])?n[r]=ES(e[r],t[r]):n[r]=t[r]}),n}function DS(e,t,n={}){let{state:r}=t,{doc:i,tr:a}=r,o=e;i.descendants((t,r)=>{let i=a.mapping.map(r),s=a.mapping.map(r)+t.nodeSize,c=null;if(t.marks.forEach(e=>{if(e!==o)return!1;c=e}),!c)return;let l=!1;if(Object.keys(n).forEach(e=>{n[e]!==c.attrs[e]&&(l=!0)}),l){let t=e.type.create({...e.attrs,...n});a.removeMark(i,s,e.type),a.addMark(i,s,t)}}),a.docChanged&&t.view.dispatch(a)}var OS=class{constructor(e){this.find=e.find,this.handler=e.handler,this.undoable=e.undoable??!0}},kS=(e,t)=>{if(ey(t))return t.exec(e);let n=t(e);if(!n)return null;let r=[n.text];return r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn(`[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".`),r.push(n.replaceWith)),r};function AS(e){let{editor:t,from:n,to:r,text:i,insertText:a}=e;if(!a)return{inputTransaction:null,tr:t.view.state.tr};let o=t.view.state.tr.insertText(i,n,r);return{inputTransaction:o,tr:xf.create({doc:o.doc,selection:o.selection,storedMarks:o.storedMarks}).tr}}function jS(e){let{editor:t,from:n,to:r,text:i,rule:a,match:o,plugin:s,insertText:c}=e,{view:l}=t,{inputTransaction:u,tr:d}=AS({editor:t,from:n,to:r,text:i,insertText:c}),f=u?n+i.length:r,p=Iv({state:l.state,transaction:d}),m={from:n-(o[0].length-i.length),to:f},{commands:h,chain:g,can:_}=new Lv({editor:t,state:p});return a.handler({state:p,range:m,match:o,commands:h,chain:g,can:_})===null||!d.steps.length?!1:(u&&(l.dispatch(u),!l.state.doc.eq(u.doc))||(Ov(d),d.setMeta(`inputRule`,!0),a.undoable&&d.setMeta(s,{transform:d,from:n,to:f,text:i}),l.dispatch(d)),!0)}function MS(e,t,n){let r=t[0].length-n.length;if(r<=0)return!0;let i=e.parentOffset-r;return i>=0&&e.parent.textBetween(i,e.parentOffset)===t[0].slice(0,r)}function NS(e){let{editor:t,from:n,to:r,text:i,rules:a,plugin:o,insertText:s}=e,{view:c}=t;if(c.composing)return!1;let l=c.state.doc.resolve(n);if(l.parent.type.spec.code||(l.nodeBefore||l.nodeAfter)?.marks.find(e=>e.type.spec.code))return!1;let u=Kb(l)+i;for(let e of a){let a=kS(u,e.find);if(a&&MS(l,a,i)&&jS({editor:t,from:n,to:r,text:i,rule:e,match:a,plugin:o,insertText:s}))return!0}return!1}function PS(e){let{editor:t,rules:n}=e,r=new Cf({state:{init(){return null},apply(e,i,a){let o=e.getMeta(r);if(o)return o;let s=e.getMeta(`applyInputRules`);return s&&setTimeout(()=>{let{text:e}=s;e=typeof e==`string`?e:sb(q.from(e),a.schema);let{from:i}=s,o=i+e.length;NS({editor:t,from:i,to:o,text:e,rules:n,plugin:r})}),e.selectionSet||e.docChanged?null:i}},props:{handleTextInput(e,i,a,o){return NS({editor:t,from:i,to:a,text:o,rules:n,plugin:r,insertText:!0})},handleDOMEvents:{compositionend:e=>(setTimeout(()=>{let{$cursor:i}=e.state.selection;i&&NS({editor:t,from:i.pos,to:i.pos,text:``,rules:n,plugin:r})}),!1)},handleKeyDown(e,i){if(i.key!==`Enter`)return!1;let{$cursor:a}=e.state.selection;return a?NS({editor:t,from:a.pos,to:a.pos,text:`
|
|
32
|
+
`,rules:n,plugin:r}):!1}},isInputRules:!0});return r}var FS=class{constructor(e={}){this.type=`extendable`,this.parent=null,this.child=null,this.name=``,this.config={name:this.name},this.config={...this.config,...e},this.name=this.config.name}get options(){return{...yb(Q(this,`addOptions`,{name:this.name}))}}get storage(){return{...yb(Q(this,`addStorage`,{name:this.name,options:this.options}))}}configure(e={}){let t=this.extend({...this.config,addOptions:()=>ES(this.options,e)});return t.name=this.name,t.parent=this.parent,this.child=null,t}extend(e={}){let t=new this.constructor({...this.config,...e});return t.parent=this,this.child=t,t.name=`name`in e?e.name:t.parent.name,t}},IS=class e extends FS{constructor(...e){super(...e),this.type=`mark`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}static handleExit({editor:e,mark:t}){let{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){let i=r.marks();if(!i.find(e=>e?.type.name===t.name))return!1;let a=i.find(e=>e?.type.name===t.name);return a&&n.removeStoredMark(a),n.insertText(` `,r.pos),e.view.dispatch(n),!0}return!1}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},LS=class{constructor(e){this.find=e.find,this.handler=e.handler}},RS=(e,t,n)=>{if(ey(t))return[...e.matchAll(t)];let r=t(e,n);return r?r.map(t=>{let n=[t.text];return n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn(`[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".`),n.push(t.replaceWith)),n}):[]};function zS(e){let{editor:t,state:n,from:r,to:i,rule:a,pasteEvent:o,dropEvent:s}=e,{commands:c,chain:l,can:u}=new Lv({editor:t,state:n}),d=[];return n.doc.nodesBetween(r,i,(e,t)=>{var f;if((f=e.type)!=null&&(f=f.spec)!=null&&f.code||!(e.isText||e.isTextblock||e.isInline))return;let p=e.content?.size??e.nodeSize??0,m=Math.max(r,t),h=Math.min(i,t+p);m>=h||RS(e.isText?e.text||``:e.textBetween(m-t,h-t,void 0,``),a.find,o).forEach(e=>{if(e.index===void 0)return;let t=m+e.index+1,r=t+e[0].length,i={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},f=a.handler({state:n,range:i,match:e,commands:c,chain:l,can:u,pasteEvent:o,dropEvent:s});d.push(f)})}),d.every(e=>e!==null)}var BS=null,VS=e=>{var t;let n=new ClipboardEvent(`paste`,{clipboardData:new DataTransfer});return(t=n.clipboardData)==null||t.setData(`text/html`,e),n};function HS(e){let{editor:t,rules:n}=e,r=null,i=!1,a=!1,o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,s;try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}let c=({state:e,from:n,to:r,rule:i,pasteEvt:a})=>{let c=e.tr,l=Iv({state:e,transaction:c});if(zS({editor:t,state:l,from:Math.max(n-1,0),to:r.b-1,rule:i,pasteEvent:a,dropEvent:s})&&c.steps.length){try{s=typeof DragEvent<`u`?new DragEvent(`drop`):null}catch{s=null}return o=typeof ClipboardEvent<`u`?new ClipboardEvent(`paste`):null,c}};return t.on(`destroy`,()=>{BS===t&&(BS=null)}),n.map(e=>new Cf({view(e){let n=n=>{r=e.dom.parentElement?.contains(n.target)?e.dom.parentElement:null,r&&(BS=t)},i=()=>{BS&&=null};return window.addEventListener(`dragstart`,n),window.addEventListener(`dragend`,i),{destroy(){window.removeEventListener(`dragstart`,n),window.removeEventListener(`dragend`,i)}}},props:{handleDOMEvents:{drop:(e,t)=>{if(a=r===e.dom.parentElement,s=t,!a){let e=BS;e?.isEditable&&setTimeout(()=>{if(e.isDestroyed)return;let t=e.state.selection;t&&e.commands.deleteRange({from:t.from,to:t.to})},10)}return!1},paste:(e,t)=>{let n=t.clipboardData?.getData(`text/html`);return o=t,i=!!n?.includes(`data-pm-slice`),!1}}},appendTransaction:(t,n,r)=>{let s=t[0],l=s.getMeta(`uiEvent`)===`paste`&&!i,u=s.getMeta(`uiEvent`)===`drop`&&!a,d=s.getMeta(`applyPasteRules`),f=!!d;if(!l&&!u&&!f)return;if(f){let{text:t}=d;t=typeof t==`string`?t:sb(q.from(t),r.schema);let{from:n}=d,i=n+t.length,a=VS(t);return c({rule:e,state:r,from:n,to:{b:i},pasteEvt:a})}let p=n.doc.content.findDiffStart(r.doc.content),m=n.doc.content.findDiffEnd(r.doc.content);if(hS(p)&&m&&p!==m.b)return c({rule:e,state:r,from:p,to:m,pasteEvt:o})}}))}var US=class{constructor(e,t){this.splittableMarks=[],this.nonClearableMarks=[],this.decorationManager=null,this.editor=t,this.baseExtensions=e,this.extensions=Mb(e),this.hasSchemaSpec=t.options.schemaSpec!==void 0,this.schema=Ab(this.extensions,t,t.options.schemaSpec),this.setupExtensions()}get commands(){return this.extensions.reduce((e,t)=>{let n=Q(t,`addCommands`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:this.editor,type:Wb(t.name,this.schema)});return n?{...e,...n()}:e},{})}get plugins(){let{editor:e}=this,t=jb([...this.extensions].reverse()).flatMap(t=>{let n={name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Wb(t.name,this.schema)},r=[],i=Q(t,`addKeyboardShortcuts`,n),a={};if(t.type===`mark`&&Q(t,`exitable`,n)&&(a.ArrowRight=()=>IS.handleExit({editor:e,mark:t})),i){let t=Object.fromEntries(Object.entries(i()).map(([t,n])=>[t,()=>n({editor:e})]));a={...a,...t}}let o=cv(a);r.push(o);let s=Q(t,`addInputRules`,n);if(Zb(t,e.options.enableInputRules)&&s){let t=s();if(t&&t.length){let n=PS({editor:e,rules:t}),i=Array.isArray(n)?n:[n];r.push(...i)}}let c=Q(t,`addPasteRules`,n);if(Zb(t,e.options.enablePasteRules)&&c){let t=c();if(t&&t.length){let n=HS({editor:e,rules:t});r.push(...n)}}let l=Q(t,`addProseMirrorPlugins`,n);if(l){let e=l();r.push(...e)}return r}),n=this.createDecorationPlugin();return n&&t.push(n),t}createDecorationPlugin(){var e;let{editor:t}=this;(e=this.decorationManager)==null||e.destroy();let n=[];return this.extensions.forEach(e=>{let r=Q(e,`addDecorations`,{name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:t,type:Wb(e.name,this.schema)});r&&n.push({name:e.name,addDecorations:r})}),this.decorationManager=new fS({editor:t,entries:n}),this.decorationManager.plugin}get attributes(){let e=_b(this.extensions);return this.hasSchemaSpec?cb(e,this.schema):e}get nodeViews(){let{editor:e}=this,{nodeExtensions:t}=gb(this.extensions);return Object.fromEntries(t.filter(e=>!!Q(e,`addNodeView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=Q(t,`addNodeView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:Gv(t.name,this.schema)});if(!r)return[];let i=r();return i?[t.name,(r,a,o,s,c)=>{let l=wb(r,n);return i({node:r,view:a,getPos:o,decorations:s,innerDecorations:c,editor:e,extension:t,HTMLAttributes:l})}]:[]}))}dispatchTransaction(e){let{editor:t}=this;return jb([...this.extensions].reverse()).reduceRight((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Wb(n.name,this.schema)},i=Q(n,`dispatchTransaction`,r);return i?t=>{i.call(r,{transaction:t,next:e})}:e},e)}transformPastedHTML(e){let{editor:t}=this;return jb([...this.extensions]).reduce((e,n)=>{let r={name:n.name,options:n.options,storage:this.editor.extensionStorage[n.name],editor:t,type:Wb(n.name,this.schema)},i=Q(n,`transformPastedHTML`,r);return i?(t,n)=>{let a=e(t,n);return i.call(r,a)}:e},e||(e=>e))}get markViews(){let{editor:e}=this,{markExtensions:t}=gb(this.extensions);return Object.fromEntries(t.filter(e=>!!Q(e,`addMarkView`)).map(t=>{let n=this.attributes.filter(e=>e.type===t.name),r=Q(t,`addMarkView`,{name:t.name,options:t.options,storage:this.editor.extensionStorage[t.name],editor:e,type:ay(t.name,this.schema)});return r?[t.name,(i,a,o)=>{let s=wb(i,n);return r()({mark:i,view:a,inline:o,editor:e,extension:t,HTMLAttributes:s,updateAttributes:t=>{DS(i,e,t)}})}]:[]}))}destroy(){var e;(e=this.decorationManager)==null||e.destroy(),this.extensions.forEach(e=>{let t=e;for(;t.parent;){let e=t.parent;e.child===t&&(e.child=null),t=e}}),this.extensions=[],this.baseExtensions=[],this.decorationManager=null,this.schema=null,this.editor=null}setupExtensions(){let e=this.extensions;this.editor.extensionStorage=Object.fromEntries(e.map(e=>[e.name,e.storage])),e.forEach(e=>{let t={name:e.name,options:e.options,storage:this.editor.extensionStorage[e.name],editor:this.editor,type:Wb(e.name,this.schema)};e.type===`mark`&&((yb(Q(e,`keepOnSplit`,t))??!0)&&this.splittableMarks.push(e.name),(yb(Q(e,`clearable`,t))??!0)||this.nonClearableMarks.push(e.name));let n=Q(e,`onBeforeCreate`,t),r=Q(e,`onCreate`,t),i=Q(e,`onUpdate`,t),a=Q(e,`onSelectionUpdate`,t),o=Q(e,`onTransaction`,t),s=Q(e,`onFocus`,t),c=Q(e,`onBlur`,t),l=Q(e,`onDestroy`,t);n&&this.editor.on(`beforeCreate`,n),r&&this.editor.on(`create`,r),i&&this.editor.on(`update`,i),a&&this.editor.on(`selectionUpdate`,a),o&&this.editor.on(`transaction`,o),s&&this.editor.on(`focus`,s),c&&this.editor.on(`blur`,c),l&&this.editor.on(`destroy`,l)})}};US.resolve=Mb,US.sort=jb,US.flatten=ob;var WS=class e extends FS{constructor(...e){super(...e),this.type=`extension`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}},GS=WS.create({name:`clipboardTextSerializer`,addOptions(){return{blockSeparator:void 0}},addProseMirrorPlugins(){return[new Cf({key:new Ef(`clipboardTextSerializer`),props:{clipboardTextSerializer:()=>{let{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:i}=t,a=Fb(n),{blockSeparator:o}=this.options,s={...o===void 0?{}:{blockSeparator:o},textSerializers:a};return[...i.ranges].sort((e,t)=>e.$from.pos-t.$from.pos).map(({$from:e,$to:t})=>Nb(r,{from:e.pos,to:t.pos},s)).join(o??`
|
|
33
|
+
|
|
34
|
+
`)}}})]}}),KS=WS.create({name:`commands`,addCommands(){return{...Hx}}}),qS=WS.create({name:`delete`,onUpdate({transaction:e,appendedTransactions:t}){var n;let r=()=>{var n,r;if(((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null||(r=n.filterTransaction)==null?void 0:r.call(n,e))??e.getMeta(`y-sync$`))return;let i=nb(e.before,[e,...t]);Bb(i).forEach(t=>{i.mapping.mapResult(t.oldRange.from).deletedAfter&&i.mapping.mapResult(t.oldRange.to).deletedBefore&&i.before.nodesBetween(t.oldRange.from,t.oldRange.to,(n,r)=>{let a=r+n.nodeSize-2,o=t.oldRange.from<=r&&a<=t.oldRange.to;this.editor.emit(`delete`,{type:`node`,node:n,from:r,to:a,newFrom:i.mapping.map(r),newTo:i.mapping.map(a),deletedRange:t.oldRange,newRange:t.newRange,partial:!o,editor:this.editor,transaction:e,combinedTransform:i})})});let a=i.mapping;i.steps.forEach((t,n)=>{if(t instanceof nd){let r=a.slice(n).map(t.from,-1),o=a.slice(n).map(t.to),s=a.invert().map(r,-1),c=a.invert().map(o),l=r>0&&i.doc.nodeAt(r-1)?.marks.some(e=>e.eq(t.mark)),u=i.doc.nodeAt(o)?.marks.some(e=>e.eq(t.mark));this.editor.emit(`delete`,{type:`mark`,mark:t.mark,from:t.from,to:t.to,deletedRange:{from:s,to:c},newRange:{from:r,to:o},partial:!!(u||l),editor:this.editor,transaction:e,combinedTransform:i})}})};((n=this.editor.options.coreExtensionOptions)==null||(n=n.delete)==null?void 0:n.async)??!0?setTimeout(r,0):r()}}),JS=WS.create({name:`drop`,addProseMirrorPlugins(){return[new Cf({key:new Ef(`tiptapDrop`),props:{handleDrop:(e,t,n,r)=>{this.editor.emit(`drop`,{editor:this.editor,event:t,slice:n,moved:r})}}})]}}),YS=WS.create({name:`editable`,addProseMirrorPlugins(){return[new Cf({key:new Ef(`editable`),props:{editable:()=>this.editor.options.editable}})]}}),XS=new Ef(`focusEvents`),ZS=WS.create({name:`focusEvents`,addProseMirrorPlugins(){let{editor:e}=this;return[new Cf({key:XS,props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;let r=e.state.tr.setMeta(`focus`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;let r=e.state.tr.setMeta(`blur`,{event:n}).setMeta(`addToHistory`,!1);return t.dispatch(r),!1}}}})]}}),QS=WS.create({name:`keymap`,addKeyboardShortcuts(){let e=()=>this.editor.commands.first(({commands:e})=>[()=>e.undoInputRule(),()=>e.command(({tr:t})=>{let{selection:n,doc:r}=t,{empty:i,$anchor:a}=n,{pos:o,parent:s}=a,c=a.parent.isTextblock&&o>0?t.doc.resolve(o-1):a,l=c.parent.type.spec.isolating,u=a.pos-a.parentOffset,d=l&&c.parent.childCount===1?u===a.pos:Y.atStart(r).from===o;return!i||!s.type.isTextblock||s.textContent.length||!d||d&&a.parent.type.name===`paragraph`?!1:e.clearNodes()}),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()]),t=()=>this.editor.commands.first(({commands:e})=>[()=>e.deleteSelection(),()=>e.deleteCurrentNode(),()=>e.joinForward(),()=>e.selectNodeForward()]),n={Enter:()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()]),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},i={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return fy()||Fy()?i:r},addProseMirrorPlugins(){return[new Cf({key:new Ef(`clearDocument`),appendTransaction:(e,t,n)=>{if(e.some(e=>e.getMeta(`composition`)))return;let r=e.some(e=>e.docChanged)&&!t.doc.eq(n.doc),i=e.some(e=>e.getMeta(`preventClearDocument`));if(!r||i)return;let{empty:a,from:o,to:s}=t.selection,c=Y.atStart(t.doc).from,l=Y.atEnd(t.doc).to;if(a||o!==c||s!==l||!$b(n.doc))return;let u=n.tr,d=Iv({state:n,transaction:u}),{commands:f}=new Lv({editor:this.editor,state:d});if(f.clearNodes(),u.steps.length)return u}})]}}),$S=WS.create({name:`paste`,addProseMirrorPlugins(){return[new Cf({key:new Ef(`tiptapPaste`),props:{handlePaste:(e,t,n)=>{this.editor.emit(`paste`,{editor:this.editor,event:t,slice:n})}}})]}}),eC=WS.create({name:`tabindex`,addOptions(){return{value:void 0}},addProseMirrorPlugins(){return[new Cf({key:new Ef(`tabindex`),props:{attributes:()=>!this.editor.isEditable&&this.options.value===void 0?{}:{tabindex:this.options.value??`0`}}})]}}),tC=WS.create({name:`textDirection`,addOptions(){return{direction:void 0}},addGlobalAttributes(){if(!this.options.direction)return[];let{nodeExtensions:e}=gb(this.extensions);return[{types:e.filter(e=>e.name!==`text`).map(e=>e.name),attributes:{dir:{default:this.options.direction,parseHTML:e=>{let t=e.getAttribute(`dir`);return t&&(t===`ltr`||t===`rtl`||t===`auto`)?t:this.options.direction},renderHTML:e=>e.dir?{dir:e.dir}:{}}}}]},addProseMirrorPlugins(){return[new Cf({key:new Ef(`textDirection`),props:{attributes:()=>{let e=this.options.direction;return e?{dir:e}:{}}}})]}}),nC=!1;function rC(e){if(nC)return;nC=!0;let t;try{let n=sd.fromJSON(e,{from:0,to:0});if(!nx(n))return;t=n.slice.content}catch{return}t instanceof q||console.warn(`[tiptap warn]: prosemirror-model is loaded more than once. Wrapping and splitting nodes will fail. Deduplicate it in your lock file, or alias it to a single copy in your bundler.`)}var iC=class e{get name(){return this.node.type.name}constructor(e,t,n=!1,r=null){this.currentNode=null,this.actualDepth=null,this.isBlock=n,this.resolvedPos=e,this.editor=t,this.currentNode=r}get node(){return this.currentNode||this.resolvedPos.node()}get element(){return this.editor.view.domAtPos(this.pos).node}get depth(){return this.actualDepth??this.resolvedPos.depth}get pos(){return this.resolvedPos.pos}get content(){return this.node.content}set content(e){let t=this.from,n=this.to;if(this.isBlock){if(this.content.size===0){console.error(`You can’t set content on a block node. Tried to set content on ${this.name} at ${this.pos}`);return}t=this.from+1,n=this.to-1}this.editor.commands.insertContentAt({from:t,to:n},e)}get attributes(){return this.node.attrs}get textContent(){return this.node.textContent}get size(){return this.node.nodeSize}get from(){return this.isBlock?this.pos:this.resolvedPos.start(this.resolvedPos.depth)}get range(){return{from:this.from,to:this.to}}get to(){return this.isBlock?this.pos+this.size:this.resolvedPos.end(this.resolvedPos.depth)+ +!this.node.isText}get parent(){if(this.depth===0)return null;let t=this.resolvedPos.start(this.resolvedPos.depth-1),n=this.resolvedPos.doc.resolve(t);return new e(n,this.editor)}get before(){let t=this.resolvedPos.doc.resolve(this.from-(this.isBlock?1:2));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.from-3)),new e(t,this.editor)}get after(){let t=this.resolvedPos.doc.resolve(this.to+(this.isBlock?2:1));return t.depth!==this.depth&&(t=this.resolvedPos.doc.resolve(this.to+3)),new e(t,this.editor)}get children(){let t=[];return this.node.content.forEach((n,r)=>{let i=n.isBlock&&!n.isTextblock,a=n.isAtom&&!n.isText,o=n.isInline,s=this.pos+r+ +!a;if(s<0||s>this.resolvedPos.doc.nodeSize-2)return;let c=this.resolvedPos.doc.resolve(s);if(!i&&!o&&c.depth<=this.depth)return;let l=new e(c,this.editor,i,i||o?n:null);i&&(l.actualDepth=this.depth+1),t.push(l)}),t}get firstChild(){return this.children[0]||null}get lastChild(){let e=this.children;return e[e.length-1]||null}closest(e,t={}){let n=null,r=this.parent;for(;r&&!n;){if(r.node.type.name===e){if(Object.keys(t).length>0){let e=r.node.attrs,n=Object.keys(t);for(let r=0;r<n.length;r+=1){let i=n[r];if(e[i]!==t[i])break}}else n=r}r=r.parent}return n}querySelector(e,t={}){return this.querySelectorAll(e,t,!0)[0]||null}querySelectorAll(e,t={},n=!1){let r=[];if(!this.children||this.children.length===0)return r;let i=Object.keys(t);return this.children.forEach(a=>{n&&r.length>0||(a.node.type.name===e&&i.every(e=>t[e]===a.node.attrs[e])&&r.push(a),n&&r.length>0||(r=r.concat(a.querySelectorAll(e,t,n))))}),r}setAttribute(e){let{tr:t}=this.editor.state;t.setNodeMarkup(this.from,void 0,{...this.node.attrs,...e}),this.editor.view.dispatch(t)}},aC=`.ProseMirror {
|
|
35
|
+
position: relative;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.ProseMirror {
|
|
39
|
+
word-wrap: break-word;
|
|
40
|
+
white-space: pre-wrap;
|
|
41
|
+
white-space: break-spaces;
|
|
42
|
+
-webkit-font-variant-ligatures: none;
|
|
43
|
+
font-variant-ligatures: none;
|
|
44
|
+
font-feature-settings: "liga" 0; /* the above doesn't seem to work in Edge */
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ProseMirror [contenteditable="false"] {
|
|
48
|
+
white-space: normal;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.ProseMirror [contenteditable="false"] [contenteditable="true"] {
|
|
52
|
+
white-space: pre-wrap;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.ProseMirror pre {
|
|
56
|
+
white-space: pre-wrap;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
img.ProseMirror-separator {
|
|
60
|
+
display: inline !important;
|
|
61
|
+
border: none !important;
|
|
62
|
+
margin: 0 !important;
|
|
63
|
+
width: 0 !important;
|
|
64
|
+
height: 0 !important;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.ProseMirror-gapcursor {
|
|
68
|
+
display: none;
|
|
69
|
+
pointer-events: none;
|
|
70
|
+
position: absolute;
|
|
71
|
+
margin: 0;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ProseMirror-gapcursor:after {
|
|
75
|
+
content: "";
|
|
76
|
+
display: block;
|
|
77
|
+
position: absolute;
|
|
78
|
+
top: -2px;
|
|
79
|
+
width: 20px;
|
|
80
|
+
border-top: 1px solid black;
|
|
81
|
+
animation: ProseMirror-cursor-blink 1.1s steps(2, start) infinite;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@keyframes ProseMirror-cursor-blink {
|
|
85
|
+
to {
|
|
86
|
+
visibility: hidden;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.ProseMirror-hideselection *::selection {
|
|
91
|
+
background: transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.ProseMirror-hideselection *::-moz-selection {
|
|
95
|
+
background: transparent;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.ProseMirror-hideselection * {
|
|
99
|
+
caret-color: transparent;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.ProseMirror-focused .ProseMirror-gapcursor {
|
|
103
|
+
display: block;
|
|
104
|
+
}`,oC=class extends Kx{constructor(e={}){super(),this.css=null,this.className=`tiptap`,this.editorView=null,this.isFocused=!1,this.destroyed=!1,this.isInitialized=!1,this.extensionStorage={},this.instanceId=Math.random().toString(36).slice(2,9),this.hasWarnedStaleDecorationRead=!1,this.options={element:typeof document<`u`?document.createElement(`div`):null,content:``,injectCSS:!0,injectNonce:void 0,extensions:[],autofocus:!1,editable:!0,textDirection:void 0,editorProps:{},parseOptions:{},coreExtensionOptions:{},enableInputRules:!0,enablePasteRules:!0,enableCoreExtensions:!0,enableContentCheck:!1,emitContentError:!1,onBeforeCreate:()=>null,onCreate:()=>null,onMount:()=>null,onUnmount:()=>null,onUpdate:()=>null,onSelectionUpdate:()=>null,onTransaction:()=>null,onFocus:()=>null,onBlur:()=>null,onDestroy:()=>null,onContentError:({error:e})=>{throw e},onPaste:()=>null,onDrop:()=>null,onDelete:()=>null,enableExtensionDispatchTransaction:!0},this.isCapturingTransaction=!1,this.capturedTransaction=null,this.utils={getUpdatedPosition:ix,createMappablePosition:ax},this.setOptions(e),this.createExtensionManager(),this.createCommandManager(),this.createSchema(),this.on(`beforeCreate`,this.options.onBeforeCreate),this.emit(`beforeCreate`,{editor:this}),this.on(`mount`,this.options.onMount),this.on(`unmount`,this.options.onUnmount),this.on(`contentError`,this.options.onContentError),this.on(`create`,this.options.onCreate),this.on(`update`,this.options.onUpdate),this.on(`selectionUpdate`,this.options.onSelectionUpdate),this.on(`transaction`,this.options.onTransaction),this.on(`focus`,this.options.onFocus),this.on(`blur`,this.options.onBlur),this.on(`destroy`,this.options.onDestroy),this.on(`drop`,({event:e,slice:t,moved:n})=>this.options.onDrop(e,t,n)),this.on(`paste`,({event:e,slice:t})=>this.options.onPaste(e,t)),this.on(`delete`,this.options.onDelete);let t=this.createDoc();if(!this.editorState){let e=uy(t,this.options.autofocus);this.editorState=xf.create({doc:t,schema:this.schema,selection:e||void 0})}rC(this.schema),this.options.element&&this.mount(this.options.element)}mount(e){if(typeof document>`u`)throw Error(`[tiptap error]: The editor cannot be mounted because there is no 'document' defined in this environment.`);this.createView(e),this.emit(`mount`,{editor:this}),this.css&&!document.head.contains(this.css)&&document.head.appendChild(this.css),window.setTimeout(()=>{this.isDestroyed||(this.options.autofocus!==!1&&this.options.autofocus!==null&&this.commands.focus(this.options.autofocus),this.emit(`create`,{editor:this}),this.isInitialized=!0)},0)}unmount(){if(this.editorView){this.editorState=this.editorView.state;let e=this.editorView.dom;e?.editor&&delete e.editor,this.editorView.destroy()}if(this.editorView=null,this.isInitialized=!1,this.css&&!document.querySelectorAll(`.${this.className}`).length)try{typeof this.css.remove==`function`?this.css.remove():this.css.parentNode&&this.css.parentNode.removeChild(this.css)}catch(e){console.warn(`Failed to remove CSS element:`,e)}this.css=null,this.emit(`unmount`,{editor:this})}get storage(){return this.extensionStorage}get commands(){return this.commandManager.commands}chain(){return this.commandManager?this.commandManager.chain():Lv.createFakeChain()}can(){return this.commandManager?this.commandManager.can():Lv.createFallbackCan()}injectCSS(){this.options.injectCSS&&typeof document<`u`&&(this.css=mS(aC,this.options.injectNonce))}setOptions(e={}){this.options={...this.options,...e},this.editorView&&this.state&&!this.isDestroyed&&(this.options.editorProps&&this.view.setProps({...this.options.editorProps,attributes:this.getEditorViewAttributes()}),this.view.updateState(this.state))}setEditable(e,t=!0){this.setOptions({editable:e}),t&&this.emit(`update`,{editor:this,transaction:this.state.tr,appendedTransactions:[]})}get isEditable(){return this.options.editable&&this.view&&this.view.editable}get view(){return this.editorView?this.editorView:new Proxy({state:this.editorState,updateState:e=>{this.editorState=e},dispatch:e=>{this.dispatchTransaction(e)},composing:!1,dragging:null,editable:!0,isDestroyed:!1},{get:(e,t)=>{if(this.editorView)return this.editorView[t];if(t===`state`)return this.editorState;if(t in e)return Reflect.get(e,t);throw Error(`[tiptap error]: The editor view is not available. Cannot access view['${t}']. The editor may not be mounted yet.`)}})}get state(){return qx&&!this.hasWarnedStaleDecorationRead&&Gx(this)&&(this.hasWarnedStaleDecorationRead=!0,console.warn("[tiptap warn]: `editor.state` was read while decoration `create()` was running. It returns the pre-transaction document. Use the `state` argument passed to `create()` instead. Helpers like `editor.isActive()` read `editor.state` too, so pass `state` to their standalone versions instead of calling them on the editor.")),this.editorView&&(this.editorState=this.view.state),this.editorState}registerPlugin(e,t){let n=vb(t)?t(e,[...this.state.plugins]):[...this.state.plugins,e],r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}unregisterPlugin(e){if(this.isDestroyed)return;let t=this.state.plugins,n=t;if([].concat(e).forEach(e=>{let t=typeof e==`string`?`${e}$`:e.key;n=n.filter(e=>!e.key.startsWith(t))}),t.length===n.length)return;let r=this.state.reconfigure({plugins:n});return this.view.updateState(r),r}createExtensionManager(){var e,t;let n=[...this.options.enableCoreExtensions?[YS,GS.configure({blockSeparator:(e=this.options.coreExtensionOptions)==null||(e=e.clipboardTextSerializer)==null?void 0:e.blockSeparator}),KS,ZS,QS,eC.configure({value:(t=this.options.coreExtensionOptions)==null||(t=t.tabindex)==null?void 0:t.value}),JS,$S,qS,tC.configure({direction:this.options.textDirection})].filter(e=>typeof this.options.enableCoreExtensions!=`object`||this.options.enableCoreExtensions[e.name]!==!1):[],...this.options.extensions].filter(e=>[`extension`,`node`,`mark`].includes(e?.type));this.extensionManager=new US(n,this)}createCommandManager(){this.commandManager=new Lv({editor:this})}createSchema(){this.schema=this.extensionManager.schema}createDoc(){let e;try{e=$y(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:this.options.enableContentCheck})}catch(e){if(!(e instanceof Error)||![`[tiptap error]: Invalid JSON content`,`[tiptap error]: Invalid HTML content`].includes(e.message))throw e;let t=$y(this.options.content,this.schema,this.options.parseOptions,{errorOnInvalidContent:!1});return this.editorState=xf.create({doc:t,schema:this.schema,selection:uy(t,this.options.autofocus)||void 0}),this.emit(`contentError`,{editor:this,error:e,disableCollaboration:()=>{`collaboration`in this.storage&&typeof this.storage.collaboration==`object`&&this.storage.collaboration&&(this.storage.collaboration.isDisabled=!0),this.options.extensions=this.options.extensions.filter(e=>e.name!==`collaboration`),this.createExtensionManager()}}),this.editorState.doc}return e}getEditorViewAttributes(){let e=this.options.editorProps?.attributes;return vb(e)?t=>({role:`textbox`,...e(t)}):{role:`textbox`,...e}}createView(e){let{editorProps:t,enableExtensionDispatchTransaction:n}=this.options,r=t.dispatchTransaction||this.dispatchTransaction.bind(this),i=n?this.extensionManager.dispatchTransaction(r):r,a=t.transformPastedHTML,o=this.extensionManager.transformPastedHTML(a);this.editorView=new H_(e,{...t,attributes:this.getEditorViewAttributes(),dispatchTransaction:i,transformPastedHTML:o,state:this.editorState,markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews});let s=this.state.reconfigure({plugins:this.extensionManager.plugins});this.view.updateState(s),this.prependClass(),this.injectCSS();let c=this.view.dom;c.editor=this}createNodeViews(){this.view.isDestroyed||this.view.setProps({markViews:this.extensionManager.markViews,nodeViews:this.extensionManager.nodeViews})}prependClass(){this.view.dom.className=`${this.className} ${this.view.dom.className}`}captureTransaction(e){this.isCapturingTransaction=!0,e(),this.isCapturingTransaction=!1;let t=this.capturedTransaction;return this.capturedTransaction=null,t}dispatchTransaction(e){if(this.view.isDestroyed)return;if(this.isCapturingTransaction){if(!this.capturedTransaction){this.capturedTransaction=e;return}e.steps.forEach(e=>this.capturedTransaction?.step(e));return}let{state:t,transactions:n}=this.state.applyTransaction(e),r=!this.state.selection.eq(t.selection),i=n.includes(e),a=this.state;if(this.emit(`beforeTransaction`,{editor:this,transaction:e,nextState:t}),!i)return;this.view.updateState(t),this.emit(`transaction`,{editor:this,transaction:e,appendedTransactions:n.slice(1)}),r&&this.emit(`selectionUpdate`,{editor:this,transaction:e});let o=n.findLast(e=>e.getMeta(`focus`)||e.getMeta(`blur`)),s=o?.getMeta(`focus`),c=o?.getMeta(`blur`);s&&this.emit(`focus`,{editor:this,event:s.event,transaction:o}),c&&this.emit(`blur`,{editor:this,event:c.event,transaction:o}),e.getMeta(`preventUpdate`)||!n.some(e=>e.docChanged)||a.doc.eq(t.doc)||this.emit(`update`,{editor:this,transaction:e,appendedTransactions:n.slice(1)})}getAttributes(e){return Lb(this.state,e)}isActive(e,t){let n=typeof e==`string`?e:null,r=typeof e==`string`?t:e;return Jb(this.state,n,r)}getJSON(){return this.state.doc.toJSON()}getHTML(){return sb(this.state.doc.content,this.schema)}getText(e){let{blockSeparator:t=`
|
|
105
|
+
|
|
106
|
+
`,textSerializers:n={}}=e||{};return Pb(this.state.doc,{blockSeparator:t,textSerializers:{...Fb(this.schema),...n}})}get isEmpty(){return $b(this.state.doc)}destroy(){this.destroyed||(this.destroyed=!0,this.emit(`destroy`),this.unmount(),this.removeAllListeners(),this.extensionManager.destroy(),this.extensionManager=null,this.schema=null,this.commandManager=null,this.extensionStorage={})}get isDestroyed(){return this.editorView?.isDestroyed??!0}$node(e,t){return this.$doc?.querySelector(e,t)||null}$nodes(e,t){return this.$doc?.querySelectorAll(e,t)||null}$pos(e){let t=this.state.doc.resolve(e),n=e>0&&t.nodeAfter&&!t.nodeAfter.isText&&t.nodeAfter.isAtom?t.nodeAfter:null;return new iC(t,this,!1,n)}get $doc(){return this.$pos(0)}};function sC(e){return new OS({find:e.find,handler:({state:t,range:n,match:r})=>{let i=yb(e.getAttributes,void 0,r);if(i===!1||i===null)return null;let{tr:a}=t,o=r[r.length-1],s=r[0];if(o){let r=s.search(/\S/),c=n.from+s.indexOf(o),l=c+o.length;if(Vb(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>c).length)return null;l<n.to&&a.delete(l,n.to),c>n.from&&a.delete(n.from+r,c);let u=n.from+r+o.length;a.addMark(n.from+r,u,e.type.create(i||{})),a.removeStoredMark(e.type)}},undoable:e.undoable})}function cC(e){return new OS({find:e.find,handler:({state:t,range:n,match:r})=>{let i=yb(e.getAttributes,void 0,r)||{},{tr:a}=t,o=n.from,s=n.to,c=e.type.create(i);if(r[1]){let e=o+r[0].lastIndexOf(r[1]);e>s?e=s:s=e+r[1].length;let t=r[0][r[0].length-1];a.insertText(t,o+r[0].length-1),a.replaceWith(e,s,c)}else if(r[0]){let t=e.type.isInline?o:o-1;a.insert(t,e.type.create(i)).delete(a.mapping.map(o),a.mapping.map(s))}a.scrollIntoView()},undoable:e.undoable})}function lC(e){return new OS({find:e.find,handler:({state:t,range:n,match:r})=>{let i=t.doc.resolve(n.from),a=yb(e.getAttributes,void 0,r)||{};if(!i.node(-1).canReplaceWith(i.index(-1),i.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,a)},undoable:e.undoable})}function uC(e){return new OS({find:e.find,handler:({state:t,range:n,match:r,chain:i})=>{let a=yb(e.getAttributes,void 0,r)||{},o=t.tr.delete(n.from,n.to),s=o.doc.resolve(n.from).blockRange(),c=s&&gd(s,e.type,a);if(!c)return null;if(o.wrap(s,c),e.keepMarks&&e.editor){let{selection:n,storedMarks:r}=t,{splittableMarks:i}=e.editor.extensionManager,a=r||n.$to.parentOffset&&n.$from.marks();if(a){let e=a.filter(e=>i.includes(e.type.name));o.ensureMarks(e)}}if(e.keepAttributes){let t=e.type.name===`bulletList`||e.type.name===`orderedList`?`listItem`:`taskList`;i().updateAttributes(t,a).run()}let l=o.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&Od(o.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&o.join(n.from-1)},undoable:e.undoable})}var dC=class e extends FS{constructor(...e){super(...e),this.type=`node`}static create(t={}){let n=typeof t==`function`?t():t;return new e(n)}configure(e){return super.configure(e)}extend(e){let t=typeof e==`function`?e():e;return super.extend(t)}};function fC(e){return new LS({find:e.find,handler:({state:t,range:n,match:r,pasteEvent:i})=>{let a=yb(e.getAttributes,void 0,r,i);if(a===!1||a===null)return null;let{tr:o}=t,s=r[r.length-1],c=r[0],l=n.to;if(s){let i=c.search(/\S/),u=n.from+c.indexOf(s),d=u+s.length;if(Vb(n.from,n.to,t.doc).filter(t=>t.mark.type.excluded.find(n=>n===e.type&&n!==t.mark.type)).filter(e=>e.to>u).length)return null;d<n.to&&o.delete(d,n.to),u>n.from&&o.delete(n.from+i,u),l=n.from+i+s.length,o.addMark(n.from+i,l,e.type.create(a||{})),r.index!==void 0&&r.input!==void 0&&r.index+r[0].length>=r.input.length||o.removeStoredMark(e.type)}}})}var{getOwnPropertyNames:pC,getOwnPropertySymbols:mC}=Object,{hasOwnProperty:hC}=Object.prototype;function gC(e,t){return function(n,r,i){return e(n,r,i)&&t(n,r,i)}}function _C(e){return function(t,n,r){if(!t||!n||typeof t!=`object`||typeof n!=`object`)return e(t,n,r);let{cache:i}=r,a=i.get(t),o=i.get(n);if(a&&o)return a===n&&o===t;i.set(t,n),i.set(n,t);let s=e(t,n,r);return i.delete(t),i.delete(n),s}}function vC(e){return e?.[Symbol.toStringTag]}function yC(e){return pC(e).concat(mC(e))}var bC=Object.hasOwn||((e,t)=>hC.call(e,t));function xC(e,t){return e===t||!e&&!t&&e!==e&&t!==t}var SC=`__v`,CC=`__o`,wC=`_owner`,TC=64,{getOwnPropertyDescriptor:EC,keys:DC}=Object,{propertyIsEnumerable:OC}=Object.prototype,kC=EC(Object.getPrototypeOf(Int8Array.prototype),Symbol.toStringTag).get;function AC(e,t){return e.byteLength===t.byteLength&&WC(new Uint8Array(e),new Uint8Array(t))}function jC(e,t,n){let r=e.length;if(t.length!==r)return!1;for(;r-->0;)if(!n.equals(e[r],t[r],r,r,e,t,n))return!1;return!0}function MC(e,t){return e.byteLength===t.byteLength&&WC(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}function NC(e,t){return xC(e.getTime(),t.getTime())}function PC(e,t,n){if(e.name!==t.name||e.message!==t.message||e.stack!==t.stack)return!1;let r=e.cause,i=t.cause;if(r!==i&&!n.equals(r,i,`cause`,`cause`,e,t,n))return!1;let a=e.errors,o=t.errors;if(a!==o&&!n.equals(a,o,`errors`,`errors`,e,t,n))return!1;let s=DC(e),c=DC(t),l=s.length;if(!l&&!c.length)return!0;let u=0,d;for(;l-->0;)if(d=s[l],d!==`cause`&&d!==`errors`){if(d!==c[l]&&!OC.call(t,d)||!n.equals(e[d],t[d],d,d,e,t,n))return!1;++u}let f=c.length-u;return!f||f===+!!OC.call(t,`cause`)+ +!!OC.call(t,`errors`)}function FC(e,t){return e===t}function IC(e,t,n){return e.name===t.name&&e.message===t.message&&e.stack===t.stack&&BC(e,t,n)}function LC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.entries(),o,s,c=0;for(;(o=a.next())&&!o.done;){let r=t.entries(),a=!1,l=0;for(;(s=r.next())&&!s.done;){if(i[l]){l++;continue}let r=o.value,u=s.value;if(n.equals(r[0],u[0],c,l,e,t,n)&&n.equals(r[1],u[1],r[0],u[0],e,t,n)){a=i[l]=!0;break}l++}if(!a)return!1;c++}return!0}var RC=xC;function zC(e,t,n){let r=DC(e),i=DC(t),a=r.length;if(i.length!==a)return!1;let o=a<=TC,s;for(;a-->0;)if(s=r[a],!JC(e,t,s)&&(s!==i[a]&&!(o?i.includes(s):OC.call(t,s))||!n.equals(e[s],t[s],s,s,e,t,n)))return!1;return!0}function BC(e,t,n){let r=yC(e),i=r.length;if(yC(t).length!==i)return!1;let a,o,s;for(;i-->0;)if(a=r[i],!JC(e,t,a)&&(!bC(t,a)||!n.equals(e[a],t[a],a,a,e,t,n))||(o=EC(e,a),s=EC(t,a),(o||s)&&(!o||!s||o.configurable!==s.configurable||o.enumerable!==s.enumerable||o.writable!==s.writable)))return!1;return!0}function VC(e,t){return xC(e.valueOf(),t.valueOf())}function HC(e,t){return e.source===t.source&&e.flags===t.flags}function UC(e,t,n){let r=e.size;if(r!==t.size)return!1;if(!r)return!0;let i=Array(r),a=e.values(),o,s;for(;(o=a.next())&&!o.done;){let r=t.values(),a=!1,c=0;for(;(s=r.next())&&!s.done;){if(!i[c]&&n.equals(o.value,s.value,o.value,s.value,e,t,n)){a=i[c]=!0;break}c++}if(!a)return!1}return!0}function WC(e,t){let n=e.length;if(t.length!==n||e.byteOffset!==t.byteOffset)return!1;let r=kC.call(e);if(r===`Float64Array`||r===`Float32Array`||r===`Float16Array`){for(;n-->0;)if(e[n]!==t[n]&&(e[n]===e[n]||t[n]===t[n]))return!1;return!0}for(;n-->0;)if(e[n]!==t[n])return!1;return!0}function GC(e,t){return e.href===t.href||e.protocol===t.protocol&&e.username===t.username&&e.password===t.password&&e.host===t.host&&e.pathname===t.pathname&&e.hash===t.hash&&KC(e.searchParams,t.searchParams)}function KC(e,t){let n=e.toString(),r=t.toString();return n===r||qC(n)===qC(r)}function qC(e){return e.split(`&`).sort().join(`&`)}function JC(e,t,n){return(n===wC||n===CC||n===SC)&&!!(e.$$typeof||t.$$typeof)}var YC=`[object ArrayBuffer]`,XC=`[object Arguments]`,ZC=`[object Boolean]`,QC=`[object DataView]`,$C=`[object Date]`,ew=`[object Error]`,tw=`[object Map]`,nw=`[object Number]`,rw=`[object Object]`,iw=`[object RegExp]`,aw=`[object Set]`,ow=`[object String]`,sw={"[object Int8Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Int16Array]":!0,"[object Uint16Array]":!0,"[object Int32Array]":!0,"[object Uint32Array]":!0,"[object Float16Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0,"[object BigInt64Array]":!0,"[object BigUint64Array]":!0},cw=`[object URL]`,lw=Object.prototype.toString;function uw({areArrayBuffersEqual:e,areArraysEqual:t,areDataViewsEqual:n,areDatesEqual:r,areErrorsEqual:i,areFunctionsEqual:a,areMapsEqual:o,areNumbersEqual:s,areObjectsEqual:c,arePrimitiveWrappersEqual:l,areRegExpsEqual:u,areSetsEqual:d,areTypedArraysEqual:f,areUrlsEqual:p,unknownTagComparators:m}){return function(h,g,_){if(h===g)return!0;if(h==null||g==null)return!1;let v=typeof h;if(v!==typeof g)return!1;if(v!==`object`)return v===`number`?s(h,g,_):v===`function`&&a(h,g,_);let y=h.constructor;if(y!==g.constructor)return!1;if(y===Object)return c(h,g,_);if(Array.isArray(h))return t(h,g,_);if(y===Date)return r(h,g,_);if(y===RegExp)return u(h,g,_);if(y===Map)return o(h,g,_);if(y===Set)return d(h,g,_);if(y==null)return c(h,g,_);let b=lw.call(h);if(b===$C)return r(h,g,_);if(b===iw)return u(h,g,_);if(b===tw)return o(h,g,_);if(b===aw)return d(h,g,_);if(b===rw)return typeof h.then!=`function`&&typeof g.then!=`function`&&c(h,g,_);if(b===cw)return p(h,g,_);if(b===ew)return i(h,g,_);if(b===XC)return c(h,g,_);if(sw[b])return f(h,g,_);if(b===YC)return e(h,g,_);if(b===QC)return n(h,g,_);if(b===ZC||b===nw||b===ow)return l(h,g,_);if(m){let e=m[b];if(!e){let t=vC(h);t&&(e=m[t])}if(e)return e(h,g,_)}return!1}}function dw({circular:e,createCustomConfig:t,strict:n}){let r={areArrayBuffersEqual:AC,areArraysEqual:n?BC:jC,areDataViewsEqual:MC,areDatesEqual:NC,areErrorsEqual:n?IC:PC,areFunctionsEqual:FC,areMapsEqual:n?gC(LC,BC):LC,areNumbersEqual:RC,areObjectsEqual:n?BC:zC,arePrimitiveWrappersEqual:VC,areRegExpsEqual:HC,areSetsEqual:n?gC(UC,BC):UC,areTypedArraysEqual:n?gC(WC,BC):WC,areUrlsEqual:GC,unknownTagComparators:void 0};if(t&&(r=Object.assign({},r,t(r))),e){let e=_C(r.areArraysEqual),t=_C(r.areErrorsEqual),n=_C(r.areMapsEqual),i=_C(r.areObjectsEqual),a=_C(r.areSetsEqual);r=Object.assign({},r,{areArraysEqual:e,areErrorsEqual:t,areMapsEqual:n,areObjectsEqual:i,areSetsEqual:a})}return r}function fw(e){return function(t,n,r,i,a,o,s){return e(t,n,s)}}function pw({circular:e,comparator:t,createState:n,equals:r,strict:i}){if(n)return function(a,o){let{cache:s=e?new WeakMap:void 0,meta:c}=n();return t(a,o,{cache:s,equals:r,meta:c,strict:i})};if(e)return function(e,n){return t(e,n,{cache:new WeakMap,equals:r,meta:void 0,strict:i})};let a={cache:void 0,equals:r,meta:void 0,strict:i};return function(e,n){return t(e,n,a)}}hw(),hw({strict:!0});var mw=hw({circular:!0});hw({circular:!0,strict:!0}),hw({createInternalComparator:()=>xC}),hw({strict:!0,createInternalComparator:()=>xC}),hw({circular:!0,createInternalComparator:()=>xC}),hw({circular:!0,createInternalComparator:()=>xC,strict:!0});function hw(e={}){let{circular:t=!1,createInternalComparator:n,createState:r,strict:i=!1}=e,a=uw(dw(e));return pw({circular:t,comparator:a,createState:r,equals:n?n(a):fw(a),strict:i})}var gw=t((e=>{var t=c(),n=Of();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,l=t.useMemo,u=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,c){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),c!==void 0&&f.hasValue){var t=f.value;if(c(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return c!==void 0&&c(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,l=n===void 0?null:n;return[function(){return e(t())},l===null?void 0:function(){return e(l())}]},[t,n,r,c]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),u(p),p}})),_w=t(((e,t)=>{t.exports=gw()}))();function vw(e,t){if(e.isDestroyed||t.defaultPrevented||!t.cancelable||!e.isEditable||t.inputType!==`insertParagraph`&&t.inputType!==`insertLineBreak`||!fy()&&!dy())return;let n=e.view,r=n.root,i=(r.getSelection?.call(r)??n.dom.ownerDocument.getSelection())?.anchorNode,a=(i?.nodeType===1?i:i?.parentElement)?.closest(`[data-node-view-content-react]`);if(!a||!n.dom.contains(a))return;let o=n.input.lastKeyCode;o===13&&(n.input.lastKeyCode=null),n.domObserver.forceFlush(),n.domObserver.flush();let s=new KeyboardEvent(`keydown`,{key:`Enter`,code:`Enter`,keyCode:13,shiftKey:t.inputType===`insertLineBreak`,bubbles:!0,cancelable:!0});n.someProp(`handleKeyDown`,e=>e(n,s))?(t.preventDefault(),n.input.lastIOSEnter=0,clearTimeout(n.input.lastIOSEnterFallbackTimeout)):o===13&&(n.input.lastKeyCode=o)}var yw=new Ef(`reactMobileEnter`),bw=(...e)=>t=>{e.forEach(e=>{typeof e==`function`?e(t):e&&(e.current=t)})},xw=({contentComponent:e})=>{let t=(0,kf.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getServerSnapshot);return(0,W.jsx)(W.Fragment,{children:Object.values(t)})};function Sw(){let e=new Set,t={},n=!1,r=()=>{!n&&e.size&&(n=!0,queueMicrotask(()=>{n=!1,e.forEach(e=>e())}))};return{subscribe(t){return e.add(t),()=>{e.delete(t)}},getSnapshot(){return t},getServerSnapshot(){return t},setRenderer(e,n){t={...t,[e]:pl.createPortal(n.reactElement,n.element,e)},r()},removeRenderer(e){let n={...t};delete n[e],t=n,r()}}}var Cw=class extends L.Component{constructor(e){super(e),this.editorContentRef=L.createRef()}componentDidMount(){this.init()}componentDidUpdate(){this.init()}init(){let e=this.props.editor;if(e&&!e.isDestroyed&&e.view.dom?.parentNode){if(e.contentComponent)return;let t=this.editorContentRef.current;t.append(...e.view.dom.parentNode.childNodes),e.view.updateRoot(),e.setOptions({element:t}),e.contentComponent=Sw(),e.createNodeViews(),e.registerPlugin(new Cf({key:yw,props:{handleDOMEvents:{beforeinput:(t,n)=>vw(e,n)}}})),e.isEditorContentInitialized=!0,this.forceUpdate()}}componentWillUnmount(){let e=this.props.editor;if(e){e.isEditorContentInitialized=!1,e.isDestroyed||(e.unregisterPlugin(yw),e.view.setProps({nodeViews:{}})),e.contentComponent=null;try{if(!e.view.dom?.parentNode)return;let t=document.createElement(`div`);t.append(...e.view.dom.parentNode.childNodes),e.setOptions({element:t})}catch{}}}render(){let{editor:e,innerRef:t,...n}=this.props;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{ref:bw(t,this.editorContentRef),...n}),e?.contentComponent&&(0,W.jsx)(xw,{contentComponent:e.contentComponent})]})}},ww=(0,L.forwardRef)((e,t)=>{let n=L.useMemo(()=>Math.floor(Math.random()*4294967295).toString(),[e.editor]);return L.createElement(Cw,{key:n,innerRef:t,...e})}),Tw=L.memo(ww),Ew=typeof window<`u`?L.useLayoutEffect:L.useEffect,Dw=class{constructor(e){this.transactionNumber=0,this.lastTransactionNumber=0,this.subscribers=new Set,this.editor=e,this.lastSnapshot={editor:e,transactionNumber:0},this.getSnapshot=this.getSnapshot.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.watch=this.watch.bind(this),this.subscribe=this.subscribe.bind(this)}getSnapshot(){return this.transactionNumber===this.lastTransactionNumber||(this.lastTransactionNumber=this.transactionNumber,this.lastSnapshot={editor:this.editor,transactionNumber:this.transactionNumber}),this.lastSnapshot}getServerSnapshot(){return{editor:null,transactionNumber:0}}subscribe(e){return this.subscribers.add(e),()=>{this.subscribers.delete(e)}}watch(e){if(this.editor=e,this.editor){let e,t=t=>{(t?.transaction===void 0||t.transaction!==e)&&(e=t?.transaction,this.transactionNumber+=1,this.subscribers.forEach(e=>e()))},n=this.editor;return n.on(`transaction`,t),n.on(`update`,t),()=>{n.off(`transaction`,t),n.off(`update`,t)}}}};function Ow(e){let[t]=(0,L.useState)(()=>new Dw(e.editor)),n=(0,_w.useSyncExternalStoreWithSelector)(t.subscribe,t.getSnapshot,t.getServerSnapshot,e.selector,e.equalityFn??mw);return Ew(()=>t.watch(e.editor),[e.editor,t]),(0,L.useDebugValue)(n),n}var kw=typeof window>`u`,Aw=kw||!!(typeof window<`u`&&window.next),jw=class e{constructor(e){this.editor=null,this.subscriptions=new Set,this.isComponentMounted=!1,this.previousDeps=null,this.instanceId=``,this.options=e,this.subscriptions=new Set,this.setEditor(this.getInitialEditor()),this.scheduleDestroy(),this.getEditor=this.getEditor.bind(this),this.getServerSnapshot=this.getServerSnapshot.bind(this),this.subscribe=this.subscribe.bind(this),this.refreshEditorInstance=this.refreshEditorInstance.bind(this),this.scheduleDestroy=this.scheduleDestroy.bind(this),this.onRender=this.onRender.bind(this),this.createEditor=this.createEditor.bind(this)}setEditor(e){this.editor=e,this.instanceId=Math.random().toString(36).slice(2,9),this.subscriptions.forEach(e=>e())}getInitialEditor(){let e=this.options.current.immediatelyRender,t=e??!0;return(kw||Aw&&e===void 0)&&(t=!1),t?this.createEditor():null}createEditor(){return new oC({...this.options.current,onBeforeCreate:(...e)=>{var t;return(t=this.options.current).onBeforeCreate?.call(t,...e)},onBlur:(...e)=>{var t;return(t=this.options.current).onBlur?.call(t,...e)},onCreate:(...e)=>{var t;return(t=this.options.current).onCreate?.call(t,...e)},onDestroy:(...e)=>{var t;return(t=this.options.current).onDestroy?.call(t,...e)},onFocus:(...e)=>{var t;return(t=this.options.current).onFocus?.call(t,...e)},onSelectionUpdate:(...e)=>{var t;return(t=this.options.current).onSelectionUpdate?.call(t,...e)},onTransaction:(...e)=>{var t;return(t=this.options.current).onTransaction?.call(t,...e)},onUpdate:(...e)=>{var t;return(t=this.options.current).onUpdate?.call(t,...e)},onContentError:(...e)=>{var t;return(t=this.options.current).onContentError?.call(t,...e)},onDrop:(...e)=>{var t;return(t=this.options.current).onDrop?.call(t,...e)},onPaste:(...e)=>{var t;return(t=this.options.current).onPaste?.call(t,...e)},onDelete:(...e)=>{var t;return(t=this.options.current).onDelete?.call(t,...e)},onMount:(...e)=>{var t;return(t=this.options.current).onMount?.call(t,...e)},onUnmount:(...e)=>{var t;return(t=this.options.current).onUnmount?.call(t,...e)}})}getEditor(){return this.editor}getServerSnapshot(){return null}subscribe(e){return this.subscriptions.add(e),()=>{this.subscriptions.delete(e)}}static compareOptions(e,t){return Object.keys(e).every(n=>[`onCreate`,`onBeforeCreate`,`onDestroy`,`onUpdate`,`onTransaction`,`onFocus`,`onBlur`,`onSelectionUpdate`,`onContentError`,`onDrop`,`onPaste`].includes(n)?!0:n===`extensions`&&e.extensions&&t.extensions?e.extensions.length===t.extensions.length&&e.extensions.every((e,n)=>e===t.extensions?.[n]):e[n]===t[n])}onRender(t){return()=>(this.isComponentMounted=!0,clearTimeout(this.scheduledDestructionTimeout),this.editor&&!this.editor.isDestroyed&&t.length===0?e.compareOptions(this.options.current,this.editor.options)||this.editor.setOptions({...this.options.current,editable:this.editor.isEditable}):this.refreshEditorInstance(t),()=>{this.isComponentMounted=!1,this.scheduleDestroy()})}refreshEditorInstance(e){if(this.editor&&!this.editor.isDestroyed){if(this.previousDeps===null){this.previousDeps=e;return}if(this.previousDeps.length===e.length&&this.previousDeps.every((t,n)=>t===e[n]))return}this.editor&&!this.editor.isDestroyed&&this.editor.destroy(),this.setEditor(this.createEditor()),this.previousDeps=e}scheduleDestroy(){let e=this.instanceId,t=this.editor;this.scheduledDestructionTimeout=setTimeout(()=>{this.isComponentMounted&&this.instanceId===e?t&&t.setOptions(this.options.current):t&&!t.isDestroyed&&(t.destroy(),this.instanceId===e&&this.setEditor(null))},1)}};function Mw(e={},t=[]){let n=(0,L.useRef)(e);n.current=e;let[r]=(0,L.useState)(()=>new jw(n)),i=(0,kf.useSyncExternalStore)(r.subscribe,r.getEditor,r.getServerSnapshot);return(0,L.useDebugValue)(i),(0,L.useEffect)(r.onRender(t)),Ow({editor:i,selector:({transactionNumber:t})=>e.shouldRerenderOnTransaction===!1||e.shouldRerenderOnTransaction===void 0?null:e.immediatelyRender&&t===0?0:t+1}),i}var Nw=(0,L.createContext)({editor:null});Nw.Consumer;var Pw=(0,L.createContext)({onDragStart:()=>{},nodeViewContentChildren:void 0,nodeViewContentRef:()=>{}}),Fw=()=>(0,L.useContext)(Pw);L.forwardRef((e,t)=>{let{onDragStart:n}=Fw(),r=e.as||`div`;return(0,W.jsx)(r,{...e,ref:t,"data-node-view-wrapper":``,onDragStart:n,style:{whiteSpace:`normal`,...e.style}})}),L.createContext({markViewContentRef:()=>{}});var Iw=(0,L.createContext)({get editor(){throw Error(`useTiptap must be used within a <Tiptap> provider`)}});Iw.displayName=`TiptapContext`;var Lw=()=>(0,L.useContext)(Iw);function Rw({children:e,...t}){let n=`editor`in t?t.editor:t.instance;if(!n)throw Error("Tiptap: An editor instance is required. Pass a non-null `editor` prop.");let r=(0,L.useMemo)(()=>({editor:n}),[n]),i=(0,L.useMemo)(()=>({editor:n}),[n]);return(0,W.jsx)(Nw.Provider,{value:i,children:(0,W.jsx)(Iw.Provider,{value:r,children:e})})}Rw.displayName=`Tiptap`;function zw({...e}){let{editor:t}=Lw();return(0,W.jsx)(Tw,{editor:t,...e})}zw.displayName=`Tiptap.Content`,Object.assign(Rw,{Content:zw});var Bw=new WeakSet,Vw=new WeakSet;function Hw(e){let t=e;return Bw.add(t),t}function Uw(e){return Array.isArray(e)&&Bw.has(e)}function Ww(e){return e.flatMap(e=>e==null?[]:Array.isArray(e)&&Vw.has(e)&&!Uw(e)?Ww(e):[e])}function Gw(e,t){if(e===`slot`)return 0;if(e instanceof Function){let n=e(t);return Array.isArray(n)&&!Uw(n)&&!Vw.has(n)?Hw(n):n}let{children:n,...r}=t??{};if(e===`svg`)throw Error(`SVG elements are not supported in the JSX syntax, use the array syntax instead`);if(Array.isArray(n)){if(Uw(n))return Hw([e,r,n]);if(n.length===0)return Hw([e,r]);let t=Ww(n);return t.length===0?Hw([e,r]):Hw([e,r,...t])}return Hw(n==null?[e,r]:[e,r,n])}var Kw=(e,t)=>Gw(e,t),qw=(e,t)=>{let{state:n}=e,{selection:r}=n;if(!r.empty)return!1;let{$from:i}=r;if(i.parentOffset!==0)return!1;let a=i.depth-1;if(a<0)return!1;let o=i.node(a),s=i.index(a);if(s===0)return!1;if(o.type===t)return e.commands.lift(t.name);let c=o.child(s-1);if(c.type!==t||!c.lastChild?.isTextblock)return!1;let l=i.before()-1-1;return e.commands.command(({tr:e,dispatch:t})=>{if(!t)return!0;let n=i.parent.content,r=new J(n,0,0);return e.replace(l,i.after(),r),e.setSelection(X.create(e.doc,l+n.size)),e.scrollIntoView(),t(e),!0})},Jw=/^\s*>\s$/,Yw=dC.create({name:`blockquote`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,group:`block`,defining:!0,parseHTML(){return[{tag:`blockquote`}]},renderHTML({HTMLAttributes:e}){return Kw(`blockquote`,{...Cb(this.options.HTMLAttributes,e),children:Kw(`slot`,{})})},parseMarkdown:(e,t)=>{let n=t.parseBlockChildren??t.parseChildren;return t.createNode(`blockquote`,void 0,n(e.tokens||[]))},renderMarkdown:(e,t)=>{if(!e.content)return``;let n=[];return e.content.forEach((e,r)=>{let i=(t.renderChild?.call(t,e,r)??t.renderChildren([e])).split(`
|
|
107
|
+
`).map(e=>e.trim()===``?`>`:`> ${e}`);n.push(i.join(`
|
|
108
|
+
`))}),n.join(`
|
|
109
|
+
>
|
|
110
|
+
`)},addCommands(){return{setBlockquote:()=>({commands:e})=>e.wrapIn(this.name),toggleBlockquote:()=>({commands:e})=>e.toggleWrap(this.name),unsetBlockquote:()=>({commands:e})=>e.lift(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-b":()=>this.editor.commands.toggleBlockquote(),Backspace:()=>qw(this.editor,this.type)}},addInputRules(){return[uC({find:Jw,type:this.type})]}}),Xw=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))$/,Zw=/(?:^|\s)(\*\*(?!\s+\*\*)((?:[^*]+))\*\*(?!\s+\*\*))/g,Qw=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))$/,$w=/(?:^|\s)(__(?!\s+__)((?:[^_]+))__(?!\s+__))/g,eT=IS.create({name:`bold`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`strong`},{tag:`b`,getAttrs:e=>e.style.fontWeight!==`normal`&&null},{style:`font-weight=400`,clearMark:e=>e.type.name===this.name},{style:`font-weight`,getAttrs:e=>/^(bold(er)?|[5-9]\d{2,})$/.test(e)&&null}]},renderHTML({HTMLAttributes:e}){return Kw(`strong`,{...Cb(this.options.HTMLAttributes,e),children:Kw(`slot`,{})})},markdownTokenName:`strong`,parseMarkdown:(e,t)=>t.applyMark(`bold`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<strong>`,close:`</strong>`}},renderMarkdown:(e,t)=>`**${t.renderChildren(e)}**`,addCommands(){return{setBold:()=>({commands:e})=>e.setMark(this.name),toggleBold:()=>({commands:e})=>e.toggleMark(this.name),unsetBold:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-b":()=>this.editor.commands.toggleBold(),"Mod-B":()=>this.editor.commands.toggleBold()}},addInputRules(){return[sC({find:Xw,type:this.type}),sC({find:Qw,type:this.type})]},addPasteRules(){return[fC({find:Zw,type:this.type}),fC({find:$w,type:this.type})]}}),tT=e=>{let t=/`([^`]+)`(?!`)$/.exec(e);return!t||t.index>0&&e[t.index-1]==="`"?null:{index:t.index,text:t[0],replaceWith:t[1]}},nT=e=>{let t=/`([^`]+)`(?!`)/g,n=[],r;for(;(r=t.exec(e))!==null;)r.index>0&&e[r.index-1]==="`"||n.push({index:r.index,text:r[0],replaceWith:r[1]});return n};function rT(e){let t=new Set((e.match(/`+/g)||[]).map(e=>e.length)),n=1;for(;t.has(n);)n+=1;return n}var iT=IS.create({name:`code`,addOptions(){return{HTMLAttributes:{}}},excludes:`_`,code:!0,exitable:!0,parseHTML(){return[{tag:`code`}]},renderHTML({HTMLAttributes:e}){return[`code`,Cb(this.options.HTMLAttributes,e),0]},markdownTokenName:`codespan`,parseMarkdown:(e,t)=>t.applyMark(`code`,[{type:`text`,text:e.text||``}]),renderMarkdown:(e,t,n)=>{var r;if(!e.content)return``;let i=typeof(n==null||(r=n.meta)==null?void 0:r.markText)==`string`?n.meta.markText:``,a="`".repeat(rT(i)),o=i.startsWith("`")||i.endsWith("`")?` `:``;return`${a}${o}${t.renderChildren(e.content)}${o}${a}`},addCommands(){return{setCode:()=>({commands:e})=>e.setMark(this.name),toggleCode:()=>({commands:e})=>e.toggleMark(this.name),unsetCode:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-e":()=>this.editor.commands.toggleCode()}},addInputRules(){return[sC({find:tT,type:this.type})]},addPasteRules(){return[fC({find:nT,type:this.type})]}}),aT=4,oT=/^```([a-z]+)?[\s\n]$/,sT=/^~~~([a-z]+)?[\s\n]$/,cT=dC.create({name:`codeBlock`,addOptions(){return{languageClassPrefix:`language-`,exitOnTripleEnter:!0,exitOnArrowDown:!0,exitOnArrowUp:!0,defaultLanguage:null,enableTabIndentation:!1,tabSize:aT,HTMLAttributes:{}}},content:`text*`,marks:``,group:`block`,code:!0,defining:!0,addAttributes(){return{language:{default:this.options.defaultLanguage,parseHTML:e=>{let{languageClassPrefix:t}=this.options;return t&&[...e.firstElementChild?.classList||[]].filter(e=>e.startsWith(t)).map(e=>e.replace(t,``))[0]||null},rendered:!1}}},parseHTML(){return[{tag:`pre`,preserveWhitespace:`full`}]},renderHTML({node:e,HTMLAttributes:t}){return[`pre`,Cb(this.options.HTMLAttributes,t),[`code`,{class:e.attrs.language?this.options.languageClassPrefix+e.attrs.language:null},0]]},markdownTokenName:`code`,parseMarkdown:(e,t)=>e.raw?.startsWith("```")===!1&&e.raw?.startsWith(`~~~`)===!1&&e.codeBlockStyle!==`indented`?[]:t.createNode(`codeBlock`,{language:e.lang||null},e.text?[t.createTextNode(e.text)]:[]),renderMarkdown:(e,t)=>{let n=``,r=e.attrs?.language||``;return n=e.content?[`\`\`\`${r}`,t.renderChildren(e.content),"```"].join(`
|
|
111
|
+
`):`\`\`\`${r}\n\n\`\`\``,n},addCommands(){return{setCodeBlock:e=>({commands:t})=>t.setNode(this.name,e),toggleCodeBlock:e=>({commands:t})=>t.toggleNode(this.name,`paragraph`,e)}},addKeyboardShortcuts(){return{"Mod-Alt-c":()=>this.editor.commands.toggleCodeBlock(),Backspace:()=>{let{empty:e,$anchor:t}=this.editor.state.selection,n=t.pos===1;return!e||t.parent.type.name!==this.name?!1:n||!t.parent.textContent.length?this.editor.commands.clearNodes():!1},Tab:({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??aT,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;if(i.parent.type!==this.type)return!1;let o=` `.repeat(t);return a?e.commands.insertContent(o):e.commands.command(({tr:e})=>{let{from:t,to:i}=r,a=n.doc.textBetween(t,i,`
|
|
112
|
+
`,`
|
|
113
|
+
`).split(`
|
|
114
|
+
`).map(e=>o+e).join(`
|
|
115
|
+
`);return e.replaceWith(t,i,n.schema.text(a)),!0})},"Shift-Tab":({editor:e})=>{if(!this.options.enableTabIndentation)return!1;let t=this.options.tabSize??aT,{state:n}=e,{selection:r}=n,{$from:i,empty:a}=r;return i.parent.type===this.type?a?e.commands.command(({tr:e})=>{let{pos:r}=i,a=i.start(),o=i.end(),s=n.doc.textBetween(a,o,`
|
|
116
|
+
`,`
|
|
117
|
+
`).split(`
|
|
118
|
+
`),c=0,l=0,u=r-a;for(let e=0;e<s.length;e+=1){if(l+s[e].length>=u){c=e;break}l+=s[e].length+1}let d=s[c].match(/^ */)?.[0]||``,f=Math.min(d.length,t);if(f===0)return!0;let p=a;for(let e=0;e<c;e+=1)p+=s[e].length+1;return e.delete(p,p+f),r-p<=f&&e.setSelection(X.create(e.doc,p)),!0}):e.commands.command(({tr:e})=>{let{from:i,to:a}=r,o=n.doc.textBetween(i,a,`
|
|
119
|
+
`,`
|
|
120
|
+
`).split(`
|
|
121
|
+
`).map(e=>{let n=e.match(/^ */)?.[0]||``,r=Math.min(n.length,t);return e.slice(r)}).join(`
|
|
122
|
+
`);return e.replaceWith(i,a,n.schema.text(o)),!0}):!1},Enter:({editor:e})=>{if(!this.options.exitOnTripleEnter)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type)return!1;let a=r.parentOffset===r.parent.nodeSize-2,o=r.parent.textContent.endsWith(`
|
|
123
|
+
|
|
124
|
+
`);return!a||!o?!1:e.chain().command(({tr:e})=>(e.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowUp:({editor:e})=>{if(!this.options.exitOnArrowUp)return!1;let{state:t}=e,{selection:n}=t,{$from:r,empty:i}=n;if(!i||r.parent.type!==this.type||r.parentOffset!==0)return!1;let a=r.before();return a>0?!1:e.commands.insertDefaultBlock({pos:a})},ArrowDown:({editor:e})=>{if(!this.options.exitOnArrowDown)return!1;let{state:t}=e,{selection:n,doc:r}=t,{$from:i,empty:a}=n;if(!a||i.parent.type!==this.type||i.parentOffset!==i.parent.nodeSize-2)return!1;let o=i.after();return o===void 0?!1:r.nodeAt(o)?e.commands.command(({tr:e})=>(e.setSelection(Y.near(r.resolve(o))),!0)):e.commands.exitCode()}}},addInputRules(){return[lC({find:oT,type:this.type,getAttributes:e=>({language:e[1]})}),lC({find:sT,type:this.type,getAttributes:e=>({language:e[1]})})]},addProseMirrorPlugins(){return[new Cf({key:new Ef(`codeBlockVSCodeHandler`),props:{handlePaste:(e,t)=>{if(!t.clipboardData||this.editor.isActive(this.type.name))return!1;let n=t.clipboardData.getData(`text/plain`),r=t.clipboardData.getData(`vscode-editor-data`),i=(r?JSON.parse(r):void 0)?.mode;if(!n||!i)return!1;let{tr:a,schema:o}=e.state,s=o.text(n.replace(/\r\n?/g,`
|
|
125
|
+
`));return a.replaceSelectionWith(this.type.create({language:i},s)),a.selection.$from.parent.type!==this.type&&a.setSelection(X.near(a.doc.resolve(Math.max(0,a.selection.from-2)))),a.setMeta(`paste`,!0),e.dispatch(a),!0}}})]}}),lT=cT,uT=dC.create({name:`doc`,topNode:!0,content:`block+`,renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
126
|
+
|
|
127
|
+
`):``}),dT=dC.create({name:`hardBreak`,markdownTokenName:`br`,addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:`inline`,selectable:!1,linebreakReplacement:!0,parseHTML(){return[{tag:`br`}]},renderHTML({HTMLAttributes:e}){return[`br`,Cb(this.options.HTMLAttributes,e)]},renderText(){return`
|
|
128
|
+
`},renderMarkdown:()=>`
|
|
129
|
+
`,parseMarkdown:()=>({type:`hardBreak`}),addCommands(){return{setHardBreak:()=>({commands:e,chain:t,state:n,editor:r})=>e.first([()=>e.exitCode(),()=>e.command(()=>{let{selection:e,storedMarks:i}=n;if(e.$from.parent.type.spec.isolating)return!1;let{keepMarks:a}=this.options,{splittableMarks:o}=r.extensionManager,s=i||e.$to.parentOffset&&e.$from.marks();return t().insertContent({type:this.name}).command(({tr:e,dispatch:t})=>{if(t&&s&&a){let t=s.filter(e=>o.includes(e.type.name));e.ensureMarks(t)}return!0}).scrollIntoView().run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),fT=dC.create({name:`heading`,addOptions(){return{levels:[1,2,3,4,5,6],HTMLAttributes:{}}},content:`inline*`,group:`block`,defining:!0,addAttributes(){return{level:{default:1,rendered:!1}}},parseHTML(){return this.options.levels.map(e=>({tag:`h${e}`,attrs:{level:e}}))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,Cb(this.options.HTMLAttributes,t),0]},parseMarkdown(e,t){let n=e.depth||1;return this.options.levels.includes(n)?t.createNode(`heading`,{level:n},t.parseInline(e.tokens||[])):t.createNode(`paragraph`,void 0,t.parseInline(e.tokens||[]))},renderMarkdown:(e,t)=>{let n=e.attrs?.level?parseInt(e.attrs.level,10):1,r=`#`.repeat(n);return e.content?`${r} ${t.renderChildren(e.content)}`:``},addCommands(){return{setHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.setNode(this.name,e):!1,toggleHeading:e=>({commands:t})=>this.options.levels.includes(e.level)?t.toggleNode(this.name,`paragraph`,e):!1}},addKeyboardShortcuts(){return this.options.levels.reduce((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})}),{})},addInputRules(){return this.options.levels.map(e=>lC({find:RegExp(`^(#{${Math.min(...this.options.levels)},${e}})\\s$`),type:this.type,getAttributes:{level:e}}))}}),pT=dC.create({name:`horizontalRule`,addOptions(){return{HTMLAttributes:{},nextNodeType:`paragraph`}},group:`block`,parseHTML(){return[{tag:`hr`}]},renderHTML({HTMLAttributes:e}){return[`hr`,Cb(this.options.HTMLAttributes,e)]},markdownTokenName:`hr`,parseMarkdown:(e,t)=>t.createNode(`horizontalRule`),renderMarkdown:()=>`---`,addCommands(){return{setHorizontalRule:()=>({chain:e,state:t})=>{if(!pS(t,t.schema.nodes[this.name]))return!1;let{selection:n}=t,{$to:r}=n,i=e();return ex(n)?i.insertContentAt(r.pos,{type:this.name}):i.insertContent({type:this.name}),i.command(({state:e,tr:t,dispatch:n})=>{if(n){let{$to:n}=t.selection,r=n.end();if(n.nodeAfter)n.nodeAfter.isTextblock?t.setSelection(X.create(t.doc,n.pos+1)):n.nodeAfter.isBlock?t.setSelection(sf.create(t.doc,n.pos)):t.setSelection(X.create(t.doc,n.pos));else{let i=(e.schema.nodes[this.options.nextNodeType]||n.parent.type.contentMatch.defaultType)?.create();i&&(t.insert(r,i),t.setSelection(X.create(t.doc,r+1)))}t.scrollIntoView()}return!0}).run()}}},addInputRules(){return[cC({find:/^(?:---|—-|___\s|\*\*\*\s)$/,type:this.type})]}}),mT=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))$/,hT=/(?:^|\s)(\*(?!\s+\*)((?:[^*]+))\*(?!\s+\*))/g,gT=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))$/,_T=/(?:^|\s)(_(?!\s+_)((?:[^_]+))_(?!\s+_))/g,vT=IS.create({name:`italic`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`em`},{tag:`i`,getAttrs:e=>e.style.fontStyle!==`normal`&&null},{style:`font-style=normal`,clearMark:e=>e.type.name===this.name},{style:`font-style=italic`}]},renderHTML({HTMLAttributes:e}){return[`em`,Cb(this.options.HTMLAttributes,e),0]},addCommands(){return{setItalic:()=>({commands:e})=>e.setMark(this.name),toggleItalic:()=>({commands:e})=>e.toggleMark(this.name),unsetItalic:()=>({commands:e})=>e.unsetMark(this.name)}},markdownTokenName:`em`,parseMarkdown:(e,t)=>t.applyMark(`italic`,t.parseInline(e.tokens||[])),markdownOptions:{htmlReopen:{open:`<em>`,close:`</em>`}},renderMarkdown:(e,t)=>`*${t.renderChildren(e)}*`,addKeyboardShortcuts(){return{"Mod-i":()=>this.editor.commands.toggleItalic(),"Mod-I":()=>this.editor.commands.toggleItalic()}},addInputRules(){return[sC({find:mT,type:this.type}),sC({find:gT,type:this.type})]},addPasteRules(){return[fC({find:hT,type:this.type}),fC({find:_T,type:this.type})]}}),yT=`aaa1rp3bb0ott3vie4c1le2ogado5udhabi7c0ademy5centure6ountant0s9o1tor4d0s1ult4e0g1ro2tna4f0l1rica5g0akhan5ency5i0g1rbus3force5tel5kdn3l0ibaba4pay4lfinanz6state5y2sace3tom5m0azon4ericanexpress7family11x2fam3ica3sterdam8nalytics7droid5quan4z2o0l2partments8p0le4q0uarelle8r0ab1mco4chi3my2pa2t0e3s0da2ia2sociates9t0hleta5torney7u0ction5di0ble3o3spost5thor3o0s4w0s2x0a2z0ure5ba0by2idu3namex4d1k2r0celona5laycard4s5efoot5gains6seball5ketball8uhaus5yern5b0c1t1va3cg1n2d1e0ats2uty4er2rlin4st0buy5t2f1g1h0arti5i0ble3d1ke2ng0o3o1z2j1lack0friday9ockbuster8g1omberg7ue3m0s1w2n0pparibas9o0ats3ehringer8fa2m1nd2o0k0ing5sch2tik2on4t1utique6x2r0adesco6idgestone9oadway5ker3ther5ussels7s1t1uild0ers6siness6y1zz3v1w1y1z0h3ca0b1fe2l0l1vinklein9m0era3p2non3petown5ital0one8r0avan4ds2e0er0s4s2sa1e1h1ino4t0ering5holic7ba1n1re3c1d1enter4o1rn3f0a1d2g1h0anel2nel4rity4se2t2eap3intai5ristmas6ome4urch5i0priani6rcle4sco3tadel4i0c2y3k1l0aims4eaning6ick2nic1que6othing5ud3ub0med6m1n1o0ach3des3ffee4llege4ogne5m0mbank4unity6pany2re3uter5sec4ndos3struction8ulting7tact3ractors9oking4l1p2rsica5untry4pon0s4rses6pa2r0edit0card4union9icket5own3s1uise0s6u0isinella9v1w1x1y0mru3ou3z2dad1nce3ta1e1ing3sun4y2clk3ds2e0al0er2s3gree4livery5l1oitte5ta3mocrat6ntal2ist5si0gn4v2hl2iamonds6et2gital5rect0ory7scount3ver5h2y2j1k1m1np2o0cs1tor4g1mains5t1wnload7rive4tv2ubai3pont4rban5vag2r2z2earth3t2c0o2deka3u0cation8e1g1mail3erck5nergy4gineer0ing9terprises10pson4quipment8r0icsson6ni3s0q1tate5t1u0rovision8s2vents5xchange6pert3osed4ress5traspace10fage2il1rwinds6th3mily4n0s2rm0ers5shion4t3edex3edback6rrari3ero6i0delity5o2lm2nal1nce1ial7re0stone6mdale6sh0ing5t0ness6j1k1lickr3ghts4r2orist4wers5y2m1o0o0d1tball6rd1ex2sale4um3undation8x2r0ee1senius7l1ogans4ntier7tr2ujitsu5n0d2rniture7tbol5yi3ga0l0lery3o1up4me0s3p1rden4y2b0iz3d0n2e0a1nt0ing5orge5f1g0ee3h1i0ft0s3ves2ing5l0ass3e1obal2o4m0ail3bh2o1x2n1odaddy5ld0point6f2odyear5g0le4p1t1v2p1q1r0ainger5phics5tis4een3ipe3ocery4up4s1t1u0cci3ge2ide2tars5ru3w1y2hair2mburg5ngout5us3bo2dfc0bank7ealth0care8lp1sinki6re1mes5iphop4samitsu7tachi5v2k0t2m1n1ockey4ldings5iday5medepot5goods5s0ense7nda3rse3spital5t0ing5t0els3mail5use3w2r1sbc3t1u0ghes5yatt3undai7ibm2cbc2e1u2d1e0ee3fm2kano4l1m0amat4db2mo0bilien9n0c1dustries8finiti5o2g1k1stitute6urance4e4t0ernational10uit4vestments10o1piranga7q1r0ish4s0maili5t0anbul7t0au2v3jaguar4va3cb2e0ep2tzt3welry6io2ll2m0p2nj2o0bs1urg4t1y2p0morgan6rs3uegos6kaufen5ddi3e0rryhotels6properties14fh2g1h1i0a1ds2m1ndle4tchen5wi3m1n1oeln3matsu5sher5p0mg2n2r0d1ed3uokgroup8w1y0oto4z2la0caixa5mborghini8er3nd0rover6xess5salle5t0ino3robe5w0yer5b1c1ds2ease3clerc5frak4gal2o2xus4gbt3i0dl2fe0insurance9style7ghting6ke2lly3mited4o2ncoln4k2ve1ing5k1lc1p2oan0s3cker3us3l1ndon4tte1o3ve3pl0financial11r1s1t0d0a3u0ndbeck6xe1ury5v1y2ma0drid4if1son4keup4n0agement7go3p1rket0ing3s4riott5shalls7ttel5ba2c0kinsey7d1e0d0ia3et2lbourne7me1orial6n0u2rck0msd7g1h1iami3crosoft7l1ni1t2t0subishi9k1l0b1s2m0a2n1o0bi0le4da2e1i1m1nash3ey2ster5rmon3tgage6scow4to0rcycles9v0ie4p1q1r1s0d2t0n1r2u0seum3ic4v1w1x1y1z2na0b1goya4me2vy3ba2c1e0c1t0bank4flix4work5ustar5w0s2xt0direct7us4f0l2g0o2hk2i0co2ke1on3nja3ssan1y5l1o0kia3rton4w0ruz3tv4p1r0a1w2tt2u1yc2z2obi1server7ffice5kinawa6layan0group9lo3m0ega4ne1g1l0ine5oo2pen3racle3nge4g0anic5igins6saka4tsuka4t2vh3pa0ge2nasonic7ris2s1tners4s1y3y2ccw3e0t2f0izer5g1h0armacy6d1ilips5one2to0graphy6s4ysio5ics1tet2ures6d1n0g1k2oneer5zza4k1l0ace2y0station9umbing5s3m1n0c2ohl2ker3litie5rn2st3r0axi3ess3ime3o0d0uctions8f1gressive8mo2perties3y5tection8u0dential9s1t1ub2w0c2y2qa1pon3uebec3st5racing4dio4e0ad1lestate6tor2y4cipes5d0umbrella9hab3ise0n3t2liance6n0t0als5pair3ort3ublican8st0aurant8view0s5xroth6ich0ardli6oh3l1o1p2o0cks3deo3gers4om3s0vp3u0gby3hr2n2w0e2yukyu6sa0arland6fe0ty4kura4le1on3msclub4ung5ndvik0coromant12ofi4p1rl2s1ve2xo3b0i1s2c0b1haeffler7midt4olarships8ol3ule3warz5ience5ot3d1e0arch3t2cure1ity6ek2lect4ner3rvices6ven3w1x0y3fr2g1h0angrila6rp3ell3ia1ksha5oes2p0ping5uji3w3i0lk2na1gles5te3j1k0i0n2y0pe4l0ing4m0art3ile4n0cf3o0ccer3ial4ftbank4ware6hu2lar2utions7ng1y2y2pa0ce3ort2t3r0l2s1t0ada2ples4r1tebank4farm7c0group6ockholm6rage3e3ream4udio2y3yle4u0cks3pplies3y2ort5rf1gery5zuki5v1watch4iss4x1y0dney4stems6z2tab1ipei4lk2obao4rget4tamotors6r2too4x0i3c0i2d0k2eam2ch0nology8l1masek5nnis4va3f1g1h0d1eater2re6iaa2ckets5enda4ps2res2ol4j0maxx4x2k0maxx5l1m0all4n1o0day3kyo3ols3p1ray3shiba5tal3urs3wn2yota3s3r0ade1ing4ining5vel0ers0insurance16ust3v2t1ube2i1nes3shu4v0s2w1z2ua1bank3s2g1k1nicom3versity8o2ol2ps2s1y1z2va0cations7na1guard7c1e0gas3ntures6risign5mögensberater2ung14sicherung10t2g1i0ajes4deo3g1king4llas4n1p1rgin4sa1ion4va1o3laanderen9n1odka3lvo3te1ing3o2yage5u2wales2mart4ter4ng0gou5tch0es6eather0channel12b0cam3er2site5d0ding5ibo2r3f1hoswho6ien2ki2lliamhill9n0dows4e1ners6me2oodside6rk0s2ld3w2s1tc1f3xbox3erox4ihuan4n2xx2yz3yachts4hoo3maxun5ndex5e1odobashi7ga2kohama6u0tube6t1un3za0ppos4ra3ero3ip2m1one3uerich6w2`,bT=`ελ1υ2бг1ел3дети4ею2католик6ом3мкд2он1сква6онлайн5рг3рус2ф2сайт3рб3укр3қаз3հայ3ישראל5קום3ابوظبي5رامكو5لاردن4بحرين5جزائر5سعودية6عليان5مغرب5مارات5یران5بارت2زار4يتك3ھارت5تونس4سودان3رية5شبكة4عراق2ب2مان4فلسطين6قطر3كاثوليك6وم3مصر2ليسيا5وريتانيا7قع4همراه5پاکستان7ڀارت4कॉम3नेट3भारत0म्3ोत5संगठन5বাংলা5ভারত2ৰত4ਭਾਰਤ4ભારત4ଭାରତ4இந்தியா6லங்கை6சிங்கப்பூர்11భారత్5ಭಾರತ4ഭാരതം5ලංකා4คอม3ไทย3ລາວ3გე2みんな3アマゾン4クラウド4グーグル4コム2ストア3セール3ファッション6ポイント4世界2中信1国1國1文网3亚马逊3企业2佛山2信息2健康2八卦2公司1益2台湾1灣2商城1店1标2嘉里0大酒店5在线2大拿2天主教3娱乐2家電2广东2微博2慈善2我爱你3手机2招聘2政务1府2新加坡2闻2时尚2書籍2机构2淡马锡3游戏2澳門2点看2移动2组织机构4网址1店1站1络2联通2谷歌2购物2通販2集团2電訊盈科4飞利浦3食品2餐厅2香格里拉3港2닷넷1컴2삼성2한국2`,xT=`numeric`,ST=`ascii`,CT=`alpha`,wT=`asciinumeric`,TT=`alphanumeric`,ET=`domain`,DT=`emoji`,OT=`scheme`,kT=`slashscheme`,AT=`whitespace`;function jT(e,t){return e in t||(t[e]=[]),t[e]}function MT(e,t,n){t[xT]&&(t[wT]=!0,t[TT]=!0),t[ST]&&(t[wT]=!0,t[CT]=!0),t[wT]&&(t[TT]=!0),t[CT]&&(t[TT]=!0),t[TT]&&(t[ET]=!0),t[DT]&&(t[ET]=!0);for(let r in t){let t=jT(r,n);t.indexOf(e)<0&&t.push(e)}}function NT(e,t){let n={};for(let r in t)t[r].indexOf(e)>=0&&(n[r]=!0);return n}function PT(e=null){this.j={},this.jr=[],this.jd=null,this.t=e}PT.groups={},PT.prototype={accepts(){return!!this.t},go(e){let t=this,n=t.j[e];if(n)return n;for(let n=0;n<t.jr.length;n++){let r=t.jr[n][0],i=t.jr[n][1];if(i&&r.test(e))return i}return t.jd},has(e,t=!1){return t?e in this.j:!!this.go(e)},ta(e,t,n,r){for(let i=0;i<e.length;i++)this.tt(e[i],t,n,r)},tr(e,t,n,r){r||=PT.groups;let i;return t&&t.j?i=t:(i=new PT(t),n&&r&&MT(t,n,r)),this.jr.push([e,i]),i},ts(e,t,n,r){let i=this,a=e.length;if(!a)return i;for(let t=0;t<a-1;t++)i=i.tt(e[t]);return i.tt(e[a-1],t,n,r)},tt(e,t,n,r){r||=PT.groups;let i=this;if(t&&t.j)return i.j[e]=t,t;let a=t,o,s=i.go(e);return s?(o=new PT,Object.assign(o.j,s.j),o.jr.push.apply(o.jr,s.jr),o.jd=s.jd,o.t=s.t):o=new PT,a&&(r&&(o.t&&typeof o.t==`string`?MT(a,Object.assign(NT(o.t,r),n),r):n&&MT(a,n,r)),o.t=a),i.j[e]=o,o}};var FT=(e,t,n,r,i)=>e.ta(t,n,r,i),IT=(e,t,n,r,i)=>e.tr(t,n,r,i),LT=(e,t,n,r,i)=>e.ts(t,n,r,i),$=(e,t,n,r,i)=>e.tt(t,n,r,i),RT=`WORD`,zT=`UWORD`,BT=`ASCIINUMERICAL`,VT=`ALPHANUMERICAL`,HT=`LOCALHOST`,UT=`TLD`,WT=`UTLD`,GT=`SCHEME`,KT=`SLASH_SCHEME`,qT=`NUM`,JT=`WS`,YT=`NL`,XT=`OPENBRACE`,ZT=`CLOSEBRACE`,QT=`OPENBRACKET`,$T=`CLOSEBRACKET`,eE=`OPENPAREN`,tE=`CLOSEPAREN`,nE=`OPENANGLEBRACKET`,rE=`CLOSEANGLEBRACKET`,iE=`FULLWIDTHLEFTPAREN`,aE=`FULLWIDTHRIGHTPAREN`,oE=`LEFTCORNERBRACKET`,sE=`RIGHTCORNERBRACKET`,cE=`LEFTWHITECORNERBRACKET`,lE=`RIGHTWHITECORNERBRACKET`,uE=`FULLWIDTHLESSTHAN`,dE=`FULLWIDTHGREATERTHAN`,fE=`AMPERSAND`,pE=`APOSTROPHE`,mE=`ASTERISK`,hE=`AT`,gE=`BACKSLASH`,_E=`BACKTICK`,vE=`CARET`,yE=`COLON`,bE=`COMMA`,xE=`DOLLAR`,SE=`DOT`,CE=`EQUALS`,wE=`EXCLAMATION`,TE=`HYPHEN`,EE=`PERCENT`,DE=`PIPE`,OE=`PLUS`,kE=`POUND`,AE=`QUERY`,jE=`QUOTE`,ME=`FULLWIDTHMIDDLEDOT`,NE=`SEMI`,PE=`SLASH`,FE=`TILDE`,IE=`UNDERSCORE`,LE=`EMOJI`,RE=`SYM`,zE=Object.freeze({__proto__:null,ALPHANUMERICAL:VT,AMPERSAND:fE,APOSTROPHE:pE,ASCIINUMERICAL:BT,ASTERISK:mE,AT:hE,BACKSLASH:gE,BACKTICK:_E,CARET:vE,CLOSEANGLEBRACKET:rE,CLOSEBRACE:ZT,CLOSEBRACKET:$T,CLOSEPAREN:tE,COLON:yE,COMMA:bE,DOLLAR:xE,DOT:SE,EMOJI:LE,EQUALS:CE,EXCLAMATION:wE,FULLWIDTHGREATERTHAN:dE,FULLWIDTHLEFTPAREN:iE,FULLWIDTHLESSTHAN:uE,FULLWIDTHMIDDLEDOT:ME,FULLWIDTHRIGHTPAREN:aE,HYPHEN:TE,LEFTCORNERBRACKET:oE,LEFTWHITECORNERBRACKET:cE,LOCALHOST:HT,NL:YT,NUM:qT,OPENANGLEBRACKET:nE,OPENBRACE:XT,OPENBRACKET:QT,OPENPAREN:eE,PERCENT:EE,PIPE:DE,PLUS:OE,POUND:kE,QUERY:AE,QUOTE:jE,RIGHTCORNERBRACKET:sE,RIGHTWHITECORNERBRACKET:lE,SCHEME:GT,SEMI:NE,SLASH:PE,SLASH_SCHEME:KT,SYM:RE,TILDE:FE,TLD:UT,UNDERSCORE:IE,UTLD:WT,UWORD:zT,WORD:RT,WS:JT}),BE=/[a-z]/,VE=/[a-z]/i,HE=/[\u{1F000}-\u{1FAFF}\u{2600}-\u{27BF}]|\u{FE0F}/u;try{VE=RegExp(`\\p{L}`,`u`),HE=RegExp(`\\p{Emoji}`,`u`)}catch{}var UE=/\d/,WE=/\s/,GE=`\r`,KE=`
|
|
130
|
+
`,qE=`️`,JE=``,YE=``,XE=null,ZE=null;function QE(e=[]){let t={};PT.groups=t;let n=new PT;XE??=nD(yT),ZE??=nD(bT),$(n,`'`,pE),$(n,`{`,XT),$(n,`}`,ZT),$(n,`[`,QT),$(n,`]`,$T),$(n,`(`,eE),$(n,`)`,tE),$(n,`<`,nE),$(n,`>`,rE),$(n,`(`,iE),$(n,`)`,aE),$(n,`「`,oE),$(n,`」`,sE),$(n,`『`,cE),$(n,`』`,lE),$(n,`<`,uE),$(n,`>`,dE),$(n,`&`,fE),$(n,`*`,mE),$(n,`@`,hE),$(n,"`",_E),$(n,`^`,vE),$(n,`:`,yE),$(n,`,`,bE),$(n,`$`,xE),$(n,`.`,SE),$(n,`=`,CE),$(n,`!`,wE),$(n,`-`,TE),$(n,`%`,EE),$(n,`|`,DE),$(n,`+`,OE),$(n,`#`,kE),$(n,`?`,AE),$(n,`"`,jE),$(n,`/`,PE),$(n,`;`,NE),$(n,`~`,FE),$(n,`_`,IE),$(n,`\\`,gE),$(n,`・`,ME);let r=IT(n,UE,qT,{[xT]:!0});IT(r,UE,r);let i=IT(r,BE,BT,{[wT]:!0}),a=IT(r,VE,VT,{[TT]:!0}),o=IT(n,BE,RT,{[ST]:!0});IT(o,UE,i),IT(o,BE,o),IT(i,UE,i),IT(i,BE,i);let s=IT(n,VE,zT,{[CT]:!0});IT(s,BE),IT(s,UE,a),IT(s,VE,s),IT(a,UE,a),IT(a,BE),IT(a,VE,a);let c=$(n,KE,YT,{[AT]:!0}),l=$(n,GE,JT,{[AT]:!0}),u=IT(n,WE,JT,{[AT]:!0});$(n,YE,u),$(l,KE,c),$(l,YE,u),IT(l,WE,u),$(u,GE),$(u,KE),IT(u,WE,u),$(u,YE,u);let d=IT(n,HE,LE,{[DT]:!0});$(d,`#`),IT(d,HE,d),$(d,qE,d);let f=$(d,JE);$(f,`#`),IT(f,HE,d);let p=[[BE,o],[UE,i]],m=[[BE,null],[VE,s],[UE,a]];for(let e=0;e<XE.length;e++)tD(n,XE[e],UT,RT,p);for(let e=0;e<ZE.length;e++)tD(n,ZE[e],WT,zT,m);MT(UT,{tld:!0,ascii:!0},t),MT(WT,{utld:!0,alpha:!0},t),tD(n,`file`,GT,RT,p),tD(n,`mailto`,GT,RT,p),tD(n,`http`,KT,RT,p),tD(n,`https`,KT,RT,p),tD(n,`ftp`,KT,RT,p),tD(n,`ftps`,KT,RT,p),MT(GT,{scheme:!0,ascii:!0},t),MT(KT,{slashscheme:!0,ascii:!0},t),e=e.sort((e,t)=>e[0]>t[0]?1:-1);for(let t=0;t<e.length;t++){let r=e[t][0],i=e[t][1]?{[OT]:!0}:{[kT]:!0};r.indexOf(`-`)>=0?i[ET]=!0:BE.test(r)?UE.test(r)?i[wT]=!0:i[ST]=!0:i[xT]=!0,LT(n,r,r,i)}return LT(n,`localhost`,HT,{ascii:!0}),n.jd=new PT(RE),{start:n,tokens:Object.assign({groups:t},zE)}}function $E(e,t){let n=eD(t.replace(/[A-Z]/g,e=>e.toLowerCase())),r=n.length,i=[],a=0,o=0;for(;o<r;){let s=e,c=null,l=0,u=null,d=-1,f=-1;for(;o<r&&(c=s.go(n[o]));)s=c,s.accepts()?(d=0,f=0,u=s):d>=0&&(d+=n[o].length,f++),l+=n[o].length,a+=n[o].length,o++;a-=d,o-=f,l-=d,i.push({t:u.t,v:t.slice(a-l,a),s:a-l,e:a})}return i}function eD(e){let t=[],n=e.length,r=0;for(;r<n;){let i=e.charCodeAt(r),a,o=i<55296||i>56319||r+1===n||(a=e.charCodeAt(r+1))<56320||a>57343?e[r]:e.slice(r,r+2);t.push(o),r+=o.length}return t}function tD(e,t,n,r,i){let a,o=t.length;for(let n=0;n<o-1;n++){let o=t[n];e.j[o]?a=e.j[o]:(a=new PT(r),a.jr=i.slice(),e.j[o]=a),e=a}return a=new PT(n),a.jr=i.slice(),e.j[t[o-1]]=a,a}function nD(e){let t=[],n=[],r=0;for(;r<e.length;){let i=0;for(;`0123456789`.indexOf(e[r+i])>=0;)i++;if(i>0){t.push(n.join(``));for(let t=parseInt(e.substring(r,r+i),10);t>0;t--)n.pop();r+=i}else n.push(e[r]),r++}return t}var rD={defaultProtocol:`http`,events:null,format:aD,formatHref:aD,nl2br:!1,tagName:`a`,target:null,rel:null,validate:!0,truncate:1/0,className:null,attributes:null,ignoreTags:[],ignoreClasses:[],render:null};function iD(e,t=null){let n=Object.assign({},rD);e&&(n=Object.assign(n,e instanceof iD?e.o:e));let r=n.ignoreTags,i=[];for(let e=0;e<r.length;e++)i.push(r[e].toUpperCase());this.o=n,t&&(this.defaultRender=t),this.ignoreTags=i,this.ignoreClasses=n.ignoreClasses.slice()}iD.prototype={o:rD,ignoreTags:[],ignoreClasses:[],isIgnoredClass(e){if(typeof e!=`string`||this.ignoreClasses.length===0)return!1;let t=e.split(/\s+/);for(let e=0;e<t.length;e++)if(this.ignoreClasses.indexOf(t[e])>=0)return!0;return!1},defaultRender(e){return e},check(e){return this.get(`validate`,e.toString(),e)},get(e,t,n){let r=t!=null,i=this.o[e];return i&&(typeof i==`object`?(i=n.t in i?i[n.t]:rD[e],typeof i==`function`&&r&&(i=i(t,n))):typeof i==`function`&&r&&(i=i(t,n.t,n)),i)},getObj(e,t,n){let r=this.o[e];return typeof r==`function`&&t!=null&&(r=r(t,n.t,n)),r},render(e){let t=e.render(this);return(this.get(`render`,null,e)||this.defaultRender)(t,e.t,e)}};function aD(e){return e}function oD(e,t){this.t=`token`,this.v=e,this.tk=t}oD.prototype={isLink:!1,toString(){return this.v},toHref(e){return this.toString()},toFormattedString(e){let t=this.toString(),n=e.get(`truncate`,t,this),r=e.get(`format`,t,this);return n&&r.length>n?r.substring(0,n)+`…`:r},toFormattedHref(e){return e.get(`formatHref`,this.toHref(e.get(`defaultProtocol`)),this)},startIndex(){return this.tk[0].s},endIndex(){return this.tk[this.tk.length-1].e},toObject(e=rD.defaultProtocol){return{type:this.t,value:this.toString(),isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}},toFormattedObject(e){return{type:this.t,value:this.toFormattedString(e),isLink:this.isLink,href:this.toFormattedHref(e),start:this.startIndex(),end:this.endIndex()}},validate(e){return e.get(`validate`,this.toString(),this)},render(e){let t=this,n=this.toHref(e.get(`defaultProtocol`)),r=e.get(`formatHref`,n,this),i=e.get(`tagName`,n,t),a=this.toFormattedString(e),o={},s=e.get(`className`,n,t),c=e.get(`target`,n,t),l=e.get(`rel`,n,t),u=e.getObj(`attributes`,n,t),d=e.getObj(`events`,n,t);return o.href=r,s&&(o.class=s),c&&(o.target=c),l&&(o.rel=l),u&&Object.assign(o,u),{tagName:i,attributes:o,content:a,eventListeners:d}}};function sD(e,t){class n extends oD{constructor(t,n){super(t,n),this.t=e}}for(let e in t)n.prototype[e]=t[e];return n.t=e,n}var cD=sD(`email`,{isLink:!0,toHref(){return`mailto:`+this.toString()}}),lD=sD(`text`),uD=sD(`nl`),dD=sD(`url`,{isLink:!0,toHref(e=rD.defaultProtocol){return this.hasProtocol()?this.v:`${e}://${this.v}`},hasProtocol(){let e=this.tk;return e.length>=2&&e[0].t!==HT&&e[1].t===yE}}),fD=e=>new PT(e);function pD({groups:e}){let t=e.domain.concat([fE,mE,hE,gE,_E,vE,xE,CE,TE,qT,EE,DE,OE,kE,PE,RE,FE,IE]),n=[pE,yE,bE,SE,wE,EE,AE,jE,NE,nE,rE,XT,ZT,$T,QT,eE,tE,iE,aE,oE,sE,cE,lE,uE,dE],r=[fE,pE,mE,gE,_E,vE,xE,CE,TE,XT,ZT,EE,DE,OE,kE,AE,PE,RE,FE,IE],i=fD(),a=$(i,FE);FT(a,r,a),FT(a,e.domain,a);let o=fD(),s=fD(),c=fD();FT(i,e.domain,o),FT(i,e.scheme,s),FT(i,e.slashscheme,c),FT(o,r,a),FT(o,e.domain,o);let l=$(o,hE);$(a,hE,l),$(s,hE,l),$(c,hE,l);let u=$(a,SE);FT(u,r,a),FT(u,e.domain,a);let d=fD();FT(l,e.domain,d),FT(d,e.domain,d);let f=$(d,SE);FT(f,e.domain,d);let p=fD(cD);FT(f,e.tld,p),FT(f,e.utld,p),$(l,HT,p);let m=$(d,TE);$(m,TE,m),FT(m,e.domain,d),FT(p,e.domain,d),$(p,SE,f),$(p,TE,m);let h=$(o,TE),g=$(o,SE);$(h,TE,h),FT(h,e.domain,o),FT(g,r,a),FT(g,e.domain,o);let _=fD(dD);FT(g,e.tld,_),FT(g,e.utld,_),FT(_,e.domain,o),FT(_,r,a),$(_,SE,g),$(_,TE,h),$(_,hE,l);let v=$(_,yE),y=fD(dD);FT(v,e.numeric,y);let b=fD(dD),x=fD();FT(b,t,b),FT(b,n,x),FT(x,t,b),FT(x,n,x),$(_,PE,b),$(y,PE,b),$(_,AE,x),$(_,kE,b),$(y,AE,x),$(y,kE,b);let S=$(s,yE),C=$($($(c,yE),PE),PE);FT(s,e.domain,o),$(s,SE,g),$(s,TE,h),FT(c,e.domain,o),$(c,SE,g),$(c,TE,h),FT(S,e.domain,b),$(S,PE,b),$(S,AE,b),FT(C,e.domain,b),FT(C,t,b),$(C,PE,b);let w=[[XT,ZT],[QT,$T],[eE,tE],[nE,rE],[iE,aE],[oE,sE],[cE,lE],[uE,dE]];for(let e=0;e<w.length;e++){let[r,i]=w[e],a=$(b,r);$(x,r,a);let o=fD(dD);FT(a,t,o);let s=fD();FT(a,n,s),$(a,i,b),FT(o,t,o),FT(o,n,s),FT(s,t,o),FT(s,n,s),$(o,i,b),$(s,i,b)}return $(i,HT,_),$(i,YT,uD),{start:i,tokens:zE}}function mD(e,t,n){let r=n.length,i=0,a=[],o=[],s=[];for(;i<r;){let c=e,l=null,u=null,d=0,f=null,p=-1,m=[];for(;i<r&&!(l=c.go(n[i].t));)o.push(n[i++]);for(;i<r&&(u=l||c.go(n[i].t));)if(l=null,c=u,i++,d++,c.accepts())p=0,f=c,m=[];else if(p>=0&&p++,m.push(c),s[i]&&s[i].has(c))break;for(let e=0,t=i-m.length+1;e<m.length;e++,t++)(s[t]||(s[t]=new Set)).add(m[e]);if(p<0)i-=d,i<r&&(o.push(n[i]),i++);else{o.length>0&&(a.push(hD(lD,t,o)),o=[]),i-=p,d-=p;let e=f.t,r=n.slice(i-d,i);a.push(hD(e,t,r))}}return o.length>0&&a.push(hD(lD,t,o)),a}function hD(e,t,n){let r=n[0].s,i=n[n.length-1].e;return new e(t.slice(r,i),n)}var gD=typeof console<`u`&&console&&console.warn||(()=>{}),_D=`until manual call of linkify.init(). Register all schemes and plugins before invoking linkify the first time.`,vD={scanner:null,parser:null,tokenQueue:[],pluginQueue:[],customSchemes:[],initialized:!1};function yD(){return PT.groups={},vD.scanner=null,vD.parser=null,vD.tokenQueue=[],vD.pluginQueue=[],vD.customSchemes=[],vD.initialized=!1,vD}function bD(e,t=!1){if(vD.initialized&&gD(`linkifyjs: already initialized - will not register custom scheme "${e}" ${_D}`),!/^[0-9a-z]+(-[0-9a-z]+)*$/.test(e))throw Error(`linkifyjs: incorrect scheme format.
|
|
131
|
+
1. Must only contain digits, lowercase ASCII letters or "-"
|
|
132
|
+
2. Cannot start or end with "-"
|
|
133
|
+
3. "-" cannot repeat`);vD.customSchemes.push([e,t])}function xD(){vD.scanner=QE(vD.customSchemes);for(let e=0;e<vD.tokenQueue.length;e++)vD.tokenQueue[e][1]({scanner:vD.scanner});vD.parser=pD(vD.scanner.tokens);for(let e=0;e<vD.pluginQueue.length;e++)vD.pluginQueue[e][1]({scanner:vD.scanner,parser:vD.parser});return vD.initialized=!0,vD}function SD(e){return vD.initialized||xD(),mD(vD.parser.start,e,$E(vD.scanner.start,e))}SD.scan=$E;function CD(e,t=null,n=null){if(t&&typeof t==`object`){if(n)throw Error(`linkifyjs: Invalid link type ${t}; must be a string`);n=t,t=null}let r=new iD(n),i=SD(e),a=[];for(let e=0;e<i.length;e++){let n=i[e];n.isLink&&(!t||n.t===t)&&r.check(n)&&a.push(n.toFormattedObject(r))}return a}var wD=`[\0- \xA0 -\u2029 ]`,TD=new RegExp(wD),ED=RegExp(`${wD}$`),DD=RegExp(`${wD}+$`),OD=new RegExp(wD,`g`);function kD(e,t,n){let r=e.doc.resolve(t.to);if(!r.nodeBefore?.isText)return;let i=e.doc.textBetween(t.from,t.to,``,``).match(DD)?.[0];if(!i)return;let a=t.to-i.length,o=Vb(a,t.to,e.doc).filter(e=>e.mark.type===n);if(!o.length)return;let{nodeAfter:s}=r;if(s&&o.some(e=>e.mark.isInSet(s.marks)))return;let c=e.storedMarks;e.removeMark(a,t.to,n),e.setStoredMarks(c),e.selection.empty&&e.selection.from===t.to&&e.removeStoredMark(n)}function AD(e){return e.length===1?e[0].isLink:e.length===3&&e[1].isLink?[`()`,`[]`].includes(e[0].value+e[2].value):!1}function jD(e){return new Cf({key:new Ef(`autolink`),appendTransaction:(t,n,r)=>{let i=t.some(e=>e.docChanged)&&!n.doc.eq(r.doc),a=t.some(e=>e.getMeta(`preventAutolink`));if(!i||a)return;let{tr:o}=r,s=nb(n.doc,[...t]);if(!t.some(Fv)){let t=[];s.steps.forEach((e,n)=>{if(!(e instanceof sd)||!e.slice.size)return;let r=s.mapping.slice(n+1),i=r.map(e.from,1),a=r.map(e.from+e.slice.size,-1);i<a&&t.push({from:i,to:a})}),t.sort((e,t)=>t.to-e.to),t.forEach(t=>kD(o,t,e.type))}if(Bb(s).forEach(({newRange:t})=>{let n=rb(r.doc,t,e=>e.isTextblock),i,a;if(n.length>1)i=n[0],a=r.doc.textBetween(i.pos,i.pos+i.node.nodeSize,void 0,` `);else if(n.length){let e=r.doc.textBetween(t.from,t.to,` `,` `);if(!ED.test(e))return;i=n[0],a=r.doc.textBetween(i.pos,t.to,void 0,` `)}if(i&&a){let t=a.split(TD).filter(Boolean);if(t.length<=0)return!1;let n=t[t.length-1],s=i.pos+a.lastIndexOf(n);if(!n)return!1;let c=SD(n).map(t=>t.toObject(e.defaultProtocol));if(!AD(c))return!1;c.filter(e=>e.isLink).map(e=>({...e,from:s+e.start+1,to:s+e.end+1})).filter(e=>!r.schema.marks.code||!r.doc.rangeHasMark(e.from,e.to,r.schema.marks.code)).filter(t=>e.validate(t.value)).filter(t=>e.shouldAutoLink(t.value)).forEach(t=>{Vb(t.from,t.to,r.doc).some(t=>t.mark.type===e.type)||o.addMark(t.from,t.to,e.type.create({href:t.href}))})}}),o.steps.length)return o}})}function MD(e){return new Cf({key:new Ef(`handleClickLink`),props:{handleClick:(t,n,r)=>{if(r.button!==0||!t.editable)return!1;let i=null;if(r.target instanceof HTMLAnchorElement)i=r.target;else{let t=r.target;if(!t)return!1;let n=e.editor.view.dom;i=t.closest(`a`),i&&!n.contains(i)&&(i=null)}if(!i)return!1;let a=!1;if(e.enableClickSelection&&(a=e.editor.commands.extendMarkRange(e.type.name)),e.openOnClick){let n=Lb(t.state,e.type.name),r=i.href??n.href,o=i.target??n.target;r&&(window.open(r,o),a=!0)}return a}}})}var ND=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)$/,PD=/\[([^[\]]+)\]\(((?:[^\s()]|\([^\s()]*\))+)(?:\s+(?:(["'])(.*?)\3|“(.*?)”|‘(.*?)’))?\)/g;function FD(e,t){let n=0;for(let r=t-1;r>=0&&e[r]===`\\`;--r)n+=1;return n%2==1}function ID(e,t){let n=0,r=0;for(;r<t;){if(e[r]!=="`"||n===0&&FD(e,r)){r+=1;continue}let i=0;for(;r<t&&e[r]==="`";)i+=1,r+=1;n===0?n=i:i===n&&(n=0)}return n>0}function LD(e,t,n){let[,r,i]=t;return(t.index?e[t.index-1]:void 0)===`!`||FD(e,t.index??0)||ID(e,t.index??0)?!1:!!r.trim()&&n(i)}function RD(e){let[t,n,r,,i,a,o]=e,s=i??a??o;return{index:e.index??0,text:t,replaceWith:n,data:{href:r,title:s||null,markdown:!0}}}function zD(e,t){return e.index<t.index+t.text.length&&t.index<e.index+e.text.length}function BD(e){return{href:e.data?.href,title:e.data?.title??null}}function VD(e){let t=sC({find:t=>{let n=ND.exec(t);return!n||!LD(t,n,e.isAllowedHref)?null:RD(n)},type:e.type,getAttributes:BD});return new OS({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function HD(e){let t=fC({find:t=>{let n=[];for(let r of t.matchAll(PD))LD(t,r,e.isAllowedHref)&&n.push(RD(r));let r=(e.findPlainUrls?.call(e,t)??[]).filter(e=>!n.some(t=>zD(t,e)));return[...n,...r]},type:e.type,getAttributes:BD});return new LS({find:t.find,handler:e=>{let n=t.handler(e);return n!==null&&e.state.tr.steps.length&&e.match.data?.markdown&&e.state.tr.setMeta(`preventAutolink`,!0),n}})}function UD(e){return new Cf({key:new Ef(`handlePasteLink`),props:{handlePaste:(t,n,r)=>{let{shouldAutoLink:i}=e,{state:a}=t,{selection:o}=a,{empty:s}=o;if(s)return!1;let c=``;r.content.forEach(e=>{c+=e.textContent});let l=CD(c,{defaultProtocol:e.defaultProtocol}).find(e=>e.isLink&&e.value===c);return!c||!l||i!==void 0&&!i(l.value)?!1:e.editor.commands.setMark(e.type,{href:l.href})}}})}function WD(e,t){let n=[`http`,`https`,`ftp`,`ftps`,`mailto`,`tel`,`callto`,`sms`,`cid`,`xmpp`];return t&&t.forEach(e=>{let t=typeof e==`string`?e:e.scheme;t&&n.push(t)}),!e||e.replace(OD,``).match(RegExp(`^(?:(?:${n.map(e=>e.replace(/[-/\\^$*+?.()|[\]{}]/g,`\\$&`)).join(`|`)}):|[^a-z]|[a-z0-9+.\\-]+(?:[^a-z+.\\-:]|$))`,`i`))}var GD=IS.create({name:`link`,priority:1e3,keepOnSplit:!1,exitable:!0,onCreate(){this.options.validate&&!this.options.shouldAutoLink&&(this.options.shouldAutoLink=this.options.validate,console.warn("The `validate` option is deprecated. Rename to the `shouldAutoLink` option instead.")),this.options.protocols.forEach(e=>{typeof e==`string`?bD(e):bD(e.scheme,e.optionalSlashes)})},onDestroy(){yD()},inclusive(){return this.options.autolink},addOptions(){return{openOnClick:!0,enableClickSelection:!1,linkOnPaste:!0,markdownLinks:!1,autolink:!0,protocols:[],defaultProtocol:`http`,HTMLAttributes:{target:`_blank`,rel:`noopener noreferrer nofollow`,class:null},isAllowedUri:(e,t)=>!!WD(e,t.protocols),validate:e=>!!e,shouldAutoLink:e=>{let t=/^[a-z][a-z0-9+.-]*:\/\//i.test(e),n=/^[a-z][a-z0-9+.-]*:/i.test(e);if(t||n&&!e.includes(`@`))return!0;let r=(e.includes(`@`)?e.split(`@`).pop():e).split(/[/?#:]/)[0];return!(/^\d{1,3}(\.\d{1,3}){3}$/.test(r)||!/\./.test(r))}}},addAttributes(){return{href:{default:null,parseHTML(e){return e.getAttribute(`href`)}},target:{default:this.options.HTMLAttributes.target??null},rel:{default:this.options.HTMLAttributes.rel??null},class:{default:this.options.HTMLAttributes.class??null},title:{default:null}}},parseHTML(){return[{tag:`a[href]`,getAttrs:e=>{let t=e.getAttribute(`href`);return!t||!this.options.isAllowedUri(t,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:null}}]},renderHTML({HTMLAttributes:e}){return this.options.isAllowedUri(e.href,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?[`a`,Cb(this.options.HTMLAttributes,e),0]:[`a`,Cb(this.options.HTMLAttributes,{...e,href:``}),0]},markdownTokenName:`link`,parseMarkdown:(e,t)=>t.applyMark(`link`,t.parseInline(e.tokens||[]),{href:e.href,title:e.title||null}),renderMarkdown:(e,t)=>{let n=e.attrs?.href??``,r=e.attrs?.title??``,i=t.renderChildren(e);return r?`[${i}](${n} "${r}")`:`[${i}](${n})`},addCommands(){return{setLink:e=>({chain:t})=>{let{href:n}=e;return this.options.isAllowedUri(n,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?t().setMark(this.name,e).setMeta(`preventAutolink`,!0).run():!1},toggleLink:e=>({chain:t})=>{let{href:n}=e||{};return n&&!this.options.isAllowedUri(n,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})?!1:t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()},unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta(`preventAutolink`,!0).run()}},addInputRules(){return this.options.markdownLinks?[VD({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol})})]:[]},addPasteRules(){let e=e=>{let t=[];if(e){let{protocols:n,defaultProtocol:r}=this.options;CD(e,{defaultProtocol:r}).filter(e=>e.isLink&&this.options.isAllowedUri(e.value,{defaultValidate:e=>!!WD(e,n),protocols:n,defaultProtocol:r})).forEach(e=>{this.options.shouldAutoLink(e.value)&&t.push({text:e.value,data:{href:e.href},index:e.start})})}return t};return this.options.markdownLinks?[HD({type:this.type,isAllowedHref:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!WD(e,this.options.protocols),protocols:this.options.protocols,defaultProtocol:this.options.defaultProtocol}),findPlainUrls:e})]:[fC({find:e,type:this.type,getAttributes:e=>({href:e.data?.href})})]},addProseMirrorPlugins(){let e=[],{protocols:t,defaultProtocol:n}=this.options;return this.options.autolink&&e.push(jD({type:this.type,defaultProtocol:this.options.defaultProtocol,validate:e=>this.options.isAllowedUri(e,{defaultValidate:e=>!!WD(e,t),protocols:t,defaultProtocol:n}),shouldAutoLink:this.options.shouldAutoLink})),e.push(MD({type:this.type,editor:this.editor,openOnClick:this.options.openOnClick===`whenNotEditable`||this.options.openOnClick,enableClickSelection:this.options.enableClickSelection})),this.options.linkOnPaste&&e.push(UD({editor:this.editor,defaultProtocol:this.options.defaultProtocol,type:this.type,shouldAutoLink:this.options.shouldAutoLink})),e}}),KD=`listItem`,qD=`textStyle`,JD=/^\s*([-+*])\s$/,YD=dC.create({name:`bulletList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul`}]},renderHTML({HTMLAttributes:e}){return[`ul`,Cb(this.options.HTMLAttributes,e),0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>e.type!==`list`||e.ordered?[]:{type:`bulletList`,content:e.items?t.parseChildren(e.items):[]},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
134
|
+
`):``,markdownOptions:{indentsContent:!0},addCommands(){return{toggleBulletList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(KD,this.editor.getAttributes(qD)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-8":()=>this.editor.commands.toggleBulletList()}},addInputRules(){let e=uC({find:JD,type:this.type});return(this.options.keepMarks||this.options.keepAttributes)&&(e=uC({find:JD,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:()=>this.editor.getAttributes(qD),editor:this.editor})),[e]}}),XD=(e,t,n)=>{let{selection:r}=e;if(!r.empty)return null;let{$from:i}=r;if(!i.parent.isTextblock||i.parentOffset!==i.parent.content.size)return null;let a=-1;for(let e=i.depth;e>0;--e)if(i.node(e).type.name===t){a=e;break}if(a<0)return null;let o=i.node(a),s=i.index(a);if(s+1>=o.childCount)return null;let c=o.child(s+1);if(!n.includes(c.type.name))return null;let l=e.schema.nodes[t],u=!1;if(c.forEach(e=>{e.type===l&&e.childCount>1&&(u=!0)}),!u)return null;let d=e.doc.resolve(i.after()).nodeAfter;if(!d||!n.includes(d.type.name))return null;let f=[];return d.forEach(e=>{f.push(e)}),f.length===0?null:{listItemDepth:a,nestedList:d,nestedListPos:i.after(),insertPos:i.after(a),items:f}},ZD=(e,t,n,r)=>{let i=XD(e,n,r);if(!i)return!1;let{selection:a}=e,{nestedList:o,nestedListPos:s,insertPos:c,items:l}=i,u=e.tr;u.delete(s,s+o.nodeSize);let d=u.mapping.map(c);return u.insert(d,q.from(l)),u.setSelection(a.map(u.doc,u.mapping)),t&&t(u),!0},QD=(e,t,n)=>ZD(e.state,e.view.dispatch,t,n),$D=(e,t)=>WS.create({name:`${e}BranchingDeleteKeymap`,priority:101,addKeyboardShortcuts(){let n=()=>QD(this.editor,e,t);return{Delete:n,"Mod-Delete":n}}}),eO=[[1e3,`m`],[900,`cm`],[500,`d`],[400,`cd`],[100,`c`],[90,`xc`],[50,`l`],[40,`xl`],[10,`x`],[9,`ix`],[5,`v`],[4,`iv`],[1,`i`]],tO=`abcdefghijklmnopqrstuvwxyz`,nO=String.raw`\d+|[ivxlcdmIVXLCDM]+|${`[a-zA-Z]{1,2}`}`;function rO(e){let t=e,n=``;for(let[e,r]of eO)for(;t>=e;)n+=r,t-=e;return n}function iO(e){return rO(e).toUpperCase()}function aO(e){let t=e.toLowerCase(),n=0,r=0;for(;n<t.length;){let e=!1;for(let[i,a]of eO)if(t.startsWith(a,n)){r+=i,n+=a.length,e=!0;break}if(!e)return 0}return r}function oO(e){if(!/^[ivxlcdmIVXLCDM]+$/.test(e))return!1;let t=aO(e);return t<=0?!1:(e===e.toLowerCase()?rO(t):iO(t))===e}function sO(e){let t=e.toLowerCase();if(t.length===1)return t.charCodeAt(0)-97+1;if(t.length===2){let e=t.charCodeAt(0)-97,n=t.charCodeAt(1)-97;return(e+1)*26+n+1}return 0}function cO(e){if(e<=26)return tO[e-1];let t=Math.floor((e-1)/26)-1,n=(e-1)%26;return t<0?tO[n]:tO[t]+tO[n]}function lO(e){if(e&&!/^\d+$/.test(e)){if(oO(e))return e===e.toLowerCase()?`i`:`I`;if(/^[a-z]{1,2}$/.test(e))return`a`;if(/^[A-Z]{1,2}$/.test(e))return`A`}}function uO(e){if(/^\d+$/.test(e))return parseInt(e,10);let t=lO(e);if(t===`i`||t===`I`)return aO(e);if(t===`a`||t===`A`){let t=sO(e);return t>0?t:1}let n=parseInt(e,10);return Number.isNaN(n)?1:n}function dO(e,t){if(e===`numeric`)return String(t);switch(e){case`a`:return cO(t);case`A`:return cO(t).toUpperCase();case`i`:return rO(t);case`I`:return iO(t);default:return String(t)}}function fO(e){if(e.length===0)return!1;let t=lO(e[0])??`numeric`,n=uO(e[0]);if(n<1)return!1;for(let r=0;r<e.length;r++){let i=dO(t,n+r);if(e[r]!==i)return!1}return!0}function pO(e){return{type:lO(e),start:uO(e)}}function mO(e){let{type:t,start:n}=pO(e),r={};return t&&(r.type=t),n!==1&&(r.start=n),r}function hO(e,t,n=`. `){let r=t+1;if(!e||e===`1`)return`${r}${n}`;switch(e){case`a`:return`${cO(r)}${n}`;case`A`:return`${cO(r).toUpperCase()}${n}`;case`i`:return`${rO(r)}${n}`;case`I`:return`${iO(r)}${n}`;default:return`${r}${n}`}}function gO(e){return!e[0]||e[0].type===`paragraph`?e:[{type:`paragraph`,content:[]},...e]}function _O(e){let t=e.content?.[0];return t?.type===`paragraph`&&!t.content?.length}var vO=` `,yO=1,bO=e=>(e?.level??yO)>yO;function xO(e){let t=e.tokens?.[0];return!!(e.text&&e.tokens?.length===1&&t?.type===`list`&&t.ordered&&t.raw===e.text)}function SO(e,t){return t.tokenizeInline?t.parseInline(t.tokenizeInline(e)):t.parseInline([{type:`text`,raw:e,text:e}])}var CO=dC.create({name:`listItem`,addOptions(){return{HTMLAttributes:{},bulletListTypeName:`bulletList`,orderedListTypeName:`orderedList`}},content:`paragraph block*`,defining:!0,parseHTML(){return[{tag:`li`}]},renderHTML({HTMLAttributes:e}){return[`li`,Cb(this.options.HTMLAttributes,e),0]},markdownTokenName:`list_item`,parseMarkdown:(e,t)=>{if(e.type!==`list_item`)return[];let n=t.parseBlockChildren??t.parseChildren,r=[];if(e.tokens&&e.tokens.length>0){if(xO(e))return{type:`listItem`,content:[{type:`paragraph`,content:SO(e.text||``,t)}]};let[i,...a]=e.tokens;if(i.type===`heading`)return{type:`listItem`,content:[{type:`paragraph`,content:t.parseInline(i.tokens??[])},...a.length>0?n(a):[]]};if(e.tokens.some(e=>e.type===`paragraph`))r=n(e.tokens);else if(i.type===`text`&&i.tokens&&i.tokens.length>0){if(r=[{type:`paragraph`,content:t.parseInline(i.tokens)}],e.tokens.length>1){let t=n(e.tokens.slice(1));r.push(...t)}}else r=n(e.tokens)}return r.length===0&&(r=[{type:`paragraph`,content:[]}]),{type:`listItem`,content:gO(r)}},renderMarkdown:(e,t,n)=>{let r=e=>{if(e.parentType===`bulletList`)return`- `;if(e.parentType===`orderedList`){var t,n;let r=((t=e.meta)==null||(t=t.parentAttrs)==null?void 0:t.start)||1;return hO((n=e.meta)==null||(n=n.parentAttrs)==null?void 0:n.type,r-1+(e.index||0),`. `)}return`- `},i=TS(e,t,r,n,{alignNestedToPrefix:n?.parentType===`orderedList`});if(!_O(e)||!bO(n))return i;let a=r(n);return`${a}${vO}${i.slice(a.length)}`},addExtensions(){return[$D(this.name,[this.options.bulletListTypeName,this.options.orderedListTypeName])]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}),wO=(e,t)=>{let{$from:n}=t.selection,r=Gv(e,t.schema),i=null,a=n.depth,o=n.pos,s=null;for(;a>0&&s===null;)i=n.node(a),i.type===r?s=a:(--a,--o);return s===null?null:{$pos:t.doc.resolve(o),depth:s}},TO=(e,t)=>{let n=wO(e,t);if(!n)return!1;let[,r]=Hb(t,e,n.$pos.pos+4);return r},EO=(e,t,n)=>{let{$anchor:r}=e.selection,i=Math.max(0,r.pos-2),a=e.doc.resolve(i).node();return!(!a||!n.includes(a.type.name))},DO=(e,t,n)=>{if(e.commands.undoInputRule())return!0;if(e.state.selection.from!==e.state.selection.to)return!1;if(!Ry(e.state,t)&&EO(e.state,t,n)){let{$anchor:n}=e.state.selection,r=e.state.doc.resolve(n.before()-1),i=[];r.node().descendants((e,n)=>{e.type.name===t&&i.push({node:e,pos:n})});let a=i.at(-1);if(!a)return!1;let o=e.state.doc.resolve(r.start()+a.pos+1);return e.chain().command(({tr:e})=>{let t=o.end();return e.delete(n.before(),n.after()).insert(t,n.parent),e.setSelection(X.create(e.doc,t+1)),!0}).command(({state:e,dispatch:t})=>(Ff(e,t),!0)).run()}if(!Ry(e.state,t)||!Xb(e.state))return!1;let{$from:r}=e.state.selection,i=r.depth-1;return r.node(i).type!==e.schema.nodes[t]||r.index(i)!==0?!1:e.chain().liftListItem(t).run()},OO=(e,t)=>{let n=TO(e,t),r=wO(e,t);return!r||!n?!1:n>r.depth},kO=(e,t)=>{let n=TO(e,t),r=wO(e,t);return!r||!n?!1:n<r.depth},AO=(e,t)=>!Ry(e.state,t)||!Yb(e.state,t)||!e.state.selection.empty?!1:OO(t,e.state)?e.chain().focus(e.state.selection.from+4).lift(t).joinBackward().run():kO(t,e.state)?e.commands.command(({state:e,dispatch:t})=>If(e,t)):e.commands.joinItemForward(),jO=(e,t,n)=>{let{state:r}=e,{selection:i}=r;if(!i.empty)return!1;let{$from:a}=i;if(a.parentOffset!==0||!a.parent.isTextblock||Ry(r,t))return!1;let o=Ub(a);if(!o||!n.includes(o.type.name))return!1;let s=o.lastChild;if(!s||s.type.name!==t)return!1;let c=a.parent;if(!s.canReplace(s.childCount,s.childCount,q.from(c)))return!1;let l=a.before(),u=a.after(),d=l-2;return e.commands.command(({tr:e,dispatch:t})=>(t&&(e.delete(l,u).insert(d,q.from(c)),e.setSelection(X.create(e.doc,d+1)),e.scrollIntoView()),!0))},MO=WS.create({name:`listKeymap`,addOptions(){return{listTypes:[{itemName:`listItem`,wrapperNames:[`bulletList`,`orderedList`]},{itemName:`taskItem`,wrapperNames:[`taskList`]}]}},addKeyboardShortcuts(){return{Delete:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&AO(e,n)&&(t=!0)}),t},"Mod-Delete":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n})=>{e.state.schema.nodes[n]!==void 0&&AO(e,n)&&(t=!0)}),t},Backspace:({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&DO(e,n,r)&&(t=!0)}),t},"Mod-Backspace":({editor:e})=>{let t=!1;return this.options.listTypes.forEach(({itemName:n,wrapperNames:r})=>{e.state.schema.nodes[n]!==void 0&&DO(e,n,r)&&(t=!0)}),t},Tab:({editor:e})=>{for(let{itemName:t,wrapperNames:n}of this.options.listTypes)if(e.state.schema.nodes[t]!==void 0&&jO(e,t,n))return!0;return!1}}}}),NO=RegExp(`^(\\s*)(${nO})([.)])\\s+(.*)$`),PO=/^\s/,FO={heading:/^#{1,6}(?:\s|$)/,bulletItem:/^[-+*]\s+/,codeFence:/^(?:```|~~~)/,blockMath:/^\$\$/,thematicBreak:/^(?:(?:-[ \t]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})$/};function IO(e){return NO.test(e.trimStart())}function LO(e){let t=e.trimStart();return FO.bulletItem.test(t)||IO(t)||FO.heading.test(t)||FO.thematicBreak.test(t)&&!t.startsWith(`-`)||/^>\s?/.test(t)||FO.codeFence.test(t)||FO.blockMath.test(t)}function RO(e){return Object.values(FO).some(t=>t.test(e))}function zO(e){let t=[],n=[],r=!1;return e.forEach(e=>{r?n.push(e):e.trim()===``||t.length>0&&LO(e)?(r=!0,n.push(e)):t.push(e)}),{paragraphLines:t,blockLines:n}}function BO(e){let t=[],n=0,r=0;for(;n<e.length;){let i=e[n],a=i.match(NO);if(!a)break;let[,o,s,c,l]=a,u=o.length,d=parseInt(s,10),f=isNaN(d)?lO(s):void 0,p=isNaN(d)?uO(s):d,m=[l],h=n+1,g=[i],_=!1;for(;h<e.length;){let t=e[h];if(t.match(NO))break;if(t.trim()===``)g.push(t),m.push(``),_=!0,h+=1;else if(t.match(PO)){let e=t.length-t.trimStart().length,n=u+s.length+1;g.push(t),m.push(t.slice(Math.min(e,n))),h+=1}else{if(_||RO(t))break;g.push(t),m.push(t),h+=1}}t.push({indent:u,number:p,type:f,content:m.join(`
|
|
135
|
+
`).trim(),contentLines:m,raw:g.join(`
|
|
136
|
+
`)}),r=h,n=h}return[t,r]}var VO=RegExp(`^(${nO})([.)])\\s+(.+)$`);function HO(e){let t=e.split(`
|
|
137
|
+
`).filter(e=>e.trim().length>0);if(t.length===0)return null;let n=[];for(let e of t){let t=e.trim().match(VO);if(!t)return null;n.push({marker:t[1],content:t[3]})}return fO(n.map(e=>e.marker))?{type:`orderedList`,attrs:mO(n[0].marker),content:n.map(e=>({type:`listItem`,content:[{type:`paragraph`,content:[{type:`text`,text:e.content}]}]}))}:null}function UO(e,t,n){let r=[],i=0;for(;i<e.length;){let a=e[i];if(a.indent===t){let{paragraphLines:o,blockLines:s}=zO(a.contentLines),c=o.join(`
|
|
138
|
+
`).trim(),l=[];c&&l.push({type:`paragraph`,raw:c,tokens:n.inlineTokens(c)});let u=s.join(`
|
|
139
|
+
`).trim();if(u){let e=n.blockTokens(u);l.push(...e)}let d=i+1,f=[];for(;d<e.length&&e[d].indent>t;)f.push(e[d]),d+=1;if(f.length>0){let e=UO(f,Math.min(...f.map(e=>e.indent)),n);l.push({type:`list`,ordered:!0,start:f[0].number,typeMarker:f[0].type,items:e,raw:f.map(e=>e.raw).join(`
|
|
140
|
+
`)})}r.push({type:`list_item`,raw:a.raw,tokens:l}),i=d}else i+=1}return r}function WO(e,t){return e.map(e=>{if(e.type!==`list_item`)return t.parseChildren([e])[0];let n=[];return e.tokens&&e.tokens.length>0&&e.tokens.forEach(e=>{if(e.type===`paragraph`||e.type===`list`||e.type===`blockquote`||e.type===`code`)n.push(...t.parseChildren([e]));else if(e.type===`text`&&e.tokens){let r=t.parseChildren([e]);n.push({type:`paragraph`,content:r})}else{let r=t.parseChildren([e]);r.length>0&&n.push(...r)}}),{type:`listItem`,content:n}})}var GO=64;function KO(e,t){let n=[],r=0;for(;n.length<t;){let t=e.indexOf(`
|
|
141
|
+
`,r);if(t===-1)return n.push(e.slice(r)),n;n.push(e.slice(r,t)),r=t+1}return n}function qO(e){let t=e.indexOf(`
|
|
142
|
+
`),n=t===-1?e:e.slice(0,t);if(!NO.test(n))return[[],0,[]];let r=GO,i=KO(e,r),a=BO(i);for(;a[1]===i.length&&i.length===r;)r*=2,i=KO(e,r),a=BO(i);return[a[0],a[1],i]}var JO=`listItem`,YO=`textStyle`,XO=/^(\d+)\.\s$/;function ZO(e){let t=e.match(/list-style-type\s*:\s*([^;]+)/i);if(!t)return null;switch(t[1].trim().toLowerCase()){case`upper-roman`:return`I`;case`lower-roman`:return`i`;case`upper-alpha`:case`upper-latin`:return`A`;case`lower-alpha`:case`lower-latin`:return`a`;default:return null}}var QO=dC.create({name:`orderedList`,addOptions(){return{itemTypeName:`listItem`,HTMLAttributes:{},keepMarks:!1,keepAttributes:!1}},group:`block list`,content(){return`${this.options.itemTypeName}+`},addAttributes(){return{start:{default:1,parseHTML:e=>e.hasAttribute(`start`)?parseInt(e.getAttribute(`start`)||``,10):1},type:{default:null,parseHTML:e=>{let t=e.getAttribute(`type`);if(t)return t;let n=e.getAttribute(`style`);if(n){let e=ZO(n);if(e)return e}let r=e.querySelector(`li`);if(r){let e=r.getAttribute(`style`);if(e){let t=ZO(e);if(t)return t}}return null}}}},parseHTML(){return[{tag:`ol`}]},renderHTML({HTMLAttributes:e}){let{start:t,type:n,...r}=e,i=Cb(this.options.HTMLAttributes,r);return t!==1&&(i.start=t),n&&n!==`1`&&(i.type=n),[`ol`,i,0]},markdownTokenName:`list`,parseMarkdown:(e,t)=>{if(e.type!==`list`||!e.ordered)return[];let n=e.start||1,r=e.typeMarker,i=e.items?WO(e.items,t):[],a={};return n!==1&&(a.start=n),r&&(a.type=r),Object.keys(a).length>0?{type:`orderedList`,attrs:a,content:i}:{type:`orderedList`,content:i}},renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
143
|
+
`):``,markdownTokenizer:{name:`orderedList`,level:`block`,start:()=>-1,tokenize:(e,t,n)=>{let[r,i,a]=qO(e);if(r.length===0)return;let o=UO(r,r[0].indent,n);if(o.length!==0)return{type:`list`,ordered:!0,start:r[0]?.number||1,typeMarker:r[0]?.type,items:o,raw:a.slice(0,i).join(`
|
|
144
|
+
`)}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleOrderedList:()=>({commands:e,chain:t})=>this.options.keepAttributes?t().toggleList(this.name,this.options.itemTypeName,this.options.keepMarks).updateAttributes(JO,this.editor.getAttributes(YO)).run():e.toggleList(this.name,this.options.itemTypeName,this.options.keepMarks)}},addKeyboardShortcuts(){return{"Mod-Shift-7":()=>this.editor.commands.toggleOrderedList()}},addProseMirrorPlugins(){return[new Cf({props:{handlePaste:(e,t)=>{if((t.clipboardData?.getData(`text/html`))?.trim())return!1;let n=t.clipboardData?.getData(`text/plain`);if(!n)return!1;let r=HO(n);if(!r)return!1;try{let t=e.state.schema.nodeFromJSON(r),n=e.state.tr.replaceSelectionWith(t);return e.dispatch(n),!0}catch{return!1}}}})]},addInputRules(){let e=(e,t)=>(!t.attrs.type||t.attrs.type===`1`)&&t.childCount+t.attrs.start===+e[1],t=uC({find:XO,type:this.type,getAttributes:e=>({start:+e[1]}),joinPredicate:e});return(this.options.keepMarks||this.options.keepAttributes)&&(t=uC({find:XO,type:this.type,keepMarks:this.options.keepMarks,keepAttributes:this.options.keepAttributes,getAttributes:e=>({start:+e[1],...this.editor.getAttributes(YO)}),joinPredicate:e,editor:this.editor})),[t]}}),$O=/^\s*(\[([( |x])?\])\s$/,ek=`position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0`,tk=(e,t,n)=>{var r;return(n==null||(r=n.checkboxLabel)==null?void 0:r.call(n,e,t))||`Task item checkbox for ${e.textContent||`empty task item`}`},nk=dC.create({name:`taskItem`,addOptions(){return{nested:!1,HTMLAttributes:{},taskListTypeName:`taskList`,a11y:void 0}},content(){return this.options.nested?`paragraph block*`:`paragraph+`},defining:!0,addAttributes(){return{checked:{default:!1,keepOnSplit:!1,parseHTML:e=>{let t=e.getAttribute(`data-checked`);return t===``||t===`true`},renderHTML:e=>({"data-checked":e.checked})}}},parseHTML(){return[{tag:`li[data-type="${this.name}"]`,priority:51,contentElement:e=>e.querySelector(`div`)??e}]},renderHTML({node:e,HTMLAttributes:t}){return[`li`,Cb(this.options.HTMLAttributes,t,{"data-type":this.name}),[`label`,[`input`,{type:`checkbox`,checked:e.attrs.checked?`checked`:null}],[`span`]],[`div`,0]]},parseMarkdown:(e,t)=>{let n=[];if(e.tokens&&e.tokens.length>0?n.push(t.createNode(`paragraph`,{},t.parseInline(e.tokens))):e.text?n.push(t.createNode(`paragraph`,{},[t.createNode(`text`,{text:e.text})])):n.push(t.createNode(`paragraph`,{},[])),e.nestedTokens&&e.nestedTokens.length>0){let r=t.parseChildren(e.nestedTokens);n.push(...r)}return t.createNode(`taskItem`,{checked:e.checked||!1},n)},renderMarkdown:(e,t)=>TS(e,t,`- [${e.attrs?.checked?`x`:` `}] `,void 0,{indentMainContent:!0}),addExtensions(){return this.options.nested?[$D(this.name,[this.options.taskListTypeName])]:[]},addKeyboardShortcuts(){let e={Enter:()=>this.editor.commands.splitListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)};return this.options.nested?{...e,Tab:()=>this.editor.commands.sinkListItem(this.name)}:e},addNodeView(){return({node:e,HTMLAttributes:t,getPos:n,editor:r})=>{let i=document.createElement(`li`),a=document.createElement(`label`),o=document.createElement(`span`),s=document.createElement(`input`),c=document.createElement(`div`);o.style.cssText=ek;let l=e=>{let t=tk(e,e.attrs.checked,this.options.a11y);s.setAttribute(`aria-label`,t),o.textContent=t};l(e),a.contentEditable=`false`,s.type=`checkbox`,s.addEventListener(`mousedown`,e=>e.preventDefault()),s.addEventListener(`change`,t=>{if(!r.isEditable&&!this.options.onReadOnlyChecked){s.checked=!s.checked;return}let{checked:i}=t.target;r.isEditable&&typeof n==`function`&&r.chain().focus(void 0,{scrollIntoView:!1}).command(({tr:e})=>{let t=n();if(typeof t!=`number`)return!1;let r=e.doc.nodeAt(t);return e.setNodeMarkup(t,void 0,{...r?.attrs,checked:i}),!0}).run(),!r.isEditable&&this.options.onReadOnlyChecked&&(this.options.onReadOnlyChecked(e,i)||(s.checked=!s.checked))}),Object.entries(this.options.HTMLAttributes).forEach(([e,t])=>{i.setAttribute(e,t)}),i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,a.append(s,o),i.append(a,c),Object.entries(t).forEach(([e,t])=>{i.setAttribute(e,t)});let u=new Set(Object.keys(t));return{dom:i,contentDOM:c,update:e=>{if(e.type!==this.type)return!1;i.dataset.checked=e.attrs.checked,s.checked=e.attrs.checked,l(e);let t=r.extensionManager.attributes,n=wb(e,t),a=new Set(Object.keys(n)),o=this.options.HTMLAttributes;return u.forEach(e=>{a.has(e)||(e in o?i.setAttribute(e,o[e]):i.removeAttribute(e))}),Object.entries(n).forEach(([e,t])=>{t==null?e in o?i.setAttribute(e,o[e]):i.removeAttribute(e):i.setAttribute(e,t)}),u=a,!0}}}},addInputRules(){return[uC({find:$O,type:this.type,getAttributes:e=>({checked:e[e.length-1]===`x`})})]}}),rk=dC.create({name:`taskList`,addOptions(){return{itemTypeName:`taskItem`,HTMLAttributes:{}}},group:`block list`,content(){return`${this.options.itemTypeName}+`},parseHTML(){return[{tag:`ul[data-type="${this.name}"]`,priority:51}]},renderHTML({HTMLAttributes:e}){return[`ul`,Cb(this.options.HTMLAttributes,e,{"data-type":this.name}),0]},parseMarkdown:(e,t)=>t.createNode(`taskList`,{},t.parseChildren(e.items||[])),renderMarkdown:(e,t)=>e.content?t.renderChildren(e.content,`
|
|
145
|
+
`):``,markdownTokenizer:{name:`taskList`,level:`block`,start(e){let t=e.match(/^\s*[-+*]\s+\[([ xX])\]\s+/)?.index;return t===void 0?-1:t},tokenize(e,t,n){let r=e=>{let t=SS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(t){let r={type:`taskList`,raw:t.raw,items:t.items},i=e.slice(t.raw.length);return i.trim()?[r,...n.blockTokens(i)]:[r]}return n.blockTokens(e)},i=SS(e,{itemPattern:/^(\s*)([-+*])\s+\[([ xX])\]\s+(.*)$/,extractItemData:e=>({indentLevel:e[1].length,mainContent:e[4],checked:e[3].toLowerCase()===`x`}),createToken:(e,t)=>({type:`taskItem`,raw:``,mainContent:e.mainContent,indentLevel:e.indentLevel,checked:e.checked,text:e.mainContent,tokens:n.inlineTokens(e.mainContent),nestedTokens:t}),customNestedParser:r},n);if(i)return{type:`taskList`,raw:i.raw,items:i.items}}},markdownOptions:{indentsContent:!0},addCommands(){return{toggleTaskList:()=>({commands:e})=>e.toggleList(this.name,this.options.itemTypeName)}},addKeyboardShortcuts(){return{"Mod-Shift-9":()=>this.editor.commands.toggleTaskList()}}});WS.create({name:`listKit`,addExtensions(){let e=[];return this.options.bulletList!==!1&&e.push(YD.configure(this.options.bulletList)),this.options.listItem!==!1&&e.push(CO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(MO.configure(this.options.listKeymap)),this.options.orderedList!==!1&&e.push(QO.configure(this.options.orderedList)),this.options.taskItem!==!1&&e.push(nk.configure(this.options.taskItem)),this.options.taskList!==!1&&e.push(rk.configure(this.options.taskList)),e}});var ik=` `,ak=`\xA0`,ok=dC.create({name:`paragraph`,priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:`block`,content:`inline*`,parseHTML(){return[{tag:`p`}]},renderHTML({HTMLAttributes:e}){return[`p`,Cb(this.options.HTMLAttributes,e),0]},parseMarkdown:(e,t)=>{let n=e.tokens||[];if(n.length===1&&n[0].type===`image`)return t.parseChildren([n[0]]);let r=t.parseInline(n);return n.length===1&&n[0].type===`text`&&(n[0].raw===ik||n[0].text===ik||n[0].raw===ak||n[0].text===ak)&&r.length===1&&r[0].type===`text`&&(r[0].text===ik||r[0].text===ak)?t.createNode(`paragraph`,void 0,[]):t.createNode(`paragraph`,void 0,r)},renderMarkdown:(e,t,n)=>{if(!e)return``;let r=Array.isArray(e.content)?e.content:[];if(r.length===0){var i,a;let e=Array.isArray(n==null||(i=n.previousNode)==null?void 0:i.content)?n.previousNode.content:[];return(n==null||(a=n.previousNode)==null?void 0:a.type)===`paragraph`&&e.length===0?ik:``}return t.renderChildren(r)},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),sk=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))$/,ck=/(?:^|\s)(~~(?!\s+~~)((?:[^~]+))~~(?!\s+~~))/g,lk=IS.create({name:`strike`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`s`},{tag:`del`},{tag:`strike`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`line-through`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`s`,Cb(this.options.HTMLAttributes,e),0]},markdownTokenName:`del`,parseMarkdown:(e,t)=>t.applyMark(`strike`,t.parseInline(e.tokens||[])),renderMarkdown:(e,t)=>`~~${t.renderChildren(e)}~~`,addCommands(){return{setStrike:()=>({commands:e})=>e.setMark(this.name),toggleStrike:()=>({commands:e})=>e.toggleMark(this.name),unsetStrike:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-Shift-s":()=>this.editor.commands.toggleStrike()}},addInputRules(){return[sC({find:sk,type:this.type})]},addPasteRules(){return[fC({find:ck,type:this.type})]}}),uk=dC.create({name:`text`,group:`inline`,parseMarkdown:e=>({type:`text`,text:e.text||``}),renderMarkdown:e=>e.text||``}),dk=IS.create({name:`underline`,addOptions(){return{HTMLAttributes:{}}},parseHTML(){return[{tag:`u`},{style:`text-decoration`,consuming:!1,getAttrs:e=>e.includes(`underline`)?{}:!1}]},renderHTML({HTMLAttributes:e}){return[`u`,Cb(this.options.HTMLAttributes,e),0]},parseMarkdown(e,t){return t.applyMark(this.name||`underline`,t.parseInline(e.tokens||[]))},renderMarkdown(e,t){return`<u>${t.renderChildren(e)}</u>`},markdownTokenizer:{name:`underline`,level:`inline`,start(e){return e.toLowerCase().indexOf(`<u>`)},tokenize(e,t,n){if(!/^<u>/i.test(e))return;let r=/\\[\s\S]|`+|<\/u>/gi;r.lastIndex=3;let i=r.exec(e);for(;i;){if(i[0].startsWith("`")){let t=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/.exec(e.slice(i.index));t&&(r.lastIndex=i.index+t[0].length)}else if(!i[0].startsWith(`\\`)){let t=e.slice(3,i.index);return t?{type:`underline`,raw:e.slice(0,r.lastIndex),text:t,tokens:n.inlineTokens(t)}:void 0}i=r.exec(e)}}},addCommands(){return{setUnderline:()=>({commands:e})=>e.setMark(this.name),toggleUnderline:()=>({commands:e})=>e.toggleMark(this.name),unsetUnderline:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-u":()=>this.editor.commands.toggleUnderline(),"Mod-U":()=>this.editor.commands.toggleUnderline()}}});function fk(e={}){return new Cf({view(t){return new pk(t,e)}})}var pk=class{constructor(e,t){this.editorView=e,this.cursorPos=null,this.element=null,this.timeout=-1,this.lastDragEvent=null,this.width=t.width??1,this.color=t.color===!1?void 0:t.color||`black`,this.class=t.class,this.handlers=[`dragover`,`dragend`,`drop`,`dragleave`].map(t=>{let n=e=>{this[t](e)};return e.dom.addEventListener(t,n),{name:t,handler:n}})}destroy(){this.setCursor(null),this.handlers.forEach(({name:e,handler:t})=>this.editorView.dom.removeEventListener(e,t))}update(e,t){if(this.cursorPos!=null&&t.doc!=e.state.doc){if(this.lastDragEvent){let e=this.computeTarget(this.lastDragEvent);e==this.cursorPos?this.updateOverlay():this.setCursor(e)}else this.updateOverlay()}}setCursor(e){e!=this.cursorPos&&(this.cursorPos=e,e==null?(this.element.parentNode.removeChild(this.element),this.element=null):this.updateOverlay())}updateOverlay(){let e=this.editorView.state.doc.resolve(this.cursorPos),t=!e.parent.inlineContent,n,r=this.editorView.dom,i=r.getBoundingClientRect(),a=i.width/r.offsetWidth,o=i.height/r.offsetHeight;if(t){let t=e.nodeBefore,r=e.nodeAfter;if(t||r){let e=this.editorView.nodeDOM(this.cursorPos-(t?t.nodeSize:0));if(e){let i=e.getBoundingClientRect(),a=t?i.bottom:i.top;t&&r&&(a=(a+this.editorView.nodeDOM(this.cursorPos).getBoundingClientRect().top)/2);let s=this.width/2*o;n={left:i.left,right:i.right,top:a-s,bottom:a+s}}}}if(!n){let e=this.editorView.coordsAtPos(this.cursorPos),t=this.width/2*a;n={left:e.left-t,right:e.left+t,top:e.top,bottom:e.bottom}}let s=this.editorView.dom.offsetParent;this.element||(this.element=s.appendChild(document.createElement(`div`)),this.class&&(this.element.className=this.class),this.element.style.cssText=`position: absolute; z-index: 50; pointer-events: none;`,this.color&&(this.element.style.backgroundColor=this.color)),this.element.classList.toggle(`prosemirror-dropcursor-block`,t),this.element.classList.toggle(`prosemirror-dropcursor-inline`,!t);let c,l;if(!s||s==document.body&&getComputedStyle(s).position==`static`)c=-pageXOffset,l=-pageYOffset;else{let e=s.getBoundingClientRect(),t=e.width/s.offsetWidth,n=e.height/s.offsetHeight;c=e.left-s.scrollLeft*t,l=e.top-s.scrollTop*n}this.element.style.left=(n.left-c)/a+`px`,this.element.style.top=(n.top-l)/o+`px`,this.element.style.width=(n.right-n.left)/a+`px`,this.element.style.height=(n.bottom-n.top)/o+`px`}scheduleRemoval(e){clearTimeout(this.timeout),this.timeout=setTimeout(()=>this.setCursor(null),e)}computeTarget(e){let t=this.editorView.posAtCoords({left:e.clientX,top:e.clientY}),n=t&&t.inside>=0&&this.editorView.state.doc.nodeAt(t.inside),r=n&&n.type.spec.disableDropCursor,i=typeof r==`function`?r(this.editorView,t,e):r;if(!t||i)return null;let a=t.pos;if(this.editorView.dragging&&this.editorView.dragging.slice){let e=Pd(this.editorView.state.doc,a,this.editorView.dragging.slice);e!=null&&(a=e)}return a}dragover(e){if(!this.editorView.editable)return;this.lastDragEvent=e;let t=this.computeTarget(e);t!=null&&(this.setCursor(t),this.scheduleRemoval(5e3))}dragend(){this.scheduleRemoval(20)}drop(){this.scheduleRemoval(20)}dragleave(e){this.editorView.dom.contains(e.relatedTarget)||this.setCursor(null)}},mk=class e extends Y{constructor(e){super(e,e)}map(t,n){let r=t.resolve(n.map(this.head));return e.valid(r)?new e(r):Y.near(r)}content(){return J.empty}eq(t){return t instanceof e&&t.head==this.head}toJSON(){return{type:`gapcursor`,pos:this.head}}static fromJSON(t,n){if(typeof n.pos!=`number`)throw RangeError(`Invalid input for GapCursor.fromJSON`);return new e(t.resolve(n.pos))}getBookmark(){return new hk(this.anchor)}static valid(e){let t=e.parent;if(t.inlineContent||!_k(e)||!vk(e))return!1;let n=t.type.spec.allowGapCursor;if(n!=null)return n;let r=t.contentMatchAt(e.index()).defaultType;return r&&r.isTextblock}static findGapCursorFrom(t,n,r=!1){search:for(;;){if(!r&&e.valid(t))return t;let i=t.pos,a=null;for(let r=t.depth;;r--){let o=t.node(r);if(n>0?t.indexAfter(r)<o.childCount:t.index(r)>0){a=o.child(n>0?t.indexAfter(r):t.index(r)-1);break}if(r==0)return null;i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}for(;;){let o=n>0?a.firstChild:a.lastChild;if(!o){if(a.isAtom&&!a.isText&&!sf.isSelectable(a)){t=t.doc.resolve(i+a.nodeSize*n),r=!1;continue search}break}a=o,i+=n;let s=t.doc.resolve(i);if(e.valid(s))return s}return null}}};mk.prototype.visible=!1,mk.findFrom=mk.findGapCursorFrom,Y.jsonID(`gapcursor`,mk);var hk=class e{constructor(e){this.pos=e}map(t){return new e(t.map(this.pos))}resolve(e){let t=e.resolve(this.pos);return mk.valid(t)?new mk(t):Y.near(t)}};function gk(e){return e.isAtom||e.spec.isolating||e.spec.createGapCursor}function _k(e){for(let t=e.depth;t>=0;t--){let n=e.index(t),r=e.node(t);if(n==0){if(r.type.spec.isolating)return!0}else for(let e=r.child(n-1);;e=e.lastChild){if(e.childCount==0&&!e.inlineContent||gk(e.type))return!0;if(e.inlineContent)return!1}}return!0}function vk(e){for(let t=e.depth;t>=0;t--){let n=e.indexAfter(t),r=e.node(t);if(n==r.childCount){if(r.type.spec.isolating)return!0}else for(let e=r.child(n);;e=e.firstChild){if(e.childCount==0&&!e.inlineContent||gk(e.type))return!0;if(e.inlineContent)return!1}}return!0}function yk(){return new Cf({props:{decorations:wk,createSelectionBetween(e,t,n){return t.pos==n.pos&&mk.valid(n)?new mk(n):null},handleClick:Sk,handleKeyDown:bk,handleDOMEvents:{beforeinput:Ck}}})}var bk=lv({ArrowLeft:xk(`horiz`,-1),ArrowRight:xk(`horiz`,1),ArrowUp:xk(`vert`,-1),ArrowDown:xk(`vert`,1)});function xk(e,t){let n=e==`vert`?t>0?`down`:`up`:t>0?`right`:`left`;return function(e,r,i){let a=e.selection,o=t>0?a.$to:a.$from,s=a.empty;if(a instanceof X){if(!i.endOfTextblock(n)||o.depth==0)return!1;s=!1,o=e.doc.resolve(t>0?o.after():o.before())}let c=mk.findGapCursorFrom(o,t,s);return c?(r&&r(e.tr.setSelection(new mk(c))),!0):!1}}function Sk(e,t,n){if(!e||!e.editable)return!1;let r=e.state.doc.resolve(t);if(!mk.valid(r))return!1;let i=e.posAtCoords({left:n.clientX,top:n.clientY});return i&&i.inside>-1&&sf.isSelectable(e.state.doc.nodeAt(i.inside))?!1:(e.dispatch(e.state.tr.setSelection(new mk(r))),!0)}function Ck(e,t){if(t.inputType!=`insertCompositionText`||!(e.state.selection instanceof mk))return!1;let{$from:n}=e.state.selection,r=n.parent.contentMatchAt(n.index()).findWrapping(e.state.schema.nodes.text);if(!r)return!1;let i=q.empty;for(let e=r.length-1;e>=0;e--)i=q.from(r[e].createAndFill(null,i));let a=e.state.tr.replace(n.pos,n.pos,new J(i,0,0));return a.setSelection(X.near(a.doc.resolve(n.pos+1))),e.dispatch(a),!1}function wk(e){if(!(e.selection instanceof mk))return null;let t=document.createElement(`div`);return t.className=`ProseMirror-gapcursor`,c_.create(e.doc,[a_.widget(e.selection.head,t,{key:`gapcursor`})])}WS.create({name:`characterCount`,addOptions(){return{limit:null,autoTrim:!0,mode:`textSize`,textCounter:e=>e.length,wordCounter:e=>e.split(` `).filter(e=>e!==``).length}},addStorage(){return{characters:()=>0,words:()=>0}},onBeforeCreate(){this.storage.characters=e=>{let t=e?.node||this.editor.state.doc;if((e?.mode||this.options.mode)===`textSize`){let e=t.textBetween(0,t.content.size,void 0,` `);return this.options.textCounter(e)}return t.nodeSize},this.storage.words=e=>{let t=e?.node||this.editor.state.doc,n=t.textBetween(0,t.content.size,` `,` `);return this.options.wordCounter(n)}},addProseMirrorPlugins(){let e=!1;return[new Cf({key:new Ef(`characterCount`),appendTransaction:(t,n,r)=>{if(e)return;let i=this.options.limit,a=this.options.autoTrim;if(i==null||i===0||a===!1){e=!0;return}let o=this.storage.characters({node:r.doc});if(o>i){let t=o-i;console.warn(`[CharacterCount] Initial content exceeded limit of ${i} characters. Content was automatically trimmed.`);let n=r.tr.deleteRange(0,t);return e=!0,n}e=!0},filterTransaction:(e,t)=>{let n=this.options.limit;if(!e.docChanged||n===0||n==null)return!0;let r=this.storage.characters({node:t.doc}),i=this.storage.characters({node:e.doc});if(i<=n||r>n&&i>n&&i<=r)return!0;if(r>n&&i>n&&i>r||!e.getMeta(`paste`))return!1;let a=e.selection.$head.pos,o=a-(i-n),s=a;return e.deleteRange(o,s),!(this.storage.characters({node:e.doc})>n)}})]}});var Tk=WS.create({name:`dropCursor`,addOptions(){return{color:`currentColor`,width:1,class:void 0}},addProseMirrorPlugins(){return[fk(this.options)]}});WS.create({name:`focus`,addOptions(){return{className:`has-focus`,mode:`all`}},addProseMirrorPlugins(){return[new Cf({key:new Ef(`focus`),props:{decorations:({doc:e,selection:t})=>{let{isEditable:n,isFocused:r}=this.editor,{anchor:i}=t,a=[];if(!n||!r)return c_.create(e,[]);let o=0;this.options.mode===`deepest`&&e.descendants((e,t)=>{if(!e.isText){if(!(i>=t&&i<=t+e.nodeSize-1))return!1;o+=1}});let s=0;return e.descendants((e,t)=>{if(e.isText||!(i>=t&&i<=t+e.nodeSize-1))return!1;if(s+=1,this.options.mode===`deepest`&&o-s>0||this.options.mode===`shallowest`&&s>1)return this.options.mode===`deepest`;a.push(a_.node(t,t+e.nodeSize,{class:this.options.className}))}),c_.create(e,a)}}})]}});var Ek=WS.create({name:`gapCursor`,addProseMirrorPlugins(){return[yk()]},extendNodeSchema(e){return{allowGapCursor:yb(Q(e,`allowGapCursor`,{name:e.name,options:e.options,storage:e.storage}))??null}}}),Dk=`placeholder`,Ok=new Ef(`tiptap__placeholder`);function kk(e){let{editor:t,placeholder:n,dataAttribute:r,pos:i,node:a,isEmptyDoc:o,hasAnchor:s,classes:{emptyNode:c,emptyEditor:l}}=e,u=[c];return o&&u.push(l),a_.node(i,i+a.nodeSize,{class:u.join(` `),[r]:typeof n==`function`?n({editor:t,node:a,pos:i,hasAnchor:s}):n})}function Ak(e,t){return typeof e==`function`?e(t):e}function jk({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:a,to:o}){let{anchor:s}=i,c=[],l=e.isEmpty;return r.nodesBetween(a,o,(r,i)=>{let a=s>=i&&s<=i+r.nodeSize,o=!r.isLeaf&&$b(r);return r.type.isTextblock&&(a||!t.showOnlyCurrent)&&o&&c.push(kk({editor:e,isEmptyDoc:l,dataAttribute:n,hasAnchor:a,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Ak(t.emptyNodeClass,{editor:e,node:r,pos:i,hasAnchor:a})},node:r,pos:i})),t.includeChildren}),c}function Mk({editor:e,options:t,dataAttribute:n,doc:r,selection:i}){if(!e.isEditable&&t.showOnlyWhenEditable)return null;let{anchor:a}=i,o=[],s=e.isEmpty;if(t.showOnlyCurrent&&!t.includeChildren){let i=r.resolve(a),c=i.depth>0?i.node(1):i.nodeAfter,l=i.depth>0?i.before(1):a;if(c&&c.type.isTextblock&&$b(c)){let r=a>=l&&a<=l+c.nodeSize;o.push(kk({editor:e,isEmptyDoc:s,dataAttribute:n,hasAnchor:r,placeholder:t.placeholder,classes:{emptyEditor:t.emptyEditorClass,emptyNode:Ak(t.emptyNodeClass,{editor:e,node:c,pos:l,hasAnchor:r})},node:c,pos:l}))}}else o.push(...jk({editor:e,options:t,dataAttribute:n,doc:r,selection:i,from:0,to:r.content.size}));return c_.create(r,o)}function Nk(e,t){let n=e.resolve(t);if(n.depth===0){let e=n.nodeAfter??n.nodeBefore;if(!e)return{from:t,to:t};let r=n.nodeAfter?t:t-e.nodeSize;return{from:r,to:r+e.nodeSize}}let r=n.before(1);return{from:r,to:r+n.node(1).nodeSize}}function Pk(e,t){return{from:Math.max(0,t.from),to:Math.min(e.content.size,t.to)}}function Fk(e,t,n){let r=[];return e.forEach((e,i)=>{let a=i,o=a+e.nodeSize,s=a+1,c=o+1;s<n&&c>t&&r.push({from:a,to:o})}),r}function Ik(e){if(e.length===0)return[];let t=[...e].sort((e,t)=>e.from-t.from),n=[{...t[0]}];for(let e=1;e<t.length;e+=1){let r=n[n.length-1],i=t[e];i.from<=r.to?r.to=Math.max(r.to,i.to):n.push({...i})}return n}function Lk(e,t){let n=Fk(e,t.from,t.to);return n.push(Pk(e,Nk(e,t.from))),t.to>t.from?n.push(Pk(e,Nk(e,Math.min(t.to,e.content.size+1)-1))):t.from<e.content.size+1&&n.push(Pk(e,Nk(e,Math.min(t.from+1,e.content.size)))),n}function Rk(e,t,n){let r=[];if(e.docChanged){let t=Bb(e);for(let e of t)r.push(...Lk(n.doc,e.newRange))}return e.selectionSet&&(r.push(Pk(n.doc,Nk(n.doc,e.mapping.map(t.selection.anchor)))),r.push(Pk(n.doc,Nk(n.doc,n.selection.anchor)))),Ik(r)}function zk(e,t,n){let r=Math.max(0,Math.min(e,n.content.size));return{from:r,to:Math.max(r,Math.min(t,n.content.size))}}function Bk({decorations:e,ranges:t,editor:n,options:r,dataAttribute:i,doc:a,selection:o}){let s=e;for(let e of t){let{from:t,to:c}=zk(e.from,e.to,a),l=s.find(t,c).filter(e=>e.from>=t&&e.to<=c);l.length&&(s=s.remove(l));let u=jk({editor:n,options:r,dataAttribute:i,doc:a,selection:o,from:t,to:c});u.length&&(s=s.add(a,u))}return s}function Vk({editor:e,options:t,dataAttribute:n}){return{init(r,i){return Mk({editor:e,options:t,dataAttribute:n,doc:i.doc,selection:i.selection})??c_.empty},apply(r,i,a,o){return!r.docChanged&&!r.selectionSet?i:Bk({decorations:i.map(r.mapping,r.doc),ranges:Rk(r,a,o),editor:e,options:t,dataAttribute:n,doc:o.doc,selection:o.selection})}}}function Hk(e){return e.replace(/\s+/g,`-`).replace(/[^a-zA-Z0-9-]/g,``).replace(/^[0-9-]+/,``).replace(/^-+/,``).toLowerCase()}function Uk({editor:e,options:t}){let n=t.dataAttribute?`data-${Hk(t.dataAttribute)}`:`data-${Dk}`,r=t.showOnlyCurrent&&!t.includeChildren;return new Cf({key:Ok,...r?{}:{state:Vk({editor:e,options:t,dataAttribute:n})},props:{decorations:r?({doc:r,selection:i})=>Mk({editor:e,options:t,dataAttribute:n,doc:r,selection:i}):n=>t.showOnlyWhenEditable&&!e.isEditable?c_.empty:Ok.getState(n)??c_.empty}})}var Wk=WS.create({name:`placeholder`,addOptions(){return{emptyEditorClass:`is-editor-empty`,emptyNodeClass:`is-empty`,dataAttribute:Dk,placeholder:`Write something …`,showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[Uk({editor:this.editor,options:this.options})]}});function Gk(e,t){return!e.selection.empty&&!ex(e.selection)&&t.isEditable}function Kk(e,t){return Gk(e,t)&&!t.isFocused&&!t.view.dragging}function qk(){var e;(e=window.getSelection())==null||e.removeAllRanges()}function Jk(e){e.focus()}WS.create({name:`selection`,addOptions(){return{className:`selection`}},addProseMirrorPlugins(){let{editor:e,options:t}=this;return[new Cf({key:new Ef(`selection`),props:{decorations(n){return Kk(n,e)?c_.create(n.doc,[a_.inline(n.selection.from,n.selection.to,{class:t.className})]):null},handleDOMEvents:{blur(t){return Gk(t.state,e)&&qk(),!1},focus(t){return Gk(t.state,e)&&requestAnimationFrame(()=>{!e.isDestroyed&&t.hasFocus()&&Jk(t)}),!1}}}})]}});function Yk({types:e,node:t}){return t&&Array.isArray(e)&&e.includes(t.type)||t?.type===e}var Xk=WS.create({name:`trailingNode`,addOptions(){return{node:void 0,notAfter:[]}},addProseMirrorPlugins(){let e=new Ef(this.name),t=this.options.node||this.editor.schema.topNodeType.contentMatch.defaultType?.name||`paragraph`,n=Object.entries(this.editor.schema.nodes).map(([,e])=>e).filter(e=>(this.options.notAfter||[]).concat(t).includes(e.name));return[new Cf({key:e,appendTransaction:(n,r,i)=>{let{doc:a,tr:o,schema:s}=i,c=e.getState(i),l=a.content.size,u=s.nodes[t];if(!n.some(e=>e.getMeta(`skipTrailingNode`))&&c)return o.insert(l,u.create())},state:{init:(e,t)=>{let r=t.tr.doc.lastChild;return!Yk({node:r,types:n})},apply:(e,t)=>{if(!e.docChanged||e.getMeta(`__uniqueIDTransaction`))return t;let r=e.doc.lastChild;return!Yk({node:r,types:n})}}})]}}),Zk=WS.create({name:`undoRedo`,addOptions(){return{depth:100,newGroupDelay:500}},addCommands(){return{undo:()=>({state:e,dispatch:t})=>Nv(e,t),redo:()=>({state:e,dispatch:t})=>Pv(e,t)}},addProseMirrorPlugins(){return[jv(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-y":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),Qk=WS.create({name:`starterKit`,addExtensions(){let e=[];return this.options.bold!==!1&&e.push(eT.configure(this.options.bold)),this.options.blockquote!==!1&&e.push(Yw.configure(this.options.blockquote)),this.options.bulletList!==!1&&e.push(YD.configure(this.options.bulletList)),this.options.code!==!1&&e.push(iT.configure(this.options.code)),this.options.codeBlock!==!1&&e.push(cT.configure(this.options.codeBlock)),this.options.document!==!1&&e.push(uT.configure(this.options.document)),this.options.dropcursor!==!1&&e.push(Tk.configure(this.options.dropcursor)),this.options.gapcursor!==!1&&e.push(Ek.configure(this.options.gapcursor)),this.options.hardBreak!==!1&&e.push(dT.configure(this.options.hardBreak)),this.options.heading!==!1&&e.push(fT.configure(this.options.heading)),this.options.undoRedo!==!1&&e.push(Zk.configure(this.options.undoRedo)),this.options.horizontalRule!==!1&&e.push(pT.configure(this.options.horizontalRule)),this.options.italic!==!1&&e.push(vT.configure(this.options.italic)),this.options.listItem!==!1&&e.push(CO.configure(this.options.listItem)),this.options.listKeymap!==!1&&e.push(MO.configure(this.options?.listKeymap)),this.options.link!==!1&&e.push(GD.configure(this.options?.link)),this.options.orderedList!==!1&&e.push(QO.configure(this.options.orderedList)),this.options.paragraph!==!1&&e.push(ok.configure(this.options.paragraph)),this.options.strike!==!1&&e.push(lk.configure(this.options.strike)),this.options.text!==!1&&e.push(uk.configure(this.options.text)),this.options.underline!==!1&&e.push(dk.configure(this.options?.underline)),this.options.trailingNode!==!1&&e.push(Xk.configure(this.options?.trailingNode)),e}}),$k=/^(?:\s*%%[^\n]*\n)*\s*(?:---\n[\s\S]*?\n---\s*\n)?\s*(?:flowchart|graph|sequenceDiagram|classDiagram(?:-v2)?|stateDiagram(?:-v2)?|erDiagram|journey|gantt|pie|quadrantChart|requirementDiagram|gitGraph|C4Context|C4Container|C4Component|C4Dynamic|C4Deployment|mindmap|timeline|zenuml|sankey(?:-beta)?|xychart(?:-beta)?|block(?:-beta)?|packet(?:-beta)?|kanban|architecture(?:-beta)?|radar(?:-beta)?|treemap(?:-beta)?)\b/;function eA(e,t){if(!t.trim()||t.length>5e4)return!1;let n=(e??``).trim().toLowerCase();return n===`mermaid`||!n&&$k.test(t)}var tA=null,nA=``,rA=()=>tA??=k(()=>import(`./mermaid.core-DkGhophj.js`).then(e=>e.default,e=>{throw tA=null,e}),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18]),import.meta.url),iA=new Map,aA=Promise.resolve(),oA=0;function sA(e){let t=D(),n=`${t?`d`:`l`}\n${e}`,r=iA.get(n);if(r)return Promise.resolve(r);let i=aA.then(async()=>{let r=await rA(),i=t?`dark`:`default`;if(nA!==i){let e=typeof document<`u`?getComputedStyle(document.body).fontFamily:void 0;r.initialize({startOnLoad:!1,securityLevel:`strict`,theme:i,...e?{fontFamily:e,themeVariables:{fontFamily:e}}:{},flowchart:{htmlLabels:!0},suppressErrorRendering:!0}),nA=i}let a=`mw-diagram-${++oA}`;try{let{svg:t}=await r.render(a,e),i={svg:t,...cA(t)};return iA.size>40&&iA.delete(iA.keys().next().value),iA.set(n,i),i}finally{document.getElementById(a)?.remove(),document.getElementById(`d${a}`)?.remove()}});return aA=i.catch(()=>void 0),i}function cA(e){let t=/viewBox="\s*([-\d.e]+)[\s,]+([-\d.e]+)[\s,]+([\d.e]+)[\s,]+([\d.e]+)\s*"/.exec(e),n=t?Number(t[3]):600,r=t?Number(t[4]):400;return{width:Number.isFinite(n)&&n>0?n:600,height:Number.isFinite(r)&&r>0?r:400}}function lA(e){return(e instanceof Error?e.message:String(e)).split(`
|
|
146
|
+
`).map(e=>e.trim()).filter(Boolean).slice(0,3).join(` `).slice(0,300)||`This diagram could not be drawn.`}var uA=.1,dA=8,fA=e=>Math.min(dA,Math.max(uA,e));function pA({code:e,codeView:t,initial:n=`diagram`,onMode:r}){let[i,a]=(0,L.useState)(n),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(i!==`diagram`)return;let t=!0;l(``);let n=setTimeout(()=>sA(e).then(e=>{t&&(s(e),l(``))},e=>{t&&l(lA(e))}),o?250:0);return()=>{t=!1,clearTimeout(n)}},[e,i]);let f=e=>{a(e),r?.(e)};return(0,W.jsxs)(`div`,{className:`diagram ${i}`,contentEditable:!1,suppressContentEditableWarning:!0,children:[(0,W.jsx)(`div`,{className:`diagram-bar`,children:(0,W.jsxs)(`span`,{className:`diagram-switch`,role:`group`,"aria-label":`Show as`,children:[(0,W.jsxs)(`button`,{type:`button`,className:i===`diagram`?`on`:``,"aria-pressed":i===`diagram`,onClick:()=>f(`diagram`),children:[(0,W.jsx)(sa,{size:13}),`Diagram`]}),(0,W.jsxs)(`button`,{type:`button`,className:i===`code`?`on`:``,"aria-pressed":i===`code`,onClick:()=>f(`code`),children:[(0,W.jsx)(Vt,{size:13}),`Code`]})]})}),i===`code`?!t&&(0,W.jsx)(`pre`,{className:`diagram-code`,children:(0,W.jsx)(`code`,{children:e})}):c?(0,W.jsxs)(`div`,{className:`diagram-error`,role:`alert`,children:[(0,W.jsxs)(`p`,{children:[(0,W.jsx)(yt,{size:14}),`This diagram could not be drawn: `,c]}),!t&&(0,W.jsx)(`pre`,{className:`diagram-code`,children:(0,W.jsx)(`code`,{children:e})})]}):o?(0,W.jsx)(hA,{drawn:o,onExpand:()=>d(!0)}):(0,W.jsxs)(`p`,{className:`diagram-wait`,children:[(0,W.jsx)(H,{size:14,className:`spin`}),`Drawing the diagram…`]}),u&&o&&(0,W.jsx)(mA,{onClose:()=>d(!1),children:(0,W.jsx)(hA,{drawn:o,tall:!0})})]})}function mA({children:e,onClose:t}){let n=(0,L.useRef)(null),[r,i]=(0,L.useState)(!1);return(0,L.useLayoutEffect)(()=>{let e=n.current;e&&!e.open&&e.showModal(),i(!0)},[]),(0,W.jsxs)(`dialog`,{ref:n,className:`diagram-dialog`,"aria-label":`The diagram`,onClose:t,onCancel:e=>{e.preventDefault(),t()},children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare diagram-close`,onClick:t,"aria-label":`Close`,title:`Close (Esc)`,children:(0,W.jsx)(la,{size:18})}),r&&e]})}function hA({drawn:e,tall:t,onExpand:n}){let r=(0,L.useRef)(null),[i,a]=(0,L.useState)({s:1,x:0,y:0}),[o,s]=(0,L.useState)(0),c=(0,L.useRef)(new Map),l=(0,L.useRef)(null),u=(0,L.useRef)(i);u.current=i;let d=(0,L.useRef)(!1),f=(0,L.useCallback)(()=>{let t=r.current;if(!t)return;d.current=!1;let n=t.clientWidth,i=t.clientHeight;if(!n||!i)return;let o=fA(Math.min(n/e.width,i/e.height,2));a({s:o,x:(n-e.width*o)/2,y:(i-e.height*o)/2})},[e]);(0,L.useEffect)(()=>{let e=r.current;if(!e||typeof ResizeObserver>`u`)return;let t=new ResizeObserver(()=>{d.current||f()});return t.observe(e),()=>t.disconnect()},[f]),(0,L.useLayoutEffect)(()=>{let n=r.current;if(!n)return;if(t){s(0);return}let i=n.clientWidth||600;s(Math.round(Math.min(480,Math.max(140,e.height*Math.min(1,i/e.width)+24))))},[e,t]),(0,L.useLayoutEffect)(()=>{f()},[f,o]);let p=(0,L.useCallback)((e,t,n)=>{let i=r.current;if(!i)return;d.current=!0;let o=u.current,s=t??i.clientWidth/2,c=n??i.clientHeight/2,l=fA(o.s*e),f=l/o.s;a({s:l,x:s-(s-o.x)*f,y:c-(c-o.y)*f})},[]),m=()=>{let t=r.current;t&&(d.current=!0,a({s:1,x:Math.max(0,(t.clientWidth-e.width)/2),y:Math.max(0,(t.clientHeight-e.height)/2)}))};(0,L.useEffect)(()=>{let e=r.current;if(!e)return;let t=t=>{if(t.ctrlKey||t.metaKey){t.preventDefault();let n=e.getBoundingClientRect();p(Math.exp(-t.deltaY*.01),t.clientX-n.left,t.clientY-n.top);return}let n=t.shiftKey?t.deltaX||t.deltaY:Math.abs(t.deltaX)>Math.abs(t.deltaY)?t.deltaX:0;n&&(t.preventDefault(),d.current=!0,a(e=>({...e,x:e.x-n*(t.deltaMode===1?16:1)})))};return e.addEventListener(`wheel`,t,{passive:!1}),()=>e.removeEventListener(`wheel`,t)},[p]);let h=e=>{let t=r.current.getBoundingClientRect();return{x:e.clientX-t.left,y:e.clientY-t.top}},g=e=>{if(e.button===0&&(r.current?.setPointerCapture(e.pointerId),c.current.set(e.pointerId,h(e)),c.current.size===2)){let[e,t]=[...c.current.values()];l.current={d:Math.hypot(e.x-t.x,e.y-t.y),s:u.current.s}}},_=e=>{let t=c.current.get(e.pointerId);if(!t)return;let n=h(e);if(c.current.set(e.pointerId,n),c.current.size===2&&l.current){let[e,t]=[...c.current.values()],n=Math.hypot(e.x-t.x,e.y-t.y);l.current.d>0&&p(fA(l.current.s*(n/l.current.d))/u.current.s,(e.x+t.x)/2,(e.y+t.y)/2)}else d.current=!0,a(e=>({...e,x:e.x+n.x-t.x,y:e.y+n.y-t.y}))},v=e=>{c.current.delete(e.pointerId),c.current.size<2&&(l.current=null)},y=1.25;return(0,W.jsxs)(`div`,{className:`diagram-view${t?` tall`:``}`,children:[(0,W.jsxs)(`div`,{className:`diagram-tools`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>p(1/y),"aria-label":`Zoom out`,title:`Zoom out`,children:(0,W.jsx)(pr,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>p(y),"aria-label":`Zoom in`,title:`Zoom in`,children:(0,W.jsx)(Lr,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:f,title:`The whole diagram in the frame`,children:`Fit`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:m,title:`Its actual size`,children:`100%`}),n&&(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:n,title:`The whole window for it`,children:[(0,W.jsx)(lr,{size:13}),`Expand`]}),(0,W.jsx)(`span`,{className:`diagram-hint`,children:`Drag or Shift + scroll to pan · Ctrl/⌘ + scroll or pinch to zoom · double-click to zoom in`}),(0,W.jsxs)(`span`,{className:`diagram-zoom`,"aria-live":`polite`,children:[Math.round(i.s*100),`%`]})]}),(0,W.jsx)(`div`,{ref:r,className:`diagram-frame`,style:o?{height:o}:void 0,onPointerDown:g,onPointerMove:_,onPointerUp:v,onPointerCancel:v,onDoubleClick:e=>{let t=h(e);p(1.6,t.x,t.y)},children:(0,W.jsx)(`div`,{className:`diagram-svg`,style:{width:e.width,height:e.height,transform:`translate(${i.x}px, ${i.y}px) scale(${i.s})`},dangerouslySetInnerHTML:{__html:e.svg}})})]})}function gA(e){return lT.extend({addNodeView(){return({node:t})=>eA(t.attrs.language,t.textContent)?new vA(t,e):_A(e)}}).configure({HTMLAttributes:{style:e}})}function _A(e){let t=document.createElement(`pre`);t.setAttribute(`style`,e);let n=document.createElement(`code`);return t.append(n),{dom:t,contentDOM:n,update:e=>e.type.name===`codeBlock`&&!eA(e.attrs.language,e.textContent)}}var vA=class{dom;contentDOM;host;root;mode;node;constructor(e,t){this.node=e,this.dom=document.createElement(`div`),this.dom.className=`note-diagram diagram-shown`,this.host=document.createElement(`div`),this.host.contentEditable=`false`;let n=document.createElement(`pre`);n.setAttribute(`style`,t),this.contentDOM=document.createElement(`code`),n.append(this.contentDOM),this.dom.append(this.host,n),this.mode=`diagram`,this.root=(0,ve.createRoot)(this.host),this.draw()}gone=!1;draw(){queueMicrotask(()=>{this.gone||this.render()})}render(){let e=this.node.textContent;this.root.render((0,W.jsx)(pA,{code:e,codeView:!0,initial:this.mode,onMode:e=>{this.mode=e,this.dom.classList.toggle(`diagram-shown`,e===`diagram`)}}))}update(e){return e.type!==this.node.type||!eA(e.attrs.language,e.textContent)?!1:(this.node=e,this.draw(),!0)}stopEvent(e){return e.target instanceof Node&&this.host.contains(e.target)}ignoreMutation(e){return e.type===`attributes`&&e.target===this.dom||this.host.contains(e.target)}destroy(){this.gone=!0;let e=this.root;queueMicrotask(()=>e.unmount())}},yA,bA;if(typeof WeakMap<`u`){let e=new WeakMap;yA=t=>e.get(t),bA=(t,n)=>(e.set(t,n),n)}else{let e=[],t=0;yA=t=>{for(let n=0;n<e.length;n+=2)if(e[n]==t)return e[n+1]},bA=(n,r)=>(t==10&&(t=0),e[t++]=n,e[t++]=r)}var xA=class{constructor(e,t,n,r){this.width=e,this.height=t,this.map=n,this.problems=r}findCell(e){for(let t=0;t<this.map.length;t++){let n=this.map[t];if(n!=e)continue;let r=t%this.width,i=t/this.width|0,a=r+1,o=i+1;for(let e=1;a<this.width&&this.map[t+e]==n;e++)a++;for(let e=1;o<this.height&&this.map[t+this.width*e]==n;e++)o++;return{left:r,top:i,right:a,bottom:o}}throw RangeError(`No cell with offset ${e} found`)}colCount(e){for(let t=0;t<this.map.length;t++)if(this.map[t]==e)return t%this.width;throw RangeError(`No cell with offset ${e} found`)}nextCell(e,t,n){let{left:r,right:i,top:a,bottom:o}=this.findCell(e);return t==`horiz`?(n<0?r==0:i==this.width)?null:this.map[a*this.width+(n<0?r-1:i)]:(n<0?a==0:o==this.height)?null:this.map[r+this.width*(n<0?a-1:o)]}rectBetween(e,t){let{left:n,right:r,top:i,bottom:a}=this.findCell(e),{left:o,right:s,top:c,bottom:l}=this.findCell(t);return{left:Math.min(n,o),top:Math.min(i,c),right:Math.max(r,s),bottom:Math.max(a,l)}}cellsInRect(e){let t=[],n={};for(let r=e.top;r<e.bottom;r++)for(let i=e.left;i<e.right;i++){let a=r*this.width+i,o=this.map[a];n[o]||(n[o]=!0,i==e.left&&i&&this.map[a-1]==o||r==e.top&&r&&this.map[a-this.width]==o||t.push(o))}return t}positionAt(e,t,n){for(let r=0,i=0;;r++){let a=i+n.child(r).nodeSize;if(r==e){let n=t+e*this.width,r=(e+1)*this.width;for(;n<r&&this.map[n]<i;)n++;return n==r?a-1:this.map[n]}i=a}}static get(e){return yA(e)||bA(e,SA(e))}};function SA(e){if(e.type.spec.tableRole!=`table`)throw RangeError(`Not a table node: `+e.type.name);let t=CA(e),n=e.childCount,r=[],i=0,a=null,o=[];for(let e=0,i=t*n;e<i;e++)r[e]=0;for(let s=0,c=0;s<n;s++){let l=e.child(s);c++;for(let e=0;;e++){for(;i<r.length&&r[i]!=0;)i++;if(e==l.childCount)break;let u=l.child(e),{colspan:d,rowspan:f,colwidth:p}=u.attrs;for(let e=0;e<f;e++){if(e+s>=n){(a||=[]).push({type:`overlong_rowspan`,pos:c,n:f-e});break}let l=i+e*t;for(let e=0;e<d;e++){r[l+e]==0?r[l+e]=c:(a||=[]).push({type:`collision`,row:s,pos:c,n:d-e});let n=p&&p[e];if(n){let r=(l+e)%t*2,i=o[r];i==null||i!=n&&o[r+1]==1?(o[r]=n,o[r+1]=1):i==n&&o[r+1]++}}}i+=d,c+=u.nodeSize}let u=(s+1)*t,d=0;for(;i<u;)r[i++]==0&&d++;d&&(a||=[]).push({type:`missing`,row:s,n:d}),c++}(t===0||n===0)&&(a||=[]).push({type:`zero_sized`});let s=new xA(t,n,r,a),c=!1;for(let e=0;!c&&e<o.length;e+=2)o[e]!=null&&o[e+1]<n&&(c=!0);return c&&wA(s,o,e),s}function CA(e){let t=-1,n=!1;for(let r=0;r<e.childCount;r++){let i=e.child(r),a=0;if(n)for(let t=0;t<r;t++){let n=e.child(t);for(let e=0;e<n.childCount;e++){let i=n.child(e);t+i.attrs.rowspan>r&&(a+=i.attrs.colspan)}}for(let e=0;e<i.childCount;e++){let t=i.child(e);a+=t.attrs.colspan,t.attrs.rowspan>1&&(n=!0)}t==-1?t=a:t!=a&&(t=Math.max(t,a))}return t}function wA(e,t,n){e.problems||=[];let r={};for(let i=0;i<e.map.length;i++){let a=e.map[i];if(r[a])continue;r[a]=!0;let o=n.nodeAt(a);if(!o)throw RangeError(`No cell with offset ${a} found`);let s=null,c=o.attrs;for(let n=0;n<c.colspan;n++){let r=t[(i+n)%e.width*2];r==null||c.colwidth&&c.colwidth[n]==r||((s||=TA(c))[n]=r)}s&&e.problems.unshift({type:`colwidth mismatch`,pos:a,colwidth:s})}}function TA(e){if(e.colwidth)return e.colwidth.slice();let t=[];for(let n=0;n<e.colspan;n++)t.push(0);return t}function EA(e){let t=e.cached.tableNodeTypes;if(!t){t=e.cached.tableNodeTypes={};for(let n in e.nodes){let r=e.nodes[n],i=r.spec.tableRole;i&&(t[i]=r)}}return t}var DA=new Ef(`selectingCells`);function OA(e){for(let t=e.depth-1;t>0;t--)if(e.node(t).type.spec.tableRole==`row`)return e.node(0).resolve(e.before(t+1));return null}function kA(e){for(let t=e.depth;t>0;t--){let n=e.node(t).type.spec.tableRole;if(n===`cell`||n===`header_cell`)return e.node(t)}return null}function AA(e){let t=e.selection.$head;for(let e=t.depth;e>0;e--)if(t.node(e).type.spec.tableRole==`row`)return!0;return!1}function jA(e){let t=e.selection;if(`$anchorCell`in t&&t.$anchorCell)return t.$anchorCell.pos>t.$headCell.pos?t.$anchorCell:t.$headCell;if(`node`in t&&t.node&&t.node.type.spec.tableRole==`cell`)return t.$anchor;let n=OA(t.$head)||MA(t.$head);if(n)return n;throw RangeError(`No cell found around position ${t.head}`)}function MA(e){for(let t=e.nodeAfter,n=e.pos;t;t=t.firstChild,n++){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n)}for(let t=e.nodeBefore,n=e.pos;t;t=t.lastChild,n--){let r=t.type.spec.tableRole;if(r==`cell`||r==`header_cell`)return e.doc.resolve(n-t.nodeSize)}}function NA(e){return e.parent.type.spec.tableRole==`row`&&!!e.nodeAfter}function PA(e){return e.node(0).resolve(e.pos+e.nodeAfter.nodeSize)}function FA(e,t){return e.depth==t.depth&&e.pos>=t.start(-1)&&e.pos<=t.end(-1)}function IA(e,t,n){let r=e.node(-1),i=xA.get(r),a=e.start(-1),o=i.nextCell(e.pos-a,t,n);return o==null?null:e.node(0).resolve(a+o)}function LA(e,t,n=1){let r={...e,colspan:e.colspan-n};return r.colwidth&&(r.colwidth=r.colwidth.slice(),r.colwidth.splice(t,n),r.colwidth.some(e=>e>0)||(r.colwidth=null)),r}function RA(e,t,n=1){let r={...e,colspan:e.colspan+n};if(r.colwidth){r.colwidth=r.colwidth.slice();for(let e=0;e<n;e++)r.colwidth.splice(t,0,0)}return r}function zA(e,t,n){let r=EA(t.type.schema).header_cell;for(let i=0;i<e.height;i++)if(t.nodeAt(e.map[n+i*e.width]).type!=r)return!1;return!0}var BA=class e extends Y{constructor(e,t=e){let n=e.node(-1),r=xA.get(n),i=e.start(-1),a=r.rectBetween(e.pos-i,t.pos-i),o=e.node(0),s=r.cellsInRect(a).filter(e=>e!=t.pos-i);s.unshift(t.pos-i);let c=s.map(e=>{let t=n.nodeAt(e);if(!t)throw RangeError(`No cell with offset ${e} found`);let r=i+e+1;return new nf(o.resolve(r),o.resolve(r+t.content.size))});super(c[0].$from,c[0].$to,c),this.$anchorCell=e,this.$headCell=t}map(t,n){let r=t.resolve(n.map(this.$anchorCell.pos)),i=t.resolve(n.map(this.$headCell.pos));if(NA(r)&&NA(i)&&FA(r,i)){let t=this.$anchorCell.node(-1)!=r.node(-1);return t&&this.isRowSelection()?e.rowSelection(r,i):t&&this.isColSelection()?e.colSelection(r,i):new e(r,i)}return X.between(r,i)}content(){let e=this.$anchorCell.node(-1),t=xA.get(e),n=this.$anchorCell.start(-1),r=t.rectBetween(this.$anchorCell.pos-n,this.$headCell.pos-n),i={},a=[];for(let n=r.top;n<r.bottom;n++){let o=[];for(let a=n*t.width+r.left,s=r.left;s<r.right;s++,a++){let n=t.map[a];if(i[n])continue;i[n]=!0;let s=t.findCell(n),c=e.nodeAt(n);if(!c)throw RangeError(`No cell with offset ${n} found`);let l=r.left-s.left,u=s.right-r.right;if(l>0||u>0){let e=c.attrs;if(l>0&&(e=LA(e,0,l)),u>0&&(e=LA(e,e.colspan-u,u)),s.left<r.left){if(c=c.type.createAndFill(e),!c)throw RangeError(`Could not create cell with attrs ${JSON.stringify(e)}`)}else c=c.type.create(e,c.content)}if(s.top<r.top||s.bottom>r.bottom){let e={...c.attrs,rowspan:Math.min(s.bottom,r.bottom)-Math.max(s.top,r.top)};c=s.top<r.top?c.type.createAndFill(e):c.type.create(e,c.content)}o.push(c)}a.push(e.child(n).copy(q.from(o)))}let o=this.isColSelection()&&this.isRowSelection()?e:a;return new J(q.from(o),1,1)}replace(e,t=J.empty){let n=e.steps.length,r=this.ranges;for(let i=0;i<r.length;i++){let{$from:a,$to:o}=r[i],s=e.mapping.slice(n);e.replace(s.map(a.pos),s.map(o.pos),i?J.empty:t)}let i=Y.findFrom(e.doc.resolve(e.mapping.slice(n).map(this.to)),-1);i&&e.setSelection(i)}replaceWith(e,t){this.replace(e,new J(q.from(t),0,0))}forEachCell(e){let t=this.$anchorCell.node(-1),n=xA.get(t),r=this.$anchorCell.start(-1),i=n.cellsInRect(n.rectBetween(this.$anchorCell.pos-r,this.$headCell.pos-r));for(let n=0;n<i.length;n++)e(t.nodeAt(i[n]),r+i[n])}isColSelection(){let e=this.$anchorCell.index(-1),t=this.$headCell.index(-1);if(Math.min(e,t)>0)return!1;let n=e+this.$anchorCell.nodeAfter.attrs.rowspan,r=t+this.$headCell.nodeAfter.attrs.rowspan;return Math.max(n,r)==this.$headCell.node(-1).childCount}static colSelection(t,n=t){let r=t.node(-1),i=xA.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.top<=s.top?(o.top>0&&(t=c.resolve(a+i.map[o.left])),s.bottom<i.height&&(n=c.resolve(a+i.map[i.width*(i.height-1)+s.right-1]))):(s.top>0&&(n=c.resolve(a+i.map[s.left])),o.bottom<i.height&&(t=c.resolve(a+i.map[i.width*(i.height-1)+o.right-1]))),new e(t,n)}isRowSelection(){let e=this.$anchorCell.node(-1),t=xA.get(e),n=this.$anchorCell.start(-1),r=t.colCount(this.$anchorCell.pos-n),i=t.colCount(this.$headCell.pos-n);if(Math.min(r,i)>0)return!1;let a=r+this.$anchorCell.nodeAfter.attrs.colspan,o=i+this.$headCell.nodeAfter.attrs.colspan;return Math.max(a,o)==t.width}eq(t){return t instanceof e&&t.$anchorCell.pos==this.$anchorCell.pos&&t.$headCell.pos==this.$headCell.pos}static rowSelection(t,n=t){let r=t.node(-1),i=xA.get(r),a=t.start(-1),o=i.findCell(t.pos-a),s=i.findCell(n.pos-a),c=t.node(0);return o.left<=s.left?(o.left>0&&(t=c.resolve(a+i.map[o.top*i.width])),s.right<i.width&&(n=c.resolve(a+i.map[i.width*(s.top+1)-1]))):(s.left>0&&(n=c.resolve(a+i.map[s.top*i.width])),o.right<i.width&&(t=c.resolve(a+i.map[i.width*(o.top+1)-1]))),new e(t,n)}toJSON(){return{type:`cell`,anchor:this.$anchorCell.pos,head:this.$headCell.pos}}static fromJSON(t,n){return new e(t.resolve(n.anchor),t.resolve(n.head))}static create(t,n,r=n){return new e(t.resolve(n),t.resolve(r))}getBookmark(){return new VA(this.$anchorCell.pos,this.$headCell.pos)}};BA.prototype.visible=!1,Y.jsonID(`cell`,BA);var VA=class e{constructor(e,t){this.anchor=e,this.head=t}map(t){return new e(t.map(this.anchor),t.map(this.head))}resolve(e){let t=e.resolve(this.anchor),n=e.resolve(this.head);return t.parent.type.spec.tableRole==`row`&&n.parent.type.spec.tableRole==`row`&&t.index()<t.parent.childCount&&n.index()<n.parent.childCount&&FA(t,n)?new BA(t,n):Y.near(n,1)}};function HA(e){if(!(e.selection instanceof BA))return null;let t=[];return e.selection.forEachCell((e,n)=>{t.push(a_.node(n,n+e.nodeSize,{class:`selectedCell`}))}),c_.create(e.doc,t)}function UA({$from:e,$to:t}){if(e.pos==t.pos||e.pos<t.pos-6)return!1;let n=e.pos,r=t.pos,i=e.depth;for(;i>=0&&!(e.after(i+1)<e.end(i));i--,n++);for(let e=t.depth;e>=0&&!(t.before(e+1)>t.start(e));e--,r--);return n==r&&/row|table/.test(e.node(i).type.spec.tableRole)}function WA({$from:e,$to:t}){let n,r;for(let t=e.depth;t>0;t--){let r=e.node(t);if(r.type.spec.tableRole===`cell`||r.type.spec.tableRole===`header_cell`){n=r;break}}for(let e=t.depth;e>0;e--){let n=t.node(e);if(n.type.spec.tableRole===`cell`||n.type.spec.tableRole===`header_cell`){r=n;break}}return n!==r&&t.parentOffset===0}function GA(e,t,n){let r=(t||e).selection,i=(t||e).doc,a,o;if(r instanceof sf&&(o=r.node.type.spec.tableRole)){if(o==`cell`||o==`header_cell`)a=BA.create(i,r.from);else if(o==`row`){let e=i.resolve(r.from+1);a=BA.rowSelection(e,e)}else if(!n){let e=xA.get(r.node),t=r.from+1,n=t+e.map[e.width*e.height-1];a=BA.create(i,t+1,n)}}else r instanceof X&&UA(r)?a=X.create(i,r.from):r instanceof X&&WA(r)&&(a=X.create(i,r.$from.start(),r.$from.end()));return a&&(t||=e.tr).setSelection(a),t}var KA=new Ef(`fix-tables`);function qA(e,t,n,r){let i=e.childCount,a=t.childCount;outer:for(let o=0,s=0;o<a;o++){let a=t.child(o);for(let t=s,r=Math.min(i,o+3);t<r;t++)if(e.child(t)==a){s=t+1,n+=a.nodeSize;continue outer}r(a,n),s<i&&e.child(s).sameMarkup(a)?qA(e.child(s),a,n+1,r):a.nodesBetween(0,a.content.size,r,n+1),n+=a.nodeSize}}function JA(e,t){let n,r=(t,r)=>{t.type.spec.tableRole==`table`&&(n=YA(e,t,r,n))};return t?t.doc!=e.doc&&qA(t.doc,e.doc,0,r):e.doc.descendants(r),n}function YA(e,t,n,r){let i=xA.get(t);if(!i.problems)return r;r||=e.tr;let a=[];for(let e=0;e<i.height;e++)a.push(0);for(let e=0;e<i.problems.length;e++){let o=i.problems[e];if(o.type==`collision`){let e=t.nodeAt(o.pos);if(!e)continue;let i=e.attrs;for(let e=0;e<i.rowspan;e++)a[o.row+e]+=o.n;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,LA(i,i.colspan-o.n,o.n))}else if(o.type==`missing`)a[o.row]+=o.n;else if(o.type==`overlong_rowspan`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,rowspan:e.attrs.rowspan-o.n})}else if(o.type==`colwidth mismatch`){let e=t.nodeAt(o.pos);if(!e)continue;r.setNodeMarkup(r.mapping.map(n+1+o.pos),null,{...e.attrs,colwidth:o.colwidth})}else if(o.type==`zero_sized`){let e=r.mapping.map(n);r.delete(e,e+t.nodeSize)}}let o,s;for(let e=0;e<a.length;e++)a[e]&&(o??=e,s=e);for(let c=0,l=n+1;c<i.height;c++){let n=t.child(c),i=l+n.nodeSize,u=a[c];if(u>0){let t=`cell`;n.firstChild&&(t=n.firstChild.type.spec.tableRole);let a=[];for(let n=0;n<u;n++){let n=EA(e.schema)[t].createAndFill();n&&a.push(n)}let d=(c==0||o==c-1)&&s==c?l+1:i-1;r.insert(r.mapping.map(d),a)}l=i}return r.setMeta(KA,{fixTables:!0})}function XA(e){let t=e.selection,n=jA(e),r=n.node(-1),i=n.start(-1),a=xA.get(r);return{...t instanceof BA?a.rectBetween(t.$anchorCell.pos-i,t.$headCell.pos-i):a.findCell(n.pos-i),tableStart:i,map:a,table:r}}function ZA(e,{map:t,tableStart:n,table:r},i){let a=i>0?-1:0;zA(t,r,i+a)&&(a=i==0||i==t.width?null:0);for(let o=0;o<t.height;o++){let s=o*t.width+i;if(i>0&&i<t.width&&t.map[s-1]==t.map[s]){let a=t.map[s],c=r.nodeAt(a);e.setNodeMarkup(e.mapping.map(n+a),null,RA(c.attrs,i-t.colCount(a))),o+=c.attrs.rowspan-1}else{let c=a==null?EA(r.type.schema).cell:r.nodeAt(t.map[s+a]).type,l=t.positionAt(o,i,r);e.insert(e.mapping.map(n+l),c.createAndFill())}}return e}function QA(e,t){if(!AA(e))return!1;if(t){let n=XA(e);t(ZA(e.tr,n,n.left))}return!0}function $A(e,t){if(!AA(e))return!1;if(t){let n=XA(e);t(ZA(e.tr,n,n.right))}return!0}function ej(e,{map:t,table:n,tableStart:r},i){let a=e.mapping.maps.length;for(let o=0;o<t.height;){let s=o*t.width+i,c=t.map[s],l=n.nodeAt(c),u=l.attrs;if(i>0&&t.map[s-1]==c||i<t.width-1&&t.map[s+1]==c)e.setNodeMarkup(e.mapping.slice(a).map(r+c),null,LA(u,i-t.colCount(c)));else{let t=e.mapping.slice(a).map(r+c);e.delete(t,t+l.nodeSize)}o+=u.rowspan}}function tj(e,t){if(!AA(e))return!1;if(t){let n=XA(e),r=e.tr;if(n.left==0&&n.right==n.map.width)return!1;for(let e=n.right-1;ej(r,n,e),e!=n.left;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=xA.get(e)}t(r)}return!0}function nj(e,t,n){let r=EA(t.type.schema).header_cell;for(let i=0;i<e.width;i++)if(t.nodeAt(e.map[i+n*e.width])?.type!=r)return!1;return!0}function rj(e,{map:t,tableStart:n,table:r},i){let a=n;for(let e=0;e<i;e++)a+=r.child(e).nodeSize;let o=[],s=i>0?-1:0;nj(t,r,i+s)&&(s=i==0||i==t.height?null:0);for(let a=0,c=t.width*i;a<t.width;a++,c++)if(i>0&&i<t.height&&t.map[c]==t.map[c-t.width]){let i=t.map[c],o=r.nodeAt(i).attrs;e.setNodeMarkup(n+i,null,{...o,rowspan:o.rowspan+1}),a+=o.colspan-1}else{let e=(s==null?EA(r.type.schema).cell:r.nodeAt(t.map[c+s*t.width])?.type)?.createAndFill();e&&o.push(e)}return e.insert(a,EA(r.type.schema).row.create(null,o)),e}function ij(e,t){if(!AA(e))return!1;if(t){let n=XA(e);t(rj(e.tr,n,n.top))}return!0}function aj(e,t){if(!AA(e))return!1;if(t){let n=XA(e);t(rj(e.tr,n,n.bottom))}return!0}function oj(e,{map:t,table:n,tableStart:r},i){let a=0;for(let e=0;e<i;e++)a+=n.child(e).nodeSize;let o=a+n.child(i).nodeSize,s=e.mapping.maps.length;e.delete(a+r,o+r);let c=new Set;for(let a=0,o=i*t.width;a<t.width;a++,o++){let l=t.map[o];if(!c.has(l)){if(c.add(l),i>0&&l==t.map[o-t.width]){let t=n.nodeAt(l).attrs;e.setNodeMarkup(e.mapping.slice(s).map(l+r),null,{...t,rowspan:t.rowspan-1}),a+=t.colspan-1}else if(i<t.height&&l==t.map[o+t.width]){let o=n.nodeAt(l),c=o.attrs,u=o.type.create({...c,rowspan:o.attrs.rowspan-1},o.content),d=t.positionAt(i+1,a,n);e.insert(e.mapping.slice(s).map(r+d),u),a+=c.colspan-1}}}}function sj(e,t){if(!AA(e))return!1;if(t){let n=XA(e),r=e.tr;if(n.top==0&&n.bottom==n.map.height)return!1;for(let e=n.bottom-1;oj(r,n,e),e!=n.top;e--){let e=n.tableStart?r.doc.nodeAt(n.tableStart-1):r.doc;if(!e)throw RangeError(`No table found`);n.table=e,n.map=xA.get(n.table)}t(r)}return!0}function cj(e){let t=e.content;return t.childCount==1&&t.child(0).isTextblock&&t.child(0).childCount==0}function lj({width:e,height:t,map:n},r){let i=r.top*e+r.left,a=i,o=(r.bottom-1)*e+r.left,s=i+(r.right-r.left-1);for(let t=r.top;t<r.bottom;t++){if(r.left>0&&n[a]==n[a-1]||r.right<e&&n[s]==n[s+1])return!0;a+=e,s+=e}for(let a=r.left;a<r.right;a++){if(r.top>0&&n[i]==n[i-e]||r.bottom<t&&n[o]==n[o+e])return!0;i++,o++}return!1}function uj(e,t){let n=e.selection;if(!(n instanceof BA)||n.$anchorCell.pos==n.$headCell.pos)return!1;let r=XA(e),{map:i}=r;if(lj(i,r))return!1;if(t){let n=e.tr,a={},o=q.empty,s,c;for(let e=r.top;e<r.bottom;e++)for(let t=r.left;t<r.right;t++){let l=i.map[e*i.width+t],u=r.table.nodeAt(l);if(!a[l]&&u){if(a[l]=!0,s==null)s=l,c=u;else{cj(u)||(o=o.append(u.content));let e=n.mapping.map(l+r.tableStart);n.delete(e,e+u.nodeSize)}}}if(s==null||c==null)return!0;if(n.setNodeMarkup(s+r.tableStart,null,{...RA(c.attrs,c.attrs.colspan,r.right-r.left-c.attrs.colspan),rowspan:r.bottom-r.top}),o.size>0){let e=s+1+c.content.size,t=cj(c)?s+1:e;n.replaceWith(t+r.tableStart,e+r.tableStart,o)}n.setSelection(new BA(n.doc.resolve(s+r.tableStart))),t(n)}return!0}function dj(e,t){let n=EA(e.schema);return fj(({node:e})=>n[e.type.spec.tableRole])(e,t)}function fj(e){return(t,n)=>{let r=t.selection,i,a;if(r instanceof BA){if(r.$anchorCell.pos!=r.$headCell.pos)return!1;i=r.$anchorCell.nodeAfter,a=r.$anchorCell.pos}else{if(i=kA(r.$from),!i)return!1;a=OA(r.$from)?.pos}if(i==null||a==null||i.attrs.colspan==1&&i.attrs.rowspan==1)return!1;if(n){let o=i.attrs,s=[],c=o.colwidth;o.rowspan>1&&(o={...o,rowspan:1}),o.colspan>1&&(o={...o,colspan:1});let l=XA(t),u=t.tr;for(let e=0;e<l.right-l.left;e++)s.push(c?{...o,colwidth:c&&c[e]?[c[e]]:null}:o);let d;for(let t=l.top;t<l.bottom;t++){let n=l.map.positionAt(t,l.left,l.table);t==l.top&&(n+=i.nodeSize);for(let r=l.left,a=0;r<l.right;r++,a++)(r!=l.left||t!=l.top)&&u.insert(d=u.mapping.map(n+l.tableStart,1),e({node:i,row:t,col:r}).createAndFill(s[a]))}u.setNodeMarkup(a,e({node:i,row:l.top,col:l.left}),s[0]),r instanceof BA&&u.setSelection(new BA(u.doc.resolve(r.$anchorCell.pos),d?u.doc.resolve(d):void 0)),n(u)}return!0}}function pj(e,t){return function(n,r){if(!AA(n))return!1;let i=jA(n);if(i.nodeAfter.attrs[e]===t)return!1;if(r){let a=n.tr;n.selection instanceof BA?n.selection.forEachCell((n,r)=>{n.attrs[e]!==t&&a.setNodeMarkup(r,null,{...n.attrs,[e]:t})}):a.setNodeMarkup(i.pos,null,{...i.nodeAfter.attrs,[e]:t}),r(a)}return!0}}function mj(e){return function(t,n){if(!AA(t))return!1;if(n){let r=EA(t.schema),i=XA(t),a=t.tr,o=i.map.cellsInRect(e==`column`?{left:i.left,top:0,right:i.right,bottom:i.map.height}:e==`row`?{left:0,top:i.top,right:i.map.width,bottom:i.bottom}:i),s=o.map(e=>i.table.nodeAt(e));for(let e=0;e<o.length;e++)s[e].type==r.header_cell&&a.setNodeMarkup(i.tableStart+o[e],r.cell,s[e].attrs);if(a.steps.length===0)for(let e=0;e<o.length;e++)a.setNodeMarkup(i.tableStart+o[e],r.header_cell,s[e].attrs);n(a)}return!0}}function hj(e,t,n){let r=t.map.cellsInRect({left:0,top:0,right:e==`row`?t.map.width:1,bottom:e==`column`?t.map.height:1});for(let e=0;e<r.length;e++){let i=t.table.nodeAt(r[e]);if(i&&i.type!==n.header_cell)return!1}return!0}function gj(e,t){return t||={useDeprecatedLogic:!1},t.useDeprecatedLogic?mj(e):function(t,n){if(!AA(t))return!1;if(n){let r=EA(t.schema),i=XA(t),a=t.tr,o=hj(`row`,i,r),s=hj(`column`,i,r),c=(e===`column`?o:e===`row`&&s)?1:0,l=e==`column`?{left:0,top:c,right:1,bottom:i.map.height}:e==`row`?{left:c,top:0,right:i.map.width,bottom:1}:i,u=e==`column`?s?r.cell:r.header_cell:e==`row`?o?r.cell:r.header_cell:r.cell;i.map.cellsInRect(l).forEach(e=>{let t=e+i.tableStart,n=a.doc.nodeAt(t);n&&a.setNodeMarkup(t,u,n.attrs)}),n(a)}return!0}}gj(`row`,{useDeprecatedLogic:!0}),gj(`column`,{useDeprecatedLogic:!0});var _j=gj(`cell`,{useDeprecatedLogic:!0});function vj(e,t){if(t<0){let t=e.nodeBefore;if(t)return e.pos-t.nodeSize;for(let t=e.index(-1)-1,n=e.before();t>=0;t--){let r=e.node(-1).child(t),i=r.lastChild;if(i)return n-1-i.nodeSize;n-=r.nodeSize}}else{if(e.index()<e.parent.childCount-1)return e.pos+e.nodeAfter.nodeSize;let t=e.node(-1);for(let n=e.indexAfter(-1),r=e.after();n<t.childCount;n++){let e=t.child(n);if(e.childCount)return r+1;r+=e.nodeSize}}return null}function yj(e){return function(t,n){if(!AA(t))return!1;let r=vj(jA(t),e);if(r==null)return!1;if(n){let e=t.doc.resolve(r);n(t.tr.setSelection(X.between(e,PA(e))).scrollIntoView())}return!0}}function bj(e,t){let n=e.selection.$anchor;for(let r=n.depth;r>0;r--)if(n.node(r).type.spec.tableRole==`table`)return t&&t(e.tr.delete(n.before(r),n.after(r)).scrollIntoView()),!0;return!1}function xj(e,t){let n=e.selection;if(!(n instanceof BA))return!1;if(t){let r=e.tr,i=EA(e.schema).cell.createAndFill().content;n.forEachCell((e,t)=>{e.content.eq(i)||r.replace(r.mapping.map(t+1),r.mapping.map(t+e.nodeSize-1),new J(i,0,0))}),r.docChanged&&t(r)}return!0}function Sj(e){if(e.size===0)return null;let{content:t,openStart:n,openEnd:r}=e;for(;t.childCount==1&&(n>0&&r>0||t.child(0).type.spec.tableRole==`table`);)n--,r--,t=t.child(0).content;let i=t.child(0),a=i.type.spec.tableRole,o=i.type.schema,s=[];if(a==`row`)for(let e=0;e<t.childCount;e++){let i=t.child(e).content,a=e?0:Math.max(0,n-1),c=e<t.childCount-1?0:Math.max(0,r-1);(a||c)&&(i=wj(EA(o).row,new J(i,a,c)).content),s.push(i)}else if(a==`cell`||a==`header_cell`)s.push(n||r?wj(EA(o).row,new J(t,n,r)).content:t);else return null;return Cj(o,s)}function Cj(e,t){let n=[];for(let e=0;e<t.length;e++){let r=t[e];for(let t=r.childCount-1;t>=0;t--){let{rowspan:i,colspan:a}=r.child(t).attrs;for(let t=e;t<e+i;t++)n[t]=(n[t]||0)+a}}let r=0;for(let e=0;e<n.length;e++)r=Math.max(r,n[e]);for(let i=0;i<n.length;i++)if(i>=t.length&&t.push(q.empty),n[i]<r){let a=EA(e).cell.createAndFill(),o=[];for(let e=n[i];e<r;e++)o.push(a);t[i]=t[i].append(q.from(o))}return{height:t.length,width:r,rows:t}}function wj(e,t){let n=e.createAndFill();return new ef(n).replace(0,n.content.size,t).doc}function Tj({width:e,height:t,rows:n},r,i){if(e!=r){let t=[],i=[];for(let e=0;e<n.length;e++){let a=n[e],o=[];for(let n=t[e]||0,i=0;n<r;i++){let s=a.child(i%a.childCount);n+s.attrs.colspan>r&&(s=s.type.createChecked(LA(s.attrs,s.attrs.colspan,n+s.attrs.colspan-r),s.content)),o.push(s),n+=s.attrs.colspan;for(let n=1;n<s.attrs.rowspan;n++)t[e+n]=(t[e+n]||0)+s.attrs.colspan}i.push(q.from(o))}n=i,e=r}if(t!=i){let e=[];for(let r=0,a=0;r<i;r++,a++){let o=[],s=n[a%t];for(let e=0;e<s.childCount;e++){let t=s.child(e);r+t.attrs.rowspan>i&&(t=t.type.create({...t.attrs,rowspan:Math.max(1,i-t.attrs.rowspan)},t.content)),o.push(t)}e.push(q.from(o))}n=e,t=i}return{width:e,height:t,rows:n}}function Ej(e,t,n,r,i,a,o){let s=e.doc.type.schema,c=EA(s),l,u;if(i>t.width)for(let a=0,s=0;a<t.height;a++){let d=n.child(a);s+=d.nodeSize;let f=[],p;p=d.lastChild==null||d.lastChild.type==c.cell?l||=c.cell.createAndFill():u||=c.header_cell.createAndFill();for(let e=t.width;e<i;e++)f.push(p);e.insert(e.mapping.slice(o).map(s-1+r),f)}if(a>t.height){let s=[];for(let e=0,r=(t.height-1)*t.width;e<Math.max(t.width,i);e++){let i=e>=t.width?!1:n.nodeAt(t.map[r+e]).type==c.header_cell;s.push(i?u||=c.header_cell.createAndFill():l||=c.cell.createAndFill())}let d=c.row.create(null,q.from(s)),f=[];for(let e=t.height;e<a;e++)f.push(d);e.insert(e.mapping.slice(o).map(r+n.nodeSize-2),f)}return!!(l||u)}function Dj(e,t,n,r,i,a,o,s){if(o==0||o==t.height)return!1;let c=!1;for(let l=i;l<a;l++){let i=o*t.width+l,a=t.map[i];if(t.map[i-t.width]==a){c=!0;let i=n.nodeAt(a),{top:u,left:d}=t.findCell(a);e.setNodeMarkup(e.mapping.slice(s).map(a+r),null,{...i.attrs,rowspan:o-u}),e.insert(e.mapping.slice(s).map(t.positionAt(o,d,n)),i.type.createAndFill({...i.attrs,rowspan:u+i.attrs.rowspan-o})),l+=i.attrs.colspan-1}}return c}function Oj(e,t,n,r,i,a,o,s){if(o==0||o==t.width)return!1;let c=!1;for(let l=i;l<a;l++){let i=l*t.width+o,a=t.map[i];if(t.map[i-1]==a){c=!0;let i=n.nodeAt(a),u=t.colCount(a),d=e.mapping.slice(s).map(a+r);e.setNodeMarkup(d,null,LA(i.attrs,o-u,i.attrs.colspan-(o-u))),e.insert(d+i.nodeSize,i.type.createAndFill(LA(i.attrs,0,o-u))),l+=i.attrs.rowspan-1}}return c}function kj(e,t,n,r,i){let a=n?e.doc.nodeAt(n-1):e.doc;if(!a)throw Error(`No table found`);let o=xA.get(a),{top:s,left:c}=r,l=c+i.width,u=s+i.height,d=e.tr,f=0;function p(){if(a=n?d.doc.nodeAt(n-1):d.doc,!a)throw Error(`No table found`);o=xA.get(a),f=d.mapping.maps.length}Ej(d,o,a,n,l,u,f)&&p(),Dj(d,o,a,n,c,l,s,f)&&p(),Dj(d,o,a,n,c,l,u,f)&&p(),Oj(d,o,a,n,s,u,c,f)&&p(),Oj(d,o,a,n,s,u,l,f)&&p();for(let e=s;e<u;e++){let t=o.positionAt(e,c,a),r=o.positionAt(e,l,a);d.replace(d.mapping.slice(f).map(t+n),d.mapping.slice(f).map(r+n),new J(i.rows[e-s],0,0))}p(),d.setSelection(new BA(d.doc.resolve(n+o.positionAt(s,c,a)),d.doc.resolve(n+o.positionAt(u-1,l-1,a)))),t(d)}var Aj=lv({ArrowLeft:Mj(`horiz`,-1),ArrowRight:Mj(`horiz`,1),ArrowUp:Mj(`vert`,-1),ArrowDown:Mj(`vert`,1),"Shift-ArrowLeft":Nj(`horiz`,-1),"Shift-ArrowRight":Nj(`horiz`,1),"Shift-ArrowUp":Nj(`vert`,-1),"Shift-ArrowDown":Nj(`vert`,1),Backspace:xj,"Mod-Backspace":xj,Delete:xj,"Mod-Delete":xj});function jj(e,t,n){return!n.eq(e.selection)&&(t&&t(e.tr.setSelection(n).scrollIntoView()),!0)}function Mj(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection;if(a instanceof BA)return jj(n,r,Y.near(a.$headCell,t));if(e!=`horiz`&&!a.empty)return!1;let o=Lj(i,e,t);if(o==null)return!1;if(e==`horiz`)return jj(n,r,Y.near(n.doc.resolve(a.head+t),t));{let i=n.doc.resolve(o),a=IA(i,e,t),s;return s=a?Y.near(a,1):t<0?Y.near(n.doc.resolve(i.before(-1)),-1):Y.near(n.doc.resolve(i.after(-1)),1),jj(n,r,s)}}}function Nj(e,t){return(n,r,i)=>{if(!i)return!1;let a=n.selection,o;if(a instanceof BA)o=a;else{let r=Lj(i,e,t);if(r==null)return!1;o=new BA(n.doc.resolve(r))}let s=IA(o.$headCell,e,t);return s?jj(n,r,new BA(o.$anchorCell,s)):!1}}function Pj(e,t){let n=e.state.doc,r=OA(n.resolve(t));return r?(e.dispatch(e.state.tr.setSelection(new BA(r))),!0):!1}function Fj(e,t,n){if(!AA(e.state))return!1;let r=Sj(n),i=e.state.selection;if(i instanceof BA){r||={width:1,height:1,rows:[q.from(wj(EA(e.state.schema).cell,n))]};let t=i.$anchorCell.node(-1),a=i.$anchorCell.start(-1),o=xA.get(t).rectBetween(i.$anchorCell.pos-a,i.$headCell.pos-a);return r=Tj(r,o.right-o.left,o.bottom-o.top),kj(e.state,e.dispatch,a,o,r),!0}if(r){let t=jA(e.state),n=t.start(-1);return kj(e.state,e.dispatch,n,xA.get(t.node(-1)).findCell(t.pos-n),r),!0}return!1}function Ij(e,t){if(t.button!=0||t.ctrlKey||t.metaKey)return;let n=Rj(e,t.target),r;if(t.shiftKey&&e.state.selection instanceof BA)i(e.state.selection.$anchorCell,t),t.preventDefault();else if(t.shiftKey&&n&&(r=OA(e.state.selection.$anchor))!=null&&zj(e,t)?.pos!=r.pos)i(r,t),t.preventDefault();else if(!n)return;function i(t,n){let r=zj(e,n),i=DA.getState(e.state)==null;if(!r||!FA(t,r)){if(i)r=t;else return}let a=new BA(t,r);if(i||!e.state.selection.eq(a)){let n=e.state.tr.setSelection(a);i&&n.setMeta(DA,t.pos),e.dispatch(n)}}function a(){e.root.removeEventListener(`mouseup`,a),e.root.removeEventListener(`dragstart`,a),e.root.removeEventListener(`mousemove`,o),DA.getState(e.state)!=null&&e.dispatch(e.state.tr.setMeta(DA,-1))}function o(r){let o=r,s=DA.getState(e.state),c;if(s!=null)c=e.state.doc.resolve(s);else if(Rj(e,o.target)!=n&&(c=zj(e,t),!c))return a();c&&i(c,o)}e.root.addEventListener(`mouseup`,a),e.root.addEventListener(`dragstart`,a),e.root.addEventListener(`mousemove`,o)}function Lj(e,t,n){if(!(e.state.selection instanceof X))return null;let{$head:r}=e.state.selection;for(let i=r.depth-1;i>=0;i--){let a=r.node(i);if((n<0?r.index(i):r.indexAfter(i))!=(n<0?0:a.childCount))return null;if(a.type.spec.tableRole==`cell`||a.type.spec.tableRole==`header_cell`){let a=r.before(i),o=t==`vert`?n>0?`down`:`up`:n>0?`right`:`left`;return e.endOfTextblock(o)?a:null}}return null}function Rj(e,t){for(;t&&t!=e.dom;t=t.parentNode)if(t.nodeName==`TD`||t.nodeName==`TH`)return t;return null}function zj(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(!n)return null;let{inside:r,pos:i}=n;return r>=0&&OA(e.state.doc.resolve(r))||OA(e.state.doc.resolve(i))}var Bj=class{constructor(e,t){this.node=e,this.defaultCellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`)),this.table.style.setProperty(`--default-cell-min-width`,`${t}px`),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),Vj(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.type==this.node.type&&(this.node=e,Vj(e,this.colgroup,this.table,this.defaultCellMinWidth),!0)}ignoreMutation(e){return e.type==`attributes`&&(e.target==this.table||this.colgroup.contains(e.target))}};function Vj(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l){for(let e=0,n=0;e<l.childCount;e++){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e++,n++){let l=i==n?a:d&&d[e],u=l?l+`px`:``;if(o+=l||r,l||(s=!1),c)c.style.width!=u&&(c.style.width=u),c=c.nextSibling;else{let e=document.createElement(`col`);e.style.width=u,t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}s?(n.style.width=o+`px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=o+`px`)}}var Hj=new Ef(`tableColumnResizing`);function Uj({handleWidth:e=5,cellMinWidth:t=25,defaultCellMinWidth:n=100,View:r=Bj,lastColumnResizable:i=!0}={}){let a=new Cf({key:Hj,state:{init(e,t){var i;let o=(i=a.spec)==null||(i=i.props)==null?void 0:i.nodeViews,s=EA(t.schema).table.name;return r&&o&&(o[s]=(e,t)=>new r(e,n,t)),new Wj(-1,!1)},apply(e,t){return t.apply(e)}},props:{attributes:e=>{let t=Hj.getState(e);return t&&t.activeHandle>-1?{class:`resize-cursor`}:{}},handleDOMEvents:{mousemove:(t,n)=>{Gj(t,n,e,i)},mouseleave:e=>{Kj(e)},mousedown:(e,r)=>{qj(e,r,t,n)}},decorations:e=>{let t=Hj.getState(e);if(t&&t.activeHandle>-1)return nM(e,t.activeHandle)},nodeViews:{}}});return a}var Wj=class e{constructor(e,t){this.activeHandle=e,this.dragging=t}apply(t){let n=this,r=t.getMeta(Hj);if(r&&r.setHandle!=null)return new e(r.setHandle,!1);if(r&&r.setDragging!==void 0)return new e(n.activeHandle,r.setDragging);if(n.activeHandle>-1&&t.docChanged){let r=t.mapping.map(n.activeHandle,-1);return NA(t.doc.resolve(r))||(r=-1),new e(r,n.dragging)}return n}};function Gj(e,t,n,r){if(!e.editable)return;let i=Hj.getState(e.state);if(i&&!i.dragging){let a=Yj(t.target),o=-1;if(a){let{left:r,right:i}=a.getBoundingClientRect();t.clientX-r<=n?o=Xj(e,t,`left`,n):i-t.clientX<=n&&(o=Xj(e,t,`right`,n))}if(o!=i.activeHandle){if(!r&&o!==-1){let t=e.state.doc.resolve(o),n=t.node(-1),r=xA.get(n),i=t.start(-1);if(r.colCount(t.pos-i)+t.nodeAfter.attrs.colspan-1==r.width-1)return}Qj(e,o)}}}function Kj(e){if(!e.editable)return;let t=Hj.getState(e.state);t&&t.activeHandle>-1&&!t.dragging&&Qj(e,-1)}function qj(e,t,n,r){if(!e.editable)return!1;let i=e.dom.ownerDocument.defaultView??window,a=Hj.getState(e.state);if(!a||a.activeHandle==-1||a.dragging)return!1;let o=e.state.doc.nodeAt(a.activeHandle),s=Jj(e,a.activeHandle,o.attrs);e.dispatch(e.state.tr.setMeta(Hj,{setDragging:{startX:t.clientX,startWidth:s}}));function c(t){i.removeEventListener(`mouseup`,c),i.removeEventListener(`mousemove`,l);let r=Hj.getState(e.state);r?.dragging&&($j(e,r.activeHandle,Zj(r.dragging,t,n)),e.dispatch(e.state.tr.setMeta(Hj,{setDragging:null})))}function l(t){if(!t.which)return c(t);let i=Hj.getState(e.state);if(i&&i.dragging){let a=Zj(i.dragging,t,n);eM(e,i.activeHandle,a,r)}}return eM(e,a.activeHandle,s,r),i.addEventListener(`mouseup`,c),i.addEventListener(`mousemove`,l),t.preventDefault(),!0}function Jj(e,t,{colspan:n,colwidth:r}){let i=r&&r[r.length-1];if(i)return i;let a=e.domAtPos(t),o=a.node.childNodes[a.offset].offsetWidth,s=n;if(r)for(let e=0;e<n;e++)r[e]&&(o-=r[e],s--);return o/s}function Yj(e){for(;e&&e.nodeName!=`TD`&&e.nodeName!=`TH`;)e=e.classList&&e.classList.contains(`ProseMirror`)?null:e.parentNode;return e}function Xj(e,t,n,r){let i=n==`right`?-r:r,a=e.posAtCoords({left:t.clientX+i,top:t.clientY});if(!a)return-1;let{pos:o}=a,s=OA(e.state.doc.resolve(o));if(!s)return-1;if(n==`right`)return s.pos;let c=xA.get(s.node(-1)),l=s.start(-1),u=c.map.indexOf(s.pos-l);return u%c.width==0?-1:l+c.map[u-1]}function Zj(e,t,n){let r=t.clientX-e.startX;return Math.max(n,e.startWidth+r)}function Qj(e,t){e.dispatch(e.state.tr.setMeta(Hj,{setHandle:t}))}function $j(e,t,n){let r=e.state.doc.resolve(t),i=r.node(-1),a=xA.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1,c=e.state.tr;for(let e=0;e<a.height;e++){let t=e*a.width+s;if(e&&a.map[t]==a.map[t-a.width])continue;let r=a.map[t],l=i.nodeAt(r).attrs,u=l.colspan==1?0:s-a.colCount(r);if(l.colwidth&&l.colwidth[u]==n)continue;let d=l.colwidth?l.colwidth.slice():tM(l.colspan);d[u]=n,c.setNodeMarkup(o+r,null,{...l,colwidth:d})}c.docChanged&&e.dispatch(c)}function eM(e,t,n,r){let i=e.state.doc.resolve(t),a=i.node(-1),o=i.start(-1),s=xA.get(a).colCount(i.pos-o)+i.nodeAfter.attrs.colspan-1,c=e.domAtPos(i.start(-1)).node;for(;c&&c.nodeName!=`TABLE`;)c=c.parentNode;c&&Vj(a,c.firstChild,c,r,s,n)}function tM(e){return Array(e).fill(0)}function nM(e,t){let n=[],r=e.doc.resolve(t),i=r.node(-1);if(!i)return c_.empty;let a=xA.get(i),o=r.start(-1),s=a.colCount(r.pos-o)+r.nodeAfter.attrs.colspan-1;for(let t=0;t<a.height;t++){let r=s+t*a.width;if((s==a.width-1||a.map[r]!=a.map[r+1])&&(t==0||a.map[r]!=a.map[r-a.width])){let t=a.map[r],s=o+t+i.nodeAt(t).nodeSize-1,c=document.createElement(`div`);c.className=`column-resize-handle`,Hj.getState(e)?.dragging&&n.push(a_.node(o+t,o+t+i.nodeAt(t).nodeSize,{class:`column-resize-dragging`})),n.push(a_.widget(s,c))}}return c_.create(e.doc,n)}function rM({allowTableNodeSelection:e=!1}={}){return new Cf({key:DA,state:{init(){return null},apply(e,t){let n=e.getMeta(DA);if(n!=null)return n==-1?null:n;if(t==null||!e.docChanged)return t;let{deleted:r,pos:i}=e.mapping.mapResult(t);return r?null:i}},props:{decorations:HA,handleDOMEvents:{mousedown:Ij},createSelectionBetween(e){return DA.getState(e.state)==null?null:e.state.selection},handleTripleClick:Pj,handleKeyDown:Aj,handlePaste:Fj},appendTransaction(t,n,r){return GA(r,JA(r,n),e)}})}function iM(e){return e===`left`||e===`right`||e===`center`?e:null}function aM(e){let t=(e.style.textAlign||``).trim().toLowerCase(),n=(e.getAttribute(`align`)||``).trim().toLowerCase();return iM(t||n)}function oM(e){return iM(e?.align)}function sM(){return{default:null,parseHTML:e=>aM(e),renderHTML:e=>{let t=iM(e.align);return vS(t)?{style:`text-align: ${t}`}:{}}}}function cM(e){let t=e.parentElement,n=e.closest(`table`);if(!t||!n)return null;let r=Array.from(t.children).indexOf(e),i=n.querySelectorAll(`colgroup > col`)[r]?.getAttribute(`width`);return i?[parseInt(i,10)]:null}function lM(e){let t=e.getAttribute(`colwidth`);return t?t.split(`,`).map(e=>parseInt(e,10)):cM(e)}var uM=/[ \t\r\n\f]+/g;function dM(e){return e.children.length>0?!1:(e.textContent??``).replace(uM,``)===``}function fM(e){let t=e.createAndFill();if(!t)throw Error(`[tiptap error]: "${e.name}" has no default content to backfill.`);return t.content}function pM(e,t,n){if(!(n in t))return;let r=t[n];(r===1||r===`1`||r==null)&&delete e[n]}var mM=dC.create({name:`tableCell`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:lM},align:sM()}},tableRole:`cell`,isolating:!0,parseHTML(){return[{tag:`td`,getAttrs:e=>dM(e)?{}:!1,getContent:(e,t)=>fM(t.nodes[this.name])},{tag:`td`}]},renderHTML({HTMLAttributes:e}){let t=Cb(this.options.HTMLAttributes,e);return pM(t,e,`colspan`),pM(t,e,`rowspan`),[`td`,t,0]}}),hM=dC.create({name:`tableHeader`,addOptions(){return{HTMLAttributes:{}}},content:`block+`,addAttributes(){return{colspan:{default:1},rowspan:{default:1},colwidth:{default:null,parseHTML:lM},align:sM()}},tableRole:`header_cell`,isolating:!0,parseHTML(){return[{tag:`th`,getAttrs:e=>dM(e)?{}:!1,getContent:(e,t)=>fM(t.nodes[this.name])},{tag:`th`}]},renderHTML({HTMLAttributes:e}){let t=Cb(this.options.HTMLAttributes,e);return pM(t,e,`colspan`),pM(t,e,`rowspan`),[`th`,t,0]}}),gM=dC.create({name:`tableRow`,addOptions(){return{HTMLAttributes:{}}},content:`(tableCell | tableHeader)*`,tableRole:`row`,parseHTML(){return[{tag:`tr`}]},renderHTML({HTMLAttributes:e}){return[`tr`,Cb(this.options.HTMLAttributes,e),0]}});function _M(e,t){return t?[`width`,`${Math.max(t,e)}px`]:[`min-width`,`${e}px`]}function vM(e,t,n,r,i,a){let o=0,s=!0,c=t.firstChild,l=e.firstChild;if(l!==null)for(let e=0,n=0;e<l.childCount;e+=1){let{colspan:u,colwidth:d}=l.child(e).attrs;for(let e=0;e<u;e+=1,n+=1){let l=i===n?a:d&&d[e],u=l?`${l}px`:``;if(o+=l||r,l||(s=!1),c){if(c.style.width!==u){let[e,t]=_M(r,l);c.style.setProperty(e,t)}c=c.nextSibling}else{let e=document.createElement(`col`),[n,i]=_M(r,l);e.style.setProperty(n,i),t.appendChild(e)}}}for(;c;){var u;let e=c.nextSibling;(u=c.parentNode)==null||u.removeChild(c),c=e}let d=e.attrs.style&&typeof e.attrs.style==`string`&&/\bwidth\s*:/i.test(e.attrs.style);s&&!d?(n.style.width=`${o}px`,n.style.minWidth=``):(n.style.width=``,n.style.minWidth=`${o}px`)}var yM=class{constructor(e,t,n,r={}){this.node=e,this.cellMinWidth=t,this.dom=document.createElement(`div`),this.dom.className=`tableWrapper`,this.table=this.dom.appendChild(document.createElement(`table`));for(let[e,t]of Object.entries(r))t!=null&&(e===`style`?this.table.style.cssText=String(t):this.table.setAttribute(e,String(t)));e.attrs.style&&(this.table.style.cssText=e.attrs.style),this.colgroup=this.table.appendChild(document.createElement(`colgroup`)),vM(e,this.colgroup,this.table,t),this.contentDOM=this.table.appendChild(document.createElement(`tbody`))}update(e){return e.sameMarkup(this.node)?(this.node=e,vM(e,this.colgroup,this.table,this.cellMinWidth),!0):!1}ignoreMutation(e){let t=e.target,n=this.dom.contains(t),r=this.contentDOM.contains(t);return!(!n||r||e.type!==`attributes`&&e.type!==`childList`&&e.type!==`characterData`)}};function bM(e,t,n,r){let i=0,a=!0,o=[],s=e.firstChild;if(!s)return{};for(let e=0,c=0;e<s.childCount;e+=1){let{colspan:l,colwidth:u}=s.child(e).attrs;for(let e=0;e<l;e+=1,c+=1){let s=n===c?r:u&&u[e];i+=s||t,s||(a=!1);let[l,d]=_M(t,s);o.push([`col`,{style:`${l}: ${d}`}])}}let c=a?`${i}px`:``,l=a?``:`${i}px`;return{colgroup:[`colgroup`,{},...o],tableWidth:c,tableMinWidth:l}}function xM(e,t){return t?e.createChecked(null,t):e.createAndFill()}function SM(e){if(e.cached.tableNodeTypes)return e.cached.tableNodeTypes;let t={};return Object.keys(e.nodes).forEach(n=>{let r=e.nodes[n];r.spec.tableRole&&(t[r.spec.tableRole]=r)}),e.cached.tableNodeTypes=t,t}function CM(e,t,n,r,i){let a=SM(e),o=[],s=[];for(let e=0;e<n;e+=1){let e=xM(a.cell,i);if(e&&s.push(e),r){let e=xM(a.header_cell,i);e&&o.push(e)}}let c=[];for(let e=0;e<t;e+=1)c.push(a.row.createChecked(null,r&&e===0?o:s));return a.table.createChecked(null,c)}function wM(e){return e instanceof BA}var TM=({editor:e})=>{let{selection:t}=e.state;if(!wM(t))return!1;let n=0;return ib(t.ranges[0].$from,e=>e.type.name===`table`)?.node.descendants(e=>{if(e.type.name===`table`)return!1;[`tableCell`,`tableHeader`].includes(e.type.name)&&(n+=1)}),n===t.ranges.length&&(e.commands.deleteTable(),!0)};function EM(e,t){let n=e.mapping.map(t);if(ib(e.selection.$from,e=>e.type.name===`table`)?.pos===n)return;let r=e.doc.nodeAt(n);if(!r)return;let i=n+r.nodeSize-1;e.setSelection(X.near(e.doc.resolve(i),-1))}function DM(e){let t=``,n=0;for(;n<e.length;){if(e[n]===`\\`&&n+1<e.length){t+=e[n]+e[n+1],n+=2;continue}if(e[n]!=="`"){t+=e[n++];continue}let r=0;for(;n+r<e.length&&e[n+r]==="`";)r+=1;let i=n+r,a=!1;for(;i<e.length;){if(e[i]!=="`"){i+=1;continue}let o=0;for(;i+o<e.length&&e[i+o]==="`";)o+=1;if(o===r){let o=e.slice(n+r,i);t+=e.slice(n,n+r)+o.replace(/\\\||\|/g,e=>e===`|`?`\\|`:e)+e.slice(i,i+r),n=i+r,a=!0;break}i+=o}a||(t+=e.slice(n,n+r),n+=r)}return t}function OM(e){return e.split(`
|
|
147
|
+
`).map(e=>!e.includes(`|`)||!e.includes("`")?e:DM(e)).join(`
|
|
148
|
+
`)}function kM(e){return(e||``).replaceAll(``,` `).replace(/\s+/g,` `).trim()}function AM(e,t){return t?e.split(t).join(`
|
|
149
|
+
`):e}function jM(e){return e.replace(/\\.|\|/g,e=>e===`|`?`\\|`:e)}function MM(e,t,n={}){if(!e||!e.content||e.content.length===0)return``;let r=[];e.content.forEach(e=>{let i=[];e.content&&e.content.forEach(e=>{let r=``;r=e.content&&Array.isArray(e.content)&&e.content.length>1?e.content.map(e=>AM(t.renderChildren(e),n.cellLineSeparator)).join(`
|
|
150
|
+
`):AM(e.content?t.renderChildren(e.content):``,n.cellLineSeparator);let a=jM(kM(r.replace(/[ \t]*\r?\n[ \t]*/g,`<br>`))),o=e.type===`tableHeader`,s=oM(e.attrs);i.push({text:a,isHeader:o,align:s})}),r.push(i)});let i=r.reduce((e,t)=>Math.max(e,t.length),0);if(i===0)return``;let a=Array.from({length:i}).fill(0);r.forEach(e=>{for(let t=0;t<i;t+=1){let n=(e[t]?.text||``).length;n>a[t]&&(a[t]=n),a[t]<3&&(a[t]=3)}});let o=(e,t)=>e+` `.repeat(Math.max(0,t-e.length)),s=r[0],c=s.some(e=>e.isHeader),l=Array.from({length:i}).fill(null);r.forEach(e=>{for(let t=0;t<i;t+=1)!l[t]&&e[t]?.align&&(l[t]=e[t].align)});let u=`
|
|
151
|
+
`,d=Array.from({length:i}).map((e,t)=>c&&s[t]&&s[t].text||``);return u+=`| ${d.map((e,t)=>o(e,a[t])).join(` | `)} |\n`,u+=`| ${a.map((e,t)=>{let n=Math.max(3,e),r=l[t];return r===`left`?`:${`-`.repeat(n)}`:r===`right`?`${`-`.repeat(n)}:`:r===`center`?`:${`-`.repeat(n)}:`:`-`.repeat(n)}).join(` | `)} |\n`,(c?r.slice(1):r).forEach(e=>{u+=`| ${Array.from({length:i}).fill(0).map((t,n)=>o(e[n]&&e[n].text||``,a[n])).join(` | `)} |\n`}),u}var NM=new Ef(`preserveCellSelectionOnContextMenu`);function PM(e,t){let n=e.posAtCoords({left:t.clientX,top:t.clientY});if(n)return n.pos;if(!(t.target instanceof Node))return null;try{return e.posAtDOM(t.target,0)}catch{return null}}function FM(e,t){let n=!1;return e.forEachCell((e,r)=>{t>=r&&t<r+e.nodeSize&&(n=!0)}),n}function IM(){return new Cf({key:NM,props:{handleDOMEvents:{mousedown(e,t){if(t.button!==2)return!1;let{selection:n}=e.state;if(!wM(n)||n.ranges.length<2)return!1;let r=PM(e,t);return r==null||!FM(n,r)?!1:(t.preventDefault(),!0)}}}})}var LM=dC.create({name:`table`,addOptions(){return{HTMLAttributes:{},resizable:!1,renderWrapper:!1,handleWidth:5,cellMinWidth:25,View:yM,lastColumnResizable:!0,allowTableNodeSelection:!1}},content:`tableRow+`,tableRole:`table`,isolating:!0,group:`block`,parseHTML(){return[{tag:`table`}]},renderHTML({node:e,HTMLAttributes:t}){let{colgroup:n,tableWidth:r,tableMinWidth:i}=bM(e,this.options.cellMinWidth),a=t.style;function o(){return a||(r?`width: ${r}`:`min-width: ${i}`)}let s=[`table`,Cb(this.options.HTMLAttributes,t,{style:o()}),n,[`tbody`,0]];return this.options.renderWrapper?[`div`,{class:`tableWrapper`},s]:s},parseMarkdown:(e,t)=>{let n=[],r=Array.isArray(e.align)?e.align:[];if(e.header){let i=[];e.header.forEach((e,n)=>{let a=iM(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableHeader`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}return e.rows&&e.rows.forEach(e=>{let i=[];e.forEach((e,n)=>{let a=iM(r[n]??e.align),o=a?{align:a}:{};i.push(t.createNode(`tableCell`,o,[{type:`paragraph`,content:t.parseInline(e.tokens)}]))}),n.push(t.createNode(`tableRow`,{},i))}),t.createNode(`table`,void 0,n)},renderMarkdown:(e,t)=>MM(e,t),markdownTokenizer:{name:`table`,level:`block`,start:e=>{let t=e.split(`
|
|
152
|
+
`);if(t.length<2)return-1;let n=t[1];return!/^[ \t|:]*-[ \t|:-]*$/.test(n)||!n.includes(`|`)?-1:t[0].includes(`|`)?0:-1},tokenize(e,t,n){let r=e.indexOf(`
|
|
153
|
+
|
|
154
|
+
`),i=r>=0?e.slice(0,r):e,a=i.split(`
|
|
155
|
+
`);if(a.length<2)return;let o=a[1];if(!/^[ \t|:]*-[ \t|:-]*$/.test(o)||!o.includes(`|`))return;let s=OM(i);if(s===i)return;let c=n.blockTokens(s)[0];if(c?.type!==`table`||!c.raw)return;let l=c.raw.split(`
|
|
156
|
+
`).length,u=e.split(`
|
|
157
|
+
`).slice(0,l).join(`
|
|
158
|
+
`);return{...c,raw:u}}},addCommands(){return{insertTable:({rows:e=3,cols:t=3,withHeaderRow:n=!0}={})=>({tr:r,dispatch:i,editor:a})=>{let o=CM(a.schema,e,t,n);if(i){let e=r.selection.from+1;r.replaceSelectionWith(o).scrollIntoView().setSelection(X.near(r.doc.resolve(e)))}return!0},addColumnBefore:()=>({state:e,dispatch:t})=>QA(e,t),addColumnAfter:()=>({state:e,dispatch:t})=>$A(e,t),deleteColumn:()=>({state:e,dispatch:t})=>{let n=ib(e.selection.$from,e=>e.type.name===`table`);return tj(e,t&&(e=>{n&&EM(e,n.pos),t(e)}))},addRowBefore:()=>({state:e,dispatch:t})=>ij(e,t),addRowAfter:()=>({state:e,dispatch:t})=>aj(e,t),deleteRow:()=>({state:e,dispatch:t})=>{let n=ib(e.selection.$from,e=>e.type.name===`table`);return sj(e,t&&(e=>{n&&EM(e,n.pos),t(e)}))},deleteTable:()=>({state:e,dispatch:t})=>bj(e,t),mergeCells:()=>({state:e,dispatch:t})=>uj(e,t),splitCell:()=>({state:e,dispatch:t})=>dj(e,t),toggleHeaderColumn:()=>({state:e,dispatch:t})=>gj(`column`)(e,t),toggleHeaderRow:()=>({state:e,dispatch:t})=>gj(`row`)(e,t),toggleHeaderCell:()=>({state:e,dispatch:t})=>_j(e,t),mergeOrSplit:()=>({state:e,dispatch:t})=>uj(e,t)?!0:dj(e,t),setCellAttribute:(e,t)=>({state:n,dispatch:r})=>pj(e,t)(n,r),goToNextCell:()=>({state:e,dispatch:t})=>yj(1)(e,t),goToPreviousCell:()=>({state:e,dispatch:t})=>yj(-1)(e,t),fixTables:()=>({state:e,dispatch:t})=>(t&&JA(e),!0),setCellSelection:e=>({tr:t,dispatch:n})=>{if(n){let n=BA.create(t.doc,e.anchorCell,e.headCell);t.setSelection(n)}return!0}}},addKeyboardShortcuts(){return{Tab:()=>this.editor.commands.goToNextCell()?!0:this.editor.can().addRowAfter()?this.editor.chain().addRowAfter().goToNextCell().run():!1,"Shift-Tab":()=>this.editor.commands.goToPreviousCell(),Backspace:TM,"Mod-Backspace":TM,Delete:TM,"Mod-Delete":TM}},addProseMirrorPlugins(){return[...this.options.resizable&&this.editor.isEditable?[Uj({handleWidth:this.options.handleWidth,cellMinWidth:this.options.cellMinWidth,defaultCellMinWidth:this.options.cellMinWidth,View:null,lastColumnResizable:this.options.lastColumnResizable})]:[],rM({allowTableNodeSelection:this.options.allowTableNodeSelection}),IM()]},addNodeView(){let e=this.options.View;return e?({node:t,view:n,HTMLAttributes:r})=>{let i=Cb(this.options.HTMLAttributes,r);return new e(t,this.options.cellMinWidth,n,i)}:null},extendNodeSchema(e){return{tableRole:yb(Q(e,`tableRole`,{name:e.name,options:e.options,storage:e.storage}))}}}),RM=WS.create({name:`tableKit`,addExtensions(){let e=[];return this.options.table!==!1&&e.push(LM.configure(this.options.table)),this.options.tableCell!==!1&&e.push(mM.configure(this.options.tableCell)),this.options.tableHeader!==!1&&e.push(hM.configure(this.options.tableHeader)),this.options.tableRow!==!1&&e.push(gM.configure(this.options.tableRow)),e}}),zM=5e4,BM=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),VM=/^(#{1,6}) +(\S.*?)(?: +#+)? *$/,HM=/^([ \t]{0,16})([-*+]|\d{1,9}[.)]) +(\S.*)$/,UM=/^[ \t]{0,8}> ?/,WM=/^[ \t]{0,3}```/,GM=/^[ \t]{0,3}(?:-{3,}|\*{3,}|_{3,})[ \t]*$/;function KM(e){if(e.length>2e3||!e.includes(`|`)||!e.includes(`-`))return!1;let t=ZM(e);return t.length>0&&t.every(e=>/^:?-+:?$/.test(e))&&(t.length>1||/^[ \t]*\|.*\|[ \t]*$/.test(e))}var qM=/\*\*[^*\n]{1,200}\*\*|__[^_\n]{1,200}__|`[^`\n]{1,200}`|\[[^\]\n]{1,200}\]\((?:https?:|mailto:)[^)\s]{1,2000}\)|~~[^~\n]{1,200}~~/g;function JM(e){if(!e||e.length>zM)return!1;let t=e.split(/\r?\n/),n=0,r=0,i=!1,a=0;for(let e=0;e<t.length;e++){let o=t[e];if(e>0&&t[e-1].includes(`|`)&&KM(o)||WM.test(o))return!0;VM.test(o)&&(i=!0,(e+1>=t.length||!t[e+1].trim())&&a++),HM.test(o)&&(n++,i=!0),UM.test(o)&&o.trim().length>1&&(r++,i=!0)}if(n>=2||r>=2)return!0;let o=(e.match(qM)??[]).length;return o>=2||i&&o>=1||a>=1&&(n>=1||a>=2)}var YM=!1;function XM(e){let t=[],n=e=>`\u0000${t.push(e)-1}\u0000`,r=e.replace(/[\u0000-\u0003]/g,``);return r=r.replace(/`([^`\n]{1,2000})`/g,(e,t)=>n(`<code>${BM(t)}</code>`)),r=r.replace(/!\[([^\]\n]{0,500})\]\((https?:\/\/[^)\s]{1,2000})(?:\s+(?:"[^"\n]{0,300}"|'[^'\n]{0,300}'))?\)/g,(e,t,r)=>n(YM&&/^https:\/\//i.test(r)?`<img data-import="${BM(r)}" alt="${BM(t.trim())}">`:`<a href="${BM(r)}">${BM(t.trim()||r)}</a>`)),r=r.replace(/\[([^\]\n]{1,500})\]\(((?:https?:\/\/|mailto:)[^)\s]{1,2000})(?:\s+(?:"[^"\n]{0,300}"|'[^'\n]{0,300}'))?\)/g,(e,t,r)=>`${n(`<a href="${BM(r)}">`)}\u0001${t}\u0002`),r=r.replace(/(^|[\s("'<])(https?:\/\/[^\s<)]{0,2000}[^\s<).,;:!?'"])/g,(e,t,r)=>`${t}${n(`<a href="${BM(r)}">${BM(r)}</a>`)}`),r=BM(r),r=r.replace(/(^|[^\w*])\*\*\*(?=\S)([^*]{0,2000}?\S)\*\*\*(?!\w)/g,`$1<strong><em>$2</em></strong>`),r=r.replace(/(^|[^\w*])\*\*(?=\S)([^*]{1,2000}?)\*\*(?!\w)/g,`$1<strong>$2</strong>`),r=r.replace(/(^|[^\w_])__(?=\S)([^_]{1,2000}?)__(?!\w)/g,`$1<strong>$2</strong>`),r=r.replace(/(^|[^\w*])\*(?=\S)([^*]{0,2000}?\S)\*(?!\w)/g,`$1<em>$2</em>`),r=r.replace(/(^|[^\w_])_(?=\S)([^_]{0,2000}?\S)_(?!\w)/g,`$1<em>$2</em>`),r=r.replace(/~~([^~]{1,2000})~~/g,`<s>$1</s>`),r=r.replace(/\u0001/g,``).replace(/\u0002/g,`</a>`),r.replace(/\u0000(\d+)\u0000/g,(e,n)=>t[Number(n)]??``)}function ZM(e){let t=[],n=``;for(let r=0;r<e.length;r++){let i=e[r];i===`\\`&&e[r+1]===`|`?(n+=`|`,r++):i===`|`?(t.push(n),n=``):n+=i}return t.push(n),t.length>1&&!t[0].trim()&&t.shift(),t.length>1&&!t[t.length-1].trim()&&t.pop(),t.map(e=>e.trim())}function QM(e,t=!1,n=!1){let r=YM;YM=n;try{return nN(e,{headings:t,tasks:t})}finally{YM=r}}var $M=1048576;function eN(e){let t=YM;YM=!1;try{return nN(e,{headings:!0,tasks:!1,rule:`<hr>`,max:$M}).replace(/<a href="/g,`<a target="_blank" rel="noopener noreferrer" href="`)}finally{YM=t}}var tN=12;function nN(e,t,n=0){let r=t.tasks;if(e.length>(t.max??zM)||n>tN)return`<p>${BM(e)}</p>`;let i=e.replace(/\r\n?/g,`
|
|
159
|
+
`).split(`
|
|
160
|
+
`),a=[],o=[],s=()=>{o.length&&=(a.push(`<p>${o.map(XM).join(`<br>`)}</p>`),0)},c=0;for(;c<i.length;){let e=i[c];if(!e.trim()){s(),c++;continue}if(WM.test(e)){s();let t=/^[ \t]{0,3}```[ \t]*([A-Za-z0-9_+-]{1,30})/.exec(e)?.[1]?.toLowerCase(),n=[];for(c++;c<i.length&&!WM.test(i[c]);)n.push(i[c++]);c++,a.push(`<pre><code${t?` class="language-${t}"`:``}>${BM(n.join(`
|
|
161
|
+
`))}</code></pre>`);continue}let l=VM.exec(e);if(l){s();let e=Math.min(3,l[1].length);a.push(t.headings?`<h${e}>${XM(l[2])}</h${e}>`:`<p><strong>${XM(l[2])}</strong></p>`),c++}else if(GM.test(e))s(),a.push(t.rule??`<p></p>`),c++;else if(e.includes(`|`)&&c+1<i.length&&KM(i[c+1])){s();let t=ZM(e);c+=2;let n=[];for(;c<i.length&&i[c].includes(`|`)&&i[c].trim();)n.push(ZM(i[c++]));let r=(e,n)=>`<tr>${t.map((t,r)=>`<${n}><p>${XM(e[r]??``)}</p></${n}>`).join(``)}</tr>`;a.push(`<table><tbody>${r(t,`th`)}${n.map(e=>r(e,`td`)).join(``)}</tbody></table>`)}else if(HM.test(e)){s();let e=[],t=[];for(;c<i.length;){if(!i[c].trim()){let e=c;for(;e<i.length&&!i[e].trim();)e++;if(e<i.length&&(HM.test(i[e])||/^[ \t]{2,}\S/.test(i[e]))){c=e;continue}break}let n=HM.exec(i[c]);if(!n){if(i[c].trim()&&/^[ \t]{2,}\S/.test(i[c])&&e.length){e[e.length-1]=e[e.length-1].replace(/<\/p>$/,`<br>${XM(i[c].trim())}</p>`),c++;continue}break}let a=n[1].replace(/\t/g,` `).length,o=/^\[( |x|X)\] +(.*)$/.exec(n[3]),s=r&&o?`task`:/\d/.test(n[2])?`ol`:`ul`,l=e=>`</li></${e===`task`?`ul`:e}>`;for(;t.length>1&&a<t[t.length-1].indent;)e.push(l(t.pop().tag));if(t.length&&a===t[t.length-1].indent&&t[t.length-1].tag!==s&&(e.push(l(t.pop().tag)),t.length&&e.push(`</li>`)),!t.length||a>t[t.length-1].indent){let r=s===`ol`?parseInt(n[2],10):1;e.push(s===`task`?`<ul data-type="taskList">`:r>1?`<ol start="${r}">`:`<${s}>`),t.push({tag:s,indent:a})}else e.push(`</li>`);s===`task`?e.push(`<li data-type="taskItem" data-checked="${o[1]===` `?`false`:`true`}"><p>${XM(o[2])}</p>`):e.push(`<li><p>${o?`${o[1]===` `?`☐`:`☑`} ${XM(o[2])}`:XM(n[3])}</p>`),c++}for(;t.length;){let n=t.pop().tag;e.push(`</li></${n===`task`?`ul`:n}>`)}a.push(e.join(``))}else if(UM.test(e)){s();let e=[];for(;c<i.length&&UM.test(i[c]);)e.push(i[c++].replace(UM,``));a.push(`<blockquote>${nN(e.join(`
|
|
162
|
+
`),t,n+1)}</blockquote>`)}else o.push(e.trim()),c++}return s(),a.join(``)}var rN=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),iN=()=>[...globalThis.crypto.getRandomValues(new Uint8Array(4))].map(e=>e.toString(16).padStart(2,`0`)).join(``),aN=(e,t)=>`<li data-type="taskItem" data-checked="false" data-id="${rN(e)}"><label><input type="checkbox"><span></span></label><div><p>${rN(t)}</p></div></li>`,oN=e=>e.replace(/<li data-type="taskItem"(?![^>]*\sdata-id=)/g,()=>`<li data-type="taskItem" data-id="${iN()}"`),sN=e=>e.length?`<ul data-type="taskList">${e.map(e=>aN(iN(),e)).join(``)}</ul>`:``,cN=e=>e.type.startsWith(`image/`),lN=`mw-quote`,uN=`border-collapse:collapse;margin:0 0 8px`,dN=`border:1px solid #c8c8c8;padding:4px 8px;vertical-align:top;text-align:left`,fN=`${dN};background:#f0f0f0;font-weight:bold`,pN=e=>!!e&&!!new DOMParser().parseFromString(e,`text/html`).body.textContent?.trim(),mN=e=>/<(p|li|ul|ol|table|h[1-6]|strong|b|em|i|a|blockquote|pre|code)[\s>]/i.test(e),hN=`margin:0 0 8px;padding:8px 10px;border-left:3px solid #e3a94f;background:#fbf5e9;color:#3a2f1c;font-family:Menlo,Consolas,monospace;font-size:12.5px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere`,gN=dC.create({name:`image`,group:`inline`,inline:!0,atom:!0,draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},width:{default:null},cid:{default:null,parseHTML:e=>e.getAttribute(`data-cid`)||(/^cid:/i.test(e.getAttribute(`src`)??``)?e.getAttribute(`src`).slice(4):null),renderHTML:e=>e.cid?{"data-cid":e.cid}:{}}}},parseHTML(){return[{tag:`img[src]`,getAttrs:e=>!/^picture:/i.test(e.getAttribute(`src`)??``)&&null}]},renderHTML({HTMLAttributes:e}){return[`img`,Cb(e)]}}),_N=dC.create({name:`image`,group:`inline`,inline:!0,atom:!0,draggable:!0,addAttributes(){return{src:{default:null},alt:{default:null},width:{default:null},height:{default:null}}},parseHTML(){return[{tag:`img[src]`,getAttrs:e=>/^data:image\/(png|jpeg|gif);base64,/.test(e.getAttribute(`src`)??``)?null:!1}]},renderHTML({HTMLAttributes:e}){return[`img`,Cb(e)]}}),vN=/^picture:([0-9a-f]{32})$/,yN=/^(https:\/\/[^\s]{1,1992}$|data:image\/(png|jpeg|gif|webp);base64,)/i,bN=112e5,xN=30,SN=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`);function CN(e,t){if(!/<img\b/i.test(e))return{html:e,any:!1,large:!1};let n=new DOMParser().parseFromString(e,`text/html`).body,r=!1,i=!1,a=0;for(let e of n.querySelectorAll(`img`)){let o=e.getAttribute(`src`)??``;if(vN.test(o))continue;let s=t=>{let n=parseFloat(e.getAttribute(t)??``);return Number.isFinite(n)?n:1/0},c=(e.getAttribute(`style`)??``).toLowerCase().replace(/\s+/g,``),l=s(`width`)<=2||s(`height`)<=2||/display:none|visibility:hidden|opacity:0(?![.\d])|(?:^|;)(?:width|height|max-width|max-height):[012]px/.test(c);if(e.removeAttribute(`srcset`),e.removeAttribute(`src`),e.removeAttribute(`data-import`),e.removeAttribute(`data-import-n`),l)e.remove();else if(/^data:/i.test(o)&&o.length>bN)i=!0,e.remove();else if(yN.test(o)){if(++a>xN){if(/^https:/i.test(o)){let t=n.ownerDocument.createElement(`a`);t.setAttribute(`href`,o),t.textContent=e.getAttribute(`alt`)||o,e.replaceWith(t)}else e.remove()}else e.setAttribute(`data-import`,o),e.setAttribute(`data-import-n`,t),r=!0}}return{html:n.innerHTML,any:r,large:i}}var wN=(e,t)=>dC.create({name:`image`,group:`inline`,inline:!0,atom:!0,draggable:!0,addAttributes(){let e=e=>{let n=t();return!!n&&e.getAttribute(`data-import-n`)===n&&yN.test(e.getAttribute(`data-import`)??``)};return{ref:{default:null,parseHTML:e=>vN.exec(e.getAttribute(`src`)??``)?.[1]??null,renderHTML:e=>e.ref?{src:`picture:${e.ref}`}:{}},alt:{default:null},width:{default:null},from:{default:null,parseHTML:t=>e(t)?t.getAttribute(`data-import`):null,renderHTML:()=>({})}}},parseHTML(){return[{tag:`img[src]`,getAttrs:e=>vN.test(e.getAttribute(`src`)??``)?null:!1},{tag:`img[data-import]`,getAttrs:e=>{let n=t();return n&&e.getAttribute(`data-import-n`)===n&&yN.test(e.getAttribute(`data-import`)??``)?null:!1}}]},renderHTML({node:e,HTMLAttributes:t}){let n=typeof e.attrs.from==`string`?e.attrs.from:``;return!e.attrs.ref&&/^https:/i.test(n)?[`a`,{href:n},String(e.attrs.alt||``)||n]:[`img`,Cb(t)]},addNodeView(){return({node:t})=>{let n=document.createElement(`img`),r=String(t.attrs.ref??``),i=typeof t.attrs.alt==`string`?t.attrs.alt:``,a=Number(t.attrs.width);n.className=`note-picture`,n.alt=i,Number.isFinite(a)&&a>0&&(n.width=a),n.dataset.ref=r;let o=e(),s=!1,c=!1,l=()=>{},u=()=>{if(l(),l=()=>{},n.classList.remove(`missing`,`unread`),n.alt=i,n.title=``,!r&&t.attrs.from)n.classList.add(`bringing`),n.alt=`Bringing a picture in…`;else{if(!o||!r)return d(!0);o.url(r).then(e=>{if(s)return o.release(r);c=!0,n.src=e},e=>{s||d(/no longer there/.test(e instanceof Error?e.message:String(e)))})}},d=e=>{n.removeAttribute(`src`),n.classList.add(`missing`),n.classList.toggle(`unread`,!e),n.alt=e?`A picture that is no longer there`:`A picture that could not be read: press to try again`,!e&&o&&(n.title=`Press to try again`,l=o.onRetry(u))};return n.addEventListener(`error`,()=>{!s&&c&&o&&(c=!1,o.release(r,!0),d(!1))}),n.addEventListener(`click`,()=>{n.classList.contains(`unread`)&&u()}),u(),{dom:n,destroy(){s=!0,l(),c&&o&&o.release(r)}}}}}),TN=new Ef(`picturePlaces`),EN=WS.create({name:`picturePlaces`,addProseMirrorPlugins(){return[new Cf({key:TN,state:{init:()=>c_.empty,apply(e,t){let n=t.map(e.mapping,e.doc),r=e.getMeta(TN);if(r?.add){let t=document.createElement(`span`);t.className=`note-picture-wait`,t.textContent=`Adding a picture…`,n=n.add(e.doc,[a_.widget(r.add.pos,t,{id:r.add.id,side:1})])}return r?.remove&&(n=n.remove(n.find(void 0,void 0,e=>e.id===r.remove))),n}},props:{decorations(e){return TN.getState(e)}}})]}}),DN=nk.extend({addAttributes(){return{...this.parent?.(),id:{default:null,keepOnSplit:!1,parseHTML:e=>e.getAttribute(`data-id`),renderHTML:e=>e.id?{"data-id":e.id}:{}}}}}),ON=()=>[...crypto.getRandomValues(new Uint8Array(4))].map(e=>e.toString(16).padStart(2,`0`)).join(``);function kN(e){let t=new Set,n=null;return e.doc.descendants((r,i)=>{if(r.type.name!==`taskItem`)return;let a=typeof r.attrs.id==`string`?r.attrs.id:``;if(a&&!t.has(a)){t.add(a);return}let o=ON();t.add(o),n=(n??e.tr).setNodeMarkup(i,void 0,{...r.attrs,id:o})}),n}var AN=WS.create({name:`todoIds`,addProseMirrorPlugins(){return[new Cf({appendTransaction:(e,t,n)=>e.some(e=>e.docChanged)?kN(n):null})]},onCreate(){let e=kN(this.editor.state);e&&this.editor.view.dispatch(e.setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1))}});function jN({editor:e,active:t,run:n,title:r,children:i}){return(0,W.jsx)(`button`,{type:`button`,className:`tool`,"aria-pressed":!!t,title:r,"aria-label":r,disabled:!e.isEditable,onMouseDown:e=>e.preventDefault(),onClick:n,children:i})}function MN({initialHtml:e,onChange:t,placeholder:n,autoFocus:r,locked:i=!1,onFiles:a,onImages:o,onAttach:s,onHelp:c,plain:l=!1,notes:u=!1,pictures:d,pictureSource:f,below:p,onMarkdown:m,onLeaveUp:h,ref:g}){let _=(0,L.useRef)(f);_.current=f;let v=(0,L.useRef)(null),y=(0,L.useRef)(new Set),b=e=>{let t=_.current,n=new Set;e.state.doc.descendants(e=>{e.type.name===`image`&&!e.attrs.ref&&typeof e.attrs.from==`string`&&e.attrs.from&&!y.current.has(e.attrs.from)&&n.add(e.attrs.from)});let r=(t,n)=>{if(y.current.delete(t),e.isDestroyed)return;let r=[];e.state.doc.descendants((e,n)=>{e.type.name===`image`&&!e.attrs.ref&&e.attrs.from===t&&r.push({pos:n,attrs:e.attrs})});for(let i of r.reverse())if(n)e.view.dispatch(e.state.tr.setNodeMarkup(i.pos,void 0,{...i.attrs,ref:n,from:null}).setMeta(`addToHistory`,!1));else{let n=/^https:/i.test(t)?`<a href="${SN(t)}">${SN(String(i.attrs.alt||``)||t)}</a>`:``;e.chain().setMeta(`addToHistory`,!1).insertContentAt({from:i.pos,to:i.pos+1},n,{updateSelection:!1}).run()}};for(let e of n)y.current.add(e),(t&&y.current.size<=xN?t.bring(e):Promise.reject(Error(`too many pictures at once`))).then(t=>r(e,t),()=>r(e,null))},x=(0,L.useRef)(c);x.current=c;let S=(0,L.useRef)(h);S.current=h;let C=(0,L.useRef)(n);C.current=n;let w=(0,L.useRef)(null),T=e=>{let t=e.filter(cN),n=e.filter(e=>!cN(e));t.length&&o?.(t),n.length&&a?.(n)},[E,D]=(0,L.useState)(null),O=(0,L.useRef)(m);O.current=m;let k=(0,L.useRef)(null),A=Mw({extensions:[Qk.configure({heading:u?{levels:[1,2,3]}:!1,blockquote:!l&&{HTMLAttributes:{class:lN}},codeBlock:!u&&{HTMLAttributes:{style:hN}},horizontalRule:!1,link:{openOnClick:!1,autolink:!0,defaultProtocol:`https`,HTMLAttributes:{rel:null,target:null}}}),Wk.configure({placeholder:()=>C.current}),...u?[gA(hN),rk,DN.configure({nested:!0}),AN,wN(()=>_.current,()=>v.current),EN]:[],...l?d?[_N,RM.configure({table:{resizable:!1}})]:[]:[...u?[]:[gN],RM.configure({table:{HTMLAttributes:{style:uN},resizable:!1},tableCell:{HTMLAttributes:{style:dN}},tableHeader:{HTMLAttributes:{style:fN}}})]],content:e,editable:!i,autofocus:r?`end`:!1,shouldRerenderOnTransaction:!0,onUpdate:({editor:e})=>{t(e.getHTML(),e.isEmpty),u&&b(e)},editorProps:{handleDOMEvents:u?{paste:()=>(_.current&&(v.current=ON(),queueMicrotask(()=>{v.current=null})),!1)}:{},transformPastedHTML:e=>{let t=v.current;if(!u||!t)return e;let n=CN(e,t);return n.large&&_.current?.refused(`A pasted picture is more than a note holds (8 MB): it was left out.`),n.html},attributes:{class:`rich`,role:`textbox`,"aria-multiline":`true`,"aria-label":n},handleKeyDown:(e,t)=>{if(S.current&&!t.metaKey&&!t.ctrlKey&&!t.altKey){let{empty:n,$from:r}=e.state.selection,i=n;for(let e=0;i&&e<r.depth;e++)r.index(e)!==0&&(i=!1);if(t.key===`ArrowUp`&&!t.shiftKey&&i&&e.endOfTextblock(`up`))return t.preventDefault(),S.current(),!0;let a=k.current;if(t.key===`Tab`&&t.shiftKey&&a&&!a.isActive(`listItem`)&&!a.isActive(`taskItem`)&&!a.isActive(`table`))return t.preventDefault(),S.current(),!0}if(t.key!==`/`||t.metaKey||t.ctrlKey||t.altKey||!x.current)return!1;let{empty:n,$from:r}=e.state.selection;return!n||r.depth!==1||r.parent.type.name!==`paragraph`||r.parent.content.size>0?!1:(t.preventDefault(),x.current(),!0)},handlePaste:(e,t)=>{let n=t.clipboardData;if(l){let e=[...n?.files??[]].filter(cN);return d&&e.length&&!(n?.getData(`text/plain`)??``).trim()?(o?.(e),!0):!1}let r=n?.getData(`text/html`)??``,i=n?.getData(`text/plain`)??``;if(!e.input?.shiftKey&&!mN(r)&&!e.state.selection.$from.parent.type.spec.code&&JM(i)){t.preventDefault();let e=k.current;if(!e)return!0;e.view.dispatch(Ov(e.state.tr));let n=u?v.current:null,r=QM(i,u,!!n);e.chain().focus().insertContent(n?CN(r.replace(/<img data-import="/g,`<img src="`),n).html:r).run(),e.view.dispatch(Ov(e.state.tr));let a=e.state.doc;return O.current?.(()=>{if(e.isDestroyed||e.state.doc!==a)return!1;e.chain().focus().undo().run();let t=i.replace(/\r\n?/g,`
|
|
163
|
+
`).split(`
|
|
164
|
+
`).map(e=>`<p>${e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`)}</p>`).join(``);return e.chain().focus().insertContent(t).run(),!0}),!0}let a=[...n?.files??[]];return!a.length||pN(r)?!1:(T(a),!0)},handleDrop:(e,t,n,r)=>{if(r)return!1;let i=t,a=[...i.dataTransfer?.files??[]];if(!a.length)return!1;if(t.preventDefault(),l&&!d)return!0;let o=e.posAtCoords({left:i.clientX,top:i.clientY});return o&&e.dispatch(e.state.tr.setSelection(X.near(e.state.doc.resolve(o.pos)))),T(a),!0}}});if((0,L.useEffect)(()=>{A&&A.isEditable===i&&A.setEditable(!i)},[A,i]),(0,L.useImperativeHandle)(g,()=>{let e=(e,t)=>{if(!A)return;let n=[];A.state.doc.descendants((t,r)=>{t.type.name===`image`&&t.attrs.cid===e&&n.push({pos:r,attrs:t.attrs})});for(let e of n.reverse())t(e.pos,e.attrs)};return{insertImage:({src:e,cid:t,alt:n})=>{A?.chain().focus().insertContent({type:`image`,attrs:{src:e,cid:t,alt:n??null}}).run()},setImage:(t,n,r)=>e(t,(e,t)=>{let i=A.state.tr.setNodeMarkup(e,void 0,{...t,...n});A.view.dispatch(r?i.setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1):i)}),removeImage:t=>e(t,e=>{A.view.dispatch(A.state.tr.delete(e,e+1))}),setHtml:e=>{A?.chain().focus().setContent(e,{emitUpdate:!0}).run()},insertHtml:e=>{A?.chain().focus().insertContent(e).run()},insertText:e=>{let t=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`);A?.chain().focus().insertContent(e.replace(/\r\n?/g,`
|
|
165
|
+
`).split(`
|
|
166
|
+
`).map(e=>`<p>${t(e)}</p>`).join(``)).run()},undo:()=>{A?.chain().focus().undo().run()},focus:e=>{A&&(e===`end`&&A.commands.setTextSelection(A.state.doc.content.size),A.view.focus(),A.commands.scrollIntoView(),u||A.commands.focus(e))},placePicture:()=>{if(!A||A.isDestroyed)return null;let e=ON();return A.view.dispatch(A.state.tr.setMeta(TN,{add:{id:e,pos:A.state.selection.to}}).setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1)),e},fillPicture:(e,t)=>{if(!A||A.isDestroyed)return!1;let n=TN.getState(A.state)?.find(void 0,void 0,t=>t.id===e)[0];return n?(A.view.dispatch(A.state.tr.setMeta(TN,{remove:e}).setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1)),!t||A.chain().insertContentAt(n.from,{type:`image`,attrs:{ref:t.ref,alt:t.alt??null}},{updateSelection:!1}).run()):!1},html:()=>A?.getHTML()??``,applyOp:e=>{if(!A)return;let t=e=>A.view.dispatch(e.setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1)),{doc:n,schema:r}=A.state,i=()=>{let e=n.content.size,t=n.childCount-1;for(;t>=0&&n.child(t).type.name===`paragraph`&&n.child(t).content.size===0;)e-=n.child(t).nodeSize,t--;return{last:t>=0?n.child(t):null,end:e}};if(e.kind===`tick`){let r=-1;n.descendants((t,n)=>{t.type.name===`taskItem`&&t.attrs.id===e.item&&t.attrs.checked!==e.checked&&(r=n)}),r>=0&&t(A.state.tr.setNodeMarkup(r,void 0,{...n.nodeAt(r).attrs,checked:e.checked}))}else if(e.kind===`todo`){let a=!1;if(n.descendants(t=>{t.type.name===`taskItem`&&t.attrs.id===e.item&&(a=!0)}),a)return;let o=r.nodes.taskItem.create({checked:!1,id:e.item},r.nodes.paragraph.create(null,e.text?r.text(e.text):void 0)),{last:s,end:c}=i();t(s?.type.name===`taskList`?A.state.tr.insert(c-1,o):A.state.tr.insert(c,r.nodes.taskList.create(null,o)))}else A.chain().setMeta(`preventUpdate`,!0).setMeta(`addToHistory`,!1).insertContentAt(i().end,e.html,{updateSelection:!1}).run()}}},[A]),k.current=A,!A)return null;let j=()=>A.chain().focus(),ee=!l&&A.isActive(`table`),M=()=>{let{$from:e}=A.state.selection;for(let t=e.depth;t>0;t--){if(e.node(t).type.name!==`table`)continue;let n=e.after(t),r=A.state.doc.resolve(n).nodeAfter;!r||r.type.name!==`paragraph`?j().insertContentAt(n,{type:`paragraph`}).setTextSelection(n+1).run():j().setTextSelection(n+1).run();return}},te=()=>{j().insertTable({rows:3,cols:3,withHeaderRow:!0}).run();let{doc:e}=A.state;e.lastChild?.type.name===`table`&&A.chain().insertContentAt(e.content.size,{type:`paragraph`}).run()},ne=()=>{let e=(E??``).trim();e?j().extendMarkRange(`link`).setLink({href:/^[a-z][a-z0-9+.-]*:/i.test(e)?e:`https://${e}`}).run():j().extendMarkRange(`link`).unsetLink().run(),D(null)};return(0,W.jsxs)(`div`,{className:`editor`,children:[(0,W.jsx)(Tw,{editor:A}),p,E!=null&&(0,W.jsxs)(`div`,{className:`linkbar`,children:[(0,W.jsx)(Wn,{size:14}),(0,W.jsx)(`input`,{autoFocus:!0,type:`text`,placeholder:`Paste a link, Enter to apply`,value:E,onChange:e=>D(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),e.stopPropagation(),ne()),e.key===`Escape`&&(e.stopPropagation(),D(null),A.commands.focus())}}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:ne,children:E.trim()?`Apply`:`Remove`})]}),ee&&(0,W.jsxs)(`div`,{className:`tablebar`,role:`toolbar`,"aria-label":`Table`,children:[(0,W.jsxs)(`span`,{className:`tablebar-name`,children:[(0,W.jsx)(Ni,{size:13}),` Table`]}),(0,W.jsx)(jN,{editor:A,run:()=>j().addRowAfter().run(),title:`Add a row below`,children:(0,W.jsx)(Ke,{size:15})}),(0,W.jsx)(jN,{editor:A,run:()=>j().addColumnAfter().run(),title:`Add a column to the right`,children:(0,W.jsx)(Je,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`tool text`,onMouseDown:e=>e.preventDefault(),onClick:()=>j().deleteRow().run(),title:`Remove this row`,children:`− Row`}),(0,W.jsx)(`button`,{type:`button`,className:`tool text`,onMouseDown:e=>e.preventDefault(),onClick:()=>j().deleteColumn().run(),title:`Remove this column`,children:`− Column`}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`tableHeader`),run:()=>j().toggleHeaderRow().run(),title:`First row as a header`,children:(0,W.jsx)(Bn,{size:14})}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(jN,{editor:A,run:()=>j().deleteTable().run(),title:`Remove this table`,children:(0,W.jsx)(zi,{size:14})}),(0,W.jsx)(jN,{editor:A,run:M,title:`Leave the table (the text goes on under it)`,children:(0,W.jsx)(la,{size:14})})]}),(0,W.jsxs)(`div`,{className:`toolbar`,role:`toolbar`,"aria-label":`Formatting`,children:[(0,W.jsx)(jN,{editor:A,active:A.isActive(`bold`),run:()=>j().toggleBold().run(),title:`Bold (⌘B)`,children:(0,W.jsx)(Bn,{size:15})}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`italic`),run:()=>j().toggleItalic().run(),title:`Italic (⌘I)`,children:(0,W.jsx)(Pn,{size:15})}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`underline`),run:()=>j().toggleUnderline().run(),title:`Underline (⌘U)`,children:(0,W.jsx)(Ui,{size:15})}),(0,W.jsx)(`span`,{className:`tool-sep`}),u&&(0,W.jsx)(jN,{editor:A,active:A.isActive(`heading`),run:()=>j().toggleHeading({level:2}).run(),title:`Heading (# at the start of a line)`,children:(0,W.jsx)(Hn,{size:15})}),u&&(0,W.jsx)(jN,{editor:A,active:A.isActive(`taskList`),run:()=>j().toggleTaskList().run(),title:`To-do list ([ ] at the start of a line)`,children:(0,W.jsx)(Jn,{size:15})}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`bulletList`),run:()=>j().toggleBulletList().run(),title:`Bulleted list`,children:(0,W.jsx)(Xn,{size:15})}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`orderedList`),run:()=>j().toggleOrderedList().run(),title:`Numbered list`,children:(0,W.jsx)(Kn,{size:15})}),!l&&(0,W.jsx)(jN,{editor:A,active:A.isActive(`blockquote`),run:()=>j().toggleBlockquote().run(),title:`Quote (> at the start of a line)`,children:(0,W.jsx)(Ur,{size:15})}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`codeBlock`),run:()=>j().toggleCodeBlock().run(),title:"Snippet (``` at the start of a line)",children:(0,W.jsx)(Vt,{size:15})}),(0,W.jsx)(`span`,{className:`tool-sep`}),(0,W.jsx)(jN,{editor:A,active:A.isActive(`link`),run:()=>D(A.getAttributes(`link`).href??``),title:`Link`,children:(0,W.jsx)(Wn,{size:15})}),(!l||d)&&(!u||o)&&(0,W.jsx)(jN,{editor:A,run:()=>w.current?.click(),title:l?`Insert a picture (a logo, a photo)`:`Insert a picture in the text`,children:(0,W.jsx)(An,{size:15})}),!l&&(0,W.jsx)(jN,{editor:A,active:ee,run:()=>ee?j().deleteTable().run():te(),title:ee?`Remove this table`:`Insert a table`,children:(0,W.jsx)(Ni,{size:15})}),(0,W.jsx)(jN,{editor:A,run:()=>j().unsetAllMarks().clearNodes().run(),title:`Clear formatting`,children:(0,W.jsx)(qr,{size:15})}),(0,W.jsx)(`span`,{className:`grow`}),c&&(0,W.jsx)(jN,{editor:A,run:c,title:`Help me write (/ on an empty line)`,children:(0,W.jsx)(hi,{size:15})}),s&&(0,W.jsx)(jN,{editor:A,run:s,title:`Attach files`,children:(0,W.jsx)(Cr,{size:15})})]}),(0,W.jsx)(`input`,{ref:w,type:`file`,accept:d??`image/*`,multiple:!d||u,hidden:!0,"aria-label":`Picture file`,onChange:e=>{let t=[...e.target.files??[]],n=d?t:t.filter(cN);n.length&&o?.(n),e.target.value=``}})]})}var NN=new Set([`docx`,`docm`,`dotx`,`xlsx`,`xlsm`,`xltx`,`pptx`,`pptm`,`ppsx`,`potx`,`odt`,`ods`,`odp`,`rtf`]),PN=/^application\/(vnd\.openxmlformats-officedocument\.|vnd\.ms-(word|excel|powerpoint)\.[a-z.]*macroenabled|vnd\.oasis\.opendocument\.(text|spreadsheet|presentation)$|rtf$)/i;function FN(e,t=``){let n=(/\.([a-z0-9]+)$/i.exec(e)?.[1]??``).toLowerCase();return NN.has(n)||!n&&PN.test(t)}var IN=null,LN=()=>IN??=k(()=>import(`./officeparser.browser.slim-kEjhTrQ1.js`),__vite__mapDeps([19,3,5,6]),import.meta.url).catch(e=>{throw IN=null,e});async function RN(e,t){if(e.size>20971520)throw Error(`This file is too large to show here.`);let{parseOffice:n}=await LN();return n(new Uint8Array(await e.arrayBuffer()),{extractAttachments:!0,ocr:!1,allowRemoteAssets:!1,ignoreSlideMasters:!0,includeBreakNodes:!0,abortSignal:t??null,decompressionLimits:{maxUncompressedBytes:209715200,maxZipEntries:5e3,maxTableCells:2e5,maxXmlElements:1e6}})}function zN(e){let t=e instanceof Error?e.message:String(e);return/password|encrypt/i.test(t)?`This file is protected by a password.`:t.split(`
|
|
167
|
+
`)[0].slice(0,200)||`This file could not be read.`}var BN=e=>(/\.([a-z0-9]+)$/i.exec(e)?.[1]||``).toLowerCase(),VN={png:`image/png`,jpg:`image/jpeg`,jpeg:`image/jpeg`,gif:`image/gif`,webp:`image/webp`,avif:`image/avif`,bmp:`image/bmp`,pdf:`application/pdf`},HN=new Set(`txt.log.md.csv.tsv.json.xml.yaml.yml.ini.conf.sql.sh.js.ts.tsx.jsx.py.rb.go.java.c.h.cpp.css.diff.patch.ics.eml.env.toml`.split(`.`));function UN(e,t=``){let n=BN(e),r=t.toLowerCase();return VN[n]?.startsWith(`image/`)||r.startsWith(`image/`)&&r!==`image/svg+xml`&&Object.values(VN).includes(r)?`image`:n===`pdf`||r===`application/pdf`?`pdf`:r.startsWith(`audio/`)?`audio`:r.startsWith(`video/`)?`video`:n===`eml`||r===`message/rfc822`?`mail`:FN(e,r)?`office`:n===`zip`||!n&&(r===`application/zip`||r===`application/x-zip-compressed`)?`archive`:HN.has(n)||r===`text/plain`||r===`text/csv`||r===`application/json`||r===`text/markdown`||r===`text/calendar`?`text`:`other`}function WN(e,t,n){return n===`image`||n===`pdf`?VN[BN(e)]||(Object.values(VN).includes(t.toLowerCase())?t.toLowerCase():`application/octet-stream`):n===`audio`||n===`video`?t:`application/octet-stream`}var GN=new Map,KN=`␟`,qN=(e,t)=>[e,...t].join(KN);function JN(e){if(!e.includes(KN))return null;let[t,...n]=e.split(KN);return{id:t,path:n}}function YN(e,t){let n=`${e}|${t.id}`,r=GN.get(n);if(!r){let i=JN(e);if(r=(i?U(`attachmentAt`,{id:i.id,path:[...i.path,t.id]}):U(`attachment`,{id:e,attachmentId:t.id})).then(e=>{let n=e.name||t.name||`attachment`,r=UN(n,e.contentType),i=Uint8Array.from(atob(e.data),e=>e.charCodeAt(0)),a=new Blob([i],{type:WN(n,e.contentType||``,r)});return{url:URL.createObjectURL(a),blob:a,name:n,kind:r}}),r.catch(()=>GN.delete(n)),GN.set(n,r),GN.size>16){let[e,t]=GN.entries().next().value;GN.delete(e),t.then(e=>URL.revokeObjectURL(e.url),()=>{})}}return r}function XN(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.click()}function ZN(e){return new Promise((t,n)=>{let r=new FileReader;r.onerror=()=>n(r.error??Error(`could not read the file`)),r.onload=()=>t(String(r.result).split(`,`)[1]??``),r.readAsDataURL(e)})}var QN=null,$N=new Set,eP={refresh(){m.get().then(e=>{let t=!!e.activeId&&!!e.connections.find(t=>t.id===e.activeId)?.model;t!==QN&&(QN=t,$N.forEach(e=>e()))},()=>{})},subscribe(e){return $N.add(e),QN===null&&(QN=!1,eP.refresh()),()=>{$N.delete(e)}}};function tP(){return(0,L.useSyncExternalStore)(eP.subscribe,()=>QN===!0)}var nP=new Map;function rP(e){let t=e??``,n=nP.get(t);return n||(n=U(`whoami`,{account:e}).catch(()=>(nP.delete(t),{email:``,name:``})),nP.set(t,n)),n}var iP=()=>nP.clear(),aP=[[`Polish`,`Polish it: fix grammar, spelling and awkward phrasing. Keep its meaning, its length and its language.`],[`Formalize`,`Make it more formal and professional. Keep its meaning and its language.`],[`Friendly`,`Make it warmer and friendlier. Keep its meaning and its language.`],[`Shorten`,`Make it shorter: keep what matters, drop the rest. Keep its language.`]],oP=new Map,sP={has:e=>oP.has(e),url:e=>oP.get(e),keep(e,t){let n=URL.createObjectURL(t);return oP.set(e,n),n},newCid:()=>`${crypto.randomUUID()}@sideora`},cP=e=>new DOMParser().parseFromString(e,`text/html`);function lP(e){if(!/cid:/i.test(e))return e;let t=cP(e);for(let e of t.querySelectorAll(`img`)){let t=e.getAttribute(`src`)??``;if(!/^cid:/i.test(t))continue;let n=t.slice(4);e.setAttribute(`data-cid`,n);let r=oP.get(n);r&&e.setAttribute(`src`,r)}return t.body.innerHTML}function uP(e){if(!e.includes(`data-cid`))return e;let t=cP(e);for(let e of t.querySelectorAll(`img[data-cid]`))e.setAttribute(`src`,`cid:${e.getAttribute(`data-cid`)}`),e.removeAttribute(`data-cid`);return t.body.innerHTML}function dP(e,t){let n=Uint8Array.from(atob(e),e=>e.charCodeAt(0));return new Blob([n],{type:t||`application/octet-stream`})}var fP=6e3,pP=`mw:sent`;function mP(e,t,n){let r=!1,i=U(`saveDraft`,t).then(n=>(G.patch(e,{ref:n,keepQuoted:t.keepQuoted||t.kind!==`new`&&t.kind!==`edit`}),n));i.catch(()=>{}),G.patch(e,{sending:!0});let a=K.show({text:`Sending ${n}…`,duration:fP,countdown:!0,action:{label:`Undo`,run:()=>{r=!0,G.patch(e,{sending:!1}),K.dismiss(a),K.show({text:`Not sent. Your draft is kept.`})}}});setTimeout(async()=>{if(!r)try{let t=await i;if(r)return;await U(`sendDraft`,t),G.remove(e),K.show({kind:`ok`,text:`Sent`}),window.dispatchEvent(new CustomEvent(pP))}catch(t){G.patch(e,{sending:!1}),K.error(t,`Not sent, your draft is kept: `)}},fP)}var hP=new Map;function gP(e,t){hP.set(e,t),hP.size>60&&hP.delete(hP.keys().next().value)}async function _P(e){let t=hP.get(e);if(t)return t;let n=await U(`read`,{id:e});return gP(e,n),n}var vP=null,yP=e=>(e||``).trim().toLowerCase(),bP=e=>yP(e).replace(/\+[^@]*@/,`@`);async function xP(e){vP??=U(`accounts`).then(e=>e.flatMap(e=>[e.email??``,...e.aliases??[]]).filter(Boolean),()=>(vP=null,[]));let[t,n]=await Promise.all([rP(e),vP]),r=new Set([t.email,...n].map(bP).filter(Boolean)),i=new Set([t.email].map(bP).filter(Boolean)),a=e=>!!e&&r.has(bP(e));return a.self=e=>!!e&&i.has(bP(e)),a}function SP(e){let t=(e||``).trim();return/^(re|aw|antw|sv|vs|tr|wg|ré)\s*:/i.test(t)?t:`Re: ${t}`}function CP(e,t,n){let r=new Set,i=(e=[],t=!1)=>e.filter(e=>{let i=yP(e?.email);return!i||!t&&n(i)||r.has(i)?!1:(r.add(i),!0)}),a=(t.replyTo||[]).filter(e=>e?.email),o=a.length?a:[{name:t.fromName,email:t.fromEmail}],s=(n.self??n)(t.fromEmail)?i(t.to):i(o,!0);e&&s.push(...i(t.to));let c=e?i(t.cc):[];return ko([...s,...c]),{to:s.map(e=>e.email).join(`, `),cc:c.map(e=>e.email).join(`, `)}}async function wP(e,t){let[n,r]=await Promise.all([_P(t.id),xP(t.account)]);return{...CP(e,n,r),subject:SP(n.subject||t.subject)}}function TP(e,t){let n=null,r=!1,i=()=>{n&&U(`assistantStop`,{run:n}).catch(()=>{})};return{result:(async()=>{n=(await U(`assistantStart`,e)).run,r&&i();let a=0,o=0;for(;;){let e;try{e=await U(`assistantWait`,{run:n,after:a,waitMs:2e4}),o=0}catch(e){if(++o>3||/no longer here/.test(String(e?.message)))throw e;await new Promise(e=>setTimeout(e,1e3*o));continue}for(let i of e.events)if(a=Math.max(a,i.n),i.type===`step`)t.onStep(i.label);else if(i.type===`open`)r||t.onOpen(i);else if(i.type===`ask`){let e=i.ask,a=n;t.onAsk(i.query).then(t=>U(`assistantAnswer`,{run:a,ask:e,ok:t&&!r}).catch(()=>{}),()=>{})}if(e.done&&e.answer)return{answer:e.answer,kept:typeof e.kept==`number`?e.kept:null}}})(),cancel:()=>{r=!0,i()}}}var EP=(e,t)=>e.html===t.html&&e.subject===t.subject&&e.to===t.to&&e.cc===t.cc&&e.bcc===t.bcc;function DP({api:e,hasDraft:t,onClose:n}){let[r,i]=(0,L.useState)(``),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(null),l=(0,L.useRef)(null),u=(0,L.useRef)(null);(0,L.useEffect)(()=>()=>l.current?.(),[]);let d=async t=>{if(a||!t.trim())return;let n=e.compose.snapshot();o(!0);let r=Promise.resolve(),s=null,d=(t,n)=>{r=r.then(async()=>{f||s||(t===`setBody`&&n.html!==void 0?e.compose.setBody(n.html):t===`insertAtCursor`&&n.html!==void 0?e.compose.insertAtCursor(n.html):t===`setSubject`&&n.subject!==void 0&&e.compose.get().hasSubject?e.compose.setSubject(n.subject):t===`addRecipient`&&n.field&&n.address?await e.compose.addRecipient(n.field,n.address):t===`removeRecipient`&&n.field&&n.address&&await e.compose.removeRecipient(n.field,n.address))}).catch(e=>{s=e})},f=!1;try{let a=e.compose.get(),o=TP({chat:``,askedAt:0,turns:[],text:t.trim(),files:[],model:``,zone:Intl.DateTimeFormat().resolvedOptions().timeZone,write:{instruction:t.trim(),page:!0,compose:{kind:a.kind,to:a.to,cc:a.cc,bcc:a.bcc,subject:a.subject,hasSubject:a.hasSubject,html:a.html,signature:a.signature},...e.source?.id?{source:{id:e.source.id,from:e.source.from,subject:e.source.subject}}:{},...e.account?.()?{account:e.account()}:{}}},{onStep:()=>{},onOpen:e=>{let t=e;t.what===`compose`&&t.op&&!f&&d(t.op,e)},onAsk:async()=>!1});l.current=()=>{f=!0,o.cancel()};let{answer:u}=await o.result;if(await r,f)throw Error(`cancelled`);if(s)throw Error(`a change could not be made (${s instanceof Error?s.message:String(s)}): nothing was changed`);if(u.role!==`assistant`||u.failed)throw u.role===`assistant`&&u.text===`Stopped.`?Error(`it took too long, and was stopped: nothing was changed`):Error(u.role===`assistant`?u.text.replace(/^That did not work: /,``):`it did not answer`);let p=u.write?.said;p&&K.show({text:p,duration:8e3}),EP(n,e.compose.snapshot())||c(n),i(``)}catch(t){await r,EP(n,e.compose.snapshot())||e.compose.restore(n),t instanceof Error&&t.message===`cancelled`||K.error(t,`Could not do it: `)}finally{l.current=null,o(!1),requestAnimationFrame(()=>u.current?.focus())}};return(0,W.jsxs)(`div`,{className:`write-bar${a?` running`:``}`,children:[(0,W.jsx)(hi,{size:15,className:`write-icon`}),a?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`write-status`,role:`status`,children:`Writing…`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>l.current?.(),title:`Stop`,"aria-label":`Stop`,children:(0,W.jsx)(Ci,{size:13})})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{ref:u,type:`text`,value:r,onChange:e=>i(e.target.value),onKeyDown:e=>{e.key===`Enter`&&!e.metaKey&&!e.ctrlKey?(e.preventDefault(),e.stopPropagation(),d(r)):e.key===`Escape`&&(e.stopPropagation(),n())},placeholder:t?`Describe your change`:`Describe your message`,"aria-label":t?`Describe your change`:`Describe your message`,autoFocus:!0,autoComplete:`off`}),r.trim()?(0,W.jsx)(`button`,{type:`button`,className:`btn icon primary write-go`,onClick:()=>d(r),title:`Do it (Enter)`,"aria-label":`Do it`,children:(0,W.jsx)(B,{size:15})}):t&&aP.map(([e,t])=>(0,W.jsx)(`button`,{type:`button`,className:`btn write-quick`,onClick:()=>d(t),title:t,children:e},e)),s&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>{e.compose.restore(s),c(null)},title:`Undo what it did`,"aria-label":`Undo what it did`,children:(0,W.jsx)(Gi,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:n,title:`Close (Esc)`,"aria-label":`Close writing help`,children:(0,W.jsx)(la,{size:14})})]})]})}var OP=20971520,kP=2500,AP=(e,t=``,n)=>({kind:e,to:t,cc:``,bcc:``,subject:``,html:``,keepQuoted:!1,loaded:!1,attachments:[],account:n,sigSalt:Nc()}),jP=e=>!/<img\b/i.test(e)&&!e.replace(/<[^>]+>| |\s/g,``),MP=560,NP=e=>{let t=e;if(t.includes(`<table`)){let e=new DOMParser().parseFromString(t,`text/html`);for(let t of e.querySelectorAll(`td, th`)){if(t.children.length!==1||t.firstElementChild.tagName!==`P`||t.childNodes.length!==1)continue;let e=t.firstElementChild;e.replaceWith(...e.childNodes)}t=e.body.innerHTML}return t.replace(/<p><\/p>/g,`<p><br></p>`)},PP=(e=``)=>To(wo(e).filter(e=>Co.test(e))),FP=e=>[e.to,e.cc,e.bcc??``].flatMap(wo).filter(e=>!Co.test(e)),IP=e=>/not found|no such|ItemNotFound/i.test(e instanceof Error?e.message:String(e)),LP=e=>e.kind===`new`||e.kind===`forward`||e.kind===`edit`||e.loaded,RP=e=>e.kind===`new`||e.kind===`edit`||e.loaded,zP=e=>e===`reply`||e===`replyAll`,BP=e=>!!e.auto&&e.to===e.auto.to&&e.cc===e.auto.cc&&!(e.bcc??``).trim(),VP=e=>zP(e.kind)&&e.auto?!BP(e)||e.subject!==e.auto.subject:!!(e.to.trim()||e.subject.trim()),HP=e=>!!e.ref||!jP(e.html)||LP(e)&&VP(e),UP=e=>{let t={to:e.folder===`sent`?``:e.fromEmail,cc:``,subject:SP(e.subject)};return{to:t.to,cc:t.cc,subject:t.subject,auto:t,loaded:!0}},WP=(e,t,n,r)=>{let i=new Set((t.inline??[]).map(e=>e.cid)),a=[],o=[];for(let s of e)n.includes(`cid:${s.cid}`)||!Mc(s.cid)&&i.has(s.cid)?a.push(s):t.sigSalt&&Ic(s.cid,t.sigSalt)&&r.has(s.cid)&&o.push(s);return{inline:a,sigPics:o}},GP=e=>e.sigSalt??`00000000`,KP=(e,t=[])=>new Set([...(e.sigPics??[]).map(e=>e.cid),...t]),qP=e=>e&&e.includes(`:`)?e.split(`:`)[0]:void 0;function JP({kind:e,source:t,draftId:n,slot:r,initialTo:i,account:a,accounts:o=[],inline:s=!!t,onApi:c,onClose:l}){let u=G.key(e,t?.id??n??r),[d,f]=(0,L.useState)(()=>{let n=G.get(u);if(!n)return zP(e)&&t?{...AP(e),...UP(t)}:AP(e,i,e===`new`?a:void 0);let r={...n,sending:!1,sigSalt:n.sigSalt??Nc()};if(zP(e)&&t){if(!r.loaded||!r.to.trim()&&!r.cc.trim()&&!(r.bcc??``).trim())return{...r,kind:e,...UP(t),dirty:!0};if(r.kind!==e)return{...r,kind:e,auto:r.auto??{to:r.to,cc:r.cc,subject:r.subject}}}return{...r,to:n.to||i||``}}),[p,m]=(0,L.useState)(null),[h,g]=(0,L.useState)(!1),_=(0,L.useRef)(!1),v=e=>{_.current=e,g(e)},[y,b]=(0,L.useState)(()=>d.ref&&!d.dirty?`saved`:`idle`),[x,S]=(0,L.useState)([]),[C,w]=(0,L.useState)(()=>!!d.cc),[T,E]=(0,L.useState)(()=>!!d.bcc),D=tP(),[O,k]=(0,L.useState)(!1),[A,j]=(0,L.useState)(0),ee=ac(),M=(0,L.useRef)(d),te=(0,L.useRef)(!1),ne=(0,L.useRef)(!1),re=(0,L.useRef)(!1),ie=(0,L.useRef)(Promise.resolve()),ae=(0,L.useRef)(void 0),oe=(0,L.useRef)(null),se=(0,L.useRef)(null),N=(0,L.useRef)(Promise.resolve()),le=(0,L.useRef)(0),ue=(0,L.useRef)(!1),de=async()=>{for(let e=N.current;;e=N.current)if(await e,e===N.current)return},fe=e=>LP(e)&&!(ue.current&&BP(e)),{kind:pe}=d,me=zP(pe),P=LP(d),he=RP(d),F=(0,L.useCallback)(e=>{if(M.current={...M.current,...e},f(M.current),te.current)return;let t=M.current;ne.current&&t.kind===`new`&&t.ref&&!t.dirty?G.remove(u):!jP(t.html)||VP(t)||t.ref?G.set(u,t):G.remove(u)},[u]),I=(0,L.useCallback)(e=>{let t=ie.current.then(e,e);return ie.current=t.catch(()=>{}),t},[]),ge=(0,L.useCallback)(e=>oc(ic.get(),t?.account??e.account??qP(e.ref?.draftId??n),e.kind===`edit`?e.sig??null:e.sig),[t,n]),_e=(0,L.useCallback)(()=>{let e=M.current;return{kind:e.kind,id:t?.id,...e.ref,html:Rc(NP(e.html),ge(e),GP(e)),keepQuoted:e.keepQuoted||!!e.ref&&(e.kind===`reply`||e.kind===`replyAll`||e.kind===`forward`),...fe(e)?{to:PP(e.to),cc:PP(e.cc),bcc:PP(e.bcc)}:{},...RP(e)?{subject:e.subject}:{},account:t?.account??e.account}},[t,ge]),ve=(0,L.useCallback)(async()=>{let e=Lc(ge(M.current),GP(M.current));for(let t of e){let e=M.current.ref;if(!e||[...M.current.sigPics??[],...M.current.inline??[]].some(e=>e.cid===t.cid))continue;let n=await U(`addAttachment`,{...e,name:t.name,contentType:t.contentType,data:t.data,inline:!0,contentId:t.cid});re.current=!0,F({ref:{draftId:n.draftId,changeKey:n.changeKey},sigPics:[...M.current.sigPics??[],{id:n.attachment.id,cid:t.cid,contentType:t.contentType}]})}for(let t of M.current.sigPics??[]){let n=M.current.ref;if(n&&!e.some(e=>e.cid===t.cid)){if(M.current.html.includes(`cid:${t.cid}`))F({sigPics:(M.current.sigPics??[]).filter(e=>e.id!==t.id),inline:[...M.current.inline??[],t]});else{try{F({ref:await U(`removeAttachment`,{...n,attachmentId:t.id})})}catch(e){if(!IP(e))throw e}F({sigPics:(M.current.sigPics??[]).filter(e=>e.id!==t.id)})}}}},[ge,F]),ye=(0,L.useCallback)(()=>{let e=Lc(ge(M.current),GP(M.current)).map(e=>e.cid),t=[...M.current.sigPics??[],...M.current.inline??[]].map(e=>e.cid);return e.some(e=>!t.includes(e))||(M.current.sigPics??[]).some(t=>!e.includes(t.cid))},[ge]),be=(0,L.useCallback)(async()=>{await ic.ready(),await de(),M.current.ref||F({sigPics:[],sigSalt:Nc()}),F({dirty:!1,savingAt:Date.now()});try{let e=_e(),t=await U(`saveDraft`,e);return re.current=!0,F({ref:t,savingAt:void 0,keepQuoted:M.current.keepQuoted||M.current.kind!==`new`&&M.current.kind!==`edit`,...M.current.kind===`new`&&!e.draftId?{account:t.draftId.includes(`:`)?t.draftId.split(`:`)[0]:e.account}:{}}),await ve(),M.current.ref??t}catch(e){throw F({dirty:!0,savingAt:void 0}),e}},[_e,F,ve]),Se=(0,L.useCallback)(()=>{clearTimeout(ae.current),!te.current&&M.current.dirty&&HP(M.current)&&(b(`saving`),I(async()=>{!te.current&&M.current.dirty&&await be()}).then(()=>b(M.current.dirty?`saving`:`saved`),()=>b(`failed`)))},[I,be]),Ce=(0,L.useCallback)(e=>{F({...e,dirty:!0,editedAt:Date.now()}),clearTimeout(ae.current),ae.current=setTimeout(Se,kP)},[F,Se]),we=(0,L.useCallback)(function e(){let n=M.current;if(!t||!zP(n.kind)||!n.auto)return;let r=++le.current,i=n.kind===`replyAll`,a=()=>te.current||ne.current||r!==le.current;N.current=wP(i,t).then(e=>{let t=M.current;if(a()||!t.auto)return;ue.current=!1;let n=BP(t),r={auto:e,...n?{to:e.to,cc:e.cc}:{},...t.subject===t.auto.subject?{subject:e.subject}:{}};(t.ref||t.savingAt)&&n&&(t.to!==e.to||t.cc!==e.cc)?Ce(r):F(r),n&&e.cc&&w(!0)},()=>{a()||(ue.current=!0,K.show({kind:`error`,text:`Could not read the message to work out the recipients.`,duration:8e3,action:{label:`Retry`,run:()=>e()}}))})},[t,F,Ce]),Te=(0,L.useRef)(l);Te.current=l,(0,L.useEffect)(()=>{if(typeof BroadcastChannel!=`function`)return;let e=crypto.randomUUID(),t=new BroadcastChannel(`mw-composer`);return t.onmessage=t=>{t.data?.open!==u||t.data.by===e||te.current||(te.current=!0,clearTimeout(ae.current),K.show({text:`This draft was opened in another window of the panel: it goes on there.`,duration:6e3}),Te.current(!1))},t.postMessage({open:u,by:e}),()=>t.close()},[u]),(0,L.useEffect)(()=>(window.addEventListener(`pagehide`,Se),()=>{window.removeEventListener(`pagehide`,Se),Se()}),[Se]),(0,L.useEffect)(()=>()=>{ne.current=!0;let e=M.current;!te.current&&e.kind===`new`&&e.ref&&!e.dirty&&G.remove(u)},[u]);let Ee=(0,L.useCallback)(async e=>{m(e);try{await I(async()=>{let e=await U(`draft`,{draftId:(M.current.ref??await be()).draftId});await ic.ready();let t=!jP(M.current.html),n=M.current.sigPics?.length?GP(M.current):void 0,r=t?null:Bc(e.html,ic.get().signatures,n),i=n??r?.salt??GP(M.current),a=e.inline?WP(e.inline,{...M.current,sigSalt:i},r?.html??M.current.html,KP(M.current,r?.cids)):{};F({ref:{draftId:e.draftId,changeKey:e.changeKey},to:e.to||M.current.to,cc:e.cc,bcc:e.bcc??``,subject:e.subject,keepQuoted:e.keepQuoted,attachments:e.attachments,loaded:!0,sigSalt:i,...a,...r?{html:r.html,sig:r.sig}:{}}),t||j(e=>e+1),e.cc&&w(!0),e.bcc&&E(!0),b(`saved`)})}catch(e){K.error(e,`Could not load the draft: `)}finally{m(null)}},[I,be,F]),De=(0,L.useCallback)(()=>{I(async()=>{let e=M.current;if(te.current||!e.ref)return;let t;try{t=await U(`draft`,{draftId:e.ref.draftId})}catch(t){if(!IP(t)||te.current)return;e.dirty&&e.kind!==`edit`?(F({ref:void 0,keepQuoted:!1,loaded:!1,attachments:[],sigPics:[],sigSalt:Nc()}),K.show({text:`This draft was removed elsewhere. What you typed is kept here.`,duration:6e3})):(te.current=!0,G.remove(u),K.show({text:`This draft was sent or deleted elsewhere.`}),l(!0));return}if(te.current||t.changeKey===M.current.ref?.changeKey||(await ic.ready(),te.current))return;let n={draftId:t.draftId,changeKey:t.changeKey};if(M.current.dirty){F({ref:n,attachments:t.attachments,...t.inline?WP(t.inline,M.current,M.current.html,KP(M.current)):{}}),K.show({text:`This draft was also changed elsewhere. Keeping what you typed here.`,duration:6e3});return}let r=Bc(t.html,ic.get().signatures,GP(M.current));F({ref:n,to:t.to,cc:t.cc,bcc:t.bcc??``,subject:t.subject,html:r.html,sig:r.sig,keepQuoted:t.keepQuoted,attachments:t.attachments,...t.inline?WP(t.inline,M.current,r.html,KP(M.current,r.cids)):{}}),j(e=>e+1),t.cc&&w(!0),t.bcc&&E(!0),b(`saved`)}).catch(()=>{})},[I,F,u,l]);(0,L.useEffect)(()=>(e===`edit`&&n&&!M.current.ref?(F({ref:{draftId:n,changeKey:``}}),Ee(`Opening the draft…`)):e===`forward`&&!M.current.ref?Ee(`Preparing the forward…`):M.current.ref&&De(),we(),M.current.dirty&&Se(),ce(()=>De())),[]);let Oe=e=>{if(e===M.current.account)return;let t=M.current.ref;t?(ie.current.then(()=>U(`deleteDraft`,t)).catch(()=>{}),Ce({account:e,ref:void 0,sigPics:[],sigSalt:Nc(),keepQuoted:!1})):F({account:e})},R=e=>{if(e===d.kind||_.current)return;let t=M.current;F({kind:e,...t.auto?{}:{auto:{to:t.to,cc:t.cc,subject:t.subject}}}),we()},ke=e=>{for(let t of e)t.size>OP?K.show({kind:`error`,text:`${t.name} is over 20 MB.`}):(S(e=>[...e,t.name]),I(async()=>{let e=await U(`addAttachment`,{...M.current.ref??await be(),name:t.name,contentType:t.type||`application/octet-stream`,data:await ZN(t)});re.current=!0,F({ref:{draftId:e.draftId,changeKey:e.changeKey},attachments:[...M.current.attachments,e.attachment]})}).catch(e=>K.error(e,`Could not attach ${t.name}: `)).finally(()=>S(e=>{let n=e.indexOf(t.name);return n<0?e:[...e.slice(0,n),...e.slice(n+1)]})))},Ae=e=>{for(let t of e){let e=t.name||`image.png`;if(t.size>OP){K.show({kind:`error`,text:`${e} is over 20 MB.`});continue}let n=sP.newCid(),r=sP.keep(n,t);se.current?.insertImage({src:r,cid:n,alt:e});let i=new Image;i.onload=()=>{i.naturalWidth>MP&&se.current?.setImage(n,{width:MP})},i.src=r,S(t=>[...t,e]),I(async()=>{let r=await U(`addAttachment`,{...M.current.ref??await be(),name:e,contentType:t.type||`image/png`,data:await ZN(t),inline:!0,contentId:n});re.current=!0,F({ref:{draftId:r.draftId,changeKey:r.changeKey},inline:[...M.current.inline??[],{id:r.attachment.id,cid:n,contentType:t.type}]})}).catch(t=>{se.current?.removeImage(n),K.error(t,`Could not add ${e}: `)}).finally(()=>S(t=>{let n=t.indexOf(e);return n<0?t:[...t.slice(0,n),...t.slice(n+1)]}))}},je=d.ref?.draftId,Me=(0,L.useRef)(new Set);(0,L.useEffect)(()=>{if(je)for(let e of d.inline??[])sP.has(e.cid)?se.current?.setImage(e.cid,{src:sP.url(e.cid)},!0):Me.current.has(e.cid)||(Me.current.add(e.cid),U(`attachment`,{id:je,attachmentId:e.id}).then(t=>{se.current?.setImage(e.cid,{src:sP.keep(e.cid,dP(t.data,t.contentType))},!0)},()=>{}).finally(()=>Me.current.delete(e.cid)))},[je,d.inline,A,p]);let Ne=()=>I(async()=>{let e=Lc(ge(M.current),GP(M.current)).map(e=>e.cid);for(let t of M.current.inline??[]){let n=M.current.ref;if(!(!n||M.current.html.includes(`cid:${t.cid}`)||e.includes(t.cid)))try{let e=await U(`removeAttachment`,{...n,attachmentId:t.id});F({ref:e,inline:(M.current.inline??[]).filter(e=>e.id!==t.id)})}catch{}}}),z=e=>{I(async()=>{let t=M.current.ref;if(!t)return;let n=await U(`removeAttachment`,{...t,attachmentId:e});F({ref:n,attachments:M.current.attachments.filter(t=>t.id!==e)})}).catch(e=>K.error(e,`Could not remove the attachment: `))},Pe=async()=>{if(p||_.current)return;v(!0);try{await de()}finally{v(!1)}let e=M.current;if(x.length)return K.show({text:`Wait for the attachments to finish uploading.`});if(fe(e)&&!e.to.trim())return K.show({kind:`error`,text:`Add at least one recipient.`});let n=fe(e)?FP(e):[];if(n.length)return K.show({kind:`error`,text:`${n[0]} is not an email address.`});if(jP(e.html)&&!e.attachments.length&&pe!==`forward`&&!(RP(e)&&e.subject.trim()))return K.show({kind:`error`,text:`Write something first.`});clearTimeout(ae.current),v(!0);try{await ie.current,await ic.ready();for(let e=0;await Ne(),ye();e++){if(e===2)return K.show({kind:`error`,text:`Not sent: the signature changed while it was being sent. Send again.`});try{await I(async()=>{M.current.ref?await ve():await be()})}catch(e){return K.error(e,`Not sent, the signature's picture could not be added: `)}}}finally{v(!1)}G.set(u,M.current),te.current=!0;let r=me&&t?`your reply to ${ba(t)}`:pe===`forward`?`your forward to ${e.to.split(/[,;\s]+/)[0]}`:`to ${e.to.split(/[,;\s]+/)[0]}`;fe(e)&&xo.add([e.to,e.cc,e.bcc??``].flatMap(wo).map(e=>({email:e,name:Oo(e)}))),mP(u,_e(),r),l(!0)},Fe=()=>{te.current=!0,clearTimeout(ae.current);let e=!!M.current.ref;ie.current.then(()=>{let e=M.current.ref;if(e)return U(`deleteDraft`,e)}).catch(()=>{}),G.remove(u),l(e||re.current)};(0,L.useEffect)(()=>{mo.beat(u);let e=setInterval(()=>mo.beat(u),4e3);return()=>{clearInterval(e),mo.gone(u)}},[u]);let[Ie,Le]=(0,L.useState)(!1),Re=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(y===`failed`&&d.dirty&&HP(d))return fo.set(()=>Re.current||te.current?!0:(Le(!0),requestAnimationFrame(()=>document.querySelector(`.leave-ask`)?.scrollIntoView({block:`nearest`})),!1))},[y,d]);let B=()=>{if(!fo.mayLeave())return;let e=M.current;if(pe===`forward`&&jP(e.html)&&!e.to.trim())return Fe();l(re.current||!!e.dirty)},ze=e=>{e.key===`Enter`&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),Pe()),e.key===`Escape`&&(e.stopPropagation(),B())},Be=(0,L.useMemo)(()=>{let e=(e=``)=>wo(e),t=async()=>{if(await ie.current,await de(),LP(M.current)||await Ee(`Loading the recipients…`),!LP(M.current))throw Error(`the recipients of this reply could not be loaded`)},n={get:()=>{let t=M.current,n=LP(t);return{kind:t.kind,to:n?e(t.to):[],cc:n?e(t.cc):[],bcc:n?e(t.bcc):[],subject:RP(t)?t.subject:``,html:t.html,hasSubject:RP(t),signature:(e=>e?wc(e.html):``)(ge(t)),attachments:t.attachments.map(e=>({name:e.name,size:e.size})),...t.ref?{draftId:t.ref.draftId}:{}}},setSubject:e=>{if(!RP(M.current))throw Error(`this mail keeps the subject of its thread`);Ce({subject:e})},setBody:e=>{se.current?se.current.setHtml(lP(e)):(Ce({html:e}),j(e=>e+1))},insertAtCursor:e=>{se.current?se.current.insertHtml(e):n.setBody(M.current.html+e)},setRecipients:async(e,n)=>{await t();let r=new Set;Ce({[e]:To(n.filter(e=>e&&!r.has(e.toLowerCase())&&r.add(e.toLowerCase())))}),e===`cc`&&w(!0),e===`bcc`&&E(!0)},addRecipient:async(r,i)=>{await t(),await n.setRecipients(r,[...e(M.current[r]),i])},removeRecipient:async(r,i)=>{await t();let a=e(M.current[r]);if(!a.some(e=>e.toLowerCase()===i.toLowerCase()))throw Error(`${i} is not in ${r}`);await n.setRecipients(r,a.filter(e=>e.toLowerCase()!==i.toLowerCase()))},snapshot:()=>{let e=M.current;return{to:e.to,cc:e.cc,bcc:e.bcc??``,subject:e.subject,html:e.html}},restore:e=>{let t=M.current;(e.to!==t.to||e.cc!==t.cc||e.bcc!==(t.bcc??``)||e.subject!==t.subject)&&Ce({to:e.to,cc:e.cc,bcc:e.bcc,subject:e.subject}),e.html!==t.html&&n.setBody(e.html)}};return n},[Ce,Ee,ge]),Ve=(0,L.useMemo)(()=>{let n=t?.account;return{me:()=>rP(n??M.current.account),account:()=>n??M.current.account,compose:Be,source:t&&e!==`new`&&e!==`edit`?{id:t.id,from:t.fromName?`${t.fromName} <${t.fromEmail}>`:t.fromEmail,subject:t.subject,read:()=>U(`read`,{id:t.id,format:`text`}).then(e=>e.body)}:void 0,contacts:{lookup:async e=>{let t=n??M.current.account,[r,i]=await Promise.all([U(`contacts`,{q:e,account:t}).catch(()=>({people:[]})),U(`contacts`,{q:e,account:t,directory:!0}).catch(()=>({people:[]}))]),a=[...r.people,...i.people];!a.length&&t&&(a=(await U(`contacts`,{q:e}).catch(()=>({people:[]}))).people);let o=new Set;return a.filter(e=>!o.has(e.email.toLowerCase())&&o.add(e.email.toLowerCase())).map(e=>({name:e.name,email:e.email,...e.last?{last:e.last.slice(0,10)}:{}}))}}}},[Be,t,e]);(0,L.useEffect)(()=>(c?.(Ve),()=>c?.(null)),[Ve,c]);let He=ge(d);return(0,W.jsxs)(`form`,{className:`composer${s?` docked`:` page`}`,onSubmit:e=>{e.preventDefault(),Pe()},onKeyDown:ze,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&e.preventDefault()},onDrop:e=>{if(e.defaultPrevented)return;let t=[...e.dataTransfer.files];t.length&&(e.preventDefault(),ke(t))},children:[s&&(0,W.jsxs)(`div`,{className:`reply-head`,children:[me?(0,W.jsxs)(`div`,{className:`seg`,role:`group`,"aria-label":`Reply to`,children:[(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":pe===`reply`,disabled:h,onClick:()=>R(`reply`),children:[(0,W.jsx)($r,{size:14}),` Reply`]}),(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":pe===`replyAll`,disabled:h,onClick:()=>R(`replyAll`),children:[(0,W.jsx)(Zr,{size:14}),` Reply all`]})]}):(0,W.jsxs)(`span`,{className:`kind`,children:[(0,W.jsx)(pe===`forward`?vn:Tr,{size:14}),` `,pe===`forward`?`Forward`:`Draft`]}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:B,title:`Close (Esc) — your draft is kept`,"aria-label":`Close`,children:(0,W.jsx)(la,{size:15})})]}),P&&(0,W.jsxs)(`div`,{className:`fields`,children:[pe===`new`&&o.length>1&&(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`From`}),d.ref&&(d.attachments?.length||d.inline?.length)?(0,W.jsx)(`span`,{className:`from-account`,title:`Remove the attachments and pictures to send it from another account`,children:d.account?xe(d.account):`default account`}):(0,W.jsxs)(`select`,{value:d.account??``,onChange:e=>Oe(e.target.value||void 0),"aria-label":`From account`,children:[!d.account&&(0,W.jsx)(`option`,{value:``,children:`Default account`}),o.map(e=>(0,W.jsx)(`option`,{value:e,children:xe(e)},e))]})]}),(0,W.jsxs)(Ro,{label:`To`,value:d.to,onChange:e=>Ce({to:e}),account:t?.account??d.account,placeholder:`Name or address`,autoFocus:!d.to&&!p,children:[!C&&(0,W.jsx)(`button`,{type:`button`,className:`link`,tabIndex:-1,onClick:()=>w(!0),children:`Cc`}),!T&&(0,W.jsx)(`button`,{type:`button`,className:`link`,tabIndex:-1,onClick:()=>E(!0),children:`Bcc`})]}),C&&(0,W.jsx)(Ro,{label:`Cc`,value:d.cc,onChange:e=>Ce({cc:e}),account:t?.account??d.account,autoFocus:!d.cc&&!!d.to}),T&&(0,W.jsx)(Ro,{label:`Bcc`,value:d.bcc??``,onChange:e=>Ce({bcc:e}),account:t?.account??d.account,autoFocus:!d.bcc&&!!d.to}),he&&(0,W.jsxs)(`label`,{className:`field`,children:[(0,W.jsx)(`span`,{children:`Subject`}),(0,W.jsx)(`input`,{type:`text`,value:d.subject,onChange:e=>Be.setSubject(e.target.value)})]})]}),p?(0,W.jsxs)(`div`,{className:`preparing`,children:[(0,W.jsx)(H,{size:15,className:`spin`}),` `,p]}):(0,W.jsx)(MN,{ref:se,initialHtml:lP(d.html),onChange:e=>Ce({html:uP(e)}),onImages:Ae,placeholder:`${me?`Write your reply`:pe===`forward`?`Add a note (optional)`:`Write your message`}${D?`, or press / for help writing it`:``}`,onHelp:D?()=>k(!0):void 0,autoFocus:!P||!!d.to,onFiles:ke,onAttach:()=>oe.current?.click(),onMarkdown:e=>K.show({text:`Markdown written out.`,duration:7e3,action:{label:`Paste as text`,run:()=>{e()||K.show({text:`Too late: the text was changed since. Undo (⌘Z) still takes the paste back.`})}}}),below:ee.signatures.length>0&&(0,W.jsxs)(`div`,{className:`sig`,children:[He&&(0,W.jsx)(`div`,{className:`sig-body`,onClick:e=>{e.target.closest(`a`)&&e.preventDefault()},dangerouslySetInnerHTML:{__html:Sc(He.html)}}),(0,W.jsxs)(`label`,{className:`sig-pick`,title:`The signature under this mail`,children:[(0,W.jsx)(li,{size:13}),(0,W.jsxs)(`select`,{value:He?.id??``,onChange:e=>{_.current||Ce({sig:e.target.value||null})},"aria-label":`Signature`,disabled:h,children:[(0,W.jsx)(`option`,{value:``,children:`No signature`}),ee.signatures.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})]})},A),D&&O&&(0,W.jsx)(DP,{api:Ve,hasDraft:!jP(d.html),onClose:()=>{k(!1),se.current?.focus()}}),(d.attachments.length>0||x.length>0)&&(0,W.jsxs)(`div`,{className:`chips`,children:[d.attachments.map(e=>(0,W.jsxs)(`span`,{className:`chip`,children:[(0,W.jsx)(Cr,{size:13}),(0,W.jsx)(`span`,{className:`chip-name`,children:e.name}),(0,W.jsx)(`span`,{className:`chip-size`,children:Ca(e.size)}),(0,W.jsx)(`button`,{type:`button`,onClick:()=>z(e.id),title:`Remove ${e.name}`,"aria-label":`Remove ${e.name}`,children:(0,W.jsx)(la,{size:13})})]},e.id)),x.map((e,t)=>(0,W.jsxs)(`span`,{className:`chip busy`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),(0,W.jsx)(`span`,{className:`chip-name`,children:e})]},`${e}:${t}`))]}),(0,W.jsx)(`input`,{ref:oe,type:`file`,multiple:!0,hidden:!0,onChange:e=>{ke([...e.target.files??[]]),e.target.value=``}}),(0,W.jsxs)(`div`,{className:`composer-foot`,children:[(0,W.jsx)(co,{onDiscard:Fe,immediate:!HP(d)}),Ie?(0,W.jsxs)(`span`,{className:`leave-ask`,role:`alert`,children:[`Not in Drafts`,d.kind===`new`?`: New brings it back`:`: kept on this computer`,`.`,(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{Le(!1),Se()},children:`Try again`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{Re.current=!0,Le(!1);let e=fo.takePending();e?e():B()},children:`Leave anyway`})]}):(0,W.jsxs)(`span`,{className:`save-state ${y}`,role:`status`,children:[y===`saving`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Saving…`]}),y===`saved`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{size:13}),` Saved to Drafts`]}),y===`failed`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(yt,{size:13}),` Not saved `,(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:Se,children:`Retry`})]}),y===`idle`&&(d.keepQuoted||me||pe===`forward`)&&(pe===`forward`?`Original included below`:`Thread quoted below`)]}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`submit`,className:`btn primary`,title:`Send (⌘ Enter)`,disabled:!!p||h,children:[(0,W.jsx)(ri,{size:14}),` Send`]})]})]})}var YP=e=>e.conversationId?`${e.account}|${e.conversationId}`:e.id;function XP(e){let t=new Map;for(let n of e){let e=YP(n),r=t.get(e);r?r.push(n):t.set(e,[n])}return[...t].map(([e,t])=>{let n=new Set,r=[...t].reverse().filter(e=>{let t=(e.fromEmail||e.fromName||``).toLowerCase();return!n.has(t)&&n.add(t)});return{key:e,items:t,latest:t[0],count:Math.max(t.length,...t.map(e=>e.threadCount??0)),unread:t.filter(e=>!e.isRead).length,flagged:t.some(e=>e.isFlagged),names:r.length===1?ya(r[0]):r.map(ba).join(`, `)}})}var ZP=new Set,QP=0,$P=null,eF=new Set,tF={has:e=>ZP.has(e),refresh(){return $P??=U(`list`,{folder:`drafts`,limit:100,live:!0}).then(({items:e})=>{let t=new Set(e.filter(e=>e.conversationId).map(YP));t.size===ZP.size&&[...t].every(e=>ZP.has(e))||(ZP=t,QP++,eF.forEach(e=>e()))},()=>{}).finally(()=>{$P=null}),$P},subscribe(e){return eF.add(e),()=>{eF.delete(e)}}};function nF(){return(0,L.useSyncExternalStore)(tF.subscribe,()=>QP)}var rF={to:`junk`,label:`Junk`,key:`!`,notOnRow:!0};function iF(e){return e===`inbox`?[{to:`archive`,label:`Archive`,key:`e`},{to:`trash`,label:`Delete`,key:`#`},rF]:e===`archive`?[{to:`inbox`,label:`Move to the inbox`},{to:`trash`,label:`Delete`,key:`#`},rF]:e===`junk`?[{to:`inbox`,label:`Not junk: move to the inbox`},{to:`trash`,label:`Delete`,key:`#`}]:e===`trash`?[{to:`inbox`,label:`Restore to the inbox`}]:e===`sent`?[{to:`trash`,label:`Delete`,key:`#`}]:[]}var aF=(e,t)=>{let n=t>1?`${t} messages`:`Message`;return e===`trash`?`${n} deleted`:e===`archive`?`${n} archived`:e===`junk`?`${n} moved to junk`:`${n} moved to the ${e===`sent`?`Sent folder`:`inbox`}`};async function oF(e,t){let n=await U(`move`,{ids:e,to:t});return{ids:n.moved.map(e=>e.id),gone:n.gone?.length??0,failed:(n.failed??[]).flatMap(e=>e.ids),error:n.failed?.[0]?.error}}function sF(e,t){return e.endsWith(t)?e.length===t.length||e[e.length-t.length-1]===`.`:!1}function cF(e,t){let n=e.length-t.length-2,r=e.lastIndexOf(`.`,n);return r===-1?e:e.slice(r+1)}function lF(e,t,n){if(n.validHosts!==null){let e=n.validHosts;for(let n of e)if(sF(t,n))return n}let r=0;if(t.startsWith(`.`))for(;r<t.length&&t[r]===`.`;)r+=1;return e.length===t.length-r?null:cF(t,e)}function uF(e,t){return e.slice(0,-t.length-1)}var dF=/[\t\n\r]/g,fF=!1;function pF(e){return e>=97&&e<=122||e>=48&&e<=57||e>127||e>=65&&e<=90||e===45||e===95}function mF(e,t,n){let r=n-t,i=e.charCodeAt(t)|32;if(r===2)return+(i===119&&(e.charCodeAt(t+1)|32)==115);if(r===3){let n=e.charCodeAt(t+1)|32,r=e.charCodeAt(t+2)|32;return+(i===119&&n===115&&r===115||i===102&&n===116&&r===112)}if(r===4){let n=e.charCodeAt(t+1)|32,r=e.charCodeAt(t+2)|32,a=e.charCodeAt(t+3)|32;return i===104&&n===116&&r===116&&a===112?1:i===102&&n===105&&r===108&&a===101?2:0}return r===5?+(i===104&&(e.charCodeAt(t+1)|32)==116&&(e.charCodeAt(t+2)|32)==116&&(e.charCodeAt(t+3)|32)==112&&(e.charCodeAt(t+4)|32)==115):0}function hF(e,t,n=!1){let r=0,i=e.length,a=!1,o=!0;if(fF=!1,!t){for(;r<e.length&&e.charCodeAt(r)<=32;)r+=1;if(e.charCodeAt(r+4)===58&&(e.charCodeAt(r)|32)==100&&(e.charCodeAt(r+1)|32)==97&&(e.charCodeAt(r+2)|32)==116&&(e.charCodeAt(r+3)|32)==97||e.charCodeAt(r+10)===58&&(e.charCodeAt(r)|32)==106&&(e.charCodeAt(r+1)|32)==97&&(e.charCodeAt(r+2)|32)==118&&(e.charCodeAt(r+3)|32)==97&&(e.charCodeAt(r+4)|32)==115&&(e.charCodeAt(r+5)|32)==99&&(e.charCodeAt(r+6)|32)==114&&(e.charCodeAt(r+7)|32)==105&&(e.charCodeAt(r+8)|32)==112&&(e.charCodeAt(r+9)|32)==116)return null;for(;i>r+1&&e.charCodeAt(i-1)<=32;)--i;if((e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&(e.charCodeAt(r+1)===47||e.charCodeAt(r+1)===92))r+=2;else{let a=e.indexOf(`:/`,r);if(a!==-1){let i=mF(e,r,a);if(i===1)for(r=a+2;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1;else if(i===2){r=a+1;let t=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&t<2;)r+=1,t+=1;if(t<2)return null}else{for(let i=r;i<a;i+=1){let r=e.charCodeAt(i);if(!((r|32)>=97&&(r|32)<=122||r>=48&&r<=57||r===46||r===45||r===43)){if(r===9||r===10||r===13)return hF(e.replace(dF,``),t,n);for(let t=i;t<a;t+=1){let n=e.charCodeAt(t);if(n===47||n===92||n===63||n===35){a=-1;break}}if(a!==-1)return null;break}}if(a!==-1){if(e.charCodeAt(a+2)===47)o=!1,r=a+3;else return null}}}if(a===-1&&e.charCodeAt(r)!==91){let a=-1;for(let o=r;o<i;o+=1){let r=e.charCodeAt(o);if(r===9||r===10||r===13)return hF(e.replace(dF,``),t,n);if(r===58){a=o;break}if(r===47||r===92||r===63||r===35)break}if(a!==-1){let t=!1;for(let n=a+1;n<i;n+=1){let r=e.charCodeAt(n);if(r===47||r===92||r===63||r===35)break;if(r===64){t=!0;break}}if(!t){let t=!0,n=a+1;for(;n<i;n+=1){let r=e.charCodeAt(n);if(r===47||r===92||r===63||r===35)break;if(r<48||r>57){t=!1;break}}if(n===a+1&&(t=!1),!t){let t=mF(e,r,a);if(t===0){let t=!1;for(let n=a+1;n<i;n+=1){let r=e.charCodeAt(n);if(r===47||r===92||r===63||r===35)break;if(r===58){t=!0;break}}if(!t)return null}else if(r=a+1,t===2){let t=0;for(;(e.charCodeAt(r)===47||e.charCodeAt(r)===92)&&t<2;)r+=1,t+=1;if(t<2)return null}else for(;e.charCodeAt(r)===47||e.charCodeAt(r)===92;)r+=1}}}}}let s=-1,c=-1,l=-1,u=-1,d=!1,f=n,p=r-1,m=-1;if(n&&r<i){let t=e.charCodeAt(r);(pF(t)||t===46||t===95)&&t!==45||(f=!1)}for(let t=r;t<i;t+=1){let r=e.charCodeAt(t);if(r<64){if(r===47||r===35||r===63){i=t;break}r===58?(u===-1&&(u=t),l=t):r===9||r===10||r===13?d=!0:n&&(r===46?((t-p>64||m===46||m===45)&&(f=!1),p=t):(r<48||r>57)&&(r!==45||m===46)&&(f=!1))}else if(o&&r===92){i=t;break}else r===64?(s=t,u=-1):r===93?c=t:r>=65&&r<=90?a=!0:n&&!pF(r)&&(f=!1);n&&(m=r)}if(d)return hF(e.replace(dF,``),t,n);if(s!==-1&&s>=r&&s<i&&(r=s+1),e.charCodeAt(r)===91)return c===-1?null:e.slice(r+1,c).toLowerCase();if(l!==-1&&l>r&&l<i&&u===l&&(i=l),r>=i)return null;n&&f&&s===-1&&l===-1&&c===-1&&e.charCodeAt(i-1)!==46&&i-r<=255&&i-p-1<=63&&m!==45&&(fF=!0)}for(;i>r+1&&e.charCodeAt(i-1)===46;)--i;let s=r!==0||i!==e.length?e.slice(r,i):e;return a?s.toLowerCase():s}function gF(e){if(e.length<7||e.length>15)return!1;let t=0;for(let n=0;n<e.length;n+=1){let r=e.charCodeAt(n);if(r===46)t+=1;else if(r<48||r>57)return!1}return t===3&&e.charCodeAt(0)!==46&&e.charCodeAt(e.length-1)!==46}function _F(e){if(e.length<3)return e===`::`;let t=+!!e.startsWith(`[`),n=e.length;if(e[n-1]===`]`&&--n,n-t>39)return!1;let r=!1;for(;t<n;t+=1){let n=e.charCodeAt(t);if(n===58)r=!0;else if(!(n>=48&&n<=57||n>=97&&n<=102||n>=65&&n<=70))return!1}return r}function vF(e){return _F(e)||gF(e)}var yF=[`test`,`localhost`,`invalid`,`example`,`example.com`,`example.net`,`example.org`,`local`,`onion`,`alt`,`home.arpa`,`ipv4only.arpa`,`resolver.arpa`,`service.arpa`,`6tisch.arpa`,`eap.arpa`];function bF(e){for(let t of yF)if(e.endsWith(t)&&(e.length===t.length||e.charCodeAt(e.length-t.length-1)===46))return!0;return!1}function xF(e){return e>=97&&e<=122||e>=48&&e<=57||e>127}function SF(e){if(e.length>255||e.length===0||!xF(e.charCodeAt(0))&&e.charCodeAt(0)!==46&&e.charCodeAt(0)!==95)return!1;let t=-1,n=-1,r=e.length;for(let i=0;i<r;i+=1){let r=e.charCodeAt(i);if(r===46){if(i-t>64||n===46||n===45)return!1;t=i}else if(!(xF(r)||r===45||r===95)||r===45&&n===46)return!1;n=r}return r-t-1<=63&&n!==45}function CF(e,t,n,r){let i=r.publicSuffix;if(i===null)return;let a=e.length+1,o=a,s=!1,c=a,l=!1,u=t.extraSuffixes;for(let n=0;n<2;n+=1){let r=n===0,i=r?t.allowIcannDomains&&u.icann:t.allowPrivateDomains&&u.private;if(Array.isArray(i))for(let t of i){if(typeof t!=`string`)continue;let n=t.startsWith(`!`),i=t.startsWith(`*.`),a=n?t.slice(1):i?t.slice(2):t;if(a===``||n&&!a.includes(`.`)||!sF(e,a))continue;let u=e.length-a.length;n?u<o&&(o=u,s=r):(i&&u>1&&e.charCodeAt(u-2)!==46&&(u=e.lastIndexOf(`.`,u-2)+1),u<c&&(c=u,l=r))}}let d=e.length-i.length,f=n?e.lastIndexOf(`.`,d-2)+1:d;o<=c&&(n?o<f:o<=f)?(r.publicSuffix=e.slice(e.indexOf(`.`,o)+1),r.isIcann=s,r.isPrivate=!s):(c<f||c===f&&!r.isIcann&&!r.isPrivate)&&(r.publicSuffix=e.slice(c),r.isIcann=l,r.isPrivate=!l)}function wF({allowIcannDomains:e=!0,allowPrivateDomains:t=!1,detectIp:n=!0,detectSpecialUse:r=!1,extraSuffixes:i=null,extractHostname:a=!0,mixedInputs:o=!0,validHosts:s=null,validateHostname:c=!0}){return{allowIcannDomains:e,allowPrivateDomains:t,detectIp:n,detectSpecialUse:r,extraSuffixes:i,extractHostname:a,mixedInputs:o,validHosts:s,validateHostname:c}}var TF=wF({});function EF(e){return e===void 0?TF:wF(e)}function DF(e,t){return t.length===e.length?``:e.slice(0,-t.length-1)}function OF(){return{domain:null,domainWithoutSuffix:null,hostname:null,isIcann:null,isIp:null,isPrivate:null,isSpecialUse:null,publicSuffix:null,subdomain:null}}function kF(e,t,n,r,i){let a=EF(r);if(typeof e!=`string`)return i;let o=!1;if(a.extractHostname)a.mixedInputs?(o=SF(e),i.hostname=hF(e,o,a.validateHostname)):i.hostname=hF(e,!1,a.validateHostname);else{let t=e.length;for(;t>1&&e.charCodeAt(t-1)===46;)--t;i.hostname=t===e.length?e:e.slice(0,t)}if(a.detectIp&&i.hostname!==null&&(i.isIp=vF(i.hostname),i.isIp))return i;if(a.validateHostname&&a.extractHostname&&i.hostname!==null&&!(o&&i.hostname===e)&&!fF&&!SF(i.hostname))return i.hostname=null,i;if(t===0||i.hostname===null)return i;t===5&&a.detectSpecialUse&&(i.isSpecialUse=bF(i.hostname));let s=n(i.hostname,a,i);return a.extraSuffixes!==null&&CF(i.hostname,a,s===!0,i),t===2||i.publicSuffix===null||(i.domain=lF(i.publicSuffix,i.hostname,a),t===3||i.domain===null)||(i.subdomain=DF(i.hostname,i.domain),t===4)||(i.domainWithoutSuffix=uF(i.domain,i.publicSuffix)),i}function AF(e,t,n){if(!t.allowPrivateDomains&&t.allowIcannDomains&&e.length>3){let t=e.length-1,r=e.charCodeAt(t),i=e.charCodeAt(t-1),a=e.charCodeAt(t-2),o=e.charCodeAt(t-3);if(r===109&&i===111&&a===99&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`com`,!0;if(r===103&&i===114&&a===111&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`org`,!0;if(r===117&&i===100&&a===101&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`edu`,!0;if(r===118&&i===111&&a===103&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`gov`,!0;if(r===116&&i===101&&a===110&&o===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`net`,!0;if(r===101&&i===100&&a===46)return n.isIcann=!0,n.isPrivate=!1,n.publicSuffix=`de`,!0}return!1}var jF=new Uint8Array([1,2,1,1,1,1,1,1,1,1,1,1,2,2,2,2,0,2,2,2,2,0,2,2,2,1,2,2,2,1,1,1,1,1,1,0,2,0,1,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,0,0,2,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,0,1,1,0,0,2,0,0,0,1,1,1,0,2,0,0,0,0,0,0,0,2,0,2,2,0,0,2,2,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,2,1,1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,2,2,2,0,0,2,0,0,2,0,0,0,2,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,2,0,0,0,0,2,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,1,0,2,2,0,0,0,2,0,1,1,0,2,0,2,2,0,1,1,1,1,1,1,1,1,0,1,1,1,0,1,1,1,1,0,0,0,0,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,1,2,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,2,2,0,2,2,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,2,2,0,2,2,2,2,0,0,0,0,2,0,0,0,0,0,0,0,2,2,0,0,0,2,2,1,1,1,1,1,2,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,2,2,0,0,2,1,1,1,1,1,1,1,1,1,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,2,2,1,2,1,1,1,2,1,1,1,1,1,0,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,1,1,1,1,2,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,0,0,0,0,0]),MF=new Uint16Array([0,0,0,10,11,18,106,111,117,124,130,136,145,146,147,148,149,150,151,153,154,156,157,158,160,162,234,247,249,250,251,266,273,274,277,278,279,282,284,303,304,306,315,320,337,338,341,342,344,346,382,383,385,388,389,393,395,399,402,434,437,450,451,459,460,462,472,486,487,488,489,498,499,536,541,557,577,583,625,627,628,629,656,683,684,832,838,841,842,843,848,853,862,884,885,886,887,888,889,890,908,910,911,914,916,917,919,921,936,951,956,957,959,960,961,962,963,965,968,973,974,975,977,978,981,984,985,986,999,1001,1013,1024,1032,1034,1074,1077,1081,1082,1084,1087,1098,1100,1110,1112,1118,1120,1121,1123,1126,1127,1128,1181,1183,1185,1205,1206,1207,1208,1210,1221,1252,1263,1264,1277,1287,1296,1304,1305,1310,1324,1335,1347,1359,1373,1374,1385,1419,1420,1421,1437,1453,1465,1538,1539,1541,1542,1578,1597,1598,1599,1600,1601,1604,1608,1611,1613,1647,1648,1656,1657,1658,1659,1660,1661,1663,1665,1667,1668,1672,1673,1674,1676,1678,1679,1681,1682,1683,1694,1696,1697,1701,1702,1705,1712,1713,1718,1722,1723,1725,1726,1727,1728,1729,1730,1731,1732,1733,1734,1735,1736,1737,1738,1740,1741,1742,2202,2205,2206,2208,2215,2222,2232,2236,2247,2248,2249,2261,2262,2264,2266,2267,2274,2275,2277,2278,2280,2281,2282,2283,2284,2359,2361,2382,2383,2384,2386,2388,2389,2442,2443,2445,2452,2458,2468,2478,2531,2532,2533,2543,2557,2558,2561,2568,2569,2577,2579,2580,2581,2582,2593,2594,2595,2597,2598,2599,2608,2620,2626,2658,2662,2664,2665,2667,2668,2679,2680,2682,2690,2697,2703,2708,2709,2715,2718,2724,2731,2732,2739,2747,2748,2749,2787,2793,2808,2809,2814,2832,2863,2881,2883,2886,2894,2896,2903,2955,2979,2980,2981,2982,2983,2984,2985,2992,2993,2994,2995,2996,2997,2999,3e3,3004,3084,3097,3098,3535,3539,3553,3605,3633,3655,3713,3735,3750,3813,3864,3902,3938,3963,4105,4151,4202,4221,4255,4270,4290,4320,4351,4374,4405,4435,4467,4494,4569,4591,4629,4639,4673,4692,4718,4760,4810,4836,4905,4906,4908,4931,4954,4990,5021,5038,5095,5108,5132,5161,5163,5197,5213,5241,5546,5555,5564,5571,5588,5592,5598,5637,5639,5646,5653,5662,5669,5670,5671,5683,5686,5701,5702,5711,5712,5721,5730,5736,5738,5739,5740,5777,5778,5780,5788,5795,5808,5812,5814,5815,5821,5828,5842,5852,5857,5865,5873,5879,5880,5884,5886,5887,5899,5971,5972,5973,5974,5976,5977,5980,5982,5985,5989,5990,5991,5997,5998,5999,6001,6003,6005,6006,6007,6010,6012,6015,6016,6018,6216,6223,6224,6225,6235,6240,6257,6271,6280,6281,6282,6286,6287,6289,6291,6297,6298,6301,6302,6304,6305,6306,7206,7209,7213,7231,7240,7243,7250,7251,7253,7254,7255,7257,7309,7310,7313,7314,7431,7432,7443,7457,7464,7467,7476,7477,7478,7493,7548,7740,7742,7744,7745,7747,7752,7765,7780,7787,7796,7799,7802,7809,7817,7821,7822,7823,7837,7841,7850,7851,7852,7856,7891,7892,7912,7919,7927,7928,7933,7941,7985,7986,7992,7995,8007,8012,8013,8015,8017,8053,8054,8060,8067,8068,8078,8087,8102,8106,8108,8160,8161,8166,8167,8170,8172,8173,8174,8183,8197,8205,8219,8230,8231,8233,8235,8257,8268,8274,8275,8287,8299,8386,8398,8406,8409,8415,8440,8443,8444,8445,8446,8448,8451,8454,8465,8467,8469,8497,8572,8579,8583,8584,8593,8615,8616,8621,8622,8704,8706,8708,8717,8721,8727,8733,8739,8749,8754,8755,8773,8784,8789,8794,8804,8810,8814,8820,8826,10433,10434,10435,10442,10444]),NF=new Uint8Array([3,3,3,3,3,3,3,3,5,8,8,2,2,3,3,3,3,3,8,5,5,5,5,5,3,3,5,5,9,12,19,8,19,8,11,9,9,8,7,7,6,8,9,16,10,7,7,11,8,6,6,9,7,11,7,14,4,4,4,4,4,4,10,7,6,6,6,6,10,10,6,10,10,22,11,9,10,10,10,9,10,8,7,7,7,8,21,13,11,11,9,10,9,13,10,8,8,9,12,9,7,10,7,7,13,7,3,3,3,3,3,2,3,3,3,3,3,3,3,3,3,3,8,6,3,3,3,3,3,3,2,5,3,3,3,7,2,2,2,2,2,2,3,3,3,1,1,7,8,5,2,2,7,4,5,7,2,2,1,4,1,11,9,9,5,5,8,5,5,5,5,5,5,5,3,3,3,3,3,5,11,9,9,8,9,9,13,7,14,7,6,6,6,7,6,6,6,6,6,6,10,7,11,9,4,4,4,4,4,6,6,6,6,13,6,8,7,10,9,9,7,9,8,9,8,7,10,6,9,8,10,10,7,8,1,9,10,12,12,12,10,9,9,10,10,9,9,1,1,5,3,3,3,3,3,3,3,3,3,3,3,3,6,6,6,4,3,3,3,7,4,4,4,3,3,6,7,3,4,1,2,2,2,6,1,2,2,2,2,2,12,5,3,8,9,13,4,4,13,9,9,11,7,3,12,9,2,2,2,3,3,3,3,3,8,2,2,3,3,3,2,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,4,3,7,10,15,15,7,15,20,15,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,9,10,14,14,14,13,13,14,9,9,9,9,9,9,7,8,6,8,8,6,8,13,8,8,6,13,8,11,13,8,6,13,8,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,9,9,9,10,14,14,11,13,13,9,9,9,9,9,9,2,6,9,2,2,3,3,3,3,3,3,3,3,3,4,4,4,2,3,3,3,3,3,3,7,7,2,3,2,2,5,3,3,3,3,3,3,4,2,2,2,2,2,2,3,3,3,3,3,3,3,4,5,7,4,2,2,12,8,10,8,10,7,18,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,2,2,3,3,3,5,5,3,8,8,6,8,6,6,4,6,7,7,7,10,11,2,5,5,3,3,3,3,3,3,5,5,6,11,10,7,7,7,4,4,4,2,3,3,3,3,3,2,2,7,5,5,3,3,3,3,3,3,3,3,7,7,7,11,7,6,9,6,6,8,10,8,6,8,13,4,4,4,4,4,10,8,11,8,8,8,10,10,7,5,4,4,10,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1,1,2,2,2,2,2,2,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,7,10,13,7,8,7,11,8,8,6,9,8,8,6,6,6,8,8,6,6,6,6,6,9,7,6,4,4,4,4,4,4,4,6,6,6,9,7,8,10,8,8,2,3,3,3,3,3,2,8,9,9,2,2,2,3,3,3,2,3,3,3,9,2,2,3,3,3,3,3,3,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,12,5,5,3,5,4,2,3,2,4,3,9,2,2,2,2,2,5,5,3,8,8,13,6,10,9,4,7,9,11,2,3,7,3,3,4,1,3,4,2,9,3,3,12,5,3,7,10,10,7,4,4,6,14,7,9,7,13,2,2,2,2,2,2,3,3,3,3,3,8,15,4,4,2,3,3,3,7,4,9,9,2,3,3,3,5,3,2,2,7,2,7,6,6,7,2,4,2,2,2,2,2,2,8,8,8,9,5,2,3,3,3,3,3,3,10,7,4,4,4,4,3,4,2,3,3,3,3,3,10,7,4,4,4,4,2,3,3,3,3,10,7,4,4,4,4,3,9,6,6,6,9,13,9,2,2,2,8,7,9,5,3,3,3,5,5,13,12,9,10,7,8,7,6,8,6,11,12,7,10,4,4,7,8,11,6,7,9,8,7,10,8,9,15,7,8,5,4,7,2,3,3,3,2,14,10,2,14,10,2,14,3,9,13,13,10,14,16,17,11,2,14,2,14,3,9,13,10,14,16,17,11,14,10,14,2,7,3,10,7,14,10,2,14,10,9,9,17,6,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,10,10,10,12,9,4,10,10,11,8,8,8,7,9,5,3,3,3,3,3,3,3,3,5,8,4,4,4,4,4,4,6,16,3,3,14,3,14,2,14,9,13,10,10,14,16,17,11,6,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,9,9,9,9,9,9,2,14,9,13,10,10,14,16,17,11,6,14,2,14,9,17,13,10,10,14,17,16,17,11,6,2,14,9,13,10,14,17,16,17,11,2,14,9,13,10,14,16,17,11,2,14,9,13,10,17,16,11,17,2,14,10,19,7,2,14,9,13,10,19,10,7,14,17,16,17,11,6,2,14,9,13,10,19,7,14,16,17,11,2,14,9,13,10,10,14,17,16,17,11,6,2,14,9,13,10,10,14,17,16,17,11,6,2,14,9,13,17,13,10,10,14,17,16,17,11,6,3,2,14,9,13,10,10,14,16,17,11,6,9,10,12,14,14,14,12,12,12,12,12,14,14,14,10,10,10,14,9,9,9,9,14,14,14,13,13,14,9,9,9,9,9,9,4,11,2,14,9,13,17,13,10,19,10,7,14,17,16,17,11,6,2,14,9,13,17,13,10,19,10,7,14,17,16,17,11,6,2,14,9,13,10,19,7,14,17,16,17,11,2,9,10,10,7,17,3,3,12,12,16,15,15,12,14,14,14,20,20,13,12,12,12,12,12,12,20,25,14,14,12,12,10,10,10,10,14,9,9,9,25,4,9,17,10,7,14,16,21,13,13,14,20,14,13,17,24,9,12,13,25,13,21,20,17,9,9,9,9,9,9,12,17,4,4,9,9,9,10,10,12,14,14,14,12,12,12,12,12,14,14,10,10,10,10,14,9,9,9,9,10,14,14,14,13,13,14,9,9,9,9,9,9,9,10,14,12,12,14,14,10,9,9,9,10,14,14,14,9,9,9,9,2,1,5,8,7,11,11,1,3,3,3,5,3,3,4,8,9,10,10,12,14,14,14,12,12,12,12,14,14,10,10,10,10,14,9,9,9,10,14,14,14,13,13,14,9,9,9,9,9,9,7,4,4,4,4,4,4,4,4,4,10,2,2,6,7,6,2,3,2,3,6,2,7,6,10,7,4,9,12,6,14,4,12,7,2,2,1,2,7,6,4,4,4,6,8,8,7,2,2,13,2,2,2,2,6,2,8,12,2,7,7,6,8,10,12,2,2,2,3,3,13,2,2,3,3,6,7,6,4,5,6,3,3,3,3,4,16,8,5,4,3,3,3,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,12,7,7,13,9,10,17,12,8,9,7,17,17,8,5,12,10,13,14,5,5,5,13,5,5,5,3,3,3,5,16,5,5,5,5,7,12,14,8,12,8,10,12,9,11,7,9,7,10,7,13,13,9,7,12,8,17,7,7,16,10,13,13,8,10,10,14,17,7,16,16,15,8,10,10,12,17,17,7,17,14,7,10,17,8,7,7,7,8,15,15,7,14,10,10,10,11,11,7,7,13,8,10,7,16,7,8,7,14,17,12,10,11,21,8,9,7,13,9,8,6,13,6,12,7,6,13,10,10,10,8,18,9,17,13,10,12,6,13,6,11,8,13,10,13,18,13,11,13,8,16,7,10,8,16,12,10,8,8,14,11,8,15,8,8,7,7,12,7,8,9,14,15,8,9,10,9,15,7,8,8,12,13,9,10,15,13,7,10,10,20,7,6,9,6,6,14,11,14,11,12,9,10,16,16,12,7,11,28,8,11,10,7,21,8,7,9,4,4,4,17,7,8,6,9,6,6,13,6,6,6,6,18,20,14,8,11,12,9,10,13,15,15,19,8,9,12,7,10,16,12,9,9,9,14,12,11,10,9,12,11,18,9,9,9,10,7,7,16,8,9,7,13,12,10,14,18,7,8,11,7,7,8,8,13,7,7,7,11,15,13,11,7,8,15,11,7,8,18,14,13,18,15,10,12,12,9,7,11,11,8,7,10,8,14,12,10,18,7,10,9,7,8,13,10,14,10,8,8,23,7,7,11,12,12,17,7,7,11,11,17,16,16,7,8,11,14,14,8,10,7,7,16,16,13,9,11,9,15,15,11,11,7,7,14,7,9,7,7,16,10,13,10,11,14,7,11,10,11,7,11,10,11,15,11,15,10,12,10,14,13,11,11,12,13,10,7,13,16,12,21,15,9,10,10,7,11,14,17,7,7,8,11,13,12,8,15,14,14,8,17,12,10,10,7,9,11,7,10,7,11,18,7,11,7,12,11,8,8,14,12,7,8,15,3,7,7,5,2,9,2,2,2,2,2,2,2,3,3,3,3,3,3,3,2,5,3,3,3,3,3,3,4,4,3,3,3,3,3,3,5,11,6,4,7,10,7,7,11,1,10,2,2,3,3,3,3,3,3,3,3,5,7,3,5,6,3,3,5,2,2,5,3,4,13,11,3,3,6,3,5,14,2,2,3,8,2,2,12,5,18,5,3,3,3,3,16,5,5,5,10,7,13,12,13,9,12,14,19,9,9,21,9,9,10,6,9,6,15,10,6,12,8,6,10,15,4,4,6,6,9,9,12,16,14,23,7,7,7,14,9,7,7,11,14,10,7,10,10,10,12,6,11,10,13,11,15,11,7,12,10,3,7,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,4,3,7,1,5,2,2,2,5,5,5,5,5,3,3,3,3,3,5,5,10,9,11,8,7,12,8,9,7,6,13,11,6,13,7,9,9,4,4,4,4,4,6,10,7,8,13,8,8,9,14,7,8,10,7,9,7,7,9,6,9,7,2,12,5,3,3,13,4,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,3,3,3,3,4,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,4,4,4,4,4,4,4,4,4,9,3,3,3,3,3,3,3,3,3,3,4,2,2,2,5,3,3,3,3,3,3,3,3,4,4,1,7,6,4,12,3,3,3,3,3,8,7,3,3,3,3,3,3,4,4,11,15,14,2,8,3,5,5,8,10,8,6,4,7,17,7,4,5,2,6,3,2,2,12,5,5,3,15,13,8,11,2,2,3,3,3,3,3,3,3,3,4,4,5,3,3,3,3,4,18,2,12,5,3,3,3,3,3,5,16,8,8,9,6,6,4,4,4,4,31,6,6,10,11,21,10,9,7,10,7,7,2,4,4,4,4,6,5,3,3,4,3,3,3,3,3,3,3,3,3,6,6,6,2,2,2,5,3,3,3,7,7,4,3,3,3,3,3,3,3,3,3,3,3,3,3,2,3,3,3,3,8,2,3,3,3,3,3,5,9,11,3,3,3,3,4,4,3,3,3,3,3,5,10,9,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,3,3,3,11,10,10,10,10,10,11,10,11,10,11,10,9,9,11,3,3,3,3,3,3,5,3,7,8,8,7,6,6,11,4,4,4,7,8,9,9,2,3,7,4,4,2,5,5,3,3,3,3,3,3,3,3,3,4,4,4,4,4,4,2,2,5,5,5,5,5,3,3,5,5,5,7,7,6,6,6,4,4,4,4,4,4,4,4,4,4,6,6,8,8,1,2,2,2,2,2,2,3,3,3,3,3,3,3,4,4,6,9,12,3,7,10,7,2,2,3,3,3,3,3,4,3,3,2,2,2,2,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,6,6,8,6,7,4,4,4,4,4,4,6,7,5,5,20,19,8,10,9,7,10,6,8,11,6,6,6,6,13,12,8,6,7,14,11,9,2,5,3,6,2,3,2,2,2,2,2,2,2,5,4,3,7,6,4,7,4,3,6,4,7,2,7,7,7,5,5,5,5,3,3,3,3,3,3,3,3,3,5,9,10,10,11,7,8,20,7,8,9,8,12,6,6,6,8,9,8,12,6,6,8,13,10,12,6,6,7,7,9,6,4,4,4,4,4,4,10,6,6,6,7,14,11,10,7,8,10,8,11,14,11,11,9,7,9,8,11,9,17,10,9,2,2,2,9,3,3,3,3,15,14,9,5,5,2,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,15,12,22,19,17,18,18,19,21,7,16,16,5,5,5,5,5,5,5,5,5,5,5,7,5,5,5,5,5,5,5,5,5,5,5,9,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,7,16,11,11,7,7,7,7,17,7,8,12,15,9,19,7,19,8,21,11,12,19,14,22,7,7,7,7,7,7,7,7,7,7,7,16,16,19,24,12,7,14,7,12,7,8,10,10,13,7,12,12,7,7,10,18,15,12,16,7,14,12,17,10,16,17,12,17,25,7,7,7,13,6,9,6,9,18,6,6,11,20,10,6,6,6,6,6,6,17,6,6,6,15,6,6,6,6,6,8,14,11,12,11,15,13,19,17,21,7,18,8,13,13,8,12,8,6,6,13,6,15,15,16,6,6,16,6,6,6,14,6,18,6,6,6,17,18,9,13,15,8,19,8,15,15,18,14,16,4,4,4,4,4,4,4,4,4,4,4,4,6,11,10,11,6,21,23,12,17,12,11,14,13,22,15,15,11,12,14,12,7,12,8,12,14,12,18,10,8,16,19,17,12,14,15,8,19,17,12,13,13,15,18,13,23,24,23,21,17,24,8,21,8,14,14,16,20,14,8,8,15,20,8,19,21,9,8,13,12,13,15,11,8,11,9,9,8,11,8,21,14,21,15,15,13,7,19,7,7,7,7,7,7,16,12,17,18,7,7,11,11,7,9,9,2,2,3,3,2,2,2,3,3,3,3,3,3,3,3,3,3,4,5,5,5,5,5,5,5,5,3,3,10,10,7,9,7,7,7,6,8,6,6,6,6,6,6,6,7,6,8,6,6,9,7,7,7,4,4,4,4,4,4,4,4,8,9,8,7,8,7,8,10,7,5,5,5,5,5,5,3,9,7,7,8,6,6,6,6,6,6,6,6,9,6,6,9,11,13,7,8,9,9,5,5,5,7,8,6,6,6,6,6,6,6,7,8,9,7,10,9,10,7,8,5,5,5,5,5,5,7,7,9,8,7,7,6,6,6,6,6,6,10,6,6,6,6,6,6,6,6,6,6,6,9,10,4,4,4,4,8,7,7,10,10,9,8,8,15,9,8,8,8,8,8,9,10,9,10,7,8,13,5,5,5,5,5,3,3,7,7,8,6,6,6,4,4,11,9,7,8,9,10,7,5,5,5,5,5,3,3,7,6,6,13,7,9,8,7,5,5,5,5,5,5,5,5,3,3,3,3,7,8,7,8,13,6,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,6,6,6,6,7,6,7,6,6,9,7,4,4,4,4,4,4,4,7,8,7,8,9,8,8,8,7,10,7,8,5,5,5,5,5,5,5,5,3,7,7,7,7,9,7,10,9,6,6,6,6,6,8,8,6,6,6,7,6,6,6,9,9,4,4,13,7,10,9,9,12,7,8,8,10,8,8,8,8,8,8,5,5,5,5,3,7,7,11,7,9,8,8,6,6,10,6,8,8,8,6,7,6,6,12,4,4,4,4,4,4,4,4,4,9,8,8,16,8,9,8,7,5,5,5,5,5,3,3,7,7,7,10,15,8,9,8,9,9,6,6,6,6,6,6,7,4,8,7,8,8,7,8,11,8,5,5,5,5,5,3,7,7,6,11,16,7,6,4,4,4,4,9,9,8,8,8,13,12,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,7,8,8,9,13,7,7,7,9,8,8,9,12,7,12,7,12,8,7,10,12,9,9,6,6,8,8,6,6,6,6,6,6,6,9,8,9,11,8,6,6,6,6,6,12,7,6,6,6,9,7,7,6,6,6,6,6,11,9,6,6,6,6,6,7,9,4,4,4,4,4,4,4,4,9,9,9,9,7,7,7,7,7,11,7,7,8,8,8,8,8,8,9,8,9,9,7,7,11,11,7,12,8,8,8,8,8,7,8,8,8,8,8,13,12,8,8,8,8,7,7,7,9,5,5,5,5,5,5,5,3,3,7,7,11,7,8,8,8,6,6,6,6,6,6,6,6,6,6,6,10,11,6,7,9,4,4,4,4,4,4,9,9,8,9,8,8,8,7,7,5,5,5,5,5,5,5,5,5,5,3,3,11,7,7,7,9,6,6,11,8,10,6,6,6,12,8,8,7,6,6,8,7,4,4,4,4,4,4,4,4,9,10,9,9,8,10,9,11,8,5,5,5,7,6,6,8,7,4,4,4,4,8,7,7,8,7,8,8,5,5,5,5,7,7,8,8,8,6,6,6,6,6,10,8,9,13,6,7,6,6,8,7,8,4,4,4,4,11,8,8,8,10,5,5,8,7,8,13,8,7,6,8,6,9,7,8,7,5,5,5,5,5,5,3,3,7,8,9,6,4,8,10,10,8,12,9,13,2,7,5,5,5,5,5,7,7,10,6,6,6,6,6,6,6,8,4,4,9,8,8,8,14,8,8,8,9,8,5,5,5,5,5,3,3,9,6,6,6,6,10,12,6,6,6,6,6,6,6,4,4,4,4,11,8,7,8,8,8,5,5,3,3,3,3,7,7,6,8,6,8,11,7,6,6,6,7,4,8,11,9,10,5,5,5,3,3,3,7,7,8,9,8,15,9,6,6,6,6,6,6,11,11,4,4,4,4,4,7,9,9,10,8,7,5,5,5,5,5,5,3,3,8,6,6,6,6,6,6,6,6,6,9,7,4,4,4,4,4,9,9,8,8,10,13,5,5,5,3,17,7,7,7,7,7,8,6,8,13,6,6,6,6,6,6,6,6,4,4,4,9,10,8,8,8,5,5,5,5,3,7,7,7,8,8,6,6,6,8,8,8,9,10,8,4,8,10,9,8,8,8,9,13,10,5,5,5,5,5,5,5,5,5,5,3,3,7,8,9,9,7,7,7,10,9,9,8,9,8,8,8,6,6,6,6,6,6,6,6,6,6,6,6,6,8,12,6,6,6,6,6,6,6,6,6,12,4,4,4,4,4,4,4,4,4,4,4,11,8,8,9,9,10,8,9,7,7,5,5,5,5,5,5,3,7,8,7,6,6,8,6,6,10,4,7,8,9,12,8,7,7,5,5,5,5,5,5,3,3,7,14,7,9,8,8,6,6,8,12,12,6,6,7,7,10,4,4,4,4,4,9,9,14,9,13,8,7,5,5,5,6,6,6,7,4,8,7,5,5,5,5,5,5,5,5,3,3,7,7,7,8,6,6,6,6,6,6,12,6,6,6,6,4,4,9,9,8,8,11,7,7,7,5,5,5,3,9,8,6,6,7,4,4,4,4,4,4,8,8,11,5,5,5,7,7,7,9,6,6,6,6,6,6,9,8,4,4,4,4,7,12,9,8,8,8,7,10,10,5,5,5,5,5,5,5,3,11,14,8,7,8,8,6,6,6,6,6,8,7,6,6,6,7,6,8,9,4,4,4,7,8,9,7,9,7,7,9,8,5,5,5,5,5,5,5,5,5,11,3,9,7,7,12,14,8,6,6,12,11,8,6,6,6,6,6,6,6,6,6,15,7,4,4,4,16,9,9,9,8,9,9,9,9,9,8,8,8,13,11,8,5,5,5,5,3,7,6,6,8,8,8,6,6,7,10,7,4,4,4,4,9,7,8,7,7,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,7,7,7,9,6,6,6,6,6,8,8,7,7,9,6,6,6,7,6,6,6,6,6,15,4,4,4,4,4,8,8,7,8,12,9,8,8,8,8,8,9,8,8,10,8,8,8,8,16,9,10,2,5,5,5,5,5,5,5,9,7,6,8,9,4,4,4,4,4,7,8,8,8,9,8,11,10,5,5,5,5,3,7,8,6,6,6,6,6,8,6,6,6,6,4,12,10,12,7,7,7,7,7,7,7,5,5,5,5,3,3,7,7,10,8,9,7,6,10,7,6,6,4,4,8,9,7,9,9,9,9,8,8,8,8,10,5,5,5,5,5,5,8,7,6,6,6,10,6,7,10,7,4,4,4,4,4,4,4,12,9,10,7,7,10,8,10,5,12,9,6,6,6,6,6,7,6,4,4,4,10,9,9,8,7,7,5,5,5,5,5,5,3,3,13,7,7,9,7,7,7,8,9,9,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,15,15,4,4,4,4,4,10,10,9,8,9,8,8,9,7,8,7,8,5,5,7,6,6,6,4,4,4,7,8,11,8,5,5,5,5,5,5,5,7,6,6,6,6,6,6,9,11,10,7,4,4,4,9,8,8,5,5,5,5,5,9,9,6,6,6,6,6,6,6,9,9,4,4,4,4,8,8,8,9,9,8,8,8,13,2,4,2,7,5,5,5,5,5,5,9,9,6,6,6,6,10,8,8,8,6,6,6,4,4,9,8,10,8,9,8,8,8,9,8,8,5,3,3,3,11,6,6,6,7,6,6,6,4,4,9,8,5,5,5,5,5,3,11,8,6,6,6,6,6,9,7,4,4,14,10,9,8,12,8,8,8,11,15,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,11,11,11,10,10,7,7,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,5,5,5,3,3,3,7,11,7,7,11,11,7,8,9,10,7,7,9,9,9,9,7,7,10,8,13,8,8,8,8,11,10,6,6,8,10,11,14,14,6,6,6,6,6,6,9,11,7,7,6,8,12,11,11,6,6,10,6,6,6,6,6,10,7,7,6,6,11,6,6,6,11,8,9,7,6,10,11,9,10,11,7,11,8,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,6,6,8,9,10,9,6,6,6,10,6,6,6,6,11,10,11,10,9,8,7,7,7,7,11,14,8,10,9,9,8,8,7,11,8,8,8,11,11,10,10,9,10,8,11,10,8,11,9,12,8,10,8,11,8,9,9,11,11,10,11,13,8,7,8,8,9,7,8,8,8,8,7,8,2,2,2,2,2,2,2,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,8,6,4,4,4,11,7,11,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,5,3,3,3,3,8,7,7,8,8,4,8,7,7,7,9,7,8,9,8,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,6,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,4,5,5,3,3,8,8,6,9,4,4,10,7,3,3,3,2,5,3,3,3,3,3,3,3,3,3,3,3,3,4,3,2,2,2,3,3,3,3,3,4,10,2,3,3,3,3,3,3,3,4,2,3,3,3,3,3,3,3,3,2,2,3,3,3,5,2,4,2,6,2,2,9,5,5,3,3,3,3,3,3,3,5,5,5,9,8,7,9,6,6,11,4,4,4,4,4,4,4,4,6,6,7,7,11,8,8,6,5,11,2,3,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,6,4,4,4,4,3,3,3,3,5,7,2,3,3,3,3,3,8,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,6,4,4,4,4,2,2,3,3,3,3,3,3,3,4,3,3,3,3,3,3,3,3,3,3,3,3,4,2,2,3,3,3,3,3,3,2,3,3,3,3,3,6,3,3,8,10,3,4,4,1,1,1,1,1,1,1,8,9,10,7,7,1,14,18,13,18,13,10,10,16,13,18,16,13,16,18,13,22,16,16,16,14,21,16,9,14,16,9,9,14,10,10,14,12,14,19,12,11,18,13,17,15,15,15,15,16,14,13,19,18,15,19,18,12,18,12,11,20,14,15,10,17,17,16,19,20,21,15,13,16,15,15,15,1,1,3,8,7,7,8,8,8,1,6,1,1,6,3,3,4,7,3,3,5,5,4,4,4,4,4,2,7,7,8,12,3,4,5,1,3,4,4,10,4,3,3,3,8,7,7,2,2,2,2,2,2,2,2,2,12,9,20,7,5,5,5,9,13,5,5,5,5,5,3,3,3,16,5,5,5,13,7,8,8,11,8,7,9,7,11,12,9,9,8,8,11,10,14,7,12,10,11,13,7,9,11,17,17,14,13,7,8,7,10,10,7,16,13,7,8,17,12,9,8,6,7,10,6,6,12,6,8,10,8,8,8,6,8,6,14,6,6,6,13,6,10,6,6,7,14,8,6,6,10,11,10,9,9,7,7,6,6,6,9,9,7,9,10,9,13,12,4,4,4,4,4,4,4,4,4,4,6,6,6,8,8,6,8,9,10,9,7,10,10,8,7,8,7,10,12,9,8,15,8,7,8,8,7,7,15,13,7,10,9,14,18,16,7,24,7,8,10,11,16,8,14,7,9,9,9,13,19,14,15,14,11,7,13,9,10,7,13,9,10,11,12,8,9,2,3,5,8,7,4,4,15,10,5,3,3,3,3,3,5,4,4,4,2,2,2,2,2,1,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,4,2,2,2,3,3,3,3,3,3,3,3,3,3,4,2,12,5,3,8,10,15,6,7,2,3,2,5,5,12,2,5,5,5,5,2,2,5,5,12,9,5,2,2,9,5,5,12,12,5,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,12,5,8,8,9,5,5,5,8,19,7,16,15,14,9,9,9,9,7,11,11,11,7,14,10,10,5,5,5,5,5,5,5,5,5,15,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,14,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,15,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,12,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,9,12,9,9,12,12,12,15,7,11,7,14,11,18,13,8,18,15,18,12,14,12,8,8,8,8,9,9,9,12,7,10,10,8,8,12,12,12,7,12,12,9,7,7,7,7,7,8,15,12,9,10,10,7,10,10,13,11,10,9,22,11,9,8,8,8,8,8,13,18,13,9,15,19,9,7,7,10,7,7,7,11,8,13,17,7,7,10,10,10,7,20,16,7,7,7,7,7,7,11,21,12,12,13,11,14,16,8,8,13,11,7,7,13,7,7,14,15,15,6,6,6,6,6,6,6,6,6,6,13,10,18,6,6,6,6,6,6,6,6,6,11,8,8,12,12,11,11,8,12,9,9,9,13,13,9,9,9,9,9,9,6,10,12,6,6,6,6,17,11,7,7,7,7,14,14,12,6,7,7,6,6,15,10,13,10,6,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,13,9,9,15,13,6,12,12,6,19,11,10,7,7,16,8,19,17,9,9,9,9,9,6,6,6,10,8,16,8,6,6,9,6,6,6,6,6,6,6,6,8,8,8,6,7,6,6,6,6,6,6,6,6,6,6,6,14,6,6,6,6,20,6,9,6,14,9,9,9,6,9,8,8,12,9,8,8,8,8,7,8,12,7,8,8,8,6,8,6,6,6,6,6,6,6,9,8,8,6,6,13,9,12,13,12,14,13,12,11,11,6,8,8,8,6,13,12,11,11,12,6,11,12,11,13,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,15,6,6,6,6,6,6,6,13,6,6,6,6,6,6,6,6,6,6,6,6,6,8,8,8,8,6,18,6,12,13,13,13,9,10,15,9,12,6,6,6,6,6,6,6,6,9,15,10,9,10,13,9,19,8,18,17,10,10,8,8,6,6,6,6,6,6,10,14,8,16,16,9,8,15,8,8,10,12,14,7,7,8,8,7,7,7,7,8,13,13,11,9,9,9,12,10,17,8,11,9,7,7,14,8,14,14,7,7,7,7,7,7,14,7,7,7,7,7,10,10,8,14,7,7,7,7,8,8,8,8,8,17,9,7,15,7,8,12,7,9,14,7,7,7,9,13,8,14,7,16,18,13,15,14,12,13,10,15,9,7,7,7,10,13,15,15,9,9,9,9,19,11,7,11,11,13,8,8,8,8,7,12,19,17,9,9,13,7,7,7,9,7,7,7,12,13,15,10,8,8,14,15,12,13,13,8,12,14,7,11,7,14,15,13,12,8,8,8,8,11,13,15,15,8,13,12,8,8,8,13,10,16,14,11,8,8,12,12,9,15,15,12,12,13,8,8,9,12,13,9,8,8,8,8,8,8,8,8,8,8,8,11,12,11,7,14,7,13,13,13,12,18,16,7,12,11,10,10,15,9,9,9,21,7,7,7,11,16,8,8,11,11,7,7,7,7,7,19,7,7,7,7,7,7,7,7,7,12,8,9,12,14,11,9,9,9,22,12,3,3,4,8,8,15,4,2,2,5,5,3,3,3,3,3,3,6,6,4,4,4,12,7,10,2,3,3,3,3,3,3,3,6,7,3,7,5,14,4,4,7,8,10,4,1,3,3,6,2,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,4,2,2,5,3,4,2,2,2,2,2,2,11,5,5,5,11,5,5,3,5,5,5,5,11,14,13,9,11,9,12,8,11,11,8,11,16,9,9,7,10,9,12,8,15,6,7,6,6,13,10,8,11,8,6,6,6,12,16,6,11,7,8,9,18,6,6,9,4,4,6,13,6,6,6,6,8,8,9,16,7,7,14,7,8,8,8,7,7,7,7,7,7,15,13,7,10,7,7,10,12,16,15,7,9,9,14,11,11,10,9,10,8,12,7,8,7,7,10,12,7,12,8,7,2,3,3,3,3,3,3,3,3,3,3,5,3,3,5,5,5,10,7,4,4,8,7,10,9,3,3,3,3,3,3,3,3,3,3,1,3,3,3,3,3,3,3,7,4,5,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,9,8,2,2,2,8,12,7,7,5,5,5,5,5,5,5,5,5,5,5,5,8,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,7,11,9,8,8,8,7,8,9,7,7,9,7,7,7,10,7,7,10,9,10,6,6,6,6,6,6,15,7,8,9,9,8,6,6,10,9,6,8,13,9,7,6,6,6,6,6,6,12,6,6,7,6,7,6,6,6,10,10,7,6,6,6,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,6,14,6,6,7,7,9,6,6,6,6,9,9,8,9,10,9,8,9,12,7,7,7,8,7,10,12,11,9,10,7,7,7,9,10,10,8,12,9,7,7,9,8,8,8,10,7,7,8,9,9,7,7,7,8,2,4,2,4,6,3,4,2,3,3,3,3,2,3,3,3,3,3,3,3,3,4,4,4,4,5,5,3,3,3,3,3,3,3,3,5,8,6,4,7,3,3,3,3,3,3,3,12,3,3,3,3,3,3,4,4,2,3,5,3,4,7,3,3,3,3,3,3,4,3,3,3,3,3,3,3,4,3,3,6,4,3,4,2,2,2,5,3,3,3,3,3,5,4,4,4,4,7,6,8,9,2,2,2,2,3,3,3,5,7,2,3,3,8,7,7,2,2,8,5,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,8,8,7,7,6,10,6,9,7,11,4,6,8,8,7,8,4,5,5,5,5,3,3,3,11,8,9,6,6,8,7,4,4,7,6,8,7,2,2,3,3,3,3,4,3,3,3,3,3,3,3,3,7,2,2,5,3,3,2,3,3,3,3,3,3,4,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,12,5,5,3,3,3,5,10,12,6,15,4,6,6,7,14,9,3,3,3,3,3,8,2,2,3,5,5,3,3,3,3,3,3,8,8,8,7,5,8,4,6,11,2,2,7,3,3,2,9,8,5,5,3,3,3,5,5,7,7,6,6,10,6,8,6,8,9,7,4,4,4,4,7,6,6,7,7,10,9,9,8,11,8,3,3,3,3,3,4,4,2,3,3,3,3,3,7,6,2,5,5,6,7,6,4,8,9,11,2,2,3,3,3,3,3,3,3,2,2,5,3,3,3,3,3,9,9,6,4,8,7,7,5,9,8,6,2,6,8,7,8,5,5,5,5,5,3,3,3,16,8,7,7,7,8,7,7,7,7,9,6,9,6,10,7,7,7,6,10,8,9,11,11,8,4,4,10,8,8,6,9,6,11,8,8,8,15,7,8,9,5,3,3,3,3,3,5,2,2,3,8,9,10,3,2,2,2,2,2,2,3,6,4,2,2,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,11,5,3,3,3,3,3,3,3,3,6,7,4,4,2,3,3,3,3,3,3,3,12,7,4,12,4,6,5,4,2,2,2,2,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,4,4,2,3,3,3,3,3,3,3,3,4,4,11,10,6,4,6,10,8,3,3,3,3,3,3,3,3,5,4,4,4,2,2,2,2,2,2,2,2,5,3,4,4,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,10,5,5,5,5,5,5,3,3,3,3,3,3,3,3,7,8,8,7,13,12,10,10,8,8,7,7,9,12,11,6,6,8,8,9,7,7,7,10,15,10,4,4,4,4,4,11,8,8,9,7,9,14,14,12,2,2,2,2,2,2,2,3,3,3,3,3,12,5,5,5,11,10,7,9,3,8,7,3,15,13,11,4,4,2,2,2,19,7,5,5,3,3,3,3,3,3,3,5,22,18,6,14,17,4,4,19,16,18,2,3,3,7,2,3,2,3,3,6,4,2,3,3,2,5,3,3,3,3,3,3,3,9,9,2,3,2,2,2,3,3,3,5,7,14,7,7,12,9,13,6,11,6,10,9,7,7,8,12,12,8,8,8,10,7,7,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,3,3,3,3,3,5,8,10,7,8,11,8,12,9,4,14,7,7,9,13,2,3,3,3,3,3,3,2,3,3,3,1,2,2,3,3,3,3,3,3,5,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,8,4,4,4,3,2,3,3,3,3,5,2,2,2,2,2,2,2,5,5,5,5,3,3,3,3,3,3,3,3,3,7,7,7,7,7,8,8,8,8,8,12,9,8,8,9,8,6,17,6,6,6,8,8,6,6,6,6,6,6,6,6,6,6,6,7,4,4,8,8,9,9,9,7,7,7,7,7,7,7,9,9,9,7,8,8,8,10,7,13,10,8,9,3,3,5,13,3,3,3,3,3,7,7,6,6,10,13,11,11,8,8,9,8,9,9,10,10,10,11,10,10,13,13,16,15,11,12,9,9,10,9,11,10,9,9,14,7,8,3,10,7,7,3,2,2,2,5,3,3,3,3,3,3,3,3,3,3,3,3,6,7,2,2,3,3,3,3,3,3,3,3,4,11,6,7,4,6,2,2,3,3,3,1,3,3,3,3,3,3,6,4,4,2,2,2,3,3,3,3,4,4,6,6,6,6,5,4,4,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,9,11,6,10,9,12,7,7,11,14,9,7,12,3,3,7,12,11,12,7,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,9,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,11,5,5,5,5,5,5,5,5,11,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,5,5,5,5,5,5,5,3,3,3,5,5,5,5,5,5,5,5,5,5,5,3,3,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,6,5,5,5,5,5,5,5,5,5,5,5,5,5,3,10,3,3,3,11,3,5,9,11,8,12,14,9,7,8,7,7,11,11,7,7,10,9,8,10,9,7,7,7,7,7,7,8,8,7,11,8,8,8,7,7,10,8,7,13,12,7,17,10,8,8,11,7,11,11,14,7,11,7,8,6,9,20,8,7,9,16,7,10,6,11,10,8,9,7,16,11,11,9,8,9,8,8,8,11,8,15,8,8,9,7,8,8,11,10,7,5,7,10,10,15,7,7,7,8,7,8,8,10,11,10,10,10,11,11,7,8,6,8,8,10,6,8,6,6,7,8,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,16,6,15,6,7,11,11,7,9,10,11,13,10,6,16,8,10,12,11,6,6,6,6,6,6,6,10,6,10,7,7,7,11,7,11,6,6,6,6,6,6,17,7,7,6,6,12,22,6,6,6,6,6,8,6,6,6,6,7,6,6,5,6,6,8,11,6,9,14,11,9,11,7,7,8,6,6,6,8,10,9,6,6,6,6,9,7,6,6,6,6,6,15,6,4,4,4,6,4,17,8,11,6,6,9,6,6,6,6,6,6,6,6,6,6,6,6,6,6,7,6,6,6,6,10,6,10,6,6,6,6,12,8,6,6,6,6,6,6,6,6,6,9,6,6,6,6,18,6,6,6,8,9,10,7,8,9,10,11,7,13,6,8,8,6,6,14,7,7,7,7,10,7,14,9,6,6,9,15,9,7,14,6,11,14,13,7,12,8,7,7,7,7,7,12,7,10,9,16,6,8,6,5,17,6,8,10,4,6,4,10,15,17,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,8,4,4,11,7,4,4,7,7,7,6,6,6,6,6,6,6,6,6,6,6,6,19,17,6,10,11,6,6,6,6,18,6,6,11,4,4,4,5,6,6,6,9,5,6,4,6,6,4,6,6,6,6,10,6,6,4,6,6,10,6,10,6,6,6,6,11,6,6,10,6,6,8,6,6,6,8,6,11,4,11,9,10,9,11,4,8,4,11,12,7,9,8,6,7,7,8,12,12,11,13,10,11,7,7,7,9,7,11,10,7,7,7,16,11,10,11,17,9,9,8,8,7,7,7,9,7,7,7,14,7,13,9,11,10,14,10,10,12,11,10,7,10,5,14,8,8,8,9,7,8,7,7,9,8,7,8,7,7,7,7,7,7,7,11,8,10,8,7,8,14,11,8,9,9,9,8,24,10,10,12,7,7,15,11,8,8,12,11,8,9,9,7,8,9,10,11,10,11,7,12,7,7,11,9,8,14,13,12,8,11,10,8,8,7,7,14,9,10,8,9,11,7,14,8,8,13,8,8,12,7,10,14,14,11,9,10,9,9,7,7,11,11,13,9,13,5,5,5,7,9,5,11,12,14,8,7,7,11,10,9,7,8,8,7,10,11,11,5,5,7,5,5,5,7,7,15,7,7,8,7,15,12,12,10,7,8,7,11,7,7,7,23,11,8,8,11,10,7,8,11,7,19,7,7,6,9,9,9,11,3,4,7,8,6,6,4,10,8,2,2]),PF=new Uint16Array([0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,1,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,17,1,1,1,1,1,1,12,1,12,1,12,13,1,1,1,1,12,1,12,1,1,1,1,1,14,23,1,1,1,1,1,20,1,1,1,1,21,12,1,1,1,1,1,1,1,1,22,1,1,1,16,18,1,1,15,1,1,1,1,12,1,1,1,1,1,1,1,1,24,1,1,1,1,12,1,1,1,1,1,19,1,1,12,12,12,12,12,12,12,12,12,12,12,12,1,26,27,28,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,12,12,12,12,1,34,0,0,0,1,1,1,1,37,36,1,1,1,1,1,35,1,1,1,1,39,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,40,0,0,0,0,41,42,0,0,0,0,12,1,1,1,12,1,1,1,45,47,47,47,45,47,45,45,46,47,45,47,45,45,45,45,45,45,47,45,45,46,45,45,45,45,47,48,48,46,47,45,45,45,45,45,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,51,53,51,51,51,53,51,52,51,54,51,52,52,51,51,51,52,54,52,54,51,52,52,12,56,56,55,57,52,54,51,51,49,50,58,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,61,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,1,1,68,69,12,1,1,67,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,78,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,82,0,0,0,0,0,0,0,0,0,0,0,0,0,80,83,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,81,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,1,12,1,1,1,1,93,1,95,1,1,1,1,1,1,1,1,98,1,1,1,1,1,1,1,1,1,1,1,1,0,1,101,101,1,1,12,1,104,1,1,1,1,1,1,1,102,1,103,1,105,1,1,1,1,1,106,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,114,115,1,1,1,1,1,1,117,117,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,125,126,1,1,1,1,1,1,1,1,1,1,1,1,1,126,1,1,1,1,1,1,1,1,1,1,126,1,1,1,1,1,1,1,1,1,130,127,129,124,1,128,1,1,118,1,1,1,1,121,1,131,1,1,1,1,1,1,123,1,112,1,113,1,12,132,110,116,1,1,1,1,1,111,119,1,12,12,12,122,120,1,1,1,1,1,1,0,0,0,0,1,12,12,1,1,1,1,1,12,138,1,1,1,1,1,1,1,1,1,1,1,12,140,1,1,1,1,1,1,1,1,141,142,12,12,139,137,47,47,144,51,51,143,146,145,1,1,0,0,0,0,0,0,0,0,0,0,0,0,149,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,147,0,0,0,0,1,0,148,136,1,0,1,1,12,12,1,1,1,1,1,0,0,0,0,0,0,0,1,152,151,22,1,1,12,12,1,22,12,12,1,1,1,1,1,138,1,1,156,1,1,1,1,157,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,1,140,1,1,156,1,1,1,1,157,1,1,1,138,1,1,1,156,1,161,1,1,1,157,1,1,138,1,1,1,161,1,1,1,1,1,138,1,1,1,1,1,1,1,1,138,1,1,161,1,1,161,1,1,1,1,1,1,1,167,1,1,1,156,1,1,161,1,1,1,157,1,1,167,1,1,1,1,1,1,1,1,1,1,140,1,1,156,1,161,1,1,1,157,1,1,138,1,1,156,1,161,1,1,1,157,1,1,138,1,1,1,1,156,1,161,1,1,1,157,1,1,1,138,1,1,156,1,1,1,1,173,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,176,1,1,167,1,1,1,1,1,156,1,1,161,1,1,1,157,1,1,167,1,1,1,1,1,156,1,1,161,1,1,1,157,1,1,167,1,1,1,1,1,161,1,1,1,1,171,163,163,12,1,12,175,1,1,1,1,1,164,164,164,158,1,1,1,162,164,168,174,1,1,1,1,162,162,1,1,160,158,171,162,166,179,170,179,1,1,177,1,170,159,162,1,1,1,1,162,1,165,1,1,1,12,1,180,1,169,1,1,1,169,168,172,178,160,171,1,1,1,1,1,1,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,182,183,182,182,183,182,182,182,182,184,184,182,182,183,182,183,182,182,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,186,12,1,12,12,12,12,1,12,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,199,1,201,202,200,199,199,1,1,205,1,206,204,1,12,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,217,199,199,199,199,217,1,1,1,1,220,221,219,1,1,1,1,1,1,223,223,1,1,1,223,223,225,226,224,1,228,1,1,1,1,12,234,235,236,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,203,207,1,1,1,1,155,1,1,1,1,1,1,1,1,1,1,1,231,1,1,1,198,1,1,1,1,242,1,1,239,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,12,1,1,1,1,1,1,1,1,189,214,1,1,1,210,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,196,1,1,1,1,1,1,1,215,1,1,1,1,230,1,1,1,1,181,1,218,1,213,1,1,1,216,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,194,1,12,1,1,12,1,1,1,1,197,1,1,1,212,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,243,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,229,1,1,1,1,1,12,1,1,1,1,1,1,1,1,188,12,1,1,1,191,12,1,1,1,1,1,1,1,233,1,1,1,1,1,1,1,1,1,1,190,1,1,1,1,1,1,1,238,1,1,1,195,1,1,1,211,1,12,1,227,208,12,1,1,1,1,1,1,1,1,1,1,215,1,1,1,1,193,1,1,1,1,1,1,1,1,1,1,1,1,1,1,185,1,1,1,1,1,1,1,1,1,1,209,1,1,1,1,1,1,1,1,1,1,1,240,1,1,1,1,1,1,1,1,1,1,12,1,241,1,1,12,1,1,1,1,192,1,1,1,209,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,232,1,1,1,187,1,1,1,1,1,1,1,1,1,1,1,222,1,1,1,12,12,1,1,1,1,1,1,1,1,1,237,1,1,12,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,1,1,1,1,1,1,1,1,1,253,0,0,0,0,0,254,0,0,0,0,0,0,1,12,1,1,1,258,1,1,1,0,259,256,257,1,1,1,1,1,1,264,1,266,1,1,1,1,1,1,1,1,1,1,1,1,262,1,1,1,1,1,268,1,1,12,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,267,1,1,1,12,1,1,1,1,263,1,1,1,261,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,265,1,1,1,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,12,1,12,1,1,1,12,1,1,274,1,13,1,1,1,12,12,271,272,1,1,1,1,273,1,1,12,1,1,1,1,1,1,1,275,1,1,12,16,1,1,1,1,1,1,276,1,1,1,12,12,1,1,1,1,1,1,1,276,12,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,1,285,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,289,289,1,0,0,0,0,0,1,12,0,0,0,0,0,0,0,0,182,1,294,295,1,12,1,1,1,1,12,297,1,1,296,1,1,299,1,1,1,1,1,1,0,1,1,1,303,1,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,12,1,0,1,0,0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,1,12,0,314,0,0,315,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,1,12,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,61,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0,339,0,0,0,0,0,0,0,0,0,341,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,12,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,357,357,358,357,0,209,1,1,13,353,1,351,0,0,0,0,0,0,0,354,1,1,359,1,239,1,1,1,1,352,1,349,1,355,1,347,1,356,1,348,1,1,1,1,1,1,1,12,1,1,1,1,12,350,350,1,1,1,198,1,1,12,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,12,1,1,1,1,346,1,0,0,0,1,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,362,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,299,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,402,402,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,394,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,1,370,381,1,1,369,404,1,375,1,1,367,399,1,1,385,366,371,1,1,1,378,409,387,1,1,1,1,1,1,388,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,0,397,401,0,0,83,1,1,0,395,372,408,373,376,383,1,398,0,1,0,83,392,390,1,0,0,1,1,1,0,0,0,0,411,1,1,382,1,83,1,0,1,1,1,414,1,0,0,83,389,0,1,368,1,1,1,0,1,1,391,1,0,1,1,1,0,1,416,379,1,1,0,1,0,0,407,0,1,1,1,83,400,1,1,396,393,1,1,1,1,1,1,1,1,1,1,1,374,1,1,1,1,1,1,1,1,1,1,1,406,0,83,1,1,1,1,0,1,1,1,1,1,1,0,0,1,1,410,1,1,1,0,0,413,0,0,0,1,386,1,0,83,412,1,0,0,0,0,415,1,1,0,0,1,0,1,0,384,0,380,0,1,1,1,0,1,1,0,403,377,405,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,0,0,1,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0,0,1,0,0,0,0,0,12,1,1,1,12,431,431,1,1,12,12,1,431,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,443,1,1,0,1,1,1,1,239,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,461,461,1,1,0,0,347,1,1,1,1,1,1,1,1,1,1,1,1,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,474,1,473,1,1,1,1,1,1,1,1,1,478,1,12,12,1,1,1,1,1,12,1,1,1,1,486,1,1,1,488,1,1,1,1,1,1,1,1,1,1,485,1,480,1,1,1,1,467,1,1,1,1,1,1,1,1,481,12,1,1,1,1,487,1,1,1,482,476,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,347,1,464,1,1,12,484,1,1,347,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,469,1,1,1,1,1,1,1,1,1,1,1,487,1,1,1,1,347,1,483,1,1,1,477,471,1,1,1,1,1,472,1,489,475,1,1,1,1,1,470,1,1,1,1,1,1,1,1,1,465,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,479,1,1,1,1,1,1,1,1,1,1,1,1,468,1,1,1,1,1,466,1,253,490,1,1,1,1,1,12,1,1,1,1,12,1,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,0,0,1,0,1,0,1,1,0,0,0,496,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,12,1,69,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,0,500,500,500,500,500,500,500,0,500,500,500,500,500,1,500,500,500,0,500,500,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,504,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,509,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,502,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,503,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,511,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,508,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,501,0,0,512,507,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,506,0,0,0,0,0,0,0,0,0,0,0,0,0,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,501,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,500,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,510,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,12,1,1,1,1,1,1,1,1,1,1,1,1,522,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,233,233,1,526,1,1,1,525,1,1,1,1,521,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,523,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,527,1,1,524,1,1,1,1,1,1,1,1,402,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,528,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,1,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,0,0,1,0,0,0,539,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,1,0,1,0,0,0,1,0,0,0,1,0,0,1,0,0,1,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,0,0,0,0,0,0,1,0,1,0,0,1,1,12,1,542,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,12,12,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,0,1,0,0,0,0,0,0,0,1,0,0,1,0,1,1,1,1,0,0,0,1,0,0,0,1,61,1,1,12,12,12,12,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,561,1,1,1,1,1,1,1,562,1,1,1,1,1,1,1,560,1,1,12,1,1,564,272,1,1,1,12,12,1,1,12,1,12,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,568,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,1,0,0,1,1,0,0,0,1,0,0,0,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,574,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,136,1,12,579,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,111,1,1,12,1,1,1,1,12,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,584,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,12,0,0,0,0,0,0,0,0,0,1,1,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,0,0,0,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,148,1,1,1,261,1,1,12,32,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,1,609,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,253,1,358,1,1,1,1,1,1,1,1,1,0,0,614,1,1,1,1,0,616,0,83,0,615,0,1,1,1,0,1,1,1,1,1,1,12,0,0,0,1,0,1,0,0,0,0,0,0,623,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,618,618,0,622,620,618,618,618,618,618,624,618,618,628,618,618,618,618,618,618,618,618,618,618,625,622,618,618,622,618,618,618,618,618,618,618,618,618,618,618,618,618,620,618,618,618,618,618,626,618,618,618,618,618,618,0,0,0,1,627,1,1,1,1,621,1,1,1,1,1,619,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,1,12,632,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,1,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,1,1,12,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,66,311,337,442,570,0,4,70,269,287,313,338,364,418,444,0,533,554,571,634,9,0,62,92,428,440,460,612,0,531,553,567,649,0,32,6,0,495,534,639,597,72,0,7,316,288,419,497,447,573,83,635,0,613,340,449,499,9,109,319,540,6,32,0,342,83,421,83,517,10,6,135,281,306,0,650,544,0,600,0,65,6,6,284,99,2,463,429,441,633,0,6,0,6,317,107,6,598,535,575,0,498,420,304,318,8,73,108,636,578,422,343,331,450,150,76,321,582,545,638,601,365,360,513,6,77,153,11,0,282,557,583,602,549,587,607,648,38,6,293,326,363,335,251,32,563,590,251,43,249,298,327,336,437,454,515,305,0,75,599,0,434,448,330,83,280,83,0,617,581,538,323,452,83,423,417,0,0,0,9,592,608,250,0,455,438,566,551,610,652,89,251,44,328,426,456,606,0,546,324,307,83,248,84,30,420,32,6,424,361,334,641,629,559,586,548,0,291,85,32,436,453,0,32,457,0,252,630,552,9,439,458,251,281,90,255,631,611,594,516,459,427,283,260,91,60,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,657,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,445,0,0,0,0,0,0,0,0,86,0,133,0,0,541,585,0,0,0,0,0,0,0,29,0,588,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,445,0,0,0,0,537,0,290,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,325,0,0,0,0,0,0,0,654,0,0,0,0,0,653,0,0,0,0,0,0,0,0,0,0,0,0,0,0,425,0,0,0,518,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,0,0,0,0,0,0,529,0,0,0,0,0,0,435,0,0,0,0,0,0,0,0,0,0,0,0,0,244,0,0,0,0,0,0,0,0,0,0,0,550,0,0,0,0,0,0,0,0,0,0,0,0,530,0,0,0,0,0,0,0,0,0,0,0,0,0,0,302,312,0,0,0,0,0,565,308,0,0,0,0,0,0,0,0,0,0,0,0,0,547,0,0,0,0,0,0,0,0,0,0,0,491,0,0,0,345,0,0,0,0,79,0,286,0,0,0,0,0,0,25,0,0,0,0,605,0,0,0,0,637,556,0,0,0,0,277,0,0,0,0,0,0,493,0,0,514,0,0,0,0,0,63,0,0,0,300,59,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,279,0,0,0,0,0,310,647,0,74,0,0,0,0,0,0,0,0,0,656,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,154,0,309,0,0,0,0,0,0,604,0,0,0,0,0,0,558,0,0,0,0,0,0,0,0,0,603,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,246,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,0,536,0,0,0,0,0,591,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,88,87,0,0,0,0,0,0,0,0,0,0,0,520,0,519,0,0,0,0,0,0,0,0,0,0,292,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,492,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,320,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,572,0,0,0,0,0,0,0,0,329,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,71,270,0,0,0,0,0,0,0,0,0,0,88,0,643,0,0,589,0,0,0,0,0,0,0,0,0,278,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,646,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,555,0,0,0,88,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,532,0,651,0,0,462,0,0,0,0,0,0,0,0,0,0,0,0,433,0,0,0,580,0,97,0,0,0,0,0,0,0,0,0,0,33,0,0,0,0,0,0,31,96,0,0,0,0,0,0,0,0,0,0,0,0,322,0,0,0,247,0,0,0,0,0,0,595,0,0,0,0,134,0,0,0,0,0,596,0,0,0,0,0,0,0,445,451,0,0,0,0,0,0,0,0,0,0,0,0,0,0,430,0,344,0,0,0,0,0,5,0,0,0,0,0,0,0,332,0,0,0,0,0,0,0,0,0,0,0,0,0,569,0,0,0,446,0,0,432,0,0,0,0,0,0,640,0,0,0,576,0,0,94,0,577,0,0,0,0,0,0,0,0,0,0,543,494,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,301,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,445,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,645,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,644,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,655,0,0,0,0,0,593,0,0,0,0,0,0,0,0,0,0,333,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,642,0,0,245,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,660,660,660,660,660,660,660,659,661]),FF=`orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingauthcloudsandboxupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowcloudzyrospawnbasesliplanemodelenceshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashretoolvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitglideossnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webapptransfer-webappairflowtransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxysiteacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalpagesappsgroksimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporonline-serverobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetjenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algcanva-codemyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9consent-portals3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websitebedrock-agentcores3-object-lambdaexecute-apibedrock-agentcores3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1eu-west-3eu-south-2ap-southeast-3eu-central-1ca-central-1ap-northeast-1ap-southeast-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5eu-west-1us-east-1ap-east-1sa-east-1csrframeservicesbuilderstg-builderdev-builder*ociocpocsazuregcpawsdemoinstanceeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appss3-websitekrkrobjectprivateobjectkrkrskrkrsobjectkrprivateobjectkr-privatecomputepaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalsgkrobjectstoragedesgkrusobjectkrkr-naverkr-naver-devkrprivatewebsiteobjectkr-naverkr-privatekr-naver-devjpjpkrjp4jp5s3-website-jpjpkrjp4jp5objectprivateobjecto365cloudstaticxendevapp001testcode-builder-stgplatformmediasiteprojedrydpagesjsx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogcursorusercontentservesarcasmapplinzisakuratanwixsitefin-ncloudstoragegov-ncloudstorageappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officeztna-dingtalkhomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererclaudeusercontentlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urlnclouddyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3qualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebandlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musicianhosted-by-filessecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappncpstorageherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocaldatabricksappsreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedwafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyis-not-certifiedhercules-devis-a-financialadvisoramazonlightsailservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudncloudstorageis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrubgov2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjects*teamst3r2lpabymebravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultis-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackcodepenleapcellngrok-freeis-coolpagelemonstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idptransfer-webappeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmfidymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebitwixstudioon-k3sicp0icp12038jeleqotolairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpusulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiasudsardegnatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardysud-sardegnafriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencexn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolverbano-cusio-ossolafriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovethipfscanvamypepethw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintoopencloudnohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2pnortheurope-01newzealandnorth-01southindia-01southcentralus2-01norwaywest-01eastus2-01westus2-01australiaeast-01italynorth-01israelnorthwest-01swedencentral-01westeurope-01centraluseuap-01taiwannorthwest-01uaecentral-01northcentralusstage-01israelcentral-01mexicocentral-01canadacentral-01austriaeast-01germanywestcentral-01francecentral-01ukwest-01denmarkeast-01polandcentral-01eastus-01westus-01swedensouth-01eastus3-01westus3-01brazilsouth-01centralus-01francesouth-01australiacentral-01westindia-01uaenorth-01jioindiacentral-01canadaeast-01belgiumcentral-01spaincentral-01koreacentral-01chilecentral-01qatarcentral-01westcentralus-01eastus2euap-01norwayeast-01southafricanorth-01brazilsoutheast-01germanynorth-01switzerlandnorth-01switzerlandwest-01japanwest-01southafricawest-01japaneast-01eastasia-01indiasouthcentral-01taiwannorth-01centralindia-01uksouth-01southcentralus-01northcentralus-01eastasiastage-01indonesiacentral-01australiacentral2-01australiasoutheast-01malaysiawest-01koreasouth-01southeastasia-01southeastus5-01northeastus5-01jioindiawest-01rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmapvpslon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabchrsndenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscaleoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvobuiltwithrocketnoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradyntmpheremerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleursvibekitprodpdnscodebergheyflowstatichostlinkyhostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshoppriviqhslapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardcoshipatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcloudcanvaliaravalrwxwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbsanityonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentsurgebotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitpagewawamscofigma-govcaffeinefigmacanvasoltstscwputerbarsysupportchatgptsquareomniweopensocialcpanelplaycodenotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshdocsflowyloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyumanusxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyaisanityabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611orgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovmyspreadshopadimono-ipbarsybarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libaws-govccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipdatabricksappscloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsadidacaionioapsonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbwebcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildersxn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworktheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp`,IF=jF.length,LF=NF.length,RF=new Uint32Array(LF),zF=new Uint32Array(LF),BF=new Int32Array(IF).fill(-1);for(let e=0,t=0;e<IF;e+=1)for(let n=MF[e];n<MF[e+1];n+=1){RF[n]=t;let r=t+NF[n],i=5381;for(let e=r-1;e>=t;--e)i=i*33^FF.charCodeAt(e);zF[n]=i>>>0,NF[n]===1&&`orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingauthcloudsandboxupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowcloudzyrospawnbasesliplanemodelenceshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashretoolvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitglideossnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webapptransfer-webappairflowtransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxysiteacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalpagesappsgroksimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporonline-serverobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetjenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algcanva-codemyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9consent-portals3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websitebedrock-agentcores3-object-lambdaexecute-apibedrock-agentcores3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1eu-west-3eu-south-2ap-southeast-3eu-central-1ca-central-1ap-northeast-1ap-southeast-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5eu-west-1us-east-1ap-east-1sa-east-1csrframeservicesbuilderstg-builderdev-builder*ociocpocsazuregcpawsdemoinstanceeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appss3-websitekrkrobjectprivateobjectkrkrskrkrsobjectkrprivateobjectkr-privatecomputepaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalsgkrobjectstoragedesgkrusobjectkrkr-naverkr-naver-devkrprivatewebsiteobjectkr-naverkr-privatekr-naver-devjpjpkrjp4jp5s3-website-jpjpkrjp4jp5objectprivateobjecto365cloudstaticxendevapp001testcode-builder-stgplatformmediasiteprojedrydpagesjsx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogcursorusercontentservesarcasmapplinzisakuratanwixsitefin-ncloudstoragegov-ncloudstorageappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officeztna-dingtalkhomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererclaudeusercontentlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urlnclouddyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3qualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebandlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musicianhosted-by-filessecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappncpstorageherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocaldatabricksappsreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedwafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyis-not-certifiedhercules-devis-a-financialadvisoramazonlightsailservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudncloudstorageis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrubgov2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjects*teamst3r2lpabymebravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultis-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackcodepenleapcellngrok-freeis-coolpagelemonstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idptransfer-webappeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmfidymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebitwixstudioon-k3sicp0icp12038jeleqotolairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpusulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiasudsardegnatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardysud-sardegnafriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencexn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolverbano-cusio-ossolafriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovethipfscanvamypepethw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintoopencloudnohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2pnortheurope-01newzealandnorth-01southindia-01southcentralus2-01norwaywest-01eastus2-01westus2-01australiaeast-01italynorth-01israelnorthwest-01swedencentral-01westeurope-01centraluseuap-01taiwannorthwest-01uaecentral-01northcentralusstage-01israelcentral-01mexicocentral-01canadacentral-01austriaeast-01germanywestcentral-01francecentral-01ukwest-01denmarkeast-01polandcentral-01eastus-01westus-01swedensouth-01eastus3-01westus3-01brazilsouth-01centralus-01francesouth-01australiacentral-01westindia-01uaenorth-01jioindiacentral-01canadaeast-01belgiumcentral-01spaincentral-01koreacentral-01chilecentral-01qatarcentral-01westcentralus-01eastus2euap-01norwayeast-01southafricanorth-01brazilsoutheast-01germanynorth-01switzerlandnorth-01switzerlandwest-01japanwest-01southafricawest-01japaneast-01eastasia-01indiasouthcentral-01taiwannorth-01centralindia-01uksouth-01southcentralus-01northcentralus-01eastasiastage-01indonesiacentral-01australiacentral2-01australiasoutheast-01malaysiawest-01koreasouth-01southeastasia-01southeastus5-01northeastus5-01jioindiawest-01rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmapvpslon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabchrsndenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscaleoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvobuiltwithrocketnoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradyntmpheremerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleursvibekitprodpdnscodebergheyflowstatichostlinkyhostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshoppriviqhslapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardcoshipatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcloudcanvaliaravalrwxwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbsanityonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentsurgebotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitpagewawamscofigma-govcaffeinefigmacanvasoltstscwputerbarsysupportchatgptsquareomniweopensocialcpanelplaycodenotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshdocsflowyloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyumanusxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyaisanityabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611orgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovmyspreadshopadimono-ipbarsybarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libaws-govccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipdatabricksappscloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsadidacaionioapsonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbwebcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildersxn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworktheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp`.charCodeAt(t)===42&&(BF[e]=n),t=r}var VF=-1,HF=0,UF=0;function WF(e,t,n,r){if(NF[e]!==r)return!1;let i=RF[e];for(let e=0;e<r;e+=1)if(`orgmilcomschnetedugovdrrformsfeedbackofficialaccoorgmilschnetgovmagazinemediaunioncargopilotgroupcaarespressworksaerodromeworkinggroupair-traffic-controlaircraftaccident-preventioneducatormarketplaceambulanceinsurancecateringairportrepbodyenginesoftwaremodellingair-surveillanceconsultingchartertrainermaintenanceservicesdesignflightskydivingfreightassociationstudentgroundhandlingdgcafuelclubtaxicrewshowballooningexpresstraderbrokerauthoragentsairtrafficjournalistsafetyconsultantmicrolightaccident-investigationparachutingequipmentproductionfederationrecreationscientistnavigationengineertradingglidingleasingresearchpassenger-associationentertainmentparaglidinghangglidingaerobaticrotorcraftemergencycertificationgovernmentaeroclubexchangelogisticschampionshiphomebuiltcouncilconferencecontrolairlinecivilaviationjournalorgcomnetedugovcoorgcomnomnetobjofforgcomnetuwukiloappsframerorgmilcomnetedugovcoradioorgcomnetcommuneedogpbcoitgvorgedugov*spreviewfrontendrelayononstagingauthcloudsandboxupid*mtls*privatelinktypedreamdeveloperbravemochawindsurfaivenmirenupsunwnextbegetngrokclerkwale2bwebcsbrunputerflutterflowcloudzyrospawnbasesliplanemodelenceshiptodaymagicpatternsnetlifyondigitaloceanrailwayhostedclaudehasurabotdashretoolvercelgithubluyanigadgetreplitcloudflaretelebitedgecomputeevervaultexponyatnoopencrpplxzeaburwasmerframerzeropsrocketpreviewconvexmedusajsspritesonherculeseasypanelstreamlitglideossnowflakemesserliloginlinehackclubcodepennorthflankbase44corespeedleapcellngrok-freeclerkstagelovableon-fleek*us-west-3ap-south-2us-central-2us-central-1eu-central-1ap-south-1us-west-2us-east-2eu-north-1ap-north-1us-west-1us-east-1*rcloudintsegorgmilcomgobbetnetintedugovturmusicasenasamutualcoopip6uriurnin-addre164homeirisgovdixdaemoncloudnssthwien*inexexkunden4accogvormymyspreadshop4lima2ixortsinfofuturecmsfuturehosting12hpprivfuturemailinglima-cityfunkfeuer123webseitednshomemelmyspreadshopcloudletswasantqldvicactnswtascatholicwasaqldvictasidwasantozqldorgcomvicasnactnetedugovnswtasconfcomairflowlambda-urltransfer-webapptransfer-webappairflowtransfer-webapptransfer-webapp-fipstransfer-webappeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1privatenotebookstudiolabelingnotebookstudionotebooknotebook-fipslabelingnotebookstudionotebook-fipsnotebookstudio-fipsnotebook-fipsnotebookstudionotebook-fipsnotebookstudioeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2experimentsus-gov-west-1us-gov-east-1ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1onrepostsagemakercopporgmilcompronetintedugovbiznameinfoshoprsorgmilcomnetedugovbrendlyresolvenzauscotvstoreorgcomnetedugovbizinfoidacaicoittvorgmilcomschnetedugovinfocloudezproxysiteacmymyspreadshopkuleuvenwebhostingtransurl123websitecloudnsinterhostsolutionsddns5476103298edgfacbmlonihkjutwvqpsryxzbarsycoororgcomedumyftpno-iporxcloud-ipfor-somemmafanfor-morewebhopselfipjozidyndnscloudnsdscloudfor-thefor-betteractivetrailcoeconorestooteorgcomeconeteduassurmoneyafricaarchitectesrestaurantloisirstourismavocatsinfoagrounivcoorgcomnetedugoviatvdeportesaludtksatorgmilcomwebgobnetinteducienciaboliviarevistacooperativaempresanombreindustriamusicapatriamedicinademocraciapoliticapuebloindigenaplurinacionalarteblogwikiinfoagrotransportenoticiasprofesionalacademiaeconomiaecologiamovimientotecnologianaturalpagesappsgroksimplesitecepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesmscepesebamapadfmgalampbacscpirngorotomtrjspaprrprrsesms*biaamfmtcmptvfeirasampajampanatalbelemananiradiog12medindfndbmdtrdthepoaggfjdfdefinfenflegsegongengcngorgzlgslglogppgmillelqslcimcomnomadmjabimbbibbsbabcrectecsjcetcpscpvhudieticriapipsiecnbiorioecogeoteoodoproatoartfstmatvetdetbetnetcntnotfotgrueduajuespappreptmpemparqsrvadvdevgovntrturagrjorfarjusmusdesvixxyzcozfozslzbhzmaringasantamariacampinagrandegoianiasorocabafloripasaobernardocuritibaboavistarecifeaparecidasaogoncasalvadorcuiabamorenamacapalondrinacontagemsocialfortalmaceioleilaoosascoriobranconiteroi9guacutcheblogflogvlogwikitaxicoopmanauspalmascaxiasjoinvillebaruericampinassantoandreribeiraoriopretoweorgcomnetedugovv0windsurfshiptodaycloudsitecoaccoorgnetgovofmilcomgovmediatechzacoorgcomnetedugsjgovmydnspenfnlabnbmbgcbcqconcontnuyksknsmyspreadshopno-ipawdevboxbarsyonidatemfuinabusavinstanceseceuguukussryzespawncsxcloud-ipmyphotosfantasyleaguetwmailcleverappsscrappingccwucloudnsftpaccessgame-serverccgovobjectsrmalpgcust*svcalp1aeappenginermalpgmyspreadshop4lima2ixsquare7cloudscale123websitefirenet12hpflowgotdnslinkyard-cloudcloudnslima-citydnskingobjectstorageedaccogoorusorgcomnetinteduaéroportxn--aroport-byaassogouvcomilgobgovcloudnses-1eu-west-1us-east-1euvipit1eurarubait1s3lbwebsites3websiteru-spbru-mskelasticcsrunstnukukcaukusnl-ams-1fr-par-1fr-par-2functionsnodess3ddlwhmrdbfnck8sifrs3-websitecockpitscblmgdbdtwhkafkpubprivs3ddlwhmrdbk8sifrs3-websitecockpitscblmgdbdtwhkafks3ddlrdbk8sifrs3-websitecockpitscblmgdbdtwhkafkk8sscalebookpl-wawfr-parnl-amsbaremetalsmartlabelinginstancesdechk2kuleuvenlaravelvoorloperurownoxazapscwhstgrvaporonline-serverobservablehqelementorantagonistreclaimjoteluluencowaydiademjelasticmatlabmagentositetrendhostingaxarnetjenv-arubajelejoteravendbemergenttrafficplexconvexkeliwebserveboltbegetcdnstaticson-rancherprimetelonstackitunison-servicesdnshomelinkyardbarsyjelecloudnscocomnetgovmycn-northwest-1cn-north-1s3s3-accesspoints3-websites3s3-accesspointrdsdualstacks3-deprecatedemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspoints3s3-accesspointrdsdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicn-northwest-1cn-north-1cn-northwest-1ebcomputeelbcn-north-1airflowcn-northwest-1cn-north-1oncn-northwest-1cn-north-1amazonawssagemakeramazonwebservicesdirectasgdsdhehahljlnmhbacscahqhshhihnlnynsnmofjbjzjxjtjhkcqtwgsjssxnxjxgxxzgz網絡网络公司orgmilcomnetedugovxn--55qx5dcanva-appsxn--io0a7iquickconnectcanvasitekhsjxn--od0algcanva-codemyqnapcloudsrvrlessclustersrealtimestorageleadpagescarrdcrdorgmilcomnomnetedugovhidnssupabaserdpareplmypiumsoxmitotaplpagesfirewalledreplitowodevwebview-assetsvfswebview-assetss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9consent-portals3s3-accesspointdualstackanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstacks3-deprecateds3-websitebedrock-agentcores3-object-lambdaexecute-apibedrock-agentcores3s3-accesspoints3-websites3-accesspoint-fipss3-fipss3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apis3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websiteaws-cloud9emrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9vfss3s3-accesspointdualstackemrappui-prods3-websiteaws-cloud9emrstudio-prods3-object-lambdaemrnotebooks-prodexecute-apicloud9eu-west-3ap-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1us-northeast-1ap-southeast-1me-south-1af-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1mrapaccesspoints3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstacks3-deprecatedanalytics-gatewayemrappui-prods3-websites3-accesspoint-fipsaws-cloud9s3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apicloud9s3s3-accesspointdualstackemrappui-prods3-websites3-accesspoint-fipss3-fipsemrstudio-prodbedrock-agentcores3-object-lambdaemrnotebooks-prodexecute-apis3eu-west-3ap-south-2eu-south-2computes3-ap-northeast-2elbrdss3-ap-east-1s3-sa-east-1s3-us-gov-west-1s3-eu-central-1s3-ca-central-1eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3s3-website-us-west-2s3-website-eu-west-1s3-external-1eu-central-1me-central-1ca-central-1il-central-1s3-us-west-1s3-eu-west-1s3-website-sa-east-1s3-website-ap-southeast-2ap-northeast-1ap-southeast-1s3-us-west-2s3-eu-west-2me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2s3-website-ap-southeast-1s3-1s3-globals3-ap-northeast-3eu-north-1airflowap-southeast-2s3-us-gov-east-1s3-fips-us-gov-east-1s3-me-south-1s3-ap-south-1ap-northeast-2s3-website-us-west-1ap-southeast-5s3-eu-north-1s3-ap-southeast-1s3-website-us-gov-west-1compute-1s3-eu-west-3us-gov-west-1s3-website-ap-northeast-1us-gov-east-1s3-fips-us-gov-west-1s3-website-us-east-1s3-ap-southeast-2ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1s3-us-east-2s3-ap-northeast-1authauthauth-fipsauth-fipseu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1mx-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2ap-east-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1eu-west-3eu-south-2ap-southeast-3eu-central-1ca-central-1ap-northeast-1ap-southeast-1ap-south-1us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5eu-west-1us-east-1ap-east-1sa-east-1csrframeservicesbuilderstg-builderdev-builder*ociocpocsazuregcpawsdemoinstanceeu-west-3ap-south-2eu-south-2eu-central-2ap-southeast-3ap-southeast-4ap-northeast-3eu-central-1me-central-1ca-central-1il-central-1ap-northeast-1ap-southeast-1me-south-1af-south-1eu-south-1ap-south-1ap-southeast-7us-west-2eu-west-2us-east-2eu-north-1ap-southeast-2ap-northeast-2ap-southeast-5us-gov-west-1us-gov-east-1ap-southeast-6ca-west-1us-west-1eu-west-1us-east-1ap-east-1sa-east-1previeweu-4us-4us-1eu-1us-2eu-2us-3eu-3appss3-websitekrkrobjectprivateobjectkrkrskrkrsobjectkrprivateobjectkr-privatecomputepaasrag-cloudrag-cloud-chjcloudjcloud-ver-jpcdemonodebalancermembersipeuxvsoncillaocelotonzayalilynxsphinxfentigercustomercaracalsgkrobjectstoragedesgkrusobjectkrkr-naverkr-naver-devkrprivatewebsiteobjectkr-naverkr-privatekr-naver-devjpjpkrjp4jp5s3-website-jpjpkrjp4jp5objectprivateobjecto365cloudstaticxendevapp001testcode-builder-stgplatformmediasiteprojedrydpagesjsx0desazacncoitrueu4uhkukgrbrushatenadiarymyspreadshopfrom-flfrom-wvwebspace-hosttheworkpchatenablogcursorusercontentservesarcasmapplinzisakuratanwixsitefin-ncloudstoragegov-ncloudstorageappchizigiizeis-into-carsdnsiskinkyadobeaemcloudis-a-therapistpgfogmyvncdojinis-an-actress1kappfldrvkozowqa2jpnmexprgmrfirewall-gatewaydynnscafjsfbsbxooguyfrom-gawoltlab-demois-a-anarchistwiardwebteaches-yogadattowebtb-hostinglive-websiteservegamegotpantheonfrom-nhsubsc-payfrom-ohvipsinaappfrom-cadyndns-officeztna-dingtalkhomelinuxfrom-mahercules-appservebbsstreakusercontentfrom-okfrom-wyfastly-terrariumis-a-llamaqualyhqportalserveexchangeon-vaporvivenushopciscofreakgrayjayleaguesmetaaiusercontentfrom-iais-a-libertariansaves-the-whalestaveusercontentyolasiteoperaunitepoint2thisis-a-catererclaudeusercontentlinodeusercontentfrom-vagithubusercontentsells-for-lesshosteurcanva-appsplaystation-cloudddnsfreefrom-pafrom-prfrom-waddnskingoutsystemscloudhotelwithflightmydattois-a-nascarfanmydbserverminiserverdamnserverservehumouris-a-playerfrom-nvfrom-nmemergentagentgentappsamplifyappfrom-kyis-an-accountantnfshostserveircfrom-akpythonanywherestackhero-networkpostman-echolikescandydyndns-mailobservableusercontentserveftpfreeboxosfrom-utcdn77-storageamazonawsneat-urlnclouddyndns-serverlinodeis-a-teacherfrom-vtgleezemythic-beastsus1-pleniteu1-plenitla1-plenitpaywhirlservecounterstrikejdevcloudhealth-carereformis-into-animegoogleapisis-a-painterafricaisa-hockeynutatmetais-an-actora2hostedis-a-democratdatadetectest-le-patrondigitaloceanspacesis-a-designeris-a-hunterlinodeobjectstemp-dnsissmarterthanyoufrom-arsimplesiteevennodetownnews-stagingis-a-liberalgooglecodejelasticservemp3qualyhqpartnerdyndns-free1cooldnsest-a-la-masiondrayddnsdynuddnsfrom-orfrom-miis-a-bloggerfrom-himydobisscanvacodeis-an-engineerest-a-la-maisonupsunappdevinappswafflecellmyasustorwpenginepoweredfrom-ctservep2psame-appmyshopblocksthingdustdatalikes-piediscordsezis-with-thebandlpusercontentis-leetshopitsite3utilitiesis-a-personaltrainersinaappladeskis-a-cheflogoipselfipbase44-sandboxnospamproxyalibabacloudcsmesswithdnsauthgearappsiamallamawithgooglelutrausercontentmochausercontentframercanvasmytabitdyndns-homew-credentialless-staticblitzcpserverdiscordsaysis-a-nurseappspotatlassian-isolated-3premotewdfrom-mtwixstudiocode0emm180rmyactivedirectoryawsappsmytuleapdnsabrpolyspaceqbuserrenderbuiltwithdarkboutirgotdnsabrdnsdopaascanva-hosted-embedawsglobalacceleratorhomesecuritypcmyiphostditchyouripclever-clouddyndns-ipon-aptibleis-a-musicianhosted-by-filessecuritytacticsappspaceusercontenthomeunixstrapiappsame-previewcf-ipfsmycloudnaselasticbeanstalkis-certifieddontexistkasserverik-serverdrive-platformatlassian-3pfirebaseappncpstorageherokuappawsapprunnerbarsycenteris-a-cubicle-slaveservehttpmyshopifyis-a-guruquicksytessiiitesorsitesmagicpatternsappis-a-cpameteorappfrom-wiis-a-rockstarbumbleshrimpdattolocaldatabricksappsreadthedocs-hostedfrom-rifamilydsdyndns-picsplesknsbplaceddnsaliasdynaliasdyndns-remotedoomdnsip-ddnsblogdnsis-a-doctorroutingthecloudamazoncognitobarsyonlinedsmynasddnsgurucloudflare-ipfsdeus-canvasfrom-idsmushcdnpagespeedmobilizerdyndns-at-homeunusualpersonhosted-by-previderis-a-republicandyn-o-saurstreamlitappworkisboringonthewificprapidqualifioappis-uberleetis-slickgetmyipwpdevcloudtypeformdyndns-at-workgentlentapismynascloudw-corp-staticblitzfrom-ingeekgalaxyservebeerfrom-mdonrenderspace-to-rentaivencloudappspacehostedwafaicloudcodespotblogspotatlassian-3p-us-gov-modfrom-ndfrom-msis-a-techieis-a-studentcustomer-ociis-a-photographerdurumisfrom-ksmassivegriddyndns-wikiis-an-entertaineris-a-hard-workermysecuritycamerafrom-mnrackmazedyndns-blogis-a-bulls-fanwritesthisblogfreemyipsimple-urlfrom-sdreservdauthgear-stagingest-mon-blogueuris-into-gamesrice-labsxtooldevicesakurawebis-an-anarchistoraclecloudappsdyndns-worksells-for-urhcloudfrom-dcfastvps-serverwpmucdnis-a-geekscrysecfrom-txis-into-cartoonsmodelscapetrycloudflarelocaltonetstreak-linkbalena-devicesfrom-njforgeblocksfreebox-oswebadorsitefrom-ncdoesntexisthobby-sitestreaklinkshomesecuritymacownprovidertuleap-partnersdattorelaywphostedmailservequakeis-a-socialistservehalflifepivohostingdynuhostingquipelementsw-staticblitzdyndns-webfrom-deproject-studyis-not-certifiedhercules-devis-a-financialadvisoramazonlightsailservepicsis-a-greenloseyouripfrom-ilwithyoutubemwcloudnonprodwiredbladehostingdnsdojofrom-tnpixolinomyqnapcloudncloudstorageis-an-artisthostedpiis-a-landscaperauiusercontentoaiusercontenton-forgeis-a-conservativedreamhostersnet-freaksapps-1and1is-goneencoreapifastly-edgefrom-nesalesforcefrom-scdeployagentoraclegovcloudappsfrom-alis-a-lawyercechirevultrobjectsstufftoreadisa-geekddnsgeeklovableprojecttry-snowplowfrom-moblogsyteis-a-bookkeepernogmyforumravendbmyboxdeelementoredsaacficogoorinforgcomgobnatneteduidstoreorgcomnetintedudevnomepublorgcomneteduathgovtestscalculatorspaynowinfoquizzesresearchedcloudnsfunnelsassessmentsjscaleforcetmacltdorgmilcompronetgovbizpresseklogesrsccloudcustomfltusrcloude4corealmgovmunicontentproxy9metacentrumdyndyndyndnsdynpagespages-researchitionoccustomercomymyspreadshopipv64diskussionsbereich4limacomrubgov2ixfirewall-gatewayddnssspdnsbarsykeymachinesquare7myhome-serverspeedpartnercommunity-proschuldockxenonconnectgünstigliefernbwcloud-os-instancedyndnssecmy-routerxn--gnstigliefern-wobin-butterl-o-g-i-nisteingeekin-dslin-berlinin-brbfuettertdasnetzleitungsenin-vpnlcube-serverdyn-ip24logoipdyn-berlinruhr-uni-bochum12hpgoipsrvdnsfruskygit-repossvn-reposinternet-dnsgünstigbestellenhome-webserverxn--gnstigbestellen-zvbbplacedheimdnscosidnswebspaceconfiglima-citydyndns1istmeinvirtualuserschulplattformmy-gatewayddnsseclebtimnetztest-iservmein-iservvirtual-userhome64iservschuletaifun-dnstraeumtgeradeschulserverdynamisches-dns123webseitednshomehs-heilbronndnsupdaterbssgraphicdwadpdwdaepeweaawapaafpfwfabwbpbacwcpcciwebuserapiobjects*teamst3r2lpabymebravepanelngrokiservstglclcrmerpflypagesbarsyvivenushoplocalcertlocalplayerbearbloggatewaydeno-stagingis-not-ais-a-goodbotdashvercelmocha-sandboxplatter-appreplitgithubpreviewworkersinbrowserevervaultis-ahrsndenoxmitmodxmyaddrstorageapipayloadgrebedocruncontainersstgstagelclstageloginlineis-a-fullstackcodepenleapcellngrok-freeis-coolpagelemonstoragewebharemediatechlibp2pdiscourseimaginecomyspreadshopstoreregbiz123hjemmesidefirmcoorgcomnetedugovsldorgmilcomwebgobartnetedugovtmorgpolcomsocartnetedugovassoagrondiscoodontk12medcuegyecpaabgengorgmilgalsaltulcomadmesmgobpubdocmonfindgnriouioproartlatvetnetfotedulojgovntrturibrbarxxxofficialbasechefprofmktgpsictechinfoarqtcontdentrrpppsiqgit-pagesritmedfieorgcomlibprieduaipgovriikmeactvsportorgmilcomscieunnetedugovnameinfopintouchtawktotawkmyspreadshoporgcomnomgobedu123miwebcomputeorgcomnetedugovbiznameinfocognito-idptransfer-webappeusc-de-east-1onjelasticnxaspdnsbarsydirectwpdeuxfleurstransurldogadoprvwcloudnsamazonwebservicesdnshomeuserpartycokoobinmkmfidymyspreadshopalandkapsiikixn--hkkinen-5wacloudplatformhäkkinen123kotisivuidacorgmilcompronetedugovbiznameinforadioorgcomneteduuserexperts-comptablestmmyspreadshopgretaprdcomnomynhccifbxoshuissier-justicenotairesaeroportfreeboxoson-webavocatassoportgouvkdnschirurgiens-dentistes-en-franceavouesfbx-os123sitewebveterinairechirurgiens-dentistespharmacienchambagrimedecinfreebox-osdediboxgoupilemszicpyicpvicppleysheezypagesedugovcnpyorgcomcybllcpvtnetedugovtnxonlineschooldaemond6atcopanelorgnetplybotdashstackitkaasorgmilcomnetedugovbizmodltdorgcomedugovcoorgcomneteduappwriteacorgcomnetedugovcloudtranslateusercontentorgcomnetedumobiassoorgcomnetedugovbarsysimplesitediscourseindorgmilcomgobneteduorgcomwebnetedugovguaminfonxhra教育敎育網絡网絡组織組織网络網络组织組织公司政府個人个人箇人ltdorgcomincneteduidvgovxn--uc0ay4axn--55qx5dxn--mk0axixn--io0a7ixn--uc0atvxn--zf0avxxn--lcvr32dxn--od0algxn--wcvs22dxn--gmqw5axn--od0aq3bxn--mxtq1mxn--ciqpnxn--tn0agxn--gmq050iorgmilcomgobneteduiservwp2tempurlmircloudfreesitewpmudevmyfastgadgetcloudaccessjelehalfboltfastvpsemergenteasypanelopencraftizcombrendlynamefromrtpersoadultmedorgpolrelcomproartnetedufirminfoassoshopcoopgouvtmcomediahotelforumvideosportorgsexagrargameslakaseroticaerotikatozsdereklamcasino2000filmsuliinfoboltshopprivnewsszexcityutazasjogaszkonyveloingatlaneacaicogoormyᬩᬮᬶmilwebschnetkopbizzonedesaponpesxn--9tfkymyspreadshopgovmytabittabitorderravpageaccok12idforgnetgovmuniltdplcaccotttvorgcomnetmeca6g5gpgamubacaicniocoukuptverdruscsdelhiindorgmilcomwebnicfingenpronetintedugovresbizbiharbarsyinternetbusinessschooltravelsupabasealumnigujaratfirminfoaeropostbankcoopindevscloudnsno-ipbarsybarrell-of-knowledgebarrel-of-knowledgensupdategroks-thisdnsupdatefor-ourknowsitalldvrcammittwalddynamic-dnsv-infowebhopselfipdyndnshere-for-moreilovecollegemayfirstforumzcloudnsmittwaldservertypo3servergroks-theeusekd1cdndyndnsidrawsainaueuapjpusstagemocksysdevicesclientcustreservdcustdevdisrecprodtestingcobeebyteutwenteboxfusebravepstmndedynngrokorgmilcomnomnetedugovqcxqzzbarsythingdustmo-siemensrb-hostingfh-muenstergitbookbluebitecloudbeesusercontentnodeartkiloappsforgerockdarklangresinstagingapigeebubbleb-datascryptedhypernodedappnodepantheonsitegitlabgithubkeeneticvirtualservercleverappshostyhostingon-rioedugitticketstelebitwixstudioon-k3sicp0icp12038jeleqotolairbubbleappsmyaddrstolosmyrdbxwebflowdrive-platformbeagleboardhasura-applolipopdefinimavaporcloudmusicianwebflowtestazurecontainerresindevicereadthedocsloginlineeditorxmoonscalesandcatsbasicserverwebthingsbrowsersafetymarkbeebyteappbitbucketidaccovistablogorgschnetgovxn--mgba3a4f16axn--mgba3a4fraarvanedgeايرانایرانjclaspeziapdudcefegelemeperetevebacanatavaparasabgagfgogrgpgalclblimfmrmcbmbvbfclcmcvcrcpcchlimifibicivipirisimncnbnanenrnpntnnolomobocoaogorosopotoptvtatctbtmtltotpusulunutpspapaqsvpvvvtvavvrtrsrprgrfrcrbrarorkrvstsssbscsmsispzczbzbozen-suedtirolmyspreadshopxn--bulsan-sdtirol-nsbxn--valledaoste-ebbtrentinoaltoadigetrentin-sued-tirolxn--forlcesena-c8axn--forl-cesena-fcbxn--bozen-sdtirol-2obtriestetrentinsuedtiroltrentino-s-tirollecceudineaostesienaparmaluccapaviagenoapaduaaostamonzaabruzzoternirietiturinmilanbozenlaziofermoleccocuneonuoropratola-speziavdataaligfvgpugmolcalcamlomumbsicpmnvenvaoedugovabrsarmaremrbastoslazibxosfirenzetrentinosüdtirolval-d-aostavalle-aostamessinacremonaravennatoscanatrentin-suedtirolbolognacalabriaurbinopesarofriuli-v-giuliaogliastraxn--valle-aoste-ebblaquilaandriatranibarlettasyncloudxn--valle-d-aoste-ehbaostavalleyvalled-aostatrentino-alto-adigevallee-d-aostexn--balsan-sdtirol-nsbpistoiasicilialucaniacataniaiserniaperugiabresciaveneziagorizialiguriaimperiabulsan-suedtirolbalsan-suedtirolbarlettatraniandriaxn--trentino-sdtirol-szbforlì-cesenatuscanyvallée-d-aostemantovavallée-aostecasertapiemontevalleaostaval-daostafriulivgiuliatrevisoforli-cesenavalléedaosteferrarapescaravald-aostatrentino-altoadigefriuli-vegiuliavallee-aostecarboniaiglesiastarantomediocampidanovalleedaostetrentinosud-tirolcampobassotrentinsüd-tiroltrentinosüd-tirolmonzabrianzatrentino-südtirolxn--trentino-sd-tirol-c3bpotenzacosenzavicenzaemiliaromagnavenicefrosinonemarchepordenonetrentinosued-tirolvaresemolisevalléeaostefriuli-veneziagiuliabasilicatalatinaanconasavonaveronamodenabiellabolzano-altoadigepugliafoggiaumbriatrentino-stirolgenovapadovamateranovararagusapiacenzatrentinostirolvalleeaostetempio-olbiasudsardegnatrentinsudtirolmassa-carrarafriuliveneziagiuliatrentinosuedtirolandria-barletta-tranitrapanixn--cesenaforl-i8amaceratacaltanissettaascoli-picenobrindisicarraramassacagliaririmininapolivibo-valentiachietibulsan-sudtirolbalsan-sudtiroltrentino-a-adigebulsanbalsaniglesiascarboniamilanotorinoteramodell-ogliastraarezzotrentinoalto-adigerovigotrentovenetoiglesias-carboniatrentino-sud-tirolaltoadigereggio-emiliareggio-calabriasardegnatranibarlettaandriapiedmontxn--sdtirol-n2amedio-campidanotrentino-süd-tirolfriuli-vgiuliafriuli-ve-giuliaromeennaromapisa32-b16-b64-blodiastibarineencomonaplesforlicesenailiadboxosalessandriasicilytrani-barletta-andriaxn--trentin-sdtirol-7vbpesarourbinotrentinsued-tirolcesena-forliforlìcesenaemilia-romagnamonzaebrianzaxn--trentinsdtirol-nsbtrentinos-tiroltrentinsüdtirolvalledaostaolbia-tempiocampidanomediovibovalentiasassarivalle-daostalombardysud-sardegnafriulivegiuliareggioemiliamonzaedellabrianzaalto-adigevercellitrentin-sudtiroltraniandriabarlettatrentino-sudtirolascolipicenobozen-südtirolfriulive-giuliaflorencexn--cesena-forl-mcbcarbonia-iglesiasaosta-valleycarrara-massadellogliastratrentinoa-adigexn--valleaoste-e7apesaro-urbinoxn--trentinosdtirol-7vbxn--trentin-sd-tirol-rzbxn--trentinsd-tirol-6vbtrani-andria-barlettatrentin-süd-tirolxn--trentinosd-tirol-rzbgrossetomonza-e-della-brianzasüdtirolreggiocalabriatrentinoaadigetrentin-südtirolverbano-cusio-ossolafriuliv-giuliaverbaniacampaniatrentino-aadigefriulivenezia-giuliasardiniaandriabarlettatranibarletta-trani-andriacatanzarooristanourbino-pesarocesena-forlìvalle-d-aostacampidano-medio123homepagesiracusatempioolbiasuedtirollombardiaavellinocesenaforlìtrentinofriuli-venezia-giuliabozen-sudtirolandria-trani-barlettabulsan-südtirolbalsan-südtirolmonza-brianzabolzanotrentino-sued-tirolbellunosalernolivornocrotonesondriodnshometrentinsud-tirolmassacarraratrentin-sud-tiroltrentino-suedtirolviterbobergamocesenaforliolbiatempiopalermobeneventoagrigentoofcoorgnetfmaitvphdengorgmilcomschnetedugovperagrikanieasukehandachitatokaiaisaikonanoharuamaobuhigashiuraowariasahiinuyamatobishimaiwakurashitarainazawatoyonegamagorimihamatoyotataharakariyayatomioguchikomakimiyoshinishiotokonamekiyosuchiryutoyohashiokazakiisshikikasugaikotakiratoeianjotogofusosetohazutsushimashinshirotakahamanisshinshikatsuhekinantoyokawaichinomiyatoyoakeodateogataakitaikawakyowahonjoogayurihonjonoshirokamiokakatagamimitanegojomeyokotekosakadaisenkazunonikahohonjyomoriyoshimisatohappoukamikoanihachirogatahigashinarusesembokufujisatokitaakitaitayanagiowanitakkomutsutsurutahirosakigonoheoirasetowadamisawanohejiaomorishingohiranairokunohehashikamitsugarushichinohehachinohenakadomarisannohekuroishisakaeisumiasahiotakiinzaiabikomatsudoyachiyomutsuzawakujukuriomigawakashiwatoganemihamanaritasakuranagaramobarahanamigawachoshishiroichoseikozakishisuikatorimidorichonankyonanfuttsuonjukufunabashinagareyamanodasosatakochuotohnoshourayasukimitsuyokaichibayotsukaidosodegauratateyamakamagayayokoshibahikariyachimatakatsuuratomisatokisarazukamogawaichikawanarashinoichinomiyashimofusaminamibososhirakoichiharaoamishirasatoikatahonaiainansaijoseiyoiyoozuuwajimaniihamanamikatamasakiuchikokihokutobetoonshikokuchuomatsuyamaimabarikamijimakumakogenyawatahamamatsunosabaeikedaobamasakaifukuiohionotsurugamihamawakasaminamiechizeneiheijikatsuyamatakahamaechizensoedaukihaomutaokawanishiogoribuzenonojosueumiokiotochikugosasagurisaigawamizumakishinyoshitomikurumekurateyamadakasuganakamamiyamanogatatakatahakataiizukakawaratagawakasuyaashiyainatsukimunakataminamitsuikishonaikurogifukuchikeisenhigashimiyakoshinguyukuhashiokagakiyamekogaongausuikahotohochuotoyotsumiyawakadazaifuhisayamatachiaraiyanagawanakagawahirokawachikujochikushinochikuhochikuzennamieotamaokumashowateneiiwakikoorinangoononishigoshimogoomotegomishimafukushimaasakawakagamiishishirakawaiitatefutabahiratayugawahanawakitakatakawamatakunimiyabukibandaihigashihironoyamatomiharuyamatsuriaizubangedatesomaaizuwakamatsuyanaizuaizumisatonishiaizuizumizakikitashiobarataishinkaneyamakoriyamainawashirotanagurafurudonosamegawasukagawaishikawatamakawaikedaogakitaruiginanenahashimahichisonakatsugawaibigawashirakawamizunamiminokamomitakekawauesekigaharatomikasakahogikitagatayamagatatajimianpachimotosuyaotsukakamigaharahidakanisekitokigujominogodoyorogifukasamatsutakayamawanouchihigashishirakawakasaharashimonitatsumagoichiyodakannakanrashowameiwakiryuotaoratomiokafujiokaitakuranaganoharahigashiagatsumatakasakishibukawaminakamikatashinatsukiyonokawabanumataannakaoizumimidorishintoisesakiuenoyoshiokakusatsutakayamanakanojonanmokutamamuratatebayashimaebashiotakekaitadaiwahongofuchukuietajimashobaramiharahatsukaichihigashihiroshimamiyoshikumanokurenakasakaseraseranishiasaminamifukuyamashinichionomichiosakikamijimajinsekikogentakeharaotobenanaeikedatohmaozoraobiraabirakyowaeniwataikibibaisharirebunerimohiroooketootarupippunishiokoppechitosefurubirahakodateshiranukakitahiroshimakushiroobihironanporoiwamizawaniikappukunneppufukushimanakasatsunaitoyourakuromatsunaiakabirakamisunagawashibechaurakawakamifuranonakatombetsuasahikawashimokawakayabeokoppebiratoriabashirisaromaatsumanumatahidakabifukamukawamikasahorokanaitoyotomisarufutsuhigashikawaishikarikitamiyoichiesashiiwanaitomariminamifuranoakkeshifuranotoyakoyakumootoineppushikaoishiraoinemuronayorohaboroashorobihororishirifujiutashinaihokutotakasuebetsuurausuassabukikonaishimamakinaiedatetoyabieinikiesanuryuoumuteshikagarikubetsuashibetsukimobetsuaibetsutobetsusobetsuembetsushimizuchippubetsurishirihokuryuhoronobeshintokutsubetsushibetsuhonbetsumombetsutsukigatakuriyamakoshimizushiriuchikutchanmurorannoboribetsukamishihorowassamushinshinotsukembuchiwakkanaikamoenaikiyosatotakinoueshikabesunagawafukagawanakagawatakikawakamikawahigashikagurahamatonbetsumatsumaemoseushirankoshishakotanimakanemashikeotofuketomakomaisandatambaitamiawajikasaiasagoshisoonoakoyashirotoyookaminamiawajiinagawafukusakitakasagokamigorikasugaharimayokawaashiyahimejiakashitaishiaogakisannantakinosumototakarazukanishinomiyashingugoshikinishiwakiyokatakaaioimikisayoyabukawanishiamagasakisasayamashinonsenkakogawaichikawakamikawatatsunotsukubaiwamaogawaasahisakaitokaioaraiitakobandodaigosuifuinaamikasumigaurakashimaomitamayachiyoshimodatetomobetoridehitachinakainashikisakuragawakasamayawaramoriyahitachiomiyanamegatayamagatahitachikamisuushikutakahagiibarakitonekoganakasowayukimihojosomitoryugasakishimotsumafujishirotsuchiurachikuseihitachiotashirosatotamatsukuriuchiharashikahakuinanaotsubatawajimakahokukawakitatsurugikaganominotosuzuuchinadakomatsuanamizunakanotohakusannonoichikanazawaiwateshiwafudaikawaimoriokaofunatohanamakikuzumakikitakamininohekunoheyamadayahabasumitaichinosekitanohatahiraizumirikuzentakatajobojiotsuchihironomiyakoiwaizumikarumaiichinohenodakujitonooshushizukuishifujisawamizusawakamaishikanegasakimannoutazukotohiraayagawazentsujihigashikagawauchinomikanonjisanukimarugamemitoyotakamatsutadotsunaoshimatonoshoakuneamamiizumihiokiyusuikinkoisasookouyamanakatanekagoshimakanoyaisenkawanabeminamitanemakurazakitarumizunishinoomotematsumotosatsumasendaioimatsudaayaseebinamiurazushinakaiodawaraiseharasagamiharahakoneaikawakaiseiatsugitsukuihadanoyamatoyamakitazamaoisochigasakininomiyayokosukakamakuraminamiashigarafujisawasamukawakiyokawahiratsukayugawaraokawaumajikochitsunootoyoakiinonishitosayasudahidakamiharasakawaniyodogawahigashitsunokagamigeiseisusakiotsukinaharisukumomurototosakamiochitoyotosashimizumotoyamanankokunakamurakitagawayusuharaogunichoyoukiasoutoozugyokutoamakusamifunetakamoriyamagaminamataminamiogunikikuchisumotoyamatonagasumashikiaraokumamotokamiamakusanishiharayatsushiroayabeseikasakyoideineujinakagyokameokakyotangokyotanabekyotambaminamiyamashiroyamashinatanabeyawatawazukaminaminantanmiyazuhigashiyamafukuchiyamakitamukokamojoyokizumaizuruujitawaraoyamazakinagaokakyokumiyamakawagoeinabeshimameiwaasahitaikiudonoisetsukisosakikuwanamihamamiyamasuzukatamakimisuginabarikumanokomonominamiisewataraitobakiwatakikihotadomatsusakayokkaichikameyamaureshinoishinomakishichikashukuohirataiwaosakizaohigashimatsushimashikamaiwanumashibataogawaraonagawakawasakiseminemarumoriminamisanrikukakudamuratawakuyatomiyanatoriwataritagajomisatotomekamirifushiroishimatsushimayamamotoshiogamafurukawahyugaebinotsunosaitoayakushimanobeokakitauramiyazakitakazakigokaseshiibamimatashintomikunitomikitakatakobayashikawaminamitakaharukijotakanabemiyakonojonishimeranichinankitagawakadogawamorotsukakisofukushimaminamimakisakaeobuseikedaogawamiasaokayaasahiotakiotarichinoinaomichikumakomaganechikuhokukaruizawayasuokaooshikaikusakaminamiaikitogakushimatsukawakawakamitateshinatakamorikitaaikishiojirimiyadahakubaiizunaiijimaiiyamamiyotasuzakayasakatoguraookuwanagawaminowahirayayamagataminamiminowafujimiomachisakakitakaginaganonakanosakuhokomoronagisoshinanomachiwadauedaiidaharasuwatomiachiaokianankisosakunozawaonsenagematsutakayamashimosuwamatsumotoyamanouchinakagawamochizukiazuminotatsunoobamaomuraseihiunzenosetofutsuikichijiwanagasakiisahayahasamisaikaikawatanasasebohiradokuchinotsugototogitsutsushimashimabarashinkamigotomatsuurayamazoekashibaikomakawaitenrioyodosangokoryoudaojiikarugayamatokoriyamatenkawakatsuragikurotakikawakamimiyakemitsuetakatorikamikitayamayamatotakadahegurishinjokanmakisakuraitawaramotogoseoudanarasoniandokawanishishimoichihigashiyoshinokashiharashimokitayamanosegawayoshinomintsivorytopazsakuragehirnsumomoaseinetopalmail-boxmokurenyoitamuikaojiyagosensanjoaganomyokoseiroagaomishibataniigatanagaokamurakamiuonumayuzawakariwatagamitainaitsunanminamiuonumatochioyahikojoetsuseiroukamosadoizumozakitokamachiitoigawasekikawakashiwazakitsubamemitsukekokonoesaikiusukibeppuusahimeshimakunisakihasamataketatsukumihitaoitahijikusuyufukujukamitsuebungoonobungotakadaibaraniimibizentsuyamaokayamakasaokahayashimayakagemaniwaakaiwamisakishinjotamanotakahashikibichuowakesojanagishookumenannishiawakurakurashikiasakuchisetouchikagaminosatoshotomigusukunakagusukuyaeseizenaurumaiheyaaguniogiminanjokinminamidaitokitanakagusukuyonaguniokinawaishigakikunigamiurasoekadenataramahiraraginozataketomishimojizamamitonakiitomanhigashimotobuyonabarugushikamionnanahanagohaebarukumejimakitadaitonakijinnishiharayomitanginowantokashikiishikawaikedasuitaminohizuminishisakaikananabenodaitoosakasayamayaokishiwadatadaokakaizukatondabayashichihayaakasakakumatorikadomasayamahigashiosakashijonawatehirakatataishimisakitajirihannansennankatanotoyonominatosettsuhigashiyodogawaibarakinosekitachuohigashisumiyoshifujiiderakashiwaraizumiotsutoyonakamatsubaramoriguchiizumisanoshimamototakatsukineyagawahabikinotakaishikawachinaganoyoshinogarikamiminearitaouchiimarihizenogikashimaariakekiyamafukudomikitagatakitahataomachigenkaikanzakinishiaritakyuragisagataratosutakushiroishikaratsuhamatamakouhokukawagoeyoshidasatteogoseirumaasakaurawaogawaniizaomiyayoriiotakishikihonjooganohannohanyuinasaitamaokegawaarakawayoshikawayokozehasudasayamahidakafukayachichibuiwatsukiryokamiyoshimikamiizumifujimiwarabiranzanmiyoshiminanoyashiosakadosugitomisatohigashichichibutodasokakukiyonokazoshiraokakasukabekounosukawajimatsurugashimamiyashirokitamotohatoyamamoroyamahatogayakumagayakawaguchinagatorokamisatomatsubushinamegawatokigawakamikawafujiminohigashimatsuyamakoshigayatokorozawas3isk01isk02ryuohkoseikonanaishorittotakashimamaibarahikonetorahimenishiazaikokagamokotoyasuotsukusatsunagahamamoriyamatoyosatotakatsukinotogawaomihachimanhigashiomiakagiunnanizumogotsuamayatsukakakinokimatsuehamadamasudahikawahikimiokuizumoyasugiyakumomisatotamayuohdahigashiizumookinoshimanishinoshimatsuwanoshimaneshimadafujiedayoshidashimodagotembaiwataatamikosaiyaizuitoizumishimahaibaramakinoharaomaezakikawanehonkannamisusonohigashiizufukuroinumazukawazufujiaraishizuokahamamatsushimizuizunokunimatsuzakimorimachiminamiizunishiizukikugawakakegawafujikawafujinomiyaujiietsugaoyamayaitaohiranikkoashikagakuroisokanumasakurashioyakarasuyamamotegiichikaikaminokawatochigihagamokanogisanobatonasumibunasushiobaranishikatautsunomiyaiwafunemashikoshimotsukeohtawaratakanezawaitanokomatsushimatokushimaichibaminamiaizumiwajikikainanmiyoshinarutomimamugiananmatsushigesanagochishishikuinakagawamachidachiyodakomaefussainagitaitochofufuchuomeotahigashiyamatotoshimaokutamaaogashimakodairaedogawaarakawahachiojishinagawatachikawashibuyasuginamihinodekiyosesumidaoshimanerimamitakahamuraadachinakanomizuhobunkyomegurominatokoganeihigashikurumekokubunjihigashimurayamamusashimurayamatamakitahinochuokotokatsushikakouzushimaogasawaraakishimakunitachishinjukusetagayamusashinohachijoitabashiakirunohinoharachizunanbukotouramisasawakasayonagokogehinoyazutottorinichinansakaiminatokawaharaoyabetairainamiasahinantoimizufuchutakaokakurobeyamadajohanatoyamatonaminyuzenfunahashinakaniikawanamerikawaunazukitogahimiuozufukumitsutateyamakamiichiiwadearidayuasainamitaijikatsuragiaridagawatanabemihamahidakakainankiminomisatoshingushirahamakamitondayurakozakoyagobokitayamawakayamakudoyamahashimotokushimotokozagawahirogawakinokawanachikatsuurarsuseroeoishidasagaeoguniasahinagaitendonanyoobanazawanishikawasakataohkuratozawamikawamamurogawayamagatafunagatatakahatashonaishinjokahokuiideyuzakawanishitsuruokakaminoyamayamanobeshiratakamurayamanakayamakaneyamahigashineyonezawasakegawamitouubeyuuabushimonosekitabuseoshimatoyotaiwakunihikarishunannagatohagihofukudamatsutokuyamashowadoshitsurunanbukoshukaiminami-alpsnirasakikosugeotsukioshinohokutominobuyamanashifuefukichuokofuichikawamisatoyamanakakonakamichitabayamanishikatsuranarusawafujikawahayakawafujiyoshidafujikawaguchikouenohara長野京都岐阜大阪三重群馬千葉滋賀佐賀奈良adednelgaccogogror秋田愛知高知埼玉沖縄栃木熊本岩手青森山梨新潟島根鳥取長崎香川宮城石川大分宮崎茨城山口兵庫山形徳島広島福島福岡岡山富山静岡愛媛福井東京xn--4it168dhatenadiaryxn--vgu402ckawaiishophatenablogcocottenamaste北海道penneehimeiwateversestabachibashigagonnagunmapermahaccaakitaosakauh-ohblushkochiaichifukuikuroncapooitigohyogotokyokyotopunyuthickcheap0t00g00j0mie2-ddaapyawjg0amfemsubxiiboomoobutchueekpgwrgrherskrboyrdyupperunderflierchipsmydnsheavyangryhippygirlyrulez神奈川鹿児島和歌山bambinaxn--nit225kokayamasaitamaxn--k7yn95exn--1lqs03nsapporoparasitelolipopmcxn--efvn9sniigatafukuokatokushimafukushimahiroshimakagoshimafakefurokinawaxn--8pvr4ucoolblogxn--0trq7p7nnkawasakinagasakimiyazakichilloutxn--8ltr62kxn--klty5xpeeweezombiecutegirlxn--rny31hxn--uuwu58axn--ntso0iqx3axn--djrs72d6uytoyamanikitanyantakagawamimozanagoyaboyfriendxn--2m4a15egreaterchowderegoismyamagatafashionstorexn--elqq16hxn--pssu33lsendaimiyagixn--rht27zpecoriaomorisaloonwatsonvivianxn--djty4knobushipigboatnaganopinokoxn--f6qx53asadistvelvetsecretxn--5js045dchicappayamanashiibarakidigickgirlfriendxn--1lqs71dmongolianxn--c3s14mxn--qqqt11mtochigixn--5rtq34kparallelo0o0mondkobesagabonadecaoitanarafoolkilldecimainhiholomosblokilociaoundopupugifutankcrapflopnooroopsmodsholyjeezstripperpepperbittershizuokaxn--rht3dkitakyushureadymadeicurusversusmatrixxn--rht61ehungryfloppygloomycrankyhandcraftedlittlestarxn--klt787dxn--kltx9awhitesnowsunnydaytottorilovepoptheshopbuyshopxn--5rtp49cxn--d5qv7z876cwebaccelxn--kbrq7oxn--4pvxsxn--1ctwolovesickkumamotocatfoodxn--tor131oyokohamawakayamatonkotsuxn--ehqz56nxn--uist22hxn--6btw5axn--kltp7dyamaguchifrenchkisspussycatxn--4it797kxn--uisz3gbabybluexn--zbx025dnetgamersxn--7t0a264ckanagawaxn--6orx2rishikawaxn--ntsq17ghalfmoonschoolbusjellybeanxn--mkru45iusercontentlolitapunkxn--32vp30hsakurastoragehokkaidoshimanecandypopbabymilksupersaleweblikeraindropbackdropwebsozaikikirarahateblodaynightmeneacsccogoormobiinfoaeusxxorgmilcomnetedugovorgcomnetedugovbizinfotmprdorgmilcomnomedugovassnotairespresseassocoopgouvveterinairemedecinpharmaciensorgnetedugovtraorgcomedurepgovmeneperekgacscaiiocogoitoresmshsseoulbusanulsandaeguc01milvkimmvchungnamjeonnamjeonbukeliv-dnsgyeonggijejueliv-cdnincheondaejeongangwongyeongbukgwangjuchungbukgyeongnameliv-apicoeduindorgcomembnetedugovorgmilcomnetedugovjcloudorgcomnetintedugovperbnrinfocooyorgcomnetedugovethipfscanvamypepethw3sstorachakeeneticjoinmcinbrowserdwebcyonnftstoragemyfritzaemewphlxachotelltdorgcomwebsocschngonetintedugrpgovassnomgacsccoorgnetedugovbizinfo123websiteidorgmilcomasnnetedugovconfidmedorgcomplcschnetedugovaccoorgnetgovpresstmassoirseproxaccosoundcasthoptocraftvp4c66orgnetedugovitsmcdirmyboxbarsyedgestacksynologylogintoopencloudnohostwebhopdiskstationi234tcp4hoocgroknoipprivmydsddnsdnsforlohmustransipdscloudfilegear-sgbrasiliafilegearframerbarsybarsyonlinecoprdorgmilcomnomedugovinforgcomnetedugovnameacprorgcomartnetedugovpresseinfoassoinstgouvorgnycedugovbarsydscloudjuorgcomnetedugovminisiteaccoororgcomnetgovorgmilcompronetintedugovbizmuseumnameinfoaerocoopaccoorgcomnetintedugovbizcooporgcomgobneteduorgmilcomnetedugovbiznameaccoorgmilneteduadvgovcoorgcomnetaltgovforgotherhiskeeneticispmanagernomassoprod5476132eastasiacentraluswesteuropewestus2eastus2pnortheurope-01newzealandnorth-01southindia-01southcentralus2-01norwaywest-01eastus2-01westus2-01australiaeast-01italynorth-01israelnorthwest-01swedencentral-01westeurope-01centraluseuap-01taiwannorthwest-01uaecentral-01northcentralusstage-01israelcentral-01mexicocentral-01canadacentral-01austriaeast-01germanywestcentral-01francecentral-01ukwest-01denmarkeast-01polandcentral-01eastus-01westus-01swedensouth-01eastus3-01westus3-01brazilsouth-01centralus-01francesouth-01australiacentral-01westindia-01uaenorth-01jioindiacentral-01canadaeast-01belgiumcentral-01spaincentral-01koreacentral-01chilecentral-01qatarcentral-01westcentralus-01eastus2euap-01norwayeast-01southafricanorth-01brazilsoutheast-01germanynorth-01switzerlandnorth-01switzerlandwest-01japanwest-01southafricawest-01japaneast-01eastasia-01indiasouthcentral-01taiwannorth-01centralindia-01uksouth-01southcentralus-01northcentralus-01eastasiastage-01indonesiacentral-01australiacentral2-01australiasoutheast-01malaysiawest-01koreasouth-01southeastasia-01southeastus5-01northeastus5-01jioindiawest-01rucdnwest1-usfra1-desandboxjls-sto1jls-sto3jls-sto2aglobalabglobalsslmapprodfreetlsmapvpslon-1lon-2ny-1fr-1sg-1ny-2paassnwebpaashostingjelasticnordeste-idcsocuserpagescwebfileblobservicebuscoreatlricnjsjelasticwebsitestoragesezagbinruhuukjptsmyspreadshopmynetnameakamaiorigin-stagingfrom-coipv64dynv6cdn77serveblogadobeaemcloudhicamsprytdnsupno-ipownipde5ovhicpfirewall-gatewaysytesmypsxbarsyusgovcloudapimyamazemyradwebakamaihdsaveincloudfastlylbfrom-lasubsc-paysquare7in-the-bandblackbaudcdnhomelinuxoninfernoctfcloudservebbsdns-dynamiccloudfrontakamai-stagingipifonyham-radio-opsenseeringclickrisingcommunity-profrom-nylocalcertgrafana-devedgesuite-stagingcloudflareanycasteating-organicatlassian-devmydattofeste-iplocaltotorprojectknx-serveredgekeycloudflareglobalcloudyclustercasacamserveftpakamaized-stagingakamaiorigindns-cloudmyeffectboomlabotdashbuyshousestwmailhetemlazure-mobilein-dslthruhereredirectmedynuddnsbouncemesupabaseluyanicloudappakamaicloudfunctionsdebiannhlfanpgafanstatic-accessin-vpnmysynologymafeloappudohomeftptrafficmanagersiteleafseidatmemsetcloudflarecloudaccesskeyword-onazure-apiis-a-chefdoes-itgets-itwebhopselfiphomeipkicks-assedgesuitewindowsserver-ontunnelmolemydissentscrapper-sitecloudflarecnuni5srcfggffiobbzabchrsndenodynuopikddnsvpndnsakadnselastxkinghostvps-hostfastlyhomeunixazureedgeshopselectdontexistmyfritzcloudjiffyalwaysdatasells-itsquaresbroke-itazurefddattolocalat-band-campmeinforumfamilydsazurestaticappsdefinimabplaceddnsaliasdynaliasnow-dnsblogdnsroutingthecloudendofinternetdsmynasakamaiedgemymediapcadobeio-staticakamaiedge-stagingakamaihd-stagingddns-ipprivatizehealthinsurancelive-onkrellianschokokeksmassivegridmysecuritycamerarackmazeserveminecraftfrom-azis-a-geekakamaizedmoonscaleoffice-on-theusgovtrafficmanageradobeioruntimeedgekey-stagingreserve-onlinechannelsdvrdnsdojousgovcloudappcdn77-sslapps-1and1podzoneazurewebsitesdynathomescaleforceyandexcloudvusercontentisa-geekcdn-edgescoaemalcesappwriteazimuthtlonarvobuiltwithrocketnoticeablestorecomwebrecnetperotherfirminfoartslgdloncogoiltdorgmilcolcomplcschgenngonetedugovbiznamefirmmobiacincoorgmilcomnomwebgobnetintedubizinfocomyspreadshopdemongovtransurl123websitehosting-clusterkhplaycistrongsnesosvalervålerxn--vler-qoaossandeheroysandeherøybøboheroyherøyxn--hery-iraxn--b-5gavalerbøboxn--b-5gasandesandexn--hery-iraxn--vler-qoavålerhåreålaahavaofsfvfhlolnlalrlhmfmtmahcostntbuåstrmreigersundmyspreadshopgálsáeidsvolltingvollgildeskalflorøvadsøvardøvanylvenxn--bhccavuotna-k7astrandaxn--kvnangen-k0axn--sknland-fxaxn--mosjen-eyarakkestadhyllestadnannestadvevelstadvaapstenordre-landsondre-landsøndre-landtjieltexn--vrggt-xqadsør-aurdalsor-aurdalheradstordmoldefordeførdeseljefedjeryggehemnexn--krehamn-dxasognegranesøgnebrynetjomevallebykletokkegiskedovretjømehobølvoldasaudatolgasømnaviknadønnasomnadonnatranafrananesnaraumasmolatrænafrænalesjasmølaørstaorstahitrafloraaukraloppafrøyarissasnasahalsagalsaromsaraisaráisafroyasnåsagronghobolfjelltydalårdalardalaskimharamkraanghkekråanghkesorumbarumhurumbærumsørummodumsálátbálátfrognbjugnvåganvagangulenskienløtenlotenstrynvefsnxn--merker-kuaskaunsveiobømlobomloskjåkvardoflorovadsosalatbalatsálatklæbuklabuselbubarduulvikskjakklepprisørxn--nttery-byaeflåeidflahofmilgolholsellomskifetvikdepvgsfhsaskerrisorhamarasnesåsnesrørosrorosxn--slat-5namasoynaroyvaroyluroydyroyaskoyradoyandoyrodoymeloyradøyandøyrødøymeløyaskøylurøydyrøymåsøyværøynærøyhoylandethøylandetdivtasvuodnalørenskoglorenskognesoddtangenxn--tjme-hraxn--smla-hraxn--stjrdal-s1aunjargalillehammerunjárgaxn--hamary-fyadavvenjargaxn--bearalvhki-y4a123hjemmesidegjerdrumxn--brnnysund-m8acxn--tnsberg-q1axn--mlatvuopmi-s4axn--snsa-roaxn--skierv-utaxn--brum-voatysfjordkvafjordeidfjordkvæfjordsongdalenmjondalenmjøndalenxn--gls-elackragerogáŋgaviikagangaviikasørreisasorreisasør-varangersor-varangerxn--risr-iraskiervaxn--frna-woaxn--trna-woakvinesdalleksvikleirvikrøyrvikroyrviksvelvikvenneslaevje-og-hornnessandnessjøenmarnardalvindafjordsandefjordenebakksnillfjordullensvangxn--trany-yuabrønnøysundnamsskoganaustevollxn--stjrdalshalsen-sqbnord-aurdalnord-frontrøgstadtrogstadgrimstadflakstadgjerstadxn--sandy-yuaxn--leagaviika-52bnore-og-uvdalvegarsheixn--rlingen-mxaxn--ggaviika-8ya47hvegårsheikarlsoykvitsoymasfjordenhamaroyinderoyosteroydavvenjárgasauheradguovdageaidnuxn--vre-eiker-k8abronnoysiellakkrødsheradkrodsheradkvinnheradbrønnøyxn--mtta-vrjjat-k7afxn--lrenskog-54akvitsøyvárggátkarlsøyosterøyinderøyhamarøybronnoysundxn--aurskog-hland-jnbbahccavuotnabáhccavuotnagiehtavuoatnastor-elvdalmidtre-gauldalxn--gildeskl-g0akarasjokevenassixn--bievt-0qaxn--yer-znalebesbynessebyxn--hbmer-xqamalselvmålselvxn--unjrga-rtamøre-og-romsdalmore-og-romsdalhareidmelandørlandorlandstrandålgårdsolundalgardafjordåfjorddielddanuorrikautokeinoxn--stre-toten-zcbskodjeaejriestangeliernebamblestokkefauskesnåasesnaasekongsvingerlangevagberlevagxn--flor-jrahattfjelldalostre-totenøstre-totenvestfoldxn--mely-iraálaheadjualaheadjunordreisaxn--troms-zuaxn--lgrd-poacporsangerflatangerstavangerleikangerbremangersamnangergieldakarasjohkaxn--rdy-0nabfrostautsirasnoasatromsaxn--sr-aurdal-l8aflekkefjordjølsterjolsteraremarkhedmarknååmesjevuemienaamesjevuemiexn--vard-jrarollagmeråkermerakerorskogørskogxn--bdddj-mrabdákŋoluoktaxn--osyro-wuaaknoluoktatrysilskjervøymandaljondalbindalrindalmeldalsuldalorkdalsigdalalvdallærdalhurdalsirdalverdallerdallardaloppdalåseralaseralhadselkragerødivttasvuotnaoverhallasteinkjerxn--hnefoss-q1askedsmokorsettromsøxn--dyry-iravestre-totenmuseumxn--sandnessjen-ogbrahkkeravjufylkesbiblbájddarbajddarxn--laheadju-7yarennesøyxn--koluokta-7ya57hxn--hgebostad-g3aleirfjordstorfjordbalsfjordbåtsfjordbatsfjordmuosátbievátloabátkárášjohkanøtterøyxn--mjndalen-64anordkappláhppilahppialstahaugsiljanverranrøykenroykenhaldenlyngenbergenhortenhønefosshonefosstroandinbeiarnvarggatosoyroosøyrotromsoidrettmuosatbievatruovatloabatvoagattynsetnessetxn--indery-fyaskánitskanitraholtråholtxn--ystre-slidre-ujbandebusarpsborgbearduxn--karlsy-fyahordalandjorpelandjørpelanddeatnuringsakersør-odalsor-odalxn--slt-elabringerikeaudnedalnittedalnissedalhemsedalslattumsurnadalxn--blt-elabelverumstjørdalnaustdalhjartdalgjøvikfyresdalhasviknarviklarvikgjovikmalvikgamviklenvikporsgrunnstjordalengerdaldrobakdrøbakxn--msy-ula0hvestvagoyxn--vgan-qoaxn--ryken-vuaxn--lten-graxn--stfold-9xaxn--hpmir-xqaxn--lury-iramálatvuopmimalatvuopmitysværkirkenesbirkenesmoskenesbáidárxn--fjord-lraxn--rdal-poabahcavuotnabáhcavuotnaxn--frde-gralindåsbearalvahkixn--hobl-iraráhkkerávjuxn--loabt-0qavågåáltábodøsundlundraderådeetnetimeholeauregrueoddavagavegaranatanaarnasolasulaaltalekafusavangbergkvamåmliamlibokntinnroangranosenoslobodorøstroststatåmotamotivguprivøyeroyerliermossvossxn--nvuotna-hwalusterlunnermarkerhábmerhabmerhvalerfjalerxn--rholt-mratysvarbaidarfitjargaularhápmirhapmirmelhusfosnesøksnesoksnestysneshemnesevenesflesbergeidsbergtonsbergtønsberglindasxn--sndre-land-0cbnamsosxn--srum-graøystre-slidreoystre-slidrevestre-slidretrondheimbalestrandxn--langevg-jxaaustrheimxn--skjk-soavagsoyaveroysandoykarmoyfinnoytranoyvestbytranbysykkylvenxn--hyanger-q1aspjelkavikandasuoloxn--fl-ziaxn--drbak-wuastathellexn--sr-varanger-ggbtelemarkxn--bhcavuotna-s4axn--porsgu-sta26fčáhcesuolocahcesuoloakrehamnåkrehamnsandøykarmøyfinnøytranøyvågsøyaverøynamdalseidxn--lesund-huabadaddjaxn--vegrshei-c0axn--btsfjord-9zagildeskålporsanguxn--trgstad-r1anávuotnanavuotnahammerfestxn--sgne-graxn--brnny-wuacibestadharstadnarviikaevenáššivestnesgjemnessandnesagdenesrennesoyxn--avery-yuaxn--tysvr-vrabearalváhkikongsbergspydebergrandabergxn--andy-iradavvesiidaxn--krdsherad-m8aporsáŋgufredrikstadbjerkreimringeburennebuaurskog-holandnotteroyxn--vgsy-qoa0jxn--rmskog-byaskierváivelandbyglandfrolandaurlandforsandxn--bjddar-ptamidsundålesundalesundfetsundfarsundovre-eikerøvre-eikerakershusxn--moreke-juasørfoldøstfoldostfoldsorfoldhøyangerhoyangerlevangerorkangertanangerxn--vestvgy-ixa6olillesandulsteinxn--rennesy-v1agranvinskjervoyxn--klbu-woalavagisxn--h-2faxn--ryrvik-byakafjordkåfjordseljordfolkebiblxn--gjvik-wuajevnakerxn--kfjord-iuabudejjuxn--kranghke-b0axn--davvenjrga-y4axn--rland-uuaxn--ldingen-q1axn--mlselv-iuaxn--rady-iraxn--linds-prabrumunddalxn--ygarden-p1amo-i-ranaeidskogrømskogromskoghjelmelandxn--finny-yuaxn--sr-odal-q1axn--skjervy-v1aballangenkvanangenkvænangengratangenxn--hmmrfeasta-s4acvossevangensuohkanxn--rde-ulaxn--mli-tlaxn--ksnes-uuanordlandskanlandskånlandsortlandfuoiskuxn--rros-graxn--hcesuolo-7ya35bxn--eveni-0qa01gagaivuotnagáivuotnaxn--seral-lradrammenmodalenmosjoenjan-mayentorskensteigengloppenxn--snes-poamatta-varjjatxn--sr-fron-q1aomasvuotnajessheimbådåddjåxn--krager-gyaxn--kvfjord-nxaxn--asky-iraxn--snase-nraxn--bidr-5nacholtålenxn--vads-jraxn--jlster-byamosjøenxn--rst-0nastavernxn--ostery-fyaxn--oppegrd-ixaxn--sknit-yqaxn--risa-5naoppegårdskiptvetrendalenholtalenxn--mot-tlaxn--lhppi-xqaxn--holtlen-hxaxn--srreisa-q1akopervikxn--muost-0qaxn--bmlo-grahokksundkvalsundegersundxn--karmy-yuaullensakerxn--hylandet-54axn--kvitsy-fyaxn--bod-2nalangevågberlevågkristiansandxn--rsta-frahornindalstjørdalshalsenstjordalshalsensandnessjoenhámmárfeastaxn--lrdal-srasør-fronsor-fronnord-odalkristiansundmátta-várjjatvestvågøynesoddennotoddenbuskerudøygardenoygardensalangenlavangenralingenrælingenlodingenlødingenleaŋgaviikalaakesvuemieleangaviikauenorgexn--srfold-byaaskvollxn--rskog-uuaxn--nry-yla5gxn--vry-yla5ghammarfeastaxn--rhkkervju-01afxn--givuotna-8yakommunekrokstadelvanedre-eikerhagebostadhægebostadxn--berlevg-jxakviteseidxn--s-1faxn--l-1faxn--nmesjevuemie-tcbafuosskomoårekemoarekexn--lt-liacxn--jrpeland-54asvalbardoppegardholmestrandtvedestrandsogndalsokndalarendalsunndalfolldalxn--krjohka-hwab49jlyngdaletnedalnorddalsaltdalgausdalskedsmovaksdalgjesdalstordalxn--frya-hraaarbortedrangedalxn--smna-graaurskog-hølandxn--vg-yiabtjeldsundhaugesundlindesnesxn--mre-og-romsdal-qqbxn--dnna-gradyntmpheremerseineshacknetenterprisecloudmineaccomaorimāoriorgmilcriiwigennetschoolhealthkiwigovtgeekxn--mori-qsacloudnsparliamentcomedorgcompronetedugovmuseumwebsitekinservicebarsywebsitebuildereerobookheimdnsleapcelleero-stagetechcrscsslorigingohomecdbedeeeiemesecabgngilnlalplchfisiincnnoroptatitmtltruauhulumkdkukskjplvtrgrfrkrhrusesismycynzcznetinteduassoososcloudstgbetaaezaeuhkusjshatenadiarycdn77hoptozaptois-a-knightmyftpno-ipjpnddnssdpdnsspdnsbarsysweetpepperis-a-bruinsfanis-very-sweetservegameis-a-soxfanhomelinuxcdn77-secureservebbsmisconfusedwebredirectblogsitefreedesktopcouchpotatofriestoolforgeaccesscamis-lostreadmyblogsmall-webfedorapeopleserveftpis-a-celticsfanmywirepotagertwmailin-dslsellsyourhomeread-booksfreeddnscable-modemis-savednflfanufcfanmlbfanstuff-4-saleendoftheinternetin-vpnmy-firewallhomeftpis-localis-a-chefboldlygoingnowherewebhopselfipkicks-assroxatunkcamdvrfedoraprojectgotdnsdvrdnsdyndnspubtlspimientahomeunixdontexistfedorainfracloudwmflabsfspagesbmoattachmentsteckidsfamilydsdnsaliasdynaliasnow-dnscloudnsdoomdnsduckdnsblogdnshomednsroutingthecloudendofinternetdsmynasip-dynamicpoivronhttpbinmyfirewallis-very-evilmysecuritycamerais-a-linux-userwmcloudis-a-geektuxfamilyis-a-candidatedoesntexistis-very-badhobby-sitegame-hostaltervistais-foundis-a-patsfandnsdojohepforgepodzonedynservcollegefanis-very-goodfrom-meis-very-niceisa-geeknerdpolacmedsldingorgcomnomgobabonetedupleskaemhlxmyboxrockyprvcydeuxfleursvibekitprodpdnscodebergheyflowstatichostlinkyhostorgmilcomnomgobneteduorgcomeduiorgmilcomngonetedugovcloudns1337ngrokacorggogfamcomwebgobnetedugokgopgkpgovgosbizpasaugumicsopozpapuwmwsrprusiskwpspkppspkmpspokeoiawsawifoumsdnskokwpmuppuppsppiwwiwoowuzswkzoschrzpisdnwzmiuwwitdpssewsseumigugimoirmpinbwinbwiihupporzgwgriwupowwskrwioswuozstarostwokonsulattmpccopruszkowmyspreadshopostrodakartuzyopolegminamediaustkazgorajgoraolawailawalomzawloclradombytomjaworznotargilubinkoninzagantorunkutnokepnonakloczestsopotsanokturekplockslasksklepzarowlukowmedaidgdaorgmilrelcomnomatmgsmartneteduelkgovwawsossexbiztgorysejnytychypomorzeboleslawiechomesklepsdscloudunicloudzakopanelegnicarawa-mazbydgoszczswidnikkrasnikwloclawekbielawamragowograjeworealestatebeskidykaszubymalopolskaprzeworskswiebodzinlecznadfirmaszkolawarmiagdyniamiastakazimierz-dolnymalborkswidnicadlugolekaostrolekapodlasieelblagtravelsimplesitezachpomormielecszczecinnieruchomosciwalbrzychlezajsklublinbedzinpoznanwielunmielnooleckostarachowicedkontopowiatwroclawrybniksuwalkileborkslupskgdanskostrowwlkptarnobrzegtourismwegrowkrakowglogowyou2pilanysamailwrocinfoagroautobeepshoppriviqhslapypiszlodzcfolksecommerce-shopmazurypulawyskoczowrzeszowpomorskiezgierzkaliszolkuszlowiczostrowiecsosnowiecmazowszewodzislawbialowiezazgorzeleckatowicepabianicejelenia-gorawolominkarpaczsieradznowarudaczeladzkonskowolaskierniewiceswinoujscieturystykabieszczadycieszynketrzynolsztynbialystokbabia-goraprochowicewarszawastalowa-wolapolkowicegorlicegliwiceponiatowalimanowalubartowaugustowkobierzyceopocznognieznoszczytnokolobrzegshoparenapodhalebielskoklodzkostargardcoshipatwithplayitownnamecoorgnetedugovacorgcomproestnetedugovbiznameislaprofinforechtngrokmedaaaacacpaenglawjurbarbarsykeeneticavocatacctcloudnsorgcomsecplonetedugov123paginaweborgcomnetintedugovnomepublidkinbarsygovx443cloudnsorgmilcomnetedugovcooporgmilcomschnetedugovnamecomcannetlibassoaemclantmcontstoreorgcomnomrecwwwbarsyfirminfoshopartsstackitmyddnswebspacelima-cityacincooxorgedugovbarsybrendlyhbvpsvpsspectrumlandinghostingacppmordoviamcprecbgorgmilcomspbnetintedumsknovgovbirrasmcdirmytismircloudvladimirnalchikadygeyamarinepyatigorskmyjinobashkiriaeurodirvladikavkazna4ugroznykustanaikalmykiacldmaildagestaniranbuildcloudcanvaliaravalrwxwixdevelopmentappwritemigrationneedleverceldatabasestackitcodereplravendbsanityonporterlovableaccoorgmilnetgovcoopmedorgcompubschnetedugovservicemecomygovorggovtvmedorgcomnetedugovinfoedgfacbmlonihkutwpsryxzbdtmacfhppmyspreadshopbrandpartiorgcomfhvpress123minsidaitcouldbeworlanbibkommunalforbundfhskiopsyskomvuxkomforbnaturbruksgymnloginlineorgcomnetedugovenscaledeuusentsurgebotdaorgmilcomnetgovnowteleporthashbangplatformlovablebarsyshopwarebasehoplixbarsyonlinemsf5gitpagewawamscofigma-govcaffeinefigmacanvasoltstscwputerbarsysupportchatgptsquareomniweopensocialcpanelplaycodenotionnovecorewpsquaredpreviewjelecyonbyensrhtfastvpspieboxconvexjouwwebheyflowplatformshdocsflowyloginlinemadethissourcecraftclouderaorgorgcomartedugouvunivmeorgcomnetedugovsurveysstatichfheiyumanusxs4allprojectmyfastubervibehostapp-ionosdeployagentmecoorgcomschnetedugovbizcncostoreorgmilcomneteduembaixadaconsuladokiraranohoprincipesaotomeheliohobarsystorebaseshopwaresellfyaisanityabkhaziavologdamordoviapenzalenugsochinavoiexnetspbmsknovnorth-kazakhstanashgabadkareliaarmeniageorgiavladimirnalchikivanovobukharaadygeyakhakassiakalugakrasnodarjambylaktyubinsktroitskbryanskobninskkurganazerbaijanpokrovskbashkiriatselinogradvladikavkazmurmansktulatuvamangyshlaktashkentchimkentgroznykaragandatermezarkhangelskkustanaikalmykiabalashoveast-kazakhstankaracoldagestantogliattibarsyredorgcomgobedumirenaccoorgjelasticdiscoursecleverappsschacmiincogoornetonlineshopcogoorgmilcomwebnicnetintedugovbiznametestcoorgmilcomnomnetedugovorangecloudpersoindorgcomfinnatnetgovensmincomtourismintlinfox0611orgmilcomnetedugovquickconnectvpnplusnettprequalifymeaddrmyaddrntdllwadlnctvavdrk12orgmilpolbeltelcomwebgennetedutskkepgovbbsbiznameinfocoorgmilcompronetedugovbiznameinfobetter-thanworse-thansakurafromdyndnson-the-webmymailerorgmilurlcomneteduidvgovmydnsgameclubebizmeneacsccogotvorhotelmilmobiinfovodteiflgplkmsmsbcckhincndnvncoztltmkckppzpdprvcvkvlvcrkrkscxuzchernovtsyrivneyaltaodesavolynrovnolutskltdinforgcomnetedugovbizvinnicazhitomirternopilpoltavakropyvnytskyizaporizhzhiasevastopolsebastopoluzhgoroduzhhorodkharkovkharkivvinnytsiakhmelnytskyizaporizhzhecrimeaodessazhytomyrnikolaevcherkassydonetskluganskluhanskkirovogradivano-frankivskchernivtsikrymkievkyivlvivsumyzakarpattiamykolaivcherkasychernigovkhersonchernihivdnipropetrovskdnepropetrovskkhmelnitskiyneacsccogoorusorgmilcomedugovmyspreadshopadimono-ipbarsybarsyonlinelayershiftnh-servretrosnubapicampaignservicelugaffinitylotteryweeklylotteryraffleentrygluglugsmeaccoindependent-inquestnimsitecopropymntltdorgplcschnetgovnhsbarsyindependent-commissionindependent-reviewpolicepublic-inquiryindependent-panelconnhospindependent-inquiryroyal-commissionoraclegovcloudappscck12libaws-govccphxcclibpvtparochchtrcck12libcceatonk12coglibtecgendstmusann-arborwashtenawcck12glghcck12sealibforksolympiabainbridge-islkeyporthoquiamyarrow-pointcentraliaport-townsendsequimport-ludlowrentonsilverdalebremertonredmondsheltonbellevueport-orchardport-angeleskingstonchehalisaberdeengig-harborseattlepoulsboidmdndsddemenegacalamaiavawapailalflnmdcncscohnhmihiviwiriinmntnmocoutvtctmtgunjokakwvnvprarorasmskstxwynykyazisadninsnngosrvis-bymircloudservernamepointtoenscaledland-4-salefreeddnsstuff-4-saleazure-apinoipdatabricksappscloudnsgolffanheliohostazurewebsitesgvorgmilcomgubneteducoorgcomnetd0egvorgmilcomnetedugovmydnsiacostoree12orgmilcomnomwebgobbibrectecnetintedugovraremprendefirminfoartseducok12orgcomnethidnsadidacaionioapsonlahanamhanoicamauhueorgcompronetintedugovbizbacninhtayninhhoabinhnamdinhtravinhhaiphongvinhlonghaiduongquangnamquangtrithuathienhuequangninhbacgianghaugiangquangbinhsoctrangbentrethanhphohochiminhdanangkontumhatinhkhanhhoathanhhoahealthgialailaocaiyenbaibackanngheanlonganphuyenphuthocanthodaklakdongnainameinfovinhphucdongthapkiengiangtiengiangquangngailaichaulangsonlamdongdaknonghagiangangiangcaobangbinhduongninhthuanbinhthuanbaclieuthaibinhninhbinhbinhdinhtuyenquanghungyenbaria-vungtauthainguyendienbienbinhphuocschbizputerimagine-proxyorgcomnetedugovcloud66advisormypetsdyndnsxn--8dbq2axn--4dbgdty6cxn--5dbhl8dxn--hebda8bxn--80auxn--d1atxn--c1avgxn--o1acxn--o1achxn--90azhxn--55qx5dxn--uc0atvxn--od0algxn--wcvs22dxn--gmqw5axn--mxtq1mxn--12c1fe0brxn--h3cuzk1dixn--12co0c3b4evaxn--12cfi8ixb8lxn--o3cyx2axn--m3ch0j3axn--j1adpxn--90amcxn--90a1afxn--h1ahnxn--j1ael8bxn--h1alizxn--c1avgxn--j1aefxn--80aaa0cvacxn--41acaffeineexeopentunnelbotdashtelebitorgtmaccoagricorgmilnomwebnicngonetaltedugovlawnisschoolgrondaraccoorgmilcomschnetedugovbizinfoprg1-zeropstritonstackitlimazeropsaccoorgmilgovяспборгкоммскбизмирсамаракрымсочиакодпроргобрупрצהלממשלישובאקדמיהองค์กรธุรกิจรัฐบาลศึกษาทหารเน็ต教育網絡組織公司政府個人닷넷한국澳门新闻澳門联通家電嘉里招聘通販닷컴삼성コムგეбгрфеюadcdbdgdidmdsdtdaebedeeegeiejekemenepereseveyegabacalamanauavapaqasazacfbfafgfnfpfwftfbgcgagggegkgngmgsgpgvgtgugilmlnlalclglplsltlhmimjmkmmmomambmcmdmfmgmzmpmsmtmgbbblbsbecccacnclcmcvctcscmhkhghchbhthphshlinikifigiaibicivisikninhnmncnbngnsnpnvntnjoionomobocoaofodorosotoptstttytatbtetgtithtmtltrusuvuaucueuguhulumunufjdjbjtjsjlkmkhkfkdkcktkukskpkgpmpnpkpjpgqaqmqiqsvtvcvbvmvlvrwpwtwzwbwcwawgwkwmwtrsrprgrfrercrbrarnrmrlrkrirhrwsusrssspsgsesbsaslsmsissxmxaxcxuypysylymykygybycyuztzsznzmzkzdzczbzazελευ世界台灣购物公益点看臺灣网络書籍在线网站手机机构大拿游戏信息台湾谷歌慈善商标香港中国餐厅网址中國商城食品微博政务移动集团公司八卦商店健康网店政府时尚佛山中信娱乐广东企业homedepotengineeringاماراتrepublicankuokgroupversicherungchannelcitadelxn--pgbs0dhxn--b4w605ferdstatebankwebsitexn--mgb9awbf亚马逊淡马锡alibabaxn--ngbc5azdxn--mgbbh1axn--45br5cyltoshibabuildworldcloudtradeguideplacespacedancemoviephoneprimesmilebiblestyleappleazurestoreskypegripexn--l1accdrivelottehorsehouseleasechasereisestadahondaomegaaetnaamicaninjanokiamediadeltavodkaedekaosakapizzaslingemailgmailtirolshelltmallfinallegaltotalhotelamfamforumrehabmusicciticricohcoachwatchboschearthfaithirishmiamiarchidubaiguccipraxiみんなストアセールcanonsalononionnikonepsonkoelngreensevencrownikanoradioaudioweiboglobopromogalloyahoociscorodeovideomangobingotokyovolvolottokyotophotosmartsportquesttrusthyattjetztadultcymrubaidutushuxn--kprw13dubankclickblackmerckgroupsharpcheapnowtvxn--h2brj9cקוםհայоргсрбмонкомбелмкдқазрусукрمصرقطرعربكومdadcfdmedwedredphdthdbidpidkrdmsdltdiceonewmeglemoerwecfageacbanbambaaaammakianraspacpaaxawtfbcgaegongingaigvigorgdogdhlmilrilonlaolloluoljllcalgalnflafltelsrlfrllplkimibmcamcombommomifmabbjcbscbwebcabnabtabmlbpubabcbbcnecincpncllcstcwtcpwcnyckfhbzhovhmoiskiobisbitcifyituipinvinwinxincbnbcnmanfangdnmenrenkpnmtnyunrunfununobiojioriohbogmofooboooooacoecoceongoproartistottnttbbtcateatlatvetpetbetnethktmitfitintjothotgotdotbotprueduicujnjyouinknhktdkappsapgapmapdnptopgopllpjmpzipvipripesqtrvdtvitvdevmovgovhivnrwlawsewnewbmwwownowhowdvrftrmtrsfrbarcartvscrseusawsupsubssbsadsddsldssasbmsmlsxxxboxfoxgmxtjxsextaxbuyflydiysoyjoyskypaydaygayxyzanzbizwebersenerpokerlameractortatarsolarລາວคอมไทยtourslocusnexuslexusgiftsbeatsboatspartspressglassswissकॉमनेटtiresgivescodeshomesgamestunesshoescardswalesloansvegastoolsdealsautosparisファッションworkssucksrocksxeroxforexfedexpartylillymoneystudyrugbytoraytoday中文网xn--unup4y天主教飞利浦新加坡enterprises我爱你嘉里大酒店christmasxn--fct429kholdingsxn--8y0a063axn--mgbx4cd0ablifestyleabogadoallstatenetbankكاثوليكxn--s9brj9cxn--gk3at1ebestbuycharityxn--55qx5dmicrosoftpropertybasketballhomegoodscorsicajewelrygallerygrocerysurgerycountrybrusselsverisignferreroxn--czr694bhdfcbankcommbanksoftbankپاكستانپاکستانnextdirectالسعوديهالعليانxn--h2brj9c8cxn--80adxhksshikshaxn--mgbai9azgqp6jcuisinellabarclayscatholicxn--kpry57dcompanyxn--xhq521bblackfridayxn--mgba3a3ejtsandvikxn--d1acj3bacademydownloadمليسياxn--j1amhxn--w4r85el8fhu5dnraipirangaathletaxn--fhbeixn--mgbqly7cvafrzuerichxn--c2br7gஇலங்கைcontractorsxn--io0a7igraphicsinsurancetemasekxn--xkc2al3hye2amotorcyclesphotographydirectoryplumbingxn--vhquvclothingtrainingcleaningwilliamhilllightingxn--mgba3a4f16ashoppingcateringeducationokinawapicturesventuresproductionsxn--9et52uwalmartഭാരതംsupportrealestatecapitalonexn--nqv7fs00emaauspostfloristdentistxn--qxamgodaddybradescobargainsmitsubishikerryhotelsxn--9dbq2axn--3pxu8kimmobilienxn--fjq720axn--mgbtx2bholidaymckinseymadridbusinessbuildersxn--4gbrimмоскваالسعودیةcoffeedegreelacaixapartnersalsaceofficeabbvievoyageorangegeorgeonlinechromemobilekindlegoogleoraclecircleschulesecureinsurexn--mgba7c0bbn0aestatexn--mgbc0a9azcgcruisehangoutxn--vuq861bxn--42c2d9arexrothfirestoneuniversityxn--nnx388alifeinsuranceextraspaceонлайнvermögensberatersoftwarexn--fiqs8sxn--mgbab2bdxn--w4rs40ltiendaभारतम्africatoyotaotsukasakuracameracreditcardnagoyaconsultingnetworktheatermonsterprogressivepioneerxn--55qw42gracingdatingvotingvikinglivinggivingxn--bck1b9a5dre4cbrotherweatherjoburgفلسطينlplfinancialxn--clchc0ea0b2g2a9gcdfutbolschoolsocialglobaldentalwoodsidechanelairtelmatteltravelrealtorwebcamstreamభారత్unicomalstomxn--nodexn--6frz82gmuseumfurniturexn--rvc1e0am3exn--mix891faccenturexn--11b4c3dismailineustardiscountquebeccomsecclinicservicesxn--y9a3aqxn--c1avgswatchchurchsearchالاردنmarketingcontacthealthmonashshoujisanofitaipeiamericanexpresssuzukiアマゾンクラウドポイントbhartiグーグルxn--mgberp4a5d4armemorialxn--1qqw23alondonmormoninstitutevisionbostonnortoncouponmaisonamazonvirginberlindesigndurbanolayannissananquanxihuanhitachikaufengardenreisenbayerntechnologydatsunxn--90a3aclatinocasinostudiophysioxn--ngbe9e0apharmacytattootaobaoaramcoexpertreportabbottdirectselectimamatfairwindspictettargetmarketintuittravelersinsurancecreditdupontryukyusuppliesxn--tckwebnpparibasschmidtmerckmsdyodobashirestaurantbridgestonecricketxn--fpcrj9c3dbostikbroadwayattorneylefrakemerckxn--fiq228c5hscareersfarmerswinnersflowersxn--wgbh1cguitarsxn--54b7fta0ccxn--p1acfmakeupgalluplandroverxn--kcrx77d1x4agoldpointbauhausxn--mgbayh7gpahiphopplaystationxn--mgba3a4fraxn--eckvdtc9dhyundaixn--gckr3f0fistanbulticketsmarketsflightschintaireviewsxn--3e0b707ewindowsxn--fiqz9sfinancialxn--fzys8d69uvgmابوظبيdiscoverreviewবাংলাxn--5su34j936bgsgmoscowobserverapartmentsдетиارامكوсайтeurovisionxn--i1b6b1a6a2exn--xkc2dl3a5ee0hتونسموقعبارتڀارتشبكةعمانبيتكعراقreadkredbondlandbandfundfoodprodgoldfordtubecafesafelifeggeeieeefreefagepagegugezonewinememenamegamesaleablebikenikelikecarecbreherefiresaveloveliveblueartedatesitevotecaseluxebofamodaltdaasdatiaayogasinavanashiaasiajavabbvatevavivadatazaraarpacasavisasncfprofmaifsurfgolfdvagsongbingpingwangkpmggoogblogpohlfailcooldellcalldeallidlsarlfilmteamroomfarmimdbarabclubhdfcicbchsbcgmbhrichtechfishdishcashminiernikddiaudiwikimobitaxicitikiwidesiqponskinloanakdnwienopenporncerntownimmolimoolloinfonicofidolegosaxozeroaerovivoautovotomotofastbestresthostpostnextlgbtchatseatgiftmeetdietreitmintrentgentspotscotguruitausohumenucyoubanklinkpinkdclktalksilkbookseekworkrsvpaarpjeepshopcoophelpcamppccwshowbeerstarruhrflirweirhaircarsparsjprshausplusnewstipstoysjobskidsfanspicsdocsxboxamexsexynavycitysonyarmyallybabyplaydeliverybuzzgbizlamborghiniphilipsලංකාಭಾರತfitnessexpresslanxesspfizercenterwalterlawyersoccercareerkosherbrokerlockerdealerdoctorauthorxn--mgbqly7c0a67fbcvermögensberatungjaguarxn--pssy2uxn--hxt814eflickrrepairrogersairbusxn--mgbai9a5eva00beventsyachtsxn--t60b56aভাৰতভারতभारतभारोतviajeshermeshughesxn--j1aefसंगठनvillasଭାରତclaimshotelsભારતzapposphotosjuegoscondostatamotorsgratistennisਭਾਰਤtkmaxxtjmaxxschaeffleryandexxn--80aswgrealtysafetybeautyluxuryxn--3ds443gsupplyfamilyxn--o3cw4hhockeysydneyxn--90aenissayalipayenergycomputeragencyxn--rovu88b電訊盈科xn--gecrj9cstatefarmaccountantaquarelleolayangroup香格里拉xn--p1ai组织机构xn--1ck2e1bxn--mgbt3dhdschwarzموريتانياabudhabinowruzkomatsufujitsuhospitalxn--80asehdbxn--mgbtf8flxn--j6w193gxn--yfro4i67oprudentialxn--flw351ecruisescoursesrecipesxn--e1a4cferrarixn--ses554gxn--wgbl6awatchesstaplessinglesxn--mgbcpq6gpa1axn--otu796dpropertiescreditunionxn--mgbah1a3hjkrdstockholmhisamitsuالسعوديةstcgroupdomainsoriginscouponsbloombergclubmedfroganslimitedxn--80aqecdr1aexposedinternationalequipmentbarclaycardxn--q7ce6axn--mgbi4ecexpprotectionassociatesconstructionxn--cck2b3bxn--45q11candroidfoundationישראלxn--mgbca7dzdocliniqueboutiqueengineerxn--qxa6asystemsfirmdalefashionauctionxn--nqv7finfinitirentalsreliancetradingweddingfishinghostinggentingbookingcookingxn--3hcrj9cgraingerxn--czrs0tdemocratsamsungyokohamaxn--h2breg3evexn--nyqy26alundbeckmelbournevacationssolutionsfrontierxn--vermgensberatung-pwbmanagementxn--cg4bkixn--mgb2ddeslincolnhamburgsandvikcoromantblockbusterairforcebarefootxn--4dbrk0ceinvestmentsfeedbackcommunityxn--ngbrxالبحرينdiamondsamsterdamhealthcareredumbrellaxn--mxtq1mxn--2scrj9cagakhanxn--mgbpl2fhкатоликcaravanசிங்கப்பூர்richardlimortgageamericanfamilyxn--fzc2c9e2cscholarshipssaarlandxn--imr513nvlaanderensamsclubgoodyearkitchenஇந்தியாweatherchannelallfinanzxn--kput3iالسعودیۃxn--90aisxn--efvy88hالجزائرxn--mgbaam7a8hexchangejpmorganxn--tiq49xqyjfidelitysecurityxn--mk1bu44cwanggouxn--fiq64bxn--6qq986b3xlxn--mgbbh1a71exn--80ao21amarshallsxn--5tzm5gtravelerspanasoniclatrobeyoutubeaccountantsxn--rhqv96gxn--cckwcxetdanalyticsxn--ygbi2ammxبازاربھارتسوريةorganicfreseniusسورياxn--9krt00axn--qcka1pmcxn--jlq480n2rgdeloittesciencefinancexn--jvr189mxn--30rr7yhomesensehotmailbaseballfootballleclercboehringerxn--q9jyb4cxn--mix082fاليمنهمراهpolitieسودانايرانایرانnetflixyamaxunxn--lgbbat1ad8jcollegestoragecapetowncolognekerrypropertiesxn--mgbgu82axn--ogbpf8flxn--czru2dwhoswhociprianilasallexn--g2xx48cforsalebanamexaudiblexn--vermgensberater-ctbxn--zfr164bericssonvanguardxn--45brj9cindustriestheatremarriottxn--3bst00mcomparexn--mgberp4a5d4a87gcapitaldigitalالمغربbarcelonashangrilaxn--d1alfcalvinkleinwwwcitysapporokawasakinagoyasendaikobekitakyushuyokohamackjp`.charCodeAt(i+e)!==t.charCodeAt(n+e))return!1;return!0}function GF(e,t,n,r,i){let a=MF[e],o=MF[e+1];for(;a<o;){let e=a+o>>>1,s=zF[e];if(s<t)a=e+1;else if(s>t)o=e;else{for(let o=e;o>=a&&zF[o]===t;--o)if(WF(o,n,r,i))return o;for(let a=e+1;a<o&&zF[a]===t;a+=1)if(WF(a,n,r,i))return a;return-1}}return-1}function KF(e,t,n){let r=t,i=e.length,a=5381;VF=-1;for(let t=e.length-1;t>=0;--t){let o=e.charCodeAt(t);if(o===46){let o=t+1,s=GF(r,a>>>0,e,o,i-o);if(s===-1&&i!==o&&(s=BF[r]),s===-1)return VF!==-1;r=PF[s],(jF[r]&n)!==0&&(VF=r,HF=o,UF=i),i=t,a=5381}else a=a*33^o}let o=GF(r,a>>>0,e,0,i);return o===-1&&i!==0&&(o=BF[r]),o!==-1&&(r=PF[o],(jF[r]&n)!==0&&(VF=r,HF=0,UF=i)),VF!==-1}function qF(e,t,n){if(AF(e,t,n))return!1;let r=(t.allowPrivateDomains?2:0)|!!t.allowIcannDomains;if(KF(e,662,r))return n.isIcann=!!(jF[VF]&1),n.isPrivate=!!(jF[VF]&2),n.publicSuffix=e.slice(UF+1),!0;if(KF(e,658,r))return n.isIcann=!!(jF[VF]&1),n.isPrivate=!!(jF[VF]&2),n.publicSuffix=e.slice(HF),!1;n.isIcann=!1,n.isPrivate=!1;let i=e.lastIndexOf(`.`);return n.publicSuffix=i===-1?e:e.slice(i+1),!1}function JF(e,t){return kF(e,5,qF,t,OF())}var YF=new Set(`gmail.com,googlemail.com,outlook.com,hotmail.com,live.com,msn.com,ymail.com,icloud.com,me.com,mac.com,aol.com,proton.me,protonmail.com,pm.me,mail.com,zoho.com,fastmail.com,hey.com,qq.com,163.com,126.com,web.de,orange.fr,free.fr,laposte.net,sfr.fr,wanadoo.fr,comcast.net,verizon.net,att.net,sendgrid.net,amazonses.com,mailgun.org,mailchimp.com,mcsv.net,mandrillapp.com,sparkpostmail.com,postmarkapp.com,mailjet.com,sendinblue.com,brevo.com,hubspotemail.net,vtext.com,tmomail.net,amazonaws.com`.split(`,`)),XF=/^(?:yahoo|gmx|yandex|outlook|hotmail|live)\./,ZF=/(?:^|\.)voice\.google\.com$/,QF=new Set([`voice-noreply@google.com`]),$F=/^new (?:text message|voicemail) from /i;function eI(e){return QF.has(e.fromEmail.trim().toLowerCase())||$F.test(e.subject.trim())?null:tI(e.fromEmail)}function tI(e){let t=e.trim().toLowerCase(),n=t.slice(t.lastIndexOf(`@`)+1);if(!t.includes(`@`)||!/^(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z]{2,}$/.test(n)||ZF.test(n))return null;let r=JF(n,{allowPrivateDomains:!0}),i=r.domain;return!i||r.isIp||i===r.publicSuffix||YF.has(i)||XF.test(i)?null:i}var nI=9e5,rI=(e,t=Date.now())=>Number.isFinite(e.received)&&t-e.received<=nI&&e.received-t<=12e4,iI=new Map,aI=`mw:codes:dismissed`,oI=new Set((()=>{try{let e=JSON.parse(localStorage.getItem(aI)??`{}`);return Object.entries(e).filter(([,e])=>e>Date.now()).map(([e])=>e)}catch{return[]}})()),sI=()=>{try{localStorage.setItem(aI,JSON.stringify(Object.fromEntries([...oI].slice(-50).map(e=>[e,(iI.get(e)?.received??Date.now())+nI+12e4]))))}catch{}},cI=new Set,lI=[],uI=0,dI;function fI(){let e=Date.now(),t=iI.size;for(let[t,n]of iI)rI(n,e)||iI.delete(t);let n=iI.size!==t,r=[...iI.values()].filter(e=>!oI.has(e.id)).sort((e,t)=>t.received-e.received);iI.size&&!dI&&(dI=setInterval(fI,2e4)),!iI.size&&dI&&(clearInterval(dI),dI=void 0);let i=r.length===lI.length&&r.every((e,t)=>e.id===lI[t].id&&e.code===lI[t].code);if(!i||n){i||(lI=r),uI++;for(let e of cI)e()}}var pI={note(e){let t=!1;for(let n of e){if(!n.code)continue;let e={id:n.id,code:n.code,from:n.fromName||n.fromEmail||`Unknown sender`,subject:n.subject,received:new Date(n.received).getTime(),site:eI(n)};if(!rI(e))continue;let r=iI.get(n.id);iI.set(n.id,e),r&&r.code===e.code||(t=!0,uI++)}if(t){fI();for(let e of cI)e()}},dismiss(e){oI.add(e),sI(),fI()},of:e=>{let t=iI.get(e);return t&&rI(t)?t.code:void 0}};function mI(){return(0,L.useSyncExternalStore)(e=>(cI.add(e),()=>cI.delete(e)),()=>lI)}function hI(){return(0,L.useSyncExternalStore)(e=>(cI.add(e),()=>cI.delete(e)),()=>uI)}var gI=e=>/^\d{6}$/.test(e)?`${e.slice(0,3)} ${e.slice(3)}`:/^\d{8}$/.test(e)?`${e.slice(0,4)} ${e.slice(4)}`:e;async function _I(e){try{return await navigator.clipboard.writeText(e),!0}catch{let t=document.createElement(`textarea`);t.value=e,t.style.cssText=`position:fixed;opacity:0`,document.body.appendChild(t),t.select();let n=!1;try{n=document.execCommand(`copy`)}catch{}return t.remove(),n}}var vI=new Map,yI=new Set,bI=0,xI={get:e=>vI.get(e),set(e,t){vI.get(e)!==t&&(vI.set(e,t),bI++,yI.forEach(e=>e()))},subscribe(e){return yI.add(e),()=>{yI.delete(e)}}};function SI(){return(0,L.useSyncExternalStore)(xI.subscribe,()=>bI)}function CI(e){let t=(0,L.useRef)(null);SI(),nF(),bo(),hI();let n=e.folder===`drafts`?null:G.sources(),{hasMore:r,onMore:i}=e;(0,L.useEffect)(()=>{let e=t.current;if(!e||!r)return;let n=new IntersectionObserver(e=>{e.some(e=>e.isIntersecting)&&i()},{rootMargin:`200px`});return n.observe(e),()=>n.disconnect()},[r,i,e.conversations.length]);let a=e.folder===`sent`||e.folder===`drafts`,o=iF(e.folder).filter(e=>!e.notOnRow),s=e.picked.size>0,c=``;return(0,W.jsxs)(`div`,{className:`list`,ref:e.listRef,children:[e.status===`loading`&&!e.conversations.length&&(0,W.jsx)(`div`,{"aria-busy":`true`,"aria-label":`Loading`,children:Array.from({length:9},(e,t)=>(0,W.jsxs)(`div`,{className:`conv skeleton`,children:[(0,W.jsx)(`span`,{className:`avatar sk`}),(0,W.jsxs)(`div`,{className:`conv-main`,children:[(0,W.jsx)(`span`,{className:`sk line w40`}),(0,W.jsx)(`span`,{className:`sk line w80`}),(0,W.jsx)(`span`,{className:`sk line w60`})]})]},t))}),e.status!==`loading`&&!e.conversations.length&&(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(Mn,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:e.status===`error`?e.error:e.emptyText})]}),(0,W.jsx)(`ul`,{className:`convs${s?` picking`:``}`,children:e.conversations.map(t=>{let r=t.latest,i=va(r.received),l=i===c?null:i;c=i;let u=a?r.displayTo||`(no recipient)`:t.names,d=!!n&&(tF.has(t.key)||t.items.some(e=>n.has(e.id)));return(0,W.jsxs)(L.Fragment,{children:[l&&(0,W.jsx)(`li`,{className:`group`,role:`presentation`,children:l}),(0,W.jsxs)(`li`,{className:`conv${t.unread?` unread`:``}${e.selected===t.key?` selected`:``}${e.picked.has(t.key)?` picked`:``}`,"data-key":t.key,tabIndex:0,"aria-selected":s?e.picked.has(t.key):void 0,onClick:n=>s?e.onPick(t,n.shiftKey):e.onOpen(t),onKeyDown:n=>{n.key===`Enter`&&n.target===n.currentTarget&&e.onOpen(t)},children:[e.folder===`drafts`?(0,W.jsx)(ao,{name:a?u:r.fromName||r.fromEmail,email:a?u:r.fromEmail,picture:!a,id:r.id}):(0,W.jsxs)(`button`,{type:`button`,className:`pick`,role:`checkbox`,"aria-checked":e.picked.has(t.key),"aria-label":`Select: ${r.subject||`(no subject)`}`,title:e.picked.has(t.key)?`Selected (x)`:`Select (x)`,onClick:n=>{n.stopPropagation(),e.onPick(t,n.shiftKey)},onMouseDown:e=>{e.shiftKey&&e.preventDefault()},children:[(0,W.jsx)(ao,{name:a?u:r.fromName||r.fromEmail,email:a?u:r.fromEmail,picture:!a,id:r.id}),(0,W.jsx)(`span`,{className:`pick-box`,"aria-hidden":`true`,children:e.picked.has(t.key)&&(0,W.jsx)(V,{size:16,strokeWidth:3})})]}),(0,W.jsxs)(`div`,{className:`conv-main`,children:[(0,W.jsxs)(`div`,{className:`conv-l1`,children:[(0,W.jsxs)(`span`,{className:`names`,children:[d&&(0,W.jsx)(`span`,{className:`draft-mark`,title:`You have an unsent draft in this conversation`,children:`[Draft] `}),a&&(0,W.jsx)(`span`,{className:`to-label`,children:`To `}),u]}),(()=>{let e=Math.max(t.count,xI.get(t.key)??0);return e>1&&(0,W.jsx)(`span`,{className:`count`,title:`${e} messages`,children:e})})(),e.showAccount&&(0,W.jsx)(`span`,{className:`tag`,children:xe(r.account)}),t.flagged&&(0,W.jsx)(fn,{size:12,className:`flag-mark`,fill:`currentColor`,"aria-label":`Flagged`}),t.items.some(e=>e.hasAttachments)&&(0,W.jsx)(Cr,{size:12,className:`clip`,"aria-label":`Has attachments`}),(0,W.jsx)(`time`,{className:`time`,dateTime:r.received,children:pa(r.received)})]}),(0,W.jsxs)(`div`,{className:`subject`,children:[(()=>{let e=pI.of(r.id);return e&&(0,W.jsx)(`button`,{type:`button`,className:`tag code-pill`,title:`Copy this verification code`,"aria-label":`Copy the code ${e}`,onClick:async t=>{t.stopPropagation(),await _I(e)?K.show({kind:`ok`,text:`Code copied`}):K.error(`the browser did not allow it.`,`Could not copy the code: `)},children:e})})(),r.subject||`(no subject)`]}),r.preview&&(0,W.jsx)(`div`,{className:`preview`,children:r.preview})]}),!s&&(o.length>0||e.folder!==`drafts`||e.onDiscardDraft)&&(0,W.jsxs)(`span`,{className:`quick`,children:[e.folder===`drafts`&&e.onDiscardDraft&&(0,W.jsx)(`span`,{className:`quick-ask`,onClick:e=>e.stopPropagation(),children:(0,W.jsx)(co,{onDiscard:()=>e.onDiscardDraft(t),title:`Discard this draft`,confirmLabel:`Discard`})}),o.map(n=>n.to===`trash`?(0,W.jsx)(`span`,{className:`quick-ask`,onClick:e=>e.stopPropagation(),children:(0,W.jsx)(co,{onDiscard:()=>e.onMove(t,`trash`),title:n.key?`${n.label} (${n.key})`:n.label,confirmLabel:`Delete`})},n.to):(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,title:n.key?`${n.label} (${n.key})`:n.label,"aria-label":n.label,onClick:r=>{r.stopPropagation(),e.onMove(t,n.to)},children:n.to===`archive`?(0,W.jsx)(Fe,{size:15}):(0,W.jsx)(Mn,{size:15})},n.to)),e.folder!==`drafts`&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare flag`,"aria-pressed":t.flagged,title:t.flagged?`Flagged: clear the flag`:`Flag for follow-up`,"aria-label":`Flag for follow-up`,onClick:n=>{n.stopPropagation(),e.onToggleFlag(t)},children:(0,W.jsx)(fn,{size:15,fill:t.flagged?`currentColor`:`none`})}),!a&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,title:t.unread?`Mark as read`:`Mark as unread`,"aria-label":t.unread?`Mark as read`:`Mark as unread`,onClick:n=>{n.stopPropagation(),e.onToggleRead(t)},children:t.unread?(0,W.jsx)(rr,{size:15}):(0,W.jsx)(ar,{size:15})})]})]})]},t.key)})}),e.hasMore&&(0,W.jsx)(`div`,{className:`more`,ref:t,children:(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:e.onMore,disabled:e.loadingMore,children:e.loadingMore?`Loading…`:`Load more`})})]})}var wI=null,TI=new Set,EI=()=>TI.forEach(e=>e()),DI={open(e,t=0){e.length&&(wI={items:e,index:t},EI())},go(e){if(!wI)return;let t=Math.max(0,Math.min(wI.items.length-1,wI.index+e));t!==wI.index&&(wI={...wI,index:t},EI())},close(){wI&&(wI=null,EI())},isOpen:()=>!!wI};function OI(){return(0,L.useSyncExternalStore)(e=>(TI.add(e),()=>{TI.delete(e)}),()=>wI)}var kI=12582912;function AI({kind:e,name:t}){return/\.eml$/i.test(t)?(0,W.jsx)(ar,{size:22}):e===`image`?(0,W.jsx)(An,{size:22}):/\.(ics|ical|ifb)$/i.test(t)?(0,W.jsx)(it,{size:22}):e===`pdf`||e===`text`&&!/\.(csv|tsv)$/i.test(t)?(0,W.jsx)(on,{size:22}):e===`audio`?(0,W.jsx)(Yt,{size:22}):e===`video`?(0,W.jsx)(un,{size:22}):/\.(zip|gz|tgz|7z|rar|tar)$/i.test(t)?(0,W.jsx)(tn,{size:22}):/\.(xlsx?|xlsm|xltx|csv|tsv|numbers|ods)$/i.test(t)?(0,W.jsx)(rn,{size:22}):/\.(pptx?|pptm|ppsx|potx|key|odp)$/i.test(t)?(0,W.jsx)(zr,{size:22}):/\.(docx?|docm|dotx|odt|rtf|pages)$/i.test(t)?(0,W.jsx)(on,{size:22}):(0,W.jsx)(cn,{size:22})}var jI=(e,t)=>/\.eml$/i.test(t)?`Mail`:e===`other`||e===`text`||e===`office`||e===`archive`?(/\.([a-z0-9]+)$/i.exec(t)?.[1]||`file`).toUpperCase():e===`pdf`?`PDF`:e[0].toUpperCase()+e.slice(1);function MI(e,t){let n=UN(t.name,t.contentType);return{name:t.name||`attachment`,size:t.size,kind:n,canOpenTab:n===`image`||n===`pdf`,...n===`mail`?{mail:{id:e,attachmentId:t.id}}:{},load:async()=>{let r=await YN(e,t);return n===`text`?{url:r.url,text:r.blob.size>2097152?`This file is too large to preview. Download it instead.`:await r.blob.text()}:{url:r.url}}}}function NI({messageId:e,a:t,all:n}){let r=UN(t.name,t.contentType),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(!1),c=(0,L.useRef)(null);(0,L.useEffect)(()=>{let n=c.current;if(!n||r!==`image`||(t.size||0)>kI)return;let i=!0,o=new IntersectionObserver(n=>{n.some(e=>e.isIntersecting)&&(o.disconnect(),YN(e,t).then(e=>{i&&a(e.url)},()=>{}))},{rootMargin:`150px`});return o.observe(n),()=>{i=!1,o.disconnect()}},[e,t,r]);let l=()=>DI.open(n.map(t=>MI(e,t)),n.indexOf(t));return(0,W.jsxs)(`div`,{className:`card ${r}`,ref:c,role:`button`,tabIndex:0,onClick:l,onKeyDown:e=>{e.key===`Enter`&&e.target===e.currentTarget&&l()},title:`Open ${t.name}`,children:[(0,W.jsx)(`div`,{className:`card-top`,children:i?(0,W.jsx)(`img`,{src:i,alt:``}):(0,W.jsx)(AI,{kind:r,name:t.name})}),(0,W.jsxs)(`div`,{className:`card-foot`,children:[(0,W.jsxs)(`div`,{className:`card-text`,children:[(0,W.jsx)(`span`,{className:`card-name`,children:t.name||`attachment`}),(0,W.jsx)(`span`,{className:`card-meta`,children:[jI(r,t.name),Ca(t.size)].filter(Boolean).join(` · `)})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:async n=>{if(n.stopPropagation(),!o){s(!0);try{let n=await YN(e,t);XN(n.url,n.name)}catch(e){K.error(e,`Could not download: `)}finally{s(!1)}}},title:`Download`,"aria-label":`Download ${t.name}`,children:o?(0,W.jsx)(H,{size:15,className:`spin`}):(0,W.jsx)(Gt,{size:15})})]})]})}var PI=4e7,FI=262144,II=320,LI=2,RI=new Map,zI=0,BI=[],VI=async e=>{zI>=LI&&await new Promise(e=>BI.push(e)),zI++;try{return await e()}finally{zI--,BI.shift()?.()}};function HI(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength);if(e.length>=24&&t.getUint32(0)===2303741511)return t.getUint32(16)*t.getUint32(20);if(e.length>=10&&e[0]===71&&e[1]===73&&e[2]===70)return t.getUint16(6,!0)*t.getUint16(8,!0);if(e.length>=30&&t.getUint32(0)===1380533830&&t.getUint32(8)===1464156752){let n=t.getUint32(12);if(n===1448097880)return(1+(e[24]|e[25]<<8|e[26]<<16))*(1+(e[27]|e[28]<<8|e[29]<<16));if(n===1448097868&&e[20]===47){let e=t.getUint32(21,!0);return(1+(e&16383))*(1+(e>>14&16383))}return n===1448097824?(t.getUint16(26,!0)&16383)*(t.getUint16(28,!0)&16383):null}if(e.length>=4&&e[0]===255&&e[1]===216)for(let n=2;n+9<e.length;){if(e[n]!==255)return null;if(e[n+1]===255){n++;continue}let r=e[n+1];if(r>=192&&r<=207&&r!==196&&r!==200&&r!==204)return t.getUint16(n+5)*t.getUint16(n+7);n+=2+t.getUint16(n+2)}return null}function UI(e,t){let n=`thumb:${e}|${t.id}`,r=RI.get(n);return r||(r=(async()=>{if((t.size||0)>6291456)return null;let r=await qs(n);return typeof r==`string`&&r.startsWith(`data:image/`)?r:VI(async()=>{let r=await U(`attachment`,{id:e,attachmentId:t.id}),i=Uint8Array.from(atob(r.data),e=>e.charCodeAt(0)),a=HI(i);if(a===null?i.length>FI:a>PI||a===0)return null;let o=await createImageBitmap(new Blob([i]));try{let e=Math.min(1,II/Math.max(o.width,o.height)),t=document.createElement(`canvas`);t.width=Math.max(1,Math.round(o.width*e)),t.height=Math.max(1,Math.round(o.height*e));let r=t.getContext(`2d`);if(!r)return null;r.drawImage(o,0,0,t.width,t.height);let i=t.toDataURL(`image/webp`,.72),a=i.startsWith(`data:image/webp`)?i:t.toDataURL(`image/jpeg`,.72);return Js(n,a),a}finally{o.close()}})})().catch(()=>(RI.delete(n),null)),RI.set(n,r),RI.size>400&&RI.delete(RI.keys().next().value)),r}var WI=2e5;function GI(e,t=``){if(/\.tsv$/i.test(t))return` `;let n={",":0,";":0," ":0,"|":0},r=!1;for(let t of e.slice(0,4e3))if(t===`"`)r=!r;else if(!r&&t===`
|
|
168
|
+
`)break;else!r&&t in n&&n[t]++;let[i,a]=Object.entries(n).sort((e,t)=>t[1]-e[1])[0];return a>0?i:`,`}function KI(e,t=`,`){let n=[],r=[],i=``,a=!1,o=0,s=0,c=()=>{r.push(i),i=``,(r.length!==1||r[0]!==``)&&(n.length<5e3?(n.push(r),s=Math.max(s,r.length)):o++),r=[]},l=e.charCodeAt(0)===65279?e.slice(1):e;for(let e=0;e<l.length;e++){let n=l[e];a?n===`"`?l[e+1]===`"`?(i+=`"`,e++):a=!1:i+=n:n===`"`&&i===``?a=!0:n===t?(r.push(i),i=``):n===`
|
|
169
|
+
`?c():n===`\r`?l[e+1]!==`
|
|
170
|
+
`&&c():i+=n}return(i!==``||r.length)&&c(),{rows:n,more:o,columns:s}}function qI(e,t){(0,L.useEffect)(()=>{let t=e.current;if(!t)return;let n=[];for(let e of[...t.querySelectorAll(`pre > code`)]){let t=/(?:^|\s)language-([\w+-]+)/.exec(e.className)?.[1],r=e.textContent??``;if(!eA(t,r))continue;let i=e.parentElement,a=document.createElement(`div`);i.replaceWith(a);let o=(0,ve.createRoot)(a);o.render((0,W.jsx)(pA,{code:r})),n.push(o)}return()=>{let e=n.splice(0);queueMicrotask(()=>e.forEach(e=>e.unmount()))}},[e,t])}var JI={PAGE:`P`,NUMPAGES:`N`},YI=1048576;async function XI(e,t,n){if(e.size>20971520)throw Error(`This file is too large to show here.`);let[{renderAsync:r},i]=await Promise.all([k(()=>import(`./docx-preview-D1zbEiLy.js`),__vite__mapDeps([20,3,21]),import.meta.url),tL(e)]),a=document.implementation.createHTMLDocument(``),o=a.createElement(`div`),s=a.createElement(`div`);await r(i,o,s,{className:`docx`,inWrapper:!0,breakPages:!0,ignoreLastRenderedPageBreak:!1,renderHeaders:!0,renderFooters:!0,renderFootnotes:!0,renderEndnotes:!0,renderComments:!1,renderChanges:!1,renderAltChunks:!1,useBase64URL:!0,experimental:!1,ignoreFonts:!1,h:oL(a)}),bL(o,s);let c=o.querySelectorAll(`section.docx`).length>1;for(let e of o.querySelectorAll(`section.docx`))e.style.width||Object.assign(e.style,ZI);eL(o);let l=a.createElement(`style`);l.textContent=n,t.replaceChildren(l,...s.childNodes,...o.childNodes);for(let e of[...t.querySelectorAll(`section.docx`)])QI(e,c?.15:0);let u=[...t.querySelectorAll(`section.docx`)];return u.forEach((e,t)=>aL(e,String(t+1),String(u.length))),{pages:u.length,width:u[0]?.offsetWidth||794}}var ZI={width:`210mm`,minHeight:`297mm`,paddingTop:`25.4mm`,paddingBottom:`25.4mm`,paddingLeft:`25.4mm`,paddingRight:`25.4mm`};function QI(e,t){for(let n=0;e&&n<500;n++){let n=parseFloat(getComputedStyle(e).minHeight);if(!n)return;let r=getComputedStyle(e),i=e.querySelector(`:scope > footer`),a=i?Math.max(0,i.offsetHeight+parseFloat(getComputedStyle(i).marginBottom||`0`)):0,o=e.getBoundingClientRect().top+n-parseFloat(r.paddingBottom)-a,s=[...e.querySelectorAll(`:scope > article`)].flatMap(e=>[...e.children].map(t=>[e,t])),c=s[s.length-1];if(!c||c[1].getBoundingClientRect().bottom<=o+n*t)return;let l=s.findIndex(([,e])=>e.getBoundingClientRect().bottom>o);if(l<0)return;let u=null,[,d]=s[l];if(d.tagName===`TABLE`&&(u=$I(d,o,l===0)),!u&&l===0&&(l=1),l>=s.length&&!u)return;let f=e.cloneNode(!1),p=e.querySelector(`:scope > header`);p&&f.append(p.cloneNode(!0));let m=new Map,h=e=>{let t=m.get(e);return t||(t=e.cloneNode(!1),m.set(e,t),f.append(t)),t};u&&h(s[l][0]).append(u);for(let[e,t]of s.slice(u?l+1:l))h(e).append(t);i&&f.append(i.cloneNode(!0)),e.after(f),e=f}}function $I(e,t,n){let r=[...e.rows],i=r.findIndex(e=>e.getBoundingClientRect().bottom>t);if(i<0)return null;if(i===0){if(!n||r.length<2)return null;i=1}let a=e.cloneNode(!1),o=e.querySelector(`:scope > colgroup`);o&&a.append(o.cloneNode(!0));let s=r[i].parentElement,c=s&&s!==e?s.cloneNode(!1):a;for(let e of r.slice(i))c.append(e);return c!==a&&a.append(c),a}function eL(e){for(let t of e.querySelectorAll(`table`))t.style.tableLayout!==`fixed`&&t.querySelector(`:scope > colgroup`)?.remove()}async function tL(t){let n=await(await k(async()=>{let{default:t}=await import(`./jszip.min-3XXygzvy.js`).then(t=>e(t.default,1));return{default:t}},__vite__mapDeps([21,3]),import.meta.url)).default.loadAsync(t),r=!1;for(let e of Object.keys(n.files)){if(!/^word\/(header|footer)\d*\.xml$/i.test(e))continue;let t=n.file(e);if(!t)continue;let i=await t.async(`string`);if(i.length>YI||!/\b(PAGE|NUMPAGES)\b/.test(i))continue;let a=iL(i);a!==i&&(n.file(e,a),r=!0)}return r?n.generateAsync({type:`blob`}):t}var nL=/<w:t(?:\s[^>]*)?>[^<]*<\/w:t>/g,rL=e=>`<w:r><w:t>${e}</w:t></w:r>`;function iL(e){e=e.replace(/<w:fldSimple\b[^>]*?w:instr="\s*(PAGE|NUMPAGES)\b[^"]*"[^>]*?(\/>|>[\s\S]*?<\/w:fldSimple>)/g,(e,t)=>rL(JI[t]));let t=[],n=0,r=/<w:instrText(?:\s[^>]*)?>\s*(PAGE|NUMPAGES)\b[^<]*<\/w:instrText>/g;for(let i=r.exec(e);i;i=r.exec(e)){let a=i[1],o=e.indexOf(`w:fldCharType="end"`,r.lastIndex);if(o===-1)break;let s=e.lastIndexOf(`<w:r`,o),c=e.indexOf(`w:fldCharType="separate"`,r.lastIndex);if(t.push(e.slice(n,r.lastIndex)),c!==-1&&c<o){let n=e.indexOf(`</w:r>`,c)+6,i=!0;t.push(e.slice(r.lastIndex,n)),t.push(e.slice(n,s).replace(nL,()=>i?(i=!1,`<w:t>${JI[a]}</w:t>`):``)),i&&t.push(rL(JI[a]))}else t.push(e.slice(r.lastIndex,s),`<w:r><w:fldChar w:fldCharType="separate"/></w:r>${rL(JI[a])}`);n=s,r.lastIndex=o}return t.push(e.slice(n)),t.join(``)}function aL(e,t,n){let r=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_TEXT);for(let e=r.nextNode();e;e=r.nextNode())e.nodeValue?.includes(``)&&(e.nodeValue=e.nodeValue.split(JI.PAGE).join(t).split(JI.NUMPAGES).join(n))}function oL(e){let t=n=>{if(typeof n==`string`)return e.createTextNode(n);if(n instanceof Node)return n.ownerDocument===e?n:e.adoptNode(n);let{ns:r,tagName:i,className:a,style:o,children:s,...c}=n;if(i===`#fragment`){let n=e.createDocumentFragment();return s?.forEach(e=>n.appendChild(t(e))),n}if(i===`#comment`)return e.createComment(String(s?.[0]??``));let l=r?e.createElementNS(r,i):e.createElement(i);a&&l.setAttribute(`class`,a),o&&(typeof o==`string`?l.setAttribute(`style`,o):Object.assign(l.style,o));for(let[e,t]of Object.entries(c))t!==void 0&&!/^on/i.test(e)&&(l[e]=t);return s?.forEach(e=>l.appendChild(t(e))),l};return t}var sL=/^(https?:|mailto:)/i,cL={f0b7:`•`,f0a7:`▪`,f0a8:`◆`,f076:`❖`,f0d8:`➢`,f0fc:`✓`,f0e0:`➢`,f06e:`■`,f071:`❑`,f0a1:`○`},lL=/^(cambria|times|times new roman|georgia|garamond|book antiqua|palatino|palatino linotype|constantia|baskerville|didot)$/i,uL=/^(consolas|courier|courier new|lucida console|menlo|monaco)$/i;function dL(e){if(!e||/\b(serif|sans-serif|monospace|system-ui)\s*$/i.test(e.trim()))return e;let t=e.split(`,`)[0].trim().replace(/^["']|["']$/g,``);return`${e}, ${lL.test(t)?`Georgia, serif`:uL.test(t)?`Menlo, monospace`:`-apple-system, "Segoe UI", Helvetica, Arial, sans-serif`}`}function fL(e){return e.replace(/[\uF000-\uF0FF]/g,e=>cL[e.codePointAt(0).toString(16)]??`•`).replace(/font-family:\s*([^;}]+)/gi,(e,t)=>`font-family: ${dL(t.trim())}`)}var pL=[[`iVBORw0KGgo`,`image/png`],[`/9j/`,`image/jpeg`],[`R0lGOD`,`image/gif`],[`UklGR`,`image/webp`],[`Qk`,`image/bmp`]];function mL(e){let t=/^data:([^;,]*);base64,(.*)$/is.exec(e);if(!t)return``;let n=pL.find(([e])=>t[2].startsWith(e))?.[1];return n?`data:${n};base64,${t[2]}`:``}var hL=/\b(?:-webkit-)?(?:image-set|image|cross-fade|element|src)\s*\(/i,gL=/^[\w\s#%.,'"()+\-/]*$/;function _L(e,t){for(let n of e.matchAll(/url\(\s*(["']?)(.*?)\1\s*\)/gi))if(!(t?/^data:/i:/^data:image\//i).test(n[2]))return!1;return!/url\(/i.test(e.replace(/url\(\s*(["']?)(.*?)\1\s*\)/gi,``))}function vL(e,t=!1){for(let n=e.length-1;n>=0;n--){let r=e[n],i=e.getPropertyValue(r);(r.startsWith(`--`)?!gL.test(i)||/url|image/i.test(i):hL.test(i)||!_L(i,t)||r===`position`&&/fixed|sticky/i.test(i))&&e.removeProperty(r)}}function yL(e){let t=new CSSStyleSheet;try{t.replaceSync(e)}catch{return``}let n=e=>[...e].flatMap(e=>{if(e instanceof CSSStyleRule)return vL(e.style),[e.cssText];if(e instanceof CSSFontFaceRule)return vL(e.style,!0),e.style.getPropertyValue(`src`)?[e.cssText]:[];if(e instanceof CSSMediaRule||e instanceof CSSSupportsRule){let t=n(e.cssRules);return t.length?[`${e instanceof CSSMediaRule?`@media ${e.conditionText}`:`@supports ${e.conditionText}`} { ${t.join(` `)} }`]:[]}return[]});return n(t.cssRules).join(`
|
|
171
|
+
`)}function bL(e,t){for(let n of[e,t]){n.querySelectorAll(`script, iframe, frame, object, embed, link, meta, base, form, input, button, textarea, select, audio, video, source, portal`).forEach(e=>e.remove());for(let e of n.querySelectorAll(`*`)){for(let t of[...e.attributes])(/^on/i.test(t.name)||t.name===`srcset`||t.name===`formaction`||t.name===`href`&&e.tagName!==`A`)&&e.removeAttribute(t.name);e.hasAttribute(`style`)&&(vL(e.style),e.style.length||e.removeAttribute(`style`))}}for(let n of[...t.querySelectorAll(`style`),...e.querySelectorAll(`style`)])n.textContent=yL(fL(n.textContent??``));for(let t of e.querySelectorAll(`[style*="font-family"]`))t.style.fontFamily=dL(t.style.fontFamily);for(let t of e.querySelectorAll(`img`)){let e=mL(t.getAttribute(`src`)??``);e?t.setAttribute(`src`,e):t.removeAttribute(`src`)}for(let t of e.querySelectorAll(`a`)){let e=t.getAttribute(`href`)??``;sL.test(e)?(t.target=`_blank`,t.rel=`noopener noreferrer`):t.removeAttribute(`href`)}for(let t of e.querySelectorAll(`svg image, svg use, svg feImage`)){let e=t.getAttribute(`href`)??t.getAttributeNS(`http://www.w3.org/1999/xlink`,`href`)??``;/^data:image\//i.test(e)||t.remove()}}var xL=new Set([`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/bmp`]),SL=2e3,CL=`mw:wordView`,wL=()=>{try{return localStorage.getItem(CL)===`reading`?`reading`:`page`}catch{return`page`}};function TL({url:e,name:t}){let n=/\.(docx|docm|dotx)$/i.test(t),[r,i]=(0,L.useState)(wL);if(!n)return(0,W.jsx)(OL,{url:e,name:t});let a=e=>{i(e);try{localStorage.setItem(CL,e)}catch{}};return(0,W.jsxs)(`div`,{className:`office-word`,children:[(0,W.jsx)(`div`,{className:`office-word-bar`,children:(0,W.jsxs)(`span`,{className:`diagram-switch`,role:`group`,"aria-label":`Show as`,children:[(0,W.jsxs)(`button`,{type:`button`,className:r===`page`?`on`:``,"aria-pressed":r===`page`,onClick:()=>a(`page`),title:`As its pages, with their headers and footers`,children:[(0,W.jsx)(on,{size:13}),`Page`]}),(0,W.jsxs)(`button`,{type:`button`,className:r===`reading`?`on`:``,"aria-pressed":r===`reading`,onClick:()=>a(`reading`),title:`As its text, to read on any screen`,children:[(0,W.jsx)(Xe,{size:13}),`Reading`]})]})}),r===`page`?(0,W.jsx)(DL,{url:e,name:t,onFail:()=>i(`reading`)}):(0,W.jsx)(OL,{url:e,name:t})]})}var EL=`
|
|
172
|
+
:host { display: block; }
|
|
173
|
+
.docx-wrapper { background: transparent !important; padding: 16px 0 24px !important; display: flex; flex-direction: column; align-items: center; }
|
|
174
|
+
.docx-wrapper > section.docx { margin: 0 0 16px !important; box-shadow: 0 1px 4px rgb(0 0 0 / 18%) !important; color: #000; }
|
|
175
|
+
a[href] { color: #2f5fe0; }
|
|
176
|
+
`;function DL({url:e,name:t,onFail:n}){let r=(0,L.useRef)(null),i=(0,L.useRef)(null),[a,o]=(0,L.useState)(null),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(1);return(0,L.useEffect)(()=>{let t=!0;o(null),c(``),u(1);let n=i.current;if(!n)return;let r=n.shadowRoot??n.attachShadow({mode:`open`});return r.replaceChildren(),fetch(e).then(e=>e.blob()).then(e=>XI(e,r,EL)).then(e=>{t&&o(e)},e=>{t&&c(e instanceof Error?e.message:String(e))}),()=>{t=!1}},[e]),(0,L.useEffect)(()=>{let e=r.current;if(!e||!a)return;let t=()=>u(Math.min(1,Math.max(.2,(e.clientWidth-24)/a.width)));t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[a]),(0,W.jsxs)(`div`,{ref:r,className:`office-pages`,children:[s&&(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(yt,{size:22}),(0,W.jsxs)(`p`,{children:[`The pages could not be drawn: `,s]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:n,children:`Show it to read`})]}),!a&&!s&&(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(H,{size:22,className:`spin`}),(0,W.jsxs)(`p`,{children:[`Laying out `,t,`…`]})]}),(0,W.jsx)(`div`,{ref:i,className:`office-pages-host`,style:{zoom:l,visibility:a?`visible`:`hidden`}}),a&&(0,W.jsx)(`p`,{className:`office-pages-count`,children:a.pages===1?`1 page`:`${a.pages} pages`})]})}function OL({url:e,name:t}){let[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(``);return(0,L.useEffect)(()=>{let t=new AbortController;return r(null),a(``),fetch(e).then(e=>e.blob()).then(e=>RN(e,t.signal)).then(e=>{t.signal.aborted||r(e)},e=>{t.signal.aborted||a(zN(e))}),()=>t.abort()},[e]),i?(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(yt,{size:22}),(0,W.jsx)(`p`,{children:i})]}):n?(0,W.jsx)(kL,{ast:n}):(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(H,{size:22,className:`spin`}),(0,W.jsxs)(`p`,{children:[`Reading `,t,`…`]})]})}function kL({ast:e}){let t=(0,L.useMemo)(()=>{let t=new Map;for(let n of e.attachments??[])n.type===`image`&&xL.has(n.mimeType)&&/^[A-Za-z0-9+/=\s]+$/.test(n.data)&&t.set(n.name,`data:${n.mimeType};base64,${n.data}`);return t},[e]),n=e.content.filter(e=>e.type===`sheet`&&!e.metadata?.hidden);if(n.length)return(0,W.jsx)(BL,{sheets:n});let r=e.content.filter(e=>e.type===`slide`);return r.length?(0,W.jsx)(`div`,{className:`office-view office-deck`,children:r.map((e,n)=>(0,W.jsxs)(`section`,{className:`office-slide`,"aria-label":`Slide ${n+1}`,children:[(0,W.jsxs)(`span`,{className:`office-slide-no`,children:[`Slide `,e.metadata?.slideNumber??n+1]}),(0,W.jsx)(`div`,{className:`office-slide-body`,children:jL(e.children??[],t)}),!!e.notes?.length&&(0,W.jsxs)(`aside`,{className:`office-notes`,children:[(0,W.jsx)(`b`,{children:`Notes`}),jL(AL(e.notes),t)]})]},n))}):(0,W.jsx)(`div`,{className:`office-view office-doc`,children:jL(e.content,t)})}var AL=e=>e.flatMap(e=>e.type===`note`?e.children??[]:[e]).filter(e=>!(e.children??[]).every(e=>e.metadata?.field===`page`));function jL(e,t){let n=[];for(let r=0;r<e.length;r++){let i=e[r];if(i.type===`list`){let i=r;for(;i<e.length&&e[i].type===`list`;)i++;n.push((0,W.jsx)(L.Fragment,{children:ML(e.slice(r,i),t)},r)),r=i-1}else n.push((0,W.jsx)(L.Fragment,{children:FL(i,t)},r))}return n}function ML(e,t){let n=e=>e.metadata??{},r=(i,a)=>{let o=[],s=i,c=n(e[i]).listType===`ordered`;for(;s<e.length;){let i=n(e[s]).indentation??0;if(i<a)break;if(i>a){let[e,t]=r(s,i);o.push((0,W.jsx)(`li`,{className:`office-li-nest`,children:e},`n${s}`)),s=t;continue}let c=n(e[s]);o.push((0,W.jsxs)(`li`,{children:[c.isTask&&(0,W.jsx)(`input`,{type:`checkbox`,checked:!!c.checked,readOnly:!0,disabled:!0}),IL(e[s].children??[],t,e[s].text)]},s)),s++}return[c?(0,W.jsx)(`ol`,{children:o}):(0,W.jsx)(`ul`,{children:o}),s]},i=[],a=0;for(;a<e.length;){let[t,o]=r(a,n(e[a]).indentation??0);i.push((0,W.jsx)(L.Fragment,{children:t},a)),a=Math.max(o,a+1)}return i}var NL=new Set([`left`,`center`,`right`,`justify`]),PL=e=>{let t=e.metadata?.alignment??e.formatting?.alignment;return t&&NL.has(t)&&t!==`left`?{textAlign:t}:void 0};function FL(e,t){switch(e.type){case`heading`:{let n=`h${Math.min(6,Math.max(1,e.metadata?.level??1))}`;return(0,W.jsx)(n,{style:PL(e),children:IL(e.children??[],t,e.text)})}case`paragraph`:{let n=/quote|block/i.test(e.metadata?.style??``),r=(0,W.jsx)(`p`,{style:PL(e),children:IL(e.children??[],t,e.text)});return n?(0,W.jsx)(`blockquote`,{children:r}):r}case`table`:return(0,W.jsx)(RL,{node:e,pictures:t});case`image`:return(0,W.jsx)(`p`,{children:LL(e,t)});case`chart`:return(0,W.jsx)(HL,{node:e});case`code`:return(0,W.jsx)(`pre`,{className:`office-code`,children:(0,W.jsx)(`code`,{children:e.text??``})});case`break`:return null;case`header`:case`footer`:case`slideMaster`:return null;case`comment`:return(0,W.jsxs)(`aside`,{className:`office-notes`,children:[(0,W.jsx)(`b`,{children:`Comment`}),jL(e.children??[],t)]});default:return e.children?.length?jL(e.children,t):e.text?(0,W.jsx)(`p`,{children:e.text}):null}}function IL(e,t,n){return e.length?e.map((e,n)=>{if(e.type===`image`)return(0,W.jsx)(L.Fragment,{children:LL(e,t)},n);if(e.type===`break`)return(0,W.jsx)(`br`,{},n);if(e.type!==`text`)return(0,W.jsx)(L.Fragment,{children:e.children?.length?IL(e.children,t,e.text):e.text??``},n);let r=e.formatting??{};if(r.invisible)return null;let i=e.text??``;r.superscript?i=(0,W.jsx)(`sup`,{children:i}):r.subscript&&(i=(0,W.jsx)(`sub`,{children:i})),r.bold&&(i=(0,W.jsx)(`strong`,{children:i})),r.italic&&(i=(0,W.jsx)(`em`,{children:i})),r.underline&&(i=(0,W.jsx)(`u`,{children:i})),r.strikethrough&&(i=(0,W.jsx)(`s`,{children:i}));let a=e.metadata?.link;return a&&/^(https?:|mailto:)/i.test(a)&&(i=(0,W.jsx)(`a`,{href:a,target:`_blank`,rel:`noopener noreferrer`,children:i})),(0,W.jsx)(L.Fragment,{children:i},n)}):n??``}function LL(e,t){let n=e.metadata??{},r=n.attachmentName?t.get(n.attachmentName):void 0;return r?(0,W.jsx)(`img`,{className:`office-img`,src:r,alt:n.altText??``}):(0,W.jsxs)(`span`,{className:`office-missing`,children:[`[picture`,n.altText?`: ${n.altText}`:``,`]`]})}function RL({node:e,pictures:t}){return(0,W.jsx)(`div`,{className:`office-table-wrap`,children:(0,W.jsx)(`table`,{className:`office-table`,children:(0,W.jsx)(`tbody`,{children:(e.children??[]).filter(e=>e.type===`row`).map((e,n)=>(0,W.jsx)(`tr`,{children:(e.children??[]).filter(e=>e.type===`cell`).map((e,n)=>{let r=e.metadata??{},i=r.style===`header`?`th`:`td`;return(0,W.jsx)(i,{rowSpan:r.rowSpan&&r.rowSpan>1?r.rowSpan:void 0,colSpan:r.colSpan&&r.colSpan>1?r.colSpan:void 0,children:jL(e.children??[],t)},n)})},n))})})})}var zL=e=>{let t=``;for(e+=1;e>0;e=Math.floor((e-1)/26))t=String.fromCharCode(65+(e-1)%26)+t;return t};function BL({sheets:e}){let[t,n]=(0,L.useState)(0),r=e[Math.min(t,e.length-1)];return(0,W.jsxs)(`div`,{className:`office-view office-book`,children:[e.length>1&&(0,W.jsx)(`div`,{className:`office-tabs`,role:`tablist`,"aria-label":`Sheets`,children:e.map((e,r)=>(0,W.jsx)(`button`,{type:`button`,role:`tab`,"aria-selected":r===t,className:r===t?`on`:``,onClick:()=>n(r),children:e.metadata?.sheetName||`Sheet ${r+1}`},r))}),(0,W.jsx)(VL,{node:r},t)]})}function VL({node:e}){let{rows:t,cols:n,more:r}=(0,L.useMemo)(()=>{let t=new Map,n=new Set,r=0,i=0;for(let a of e.children??[])for(let e of a.children??[]){let a=e.metadata??{};if(!(a.hidden||a.row===void 0||a.col===void 0)){t.set(`${a.row}:${a.col}`,e);for(let e=0;e<(a.rowSpan??1);e++)for(let t=0;t<(a.colSpan??1);t++)(e||t)&&n.add(`${a.row+e}:${a.col+t}`);r=Math.max(r,a.row+(a.rowSpan??1)),i=Math.max(i,a.col+(a.colSpan??1))}}let a=Math.min(r,SL);return{rows:Array.from({length:a},(e,r)=>Array.from({length:i},(e,i)=>n.has(`${r}:${i}`)?null:t.get(`${r}:${i}`)??`empty`)),cols:i,more:r-a}},[e]);return t.length?(0,W.jsxs)(`div`,{className:`office-sheet-wrap`,children:[(0,W.jsxs)(`table`,{className:`office-sheet`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`office-corner`}),Array.from({length:n},(e,t)=>(0,W.jsx)(`th`,{children:zL(t)},t))]})}),(0,W.jsx)(`tbody`,{children:t.map((e,t)=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:t+1}),e.map((e,t)=>{if(e===null)return null;if(e===`empty`)return(0,W.jsx)(`td`,{},t);let n=e.metadata??{},r=e.children?.[0]?.formatting??e.formatting??{},i=n.shownText??(e.children??[]).map(e=>e.text??``).join(``)??e.text??``,a=n.valueType===`number`||n.valueType===`date`||n.valueType===`time`;return(0,W.jsx)(`td`,{rowSpan:n.rowSpan&&n.rowSpan>1?n.rowSpan:void 0,colSpan:n.colSpan&&n.colSpan>1?n.colSpan:void 0,className:`${a?`num`:``}${r.bold?` b`:``}${r.italic?` i`:``}${r.backgroundColor?` filled`:``}`,children:i},t)})]},t))})]}),r>0&&(0,W.jsxs)(`p`,{className:`office-more`,children:[r.toLocaleString(),` more rows not shown.`]})]}):(0,W.jsx)(`p`,{className:`viewer-msg`,children:`This sheet is empty.`})}function HL({node:e}){let t=e.metadata?.chartData;return t?(0,W.jsxs)(`figure`,{className:`office-chart`,children:[(0,W.jsxs)(`figcaption`,{children:[`Chart`,t.title?`: ${t.title}`:``]}),(0,W.jsx)(`div`,{className:`office-table-wrap`,children:(0,W.jsxs)(`table`,{className:`office-table`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{}),(t.dataSets??[]).map((e,t)=>(0,W.jsx)(`th`,{children:e.name??`Series ${t+1}`},t))]})}),(0,W.jsx)(`tbody`,{children:(t.labels??[]).map((e,n)=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:e}),(t.dataSets??[]).map((e,t)=>(0,W.jsx)(`td`,{children:e.values?.[n]??``},t))]},n))})]})})]}):null}var UL=64,WL=101010256,GL=117853008,KL=101075792,qL=33639248;function JL(e){let t=new DataView(e),n=e.byteLength,r=e=>{let r=t.getUint16(e+10,!0),i=t.getUint32(e+12,!0),a=t.getUint32(e+16,!0);return a===4294967295||r===65535?!0:r===0?i===0&&a===e:a+i<=e&&a+4<=n&&t.getUint32(a,!0)===qL},i=-1;for(let e=n-22;e>=Math.max(0,n-22-65535);e--)if(t.getUint32(e,!0)===WL&&r(e)){i=e;break}if(i<0)throw Error(`This is not a zip file, or it is damaged.`);let a=t.getUint16(i+10,!0),o=t.getUint32(i+16,!0),s=t.getUint16(i+20,!0),c=new TextDecoder(`utf-8`),l=c.decode(new Uint8Array(e,i+22,Math.min(s,n-i-22)));if((a===65535||o===4294967295)&&i>=20&&t.getUint32(i-20,!0)===GL){let e=Number(t.getBigUint64(i-12,!0));e+56<=n&&t.getUint32(e,!0)===KL&&(a=Number(t.getBigUint64(e+32,!0)),o=Number(t.getBigUint64(e+48,!0)))}let u=[],d=0,f=o;for(let r=0;r<a&&!(f+46>n||t.getUint32(f,!0)!==qL);r++){let r=t.getUint16(f+8,!0),i=t.getUint16(f+12,!0),a=t.getUint16(f+14,!0),o=t.getUint32(f+20,!0),s=t.getUint32(f+24,!0),l=t.getUint16(f+28,!0),p=t.getUint16(f+30,!0),m=t.getUint16(f+32,!0);if(f+46+l>n)break;let h=c.decode(new Uint8Array(e,f+46,l));for(let e=f+46+l,r=Math.min(n,e+p);e+4<=r;){let n=t.getUint16(e,!0),i=t.getUint16(e+2,!0),a=e+4+i;if(a>r)break;if(n===1){let n=e+4;s===4294967295&&n+8<=a&&(s=Number(t.getBigUint64(n,!0)),n+=8),o===4294967295&&n+8<=a&&(o=Number(t.getBigUint64(n,!0)))}e=a}f+=46+l+p+m,u.length>=5e3?d++:u.push({path:h,dir:h.endsWith(`/`),size:s,packed:o,date:YL(a,i),encrypted:(r&1)==1})}return{entries:u,more:d,comment:l}}function YL(e,t){if(!e)return null;let n=new Date(1980+(e>>9),(e>>5&15)-1,e&31,t>>11,t>>5&63,(t&31)*2);return Number.isNaN(n.getTime())?null:n}function XL(e){let t={name:``,path:``,dir:!0,size:0,date:null,encrypted:!1,children:[]},n=new Map([[``,t]]),r=0,i=e=>{let t=n.get(e);if(t)return t;let r=e.split(`/`),a={name:r[r.length-1],path:e,dir:!0,size:0,date:null,encrypted:!1,children:[]};return i(r.slice(0,-1).join(`/`)).children.push(a),n.set(e,a),a};for(let t of e){let e=t.path.replace(/\\/g,`/`).replace(/^\/+|\/+$/g,``).split(`/`).filter(Boolean),n=(e.length>UL?[...e.slice(0,63),e.slice(63).join(`/`)]:e).map(e=>e.slice(0,300)).join(`/`);if(!n)continue;if(/^__MACOSX(\/|$)|(^|\/)\.DS_Store$/.test(n)){r++;continue}if(t.dir){let e=i(n);e.date=t.date;continue}let a=n.split(`/`);i(a.slice(0,-1).join(`/`)).children.push({name:a[a.length-1],path:n,dir:!1,size:t.size,date:t.date,encrypted:t.encrypted,children:[]})}let a=e=>e.dir?e.size=e.children.reduce((e,t)=>e+a(t),0):e.size;a(t);let o=e=>{e.children.sort((e,t)=>e.dir===t.dir?e.name.localeCompare(t.name,void 0,{numeric:!0}):e.dir?-1:1),e.children.forEach(o)};return o(t),{root:t.children,hidden:r}}var ZL=209715200;function QL({url:e}){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(``);(0,L.useEffect)(()=>{let t=!0;return n(null),i(``),fetch(e).then(e=>e.blob()).then(async e=>{if(e.size>ZL)throw Error(`This file is too large to list here.`);return JL(await e.arrayBuffer())}).then(e=>{t&&n(e)},e=>{t&&i(e instanceof Error?e.message:String(e))}),()=>{t=!1}},[e]);let a=(0,L.useMemo)(()=>t?XL(t.entries):null,[t]),[o,s]=(0,L.useState)(new Set);if(r)return(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(yt,{size:22}),(0,W.jsx)(`p`,{children:r})]});if(!t||!a)return(0,W.jsx)(`div`,{className:`viewer-msg`,children:(0,W.jsx)(H,{size:22,className:`spin`})});let c=e=>e.reduce((e,t)=>e+(t.dir?c(t.children):1),0),l=c(a.root),u=a.root.reduce((e,t)=>e+t.size,0),d=t.entries.some(e=>e.encrypted),f=e=>s(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),p=[],m=(e,t)=>{for(let n of e){let e=n.dir&&!o.has(n.path);p.push((0,W.jsxs)(`li`,{className:`zip-row${n.dir?` dir`:``}`,style:{paddingLeft:12+t*18},children:[n.dir?(0,W.jsxs)(`button`,{type:`button`,className:`zip-name`,onClick:()=>f(n.path),"aria-expanded":e,children:[e?(0,W.jsx)(dt,{size:13}):(0,W.jsx)(ht,{size:13}),e?(0,W.jsx)(mn,{size:15}):(0,W.jsx)(gn,{size:15}),(0,W.jsx)(`span`,{children:n.name}),(0,W.jsx)(`span`,{className:`zip-count`,children:n.children.length})]}):(0,W.jsxs)(`span`,{className:`zip-name`,children:[(0,W.jsx)(`span`,{className:`zip-indent`}),(0,W.jsx)(cn,{size:15}),(0,W.jsx)(`span`,{title:n.path,children:n.name}),n.encrypted&&(0,W.jsx)($n,{size:12,"aria-label":`Protected by a password`})]}),(0,W.jsx)(`span`,{className:`zip-size`,children:Ca(n.size)}),(0,W.jsx)(`span`,{className:`zip-date`,children:n.date?n.date.toLocaleDateString(void 0,{year:`numeric`,month:`short`,day:`numeric`}):``})]},n.path)),e&&m(n.children,t+1)}};return m(a.root,0),(0,W.jsxs)(`div`,{className:`zip-view`,children:[(0,W.jsxs)(`p`,{className:`zip-summary`,children:[l===1?`1 file`:`${l.toLocaleString()} files`,`, `,Ca(u),` unpacked`,d&&(0,W.jsxs)(W.Fragment,{children:[` · `,(0,W.jsx)($n,{size:12}),` some protected by a password`]}),a.hidden>0&&(0,W.jsxs)(W.Fragment,{children:[` · `,a.hidden,` macOS extra`,a.hidden===1?``:`s`,` not shown`]}),t.more>0&&(0,W.jsxs)(W.Fragment,{children:[` · `,t.more.toLocaleString(),` more not listed`]})]}),p.length?(0,W.jsx)(`ul`,{className:`zip-list`,children:p}):(0,W.jsx)(`p`,{className:`viewer-msg`,children:`This zip file is empty.`})]})}var $L=null,eR={set(e){$L=e},available:()=>$L!==null,open(e){$L?.(e)}};function tR(e){return e.replace(/\r\n?/g,`
|
|
177
|
+
`).replace(/\n[ \t]/g,``).split(`
|
|
178
|
+
`).filter(e=>e.trim()!==``)}function nR(e){let t=0,n=!1;for(;t<e.length;t++){let r=e[t];if(r===`"`)n=!n;else if(r===`:`&&!n)break}if(t>=e.length)return null;let r=e.slice(0,t),i=e.slice(t+1),a=[],o=``;n=!1;for(let e of r)e===`"`?n=!n:e===`;`&&!n?(a.push(o),o=``):o+=e;a.push(o);let s={};for(let e of a.slice(1)){let t=e.indexOf(`=`);t>0&&(s[e.slice(0,t).toUpperCase()]=e.slice(t+1))}return{name:a[0].toUpperCase(),params:s,value:i}}function rR(e){let t={type:`ROOT`,props:[],children:[]},n=[t];for(let r of tR(e)){let e=nR(r);if(e){if(e.name===`BEGIN`){let r={type:e.value.trim().toUpperCase(),props:[],children:[]};if(n[n.length-1].children.push(r),n.push(r),n.length>8)return t.children}else e.name===`END`?n.length>1&&n.pop():n[n.length-1].props.push(e)}}return t.children}var iR=(e,t)=>e.props.find(e=>e.name===t),aR=e=>e.replace(/\\([\\;,nN])/g,(e,t)=>t===`n`||t===`N`?`
|
|
179
|
+
`:t).trim(),oR={UTC:`UTC`,"Coordinated Universal Time":`UTC`,"Greenwich Standard Time":`Atlantic/Reykjavik`,"GMT Standard Time":`Europe/London`,"W. Europe Standard Time":`Europe/Berlin`,"Romance Standard Time":`Europe/Paris`,"Central Europe Standard Time":`Europe/Budapest`,"Central European Standard Time":`Europe/Warsaw`,"E. Europe Standard Time":`Europe/Chisinau`,"FLE Standard Time":`Europe/Kiev`,"GTB Standard Time":`Europe/Bucharest`,"Russian Standard Time":`Europe/Moscow`,"Turkey Standard Time":`Europe/Istanbul`,"Israel Standard Time":`Asia/Jerusalem`,"Egypt Standard Time":`Africa/Cairo`,"W. Central Africa Standard Time":`Africa/Lagos`,"E. Africa Standard Time":`Africa/Nairobi`,"South Africa Standard Time":`Africa/Johannesburg`,"Morocco Standard Time":`Africa/Casablanca`,"Arabian Standard Time":`Asia/Dubai`,"Arab Standard Time":`Asia/Riyadh`,"India Standard Time":`Asia/Kolkata`,"China Standard Time":`Asia/Shanghai`,"Singapore Standard Time":`Asia/Singapore`,"Tokyo Standard Time":`Asia/Tokyo`,"Korea Standard Time":`Asia/Seoul`,"AUS Eastern Standard Time":`Australia/Sydney`,"New Zealand Standard Time":`Pacific/Auckland`,"Eastern Standard Time":`America/New_York`,"Central Standard Time":`America/Chicago`,"Mountain Standard Time":`America/Denver`,"US Mountain Standard Time":`America/Phoenix`,"Pacific Standard Time":`America/Los_Angeles`,"Alaskan Standard Time":`America/Anchorage`,"Hawaiian Standard Time":`Pacific/Honolulu`,"Atlantic Standard Time":`America/Halifax`,"Canada Central Standard Time":`America/Regina`,"SA Pacific Standard Time":`America/Bogota`,"Argentina Standard Time":`America/Buenos_Aires`,"E. South America Standard Time":`America/Sao_Paulo`,"Central America Standard Time":`America/Guatemala`,"Mexico Standard Time":`America/Mexico_City`,"Central Standard Time (Mexico)":`America/Mexico_City`};function sR(e){let t=e.replace(/^["/]+|"$/g,``).trim(),n=[t,oR[t],t.replace(/^.*?\/(?=[A-Z][a-z]+\/)/,``)].filter(Boolean);for(let e of n)try{return new Intl.DateTimeFormat(`en`,{timeZone:e}),e}catch{}return null}function cR(e,t){let n=Object.fromEntries(new Intl.DateTimeFormat(`en-US`,{timeZone:e,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,second:`2-digit`}).formatToParts(new Date(t)).map(e=>[e.type,e.value]));return Date.UTC(+n.year,n.month-1,+n.day,n.hour%24,+n.minute,+n.second)-Math.floor(t/1e3)*1e3}function lR(e,t){let n=t(e-1296e5),r=t(e+1296e5),i=e-n,a=e-r,o=t(i)===n,s=t(a)===r;return o&&s?Math.min(i,a):o?i:s?a:i}var uR=[`SU`,`MO`,`TU`,`WE`,`TH`,`FR`,`SA`],dR=e=>{let t=/^([+-])(\d\d)(\d\d)(\d\d)?$/.exec(e.trim());return t?(t[1]===`-`?-1:1)*((t[2]*60+ +t[3])*60+ +(t[4]??0))*1e3:NaN};function fR(e){let t=[];for(let n of e.children){if(n.type!==`STANDARD`&&n.type!==`DAYLIGHT`)continue;let e=dR(iR(n,`TZOFFSETTO`)?.value??``),r=dR(iR(n,`TZOFFSETFROM`)?.value??``),i=hR(iR(n,`DTSTART`)?.value??``);if(Number.isNaN(e)||i===null)continue;let a=Object.fromEntries((iR(n,`RRULE`)?.value??``).split(`;`).map(e=>e.split(`=`))),o=/^(-?\d)?([A-Z]{2})$/.exec(a.BYDAY??``);t.push({to:e,from:Number.isNaN(r)?e:r,start:i,...a.BYMONTH&&o?{month:a.BYMONTH-1,nth:o[1]?+o[1]:1,weekday:uR.indexOf(o[2])}:{}})}return t.length?e=>{let n=new Date(e).getUTCFullYear(),r=null;for(let i of t)for(let t of[n+1,n,n-1]){let n=i.month===void 0?i.start:mR(t,i.month,i.nth,i.weekday)+i.start%864e5,a=n-i.from;a<=e&&n>=i.start&&(!r||a>r.at)&&(r={at:a,offset:i.to})}return r?r.offset:t[0].from}:null}var pR=e=>t=>cR(e,t);function mR(e,t,n,r){if(n>0){let i=new Date(Date.UTC(e,t,1)).getUTCDay();return Date.UTC(e,t,1+(r-i+7)%7+(n-1)*7)}let i=new Date(Date.UTC(e,t+1,0));return Date.UTC(e,t,i.getUTCDate()-(i.getUTCDay()-r+7)%7+(n+1)*7)}function hR(e){let t=/^(\d{4})(\d\d)(\d\d)(?:T(\d\d)(\d\d)(\d\d)?)?Z?$/.exec(e.trim());if(!t)return null;let n=Date.UTC(+t[1],t[2]-1,+t[3],+(t[4]??0),+(t[5]??0),+(t[6]??0));return Number.isNaN(n)?null:n}var gR=e=>{let t=new Date(e);return new Date(t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate(),t.getUTCHours(),t.getUTCMinutes(),t.getUTCSeconds()).getTime()};function _R(e,t){if(!e)return null;let n=e.value.trim(),r=hR(n);if(r===null)return null;let i=e=>e;if(e.params.VALUE===`DATE`||/^\d{8}$/.test(n))return{at:r,allDay:!0,zone:null,wall:r,toUtc:i};if(n.endsWith(`Z`))return{at:r,allDay:!1,zone:`UTC`,wall:r,toUtc:i};let a=e.params.TZID;if(a){let e=sR(a),n=e?null:t.get(a.replace(/^"|"$/g,``)),i=e?pR(e):n;if(i){let t=e=>lR(e,i);return{at:t(r),allDay:!1,zone:e??a,wall:r,toUtc:t}}}return{at:gR(r),allDay:!1,zone:null,wall:r,toUtc:gR}}function vR(e){let t=/^([+-])?P(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/.exec(e.trim());return!t||e.trim()===`P`||/T$/.test(e.trim())?null:{days:(t[2]??0)*7+ +(t[3]??0),ms:(((t[4]??0)*60+ +(t[5]??0))*60+ +(t[6]??0))*1e3,sign:t[1]===`-`?-1:1}}var yR=e=>e.sign*(e.days*864e5+e.ms),bR={MO:`Monday`,TU:`Tuesday`,WE:`Wednesday`,TH:`Thursday`,FR:`Friday`,SA:`Saturday`,SU:`Sunday`},xR={1:`first`,2:`second`,3:`third`,4:`fourth`,"-1":`last`};function SR(e,t=new Map){let n=Object.fromEntries(e.split(`;`).map(e=>e.split(`=`)).map(([e,t])=>[e?.toUpperCase(),t])),r={DAILY:`day`,WEEKLY:`week`,MONTHLY:`month`,YEARLY:`year`}[n.FREQ??``];if(!r)return``;let i=Math.max(1,parseInt(n.INTERVAL??`1`,10)||1),a=i===1?`Every ${r}`:`Every ${i} ${r}s`;if(n.BYDAY){let e=n.BYDAY.split(`,`).map(e=>{let t=/^([+-]?\d)?([A-Z]{2})$/.exec(e.trim());return t?`${t[1]?`${xR[t[1].replace(`+`,``)]??t[1]} `:``}${bR[t[2]]??t[2]}`:``}).filter(Boolean);n.FREQ===`WEEKLY`&&e.length===5&&!/SA|SU/.test(n.BYDAY)?a=i===1?`Every weekday`:`${a}, on weekdays`:e.length&&(a+=` on ${e.length>1?`${e.slice(0,-1).join(`, `)} and ${e[e.length-1]}`:e[0]}`)}else n.BYMONTHDAY&&n.FREQ===`MONTHLY`&&(a+=` on day ${n.BYMONTHDAY}`);if(n.COUNT)a+=`, ${n.COUNT} times`;else if(n.UNTIL){let e=_R({name:`UNTIL`,params:{},value:n.UNTIL},t),r=e&&(e.allDay||/T000000Z$/i.test(n.UNTIL));e&&(a+=`, until ${new Date(e.at).toLocaleDateString(void 0,{day:`numeric`,month:`long`,year:`numeric`,...r?{timeZone:`UTC`}:{}})}`)}return a}function CR(e){let t=iR(e,`TRIGGER`);if(!t)return``;let n=vR(t.value);if(n===null){let e=hR(t.value);return e===null?``:`At ${new Date(e).toLocaleString()}`}let r=yR(n),i=r>0||t.params.RELATED===`END`,a=Math.round(Math.abs(r)/6e4);return a===0?i&&t.params.RELATED===`END`?`When it ends`:`When it starts`:`${a%1440==0?`${a/1440} day${a===1440?``:`s`}`:a%60==0?`${a/60} hour${a===60?``:`s`}`:`${a} minute${a===1?``:`s`}`} ${r>0?`after`:`before`}${t.params.RELATED===`END`?` it ends`:``}`}function wR(e){let t=rR(e).filter(e=>e.type===`VCALENDAR`)[0];if(!t)return{method:``,events:[],more:0};let n=new Map;for(let e of t.children.filter(e=>e.type===`VTIMEZONE`)){let t=iR(e,`TZID`)?.value,r=fR(e);t&&r&&n.set(t.trim(),r)}let r=[],i=0;for(let e of t.children){if(e.type!==`VEVENT`)continue;let t=_R(iR(e,`DTSTART`),n);if(!t)continue;if(r.length>=200){i++;continue}let a=_R(iR(e,`DTEND`),n),o=iR(e,`DURATION`)?vR(iR(e,`DURATION`).value):null,s=a&&a.at>=t.at?a.at:o&&o.sign>0?t.toUtc(t.wall+o.days*864e5)+o.ms:t.allDay?t.at+864e5:t.at,c=iR(e,`ORGANIZER`),l=aR(iR(e,`URL`)?.value??``);r.push({uid:aR(iR(e,`UID`)?.value??``),title:aR(iR(e,`SUMMARY`)?.value??``)||`Untitled event`,start:t.at,end:s,allDay:t.allDay,zone:t.zone,location:aR(iR(e,`LOCATION`)?.value??``),url:/^https?:\/\//i.test(l)?l:``,description:aR(iR(e,`DESCRIPTION`)?.value??``).slice(0,2e4),organizer:c?{name:aR(c.params.CN??``).replace(/^"|"$/g,``),email:c.value.replace(/^mailto:/i,``).trim()}:null,attendees:e.props.filter(e=>e.name===`ATTENDEE`).length,repeat:iR(e,`RRULE`)?SR(iR(e,`RRULE`).value,n):``,reminders:e.children.filter(e=>e.type===`VALARM`).map(CR).filter(Boolean),status:(iR(e,`STATUS`)?.value??``).trim().toUpperCase()})}return r.sort((e,t)=>e.start-t.start),{method:(iR(t,`METHOD`)?.value??``).trim().toUpperCase(),events:r,more:i}}function TR({text:e}){let[t,n]=(0,L.useState)(!1),r=(0,L.useMemo)(()=>wR(e),[e]);return r.events.length?(0,W.jsxs)(`div`,{className:`viewer-md-wrap`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn viewer-md-toggle`,"aria-pressed":t,onClick:()=>n(e=>!e),title:t?`Show the events`:`Show the text as it is written`,children:t?`Events`:`Source`}),t?(0,W.jsx)(`pre`,{className:`viewer-text`,children:e}):(0,W.jsxs)(`div`,{className:`ics-view`,children:[r.method===`CANCEL`&&(0,W.jsx)(`p`,{className:`ics-banner`,children:`This is a cancellation: the organiser has called it off.`}),r.events.map((e,t)=>(0,W.jsx)(MR,{e},`${e.uid}-${t}`)),r.more>0&&(0,W.jsxs)(`p`,{className:`office-more`,children:[r.more,` more events not shown.`]})]})]}):(0,W.jsx)(`pre`,{className:`viewer-text`,children:e})}var ER=Intl.DateTimeFormat().resolvedOptions().timeZone;function DR(e,t){if(e.allDay){let t={weekday:`long`,day:`numeric`,month:`long`,year:`numeric`,timeZone:`UTC`},n=e.end-864e5;return n>e.start?new Intl.DateTimeFormat(void 0,t).formatRange(new Date(e.start),new Date(n)):new Intl.DateTimeFormat(void 0,t).format(new Date(e.start))}let n=new Intl.DateTimeFormat(void 0,{weekday:`short`,day:`numeric`,month:`short`,year:`numeric`,hour:`numeric`,minute:`2-digit`,...t?{timeZone:t}:{}});return e.end>e.start?n.formatRange(new Date(e.start),new Date(e.end)):n.format(new Date(e.start))}function OR(e){if(e.allDay||!e.zone)return null;try{return new Intl.DateTimeFormat(`en`,{hour:`numeric`,minute:`numeric`,day:`numeric`}).format(new Date(e.start))===new Intl.DateTimeFormat(`en`,{hour:`numeric`,minute:`numeric`,day:`numeric`,timeZone:e.zone}).format(new Date(e.start))||e.zone===ER?null:e.zone}catch{return null}}var kR=/(https?:\/\/[^\s<>"')\]]+)/g;function AR(e){return e.split(kR).map((e,t)=>t%2?(0,W.jsx)(`a`,{href:e,target:`_blank`,rel:`noopener noreferrer`,children:e},t):e)}function jR(e){eR.open({subject:e.title,start:e.start,end:e.end,allDay:e.allDay,location:e.location.slice(0,500),body:[e.description,e.url&&!e.description.includes(e.url)?e.url:``].filter(Boolean).join(`
|
|
180
|
+
|
|
181
|
+
`).slice(0,8e3)})}function MR({e}){let t=OR(e),n=e.status===`CANCELLED`;return(0,W.jsxs)(`article`,{className:`ics-card${n?` cancelled`:``}`,children:[(0,W.jsxs)(`header`,{className:`ics-head`,children:[(0,W.jsx)(`h2`,{children:e.title}),n&&(0,W.jsx)(`span`,{className:`ics-tag`,children:`Cancelled`}),e.status===`TENTATIVE`&&(0,W.jsx)(`span`,{className:`ics-tag`,children:`Tentative`})]}),(0,W.jsxs)(`dl`,{className:`ics-facts`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(Ct,{size:14,"aria-label":`When`})}),(0,W.jsxs)(`dd`,{children:[DR(e),t&&(0,W.jsxs)(`span`,{className:`ics-other`,children:[DR(e,t),` (`,t.replace(/_/g,` `),`)`]})]})]}),e.repeat&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(Yr,{size:14,"aria-label":`Repeats`})}),(0,W.jsx)(`dd`,{children:e.repeat})]}),e.location&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(sr,{size:14,"aria-label":`Where`})}),(0,W.jsx)(`dd`,{className:`ics-wrap`,children:AR(e.location)})]}),e.url&&e.url!==e.location&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)($t,{size:14,"aria-label":`Web page`})}),(0,W.jsx)(`dd`,{className:`ics-wrap`,children:(0,W.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,children:e.url})})]}),e.organizer&&(e.organizer.name||e.organizer.email)&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(Yi,{size:14,"aria-label":`Organiser`})}),(0,W.jsxs)(`dd`,{children:[e.organizer.name||e.organizer.email,e.organizer.name&&e.organizer.email&&(0,W.jsxs)(`span`,{className:`ics-dim`,children:[` · `,e.organizer.email]})]})]}),e.attendees>0&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(Zi,{size:14,"aria-label":`Invited`})}),(0,W.jsx)(`dd`,{children:e.attendees===1?`1 person invited`:`${e.attendees} people invited`})]}),e.reminders.length>0&&(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:(0,W.jsx)(We,{size:14,"aria-label":`Reminders`})}),(0,W.jsx)(`dd`,{children:e.reminders.join(` · `)})]})]}),e.description&&(0,W.jsx)(`p`,{className:`ics-desc`,children:AR(e.description)}),eR.available()&&!n&&(0,W.jsx)(`div`,{className:`ics-actions`,children:(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:()=>jR(e),title:`Opens the calendar's form filled in, to check and save; no one is told`,children:[(0,W.jsx)(ot,{size:15}),`Add to calendar`]})})]})}var NR=3,PR=9e5,FR=524288,IR=e=>/\.(ics|ical)$/i.test(e.name)||/^text\/calendar/i.test(e.contentType??``);function LR({msg:e,files:t}){let n=[...RR(e),...zR(e.id,t)],[r,i]=(0,L.useState)(!1);if(!n.length)return null;let a=r?n:n.slice(0,NR);return(0,W.jsxs)(`section`,{className:`mail-actions`,"aria-label":`Found in this mail`,children:[a.map(e=>(0,W.jsxs)(`div`,{className:`mail-action${e.off?` off`:``}`,children:[(0,W.jsx)(`span`,{className:`mail-action-icon`,children:e.icon}),(0,W.jsxs)(`div`,{className:`mail-action-text`,children:[(0,W.jsx)(`b`,{children:e.title}),e.detail&&(0,W.jsx)(`span`,{children:e.detail})]}),(0,W.jsx)(`div`,{className:`mail-action-buttons`,children:e.actions})]},e.key)),n.length>NR&&!r&&(0,W.jsxs)(`button`,{type:`button`,className:`btn bare mail-actions-more`,onClick:()=>i(!0),children:[`and `,n.length-NR,` more`]})]})}function RR(e){let t=e.code??pI.of(e.id),[n,r]=(0,L.useState)(!1);if((0,L.useEffect)(()=>r(!1),[t]),!t)return[];let i=async()=>{await _I(t)&&(r(!0),setTimeout(()=>r(!1),1500))};return[{key:`code`,icon:(0,W.jsx)(In,{size:18}),title:(0,W.jsxs)(W.Fragment,{children:[`Verification code `,(0,W.jsx)(`span`,{className:`mail-action-code`,children:gI(t)})]}),detail:Date.now()-new Date(e.received).getTime()<=PR?`Received ${ga(e.received)||`just now`} · most codes expire within minutes`:`Received ${ga(e.received)||new Date(e.received).toLocaleDateString()} · likely expired by now`,actions:(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>void i(),children:n?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{size:15}),`Copied`]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ut,{size:15}),`Copy`]})})}]}function zR(e,t){let n=t.filter(e=>IR(e)&&(e.size??0)<=FR&&!e.inline),[r,i]=(0,L.useState)([]),a=n.map(e=>e.id).join(`,`);return(0,L.useEffect)(()=>{let t=!0;if(i([]),n.length)return Promise.all(n.map(t=>YN(e,t).then(e=>e.blob.text()).then(e=>({a:t,f:wR(e)})).catch(()=>null))).then(e=>{t&&i(e.flatMap(e=>e&&e.f.events[0]?[{a:e.a,e:e.f.events[0],count:e.f.events.length,cancel:e.f.method===`CANCEL`}]:[]))}),()=>{t=!1}},[e,a]),r.map(({a:n,e:r,count:i,cancel:a})=>{let o=a||r.status===`CANCELLED`;return{key:`event-${n.id||n.name}`,icon:(0,W.jsx)(it,{size:18}),off:o,title:(0,W.jsxs)(W.Fragment,{children:[r.title,o&&(0,W.jsx)(`span`,{className:`ics-tag`,children:`Cancelled`})]}),detail:`${DR(r)}${r.repeat?` · ${r.repeat}`:``}${i>1?` · and ${i-1} more`:``}`,actions:(0,W.jsxs)(W.Fragment,{children:[i>1&&(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>DI.open(t.map(t=>MI(e,t)),t.indexOf(n)),children:`All events`}),eR.available()&&!o&&(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:()=>jR(r),title:`Opens the calendar's form filled in, to check and save; no one is told`,children:[(0,W.jsx)(ot,{size:15}),`Add to calendar`]})]})}})}function BR(e,t){return`<!doctype html><html><head><meta charset="utf-8"><meta http-equiv="Content-Security-Policy" content="${`default-src 'none'; style-src 'unsafe-inline'; font-src data:; img-src data:${t?` https: http:`:``}`}"><base target="_blank"><style>html{color-scheme:light;background:#fff;color:#1b1f24;overflow:hidden}body{margin:0;padding:0;font:14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow-wrap:anywhere}`+(D()?`body{padding:12px}`:``)+`#mw-fit{display:flow-root}#mw-fit>:nth-child(1 of :not(meta,style,title,link,base)){margin-top:0}#mw-fit>:nth-last-child(1 of :not(meta,style,title,link,base)){margin-bottom:0}img{max-width:100%;height:auto}img[src^="cid:"]{visibility:hidden}img.mw-zoom{cursor:zoom-in}pre{white-space:pre-wrap}blockquote{margin:0 0 0 8px;padding-left:10px;border-left:2px solid #d0d5dd}a{color:#2563eb}</style></head><body><div id="mw-fit">`+e+`</div></body></html>`}function VR(e){let t=!1;for(let n of e.querySelectorAll(`img`))/^data:/i.test(n.getAttribute(`src`)??``)?n.removeAttribute(`srcset`):(t=!0,n.replaceWith((n.ownerDocument??document).createTextNode(n.getAttribute(`alt`)??``)));for(let n of e.querySelectorAll(`[background], source, picture`))n.tagName===`SOURCE`||n.tagName===`PICTURE`?(t=!0,n.replaceWith(...n.tagName===`PICTURE`?[...n.childNodes]:[])):n.removeAttribute(`background`);return t}var HR=e=>{try{e=decodeURIComponent(e)}catch{}return e.replace(/^cid:/i,``).replace(/^<|>$/g,``).trim().toLowerCase()},UR=new Map;function WR(e,t){let n=UR.get(e.id);return n||(n=(async()=>{let n=new Map,r=e.attachments.filter(e=>e.contentId?t.has(HR(e.contentId)):e.inline||/^image\//i.test(e.contentType||``)).slice(0,16);return await Promise.all(r.map(async t=>{try{let r=await U(`attachment`,{id:e.id,attachmentId:t.id});/^image\//i.test(r.contentType)&&n.set(HR(r.contentId||t.contentId||t.name),{url:`data:${r.contentType};base64,${r.data}`,attachmentId:t.id})}catch{}})),n})(),UR.set(e.id,n),UR.size>30&&UR.delete(UR.keys().next().value)),n}var GR=/^data:image\/(png|jpeg|gif|webp|avif|bmp);/i;function KR(e){return e.map((e,t)=>{let n=e.currentSrc||e.src,r=GR.test(n),i=null;return{name:e.alt?.trim()||`Image ${t+1}`,kind:`image`,canOpenTab:r||/^https?:/i.test(n),load:async()=>n.startsWith(`data:`)?(i??=fetch(n).then(e=>e.blob()).then(e=>URL.createObjectURL(r?e:new Blob([e],{type:`application/octet-stream`}))),{url:r?await i:n}):{url:n}}})}function qR({msg:e,html:t,images:n,onMailto:r,onInline:i}){let a=(0,L.useRef)(null),[o,s]=(0,L.useState)(48),c=(0,L.useMemo)(()=>BR(t,n),[t,n]),l=(0,L.useRef)(r);l.current=r;let u=(0,L.useRef)(i);return u.current=i,(0,L.useEffect)(()=>{let t=a.current;if(!t)return;let r=null,i=null,o=!0,c=()=>{let a=t.contentDocument,c=a?.getElementById(`mw-fit`);if(!a||!c)return;let d=()=>{let e=t.contentWindow;if(!o||!e||!a.body||t.contentDocument!==a)return;let n=e.getComputedStyle(a.body);s(Math.ceil(c.getBoundingClientRect().height+parseFloat(n.paddingTop)+parseFloat(n.paddingBottom)))},f=()=>{c.style.zoom=``;let e=c.scrollWidth,t=c.clientWidth;e>t+2&&(c.style.zoom=String(Math.max(.35,t/e))),d()};f(),r=new ResizeObserver(()=>{requestAnimationFrame(d)}),r.observe(c);let p=t.clientWidth;i=new ResizeObserver(()=>{requestAnimationFrame(()=>{o&&t.clientWidth!==p&&(p=t.clientWidth,f())})}),i.observe(t),a.querySelectorAll(`img`).forEach(e=>e.addEventListener(`load`,f,{once:!0}));let m=()=>[...a.querySelectorAll(`img`)].filter(e=>!e.closest(`a[href]`)&&e.naturalWidth>=80&&e.naturalHeight>=80&&!/^cid:/i.test(e.getAttribute(`src`)||``)),h=()=>{for(let e of m())e.classList.add(`mw-zoom`)};h(),a.querySelectorAll(`img`).forEach(e=>e.addEventListener(`load`,h)),n||a.addEventListener(`copy`,e=>{let t=a.getSelection();if(!t||t.isCollapsed||!e.clipboardData)return;let n=a.createElement(`div`);for(let e=0;e<t.rangeCount;e++)n.appendChild(t.getRangeAt(e).cloneContents());VR(n)&&(e.clipboardData.setData(`text/html`,n.innerHTML),e.clipboardData.setData(`text/plain`,t.toString()),e.preventDefault())}),a.addEventListener(`click`,e=>{let t=e.target,n=t?.closest?.(`a[href]`),r=n?.getAttribute(`href`)||``;if(/^mailto:/i.test(r))e.preventDefault(),l.current(decodeURIComponent(r.slice(7).split(`?`)[0]));else if(!n&&t?.tagName===`IMG`){let e=m(),n=e.indexOf(t);n>=0&&DI.open(KR(e),n)}});let g=[...a.querySelectorAll(`img`)].filter(e=>/^cid:/i.test(e.getAttribute(`src`)||``));g.length&&WR(e,new Set(g.map(e=>HR(e.getAttribute(`src`))))).then(e=>{if(!o)return;let t=[];for(let n of g){let r=e.get(HR(n.getAttribute(`src`)));r&&(n.addEventListener(`load`,f,{once:!0}),n.src=r.url,t.push(r.attachmentId))}t.length&&u.current(t)})};return t.addEventListener(`load`,c),()=>{o=!1,t.removeEventListener(`load`,c),r?.disconnect(),i?.disconnect()}},[e,c]),(0,W.jsx)(`iframe`,{ref:a,className:`mail-html`,title:`Message body`,sandbox:`allow-same-origin allow-popups allow-popups-to-escape-sandbox`,referrerPolicy:`no-referrer`,srcDoc:c,style:{height:o}})}var JR=e=>e.map(e=>e.name||e.email).filter(Boolean).join(`, `);function YR({id:e,attachmentId:t}){let n=(0,L.useMemo)(()=>{let n=JN(e);return n?{id:n.id,path:[...n.path,t]}:{id:e,path:[t]}},[e,t]),[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)([]);if((0,L.useEffect)(()=>{let e=!0;return i(null),o(``),c(!1),u([]),U(`attachedMail`,{id:n.id,path:n.path}).then(t=>{e&&i(t)},t=>{e&&o(t instanceof Error?t.message:String(t))}),()=>{e=!1}},[n]),a)return(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(yt,{size:22}),(0,W.jsxs)(`p`,{children:[`This mail could not be read: `,a]})]});if(!r)return(0,W.jsx)(`div`,{className:`viewer-msg`,children:(0,W.jsx)(H,{size:22,className:`spin`})});let d=qN(n.id,n.path),f={...r,id:d,account:``,changeKey:``,isRead:!0,isFlagged:!1,hasAttachments:r.attachments.length>0,conversationId:``,preview:``,displayTo:JR(r.to),received:r.received??``},p=r.attachments.filter(e=>!e.inline&&!l.includes(e.id)),m=r.bodyType===`HTML`&&/<img\b[^>]*\bsrc\s*=\s*["']?\s*https?:/i.test(r.body),h=async e=>{await _I(e)&&K.show({text:`${e} copied`,duration:2500})};return(0,W.jsxs)(`div`,{className:`attached-mail`,children:[(0,W.jsxs)(`header`,{className:`attached-head`,children:[(0,W.jsx)(`h2`,{children:r.subject||`(no subject)`}),(0,W.jsxs)(`div`,{className:`attached-from`,children:[(0,W.jsx)(ao,{name:r.fromName||r.fromEmail,email:r.fromEmail,size:32}),(0,W.jsxs)(`div`,{className:`attached-who`,children:[(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`b`,{children:r.fromName||r.fromEmail||`Unknown sender`}),r.fromName&&r.fromEmail&&(0,W.jsxs)(`span`,{className:`attached-dim`,children:[` <`,r.fromEmail,`>`]})]}),r.to.length>0&&(0,W.jsxs)(`div`,{className:`attached-dim`,children:[`To `,JR(r.to)]}),r.cc.length>0&&(0,W.jsxs)(`div`,{className:`attached-dim`,children:[`Cc `,JR(r.cc)]})]}),r.received&&(0,W.jsx)(`time`,{className:`attached-dim attached-when`,dateTime:r.received,children:ma(r.received)})]})]}),(0,W.jsxs)(`div`,{className:`msg-body attached-body`,children:[(0,W.jsx)(LR,{msg:f,files:p}),m&&!s&&(0,W.jsxs)(`div`,{className:`images-bar`,children:[(0,W.jsx)(wn,{size:14}),(0,W.jsx)(`span`,{children:`Images are hidden`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>c(!0),children:`Show`})]}),r.bodyType===`HTML`?(0,W.jsx)(qR,{msg:f,html:r.body,images:s,onMailto:e=>void h(e),onInline:u}):(0,W.jsx)(`pre`,{className:`mail-text`,children:r.body}),p.length>0&&(0,W.jsx)(`div`,{className:`cards`,children:p.map(e=>(0,W.jsx)(NI,{messageId:d,a:e,all:p},e.id))})]})]})}function XR({item:e}){let[t,n]=(0,L.useState)(null),[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(!1);if((0,L.useEffect)(()=>{let t=!0;if(n(null),i(null),o(!1),!(e.kind===`mail`&&e.mail))return e.load().then(e=>{t&&n(e)},e=>{t&&i(e.message)}),()=>{t=!1}},[e]),e.kind===`mail`&&e.mail)return(0,W.jsx)(YR,{id:e.mail.id,attachmentId:e.mail.attachmentId});if(r)return(0,W.jsx)(`div`,{className:`viewer-msg`,children:r});if(!t)return(0,W.jsx)(`div`,{className:`viewer-msg`,children:(0,W.jsx)(H,{size:22,className:`spin`})});switch(e.kind){case`image`:return(0,W.jsx)(`div`,{className:`viewer-image${a?` actual`:``}`,onClick:()=>o(e=>!e),title:a?`Fit to the panel`:`Show at full size`,children:(0,W.jsx)(`img`,{src:t.url,alt:e.name})});case`pdf`:return(0,W.jsx)(`iframe`,{className:`viewer-frame`,src:t.url,title:e.name});case`text`:return/\.(md|markdown|mdown|mkd)$/i.test(e.name)&&(t.text??``).length<=1048576?(0,W.jsx)(ZR,{text:t.text??``}):/\.(ics|ical|ifb)$/i.test(e.name)&&(t.text??``).length<=1048576?(0,W.jsx)(TR,{text:t.text??``}):/\.(csv|tsv)$/i.test(e.name)&&(t.text??``).length<=1048576?(0,W.jsx)(QR,{text:t.text??``,name:e.name}):(0,W.jsx)(`pre`,{className:`viewer-text`,children:t.text??``});case`mail`:return(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(cn,{size:40,strokeWidth:1.3}),(0,W.jsx)(`p`,{children:`A mail that came attached.`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:()=>XN(t.url,e.name),children:[(0,W.jsx)(Gt,{size:15}),` Download`]})]});case`archive`:return(0,W.jsx)(QL,{url:t.url});case`office`:return(0,W.jsx)(TL,{url:t.url,name:e.name});case`audio`:return(0,W.jsx)(`div`,{className:`viewer-msg`,children:(0,W.jsx)(`audio`,{controls:!0,src:t.url})});case`video`:return(0,W.jsx)(`video`,{className:`viewer-video`,controls:!0,src:t.url});default:return(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsx)(cn,{size:40,strokeWidth:1.3}),(0,W.jsx)(`p`,{children:`No preview for this kind of file.`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:()=>XN(t.url,e.name),children:[(0,W.jsx)(Gt,{size:15}),` Download`]})]})}}function ZR({text:e}){let[t,n]=(0,L.useState)(!1),r=(0,L.useMemo)(()=>eN(e),[e]),i=(0,L.useRef)(null);return qI(i,t?``:r),(0,W.jsxs)(`div`,{className:`viewer-md-wrap`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn viewer-md-toggle`,"aria-pressed":t,onClick:()=>n(e=>!e),title:t?`Show it laid out`:`Show the text as it is written`,children:t?`Formatted`:`Source`}),t?(0,W.jsx)(`pre`,{className:`viewer-text`,children:e}):(0,W.jsx)(`div`,{ref:i,className:`viewer-md`,dangerouslySetInnerHTML:{__html:r}})]})}function QR({text:e,name:t}){let[n,r]=(0,L.useState)(!1),i=(0,L.useMemo)(()=>KI(e,GI(e,t)),[e,t]),a=i.columns>200,[o,...s]=i.rows,c=s.slice(0,Math.max(1,Math.floor(WI/Math.max(1,i.columns)))),l=i.more+(s.length-c.length);return(0,W.jsxs)(`div`,{className:`viewer-md-wrap`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn viewer-md-toggle`,"aria-pressed":n,onClick:()=>r(e=>!e),title:n?`Show it as a table`:`Show the text as it is written`,children:n?`Table`:`Source`}),n||!o||a?(0,W.jsx)(`pre`,{className:`viewer-text`,children:e}):(0,W.jsx)(`div`,{className:`office-view office-book viewer-csv`,children:(0,W.jsxs)(`div`,{className:`office-sheet-wrap`,children:[(0,W.jsxs)(`table`,{className:`office-sheet csv-sheet`,children:[(0,W.jsx)(`thead`,{children:(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{className:`office-corner`}),Array.from({length:i.columns},(e,t)=>(0,W.jsx)(`th`,{title:o[t]??``,children:o[t]??``},t))]})}),(0,W.jsx)(`tbody`,{children:c.map((e,t)=>(0,W.jsxs)(`tr`,{children:[(0,W.jsx)(`th`,{children:t+1}),Array.from({length:i.columns},(t,n)=>{let r=e[n]??``;return(0,W.jsx)(`td`,{title:r.length>40?r:void 0,className:/^-?[\d.,]+%?$/.test(r.trim())?`num`:void 0,children:r},n)})]},t))})]}),l>0&&(0,W.jsxs)(`p`,{className:`office-more`,children:[l.toLocaleString(),` more rows not shown.`]})]})})]})}function $R(){let e=OI();if((0,L.useEffect)(()=>{if(!e)return;let t=e=>{e.key===`Escape`?DI.close():e.key===`ArrowLeft`?DI.go(-1):e.key===`ArrowRight`&&DI.go(1),e.stopImmediatePropagation()};return window.addEventListener(`keydown`,t,!0),()=>window.removeEventListener(`keydown`,t,!0)},[e]),!e)return null;let t=e.items[e.index],n=e.items.length>1,r=e=>()=>{t.load().then(t=>e(t.url),()=>{})};return(0,W.jsxs)(`div`,{className:`viewer`,role:`dialog`,"aria-modal":`true`,"aria-label":t.name,children:[(0,W.jsxs)(`header`,{className:`viewer-head`,children:[(0,W.jsxs)(`div`,{className:`viewer-title`,children:[(0,W.jsx)(`span`,{className:`viewer-name`,children:t.name}),(0,W.jsx)(`span`,{className:`viewer-sub`,children:[t.size?Ca(t.size):``,n?`${e.index+1} of ${e.items.length}`:``].filter(Boolean).join(` · `)})]}),n&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>DI.go(-1),disabled:e.index===0,title:`Previous (←)`,"aria-label":`Previous`,children:(0,W.jsx)(pt,{size:17})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>DI.go(1),disabled:e.index===e.items.length-1,title:`Next (→)`,"aria-label":`Next`,children:(0,W.jsx)(ht,{size:17})})]}),t.onOpenMail&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>{let e=t.onOpenMail;DI.close(),e()},title:`Open the mail it came in`,"aria-label":`Open the mail it came in`,children:(0,W.jsx)(ar,{size:16})}),t.canOpenTab&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:r(e=>window.open(e,`_blank`,`noopener`)),title:`Open in a tab`,"aria-label":`Open in a tab`,children:(0,W.jsx)($t,{size:16})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:r(e=>XN(e,t.name)),title:`Download`,"aria-label":`Download`,children:(0,W.jsx)(Gt,{size:16})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>DI.close(),title:`Close (Esc)`,"aria-label":`Close`,children:(0,W.jsx)(la,{size:17})})]}),(0,W.jsx)(`div`,{className:`viewer-body`,children:(0,W.jsx)(XR,{item:t},e.index)})]})}var ez=[[`all`,`All`],[`pdfs`,`PDFs`],[`images`,`Images`],[`documents`,`Documents`],[`sheets`,`Sheets`],[`archives`,`Archives`],[`mails`,`Mails`],[`other`,`Other`]],tz=e=>e.contentType===`message/rfc822`||/\.eml$/i.test(e.name),nz=[[`date`,`Newest first`],[`name`,`By name`],[`size`,`Largest first`],[`sender`,`By sender`]],rz=`mw:files:order`,iz=12582912;function az(e){let t=UN(e.name,e.contentType);return t===`image`?`images`:t===`pdf`?`pdfs`:tz(e)?`mails`:/\.(xlsx?|csv|tsv|numbers|ods)$/i.test(e.name)?`sheets`:/\.(docx?|pptx?|txt|md|rtf|odt|odp|pages|key)$/i.test(e.name)?`documents`:/\.(zip|gz|tgz|7z|rar|tar)$/i.test(e.name)?`archives`:`other`}var oz=e=>tz(e)?e.name.replace(/\.eml$/i,``)||`Attached mail`:e.name,sz=e=>`${e.message.id}|${e.id}`,cz=(e,t)=>t?`To ${e.displayTo||`(no recipient)`}`:ya(e);function lz({at:e,onAt:t,onOpenMail:n,onWrite:r}){let[i,a]=(0,L.useState)(e?.folder??`inbox`),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(`all`),[f,p]=(0,L.useState)(()=>{try{let e=localStorage.getItem(rz);return nz.some(([t])=>t===e)?e:`date`}catch{return`date`}}),[m,h]=(0,L.useState)(null),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(null),[b,x]=(0,L.useState)(!1),[S,C]=(0,L.useState)(null),[w,T]=(0,L.useState)(()=>new Set),E=e=>e?`${e.message}|${e.id}`:null,[D,O]=(0,L.useState)(E(e?.file)),k=(0,L.useRef)(E(e?.file)),[A,j]=(0,L.useState)(null),ee=(0,L.useRef)(!1),M=e=>{O(null),a(e)},[te,ne]=(0,L.useState)(!1),re=(0,L.useRef)(null),ie=(0,L.useRef)(0),ae=(0,L.useRef)({folder:i,q:c,cursor:g,items:m});ae.current={folder:i,q:c,cursor:g,items:m};let oe=i===`sent`,se=e=>{p(e);try{e===`date`?localStorage.removeItem(rz):localStorage.setItem(rz,e)}catch{}};(0,L.useEffect)(()=>{let e=re.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>{e.clientWidth>0&&ne(e.clientWidth>=760)},n=new ResizeObserver(t);return n.observe(e),t(),()=>n.disconnect()},[]);let N=(0,L.useCallback)(async({append:e=!1,silent:t=!1}={})=>{let n=++ie.current,{folder:r,q:i,cursor:a}=ae.current,o=e?ae.current.items??[]:[],s=e=>[...o,...e.filter(e=>!o.some(t=>sz(t)===sz(e)))];t||x(!0);let c=!e&&!i?`files:${r}`:null,l=!1,u=!1;c&&!t&&qs(c).then(e=>{e&&!l&&n===ie.current&&(u=!0,h(e.items),_(e.cursor??null))});let d={folder:r,q:i||void 0,until:e?a??void 0:void 0};t||U(`files`,{...d,quick:!0}).then(t=>{!l&&n===ie.current&&t.quick&&t.items.length&&(u=!0,h(e?s(t.items):t.items),e||_(t.cursor??null))},()=>{});try{let t=await U(`files`,d);if(l=!0,n!==ie.current)return;c&&Js(c,{items:t.items,cursor:t.cursor}),h(e?s(t.items):t.items),_(t.cursor??null),y(null)}catch(r){if(n!==ie.current)return;t||(y(r instanceof Error?r.message:String(r)),!e&&!u&&h([]))}finally{n===ie.current&&x(!1)}},[]);(0,L.useEffect)(()=>{h(null),T(new Set),O(k.current),k.current=null,N()},[i,c,N]),(0,L.useEffect)(()=>{if(!e)return;let t=E(e.file);e.folder===i?t!==D&&(ee.current=!0,O(t)):(ee.current=!0,k.current=t,a(e.folder))},[e?.folder,E(e?.file)]),(0,L.useEffect)(()=>{if(!t)return;let[n,r]=D?[D.slice(0,D.lastIndexOf(`|`)),D.slice(D.lastIndexOf(`|`)+1)]:[],a={folder:i,...n&&r?{file:{message:n,id:r}}:{}},o=a.folder===e?.folder&&E(a.file)===E(e?.file);ee.current?o&&(ee.current=!1):o||t(a)},[i,D]),(0,L.useEffect)(()=>{let e=setTimeout(()=>l(o.trim()),300);return()=>clearTimeout(e)},[o]),(0,L.useEffect)(()=>ce(e=>{e===`focus`&&!ae.current.cursor&&N({silent:!0})},2500),[N]);let le=(0,L.useMemo)(()=>{let e=new Map;for(let t of m??[])e.set(az(t),(e.get(az(t))??0)+1);return e},[m]),ue=(0,L.useMemo)(()=>{let e=(m??[]).filter(e=>u===`all`||az(e)===u);return f===`name`?[...e].sort((e,t)=>e.name.localeCompare(t.name,void 0,{sensitivity:`base`,numeric:!0})):f===`size`?[...e].sort((e,t)=>(t.size||0)-(e.size||0)):f===`sender`?[...e].sort((e,t)=>cz(e.message,oe).localeCompare(cz(t.message,oe),void 0,{sensitivity:`base`})||t.message.received.localeCompare(e.message.received)):e},[m,u,f,oe]),de=(0,L.useMemo)(()=>D?ue.find(e=>sz(e)===D)??(m??[]).find(e=>sz(e)===D)??(A&&sz(A)===D?A:null):null,[ue,m,D,A]);(0,L.useEffect)(()=>{if(!D||!m||m.some(e=>sz(e)===D)||A&&sz(A)===D)return;let e=!0,t=D.lastIndexOf(`|`),n=D.slice(0,t),r=D.slice(t+1);return U(`read`,{id:n}).then(t=>{let n=t.attachments.find(e=>e.id===r&&!e.inline);e&&(n?j({...n,message:t}):(ee.current=!1,O(null)))},()=>{e&&(ee.current=!1,O(null))}),()=>{e=!1}},[D,m,A]);let fe=e=>{let t=ue.some(t=>sz(t)===sz(e))?ue:[e,...ue];DI.open(t.map(e=>({...MI(e.message.id,e),onOpenMail:()=>n(e.message)})),Math.max(0,t.findIndex(t=>sz(t)===sz(e))))},pe=e=>{te?O(sz(e)):fe(e)},me=async e=>{if(!S){C(sz(e));try{let t=await YN(e.message.id,e);XN(t.url,t.name)}catch(e){K.error(e,`Could not download: `)}finally{C(null)}}},P=(0,L.useMemo)(()=>(m??[]).filter(e=>w.has(sz(e))),[m,w]);(0,L.useEffect)(()=>{m&&P.length!==w.size&&T(new Set(P.map(sz)))},[m,P,w]);let he=(e,t)=>T(n=>{let r=new Set(n);return t?r.add(sz(e)):r.delete(sz(e)),r}),F=async()=>{if(S)return;let e=P;C(`picked`);let t=0;for(let n of e)try{let e=await YN(n.message.id,n);XN(e.url,e.name),await new Promise(e=>setTimeout(e,250))}catch{t++}C(null),t?K.show({kind:`error`,text:t===e.length?`The files could not be downloaded.`:`${t} of ${e.length} files could not be downloaded.`}):T(new Set)},I=e=>{if(e.key!==`ArrowDown`&&e.key!==`ArrowUp`)return;let t=[...re.current?.querySelectorAll(`.fb-open`)??[]],n=t.indexOf(document.activeElement),r=t[n+(e.key===`ArrowDown`?1:-1)];n<0||!r||(e.preventDefault(),r.focus(),te&&r.dataset.key&&O(r.dataset.key))},ge=(e,t,r=!1)=>{let i=sz(e),a=UN(e.name,e.contentType);return(0,W.jsxs)(`li`,{className:`fb-row ${a}${r?` in`:``}${w.has(i)?` picked`:``}`,"aria-current":te&&D===i?`true`:void 0,children:[(0,W.jsx)(`input`,{type:`checkbox`,className:`fb-pick`,checked:w.has(i),onChange:t=>he(e,t.target.checked),"aria-label":`Select ${e.name}`}),(0,W.jsxs)(`button`,{type:`button`,className:`fb-open`,"data-key":i,onClick:()=>pe(e),title:te?void 0:`Open ${e.name}`,children:[(0,W.jsx)(`span`,{className:`fb-icon`,children:(0,W.jsx)(AI,{kind:a,name:e.name})}),(0,W.jsxs)(`span`,{className:`fb-main`,children:[(0,W.jsx)(`span`,{className:`fb-name`,children:oz(e)}),(0,W.jsxs)(`span`,{className:`fb-meta`,children:[(0,W.jsx)(`span`,{className:`fb-badge`,children:jI(a,e.name)}),e.size?(0,W.jsx)(`span`,{children:Ca(e.size)}):null,t&&(0,W.jsx)(`span`,{className:`fb-sub`,children:t})]})]}),!r&&(0,W.jsx)(`time`,{className:`time`,dateTime:e.message.received,children:pa(e.message.received)})]}),(0,W.jsxs)(`span`,{className:`fb-actions`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>n(e.message),title:`Open the mail it came in`,"aria-label":`Open the mail it came in`,children:(0,W.jsx)(ar,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>me(e),title:`Download`,"aria-label":`Download ${e.name}`,children:S===i?(0,W.jsx)(H,{size:15,className:`spin`}):(0,W.jsx)(Gt,{size:15})})]})]},i)};return(0,W.jsxs)(`section`,{className:`view fb${te?` wide`:``}`,ref:re,children:[(0,W.jsxs)(`div`,{className:`fb-side`,children:[(0,W.jsxs)(`header`,{className:`top`,children:[(0,W.jsxs)(`div`,{className:`top-row`,children:[(0,W.jsx)(`span`,{className:`folder-name files-title`,children:`Files`}),m&&m.length>0&&(0,W.jsxs)(`span`,{className:`pb-count`,children:[ue.length,g?`+`:``]}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`div`,{className:`seg`,role:`group`,"aria-label":`Which mail`,children:[(0,W.jsx)(`button`,{type:`button`,"aria-pressed":i===`inbox`,onClick:()=>M(`inbox`),children:`Received`}),(0,W.jsx)(`button`,{type:`button`,"aria-pressed":i===`sent`,onClick:()=>M(`sent`),children:`Sent`})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:()=>N(),title:`Refresh`,"aria-label":`Refresh`,children:(0,W.jsx)(Gr,{size:15,className:b?`spin`:void 0})})]}),(0,W.jsxs)(`div`,{className:`searchbox`,children:[(0,W.jsx)(ti,{size:15}),(0,W.jsx)(`input`,{type:`text`,placeholder:`Search files by name, or by words of their mail`,autoComplete:`off`,spellCheck:!1,value:o,onChange:e=>s(e.target.value),onKeyDown:e=>{e.key===`Escape`&&o&&(e.stopPropagation(),s(``))},"aria-label":`Search files`}),o&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>s(``),title:`Clear search`,"aria-label":`Clear search`,children:(0,W.jsx)(la,{size:14})})]}),m&&m.length>0&&(0,W.jsxs)(`div`,{className:`fb-tools`,children:[(0,W.jsx)(`div`,{className:`file-sorts`,role:`group`,"aria-label":`Kind of file`,children:ez.filter(([e])=>e===`all`||le.get(e)).map(([e,t])=>(0,W.jsxs)(`button`,{type:`button`,className:`btn toggle`,"aria-pressed":u===e,onClick:()=>d(e),children:[t,e!==`all`&&(0,W.jsx)(`span`,{className:`file-count`,children:le.get(e)})]},e))}),(0,W.jsx)(`select`,{className:`btn fb-order`,value:f,onChange:e=>se(e.target.value),"aria-label":`In which order`,title:`In which order`,children:nz.map(([e,t])=>(0,W.jsx)(`option`,{value:e,children:t},e))})]}),P.length>0&&(0,W.jsxs)(`div`,{className:`fb-picked`,role:`region`,"aria-label":`Files selected`,children:[(0,W.jsx)(`span`,{children:P.length===1?`1 file selected`:`${P.length} files selected`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:F,disabled:!!S,children:[S===`picked`?(0,W.jsx)(H,{size:14,className:`spin`}):(0,W.jsx)(Gt,{size:14}),` Download`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>T(new Set),title:`Select none`,"aria-label":`Select none`,children:(0,W.jsx)(la,{size:15})})]})]}),(0,W.jsxs)(`div`,{className:`list fb-list`,onKeyDown:I,children:[v&&m&&m.length>0&&(0,W.jsxs)(`p`,{className:`set-note pb-partly`,children:[`Not up to date: `,v]}),!m&&(0,W.jsx)(`div`,{"aria-busy":`true`,"aria-label":`Loading`,children:Array.from({length:8},(e,t)=>(0,W.jsxs)(`div`,{className:`conv skeleton`,children:[(0,W.jsx)(`span`,{className:`avatar sk`}),(0,W.jsxs)(`div`,{className:`conv-main`,children:[(0,W.jsx)(`span`,{className:`sk line w60`}),(0,W.jsx)(`span`,{className:`sk line w80`})]})]},t))}),m&&ue.length===0&&(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(gn,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:v??(c?`No file matches your search.`:u===`all`?oe?`You have not sent any file.`:`No mail with a file yet.`:`No file of this kind here.`)})]}),m&&ue.length>0&&(()=>{if(u===`images`)return(0,W.jsx)(`ul`,{className:`fb-grid`,children:ue.map(e=>(0,W.jsx)(uz,{f:e,chosen:te&&D===sz(e),picked:w.has(sz(e)),onPick:t=>he(e,t),onOpen:()=>pe(e),onOpenMail:()=>n(e.message),sub:`${cz(e.message,oe)} · ${pa(e.message.received)}`},sz(e)))});let e=[];if(f===`date`){let t=``;for(let r=0;r<ue.length;){let i=ue[r].message,a=r;for(;a<ue.length&&ue[a].message.id===i.id;)a++;let o=va(i.received);if(o!==t&&(t=o,e.push((0,W.jsx)(`li`,{className:`group`,role:`presentation`,children:o},`d:${o}:${r}`))),a-r===1)e.push(ge(ue[r],`${cz(i,oe)} · ${i.subject||`(no subject)`}`));else{e.push((0,W.jsxs)(`li`,{className:`fb-mail`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`fb-mail-open`,onClick:()=>n(i),title:`Open this mail`,children:[(0,W.jsx)(ar,{size:13}),(0,W.jsx)(`span`,{className:`fb-mail-who`,children:cz(i,oe)}),(0,W.jsx)(`span`,{className:`fb-mail-subject`,children:i.subject||`(no subject)`}),(0,W.jsxs)(`span`,{className:`fb-mail-n`,children:[a-r,` files`]})]}),(0,W.jsx)(`time`,{className:`time`,dateTime:i.received,children:pa(i.received)})]},`m:${i.id}`));for(let t=r;t<a;t++)e.push(ge(ue[t],null,!0))}r=a}}else if(f===`sender`){let t=``;for(let n of ue){let r=cz(n.message,oe);r!==t&&(t=r,e.push((0,W.jsx)(`li`,{className:`group`,role:`presentation`,children:r},`w:${r}:${sz(n)}`))),e.push(ge(n,n.message.subject||`(no subject)`))}}else for(let t of ue)e.push(ge(t,`${cz(t.message,oe)} · ${t.message.subject||`(no subject)`}`));return(0,W.jsx)(`ul`,{className:`fb-rows`,children:e})})(),g&&m&&(0,W.jsx)(`div`,{className:`more`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>N({append:!0}),disabled:b,children:b?`Loading…`:`Older files`})})]})]}),te&&(0,W.jsx)(`div`,{className:`fb-pane`,children:de?(0,W.jsx)(dz,{f:de,sent:oe,saving:S===sz(de),onClose:()=>O(null),onDownload:()=>me(de),onFull:()=>fe(de),onOpenMail:()=>n(de.message),onWrite:r&&!oe&&de.message.fromEmail?()=>r(de.message.fromEmail):void 0},sz(de)):(0,W.jsxs)(`div`,{className:`pb-none`,children:[(0,W.jsx)(gn,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:m?`Choose a file to see it here, with the mail it came in.`:``})]})})]})}function uz({f:e,sub:t,chosen:n,picked:r,onPick:i,onOpen:a,onOpenMail:o}){let[s,c]=(0,L.useState)(null),l=(0,L.useRef)(null);return(0,L.useEffect)(()=>{let t=l.current;if(!t||(e.size||0)>6291456)return;let n=!0,r=new IntersectionObserver(t=>{t.some(e=>e.isIntersecting)&&(r.disconnect(),UI(e.message.id,e).then(e=>{n&&e&&c(e)},()=>{}))},{rootMargin:`200px`});return r.observe(t),()=>{n=!1,r.disconnect()}},[e]),(0,W.jsxs)(`li`,{ref:l,className:`fb-thumb${r?` picked`:``}`,"aria-current":n?`true`:void 0,children:[(0,W.jsx)(`input`,{type:`checkbox`,className:`fb-pick`,checked:r,onChange:e=>i(e.target.checked),"aria-label":`Select ${e.name}`}),(0,W.jsxs)(`button`,{type:`button`,className:`fb-open`,"data-key":sz(e),onClick:a,title:e.name,children:[(0,W.jsx)(`span`,{className:`fb-thumb-pic`,children:s?(0,W.jsx)(`img`,{src:s,alt:``,draggable:!1}):(0,W.jsx)(AI,{kind:`image`,name:e.name})}),(0,W.jsx)(`span`,{className:`fb-name`,children:e.name}),(0,W.jsx)(`span`,{className:`fb-sub`,children:t})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare fb-thumb-mail`,onClick:o,title:`Open the mail it came in`,"aria-label":`Open the mail ${e.name} came in`,children:(0,W.jsx)(ar,{size:14})})]})}function dz({f:e,sent:t,saving:n,onClose:r,onDownload:i,onFull:a,onOpenMail:o,onWrite:s}){let c=e.message,l=UN(e.name,e.contentType),u=(e.size||0)>iz,[d,f]=(0,L.useState)(!1);(0,L.useEffect)(()=>{if(u)return;let e=setTimeout(()=>f(!0),250);return()=>clearTimeout(e)},[u]);let p=(0,L.useMemo)(()=>MI(c.id,e),[c.id,e.id]);return(0,W.jsxs)(`article`,{className:`fb-preview`,"aria-label":e.name,children:[(0,W.jsxs)(`header`,{className:`fb-preview-head`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon fb-back`,onClick:r,title:`Close`,"aria-label":`Close`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`span`,{className:`fb-icon big ${l}`,children:(0,W.jsx)(AI,{kind:l,name:e.name})}),(0,W.jsxs)(`div`,{className:`fb-preview-id`,children:[(0,W.jsx)(`h2`,{className:`fb-preview-name`,children:oz(e)}),(0,W.jsxs)(`p`,{className:`fb-meta`,children:[(0,W.jsx)(`span`,{className:`fb-badge`,children:jI(l,e.name)}),e.size?(0,W.jsx)(`span`,{children:Ca(e.size)}):null,(0,W.jsx)(`time`,{dateTime:c.received,children:new Date(c.received).toLocaleString([],{dateStyle:`medium`,timeStyle:`short`})})]}),(0,W.jsxs)(`button`,{type:`button`,className:`fb-from`,onClick:o,title:`Open the mail it came in`,children:[(0,W.jsx)(ar,{size:13}),(0,W.jsx)(`span`,{children:cz(c,t)}),(0,W.jsx)(`span`,{className:`fb-from-subject`,children:c.subject||`(no subject)`})]})]}),(0,W.jsxs)(`div`,{className:`fb-preview-actions`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:i,disabled:n,children:[n?(0,W.jsx)(H,{size:14,className:`spin`}):(0,W.jsx)(Gt,{size:14}),` Download`]}),p.canOpenTab&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:()=>{p.load().then(e=>window.open(e.url,`_blank`,`noopener`),e=>K.error(e,`Could not open: `))},title:`Open in a tab`,"aria-label":`Open in a tab`,children:(0,W.jsx)($t,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:a,title:`Show it over the whole page`,"aria-label":`Show it over the whole page`,children:(0,W.jsx)(lr,{size:15})}),s&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:s,title:`Write to ${ya(c)}`,"aria-label":`Write to ${ya(c)}`,children:(0,W.jsx)(xi,{size:15})})]})]}),(0,W.jsx)(`div`,{className:`fb-preview-body viewer-body`,children:d||tz(e)?(0,W.jsx)(XR,{item:p}):u?(0,W.jsxs)(`div`,{className:`viewer-msg`,children:[(0,W.jsxs)(`p`,{children:[Ca(e.size),`: it is fetched whole from the mail server.`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>f(!0),children:`Show it`})]}):(0,W.jsx)(`div`,{className:`viewer-msg`,children:(0,W.jsx)(H,{size:22,className:`spin`})})})]})}var fz=`mw:newtab`,pz=new Set,mz=(()=>{if(typeof window>`u`||window.parent===window)return null;let e=new URLSearchParams(location.search),t=window.location.ancestorOrigins?.[0]??``;if(e.get(`in`)!==`extension`||t!==`chrome-extension://oeknfneghipheiginkflkbfadcgjpoak`)return null;let n=e.get(`newtab`);if(n===`true`||n===`false`)try{localStorage.setItem(fz,n)}catch{}return t})();typeof window<`u`&&window.addEventListener(`storage`,e=>{if(e.key===fz)for(let e of pz)e()});var hz={get(){try{let e=localStorage.getItem(fz);return e===`true`||e!==`false`&&null}catch{return null}},set(e){try{localStorage.setItem(fz,String(e))}catch{}mz&&window.parent.postMessage({sideora:`call`,id:``,name:`setNewTab`,args:[e]},mz);for(let e of pz)e()},watch(e){return pz.add(e),()=>{pz.delete(e)}}},gz=typeof location<`u`&&(/\/src\/newtab\/index\.html$/.test(location.pathname)||new URLSearchParams(location.search).get(`view`)===`newtab`);A();var _z=typeof matchMedia==`function`?matchMedia(`(min-width: 880px)`):null;function vz(){return(0,L.useSyncExternalStore)(e=>(_z?.addEventListener(`change`,e),()=>_z?.removeEventListener(`change`,e)),()=>!!_z?.matches)}async function yz(e,t){let n=new URLSearchParams({latitude:e.latitude.toFixed(2),longitude:e.longitude.toFixed(2),timezone:`auto`,forecast_days:`2`,temperature_unit:t===`f`?`fahrenheit`:`celsius`,current:`temperature_2m,weather_code,is_day`,hourly:`temperature_2m,weather_code,is_day`,daily:`temperature_2m_max,temperature_2m_min`}),r=await fetch(`https://api.open-meteo.com/v1/forecast?${n}`,{signal:AbortSignal.timeout(8e3)});if(!r.ok)throw Error(`The weather could not be read (${r.status}).`);let i=await r.json(),a=Math.max(0,i.hourly.time.findIndex(e=>e>=`${i.current.time.slice(0,13)}:00`));return{temp:i.current.temperature_2m,code:i.current.weather_code,day:!!i.current.is_day,high:i.daily.temperature_2m_max[0],low:i.daily.temperature_2m_min[0],hours:i.hourly.time.slice(a,a+12).map((e,t)=>({hour:Number(e.slice(11,13)),temp:i.hourly.temperature_2m[a+t],code:i.hourly.weather_code[a+t],day:!!i.hourly.is_day[a+t]}))}}var bz=e=>typeof e==`number`&&Number.isFinite(e),xz=e=>bz(e)?e:void 0;async function Sz(e,t){let n=new URLSearchParams({latitude:e.latitude.toFixed(2),longitude:e.longitude.toFixed(2),timezone:e.timezone,forecast_days:`7`,temperature_unit:t===`f`?`fahrenheit`:`celsius`,wind_speed_unit:t===`f`?`mph`:`kmh`,current:`temperature_2m,apparent_temperature,relative_humidity_2m,weather_code,is_day,wind_speed_10m`,hourly:`temperature_2m,weather_code,is_day,precipitation_probability`,daily:`weather_code,temperature_2m_max,temperature_2m_min,precipitation_probability_max,sunrise,sunset`}),r=await fetch(`https://api.open-meteo.com/v1/forecast?${n}`,{signal:AbortSignal.timeout(8e3)});if(!r.ok)throw Error(`The weather could not be read (${r.status}).`);let i=await r.json(),a=i.current,o=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,s=(i.hourly?.time??[]).flatMap((e,t)=>{let n=i.hourly?.temperature_2m?.[t],r=i.hourly?.weather_code?.[t];return typeof e==`string`&&o.test(e)&&bz(n)&&bz(r)?[{time:e,temp:n,code:r,day:!!i.hourly?.is_day?.[t],rain:xz(i.hourly?.precipitation_probability?.[t])}]:[]}),c=(i.daily?.time??[]).flatMap((e,t)=>{let n=i.daily?.temperature_2m_max?.[t],r=i.daily?.temperature_2m_min?.[t],a=i.daily?.weather_code?.[t],s=e=>typeof e==`string`&&o.test(e)?e.slice(11,16):void 0;return typeof e==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e)&&bz(n)&&bz(r)&&bz(a)?[{date:e,code:a,high:n,low:r,rain:xz(i.daily?.precipitation_probability_max?.[t]),sunrise:s(i.daily?.sunrise?.[t]),sunset:s(i.daily?.sunset?.[t])}]:[]});if(!a||typeof a.time!=`string`||!o.test(a.time)||!bz(a.temperature_2m)||!bz(a.weather_code)||!s.length||!c.length)throw Error(`The weather service gave no weather.`);let l=`${a.time.slice(0,13)}:00`;return{time:a.time,temp:a.temperature_2m,code:a.weather_code,day:!!a.is_day,feels:xz(a.apparent_temperature),humidity:xz(a.relative_humidity_2m),wind:xz(a.wind_speed_10m),hours:s.filter(e=>e.time>=l).slice(0,48),days:c}}async function Cz(e){let t=await fetch(`https://geocoding-api.open-meteo.com/v1/search?${new URLSearchParams({name:e,count:`5`,language:`en`})}`,{signal:AbortSignal.timeout(8e3)});if(!t.ok)throw Error(`Places could not be looked up (${t.status}).`);return((await t.json()).results??[]).filter(e=>e.timezone).map(e=>({label:e.name,latitude:e.latitude,longitude:e.longitude,timezone:e.timezone,where:[e.admin1,e.country].filter(Boolean).join(`, `)}))}function wz(e){return e===0?{text:`Clear`,kind:`clear`}:e===1?{text:`Mostly clear`,kind:`partly`}:e===2?{text:`Partly cloudy`,kind:`partly`}:e===3?{text:`Overcast`,kind:`cloud`}:e===45||e===48?{text:`Fog`,kind:`fog`}:e>=51&&e<=57?{text:`Drizzle`,kind:`drizzle`}:e>=61&&e<=67?{text:`Rain`,kind:`rain`}:e>=71&&e<=77||e===85||e===86?{text:`Snow`,kind:`snow`}:e>=80&&e<=82?{text:`Showers`,kind:`rain`}:e>=95?{text:`Thunderstorm`,kind:`storm`}:{text:`Cloudy`,kind:`cloud`}}var Tz={"picture:peoria":new URL(`peoria-thumb-CN8upAdZ.jpg`,import.meta.url).href,earth:`data:image/webp;base64,UklGRloGAABXRUJQVlA4IE4GAADQKgCdASrAAJAAPpVInUolpKmtqTe6EbASiUdvknkVpMHex+cfn6FpYp/9uZP+p3tPRfzQ/Vd/Sej/8/++pP8bkmkrujVcbfosAWVvo98GPJDgcpdpkar6crJ+OUcccXvyduwiVqZIt11sMX//3JP2wugWcHYMSjhNfw/YXfPBz7/+f4KsYSTyT6uayU6+fROo0TO6X4IyHrF+l6toP//txS0FMPUdRtJ6p+KCT2dP3gpLomT/wObriNY+VMOA0Zv+Tv48yM6/mEHjtXwfON8gBTL8RqQm7vROt+4EPvqHCsf6f1vUb+PxZm8Y0/H4GI68rdhftV4yy/CoatiRgTrzW8ekWPCSt9eJvusnrXMcJruQHwSz5/vX9vG8C1y5aeF5l34kChCD3TSgQUw9kBS9sQ1NbMi1pMKuJqUEgiZd/2y+wAjF/DOKI3FZHBa5Q2qCooTfUj9A0XCixL3kuiAA/vqtztWnhuK0AAUKVrOx4/8K6IntNvzYOatrdU3xfr4QYYAHyIAAE90qDuxwvNSaslOgj1XzeQ7o4CiG+WFb4zwdPY6lyVxnN49hB6ipRsqQgAGt1TM/WHRmZXsFqcgHgXvLRO/p+gY76bpHJq4QeDFM3Q6tVUsq12eA8xdt9XMl/j2W0PHmipASSSIaS5KLMTjz4jtZfUwqTOj0emDBJw60TFqwI7jSvw3mbEwxxbojRIHLx6DfSdsFdhjJvJMS7fn0N+lA61ZOdS0OwUdd69Dt/YuIccchkuSR0QX9woaHISeHgXHlRAF2XLwciGQqbLIy9BogJ/4g+AKroStuCVhcYugjGC2gxUtl2UrwpIDcHI1ccHnGLv68wJ5AAfOSAKcV1RtS2UUbfSRLCnU6xoa6KmV/rAxptF6OJf8GfEOtKNwm6VddtwyPoa9muhJGhR/j6ruJ/kFnMRNLH7WcXtQIhNlVo8xRvRaoH9RGwIfvhwAigF4zejYm1wAynQhgR7ecE/15lbKTsTBb8Y9fEc9zNmZZgMzlto8cNZj+0+k1TTQ0wmrRktZ299Sqko1Ov4yDQRP0iKSe/g8XpiHowGqR5N0lsvJeEojijafpSRp0k3G59maRyl+1LsIb5YW8WfgFHbtRtYszt39yl7EPwLfsYwXOWqPwg0IVemW8v5CMln54J4c9m95OIxJHYL7cQTzWyrY8qgaxhR5vtr+NJyiQTlKN31r1xeJhCmJZKtY9OIGzesGUOdmetfh1jmfh5YtwdxOG900hLMD4vv1jYXAng8YZpjDTRUcuUrlYiO+BtcbnuIUA9SVRzFAdwReo1Rry/Sm7lNWjORAVT0B4dXzkfjv/+SykUdSAYx2evoGEJeUFqXPQt16XiwAduftyvFBUlNVwP8bZv+Hg3wueDwbUZYgaHM2qC7CJdIdf4uB9elmZViV9gssG5C8+Vk1BCJoqMasH9cFJcYjqlpDSWtZ5XcTreCV+dBwxHKh/IfqUOmZWnvYIE6xQ0YlVMc2CZuriPdRDQEoKjgMZ67X1f7XsanRDwL3attVpj5zWBRiXYdoGzt/O4w9zk/qCWUbZyy7ik+prantqxCiKAbRE7jZhTXFGprni/fldU5v5vRozeswfGCVXQzQpmjEMJA5uV4eB1w0ooNYM+ZV9yo/rqYIfhQHnzn3N7N44UBzZl6EI7806lpMMDZMk2Vd7aTc7dapectSczJ1D9mZ0MKvd0Skg1Euq1uGwQNEu1ANTFFUYIOmREj8d3vYHkWlhmuiTLKbQxl4CgDYk4vH6kA9iGe43Mo5BF4WoiQ6OqRJTxel29R6Yc/FWmw/enfMaPdyWgKnVSn6TSLoPcgJ6lu1pd39McpTo92Aw0czVjUXTcdSL3c38q4YyOdJkv6sw+FeXr/DOXP3S3xXjo7SMXD2UED68pQEVkjf4SaSqWUarBkeacGOlssJDsoVFm46XleiI+Ug9j+hAVyLDPKsLDo+8qrFgcEexTGjmonZnow0nKD80SpF+KbZD78vfc4MJN2F5ZhWC+mDVgv6Bj8kTD6MGV+6YllFA/AdnvTw+idzBKLNTYe7PEcq2AWNOAog/43qtjJQbAdxGkS8KewzmlpTP4KIuDoynjBuqv9Y6PR+nv2IZpWyNvqTUkqiFJnCQI/XKogTppN/pcEAOJ+XFqAA=`};function Ez({label:e,value:t,options:n,onPick:r}){return(0,W.jsx)(`span`,{className:`hm-seg`,role:`group`,"aria-label":e,children:n.map(([e,n])=>(0,W.jsx)(`button`,{type:`button`,"aria-pressed":e===t,onClick:()=>r(e),children:n},e))})}function Dz({hasCalendar:e,onClose:t}){let n=ie(),r=ue(),i=(0,L.useRef)(null),[a,o]=(0,L.useState)(null),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(!1),p=(0,L.useRef)(0),m=(0,L.useSyncExternalStore)(hz.watch,hz.get);(0,L.useEffect)(()=>{re.read().catch(()=>{})},[]),(0,L.useEffect)(()=>{let e=e=>{e.key===`Escape`&&(e.stopPropagation(),t())};return window.addEventListener(`keydown`,e,!0),()=>window.removeEventListener(`keydown`,e,!0)},[t]),(0,L.useEffect)(()=>{let e=s.trim(),t=++p.current;if(e.length<2){u(null),f(!1);return}f(!0);let n=setTimeout(()=>{Cz(e).then(e=>{t===p.current&&(u(e),o(null),f(!1))},e=>{t===p.current&&(u(null),o(e instanceof Error?e.message:String(e)),f(!1))})},350);return()=>clearTimeout(n)},[s]);let g=e=>ne.set(e),_=e=>{e===`image`&&!r?i.current?.click():g({background:e})},v=async e=>{if(e){o(null);try{await re.set(e),g({background:`image`})}catch(e){o(e instanceof Error?e.message:`That picture could not be read.`)}}},y=e=>{let t=n.spots.some(t=>t.label===e.label)?`${e.label}, ${e.where.split(`, `)[0]}`:e.label;n.spots.some(e=>e.label===t)||g({spots:[...n.spots,{label:t,latitude:e.latitude,longitude:e.longitude,timezone:e.timezone}]}),c(``),u(null)},b=e=>g({spots:n.spots.filter(t=>t.label!==e),widgets:n.widgets.map(t=>t.spot===e?{...t,spot:void 0}:t)}),x=(e,t)=>g({widgets:n.widgets.map(n=>n.key===e?{...n,...t}:n)}),S=(e,t)=>{let r=[...n.widgets],i=e+t;i<0||i>=r.length||([r[e],r[i]]=[r[i],r[e]],g({widgets:r}))},C=e=>g({widgets:[...n.widgets,{key:`${e}-${Date.now().toString(36)}`,widget:e,size:de[e].sizes[0]}]}),w={small:`Small`,medium:`Wide`};return(0,W.jsxs)(`aside`,{className:`hm-edit`,"aria-label":`Customize Home`,children:[(0,W.jsxs)(`header`,{className:`hm-edit-head`,children:[(0,W.jsx)(`h2`,{children:`Customize`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:t,"aria-label":`Close`,title:`Close (Esc)`,autoFocus:!0,children:(0,W.jsx)(la,{size:16})})]}),(0,W.jsxs)(`div`,{className:`hm-edit-body`,children:[a&&(0,W.jsx)(`p`,{className:`hm-edit-error`,role:`alert`,children:a}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Background`}),(0,W.jsx)(`div`,{className:`hm-swatches`,children:pe.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`hm-swatch`,"data-bg":e.id,"aria-pressed":n.background===e.id,onClick:()=>_(e.id),title:e.id===`image`&&!r?`Pick a picture of your own`:e.title,children:[(0,W.jsx)(`span`,{className:`hm-swatch-look`,style:e.id===`image`?r?{backgroundImage:`url(${r})`}:void 0:Tz[e.id]?{backgroundImage:`url(${Tz[e.id]})`}:void 0,children:e.id===`image`&&!r&&(0,W.jsx)(On,{size:16})}),(0,W.jsx)(`span`,{className:`hm-swatch-name`,children:e.title})]},e.id))}),r&&(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>i.current?.click(),children:`Change your picture`}),(0,W.jsx)(`input`,{ref:i,type:`file`,accept:`image/jpeg,image/png,image/webp`,hidden:!0,onChange:e=>{v(e.target.files?.[0]),e.target.value=``}}),n.background===`earth`&&(0,W.jsx)(`p`,{className:`hm-edit-note`,children:`Earth: photo by ActionVance on Unsplash.`})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Clock`}),(0,W.jsxs)(`div`,{className:`hm-field`,children:[(0,W.jsx)(`span`,{children:`Time`}),(0,W.jsx)(Ez,{label:`Time`,value:n.clock.time,options:[[`auto`,`Auto`],[`12h`,`12 h`],[`24h`,`24 h`]],onPick:e=>g({clock:{...n.clock,time:e}})})]}),(0,W.jsxs)(`label`,{className:`hm-field`,children:[(0,W.jsx)(`span`,{children:`Date`}),(0,W.jsxs)(`select`,{value:n.clock.date,onChange:e=>g({clock:{...n.clock,date:e.target.value}}),"aria-label":`Date`,children:[(0,W.jsx)(`option`,{value:`long`,children:`Saturday, November 14`}),(0,W.jsx)(`option`,{value:`short`,children:`Sat, Nov 14`}),(0,W.jsx)(`option`,{value:`off`,children:`None`})]})]}),(0,W.jsxs)(`label`,{className:`hm-field`,children:[(0,W.jsx)(`span`,{children:`Shows`}),(0,W.jsxs)(`select`,{value:n.clock.spot??``,onChange:e=>g({clock:{...n.clock,spot:e.target.value||void 0}}),"aria-label":`The clock shows the time of`,children:[(0,W.jsx)(`option`,{value:``,children:`The time here`}),n.spots.map(e=>(0,W.jsx)(`option`,{value:e.label,children:e.label},e.label))]})]}),(0,W.jsxs)(`div`,{className:`hm-field`,children:[(0,W.jsx)(`span`,{children:`Degrees`}),(0,W.jsx)(Ez,{label:`Degrees`,value:n.units,options:[[`auto`,`Auto`],[`c`,`°C`],[`f`,`°F`]],onPick:e=>g({units:e})})]})]}),h.newTab&&(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`New tab`}),(0,W.jsxs)(`div`,{className:`hm-field`,children:[(0,W.jsx)(`span`,{children:`New tabs open on`}),(0,W.jsx)(Ez,{label:`New tabs open on`,value:m?`home`:`chrome`,options:[[`chrome`,`Chrome's page`],[`home`,`Home`]],onPick:e=>hz.set(e===`home`)})]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Places`}),(0,W.jsx)(`p`,{className:`hm-edit-note`,children:`Whose weather and time the widgets show. Only these towns are sent to the weather service (Open-Meteo), never where you are.`}),n.spots.length>0&&(0,W.jsx)(`ul`,{className:`hm-list`,children:n.spots.map(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`span`,{className:`grow`,children:e.label}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>b(e.label),"aria-label":`Remove ${e.label}`,title:`Remove`,children:(0,W.jsx)(la,{size:14})})]},e.label))}),n.spots.length<6&&(0,W.jsxs)(`div`,{className:`hm-find`,children:[(0,W.jsx)(`input`,{type:`search`,value:s,onChange:e=>c(e.target.value),placeholder:`Add a town`,"aria-label":`Add a town`}),d&&(0,W.jsx)(H,{size:14,className:`spin`}),l&&(l.length?(0,W.jsx)(`ul`,{className:`hm-found`,children:l.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,onClick:()=>y(e),children:[(0,W.jsx)(`b`,{children:e.label}),e.where&&(0,W.jsx)(`span`,{children:e.where})]})},`${e.latitude},${e.longitude}`))}):(0,W.jsx)(`p`,{className:`hm-edit-note`,children:`No town of that name.`}))]})]}),(0,W.jsxs)(`section`,{children:[(0,W.jsx)(`h3`,{children:`Widgets`}),(0,W.jsx)(`ul`,{className:`hm-list hm-widgets`,children:n.widgets.map((t,r)=>(0,W.jsxs)(`li`,{"data-off":t.widget===`events`&&!e||void 0,children:[(0,W.jsxs)(`div`,{className:`hm-widget-row`,children:[(0,W.jsx)(`span`,{className:`grow`,children:de[t.widget].title}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>S(r,-1),disabled:r===0,"aria-label":`Move ${de[t.widget].title} earlier`,title:`Earlier`,children:(0,W.jsx)(_t,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>S(r,1),disabled:r===n.widgets.length-1,"aria-label":`Move ${de[t.widget].title} later`,title:`Later`,children:(0,W.jsx)(dt,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>g({widgets:n.widgets.filter(e=>e.key!==t.key)}),"aria-label":`Remove ${de[t.widget].title}`,title:`Remove`,children:(0,W.jsx)(la,{size:14})})]}),(0,W.jsxs)(`div`,{className:`hm-widget-opts`,children:[de[t.widget].sizes.length>1&&(0,W.jsx)(Ez,{label:`Size`,value:t.size,options:de[t.widget].sizes.map(e=>[e,w[e]]),onPick:e=>x(t.key,{size:e})}),t.widget===`weather`&&n.spots.length>1&&(0,W.jsx)(`select`,{value:t.spot??n.spots[0].label,onChange:e=>x(t.key,{spot:e.target.value}),"aria-label":`Weather of`,children:n.spots.map(e=>(0,W.jsx)(`option`,{value:e.label,children:e.label},e.label))}),t.widget===`events`&&(0,W.jsx)(Ez,{label:`Span`,value:String(t.days??1),options:[[`1`,`Today`],[`7`,`Week`]],onPick:e=>x(t.key,{days:e===`7`?7:1})}),t.widget===`events`&&!e&&(0,W.jsx)(`span`,{className:`hm-edit-note`,children:`No account has a calendar.`})]})]},t.key))}),n.widgets.length<8&&(0,W.jsxs)(`label`,{className:`hm-add`,children:[(0,W.jsx)(Lr,{size:14}),(0,W.jsxs)(`select`,{value:``,onChange:e=>{e.target.value&&C(e.target.value)},"aria-label":`Add a widget`,children:[(0,W.jsx)(`option`,{value:``,children:`Add a widget…`}),Object.keys(de).map(e=>(0,W.jsxs)(`option`,{value:e,children:[de[e].title,`: `,de[e].about.toLowerCase()]},e))]})]})]})]})]})}var Oz={list:null,error:null},kz=new Set,Az=()=>kz.forEach(e=>e()),jz,Mz=!1,Nz=e=>{let t=e.list!==Oz.list;Oz=e,Az(),t&&e.list&&Mz&&(clearTimeout(jz),jz=setTimeout(()=>{Oz.list&&Js(`notes:list`,Oz.list)},800))},Pz=e=>[...e].sort((e,t)=>Number(t.pinned)-Number(e.pinned)||t.updated.localeCompare(e.updated)),Fz=0;function Iz(){let e=++Fz;Oz.list||qs(`notes:list`).then(t=>{t&&e===Fz&&!Oz.list&&Nz({list:t,error:Oz.error})}),U(`notes`,{}).then(t=>{e===Fz&&(Mz=!0,Nz({list:t.notes,error:null}),clearTimeout(jz),Js(`notes:list`,t.notes))},t=>{e===Fz&&Nz({list:Oz.list,error:t instanceof Error?t.message:String(t)})})}var Lz=new Map,Rz=!1,zz;function Bz(){Rz||(Rz=!0,Iz(),te(e=>{if(e.push===`event`&&e.event.type===`notes`){let t=typeof e.event.id==`string`?e.event.id:``;Lz.get(t)?.forEach(e=>e()),clearTimeout(zz),zz=setTimeout(Iz,120)}else(e.push===`gap`||e.push===`bridge`&&e.state.connected)&&(Iz(),Lz.forEach(e=>e.forEach(e=>e())))}))}var Vz={reload:Iz,listed:(e=1500)=>Oz.list?Promise.resolve():new Promise(t=>{let n=()=>{Oz.list&&(kz.delete(n),t())};kz.add(n),setTimeout(()=>{kz.delete(n),t()},e)}),current:()=>Oz.list,patch(e){if(!Oz.list)return;let{op:t,ops:n,...r}=e;Nz({...Oz,list:Pz([r,...Oz.list.filter(t=>t.id!==e.id)])})},drop(e){Oz.list&&Nz({...Oz,list:Oz.list.filter(t=>t.id!==e)})},onChanged(e,t){Bz();let n=Lz.get(e)??new Set;return n.add(t),Lz.set(e,n),()=>{n.delete(t),n.size||Lz.delete(e)}}},Hz=new Map,Uz=new Map,Wz={peek:e=>Hz.get(e),async kept(e){let t=await qs(`note:${e}`);return Hz.get(e)??(t&&t.id===e&&typeof t.rev==`number`&&typeof t.html==`string`?t:void 0)},set(e){Hz.set(e.id,e),Js(`note:${e.id}`,e)},made(e){this.set(e),Uz.set(e.id,Date.now())},takeMade(e){let t=Uz.get(e);return Uz.delete(e),t!==void 0&&Date.now()-t<1e4?Hz.get(e):void 0},drop(e){Hz.delete(e),Js(`note:${e}`,null)}};function Gz(e=!0){return(0,L.useEffect)(()=>{e&&Bz()},[e]),(0,L.useSyncExternalStore)(e=>(kz.add(e),()=>kz.delete(e)),()=>Oz)}var Kz=e=>({kind:`mail`,id:e.id,account:e.account,...e.conversationId?{conversationId:e.conversationId}:{},subject:e.subject||`(no subject)`,...e.fromName||e.fromEmail?{from:e.fromName||e.fromEmail}:{}}),qz=(e,t)=>e.conversationId&&t.conversationId?e.conversationId===t.conversationId&&e.account===t.account:e.id===t.id,Jz=(e,t)=>(e??[]).filter(e=>e.links.some(e=>t.some(t=>qz(e,t)))),Yz=e=>e.title||(e.excerpt?e.excerpt.slice(0,60):``)||`Untitled`,Xz=`mw:note-draft:`,Zz=(e,t)=>`${Xz}${e}.${t}`,Qz=e=>`mw-note-${e}`,$z=new Set,eB=null,tB=e=>{let t=[];try{for(let n=0;n<localStorage.length;n++){let r=localStorage.key(n);r?.startsWith(e?`${Xz}${e}.`:Xz)&&t.push(r)}}catch{}return t},nB=()=>[...new Set(tB().map(e=>e.slice(14).split(`.`)[0]))].sort(),rB=()=>{let e=nB();e.join()!==(eB??[]).join()&&(eB=e),$z.forEach(e=>e())},iB=e=>{try{let t=JSON.parse(localStorage.getItem(e)??`null`);return t&&typeof t.owner==`string`&&Number.isInteger(t.rev)&&typeof t.title==`string`&&typeof t.html==`string`?t:null}catch{return null}},aB=new Set,oB={hold(e){aB.add(e);let t=!1,n=()=>{};try{navigator.locks?.request(Qz(e),()=>t?void 0:new Promise(e=>{n=e})).catch(()=>{})}catch{}return()=>{t=!0,aB.delete(e),n()}},set(e,t){try{return localStorage.setItem(Zz(e,t.owner),JSON.stringify({...t,at:Date.now()})),rB(),!0}catch{return!1}},remove(e,t,n){try{let r=Zz(e,t);if(localStorage.getItem(r)===null||n!==void 0&&iB(r)?.at!==n)return;localStorage.removeItem(r),rB()}catch{}},async orphan(e){if(!tB(e).length)return null;let t;try{if(!navigator.locks)return null;t=new Set(((await navigator.locks.query()).held??[]).map(e=>e.name??``))}catch{return null}return tB(e).map(iB).filter(e=>!!e&&!aB.has(e.owner)&&!t.has(Qz(e.owner))).sort((e,t)=>t.at-e.at)[0]??null}};function sB(){return(0,L.useSyncExternalStore)(e=>($z.add(e),()=>$z.delete(e)),()=>eB??=nB())}var cB=({kind:e,day:t,size:n=18})=>(0,W.jsx)(e===`clear`?t?Di:hr:e===`partly`?t?Lt:jt:e===`fog`?Dt:e===`drizzle`?Tt:e===`rain`?Nt:e===`snow`?Ft:e===`storm`?kt:zt,{size:n}),lB=e=>typeof e==`number`&&Number.isFinite(e),uB=e=>e===void 0||lB(e),dB=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}$/,fB=e=>{let t=e;return!!t&&typeof t==`object`&&typeof t.time==`string`&&dB.test(t.time)&&lB(t.temp)&&lB(t.code)&&uB(t.feels)&&uB(t.humidity)&&uB(t.wind)&&Array.isArray(t.hours)&&t.hours.length>0&&t.hours.every(e=>e&&typeof e.time==`string`&&dB.test(e.time)&&lB(e.temp)&&lB(e.code)&&uB(e.rain))&&Array.isArray(t.days)&&t.days.length>0&&t.days.every(e=>e&&typeof e.date==`string`&&/^\d{4}-\d{2}-\d{2}$/.test(e.date)&&lB(e.code)&&lB(e.high)&&lB(e.low)&&uB(e.rain)&&(e.sunrise===void 0||typeof e.sunrise==`string`)&&(e.sunset===void 0||typeof e.sunset==`string`))},pB=e=>`${Math.round(e)}°`;function mB(e,t){let n=Object.fromEntries(new Intl.DateTimeFormat(`en-CA`,{timeZone:e,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,hourCycle:`h23`}).formatToParts(t).map(e=>[e.type,e.value]));return`${n.year}-${n.month}-${n.day}T${n.hour}`}function hB({doc:e,first:t,now:n,onClose:r}){let i=(0,L.useRef)(null),[a,o]=(0,L.useState)(t),s=N(e,a),c=me(e),{value:l,at:u,stale:d,failed:f,asking:p}=ae(s?`outlook:${s.latitude.toFixed(2)},${s.longitude.toFixed(2)}:${c}`:null,()=>Sz(s,c),6e5,!0,fB),m=(0,L.useRef)(r);m.current=r;let h=(0,L.useRef)(()=>{});(0,L.useEffect)(()=>{let e=i.current;if(!e)return;e.open||e.showModal();let t=!1;h.current=()=>{if(e.open&&e.close(),t)return;t=!0;let n=()=>m.current();Promise.race([Promise.allSettled(e.getAnimations().map(e=>e.finished)),new Promise(e=>setTimeout(e,260))]).then(n,n)};let n=()=>h.current(),r=t=>{if(`closedBy`in HTMLDialogElement.prototype||t.target!==e)return;let r=e.getBoundingClientRect();(t.clientX<r.left||t.clientX>r.right||t.clientY<r.top||t.clientY>r.bottom)&&n()};return e.addEventListener(`close`,n),e.addEventListener(`cancel`,n),e.addEventListener(`click`,r),()=>{e.removeEventListener(`close`,n),e.removeEventListener(`cancel`,n),e.removeEventListener(`click`,r)}},[]);let g=t=>{let[n,r]=(t??``).split(`:`).map(Number);return lB(n)&&lB(r)?new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`,hour12:fe(e)}).format(new Date(2e3,0,1,n,r)):``},_=t=>new Intl.DateTimeFormat(void 0,{hour:`numeric`,hour12:fe(e)}).format(new Date(2e3,0,1,t)),v=e=>{let[t,n,r]=e.split(`-`).map(Number);return new Intl.DateTimeFormat(void 0,{weekday:`short`}).format(new Date(t,n-1,r))},y=s?mB(s.timezone,n):``,b=y.slice(0,10),x=(l?.hours??[]).filter(e=>e.time.slice(0,13)>=y).slice(0,24),S=(l?.days??[]).filter(e=>e.date>=b),C=S.find(e=>e.date===b),w=S.length?Math.min(...S.map(e=>e.low)):0,T=S.length&&Math.max(...S.map(e=>e.high))-w||1,E=l?wz(l.code):void 0,D=!!l&&(d||n.getTime()-u>54e5),O=D?new Date(u).toLocaleString([],{...new Date(u).toDateString()===n.toDateString()?{}:{weekday:`short`},hour:`numeric`,minute:`2-digit`}):``,k=l?[[(0,W.jsx)(Li,{size:14}),`Feels like`,l.feels===void 0?``:pB(l.feels)],[(0,W.jsx)(aa,{size:14}),`Wind`,l.wind===void 0?``:`${Math.round(l.wind)} ${c===`f`?`mph`:`km/h`}`],[(0,W.jsx)(qt,{size:14}),`Humidity`,l.humidity===void 0?``:`${Math.round(l.humidity)}%`],[(0,W.jsx)(ki,{size:14}),`Sunrise`,g(C?.sunrise)],[(0,W.jsx)(ji,{size:14}),`Sunset`,g(C?.sunset)]].filter(([,,e])=>e):[];return(0,W.jsxs)(`dialog`,{ref:i,className:`hm-sheet`,"aria-label":s?`Weather in ${s.label}`:`Weather`,closedby:`any`,onKeyDown:e=>{e.key!==`Escape`&&e.stopPropagation()},children:[(0,W.jsxs)(`header`,{className:`hm-sheet-head`,children:[e.spots.length>1?(0,W.jsx)(`div`,{className:`hm-sheet-places`,role:`group`,"aria-label":`Place`,children:e.spots.map(e=>(0,W.jsx)(`button`,{type:`button`,"aria-pressed":e.label===s?.label,onClick:()=>o(e.label),children:e.label},e.label))}):(0,W.jsx)(`h2`,{children:s?.label}),(0,W.jsx)(`button`,{type:`button`,className:`hm-sheet-close`,onClick:()=>h.current(),"aria-label":`Close`,title:`Close (Esc)`,children:(0,W.jsx)(la,{size:16})})]}),!l||!E||!S.length?!p&&(f||l)?(0,W.jsx)(`p`,{className:`hm-sheet-none`,role:`status`,children:`The weather could not be read. It is asked again in a minute.`}):(0,W.jsxs)(`div`,{className:`hm-sheet-wait`,role:`status`,"aria-label":`Reading the weather`,children:[(0,W.jsx)(`span`,{}),(0,W.jsx)(`span`,{}),(0,W.jsx)(`span`,{})]}):(0,W.jsxs)(`div`,{className:`hm-sheet-body`,children:[(0,W.jsxs)(`section`,{className:`hm-sheet-now`,"aria-label":D?`At ${O}`:`Now`,children:[(0,W.jsxs)(`p`,{className:`hm-sheet-temp`,children:[(0,W.jsx)(cB,{kind:E.kind,day:l.day,size:40}),(0,W.jsxs)(`b`,{children:[Math.round(l.temp),`°`,c.toUpperCase()]})]}),(0,W.jsxs)(`p`,{className:`hm-sheet-sky`,children:[(0,W.jsx)(`b`,{children:E.text}),C&&(0,W.jsxs)(`span`,{children:[`High `,pB(C.high),` · Low `,pB(C.low)]}),D&&(0,W.jsxs)(`span`,{children:[`As it was `,O]})]}),k.length>0&&(0,W.jsx)(`dl`,{className:`hm-sheet-facts`,children:k.map(([e,t,n])=>(0,W.jsxs)(`div`,{children:[(0,W.jsxs)(`dt`,{children:[e,t]}),(0,W.jsx)(`dd`,{children:n})]},t))})]}),x.length>0&&(0,W.jsxs)(`section`,{"aria-label":`The next 24 hours`,children:[(0,W.jsx)(`h3`,{children:`Next 24 hours`}),(0,W.jsx)(`ol`,{className:`hm-sheet-hours`,tabIndex:0,"aria-label":`Hour by hour`,children:x.map(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`span`,{children:e.time.slice(0,13)===y?`Now`:_(Number(e.time.slice(11,13)))}),(0,W.jsx)(cB,{kind:wz(e.code).kind,day:e.day,size:17}),(0,W.jsx)(`span`,{className:`slot-live`,children:wz(e.code).text}),(0,W.jsx)(`b`,{children:pB(e.temp)}),(0,W.jsx)(`small`,{"data-none":!e.rain||void 0,title:`Chance of rain`,children:e.rain===void 0?``:(0,W.jsxs)(W.Fragment,{children:[Math.round(e.rain),`%`,(0,W.jsx)(`span`,{className:`slot-live`,children:` chance of rain`})]})})]},e.time))})]}),(0,W.jsxs)(`section`,{"aria-label":`The next days`,children:[(0,W.jsx)(`h3`,{children:`Next days`}),(0,W.jsx)(`ol`,{className:`hm-sheet-days`,children:S.map(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`span`,{className:`hm-sheet-day`,children:e.date===b?`Today`:v(e.date)}),(0,W.jsxs)(`span`,{className:`hm-sheet-day-sky`,title:wz(e.code).text,children:[(0,W.jsx)(cB,{kind:wz(e.code).kind,day:!0,size:17}),(0,W.jsx)(`span`,{className:`slot-live`,children:wz(e.code).text})]}),(0,W.jsx)(`small`,{"data-none":!e.rain||void 0,title:`Chance of rain`,children:e.rain===void 0?``:(0,W.jsxs)(W.Fragment,{children:[Math.round(e.rain),`%`,(0,W.jsx)(`span`,{className:`slot-live`,children:` chance of rain`})]})}),(0,W.jsxs)(`span`,{className:`hm-sheet-low`,children:[(0,W.jsx)(`span`,{className:`slot-live`,children:`Low `}),pB(e.low)]}),(0,W.jsx)(`span`,{className:`hm-sheet-range`,"aria-hidden":`true`,children:(0,W.jsx)(`span`,{style:{left:`${(e.low-w)/T*100}%`,width:`${Math.max(4,(e.high-e.low)/T*100)}%`}})}),(0,W.jsxs)(`b`,{children:[(0,W.jsx)(`span`,{className:`slot-live`,children:`High `}),pB(e.high)]})]},e.date))})]}),(0,W.jsx)(`p`,{className:`hm-sheet-foot`,children:`Weather by Open-Meteo`})]})]})}var gB=6e4,_B=typeof matchMedia==`function`?matchMedia(`(max-width: 760px)`):null,vB=()=>(0,L.useSyncExternalStore)(e=>(_B?.addEventListener(`change`,e),()=>_B?.removeEventListener(`change`,e)),()=>!!_B?.matches);function yB(e){let t=ie(),n=ue();(0,L.useEffect)(()=>{e&&t.background===`image`&&re.read().catch(()=>{})},[e,t.background]);let r=t.background===`picture:peoria`?O:t.background===`earth`?T:t.background===`image`?n??null:null,i=t.background===`image`&&n===null?`field`:t.background;return{bg:i,photo:r,light:le.includes(i)}}function bB(e){let[t,n]=(0,L.useState)(()=>new Date);return(0,L.useEffect)(()=>{if(!e)return;let t,r=()=>{n(new Date),t=setTimeout(r,gB-Date.now()%gB+50)};r();let i=()=>{document.visibilityState===`visible`&&n(new Date)};return document.addEventListener(`visibilitychange`,i),()=>{clearTimeout(t),document.removeEventListener(`visibilitychange`,i)}},[e]),t}function xB(e,t,n){let r=new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`,hour12:fe(t),timeZone:n}).formatToParts(e);return{digits:r.filter(e=>e.type!==`dayPeriod`).map(e=>e.value).join(``).trim(),half:r.find(e=>e.type===`dayPeriod`)?.value??``}}var SB=(e,t,n)=>new Intl.DateTimeFormat(void 0,{hour:`numeric`,minute:`2-digit`,hour12:fe(t),timeZone:n}).format(e),CB=(e,t)=>new Intl.DateTimeFormat(`en-CA`,{year:`numeric`,month:`2-digit`,day:`2-digit`,timeZone:t}).format(e);function wB({active:e,accounts:t,accountsKnown:n,setup:r,hasCalendar:i,invitations:a,onGo:o,onNote:s,onNewNote:c}){let l=ie(),u=bB(e),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(null);(0,L.useEffect)(()=>{e||(f(!1),m(null))},[e]),(0,L.useEffect)(()=>{l.spots.length||m(null)},[l.spots.length]);let g=(0,L.useSyncExternalStore)(hz.watch,hz.get),_=vB()&&d,y=l.clock.spot?N(l,l.clock.spot):void 0,b=xB(u,l,y?.timezone),x=l.clock.date===`off`?``:new Intl.DateTimeFormat(void 0,l.clock.date===`short`?{weekday:`short`,month:`short`,day:`numeric`,timeZone:y?.timezone}:{weekday:`long`,month:`long`,day:`numeric`,timeZone:y?.timezone}).format(u);return(0,W.jsxs)(`div`,{className:`hm`,"data-editing":d||void 0,children:[(0,W.jsxs)(`div`,{className:`hm-face`,inert:_,children:[(0,W.jsxs)(`button`,{type:`button`,className:`hm-chip hm-edit-open`,onClick:()=>f(e=>!e),"aria-expanded":d,title:`Customize: the background, the clock, your places and the widgets`,children:[(0,W.jsx)(di,{size:14}),(0,W.jsx)(`span`,{children:`Customize`})]}),(0,W.jsxs)(`div`,{className:`hm-top`,children:[x&&(0,W.jsxs)(`p`,{className:`hm-date`,children:[x,y?` · ${y.label}`:``]}),(0,W.jsxs)(`p`,{className:`hm-time`,"aria-label":`${b.digits} ${b.half}`.trim(),children:[b.digits,b.half&&(0,W.jsx)(`span`,{className:`hm-half`,children:b.half})]}),!x&&y&&(0,W.jsx)(`p`,{className:`hm-date`,children:y.label}),i&&a>0&&(0,W.jsxs)(`button`,{type:`button`,className:`hm-chip hm-needs`,onClick:()=>o(`calendar`),title:`The calendar: the invitations to answer`,children:[(0,W.jsx)(`b`,{children:a>99?`99+`:a}),a===1?`invitation to answer`:`invitations to answer`]})]}),r&&(0,W.jsxs)(`div`,{className:`hm-setup`,role:`group`,"aria-label":`Finish setting up`,children:[(0,W.jsx)(`span`,{className:`hm-setup-title`,children:`Finish setting up`}),r.left.map(e=>(0,W.jsx)(`button`,{type:`button`,className:`hm-chip`,onClick:()=>r.onOpen(e.page),children:e.label},e.key)),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare hm-setup-x`,onClick:r.onHide,title:`Not now: it stays in Settings`,"aria-label":`Hide Finish setting up`,children:(0,W.jsx)(la,{size:14})})]}),(0,W.jsx)(`div`,{className:`hm-grid`,children:l.widgets.map(r=>r.widget===`unread`?(0,W.jsx)(jB,{p:r,active:e,accounts:t,known:!!n,onOpen:()=>o(`mail`)},r.key):r.widget===`events`?i?(0,W.jsx)(NB,{p:r,doc:l,now:u,active:e,onOpen:()=>o(`calendar`)},r.key):null:r.widget===`weather`?(0,W.jsx)(IB,{p:r,doc:l,active:e,onSet:()=>f(!0),onOpen:e=>{f(!1),m(e)}},r.key):r.widget===`clocks`?(0,W.jsx)(LB,{p:r,doc:l,now:u,onSet:()=>f(!0)},r.key):r.widget===`notes`?(0,W.jsx)(PB,{p:r,onOpen:s,onNew:c},r.key):null)}),h.newTab&&v&&!gz&&g===null&&(0,W.jsxs)(`div`,{className:`hm-invite`,role:`group`,"aria-label":`New tabs`,children:[(0,W.jsx)(`span`,{children:`Open Home on every new tab?`}),(0,W.jsx)(`button`,{type:`button`,className:`hm-chip`,onClick:()=>{hz.set(!0),K.show({text:`New tabs now open on Home. Customize turns it off.`,duration:6e3})},children:`Use it`}),(0,W.jsx)(`button`,{type:`button`,className:`hm-chip quiet`,onClick:()=>hz.set(!1),children:`Not now`})]})]}),p!==null&&l.spots.length>0&&(0,W.jsx)(hB,{doc:l,first:p,now:u,onClose:()=>m(null)}),d&&(0,W.jsx)(Dz,{hasCalendar:i,onClose:()=>f(!1)})]})}function TB({p:e,title:t,note:n,onOpen:r,children:i}){let a=(0,W.jsxs)(W.Fragment,{children:[i,(0,W.jsxs)(`span`,{className:`hm-tile-title`,children:[t,n?` · ${n}`:``]})]});return r?(0,W.jsx)(`button`,{type:`button`,className:`hm-tile`,"data-size":e.size,"data-widget":e.widget,onClick:r,children:a}):(0,W.jsx)(`div`,{className:`hm-tile`,"data-size":e.size,"data-widget":e.widget,children:a})}var EB=(e,t)=>e?`from ${new Date(t).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})}`:void 0,DB=({icon:e,value:t,caption:n})=>(0,W.jsxs)(`span`,{className:`hm-stat`,children:[(0,W.jsxs)(`span`,{className:`hm-stat-value`,children:[e,t]}),n&&(0,W.jsx)(`span`,{className:`hm-stat-caption`,children:n})]}),OB=({icon:e,children:t})=>(0,W.jsxs)(`span`,{className:`hm-words`,children:[e,(0,W.jsx)(`span`,{children:t})]}),kB=e=>Array.isArray(e)&&e.every(e=>e&&typeof e.account==`string`&&typeof e.n==`number`),AB=e=>{let t=e;return!!t&&typeof t==`object`&&typeof t.temp==`number`&&typeof t.code==`number`&&Array.isArray(t.hours)&&t.hours.every(e=>e&&typeof e.hour==`number`&&typeof e.temp==`number`&&typeof e.code==`number`)};function jB({p:e,active:t,accounts:n,known:r,onOpen:i}){let a=n.map(e=>e.name),{value:o,at:s,stale:c}=ae(a.length?`unread:${a.join(`,`)}`:null,async()=>{let e=await Promise.all(a.map(e=>U(`list`,{account:e,unread:!0,limit:100}).then(e=>e.items.length)));return a.map((t,n)=>({account:t,n:e[n]}))},2*gB,t,kB),l=o?.reduce((e,t)=>e+t.n,0),u=e=>e>=100?`99+`:String(e),d=(o??[]).filter(e=>e.n>0);return(0,W.jsx)(TB,{p:e,title:`Unread`,note:EB(c,s),onOpen:i,children:r&&!a.length?(0,W.jsx)(OB,{icon:(0,W.jsx)(ar,{size:16}),children:`No mail account yet.`}):l===void 0?(0,W.jsx)(`span`,{className:`hm-wait`}):l===0?(0,W.jsx)(OB,{icon:(0,W.jsx)(ar,{size:16}),children:`No unread mail.`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(DB,{icon:(0,W.jsx)(ar,{size:18}),value:o.some(e=>e.n>=100)?`${l}+`:String(l),caption:`unread`}),o.length>1&&(e.size===`medium`?(0,W.jsx)(`span`,{className:`hm-rows`,children:d.slice(0,3).map(e=>(0,W.jsxs)(`span`,{className:`hm-row`,children:[(0,W.jsx)(`span`,{className:`hm-row-title`,children:xe(e.account)}),(0,W.jsx)(`span`,{className:`hm-row-side`,children:u(e.n)})]},e.account))}):(0,W.jsx)(`span`,{className:`hm-foot`,children:d.map(e=>`${xe(e.account)} ${u(e.n)}`).join(` · `)}))]})})}var MB=e=>Array.isArray(e)&&e.every(e=>e&&typeof e.id==`string`&&typeof e.subject==`string`&&typeof e.start==`string`&&typeof e.end==`string`);function NB({p:e,doc:t,now:n,active:r,onOpen:i}){let a=e.days??1,{value:o,at:s,stale:c}=ae(`events:${a}`,async()=>{let e=new Date;return e.setHours(0,0,0,0),(await U(`events`,{start:e.toISOString(),end:new Date(e.getTime()+a*864e5).toISOString()})).items.filter(e=>!e.isCancelled&&new Date(e.end).getTime()>Date.now()).sort((e,t)=>e.start.localeCompare(t.start)).slice(0,8).map(e=>({id:e.id,subject:e.subject,start:e.start,end:e.end,allDay:e.allDay}))},5*gB,r,MB),l=o?.filter(e=>new Date(e.end).getTime()>n.getTime()),u=CB(n),d=e=>{let r=new Date(e.start),i=CB(r)!==u&&r.getTime()>n.getTime()?`${r.toLocaleDateString([],{weekday:`short`})} `:``;return e.allDay?i?i.trim():`All day`:r.getTime()<=n.getTime()?`Now`:`${i}${SB(r,t)}`},f=e.size===`medium`?3:2;return(0,W.jsx)(TB,{p:e,title:`Coming up`,note:EB(c,s)??(l&&l.length>f?`${l.length-f} more`:void 0),onOpen:i,children:l?l.length?(0,W.jsx)(`span`,{className:`hm-rows`,children:l.slice(0,f).map(e=>(0,W.jsxs)(`span`,{className:`hm-row`,children:[(0,W.jsx)(`span`,{className:`hm-row-title`,children:e.subject||`(no title)`}),(0,W.jsx)(`span`,{className:`hm-row-side`,children:d(e)})]},e.id))}):(0,W.jsx)(OB,{icon:(0,W.jsx)(nt,{size:16}),children:a===1?`Nothing ahead today.`:`Nothing ahead this week.`}):(0,W.jsx)(`span`,{className:`hm-wait`})})}function PB({p:e,onOpen:t,onNew:n}){let{list:r,error:i}=Gz(!0),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(!1),d=(0,L.useRef)(null),f=(r??[]).flatMap(e=>e.open.map(t=>({...t,note:e}))),p=(r??[]).reduce((e,t)=>e+t.todos.open,0),m=e.size===`medium`?3:2,h=f[0]?.note??r?.[0],g=(0,L.useRef)(0),_=async(e,t)=>{if(!(Date.now()-g.current<500)){g.current=Date.now();try{Vz.patch(await U(`tickNote`,{id:e,item:t,checked:!0}))}catch(e){K.error(e,`Not ticked: `),Vz.reload()}}},v=async()=>{let e=s.trim();if(e&&!l&&r){u(!0);try{let t=h?.id??(await U(`saveNote`,{title:`To do`,html:``})).id;Vz.patch(await U(`addToNote`,{id:t,todo:e})),h||Vz.reload(),c(``)}catch(e){K.error(e,`Not added: `)}finally{u(!1)}}},y=()=>{o(!1),c(``),requestAnimationFrame(()=>d.current?.focus())};return(0,W.jsxs)(`div`,{className:`hm-tile`,"data-size":e.size,"data-widget":`notes`,children:[r?f.length?(0,W.jsx)(`span`,{className:`hm-rows`,children:f.slice(0,m).map(e=>(0,W.jsxs)(`span`,{className:`hm-row hm-todo`,children:[(0,W.jsx)(`button`,{type:`button`,className:`hm-check`,onClick:()=>_(e.note.id,e.id),title:`Done`,"aria-label":`Done: ${e.text}`,children:(0,W.jsx)(V,{size:11})}),(0,W.jsx)(`button`,{type:`button`,className:`hm-row-title hm-todo-text`,onClick:()=>t(e.note.id),title:`${e.text} · in ${Yz(e.note)}`,children:e.text})]},`${e.note.id}:${e.id}`))}):r.length?(0,W.jsx)(`span`,{className:`hm-rows`,children:r.slice(0,m).map(e=>(0,W.jsx)(`button`,{type:`button`,className:`hm-row hm-note`,onClick:()=>t(e.id),children:(0,W.jsx)(`span`,{className:`hm-row-title`,children:Yz(e)})},e.id))}):(0,W.jsx)(OB,{icon:(0,W.jsx)(_r,{size:16}),children:`No notes yet.`}):i?(0,W.jsx)(OB,{icon:(0,W.jsx)(_r,{size:16}),children:`The notes could not be read.`}):(0,W.jsx)(`span`,{className:`hm-wait`}),a?(0,W.jsx)(`span`,{className:`hm-add`,children:(0,W.jsx)(`input`,{autoFocus:!0,type:`text`,value:s,readOnly:l,maxLength:300,placeholder:h?`A to-do, in ${Yz(h)}`:`A to-do`,"aria-label":`A new to-do`,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Escape`?(e.preventDefault(),e.stopPropagation(),y()):e.key===`Enter`&&!e.nativeEvent.isComposing&&(e.preventDefault(),v())},onBlur:()=>{s.trim()||o(!1)}})}):(0,W.jsxs)(`span`,{className:`hm-tile-title hm-notes-foot`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`hm-notes-open`,onClick:()=>t(),title:`The notes`,children:[`Notes`,p?` · ${p} to do${p>m&&e.size!==`small`?`, ${p-Math.min(m,f.length)} more`:``}`:``]}),(0,W.jsx)(`button`,{type:`button`,className:`hm-plus`,onClick:n,title:`A new note (n)`,"aria-label":`New note`,children:(0,W.jsx)(_r,{size:12})}),(0,W.jsx)(`button`,{ref:d,type:`button`,className:`hm-plus`,onClick:()=>o(!0),disabled:!r,title:`Add a to-do`,"aria-label":`Add a to-do`,children:(0,W.jsx)(Lr,{size:13})})]})]})}function FB({points:e}){if(e.length<2)return null;let t=Math.min(...e),n=Math.max(...e)-t||1,r=e.map((r,i)=>`${(i/(e.length-1)*100).toFixed(1)},${(21-(r-t)/n*18).toFixed(1)}`);return(0,W.jsxs)(`svg`,{className:`hm-spark`,viewBox:`0 0 100 24`,preserveAspectRatio:`none`,"aria-hidden":`true`,children:[(0,W.jsx)(`polygon`,{points:`0,24 ${r.join(` `)} 100,24`,fill:`currentColor`,opacity:`0.14`}),(0,W.jsx)(`polyline`,{points:r.join(` `),fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,vectorEffect:`non-scaling-stroke`,strokeLinejoin:`round`})]})}function IB({p:e,doc:t,active:n,onSet:r,onOpen:i}){let a=N(t,e.spot),o=me(t),{value:s,at:c,stale:l}=ae(a?`weather:${a.latitude.toFixed(2)},${a.longitude.toFixed(2)}:${o}`:null,()=>yz(a,o),10*gB,n,AB);if(!a)return(0,W.jsx)(TB,{p:e,title:`Weather`,onOpen:r,children:(0,W.jsx)(OB,{icon:(0,W.jsx)(sr,{size:16}),children:`Add a place to see its weather.`})});let u=e=>`${Math.round(e)}°`,d=e=>new Intl.DateTimeFormat(void 0,{hour:`numeric`,hour12:fe(t)}).format(new Date(2e3,0,1,e));return(0,W.jsx)(TB,{p:e,title:`Weather`,note:EB(l,c),onOpen:()=>i(a.label),children:s?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(DB,{icon:(0,W.jsx)(cB,{kind:wz(s.code).kind,day:s.day}),value:`${Math.round(s.temp)}°${o.toUpperCase()}`,caption:`${wz(s.code).text} · ${a.label}`}),e.size===`medium`?(0,W.jsx)(`span`,{className:`hm-strip`,children:s.hours.filter((e,t)=>t%2==1).slice(0,5).map(e=>(0,W.jsxs)(`span`,{className:`hm-strip-item`,children:[(0,W.jsx)(`span`,{children:d(e.hour)}),(0,W.jsx)(cB,{kind:wz(e.code).kind,day:e.day,size:15}),(0,W.jsx)(`b`,{children:u(e.temp)})]},e.hour))}):(0,W.jsx)(FB,{points:s.hours.map(e=>e.temp)})]}):(0,W.jsx)(`span`,{className:`hm-wait`})})}function LB({p:e,doc:t,now:n,onSet:r}){if(!t.spots.length)return(0,W.jsx)(TB,{p:e,title:`World clock`,onOpen:r,children:(0,W.jsx)(OB,{icon:(0,W.jsx)(sr,{size:16}),children:`Add a place to see its time.`})});let i=CB(n),a=e=>{let t=CB(n,e.timezone);return t>i?`Tomorrow`:t<i?`Yesterday`:``};return(0,W.jsx)(TB,{p:e,title:`World clock`,children:e.size===`medium`?(0,W.jsx)(`span`,{className:`hm-strip clocks`,children:t.spots.slice(0,4).map(e=>(0,W.jsxs)(`span`,{className:`hm-strip-item`,children:[(0,W.jsx)(`span`,{children:e.label}),(0,W.jsx)(`b`,{children:SB(n,t,e.timezone)}),(0,W.jsx)(`small`,{children:a(e)||`Today`})]},e.label))}):(0,W.jsx)(`span`,{className:`hm-rows`,children:t.spots.slice(0,3).map(e=>(0,W.jsxs)(`span`,{className:`hm-row`,children:[(0,W.jsxs)(`span`,{className:`hm-row-title`,children:[e.label,a(e)&&(0,W.jsx)(`small`,{children:a(e)})]}),(0,W.jsx)(`span`,{className:`hm-row-side`,children:SB(n,t,e.timezone)})]},e.label))})})}var RB={mail:`mail`,contacts:`Exchange`,google:`Google`,directory:`directory`},zB=e=>e instanceof Error?e.message:String(e),BB=[[`all`,`Everyone`],[`saved`,`Contacts`],[`mail`,`From mail`]],VB=e=>e.name||e.email||e.phones?.[0]?.number||`Someone`,HB=e=>{let t=VB(e).normalize(`NFD`).replace(/[̀-ͯ]/g,``).charAt(0).toUpperCase();return/[A-Z]/.test(t)?t:`#`},UB=(e,t)=>VB(e).localeCompare(VB(t),void 0,{sensitivity:`base`}),WB=e=>{let t=e.replace(/(Phone|Address)\d*$/,``).replace(/([a-z])([A-Z])/g,`$1 $2`).trim();return t?t.charAt(0).toUpperCase()+t.slice(1).toLowerCase():``};function GB({active:e,showAccount:t,onOpenMail:n,onWrite:r,onRule:i}){let[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(`all`),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)([]),[p,m]=(0,L.useState)(null),[h,g]=(0,L.useState)(!1),[_,v]=(0,L.useState)(null),y=(0,L.useRef)(0),b=(0,L.useRef)(null),x=(0,L.useRef)(null),S=(0,L.useRef)(null),C=e=>{S.current={key:e.key,top:x.current?.scrollTop??0},v(e)},w=(0,L.useCallback)(()=>{v(null),requestAnimationFrame(()=>{let e=S.current;x.current&&e&&(x.current.scrollTop=e.top),((e&&[...x.current?.querySelectorAll(`.pb-row`)??[]].find(t=>t.dataset.key===e.key))??b.current)?.focus({preventScroll:!0})})},[]),T=(0,L.useCallback)(e=>{let t=++y.current;g(!0);let n=!1;e||qs(`people:all`).then(e=>{e&&!n&&t===y.current&&u(e)}),U(`people`,e?{q:e}:{all:!0}).then(r=>{n=!0,t===y.current&&(!e&&!r.failed?.length&&Js(`people:all`,r.people),u(r.people),f(r.failed??[]),m(null))},n=>{t===y.current&&(e&&u(null),m(zB(n)))}).finally(()=>{t===y.current&&g(!1)})},[]);(0,L.useEffect)(()=>{if(!e)return;y.current++;let t=setTimeout(()=>T(a.trim()),a?300:0);return()=>clearTimeout(t)},[a,e,T]),(0,L.useEffect)(()=>{if(!_||!e)return;let t=e=>{e.key===`Escape`&&!e.defaultPrevented&&!DI.isOpen()&&(e.preventDefault(),w())};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[_,e,w]);let E=(0,L.useMemo)(()=>(l??[]).filter(e=>s===`all`||(s===`saved`?e.saved:e.sources.includes(`mail`))),[l,s]),D=(0,L.useMemo)(()=>{if(a.trim())return[{title:``,rows:E}];let e=[],t=E.filter(e=>e.starred).sort(UB);t.length&&e.push({title:`Favourites`,rows:t});let n=E.filter(e=>e.n>0&&!e.starred).sort((e,t)=>t.n-e.n).slice(0,8);n.length&&s!==`saved`&&e.push({title:`Frequent`,rows:n});let r=new Map;for(let e of[...E].sort(UB)){let t=HB(e),n=r.get(t);n?n.push(e):r.set(t,[e])}for(let[t,n]of[...r].sort(([e],[t])=>e===`#`?1:t===`#`?-1:e.localeCompare(t)))e.push({title:t,rows:n});return e},[E,a,s]),O=(l??[]).filter(e=>e.saved).length;return(0,W.jsxs)(`section`,{className:`view people pb${_?` pb-open`:``}`,children:[(0,W.jsxs)(`div`,{className:`pb-side`,children:[(0,W.jsxs)(`header`,{className:`top pb-top`,children:[(0,W.jsxs)(`div`,{className:`top-row`,children:[(0,W.jsx)(`h1`,{className:`people-title`,children:`People`}),l&&!a&&(0,W.jsx)(`span`,{className:`pb-count`,children:O?`${O} contacts`:`${l.length} people`}),h&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Loading`})]}),(0,W.jsxs)(`div`,{className:`searchbox`,children:[(0,W.jsx)(ti,{size:15}),(0,W.jsx)(`input`,{ref:b,type:`text`,placeholder:`A name, an address, a phone, a company`,value:a,onChange:e=>o(e.target.value),autoComplete:`off`,spellCheck:!1,"aria-label":`Search people`,onKeyDown:e=>{e.key===`Escape`&&a&&(e.stopPropagation(),o(``))}}),a&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>o(``),title:`Clear the search`,"aria-label":`Clear the search`,children:(0,W.jsx)(la,{size:14})})]}),(0,W.jsx)(`div`,{className:`pb-filters`,role:`group`,"aria-label":`Who is shown`,children:BB.map(([e,t])=>(0,W.jsx)(`button`,{type:`button`,className:`pb-filter`,"aria-pressed":s===e,onClick:()=>c(e),children:t},e))})]}),(0,W.jsxs)(`div`,{ref:x,className:`list pb-list`,children:[p&&l&&(0,W.jsxs)(`p`,{className:`set-note pb-partly`,children:[`Not up to date: `,p]}),p&&!l?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(`p`,{children:p}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>T(a.trim()),children:`Try again`})]}):l?E.length?D.map(e=>(0,W.jsxs)(`div`,{className:`pb-section`,role:`group`,"aria-label":e.title||`Found`,children:[e.title&&(0,W.jsxs)(`h2`,{className:`group pb-letter`,children:[e.title===`Favourites`&&(0,W.jsx)(Ti,{size:11}),e.title]}),(0,W.jsx)(`ul`,{className:`pb-rows`,children:e.rows.map(t=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`pb-row`,"data-key":t.key,"aria-current":_?.key===t.key?`true`:void 0,onClick:()=>C(t),children:[(0,W.jsx)(ao,{name:VB(t),email:t.email,size:34,picture:!!t.email}),(0,W.jsxs)(`span`,{className:`pb-row-main`,children:[(0,W.jsxs)(`span`,{className:`pb-row-name`,children:[VB(t),t.starred&&e.title!==`Favourites`&&(0,W.jsx)(Ti,{size:11,className:`pb-star`,"aria-label":`Favourite`})]}),(0,W.jsx)(`span`,{className:`pb-row-sub`,children:[t.title,t.company].filter(Boolean).join(` · `)||(t.name?t.email||t.phones?.[0]?.number:``)||(t.sources.includes(`directory`)?`directory`:``)})]})]})},`${e.title}:${t.key}`))})]},e.title||`found`)):(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(`p`,{children:d.length?`Nobody found, but not everything could be read: ${d.join(`; `)}`:a?`Nobody by that name in your mail, contacts or directory.`:s===`saved`?`No contacts: connect Google in Settings, Accounts, to bring yours here.`:`Nobody yet: the people you write with show here.`}),d.length>0&&(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>T(a.trim()),children:`Try again`})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})}),d.length>0&&E.length>0&&(0,W.jsxs)(`p`,{className:`set-note pb-partly`,children:[`Not everything could be read: `,d.join(`; `)]})]})]}),(0,W.jsx)(`div`,{className:`pb-main`,children:_?(0,W.jsx)(JB,{p:_,showAccount:t,onBack:w,onOpenMail:n,onWrite:r,onRule:i},_.key):(0,W.jsxs)(`div`,{className:`pb-none`,children:[(0,W.jsx)(Zi,{size:28,strokeWidth:1.5}),(0,W.jsx)(`p`,{children:l?`Choose someone to see all that is known of them, and your mail with them.`:``})]})})]})}function KB(e,t){let n=/^(\d{4}|-)-(\d{2})-(\d{2})$/.exec(e);if(!n)return{text:e,soon:``};let r=n[1]===`-`?null:Number(n[1]),i=Number(n[2])-1,a=Number(n[3]),o=new Date(r??2e3,i,a).toLocaleDateString(void 0,{day:`numeric`,month:`long`,...r?{year:`numeric`}:{}}),s=new Date,c=new Date(s.getFullYear(),s.getMonth(),s.getDate()),l=new Date(c.getFullYear(),i,a);l<c&&(l=new Date(c.getFullYear()+1,i,a));let u=Math.round((l.getTime()-c.getTime())/864e5),d=t&&r?l.getFullYear()-r:null;return{text:o,soon:u===0?d?`today, turns ${d}`:`today`:u<=30?`in ${u} day${u>1?`s`:``}${d?`, turns ${d}`:``}`:d?`${d-1} years old`:``}}function qB({icon:e,label:t,children:n}){return(0,W.jsxs)(`div`,{className:`pb-field`,role:`group`,"aria-label":t,children:[(0,W.jsx)(`span`,{className:`pb-field-icon`,"aria-hidden":`true`,children:e}),(0,W.jsx)(`div`,{className:`pb-field-body`,children:n})]})}function JB({p:e,showAccount:t,onBack:n,onOpenMail:r,onWrite:i,onRule:a}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(null),u=(0,L.useRef)(null);(0,L.useEffect)(()=>{u.current?.focus({preventScroll:!0})},[]),(0,L.useEffect)(()=>{let t=!0,n=!1,r=!1;return qs(`person:${e.key}`).then(e=>{e&&t&&!n&&(r=!0,s(e))}),e.email&&U(`person`,{key:e.key,quick:!0,emails:e.emails}).then(i=>{i.quick&&i.mail.length&&t&&!n&&!r&&s({person:e,mail:i.mail})},()=>{}),U(`person`,{key:e.key}).then(r=>{n=!0,Js(`person:${e.key}`,{person:r.person,mail:r.mail}),t&&s(r)},e=>{t&&l(zB(e))}),()=>{t=!1}},[e.key]);let d=o?.person,f=d?{...e,...Object.fromEntries(Object.entries(d).filter(([,e])=>e!==``&&e!==void 0&&!(Array.isArray(e)&&!e.length))),sources:[...new Set([...e.sources,...d.sources])]}:e,p=VB(f),m=f.name?f.name.split(` `)[0]:`them`,h=[f.email,...f.emails??[]].filter(Boolean),g=f.phones?.[0]?.number,_=e=>e.replace(/[^\d+]/g,``),v=async(e,t)=>{await _I(e)&&K.show({kind:`ok`,text:`${t} copied`})},y=f.birthday?KB(f.birthday,!0):null;return(0,W.jsxs)(`article`,{className:`pb-person`,children:[(0,W.jsxs)(`header`,{className:`thread-head pb-head`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon pb-back`,onClick:n,title:`Back to the people (Esc)`,"aria-label":`Back`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`h1`,{children:p})]}),(0,W.jsxs)(`div`,{className:`thread-scroll pb-scroll${f.email?``:` solo`}`,children:[(0,W.jsxs)(`div`,{className:`pb-profile`,children:[(0,W.jsxs)(`div`,{className:`pb-hero`,children:[(0,W.jsx)(ao,{name:p,email:f.email,size:88,picture:!!f.email}),(0,W.jsxs)(`h2`,{ref:u,tabIndex:-1,className:`pb-name`,children:[p,f.starred&&(0,W.jsx)(Ti,{size:15,className:`pb-star`,"aria-label":`Favourite`})]}),f.nickname&&(0,W.jsxs)(`p`,{className:`pb-nick`,children:[`“`,f.nickname,`”`]}),(f.title||f.company||f.department)&&(0,W.jsxs)(`p`,{className:`pb-org`,children:[(0,W.jsx)(Qe,{size:13}),` `,[f.title,f.department,f.company].filter(Boolean).join(` · `)]}),f.groups?.length?(0,W.jsx)(`div`,{className:`pb-groups`,children:f.groups.map(e=>(0,W.jsx)(`span`,{className:`pb-chip`,children:e},e))}):null,(0,W.jsxs)(`div`,{className:`pb-actions`,children:[f.email&&(0,W.jsxs)(`button`,{type:`button`,className:`pb-act`,onClick:()=>i(f.email),children:[(0,W.jsx)(`span`,{children:(0,W.jsx)(xi,{size:17})}),`Write`]}),g&&(0,W.jsxs)(`a`,{className:`pb-act`,href:`tel:${_(g)}`,children:[(0,W.jsx)(`span`,{children:(0,W.jsx)(kr,{size:17})}),`Call`]}),g&&(0,W.jsxs)(`a`,{className:`pb-act`,href:`sms:${_(g)}`,children:[(0,W.jsx)(`span`,{children:(0,W.jsx)(dr,{size:17})}),`Message`]}),f.email&&(0,W.jsxs)(`button`,{type:`button`,className:`pb-act`,onClick:()=>a(f),children:[(0,W.jsx)(`span`,{children:(0,W.jsx)(He,{size:17})}),`Alert me`]}),f.google&&(0,W.jsxs)(`a`,{className:`pb-act`,href:f.google.url,target:`_blank`,rel:`noreferrer noopener`,title:`Change them in Google Contacts`,children:[(0,W.jsx)(`span`,{children:(0,W.jsx)($t,{size:17})}),`Edit`]})]})]}),(0,W.jsxs)(`div`,{className:`pb-fields`,children:[h.length>0&&(0,W.jsx)(qB,{icon:(0,W.jsx)(ar,{size:15}),label:`Email`,children:h.map(e=>(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`button`,{type:`button`,className:`pb-link`,onClick:()=>i(e),title:`Write to ${e}`,children:e}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare pb-copy`,onClick:()=>v(e,`Address`),title:`Copy the address`,"aria-label":`Copy ${e}`,children:(0,W.jsx)(Ut,{size:13})})]},e))}),f.phones?.length?(0,W.jsx)(qB,{icon:(0,W.jsx)(kr,{size:15}),label:`Phone`,children:f.phones.map((e,t)=>(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`a`,{className:`pb-link`,href:`tel:${_(e.number)}`,children:e.number}),WB(e.kind)&&(0,W.jsx)(`span`,{className:`pb-kind`,children:WB(e.kind)}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare pb-copy`,onClick:()=>v(e.number,`Number`),title:`Copy the number`,"aria-label":`Copy ${e.number}`,children:(0,W.jsx)(Ut,{size:13})})]},`${t}:${e.number}`))}):null,f.addresses?.length?(0,W.jsx)(qB,{icon:(0,W.jsx)(sr,{size:15}),label:`Address`,children:f.addresses.map((e,t)=>(0,W.jsxs)(`div`,{className:`pb-line pb-stack`,children:[WB(e.kind)&&(0,W.jsx)(`span`,{className:`pb-kind`,children:WB(e.kind)}),(0,W.jsx)(`a`,{className:`pb-link pb-address`,href:`https://maps.apple.com/?q=${encodeURIComponent(e.text.replace(/\n/g,`, `))}`,target:`_blank`,rel:`noreferrer noopener`,title:`Show on a map`,children:e.text})]},t))}):null,(y||f.dates?.length)&&(0,W.jsxs)(qB,{icon:(0,W.jsx)(et,{size:15}),label:`Dates`,children:[y&&(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`span`,{children:y.text}),(0,W.jsx)(`span`,{className:`pb-kind`,children:`Birthday`}),y.soon&&(0,W.jsx)(`span`,{className:`pb-soon`,children:y.soon})]}),f.dates?.map((e,t)=>{let n=KB(e.date,!1);return(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`span`,{children:n.text}),WB(e.kind)&&(0,W.jsx)(`span`,{className:`pb-kind`,children:WB(e.kind)}),n.soon&&(0,W.jsx)(`span`,{className:`pb-soon`,children:n.soon})]},t)})]}),f.relations?.length?(0,W.jsx)(qB,{icon:(0,W.jsx)(Zi,{size:15}),label:`Relations`,children:f.relations.map((e,t)=>(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`span`,{children:e.name}),WB(e.kind)&&(0,W.jsx)(`span`,{className:`pb-kind`,children:WB(e.kind)})]},t))}):null,f.urls?.length?(0,W.jsx)(qB,{icon:(0,W.jsx)(bn,{size:15}),label:`Links`,children:f.urls.map((e,t)=>(0,W.jsxs)(`div`,{className:`pb-line`,children:[(0,W.jsx)(`a`,{className:`pb-link`,href:e.url,target:`_blank`,rel:`noreferrer noopener`,children:e.url.replace(/^https?:\/\/(www\.)?/i,``).replace(/\/$/,``)}),WB(e.kind)&&(0,W.jsx)(`span`,{className:`pb-kind`,children:WB(e.kind)})]},t))}):null,f.note&&(0,W.jsx)(qB,{icon:(0,W.jsx)(yr,{size:15}),label:`Note`,children:(0,W.jsx)(`p`,{className:`pb-note`,children:f.note})}),(0,W.jsxs)(`p`,{className:`pb-src`,children:[`From `,f.sources.map(e=>RB[e]).join(`, `),f.google&&t?` (${xe(f.google.account)})`:``]})]})]}),f.email?(0,W.jsxs)(`div`,{className:`pb-log`,children:[(0,W.jsxs)(`h2`,{className:`person-h`,children:[`Mail with `,m]}),c?(0,W.jsxs)(`p`,{className:`set-note`,children:[`The mail could not be read: `,c]}):o?o.mail.length?(0,W.jsx)(`ul`,{className:`day-list`,children:o.mail.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsx)(`button`,{type:`button`,className:`day-mail${e.isRead||e.folder===`sent`?``:` unread`}`,onClick:()=>r(e),children:(0,W.jsxs)(`span`,{className:`day-mail-main`,children:[(0,W.jsxs)(`span`,{className:`day-mail-l1`,children:[(0,W.jsx)(`span`,{className:`day-mail-who`,children:e.folder===`sent`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`to-label`,children:`You`}),` to `,e.displayTo||f.name||f.email]}):e.fromName||e.fromEmail}),t&&(0,W.jsx)(`span`,{className:`tag`,children:xe(e.account)}),(0,W.jsx)(`time`,{className:`time`,dateTime:e.received,children:pa(e.received)})]}),(0,W.jsx)(`span`,{className:`day-mail-subject`,children:e.subject||`(no subject)`}),e.preview&&(0,W.jsx)(`span`,{className:`day-mail-snippet`,children:e.preview})]})})},e.id))}):(0,W.jsx)(`p`,{className:`day-none`,children:`No mail with them in reach.`}):(0,W.jsxs)(`p`,{className:`day-none`,children:[(0,W.jsx)(H,{size:14,className:`spin`}),` Reading the mail…`]}),o?.failed?.length?(0,W.jsxs)(`p`,{className:`set-note`,children:[`Not read: `,o.failed.join(`; `)]}):null]}):c?(0,W.jsxs)(`p`,{className:`set-note`,children:[`Not all of them could be read: `,c]}):null]})]})}var YB=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`),XB=(e,t)=>`<li data-type="taskItem" data-checked="false" data-id="${YB(e)}"><label><input type="checkbox"><span></span></label><div><p>${YB(t)}</p></div></li>`;function ZB(e,t){if(t.kind===`append`)return e.replace(/(<p><\/p>)+$/,``)+t.html;let n=new DOMParser().parseFromString(`<body>${e}</body>`,`text/html`).body,r=[...n.querySelectorAll(`li[data-type="taskItem"]`)];if(t.kind===`tick`){let i=r.find(e=>e.getAttribute(`data-id`)===t.item);if(!i)return e;i.setAttribute(`data-checked`,String(t.checked));let a=i.querySelector(`:scope > label > input[type="checkbox"]`);return a&&(t.checked?a.setAttribute(`checked`,`checked`):a.removeAttribute(`checked`)),n.innerHTML}if(r.some(e=>e.getAttribute(`data-id`)===t.item))return e;let i=n.lastElementChild;for(;i&&i.tagName===`P`&&!i.textContent&&!i.children.length;){let e=i;i=i.previousElementSibling,e.remove()}return i?.matches(`ul[data-type="taskList"]`)?i.insertAdjacentHTML(`beforeend`,XB(t.item,t.text)):n.insertAdjacentHTML(`beforeend`,`<ul data-type="taskList">${XB(t.item,t.text)}</ul>`),n.innerHTML}var QB=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`],$B=QB.join(`,`),eV=8388608,tV=2e4,nV=/^[0-9a-f]{32}$/,rV=12,iV=new Map;function aV(){let e=[...iV].filter(([,e])=>e.users<=0).sort((e,t)=>e[1].at-t[1].at);for(let[t,n]of e.slice(0,Math.max(0,e.length-rV)))iV.delete(t),n.url.then(e=>URL.revokeObjectURL(e),()=>{})}var oV=new Map,sV=4,cV=0,lV=[];function uV(e){return new Promise((t,n)=>{let r=()=>{cV++,e().then(t,n).finally(()=>{cV--,lV.shift()?.()})};cV<sV?r():lV.push(r)})}var dV=new Set,fV=!1;function pV(){fV||(fV=!0,te(e=>{if(e.push===`bridge`&&e.state.connected)for(let e of[...dV])e()}))}var mV={url(e){if(!nV.test(e))return Promise.reject(Error(`that picture is no longer there`));let t=iV.get(e);if(!t){let n=U(`notePicture`,{id:e}).then(e=>{let t=QB.includes(e.contentType)?e.contentType:`application/octet-stream`;return URL.createObjectURL(new Blob([Uint8Array.from(atob(e.data),e=>e.charCodeAt(0))],{type:t}))});t={url:n,users:0,at:Date.now()},iV.set(e,t),n.catch(()=>{iV.get(e)?.url===n&&iV.delete(e)})}return t.users++,t.at=Date.now(),t.url},release(e,t=!1){let n=iV.get(e);n&&(n.users--,t&&(iV.delete(e),n.url.then(e=>URL.revokeObjectURL(e),()=>{})),aV())},bring(e){let t=oV.get(e);return t||(t=uV(async()=>{let t=/^data:(image\/(?:png|jpeg|gif|webp));base64,/i.exec(e);if(t){if(e.length>11185010.666666666)throw Error(`That picture is more than ${Math.round(eV/1024/1024)} MB.`);let n=await(await fetch(e)).blob();return hV(new File([n],`pasted`,{type:t[1].toLowerCase()}))}if(!/^https:\/\//i.test(e))throw Error(`not a picture that can be brought in`);return(await U(`fetchNotePicture`,{url:e})).id}),oV.set(e,t),t.catch(t=>{oV.delete(e),/^data:/i.test(e)&&K.error(t,`A pasted picture was not added: `)}),oV.size>200&&oV.delete(oV.keys().next().value)),t},refused(e){K.show({kind:`error`,duration:7e3,text:e})},onRetry(e){return pV(),dV.add(e),()=>{dV.delete(e)}}};async function hV(e){if(!QB.includes(e.type))throw Error(`A note holds PNG, JPEG, GIF or WebP pictures.`);if(e.size>8388608)throw Error(`That picture is more than ${Math.round(eV/1024/1024)} MB.`);let t=await e.arrayBuffer(),n=await createImageBitmap(new Blob([t],{type:e.type})).catch(()=>null);if(!n)throw Error(`That file is not a picture that can be shown.`);let{width:r,height:i}=n;if(n.close(),r>tV||i>tV)throw Error(`That picture is too large to show.`);let a=await U(`addNotePicture`,{data:await ZN(e)});return iV.has(a.id)||(iV.set(a.id,{url:Promise.resolve(URL.createObjectURL(new Blob([t],{type:a.contentType}))),users:0,at:Date.now()}),aV()),a.id}var gV=e=>e instanceof Error?e.message:String(e),_V=800,vV=e=>e.replace(/(<p><\/p>)+$/,``),yV=e=>e.replace(/[\x00-\x1f\x7f\u2028\u2029]+/g,` `).replace(/\s+/g,` `).trim().slice(0,200);function bV({active:e,wide:t,open:n,fresh:r,onNew:i,onOpen:a,onOpenMail:o}){let{list:s,error:c}=Gz(!0),l=sB(),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)(null),m=u.trim();(0,L.useEffect)(()=>{if(!m){p(null);return}let e=!0,t=setTimeout(()=>{U(`notes`,{q:m}).then(t=>{e&&p({q:m,rows:t.notes})},()=>{e&&p({q:m,rows:[]})})},200);return()=>{e=!1,clearTimeout(t)}},[m,s]);let h=!!m&&f?.q!==m,g=m?f?.rows??[]:s??[];(0,L.useEffect)(()=>{if(!n||!e)return;let t=e=>{e.key!==`Escape`||e.defaultPrevented||e.isComposing||DI.isOpen()||document.querySelector(`dialog:modal, [popover]:popover-open`)||(e.preventDefault(),a(void 0))};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)},[n,e,a]);let _=(0,W.jsxs)(`section`,{className:`view notes-list`,hidden:!t&&!!n,children:[(0,W.jsxs)(`header`,{className:`top`,children:[(0,W.jsxs)(`div`,{className:`top-row`,children:[(0,W.jsx)(`h1`,{className:`people-title`,children:`Notes`}),h&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Searching`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary compose`,onClick:i,title:`A new note (n)`,"aria-label":`New note`,children:[(0,W.jsx)(Lr,{size:15}),(0,W.jsx)(`span`,{children:`New`})]})]}),(0,W.jsxs)(`div`,{className:`searchbox`,children:[(0,W.jsx)(ti,{size:15}),(0,W.jsx)(`input`,{type:`text`,placeholder:`Search the notes`,value:u,onChange:e=>d(e.target.value),autoComplete:`off`,spellCheck:!1,"aria-label":`Search the notes`,onKeyDown:e=>{e.key===`Escape`&&u&&(e.stopPropagation(),d(``))}}),u&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>d(``),title:`Clear the search`,"aria-label":`Clear the search`,children:(0,W.jsx)(la,{size:14})})]})]}),(0,W.jsxs)(`div`,{className:`list`,children:[c&&s&&(0,W.jsxs)(`p`,{className:`set-note note-stale`,children:[`Not up to date: the notes could not be read (`,c,`). `,(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>Vz.reload(),children:`Try again`})]}),c&&!s?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsxs)(`p`,{children:[`The notes could not be read: `,c]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>Vz.reload(),children:`Try again`})]}):!s||h&&!f?(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})}):g.length?(0,W.jsx)(`ul`,{className:`convs`,children:g.map(e=>(0,W.jsx)(`li`,{className:`conv note-row${e.id===n?` selected`:``}`,tabIndex:0,"aria-current":e.id===n?`true`:void 0,onClick:()=>a(e.id),onKeyDown:t=>{t.key===`Enter`&&a(e.id)},children:(0,W.jsxs)(`div`,{className:`conv-main`,children:[(0,W.jsxs)(`div`,{className:`conv-l1`,children:[e.pinned&&(0,W.jsx)(Nr,{size:12,className:`note-pin`,"aria-label":`Pinned`}),(0,W.jsx)(`span`,{className:`names note-name`,children:Yz(e)}),l.includes(e.id)&&e.id!==n&&(0,W.jsx)(`span`,{className:`tag draft`,title:`What you wrote last in it is kept here and is not saved yet: open it`,children:`Not saved`}),e.todos.open+e.todos.done>0&&(0,W.jsxs)(`span`,{className:`tag note-todos`,title:`${e.todos.done} of ${e.todos.open+e.todos.done} to-dos done`,children:[(0,W.jsx)(Jn,{size:11}),` `,e.todos.done,`/`,e.todos.open+e.todos.done]}),e.links.length>0&&(0,W.jsx)(ar,{size:12,className:`dim`,"aria-label":`About a mail`}),(0,W.jsx)(`time`,{className:`time`,dateTime:e.updated,children:pa(e.updated)})]}),(0,W.jsx)(`div`,{className:`preview`,children:e.title?e.excerpt||`Nothing written yet`:e.excerpt.slice(60)||(e.excerpt?``:`Nothing written yet`)})]})},e.id))}):(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(`p`,{children:m?`No note says that.`:`No notes yet. Start one here, or from a mail: its Note button.`}),!m&&(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:i,children:[(0,W.jsx)(Lr,{size:14}),` A new note`]})]})]})]});return(0,W.jsxs)(`div`,{className:`notes${t?` two`:``}`,children:[_,n?(0,W.jsx)(SV,{id:n,wide:t,startInTitle:r===n,onBack:()=>a(void 0),onOpenMail:o},n):t&&(0,W.jsx)(`section`,{className:`view note-none`,children:(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(`p`,{children:s?.length?`Pick a note, or start a new one.`:`A note holds text, lists and to-dos, and can be about a mail.`})})})]})}var xV=new Map;function SV({id:e,wide:t,startInTitle:n,focus:r,onBack:i,onOpenMail:a,pane:o}){let s=(0,L.useRef)(null),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(``),[m,h]=(0,L.useState)([]),[g,_]=(0,L.useState)(!1),[v,y]=(0,L.useState)(`saved`),[b,x]=(0,L.useState)(null),S=(0,L.useRef)(null),[C,w]=(0,L.useState)(!1),T=(0,L.useRef)({rev:0,dirty:!1,title:``,html:``,clean:null,cleanTitle:``,check:!1,held:!1,gone:!1,unchecked:!1,left:!1,loaded:!1,owner:``,release:()=>{},running:null,again:!1,timer:void 0}),E=(0,L.useCallback)(()=>{let e=T.current;S.current&&(e.html=S.current.html(),e.clean=vV(e.html)),e.cleanTitle=e.title,e.dirty=!1},[]),D=(0,L.useCallback)(()=>{let t=T.current;return t.loaded?t.dirty||t.held?oB.set(e,{owner:t.owner,rev:t.rev,title:t.title,html:t.html}):(oB.remove(e,t.owner),!0):!0},[e]),O=(0,L.useCallback)(e=>{let t=T.current;Wz.set(e),t.rev=e.rev,t.title=e.title,t.html=e.html,t.cleanTitle=e.title,t.clean=null,t.dirty=!1,t.held=!1,p(e.title),h(e.links),_(e.pinned);let n=!!document.activeElement?.closest(`.note .rich`);l(t=>({html:e.html,n:(t?.n??0)+1,focus:n}))},[]),k=(0,L.useCallback)(()=>{let t=T.current;return t.gone?Promise.resolve():t.running?(t.again=!0,t.running):(clearTimeout(t.timer),t.running=Promise.resolve().then(async()=>{let n=!1;try{do{if(t.again=!1,t.check){t.check=!1,n=!0;let r=await U(`noteChanges`,{id:e,since:t.rev});if(n=!1,t.unchecked&&(t.unchecked=!1,w(!1)),r.ops){if(r.ops.length){if(!t.left&&S.current){for(let e of r.ops)S.current.applyOp(e);t.dirty?(t.html=S.current.html(),t.clean=null):E()}else t.html=r.ops.reduce(ZB,t.html),t.left||(t.clean=null,l(e=>e&&{html:t.html,n:e.n+1,focus:e.focus}))}if(t.rev=r.rev,h(r.links),_(r.pinned),r.ops.length)Wz.drop(e);else{let t=Wz.peek(e);t&&t.rev===r.rev&&(t.pinned!==r.pinned||JSON.stringify(t.links)!==JSON.stringify(r.links))&&Wz.set({...t,links:r.links,pinned:r.pinned})}}else if(r.note.rev!==t.rev){if(t.dirty){t.held=!0,x(r.note);break}t.left||O(r.note)}}if(t.dirty&&!t.held&&t.clean!==null&&vV(!t.left&&S.current?.html()||t.html)===t.clean&&t.title===t.cleanTitle&&(t.dirty=!1),t.dirty&&!t.held){y(`saving`);let n={title:t.title,html:!t.left&&S.current?.html()||t.html};try{let r=await U(`saveNote`,{id:e,rev:t.rev,...n});Wz.set(r),t.rev=r.rev,t.clean=vV(n.html),t.cleanTitle=n.title;let i=!t.left&&S.current?.html()||t.html;t.dirty=vV(i)!==t.clean||t.title!==t.cleanTitle,t.dirty&&t.left&&(t.again=!0)}catch(e){if(gV(e)!==`the note was changed elsewhere`)throw e;t.check=!0}}}while(t.again||t.check);d(null),y(t.dirty?`unsaved`:`saved`),t.dirty&&!t.held&&!t.left&&(clearTimeout(t.timer),t.timer=setTimeout(()=>{k()},_V))}catch(r){gV(r)===`that note is no longer there`?(t.gone=!0,Wz.drop(e),d(`This note was removed elsewhere.`)):(d(gV(r)),n&&(t.check=!0),(t.dirty||n&&!t.left)&&(clearTimeout(t.timer),t.timer=setTimeout(()=>{k()},5e3))),y(`failed`)}finally{t.running=null,D(),t.left&&(!t.dirty||t.held||t.gone)&&(xV.get(e)===t&&xV.delete(e),t.release())}}),t.running)},[e,O,E,D]),A=()=>{let e=T.current;!e.running&&e.clean!==null&&vV(e.html)===e.clean&&e.title===e.cleanTitle?e.dirty&&(e.dirty=!1,clearTimeout(e.timer),y(`saved`),D()):(e.dirty=!0,y(e=>e===`saving`?e:`unsaved`),clearTimeout(e.timer),e.timer=setTimeout(()=>{k()},_V))};(0,L.useEffect)(()=>{c&&!T.current.dirty&&!T.current.held&&E()},[c,E]),(0,L.useEffect)(()=>{c&&T.current.loaded&&T.current.check&&k()},[c,k]),(0,L.useEffect)(()=>{if(C||!c?.focus)return;let e=document.activeElement;(!e||e===document.body||e.closest(`.note`))&&S.current?.focus(`end`)},[C]),(0,L.useEffect)(()=>{c?.focus&&S.current?.focus(`end`)},[c]),(0,L.useEffect)(()=>{c?.n===0&&n&&s.current?.focus()},[c,n]),(0,L.useEffect)(()=>{let t=!0,i=T.current,a=xV.get(e);xV.delete(e);let o=null;i.owner=`${Date.now().toString(36)}${Math.random().toString(36).slice(2,8)}`,i.release=oB.hold(i.owner);let s=!1,c=!1;(a?.running??Promise.resolve()).then(async()=>{a&&(a.gone=!0,clearTimeout(a.timer),a.release());let t=()=>Vz.current()?.find(t=>t.id===e),r=!!a||!!await oB.orphan(e),i=e=>{let i=t();return!!e&&!!i&&!r&&!n&&e.rev===i.rev&&e.updated===i.updated},o=r?void 0:Wz.takeMade(e),l=t();if(o&&(!l||l.rev===o.rev&&l.updated===o.updated))return c=!0,o;let u=Wz.peek(e);if(i(u))return s=!0,u;let d=U(`note`,{id:e}).then(e=>(Wz.set(e),e));if(r||n)return d;let f=Promise.all([Wz.kept(e),Vz.listed()]).then(([e])=>i(e)?e:null,()=>null),p=await Promise.race([d.then(e=>({n:e,copy:!1}),()=>null),f.then(e=>e?{n:e,copy:!0}:null)]);if(p&&!p.copy)return p.n;let m=p?.n??await f;return m?(s=!0,d.catch(()=>{}),m):d}).then(async n=>{if(!t)return;s?(i.check=!0,i.unchecked=!0,w(!0)):c&&(i.check=!0),i.rev=n.rev,i.title=n.title,i.cleanTitle=n.title,i.html=n.html,h(n.links),_(n.pinned);let r=await oB.orphan(e);t&&r&&(vV(r.html)===vV(n.html)&&yV(r.title)===n.title?oB.remove(e,r.owner,r.at):(o=r,i.title=r.title,i.html=r.html,i.clean=null,i.dirty=!0,r.rev!==n.rev&&await U(`noteChanges`,{id:e,since:r.rev}).then(e=>{e.ops?(i.html=e.ops.reduce(ZB,r.html),i.rev=e.rev):(i.rev=r.rev,i.held=!0,x(e.note))},()=>{i.rev=r.rev,i.held=!0,x(n)})))}).then(()=>{if(!t)return;i.loaded=!0,D()&&o&&oB.remove(e,o.owner,o.at),p(i.title);let a=document.activeElement,s=!!a&&a!==document.body&&a.matches(`input, textarea, select, [contenteditable="true"]`)&&!a.closest(`.note`);l({html:i.html,n:0,focus:(r??!n)&&!s}),i.dirty&&(y(`unsaved`),i.held||(i.timer=setTimeout(()=>{k()},_V)))},e=>{t&&d(gV(e))});let u=Vz.onChanged(e,()=>{i.loaded?i.gone?i.left||U(`note`,{id:e}).then(()=>{t&&i.gone&&(i.gone=!1,d(null),i.check=!0,k())},()=>{}):(i.check=!0,k()):i.check=!0}),f=()=>{document.visibilityState===`hidden`&&(D(),k())};return document.addEventListener(`visibilitychange`,f),window.addEventListener(`pagehide`,D),()=>{t=!1,u(),document.removeEventListener(`visibilitychange`,f),window.removeEventListener(`pagehide`,D),clearTimeout(i.timer),i.left=!0,D(),i.loaded&&i.dirty&&!i.held&&!i.gone?(xV.set(e,i),k().then(()=>Vz.reload())):i.release()}},[e,k,D]);let j=async e=>{let t=e.map(()=>S.current?.placePicture()??null);for(let[n,r]of e.entries()){let e=r.name||`The picture`,i=t[n];try{let t=await hV(r);i&&S.current?.fillPicture(i,{ref:t,alt:r.name.replace(/\.[a-z0-9]+$/i,``)||void 0})||K.show({kind:`error`,duration:7e3,text:`${e} was kept, but the note changed before it could be put in: add it again.`})}catch(t){i&&S.current?.fillPicture(i,null),K.error(t,`${e} was not added: `)}}},ee=e=>{if(e.defaultPrevented||!e.dataTransfer.types.includes(`Files`))return;e.preventDefault();let t=[...e.dataTransfer.files].filter(e=>e.type.startsWith(`image/`));t.length&&c&&j(t)},M=()=>{let e=T.current;b&&(e.rev=b.rev,e.held=!1,e.dirty=!0,e.clean=null,x(null),k())},te=()=>{b&&(O(b),x(null),y(`saved`),D())},ne=async()=>{try{let t=await U(`saveNote`,{id:e,pinned:!g});_(t.pinned),T.current.dirty?Wz.drop(e):Wz.set(t),Vz.reload()}catch(e){K.error(e)}},re=async t=>{try{let n=await U(`unlinkNote`,{id:e,link:t});h(n.links),Vz.patch(n)}catch(e){K.error(e)}},ie=async()=>{let t=T.current;try{if((t.dirty||t.running)&&await k(),t.dirty||t.held){K.show({kind:`error`,duration:7e3,text:t.held?`Not removed: say first which text to keep.`:`Not removed: what you wrote in it could not be saved yet.`});return}await U(`removeNote`,{id:e}),Wz.drop(e),t.gone=!0,clearTimeout(t.timer),D(),Vz.drop(e),i(),K.show({text:`Note removed`,duration:7e3,action:{label:`Undo`,run:()=>{U(`restoreNote`,{id:e}).then(()=>Vz.reload(),e=>K.error(e))}}})}catch(e){K.error(e,`The note could not be removed: `)}};return(0,W.jsxs)(`section`,{className:`view note${o?` pane`:``}`,"aria-label":o?`A note about this conversation`:void 0,onDragOver:e=>{e.dataTransfer.types.includes(`Files`)&&e.preventDefault()},onDrop:ee,onKeyDown:o?e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&(e.preventDefault(),e.stopPropagation(),o.onClose())}:void 0,children:[(0,W.jsxs)(`header`,{className:`thread-head note-head`,children:[!t&&!o&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:i,title:`Back to the notes (Esc)`,"aria-label":`Back to the notes`,children:(0,W.jsx)(Le,{size:16})}),o&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare note-fold-mark`,onClick:o.onFold,"aria-expanded":`true`,title:`Fold this note`,"aria-label":`Fold this note`,children:(0,W.jsx)(dt,{size:14})}),(0,W.jsx)(`input`,{ref:s,className:`note-title`,type:`text`,value:f,placeholder:`Title`,"aria-label":`Title of the note`,maxLength:200,disabled:!c||C,onChange:e=>{p(e.target.value),T.current.title=e.target.value,A()},onKeyDown:e=>{e.nativeEvent.isComposing||(e.key===`Enter`||e.key===`ArrowDown`||e.key===`Tab`&&!e.shiftKey)&&(e.preventDefault(),S.current?.focus())}}),(0,W.jsx)(`span`,{className:`note-status ${v}`,role:`status`,"aria-live":`polite`,children:v===`saving`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:12,className:`spin`}),` Saving`]}):v===`unsaved`?`Not saved yet`:v===`failed`&&C?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(yt,{size:12}),` As last read`]}):v===`failed`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(yt,{size:12}),` Not saved`]}):C?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:12,className:`spin`}),` Checking`]}):c?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{size:12}),` Saved`]}):null}),o?(0,W.jsx)(W.Fragment,{children:(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:o.onFull,title:`Open in the notes`,"aria-label":`Open in the notes`,children:(0,W.jsx)(lr,{size:14})})}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:ne,disabled:!c,"aria-pressed":g,title:g?`Unpin: no longer first in the list and on Home`:`Pin: first in the list and on Home`,"aria-label":g?`Unpin the note`:`Pin the note`,children:g?(0,W.jsx)(jr,{size:15}):(0,W.jsx)(Nr,{size:15})}),(0,W.jsx)(co,{onDiscard:()=>void ie(),disabled:!c,className:`btn icon`,title:`Remove the note`,confirmLabel:`Remove`})]})]}),!o&&m.length>0&&(0,W.jsx)(`ul`,{className:`note-links`,"aria-label":`What this note is about`,children:m.map(e=>(0,W.jsxs)(`li`,{className:`note-link`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`note-link-open`,onClick:()=>a(e),title:`Open this conversation`,children:[(0,W.jsx)(ar,{size:12}),` `,(0,W.jsx)(`span`,{children:e.subject}),e.from&&(0,W.jsxs)(`span`,{className:`dim`,children:[` · `,e.from]})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>re(e),title:`The note is no longer about this mail`,"aria-label":`Remove the link to ${e.subject}`,children:(0,W.jsx)(la,{size:12})})]},`${e.account??``}:${e.conversationId??e.id}`))}),b&&(0,W.jsxs)(`div`,{className:`note-other`,role:`alert`,children:[(0,W.jsx)(`span`,{children:`This note was changed elsewhere while you were writing. What shows is yours.`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:M,children:`Keep mine`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:te,children:`Take the other`})]}),u&&(0,W.jsx)(`p`,{className:`set-note note-error`,role:`alert`,children:C&&!T.current.gone?`Shown as it was last read here: Sideora could not be asked whether it changed (${u.replace(/\.$/,``)}). It is asked again; until then it is not written in.`:v===`failed`&&!T.current.gone?`Not saved: ${u}. It is kept here and tried again.`:u}),c?(0,W.jsx)(MN,{ref:S,notes:!0,locked:C,pictures:$B,pictureSource:mV,onImages:j,initialHtml:c.html,placeholder:`Write, or type [ ] for a to-do`,autoFocus:!1,onLeaveUp:()=>s.current?.focus(),onChange:e=>{T.current.html=e,A()}},c.n):!u&&(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})})]})}var CV=e=>e instanceof Error?e.message:String(e),wV=`mw:accounts-changed`,TV=[{id:`gmail`,label:`Gmail`,spec:{provider:`imap`,imapHost:`imap.gmail.com`,imapPort:993,smtpHost:`smtp.gmail.com`,smtpPort:465},help:`Gmail wants an app password (Google Account → Security → 2-Step Verification → App passwords).`,link:`https://myaccount.google.com/apppasswords`},{id:`icloud`,label:`iCloud Mail`,spec:{provider:`imap`,imapHost:`imap.mail.me.com`,imapPort:993,smtpHost:`smtp.mail.me.com`,smtpPort:587},help:`iCloud wants an app-specific password (account.apple.com → Sign-In and Security).`,link:`https://account.apple.com`},{id:`fastmail`,label:`Fastmail`,spec:{provider:`imap`,imapHost:`imap.fastmail.com`,imapPort:993,smtpHost:`smtp.fastmail.com`,smtpPort:465},help:`Fastmail wants an app password (Settings → Privacy & Security → Integrations).`},{id:`yahoo`,label:`Yahoo Mail`,spec:{provider:`imap`,imapHost:`imap.mail.yahoo.com`,imapPort:993,smtpHost:`smtp.mail.yahoo.com`,smtpPort:465},help:`Yahoo wants an app password (Account Info → Account security).`},{id:`microsoft`,label:`Microsoft 365 / Outlook.com`,spec:{provider:`imap`},help:`Signed in with Microsoft, in this computer's browser: no password is typed here.`},{id:`imap`,label:`Other (IMAP)`,spec:{provider:`imap`,imapPort:993,smtpPort:587}},{id:`jmap`,label:`JMAP (Mailflare and others)`,spec:{provider:`jmap`},help:`The server's JMAP address and an API key made for it (on Mailflare: Settings → Account → App passwords, with the jmap scope).`},{id:`ews`,label:`Exchange (Outlook on the web)`,spec:{provider:`ews`},help:`The address of Outlook on the web (OWA), and the sign-in your organisation gives you.`}],EV=e=>e.provider===`imap`?e.imapHost??``:e.provider===`jmap`?(()=>{try{return new URL(/^https?:\/\//i.test(e.jmapUrl??``)?e.jmapUrl:`https://${e.jmapUrl??``}`).hostname}catch{return``}})():e.host??``,DV={ews:`Exchange`,imap:`IMAP`,jmap:`JMAP`,caldav:`CalDAV calendar`,google:`Google Calendar`},OV={keychain:`password kept by Sideora`,"1password":`password from 1Password`,env:`password from the environment`,google:`Google sign-in`,microsoft:`Microsoft sign-in`,none:`no password kept`};function kV(e){let t=e?Date.parse(e):NaN;if(!Number.isFinite(t))return``;let n=Math.max(0,Math.round((Date.now()-t)/6e4));if(n<1)return`just now`;if(n<60)return`${n} min ago`;let r=Math.round(n/60);if(r<36)return`${r} h ago`;let i=Math.round(r/24);return`${i} day${i===1?``:`s`} ago`}function AV(e){return e?[`password from 1Password`+(e.service?` (service account)`:``),e.item||null,e.readAt?`read ${kV(e.readAt)}`:`not read yet`].filter(Boolean).join(` · `):OV[`1password`]}var jV=e=>e.normalize(`NFKD`).replace(/[\u0300-\u036f]/g,``).toLowerCase().replace(/[^a-z0-9._-]+/g,`-`).replace(/^[-._]+|-+$/g,``).slice(0,32);function MV({onEditing:e,startAdding:t=!1}){let[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(t),[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)(null),m=(0,L.useRef)(null),h=(0,L.useCallback)(()=>U(`accountSettings`).then(e=>{UV=e.onePassword!==`absent`,WV=e.microsoft===`ready`,r(e),a(null)},e=>a(CV(e))),[]);(0,L.useEffect)(()=>{h()},[h]);let g=o||c!=null,_=(0,L.useCallback)(()=>{s(!1),l(null)},[]);(0,L.useEffect)(()=>{if(e?.(g?_:null),!g)return;let t=e=>{e.key===`Escape`&&!e.defaultPrevented&&!DI.isOpen()&&(e.preventDefault(),_())};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t),e?.(null)}},[g,_,e]);let v=(e,t)=>{r(e),window.dispatchEvent(new CustomEvent(wV)),K.show({kind:`ok`,text:e.restarted===void 0?`${t}.`:e.restarted===!1?`${t}. Restart the daemon for it to watch: sideora restart-daemon`:`${t}. The daemon is starting again with it.`,duration:7e3})},y=async e=>{d(!0);try{v(await U(`removeAccount`,{name:e}),`${n?.accounts.find(t=>t.name===e)?.label||e} removed`)}catch(e){K.error(e,`Could not remove it: `)}finally{d(!1),p(null)}},b=async e=>{d(!0);try{r(await U(`setDefaultAccount`,{name:e}))}catch(e){K.error(e,`Could not change it: `)}finally{d(!1)}};return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`h2`,{className:`dup`,children:`Accounts`}),u&&(0,W.jsx)(H,{size:14,className:`spin dim`,"aria-label":`Working`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,ref:m,onClick:()=>{l(null),s(!0)},disabled:!n||o,children:[(0,W.jsx)(Lr,{size:14}),` Add a mailbox`]})]}),i?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsxs)(`p`,{children:[`The accounts could not be read: `,i]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:h,children:`Try again`})]}):n?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`ul`,{className:`rules acct-list`,children:[n.accounts.map(e=>c===e.name?(0,W.jsx)(`li`,{className:`open`,children:(0,W.jsx)(LV,{row:e,onCancel:()=>l(null),onSaved:(t,n)=>{l(t=>t===e.name?null:t),v(t,n)}})},e.name):(0,W.jsxs)(`li`,{children:[(0,W.jsxs)(`div`,{className:`acct`,children:[(0,W.jsxs)(`div`,{className:`acct-main`,children:[(0,W.jsxs)(`span`,{className:`rule-l1`,children:[(0,W.jsx)(`span`,{className:`rule-name`,children:e.label||e.name}),e.label&&(0,W.jsx)(`span`,{className:`acct-key`,title:`What the command line and rules call it`,children:e.name}),n.defaultAccount===e.name&&(0,W.jsx)(`span`,{className:`tag`,children:`default`})]}),(0,W.jsx)(`span`,{className:`rule-match`,children:[e.email,DV[e.provider],e.server].filter(Boolean).join(` · `)}),(0,W.jsxs)(`span`,{className:`acct-sub`,children:[[e.mail?`mail`:``,e.calendar?`calendar`:``].filter(Boolean).join(` and `),` · `,e.signIn===`1password`?AV(e.onePassword):OV[e.signIn]]}),e.mail&&n.defaultAccount!==e.name&&n.accounts.length>1&&f!==e.name&&(0,W.jsx)(`button`,{type:`button`,className:`link acct-default`,onClick:()=>b(e.name),disabled:u,title:`New mail, the command line and agents use it when no account is named`,children:`Make it the default`})]}),f===e.name?(0,W.jsxs)(`span`,{className:`confirm`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,onClick:()=>y(e.name),disabled:u,children:`Remove`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:()=>p(null),children:`Keep`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>{s(!1),l(e.name)},title:`Change ${e.label||e.name}`,"aria-label":`Change ${e.label||e.name}`,children:(0,W.jsx)(Dr,{size:15})}),n.accounts.length>1&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>p(e.name),title:`Remove ${e.label||e.name} from Sideora (its mail stays on its server)`,"aria-label":`Remove ${e.label||e.name}`,children:(0,W.jsx)(zi,{size:15})})]})]}),(e.google||e.googleConnect)&&f!==e.name&&(0,W.jsx)(VV,{row:e,onSignedIn:e=>{h(),e&&window.dispatchEvent(new CustomEvent(`mw:accounts-changed`))}}),e.onePassword?.failed&&f!==e.name&&(0,W.jsxs)(`p`,{className:`acct-op-warn`,role:`status`,children:[(0,W.jsx)(Vi,{size:13}),` `,(0,W.jsxs)(`span`,{children:[`The last read from 1Password failed`,e.onePassword.failedAt?` ${kV(e.onePassword.failedAt)}`:``,e.onePassword.why?`: ${e.onePassword.why}`:``,`. The password kept from before is used meanwhile. `,/gone/.test(e.onePassword.why??``)?`Link its item again (Change).`:/token/.test(e.onePassword.why??``)?(0,W.jsxs)(W.Fragment,{children:[`Store a valid token: `,(0,W.jsx)(`code`,{children:`sideora op-token set`}),`.`]}):`Unlock 1Password; Settings → Developer → Integrate with 1Password CLI.`]})]}),f===e.name&&(0,W.jsxs)(`p`,{className:`set-hint acct-warn`,children:[`Sideora stops watching `,e.label||e.name,` and forgets its password; the mail stays on its server. Rules limited to it alert for nothing until it is added again.`]})]},e.name)),o&&(0,W.jsx)(`li`,{className:`open`,children:(0,W.jsx)(FV,{taken:n.accounts.map(e=>e.name),onCancel:()=>{s(!1),requestAnimationFrame(()=>m.current?.focus())},onAdded:(e,t)=>{s(!1),v(e,`${t} added`)}})})]}),(0,W.jsxs)(`p`,{className:`set-hint acc-calendars`,children:[`A Gmail mailbox connects to its Google calendar and contacts here, and a Google calendar signs in here. Calendars on their own (iCloud, Fastmail, another CalDAV server, or a Google calendar without its mailbox) are added from the command line: `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})})]})}var NV=()=>!h.afar&&!h.sidePanel;function PV({onCancel:e,onAdded:t}){let[n,r]=(0,L.useState)(``),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null),[c,u]=(0,L.useState)(``),[d,f]=(0,L.useState)(``),p=(0,L.useRef)(!0);(0,L.useEffect)(()=>()=>{p.current=!1},[]);let m=o?.state===`pending`;(0,L.useEffect)(()=>{if(!m)return;let e=setInterval(()=>{U(`microsoftSignInStatus`,{}).then(async e=>{if(p.current&&(s(e),e.state===`done`)){let n=await U(`accountSettings`);window.dispatchEvent(new CustomEvent(wV)),t({...n,restarted:e.restarted},e.account)}},()=>{})},1500);return()=>clearInterval(e)},[m,t]);let g=async()=>{f(``);try{let e=await U(`microsoftSignInStart`,{...n.trim()?{label:n.trim()}:{},...i&&NV()?{via:`relay`}:{}});u(e.url),s({state:`pending`,expiresAt:e.expiresAt});try{l(e.url)}catch{}}catch(e){f(CV(e))}},_=()=>{U(`microsoftSignInCancel`,{}).then(s,()=>{})},v=o?.state===`failed`?o.reason:o?.state===`expired`?`The sign-in page waited too long: start again.`:o?.state===`cancelled`?`The sign-in was stopped.`:``;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsxs)(`span`,{children:[`Name in Sideora `,(0,W.jsx)(`em`,{children:`(optional)`})]}),(0,W.jsx)(`input`,{type:`text`,value:n,onChange:e=>r(e.target.value),placeholder:`Work`,maxLength:40,autoComplete:`off`,disabled:m}),(0,W.jsx)(`small`,{children:`Microsoft says which address signs in; the mailbox is named after it unless you name it here.`})]}),h.afar?(0,W.jsx)(`p`,{className:`set-hint`,children:`Microsoft brings you back through Sideora's relay to this device; the sign-in is kept on the computer.`}):NV()&&(0,W.jsxs)(`label`,{className:`set-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:i,onChange:e=>a(e.target.checked),disabled:m}),` This browser is on another computer than Sideora's (Microsoft brings it back through Sideora's relay)`]}),m&&(0,W.jsxs)(`p`,{className:`acct-result`,role:`status`,children:[(0,W.jsx)(H,{size:14,className:`spin`}),` Waiting for Microsoft in the other tab… `,c&&(0,W.jsx)(`a`,{href:c,target:`_blank`,rel:`noreferrer`,children:`Open the sign-in page`})]}),(v||d)&&(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` `,d||v]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:m?_:e,children:m?`Stop`:`Cancel`}),!m&&(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>void g(),children:`Sign in with Microsoft`})]})]})}function FV({taken:e,onCancel:t,onAdded:n}){let[r,i]=(0,L.useState)(TV[0]),[a,o]=(0,L.useState)({provider:`imap`,...TV[0].spec}),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(``),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(null),[h,g]=(0,L.useState)({}),_=(0,L.useRef)(0),v=e=>{_.current++,o(t=>({...t,...e})),g({})},y=e=>{let t=TV.find(t=>t.id===e)??TV[0];_.current++,i(t),o({email:a.email,username:a.username,...t.spec}),g({})},b=(()=>{let t=(r.id===`imap`||r.id===`jmap`||r.id===`ews`?(a.email??``).split(`@`)[0]:r.id).replace(/[^\w.-]/g,``).toLowerCase()||`mail`,n=t;for(let r=2;e.includes(n);r++)n=`${t}${r}`;return n})(),x=(()=>{let t=jV(s);if(!t)return b;let n=t;for(let r=2;e.includes(n);r++)n=`${t}${r}`;return n})(),S={...a,imapPort:993},C=(a.provider===`imap`?!!a.email&&!!a.imapHost:a.provider===`jmap`?!!a.email&&!!a.jmapUrl:!!a.host&&!!a.username)&&(d?!!p:!!l),w=()=>d&&p?{onePassword:p}:{password:l},T=async()=>{let e=_.current;g({testing:!0});try{let t=await U(`testAccount`,{spec:S,...w()});if(e!==_.current)return;g(t.ok?{ok:`Signed in${t.email?` as ${t.email}`:``}.${t.newest?` Newest mail: “${t.newest.subject||`(no subject)`}”.`:` The inbox is empty.`}`}:{error:t.error})}catch(t){e===_.current&&g({error:CV(t)})}},E=async()=>{g(e=>({...e,adding:!0}));try{let e=await U(`addAccount`,{name:x,...s.trim()?{label:s.trim()}:{},spec:S,...w()});u(``),n(e,s.trim()||x)}catch(e){g({error:CV(e)})}};return(0,W.jsxs)(`form`,{className:`rule-form`,onSubmit:e=>{e.preventDefault(),C&&h.ok&&!h.adding?E():C&&!h.testing&&T()},children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Mailbox`}),(0,W.jsx)(`select`,{value:r.id,onChange:e=>y(e.target.value),children:TV.filter(e=>e.id!==`microsoft`||WV).map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.label},e.id))}),r.help&&(0,W.jsxs)(`small`,{children:[r.help,r.link&&(0,W.jsxs)(W.Fragment,{children:[` `,(0,W.jsx)(`a`,{href:r.link,target:`_blank`,rel:`noreferrer`,children:`Open`})]})]})]}),r.id===`microsoft`?(0,W.jsx)(PV,{onCancel:t,onAdded:n}):(0,W.jsxs)(W.Fragment,{children:[a.provider===`imap`||a.provider===`jmap`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Email address`}),(0,W.jsx)(`input`,{type:`email`,value:a.email??``,onChange:e=>v({email:e.target.value}),autoComplete:`off`,spellCheck:!1,autoFocus:!0})]}),a.provider===`jmap`&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`JMAP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.jmapUrl??``,onChange:e=>v({jmapUrl:e.target.value}),placeholder:`mail.example.com, or its session address`,autoComplete:`off`,spellCheck:!1}),(0,W.jsx)(`small`,{children:`A host alone is asked at https://host/.well-known/jmap.`})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Outlook on the web`}),(0,W.jsx)(`input`,{type:`text`,value:a.host??``,onChange:e=>v({host:e.target.value}),placeholder:`https://mail.example.com`,autoComplete:`off`,spellCheck:!1,autoFocus:!0})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Sign-in`}),(0,W.jsx)(`input`,{type:`text`,value:a.username??``,onChange:e=>v({username:e.target.value}),placeholder:`DOMAIN\\name, or name@example.com`,autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Email address`}),(0,W.jsx)(`input`,{type:`email`,value:a.email??``,onChange:e=>v({email:e.target.value}),placeholder:`Found by signing in, when left empty`,autoComplete:`off`,spellCheck:!1})]})]}),r.id===`imap`&&(0,W.jsxs)(`div`,{className:`acct-servers`,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`IMAP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.imapHost??``,onChange:e=>v({imapHost:e.target.value}),placeholder:`imap.example.com`,autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field port`,children:[(0,W.jsx)(`span`,{children:`Port`}),(0,W.jsx)(`input`,{type:`text`,value:`993`,readOnly:!0,title:`Encrypted from the start: the only port offered here`})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`SMTP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.smtpHost??``,onChange:e=>v({smtpHost:e.target.value}),placeholder:`smtp.example.com (empty: drafts only)`,autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field port`,children:[(0,W.jsx)(`span`,{children:`Port`}),(0,W.jsxs)(`select`,{value:a.smtpPort??587,onChange:e=>v({smtpPort:Number(e.target.value)}),children:[(0,W.jsx)(`option`,{value:465,children:`465`}),(0,W.jsx)(`option`,{value:587,children:`587`})]})]}),(0,W.jsxs)(`small`,{className:`wide`,children:[`Encrypted connections only: IMAP on 993, SMTP on 465 or on 587 with STARTTLS. Another port is set with `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]}),(0,W.jsxs)(`label`,{className:`set-field wide`,children:[(0,W.jsx)(`span`,{children:`Sign-in, if not the address`}),(0,W.jsx)(`input`,{type:`text`,value:a.username??``,onChange:e=>v({username:e.target.value}),autoComplete:`off`,spellCheck:!1})]})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{id:`add-pw`,children:a.provider===`jmap`?`API key`:`Password`}),(0,W.jsx)(GV,{fromOp:d,onChange:e=>{_.current++,f(e),g({})},labelledBy:`add-pw`}),d?(0,W.jsx)(qV,{server:EV(a),smtp:a.provider===`imap`?a.smtpHost??``:``,email:a.email??``,picked:p,onPick:e=>{_.current++,m(e),g({})}}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{type:`password`,value:l,onChange:e=>{_.current++,u(e.target.value),g({})},autoComplete:`new-password`,"aria-labelledby":`add-pw`}),(0,W.jsx)(`small`,{children:`Kept on the computer Sideora runs on (in its Keychain, on a Mac). It is not shown again, here or anywhere.`})]})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Name in Sideora`}),(0,W.jsx)(`input`,{type:`text`,value:s,onChange:e=>c(e.target.value),placeholder:b,maxLength:40,autoComplete:`off`,spellCheck:!1}),(0,W.jsxs)(`small`,{children:[`The command line and rules call it `,(0,W.jsx)(`code`,{children:x}),`.`]})]}),h.ok&&(0,W.jsxs)(`p`,{className:`acct-result ok`,role:`status`,children:[(0,W.jsx)(V,{size:14}),` `,h.ok]}),h.error&&(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` `,h.error]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`Cancel`}),h.ok?(0,W.jsxs)(`button`,{type:`submit`,className:`btn primary`,disabled:!C||!!h.adding,children:[h.adding?(0,W.jsx)(H,{size:14,className:`spin`}):null,` Add `,s.trim()||x]}):(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:!C||!!h.testing,children:h.testing?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:14,className:`spin`}),` Trying…`]}):`Try signing in`})]})]})]})}var IV=[`email`,`username`,`imapHost`,`smtpHost`,`smtpPort`,`host`,`domain`,`jmapUrl`];function LV({row:e,onCancel:t,onSaved:n}){let[r,i]=(0,L.useState)(e.label??``),[a,o]=(0,L.useState)(e.spec),[s,c]=(0,L.useState)(``),l=e.signIn===`1password`,[u,d]=(0,L.useState)(l),[f,p]=(0,L.useState)(null),[m,h]=(0,L.useState)(!l),[g,_]=(0,L.useState)({}),v=!e.spec||e.spec.provider!==`imap`||e.spec.imapPort===993&&(!e.spec.smtpHost||e.spec.smtpPort===465||e.spec.smtpPort===587),y=e.signIn===`env`||l&&!!e.onePassword?.service,b=!!e.spec&&!y&&(e.provider===`imap`||e.provider===`ews`||e.provider===`jmap`)&&v,x=e=>{o(t=>({...t,...e})),_(e=>({saving:e.saving}))},S=!!a&&!!e.spec&&IV.some(t=>String(a[t]??``)!==String(e.spec[t]??``)),C=u?!!f:!!s,w=S||C||l&&!u,T=!g.saving&&(!w||C),E=e=>{d(e),_(e=>({saving:e.saving}))},[D,O]=(0,L.useState)(l?null:`asked`);(0,L.useEffect)(()=>{l&&S&&!m&&(h(!0),O(`auto`))},[l,S,m]);let k=async()=>{_({saving:!0});try{let t=r.trim()!==(e.label??``),i=await U(`editAccount`,{name:e.name,...t?{label:r.trim()}:{},...w?{...S?{spec:a}:{},...u&&f?{onePassword:f}:{password:s}}:{},was:{label:e.label??``,...e.spec?{spec:e.spec}:{}}});c(``),n(i,`${r.trim()||e.name} saved`)}catch(e){_({error:CV(e)})}};return(0,W.jsxs)(`form`,{className:`rule-form`,onSubmit:e=>{e.preventDefault(),T&&k()},children:[(0,W.jsxs)(`fieldset`,{className:`acct-fields`,disabled:!!g.saving,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Name`}),(0,W.jsx)(`input`,{type:`text`,value:r,onChange:e=>{i(e.target.value),_(e=>({saving:e.saving}))},placeholder:e.name,maxLength:40,autoComplete:`off`,spellCheck:!1,autoFocus:!0}),(0,W.jsxs)(`small`,{children:[`How Sideora shows it. The command line and rules call it `,(0,W.jsx)(`code`,{children:e.name}),`, whatever its name.`]})]}),b&&a?(0,W.jsxs)(W.Fragment,{children:[a.provider===`ews`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Outlook on the web`}),(0,W.jsx)(`input`,{type:`text`,value:a.host??``,onChange:e=>x({host:e.target.value}),autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Sign-in`}),(0,W.jsx)(`input`,{type:`text`,value:a.username??``,onChange:e=>x({username:e.target.value}),autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Email address`}),(0,W.jsx)(`input`,{type:`email`,value:a.email??``,onChange:e=>x({email:e.target.value}),autoComplete:`off`,spellCheck:!1})]})]}):a.provider===`jmap`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Email address`}),(0,W.jsx)(`input`,{type:`email`,value:a.email??``,onChange:e=>x({email:e.target.value}),autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`JMAP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.jmapUrl??``,onChange:e=>x({jmapUrl:e.target.value}),autoComplete:`off`,spellCheck:!1})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Email address`}),(0,W.jsx)(`input`,{type:`email`,value:a.email??``,onChange:e=>x({email:e.target.value}),autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`div`,{className:`acct-servers`,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`IMAP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.imapHost??``,onChange:e=>x({imapHost:e.target.value}),autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field port`,children:[(0,W.jsx)(`span`,{children:`Port`}),(0,W.jsx)(`input`,{type:`text`,value:`993`,readOnly:!0,title:`Encrypted from the start: the only port offered here`})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`SMTP server`}),(0,W.jsx)(`input`,{type:`text`,value:a.smtpHost??``,onChange:e=>x({smtpHost:e.target.value}),placeholder:`empty: drafts only`,autoComplete:`off`,spellCheck:!1})]}),(0,W.jsxs)(`label`,{className:`set-field port`,children:[(0,W.jsx)(`span`,{children:`Port`}),(0,W.jsxs)(`select`,{value:a.smtpPort??587,onChange:e=>x({smtpPort:Number(e.target.value)}),children:[(0,W.jsx)(`option`,{value:465,children:`465`}),(0,W.jsx)(`option`,{value:587,children:`587`})]})]}),(0,W.jsxs)(`label`,{className:`set-field wide`,children:[(0,W.jsx)(`span`,{children:`Sign-in, if not the address`}),(0,W.jsx)(`input`,{type:`text`,value:a.username??``,onChange:e=>x({username:e.target.value}),autoComplete:`off`,spellCheck:!1})]})]})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{id:`pw-${e.name}`,children:a.provider===`jmap`?S||l!==u?`API key`:`New API key`:S||l!==u?`Password`:`New password`}),(0,W.jsx)(GV,{fromOp:u,onChange:E,labelledBy:`pw-${e.name}`}),u?(0,W.jsxs)(W.Fragment,{children:[l&&!m?(0,W.jsxs)(`div`,{className:`op-current`,children:[(0,W.jsx)(In,{size:14}),(0,W.jsxs)(`span`,{className:`op-item-main`,children:[(0,W.jsx)(`span`,{className:`op-item-title`,children:e.onePassword?.item||`A 1Password item`}),(0,W.jsx)(`span`,{className:`op-item-sub`,children:[e.onePassword?.vault,e.onePassword?.readAt?`read ${kV(e.onePassword.readAt)}`:``].filter(Boolean).join(` · `)})]}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{O(`asked`),h(!0)},children:`Link another item`})]}):(0,W.jsx)(qV,{auto:D!==`auto`,server:EV(a),smtp:a.provider===`imap`?a.smtpHost??``:``,email:a.email??``,picked:f,onPick:e=>{p(e),_(e=>({saving:e.saving}))}}),S&&!f&&(0,W.jsx)(`small`,{children:l?`Its server or sign-in changed: link its item again, checked against the new servers, before anything is saved.`:`Pick the item to sign in with.`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{type:`password`,value:s,onChange:e=>{c(e.target.value),_(e=>({saving:e.saving}))},placeholder:S||l?`Needed to sign in with these`:`Unchanged`,autoComplete:`new-password`,"aria-labelledby":`pw-${e.name}`}),(0,W.jsx)(`small`,{children:l?`Typed, it is tried by signing in, then kept by Sideora instead of being read from 1Password.`:S?`Its server or sign-in changed: it signs in again with the password, before anything is saved.`:`Typed, it is tried by signing in before it replaces the one in the Keychain.`})]})]})]}):e.signIn===`env`?(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Its password comes from an environment variable: its server, sign-in and password are changed with `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]}):l&&e.onePassword?.service?(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Its password comes from a 1Password service account: its server, sign-in and password are changed with `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]}):e.mail?v?null:(0,W.jsxs)(`p`,{className:`set-hint`,children:[`It uses ports this page does not offer: its servers, sign-in and password are changed with `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]}):(0,W.jsxs)(`p`,{className:`set-hint`,children:[`A calendar of its own: it is changed with `,(0,W.jsx)(`code`,{children:`sideora setup`}),e.provider===`google`?`; its Google sign-in is on its row in the list`:``,`.`]})]}),g.error&&(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` `,g.error]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:!T,children:g.saving?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:14,className:`spin`}),` `,w?`Signing in…`:`Saving…`]}):w?`Sign in and save`:`Save`})]})]})}var RV={"signed-in":`Google: signed in — calendar, contacts`,"calendar-only":`Google: calendar only — sign in again to allow contacts`,"no-calendar":`Google: calendar not fully allowed — sign in again and tick all calendar permissions`,expired:`Google: sign-in expired`,"not-signed-in":`Google: not signed in`},zV=1500,BV=e=>{try{let t=new URL(e);return t.protocol===`https:`&&t.hostname===`accounts.google.com`}catch{return!1}};function VV({row:e,onSignedIn:t}){let[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(null),c=(0,L.useRef)(null),u=!e.google&&!!e.googleConnect,d=n?.state===`pending`,f=e.label||e.name,p=(0,L.useCallback)(e=>{if(e.state!==`done`)return;let n=[e.calendar?`calendar`:``,e.contacts?`contacts`:``].filter(Boolean).join(` and `)||`nothing Sideora uses`;K.show({kind:`ok`,text:`${f}: signed in to Google (${n}).${e.added?` Its calendar was added.`:``}${e.restarted===!1?` Restart the daemon for it to take effect: sideora restart-daemon`:``}`,duration:7e3}),t(!!e.added)},[f,t]);(0,L.useEffect)(()=>{let t=!0;return U(`googleSignInStatus`,{account:e.name}).then(e=>{t&&e.state===`pending`&&r(e)},()=>{}),()=>{t=!1}},[e.name]);let m=n?.state===`pending`?Date.parse(n.expiresAt):NaN;(0,L.useEffect)(()=>{if(!d)return;let t=!0,n=setInterval(()=>{Number.isFinite(m)&&Date.now()>m+3e4?(r({state:`expired`}),s(null)):U(`googleSignInStatus`,{account:e.name}).then(e=>{t&&(s(null),e.state!==`pending`&&(r(e),e.state===`none`&&s(`the sign-in was interrupted (Sideora's connection started again): sign in again`),p(e)))},e=>{t&&s(CV(e))})},zV);return()=>{t=!1,clearInterval(n)}},[d,m,e.name,p]);let h=async()=>{a(!0),s(null);try{let t=await U(`googleSignInStart`,{account:e.name,...u?{connect:!0}:{}});if(!BV(t.url))throw Error(`the sign-in page is not Google's`);c.current=t.url;try{await l(t.url)}catch(t){throw U(`googleSignInCancel`,{account:e.name}).catch(()=>{}),t}r({state:`pending`,expiresAt:t.expiresAt})}catch(e){s(CV(e))}finally{a(!1)}},g=async()=>{try{r(await U(`googleSignInCancel`,{account:e.name}))}catch(e){s(CV(e))}},_=e.google,v=_?.state===`signed-in`&&!_.addContacts,y=_?.state===`signed-in`&&!v,b=u?`Gmail: its Google calendar and contacts can be added`:`${v?`Google: calendar, contacts read only — sign in again to allow adding contacts`:RV[_.state]}${!e.email&&_.email&&_.state!==`not-signed-in`?` (as ${_.email})`:``}`,x=u?`Connect Google (calendar and contacts)`:_.state===`not-signed-in`?`Sign in with Google`:`Sign in again`,S=n?.state===`failed`?`The sign-in did not complete: ${n.reason}`:n?.state===`expired`?`The sign-in was not finished within 5 minutes.`:o?`Could not sign in: ${o}`:null;return(0,W.jsx)(`div`,{className:`acct-google${y?` ok`:u?``:` warn`}`,children:d?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`acct-google-line`,role:`status`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` `,(0,W.jsxs)(`span`,{children:[`Waiting for Google: finish signing in on its page, in the tab that opened`,e.email?(0,W.jsxs)(W.Fragment,{children:[` — as `,(0,W.jsx)(`strong`,{children:e.email})]}):null,`.`]})]}),o&&(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` Sideora could not be asked how it goes: `,o,`. Asking again…`]}),(0,W.jsxs)(`span`,{className:`acct-google-acts`,children:[c.current&&(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{c.current&&l(c.current).catch(()=>{})},children:`Open the page again`}),(0,W.jsx)(`button`,{type:`button`,className:`btn small`,onClick:g,children:`Cancel`})]})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`acct-google-line`,children:[y?(0,W.jsx)(V,{size:13}):u?null:(0,W.jsx)(Vi,{size:13}),(0,W.jsx)(`span`,{children:b})]}),S&&(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` `,S]}),(0,W.jsx)(`span`,{className:`acct-google-acts`,children:(0,W.jsxs)(`button`,{type:`button`,className:y?`link`:`btn small`,onClick:h,disabled:i,children:[i?(0,W.jsx)(H,{size:13,className:`spin`}):null,!y&&!i?(0,W.jsx)(HV,{}):null,` `,x]})})]})})}function HV(){return(0,W.jsx)(`svg`,{width:`13`,height:`13`,viewBox:`0 0 24 24`,"aria-hidden":`true`,fill:`currentColor`,children:(0,W.jsx)(`path`,{d:`M21.35 11.1H12v2.98h5.35c-.23 1.43-1.68 4.19-5.35 4.19-3.22 0-5.85-2.67-5.85-5.96S8.78 6.35 12 6.35c1.83 0 3.06.78 3.76 1.45l2.56-2.47C16.68 3.79 14.55 2.85 12 2.85 6.98 2.85 2.92 6.91 2.92 11.93S6.98 21 12 21c5.24 0 8.71-3.68 8.71-8.87 0-.6-.07-1.05-.15-1.5z`})})}var UV=!0,WV=!1;function GV({fromOp:e,onChange:t,labelledBy:n}){return!UV&&!e?null:(0,W.jsxs)(`div`,{className:`seg`,role:`group`,"aria-labelledby":n,children:[(0,W.jsx)(`button`,{type:`button`,"aria-pressed":!e,onClick:()=>t(!1),children:`Type it`}),(0,W.jsxs)(`button`,{type:`button`,"aria-pressed":e,onClick:()=>t(!0),children:[(0,W.jsx)(In,{size:13}),` From 1Password`]})]})}var KV={none:``,locked:`1Password is locked. Unlock it, then look again.`,unavailable:`1Password could not be reached: unlock 1Password; Settings → Developer → Integrate with 1Password CLI. Then look again.`,"not-installed":`The 1Password command-line tool is not installed on the computer Sideora runs on.`,error:`1Password did not answer.`};function qV({server:e,smtp:t,email:n,picked:r,onPick:i,auto:a=!0}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(null),m=(0,L.useRef)(0),h=JSON.stringify([e.trim(),t.trim(),n.trim()]),g=()=>{let a=++m.current;l(!0),d(null),p(h),r&&i(null),U(`onePasswordItems`,{server:e.trim(),smtp:t.trim(),email:n.trim()}).then(e=>{a===m.current&&s(e)},e=>{a===m.current&&(s(null),d(CV(e)))}).finally(()=>{a===m.current&&l(!1)})};(0,L.useEffect)(()=>{a&&e.trim()&&g()},[]);let _=f!==null&&f!==h;(0,L.useEffect)(()=>{_&&r&&i(null)},[_]);let v=e.trim(),y=o?.addressOnly?(0,W.jsxs)(`p`,{className:`set-hint op-others`,children:[o.addressOnly===1?`One other item matches`:`${o.addressOnly} other items match`,` the address but not `,v||`the server`,`: add the server to its websites in 1Password to link it.`]}):null;return(0,W.jsxs)(`div`,{className:`op-pick`,children:[c&&!o?(0,W.jsxs)(`p`,{className:`set-hint`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Looking in 1Password…`]}):f===null?null:_?(0,W.jsx)(`p`,{className:`set-hint`,children:`The server changed: find its item in 1Password again.`}):u?(0,W.jsxs)(`p`,{className:`acct-result bad`,role:`alert`,children:[(0,W.jsx)(yt,{size:14}),` `,u]}):o&&o.items.length>0?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`ul`,{className:`op-items`,role:`radiogroup`,"aria-label":`1Password items`,children:o.items.map(e=>{let t=!!r&&r.itemId===e.itemId&&r.vaultId===e.vaultId;return(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`op-item`,role:`radio`,"aria-checked":t,onClick:()=>i(t?null:{vaultId:e.vaultId,itemId:e.itemId}),children:[(0,W.jsx)(`span`,{className:`op-radio`,"aria-hidden":`true`,children:t?(0,W.jsx)(V,{size:12}):null}),(0,W.jsxs)(`span`,{className:`op-item-main`,children:[(0,W.jsx)(`span`,{className:`op-item-title`,children:e.title}),(0,W.jsx)(`span`,{className:`op-item-sub`,children:[e.vault,e.websites.join(`, `)].filter(Boolean).join(` · `)})]})]})},`${e.vaultId}/${e.itemId}`)})}),y]}):o?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`op-empty`,children:o.reason&&o.reason!==`none`?KV[o.reason]||o.message:v?`No Login item of 1Password has ${v} among its websites. Add the server to the item's websites in 1Password, then find it again.`:`Type the server first.`}),y]}):null,(0,W.jsxs)(`div`,{className:`op-foot`,children:[(0,W.jsx)(`small`,{children:`Only items whose websites match the server are offered. Sideora checks the item again before signing in, keeps a reference to it, and reads the password from 1Password (kept by Sideora between reads).`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn bare op-again`,onClick:g,disabled:c||!v,title:`Look in 1Password for the items of this server`,children:[(0,W.jsx)(Gr,{size:13,className:c?`spin`:void 0}),` Find in 1Password`]})]})]})}var JV=e=>`list:${JSON.stringify({folder:e.folder,account:e.account||void 0,unread:e.unreadOnly,...e.flaggedOnly?{flagged:!0}:{}})}`;function YV(e){let[t,n]=(0,L.useState)(So.folder),[r,i]=(0,L.useState)(So.account),[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(!1),[d,f]=(0,L.useState)([]),[p,m]=(0,L.useState)(null),[h,g]=(0,L.useState)(`loading`),[_,v]=(0,L.useState)(null),[y,b]=(0,L.useState)(!1),x=(0,L.useRef)(0),S=(0,L.useRef)(0),C=(0,L.useRef)(new Map),w=(0,L.useRef)(new Map),T=e=>{let t=Date.now();for(let[e,n]of C.current)n<t&&C.current.delete(e);for(let[e,n]of w.current)n.until<t&&w.current.delete(e);let n=C.current.size?e.filter(e=>!C.current.has(e.id)):e;if(w.current.size){let{unreadOnly:e,flaggedOnly:t}=D.current;n=n.map(e=>{let t=w.current.get(e.id);return t?{...e,...t.isRead===void 0?{}:{isRead:t.isRead},...t.isFlagged===void 0?{}:{isFlagged:t.isFlagged}}:e}).filter(n=>!(e&&w.current.get(n.id)?.isRead===!0)&&!(t&&w.current.get(n.id)?.isFlagged===!1))}return n},E=(e,t)=>{let n=Date.now()+6e4;for(let r of e)w.current.set(r,{...w.current.get(r),...t,until:n})},D=(0,L.useRef)({folder:t,account:r,query:a,unreadOnly:s,flaggedOnly:l,cursor:p});D.current={folder:t,account:r,query:a,unreadOnly:s,flaggedOnly:l,cursor:p};let O=(0,L.useCallback)(async({append:t=!1,silent:n=!1}={})=>{if(t&&(S.current||!D.current.cursor)||gz)return;let r=++x.current;t||(S.current=r);let{folder:i,account:a,query:o,unreadOnly:s,flaggedOnly:c,cursor:l}=D.current;t?b(!0):n||g(`loading`);let u={folder:i,account:a||void 0,unread:s,...c?{flagged:!0}:{},until:t?l??void 0:void 0},d=!t&&!o?JV(D.current):null,p=!1,h=!1;d&&!n&&qs(d).then(e=>{e&&r===x.current&&!h&&(p=!0,f(T(e.items)),m(e.cursor??null),g(`ready`))});try{let e=o?await U(`search`,{...u,text:o}):await U(`list`,u);if(h=!0,r!==x.current)return;let n=T(e.items);d&&Js(d,{items:n,cursor:e.cursor??void 0}),f(e=>t?[...e,...n.filter(t=>!e.some(e=>e.id===t.id))]:n),m(e.cursor??null),v(null),g(`ready`)}catch(i){if(r!==x.current)return;i instanceof ua&&e(i.state),v(i instanceof Error?i.message:String(i)),t||n||p||(f([]),g(`error`))}finally{r===x.current&&b(!1),S.current===r&&(S.current=0)}},[e]);(0,L.useEffect)(()=>{if(h!==`ready`||D.current.query||!d.length)return;let e=setTimeout(()=>{Js(JV(D.current),{items:d,cursor:D.current.cursor??void 0})},1e3);return()=>clearTimeout(e)},[d,h]),(0,L.useEffect)(()=>{O()},[O,t,r,a,s,l]);let k=(0,L.useCallback)(e=>{So.setFolder(e),f([]),m(null),n(e)},[]),A=(0,L.useCallback)(e=>{So.setAccount(e),f([]),m(null),i(e)},[]),j=(0,L.useCallback)((e,t)=>{E(e,{isRead:t}),f(n=>t&&D.current.unreadOnly?n.filter(t=>!e.includes(t.id)):n.map(n=>e.includes(n.id)?{...n,isRead:t}:n))},[]),ee=(0,L.useCallback)((e,t)=>{E(e,{isFlagged:t}),f(n=>!t&&D.current.flaggedOnly?n.filter(t=>!e.includes(t.id)):n.map(n=>e.includes(n.id)?{...n,isFlagged:t}:n))},[]),M=(0,L.useCallback)(e=>{for(let t of e)C.current.delete(t)},[]),te=(0,L.useCallback)(e=>{for(let t of e)w.current.delete(t)},[]);return{removeItems:(0,L.useCallback)(e=>{for(let t of e)C.current.set(t,Date.now()+3e5);f(t=>t.filter(t=>!e.includes(t.id)))},[]),unhide:M,forgetChanges:te,folder:t,setFolder:k,account:r,setAccount:A,query:a,setQuery:o,unreadOnly:s,setUnreadOnly:c,flaggedOnly:l,setFlaggedOnly:u,items:d,cursor:p,status:h,error:_,loadingMore:y,load:O,patchRead:j,patchFlag:ee}}function XV({state:e}){return e?e.connected?e.daemonUp===!1?(0,W.jsxs)(`div`,{className:`notice`,children:[`The Sideora daemon is not running: no live updates, and listings are slower. Start it with`,` `,(0,W.jsx)(`code`,{children:`sideora install-daemon`}),`.`]}):null:e.error?(0,W.jsx)(`div`,{className:`notice`,children:e.error}):null:null}var ZV=`.stage.two .btn.icon[title], .stage.two .btn.icon[data-tip]`;function QV({on:e}){let[t,n]=(0,L.useState)(null);return(0,L.useEffect)(()=>{if(!e)return;let t=null,r,i=()=>{clearTimeout(r),t&&t.dataset.tip!==void 0&&(t.hasAttribute(`title`)||t.setAttribute(`title`,t.dataset.tip),delete t.dataset.tip),t=null,n(null)},a=e=>{let a=e.target?.closest?.(ZV);if(a===t)return;i();let o=a?.getAttribute(`title`);a&&o&&(t=a,a.dataset.tip=o,a.removeAttribute(`title`),r=setTimeout(()=>{let e=a.getBoundingClientRect(),t=Math.min(Math.max(e.left+e.width/2,70),window.innerWidth-70),r=e.bottom+34>window.innerHeight;n({text:o,x:t,y:r?e.top-6:e.bottom+6,above:r})},250))};return document.addEventListener(`pointerover`,a),document.addEventListener(`pointerdown`,i,!0),document.addEventListener(`keydown`,i,!0),document.addEventListener(`scroll`,i,!0),window.addEventListener(`blur`,i),()=>{document.removeEventListener(`pointerover`,a),document.removeEventListener(`pointerdown`,i,!0),document.removeEventListener(`keydown`,i,!0),document.removeEventListener(`scroll`,i,!0),window.removeEventListener(`blur`,i),i()}},[e]),t?(0,W.jsx)(`div`,{className:`tip${t.above?` above`:``}`,role:`tooltip`,style:{left:t.x,top:t.y},children:t.text}):null}function $V({section:e,onGo:t,unread:n,hasCalendar:r,invitations:i,labeled:a=!1,place:o,bell:s}){let c=(n,r,i,o,s=``,c=r)=>(0,W.jsxs)(`button`,{type:`button`,className:`rail-item`,"aria-current":e===n?`page`:void 0,onClick:()=>t(n),title:o?`${r} · ${o} ${s}`:r,"aria-label":o?`${r}, ${o} ${s}`:r,children:[(0,W.jsxs)(`span`,{className:`rail-icon`,children:[i,o&&(0,W.jsx)(`span`,{className:`rail-badge`,"aria-hidden":`true`,children:o})]}),a&&(0,W.jsx)(`span`,{className:`rail-label`,"aria-hidden":`true`,children:c})]});return(0,W.jsxs)(`nav`,{className:`rail${a?` labeled`:``}`,"aria-label":`Sections`,children:[c(`home`,`Home (0)`,(0,W.jsx)(Sn,{size:19}),void 0,``,`Home`),c(`mail`,`Mail (1)`,(0,W.jsx)(ar,{size:19}),n>0?n>=100?`99+`:String(n):void 0,`unread`,`Mail`),r&&c(`calendar`,`Calendar (2)`,(0,W.jsx)(it,{size:19}),i>0?String(i):void 0,i===1?`invitation to answer`:`invitations to answer`,`Calendar`),c(`notes`,`Notes (6)`,(0,W.jsx)(_r,{size:19}),void 0,``,`Notes`),c(`people`,`People (5)`,(0,W.jsx)(Zi,{size:19}),void 0,``,`People`),c(`files`,`Files (3)`,(0,W.jsx)(gn,{size:19}),void 0,``,`Files`),h.ai&&c(`assistant`,`Assistant (7)`,(0,W.jsx)(hi,{size:19}),void 0,``,`Assistant`),(0,W.jsx)(`span`,{className:`grow`}),s,h.sidePanel?v?(0,W.jsxs)(`button`,{type:`button`,className:`rail-item`,onClick:()=>p(),title:`Back to the side panel`,"aria-label":`Back to the side panel`,children:[(0,W.jsx)(`span`,{className:`rail-icon`,children:(0,W.jsx)(xr,{size:18})}),a&&(0,W.jsx)(`span`,{className:`rail-label`,"aria-hidden":`true`,children:`Side panel`})]}):(0,W.jsxs)(`button`,{type:`button`,className:`rail-item`,onClick:()=>{M(o??`#/${e}`).catch(()=>{})},title:`Open in a tab: wider, list and mail side by side`,"aria-label":`Open in a tab`,children:[(0,W.jsx)(`span`,{className:`rail-icon`,children:(0,W.jsx)(_i,{size:18})}),a&&(0,W.jsx)(`span`,{className:`rail-label`,"aria-hidden":`true`,children:`Open in tab`})]}):null,E.state()===`on`&&(0,W.jsxs)(`button`,{type:`button`,className:`rail-item`,onClick:()=>E.lockNow(),title:`Lock: ${E.how()} opens it again`,"aria-label":`Lock this device`,children:[(0,W.jsx)(`span`,{className:`rail-icon`,children:(0,W.jsx)($n,{size:18})}),a&&(0,W.jsx)(`span`,{className:`rail-label`,"aria-hidden":`true`,children:`Lock`})]}),c(`settings`,`Settings (4): rules and quiet hours`,(0,W.jsx)(ai,{size:19}),void 0,``,`Settings`)]})}function eH({onUsed:e}){let t=mI();return t.length?(0,W.jsx)(`div`,{className:`codes`,role:`group`,"aria-label":`Verification codes that just arrived`,children:t.slice(0,2).map(t=>(0,W.jsx)(tH,{code:t,onUsed:e},t.id))}):null}function tH({code:e,onUsed:t}){let[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(!1),c=async(t=!1)=>{let n=await _I(e.code);return n?(r(!0),setTimeout(()=>r(!1),2500)):t||K.error(`the browser did not allow it. Select the code and copy it yourself.`,`Could not copy the code: `),n},l=async n=>{if(!e.site||i)return;s(!1),a(!0);let r=await C(e.code,e.site,n);if(a(!1),!r.ok&&r.why===`ask`){s(!0);return}if(r.ok){K.show({kind:`ok`,text:n===`all`?`Code typed on ${r.host}. Codes now fill on every site: Settings, Verification codes, to change it.`:`Code typed on ${r.host}.`,duration:n===`all`?7e3:void 0}),pI.dismiss(e.id),t(e.id),U(`markRead`,{id:e.id,read:!0}).catch(()=>{}),g(e.id,r.host);return}if(r.why===`denied`){K.show({text:n===`all`?`Not typed: Chrome was not allowed every site. Copy still works.`:`Not typed: Sideora was not allowed on ${e.site}. Copy still works.`,duration:6e3});return}if(r.why===`elsewhere`){K.show({text:`Not typed: the page in front is not on ${e.site}, where this code is from. If you did not expect that, do not enter the code on this page.${n===`all`?` Codes fill on every site from now on (Settings, Verification codes, changes it).`:``}`,duration:1e4});return}let o=await c(!0)?` It is copied: paste it in the page.`:``;r.why===`nofield`?K.show({text:`No field for a code was found on ${e.site}.${o}`,duration:7e3}):K.error(`${r.detail??`the page could not be reached`}.${o}`,`Could not type the code: `)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`code-row`,title:e.subject,children:[(0,W.jsx)(In,{size:15,className:`code-icon`,"aria-hidden":`true`}),(0,W.jsx)(`span`,{className:`code-from`,children:e.from}),(0,W.jsx)(`span`,{className:`code-value`,children:gI(e.code)}),h.fillCodes&&e.site&&!v&&(0,W.jsxs)(`button`,{type:`button`,className:`btn primary code-act`,onClick:()=>l(),disabled:i,title:`Type it into the page in front, if it is on ${e.site}`,"aria-label":`Type the code ${e.code} into the page of ${e.site}`,children:[i?(0,W.jsx)(H,{size:14,className:`spin`}):(0,W.jsx)(Fi,{size:14}),` Fill`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn code-act${e.site?` second`:` primary`}`,onClick:()=>c(),title:`Copy the code`,"aria-label":`Copy the code ${e.code} from ${e.from}`,children:n?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(V,{size:14}),` `,(0,W.jsx)(`span`,{children:`Copied`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(Ut,{size:14}),` `,(0,W.jsx)(`span`,{children:`Copy`})]})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>pI.dismiss(e.id),title:`Hide this code`,"aria-label":`Hide the code from ${e.from}`,children:(0,W.jsx)(la,{size:14})})]}),o&&e.site&&(0,W.jsxs)(`div`,{className:`code-ask`,role:`group`,"aria-label":`Where Sideora may type codes`,children:[(0,W.jsx)(`span`,{className:`code-ask-text`,children:`Let Sideora type codes on`}),(0,W.jsx)(`button`,{type:`button`,className:`btn primary code-act`,onClick:()=>l(`site`),title:`Allow ${e.site} alone: Chrome asks next`,children:e.site}),(0,W.jsx)(`button`,{type:`button`,className:`btn code-act`,onClick:()=>l(`all`),title:`Allow every site, so that no site asks again: Chrome asks next (Settings, Verification codes, changes it)`,children:`Every site`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>s(!1),title:`Not now`,"aria-label":`Not now`,children:(0,W.jsx)(la,{size:14})})]})]})}var nH=`mw:quick-replies`,rH=new Set;function iH(){try{let e=localStorage.getItem(nH);return e!==`off`&&e!==`"off"`&&e!==`false`}catch{return!0}}function aH(e){try{e?localStorage.removeItem(nH):localStorage.setItem(nH,`off`)}catch{}for(let e of rH)e()}function oH(e){return rH.add(e),()=>{rH.delete(e)}}var sH=(e=>b.find(t=>t.id===e))(`ollama-local`),cH=b.filter(e=>!e.keyOptional&&e.id!==`ollama-cloud`),lH=`This sign-in is unofficial: it uses your subscription the way the provider’s own command-line tool does. The provider can stop it working, and it may be against its terms. An API key is the supported way.`;function uH(e){return e.kind===`chatgpt`?`Signed in with your ChatGPT plan`:e.kind===`anthropic`?e.auth===`key`?`Anthropic API key ${e.keyHint}`:`Signed in with your Claude plan`:e.auth===`device-key`?`Signed in to Ollama${e.keyHint?` as ${e.keyHint}`:``}`:e.kind===`chrome-builtin`?`Built into Chrome: nothing leaves this computer`:e.hasKey?`API key ${e.keyHint} · ${e.baseUrl}`:e.baseUrl}var dH=new Map,fH=e=>`${e.id}:${e.revision}`,pH=new Set,mH=`mw:ai-last-active`;function hH({onEditing:e,startAdding:t=!1}={}){let[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(t),[c,l]=(0,L.useState)(null),[,u]=(0,L.useState)(0);(0,L.useEffect)(()=>{let e=()=>u(e=>e+1);return pH.add(e),()=>{pH.delete(e)}},[]);let d=(0,L.useRef)(null),f=(0,L.useCallback)(()=>{let e=c;s(!1),l(null),requestAnimationFrame(()=>d.current?.querySelector(e?`[data-conn="${CSS.escape(e)}"]`:`.ai-add`)?.focus())},[c]),p=o||c!=null;(0,L.useEffect)(()=>{if(e?.(p?f:null),!p)return;let t=e=>{e.key===`Escape`&&!e.defaultPrevented&&!DI.isOpen()&&(e.preventDefault(),f())};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t),e?.(null)}},[p,f,e]);let h=(0,L.useCallback)(async()=>{try{let e=await m.get();return r(e),a(null),eP.refresh(),e}catch(e){return a(e instanceof Error?e.message:String(e)),null}},[]);(0,L.useEffect)(()=>{h()},[h]);let g=async(e,t)=>{try{let n=await e();n.ok||K.show({kind:`error`,duration:7e3,text:`Could not ${t}: ${n.error??`refused`}`})}catch(e){K.error(e,`Could not ${t}: `)}await h()},_=async e=>{let t=t=>{dH.set(fH(e),t);for(let e of pH)e()};t({state:`running`});let n=Date.now();try{let r=await m.chat({system:`This is a connection test. Answer with one short sentence.`,messages:[{role:`user`,content:`Say that you are ready.`}],maxTokens:200,reasoning:`off`,timeoutMs:45e3,connectionId:e.id,connectionRevision:e.revision}),i=`${((Date.now()-n)/1e3).toFixed(1)} s`;r.ok?t({state:`ok`,text:r.text?.trim()?`Answered in ${i}${r.model?` (${r.model})`:``}: “${r.text.trim().slice(0,140)}”`:`Answered in ${i}, without any text${r.stopReason?` (it stopped: ${r.stopReason})`:``}.`}):t({state:`failed`,text:r.error??`It did not answer.`})}catch(e){t({state:`failed`,text:e instanceof Error?e.message:String(e)})}},v=e=>dH.get(fH(e))??null,y=n?.connections.find(e=>e.id===n.activeId)??null,b=e=>{if(!n)return;if(!e){g(()=>m.setActive(null),`turn AI off`);return}let t=null;try{t=localStorage.getItem(mH)}catch{}let r=n.connections.find(e=>e.id===t&&e.model)??n.connections.find(e=>e.model);r&&x(r.id,`turn AI on`)},x=(e,t)=>{try{localStorage.setItem(mH,e)}catch{}return g(()=>m.setActive(e),t)},S=y?v(y):null;return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`div`,{className:`set-head`,children:(0,W.jsx)(`h2`,{className:`dup`,children:`AI models`})}),(0,W.jsx)(`p`,{className:`set-hint`,children:`The model in use writes, summarizes and answers in conversations. Its provider sees what you ask it and the mail you ask about; keys stay on this computer, encrypted.`}),i&&(0,W.jsxs)(`p`,{className:`set-note`,children:[`The AI connections could not be read: `,i]}),n&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`set-rows ai-top`,children:[(0,W.jsxs)(`div`,{className:`set-row static`,children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:`AI`}),(0,W.jsx)(`span`,{className:`set-row-value`,children:y?``:n.connections.length?`Off`:`No connection yet`}),(0,W.jsx)(`button`,{type:`button`,className:`switch`,role:`switch`,"aria-checked":!!y,"aria-label":`AI`,disabled:!y&&!n.connections.some(e=>e.model),onClick:()=>b(!y)})]}),y&&(0,W.jsxs)(`div`,{className:`set-row static ai-current`,children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:`In use`}),(0,W.jsxs)(`span`,{className:`set-row-value`,children:[y.label,y.model?` · ${y.model}`:``]}),S&&S.state!==`running`&&(0,W.jsx)(`span`,{className:`ai-dot ${S.state}`,role:`img`,title:S.text,"aria-label":S.state===`ok`?`Works`:`Failed`})]})]}),(0,W.jsxs)(`section`,{className:`set-group`,"aria-label":`Connections`,children:[(0,W.jsx)(`h2`,{children:`Connections`}),(0,W.jsxs)(`div`,{className:`set-rows ai-list`,ref:d,children:[n.connections.map(e=>c===e.id?(0,W.jsx)(_H,{c:e,active:n.activeId===e.id,result:v(e),onTest:()=>_(e),onClose:f,onUse:()=>x(e.id,`use this connection`),onModel:t=>g(()=>m.saveConnection({id:e.id,kind:e.kind,protocol:e.protocol,label:e.label,baseUrl:e.baseUrl,model:t,apiKeyMode:`keep`}),`change the model`),onRemove:()=>{l(null),requestAnimationFrame(()=>d.current?.querySelector(`.ai-add`)?.focus()),g(()=>m.deleteConnection(e.id),`remove the connection`)}},e.id):(0,W.jsxs)(`button`,{type:`button`,className:`set-row`,"data-conn":e.id,onClick:()=>l(e.id),"aria-expanded":`false`,"aria-label":`${e.label}: ${e.model||`no model`}${n.activeId===e.id?`, in use`:``}${v(e)?.state===`ok`?`, works`:v(e)?.state===`failed`?`, its test failed`:``}`,children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:e.label}),n.activeId===e.id&&(0,W.jsx)(`span`,{className:`tag accent`,children:`In use`}),(0,W.jsx)(`span`,{className:`set-row-value`,children:e.model||`No model`}),v(e)?.state===`ok`&&(0,W.jsx)(V,{size:14,className:`ai-ok`,"aria-label":`Works`}),v(e)?.state===`failed`&&(0,W.jsx)(yt,{size:14,className:`ai-bad`,"aria-label":`Failed`}),(0,W.jsx)(ht,{size:15,"aria-hidden":`true`})]},e.id)),o?(0,W.jsx)(`div`,{className:`ai-adding`,children:(0,W.jsx)(yH,{onDone:async e=>{if(s(!1),!e)return;let t=await h(),n=t?.connections.find(e=>e.id===t.activeId&&!e.model);n&&l(n.id)}})}):(0,W.jsxs)(`button`,{type:`button`,className:`set-row ai-add`,onClick:()=>{l(null),s(!0)},children:[(0,W.jsx)(Lr,{size:14}),` Add a connection`]})]})]}),(0,W.jsx)(gH,{})]})]})}function gH(){let[e,t]=(0,L.useState)(iH);return(0,L.useEffect)(()=>oH(()=>t(iH())),[]),(0,W.jsxs)(`section`,{className:`set-group`,"aria-label":`Quick replies`,children:[(0,W.jsxs)(`label`,{className:`set-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:e,onChange:e=>aH(e.target.checked)}),` Offer quick replies under a mail that asks something of you`]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`A short pause on a recent mail in your inbox asks the model in use for two or three answers, once per mail; only that mail is sent to it, without its attachments.`})]})}function _H({c:e,active:t,result:n,onTest:r,onClose:i,onUse:a,onModel:o,onRemove:s}){let[c,l]=(0,L.useState)(null),[u,d]=(0,L.useState)(null),f=(0,L.useRef)(!1),p=async()=>{if(f.current)return;f.current=!0;let t=await m.listModels({kind:e.kind,baseUrl:e.baseUrl,apiKey:``,id:e.id}).catch(e=>({ok:!1,error:e.message,data:void 0}));t.ok&&t.data?.length?l(t.data):(d(t.error?`Its models could not be listed: ${t.error}`:`It lists no models.`),f.current=!1)},h=c?.some(t=>t.id===e.model)||!e.model?c??[]:[{id:e.model,name:e.model},...c??[]],g=(0,L.useRef)(null);(0,L.useEffect)(()=>{t&&(!document.activeElement||document.activeElement===document.body)&&g.current?.focus()},[t]);let _=n?.state===`running`;return(0,W.jsxs)(`div`,{className:`ai-page`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`ai-page-head`,onClick:i,"aria-expanded":`true`,title:`Close`,autoFocus:!0,children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:e.label}),t&&(0,W.jsx)(`span`,{className:`tag accent`,children:`In use`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(dt,{size:15,"aria-hidden":`true`})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Model`}),(0,W.jsxs)(`select`,{value:e.model,onFocus:p,onMouseDown:p,onChange:e=>o(e.target.value),"aria-label":`Model of ${e.label}`,children:[!e.model&&(0,W.jsx)(`option`,{value:``,children:`Choose a model`}),h.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name||e.id},e.id))]}),u&&(0,W.jsx)(`small`,{className:`ai-note`,children:u})]}),(0,W.jsx)(`p`,{className:`ai-meta`,children:uH(e)}),(0,W.jsxs)(`div`,{className:`ai-test`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>{_||r()},"aria-disabled":_,disabled:!e.model,title:`Ask this model for a few words, to see that the connection works`,children:_?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Testing…`]}):`Test`}),n&&n.state!==`running`&&(0,W.jsxs)(`span`,{className:`ai-result ${n.state}`,role:`status`,children:[n.state===`ok`?(0,W.jsx)(V,{size:13}):(0,W.jsx)(yt,{size:13}),(0,W.jsx)(`span`,{children:n.text})]})]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(co,{onDiscard:s,title:`Remove ${e.label}`,confirmLabel:`Remove`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,ref:g,onClick:i,children:`Done`}),!t&&(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:a,disabled:!e.model,children:`Use this one`})]})]})}var vH=[{title:`Sign in with a plan`,items:[{id:`claude`,name:`Claude`,about:`Pro or Max plan`},{id:`chatgpt`,name:`ChatGPT`,about:`Plus or Pro plan`},{id:`ollama-device`,name:`Ollama Cloud`,about:`Your ollama.com account`}]},{title:`Use an API key: paid per use`,items:[{id:`anthropic`,name:`Anthropic`},...cH.map(e=>({id:e.id,name:e.label}))]},{title:`Run it yourself`,items:[{id:`ollama-local`,name:`Ollama`,about:`On this computer: nothing leaves it`},{id:`custom`,name:`Other server`,about:`Any OpenAI-compatible address`}]}];function yH({onDone:e}){let[t,n]=(0,L.useState)(null),r=cH.find(e=>e.id===t),i=vH.flatMap(e=>e.items).find(e=>e.id===t)?.name;return t?(0,W.jsxs)(`div`,{className:`rule-form ai-form`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`strong`,{children:i}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>n(null),children:`Other providers`})]}),t===`claude`&&(0,W.jsx)(xH,{onDone:e}),t===`chatgpt`&&(0,W.jsx)(SH,{who:`ChatGPT`,onDone:e},`chatgpt`),t===`ollama-device`&&(0,W.jsx)(SH,{who:`Ollama`,onDone:e},`ollama`),t===`anthropic`&&(0,W.jsx)(CH,{kind:`anthropic`,name:`Anthropic`,keyUrl:`https://console.anthropic.com/settings/keys`,onDone:e},`anthropic`),r&&(0,W.jsx)(CH,{kind:`openai-compatible`,name:r.label,preset:r,keyUrl:r.keyUrl,onDone:e},r.id),t===`ollama-local`&&(0,W.jsx)(CH,{kind:`openai-compatible`,name:`Ollama`,preset:sH,local:!0,onDone:e},`local`),t===`custom`&&(0,W.jsx)(CH,{kind:`openai-compatible`,name:`the server`,custom:!0,onDone:e},`custom`)]}):(0,W.jsxs)(`div`,{className:`rule-form ai-form`,children:[(0,W.jsx)(`strong`,{children:`Add a connection`}),vH.map((e,t)=>(0,W.jsxs)(`div`,{className:`ai-group`,children:[(0,W.jsx)(`span`,{className:`ai-group-title`,children:e.title}),(0,W.jsx)(`div`,{className:`ai-cards`,children:e.items.map((e,r)=>(0,W.jsxs)(`button`,{type:`button`,className:`ai-card`,onClick:()=>n(e.id),autoFocus:t===0&&r===0,children:[(0,W.jsx)(`span`,{className:`ai-card-name`,children:e.name}),e.about&&(0,W.jsx)(`span`,{className:`ai-card-about`,children:e.about})]},e.id))})]},e.title)),(0,W.jsx)(bH,{onCancel:()=>e(!1)})]})}var bH=({children:e,onCancel:t})=>(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:`Cancel`}),e]});function xH({onDone:e}){let[t,n]=(0,L.useState)(!1),[r,i]=(0,L.useState)(null),[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(!1),l=async()=>{c(!0);let e=await m.anthropicLoginStart().catch(e=>({ok:!1,error:e.message,data:void 0}));c(!1),e.ok?(n(!0),i(e.data?.authorizeUrl&&/^https:\/\//.test(e.data.authorizeUrl)?e.data.authorizeUrl:null)):K.show({kind:`error`,duration:7e3,text:`Could not start the sign-in: ${e.error}`})},u=async()=>{c(!0);let t=await m.anthropicLoginComplete({pasted:a.trim(),label:`Claude (Pro/Max)`}).catch(e=>({ok:!1,error:e.message}));c(!1),t.ok?(K.show({kind:`ok`,text:`Signed in with Claude`}),e(!0)):K.show({kind:`error`,duration:7e3,text:`The sign-in did not complete: ${t.error}`})};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`set-hint`,children:`Opens claude.com to approve access with your Claude subscription. After you approve, it shows a code: paste it here.`}),(0,W.jsx)(`p`,{className:`set-note`,children:lH}),t&&r&&(0,W.jsxs)(`p`,{className:`set-hint`,children:[`The page did not open? `,(0,W.jsx)(`a`,{className:`link`,href:r,target:`_blank`,rel:`noopener noreferrer`,children:`Open claude.com to approve`}),`.`]}),t&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Code from claude.com`}),(0,W.jsx)(`input`,{type:`text`,value:a,onChange:e=>o(e.target.value),autoFocus:!0,spellCheck:!1,autoComplete:`off`,onKeyDown:e=>{e.key===`Enter`&&a.trim()&&(e.preventDefault(),u())}})]}),(0,W.jsx)(bH,{onCancel:()=>e(!1),children:t?(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:u,disabled:s||!a.trim(),children:[s&&(0,W.jsx)(H,{size:14,className:`spin`}),` Connect`]}):(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:l,disabled:s,children:[s&&(0,W.jsx)(H,{size:14,className:`spin`}),` Sign in with Claude`]})})]})}function SH({who:e,onDone:t}){let[n,r]=(0,L.useState)(null),[i,a]=(0,L.useState)(!1),o=(0,L.useRef)(void 0),s=(0,L.useRef)(!0);(0,L.useEffect)(()=>()=>{s.current=!1,clearTimeout(o.current)},[]);let c=n=>{o.current=setTimeout(async()=>{if(!s.current)return;let i=await(e===`ChatGPT`?m.chatgptLoginPoll(``):m.ollamaLoginPoll(``)).catch(e=>({ok:!1,error:e.message,data:void 0}));s.current&&(i.ok?i.data?.status===`created`?(K.show({kind:`ok`,text:`Signed in with ${e}`}),t(!0)):c(Math.min(n*1.2,15e3)):(r(null),K.show({kind:`error`,duration:7e3,text:`The sign-in did not complete: ${i.error}`})))},n)};return(0,W.jsxs)(W.Fragment,{children:[e===`ChatGPT`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{className:`set-hint`,children:`Opens ChatGPT to approve access with your Plus or Pro plan: enter the code shown here. “Device code authorization for Codex” must be on in ChatGPT’s security settings first.`}),(0,W.jsx)(`p`,{className:`set-note`,children:lH})]}):(0,W.jsx)(`p`,{className:`set-hint`,children:`Opens ollama.com to connect this browser to your Ollama account: press Connect there. No key to copy.`}),n&&(0,W.jsxs)(`p`,{className:`ai-wait`,children:[(0,W.jsx)(H,{size:14,className:`spin`}),(0,W.jsxs)(`span`,{children:[n.code&&(0,W.jsxs)(W.Fragment,{children:[`Enter `,(0,W.jsx)(`code`,{className:`ai-code`,children:n.code}),` on the page that opened. `]}),`Waiting for your approval… `,(0,W.jsxs)(`a`,{href:n.url,target:`_blank`,rel:`noreferrer`,children:[`Open the page again `,(0,W.jsx)($t,{size:11})]})]})]}),(0,W.jsx)(bH,{onCancel:()=>t(!1),children:!n&&(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:async()=>{a(!0);try{if(e===`ChatGPT`){let e=await m.chatgptLoginStart();if(!e.ok||!e.data)throw Error(e.error??`refused`);r({url:e.data.verifyUrl,code:e.data.userCode}),c(5e3)}else{let e=await m.ollamaLoginStart(`Sideora (Chrome)`);if(!e.ok||!e.data)throw Error(e.error??`refused`);r({url:e.data.connectUrl}),c(e.data.pollMs||2e3)}}catch(e){K.error(e,`Could not start the sign-in: `)}finally{a(!1)}},disabled:i,children:[i&&(0,W.jsx)(H,{size:14,className:`spin`}),` Sign in with `,e]})})]})}function CH({kind:e,name:t,preset:n,keyUrl:r,local:i,custom:s,onDone:c}){let[l,u]=(0,L.useState)({}),[d,f]=(0,L.useState)(i?n?.baseUrl??``:``),[p,h]=(0,L.useState)(``),[g,_]=(0,L.useState)(n?.defaultModel??``),[v,y]=(0,L.useState)(null),[b,x]=(0,L.useState)(null),C=n?.fields??[],w=C.every(e=>l[e.name]?.trim()),T=e===`anthropic`?``:i||s?d.trim()?o(d):``:C.reduce((e,t)=>e.replace(`{${t.name}}`,encodeURIComponent(l[t.name]?.trim()??``)),n?.baseUrl??``),E=(e===`anthropic`||!!T&&w)&&(!(!i&&!s)||!!p.trim());return(0,W.jsxs)(W.Fragment,{children:[i&&(0,W.jsx)(`p`,{className:`set-hint`,children:`Nothing leaves this computer: the model is asked by Sideora, at this address as the computer it runs on sees it.`}),C.map(e=>(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:e.label}),(0,W.jsx)(`input`,{type:`text`,value:l[e.name]??``,onChange:t=>u(n=>({...n,[e.name]:t.target.value})),spellCheck:!1,autoComplete:`off`})]},e.name)),(i||s)&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Address`}),(0,W.jsx)(`input`,{type:`text`,value:d,onChange:e=>f(e.target.value),placeholder:`https://server.example/v1`,spellCheck:!1,autoComplete:`off`}),s&&(0,W.jsxs)(`small`,{children:[`The API root: what comes before `,(0,W.jsx)(`code`,{children:`/chat/completions`}),`.`]})]}),!i&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsxs)(`span`,{children:[`API key`,s?` (if it needs one)`:``]}),(0,W.jsx)(`input`,{type:`password`,value:p,onChange:e=>h(e.target.value),spellCheck:!1,autoComplete:`off`}),r&&(0,W.jsx)(`small`,{children:(0,W.jsxs)(`a`,{href:r,target:`_blank`,rel:`noreferrer`,children:[`Get a key from `,t,` `,(0,W.jsx)($t,{size:11})]})})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Model`}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[v?.length?(0,W.jsx)(`select`,{value:g,onChange:e=>_(e.target.value),"aria-label":`Model`,children:v.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name||e.id},e.id))}):(0,W.jsx)(`input`,{type:`text`,value:g,onChange:e=>_(e.target.value),placeholder:`The model's name`,spellCheck:!1,autoComplete:`off`,"aria-label":`Model`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:async()=>{x(`models`);try{if(!await S(T))throw Error(`the extension was not allowed to reach that server`);let t=await m.listModels({kind:e,baseUrl:T,apiKey:p.trim()});if(!t.ok)throw Error(t.error??`refused`);y(t.data??[]),t.data?.length&&!t.data.some(e=>e.id===g)&&_(t.data[0].id),t.data?.length||K.show({text:`It lists no models: type the name of one.`})}catch(e){K.error(e,`Could not list ${t}'s models: `)}finally{x(null)}},disabled:!E||!!b,children:[b===`models`&&(0,W.jsx)(H,{size:14,className:`spin`}),` List models`]})]})]}),(0,W.jsx)(bH,{onCancel:()=>c(!1),children:(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,onClick:async()=>{x(`save`);try{if(!await S(T))throw Error(`the extension was not allowed to reach that server`);let t=await m.saveConnection({kind:e,protocol:n?.protocol,label:a(e,T),baseUrl:T,model:g.trim(),apiKeyMode:p.trim()?`set`:`clear`,apiKey:p.trim()||void 0,makeActive:!0});if(!t.ok)throw Error(t.error??`refused`);K.show({kind:`ok`,text:`Connection added, and in use`}),c(!0)}catch(e){K.error(e,`Could not add the connection: `)}finally{x(null)}},disabled:!E||!g.trim()||!!b,children:[b===`save`&&(0,W.jsx)(H,{size:14,className:`spin`}),` Add`]})})]})}var wH={width:240,height:96},TH=61440,EH=5242880,DH=[`image/png`,`image/jpeg`,`image/gif`,`image/webp`,`image/svg+xml`],OH=DH.join(`,`),kH=e=>`${Math.ceil(e/1024)} KB`,AH=e=>{let t=e.slice(e.indexOf(`,`)+1);return Math.floor(t.length*3/4)-(t.endsWith(`==`)?2:+!!t.endsWith(`=`))};function jH(e){let t=URL.createObjectURL(e);return new Promise((n,r)=>{let i=new Image;i.onload=()=>n(i),i.onerror=()=>r(Error(`${e.name||`This file`} could not be read as a picture`)),i.src=t}).finally(()=>URL.revokeObjectURL(t))}function MH(e,t,n=wH){let r=Math.min(1,n.width/e,n.height/t);return{width:Math.max(1,Math.round(e*r)),height:Math.max(1,Math.round(t*r))}}async function NH(e,t=wH){let n=e.name||`This file`;if(!DH.includes(e.type))throw Error(`${n} is not a picture that can go in a signature: use a PNG, JPEG, GIF, WebP or SVG`);if(e.size>5242880)throw Error(`${n} is over ${EH/1024/1024} MB: pick a smaller picture`);let r=await jH(e),i=r.naturalWidth||t.width,a=r.naturalHeight||t.height;if(i<4||a<4)throw Error(`${n} is too small to be seen`);let o=MH(i,a,t),s=e.type===`image/svg+xml`,c=document.createElement(`canvas`),l=c.getContext(`2d`);if(!l)throw Error(`pictures cannot be made smaller here`);let u=1/0;for(let e of[2,1]){let t=s?e:Math.min(e,i/o.width);c.width=Math.max(1,Math.round(o.width*t)),c.height=Math.max(1,Math.round(o.height*t));for(let[e,t]of[[`image/png`],[`image/jpeg`,.9],[`image/jpeg`,.8],[`image/jpeg`,.7]]){l.clearRect(0,0,c.width,c.height),e===`image/jpeg`&&(l.fillStyle=`#ffffff`,l.fillRect(0,0,c.width,c.height)),l.imageSmoothingQuality=`high`,l.drawImage(r,0,0,c.width,c.height);let i;try{i=c.toDataURL(e,t)}catch{throw Error(`${n} could not be read as a picture`)}let a=AH(i);if(a<=61440)return{src:i,...o};u=Math.min(u,a)}if(c.width===o.width)break}throw Error(`${n} is still ${kH(u)} once made small, over ${kH(TH)}: use a simpler picture (a logo with few colours)`)}var PH=new Map;function FH(e){let t=PH.get(e);if(t!==void 0)return t;t=null;try{let n=/^data:image\/(png|jpeg|gif);base64,/.exec(e);if(n){let r=atob(e.slice(n[0].length)),i=e=>r.charCodeAt(e),a=e=>i(e)<<8|i(e+1);if(n[1]===`png`&&r.length>24&&(t={width:a(16)<<16|a(18),height:a(20)<<16|a(22)}),n[1]===`gif`&&r.length>10&&(t={width:i(6)|i(7)<<8,height:i(8)|i(9)<<8}),n[1]===`jpeg`)for(let e=2;e+9<r.length&&i(e)===255;){let n=i(e+1);if(n>=192&&n<=207&&n!==196&&n!==200&&n!==204){t={width:a(e+7),height:a(e+5)};break}e+=2+a(e+2)}!t||t.width&&t.height||(t=null)}}catch{t=null}return PH.size>50&&PH.clear(),PH.set(e,t),t}var IH={name:``,title:``,company:``,phone:``,email:``,website:``,address:``,logo:``},LH=[`name`,`title`,`company`,`phone`,`email`,`website`,`address`],RH=e=>LH.some(t=>e[t].trim()),zH=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`).replace(/"/g,`"`);function BH(e){let t=/^(.*?)(?:\s*(?:ext\.?|extension|x|#|,|;)\s*(\d{1,6}))?\s*$/i.exec(e.trim()),n=(t?.[1]??``).replace(/^(\+\d{1,3})\s*\(0\)/,`$1`).replace(/[^\d+]/g,``);return/^\+?\d{3,20}$/.test(n)?t?.[2]?`${n};ext=${t[2]}`:n:null}function VH(e){let t=e.trim();if(!t||/^[a-z][a-z0-9+.-]*:/i.test(t)&&!/^https?:\/\//i.test(t))return null;try{let e=new URL(/^https?:\/\//i.test(t)?t:`https://${t}`);return!/^https?:$/.test(e.protocol)||!e.hostname.includes(`.`)||e.username||e.password?null:{href:e.href,label:t.replace(/^https?:\/\//i,``).replace(/\/$/,``)}}catch{return null}}var HH=e=>{let t=VH(e.website);return{name:e.name.trim()?`<strong>${zH(e.name.trim())}</strong>`:``,role:[e.title.trim(),e.company.trim()].filter(Boolean).map(zH).join(`, `),phone:e.phone.trim()?BH(e.phone)?`<a href="tel:${zH(BH(e.phone))}">${zH(e.phone.trim())}</a>`:zH(e.phone.trim()):``,email:/^[^\s@<>"]+@[^\s@<>"]+\.[^\s@<>"]+$/.test(e.email.trim())?`<a href="mailto:${zH(encodeURIComponent(e.email.trim()).replace(/%40/g,`@`))}">${zH(e.email.trim())}</a>`:zH(e.email.trim()),site:t?`<a href="${zH(t.href)}">${zH(t.label)}</a>`:zH(e.website.trim()),address:zH(e.address.trim())}},UH=(...e)=>{let t=e.filter(Boolean);return t.length?`<p>${t.join(` | `)}</p>`:``},WH={width:180,height:80};function GH(e,t=wH){if(!e.logo)return``;let n=FH(e.logo);if(!n)return``;let{width:r,height:i}=MH(n.width,n.height,t);return`<img src="${zH(e.logo)}" width="${r}" height="${i}" alt="${zH(e.company.trim()||e.name.trim()||`Logo`)}">`}var KH=e=>{let t=HH(e);return[t.name&&`<p>${t.name}</p>`,t.role&&`<p>${t.role}</p>`,UH(t.phone,t.email),UH(t.site),t.address&&`<p>${t.address}</p>`].filter(Boolean).join(``)},qH=[{id:`classic`,name:`Classic`,label:`Classic: a line each`,make:KH},{id:`compact`,name:`Compact`,label:`Compact: two lines`,make:e=>{let t=HH(e);return[UH(t.name,t.role),UH(t.phone,t.email,t.site),UH(t.address)].filter(Boolean).join(``)}},{id:`regards`,name:`With regards`,label:`With "Best regards" above`,make:e=>{if(!RH(e))return``;let t=HH(e);return[`<p>Best regards,</p>`,t.name&&`<p>${t.name}</p>`,t.role&&`<p>${t.role}</p>`,UH(t.phone,t.email,t.site),UH(t.address)].filter(Boolean).join(``)}},{id:`logo-left`,name:`Logo beside`,label:`Logo beside: a line each`,logo:!0,make:e=>{let t=GH(e,WH),n=KH(e);return t&&n?`<table><tbody><tr><td>${t}</td><td>${n}</td></tr></tbody></table>`:t?`<p>${t}</p>`:n}},{id:`logo-above`,name:`Logo above`,label:`Logo above: a line each`,logo:!0,make:e=>{let t=GH(e);return[t&&`<p>${t}</p>`,KH(e)].filter(Boolean).join(``)}}],JH=(e,t)=>qH.filter(n=>!n.logo||!!e.logo||n.id===t),YH=e=>e?qH.find(t=>t.id===e):void 0,XH=[[`name`,`Name`],[`title`,`Title`],[`company`,`Company`],[`phone`,`Phone`],[`email`,`Email`],[`website`,`Website`],[`address`,`Address`]],ZH=e=>e instanceof Error?e.message:String(e),QH=`:new`,$H=`:details`;function eU(e){if(e.details)return{...IH,...e.details};let t=e.accounts.find(t=>t.account===e.defaultAccount)??e.accounts[0];return{...IH,name:t?.name??``,email:t?.email??``}}var tU=e=>e.name.replace(/\.[a-z0-9]+$/i,``).replace(/[^\x20-\x7e]+/g,` `).replace(/[_-]+/g,` `).replace(/\s+/g,` `).trim().slice(0,80)||`Picture`,nU=e=>e.replace(/&/g,`&`).replace(/"/g,`"`).replace(/</g,`<`),rU=e=>e.replace(/(<p>(<br>)?<\/p>)+$/,``),iU=`PNG, JPEG, GIF, WebP or SVG; made at most ${wH.width} × ${wH.height} and ${TH/1024} KB. It goes in each mail, not as a link.`;function aU({html:e,className:t=``}){return(0,W.jsx)(`div`,{className:`sig-body sig-preview ${t}`,onClick:e=>{e.target.closest(`a`)&&e.preventDefault()},dangerouslySetInnerHTML:{__html:Sc(e)}})}function oU({onEditing:e}){let t=ac(),[n,r]=(0,L.useState)(!1),[i,a]=(0,L.useState)(null),[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(!1),u=(0,L.useRef)(null),d=(0,L.useRef)(null);(0,L.useEffect)(()=>{if(e?.(o==null?null:()=>s(null)),o==null)return;let t=e=>{e.key===`Escape`&&!DI.isOpen()&&s(null)};return document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`keydown`,t),e?.(null)}},[o,e]);let f=(0,L.useCallback)(()=>U(`signatures`).then(e=>{ic.set(e),r(!0),a(null)},e=>a(ZH(e))),[]);(0,L.useEffect)(()=>{f()},[f]);let p=(0,L.useCallback)(async(e,t)=>{l(!0);try{return ic.set(await e()),!0}catch(e){return K.error(e,`Could not ${t}: `),/no longer there|changed elsewhere/.test(ZH(e))&&(s(null),f()),!1}finally{l(!1)}},[f]),m=eU(t),h=t.signatures.filter(e=>YH(e.template)),g=()=>{let e=o;s(null),requestAnimationFrame(()=>(e===$H?d:u).current?.focus())},_=async(e,t)=>{await p(()=>U(`saveSignature`,e?{id:e.id,...t,was:{html:e.html,template:e.template??null}}:t),e?`save the signature`:`add the signature`)&&g()},v=async e=>{await p(()=>U(`removeSignature`,{id:e.id}),`delete the signature`)&&g()},y=async(e,n)=>{let r=RH(e)?e:{...eU({...t,details:null}),logo:e.logo},i=h.map(e=>({id:e.id,template:e.template,was:e.html,html:xc(YH(e.template).make(r))})),a=h.filter((e,t)=>Cc(i[t].html));a.length?K.error(Error(`${a.map(e=>`“${e.name}”`).join(`, `)} would be left empty: fill in something, or change ${a.length===1?`it`:`them`} by hand first`),`Not saved: `):await p(()=>U(`setSignatureDetails`,{details:e,was:n,signatures:i}),`save your details`)&&g()},b=async(e,t)=>{let n=await p(()=>U(`setIdentity`,{account:e,...t}),t.name===void 0?`change the signature`:`save the name`);return n&&t.name!==void 0&&iP(),n},x=new Set(t.signatures.map(e=>e.name.toLowerCase())),S=e=>{U(`signatures`).then(e=>ic.set(e),()=>{}).finally(()=>s(e))};return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`h2`,{className:`dup`,children:`Signatures`}),c&&(0,W.jsx)(H,{size:14,className:`spin dim`,"aria-label":`Saving`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,ref:u,onClick:()=>S(QH),disabled:!n||o===QH,children:[(0,W.jsx)(Lr,{size:14}),` New signature`]})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`A signature goes under what you write, above the thread you answer. Make as many as you like; each account uses one of them, or none, and a mail can be given another while you write it.`}),i?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsxs)(`p`,{children:[`The signatures could not be read: `,i]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:f,children:`Try again`})]}):n?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`div`,{className:`set-rows sig-me${o===$H?` open`:``}`,children:o===$H?(0,W.jsx)(cU,{start:m,saved:t.details,following:h,busy:c,onSave:y,onCancel:g}):(0,W.jsxs)(`button`,{type:`button`,className:`set-row`,ref:d,onClick:()=>S($H),children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:`Your details`}),(0,W.jsxs)(`span`,{className:`set-row-value`,children:[t.details?.logo&&(0,W.jsx)(`img`,{className:`sig-row-logo`,src:t.details.logo,alt:``}),t.details?[t.details.name,t.details.title,t.details.company].filter(Boolean).join(`, `)||`Filled in`:`Not filled in`]}),(0,W.jsx)(ht,{size:15,"aria-hidden":`true`})]})}),t.signatures.length===0&&o!==QH&&(0,W.jsx)(`p`,{className:`set-none`,children:`No signatures yet.`}),(0,W.jsxs)(`ul`,{className:`rules sig-list`,children:[t.signatures.map(e=>{let n=t.accounts.filter(t=>t.signature===e.id).map(e=>e.account);return(0,W.jsx)(`li`,{className:o===e.id?`open`:void 0,children:o===e.id?(0,W.jsx)(dU,{sig:e,layout:YH(e.template)?.id??null,details:m,defaultName:e.name,users:n,busy:c,onSave:t=>_(e,t),onCancel:g,onRemove:()=>v(e)}):(0,W.jsx)(`div`,{className:`rule`,children:(0,W.jsxs)(`button`,{type:`button`,className:`rule-main sig-main`,onClick:()=>S(e.id),title:`Edit this signature`,children:[(0,W.jsxs)(`span`,{className:`rule-l1`,children:[(0,W.jsx)(`span`,{className:`rule-name`,children:e.name}),n.length>0&&(0,W.jsx)(`span`,{className:`rule-sound`,children:n.join(`, `)}),(0,W.jsx)(`span`,{className:`grow`}),YH(e.template)&&(0,W.jsx)(`span`,{className:`sig-tag`,children:`Follows your details`})]}),(0,W.jsx)(`span`,{className:`rule-match`,children:wc(e.html)})]})})},e.id)}),o===QH&&(0,W.jsx)(`li`,{className:`open`,children:(0,W.jsx)(uU,{details:m,filled:!!t.details,taken:x,busy:c,onSave:e=>_(null,e),onCancel:g,onDetails:()=>s($H)})})]}),t.accounts.length>0&&(0,W.jsxs)(`div`,{className:`idents`,children:[(0,W.jsxs)(`div`,{className:`ident head`,"aria-hidden":`true`,children:[(0,W.jsx)(`span`,{children:`Account`}),(0,W.jsx)(`span`,{children:`Your name`}),(0,W.jsx)(`span`,{children:`Signature`})]}),t.accounts.map(e=>(0,W.jsx)(sU,{who:e,all:t.signatures,onChange:t=>b(e.account,t)},e.account)),(0,W.jsx)(`p`,{className:`set-hint`,children:`The name is the one your mail is from, and the one the writing help signs with. Exchange puts its directory's name on the mail itself.`})]})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})})]})}function sU({who:e,all:t,onChange:n}){let[r,i]=(0,L.useState)(e.name);return(0,L.useEffect)(()=>i(e.name),[e.name]),(0,W.jsxs)(`div`,{className:`ident`,children:[(0,W.jsx)(`span`,{className:`ident-account`,title:e.email?`${xe(e.account)}: ${e.email}`:xe(e.account),children:xe(e.account)}),(0,W.jsx)(`input`,{type:`text`,value:r,maxLength:100,placeholder:e.provider===`ews`?`Directory name`:`No name`,onChange:e=>i(e.target.value),onBlur:async()=>{let t=r.replace(/\s+/g,` `).trim();t===e.name?i(e.name):await n({name:t})||i(e.name)},onKeyDown:t=>{t.key===`Enter`&&t.currentTarget.blur(),t.key===`Escape`&&(t.stopPropagation(),i(e.name))},"aria-label":`The name ${e.account} writes as`,autoComplete:`off`,spellCheck:!1}),(0,W.jsxs)(`select`,{value:e.signature??``,onChange:e=>{n({signature:e.target.value||null})},"aria-label":`The signature of ${e.account}`,children:[(0,W.jsx)(`option`,{value:``,children:`None`}),t.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]})}function cU({start:e,saved:t,following:n,busy:r,onSave:i,onCancel:a}){let[o,s]=(0,L.useState)(e),[c]=(0,L.useState)(t),l=o.logo&&YH(`logo-left`)||qH[0],u=n.length?n.slice(0,3).map(e=>({key:e.id,label:e.name,html:YH(e.template).make(o)})):[{key:`sample`,label:`Sample (${l.name})`,html:l.make(o)}],[d,f]=(0,L.useState)(null),[p,m]=(0,L.useState)(!1),h=(0,L.useRef)(null),g=async e=>{if(e){f(null),m(!0);try{let t=await NH(e);s(e=>({...e,logo:t.src}))}catch(e){f(ZH(e))}finally{m(!1)}}},_=o.logo?FH(o.logo):null,v=_?MH(_.width,_.height):null;return(0,W.jsxs)(`form`,{className:`rule-form`,noValidate:!0,onSubmit:e=>{e.preventDefault(),r||i(o,c)},onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),a())},children:[(0,W.jsx)(`div`,{className:`set-head`,children:(0,W.jsx)(`h3`,{className:`set-sub`,children:`Your details`})}),(0,W.jsx)(`div`,{className:`sig-fields`,children:XH.map(([e,t],n)=>(0,W.jsxs)(`label`,{className:`set-field${e===`address`?` wide`:``}`,children:[(0,W.jsx)(`span`,{children:t}),(0,W.jsx)(`input`,{type:e===`email`?`email`:e===`phone`?`tel`:`text`,value:o[e],onChange:t=>s(n=>({...n,[e]:t.target.value})),maxLength:200,autoFocus:n===0,autoComplete:`off`,spellCheck:e===`title`||e===`company`||e===`address`})]},e))}),(0,W.jsxs)(`div`,{className:`set-field sig-logo-field`,children:[(0,W.jsx)(`span`,{children:`Logo`}),(0,W.jsxs)(`div`,{className:`sig-logo`,children:[o.logo?(0,W.jsx)(`img`,{className:`sig-logo-img`,src:o.logo,width:v?.width,height:v?.height,alt:`Your logo`}):(0,W.jsx)(`span`,{className:`sig-logo-none`,children:`No logo`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>h.current?.click(),disabled:p,children:[p?(0,W.jsx)(H,{size:14,className:`spin`}):(0,W.jsx)(En,{size:14}),` `,o.logo?`Change`:`Add a logo`]}),o.logo&&(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:()=>{s(e=>({...e,logo:``})),f(null)},children:`Remove`}),(0,W.jsx)(`input`,{ref:h,type:`file`,accept:OH,hidden:!0,"aria-label":`Logo file`,onChange:e=>{g(e.target.files?.[0]),e.target.value=``}})]}),d?(0,W.jsx)(`small`,{className:`sig-pic-error`,role:`alert`,children:d}):(0,W.jsx)(`small`,{children:iU})]}),u.map(e=>(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:e.label}),e.html?(0,W.jsx)(aU,{html:e.html}):(0,W.jsx)(`p`,{className:`set-hint`,children:`Nothing to show yet.`})]},e.key)),(0,W.jsx)(`small`,{className:`set-hint`,children:n.length?`${n.length===1?`“${n[0].name}” follows`:`${n.length} signatures follow`} these: saving them changes ${n.length===1?`it`:`them`} too.`:`New signature then offers layouts filled with them.`}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:a,children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:r||p,children:`Save`})]})]})}function lU(e,t){for(let n=1;;n++){let r=n===1?e:`${e} ${n}`;if(!t.has(r.toLowerCase()))return r}}function uU({details:e,filled:t,taken:n,busy:r,onSave:i,onCancel:a,onDetails:o}){let[s,c]=(0,L.useState)(null),l=JH(e),u=l.find(t=>t.make(e));if(s!==null){let t=YH(s);return(0,W.jsx)(dU,{sig:null,layout:t?.id??null,details:e,defaultName:t?lU(t.name,n):``,users:[],busy:r,onSave:i,onCancel:a,onBack:()=>c(null)})}return(0,W.jsxs)(`div`,{className:`rule-form`,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),a())},children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`h3`,{className:`set-sub`,children:`Pick a layout`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:o,children:`Edit your details`})]}),!t&&(0,W.jsx)(`p`,{className:`set-hint`,children:`Filled with what your account knows. Add your title, company, phone, a logo… in Your details, and they show here.`}),t&&!e.logo&&(0,W.jsx)(`p`,{className:`set-hint`,children:`Add a logo in Your details, and layouts with it show here.`}),(0,W.jsxs)(`div`,{className:`sig-gallery`,children:[l.map(t=>{let n=t.make(e);return(0,W.jsxs)(`div`,{className:`sig-card`,children:[n?(0,W.jsx)(aU,{html:n}):(0,W.jsx)(`p`,{className:`sig-blank`,children:`Nothing to show yet.`}),(0,W.jsx)(`button`,{type:`button`,className:`sig-card-pick`,onClick:()=>c(t.id),disabled:!n,autoFocus:t===u,children:t.name})]},t.id)}),(0,W.jsxs)(`div`,{className:`sig-card`,children:[(0,W.jsx)(`p`,{className:`sig-blank`,children:`Write your own`}),(0,W.jsx)(`button`,{type:`button`,className:`sig-card-pick`,onClick:()=>c(``),autoFocus:!u,children:`Blank`})]})]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:a,children:`Cancel`})]})]})}function dU({sig:e,layout:t,details:n,defaultName:r,users:i,busy:a,onSave:o,onCancel:s,onRemove:c,onBack:l}){let[u,d]=(0,L.useState)(r),[f,p]=(0,L.useState)(t),m=YH(f)?.make(n)??``,[h,g]=(0,L.useState)(()=>e&&!t?xc(e.html):``),[_,v]=(0,L.useState)(h),y=()=>{let t=xc(m||e?.html||``);g(t),v(t),p(null)},[b,x]=(0,L.useState)(!1),S=(0,L.useRef)(null),C=(0,L.useRef)(null),w=e=>{x(e),requestAnimationFrame(()=>(e?S:C).current?.focus())},T=!!u.trim()&&(f?!Cc(m):!Cc(_)),E=(0,L.useRef)(null),[D,O]=(0,L.useState)(0);return(0,W.jsxs)(`form`,{className:`rule-form`,onSubmit:e=>{e.preventDefault(),T&&!a&&o({name:u.trim(),html:xc(f?m:rU(_)),template:f})},onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),s())},children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Name`}),(0,W.jsx)(`input`,{type:`text`,value:u,onChange:e=>d(e.target.value),maxLength:60,placeholder:`Work, Personal…`,autoFocus:!e,spellCheck:!1,autoComplete:`off`}),(0,W.jsx)(`small`,{children:`To tell your signatures apart. It is not part of the mail.`})]}),f?(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Signature`}),(0,W.jsx)(`select`,{value:f,onChange:e=>p(e.target.value),"aria-label":`Layout`,children:JH(n,t).map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.label},e.id))}),(0,W.jsx)(aU,{html:m}),(0,W.jsxs)(`small`,{children:[`Made from your details, and changed with them. `,(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:y,children:`Change it by hand`}),`: it then no longer follows them.`]})]}):(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Signature`}),(0,W.jsx)(`div`,{className:`sig-edit`,children:(0,W.jsx)(MN,{ref:E,plain:!0,pictures:OH,onImages:async e=>{for(let t of e){O(e=>e+1);try{let e=await NH(t);E.current?.insertHtml(`<img src="${e.src}" width="${e.width}" height="${e.height}" alt="${nU(tU(t))}">`)}catch(e){K.error(e,`Not added: `)}finally{O(e=>e-1)}}},initialHtml:h,onChange:v,placeholder:`Your name, what you do, how to reach you`,autoFocus:!!e||!!t})}),(0,W.jsx)(`small`,{children:D?`Adding the picture…`:`A picture (a logo, a photo): the picture button. ${iU}`})]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[e&&c&&(b?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,onClick:c,disabled:a,children:`Delete signature`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,ref:S,onClick:()=>w(!1),children:`Keep`}),i.length>0&&(0,W.jsxs)(`span`,{className:`set-hint`,children:[i.join(`, `),` will have none.`]})]}):(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,ref:C,onClick:()=>w(!0),title:`Delete this signature`,"aria-label":`Delete this signature`,children:(0,W.jsx)(zi,{size:15})})),l&&(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:l,children:`Other layouts`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:s,children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:!T||a||D>0,children:e?`Save`:`Add signature`})]})]})}var fU=`https://my.sideora.com`,pU=e=>e instanceof Error?e.message:String(e),mU=e=>{let t=Math.round((Date.now()-e)/6e4);return t<1?`just now`:t<60?`${t} min ago`:t<1440?`${Math.round(t/60)} h ago`:`${Math.round(t/1440)} d ago`},hU=e=>{try{return new URL(e).host}catch{return e}};function gU({onEditing:e,onChange:t}){let[n,r]=(0,L.useState)(null),i=(0,L.useRef)(null);i.current=n;let[a,o]=(0,L.useState)(``),[s,c]=(0,L.useState)(!1),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(null),p=(0,L.useRef)(!0);(0,L.useEffect)(()=>{n&&t?.(n)},[n,t]);let m=(0,L.useCallback)(()=>U(`relaySettings`,{}).then(e=>{p.current&&(r(e),o(``))},e=>{p.current&&o(pU(e))}),[]);(0,L.useEffect)(()=>{p.current=!0,m();let e=setInterval(()=>{document.visibilityState===`visible`&&(i.current&&!i.current.joined&&i.current.request?.state===`pending`?U(`relayRequestCheck`,{}).then(e=>{p.current&&r(e)},()=>{}):m())},l?2e3:6e3);return()=>{p.current=!1,clearInterval(e)}},[m,l]),(0,L.useEffect)(()=>{if(!l)return;let e=!0,t=setInterval(()=>{document.visibilityState===`visible`&&U(`relayPairStatus`,{ref:l.ref}).then(t=>{e&&(t.state===`paired`?(f(t.device),u(null),m()):t.state===`gone`&&u(e=>e&&e.ref===l.ref?{...e,until:Math.min(e.until,Date.now())}:e))},()=>{})},2e3);return()=>{e=!1,clearInterval(t)}},[l,m]);let h=(0,L.useCallback)(e=>{e&&e.until>Date.now()&&U(`relayPairCancel`,{ref:e.ref}).catch(()=>{})},[]),g=(0,L.useRef)(null);g.current=l,(0,L.useEffect)(()=>()=>h(g.current),[h]);let _=(0,L.useCallback)(()=>{h(g.current),u(null)},[h]);(0,L.useEffect)(()=>{e?.(l?_:null)},[l,e,_]);let v=async e=>{c(!0),o(``);try{let t=await e();return p.current&&r(t),!0}catch(e){return p.current&&o(pU(e)),!1}finally{p.current&&c(!1)}},y=async(e=!1)=>{if(n?.joined){c(!0),o(``),f(null),h(g.current);try{let t=await U(`relayPairLink`,{limited:e});u({...t,until:Date.now()+t.minutes*6e4})}catch(e){o(pU(e))}finally{c(!1)}}};if(!n)return a?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsx)(`p`,{children:a}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>void m(),children:`Try again`})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})});if(!n.joined)return n.request?(0,W.jsx)(vU,{r:n.request,busy:s,error:a,onConfirm:e=>v(()=>U(`relayRequestConfirm`,{code:e})),onResend:()=>{c(!0),o(``),U(`relayRequestResend`,{}).then(e=>{e.sent||o(`The code could not be sent; try again in a minute.`)},e=>o(pU(e))).finally(()=>c(!1))},onCancel:()=>v(()=>U(`relayRequestCancel`,{}))}):(0,W.jsx)(_U,{busy:s,error:a,onAsk:e=>v(()=>U(`relayRequest`,e)),onJoin:(e,t)=>v(()=>U(`relayJoin`,{url:e,code:t}))});let b=n.connection;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`p`,{className:`od-state od-${b.state}`,role:`status`,children:[(0,W.jsx)(`span`,{className:`od-dot`,"aria-hidden":`true`}),b.state===`connected`?(0,W.jsxs)(W.Fragment,{children:[`Reachable at `,(0,W.jsx)(`strong`,{children:hU(n.url)})]}):b.state===`connecting`?(0,W.jsxs)(W.Fragment,{children:[`Connecting to `,(0,W.jsx)(`strong`,{children:hU(n.url)}),`…`]}):b.state===`refused`?(0,W.jsxs)(W.Fragment,{children:[`Refused by `,(0,W.jsx)(`strong`,{children:hU(n.url)}),b.why?`: ${b.why}`:``]}):(0,W.jsxs)(W.Fragment,{children:[`Joined to `,(0,W.jsx)(`strong`,{children:hU(n.url)}),`, not connected: the web app is not running. Start it with `,(0,W.jsx)(`code`,{children:`sideora web install`}),`.`]})]}),!l&&(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,disabled:s,onClick:()=>void y(),children:[(0,W.jsx)(pi,{size:15}),` Pair a phone`]})}),d&&!l&&(0,W.jsxs)(`p`,{className:`od-done`,role:`status`,children:[(0,W.jsx)(V,{size:15}),` `,d.name||`A device`,` is paired`,d.admin?`, with full access once it makes its passkey`:``,`.`]}),l&&(0,W.jsx)(yU,{p:l,onDone:_,onMake:e=>void y(e),busy:s}),a&&(0,W.jsx)(`p`,{className:`set-note`,role:`alert`,children:a})]}),(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`div`,{className:`set-head`,children:(0,W.jsx)(`h2`,{children:`Paired devices`})}),n.devices.length?(0,W.jsx)(`ul`,{className:`rules od-list`,children:n.devices.map(e=>(0,W.jsx)(bU,{d:e,busy:s,onAdmin:t=>v(()=>U(`relayAdmin`,{id:e.id,on:t})),onForget:()=>v(()=>U(`relayForget`,{id:e.id}))},e.id))}):(0,W.jsx)(`p`,{className:`set-hint`,children:`None yet.`})]}),(0,W.jsx)(xU,{doc:n,busy:s,onMove:e=>v(()=>U(`relayMove`,{url:e})),onLeave:e=>v(()=>U(`relayLeave`,{force:e}))})]})}function _U({busy:e,error:t,onAsk:n,onJoin:r}){let[i,a]=(0,L.useState)(fU),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(``),[u,d]=(0,L.useState)(``),[f,p]=(0,L.useState)(!1),[m,h]=(0,L.useState)(``),g=/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(c.trim());return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`p`,{className:`set-hint`,children:`Open Sideora on your phone, or on any other computer, through a relay. It carries what is sealed between them, and can read none of it.`}),(0,W.jsxs)(`form`,{className:`od-form`,onSubmit:e=>{e.preventDefault(),f?m.trim()&&r(i.trim(),m.trim()):o.trim()&&g&&n({url:i.trim(),name:o.trim(),email:c.trim(),note:u.trim()||void 0})},children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Relay`}),(0,W.jsx)(`input`,{value:i,onChange:e=>a(e.target.value),placeholder:fU,autoComplete:`url`,spellCheck:!1,required:!0}),i.trim()===fU&&(0,W.jsx)(`small`,{children:`The relay Sideora runs. Its owner says yes or no to each computer.`})]}),f?(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Invitation`}),(0,W.jsx)(`input`,{value:m,onChange:e=>h(e.target.value),placeholder:`The code the relay's owner gave you`,autoComplete:`off`,spellCheck:!1,autoFocus:!0,required:!0}),(0,W.jsx)(`small`,{children:`It lets this computer in once.`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`div`,{className:`od-two`,children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Your name`}),(0,W.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),autoComplete:`name`,required:!0,minLength:2,maxLength:80})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Your email`}),(0,W.jsx)(`input`,{type:`email`,value:c,onChange:e=>l(e.target.value),autoComplete:`email`,required:!0})]})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsxs)(`span`,{children:[`A note for the owner `,(0,W.jsx)(`em`,{children:`(optional)`})]}),(0,W.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),maxLength:500,placeholder:`Who you are, how you know them`})]}),(0,W.jsx)(`small`,{className:`od-privacy`,children:`A code is sent to your email to confirm it. The relay keeps your name and email until your request is decided, and thirty days more.`})]}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[f?(0,W.jsxs)(`button`,{type:`submit`,className:`btn primary`,disabled:e||!i.trim()||!m.trim(),children:[e?(0,W.jsx)(H,{size:14,className:`spin`}):null,` Join`]}):(0,W.jsxs)(`button`,{type:`submit`,className:`btn primary`,disabled:e||!i.trim()||o.trim().length<2||!g,children:[e?(0,W.jsx)(H,{size:14,className:`spin`}):null,` Request access`]}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>p(!f),children:f?`Ask for access instead`:`I have an invitation`})]})]}),t&&(0,W.jsx)(`p`,{className:`set-note`,role:`alert`,children:t})]})}function vU({r:e,busy:t,error:n,onConfirm:r,onResend:i,onCancel:a}){let[o,s]=(0,L.useState)(``);return(0,W.jsxs)(`section`,{className:`set`,children:[e.state===`unconfirmed`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`h3`,{className:`od-h`,children:`Check your email`}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[`A code was sent to `,(0,W.jsx)(`strong`,{children:e.email}),`. Enter it to send your request to the owner of `,hU(e.url),`.`]}),(0,W.jsxs)(`form`,{className:`set-inline`,onSubmit:e=>{e.preventDefault(),o.trim()&&r(o.trim()).then(e=>{e&&s(``)})},children:[(0,W.jsx)(`input`,{className:`od-code`,value:o,onChange:e=>s(e.target.value),inputMode:`numeric`,autoComplete:`one-time-code`,placeholder:`123456`,maxLength:9,"aria-label":`The code from the email`,autoFocus:!0}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:t||o.replace(/\D/g,``).length!==6,children:`Confirm`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,disabled:t,onClick:i,children:`Send a new code`})]})]}):e.state===`pending`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`od-state od-connecting`,role:`status`,children:[(0,W.jsx)(`span`,{className:`od-dot`,"aria-hidden":`true`}),`Waiting for the owner of `,(0,W.jsx)(`strong`,{children:hU(e.url)})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`They see your request as`}),(0,W.jsx)(`p`,{className:`od-phrase`,children:e.phrase}),(0,W.jsx)(`p`,{className:`set-hint`,children:`If they ask, tell them these words: they show which request is yours. This computer joins by itself once they accept, and you get an email.`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`h3`,{className:`od-h`,children:`Not accepted`}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[`The owner of `,hU(e.url),` declined the request. Sideora works on this computer all the same, without access from afar.`]})]}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,disabled:t,onClick:()=>void a(),children:e.state===`declined`?`Clear`:`Cancel the request`})}),n&&(0,W.jsx)(`p`,{className:`set-note`,role:`alert`,children:n})]})}function yU({p:e,onDone:t,onMake:n,busy:r}){let[i,a]=(0,L.useState)(e.until-Date.now()),[o,s]=(0,L.useState)(!1);(0,L.useEffect)(()=>{let t=setInterval(()=>a(e.until-Date.now()),1e3);return()=>clearInterval(t)},[e.until]);let c=i<=0,l=Math.max(0,Math.ceil(i/6e4));return(0,W.jsxs)(`div`,{className:`od-pair`,children:[e.svg&&!c?(0,W.jsx)(`img`,{className:`od-qr`,src:`data:image/svg+xml;base64,${btoa(e.svg)}`,alt:`A code to scan with the phone's camera`,width:184,height:184}):(0,W.jsx)(`div`,{className:`od-qr od-qr-none`,children:(0,W.jsx)(Vr,{size:40,"aria-hidden":`true`})}),(0,W.jsxs)(`div`,{className:`od-pair-text`,children:[(0,W.jsx)(`h3`,{children:c?`That code ran out`:`Scan this with your phone`}),(0,W.jsx)(`p`,{className:`set-hint`,children:c?`Make another when the phone is at hand.`:(0,W.jsxs)(W.Fragment,{children:[`Point the phone's camera at it, or open the link on the phone. It works once, for the next `,l,` minute`,l===1?``:`s`,`.`]})}),!c&&(0,W.jsxs)(`div`,{className:`od-link`,children:[(0,W.jsx)(`code`,{children:e.link.replace(/#.*/,`#…`)}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>void _I(e.link).then(e=>{s(e),setTimeout(()=>s(!1),1600)}),children:[o?(0,W.jsx)(V,{size:14}):(0,W.jsx)(Ut,{size:14}),` `,o?`Copied`:`Copy link`]})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:e.limited?`Limited: it reads and writes, and changes no rule, account or AI connection.`:(0,W.jsxs)(W.Fragment,{children:[`Full access once it makes its passkey: it can change rules, accounts and AI connections too. `,(0,W.jsx)(`button`,{type:`button`,className:`link`,disabled:r,onClick:()=>n(!0),children:`Pair with limited access instead`})]})}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[c&&(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,disabled:r,onClick:()=>n(e.limited),children:`Make another`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:t,children:c?`Close`:`Cancel`})]})]})]})}function bU({d:e,busy:t,onAdmin:n,onForget:r}){let[i,a]=(0,L.useState)(!1);return(0,W.jsx)(`li`,{children:(0,W.jsxs)(`div`,{className:`acct`,children:[(0,W.jsxs)(`div`,{className:`acct-main`,children:[(0,W.jsxs)(`span`,{className:`rule-l1`,children:[(0,W.jsx)(`span`,{className:`rule-name`,children:e.name||`A device`}),e.full?(0,W.jsx)(`span`,{className:`tag`,children:`full access`}):e.admin&&e.passkey?(0,W.jsx)(`span`,{className:`tag`,title:`Given too long before its passkey was made: give it again`,children:`full access to give again`}):e.admin?(0,W.jsx)(`span`,{className:`tag`,title:`Given full access, which waits for its passkey`,children:`full access, waiting`}):null,e.passkey&&(0,W.jsx)(`span`,{className:`tag`,children:`passkey`})]}),(0,W.jsxs)(`span`,{className:`rule-match`,children:[`Used `,mU(e.seen),` · paired `,mU(e.created),e.at?` · opens from ${hU(e.at)} until paired again`:``]}),!i&&(0,W.jsxs)(`span`,{className:`od-actions`,children:[e.admin&&e.passkey&&!e.full&&(0,W.jsx)(`button`,{type:`button`,className:`link acct-default`,disabled:t,onClick:()=>n(!0),children:`Give full access again`}),(0,W.jsx)(`button`,{type:`button`,className:`link acct-default`,disabled:t,onClick:()=>n(!e.admin),children:e.admin?`Take back full access`:`Give full access`})]})]}),i?(0,W.jsxs)(`span`,{className:`confirm`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:t,onClick:r,children:`Forget`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:()=>a(!1),children:`Keep`})]}):(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>a(!0),title:`Forget ${e.name||`this device`}: it is refused at once`,"aria-label":`Forget ${e.name||`this device`}`,children:(0,W.jsx)(zi,{size:15})})]})})}function xU({doc:e,busy:t,onMove:n,onLeave:r}){let[i,a]=(0,L.useState)(!1),[o,s]=(0,L.useState)(``),[c,l]=(0,L.useState)(!1),[u,d]=(0,L.useState)(!1);return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`div`,{className:`set-head`,children:(0,W.jsx)(`h2`,{children:`Relay`})}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[(0,W.jsx)(`code`,{children:e.url}),`, as `,(0,W.jsx)(`strong`,{children:e.label||`this computer`})]}),i?(0,W.jsxs)(`form`,{className:`set-field`,onSubmit:e=>{e.preventDefault(),o.trim()&&n(o.trim()).then(e=>{e&&(a(!1),s(``))})},children:[(0,W.jsx)(`span`,{children:`Another address of this relay`}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[(0,W.jsx)(`input`,{value:o,onChange:e=>s(e.target.value),placeholder:`https://my.sideora.com`,autoComplete:`off`,spellCheck:!1}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:t||!o.trim(),children:`Move`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:()=>a(!1),children:`Cancel`})]}),(0,W.jsx)(`small`,{children:`Only one the relay names as its own. Devices paired here keep opening from this address until paired again.`})]}):c?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`set-hint acct-warn`,children:[`This computer leaves the relay and forgets every paired device.`,e.devices.length?` The ${e.devices.length===1?`device`:`${e.devices.length} devices`} paired here ${e.devices.length===1?`is`:`are`} told at once that ${e.devices.length===1?`it is`:`they are`} no longer connected.`:``,` Joining again takes a new request or invitation.`]}),(0,W.jsxs)(`span`,{className:`confirm`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:t,onClick:()=>void r(!1).then(e=>d(!e)),children:`Leave the relay`}),u&&(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,disabled:t,onClick:()=>void r(!0),title:`The relay is not told: this computer's place there stays until its owner revokes it, and the devices paired here are not told either`,children:`Forget it here anyway (devices are not told)`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,onClick:()=>{l(!1),d(!1)},children:`Stay`})]})]}):(0,W.jsxs)(`div`,{className:`set-inline`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>a(!0),children:`Move to another address`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare od-leave`,onClick:()=>l(!0),children:`Leave the relay`})]})]})}var SU=`mw:alerts`,CU=`mw:alerts-muted`,wU=40,TU=6048e5,EU=`alerts`,DU={which(){try{let e=JSON.parse(localStorage.getItem(SU)??`null`);return e===`rules`||e===`off`?e:`all`}catch{return`all`}},setWhich(e){try{e===`all`?localStorage.removeItem(SU):localStorage.setItem(SU,JSON.stringify(e))}catch{}OU={...OU,cards:e===`off`?[]:OU.cards},AU()},muted(){try{let e=JSON.parse(localStorage.getItem(CU)??`[]`);return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}catch{return[]}},setMuted(e){try{e.length?localStorage.setItem(CU,JSON.stringify(e)):localStorage.removeItem(CU)}catch{}}},OU={log:[],cards:[]},kU=new Set,AU=()=>kU.forEach(e=>e()),jU=typeof BroadcastChannel==`function`?new BroadcastChannel(`mw-alerts`):null,MU=e=>{try{jU?.postMessage(e)}catch{}},NU=null;function PU(){return NU??=qs(EU).then(e=>{if(!Array.isArray(e))return;let t=new Set(OU.log.map(e=>e.id)),n=e.filter(e=>e&&typeof e.id==`string`&&!t.has(e.id)&&Date.now()-e.at<TU);n.length&&(OU={...OU,log:[...OU.log,...n].sort((e,t)=>t.at-e.at).slice(0,wU)},AU())},()=>{}),NU}var FU=0,IU=()=>{PU().then(async()=>{let e=await qs(EU).catch(()=>void 0),t=new Set(OU.log.map(e=>e.id)),n=(Array.isArray(e)?e:[]).filter(e=>e&&typeof e.id==`string`&&!t.has(e.id)&&e.at>FU&&Date.now()-e.at<TU);n.length&&(OU={...OU,log:[...OU.log,...n].sort((e,t)=>t.at-e.at).slice(0,wU)},AU()),await Js(EU,OU.log)})};typeof window<`u`&&window.addEventListener(`mw:kept-revoked`,()=>{OU={log:[],cards:[]},NU=null,AU()});var LU=new Set;function RU(e){let t=t=>!t.seen&&(e===`all`||e.includes(t.id));return!OU.log.some(t)&&!OU.cards.some(t=>e===`all`||e.includes(t))?!1:(OU={log:OU.log.map(e=>t(e)?{...e,seen:!0}:e),cards:e===`all`?[]:OU.cards.filter(t=>!e.includes(t))},AU(),!0)}function zU(e){return OU.cards.some(t=>e.includes(t))?(OU={...OU,cards:OU.cards.filter(t=>!e.includes(t))},AU(),!0):!1}jU&&(jU.onmessage=e=>{let t=e.data;if(t&&typeof t==`object`){if(`clear`in t)FU=Date.now(),OU={log:[],cards:[]},AU();else if(`seen`in t)RU(t.seen);else if(`dismiss`in t)zU(t.dismiss);else if(`arrive`in t&&t.arrive&&typeof t.arrive.id==`string`){let e=t.arrive;e.seen?(LU.add(e.id),!RU([e.id])&&!OU.log.some(t=>t.id===e.id)&&(OU={...OU,log:[e,...OU.log].slice(0,wU)},AU())):OU.log.some(t=>t.id===e.id)||(OU={...OU,log:[e,...OU.log].sort((e,t)=>t.at-e.at).slice(0,wU)},AU())}}});var BU=e=>typeof e==`string`?e.trim():``,VU=e=>{let t=new Date(e);return isNaN(t.getTime())?``:t.toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})};function HU(e){if(e.type===`newmail`&&typeof e.id==`string`&&e.id){let t=BU(e.account),n={id:e.id,account:t,changeKey:``,subject:BU(e.subject),fromName:BU(e.from),fromEmail:BU(e.fromEmail),isRead:!1,hasAttachments:!1,received:BU(e.received)||new Date().toISOString(),folder:`inbox`};return{id:`mail:${e.id}`,source:`mail`,who:n.fromName||n.fromEmail||`New mail`,email:n.fromEmail||void 0,title:n.subject||`(no subject)`,...BU(e.rule)?{rule:BU(e.rule)}:{},account:t,at:Date.now(),target:{kind:`mail`,item:n},seen:!1}}if(e.type===`reminder`&&BU(e.subject)){let t=Number(e.minutes),n=BU(e.start),r=[e.allDay===!0?`Today`:!Number.isFinite(t)||t<=0?`Starting now`:`In ${t} min`,e.allDay===!0?``:VU(n),BU(e.location)].filter(Boolean).join(` · `);return{id:`reminder:${BU(e.id)||BU(e.subject)}:${n}`,source:`calendar`,who:BU(e.subject),title:r,account:BU(e.account)||void 0,at:Date.now(),target:{kind:`calendar`},seen:!1}}return null}var UU={arrive(e,{looking:t=!1}={}){let n=DU.which();if(n===`off`)return;let r=HU(e);if(!r||r.source===`mail`&&(n===`rules`&&!r.rule||r.account&&DU.muted().includes(r.account))||LU.has(r.id))return;LU.add(r.id);let i=!t&&e.quiet!==!0;OU={log:[{...r,seen:t},...OU.log.filter(e=>e.id!==r.id)].slice(0,wU),cards:i?[r.id,...OU.cards]:OU.cards},AU(),MU({arrive:{...r,seen:t}}),IU()},dismiss(...e){zU(e)&&MU({dismiss:e})},seen(e){RU([e])&&(MU({seen:[e]}),IU())},seenAll(){RU(`all`)&&(MU({seen:`all`}),IU())},clear(){(OU.log.length||OU.cards.length)&&(FU=Date.now(),OU={log:[],cards:[]},AU(),MU({clear:!0}),IU())}},WU=e=>(kU.add(e),PU(),()=>{kU.delete(e)});function GU(){return(0,L.useSyncExternalStore)(WU,()=>OU)}var KU={wake:`wakes an agent`,webhook:`calls a webhook`,exec:`runs a command`},qU=e=>e instanceof Error?e.message:String(e),JU={accounts:`Accounts`,signatures:`Signatures`,pictures:`Sender pictures`,rules:`Rules`,quiet:`Quiet hours`,ai:`AI models`,notify:`Notifications`,look:`Appearance`,tab:`Full page`,codes:`Verification codes`,devices:`Other devices`,get browser(){return h.afar?`This device`:`This browser`}},YU=e=>({accounts:!h.accounts,ai:!h.ai,tab:!h.sidePanel,codes:!h.fillCodes,browser:!h.signOut,devices:!h.accounts||!!h.afar})[e]===!0,XU=e=>{let[t,n]=e.split(`:`).map(Number);return new Date(2e3,0,1,t,n).toLocaleTimeString([],{hour:`numeric`,minute:`2-digit`})};function ZU({accounts:e,draft:t,onBack:n,canGoBack:r=!1,at:i,onPage:a}){let o=e=>e&&(e===`home`||Object.hasOwn(JU,e)&&!YU(e))?e:void 0,[c,l]=(0,L.useState)(t?`rules`:o(i)??`home`),u=vz(),[d,p]=s(),g=u&&c===`home`?h.accounts?`accounts`:`signatures`:c;(0,L.useEffect)(()=>{a?.(c)},[c,a]);let[_,y]=(0,L.useState)(null),[b,x]=(0,L.useState)(null),[S,C]=(0,L.useState)(t?`new`:null),[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(t),O=(0,L.useRef)(null),k=(0,L.useRef)(null),A=(0,L.useCallback)(e=>{k.current=e},[]),j=(0,L.useRef)(null),ee=(0,L.useRef)(0),M=(0,L.useRef)(null),te=ac(),[ne,re]=(0,L.useState)(null),[ie,ae]=(0,L.useState)(null),[oe,se]=(0,L.useState)(null);(0,L.useEffect)(()=>{YU(`devices`)||U(`relaySettings`,{}).then(se,()=>{})},[g]);let N=(0,L.useRef)(null),ce=(0,L.useRef)(`home`),le=(0,L.useCallback)(e=>{C(null),D(void 0),requestAnimationFrame(()=>(e&&O.current?.querySelector(`li:nth-child(${e}) .rule-main`)||M.current)?.focus())},[]),ue=(0,L.useCallback)(()=>U(`rules`).then(e=>{y(e),x(null)},e=>x(qU(e))),[]);(0,L.useEffect)(()=>{ue()},[ue]);let de=(0,L.useRef)(!0);(0,L.useEffect)(()=>{(c===`home`||u)&&(m.get().then(re,()=>re(null)),U(`pictureSettings`).then(ae,()=>ae(null)),ic.load(),de.current||ue(),de.current=!1)},[c,u,ue]);let fe=(0,L.useCallback)(e=>{if(ee.current++,document.activeElement instanceof HTMLElement&&document.activeElement.closest(`.settings`)&&document.activeElement.blur(),e===`home`){C(null),D(void 0);let e=ce.current;requestAnimationFrame(()=>N.current?.querySelector(`[data-page="${e}"]`)?.focus())}else ce.current=e,u||requestAnimationFrame(()=>j.current?.focus());l(e)},[u]),pe=(0,L.useRef)(c);pe.current=c;let me=(0,L.useRef)(!0);(0,L.useEffect)(()=>{if(me.current){me.current=!1;return}let e=o(i)??`home`;e!==pe.current&&fe(e)},[i]);let P=(0,L.useCallback)(()=>{S==null?k.current?k.current():!u&&c!==`home`&&!(r&&ce.current===`home`)?fe(`home`):(document.activeElement instanceof HTMLElement&&document.activeElement.closest(`.settings`)&&document.activeElement.blur(),n()):le(S===`new`?void 0:S)},[c,u,r,fe,n,S,le]),he=(0,L.useCallback)(async(e,t)=>{T(!0);try{return y(await e()),!0}catch(e){return K.error(e,`Could not ${t}: `),/changed elsewhere/.test(qU(e))&&(C(null),ue()),!1}finally{T(!1)}},[ue]);(0,L.useEffect)(()=>{let e=e=>{e.key!==`Escape`||e.defaultPrevented||DI.isOpen()||k.current||(S==null?c!==`home`&&!u?P():r&&n():le(S===`new`?void 0:S))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[S,n,le,r,c,u,P]);let F=e=>({n:e.n,expect:e.rev}),I=async(e,t)=>{let n=ee.current;await he(()=>U(`saveRule`,e?{...F(e),...t}:t),e?`save the rule`:`add the rule`)&&n===ee.current&&le(e?.n)},ge=async(e,t)=>{let n=ee.current;await he(()=>U(`moveRule`,{...F(e),to:t}),`move the rule`)&&n===ee.current&&C(t)},_e=async e=>{let t=ee.current;await he(()=>U(`removeRule`,F(e)),`delete the rule`)&&t===ee.current&&le()},ve=ne?.connections.find(e=>e.id===ne.activeId),ye=_?.rules.filter(e=>e.enabled).length??0,be=[{group:`Mail`,items:[{page:`accounts`,value:e.length?String(e.length):``},{page:`signatures`,value:te.signatures.length?String(te.signatures.length):ic.known()?`None`:``},{page:`pictures`,value:ie?ie.enabled?`On`:`Off`:``}]},{group:`Alerts`,items:[{page:`rules`,value:_?_.rules.length?ye===_.rules.length?String(ye):`${ye} of ${_.rules.length} on`:`None`:``},{page:`quiet`,value:_?_.quietHours.enabled?`${XU(_.quietHours.start)} – ${XU(_.quietHours.end)}`:`Off`:``}]},...h.ai?[{group:`AI`,items:[{page:`ai`,value:ne?ve?ve.model||ve.label:`Off`:``}]}]:[],{group:`This app`,items:[{page:`notify`,value:tW.find(([e])=>e===DU.which())?.[1]??``},{page:`look`,value:eW.find(([e])=>e===f())?.[1]??``},...h.sidePanel?[{page:`tab`,value:v?`Open here`:`Side panel`}]:[],...h.fillCodes?[{page:`codes`,value:d===null?``:d?`Every site`:`Sites you allow`}]:[],...h.signOut?[{page:`browser`,value:`Paired`}]:[],{page:`devices`,value:oe?oe.joined?oe.connection.state===`connected`?oe.devices.length?`${oe.devices.length} paired`:`Ready`:`Not connected`:oe.request?.state===`unconfirmed`?`Code to confirm`:oe.request?.state===`pending`?`Waiting`:oe.request?.state===`declined`?`Declined`:`Not set up`:``}]}],xe=g===`rules`||g===`quiet`,Se=e=>be.map(e=>({...e,items:e.items.filter(e=>!YU(e.page))})).filter(e=>e.items.length).map(t=>(0,W.jsxs)(`section`,{className:`set-group`,"aria-label":t.group,children:[(0,W.jsx)(`h2`,{children:t.group}),(0,W.jsx)(`div`,{className:`set-rows`,children:t.items.map(t=>(0,W.jsxs)(`button`,{type:`button`,className:`set-row`,"data-page":t.page,"aria-current":e===t.page?`page`:void 0,onClick:()=>fe(t.page),children:[(0,W.jsx)(`span`,{className:`set-row-name`,children:JU[t.page]}),(0,W.jsx)(`span`,{className:`set-row-value`,children:t.value}),!e&&(0,W.jsx)(ht,{size:15,"aria-hidden":`true`})]},t.page))})]},t.group));return(0,W.jsxs)(`section`,{className:`view`,children:[(0,W.jsxs)(`header`,{className:`thread-head`,children:[(u?r:c!==`home`||r)&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,ref:j,onClick:P,title:!u&&c!==`home`&&!(r&&ce.current===`home`)?`Back to the settings (Esc)`:`Back to the mail (Esc)`,"aria-label":`Back`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`h1`,{children:u||c===`home`?`Settings`:JU[c]}),w&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Saving`})]}),(0,W.jsxs)(`div`,{className:u?`set-split`:`set-single`,children:[u&&(0,W.jsx)(`nav`,{className:`set-nav`,"aria-label":`Settings`,ref:N,children:Se(g)}),(0,W.jsxs)(`div`,{className:`thread-scroll settings`,children:[u&&(0,W.jsx)(`h2`,{className:`set-title`,children:JU[g]}),c===`home`&&!u&&(0,W.jsxs)(`div`,{className:`set-home`,ref:N,children:[Se(),b&&(0,W.jsxs)(`p`,{className:`set-note`,children:[`The rules and quiet hours could not be read: `,b,` `,(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:ue,children:`Try again`})]})]}),g===`accounts`&&(0,W.jsx)(MV,{onEditing:A}),g===`ai`&&(0,W.jsx)(hH,{onEditing:A}),g===`notify`&&(0,W.jsx)(nW,{accounts:e}),g===`look`&&(0,W.jsx)(rW,{}),g===`tab`&&(0,W.jsx)(iW,{}),g===`codes`&&(0,W.jsx)(aW,{everywhere:d,setEverywhere:p}),g===`browser`&&(0,W.jsx)($U,{}),g===`devices`&&(0,W.jsx)(gU,{onEditing:A,onChange:se}),g===`signatures`&&(0,W.jsx)(oU,{onEditing:A}),g===`pictures`&&(0,W.jsx)(oW,{}),xe&&(b?(0,W.jsxs)(`div`,{className:`empty`,children:[(0,W.jsxs)(`p`,{children:[`The settings could not be read: `,b]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:ue,children:`Try again`})]}):_?g===`quiet`?(0,W.jsx)(cW,{q:_.quietHours,onChange:e=>he(()=>U(`setQuietHours`,e),`change the quiet hours`)}):(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,ref:M,onClick:()=>C(`new`),disabled:S===`new`,children:[(0,W.jsx)(Lr,{size:14}),` New rule`]})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`New mail that matches a rule plays its sound and shows a notification. When several rules match, the first one in this list alerts.`}),_.rules.length===0&&S!==`new`&&(0,W.jsx)(`p`,{className:`set-none`,children:`No rules yet: no mail alerts.`}),(0,W.jsxs)(`ul`,{className:`rules`,ref:O,children:[_.rules.map(t=>(0,W.jsx)(`li`,{className:S===t.n?`open`:void 0,children:S===t.n?(0,W.jsx)(uW,{rule:t,initial:t,accounts:e,sounds:_.sounds,count:_.rules.length,busy:w,onSave:e=>I(t,e),onCancel:()=>le(t.n),onMove:e=>ge(t,e),onRemove:()=>_e(t)}):(0,W.jsx)(lW,{rule:t,onEdit:()=>C(t.n),onToggle:e=>he(()=>U(`saveRule`,{...F(t),enabled:e}),e?`turn the rule on`:`turn the rule off`)})},t.name?`n:${t.name}`:`i:${t.n}`)),S===`new`&&(0,W.jsx)(`li`,{className:`open`,children:(0,W.jsx)(uW,{rule:null,initial:E??{},accounts:e,sounds:_.sounds,count:_.rules.length,busy:w,onSave:e=>I(null,e),onCancel:()=>le()})})]})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})}))]})]})]})}var QU=e=>e%60||e<60?`${e} minutes`:e===60?`1 hour`:`${e/60} hours`;function $U(){let[e,t]=(0,L.useState)(!1),[n,i]=(0,L.useState)(E.state()),[a,o]=(0,L.useState)(!1),[s,c]=(0,L.useState)(``),[l,u]=(0,L.useState)(E.minutes()),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(``),g=e=>{e===l||d||(f(!0),m(``),E.setMinutes(e).then(e=>{m(e??``),u(E.minutes())},()=>m(`That could not be changed.`)).finally(()=>f(!1)))};return(0,L.useEffect)(()=>{n===`off`&&E.prepare()},[n]),(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`p`,{className:`set-hint`,children:h.afar?`This device was paired with your Sideora, with a link made there. Your mail and your passwords stay on the computer Sideora runs on: this page asks it for what it shows, through a relay that cannot read it.`:`This browser was paired with Sideora on this computer, with a link made there. Your mail and your passwords stay on the computer Sideora runs on: this page asks it for what it shows.`}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,disabled:e,onClick:()=>{t(!0),ee().catch(()=>t(!1))},children:h.afar?`Sign out of this device`:`Sign out of this browser`})}),n===`on`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Protected with a passkey. This device locks after `,QU(l),` unused, and asks for `,E.how(),` before a mail is sent, and before rules, accounts or AI connections are changed.`]}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>E.lockNow(),children:`Lock now`})}),E.choices.length>0&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`h3`,{className:`set-sub`,children:`Lock when unused for`}),(0,W.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Lock when unused for`,children:E.choices.map(e=>(0,W.jsx)(`button`,{type:`button`,"aria-pressed":l===e,disabled:d,onClick:()=>g(e),children:QU(e)},e))}),(0,W.jsx)(`p`,{className:`set-hint`,role:`status`,children:p||`Changing it asks for ${E.how()}. However long, it also locks when Sideora restarts, twelve hours after it was opened, and when you press the lock.`})]})]}),n===`off`&&(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Not protected: anyone holding this device unlocked opens your mail here. A passkey locks it after `,E.minutes(),` minutes unused, and asks for `,E.how(),` before a mail is sent, and before rules, accounts or AI connections are changed.`]}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:a,onClick:()=>{o(!0),c(``),E.protect().then(e=>{c(e??``),i(E.state())},()=>c(`The passkey could not be made.`)).finally(()=>o(!1))},children:`Protect this device`})}),s&&(0,W.jsx)(`p`,{className:`set-hint`,role:`status`,children:s})]}),n===`unsupported`&&(0,W.jsx)(`p`,{className:`set-hint`,children:`This browser has no passkeys: this device cannot be locked here, and full access is not given to it.`}),h.afar?h.accounts?(0,W.jsxs)(`p`,{className:`set-hint`,children:[`This device has full access: rules, mail accounts and AI connections can be changed from here. `,(0,W.jsxs)(`code`,{children:[`sideora relay admin `,r()??`<device>`,` off`]}),` where Sideora runs takes that back.`]}):(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Rules, mail accounts and AI connections are changed on the computer Sideora runs on. `,(0,W.jsxs)(`code`,{children:[`sideora relay admin `,r()??`<device>`]}),` there gives this device full access; load this page again afterwards.`]}):!h.accounts&&(0,W.jsxs)(`p`,{className:`set-hint`,children:[`This web app was started with `,(0,W.jsx)(`code`,{children:`--no-admin`}),`: mail accounts are set up on the computer itself, with `,(0,W.jsx)(`code`,{children:`sideora setup`}),` or in the extension. Started without it, this page adds and changes them too.`]}),h.afar?(0,W.jsxs)(`p`,{className:`set-hint`,children:[`To pair a device again: on the computer Sideora runs on, Settings, Other devices, Pair a phone (or `,(0,W.jsx)(`code`,{children:`sideora relay pair`}),`). The paired devices are listed there too.`]}):(0,W.jsxs)(`p`,{className:`set-hint`,children:[`To pair a browser again, run `,(0,W.jsx)(`code`,{children:`sideora web pair`}),` where Sideora runs and open the link it prints. `,(0,W.jsx)(`code`,{children:`sideora web sessions`}),` lists the browsers that are paired, `,(0,W.jsx)(`code`,{children:`sideora web forget`}),` ends one from there.`]})]})}var eW=[[`auto`,`Automatic`],[`light`,`Light`],[`dark`,`Dark`]],tW=[[`all`,`All new mail`],[`rules`,`Rule matches`],[`off`,`Off`]];function nW({accounts:e}){let[t,n]=(0,L.useState)(DU.which),[r,i]=(0,L.useState)(DU.muted),a=(e,t)=>{let n=t?r.filter(t=>t!==e):[...r.filter(t=>t!==e),e];DU.setMuted(n),i(n)};return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Notifications`,children:tW.map(([e,r])=>(0,W.jsx)(`button`,{type:`button`,"aria-pressed":t===e,onClick:()=>{DU.setWhich(e),n(e)},children:r},e))}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[t===`off`?`Nothing is shown when mail arrives or an event is about to start.`:t===`rules`?`A card shows over the page when mail matches one of your rules, and when an event is about to start. Press it to open what it is about.`:`A card shows over the page when mail arrives, and when an event is about to start. Press it to open what it is about.`,` `,`Shown while the app is open; what you missed stays behind the bell. The choice is kept in this `,h.afar?`device`:`browser`,` alone.`]})]}),t!==`off`&&e.length>1&&(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`h3`,{className:`set-sub`,children:`Mail of`}),e.map(e=>(0,W.jsxs)(`label`,{className:`set-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:!r.includes(e),onChange:t=>a(e,t.target.checked)}),(0,W.jsx)(`span`,{children:xe(e)})]},e))]})]})}function rW(){let[e,t]=(0,L.useState)(f);return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`div`,{className:`seg`,role:`group`,"aria-label":`Appearance`,children:eW.map(([n,r])=>(0,W.jsx)(`button`,{type:`button`,"aria-pressed":e===n,onClick:()=>{y(n),t(n)},children:r},n))}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Automatic follows the `,h.afar?`device`:`computer`,`'s own setting, light or dark, as it changes. The choice is kept in this `,h.afar?`device`:`browser`,` alone.`]})]})}function iW(){let e=i(),t=(0,L.useSyncExternalStore)(hz.watch,hz.get),[n,r]=(0,L.useState)(!1),[a,o]=x();return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`p`,{className:`set-hint`,children:`Sideora lives in a tab of its own (Home, and the list beside the mail) and in Chrome's side panel, beside the page you are on. The button above the settings, at the bottom of the rail, goes from one to the other.`}),(0,W.jsx)(`div`,{className:`set-inline`,children:v?(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>p(),children:`Back to the side panel`}):(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>{M().catch(()=>{})},children:`Open in a tab`})}),(0,W.jsx)(`h3`,{className:`set-sub`,children:`The icon in Chrome's toolbar`}),(0,W.jsx)(`p`,{className:`set-hint`,children:`What a press on Sideora's icon opens. The tab: the one already open comes forward.`}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsxs)(`div`,{className:`seg`,role:`group`,"aria-label":`The icon opens`,children:[(0,W.jsx)(`button`,{type:`button`,"aria-pressed":a===`tab`,onClick:()=>o(`tab`),children:`The tab`}),(0,W.jsx)(`button`,{type:`button`,"aria-pressed":a===`panel`,onClick:()=>o(`panel`),children:`The side panel`})]})}),(0,W.jsx)(`h3`,{className:`set-sub`,children:`As Chrome's new tab`}),(0,W.jsx)(`p`,{className:`set-hint`,children:`Every new tab can open on Home (the time, your mail, what is coming up) instead of Chrome's page. What you open from it opens in the tab the app is already in, if there is one. The first time, Chrome asks whether to keep the change: keep it (its "Change it back" turns the whole extension off).`}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn toggle`,"aria-pressed":!!t,onClick:()=>hz.set(!t),children:t?`New tabs open on Home`:`Open Home on new tabs`})}),(0,W.jsx)(`h3`,{className:`set-sub`,children:`As the page Chrome starts on`}),(0,W.jsxs)(`p`,{className:`set-hint`,children:[`Chrome does not let an extension make itself your start page; you can, in two steps. Copy this address, then in Chrome's settings, under `,(0,W.jsx)(`strong`,{children:`On startup`}),`, choose `,(0,W.jsx)(`strong`,{children:`Open a specific page or set of pages`}),` and add it.`]}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[(0,W.jsx)(`input`,{type:`text`,readOnly:!0,value:e,"aria-label":`The address of the panel as a page`,onFocus:e=>e.currentTarget.select()}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:async()=>{await _I(e)&&(r(!0),setTimeout(()=>r(!1),2e3))},children:n?`Copied`:`Copy`})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`The address belongs to this installation of the extension: after reinstalling it, copy it again.`})]})}function aW({everywhere:e,setEverywhere:t}){let[n,r]=(0,L.useState)(!1),i=async e=>{r(!0);let n=await t(e);r(!1),!n&&e&&K.show({text:`Chrome was not allowed every site: codes still fill on the sites you allowed one by one.`,duration:6e3})};return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsx)(`p`,{className:`set-hint`,children:`When a verification code arrives by mail, Fill types it into the page in front, and only when that page is on the site the mail came from. A look-alike page on another domain never gets it.`}),(0,W.jsx)(`h3`,{className:`set-sub`,children:`Fill codes on every site`}),(0,W.jsx)(`p`,{className:`set-hint`,children:e?`Chrome lets Sideora type codes on any site, so no site asks first. A code still only goes into a page of the site its mail came from.`:`Off, the first Fill on a new site asks to allow it. On, Chrome is asked once for every site (it says "Read and change all your data on all websites"), and no site asks again.`}),(0,W.jsx)(`div`,{className:`set-inline`,children:(0,W.jsx)(`button`,{type:`button`,className:`btn toggle`,"aria-pressed":!!e,disabled:n||e===null,onClick:()=>i(!e),children:e?`Codes fill on every site`:`Fill codes on every site`})}),(0,W.jsx)(`p`,{className:`set-hint`,children:`Chrome's own settings for the extension (Site access) show what is allowed, and can change it too.`})]})}function oW(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)(null);(0,L.useEffect)(()=>{U(`pictureSettings`).then(t,e=>r(qU(e)))},[]);let i=async e=>{try{t(await U(`setPictureSettings`,e)),ro()}catch(e){K.error(e,`Could not change the sender pictures: `)}};return n?(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsxs)(`p`,{children:[`The settings could not be read: `,n]})}):e?(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`h2`,{className:`dup`,children:`Sender pictures`}),(0,W.jsx)(`span`,{className:`set-state`,children:e.enabled?`On`:`Off`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(sW,{checked:e.enabled,onChange:e=>i({enabled:e}),label:`Sender pictures`})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`A picture in place of the initials, where one is found. Sideora looks for it itself, never from the browser, and keeps what it finds for a week:`}),(0,W.jsxs)(`ul`,{className:`set-hint set-list`,children:[(0,W.jsx)(`li`,{children:`the photo your organisation keeps of a colleague or contact, asked of your Exchange server;`}),(0,W.jsx)(`li`,{children:`a company's logo (BIMI), asked of its DNS and of the address it names;`}),(0,W.jsx)(`li`,{children:`failing that, the company's site icon: from its own website for companies you write with (that website then learns your IP address); for others, through DuckDuckGo (below).`})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`A company's logo or icon is shown only on mail your own mail server confirmed came from its domain (DMARC passed). A verified logo comes with a certificate from DigiCert, GlobalSign, SSL.com or Sectigo that ties it to the company: to its registered trademark (VMC), or, proving less, to a mark it has used for a while (CMC). It is shown for any such mail. Logos without one, and site icons, only for companies you already write with (a domain you sent mail to, one of your contacts', or your own), so a look-alike domain cannot borrow a brand's logo. Never for Gmail, Outlook.com and other free mail.`}),(0,W.jsx)(`p`,{className:`set-hint`,children:`For mail that passed from a domain you do not write with, its DNS is still asked whether it has a logo, under the name the mail gives (as the New York Times does): whoever runs that DNS can tell that a mail of theirs was shown, and, with a name for each recipient, to whom (it sees your network's DNS server, not you).`}),(0,W.jsxs)(`div`,{className:`set-head${e.enabled?``:` off`}`,children:[(0,W.jsx)(`h3`,{className:`set-sub grow`,children:`Icons of other senders`}),(0,W.jsx)(`span`,{className:`set-state`,children:e.otherIcons?`On`:`Off`}),(0,W.jsx)(sW,{checked:e.otherIcons,onChange:e=>i({otherIcons:e}),label:`Icons of other senders`})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`The site icon of a company you do not write with, on mail that passed DMARC, asked of DuckDuckGo's icon service rather than of the company: the sender never sees it, and DuckDuckGo learns only the company's domain. The icon is the sender's own choice, as its name is; only a logo with a check mark is verified.`}),(0,W.jsxs)(`div`,{className:`set-head${e.enabled?``:` off`}`,children:[(0,W.jsx)(`h3`,{className:`set-sub grow`,children:`Gravatar and Libravatar`}),(0,W.jsx)(`span`,{className:`set-state`,children:e.gravatar?`On`:`Off`}),(0,W.jsx)(sW,{checked:e.gravatar,onChange:e=>i({gravatar:e}),label:`Gravatar and Libravatar`})]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`The picture people chose for their address on Gravatar or Libravatar. Off unless you turn it on: those services are sent a fingerprint (a hash) of each sender's address, and so learn who writes to you. Which Libravatar server is asked is the sender's domain's choice (its DNS), so that server may be the sender's own.`})]}):(0,W.jsx)(`div`,{className:`empty`,children:(0,W.jsx)(H,{size:18,className:`spin`,"aria-label":`Loading`})})}function sW({checked:e,onChange:t,label:n}){return(0,W.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":e,"aria-label":n,title:e?`On`:`Off`,className:`switch`,onClick:()=>t(!e)})}function cW({q:e,onChange:t}){let[n,r]=(0,L.useState)({start:e.start,end:e.end});(0,L.useEffect)(()=>r({start:e.start,end:e.end}),[e.start,e.end]);let i=i=>(0,W.jsx)(`input`,{type:`time`,value:n[i],disabled:!e.enabled,onChange:e=>r(t=>({...t,[i]:e.target.value})),onBlur:()=>{n[i]&&n[i]!==e[i]?t({[i]:n[i]}):r(t=>({...t,[i]:e[i]}))},onKeyDown:e=>{e.key===`Enter`&&e.currentTarget.blur()},"aria-label":i===`start`?`Quiet from`:`Quiet until`});return(0,W.jsxs)(`section`,{className:`set`,children:[(0,W.jsxs)(`div`,{className:`set-head`,children:[(0,W.jsx)(`h2`,{className:`dup`,children:`Quiet hours`}),(0,W.jsx)(`span`,{className:`set-state`,children:e.enabled?`On`:`Off`}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(sW,{checked:e.enabled,onChange:e=>t({enabled:e}),label:`Quiet hours`})]}),(0,W.jsxs)(`div`,{className:`quiet-times${e.enabled?``:` off`}`,children:[(0,W.jsx)(`span`,{children:`From`}),i(`start`),(0,W.jsx)(`span`,{children:`to`}),i(`end`)]}),(0,W.jsx)(`p`,{className:`set-hint`,children:`During quiet hours matching mail and calendar reminders stay silent: no sound, no notification, and a rule runs nothing else either.`})]})}function lW({rule:e,onEdit:t,onToggle:n}){let r=[e.senders&&`From ${e.senders}`,e.subjects&&`Subject contains ${e.subjects}`,e.account&&`${xe(e.account)} only`].filter(Boolean).join(` · `);return(0,W.jsxs)(`div`,{className:`rule${e.enabled?``:` off`}`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`rule-main`,onClick:t,title:`Edit this rule`,children:[(0,W.jsxs)(`span`,{className:`rule-l1`,children:[(0,W.jsx)(`span`,{className:`rule-name`,children:e.name||`Unnamed rule`}),(0,W.jsx)(`span`,{className:`rule-sound`,children:e.sound?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ta,{size:12}),` `,e.sound]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(ra,{size:12}),` no sound`]})})]}),(0,W.jsx)(`span`,{className:`rule-match`,children:r}),e.runs.length>0&&(0,W.jsxs)(`span`,{className:`rule-runs`,children:[`Also `,e.runs.map(e=>KU[e]).join(`, `)]})]}),(0,W.jsx)(sW,{checked:e.enabled,onChange:n,label:`${e.name||`Rule`}: on or off`})]})}function uW({rule:e,initial:t,accounts:n,sounds:r,count:i,busy:a,onSave:o,onCancel:s,onMove:c,onRemove:l}){let[u,d]=(0,L.useState)({name:(t.name??``).slice(0,80),senders:t.senders??``,subjects:t.subjects??``,account:t.account??``,sound:t.sound??`chime`,notify:t.notify??!0}),[f,p]=(0,L.useState)(!1),m=(0,L.useRef)(null),h=(0,L.useRef)(null),g=e=>{p(e),requestAnimationFrame(()=>(e?m:h).current?.focus())},_=!!e&&e.runs.length>0,v=e&&e.sound&&!r.includes(e.sound)?e.sound:null,y=e=>d(t=>({...t,...e})),[b,x]=(0,L.useState)(``),S=(!!u.name.trim()||!!e&&!e.name)&&!!(u.senders.trim()||b||u.subjects.trim());return(0,W.jsxs)(`form`,{className:`rule-form`,onSubmit:e=>{e.preventDefault(),S&&!a&&o(_?{sound:u.sound,notify:u.notify}:u)},children:[(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Name`}),(0,W.jsx)(`input`,{type:`text`,value:u.name,onChange:e=>y({name:e.target.value}),maxLength:80,autoFocus:!_,disabled:_,spellCheck:!1,autoComplete:`off`})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`From`}),(0,W.jsx)(Ro,{label:`From`,terms:!0,boxed:!0,value:u.senders,onChange:e=>y({senders:e}),onPending:x,placeholder:_?``:`Name or address`,disabled:_}),(0,W.jsx)(`small`,{children:`People, addresses, or part of a name (Acme Billing). One of them in the sender is enough.`})]}),(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Subject contains`}),(0,W.jsx)(`input`,{type:`text`,value:u.subjects,onChange:e=>y({subjects:e.target.value}),placeholder:_?``:`urgent, invoice`,disabled:_,spellCheck:!1,autoComplete:`off`}),(0,W.jsx)(`small`,{children:`Words separated by commas. With a sender above, both must match.`})]}),(n.length>1||u.account)&&(0,W.jsxs)(`label`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Account`}),(0,W.jsxs)(`select`,{value:u.account,onChange:e=>y({account:e.target.value}),disabled:_,children:[(0,W.jsx)(`option`,{value:``,children:`All accounts`}),n.map(e=>(0,W.jsx)(`option`,{value:e,children:xe(e)},e)),u.account&&!n.includes(u.account)&&(0,W.jsx)(`option`,{value:u.account,children:u.account})]})]}),(0,W.jsxs)(`div`,{className:`set-field`,children:[(0,W.jsx)(`span`,{children:`Sound`}),(0,W.jsxs)(`div`,{className:`set-inline`,children:[(0,W.jsxs)(`select`,{value:u.sound===!1?``:u.sound,onChange:e=>y({sound:e.target.value||!1}),"aria-label":`Sound`,children:[r.map(e=>(0,W.jsx)(`option`,{value:e,children:e},e)),v&&(0,W.jsx)(`option`,{value:v,children:v}),(0,W.jsx)(`option`,{value:``,children:`No sound`})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,disabled:!u.sound,onClick:()=>{u.sound&&U(`playSound`,{sound:u.sound}).catch(e=>K.error(e,`Could not play the sound: `))},title:`Play it on the computer Sideora runs on`,"aria-label":`Play the sound`,children:(0,W.jsx)(Fr,{size:14})})]})]}),(0,W.jsxs)(`label`,{className:`set-check`,children:[(0,W.jsx)(`input`,{type:`checkbox`,checked:u.notify,onChange:e=>y({notify:e.target.checked})}),`Show a notification`]}),e&&e.runs.length>0&&(0,W.jsxs)(`p`,{className:`set-note`,children:[`This rule also `,e.runs.map(e=>KU[e]).join(` and `),`. That, its name and the mail it is for are changed in `,(0,W.jsx)(`code`,{children:`~/.sideora/rules.yaml`}),`; its sound and notification here.`]}),(0,W.jsxs)(`div`,{className:`rule-foot`,children:[e&&c&&l&&(f?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn danger`,onClick:l,disabled:a,children:`Delete rule`}),(0,W.jsx)(`button`,{type:`button`,className:`btn bare`,ref:m,onClick:()=>g(!1),children:`Keep`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>c(e.n-1),disabled:a||e.n<=1,title:`Move up: checked earlier`,"aria-label":`Move up`,children:(0,W.jsx)(_t,{size:16})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>c(e.n+1),disabled:a||e.n>=i,title:`Move down: checked later`,"aria-label":`Move down`,children:(0,W.jsx)(dt,{size:16})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,ref:h,onClick:()=>g(!0),title:`Delete this rule`,"aria-label":`Delete this rule`,children:(0,W.jsx)(zi,{size:15})})]})),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:s,children:`Cancel`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn primary`,disabled:!S||a,children:e?`Save`:`Add rule`})]})]})}var dW=6,fW=typeof CSS<`u`&&CSS.supports(`position-area: block-end`);function pW({mail:e,onOpenNote:t}){let{list:n}=Gz(!0),r=(0,L.useId)(),i=(0,L.useRef)(null),a=(0,L.useRef)(null),[o,s]=(0,L.useState)(!1),c=e[e.length-1],l=Jz(n,e),u=(n??[]).filter(e=>!l.includes(e)).slice(0,dW);(0,L.useEffect)(()=>{let e=a.current;if(!e||fW)return;let t=t=>{if(t.newState!==`open`||!i.current)return;let n=i.current.getBoundingClientRect(),r=e.offsetWidth,a=e.offsetHeight;e.style.left=`${Math.max(8,Math.min(n.left,innerWidth-r-8))}px`,e.style.top=`${n.bottom+4+a>innerHeight-8&&n.top-4-a>=8?n.top-4-a:n.bottom+4}px`};return e.addEventListener(`toggle`,t),()=>e.removeEventListener(`toggle`,t)},[]);let d=()=>{try{a.current?.hidePopover()}catch{}},f=e=>{d(),t(e)},p=async()=>{if(!o&&c){s(!0);try{let e=await U(`saveNote`,{title:c.subject||``,html:``,links:[Kz(c)]});Wz.made(e),Vz.reload(),f(e.id)}catch(e){K.error(e,`The note could not be made: `)}finally{s(!1)}}},m=async(e,n)=>{if(!o&&c){s(!0);try{Vz.patch(await U(`addToNote`,{id:e,link:Kz(c)})),d(),K.show({kind:`ok`,text:`This conversation is now in "${n}"`,duration:6e3,action:{label:`Open`,run:()=>t(e)}})}catch(e){K.error(e,`Not added: `)}finally{s(!1)}}},h=l.length?`Notes: ${l.length} about this conversation`:`Note about this conversation`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{ref:i,type:`button`,className:`btn icon bare note-btn${l.length?` has`:``}`,popoverTarget:r,title:h,"aria-label":h,children:[(0,W.jsx)(_r,{size:16}),l.length>0&&(0,W.jsx)(`span`,{className:`note-btn-n`,"aria-hidden":`true`,children:l.length})]}),(0,W.jsxs)(`div`,{ref:a,id:r,popover:`auto`,role:`group`,className:`note-pop${fW?` anchored`:``}`,"aria-label":`Notes about this conversation`,children:[l.length>0&&(0,W.jsxs)(`div`,{className:`note-pop-group`,role:`group`,"aria-label":`About this conversation`,children:[(0,W.jsx)(`span`,{className:`note-pop-h`,children:`About this conversation`}),l.map(e=>(0,W.jsxs)(`button`,{type:`button`,className:`note-pop-item`,onClick:()=>f(e.id),children:[(0,W.jsx)(_r,{size:13}),` `,(0,W.jsx)(`span`,{children:Yz(e)})]},e.id))]}),(0,W.jsxs)(`button`,{type:`button`,className:`note-pop-item`,onClick:p,disabled:o,children:[(0,W.jsx)(Lr,{size:13}),` `,(0,W.jsx)(`span`,{children:`A new note about it`})]}),u.length>0&&(0,W.jsxs)(`div`,{className:`note-pop-group`,role:`group`,"aria-label":`Add it to a note`,children:[(0,W.jsx)(`span`,{className:`note-pop-h`,children:`Add it to`}),u.map(e=>(0,W.jsx)(`button`,{type:`button`,className:`note-pop-item`,onClick:()=>m(e.id,Yz(e)),disabled:o,children:(0,W.jsx)(`span`,{children:Yz(e)})},e.id))]})]})]})}function mW({rows:e,open:t,focus:n,onOpen:r,onClose:i,onFull:a,onNew:o}){let s=(0,L.useRef)(null),c=(0,L.useRef)(null),l=e=>{c.current=e,r(null)};return(0,L.useEffect)(()=>{c.current&&t===null&&(s.current?.querySelector(`[data-note="${CSS.escape(c.current)}"]`)?.focus(),c.current=null)},[t]),(0,W.jsxs)(`section`,{ref:s,className:`note-stack`,"aria-label":`Notes about this conversation`,onKeyDown:e=>{e.key===`Escape`&&!e.nativeEvent.isComposing&&!document.querySelector(`[popover]:popover-open`)&&(e.preventDefault(),e.stopPropagation(),i())},children:[(0,W.jsxs)(`header`,{className:`note-stack-head`,children:[(0,W.jsx)(_r,{size:14,className:`write-icon`}),(0,W.jsx)(`strong`,{children:`Notes`}),e.length>1&&(0,W.jsx)(`span`,{className:`dim note-stack-n`,children:e.length}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:o,title:`Another note about this conversation`,"aria-label":`New note about this conversation`,children:(0,W.jsx)(Lr,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:i,title:`Close the notes`,"aria-label":`Close the notes`,children:(0,W.jsx)(la,{size:15})})]}),(0,W.jsxs)(`div`,{className:`note-stack-list`,children:[!e.length&&(0,W.jsx)(`p`,{className:`dim note-stack-none`,children:`No note about this conversation yet.`}),e.map(e=>e.id===t?(0,W.jsx)(`div`,{className:`note-fold open`,children:(0,W.jsx)(SV,{id:e.id,wide:!0,startInTitle:!1,focus:n,onBack:()=>r(null),onOpenMail:()=>{},pane:{onClose:i,onFull:()=>a(e.id),onFold:()=>l(e.id)}})},e.id):(0,W.jsxs)(`button`,{type:`button`,className:`note-fold`,"data-note":e.id,"aria-expanded":!1,onClick:()=>r(e.id),title:`Unfold this note`,children:[(0,W.jsx)(ht,{size:14,className:`note-fold-mark`}),(0,W.jsx)(`span`,{className:`note-fold-name`,children:Yz(e)}),e.todos&&e.todos.open+e.todos.done>0&&(0,W.jsxs)(`span`,{className:`tag note-todos`,children:[(0,W.jsx)(Jn,{size:11}),` `,e.todos.done,`/`,e.todos.open+e.todos.done]})]},e.id))]})]})}var hW=new Set([`P`,`BR`,`UL`,`OL`,`LI`,`STRONG`,`B`,`EM`,`I`,`A`,`BLOCKQUOTE`]);function gW(e){let t=new DOMParser().parseFromString(e,`text/html`),n=e=>e.replace(/&/g,`&`).replace(/</g,`<`).replace(/>/g,`>`),r=e=>{if(e.nodeType===Node.TEXT_NODE)return n(e.textContent??``);if(e.nodeType!==Node.ELEMENT_NODE)return``;let t=e;if([`SCRIPT`,`STYLE`,`IFRAME`,`OBJECT`,`EMBED`,`SVG`,`IMG`,`VIDEO`,`AUDIO`,`LINK`,`META`,`HEAD`,`TITLE`].includes(t.tagName.toUpperCase()))return``;let i=[...t.childNodes].map(r).join(``),a=t.tagName.toUpperCase();if(!hW.has(a))return/^(DIV|H[1-6]|TR|TABLE|SECTION|ARTICLE)$/.test(a)&&i.trim()?`<p>${i}</p>`:i;if(a===`BR`)return`<br>`;if(a===`A`){let e=t.getAttribute(`href`)??``;return/^(https?:\/\/|mailto:)/i.test(e)?`<a href="${n(e).replace(/"/g,`"`)}">${i}</a>`:i}let o=a===`B`?`strong`:a===`I`?`em`:a.toLowerCase();return`<${o}>${i}</${o}>`};return[...t.body.childNodes].map(r).join(``).trim()}var _W=e=>({id:e.id,account:e.account??``,changeKey:``,subject:e.label,fromName:e.sub??``,fromEmail:``,isRead:!0,hasAttachments:!1,received:e.at??new Date().toISOString(),folder:`inbox`});async function vW(e){let t=e.text?oN(QM(e.text,!0)):``;if(e.to){let n=await U(`addToNote`,{id:e.to.id,...t?{html:t}:{},...e.todos.length?{todos:e.todos}:{}});return{id:n.id,title:n.title}}let n=await U(`saveNote`,{title:e.title??`Note`,html:`${t}${sN(e.todos)}`});return{id:n.id,title:n.title}}function yW({text:e}){let t=[];for(let n of e.split(`
|
|
182
|
+
`).map(e=>e.trim()).filter(Boolean)){let e=/^[-*•]\s+(.*)$/.exec(n),r=t[t.length-1];e?r&&`list`in r?r.list.push(e[1]):t.push({list:[e[1]]}):t.push({p:n})}let n=e=>e.replace(/\*\*(.+?)\*\*/g,`$1`);return(0,W.jsx)(W.Fragment,{children:t.map((e,t)=>`list`in e?(0,W.jsx)(`ul`,{children:e.list.map((e,t)=>(0,W.jsx)(`li`,{children:n(e)},t))},t):(0,W.jsx)(`p`,{children:n(e.p)},t))})}function bW(e){let t=e=>{let t=e?new Date(e).getTime():NaN;return Number.isNaN(t)?void 0:t},n=t(e.start),r=t(e.end);return{subject:e.subject??``,start:n,end:n!==void 0&&r!==void 0&&r>n?r:void 0,allDay:e.allDay===!0,location:e.location??``,attendees:e.attendees??``,body:e.body??``}}var xW=[`Summarize`,`What's asked of me?`,`Draft a reply`],SW=`Note my to-dos`;function CW({messages:e,inbound:t,onDraft:n,openDraft:r,onRecipients:i,onEvent:a,notes:o,onClose:s,side:c=!1}){let[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)([]),[h,g]=(0,L.useState)(null),_=(0,L.useRef)(null),[v,y]=(0,L.useState)(``),[b,x]=(0,L.useState)(null),S=(0,L.useRef)(null),C=(0,L.useRef)(!1),w=e.map(e=>e.id).join(`|`),T=(0,L.useCallback)(async(s,c)=>{S.current?.(),x(s);let l=!1,u=e=>{if(l)return;let t=e;t.what===`thread-draft`&&t.kind&&t.html!==void 0?n(t.kind,gW(t.html),t.draftId,t.changeKey):t.what===`recipients`&&t.change?i?.(t.change):t.what===`event`&&t.event?a?.(bW(t.event)):t.what===`note`&&t.id&&(C.current=!0,o?.written(t.id))},d=TP({chat:``,askedAt:0,turns:[],text:c??s,files:[],model:``,zone:Intl.DateTimeFormat().resolvedOptions().timeZone,thread:{what:s===`question`?`ask`:s,messages:e.map(e=>({id:e.id,account:e.account,conversationId:e.conversationId,subject:e.subject,fromName:e.fromName,fromEmail:e.fromEmail})),...t?{inbound:t.id}:{},hasCalendar:!!a,page:!0,...c?{request:c}:{},...(()=>{let e=r?.();return e?{open:e}:{}})(),notes:o?.about()??[]}},{onStep:()=>{},onOpen:u,onAsk:async()=>!1});S.current=()=>{l=!0,d.cancel()};try{let{answer:e}=await d.result;return e.role===`assistant`?(e.failed&&e.text!==`Stopped.`&&K.show({kind:`error`,text:`${s===`summary`?`Could not summarize`:s===`event`?`Could not read an event out of it`:`Could not do it`}: ${e.text.replace(/^That did not work: /,``)}`}),e):null}catch(e){return l||K.error(e,s===`summary`?`Could not summarize: `:s===`event`?`Could not read an event out of it: `:`Could not do it: `),null}finally{S.current=null,x(null)}},[w,t?.id,a]),E=(0,L.useCallback)(()=>{f(!0),T(`summary`).then(e=>{e&&!e.failed&&u(e.text)})},[T]);(0,L.useEffect)(()=>(u(null),f(!1),m([]),()=>S.current?.()),[w]);let D=e=>{let t=(e??v).trim();t&&!b&&(e===void 0&&y(``),g(t),C.current=!1,T(`question`,t).then(n=>{g(null);let r=n?.thread?.wrote||C.current;n&&!n.failed?m(e=>[...e,{q:t,a:n.text||`Done.`}]):r?m(e=>[...e,{q:t,a:`I wrote in your note about this conversation, then could not finish: look at the note before asking again.`}]):e===void 0&&y(e=>e||t)}))};(0,L.useEffect)(()=>{(h||p.length)&&_.current?.scrollTo({top:_.current.scrollHeight})},[h,p.length]);let O=()=>{T(`event`).then(e=>{let t=e?.thread?.event;e&&!e.failed&&(t?(a?.(bW(t)),t.start||K.show({text:`It names no date: set when it is.`})):K.show({kind:`error`,text:`The model did not describe an event.`}))})},k=!d&&!p.length&&!b&&!h;return(0,W.jsxs)(`section`,{className:`thread-ai${c?` side`:``}`,"aria-label":`AI: about this conversation`,children:[(0,W.jsxs)(`header`,{children:[(0,W.jsx)(hi,{size:14,className:`write-icon`}),(0,W.jsx)(`strong`,{children:`Assistant`}),(0,W.jsx)(`span`,{className:`grow`}),a&&l&&(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:O,disabled:!!b,title:`Start a calendar event from what this conversation says`,children:[b===`event`?(0,W.jsx)(H,{size:13,className:`spin`}):(0,W.jsx)(ot,{size:14}),` Add to calendar`]}),d&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:E,disabled:!!b,title:`Summarize again`,"aria-label":`Summarize again`,children:(0,W.jsx)(Gr,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:s,title:`Close (s)`,"aria-label":`Close the assistant`,children:(0,W.jsx)(la,{size:15})})]}),(!k||c)&&(0,W.jsxs)(`div`,{className:`thread-ai-body`,ref:_,children:[k&&(0,W.jsx)(`p`,{className:`dim thread-ai-hint`,children:`Ask about this conversation, or pick one of these.`}),l?(0,W.jsx)(yW,{text:l}):b===`summary`?(0,W.jsxs)(`p`,{className:`dim`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Reading the conversation…`]}):d?(0,W.jsxs)(`p`,{className:`dim`,children:[`No summary. `,(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:E,children:`Try again`})]}):null,p.map((e,t)=>(0,W.jsxs)(`div`,{className:`thread-ai-qa`,children:[(0,W.jsx)(`p`,{className:`thread-ai-q`,children:e.q}),(0,W.jsx)(yW,{text:e.a})]},t)),h&&(0,W.jsxs)(`div`,{className:`thread-ai-qa`,children:[(0,W.jsx)(`p`,{className:`thread-ai-q`,children:h}),(0,W.jsxs)(`p`,{className:`dim`,role:`status`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Working…`]})]})]}),!b&&(0,W.jsxs)(`div`,{className:`ai-chips`,role:`group`,"aria-label":`Suggestions`,children:[xW.filter(e=>e!==`Summarize`||!l).map(e=>(0,W.jsx)(`button`,{type:`button`,className:`ai-chip`,onClick:()=>e===`Summarize`?E():D(e),children:e},e)),o&&(0,W.jsx)(`button`,{type:`button`,className:`ai-chip`,onClick:()=>D(`Make a to-do list, in my note, of what this conversation asks of me.`),children:SW})]}),(0,W.jsx)(`div`,{className:`write-bar${b===`question`?` running`:``}`,children:b===`question`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`write-status`,role:`status`,children:`Working…`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>S.current?.(),title:`Stop`,"aria-label":`Stop`,children:(0,W.jsx)(Ci,{size:13})})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`input`,{type:`text`,value:v,onChange:e=>y(e.target.value),onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),D()),e.key===`Escape`&&(e.stopPropagation(),e.target.blur())},placeholder:`Ask about this conversation, or ask for a reply to be drafted`,"aria-label":`Ask about this conversation, or ask for something to be prepared`,autoComplete:`off`,disabled:!!b}),v.trim()&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon primary write-go`,onClick:()=>D(),title:`Ask (Enter)`,"aria-label":`Ask`,children:(0,W.jsx)(B,{size:15})})]})})]})}var wW=new Map,TW=200,EW=1200,DW=18144e5,OW=(e,t)=>({messages:e.map(e=>({id:e.id,account:e.account,conversationId:e.conversationId,subject:e.subject,fromName:e.fromName,fromEmail:e.fromEmail})),inbound:t.id,hasCalendar:!1,page:!0,notes:[]});function kW(e,t){if(t.folder&&t.folder!==`inbox`)return!1;let n=Date.parse(t.received);return!Number.isFinite(n)||Date.now()-n>DW?!1:!e.slice(e.findIndex(e=>e.id===t.id)+1).some(e=>e.folder===`sent`)}function AW({messages:e,inbound:t,replyKept:n,onDraft:r,onBusy:i}){let[a,o]=(0,L.useState)(iH),[s,c]=(0,L.useState)(wW.get(t.id)??null),[l,u]=(0,L.useState)(null),[d,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(``),h=(0,L.useRef)(null),g=(0,L.useRef)(null),_=kW(e,t);(0,L.useEffect)(()=>oH(()=>o(iH())),[]),(0,L.useEffect)(()=>{i(l!==null)},[l,i]),(0,L.useEffect)(()=>()=>{h.current?.(),i(!1)},[i]),(0,L.useEffect)(()=>{if(!a||!_||n||wW.has(t.id))return;let r=null,i=!0,o=setTimeout(()=>{r=TP({chat:``,askedAt:0,turns:[],text:`suggest`,files:[],model:``,thread:{what:`suggest`,...OW(e,t)}},{onStep:()=>{},onOpen:()=>{},onAsk:async()=>!1}),r.result.then(({answer:e})=>{if(e.role!==`assistant`||e.failed)return;let n=e.thread?.replies;Array.isArray(n)&&(wW.set(t.id,n),wW.size>TW&&wW.delete(wW.keys().next().value),i&&c(n))},()=>{})},EW);return()=>{i=!1,clearTimeout(o),r?.cancel()}},[t.id,a,_,n]);let v=async(n,i)=>{if(l!==null)return;u(n);let a=TP({chat:``,askedAt:0,turns:[],text:i,files:[],model:``,thread:{what:`quick`,says:i,...OW(e,t)}},{onStep:()=>{},onOpen:()=>{},onAsk:async()=>!1});h.current=a.cancel;try{let{answer:e}=await a.result;if(e.role!==`assistant`)return;let t=e.thread;!e.failed&&t?.html?r(t.kind===`replyAll`?`replyAll`:`reply`,gW(t.html)):e.text!==`Stopped.`&&K.show({kind:`error`,text:`The reply could not be written: try again, or press Reply.`})}catch(e){K.error(e,`The reply could not be written: `)}finally{h.current=null,u(null)}},y=()=>{f(!1),m(``),requestAnimationFrame(()=>g.current?.focus())},b=()=>{let e=p.trim();e&&(f(!1),m(``),v(`own`,e))};return!a||!_||n||!s?.length?null:(0,W.jsxs)(`div`,{className:`quick-replies`,role:`group`,"aria-label":`Quick replies`,"aria-busy":l!==null,children:[d?(0,W.jsxs)(`form`,{className:`quick-say`,onSubmit:e=>{e.preventDefault(),b()},children:[(0,W.jsx)(hi,{size:14,className:`dim`,"aria-hidden":`true`}),(0,W.jsx)(`input`,{autoFocus:!0,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),y())},placeholder:`What should the reply say?`,maxLength:500,"aria-label":`What the reply says`}),(0,W.jsx)(`button`,{type:`submit`,className:`btn icon bare`,disabled:!p.trim(),title:`Write it`,"aria-label":`Write it`,children:(0,W.jsx)(B,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:y,title:`Close`,"aria-label":`Close`,children:(0,W.jsx)(la,{size:15})})]}):(0,W.jsxs)(W.Fragment,{children:[s.map((e,t)=>(0,W.jsxs)(`button`,{type:`button`,className:`ai-chip qr-chip`,disabled:l!==null,onClick:()=>void v(t,e.says),title:e.says,"aria-label":`Reply: ${e.says}`,children:[l===t&&(0,W.jsx)(H,{size:12,className:`spin`,"aria-hidden":`true`}),e.label]},t)),(0,W.jsxs)(`button`,{type:`button`,ref:g,className:`ai-chip qr-chip qr-other`,disabled:l!==null,onClick:()=>f(!0),"aria-expanded":!1,children:[l===`own`?(0,W.jsx)(H,{size:12,className:`spin`,"aria-hidden":`true`}):(0,W.jsx)(Tr,{size:12,"aria-hidden":`true`}),` Reply with…`]}),l!==null&&(0,W.jsx)(`button`,{type:`button`,className:`btn bare quick-stop`,onClick:()=>h.current?.(),children:`Stop`})]}),(0,W.jsx)(`span`,{className:`sr-only`,role:`status`,children:l===null?``:`Writing the reply…`})]})}var jW=e=>/<img[^>]+src\s*=\s*["']?\s*(https?:)?\/\//i.test(e)||/url\(\s*["']?\s*(https?:)?\/\//i.test(e),MW=e=>(e||``).trim().toLowerCase();function NW(e){let[t,n]=(0,L.useState)(``);return(0,L.useEffect)(()=>{if(e===void 0)return;let t=!0;return rP(e).then(e=>{t&&n(MW(e.email))}),()=>{t=!1}},[e]),t}function PW(e){let[t,n]=(0,L.useState)(()=>Date.now());return(0,L.useEffect)(()=>{if(!e)return;n(Date.now());let t=setInterval(()=>n(Date.now()),6e4);return()=>clearInterval(t)},[e]),t}function FW(e){let t=new Set;return[...e.to||[],...e.cc||[],...e.bcc||[]].filter(e=>{let n=MW(e?.email)||MW(e?.name);return!n||t.has(n)?!1:(t.add(n),!0)})}function IW(e,t){let n=FW(e);if(!n.length)return`to nobody listed`;let r=e=>!!t&&MW(e.email)===t,i=e=>r(e)?`me`:ba({fromName:e.name||``,fromEmail:e.email||``});return n.length<=2?`to ${[...n.filter(e=>!r(e)),...n.filter(r)].map(i).join(`, `)}`:n.some(r)?`to me and ${n.length-1} others`:`to ${n.length} people`}function LW({person:e}){let t=e.email||``;if(!t)return null;let n=e.name&&MW(e.name)!==MW(t)?e.name:t;return(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare copy-addr`,title:`Copy ${t}`,"aria-label":`Copy address of ${n}`,onClick:async e=>{e.stopPropagation(),await _I(t)?K.show({kind:`ok`,text:`Copied`}):K.error(`the browser did not allow it.`,`Could not copy the address: `)},children:(0,W.jsx)(Ut,{size:12})})}function RW({p:e}){let t=e.email||``,n=!!e.name&&MW(e.name)!==MW(t);return(0,W.jsxs)(`span`,{className:`addr`,children:[n&&(0,W.jsx)(`span`,{className:`addr-name`,children:e.name}),t&&(0,W.jsxs)(`span`,{className:`addr-mail-wrap`,children:[(0,W.jsx)(`span`,{className:`addr-mail`,children:n?(0,W.jsxs)(W.Fragment,{children:[`<`,t,`>`]}):t}),(0,W.jsx)(LW,{person:e})]})]})}function zW({id:e,msg:t,from:n,isDraft:r}){let i=(t.replyTo||[]).filter(e=>e?.email),a=i.length>0&&(i.length!==1||MW(i[0].email)!==MW(n.email)),o=[[`From`,r?[]:[n]],[`To`,t.to||[]],[`Cc`,t.cc||[]],[`Bcc`,t.bcc||[]],[`Reply-To`,a?i:[]]];return(0,W.jsx)(`div`,{className:`msg-details`,id:e,role:`group`,"aria-label":`Message details`,children:(0,W.jsxs)(`dl`,{children:[o.filter(([,e])=>e.some(e=>e?.email||e?.name)).map(([e,t])=>(0,W.jsxs)(`div`,{className:`msg-details-row`,children:[(0,W.jsx)(`dt`,{children:e}),(0,W.jsx)(`dd`,{children:t.filter(e=>e?.email||e?.name).map((e,t)=>(0,W.jsx)(RW,{p:e},`${e.email}-${t}`))})]},e)),(0,W.jsxs)(`div`,{className:`msg-details-row`,children:[(0,W.jsx)(`dt`,{children:`Date`}),(0,W.jsx)(`dd`,{children:(0,W.jsx)(`time`,{dateTime:t.received,children:ha(t.received)})})]})]})})}function BW(e,t){let n=e&&t!==void 0?`${e}|${t}`:e,[r,i]=(0,L.useState)(n?hP.get(n)??null:null),[a,o]=(0,L.useState)(null);return(0,L.useEffect)(()=>{if(!e||!n)return;let r=hP.get(n);if(r){i(r);return}let a=!0,s=t===void 0?`read:${e}`:null,c=!1;return s&&qs(s).then(e=>{e&&a&&!c&&i(e)}),U(`read`,t===void 0?{id:e}:{id:e,live:!0}).then(e=>{c=!0,gP(n,e),s&&Js(s,e),a&&(i(e),o(null))},e=>{a&&o(e.message)}),()=>{a=!1}},[e,n,t]),{msg:r,error:a}}function VW({item:e,expanded:t,onToggle:n,onMailto:r,onAction:i,draft:a}){let{msg:o,error:s}=BW(t?e.id:null,e.folder===`drafts`?e.changeKey:void 0),[c,l]=(0,L.useState)(()=>So.imagesFrom(e.fromEmail)),[u,d]=(0,L.useState)(!1),[f,p]=(0,L.useState)([]),m=e.folder===`sent`,h=e.folder===`drafts`,[g,_]=(0,L.useState)(!1),v=(0,L.useRef)(null),y=(0,L.useId)(),b=(0,L.useRef)(null),x=(0,L.useRef)(null),S=(0,L.useRef)(!1),C=e=>{S.current=document.activeElement===e.currentTarget,n()};(0,L.useEffect)(()=>{S.current&&(S.current=!1,(t?x:b).current?.focus())},[t]);let w=NW(t?e.account:void 0),T=PW(t&&!!ga(e.received)),E=o?(o.attachments||[]).filter(e=>!e.inline&&!f.includes(e.id)):[],D=o?.quoteAt!=null,O=o?D&&!u?o.body.slice(0,o.quoteAt):o.body:``,k=!!o&&o.bodyType===`HTML`&&!c&&jW(O),A=h?`You`:ya(e),j={name:e.fromName,email:e.fromEmail},ee=!h&&e.fromEmail&&e.fromEmail.toLowerCase()!==(e.fromName||``).toLowerCase()?e.fromEmail:``,M=(0,W.jsxs)(W.Fragment,{children:[m&&(0,W.jsx)(`span`,{className:`tag`,children:`Sent`}),h&&(0,W.jsx)(`span`,{className:`tag draft`,children:`Draft`})]});return(0,W.jsxs)(`article`,{className:`msg${t?` open`:``}`,onKeyDown:e=>{e.key===`Escape`&&g&&(e.stopPropagation(),e.preventDefault(),_(!1),v.current?.focus())},children:[t?(0,W.jsxs)(`div`,{className:`msg-head open`,onClick:e=>{if(e.detail>1||e.target.closest(`button, a, input, .msg-name, .msg-addr, .msg-to-text`))return;let t=window.getSelection();t&&!t.isCollapsed&&e.currentTarget.contains(t.anchorNode)||n()},children:[(0,W.jsx)(`button`,{type:`button`,ref:x,className:`msg-fold`,onClick:C,"aria-expanded":!0,title:`Collapse this message`,"aria-label":`Message from ${A}, ${ma(e.received)}`,children:(0,W.jsx)(ao,{name:h?`You`:e.fromName||e.fromEmail,email:e.fromEmail,size:30,picture:!h,id:e.id})}),(0,W.jsxs)(`div`,{className:`msg-who`,children:[(0,W.jsxs)(`div`,{className:`msg-l1`,children:[(0,W.jsxs)(`span`,{className:`msg-from`,children:[(0,W.jsx)(`span`,{className:`msg-name`,title:A,children:A}),ee&&(0,W.jsxs)(`span`,{className:`msg-addr-wrap`,children:[(0,W.jsxs)(`span`,{className:`msg-addr`,title:ee,children:[`<`,ee,`>`]}),(0,W.jsx)(LW,{person:j})]}),!ee&&!h&&e.fromEmail&&(0,W.jsx)(LW,{person:j})]}),M,(0,W.jsx)(`time`,{className:`time`,dateTime:e.received,title:ha(e.received),children:_a(e.received,T)})]}),(0,W.jsxs)(`div`,{className:`msg-l2`,children:[o?(0,W.jsxs)(`button`,{type:`button`,ref:v,className:`msg-to`,"aria-expanded":g,"aria-controls":y,onClick:()=>_(e=>!e),title:g?`Hide the details`:`Show who it was sent to, and when`,children:[(0,W.jsx)(`span`,{className:`msg-to-text`,children:IW(o,w)}),g?(0,W.jsx)(_t,{size:13,"aria-hidden":`true`}):(0,W.jsx)(dt,{size:13,"aria-hidden":`true`})]}):(0,W.jsx)(`span`,{className:`msg-to-text`,children:e.displayTo?`to ${e.displayTo}`:``}),i&&!a&&(0,W.jsxs)(`span`,{className:`msg-tools`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>i(`reply`,e),title:`Reply to this message`,"aria-label":`Reply to this message`,children:(0,W.jsx)($r,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>i(`replyAll`,e),title:`Reply all to this message`,"aria-label":`Reply all to this message`,children:(0,W.jsx)(Zr,{size:15})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>i(`forward`,e),title:`Forward this message`,"aria-label":`Forward this message`,children:(0,W.jsx)(vn,{size:15})})]})]})]})]}):(0,W.jsxs)(`button`,{type:`button`,ref:b,className:`msg-head`,onClick:C,"aria-expanded":!1,children:[(0,W.jsx)(ao,{name:h?`You`:e.fromName||e.fromEmail,email:e.fromEmail,size:30,picture:!h,id:e.id}),(0,W.jsxs)(`span`,{className:`msg-who`,children:[(0,W.jsxs)(`span`,{className:`msg-l1`,children:[(0,W.jsx)(`span`,{className:`msg-name`,children:A}),M,(0,W.jsx)(`time`,{className:`time`,dateTime:e.received,title:ma(e.received),children:pa(e.received)})]}),(0,W.jsx)(`span`,{className:`msg-l2`,children:e.preview||e.subject})]})]}),t&&g&&o&&(0,W.jsx)(zW,{id:y,msg:o,from:j,isDraft:h}),a&&(0,W.jsxs)(`div`,{className:`msg-actions always`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:a.onEdit,title:`Continue this draft`,"aria-label":`Continue this draft`,children:(0,W.jsx)(Tr,{size:15})}),(0,W.jsx)(co,{onDiscard:a.onDiscard})]}),t&&(0,W.jsxs)(`div`,{className:`msg-body`,children:[!o&&!s&&(0,W.jsxs)(`div`,{className:`msg-loading`,children:[(0,W.jsx)(`span`,{className:`sk line w80`}),(0,W.jsx)(`span`,{className:`sk line w60`}),(0,W.jsx)(`span`,{className:`sk line w70`})]}),s&&(0,W.jsx)(`div`,{className:`msg-error`,children:s}),o&&(0,W.jsx)(LR,{msg:o,files:E}),k&&(0,W.jsxs)(`div`,{className:`images-bar`,children:[(0,W.jsx)(wn,{size:14}),(0,W.jsx)(`span`,{children:`Images are hidden`}),(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>l(!0),children:`Show`}),e.fromEmail&&(0,W.jsx)(`button`,{type:`button`,className:`link`,onClick:()=>{So.allowImagesFrom(e.fromEmail),l(!0)},children:`Always from this sender`})]}),o&&(o.bodyType===`HTML`?(0,W.jsx)(qR,{msg:o,html:O,images:c,onMailto:r,onInline:p}):(0,W.jsx)(`pre`,{className:`mail-text`,children:O})),o&&D&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon quote-toggle`,onClick:()=>d(e=>!e),title:u?`Hide quoted text`:`Show quoted text`,"aria-label":u?`Hide quoted text`:`Show quoted text`,"aria-pressed":u,children:(0,W.jsx)(Zt,{size:16})}),E.length>0&&(0,W.jsx)(`div`,{className:`cards`,children:E.map(e=>(0,W.jsx)(NI,{messageId:o.id,a:e,all:E},e.id||e.name))})]})]})}var HW=new Set,UW=`mw:side-split`,WW=()=>{try{let e=Number(localStorage.getItem(UW));return e>=.2&&e<=.8?e:.5}catch{return .5}},GW=(e,t)=>new Date(e.received).getTime()-new Date(t.received).getTime(),KW=e=>!!e.closest(`input, textarea, select, [contenteditable="true"]`);function qW({conv:e,folder:t,onBack:n,onStep:r,canStep:i,onSetRead:a,onSetFlagged:o,onMailto:s,onRule:c,onOpenNote:l,onMove:u,onEvent:d,insert:f,onInserted:p,replyNow:m,onRepliedNow:h,aiPane:g=!1,onAiPane:_,showAccount:v=!1,keysOff:y=!1}){let b=iF(t),x=tP(),S=vz(),[C,w]=(0,L.useState)(!1),T=S&&!!_,[E,D]=(0,L.useState)(!1),[O,k]=(0,L.useState)(null),A=(0,L.useRef)(null);A.current=O;let j=(0,L.useRef)(!1),[ee,M]=(0,L.useState)(!1),te=(t,n=!1)=>{j.current=!0,HW.delete(e.key),A.current=t,!Jz(Vz.current(),fe.current).some(e=>e.id===t)&&!ae.current.has(t)&&ae.current.set(t,{id:t,title:``,at:Date.now()}),M(n),D(!0),k(t)},ne=e=>{S?te(e,!0):l(e)},re=()=>{j.current=!0,HW.add(e.key),D(!1),document.querySelector(`.thread-bar .note-btn`)?.focus()},ie=Gz(!0).list,ae=(0,L.useRef)(new Map),oe=(0,L.useRef)([]),[se,N]=(0,L.useState)(WW),le=(0,L.useRef)(null),ue=(e,t=!1)=>{let n=Math.min(.8,Math.max(.2,e));if(N(n),t)try{localStorage.setItem(UW,String(Math.round(n*100)/100))}catch{}},de=(e,t)=>{let n=le.current?.getBoundingClientRect();n?.height&&ue((e.clientY-n.top)/n.height,t)},fe=(0,L.useRef)([]),pe=()=>{let e=Jz(Vz.current(),fe.current);return[...e,...[...ae.current.values()].filter(t=>!e.some(e=>e.id===t.id))]},me=()=>fe.current[fe.current.length-1],P=async(e,t,n=[],r=!1)=>{let i=me(),a=await U(`saveNote`,{title:e,html:`${t?oN(QM(t,!0)):``}${sN(n)}`,links:i?[Kz(i)]:[]});return ae.current.set(a.id,{id:a.id,title:a.title,at:Date.now()}),Wz.made(a),Vz.reload(),S&&te(a.id,r),a},he=()=>{let e=et.current;if(!e||e.kind!==`reply`&&e.kind!==`replyAll`&&e.kind!==`forward`)return null;let t=Xe.current?.compose.get().draftId;return{kind:e.kind,...t?{draftId:t}:{}}},F=(0,L.useCallback)(async e=>{let t=()=>Qe.current??(et.current?`${et.current.kind}:${et.current.target.id}`:null);for(let e=0;(!t()||!Xe.current||Ze.current!==t())&&e<4e3;e+=100)await new Promise(e=>setTimeout(e,100));if(!t())throw Error(`no reply or forward is open: write one with draft_reply or draft_forward first`);let n=Xe.current,r=Ze.current;if(!n||r!==t())throw Error(`the reply is still opening: try again`);let i=()=>Xe.current===n&&Ze.current===r;for(let t of[`to`,`cc`,`bcc`])for(let r of e.add?.[t]??[]){if(!i())throw Error(`the reply was closed meanwhile`);let e=n.compose.get();[...e.to,...e.cc,...e.bcc].some(e=>e.toLowerCase()===r.toLowerCase())||await n.compose.addRecipient(t,r)}for(let t of e.remove??[]){if(!i())throw Error(`the reply was closed meanwhile`);let e=n.compose.get();for(let r of[`to`,`cc`,`bcc`])e[r].some(e=>e.toLowerCase()===t.toLowerCase())&&await n.compose.removeRecipient(r,t)}},[]),I={about:()=>pe().slice(0,10).map(e=>({id:e.id,title:Yz(e),beside:e.id===A.current})),written:e=>{pe().some(t=>t.id===e)||(ae.current.set(e,{id:e,title:``,at:Date.now()}),U(`note`,{id:e}).then(e=>{ae.current.set(e.id,{id:e.id,title:e.title,at:Date.now()}),Wz.made(e)},()=>{})),Vz.reload(),S&&te(e)}},ge=T?g:C,_e=T?_:w,[ve,ye]=(0,L.useState)(()=>[...e.items].sort(GW));fe.current=ve.filter(e=>e.folder!==`drafts`);let be=Jz(ie,ve);for(let[e,t]of[...ae.current])(be.some(t=>t.id===e)||ie&&!ie.some(t=>t.id===e)&&Date.now()-t.at>5e3)&&ae.current.delete(e);let Se=[...be,...ae.current.values()];for(let e of Se)oe.current.includes(e.id)||oe.current.push(e.id);let Ce=[...Se].sort((e,t)=>oe.current.indexOf(e.id)-oe.current.indexOf(t.id));(0,L.useEffect)(()=>{ie&&O&&!Ce.some(e=>e.id===O)&&k(null)});let we=async()=>{try{await P(me()?.subject??``,void 0,[],!0)}catch(e){K.error(e,`The note could not be made: `)}},[Te,Ee]=(0,L.useState)(()=>new Set([e.latest.id,...e.items.filter(e=>!e.isRead).map(e=>e.id)])),[De,Oe]=(0,L.useState)(!0);(0,L.useEffect)(()=>{if(j.current||!ie)return;let t=Jz(ie,ve)[0];t&&!HW.has(e.key)?(j.current=!0,A.current=t.id,D(!0),k(t.id)):De||(j.current=!0)},[ie===null,De]);let[R,ke]=(0,L.useState)(null),Ae=(0,L.useRef)(null),je=e.latest.id;bo();let Me=(0,L.useRef)(new Map),Ne=(0,L.useRef)(!1),z=(0,L.useCallback)(async(e=!1)=>{let t=!1;Ne.current||qs(`thread:${je}`).then(e=>{e?.length&&!t&&Ie(e,!1,!0)});try{let{items:n}=await U(`thread`,{id:je});t=!0,Js(`thread:${je}`,n),Ie(n,e)}catch{}finally{t=!0,Oe(!1)}},[je]),Pe=(0,L.useRef)(new Set),Ie=(t,n,r=!1)=>{if(r)for(let e of t)Pe.current.add(e.id);let i=r?null:new Set(Pe.current);r||Pe.current.clear(),xI.set(e.key,t.filter(e=>e.folder!==`drafts`).length);let a=t.filter(e=>e.folder===`drafts`).map(e=>e.id);if(a.length&&Ee(e=>new Set([...e,...a])),!Ne.current&&!r){Ne.current=!0;let e=t.filter(e=>e.folder!==`drafts`).sort(GW).at(-1);e&&Ee(t=>t.has(e.id)?t:new Set([...t,e.id]))}ye(e=>{let r=new Set(e.map(e=>e.id)),a=t.filter(e=>!r.has(e.id));n&&a.length&&Ee(e=>new Set([...e,...a.map(e=>e.id)]));let o=e=>(e.folder===`drafts`||!!i?.has(e.id))&&!t.some(t=>t.id===e.id),s=new Map(e.filter(e=>!o(e)).map(e=>[e.id,e]));for(let e of t)s.set(e.id,{...s.get(e.id),...e,...Me.current.has(e.id)?{isFlagged:Me.current.get(e.id)}:{}});return[...s.values()].sort(GW)})};(0,L.useEffect)(()=>{z()},[z]),(0,L.useEffect)(()=>{let t=e.items.filter(e=>!e.isRead);t.length&&a(t,!0)},[e.key]),(0,L.useEffect)(()=>{let e=()=>{setTimeout(()=>z(!0),1500)};window.addEventListener(pP,e);let t=ce(()=>{z()},1200);return()=>{window.removeEventListener(pP,e),t()}},[z]);let Re=ve.filter(e=>e.folder!==`drafts`),B=[...Re].reverse().find(e=>e.folder!==`sent`)??Re[Re.length-1],ze=G.byRef(),Be=R?G.key(R.kind,R.target.id):null,Ve=Be?G.get(Be)?.ref?.draftId:void 0,Ue=new Set(ve.filter(e=>e.folder===`drafts`).map(e=>e.id)),We=ve.filter(e=>e.folder!==`drafts`||e.id!==Ve&&e.id!==R?.target.id&&!ze.get(e.id)?.draft.sending),Ge=[];for(let e of Re)for(let t of[`reply`,`forward`]){let n=G.key(t,e.id),r=G.get(n);r&&n!==Be&&(r.sending||!r.ref||!Ue.has(r.ref.draftId))&&Ge.push({key:n,draft:r,source:e})}let[Ke,qe]=(0,L.useState)(!1),Je=(0,L.useRef)(!1);Je.current=Ke;let Ye=(0,L.useCallback)((e,t)=>{Je.current||ke({kind:e,target:t})},[]),Xe=(0,L.useRef)(null),Ze=(0,L.useRef)(null),Qe=(0,L.useRef)(null),$e=(0,L.useCallback)(e=>{!e&&Ze.current&&Ze.current===Qe.current&&(Qe.current=null),Xe.current=e,Ze.current=e&&et.current?`${et.current.kind}:${et.current.target.id}`:null},[]),et=(0,L.useRef)(R);et.current=R;let tt=(0,L.useCallback)((e,t,n,r)=>{if(!B)return;let i=et.current;if(i&&i.kind===e&&i.target.id===B.id&&Xe.current){Xe.current.compose.setBody(t);return}let a=G.key(e,B.id),o=G.get(a);o?.ref&&n&&o.ref.draftId!==n&&U(`deleteDraft`,{draftId:n,changeKey:``}).catch(()=>{}),G.set(a,o?{...o,...o.ref||!n?{}:{ref:{draftId:n,changeKey:r??``}},html:t,dirty:!0,sending:!1}:{kind:e,...n?{ref:{draftId:n,changeKey:r??``}}:{},to:``,cc:``,bcc:``,subject:``,html:t,keepQuoted:!!n,loaded:!1,attachments:[],dirty:!0}),Qe.current=`${e}:${B.id}`,ke({kind:e,target:B})},[B]),nt=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!m||De||!B||nt.current)return;nt.current=!0;let e=Re.find(e=>e.id===m);e&&!et.current&&ke({kind:`reply`,target:e}),h?.()},[m,De,B?.id]);let rt=f?.id,it=(0,L.useRef)(null),at=B?.id;(0,L.useEffect)(()=>{if(!f||De||!B||it.current===f.id)return;it.current=f.id;let e=e=>!e.replace(/<[^>]+>| |\s/g,``),t=et.current,n=f.to?Re.find(e=>e.id===f.to):B;if(!n){K.show({kind:`error`,text:`That mail is no longer in this conversation: the reply was not opened.`,duration:6e3}),p?.();return}let r=f.draftId,i=e=>{r&&e!==r&&U(`deleteDraft`,{draftId:r,changeKey:``}).catch(()=>{})};if(t&&(t.kind===`reply`||t.kind===`replyAll`)&&Xe.current&&t.target.id===n.id){let t=Xe.current.compose.get().html,n=!!r&&Xe.current.compose.get().draftId===r;Xe.current.compose.setBody(e(t)||n?f.html:t+f.html),i(Xe.current.compose.get().draftId)}else{let t=G.key(`reply`,n.id),a=G.get(t),o=!!r&&a?.ref?.draftId===r,s=a&&!e(a.html)&&!o?a.html+f.html:f.html,c=f.all||a?.kind===`replyAll`?`replyAll`:`reply`;a?.ref&&!o&&i(a.ref.draftId),G.set(t,a?{...a,...a.ref?{}:r?{ref:{draftId:r,changeKey:f.changeKey??``}}:{},kind:c,html:s,dirty:!0,sending:!1}:{kind:c,...r?{ref:{draftId:r,changeKey:f.changeKey??``}}:{},to:``,cc:``,bcc:``,subject:``,html:s,keepQuoted:!!r,loaded:!1,attachments:[],dirty:!0}),ke({kind:c,target:n})}p?.()},[rt,De,at]);let ot=R?`${R.kind}:${R.target.id}`:null;(0,L.useEffect)(()=>{ot&&Ae.current?.scrollIntoView({block:`end`})},[ot]),(0,L.useEffect)(()=>{ko(ve.map(e=>({name:e.fromName,email:e.fromEmail})))},[ve]),(0,L.useEffect)(()=>{let e=e=>{if(!(y||KW(e.target)||DI.isOpen()||document.querySelector(`[popover]:popover-open`)||e.metaKey||e.ctrlKey||e.altKey)){if(e.key===`Escape`||e.key===`u`)n();else if(e.key===`j`)e.preventDefault(),r(1);else if(e.key===`k`)e.preventDefault(),r(-1);else if(e.key===`s`&&x)e.preventDefault(),_e(e=>!e);else if(b.some(t=>t.key===e.key)||e.key===`Delete`&&b.some(e=>e.to===`trash`))e.preventDefault(),u(e.key===`Delete`?`trash`:b.find(t=>t.key===e.key).to);else if(B)e.key===`r`?(e.preventDefault(),Ye(`reply`,B)):e.key===`a`?(e.preventDefault(),Ye(`replyAll`,B)):e.key===`f`&&(e.preventDefault(),Ye(`forward`,B));else return}};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[n,r,B,Ye,x,_e,u,t,y]);let st=e=>{let t=ze.get(e.id),n=t&&t.draft.kind!==`edit`&&t.draft.kind!==`new`?Re.find(e=>e.id===G.sourceOf(t.key)):void 0;t&&n?Ye(t.draft.kind,n):Ye(`edit`,e)},ct=async e=>{try{await U(`deleteDraft`,{draftId:e.id,changeKey:``});let t=ze.get(e.id);t&&G.remove(t.key),G.remove(G.key(`edit`,e.id)),ye(t=>t.filter(t=>t.id!==e.id)),K.show({text:`Draft discarded`})}catch(e){K.error(e,`Could not discard the draft: `)}},lt=e=>Ee(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}),V=ve.filter(e=>e.folder!==`drafts`),ut=V.some(e=>e.isFlagged),ft=async()=>{let t=new Set(e.items.map(e=>e.id)),n=[...V].reverse().find(e=>t.has(e.id))??V[V.length-1],r=ut?V.filter(e=>e.isFlagged):n?[n]:[];if(!r.length)return;let i=!ut;for(let e of r)Me.current.set(e.id,i);ye(e=>e.map(e=>r.some(t=>t.id===e.id)?{...e,isFlagged:i}:e)),await o(r,i);for(let e of r)Me.current.get(e.id)===i&&Me.current.delete(e.id);z()},pt=Math.max(V.length,xI.get(e.key)??0);return(0,W.jsxs)(`section`,{className:`thread${x&&ge&&T||S&&E?` with-ai`:``}`,children:[(0,W.jsxs)(`div`,{className:`thread-main`,children:[(0,W.jsxs)(`header`,{className:`thread-head thread-bar`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:n,title:`Back to the list (Esc)`,"aria-label":`Back`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsxs)(`div`,{className:`thread-acts`,children:[b.map(e=>e.to===`trash`?(0,W.jsx)(co,{onDiscard:()=>u(`trash`),title:e.key?`${e.label} (${e.key})`:e.label,confirmLabel:`Delete`},e.to):(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>u(e.to),title:e.key?`${e.label} (${e.key})`:e.label,"aria-label":e.label,children:e.to===`archive`?(0,W.jsx)(Fe,{size:16}):e.to===`junk`?(0,W.jsx)(si,{size:16}):(0,W.jsx)(Mn,{size:16})},e.to)),(0,W.jsx)(`span`,{className:`bar-sep`,"aria-hidden":`true`}),t!==`drafts`&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare flag`,"aria-pressed":ut,onClick:ft,title:ut?`Flagged: clear the flag`:`Flag for follow-up`,"aria-label":`Flag for follow-up`,children:(0,W.jsx)(fn,{size:16,fill:ut?`currentColor`:`none`})}),t===`inbox`&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>c(e.latest),title:`Alert me about mail from this sender`,"aria-label":`Alert me about mail from this sender`,children:(0,W.jsx)(He,{size:16})}),t===`inbox`&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>{B&&(a([B],!1),n())},title:`Mark as unread`,"aria-label":`Mark as unread`,children:(0,W.jsx)(ar,{size:16})}),t!==`drafts`&&(0,W.jsx)(pW,{mail:ve,onOpenNote:ne})]}),De&&(0,W.jsx)(H,{size:15,className:`spin dim`,"aria-label":`Loading the thread`}),(0,W.jsxs)(`span`,{className:`thread-step`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>r(-1),disabled:!i.prev,title:`Previous conversation (k)`,"aria-label":`Previous conversation`,children:(0,W.jsx)(_t,{size:17})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>r(1),disabled:!i.next,title:`Next conversation (j)`,"aria-label":`Next conversation`,children:(0,W.jsx)(dt,{size:17})})]}),x&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare thread-ai-toggle`,"aria-pressed":ge,onClick:()=>_e(e=>!e),title:`Summarize, or ask about, this conversation (s)`,"aria-label":`Summarize, or ask about, this conversation`,children:(0,W.jsx)(hi,{size:16})})]}),(0,W.jsxs)(`div`,{className:`thread-scroll`,children:[(0,W.jsxs)(`div`,{className:`thread-subject`,children:[(0,W.jsx)(`h1`,{children:e.latest.subject||`(no subject)`}),(pt>1||v)&&(0,W.jsxs)(`span`,{className:`thread-tags`,children:[pt>1&&(0,W.jsxs)(`span`,{className:`tag`,children:[pt,` messages`]}),v&&(0,W.jsx)(`span`,{className:`tag`,children:xe(e.latest.account)})]})]}),x&&ge&&!T&&Re.length>0&&(0,W.jsx)(CW,{messages:Re,inbound:B,onDraft:tt,openDraft:he,onRecipients:e=>void F(e).catch(e=>K.error(e,`Who it goes to was not changed: `)),onEvent:d,notes:I,onClose:()=>_e(!1)}),We.map(e=>(0,W.jsx)(VW,{item:e,expanded:Te.has(e.id),onToggle:()=>lt(e.id),onMailto:s,onAction:e.folder===`drafts`?void 0:Ye,draft:e.folder===`drafts`?{onEdit:()=>st(e),onDiscard:()=>ct(e)}:void 0},e.id)),Ge.map(({key:e,draft:t,source:n})=>(0,W.jsxs)(`div`,{className:`msg local-draft`,children:[(0,W.jsxs)(`div`,{className:`msg-head static`,children:[(0,W.jsx)(ao,{name:`You`,size:30}),(0,W.jsxs)(`span`,{className:`msg-who`,children:[(0,W.jsxs)(`span`,{className:`msg-l1`,children:[(0,W.jsx)(`span`,{className:`msg-name`,children:`You`}),(0,W.jsx)(`span`,{className:`tag draft`,children:`Draft`})]}),(0,W.jsx)(`span`,{className:`msg-l2`,children:t.sending?`Sending…`:t.html.replace(/<[^>]+>/g,` `).replace(/ /g,` `).replace(/\s+/g,` `).trim()||(t.kind===`forward`?`Forward, nothing written yet`:`Nothing written yet`)})]})]}),(0,W.jsx)(`div`,{className:`msg-actions always`,children:t.sending?(0,W.jsx)(H,{size:15,className:`spin dim`}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>Ye(t.kind,n),title:`Continue this draft`,"aria-label":`Continue this draft`,children:(0,W.jsx)(Tr,{size:15})}),(0,W.jsx)(co,{onDiscard:()=>{t.ref&&U(`deleteDraft`,t.ref).catch(()=>{}),G.remove(e),K.show({text:`Draft discarded`})}})]})})]},e)),!R&&B&&x&&Re.length>0&&(0,W.jsx)(AW,{messages:Re,inbound:B,replyKept:!!(G.get(G.key(`reply`,B.id))||G.get(G.key(`replyAll`,B.id))),onDraft:tt,onBusy:qe},B.id),!R&&B&&(0,W.jsxs)(`div`,{className:`reply-bar`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`btn`,disabled:Ke,onClick:()=>Ye(`reply`,B),title:`Reply (R)`,children:[(0,W.jsx)($r,{size:15}),` Reply `,(0,W.jsx)(`kbd`,{children:`R`})]}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,disabled:Ke,onClick:()=>Ye(`replyAll`,B),title:`Reply all (A)`,children:[(0,W.jsx)(Zr,{size:15}),` Reply all `,(0,W.jsx)(`kbd`,{children:`A`})]}),(0,W.jsxs)(`button`,{type:`button`,className:`btn`,disabled:Ke,onClick:()=>Ye(`forward`,B),title:`Forward (F)`,children:[(0,W.jsx)(vn,{size:15}),` Forward `,(0,W.jsx)(`kbd`,{children:`F`})]})]}),(0,W.jsx)(`div`,{ref:Ae})]}),R&&(R.kind===`edit`?(0,W.jsx)(JP,{kind:`edit`,draftId:R.target.id,inline:!0,onApi:$e,onClose:e=>{ke(null),e&&setTimeout(()=>z(),800)}},`edit:${R.target.id}`):(0,W.jsx)(JP,{kind:R.kind,source:R.target,onApi:$e,onClose:e=>{ke(null),e&&setTimeout(()=>z(),800)}},`${R.kind}:${R.target.id}`))]}),(x&&ge&&T||S&&E)&&(0,W.jsxs)(`aside`,{className:`thread-side`,ref:le,children:[x&&ge&&T&&(0,W.jsx)(`div`,{className:`side-part`,style:S&&E?{flexGrow:se}:void 0,children:Re.length>0?(0,W.jsx)(CW,{side:!0,messages:Re,inbound:B,onDraft:tt,openDraft:he,onRecipients:e=>void F(e).catch(e=>K.error(e,`Who it goes to was not changed: `)),onEvent:d,notes:I,onClose:()=>_e(!1)},e.key):(0,W.jsxs)(`p`,{className:`dim thread-side-wait`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Loading the conversation…`]})}),x&&ge&&T&&S&&E&&(0,W.jsx)(`div`,{className:`side-split`,role:`separator`,tabIndex:0,"aria-orientation":`horizontal`,"aria-label":`Between the assistant and the note: drag, or use the arrow keys, to give one more room`,"aria-valuemin":20,"aria-valuemax":80,"aria-valuenow":Math.round(se*100),onPointerDown:e=>{e.button===0&&(e.preventDefault(),e.currentTarget.setPointerCapture(e.pointerId),e.currentTarget.focus())},onPointerMove:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&de(e,!1)},onPointerUp:e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&(de(e,!0),e.currentTarget.releasePointerCapture(e.pointerId))},onLostPointerCapture:()=>ue(se,!0),onDoubleClick:()=>ue(.5,!0),onKeyDown:e=>{let t=e.key===`ArrowUp`?se-.05:e.key===`ArrowDown`?se+.05:e.key===`Home`?.2:e.key===`End`?.8:null;t!==null&&(e.preventDefault(),e.stopPropagation(),ue(t,!0))}}),S&&E&&(0,W.jsx)(`div`,{className:`side-part`,style:x&&ge&&T?{flexGrow:1-se}:void 0,children:(0,W.jsx)(mW,{rows:Ce,open:O,focus:ee,onOpen:e=>{M(!0),k(e)},onClose:re,onFull:l,onNew:we})})]})]})}function JW(){let e=Fo();return e.length?(0,W.jsx)(`div`,{className:`toasts`,role:`status`,"aria-live":`polite`,children:e.map(e=>(0,W.jsxs)(`div`,{className:`toast ${e.kind??`info`}`,children:[e.kind===`ok`&&(0,W.jsx)(V,{size:15}),e.kind===`error`&&(0,W.jsx)(yt,{size:15}),(0,W.jsx)(`span`,{className:`toast-text`,children:e.text}),e.action&&(0,W.jsx)(`button`,{type:`button`,className:`toast-action`,onClick:e.action.run,children:e.action.label}),!e.action&&e.duration===0&&(0,W.jsx)(`button`,{type:`button`,className:`toast-action`,onClick:()=>K.dismiss(e.id),children:`Dismiss`}),e.countdown&&(0,W.jsx)(`span`,{className:`toast-bar`,style:{"--ms":`${e.duration}ms`}})]},e.id))}):null}var YW=8388608,XW=20971520,ZW=400,QW=2e4;function $W(e){let t=new DataView(e.buffer,e.byteOffset,e.byteLength),n=-1;for(let r=e.length-22;r>=Math.max(0,e.length-22-65535);r--)if(t.getUint32(r,!0)===101010256){n=r;break}if(n<0)throw Error(`not a zip file`);let r=t.getUint16(n+10,!0),i=t.getUint32(n+16,!0),a=[];for(let n=0;n<Math.min(r,ZW)&&i+46<=e.length&&t.getUint32(i,!0)===33639248;n++){let n=t.getUint16(i+28,!0),r=t.getUint16(i+30,!0),o=t.getUint16(i+32,!0);a.push({name:new TextDecoder().decode(e.subarray(i+46,i+46+n)),method:t.getUint16(i+10,!0),compressed:t.getUint32(i+20,!0),size:t.getUint32(i+24,!0),offset:t.getUint32(i+42,!0)}),i+=46+n+r+o}return a}async function eG(e,t,n){if(t.offset+30>e.length||n.bytes<=0)return null;let r=new DataView(e.buffer,e.byteOffset,e.byteLength);if(r.getUint32(t.offset,!0)!==67324752)return null;let i=t.offset+30+r.getUint16(t.offset+26,!0)+r.getUint16(t.offset+28,!0);if(i+t.compressed>e.length)return null;let a=e.subarray(i,i+t.compressed),o=Math.min(YW,n.bytes);if(t.method===0)return a.length>o?null:(n.bytes-=a.length,a);if(t.method!==8)return null;let s=new Blob([a.slice()]).stream().pipeThrough(new DecompressionStream(`deflate-raw`)).getReader(),c=[],l=0;for(;;){let{done:e,value:t}=await s.read().catch(()=>({done:!0,value:void 0}));if(e||!t)break;if(l+=t.length,l>o)return await s.cancel().catch(()=>{}),null;c.push(t)}n.bytes-=l;let u=new Uint8Array(l),d=0;for(let e of c)u.set(e,d),d+=e.length;return u}function tG(e){let t=new TextDecoder().decode(e);if(/<!DOCTYPE|<!ENTITY/i.test(t.slice(0,4096))||/<!ENTITY/i.test(t))return null;let n=new DOMParser().parseFromString(t,`application/xml`);return n.getElementsByTagName(`parsererror`).length?null:n}var nG=(e,t)=>[...e.getElementsByTagName(`*`)].filter(e=>e.localName===t),rG=e=>[...e.attributes].find(e=>e.localName===`id`&&(e.namespaceURI??``).includes(`relationships`))?.value??null,iG=(e,t)=>{let n=t.slice(0,Math.max(0,e.text));return e.text-=n.length,n};async function aG(e,t,n,r,i){let a=t.find(e=>e.name===n),o=a&&await eG(e,a,i),s=o&&tG(o),c=new Map;if(!s)return c;for(let e of nG(s,`Relationship`)){let t=e.getAttribute(`Id`),n=e.getAttribute(`Target`)??``;t&&c.set(t,n.startsWith(`/`)?n.slice(1):`${r}${n}`)}return c}function oG(e){let t=``,n=e=>{for(let r of e.children){let e=r.localName;e!==`Fallback`&&e!==`txbxContent`&&e!==`p`&&e!==`instrText`&&e!==`delText`&&e!==`rPh`&&(e===`t`?t+=r.textContent??``:e===`tab`?t+=` `:e===`br`||e===`cr`?t+=`
|
|
183
|
+
`:n(r))}};return n(e),t}async function sG(e,t,n){let r=t.find(e=>e.name===`word/document.xml`),i=r&&await eG(e,r,n),a=i&&tG(i);if(!a)return``;let o=[],s=null,c=new Map,l=()=>{s&&(o.push(iG(n,[...c.values()].map(e=>e.join(` `)).join(` `))),s=null,c=new Map)};for(let e of nG(a,`p`)){if(n.text<=0)break;if([...cG(e)].some(e=>e.localName===`Fallback`))continue;let t=oG(e),r=[...cG(e)].find(e=>e.localName===`tc`)??null,i=r?.parentElement?.localName===`tr`?r.parentElement:null;!i||!r?(l(),o.push(iG(n,t))):(i!==s&&(l(),s=i),c.set(r,[...c.get(r)??[],t]))}return l(),o.join(`
|
|
184
|
+
`).replace(/\n{3,}/g,`
|
|
185
|
+
|
|
186
|
+
`).trim()}function*cG(e){for(let t=e.parentElement;t;t=t.parentElement)yield t}var lG=e=>{let t=/^([A-Z]+)\d+$/.exec(e??``);if(!t)return-1;let n=0;for(let e of t[1])n=n*26+(e.charCodeAt(0)-64);return n-1},uG=(e,t)=>new Date(Date.UTC(t?1904:1899,t?0:11,t?1:30)+Math.round(e*864e5)).toISOString().replace(/T00:00:00\.000Z$/,``).replace(/\.000Z$/,`Z`);async function dG(e,t,n){let r=async r=>{let i=t.find(e=>e.name===r),a=i&&await eG(e,i,n);return a?tG(a):null},i=await r(`xl/workbook.xml`),a=!!i&&nG(i,`workbookPr`).some(e=>[`1`,`true`].includes(e.getAttribute(`date1904`)??``)),o=await aG(e,t,`xl/_rels/workbook.xml.rels`,`xl/`,n),s=i?nG(i,`sheet`).map(e=>({name:e.getAttribute(`name`)??`Sheet`,part:o.get(rG(e)??``)})).filter(e=>e.part):[];s.length||(s=t.filter(e=>/^xl\/worksheets\/sheet\d+\.xml$/.test(e.name)).sort((e,t)=>Number(/(\d+)\.xml$/.exec(e.name)?.[1])-Number(/(\d+)\.xml$/.exec(t.name)?.[1])).map((e,t)=>({name:`Sheet ${t+1}`,part:e.name})));let c=await r(`xl/styles.xml`),l=new Set([14,15,16,17,18,19,20,21,22,45,46,47]);if(c)for(let e of nG(c,`numFmt`))/[dy]/i.test((e.getAttribute(`formatCode`)??``).replace(/"[^"]*"|\[[^\]]*\]/g,``))&&l.add(Number(e.getAttribute(`numFmtId`)));let u=c?nG(c,`cellXfs`).flatMap(e=>[...e.children].filter(e=>e.localName===`xf`)):[],d=e=>e!==null&&l.has(Number(u[Number(e)]?.getAttribute(`numFmtId`)??-1)),f=await r(`xl/sharedStrings.xml`),p=f?nG(f,`si`).map(e=>nG(e,`t`).filter(e=>!e.closest?.(`rPh`)&&![...cG(e)].some(e=>e.localName===`rPh`)).map(e=>e.textContent??``).join(``)):[],m=[];for(let e of s.slice(0,10)){if(n.text<=0)break;let t=await r(e.part);if(!t)continue;let i=[];for(let e of nG(t,`row`).slice(0,500)){if(n.text<=0)break;let t=[],r=0;for(let n of[...e.children].filter(e=>e.localName===`c`)){let e=lG(n.getAttribute(`r`)),i=e>=0?e:r;if(i>200)break;r=i+1;let o=[...n.children].find(e=>e.localName===`v`)?.textContent??``,s=n.getAttribute(`t`);t[i]=s===`s`?p[Number(o)]??``:s===`inlineStr`?nG(n,`t`).map(e=>e.textContent??``).join(``):s===`b`?o===`1`?`TRUE`:`FALSE`:o!==``&&d(n.getAttribute(`s`))&&Number.isFinite(Number(o))?uG(Number(o),a):o}i.push(iG(n,Array.from(t,e=>e??``).join(` `)))}m.push(`[${e.name}]\n${i.join(`
|
|
187
|
+
`)}`)}return m.join(`
|
|
188
|
+
|
|
189
|
+
`).trim()}async function fG(e,t,n){let r=t.find(e=>e.name===`ppt/presentation.xml`),i=r&&await eG(e,r,n),a=i?tG(i):null,o=await aG(e,t,`ppt/_rels/presentation.xml.rels`,`ppt/`,n),s=a?nG(a,`sldId`).map(e=>o.get(rG(e)??``)).filter(e=>!!e):[];s.length||(s=t.filter(e=>/^ppt\/slides\/slide\d+\.xml$/.test(e.name)).map(e=>e.name).sort((e,t)=>Number(/(\d+)\.xml$/.exec(e)?.[1])-Number(/(\d+)\.xml$/.exec(t)?.[1])));let c=[];for(let[r,i]of s.slice(0,100).entries()){if(n.text<=0)break;let a=t.find(e=>e.name===i),o=a&&await eG(e,a,n),s=o&&tG(o);if(!s)continue;let l=nG(s,`p`).filter(e=>![...cG(e)].some(e=>e.localName===`Fallback`)).map(oG).filter(Boolean);c.push(iG(n,`[Slide ${r+1}]\n${l.join(`
|
|
190
|
+
`)}`))}return c.join(`
|
|
191
|
+
|
|
192
|
+
`).trim()}var pG=e=>{let t=/\.([a-z0-9]+)$/i.exec(e)?.[1]?.toLowerCase();return t===`docx`||t===`xlsx`||t===`pptx`?t:null};async function mG(e,t){let n=pG(e);if(!n)return``;try{let e=Uint8Array.from(atob(t),e=>e.charCodeAt(0)),r=$W(e),i={bytes:XW,text:QW};return n===`docx`?await sG(e,r,i):n===`xlsx`?await dG(e,r,i):await fG(e,r,i)}catch{return``}}var hG=1568,gG=160,_G=26214400,vG=6e7,yG=6291456,bG=10485760,xG=1048576,SG=6e4,CG=/[\u0000-\u0008\u000e-\u001a\u001c-\u001f]/,wG=e=>{let t=``;for(let n=0;n<e.length;n+=32768)t+=String.fromCharCode(...e.subarray(n,n+32768));return btoa(t)},TG=(e,...t)=>t.every((t,n)=>e[n]===t),EG=e=>TG(e,137,80,78,71)||TG(e,255,216,255)||TG(e,71,73,70,56)||TG(e,82,73,70,70)&&TG(e.subarray(8),87,69,66,80),DG=e=>TG(e,37,80,68,70,45),OG=e=>`${Math.round(e/1024/1024)} MB`;function kG(e,t,n){let r=Math.min(1,t/Math.max(e.width,e.height)),i=document.createElement(`canvas`);i.width=Math.max(1,Math.round(e.width*r)),i.height=Math.max(1,Math.round(e.height*r));let a=i.getContext(`2d`);if(!a)throw Error(`the picture could not be drawn`);return a.fillStyle=`#fff`,a.fillRect(0,0,i.width,i.height),a.drawImage(e,0,0,i.width,i.height),i.toDataURL(`image/jpeg`,n)}async function AG(e){let t=e.name||`file`,n=new Uint8Array(await e.slice(0,16).arrayBuffer()),r=e=>({kind:`text`,data:wG(new TextEncoder().encode(e.slice(0,SG))),mediaType:`text/plain`});if(EG(n)){if(e.size>_G)throw Error(`${t} is more than ${OG(_G)}`);let n;try{n=await createImageBitmap(e)}catch{throw Error(`${t} could not be read as a picture`)}try{if(n.width*n.height>vG)throw Error(`${t} is too large a picture`);return{kind:`image`,data:kG(n,hG,.86).split(`,`)[1]??``,mediaType:`image/jpeg`,thumb:kG(n,gG,.72)}}finally{n.close()}}if(DG(n)){if(e.size>yG)throw Error(`${t} is more than ${OG(yG)}: too much to hand to a model`);return{kind:`pdf`,data:await ZN(e),mediaType:`application/pdf`}}if(pG(t)){if(e.size>bG)throw Error(`${t} is more than ${OG(bG)}`);let n=await mG(t,await ZN(e)).catch(()=>``);if(!n.trim())throw Error(`nothing could be read in ${t}`);return r(n)}if(e.size>xG)throw Error(`${t} is not a picture or a PDF, and too large to be read as text`);let i=new Uint8Array(await e.arrayBuffer()),a=``;try{a=new TextDecoder(`utf-8`,{fatal:!0}).decode(i)}catch{a=``}if(CG.test(a)&&(a=``),!a.trim())throw Error(UN(t,e.type)===`text`?`${t} is empty`:`${t} is not something the assistant can read: a picture, a PDF, a Word, Excel or PowerPoint file, or a text file`);return r(a)}async function jG(e){let t=e.name||`file`,n=await AG(e);if(!n.data)throw Error(`${t} could not be read`);let r=await U(`addChatFile`,{data:n.data});return{id:r.id,name:t.slice(0,200),kind:r.kind,size:r.size,...n.thumb?{thumb:n.thumb}:{}}}var MG=new Map;function NG(e){let t=MG.get(e);return t||(t=U(`chatFile`,{id:e}),t.catch(()=>MG.delete(e)),MG.set(e,t),MG.size>40&&MG.delete(MG.keys().next().value)),t}var PG=new Map;typeof window<`u`&&window.addEventListener(`mw:kept-revoked`,()=>{for(let e of PG.values())URL.revokeObjectURL(e);PG.clear(),MG.clear()});async function FG(e){let t=await NG(e.id),n=Uint8Array.from(atob(t.data),e=>e.charCodeAt(0)),r=PG.get(e.id);if(!r&&(r=URL.createObjectURL(new Blob([n],{type:t.kind===`text`?`text/plain;charset=utf-8`:t.mediaType})),PG.set(e.id,r),PG.size>40)){let[e,t]=PG.entries().next().value;PG.delete(e),URL.revokeObjectURL(t)}return t.kind===`text`?{url:r,text:new TextDecoder().decode(n)}:{url:r}}var IG=`mw:assistant-open`,LG=[`What needs my attention today?`,`Summarize my unread mail`,`What is on my calendar tomorrow?`,`Which of my to-dos are still open?`],RG=()=>`c${Array.from(crypto.getRandomValues(new Uint8Array(6)),e=>e.toString(16).padStart(2,`0`)).join(``)}`,zG=e=>{let t=e.turns.find(e=>e.role===`user`);return e.title||t?.text.replace(/\s+/g,` `).trim().slice(0,80)||(t?.role===`user`?t.files?.[0]?.name:``)||`New chat`},BG=e=>e.model?`${e.label} · ${e.model}`:e.label;function VG({active:e,host:t,onOpenMail:n,onOpenNote:r,onOpenCalendar:i,onSettings:a}){let[o,s]=(0,L.useState)(null),[c,l]=(0,L.useState)(RG),[u,d]=(0,L.useState)(null),[f,p]=(0,L.useState)(null),[,h]=(0,L.useReducer)(e=>e+1,0),[g,_]=(0,L.useState)(null),[v,y]=(0,L.useState)(null),[b,x]=(0,L.useState)(``),[S,C]=(0,L.useState)(!1),[w,T]=(0,L.useState)(!1),[E,D]=(0,L.useState)(null),[O,k]=(0,L.useState)(null),[A,j]=(0,L.useState)(null),[ee,M]=(0,L.useState)([]),[te,ne]=(0,L.useState)(!1),re=(0,L.useRef)(null),ie=(0,L.useRef)(null),ae=(0,L.useRef)(null),oe=(0,L.useRef)(null),se=(0,L.useRef)(null),N=(0,L.useRef)(new Map),ce=(0,L.useRef)(new Set),le=(0,L.useRef)(null);le.current=o;let ue=(0,L.useRef)([]);ue.current=ee;let de=(0,L.useRef)(c);de.current=c;let fe=(0,L.useRef)(null);fe.current=g;let pe=(0,L.useCallback)(e=>{N.current.set(e.id,e),h()},[]),me=(0,L.useRef)(new Map),P=(0,L.useCallback)(e=>{me.current.set(e.id,(me.current.get(e.id)??0)+1),pe(e)},[pe]),he=e=>fe.current?.id===e||ye.current.has(e)||me.current.has(e)||[...ce.current].some(t=>t.id===e),F=(0,L.useRef)(new Set),I=N.current.get(c)??(u?.id===c?u:{id:c,title:``,rev:0,model:null,turns:[]}),ge=f===c,_e=e=>{try{e?localStorage.setItem(IG,e):localStorage.removeItem(IG)}catch{}},ve=()=>typeof matchMedia==`function`&&matchMedia(`(hover: hover) and (pointer: fine)`).matches;(0,L.useEffect)(()=>{let e=ie.current;if(!e||typeof ResizeObserver>`u`)return;let t=()=>T(e.clientWidth>=760);t();let n=new ResizeObserver(t);return n.observe(e),()=>n.disconnect()},[]);let ye=(0,L.useRef)(new Set),be=(0,L.useCallback)(()=>{C(!1),_e(null),l(RG()),p(null),ve()&&setTimeout(()=>oe.current?.focus(),0)},[]),xe=(0,L.useCallback)(async e=>{C(!1),_e(e),l(e);let t=N.current.get(e),n=le.current?.find(t=>t.id===e),r=!!t&&!!t.rev&&!!n&&n.rev>t.rev&&!he(e);if(t&&!r){p(null);return}N.current.delete(e),p(e),d(null);let i=e=>({id:e.id,title:e.title,rev:e.rev,model:e.model,turns:e.turns,...e.web?{web:!0}:{}});qs(`chat:${e}`).then(t=>{t&&t.id===e&&!N.current.has(e)&&d(i(t))});try{let t=await U(`chat`,{id:e});N.current.has(e)||pe(i(t)),Js(`chat:${e}`,t)}catch(t){!N.current.has(e)&&de.current===e&&(K.error(t,`That chat could not be opened: `),be())}finally{p(t=>t===e?null:t)}},[pe,be]),Se=(0,L.useCallback)(async()=>{try{let e=await U(`chats`);s(e.chats),Js(`chats:list`,e.chats);let t=de.current,n=N.current.get(t),r=e.chats.find(e=>e.id===t);n&&n.rev&&r&&r.rev>n.rev&&!he(t)&&(N.current.delete(t),xe(t))}catch(e){s(e=>e??[]),K.error(e,`The chats could not be read: `)}},[xe]),Ce=(0,L.useRef)(!1);(0,L.useEffect)(()=>{if(!e||(m.get().then(y,()=>y({activeId:null,connections:[]})),Se(),Ce.current))return;Ce.current=!0,qs(`chats:list`).then(e=>{e&&s(t=>t??e)});let t=null;try{t=localStorage.getItem(IG)}catch{}t&&/^[a-z0-9]{6,24}$/.test(t)&&xe(t)},[e,Se,xe]),(0,L.useEffect)(()=>{if(!e)return;let t=()=>{document.visibilityState===`visible`&&Se()};return document.addEventListener(`visibilitychange`,t),()=>document.removeEventListener(`visibilitychange`,t)},[e,Se]);let we=(0,L.useRef)(new Map),Te=(0,L.useRef)(new Set),Ee=(0,L.useRef)(new Set),De=(0,L.useCallback)(e=>{let t=async e=>{if(Te.current.has(e)){Ee.current.add(e);return}let n=N.current.get(e);if(!n||!n.turns.length||F.current.has(e))return;let r=me.current.get(e)??0;try{let t=n.title,i=await U(`saveChat`,{id:e,turns:n.turns,model:n.model,web:!!n.web,...n.title?{title:n.title}:{},...n.rev?{rev:n.rev}:{}});(me.current.get(e)??0)===r&&me.current.delete(e);let a=N.current.get(e);a&&pe({...a,rev:i.rev,title:a.title===t?i.title:a.title}),s(t=>[i,...(t??[]).filter(t=>t.id!==e)]);let o=N.current.get(e);o&&Js(`chat:${e}`,{...o,created:0,updated:i.updated})}catch(n){let r=n instanceof Error?n.message:``,i=N.current.get(e);if(i&&/grown too long/.test(r)){pe({...i,full:!0}),K.show({kind:`error`,text:`This chat holds all a chat may: what comes after is not kept. Start a new one.`,duration:8e3});return}if(F.current.has(e))return;if(i&&(r.includes(`the chat was changed elsewhere`)||r.includes(`that chat is no longer there`))){let n={...i,id:RG(),rev:0,title:`${zG(i)} (copy)`.slice(0,200)};N.current.delete(e),N.current.set(n.id,n),me.current.delete(e),me.current.set(n.id,1);for(let t of ce.current)t.id===e&&(t.id=n.id);let a=we.current.get(e);a&&(we.current.set(n.id,a),ye.current.add(n.id)),de.current===e&&(l(n.id),_e(n.id)),_(t=>t&&t.id===e?{...t,id:n.id}:t),h(),K.show({text:r.includes(`that chat is no longer there`)?`This chat was removed elsewhere: yours goes on as a copy.`:`This chat was written in elsewhere since: yours goes on as a copy.`,duration:7e3}),await t(n.id),Se()}else K.error(n,`The chat could not be kept: `)}},n=e;ye.current.add(n);let r=(we.current.get(n)??Promise.resolve()).then(()=>t(n)).finally(()=>{for(let[e,t]of we.current)t===r&&(we.current.delete(e),ye.current.delete(e))});return we.current.set(n,r),r},[Se,pe]),Oe=v?.connections??[],R=Oe.find(e=>e.id===v?.activeId)??null,ke=I.model?Oe.find(e=>e.id===I.model.connection)??null:null,Ae=I.model&&ke?{...I.model,label:ke.label}:null,je=!!I.model&&!!v&&!ke,Me=Ae?BG(Ae):R?BG(R):``,Ne=!je&&!I.full&&(!!R?.model||!!Ae),[z,Pe]=(0,L.useState)(null),[Fe,Ie]=(0,L.useState)(null),Re=(0,L.useRef)(!1),ze=e=>{Ie(null);let t=e.replace(/\s+/g,` `).trim().slice(0,200),n=N.current.get(I.id)??I;t&&t!==zG(n)&&n.turns.length&&(P({...n,title:t}),De(n.id))},Be=e=>{let t={...N.current.get(I.id)??I,model:e};t.turns.length?P(t):pe(t),t.turns.length&&De(t.id)},Ve=e=>{let t=6-ee.length;e.length>t&&K.show({text:`A question takes 6 files at most.`,duration:5e3});for(let n of e.slice(0,Math.max(0,t))){let e=`${Date.now()}-${Math.random().toString(36).slice(2,8)}`;M(t=>[...t,{key:e,name:n.name||`file`}]),jG(n).then(t=>{ue.current.reduce((e,t)=>e+(t.file?.size??0),0)+t.size>6815744?(M(t=>t.filter(t=>t.key!==e)),K.show({kind:`error`,text:`Not attached: ${t.name} with the others is too much for one question.`,duration:7e3})):M(n=>n.map(n=>n.key===e?{...n,file:t}:n))},t=>{M(t=>t.filter(t=>t.key!==e)),K.error(t,`Not attached: `)})}},He=ee.some(e=>!e.file),Ue=async e=>{let n=(e??b).trim(),r=e===void 0?ee.flatMap(e=>e.file?[e.file]:[]):[];if(!n&&!r.length||g||!Ne||ge||e===void 0&&He)return;e===void 0&&(x(``),M([]));let i=N.current.get(I.id)??I,a=i.id,o=i.turns,c=Date.now();P({...i,turns:[...o,{role:`user`,text:n,at:c,...r.length?{files:r}:{}}]}),_e(a);let l={id:a};ce.current.add(l),_({id:a,steps:[]}),await De(a);let u=l.id;Te.current.add(u);let d,f=null,p=null;try{let e=Ae&&ke?{connectionId:ke.id,connectionRevision:ke.revision,...Ae.model&&Ae.model!==ke.model?{model:Ae.model}:{}}:R?{connectionId:R.id,connectionRevision:R.revision}:void 0,i=TP({chat:u,askedAt:c,turns:o,text:n,files:r,...e?{asked:e}:{},model:Me,zone:Intl.DateTimeFormat().resolvedOptions().timeZone},{onStep:e=>_(t=>t&&t.id===l.id?{...t,steps:[...t.steps,e]}:t),onOpen:e=>{e.what===`draft`?t.draftMail({draftId:e.draftId,changeKey:e.changeKey,to:e.to,cc:e.cc,subject:e.subject,html:gW(e.html),...e.account?{account:e.account}:{}}):e.what===`reply`&&t.draftReply(e.mail,gW(e.html),e.draftId,e.all===!0,e.changeKey)},onAsk:e=>new Promise(t=>{p=e=>{p=null,Pe(e=>e?.run===l?null:e),t(e)},Pe({run:l,query:e,answer:e=>p?.(e)})})});se.current=()=>{p?.(!1),i.cancel()},{answer:d,kept:f}=await i.result}catch(e){d={role:`assistant`,text:`That did not work: ${e instanceof Error?e.message:String(e)}`,at:Date.now(),model:Me,failed:!0}}finally{se.current=null,_(null),Pe(e=>e?.run===l?null:e)}Te.current.delete(u);let m=Ee.current.delete(u);if(f!==null&&l.id===u){let e=N.current.get(u),t=m||me.current.has(u);if(e&&e.rev===f-1)pe({...e,turns:[...e.turns,d],rev:f}),t&&await De(u);else if(e)try{let n=await U(`chat`,{id:u}),r=N.current.get(u)??e;pe({id:n.id,title:t&&r.title||n.title,rev:n.rev,model:t?r.model:n.model,turns:n.turns,...(t?r.web:n.web)?{web:!0}:{}}),t?await De(u):me.current.delete(u)}catch{}s(e=>(e??[]).map(e=>e.id===u?{...e,rev:Math.max(e.rev,f),n:e.n+1,updated:Date.now()}:e)),ce.current.delete(l);return}let h=N.current.get(l.id);h&&P({...h,turns:[...h.turns,d]}),De(l.id).finally(()=>ce.current.delete(l))},We=async(e,t,n)=>{let r=I.id,i=(N.current.get(r)?.turns[e])?.notes?.[t];if(!i||i.state!==`waiting`||E)return;let a={...i,state:`dropped`},o={id:r};ce.current.add(o);try{if(n===`save`){D(`${e}:${t}`);try{let n=(((N.current.get(r)?.rev??0)>0?await U(`chat`,{id:r}).catch(()=>null):null)?.turns[e])?.notes?.[t];if(n&&n.state!==`waiting`&&n.text===i.text&&JSON.stringify(n.todos)===JSON.stringify(i.todos)&&(n.title??``)===(i.title??``)&&(n.to?.id??``)===(i.to?.id??``))a=n;else{let e=await vW(i);a={...i,state:`saved`,id:e.id}}}catch(e){K.error(e,`The note could not be saved: `);return}finally{D(null)}}let s=N.current.get(o.id);if(!s)return;P({...s,turns:s.turns.map((n,r)=>r===e&&n.role===`assistant`?{...n,notes:(n.notes??[]).map((e,n)=>n===t?a:e)}:n)}),await De(o.id)}finally{ce.current.delete(o)}},[Ge,Ke]=(0,L.useState)(null),qe=async(e,n,r)=>{let i=I.id,a=(N.current.get(i)?.turns[e])?.events?.[n];if(!a||a.state!==`waiting`&&(r!==`open`||a.state!==`opened`)||Ge)return;let o=YG(a);if(r===`open`&&t.openEvent({subject:a.subject,start:o?.start,end:o?.end,allDay:a.allDay,location:a.location??``,attendees:a.attendees??``,body:a.body??``}),r===`open`&&a.state===`opened`)return;let s={...a,state:r===`open`?`opened`:`dropped`},c={id:i};ce.current.add(c);try{if(r===`save`){if(!o||a.attendees)return;Ke(`${e}:${n}`);try{let t=(((N.current.get(i)?.rev??0)>0?await U(`chat`,{id:i}).catch(()=>null):null)?.turns[e])?.events?.[n];if(t&&t.state!==`waiting`&&t.subject===a.subject&&t.start===a.start)s=t;else{let e=await U(`saveEvent`,{subject:a.subject,start:new Date(o.start).toISOString(),end:new Date(o.end).toISOString(),allDay:a.allDay,...a.location?{location:a.location}:{},...a.body?{body:a.body}:{}});s={...a,state:`saved`,id:e.id}}}catch(e){K.error(e,`The event could not be added: `);return}finally{Ke(null)}}let t=N.current.get(c.id);if(!t)return;P({...t,turns:t.turns.map((t,r)=>r===e&&t.role===`assistant`?{...t,events:(t.events??[]).map((e,t)=>t===n?s:e)}:t)}),await De(c.id)}finally{ce.current.delete(c)}},Je=async(e,t,n,r)=>{let i=I.id,a=(N.current.get(i)?.turns[e])?.contacts?.[t];if(!a||a.state!==`waiting`||O)return;let o={...a,state:`dropped`},s={id:i};ce.current.add(s);try{if(n===`save`){k(`${e}:${t}`);try{let n=(((N.current.get(i)?.rev??0)>0?await U(`chat`,{id:i}).catch(()=>null):null)?.turns[e])?.contacts?.[t];if(n&&n.state!==`waiting`&&(n.name??``)===(a.name??``)&&JSON.stringify(n.emails??[])===JSON.stringify(a.emails??[])&&JSON.stringify(n.phones??[])===JSON.stringify(a.phones??[]))o=n;else{let{state:e,account:t,id:n,...i}=a,s=await U(`addContact`,{...r?{account:r}:{},contact:i});o={...a,state:`saved`,account:s.account,id:s.id}}}catch(e){K.error(e,`The contact could not be added: `);return}finally{k(null)}}let c=N.current.get(s.id);if(!c)return;P({...c,turns:c.turns.map((n,r)=>r===e&&n.role===`assistant`?{...n,contacts:(n.contacts??[]).map((e,n)=>n===t?o:e)}:n)}),await De(s.id)}finally{ce.current.delete(s)}},Ye=async e=>{if(g?.id!==e.id){F.current.add(e.id);try{await U(`removeChat`,{id:e.id}),N.current.delete(e.id),me.current.delete(e.id),s(t=>(t??[]).filter(t=>t.id!==e.id)),de.current===e.id&&be()}catch(t){F.current.delete(e.id),K.error(t,`The chat could not be removed: `)}}},Xe=I.turns.length,Ze=g?.id===I.id?g.steps.length:0,Qe=I.turns.some(e=>e.role===`assistant`&&e.contacts?.some(e=>e.state===`waiting`));(0,L.useEffect)(()=>{if(!Qe||!e)return;let t=!1;return U(`contactBooks`).then(e=>{t||j(e)},()=>{t||j(e=>e??{books:[],readOnly:[]})}),()=>{t=!0}},[Qe,e]),(0,L.useEffect)(()=>{ae.current?.scrollTo({top:ae.current.scrollHeight})},[Xe,Ze,I.id]),(0,L.useEffect)(()=>{e&&!S&&ve()&&oe.current?.focus()},[e,I.id,S]);let $e=e=>e.kind===`mail`?n(_W(e)):e.kind===`note`?r(e.id):i(),et=g?.id===I.id,tt=!!g&&!et,nt=!!v&&!Oe.length&&o!==null&&o.length===0,rt=(0,W.jsxs)(`aside`,{className:`chat-list`,"aria-label":`Chats`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`btn chat-new`,onClick:be,children:[(0,W.jsx)(Lr,{size:15}),`New chat`]}),(0,W.jsx)(`div`,{className:`chat-rows`,children:o===null?(0,W.jsxs)(`p`,{className:`dim chat-none`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Reading…`]}):o.length===0?(0,W.jsx)(`p`,{className:`dim chat-none`,children:`No chat yet.`}):o.map(e=>(0,W.jsxs)(`div`,{className:`chat-row${e.id===I.id?` on`:``}`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`chat-row-main`,onClick:()=>void xe(e.id),"aria-current":e.id===I.id?`true`:void 0,children:[(0,W.jsx)(`span`,{className:`chat-row-title`,children:e.title||`New chat`}),(0,W.jsx)(`span`,{className:`chat-row-when`,children:ga(new Date(e.updated).toISOString())||new Date(e.updated).toLocaleDateString()})]}),(0,W.jsx)(co,{onDiscard:()=>void Ye(e),disabled:g?.id===e.id,className:`btn icon bare chat-row-x`,title:`Remove this chat`,label:`Remove the chat ${e.title}`,confirmLabel:`Remove`})]},e.id))})]});return(0,W.jsxs)(`div`,{className:`chat${w?` wide`:``}`,ref:ie,children:[(w||S)&&!nt&&rt,(w||!S||nt)&&(0,W.jsxs)(`section`,{className:`chat-main${te?` over`:``}`,"aria-label":`Assistant`,onDragOver:e=>{e.dataTransfer?.types.includes(`Files`)&&(e.preventDefault(),ne(!0))},onDragLeave:e=>{e.currentTarget.contains(e.relatedTarget)||ne(!1)},onDrop:e=>{e.dataTransfer?.files.length&&(e.preventDefault(),ne(!1),Ne&&Ve([...e.dataTransfer.files]))},children:[(0,W.jsxs)(`header`,{className:`chat-head`,children:[!w&&!nt&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>C(!0),title:`All chats`,"aria-label":`All chats`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(hi,{size:15,className:`write-icon`}),Fe===null?I.turns.length?(0,W.jsx)(`h1`,{className:`chat-title`,children:(0,W.jsxs)(`button`,{type:`button`,className:`chat-title-btn`,onClick:()=>Ie(zG(I)),title:`Rename this chat`,disabled:ge,children:[zG(I),(0,W.jsx)(Dr,{size:12,className:`chat-title-pen`})]})}):(0,W.jsx)(`h1`,{className:`chat-title`,children:`Assistant`}):(0,W.jsx)(`input`,{className:`chat-title-edit`,autoFocus:!0,value:Fe,maxLength:200,"aria-label":`Name of this chat`,onChange:e=>Ie(e.target.value),onBlur:()=>{Re.current||ze(Fe),Re.current=!1},onKeyDown:e=>{e.key===`Enter`&&(e.preventDefault(),ze(Fe)),e.key===`Escape`&&(e.preventDefault(),e.stopPropagation(),Re.current=!0,Ie(null))}}),(0,W.jsx)(`span`,{className:`grow`}),Oe.length>0&&(0,W.jsx)($G,{connections:Oe,usual:R,value:Ae,onChoose:Be,disabled:!!g||ge}),!w&&!nt&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:be,title:`New chat`,"aria-label":`New chat`,children:(0,W.jsx)(Lr,{size:16})})]}),(0,W.jsx)(`div`,{className:`chat-scroll`,ref:ae,children:v&&!Oe.length?(0,W.jsxs)(`div`,{className:`chat-empty`,children:[(0,W.jsx)(hi,{size:26,className:`write-icon`}),(0,W.jsx)(`p`,{children:`The assistant answers with an AI model of your choosing. None is connected yet.`}),(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:a,children:`Connect a model`})]}):ge&&!I.turns.length?(0,W.jsxs)(`p`,{className:`dim chat-none`,children:[(0,W.jsx)(H,{size:13,className:`spin`}),` Opening…`]}):I.turns.length?(0,W.jsxs)(`div`,{className:`chat-turns`,children:[I.turns.map((e,t)=>e.role===`user`?(0,W.jsxs)(`div`,{className:`chat-q`,children:[!!e.files?.length&&(0,W.jsx)(WG,{files:e.files}),e.text&&(0,W.jsx)(`p`,{children:e.text})]},t):(0,W.jsx)(KG,{turn:e,onRef:$e,onNote:(e,n)=>void We(t,e,n),onOpenNote:r,busy:E?.startsWith(`${t}:`)?Number(E.split(`:`)[1]):-1,onEvent:(e,n)=>void qe(t,e,n),eventBusy:Ge?.startsWith(`${t}:`)?Number(Ge.split(`:`)[1]):Ge?-2:-1,books:A,onContact:(e,n,r)=>void Je(t,e,n,r),contactBusy:O?.startsWith(`${t}:`)?Number(O.split(`:`)[1]):O?-2:-1},t)),et&&(0,W.jsxs)(`div`,{className:`chat-a working`,role:`status`,children:[(z?.run.id===I.id?g.steps.slice(0,-1):g.steps).map((e,t)=>(0,W.jsxs)(`p`,{className:`chat-step`,children:[(0,W.jsx)(V,{size:12}),e]},t)),z?.run.id===I.id?(0,W.jsxs)(`div`,{className:`chat-ask`,role:`group`,"aria-label":`A web search to allow`,children:[(0,W.jsxs)(`p`,{className:`chat-ask-head`,children:[(0,W.jsx)(bn,{size:14}),`Search the web for:`]}),(0,W.jsx)(`p`,{className:`chat-ask-query`,children:z.query}),(0,W.jsx)(`p`,{className:`chat-ask-why`,children:`This answer has your mail, notes, files or earlier answers in hand: check that nothing private is in these words before they go to the search.`}),(0,W.jsxs)(`p`,{className:`chat-ask-acts`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>z.answer(!0),children:`Search`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>z.answer(!1),children:`Skip`})]})]}):(0,W.jsxs)(`p`,{className:`chat-step now`,children:[(0,W.jsx)(H,{size:12,className:`spin`}),g.steps.length?`Working…`:`Thinking…`]})]})]}):(0,W.jsxs)(`div`,{className:`chat-empty`,children:[(0,W.jsx)(hi,{size:26,className:`write-icon`}),(0,W.jsx)(`h2`,{children:`What can I help with?`}),(0,W.jsx)(`p`,{children:`Ask about your mail, your calendar, your notes or your contacts. I can look things up, and prepare a mail, an event or a note for you to review. Nothing is sent or saved without you.`}),(0,W.jsx)(`div`,{className:`ai-chips`,role:`group`,"aria-label":`Suggestions`,children:LG.filter(e=>(t.hasCalendar||!/calendar/.test(e))&&(t.accounts.length>0||!/mail|attention/.test(e))).map(e=>(0,W.jsx)(`button`,{type:`button`,className:`ai-chip`,disabled:!Ne||!!g,onClick:()=>void Ue(e),children:e},e))})]})}),(!v||Oe.length>0)&&(0,W.jsxs)(`footer`,{className:`chat-foot`,children:[I.full&&(0,W.jsxs)(`p`,{className:`chat-missing`,role:`status`,children:[(0,W.jsx)(yt,{size:14}),(0,W.jsx)(`span`,{children:`This chat holds all a chat may. Start a new one to go on.`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:be,children:`New chat`})]}),je&&I.model&&(0,W.jsxs)(`p`,{className:`chat-missing`,role:`status`,children:[(0,W.jsx)(yt,{size:14}),(0,W.jsxs)(`span`,{children:[`This chat was asked with `,BG(I.model),`, which is not connected here.`]}),R?.model&&(0,W.jsxs)(`button`,{type:`button`,className:`btn`,onClick:()=>Be(null),children:[`Go on with `,R.model]})]}),ee.length>0&&(0,W.jsx)(`div`,{className:`chat-files pending`,role:`group`,"aria-label":`Attached to this question`,children:ee.map(e=>e.file?(0,W.jsx)(UG,{file:e.file,onRemove:()=>M(t=>t.filter(t=>t.key!==e.key))},e.key):(0,W.jsxs)(`span`,{className:`chat-file busy`,title:e.name,children:[(0,W.jsx)(H,{size:16,className:`spin`}),(0,W.jsx)(`span`,{className:`chat-file-name`,children:e.name})]},e.key))}),(0,W.jsxs)(`div`,{className:`chat-box${et?` running`:``}`,children:[(0,W.jsx)(`input`,{ref:re,className:`chat-file-input`,type:`file`,multiple:!0,hidden:!0,accept:`image/png,image/jpeg,image/gif,image/webp,application/pdf,.pdf,.docx,.xlsx,.pptx,.txt,.md,.csv,.json,.log,text/*`,onChange:e=>{Ve([...e.target.files??[]]),e.target.value=``}}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare chat-clip`,onClick:()=>re.current?.click(),disabled:!Ne||ee.length>=6,title:`Attach pictures, PDFs or documents`,"aria-label":`Attach files`,children:(0,W.jsx)(Cr,{size:16})}),(0,W.jsx)(`textarea`,{ref:oe,rows:1,value:b,placeholder:tt?z?`A web search waits for your word in another chat`:`Answering in another chat…`:je?`Choose a model for this chat`:Ne?`Ask anything`:`Choose a model in Settings, AI models`,"aria-label":`Ask the assistant`,disabled:!Ne&&!!v,onChange:e=>{x(e.target.value),e.target.style.height=`auto`,e.target.style.height=`${Math.min(e.target.scrollHeight,180)}px`},onPaste:e=>{let t=[...e.clipboardData.files];t.length&&Ne&&!e.clipboardData.getData(`text/plain`)&&(e.preventDefault(),Ve(t))},onKeyDown:e=>{e.key===`Enter`&&!e.shiftKey&&!e.nativeEvent.isComposing&&(e.preventDefault(),Ue(),oe.current&&(oe.current.style.height=`auto`))}}),et?(0,W.jsx)(`button`,{type:`button`,className:`btn icon primary chat-go`,onClick:()=>se.current?.(),title:`Stop`,"aria-label":`Stop`,children:(0,W.jsx)(Ci,{size:13})}):(0,W.jsx)(`button`,{type:`button`,className:`btn icon primary chat-go`,onClick:()=>void Ue(),disabled:!b.trim()&&!ee.length||He||!Ne||!!g||ge,title:He?`The files are still being attached`:`Ask (Enter)`,"aria-label":`Ask`,children:(0,W.jsx)(B,{size:16})})]}),(0,W.jsxs)(`p`,{className:`chat-note`,children:[Me?`${Me}. `:``,`It reads your mail to answer; what it prepares waits for you.`]})]})]})]})}var HG={mail:ar,note:_r,event:it};function UG({file:e,onOpen:t,onRemove:n}){let r=/\.([a-z0-9]{1,5})$/i.exec(e.name)?.[1]?.toUpperCase()??(e.kind===`pdf`?`PDF`:`TXT`),i=`${e.name}${e.size?` · ${Ca(e.size)}`:``}`,a=e.kind===`image`&&e.thumb?(0,W.jsx)(`img`,{src:e.thumb,alt:``,draggable:!1}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`span`,{className:`chat-file-kind ${e.kind}`,children:[(0,W.jsx)(on,{size:15}),r]}),(0,W.jsx)(`span`,{className:`chat-file-name`,children:e.name})]});return(0,W.jsxs)(`span`,{className:`chat-file ${e.kind}${e.kind===`image`&&e.thumb?` pic`:``}`,title:i,children:[t?(0,W.jsx)(`button`,{type:`button`,className:`chat-file-open`,onClick:t,"aria-label":`Open ${e.name}`,children:a}):a,n&&(0,W.jsx)(`button`,{type:`button`,className:`chat-file-x`,onClick:n,title:`Remove`,"aria-label":`Remove ${e.name}`,children:(0,W.jsx)(la,{size:12})})]})}function WG({files:e}){let t=t=>DI.open(e.map(e=>({name:e.name,size:e.size,kind:e.kind,load:()=>FG(e),canOpenTab:!1})),t);return(0,W.jsx)(`div`,{className:`chat-files`,role:`group`,"aria-label":`Attached`,children:e.map((e,n)=>(0,W.jsx)(UG,{file:e,onOpen:()=>t(n)},`${e.id}-${n}`))})}var GG=e=>e.replace(/<a target="_blank" rel="noopener noreferrer" href="([^"]*)">([\s\S]*?)<\/a>/g,(e,t,n)=>{let r=``;try{let e=new URL(t.replace(/&/g,`&`));r=e.protocol===`mailto:`?``:e.hostname.replace(/[<>&"]/g,``)}catch{}let i=n.replace(/<[^>]+>/g,``).toLowerCase();return`<a target="_blank" rel="noopener noreferrer" href="${t}" title="${t}">${n}</a>${r&&!i.includes(r.toLowerCase())?` <span class="chat-host">(${r})</span>`:``}`});function KG({turn:e,onRef:t,onNote:n,onOpenNote:r,busy:i,onEvent:a,eventBusy:o,books:s,onContact:c,contactBusy:l}){let u=(0,L.useMemo)(()=>GG(eN(e.text)),[e.text]),d=(0,L.useRef)(null);return qI(d,e.failed?``:u),(0,W.jsxs)(`div`,{className:`chat-a${e.failed?` failed`:``}`,children:[e.failed?(0,W.jsxs)(`p`,{className:`chat-failed`,children:[(0,W.jsx)(yt,{size:14}),e.text]}):(0,W.jsx)(`div`,{ref:d,className:`viewer-md chat-md`,dangerouslySetInnerHTML:{__html:u}}),!!e.refs?.length&&(0,W.jsx)(`div`,{className:`chat-refs`,role:`group`,"aria-label":`What this is about`,children:e.refs.map((e,n)=>{let r=HG[e.kind];return(0,W.jsxs)(`button`,{type:`button`,className:`chat-ref`,onClick:()=>t(e),title:e.kind===`mail`?`Open this conversation`:e.kind===`note`?`Open this note`:`Open the calendar`,children:[(0,W.jsx)(r,{size:13}),(0,W.jsx)(`span`,{className:`chat-ref-label`,children:e.label}),e.sub&&(0,W.jsx)(`span`,{className:`chat-ref-sub`,children:e.sub})]},n)})}),e.notes?.map((e,t)=>(0,W.jsxs)(`div`,{className:`chat-note-card ${e.state}`,role:`group`,"aria-label":e.to?`To add to the note ${e.to.label}`:`A new note: ${e.title}`,children:[(0,W.jsxs)(`p`,{className:`chat-note-head`,children:[(0,W.jsx)(_r,{size:13}),(0,W.jsx)(`strong`,{children:e.to?`Add to “${e.to.label}”`:`New note: ${e.title}`})]}),e.text&&(0,W.jsx)(`div`,{className:`viewer-md chat-md chat-note-text`,dangerouslySetInnerHTML:{__html:eN(e.text)}}),e.todos.length>0&&(0,W.jsx)(`ul`,{className:`chat-note-todos`,children:e.todos.map((e,t)=>(0,W.jsx)(`li`,{children:e},t))}),(0,W.jsx)(`p`,{className:`chat-note-acts`,children:e.state===`waiting`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,disabled:i>=0,onClick:()=>n(t,`save`),children:[i===t?(0,W.jsx)(H,{size:13,className:`spin`}):null,e.to?`Add to the note`:`Save the note`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:i>=0,onClick:()=>n(t,`drop`),children:`Discard`})]}):e.state===`saved`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`span`,{className:`chat-note-done`,children:[(0,W.jsx)(V,{size:13}),e.to?`Added`:`Saved`]}),e.id&&(0,W.jsx)(`button`,{type:`button`,className:`btn`,onClick:()=>r(e.id),children:`Open the note`})]}):(0,W.jsx)(`span`,{className:`dim`,children:`Discarded`})})]},t)),e.events?.map((e,t)=>(0,W.jsx)(XG,{ev:e,busy:o===t,disabled:o!==-1,onAct:e=>a(t,e)},t)),e.contacts?.map((e,t)=>(0,W.jsx)(ZG,{c:e,books:s,busy:l===t,disabled:l!==-1,onAct:(e,n)=>c(t,e,n)},t)),!!e.sources?.length&&(0,W.jsxs)(`div`,{className:`chat-sources`,role:`group`,"aria-label":`Pages of the web it read`,children:[(0,W.jsxs)(`span`,{className:`chat-sources-h`,children:[(0,W.jsx)(bn,{size:12}),`Sources`]}),e.sources.map((e,t)=>{let n=``;try{n=new URL(e.url).hostname.replace(/^www\./,``)}catch{}return(0,W.jsxs)(`a`,{className:`chat-source`,href:e.url,target:`_blank`,rel:`noopener noreferrer`,title:e.url,children:[(0,W.jsx)(`span`,{className:`chat-source-title`,children:e.title||n}),e.title&&n&&(0,W.jsx)(`span`,{className:`chat-source-host`,children:n})]},t)})]}),(e.model||!!e.steps?.length)&&(0,W.jsxs)(`p`,{className:`chat-meta`,children:[e.model,!!e.steps?.length&&(0,W.jsxs)(`span`,{title:e.steps.map(e=>`${e.ok?``:`(failed) `}${e.label??e.name}`).join(`
|
|
193
|
+
`),children:[e.model?` · `:``,e.steps.length,` `,e.steps.length===1?`step`:`steps`]})]})]})}function qG(e){let t=e?.trim().replace(/\s*\(([^()]*)\)\s*/g,`, $1`).replace(/[\s,]+$/,``);if(!t)return;let n=t.replace(/\bwhatsapp\b/gi,`WhatsApp`);return n.charAt(0).toUpperCase()+n.slice(1)}function JG(e,t){let n=/^(\d{4})-(\d{2})-(\d{2})(?:T(\d{2}):(\d{2}))?/.exec(e);if(!n)return NaN;let[r,i,a,o,s]=[+n[1],n[2]-1,+n[3],+(n[4]??0),+(n[5]??0)],c=!1;try{t&&(new Intl.DateTimeFormat(`en-US`,{timeZone:t}),c=!0)}catch{c=!1}if(!c||!t)return new Date(r,i,a,o,s).getTime();let l=e=>{let n=Object.fromEntries(new Intl.DateTimeFormat(`en-US`,{timeZone:t,hourCycle:`h23`,year:`numeric`,month:`2-digit`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`}).formatToParts(new Date(e)).map(e=>[e.type,e.value]));return Date.UTC(+n.year,n.month-1,+n.day,+n.hour,+n.minute)-Math.floor(e/6e4)*6e4},u=Date.UTC(r,i,a,o,s),d=u-l(u),f=u-l(d);return f!==d&&(d=f),d}function YG(e){if(!e.start)return null;if(e.allDay){let t=e=>{let[t,n,r]=e.slice(0,10).split(`-`).map(Number);return new Date(t,n-1,r)},n=t(e.start),r=e.end?t(e.end):n;return Number.isNaN(n.getTime())||Number.isNaN(r.getTime())||r<n?null:{start:n.getTime(),end:new Date(r.getFullYear(),r.getMonth(),r.getDate()+1).getTime()}}if(e.start.length<=10)return null;let t=JG(e.start,e.zone),n=e.end&&e.end.length>10?JG(e.end,e.zone):NaN;return Number.isNaN(t)?null:{start:t,end:!Number.isNaN(n)&&n>t?n:t+36e5}}function XG({ev:e,busy:t,disabled:n,onAct:r}){let i=YG(e),a=i?e.allDay?(e=>`${new Date(i.start).toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`})}${e.toDateString()===new Date(i.start).toDateString()?``:` – ${e.toLocaleDateString(void 0,{weekday:`short`,day:`numeric`,month:`short`})}`}, all day`)(new Date(i.end-1)):`${new Date(i.start).toLocaleString(void 0,{weekday:`short`,day:`numeric`,month:`short`,hour:`numeric`,minute:`2-digit`})} – ${new Date(i.end).toLocaleTimeString(void 0,{hour:`numeric`,minute:`2-digit`})}`:e.start?`${e.start.slice(0,10)}, no time yet`:`No day yet`,o=!!e.attendees;return(0,W.jsxs)(`div`,{className:`chat-note-card chat-event-card ${e.state}`,role:`group`,"aria-label":`A new event: ${e.subject}`,children:[(0,W.jsxs)(`p`,{className:`chat-note-head`,children:[(0,W.jsx)(it,{size:13}),(0,W.jsxs)(`strong`,{children:[`New event: `,e.subject]})]}),(0,W.jsx)(`p`,{className:`chat-event-when`,children:a}),e.location&&(0,W.jsx)(`p`,{className:`dim`,children:e.location}),o&&(0,W.jsxs)(`p`,{className:`dim`,children:[`With `,e.attendees]}),(0,W.jsx)(`p`,{className:`chat-note-acts`,children:e.state===`waiting`?(0,W.jsxs)(W.Fragment,{children:[i&&!o&&(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,disabled:n,onClick:()=>r(`save`),children:[t?(0,W.jsx)(H,{size:13,className:`spin`}):null,`Add to calendar`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn${!i||o?` primary`:``}`,disabled:n,onClick:()=>r(`open`),children:o?`Open to invite them`:`Open in calendar`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:n,onClick:()=>r(`drop`),children:`Discard`})]}):e.state===`saved`?(0,W.jsxs)(`span`,{className:`chat-note-done`,children:[(0,W.jsx)(V,{size:13}),`Added to the calendar`]}):e.state===`opened`?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`dim`,children:`Opened in the calendar`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:n,onClick:()=>r(`open`),children:`Open again`})]}):(0,W.jsx)(`span`,{className:`dim`,children:`Discarded`})})]})}function ZG({c:e,books:t,busy:n,disabled:r,onAct:i}){let[a,o]=(0,L.useState)(``),s=t?.books??[],c=s.find(e=>e.account===a)??s[0],l=e.name||e.company||e.emails?.[0]||e.phones?.[0]?.number||`Contact`,u=[...e.company&&e.company!==l?[[`Company`,e.company]]:[],...e.title?[[`Title`,e.title]]:[],...(e.emails??[]).map(e=>[`Email`,e]),...(e.phones??[]).map(e=>[`Phone`,e.number,qG(e.kind)]),...(e.addresses??[]).map(e=>[`Address`,e.text,qG(e.kind)]),...(e.urls??[]).map(e=>[`Web`,e]),...e.note?[[`Note`,e.note]]:[]],d=e=>e.email||e.label||e.account;return(0,W.jsxs)(`div`,{className:`chat-note-card chat-contact-card ${e.state}`,role:`group`,"aria-label":`A new contact: ${l}`,children:[(0,W.jsxs)(`p`,{className:`chat-note-head`,children:[(0,W.jsx)(qi,{size:13}),(0,W.jsxs)(`strong`,{children:[`New contact: `,l]})]}),u.length>0&&(0,W.jsx)(`dl`,{className:`chat-contact-fields`,children:u.map(([e,t,n],r)=>(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`dt`,{children:e}),(0,W.jsxs)(`dd`,{children:[t,n&&(0,W.jsx)(`span`,{className:`chat-contact-kind`,children:n})]})]},r))}),(0,W.jsx)(`p`,{className:`chat-note-acts`,children:e.state===`waiting`?t?s.length?(0,W.jsxs)(W.Fragment,{children:[s.length>1&&(0,W.jsx)(`select`,{className:`chat-contact-book`,value:c?.account??``,onChange:e=>o(e.target.value),disabled:r,"aria-label":`Add to the contacts of`,children:s.map(e=>(0,W.jsx)(`option`,{value:e.account,children:d(e)},e.account))}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary`,disabled:r,onClick:()=>i(`save`,c?.account),children:[n?(0,W.jsx)(H,{size:13,className:`spin`}):null,`Add to Google contacts`]}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:()=>i(`drop`),children:`Discard`})]}):(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`span`,{className:`chat-contact-none`,children:t.readOnly.length?`Google allows reading your contacts, not adding to them yet: sign in to Google again in Settings, Accounts, to allow it.`:`No account is signed in to Google to add it to.`}),(0,W.jsx)(`button`,{type:`button`,className:`btn`,disabled:r,onClick:()=>i(`drop`),children:`Discard`})]}):(0,W.jsx)(`span`,{className:`dim`,children:(0,W.jsx)(H,{size:13,className:`spin`})}):e.state===`saved`?(0,W.jsxs)(`span`,{className:`chat-note-done`,children:[(0,W.jsx)(V,{size:13}),`Added`,e.account?` to ${s.find(t=>t.account===e.account)?d(s.find(t=>t.account===e.account)):e.account}`:``]}):(0,W.jsx)(`span`,{className:`dim`,children:`Discarded`})})]})}var QG=new Map;function $G({connections:e,usual:t,value:n,onChoose:r,disabled:i}){let a=(0,L.useRef)(null),o=(0,L.useRef)(null),[s,c]=(0,L.useState)({}),[l,u]=(0,L.useState)(``),d=e.map(e=>`${e.id}:${e.revision}`).join(`|`);(0,L.useEffect)(()=>{let t=o.current;if(!t)return;let n=n=>{if(n.newState!==`open`||!a.current)return;let r=a.current.getBoundingClientRect(),i=Math.min(340,innerWidth-16);t.style.width=`${i}px`,t.style.left=`${Math.max(8,Math.min(r.right-i,innerWidth-i-8))}px`,t.style.top=`${r.bottom+6}px`,t.style.maxHeight=`${Math.max(160,innerHeight-r.bottom-16)}px`,u(``);for(let t of e){let e=`${t.id}:${t.revision}`,n=QG.get(e);n||(n=m.listModels({kind:t.kind,baseUrl:t.baseUrl,apiKey:``,id:t.id}).then(e=>e.ok&&Array.isArray(e.data)?e.data.map(e=>({id:String(e.id),name:e.name,tools:e.capabilities?.tools})):[],()=>[]),QG.set(e,n),n.then(t=>{!t.length&&QG.get(e)===n&&QG.delete(e)})),n.then(e=>c(n=>n[t.id]===e?n:{...n,[t.id]:e}))}};return t.addEventListener(`beforetoggle`,n),()=>t.removeEventListener(`beforetoggle`,n)},[d]);let f=e=>{try{o.current?.hidePopover()}catch{}r(e)},p=n?BG(n):t?BG(t):`Choose a model`,h=l.trim().toLowerCase(),g=e.reduce((e,t)=>e+Math.max(1,(s[t.id]??[]).length),0);return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{ref:a,type:`button`,className:`btn chat-model`,popoverTarget:`mw-chat-model`,disabled:i,title:`The model this chat is asked with`,"aria-label":`Model: ${p}`,children:[(0,W.jsx)(`span`,{className:`chat-model-name`,children:p}),(0,W.jsx)(dt,{size:13})]}),(0,pl.createPortal)((0,W.jsxs)(`div`,{ref:o,id:`mw-chat-model`,popover:`auto`,className:`chat-models`,role:`group`,"aria-label":`Models`,children:[g>8&&(0,W.jsxs)(`label`,{className:`chat-models-q`,children:[(0,W.jsx)(ti,{size:13}),(0,W.jsx)(`input`,{type:`text`,value:l,onChange:e=>u(e.target.value),placeholder:`Find a model`,"aria-label":`Find a model`})]}),(0,W.jsxs)(`div`,{className:`chat-models-list`,children:[t&&!h&&(0,W.jsxs)(`button`,{type:`button`,className:`chat-models-row${n?``:` on`}`,onClick:()=>f(null),children:[(0,W.jsx)(`span`,{className:`chat-models-name`,children:t.model||t.label}),(0,W.jsx)(`span`,{className:`chat-models-note`,children:`The one in Settings`}),!n&&(0,W.jsx)(V,{size:14})]}),e.map(e=>{let t=(s[e.id]??[]).filter(t=>t.id!==e.model),r=[...e.model?[{id:e.model}]:[],...t].filter(t=>!h||`${t.id} ${t.name??``} ${e.label}`.toLowerCase().includes(h)).slice(0,60);return r.length?(0,W.jsxs)(`div`,{className:`chat-models-group`,role:`group`,"aria-label":e.label,children:[(0,W.jsx)(`span`,{className:`chat-models-h`,children:e.label}),r.map(t=>{let r=!!n&&n.connection===e.id&&n.model===t.id;return(0,W.jsxs)(`button`,{type:`button`,className:`chat-models-row${r?` on`:``}`,onClick:()=>f({connection:e.id,label:e.label,model:t.id}),children:[(0,W.jsx)(`span`,{className:`chat-models-name`,children:t.name&&t.name!==t.id?t.name:t.id}),t.tools===!1&&(0,W.jsx)(`span`,{className:`chat-models-note`,title:`It answers, but cannot look things up or prepare anything`,children:`No tools`}),r&&(0,W.jsx)(V,{size:14})]},t.id)})]},e.id):null})]})]}),document.body)]})}var eK=8e3,tK=3,nK=`mw-alerts`;function rK(){let[e,t]=(0,L.useState)(()=>document.visibilityState===`visible`);return(0,L.useEffect)(()=>{let e=()=>t(document.visibilityState===`visible`);return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e}function iK({a:e,size:t}){return e.source===`mail`?(0,W.jsx)(ao,{name:e.who,email:e.email,size:t,picture:!0,id:e.target.kind===`mail`?e.target.item.id:void 0}):(0,W.jsx)(`span`,{className:`alert-ico`,style:{width:t,height:t},"aria-hidden":`true`,children:(0,W.jsx)(nt,{size:Math.round(t*.5)})})}function aK(e,t){let n=e.join(`
|
|
194
|
+
`);(0,L.useEffect)(()=>{if(t||!n)return;let e=setTimeout(()=>UU.dismiss(...n.split(`
|
|
195
|
+
`)),eK);return()=>clearTimeout(e)},[n,t])}function oK({a:e,held:t,showAccount:n,onOpen:r,onRead:i}){aK([e.id],t);let a=e.source===`mail`;return(0,W.jsxs)(`div`,{className:`alert ${e.source}`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`alert-main`,onClick:()=>r(e),title:a?`Open this conversation`:`Open the calendar`,children:[(0,W.jsx)(iK,{a:e,size:36}),(0,W.jsxs)(`span`,{className:`alert-body`,children:[(0,W.jsxs)(`span`,{className:`alert-top`,children:[(0,W.jsx)(`span`,{className:`alert-who`,children:e.who}),n&&e.account&&(0,W.jsx)(`span`,{className:`alert-acct`,children:xe(e.account)})]}),(0,W.jsx)(`span`,{className:`alert-title`,children:e.title})]})]}),(0,W.jsx)(`button`,{type:`button`,className:`alert-x`,onClick:()=>UU.dismiss(e.id),title:`Dismiss`,"aria-label":`Dismiss`,children:(0,W.jsx)(la,{size:14})}),a&&(0,W.jsxs)(`span`,{className:`alert-acts`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`alert-act`,onClick:()=>r(e,!0),children:[(0,W.jsx)($r,{size:13}),`Reply`]}),(0,W.jsxs)(`button`,{type:`button`,className:`alert-act`,onClick:()=>i(e),children:[(0,W.jsx)(tr,{size:13}),`Mark read`]})]})]})}function sK({list:e,held:t}){aK(e.map(e=>e.id),t);let n=e.every(e=>e.source===`mail`)?`new messages`:`notifications`;return(0,W.jsxs)(`button`,{type:`button`,className:`alert more`,onClick:()=>document.getElementById(nK)?.showPopover(),children:[(0,W.jsxs)(`span`,{className:`alert-more-n`,children:[`+`,e.length]}),(0,W.jsxs)(`span`,{className:`alert-more-what`,children:[e.length,` more `,n]}),(0,W.jsx)(`span`,{className:`alert-more-go`,children:`See all`})]})}function cK({showAccount:e,onOpen:t,onRead:n}){let{log:r,cards:i}=GU(),a=rK(),[o,s]=(0,L.useState)(!1),c=i.map(e=>r.find(t=>t.id===e)).filter(e=>!!e);if((0,L.useEffect)(()=>{c.length||s(!1)},[c.length]),!c.length)return null;let l=o||!a,u=c.length>tK?c.slice(0,2):c,d=c.slice(u.length);return(0,W.jsxs)(`div`,{className:`alerts`,role:`log`,"aria-live":`polite`,"aria-label":`Notifications`,onPointerEnter:()=>s(!0),onPointerLeave:()=>s(!1),onFocus:()=>s(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||s(!1)},children:[u.map(r=>(0,W.jsx)(oK,{a:r,held:l,showAccount:e,onOpen:t,onRead:n},r.id)),d.length>0&&(0,W.jsx)(sK,{list:d,held:l})]})}function lK({labeled:e,showAccount:t,onOpen:n,onSettings:r}){let{log:i}=GU(),a=(0,L.useRef)(null),o=(0,L.useRef)(null),[s,c]=(0,L.useState)(new Set),l=i.filter(e=>!e.seen).length,u=(0,L.useRef)(i);u.current=i;let d=DU.which()===`off`;(0,L.useEffect)(()=>{let e=a.current;if(!e)return;let t=t=>{if(t.newState!==`open`||!o.current)return;let n=Math.round(o.current.getBoundingClientRect().right+10);e.style.left=`${n}px`,e.style.width=`${Math.max(200,Math.min(380,innerWidth-n-10))}px`},n=e=>{e.newState===`open`&&(c(new Set(u.current.filter(e=>!e.seen).map(e=>e.id))),UU.seenAll())};return e.addEventListener(`beforetoggle`,t),e.addEventListener(`toggle`,n),()=>{e.removeEventListener(`beforetoggle`,t),e.removeEventListener(`toggle`,n)}},[]);let f=()=>{try{a.current?.hidePopover()}catch{}},p=l?`Notifications, ${l} new`:`Notifications`;return(0,W.jsxs)(W.Fragment,{children:[(0,W.jsxs)(`button`,{ref:o,type:`button`,className:`rail-item`,popoverTarget:nK,title:p,"aria-label":p,children:[(0,W.jsxs)(`span`,{className:`rail-icon`,children:[d?(0,W.jsx)(Be,{size:18}):(0,W.jsx)(We,{size:18}),l>0&&(0,W.jsx)(`span`,{className:`rail-badge`,"aria-hidden":`true`,children:l>99?`99+`:l})]}),e&&(0,W.jsx)(`span`,{className:`rail-label`,"aria-hidden":`true`,children:`Alerts`})]}),(0,pl.createPortal)((0,W.jsxs)(`div`,{ref:a,id:nK,popover:`auto`,className:`alerts-pop`,role:`group`,"aria-label":`Notifications`,children:[(0,W.jsxs)(`div`,{className:`alerts-pop-head`,children:[(0,W.jsx)(`span`,{children:`Notifications`}),(0,W.jsx)(`button`,{type:`button`,className:`alerts-pop-clear`,onClick:()=>UU.clear(),disabled:!i.length,children:`Clear`}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>{f(),r()},title:`Notification settings`,"aria-label":`Notification settings`,children:(0,W.jsx)(ai,{size:15})})]}),i.length===0?(0,W.jsx)(`p`,{className:`alerts-pop-none`,children:d?`Notifications are off on this device.`:`Nothing yet. New mail and events about to start show here while the app is open.`}):(0,W.jsx)(`ul`,{className:`alerts-pop-list`,children:i.map(e=>(0,W.jsx)(`li`,{children:(0,W.jsxs)(`button`,{type:`button`,className:`alerts-row${s.has(e.id)?` fresh`:``}`,onClick:()=>{f(),n(e)},children:[(0,W.jsx)(iK,{a:e,size:30}),(0,W.jsxs)(`span`,{className:`alert-body`,children:[(0,W.jsxs)(`span`,{className:`alert-top`,children:[(0,W.jsx)(`span`,{className:`alert-who`,children:e.who}),(0,W.jsx)(`span`,{className:`alerts-row-when`,children:ga(new Date(e.at).toISOString())})]}),(0,W.jsx)(`span`,{className:`alert-title`,children:e.title}),t&&e.account&&(0,W.jsx)(`span`,{className:`alert-acct`,children:xe(e.account)})]})]})},e.id))})]}),document.body)]})}var uK=[{id:`inbox`,label:`Inbox`},{id:`sent`,label:`Sent`},{id:`drafts`,label:`Drafts`},{id:`archive`,label:`Archive`},{id:`junk`,label:`Junk`},{id:`trash`,label:`Trash`}];function dK({folder:e,onFolder:t,accounts:n,account:r,onAccount:i,unreadOnly:a,onUnreadOnly:o,unreadCount:s=0,flaggedOnly:c,onFlaggedOnly:l,search:u,onSearch:d,searchRef:f,busy:p,onRefresh:m,onCompose:h}){let g=uK.find(t=>t.id===e)?.label??`Inbox`;return(0,W.jsxs)(`header`,{className:`top`,children:[(0,W.jsxs)(`div`,{className:`top-row`,children:[n.length>1&&(0,W.jsxs)(`label`,{className:`folder account`,title:r?`Account: ${xe(r)}`:`All accounts`,children:[(0,W.jsx)(`span`,{className:`folder-name`,children:r?xe(r):(0,W.jsxs)(W.Fragment,{children:[`All`,(0,W.jsx)(`span`,{className:`when-room`,children:` accounts`})]})}),(0,W.jsx)(dt,{size:14}),(0,W.jsxs)(`select`,{value:r,onChange:e=>i(e.target.value),"aria-label":`Account`,children:[(0,W.jsx)(`option`,{value:``,children:`All accounts`}),n.map(e=>(0,W.jsx)(`option`,{value:e,children:xe(e)},e))]})]}),(0,W.jsxs)(`label`,{className:`folder`,title:`Folder`,children:[(0,W.jsx)(`span`,{className:`folder-name`,children:g}),(0,W.jsx)(dt,{size:15}),(0,W.jsx)(`select`,{value:e,onChange:e=>t(e.target.value),"aria-label":`Folder`,children:uK.map(e=>(0,W.jsx)(`option`,{value:e.id,children:e.label},e.id))})]}),(0,W.jsx)(`span`,{className:`grow`}),(0,W.jsxs)(`button`,{type:`button`,className:`btn toggle unread-only`,"aria-pressed":a,onClick:()=>o(!a),title:`Show unread only`,"aria-label":s?`Unread, ${s>=100?`over 99`:s}`:`Unread`,children:[`Unread`,s>0&&(0,W.jsx)(`span`,{className:`unread-count`,children:s>=100?`99+`:s})]}),(0,W.jsx)(`button`,{type:`button`,className:`btn toggle icon flagged-only`,"aria-pressed":c,onClick:()=>l(!c),title:c?`Showing flagged mail only`:`Show flagged mail only`,"aria-label":`Flagged only`,children:(0,W.jsx)(fn,{size:14})}),(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:m,title:`Refresh`,"aria-label":`Refresh`,children:(0,W.jsx)(Gr,{size:15,className:p?`spin`:void 0})}),(0,W.jsxs)(`button`,{type:`button`,className:`btn primary compose`,onClick:h,title:`New message (c)`,"aria-label":`New message`,children:[(0,W.jsx)(xi,{size:15}),` `,(0,W.jsx)(`span`,{children:`New`})]})]}),(0,W.jsxs)(`div`,{className:`searchbox`,children:[(0,W.jsx)(ti,{size:15}),(0,W.jsx)(`input`,{ref:f,type:`text`,placeholder:`Search ${c?`flagged mail`:g.toLowerCase()}${r?` in ${xe(r)}`:``}`,autoComplete:`off`,spellCheck:!1,value:u,onChange:e=>d(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),u?d(``):e.currentTarget.blur())},"aria-label":`Search mail`}),u&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>d(``),title:`Clear search`,"aria-label":`Clear search`,children:(0,W.jsx)(la,{size:14})})]})]})}var fK=`sideora-welcomed`,pK=`sideora-setup-card-hidden`,mK=e=>{try{return localStorage.getItem(e)===`1`}catch{return!1}},hK=e=>{try{localStorage.setItem(e,`1`)}catch{}},gK={done:()=>mK(fK),putAway:()=>hK(fK),cardHidden:()=>mK(pK),hideCard:()=>hK(pK)},_K=[{key:`mail`,short:`Mail`,ahead:`Gmail, iCloud, Fastmail, Exchange or IMAP`,title:`Add a mail account`,lead:`Gmail, iCloud, Fastmail, Exchange or any IMAP mailbox. Its password stays on the computer Sideora runs on.`,icon:(0,W.jsx)(ar,{size:18}),doneText:`Your mail is set up`},{key:`ai`,short:`AI`,ahead:`The assistant, summaries, help with writing`,title:`Connect an AI model`,lead:`For the assistant, summaries and help with writing: your Claude plan, ChatGPT, a key of your own, or a model on this computer.`,icon:(0,W.jsx)(hi,{size:18}),doneText:`An AI model is connected`},{key:`alerts`,short:`Alerts`,ahead:`Which new mail you are told about`,title:`Choose your alerts`,lead:`Which new mail you are told about. Rules and quiet hours can be added later.`,icon:(0,W.jsx)(We,{size:18})}];function vK({hasAccount:e,accounts:t,onDone:n}){let r=tP(),i=_K.filter(e=>e.key===`mail`?h.accounts:e.key!==`ai`||h.ai),[a,o]=(0,L.useState)(-1),s={mail:e,ai:r,alerts:!1},c=()=>{gK.putAway(),n(e?`mail`:`home`)},l=i[a],u=i.every(e=>e.key===`alerts`||s[e.key]);return(0,W.jsx)(`div`,{className:`onb`,role:`dialog`,"aria-modal":`true`,"aria-labelledby":`onb-title`,children:a===-1?(0,W.jsxs)(`div`,{className:`onb-card onb-hello`,children:[(0,W.jsx)(yK,{}),(0,W.jsx)(`h1`,{id:`onb-title`,children:`Welcome to Sideora`}),(0,W.jsx)(`p`,{className:`onb-lead`,children:`Your mail, notes and assistant, running on your own computer. This browser is paired to it; a few steps get it ready.`}),(0,W.jsx)(`ul`,{className:`onb-ahead`,children:i.map(e=>(0,W.jsxs)(`li`,{children:[(0,W.jsx)(`span`,{className:`onb-tile`,"aria-hidden":`true`,children:e.icon}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`strong`,{children:e.short}),(0,W.jsx)(`small`,{children:e.ahead})]})]},e.key))}),(0,W.jsx)(`button`,{type:`button`,className:`onb-primary`,onClick:()=>o(0),autoFocus:!0,children:`Get started`}),(0,W.jsx)(`button`,{type:`button`,className:`onb-quiet`,onClick:c,children:`Skip setup and look around`})]},`hello`):l?(0,W.jsxs)(`div`,{className:`onb-card onb-step`,children:[(0,W.jsx)(`ol`,{className:`onb-stepper`,"aria-label":`Step ${a+1} of ${i.length}`,children:i.map((e,t)=>(0,W.jsxs)(`li`,{className:t===a?`now`:t<a?`past`:``,"aria-current":t===a?`step`:void 0,children:[(0,W.jsx)(`span`,{className:`onb-num`,"aria-hidden":`true`,children:t<a&&(s[e.key]||e.key===`alerts`)?(0,W.jsx)(V,{size:13,strokeWidth:3}):t+1}),(0,W.jsx)(`span`,{className:`onb-label`,children:e.short})]},e.key))}),(0,W.jsxs)(`header`,{className:`onb-head`,children:[(0,W.jsx)(`span`,{className:`onb-tile big${s[l.key]?` done`:``}`,"aria-hidden":`true`,children:s[l.key]?(0,W.jsx)(V,{size:20,strokeWidth:2.5}):l.icon}),(0,W.jsxs)(`div`,{children:[(0,W.jsx)(`h1`,{id:`onb-title`,children:l.title}),(0,W.jsx)(`p`,{className:`onb-lead`,children:l.lead})]})]}),(0,W.jsxs)(`div`,{className:`onb-body`,children:[l.key===`mail`&&(0,W.jsx)(MV,{startAdding:!e},`mail`),l.key===`ai`&&(0,W.jsx)(hH,{startAdding:!r},`ai`),l.key===`alerts`&&(0,W.jsx)(nW,{accounts:t})]}),(0,W.jsxs)(`footer`,{className:`onb-foot`,children:[(0,W.jsxs)(`button`,{type:`button`,className:`onb-quiet`,onClick:()=>o(a-1),children:[(0,W.jsx)(Le,{size:15}),` Back`]}),(0,W.jsx)(`span`,{className:`grow`}),l.key===`alerts`||s[l.key]?(0,W.jsx)(`button`,{type:`button`,className:`onb-primary small`,onClick:()=>o(a+1),children:`Continue`}):(0,W.jsx)(`button`,{type:`button`,className:`onb-quiet`,onClick:()=>o(a+1),children:`Skip for now`})]})]},l.key):(0,W.jsxs)(`div`,{className:`onb-card onb-hello`,children:[(0,W.jsx)(`span`,{className:`onb-seal${u?` done`:``}`,"aria-hidden":`true`,children:u?(0,W.jsx)(V,{size:30,strokeWidth:2.5}):(0,W.jsx)(yK,{size:30})}),(0,W.jsx)(`h1`,{id:`onb-title`,children:u?`You’re all set`:`Sideora is ready`}),(0,W.jsx)(`p`,{className:`onb-lead`,children:u?`Everything is in place. Settings has the rest: signatures, rules, quiet hours.`:`What you skipped waits on Home, under the clock, until it is done.`}),(0,W.jsx)(`ul`,{className:`onb-ahead`,children:i.filter(e=>e.key!==`alerts`).map(e=>(0,W.jsxs)(`li`,{className:s[e.key]?`done`:`later`,children:[(0,W.jsx)(`span`,{className:`onb-tile${s[e.key]?` done`:``}`,"aria-hidden":`true`,children:s[e.key]?(0,W.jsx)(V,{size:16,strokeWidth:2.5}):e.icon}),(0,W.jsxs)(`span`,{children:[(0,W.jsx)(`strong`,{children:s[e.key]?e.doneText:e.title}),(0,W.jsx)(`small`,{children:s[e.key]?`Done`:`Later`})]})]},e.key))}),(0,W.jsx)(`button`,{type:`button`,className:`onb-primary`,onClick:c,autoFocus:!0,children:e?`Open your mail`:`Open Sideora`}),(0,W.jsxs)(`button`,{type:`button`,className:`onb-quiet`,onClick:()=>o(i.length-1),children:[(0,W.jsx)(Le,{size:15}),` Back`]})]},`end`)})}function yK({size:e=56}){return(0,W.jsxs)(`svg`,{className:`onb-mark`,width:e,height:e,viewBox:`0 0 64 64`,"aria-hidden":`true`,children:[(0,W.jsx)(`rect`,{width:`64`,height:`64`,rx:`14`,fill:`#2f5fe0`}),(0,W.jsx)(`rect`,{x:`13`,y:`19`,width:`38`,height:`26`,rx:`4`,fill:`none`,stroke:`#fff`,strokeWidth:`4`,strokeLinejoin:`round`}),(0,W.jsx)(`path`,{d:`M14.5 22.5 32 35l17.5-12.5`,fill:`none`,stroke:`#fff`,strokeWidth:`4`,strokeLinecap:`round`,strokeLinejoin:`round`})]})}function bK(e){let t=tP();if(!gK.done()||gK.cardHidden())return null;let n=[...h.accounts&&!e?[{key:`mail`,label:`Add a mail account`,page:`accounts`}]:[],...h.ai&&!t?[{key:`ai`,label:`Connect an AI model`,page:`ai`}]:[]];return n.length?n:null}var xK=[`home`,`mail`,`calendar`,`notes`,`people`,`files`,`assistant`,`settings`],SK=/^[a-z0-9]{6,24}$/,CK=[`inbox`,`sent`,`drafts`,`archive`,`junk`,`trash`],wK=`-`,TK=`+`,EK=encodeURIComponent,DK=e=>{try{return decodeURIComponent(e)}catch{return e}};function OK(e){if(e.section===`settings`)return e.page&&e.page!==`home`?`#/settings/${EK(e.page)}`:`#/settings`;if(e.section===`notes`)return e.note?`#/notes/${EK(e.note)}`:`#/notes`;if(e.section===`files`){let t=e.files===`sent`?`sent`:`received`;return e.file?`#/files/${t}/${EK(e.file.message)}/${EK(e.file.id)}`:e.files===`sent`?`#/files/sent`:`#/files`}if(e.section!==`mail`)return`#/${e.section}`;let t=e.folder??`inbox`;return e.compose?`#/mail/${t}/${EK(e.filter||wK)}/${TK}`:e.msg?`#/mail/${t}/${EK(e.filter||wK)}/${EK(e.msg)}`:e.filter?`#/mail/${t}/${EK(e.filter)}`:t===`inbox`?`#/mail`:`#/mail/${t}`}function kK(e){let t=e.replace(/^#\/?/,``).split(`/`).filter(Boolean).map(DK),n=t[0];if(!xK.includes(n))return null;if(n===`settings`)return{section:n,page:t[1]};if(n===`notes`)return{section:n,note:SK.test(t[1]??``)?t[1]:void 0,...SK.test(t[1]??``)&&t[2]===`new`?{fresh:!0}:{}};if(n===`files`)return{section:n,files:t[1]===`sent`?`sent`:`inbox`,...t.length===4&&t[2]&&t[3]?{file:{message:t[2],id:t[3]}}:{}};if(n!==`mail`)return{section:n};let r=CK.includes(t[1])?t[1]:`inbox`,i=t[2]&&t[2]!==wK?t[2]:``;return t[3]===TK&&t.length===4?{section:n,folder:r,filter:i,compose:!0}:{section:n,folder:r,filter:i,msg:t.length>3?t.slice(3).join(`/`):void 0}}function AK({picked:e,total:t,folder:n,onAll:r,onClear:i,onMove:a,onRead:o,onFlag:s}){let c=e.length,l=iF(n),u=e.some(e=>e.unread),d=e.every(e=>e.flagged),f=n===`sent`||n===`drafts`;return(0,W.jsx)(`header`,{className:`top selecting`,children:(0,W.jsxs)(`div`,{className:`top-row`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:i,title:`Clear the selection (Esc)`,"aria-label":`Clear the selection`,children:(0,W.jsx)(la,{size:16})}),(0,W.jsxs)(`span`,{className:`select-count`,role:`status`,children:[c,` selected`]}),c<t&&(0,W.jsxs)(`button`,{type:`button`,className:`link`,onClick:r,title:`Select every conversation shown (a)`,children:[`All `,t]}),(0,W.jsx)(`span`,{className:`grow`}),l.map(e=>e.to===`trash`?(0,W.jsx)(co,{onDiscard:()=>a(`trash`),title:`Delete ${c} (${e.key})`,confirmLabel:`Delete ${c}`},e.to):(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>a(e.to),title:`${e.label}${e.key?` (${e.key})`:``}`,"aria-label":e.label,children:e.to===`archive`?(0,W.jsx)(Fe,{size:16}):e.to===`junk`?(0,W.jsx)(si,{size:16}):(0,W.jsx)(Mn,{size:16})},e.to)),n!==`drafts`&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare flag`,"aria-pressed":d,onClick:()=>s(!d),title:d?`Clear their flags`:`Flag for follow-up`,"aria-label":d?`Clear their flags`:`Flag for follow-up`,children:(0,W.jsx)(fn,{size:16,fill:d?`currentColor`:`none`})}),!f&&(0,W.jsx)(`button`,{type:`button`,className:`btn icon bare`,onClick:()=>o(u),title:u?`Mark as read`:`Mark as unread`,"aria-label":u?`Mark as read`:`Mark as unread`,children:u?(0,W.jsx)(rr,{size:16}):(0,W.jsx)(ar,{size:16})})]})})}async function jK(e,t,n=12){let r=[];for(let i=0;i<e.length;i+=n)r.push(...await Promise.allSettled(e.slice(i,i+n).map(t)));return r}var MK=(e,t)=>e.latest.folder===`sent`||e.latest.folder===`inbox`?e.latest.folder:t,NK=v&&!gz,PK=NK?kK(location.hash):null;function FK(){let[e,t]=(0,L.useState)(null),[n,r]=(0,L.useState)([]),[i,a]=(0,L.useState)(!1),o=(0,L.useRef)(!1),[s,c]=(0,L.useState)(!1),[l,f]=(0,L.useState)(!1),[p,m]=(0,L.useState)(PK?.section??(v?`home`:`mail`)),[g,_]=(0,L.useState)(PK?.page),y=(0,L.useRef)({i:history.state?.i??0,compose:!1,fix:!1,closing:!1,started:!1,undoing:!1,hash:``}),[b,x]=(0,L.useState)({kind:`list`}),[S,C]=(0,L.useState)(),[w,T]=(0,L.useState)(PK?.section===`calendar`),[E,D]=(0,L.useState)(PK?.section===`files`),[O,k]=(0,L.useState)(()=>PK?.section===`files`?{folder:PK.files??`inbox`,file:PK.file}:{folder:`inbox`}),[A,ee]=(0,L.useState)(PK?.section===`people`),[M,ne]=(0,L.useState)(PK?.section===`assistant`),[re,ie]=(0,L.useState)(PK?.section===`notes`),[ae,N]=(0,L.useState)(PK?.section===`notes`?PK.note:void 0),[le,ue]=(0,L.useState)(PK?.section===`notes`&&PK.fresh?PK.note:void 0),de=(0,L.useRef)(void 0),fe=(0,L.useRef)(void 0),[pe,me]=(0,L.useState)(PK?PK.section===`home`:v),[P,he]=(0,L.useState)(null),[F,I]=(0,L.useState)(null),[ge,_e]=(0,L.useState)(0),[ve,ye]=(0,L.useState)(0),[xe,Se]=(0,L.useState)(``),[Ce,we]=(0,L.useState)(null),[Te,Ee]=(0,L.useState)(()=>new Set),De=(0,L.useRef)(null),Oe=(0,L.useRef)(new Map),R=YV(t),{load:ke,patchRead:Ae,patchFlag:je,removeItems:Me,unhide:Ne,setQuery:z,forgetChanges:Pe}=R,Fe=(0,L.useMemo)(()=>XP(R.items),[R.items]);(0,L.useEffect)(()=>{pI.note(R.items)},[R.items]);let Ie=(0,L.useRef)(null),Re=(0,L.useRef)(null),B=(0,L.useRef)({conversations:Fe,selected:Ce,view:b,section:p,query:R.query,count:R.items.length,folder:R.folder,account:R.account,hasCalendar:!1,picked:Te});B.current={...B.current,conversations:Fe,selected:Ce,view:b,section:p,query:R.query,count:R.items.length,folder:R.folder,account:R.account,picked:Te},(0,L.useEffect)(()=>{Ee(new Set),De.current=null},[R.folder,R.account,R.query,R.unreadOnly,R.flaggedOnly]);let ze=(0,L.useRef)(!1);(0,L.useEffect)(()=>{ze.current?ze.current=!1:(B.current.view.kind===`thread`&&(y.current.closing=!0),x(e=>e.kind===`thread`?{kind:`list`}:e))},[R.folder,R.account]),(0,L.useEffect)(()=>{Ee(e=>{if(!e.size)return e;let t=new Map(Fe.map(e=>[e.key,e.latest.id])),n=[...e].filter(e=>t.has(e)&&t.get(e)===(Oe.current.get(e)??t.get(e)));return n.length===e.size?e:new Set(n)})},[Fe]);let Be=(0,L.useRef)(void 0),[Ve,He]=(0,L.useState)(null),Ue=(0,L.useRef)(0),We=(0,L.useRef)({folder:`inbox`,account:``}),Ge=(0,L.useCallback)((e=0)=>{clearTimeout(Be.current),Be.current=setTimeout(()=>{U(`list`,{unread:!0,limit:100}).then(e=>{_e(e.items.length),pI.note(e.items)},()=>{});let{folder:e,account:t}=We.current;if(e!==`inbox`||t){let n=++Ue.current;U(`list`,{folder:e,account:t||void 0,unread:!0,limit:100}).then(r=>{n===Ue.current&&He({key:`${e}|${t}`,n:r.items.length})},()=>{})}},e)},[]);We.current={folder:R.folder,account:R.account};let Ke=(0,L.useRef)(R.setFolder),qe=(0,L.useRef)(R.setAccount);Ke.current=R.setFolder,qe.current=R.setAccount,(0,L.useEffect)(()=>{(R.folder!==`inbox`||R.account)&&Ge()},[R.folder,R.account,Ge]);let Je=`${R.folder}|${R.account}`,Ye=R.folder===`inbox`&&!R.account?ge:Ve?.key===Je?Ve.n:0,Xe=(0,L.useRef)(()=>{}),Ze=(0,L.useRef)(async()=>{}),Qe=(0,L.useCallback)(e=>{gz&&e!==`home`?d(e):(e===B.current.section&&(e!==`mail`||B.current.view.kind===`list`)||fo.mayLeave(()=>Qe(e)))&&(e===`mail`&&B.current.section===`mail`&&x({kind:`list`}),e===`calendar`&&T(!0),e===`files`&&D(!0),e===`people`&&ee(!0),e===`assistant`&&ne(!0),e===`notes`&&(ie(!0),B.current.section===`notes`&&N(void 0)),e===`home`&&(me(!0),se(`unread:`)),e===`settings`&&B.current.section!==`settings`&&_(void 0),V.current=null,(e!==`settings`||B.current.section!==`settings`)&&C(void 0),m(e))},[]);(0,L.useEffect)(()=>{i&&(!PK||PK.section===`home`)&&Qe(`home`)},[i,Qe]),(0,L.useEffect)(()=>j((e,t,n)=>{e===`notes`&&t?(DI.close(),n&&ue(t),Xe.current(t)):xK.includes(e)&&e!==B.current.section&&(DI.close(),Qe(e))}),[Qe]),(0,L.useEffect)(()=>{U(`state`).then(t,e=>{e instanceof ua&&t(e.state)});let e=e=>{be(e),r(e),f(!0),o.current||(o.current=!0,!e.length&&!gK.done()&&a(!0))};U(`accounts`).then(e,()=>{});let n=()=>{setTimeout(()=>U(`accounts`).then(e,()=>{}),300)};window.addEventListener(wV,n);let i=te(e=>{if(e.push===`bridge`)t(e.state),e.state.connected&&!B.current.count&&ke(),e.state.connected&&Ge();else if(e.push===`event`&&e.event.type===`drafts`)oe(`drafts`),B.current.folder===`drafts`&&B.current.view.kind===`list`&&ke({silent:!0});else if(e.push===`event`&&e.event.type===`calendar`)window.dispatchEvent(new CustomEvent(Vc));else if(e.push===`event`&&e.event.type===`codeused`)typeof e.event.id==`string`&&(pI.dismiss(e.event.id),Ae([e.event.id],!0)),Ge(300);else if(e.push===`event`&&e.event.type===`mailchanged`)!B.current.query&&(Ie.current?.scrollTop??0)<40&&ke({silent:!0}),Ge(300);else if(e.push===`event`&&e.event.type===`reminder`)UU.arrive(e.event);else if(e.push===`gap`||e.event.type===`newmail`){if(e.push===`event`){let t=B.current,n=t.section===`mail`&&t.folder===`inbox`&&t.view.kind===`list`&&!t.query&&(!t.account||t.account===e.event.account)&&document.visibilityState===`visible`;UU.arrive(e.event,{looking:n})}!B.current.query&&(Ie.current?.scrollTop??0)<40&&ke({silent:!0}),Ge(500)}});Ge();let s=u(()=>{setTimeout(()=>{oe(`drafts`),!B.current.query&&(Ie.current?.scrollTop??0)<40&&ke({silent:!0})},1500)}),c=()=>{setTimeout(()=>ke({silent:!0}),2e3)};window.addEventListener(pP,c);let l=Date.now(),d=()=>{document.visibilityState!==`visible`||Date.now()-l<5e3||(l=Date.now(),oe(`focus`),Ge(),!B.current.query&&(Ie.current?.scrollTop??0)<40&&ke({silent:!0}))};return document.addEventListener(`visibilitychange`,d),window.addEventListener(`focus`,d),()=>{i(),s(),window.removeEventListener(wV,n),window.removeEventListener(pP,c),document.removeEventListener(`visibilitychange`,d),window.removeEventListener(`focus`,d)}},[ke,Ge]),(0,L.useEffect)(()=>{let e=e=>{let t=e.target;if(DI.isOpen()||document.querySelector(`dialog:modal, [popover]:popover-open`)||t.closest?.(`input, textarea, select, [contenteditable="true"]`)||e.metaKey||e.ctrlKey||e.altKey)return;let n=e.key===`0`?`home`:e.key===`5`?`people`:e.key===`6`?`notes`:e.key===`1`?`mail`:e.key===`2`&&B.current.hasCalendar?`calendar`:e.key===`3`?`files`:e.key===`7`&&h.ai?`assistant`:e.key===`4`?`settings`:void 0;e.key===`n`&&!e.shiftKey&&!e.isComposing?(e.preventDefault(),e.repeat||Ze.current()):n&&n!==B.current.section&&(e.preventDefault(),Qe(n))};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Qe]);let $e=vz(),[et,tt]=(0,L.useState)(!1),nt=p===`mail`&&($e||b.kind===`list`),rt=!!e?.connected;(0,L.useEffect)(()=>{nt&&rt&&tF.refresh()},[nt,rt]),(0,L.useEffect)(()=>{let e=()=>{setTimeout(()=>tF.refresh(),2500)};window.addEventListener(pP,e);let t=ce(()=>{tF.refresh()},1500);return()=>{window.removeEventListener(pP,e),t()}},[]);let{account:it,setAccount:at}=R;(0,L.useEffect)(()=>{it&&n.length&&!n.some(e=>e.mail&&e.name===it)&&(y.current.fix=!0,at(``))},[n,it,at]),(0,L.useEffect)(()=>{let e=setTimeout(()=>z(xe.trim()),250);return()=>clearTimeout(e)},[xe,z]);let ot=(0,L.useCallback)(async(e,t)=>{Ae(e.map(e=>e.id),t);let n=await jK(e,e=>U(`markRead`,{id:e.id,changeKey:e.changeKey,read:t})),r=e.filter((e,t)=>{let r=n[t];return r.status===`fulfilled`&&r.value.gone}).map(e=>e.id);r.length&&(Me(r),K.show({text:r.length>1?`Some of these messages are no longer in this mailbox.`:`This message is no longer in this mailbox (moved or deleted elsewhere).`,duration:6e3}));let i=n.find(e=>e.status===`rejected`);i&&(K.error(i.reason,`Could not mark as ${t?`read`:`unread`}: `),Pe(e.map(e=>e.id)),ke({silent:!0})),Ge(800)},[Ae,Me,ke,Ge,Pe]),st=(0,L.useCallback)(async(e,t)=>{je(e.map(e=>e.id),t);let n=await jK(e,e=>U(`flag`,{id:e.id,changeKey:e.changeKey,flagged:t})),r=e.filter((e,t)=>{let r=n[t];return r.status===`fulfilled`&&r.value.gone}).map(e=>e.id);r.length&&(Me(r),K.show({text:`This message is no longer in this mailbox (moved or deleted elsewhere).`,duration:6e3}));let i=n.find(e=>e.status===`rejected`);i&&(K.error(i.reason,`Could not ${t?`flag`:`clear the flag of`} the message: `),Pe(e.map(e=>e.id)),ke({silent:!0}))},[je,Me,ke,Pe]),ct=(0,L.useCallback)(e=>{e.flagged?st(e.items.filter(e=>e.isFlagged),!1):st([e.latest],!0)},[st]),lt=(0,L.useCallback)(e=>{e.unread?ot(e.items.filter(e=>!e.isRead),!0):ot([e.latest],!1)},[ot]),V=(0,L.useRef)(null),ut=(0,L.useCallback)(e=>{fo.mayLeave(()=>ut(e))&&(V.current=null,we(e.key),x(B.current.folder===`drafts`?{kind:`compose`,draftId:e.latest.id}:{kind:`thread`,conv:e}))},[]),dt=(0,L.useCallback)(()=>{fo.mayLeave(()=>dt())&&(x({kind:`list`}),V.current&&=(m(V.current),null))},[]),ft=(0,L.useCallback)(async e=>{let t=e.items.map(e=>e.id),{view:n}=B.current;n.kind!==`list`&&`conv`in n&&n.conv?.key===e.key&&x({kind:`list`}),B.current.selected===e.key&&we(null),Me(t);let r=[];for(let e of t)try{await U(`deleteDraft`,{draftId:e,changeKey:``}),G.remove(G.key(`edit`,e))}catch(t){/not found|no longer/i.test(String(t?.message??t))||r.push(e)}r.length?(Ne(r),ke({silent:!0}),K.error(`the server refused`,`Could not discard the draft: `)):K.show({text:`Draft discarded`})},[Me,Ne,ke]),pt=(0,L.useCallback)(async(e,t)=>{if(!fo.mayLeave(()=>{pt(e,t)}))return;let{conversations:n,view:r}=B.current,i=MK(e,B.current.folder),a=e.items.map(e=>e.id);if(r.kind===`thread`&&r.conv.key===e.key){y.current.fix=!0;let t=n.findIndex(t=>t.key===e.key),r=t>=0?n[t+1]??n[t-1]:void 0;r?(we(r.key),x({kind:`thread`,conv:r})):(x({kind:`list`}),V.current&&=(m(V.current),null))}else if(B.current.selected===e.key){let t=n.findIndex(t=>t.key===e.key);we((n[t+1]??n[t-1])?.key??null)}Me(a);try{let e=await oF(a,t);if(Ge(800),e.failed.length&&(Ne(e.failed),ke({silent:!0}),!e.ids.length)){K.error(e.error??`refused`,`Could not move it: `);return}if(!e.ids.length){K.show({text:e.gone>1?`These messages were already gone from this folder.`:`This message was already gone from this folder.`});return}let n=i===`drafts`?null:i;K.show({text:aF(t,e.ids.length),duration:6e3,action:n?{label:`Undo`,run:()=>{oF(e.ids,n).then(()=>{ke({silent:!0}),Ge(800)},e=>K.error(e,`Could not put it back: `))}}:void 0})}catch(e){K.error(e,`Could not move it: `),Ne(a),ke({silent:!0})}},[Me,Ne,ke,Ge]),mt=(0,L.useCallback)((e,t=!1)=>{let{conversations:n}=B.current,r=De.current;Ee(i=>{let a=new Set(i),o=e=>{a.has(e.key)||Oe.current.set(e.key,e.latest.id),a.add(e.key)},s=!i.has(e.key),c=t&&r?n.findIndex(e=>e.key===r):-1,l=n.findIndex(t=>t.key===e.key);if(c>=0&&l>=0)for(let e of n.slice(Math.min(c,l),Math.max(c,l)+1))s?o(e):a.delete(e.key);else s?o(e):a.delete(e.key);return a}),De.current=e.key},[]),ht=(0,L.useCallback)(()=>{Ee(new Set),De.current=null},[]),gt=(0,L.useCallback)(()=>{let{conversations:e,picked:t}=B.current;for(let n of e)t.has(n.key)||Oe.current.set(n.key,n.latest.id);Ee(new Set(e.map(e=>e.key)))},[]),_t=(0,L.useMemo)(()=>Fe.filter(e=>Te.has(e.key)),[Fe,Te]),vt=(0,L.useCallback)(async e=>{let{conversations:t,view:n,folder:r,picked:i}=B.current,a=t.filter(e=>i.has(e.key));if(!a.length)return;let o=a.flatMap(e=>e.items.map(e=>e.id));n.kind===`thread`&&i.has(n.conv.key)&&x({kind:`list`}),B.current.selected&&i.has(B.current.selected)&&we(null),ht(),Me(o);let s=[],c=[],l=``,u=0;for(let t=0;t<o.length;t+=200){let n=o.slice(t,t+200);try{let t=await oF(n,e);s.push(...t.ids),u+=t.gone,t.failed.length&&(c.push(...t.failed),l||=t.error??``)}catch(e){c.push(...n),l||=e instanceof Error?e.message:String(e)}}if(c.length&&(Ne(c),ke({silent:!0}),K.error(l||`refused`,s.length?`${c.length} could not be moved: `:`Could not move them: `),!s.length))return;if(Ge(800),!s.length){K.show({text:u>1?`These messages were already gone from this folder.`:`This message was already gone from this folder.`});return}let d=r===`drafts`?null:r;K.show({text:aF(e,s.length),duration:8e3,action:d?{label:`Undo`,run:async()=>{try{for(let e=0;e<s.length;e+=200)await oF(s.slice(e,e+200),d)}catch(e){K.error(e,`Could not put them all back: `)}ke({silent:!0}),Ge(800)}}:void 0})},[Me,Ne,ke,Ge,ht]),yt=(0,L.useCallback)(e=>{let t=B.current.conversations.filter(e=>B.current.picked.has(e.key));ot(e?t.flatMap(e=>e.items.filter(e=>!e.isRead)):t.filter(e=>!e.unread).map(e=>e.latest),e)},[ot]),bt=(0,L.useCallback)(e=>{let t=B.current.conversations.filter(e=>B.current.picked.has(e.key));st(e?t.filter(e=>!e.flagged).map(e=>e.latest):t.flatMap(e=>e.items.filter(e=>e.isFlagged)),e)},[st]),xt=(0,L.useCallback)(e=>{x({kind:`thread`,conv:XP([e])[0]}),m(`mail`)},[]),St=(0,L.useCallback)((e,t=!1)=>{if(e.target.kind===`calendar`){UU.seen(e.id),DI.close(),Qe(`calendar`);return}if(gz){UU.seen(e.id),d(`mail`);return}if(!fo.mayLeave(()=>St(e,t)))return;UU.seen(e.id),DI.close();let n=B.current.section;x({kind:`thread`,conv:XP([e.target.item])[0],...t?{reply:e.target.item.id}:{}}),m(`mail`),V.current=n!==`mail`&&n!==`settings`?n:null},[Qe]),Ct=(0,L.useCallback)(e=>{UU.seen(e.id),e.target.kind===`mail`&&ot([e.target.item],!0)},[ot]),wt=(0,L.useCallback)((e,t=!1)=>{gz?d(`notes`,e,t):(B.current.section===`notes`||fo.mayLeave(()=>wt(e)))&&(V.current=null,ie(!0),N(e),m(`notes`))},[]),Tt=(0,L.useCallback)(async e=>{let t=e=>{let{body:t,attachments:n,to:r,cc:i,bcc:a,replyTo:o,quoteAt:s,bodyType:c,...l}=e;return l},n=e=>{xt(e),V.current=`notes`};try{n(t(await U(`read`,{id:e.id,format:`text`})));return}catch{}for(let t of[`inbox`,`archive`,`sent`])try{let r=(await U(`search`,{folder:t,account:e.account,subject:e.subject.replace(/^((re|fwd?|tr)\s*:\s*)+/i,``),limit:20})).items.find(t=>e.conversationId?t.conversationId===e.conversationId:t.subject===e.subject);if(r){n({...r,folder:r.folder??t});return}}catch{}K.show({text:`That mail is no longer there.`,duration:5e3})},[xt]);Xe.current=wt;let Et=(0,L.useRef)(!1),Dt=(0,L.useCallback)(async()=>{if(Et.current)return;let e=document.querySelector(`.notes .note-title`);if(!gz&&B.current.section===`notes`&&de.current&&de.current===fe.current)e?.focus();else if(gz||B.current.section===`notes`||fo.mayLeave(()=>{Dt()})){Et.current=!0;try{let e=await U(`saveNote`,{title:``,html:``});Wz.made(e),Vz.reload(),gz||(de.current=e.id,ue(e.id)),wt(e.id,!0)}catch(e){K.error(e,`The note could not be made: `)}finally{Et.current=!1}}},[wt]);Ze.current=Dt,(0,L.useEffect)(()=>{le&&ae!==le&&ue(void 0)},[ae,le]),de.current=le,fe.current=ae;let Ot=(0,L.useCallback)(e=>{if(!fo.mayLeave(()=>Ot(e)))return;let{conversations:t,view:n}=B.current;if(n.kind!==`thread`)return;let r=t[t.findIndex(e=>e.key===n.conv.key)+e];r&&t.some(e=>e.key===n.conv.key)?(ut(r),Ie.current?.querySelector(`[data-key="${CSS.escape(r.key)}"]`)?.scrollIntoView({block:`nearest`})):dt()},[ut,dt]),kt=(0,L.useCallback)(e=>{x({kind:`list`}),V.current&&=(m(V.current),null),e&&B.current.folder===`drafts`&&setTimeout(()=>ke({silent:!0}),800)},[ke]),At=(0,L.useCallback)(e=>{if(!fo.mayLeave(()=>At(e)))return;let t=G.get(`mw:d2:new`),n=!!t&&!t.ref&&!t.sending;t&&!n&&G.remove(`mw:d2:new`);let r=!e&&!n?G.unsavedNew()[0]:void 0;r&&K.show({text:`Your mail that was not saved to Drafts is back.`,duration:6e3}),x({kind:`compose`,to:e,slot:n?void 0:r?r.slot:crypto.randomUUID()})},[]),jt=(0,L.useCallback)(e=>{if(!fo.mayLeave(()=>jt(e)))return;let{view:t}=B.current;if(V.current=null,C(void 0),e.reply&&t.kind===`thread`)I({id:Date.now(),convKey:t.conv.key,html:e.html});else{let t=crypto.randomUUID();G.set(G.key(`new`,t),{kind:`new`,to:``,cc:``,bcc:``,subject:e.subject,html:e.html,keepQuoted:!1,loaded:!1,attachments:[],account:e.account&&Qt.current.includes(e.account)?e.account:void 0,dirty:!0}),x({kind:`compose`,slot:t}),V.current=`calendar`}m(`mail`),e.opened()},[]),Mt=(0,L.useCallback)(e=>{if(!fo.mayLeave(()=>{Mt(e)}))return!1;let t=crypto.randomUUID();return G.set(G.key(`new`,t),{kind:`new`,ref:{draftId:e.draftId,changeKey:e.changeKey??``},to:e.to,cc:e.cc,bcc:``,subject:e.subject,html:e.html,keepQuoted:!1,loaded:!0,attachments:[],account:(e=>e&&Qt.current.includes(e)?e:void 0)(e.account??(e.draftId.includes(`:`)?e.draftId.split(`:`)[0]:void 0)),dirty:!0}),C(void 0),x({kind:`compose`,slot:t}),m(`mail`),V.current=`assistant`,!0},[]),Nt=(0,L.useCallback)((e,t,n,r,i)=>{if(!fo.mayLeave(()=>{Nt(e,t,n,r,i)}))return!1;let a=XP([e])[0];return C(void 0),I({id:Date.now(),convKey:a.key,html:t,to:e.id,...n?{draftId:n,changeKey:i??``}:{},...r?{all:!0}:{}}),x({kind:`thread`,conv:a}),m(`mail`),V.current=`assistant`,!0},[]),Pt=(0,L.useCallback)(()=>{ke({append:!0})},[ke]),Ft=(0,L.useCallback)(e=>{C({name:e.fromName||e.fromEmail,senders:e.fromEmail||e.fromName}),m(`settings`)},[]),It=(0,L.useCallback)(()=>{C(void 0),c(!1),m(V.current??`mail`),V.current=null},[]),Lt=p===`mail`?{section:p,folder:R.folder,filter:R.account,msg:b.kind===`thread`?b.conv.latest.id:void 0,compose:b.kind===`compose`}:p===`notes`?{section:p,note:ae}:p===`files`?{section:p,files:O.folder,file:O.file}:{section:p,page:p===`settings`?g:void 0},Rt=OK(Lt),[zt,Bt]=(0,L.useState)(!!PK);y.current.hash=Rt;let[Vt,Ht]=(0,L.useReducer)(e=>e+1,0),Ut=(0,L.useRef)(0),Wt=(0,L.useCallback)((e,t)=>{let n=++Ut.current;if(y.current.fix=!0,Ht(),e.section===`calendar`&&T(!0),e.section===`files`&&(D(!0),k({folder:e.files??`inbox`,file:e.file})),e.section===`people`&&ee(!0),e.section===`assistant`&&ne(!0),e.section===`notes`&&(ie(!0),e.fresh&&ue(e.note),N(e.note)),e.section===`home`&&me(!0),V.current=null,C(void 0),m(e.section),e.section===`settings`&&_(e.page),e.section!==`mail`){Bt(!1);return}let{folder:r,account:i}=We.current,a=(e.folder??`inbox`)!==r||(e.filter??``)!==i;(e.folder??`inbox`)!==r&&Ke.current(e.folder??`inbox`),(e.filter??``)!==i&&qe.current(e.filter??``);let o=e=>{x(e),e.kind===`thread`&&we(e.conv.key),Bt(!1)};if(t?.kind===`thread`&&e.msg===t.conv.latest.id)return a&&(ze.current=!0),o(t);if(!e.msg)return o({kind:`list`});let s=e.msg;Bt(!0),x({kind:`list`});let c=()=>n===Ut.current?We.current.folder===(e.folder??`inbox`)&&We.current.account===(e.filter??``)||(Bt(!1),!1):!1;U(`read`,{id:s,format:`text`}).then(t=>{if(!c())return;let{body:n,attachments:r,to:i,cc:a,bcc:l,replyTo:u,quoteAt:d,bodyType:f,...p}=t;o({kind:`thread`,conv:XP([{...p,id:s,folder:p.folder??e.folder??`inbox`}])[0]})},()=>{c()&&(K.show({text:`That mail is no longer there.`,duration:5e3}),Bt(!1))})},[]);(0,L.useEffect)(()=>{zt&&(p!==`mail`||b.kind!==`list`)&&(Ut.current++,Bt(!1))},[zt,p,b]),(0,L.useEffect)(()=>{PK&&Wt(PK,history.state?.view)},[Wt]),(0,L.useEffect)(()=>{let e=y.current,t=e.closing;if(e.closing=!1,!NK||zt||t)return;let n=(e,t,n)=>{try{history[n]({i:t,view:e},``,Rt)}catch{history[n]({i:t},``,Rt)}},r=p===`mail`&&b.kind===`thread`?b:void 0,i=!e.started||e.compose||e.fix||Rt===location.hash;i||e.i++,n(r,e.i,i?`replaceState`:`pushState`),e.started=!0,e.fix=!1,e.compose=!!Lt.compose},[Rt,zt,Vt]),(0,L.useEffect)(()=>{if(!NK)return;let e=e=>{let t=y.current;if(t.undoing){t.undoing=!1;return}let n=e.state,r=!n,i=n?.i??t.i+1,a=kK(location.hash)??{section:`home`};if(!r&&i!==t.i&&OK(a)===t.hash&&(i>0||i>t.i)){let e=i<t.i?-1:1;t.i=i,history.go(e);return}let o=()=>{t.i=i,t.compose=!1,r&&history.replaceState({i},``,location.hash),Wt(a,n?.view)},s=t.i-i;fo.mayLeave(()=>{history.go(-s)})?o():(history.go(s),t.undoing=!0)};return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[Wt]),(0,L.useEffect)(()=>{let e=e=>{let{conversations:t,selected:n,view:r,section:i}=B.current,a=e.target;if(i!==`mail`||r.kind!==`list`&&!B.current.picked.size||DI.isOpen()||document.querySelector(`[popover]:popover-open`)||a.closest(`input, textarea, select, [contenteditable="true"]`)||e.metaKey||e.ctrlKey||e.altKey)return;let o=t.findIndex(e=>e.key===n),{picked:s}=B.current;if(s.size){if(e.key===`Escape`){e.preventDefault(),ht();return}if(e.key===`a`&&!e.shiftKey){e.preventDefault(),gt();return}let t=iF(B.current.folder).find(t=>e.key===`Delete`?t.to===`trash`:t.key===e.key);if(t&&t.to!==`trash`){e.preventDefault(),vt(t.to);return}if(t){e.preventDefault(),document.querySelector(`.top.selecting .discard, .top.selecting [aria-label^="Delete"]`)?.click();return}}if(e.key.toLowerCase()===`x`){let n=document.activeElement?.closest(`.conv`)?.dataset.key,r=t.find(e=>e.key===n)??t[o];r&&(e.preventDefault(),mt(r,e.shiftKey));return}let c=n=>{let r=t[Math.max(0,Math.min(t.length-1,n))];r&&(e.preventDefault(),B.current.selected=r.key,we(r.key),Ie.current?.querySelector(`[data-key="${CSS.escape(r.key)}"]`)?.scrollIntoView({block:`nearest`}))};if(e.key===`j`||e.key===`ArrowDown`)c(o+1);else if(e.key===`k`||e.key===`ArrowUp`)c(o<0?0:o-1);else if((e.key===`Enter`||e.key===`o`)&&o>=0&&!a.closest(`button, .conv`))ut(t[o]);else if(e.key===`c`)e.preventDefault(),At();else if(o>=0&&(e.key===`e`||e.key===`#`||e.key===`!`||e.key===`Delete`)){let n=iF(B.current.folder).find(t=>e.key===`Delete`?t.to===`trash`:t.key===e.key);n&&(e.preventDefault(),pt(t[o],n.to))}else e.key===`g`&&B.current.hasCalendar?(e.preventDefault(),Qe(`calendar`)):e.key===`/`&&(e.preventDefault(),Re.current?.focus())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[ut,At,Qe,pt,mt,ht,vt,gt]);let Gt=R.query?`Nothing matches your search.`:R.flaggedOnly?`Nothing flagged${R.unreadOnly?` and unread`:``} here. Flag a mail to keep it for follow-up.`:R.unreadOnly?`No unread mail. You are all caught up.`:`Nothing here.`,Kt=(0,L.useMemo)(()=>n.filter(e=>e.mail),[n]),qt=(0,L.useMemo)(()=>Kt.map(e=>e.name),[Kt]),Jt=l&&!Kt.length,[,Yt]=(0,L.useState)(0),Xt=bK(Kt.length>0),Zt=yB(!0),Qt=(0,L.useRef)(qt);Qt.current=qt;let $t=qt.length>1,en=(0,L.useMemo)(()=>n.filter(e=>e.calendar),[n]),[tn]=(0,L.useState)(()=>{try{return localStorage.getItem(`mw:has-calendar`)===`1`}catch{return!1}}),nn=n.length?en.length>0:tn,rn=(0,L.useMemo)(()=>({accounts:qt,hasCalendar:nn,draftMail:Mt,draftReply:Nt,openEvent:e=>{he({id:Date.now(),prefill:e}),Qe(`calendar`)}}),[qt,nn,Mt,Nt,Qe]);return(0,L.useEffect)(()=>(eR.set(nn?e=>{DI.close(),he({id:Date.now(),prefill:e}),Qe(`calendar`)}:null),()=>eR.set(null)),[nn,Qe]),(0,L.useEffect)(()=>{if(n.length)try{en.length?localStorage.setItem(`mw:has-calendar`,`1`):localStorage.removeItem(`mw:has-calendar`)}catch{}},[n.length,en.length]),B.current.hasCalendar=nn,(0,L.useEffect)(()=>{if(!nn||!rt)return;let e,t=(t=0)=>{clearTimeout(e),e=setTimeout(()=>{let e=Date.now();U(`events`,{start:new Date(e).toISOString(),end:new Date(e+2592e6).toISOString()}).then(t=>ye(t.items.filter(t=>Uc(t)&&new Date(t.end).getTime()>e).length),()=>{})},t)},n=()=>t(1500);t(),window.addEventListener(Vc,n),window.addEventListener(Hc,n);let r=ce(e=>{e===`focus`&&t()},2e3);return()=>{clearTimeout(e),window.removeEventListener(Vc,n),window.removeEventListener(Hc,n),r()}},[nn,rt]),(0,W.jsxs)(`div`,{className:`shell${p===`home`?` at-home`:$e?` framed`:``}`,"data-bg":Zt.bg,"data-ink":Zt.light?`light`:void 0,style:Zt.photo?{"--hm-photo":`url("${Zt.photo}")`}:void 0,children:[(0,W.jsx)($V,{section:p,onGo:Qe,unread:ge,hasCalendar:nn,invitations:ve,labeled:$e,place:Lt.compose?OK({...Lt,compose:!1}):Rt,bell:(0,W.jsx)(lK,{labeled:$e,showAccount:$t,onOpen:St,onSettings:()=>{Qe(`settings`),_(`notify`)}})}),(0,W.jsx)(QV,{on:$e}),(0,W.jsxs)(`main`,{className:`stage${$e&&p===`mail`&&!Jt?` two`:``}`,children:[i&&(0,W.jsx)(vK,{hasAccount:Kt.length>0,accounts:qt,onDone:e=>{a(!1),Qe(e)}}),(0,W.jsx)(eH,{onUsed:e=>{Ae([e],!0),Ge(800)}}),Jt&&(p===`mail`&&b.kind===`list`||p===`files`||p===`people`)&&(0,W.jsxs)(`section`,{className:`view no-account`,children:[p===`files`?(0,W.jsx)(gn,{size:34,strokeWidth:1.3,"aria-hidden":`true`}):p===`people`?(0,W.jsx)(Zi,{size:34,strokeWidth:1.3,"aria-hidden":`true`}):(0,W.jsx)(ar,{size:34,strokeWidth:1.3,"aria-hidden":`true`}),(0,W.jsx)(`h2`,{children:`No mail account yet`}),h.accounts?(0,W.jsxs)(W.Fragment,{children:[(0,W.jsx)(`p`,{children:p===`files`?`The files sent and received in your mail show here, once you add an account.`:p===`people`?`The people you write to and hear from show here, once you add an account.`:`Add one to read, sort and answer your mail here.`}),(0,W.jsx)(`button`,{type:`button`,className:`btn primary`,onClick:()=>{let e=p;Qe(`settings`),_(`accounts`),V.current=e},children:`Add a mail account`})]}):(0,W.jsxs)(`p`,{children:[`Mail accounts are set up on the computer Sideora runs on: `,(0,W.jsx)(`code`,{children:`sideora setup`}),`.`]})]}),(0,W.jsxs)(`section`,{className:`view list-view`,hidden:!nt||Jt,children:[_t.length>0?(0,W.jsx)(AK,{picked:_t,total:Fe.length,folder:R.folder,onAll:gt,onClear:ht,onMove:vt,onRead:yt,onFlag:bt}):(0,W.jsx)(dK,{folder:R.folder,onFolder:R.setFolder,accounts:qt,account:R.account,onAccount:R.setAccount,unreadOnly:R.unreadOnly,onUnreadOnly:R.setUnreadOnly,unreadCount:Ye,flaggedOnly:R.flaggedOnly,onFlaggedOnly:R.setFlaggedOnly,search:xe,onSearch:Se,searchRef:Re,busy:R.status===`loading`,onRefresh:()=>{ke(),Ge()},onCompose:()=>At()}),(0,W.jsx)(XV,{state:e}),(0,W.jsx)(CI,{conversations:Fe,folder:R.folder,status:R.status,emptyText:Gt,error:R.error,selected:Ce,showAccount:$t&&!R.account,hasMore:!!R.cursor,loadingMore:R.loadingMore,onMore:Pt,onOpen:ut,onToggleRead:lt,onToggleFlag:ct,onMove:pt,onDiscardDraft:ft,picked:Te,onPick:mt,listRef:Ie})]}),p===`mail`&&$e&&b.kind===`list`&&!Jt&&(0,W.jsxs)(`div`,{className:`pane-empty`,"aria-hidden":`true`,children:[(0,W.jsx)(ar,{size:34,strokeWidth:1.3}),(0,W.jsx)(`p`,{children:`Pick a conversation to read it here.`})]}),p===`mail`&&b.kind===`thread`&&(0,W.jsx)(qW,{conv:b.conv,folder:MK(b.conv,R.folder),onBack:dt,onStep:Ot,canStep:{prev:Fe.findIndex(e=>e.key===b.conv.key)>0,next:Fe.findIndex(e=>e.key===b.conv.key)<Fe.length-1},onSetRead:ot,onSetFlagged:st,onMailto:At,onRule:Ft,onOpenNote:wt,onMove:e=>pt(b.conv,e),keysOff:Te.size>0,showAccount:$t&&!R.account,onEvent:nn?e=>{he({id:Date.now(),prefill:e}),Qe(`calendar`)}:void 0,insert:F?.convKey===b.conv.key?F:null,replyNow:b.reply,onRepliedNow:()=>x(e=>e.kind===`thread`&&e.reply?{kind:`thread`,conv:e.conv}:e),onInserted:()=>I(null),aiPane:et,onAiPane:tt},b.conv.key),p===`mail`&&b.kind===`compose`&&(0,W.jsxs)(`section`,{className:`view`,children:[(0,W.jsxs)(`header`,{className:`thread-head`,children:[(0,W.jsx)(`button`,{type:`button`,className:`btn icon`,onClick:()=>{fo.mayLeave(()=>kt(!0))&&kt(!0)},title:`Back (Esc)`,"aria-label":`Back`,children:(0,W.jsx)(Le,{size:16})}),(0,W.jsx)(`h1`,{children:b.draftId?`Draft`:`New message`})]}),(0,W.jsx)(`div`,{className:`thread-scroll`,children:(0,W.jsx)(JP,{kind:b.draftId?`edit`:`new`,draftId:b.draftId,slot:b.slot,initialTo:b.to,account:R.account||void 0,accounts:qt,onClose:kt},b.draftId??b.slot??`new`)})]}),w&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`calendar`,children:(0,W.jsx)(ul,{showAccount:en.length>1,active:p===`calendar`,compose:P,account:R.account||void 0,replyTo:b.kind===`thread`?{subject:b.conv.latest.subject}:null,onPropose:jt})}),E&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`files`||Jt,children:(0,W.jsx)(lz,{at:O,onAt:k,onOpenMail:e=>{xt(e),V.current=`files`},onWrite:e=>{m(`mail`),At(e),V.current=`files`}})}),re&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`notes`,children:(0,W.jsx)(bV,{active:p===`notes`,wide:$e,open:ae,fresh:le,onNew:Dt,onOpen:N,onOpenMail:Tt})}),M&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`assistant`,children:(0,W.jsx)(VG,{active:p===`assistant`,host:rn,onOpenMail:e=>{xt(e),V.current=`assistant`},onOpenNote:e=>wt(e),onOpenCalendar:()=>Qe(`calendar`),onSettings:()=>{Qe(`settings`),_(`ai`)}})}),A&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`people`||Jt,children:(0,W.jsx)(GB,{active:p===`people`,showAccount:$t,onOpenMail:e=>{xt(e),V.current=`people`},onWrite:e=>{m(`mail`),At(e),V.current=`people`},onRule:e=>{C({name:e.name||e.email,senders:e.email}),m(`settings`),V.current=`people`}})}),pe&&(0,W.jsx)(`div`,{className:`pane`,hidden:p!==`home`,children:(0,W.jsx)(wB,{setup:Xt&&{left:Xt,onOpen:e=>{Qe(`settings`),_(e),V.current=`home`,c(!0)},onHide:()=>{gK.hideCard(),Yt(e=>e+1)}},active:p===`home`,accounts:Kt,accountsKnown:l,hasCalendar:nn,invitations:ve,onGo:Qe,onNote:wt,onNewNote:Dt})}),p===`settings`&&(0,W.jsx)(ZU,{accounts:qt,draft:S,onBack:It,canGoBack:!!S||s,at:g,onPage:_},S?`rule`:`plain`)]}),(0,W.jsx)($R,{}),(0,W.jsx)(cK,{showAccount:$t,onOpen:St,onRead:Ct}),(0,W.jsx)(JW,{})]})}var IK=Us;function LK(){w(),(0,ve.createRoot)(document.getElementById(`root`)).render((0,W.jsx)(FK,{}))}export{LK as mount,IK as warm};
|