@axerity/cli 0.2.3 → 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. package/README.md +10 -10
  2. package/bin/axerity.js +2 -1
  3. package/dist/client/_app/immutable/assets/{0.Dg-buelk.css → 0.BqIb39T-.css} +1 -1
  4. package/dist/client/_app/immutable/assets/2.CXw2lWtY.css +1 -0
  5. package/dist/client/_app/immutable/chunks/{BdsP84LY.js → 0oJDGpiH.js} +1 -1
  6. package/dist/client/_app/immutable/chunks/{BgozG8UV.js → B5sjqzdJ.js} +1 -1
  7. package/dist/client/_app/immutable/chunks/B9DYqOIj.js +9 -0
  8. package/dist/client/_app/immutable/chunks/{D6lLFpcc.js → BVqxhTxB.js} +2 -2
  9. package/dist/client/_app/immutable/chunks/Bs4qCkME.js +1 -0
  10. package/dist/client/_app/immutable/chunks/BsRQXaRE2.js +1 -0
  11. package/dist/client/_app/immutable/chunks/{BRQspS80.js → Bt6RPAsh.js} +1 -1
  12. package/dist/client/_app/immutable/chunks/{Dg6QheNk.js → C52bpLvU.js} +1 -1
  13. package/dist/client/_app/immutable/chunks/CIIr70Sw2.js +4 -0
  14. package/dist/client/_app/immutable/chunks/{B1eXHGII2.js → CUWABXvb2.js} +1 -1
  15. package/dist/client/_app/immutable/chunks/D3mr2Pcs2.js +1 -0
  16. package/dist/client/_app/immutable/chunks/{B2NKIbe62.js → DC_PITHB2.js} +1 -1
  17. package/dist/client/_app/immutable/chunks/{B1R9-4vu.js → DPUm3Qv8.js} +1 -1
  18. package/dist/client/_app/immutable/chunks/{Bie0X5s02.js → DPoU52N62.js} +1 -1
  19. package/dist/client/_app/immutable/chunks/{BVz-DmJs2.js → DgYtIg5Q2.js} +1 -1
  20. package/dist/client/_app/immutable/chunks/{D0Co2O6p.js → DqP4dJP7.js} +1 -1
  21. package/dist/client/_app/immutable/chunks/{BQyPqLag.js → DvqUYvHq.js} +1 -1
  22. package/dist/client/_app/immutable/chunks/{BXD4L9Ly.js → Dw-HnmN8.js} +3 -3
  23. package/dist/client/_app/immutable/chunks/PhylCDQL.js +1 -0
  24. package/dist/client/_app/immutable/chunks/hLbVfj1R2.js +36 -0
  25. package/dist/client/_app/immutable/chunks/{QmWylQL4.js → mmyK4psQ.js} +1 -1
  26. package/dist/client/_app/immutable/chunks/{BNdlLOgu2.js → vx_Tnhqd2.js} +2 -2
  27. package/dist/client/_app/immutable/entry/{app.CxX_Ngg4.js → app.D3mocqYP.js} +2 -2
  28. package/dist/client/_app/immutable/entry/start.CUl3n-Gl.js +1 -0
  29. package/dist/client/_app/immutable/nodes/{0.Z00LhnRq.js → 0.LvB7zsta.js} +1 -1
  30. package/dist/client/_app/immutable/nodes/{1.B4-umIy6.js → 1.Cekxb28u.js} +1 -1
  31. package/dist/client/_app/immutable/nodes/2.BmuI6uKK.js +21 -0
  32. package/dist/client/_app/version.json +1 -1
  33. package/dist/client/axerity.schema.json +268 -0
  34. package/dist/openapi.js +1 -1
  35. package/dist/server/chunks/{0-BwOQbF_V.js → 0-DCJG4mFg.js} +7 -7
  36. package/dist/server/chunks/{0-BwOQbF_V.js.map → 0-DCJG4mFg.js.map} +1 -1
  37. package/dist/server/chunks/1-D_cP71Pu.js +9 -0
  38. package/dist/server/chunks/{1-iVzeAeCr.js.map → 1-D_cP71Pu.js.map} +1 -1
  39. package/dist/server/chunks/{2-Cf2e_ZHQ.js → 2-DePKmyeL.js} +7 -7
  40. package/dist/server/chunks/{2-Cf2e_ZHQ.js.map → 2-DePKmyeL.js.map} +1 -1
  41. package/dist/server/chunks/{Icon-5yfImJr6.js → Icon-BfeseJM2.js} +3 -3
  42. package/dist/server/chunks/{Icon-5yfImJr6.js.map → Icon-BfeseJM2.js.map} +1 -1
  43. package/dist/server/chunks/{_error.svelte-BVoDw74f.js → _error.svelte-CKJwNCgF.js} +4 -4
  44. package/dist/server/chunks/{_error.svelte-BVoDw74f.js.map → _error.svelte-CKJwNCgF.js.map} +1 -1
  45. package/dist/server/chunks/{_layout.svelte-BcCaU3bG.js → _layout.svelte-CsiKTCa-.js} +2 -2
  46. package/dist/server/chunks/{_layout.svelte-BcCaU3bG.js.map → _layout.svelte-CsiKTCa-.js.map} +1 -1
  47. package/dist/server/chunks/{_page.svelte-n6-SvczT.js → _page.svelte-nxdjHCbg.js} +33 -28
  48. package/dist/server/chunks/_page.svelte-nxdjHCbg.js.map +1 -0
  49. package/dist/server/chunks/{_server.ts-CFwzq76p.js → _server.ts-BHeYeJmN.js} +4 -4
  50. package/dist/server/chunks/{_server.ts-CFwzq76p.js.map → _server.ts-BHeYeJmN.js.map} +1 -1
  51. package/dist/server/chunks/{_server.ts-Cu-FKBie.js → _server.ts-BiesOGNR.js} +4 -4
  52. package/dist/server/chunks/{_server.ts-Cu-FKBie.js.map → _server.ts-BiesOGNR.js.map} +1 -1
  53. package/dist/server/chunks/{_server.ts-Bop-CIYW.js → _server.ts-DIk-n0YD.js} +4 -4
  54. package/dist/server/chunks/{_server.ts-Bop-CIYW.js.map → _server.ts-DIk-n0YD.js.map} +1 -1
  55. package/dist/server/chunks/{_server.ts-dD8wecb9.js → _server.ts-DMP1_mr2.js} +4 -4
  56. package/dist/server/chunks/{_server.ts-dD8wecb9.js.map → _server.ts-DMP1_mr2.js.map} +1 -1
  57. package/dist/server/chunks/{_server.ts-BAwRfQmf.js → _server.ts-Dy_C7ZeP.js} +3 -3
  58. package/dist/server/chunks/{_server.ts-BAwRfQmf.js.map → _server.ts-Dy_C7ZeP.js.map} +1 -1
  59. package/dist/server/chunks/{_server.ts-97y1e_kf.js → _server.ts-tYGHNdqr.js} +4 -4
  60. package/dist/server/chunks/{_server.ts-97y1e_kf.js.map → _server.ts-tYGHNdqr.js.map} +1 -1
  61. package/dist/server/chunks/{_server.ts-SMDAHwKa.js → _server.ts-uHcpC8PZ.js} +4 -4
  62. package/dist/server/chunks/{_server.ts-SMDAHwKa.js.map → _server.ts-uHcpC8PZ.js.map} +1 -1
  63. package/dist/server/chunks/{_server.ts-BAMEqfNt.js → _server.ts-uhOGdIIw.js} +3 -3
  64. package/dist/server/chunks/{_server.ts-BAMEqfNt.js.map → _server.ts-uhOGdIIw.js.map} +1 -1
  65. package/dist/server/chunks/{content-store-Sgdh2P8q.js → content-store-RDR6QrAT.js} +2 -2
  66. package/dist/server/chunks/{content-store-Sgdh2P8q.js.map → content-store-RDR6QrAT.js.map} +1 -1
  67. package/dist/server/chunks/{exports-MurdpiMe.js → exports-B5Eog9Mt.js} +2 -2
  68. package/dist/server/chunks/{exports-MurdpiMe.js.map → exports-B5Eog9Mt.js.map} +1 -1
  69. package/dist/server/chunks/{hooks.server-B1enBMkZ.js → hooks.server-Z35a48KB.js} +3 -3
  70. package/dist/server/chunks/{hooks.server-B1enBMkZ.js.map → hooks.server-Z35a48KB.js.map} +1 -1
  71. package/dist/server/chunks/{internal-BZm_X2cF.js → internal-3F8QbLlp.js} +3 -3
  72. package/dist/server/chunks/{internal-BZm_X2cF.js.map → internal-3F8QbLlp.js.map} +1 -1
  73. package/dist/server/chunks/{site-CKxeIt_V.js → site-D5-ITcsl.js} +2 -2
  74. package/dist/server/chunks/{site-CKxeIt_V.js.map → site-D5-ITcsl.js.map} +1 -1
  75. package/dist/server/index.js +2 -2
  76. package/dist/server/manifest.js +14 -14
  77. package/dist/server/manifest.js.map +1 -1
  78. package/package.json +22 -14
  79. package/runtime/crawl.js +17 -6
  80. package/dist/client/_app/immutable/assets/2.DZRzHaE1.css +0 -1
  81. package/dist/client/_app/immutable/chunks/9IV9o0dV2.js +0 -4
  82. package/dist/client/_app/immutable/chunks/B5Brrqz92.js +0 -1
  83. package/dist/client/_app/immutable/chunks/B6nymVS3.js +0 -1
  84. package/dist/client/_app/immutable/chunks/B_Yg36qy2.js +0 -1
  85. package/dist/client/_app/immutable/chunks/C6v0vZRT2.js +0 -36
  86. package/dist/client/_app/immutable/chunks/CWUJwgR2.js +0 -1
  87. package/dist/client/_app/immutable/entry/start.BqXoqqf9.js +0 -1
  88. package/dist/client/_app/immutable/nodes/2.CPYt6O3Q.js +0 -28
  89. package/dist/server/chunks/1-iVzeAeCr.js +0 -9
  90. package/dist/server/chunks/_page.svelte-n6-SvczT.js.map +0 -1
  91. /package/dist/client/_app/immutable/chunks/{CXC42hVj.js → CXC42hVj2.js} +0 -0
  92. /package/dist/client/_app/immutable/chunks/{dqbyyLvi2.js → dqbyyLvi.js} +0 -0
@@ -0,0 +1,9 @@
1
+ import{vt as e}from"./wCc4pE4l.js";var t={arabic:`ar`,armenian:`am`,bulgarian:`bg`,czech:`cz`,danish:`dk`,dutch:`nl`,english:`en`,finnish:`fi`,french:`fr`,german:`de`,greek:`gr`,hungarian:`hu`,indian:`in`,indonesian:`id`,irish:`ie`,italian:`it`,lithuanian:`lt`,nepali:`np`,norwegian:`no`,portuguese:`pt`,romanian:`ro`,russian:`ru`,serbian:`rs`,slovenian:`ru`,spanish:`es`,swedish:`se`,tamil:`ta`,turkish:`tr`,ukrainian:`uk`,sanskrit:`sk`},n={dutch:/[^A-Za-zàèéìòóù0-9_'-]+/gim,english:/[^A-Za-zàèéìòóù0-9_'-]+/gim,french:/[^a-z0-9äâàéèëêïîöôùüûœç-]+/gim,italian:/[^A-Za-zàèéìòóù0-9_'-]+/gim,norwegian:/[^a-z0-9_æøåÆØÅäÄöÖüÜ]+/gim,portuguese:/[^a-z0-9à-úÀ-Ú]/gim,russian:/[^a-z0-9а-яА-ЯёЁ]+/gim,spanish:/[^a-z0-9A-Zá-úÁ-ÚñÑüÜ]+/gim,swedish:/[^a-z0-9_åÅäÄöÖüÜ-]+/gim,german:/[^a-z0-9A-ZäöüÄÖÜß]+/gim,finnish:/[^a-z0-9äöÄÖ]+/gim,danish:/[^a-z0-9æøåÆØÅ]+/gim,hungarian:/[^a-z0-9áéíóöőúüűÁÉÍÓÖŐÚÜŰ]+/gim,romanian:/[^a-z0-9ăâîșțĂÂÎȘȚ]+/gim,serbian:/[^a-z0-9čćžšđČĆŽŠĐ]+/gim,turkish:/[^a-z0-9çÇğĞıİöÖşŞüÜ]+/gim,lithuanian:/[^a-z0-9ąčęėįšųūžĄČĘĖĮŠŲŪŽ]+/gim,arabic:/[^a-z0-9أ-ي]+/gim,nepali:/[^a-z0-9अ-ह]+/gim,irish:/[^a-z0-9áéíóúÁÉÍÓÚ]+/gim,indian:/[^a-z0-9अ-ह]+/gim,armenian:/[^a-z0-9ա-ֆ]+/gim,greek:/[^a-z0-9α-ωά-ώ]+/gim,indonesian:/[^a-z0-9]+/gim,ukrainian:/[^a-z0-9а-яА-ЯіїєІЇЄ]+/gim,slovenian:/[^a-z0-9螚ȎŠ]+/gim,bulgarian:/[^a-z0-9а-яА-Я]+/gim,tamil:/[^a-z0-9அ-ஹ]+/gim,sanskrit:/[^a-z0-9A-Zāīūṛḷṃṁḥśṣṭḍṇṅñḻḹṝ]+/gim,czech:/[^A-Z0-9a-zěščřžýáíéúůóťďĚŠČŘŽÝÁÍÉÓÚŮŤĎ-]+/gim},r=Object.keys(t);function i(e){return e!==void 0&&r.includes(e)?t[e]:void 0}var a=Date.now().toString().slice(5),o=0,s=1024,c=BigInt(1e3),l=BigInt(1e6),u=BigInt(1e9),d=65535;function f(e,t){if(t.length<65535)Array.prototype.push.apply(e,t);else{let n=t.length;for(let r=0;r<n;r+=d)Array.prototype.push.apply(e,t.slice(r,r+d))}}function p(e,...t){return e.replace(/%(?:(?<position>\d+)\$)?(?<width>-?\d*\.?\d*)(?<type>[dfs])/g,function(...e){let{width:n,type:r,position:i}=e[e.length-1],a=i?t[Number.parseInt(i)-1]:t.shift(),o=n===``?0:Number.parseInt(n);switch(r){case`d`:return a.toString().padStart(o,`0`);case`f`:{let e=a,[t,r]=n.split(`.`).map(e=>Number.parseFloat(e));return typeof r==`number`&&r>=0&&(e=e.toFixed(r)),typeof t==`number`&&t>=0?e.toString().padStart(o,`0`):e.toString()}case`s`:return o<0?a.toString().padEnd(-o,` `):a.toString().padStart(o,` `);default:return a}})}function m(e,t=2){if(e===0)return`0 Bytes`;let n=t<0?0:t,r=[`Bytes`,`KB`,`MB`,`GB`,`TB`,`PB`,`EB`,`ZB`,`YB`],i=Math.floor(Math.log(e)/Math.log(s));return`${parseFloat((e/s**+i).toFixed(n))} ${r[i]}`}function h(){return typeof WorkerGlobalScope<`u`&&self instanceof WorkerGlobalScope}function g(){return typeof process<`u`&&process.release&&process.release.name===`node`}function _(){return BigInt(Math.floor(performance.now()*1e6))}function v(e){return typeof e==`number`&&(e=BigInt(e)),e<c?`${e}ns`:e<l?`${e/c}μs`:e<u?`${e/l}ms`:`${e/u}s`}function y(){return h()?_():g()||typeof process<`u`&&typeof process?.hrtime?.bigint==`function`?process.hrtime.bigint():typeof performance<`u`?_():BigInt(0)}function b(){return`${a}-${o++}`}function x(e,t){return Object.hasOwn===void 0?Object.prototype.hasOwnProperty.call(e,t)?e[t]:void 0:Object.hasOwn(e,t)?e[t]:void 0}function S(e,t){return t[1]===e[1]?e[0]-t[0]:t[1]-e[1]}function C(e){if(e.length===0)return[];if(e.length===1)return e[0];for(let t=1;t<e.length;t++)if(e[t].length<e[0].length){let n=e[0];e[0]=e[t],e[t]=n}let t=new Map;for(let n of e[0])t.set(n,1);for(let n=1;n<e.length;n++){let r=0;for(let i of e[n]){let e=t.get(i);e===n&&(t.set(i,e+1),r++)}if(r===0)return[]}return e[0].filter(n=>{let r=t.get(n);return r!==void 0&&t.set(n,0),r===e.length})}function w(e,t){let n={},r=t.length;for(let i=0;i<r;i++){let r=t[i],a=r.split(`.`),o=e,s=a.length;for(let e=0;e<s;e++)if(o=o[a[e]],typeof o==`object`){if(o!==null&&`lat`in o&&`lon`in o&&typeof o.lat==`number`&&typeof o.lon==`number`){o=n[r]=o;break}else if(!Array.isArray(o)&&o!==null&&e===s-1){o=void 0;break}}else if((typeof o!=`object`||!o)&&e<s-1){o=void 0;break}o!==void 0&&(n[r]=o)}return n}function T(e,t){return w(e,[t])[t]}var E={cm:.01,m:1,km:1e3,ft:.3048,yd:.9144,mi:1609.344};function D(e,t){let n=E[t];if(n===void 0)throw Error(j(`INVALID_DISTANCE_SUFFIX`,e).message);return e*n}function ee(e,t){e.hits=e.hits.map(e=>({...e,document:{...e.document,...t.reduce((e,t)=>{let n=t.split(`.`),r=n.pop(),i=e;for(let e of n)i[e]=i[e]??{},i=i[e];return i[r]=null,e},e.document)}}))}function O(e){return Array.isArray(e)?e.some(e=>O(e)):e?.constructor?.name===`AsyncFunction`}var te=`intersection`in new Set;function k(...e){if(e.length===0)return new Set;if(e.length===1)return e[0];if(e.length===2){let t=e[0],n=e[1];if(te)return t.intersection(n);let r=new Set,i=t.size<n.size?t:n,a=i===t?n:t;for(let e of i)a.has(e)&&r.add(e);return r}let t={index:0,size:e[0].size};for(let n=1;n<e.length;n++)e[n].size<t.size&&(t.index=n,t.size=e[n].size);if(te){let n=e[t.index];for(let r=0;r<e.length;r++)r!==t.index&&(n=n.intersection(e[r]));return n}let n=e[t.index];for(let r=0;r<e.length;r++){if(r===t.index)continue;let i=e[r];for(let e of n)i.has(e)||n.delete(e)}return n}var ne=`union`in new Set;function A(e,t){return ne?e?e.union(t):t:e?new Set([...e,...t]):new Set(t)}function re(e,t){let n=new Set;for(let r of e)t.has(r)||n.add(r);return n}function ie(e){if(typeof SharedArrayBuffer<`u`&&typeof Atomics<`u`){let t=new Int32Array(new SharedArrayBuffer(4));if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);Atomics.wait(t,0,0,Number(e))}else{if(!(e>0&&e<1/0))throw typeof e!=`number`&&typeof e!=`bigint`?TypeError(`sleep: ms must be a number`):RangeError(`sleep: ms must be a number that is greater than 0 but less than Infinity`);let t=Date.now()+Number(e);for(;t>Date.now(););}}var ae={NO_LANGUAGE_WITH_CUSTOM_TOKENIZER:`Do not pass the language option to create when using a custom tokenizer.`,LANGUAGE_NOT_SUPPORTED:`Language "%s" is not supported.\nSupported languages are:\n - ${r.join(`
2
+ - `)}`,INVALID_STEMMER_FUNCTION_TYPE:`config.stemmer property must be a function.`,MISSING_STEMMER:`As of version 1.0.0 @orama/orama does not ship non English stemmers by default. To solve this, please explicitly import and specify the "%s" stemmer from the package @orama/stemmers. See https://docs.orama.com/docs/orama-js/text-analysis/stemming for more information.`,CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY:`Custom stop words array must only contain strings.`,UNSUPPORTED_COMPONENT:`Unsupported component "%s".`,COMPONENT_MUST_BE_FUNCTION:`The component "%s" must be a function.`,COMPONENT_MUST_BE_FUNCTION_OR_ARRAY_FUNCTIONS:`The component "%s" must be a function or an array of functions.`,INVALID_SCHEMA_TYPE:`Unsupported schema type "%s" at "%s". Expected "string", "boolean" or "number" or array of them.`,DOCUMENT_ID_MUST_BE_STRING:`Document id must be of type "string". Got "%s" instead.`,DOCUMENT_ALREADY_EXISTS:`A document with id "%s" already exists.`,DOCUMENT_DOES_NOT_EXIST:`A document with id "%s" does not exists.`,MISSING_DOCUMENT_PROPERTY:`Missing searchable property "%s".`,INVALID_DOCUMENT_PROPERTY:`Invalid document property "%s": expected "%s", got "%s"`,UNKNOWN_INDEX:`Invalid property name "%s". Expected a wildcard string ("*") or array containing one of the following properties: %s`,INVALID_BOOST_VALUE:`Boost value must be a number greater than, or less than 0.`,INVALID_FILTER_OPERATION:`You can only use one operation per filter, you requested %d.`,SCHEMA_VALIDATION_FAILURE:`Cannot insert document due schema validation failure on "%s" property.`,INVALID_SORT_SCHEMA_TYPE:`Unsupported sort schema type "%s" at "%s". Expected "string" or "number".`,CANNOT_SORT_BY_ARRAY:`Cannot configure sort for "%s" because it is an array (%s).`,UNABLE_TO_SORT_ON_UNKNOWN_FIELD:`Unable to sort on unknown field "%s". Allowed fields: %s`,SORT_DISABLED:`Sort is disabled. Please read the documentation at https://docs.orama.com/docs/orama-js for more information.`,UNKNOWN_GROUP_BY_PROPERTY:`Unknown groupBy property "%s".`,INVALID_GROUP_BY_PROPERTY:`Invalid groupBy property "%s". Allowed types: "%s", but given "%s".`,UNKNOWN_FILTER_PROPERTY:`Unknown filter property "%s".`,UNKNOWN_VECTOR_PROPERTY:`Unknown vector property "%s". Make sure the property exists in the schema and is configured as a vector.`,INVALID_VECTOR_SIZE:`Vector size must be a number greater than 0. Got "%s" instead.`,INVALID_VECTOR_VALUE:`Vector value must be a number greater than 0. Got "%s" instead.`,INVALID_INPUT_VECTOR:`Property "%s" was declared as a %s-dimensional vector, but got a %s-dimensional vector instead.
3
+ Input vectors must be of the size declared in the schema, as calculating similarity between vectors of different sizes can lead to unexpected results.`,WRONG_SEARCH_PROPERTY_TYPE:`Property "%s" is not searchable. Only "string" properties are searchable.`,FACET_NOT_SUPPORTED:`Facet doens't support the type "%s".`,INVALID_DISTANCE_SUFFIX:`Invalid distance suffix "%s". Valid suffixes are: cm, m, km, mi, yd, ft.`,INVALID_SEARCH_MODE:`Invalid search mode "%s". Valid modes are: "fulltext", "vector", "hybrid".`,MISSING_VECTOR_AND_SECURE_PROXY:`No vector was provided and no secure proxy was configured. Please provide a vector or configure an Orama Secure Proxy to perform hybrid search.`,MISSING_TERM:`"term" is a required parameter when performing hybrid search. Please provide a search term.`,INVALID_VECTOR_INPUT:`Invalid "vector" property. Expected an object with "value" and "property" properties, but got "%s" instead.`,PLUGIN_CRASHED:`A plugin crashed during initialization. Please check the error message for more information:`,PLUGIN_SECURE_PROXY_NOT_FOUND:`Could not find '@orama/secure-proxy-plugin' installed in your Orama instance.
4
+ Please install it before proceeding with creating an answer session.
5
+ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
6
+ `,PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL:`Could not find a chat model defined in the secure proxy plugin configuration.
7
+ Please provide a chat model before proceeding with creating an answer session.
8
+ Read more at https://docs.orama.com/docs/orama-js/plugins/plugin-secure-proxy#plugin-secure-proxy
9
+ `,ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT:`The last message in the session is not an assistant message. Cannot regenerate non-assistant messages.`,PLUGIN_COMPONENT_CONFLICT:`The component "%s" is already defined. The plugin "%s" is trying to redefine it.`};function j(e,...t){let n=Error(p(ae[e]??`Unsupported Orama Error code: ${e}`,...t));return n.code=e,`captureStackTrace`in Error.prototype&&Error.captureStackTrace(n),n}function oe(e){return{raw:Number(e),formatted:v(e)}}function se(e){if(e.id){if(typeof e.id!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof e.id);return e.id}return b()}function M(e,t){for(let[n,r]of Object.entries(t)){let t=e[n];if(t!==void 0&&!(r===`geopoint`&&typeof t==`object`&&typeof t.lon==`number`&&typeof t.lat==`number`)&&!(r===`enum`&&(typeof t==`string`||typeof t==`number`))){if(r===`enum[]`&&Array.isArray(t)){let e=t.length;for(let r=0;r<e;r++)if(typeof t[r]!=`string`&&typeof t[r]!=`number`)return n+`.`+r;continue}if(N(r)){let e=F(r);if(!Array.isArray(t)||t.length!==e)throw j(`INVALID_INPUT_VECTOR`,n,e,t.length);continue}if(P(r)){if(!Array.isArray(t))return n;let e=de(r),i=t.length;for(let r=0;r<i;r++)if(typeof t[r]!==e)return n+`.`+r;continue}if(typeof r==`object`){if(!t||typeof t!=`object`)return n;let e=M(t,r);if(e)return n+`.`+e;continue}if(typeof t!==r)return n}}}var ce={string:!1,number:!1,boolean:!1,enum:!1,geopoint:!1,"string[]":!0,"number[]":!0,"boolean[]":!0,"enum[]":!0},le={"string[]":`string`,"number[]":`number`,"boolean[]":`boolean`,"enum[]":`enum`};function ue(e){return e===`geopoint`}function N(e){return typeof e==`string`&&/^vector\[\d+\]$/.test(e)}function P(e){return typeof e==`string`&&ce[e]}function de(e){return le[e]}function F(e){let t=Number(e.slice(7,-1));switch(!0){case isNaN(t):throw j(`INVALID_VECTOR_VALUE`,e);case t<=0:throw j(`INVALID_VECTOR_SIZE`,e);default:return t}}var fe=e({createInternalDocumentIDStore:()=>pe,getDocumentIdFromInternalId:()=>L,getInternalDocumentId:()=>I,load:()=>he,save:()=>me});function pe(){return{idToInternalId:new Map,internalIdToId:[],save:me,load:he}}function me(e){return{internalIdToId:e.internalIdToId}}function he(e,t){let{internalIdToId:n}=t;e.internalDocumentIDStore.idToInternalId.clear(),e.internalDocumentIDStore.internalIdToId=[];let r=n.length;for(let t=0;t<r;t++){let r=n[t];e.internalDocumentIDStore.idToInternalId.set(r,t+1),e.internalDocumentIDStore.internalIdToId.push(r)}}function I(e,t){if(typeof t==`string`){let n=e.idToInternalId.get(t);if(n)return n;let r=e.idToInternalId.size+1;return e.idToInternalId.set(t,r),e.internalIdToId.push(t),r}return t>e.internalIdToId.length?I(e,t.toString()):t}function L(e,t){if(e.internalIdToId.length<t)throw Error(`Invalid internalId ${t}`);return e.internalIdToId[t-1]}var ge=e({count:()=>Ce,create:()=>_e,createDocumentsStore:()=>Ee,get:()=>ve,getAll:()=>be,getMultiple:()=>ye,load:()=>we,remove:()=>Se,save:()=>Te,store:()=>xe});function _e(e,t){return{sharedInternalDocumentStore:t,docs:{},count:0}}function ve(e,t){let n=I(e.sharedInternalDocumentStore,t);return e.docs[n]}function ye(e,t){let n=t.length,r=Array.from({length:n});for(let i=0;i<n;i++){let n=I(e.sharedInternalDocumentStore,t[i]);r[i]=e.docs[n]}return r}function be(e){return e.docs}function xe(e,t,n,r){return e.docs[n]===void 0?(e.docs[n]=r,e.count++,!0):!1}function Se(e,t){let n=I(e.sharedInternalDocumentStore,t);return e.docs[n]===void 0?!1:(delete e.docs[n],e.count--,!0)}function Ce(e){return e.count}function we(e,t){let n=t;return{docs:n.docs,count:n.count,sharedInternalDocumentStore:e}}function Te(e){return{docs:e.docs,count:e.count}}function Ee(){return{create:_e,get:ve,getMultiple:ye,getAll:be,store:xe,remove:Se,count:Ce,load:we,save:Te}}var De=[`beforeInsert`,`afterInsert`,`beforeRemove`,`afterRemove`,`beforeUpdate`,`afterUpdate`,`beforeUpsert`,`afterUpsert`,`beforeSearch`,`afterSearch`,`beforeInsertMultiple`,`afterInsertMultiple`,`beforeRemoveMultiple`,`afterRemoveMultiple`,`beforeUpdateMultiple`,`afterUpdateMultiple`,`beforeUpsertMultiple`,`afterUpsertMultiple`,`beforeLoad`,`afterLoad`,`afterCreate`];function Oe(e,t){let n=[],r=e.plugins?.length;if(!r)return n;for(let i=0;i<r;i++)try{let r=e.plugins[i];typeof r[t]==`function`&&n.push(r[t])}catch(e){throw console.error(`Caught error in getAllPluginsByHook:`,e),j(`PLUGIN_CRASHED`)}return n}var ke=[`tokenizer`,`index`,`documentsStore`,`sorter`,`pinning`],Ae=[`validateSchema`,`getDocumentIndexId`,`getDocumentProperties`,`formatElapsedTime`];function R(e,t,n,r){if(e.some(O))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function z(e,t,n){if(e.some(O))return(async()=>{for(let r of e)await r(t,n)})();for(let r of e)r(t,n)}function B(e,t,n,r,i){if(e.some(O))return(async()=>{for(let a of e)await a(t,n,r,i)})();for(let a of e)a(t,n,r,i)}function V(e,t,n,r){if(e.some(O))return(async()=>{for(let i of e)await i(t,n,r)})();for(let i of e)i(t,n,r)}function je(e,t){if(e.some(O))return(async()=>{for(let n of e)await n(t)})();for(let n of e)n(t)}var H=class e{k;v;l=null;r=null;h=1;constructor(e,t){this.k=e,this.v=new Set(t)}updateHeight(){this.h=Math.max(e.getHeight(this.l),e.getHeight(this.r))+1}static getHeight(e){return e?e.h:0}getBalanceFactor(){return e.getHeight(this.l)-e.getHeight(this.r)}rotateLeft(){let e=this.r;return this.r=e.l,e.l=this,this.updateHeight(),e.updateHeight(),e}rotateRight(){let e=this.l;return this.l=e.r,e.r=this,this.updateHeight(),e.updateHeight(),e}toJSON(){return{k:this.k,v:Array.from(this.v),l:this.l?this.l.toJSON():null,r:this.r?this.r.toJSON():null,h:this.h}}static fromJSON(t){let n=new e(t.k,t.v);return n.l=t.l?e.fromJSON(t.l):null,n.r=t.r?e.fromJSON(t.r):null,n.h=t.h,n}},Me=class e{root=null;insertCount=0;constructor(e,t){e!==void 0&&t!==void 0&&(this.root=new H(e,t))}insert(e,t,n=1e3){this.root=this.insertNode(this.root,e,t,n)}insertMultiple(e,t,n=1e3){for(let r of t)this.insert(e,r,n)}rebalance(){this.root&&=this.rebalanceNode(this.root)}toJSON(){return{root:this.root?this.root.toJSON():null,insertCount:this.insertCount}}static fromJSON(t){let n=new e;return n.root=t.root?H.fromJSON(t.root):null,n.insertCount=t.insertCount||0,n}insertNode(e,t,n,r){if(e===null)return new H(t,[n]);let i=[],a=e,o=null;for(;a!==null;)if(i.push({parent:o,node:a}),t<a.k)if(a.l===null){a.l=new H(t,[n]),i.push({parent:a,node:a.l});break}else o=a,a=a.l;else if(t>a.k)if(a.r===null){a.r=new H(t,[n]),i.push({parent:a,node:a.r});break}else o=a,a=a.r;else return a.v.add(n),e;let s=!1;this.insertCount++%r===0&&(s=!0);for(let t=i.length-1;t>=0;t--){let{parent:n,node:r}=i[t];if(r.updateHeight(),s){let t=this.rebalanceNode(r);n?n.l===r?n.l=t:n.r===r&&(n.r=t):e=t}}return e}rebalanceNode(e){let t=e.getBalanceFactor();if(t>1){if(e.l&&e.l.getBalanceFactor()>=0)return e.rotateRight();if(e.l)return e.l=e.l.rotateLeft(),e.rotateRight()}if(t<-1){if(e.r&&e.r.getBalanceFactor()<=0)return e.rotateLeft();if(e.r)return e.r=e.r.rotateRight(),e.rotateLeft()}return e}find(e){let t=this.findNodeByKey(e);return t?t.v:null}contains(e){return this.find(e)!==null}getSize(){let e=0,t=[],n=this.root;for(;n||t.length>0;){for(;n;)t.push(n),n=n.l;n=t.pop(),e++,n=n.r}return e}isBalanced(){if(!this.root)return!0;let e=[this.root];for(;e.length>0;){let t=e.pop(),n=t.getBalanceFactor();if(Math.abs(n)>1)return!1;t.l&&e.push(t.l),t.r&&e.push(t.r)}return!0}remove(e){this.root=this.removeNode(this.root,e)}removeDocument(e,t){let n=this.findNodeByKey(e);n&&(n.v.size===1?this.root=this.removeNode(this.root,e):n.v=new Set([...n.v.values()].filter(e=>e!==t)))}findNodeByKey(e){let t=this.root;for(;t;)if(e<t.k)t=t.l;else if(e>t.k)t=t.r;else return t;return null}removeNode(e,t){if(e===null)return null;let n=[],r=e;for(;r!==null&&r.k!==t;)n.push(r),r=t<r.k?r.l:r.r;if(r===null)return e;if(r.l===null||r.r===null){let t=r.l?r.l:r.r;if(n.length===0)e=t;else{let e=n[n.length-1];e.l===r?e.l=t:e.r=t}}else{let e=r,t=r.r;for(;t.l!==null;)e=t,t=t.l;r.k=t.k,r.v=t.v,e.l===t?e.l=t.r:e.r=t.r,r=e}n.push(r);for(let t=n.length-1;t>=0;t--){let r=n[t];r.updateHeight();let i=this.rebalanceNode(r);if(t>0){let e=n[t-1];e.l===r?e.l=i:e.r===r&&(e.r=i)}else e=i}return e}rangeSearch(e,t){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),i.k>=e&&i.k<=t)for(let e of i.v)n.add(e);if(i.k>t)break;i=i.r}return n}greaterThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.r;if(i=r.pop(),t&&i.k>=e||!t&&i.k>e)for(let e of i.v)n.add(e);else if(i.k<=e)break;i=i.l}return n}lessThan(e,t=!1){let n=new Set,r=[],i=this.root;for(;i||r.length>0;){for(;i;)r.push(i),i=i.l;if(i=r.pop(),t&&i.k<=e||!t&&i.k<e)for(let e of i.v)n.add(e);else if(i.k>e)break;i=i.r}return n}},Ne=class e{numberToDocumentId;constructor(){this.numberToDocumentId=new Map}insert(e,t){this.numberToDocumentId.has(e)?this.numberToDocumentId.get(e).add(t):this.numberToDocumentId.set(e,new Set([t]))}find(e){let t=this.numberToDocumentId.get(e);return t?Array.from(t):null}remove(e){this.numberToDocumentId.delete(e)}removeDocument(e,t){let n=this.numberToDocumentId.get(t);n&&(n.delete(e),n.size===0&&this.numberToDocumentId.delete(t))}contains(e){return this.numberToDocumentId.has(e)}getSize(){let e=0;for(let t of this.numberToDocumentId.values())e+=t.size;return e}filter(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`eq`:{let t=e[n],r=this.numberToDocumentId.get(t);return r?Array.from(r):[]}case`in`:{let t=e[n],r=new Set;for(let e of t){let t=this.numberToDocumentId.get(e);if(t)for(let e of t)r.add(e)}return Array.from(r)}case`nin`:{let t=new Set(e[n]),r=new Set;for(let[e,n]of this.numberToDocumentId.entries())if(!t.has(e))for(let e of n)r.add(e);return Array.from(r)}default:throw Error(`Invalid operation`)}}filterArr(e){let t=Object.keys(e);if(t.length!==1)throw Error(`Invalid operation`);let n=t[0];switch(n){case`containsAll`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e].filter(e=>t.has(e))));return Array.from(r)}case`containsAny`:{let t=e[n].map(e=>this.numberToDocumentId.get(e)??new Set);if(t.length===0)return[];let r=t.reduce((e,t)=>new Set([...e,...t]));return Array.from(r)}default:throw Error(`Invalid operation`)}}static fromJSON(t){if(!t.numberToDocumentId)throw Error(`Invalid Flat Tree JSON`);let n=new e;for(let[e,r]of t.numberToDocumentId)n.numberToDocumentId.set(e,new Set(r));return n}toJSON(){return{numberToDocumentId:Array.from(this.numberToDocumentId.entries()).map(([e,t])=>[e,Array.from(t)])}}};function Pe(e,t,n){if(n<0)return-1;if(e===t)return 0;let r=e.length,i=t.length;if(r===0)return i<=n?i:-1;if(i===0)return r<=n?r:-1;let a=Math.abs(r-i);if(e.startsWith(t))return a<=n?a:-1;if(t.startsWith(e))return 0;if(a>n)return-1;let o=[];for(let e=0;e<=r;e++){o[e]=[e];for(let t=1;t<=i;t++)o[e][t]=e===0?t:0}for(let a=1;a<=r;a++){let r=1/0;for(let n=1;n<=i;n++)e[a-1]===t[n-1]?o[a][n]=o[a-1][n-1]:o[a][n]=Math.min(o[a-1][n]+1,o[a][n-1]+1,o[a-1][n-1]+1),r=Math.min(r,o[a][n]);if(r>n)return-1}return o[r][i]<=n?o[r][i]:-1}function Fe(e,t,n){let r=Pe(e,t,n);return{distance:r,isBounded:r>=0}}function Ie(e,t,n){let r=Pe(e,t,n);return{distance:r,isBounded:r>=0}}var Le=class e{k;s;c=new Map;d=new Set;e;w=``;constructor(e,t,n){this.k=e,this.s=t,this.e=n}updateParent(e){this.w=e.w+this.s}addDocument(e){this.d.add(e)}removeDocument(e){return this.d.delete(e)}findAllWords(e,t,n,r){let i=[this];for(;i.length>0;){let a=i.pop();if(a.e){let{w:i,d:o}=a;if(n&&i!==t)continue;if(x(e,i)!==null)if(r)if(Math.abs(t.length-i.length)<=r&&Ie(t,i,r).isBounded)e[i]=[];else continue;else e[i]=[];if(x(e,i)!=null&&o.size>0){let t=e[i];for(let e of o)t.includes(e)||t.push(e)}}a.c.size>0&&i.push(...a.c.values())}return e}insert(t,n){let r=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=r.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c){if(r=s,i+=l,i===a){s.e||=!0,s.addDocument(n);return}continue}let u=o.slice(0,l),d=o.slice(l),f=t.slice(i+l),p=new e(u[0],u,!1);if(r.c.set(u[0],p),p.updateParent(r),s.s=d,s.k=d[0],p.c.set(d[0],s),s.updateParent(p),f){let t=new e(f[0],f,!0);t.addDocument(n),p.c.set(f[0],t),t.updateParent(p)}else p.e=!0,p.addDocument(n);return}else{let a=new e(o,t.slice(i),!0);a.addDocument(n),r.c.set(o,a),a.updateParent(r);return}}r.e||=!0,r.addDocument(n)}_findLevenshtein(e,t,n,r,i){let a=[{node:this,index:t,tolerance:n}];for(;a.length>0;){let{node:t,index:n,tolerance:o}=a.pop();if(t.w.startsWith(e)){t.findAllWords(i,e,!1,0);continue}if(o<0)continue;if(t.e){let{w:n,d:a}=t;if(n&&(Ie(e,n,r).isBounded&&(i[n]=[]),x(i,n)!==void 0&&a.size>0)){let e=new Set(i[n]);for(let t of a)e.add(t);i[n]=Array.from(e)}}if(n>=e.length)continue;let s=e[n];if(t.c.has(s)){let e=t.c.get(s);a.push({node:e,index:n+1,tolerance:o})}a.push({node:t,index:n+1,tolerance:o-1});for(let[e,r]of t.c)a.push({node:r,index:n,tolerance:o-1}),e!==s&&a.push({node:r,index:n+1,tolerance:o-1})}}find(e){let{term:t,exact:n,tolerance:r}=e;if(r&&!n){let e={};return this._findLevenshtein(t,0,r,r,e),e}else{let e=this,i=0,a=t.length;for(;i<a;){let o=t[i],s=e.c.get(o);if(s){let o=s.s,c=o.length,l=0;for(;l<c&&i+l<a&&o[l]===t[i+l];)l++;if(l===c)e=s,i+=l;else if(i+l===a)if(l===a-i){if(n)return{};{let e={};return s.findAllWords(e,t,n,r),e}}else return{};else return{}}else return{}}let o={};return e.findAllWords(o,t,n,r),o}}contains(e){let t=this,n=0,r=e.length;for(;n<r;){let i=e[n],a=t.c.get(i);if(a){let i=a.s,o=i.length,s=0;for(;s<o&&n+s<r&&i[s]===e[n+s];)s++;if(s<o)return!1;n+=o,t=a}else return!1}return!0}removeWord(e){if(!e)return!1;let t=this,n=e.length,r=[];for(let i=0;i<n;i++){let n=e[i];if(t.c.has(n)){let e=t.c.get(n);r.push({parent:t,character:n}),i+=e.s.length-1,t=e}else return!1}for(t.d.clear(),t.e=!1;r.length>0&&t.c.size===0&&!t.e&&t.d.size===0;){let{parent:e,character:n}=r.pop();e.c.delete(n),t=e}return!0}removeDocumentByWord(e,t,n=!0){if(!e)return!0;let r=this,i=e.length;for(let a=0;a<i;a++){let i=e[a];if(r.c.has(i)){let o=r.c.get(i);a+=o.s.length-1,r=o,n&&r.w!==e||r.removeDocument(t)}else return!1}return!0}static getCommonPrefix(e,t){let n=Math.min(e.length,t.length),r=0;for(;r<n&&e.charCodeAt(r)===t.charCodeAt(r);)r++;return e.slice(0,r)}toJSON(){return{w:this.w,s:this.s,e:this.e,k:this.k,d:Array.from(this.d),c:Array.from(this.c?.entries())?.map(([e,t])=>[e,t.toJSON()])}}static fromJSON(t){let n=new e(t.k,t.s,t.e);return n.w=t.w,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([t,n])=>[t,e.fromJSON(n)])||[]),n}},Re=class e extends Le{constructor(){super(``,``,!1)}static fromJSON(t){let n=new e;return n.w=t.w,n.s=t.s,n.e=t.e,n.k=t.k,n.d=new Set(t.d),n.c=new Map(t?.c?.map(([e,t])=>[e,Le.fromJSON(t)])||[]),n}toJSON(){return super.toJSON()}},ze=2,Be=6371e3,Ve=class e{point;docIDs;left;right;parent;constructor(e,t){this.point=e,this.docIDs=new Set(t),this.left=null,this.right=null,this.parent=null}toJSON(){return{point:this.point,docIDs:Array.from(this.docIDs),left:this.left?this.left.toJSON():null,right:this.right?this.right.toJSON():null}}static fromJSON(t,n=null){let r=new e(t.point,t.docIDs);return r.parent=n,t.left&&(r.left=e.fromJSON(t.left,r)),t.right&&(r.right=e.fromJSON(t.right,r)),r}},U=class e{root;nodeMap;constructor(){this.root=null,this.nodeMap=new Map}getPointKey(e){return`${e.lon},${e.lat}`}insert(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);if(r){t.forEach(e=>r.docIDs.add(e));return}let i=new Ve(e,t);if(this.nodeMap.set(n,i),this.root==null){this.root=i;return}let a=this.root,o=0;for(;;){if(o%ze===0)if(e.lon<a.point.lon){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}else if(e.lat<a.point.lat){if(a.left==null){a.left=i,i.parent=a;return}a=a.left}else{if(a.right==null){a.right=i,i.parent=a;return}a=a.right}o++}}contains(e){let t=this.getPointKey(e);return this.nodeMap.has(t)}getDocIDsByCoordinates(e){let t=this.getPointKey(e),n=this.nodeMap.get(t);return n?Array.from(n.docIDs):null}removeDocByID(e,t){let n=this.getPointKey(e),r=this.nodeMap.get(n);r&&(r.docIDs.delete(t),r.docIDs.size===0&&(this.nodeMap.delete(n),this.deleteNode(r)))}deleteNode(e){let t=e.parent,n=e.left?e.left:e.right;n&&(n.parent=t),t?t.left===e?t.left=n:t.right===e&&(t.right=n):(this.root=n,this.root&&(this.root.parent=null))}searchByRadius(t,n,r=!0,i=`asc`,a=!1){let o=a?e.vincentyDistance:e.haversineDistance,s=[{node:this.root,depth:0}],c=[];for(;s.length>0;){let{node:e,depth:i}=s.pop();if(e==null)continue;let a=o(t,e.point);(r?a<=n:a>n)&&c.push({point:e.point,docIDs:Array.from(e.docIDs)}),e.left!=null&&s.push({node:e.left,depth:i+1}),e.right!=null&&s.push({node:e.right,depth:i+1})}return i&&c.sort((e,n)=>{let r=o(t,e.point),a=o(t,n.point);return i.toLowerCase()===`asc`?r-a:a-r}),c}searchByPolygon(t,n=!0,r=null,i=!1){let a=[{node:this.root,depth:0}],o=[];for(;a.length>0;){let{node:r,depth:i}=a.pop();if(r==null)continue;r.left!=null&&a.push({node:r.left,depth:i+1}),r.right!=null&&a.push({node:r.right,depth:i+1});let s=e.isPointInPolygon(t,r.point);(s&&n||!s&&!n)&&o.push({point:r.point,docIDs:Array.from(r.docIDs)})}let s=e.calculatePolygonCentroid(t);if(r){let t=i?e.vincentyDistance:e.haversineDistance;o.sort((e,n)=>{let i=t(s,e.point),a=t(s,n.point);return r.toLowerCase()===`asc`?i-a:a-i})}return o}toJSON(){return{root:this.root?this.root.toJSON():null}}static fromJSON(t){let n=new e;return t.root&&(n.root=Ve.fromJSON(t.root),n.buildNodeMap(n.root)),n}buildNodeMap(e){if(e==null)return;let t=this.getPointKey(e.point);this.nodeMap.set(t,e),e.left&&this.buildNodeMap(e.left),e.right&&this.buildNodeMap(e.right)}static calculatePolygonCentroid(e){let t=0,n=0,r=0,i=e.length;for(let a=0,o=i-1;a<i;o=a++){let i=e[a].lon,s=e[a].lat,c=e[o].lon,l=e[o].lat,u=i*l-c*s;t+=u,n+=(i+c)*u,r+=(s+l)*u}t/=2;let a=6*t;return n/=a,r/=a,{lon:n,lat:r}}static isPointInPolygon(e,t){let n=!1,r=t.lon,i=t.lat,a=e.length;for(let t=0,o=a-1;t<a;o=t++){let a=e[t].lon,s=e[t].lat,c=e[o].lon,l=e[o].lat;s>i!=l>i&&r<(c-a)*(i-s)/(l-s)+a&&(n=!n)}return n}static haversineDistance(e,t){let n=Math.PI/180,r=e.lat*n,i=t.lat*n,a=(t.lat-e.lat)*n,o=(t.lon-e.lon)*n,s=Math.sin(a/2)*Math.sin(a/2)+Math.cos(r)*Math.cos(i)*Math.sin(o/2)*Math.sin(o/2);return Be*(2*Math.atan2(Math.sqrt(s),Math.sqrt(1-s)))}static vincentyDistance(e,t){let n=6378137,r=1/298.257223563,i=(1-r)*n,a=Math.PI/180,o=e.lat*a,s=t.lat*a,c=(t.lon-e.lon)*a,l=Math.atan((1-r)*Math.tan(o)),u=Math.atan((1-r)*Math.tan(s)),d=Math.sin(l),f=Math.cos(l),p=Math.sin(u),m=Math.cos(u),h=c,g,_=1e3,v,y,b,x,S,C;do{let e=Math.sin(h),t=Math.cos(h);if(v=Math.sqrt(m*e*(m*e)+(f*p-d*m*t)*(f*p-d*m*t)),v===0)return 0;y=d*p+f*m*t,b=Math.atan2(v,y),x=f*m*e/v,S=1-x*x,C=y-2*d*p/S,isNaN(C)&&(C=0);let n=r/16*S*(4+r*(4-3*S));g=h,h=c+(1-n)*r*x*(b+n*v*(C+n*y*(-1+2*C*C)))}while(Math.abs(h-g)>1e-12&&--_>0);if(_===0)return NaN;let w=S*(n*n-i*i)/(i*i),T=1+w/16384*(4096+w*(-768+w*(320-175*w))),E=w/1024*(256+w*(-128+w*(74-47*w))),D=E*v*(C+E/4*(y*(-1+2*C*C)-E/6*C*(-3+4*v*v)*(-3+4*C*C)));return i*T*(b-D)}},He=class e{true;false;constructor(){this.true=new Set,this.false=new Set}insert(e,t){t?this.true.add(e):this.false.add(e)}delete(e,t){t?this.true.delete(e):this.false.delete(e)}getSize(){return this.true.size+this.false.size}toJSON(){return{true:Array.from(this.true),false:Array.from(this.false)}}static fromJSON(t){let n=new e;return n.true=new Set(t.true),n.false=new Set(t.false),n}};function Ue(e,t,n,r,i,{k:a,b:o,d:s}){return Math.log(1+(n-t+.5)/(t+.5))*(s+e*(a+1))/(e+a*(1-o+o*r/i))}var We=class e{size;vectors=new Map;constructor(e){this.size=e}add(e,t){t instanceof Float32Array||(t=new Float32Array(t));let n=Ge(t,this.size);this.vectors.set(e,[n,t])}remove(e){this.vectors.delete(e)}find(e,t,n){return e instanceof Float32Array||(e=new Float32Array(e)),Ke(e,n,this.vectors,this.size,t)}toJSON(){let e=[];for(let[t,[n,r]]of this.vectors)e.push([t,[n,Array.from(r)]]);return{size:this.size,vectors:e}}static fromJSON(t){let n=t,r=new e(n.size);for(let[e,[t,i]]of n.vectors)r.vectors.set(e,[t,new Float32Array(i)]);return r}};function Ge(e,t){let n=0;for(let r=0;r<t;r++)n+=e[r]*e[r];return Math.sqrt(n)}function Ke(e,t,n,r,i){let a=Ge(e,r),o=[],s=t||n.keys();for(let t of s){let s=n.get(t);if(!s)continue;let c=s[0],l=s[1],u=0;for(let t=0;t<r;t++)u+=e[t]*l[t];let d=u/(a*c);d>=i&&o.push([t,d])}return o}var qe=e({calculateResultScores:()=>G,create:()=>W,createIndex:()=>ct,getSearchableProperties:()=>it,getSearchablePropertiesWithTypes:()=>at,insert:()=>$e,insertDocumentScoreParameters:()=>Je,insertTokenScoreParameters:()=>Ye,insertVector:()=>et,load:()=>ot,remove:()=>nt,removeDocumentScoreParameters:()=>Xe,removeTokenScoreParameters:()=>Ze,save:()=>st,search:()=>rt,searchByGeoWhereClause:()=>ft,searchByWhereClause:()=>K});function Je(e,t,n,r,i){let a=I(e.sharedInternalDocumentStore,n);e.avgFieldLength[t]=((e.avgFieldLength[t]??0)*(i-1)+r.length)/i,e.fieldLengths[t][a]=r.length,e.frequencies[t][a]={}}function Ye(e,t,n,r,i){let a=0;for(let e of r)e===i&&a++;let o=I(e.sharedInternalDocumentStore,n),s=a/r.length;e.frequencies[t][o][i]=s,i in e.tokenOccurrences[t]||(e.tokenOccurrences[t][i]=0),e.tokenOccurrences[t][i]=(e.tokenOccurrences[t][i]??0)+1}function Xe(e,t,n,r){let i=I(e.sharedInternalDocumentStore,n);r>1?e.avgFieldLength[t]=(e.avgFieldLength[t]*r-e.fieldLengths[t][i])/(r-1):e.avgFieldLength[t]=void 0,e.fieldLengths[t][i]=void 0,e.frequencies[t][i]=void 0}function Ze(e,t,n){e.tokenOccurrences[t][n]--}function W(e,t,n,r,i=``){r||={sharedInternalDocumentStore:t,indexes:{},vectorIndexes:{},searchableProperties:[],searchablePropertiesWithTypes:{},frequencies:{},tokenOccurrences:{},avgFieldLength:{},fieldLengths:{}};for(let[a,o]of Object.entries(n)){let n=`${i}${i?`.`:``}${a}`;if(typeof o==`object`&&!Array.isArray(o)){W(e,t,o,r,n);continue}if(N(o))r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o,r.vectorIndexes[n]={type:`Vector`,node:new We(F(o)),isArray:!1};else{let e=/\[/.test(o);switch(o){case`boolean`:case`boolean[]`:r.indexes[n]={type:`Bool`,node:new He,isArray:e};break;case`number`:case`number[]`:r.indexes[n]={type:`AVL`,node:new Me(0,[]),isArray:e};break;case`string`:case`string[]`:r.indexes[n]={type:`Radix`,node:new Re,isArray:e},r.avgFieldLength[n]=0,r.frequencies[n]={},r.tokenOccurrences[n]={},r.fieldLengths[n]={};break;case`enum`:case`enum[]`:r.indexes[n]={type:`Flat`,node:new Ne,isArray:e};break;case`geopoint`:r.indexes[n]={type:`BKD`,node:new U,isArray:e};break;default:throw j(`INVALID_SCHEMA_TYPE`,Array.isArray(o)?`array`:o,n)}r.searchableProperties.push(n),r.searchablePropertiesWithTypes[n]=o}}return r}function Qe(e,t,n,r,i,a,o,s){return c=>{let{type:l,node:u}=t.indexes[n];switch(l){case`Bool`:u[c?`true`:`false`].add(r);break;case`AVL`:{let e=s?.avlRebalanceThreshold??1;u.insert(c,r,e);break}case`Radix`:{let s=a.tokenize(c,i,n,!1);e.insertDocumentScoreParameters(t,n,r,s,o);for(let i of s)e.insertTokenScoreParameters(t,n,r,s,i),u.insert(i,r);break}case`Flat`:u.insert(c,r);break;case`BKD`:u.insert(c,[r]);break}}}function $e(e,t,n,r,i,a,o,s,c,l,u){if(N(o))return et(t,n,a,r,i);let d=Qe(e,t,n,i,s,c,l,u);if(!P(o))return d(a);let f=a,p=f.length;for(let e=0;e<p;e++)d(f[e])}function et(e,t,n,r,i){e.vectorIndexes[t].node.add(i,n)}function tt(e,t,n,r,i,a,o,s,c,l){if(N(o))return t.vectorIndexes[n].node.remove(i),!0;let{type:u,node:d}=t.indexes[n];switch(u){case`AVL`:return d.removeDocument(a,i),!0;case`Bool`:return d[a?`true`:`false`].delete(i),!0;case`Radix`:{let o=c.tokenize(a,s,n);e.removeDocumentScoreParameters(t,n,r,l);for(let r of o)e.removeTokenScoreParameters(t,n,r),d.removeDocumentByWord(r,i);return!0}case`Flat`:return d.removeDocument(i,a),!0;case`BKD`:return d.removeDocByID(a,i),!1}}function nt(e,t,n,r,i,a,o,s,c,l){if(!P(o))return tt(e,t,n,r,i,a,o,s,c,l);let u=de(o),d=a,f=d.length;for(let a=0;a<f;a++)tt(e,t,n,r,i,d[a],u,s,c,l);return!0}function G(e,t,n,r,i,a,o,s,c,l){let u=Array.from(r),d=e.avgFieldLength[t],f=e.fieldLengths[t],p=e.tokenOccurrences[t],m=e.frequencies[t],h=typeof p[n]==`number`?p[n]??0:0,g=u.length;for(let e=0;e<g;e++){let r=u[e];if(c&&!c.has(r))continue;l.has(r)||l.set(r,new Map);let p=l.get(r);p.set(t,(p.get(t)||0)+1);let g=Ue(m?.[r]?.[n]??0,h,i,f[r],d,a);o.has(r)?o.set(r,o.get(r)+g*s):o.set(r,g*s)}}function rt(e,t,n,r,i,a,o,s,c,l,u,d=0){let f=n.tokenize(t,r),p=f.length||1,m=new Map,h=new Map,g=new Map;for(let n of i){if(!(n in e.indexes))continue;let r=e.indexes[n],{type:i}=r;if(i!==`Radix`)throw j(`WRONG_SEARCH_PROPERTY_TYPE`,n);let d=s[n]??1;if(d<=0)throw j(`INVALID_BOOST_VALUE`,d);f.length===0&&!t&&f.push(``);let p=f.length;for(let t=0;t<p;t++){let i=f[t],s=r.node.find({term:i,exact:a,tolerance:o}),p=Object.keys(s);p.length>0&&h.set(i,!0);let _=p.length;for(let t=0;t<_;t++){let r=p[t],i=s[r];G(e,n,r,i,l,c,g,d,u,m)}}}let _=Array.from(g.entries()).map(([e,t])=>[e,t]).sort((e,t)=>t[1]-e[1]);if(_.length===0)return[];if(d===1)return _;if(d===0){if(p===1)return _;for(let e of f)if(!h.get(e))return[];return _.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1})}let v=_.filter(([e])=>{let t=m.get(e);return t?Array.from(t.values()).some(e=>e===p):!1});if(v.length>0){let e=_.filter(([e])=>!v.some(([t])=>t===e)),t=Math.ceil(e.length*d);return[...v,...e.slice(0,t)]}return _}function K(e,t,n,r){if(`and`in n&&n.and&&Array.isArray(n.and)){let i=n.and;return i.length===0?new Set:k(...i.map(n=>K(e,t,n,r)))}if(`or`in n&&n.or&&Array.isArray(n.or)){let i=n.or;return i.length===0?new Set:i.map(n=>K(e,t,n,r)).reduce((e,t)=>A(e,t),new Set)}if(`not`in n&&n.not){let i=n.not,a=new Set,o=e.sharedInternalDocumentStore;for(let e=1;e<=o.internalIdToId.length;e++)a.add(e);return re(a,K(e,t,i,r))}let i=Object.keys(n),a=i.reduce((e,t)=>({[t]:new Set,...e}),{});for(let o of i){let i=n[o];if(e.indexes[o]===void 0)throw j(`UNKNOWN_FILTER_PROPERTY`,o);let{node:s,type:c,isArray:l}=e.indexes[o];if(c===`Bool`){let e=s,t=i?e.true:e.false;a[o]=A(a[o],t);continue}if(c===`BKD`){let e;if(`radius`in i)e=`radius`;else if(`polygon`in i)e=`polygon`;else throw Error(`Invalid operation ${i}`);if(e===`radius`){let{value:t,coordinates:n,unit:r=`m`,inside:c=!0,highPrecision:l=!1}=i[e],u=D(t,r),d=s.searchByRadius(n,u,c,void 0,l);a[o]=lt(a[o],d)}else{let{coordinates:t,inside:n=!0,highPrecision:r=!1}=i[e],c=s.searchByPolygon(t,n,void 0,r);a[o]=lt(a[o],c)}continue}if(c===`Radix`&&(typeof i==`string`||Array.isArray(i))){for(let e of[i].flat()){let n=t.tokenize(e,r,o);for(let e of n){let t=s.find({term:e,exact:!0});a[o]=pt(a[o],t)}}continue}let u=Object.keys(i);if(u.length>1)throw j(`INVALID_FILTER_OPERATION`,u.length);if(c===`Flat`){let e=new Set(l?s.filterArr(i):s.filter(i));a[o]=A(a[o],e);continue}if(c===`AVL`){let e=u[0],t=i[e],n;switch(e){case`gt`:n=s.greaterThan(t,!1);break;case`gte`:n=s.greaterThan(t,!0);break;case`lt`:n=s.lessThan(t,!1);break;case`lte`:n=s.lessThan(t,!0);break;case`eq`:n=s.find(t)??new Set;break;case`between`:{let[e,r]=t;n=s.rangeSearch(e,r);break}default:throw j(`INVALID_FILTER_OPERATION`,e)}a[o]=A(a[o],n)}}return k(...Object.values(a))}function it(e){return e.searchableProperties}function at(e){return e.searchablePropertiesWithTypes}function ot(e,t){let{indexes:n,vectorIndexes:r,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}=t,u={},d={};for(let e of Object.keys(n)){let{node:t,type:r,isArray:i}=n[e];switch(r){case`Radix`:u[e]={type:`Radix`,node:Re.fromJSON(t),isArray:i};break;case`Flat`:u[e]={type:`Flat`,node:Ne.fromJSON(t),isArray:i};break;case`AVL`:u[e]={type:`AVL`,node:Me.fromJSON(t),isArray:i};break;case`BKD`:u[e]={type:`BKD`,node:U.fromJSON(t),isArray:i};break;case`Bool`:u[e]={type:`Bool`,node:He.fromJSON(t),isArray:i};break;default:u[e]=n[e]}}for(let e of Object.keys(r))d[e]={type:`Vector`,isArray:!1,node:We.fromJSON(r[e])};return{sharedInternalDocumentStore:e,indexes:u,vectorIndexes:d,searchableProperties:i,searchablePropertiesWithTypes:a,frequencies:o,tokenOccurrences:s,avgFieldLength:c,fieldLengths:l}}function st(e){let{indexes:t,vectorIndexes:n,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}=e,l={};for(let e of Object.keys(n))l[e]=n[e].node.toJSON();let u={};for(let e of Object.keys(t)){let{type:n,node:r,isArray:i}=t[e];n===`Flat`||n===`Radix`||n===`AVL`||n===`BKD`||n===`Bool`?u[e]={type:n,node:r.toJSON(),isArray:i}:(u[e]=t[e],u[e].node=u[e].node.toJSON())}return{indexes:u,vectorIndexes:l,searchableProperties:r,searchablePropertiesWithTypes:i,frequencies:a,tokenOccurrences:o,avgFieldLength:s,fieldLengths:c}}function ct(){return{create:W,insert:$e,remove:nt,insertDocumentScoreParameters:Je,insertTokenScoreParameters:Ye,removeDocumentScoreParameters:Xe,removeTokenScoreParameters:Ze,calculateResultScores:G,search:rt,searchByWhereClause:K,getSearchableProperties:it,getSearchablePropertiesWithTypes:at,load:ot,save:st}}function lt(e,t){e||=new Set;let n=t.length;for(let r=0;r<n;r++){let n=t[r].docIDs,i=n.length;for(let t=0;t<i;t++)e.add(n[t])}return e}function ut(e,t,n=!1){let r=n?U.vincentyDistance:U.haversineDistance,i=[],a=[];for(let{point:n}of e)a.push(r(t,n));let o=Math.max(...a),s=0;for(let{docIDs:t}of e){let e=o-a[s]+1;for(let n of t)i.push([n,e]);s++}return i.sort((e,t)=>t[1]-e[1]),i}function dt(e,t){let n=Object.keys(e);if(n.length!==1)return{isGeoOnly:!1};let r=n[0],i=e[r];if(t.indexes[r]===void 0)return{isGeoOnly:!1};let{type:a}=t.indexes[r];return a===`BKD`&&i&&(`radius`in i||`polygon`in i)?{isGeoOnly:!0,geoProperty:r,geoOperation:i}:{isGeoOnly:!1}}function ft(e,t){let n=e,r=dt(t,n);if(!r.isGeoOnly||!r.geoProperty||!r.geoOperation)return null;let{node:i}=n.indexes[r.geoProperty],a=r.geoOperation,o=i,s;if(`radius`in a){let{value:e,coordinates:t,unit:n=`m`,inside:r=!0,highPrecision:i=!1}=a.radius,c=t,l=D(e,n);return s=o.searchByRadius(c,l,r,`asc`,i),ut(s,c,i)}else if(`polygon`in a){let{coordinates:e,inside:t=!0,highPrecision:n=!1}=a.polygon;s=o.searchByPolygon(e,t,`asc`,n);let r=U.calculatePolygonCentroid(e);return ut(s,r,n)}return null}function pt(e,t){e||=new Set;let n=Object.keys(t),r=n.length;for(let i=0;i<r;i++){let r=t[n[i]],a=r.length;for(let t=0;t<a;t++)e.add(r[t])}return e}var mt=e({createSorter:()=>At,load:()=>Ot,save:()=>kt});function ht(e,t,n,r,i){let a={language:e.tokenizer.language,sharedInternalDocumentStore:t,enabled:!0,isSorted:!0,sortableProperties:[],sortablePropertiesWithTypes:{},sorts:{}};for(let[o,s]of Object.entries(n)){let n=`${i}${i?`.`:``}${o}`;if(!r.includes(n)){if(typeof s==`object`&&!Array.isArray(s)){let i=ht(e,t,s,r,n);f(a.sortableProperties,i.sortableProperties),a.sorts={...a.sorts,...i.sorts},a.sortablePropertiesWithTypes={...a.sortablePropertiesWithTypes,...i.sortablePropertiesWithTypes};continue}if(!N(s))switch(s){case`boolean`:case`number`:case`string`:a.sortableProperties.push(n),a.sortablePropertiesWithTypes[n]=s,a.sorts[n]={docs:new Map,orderedDocsToRemove:new Map,orderedDocs:[],type:s};break;case`geopoint`:case`enum`:continue;case`enum[]`:case`boolean[]`:case`number[]`:case`string[]`:continue;default:throw j(`INVALID_SORT_SCHEMA_TYPE`,Array.isArray(s)?`array`:s,n)}}}return a}function gt(e,t,n,r){return r?.enabled===!1?{disabled:!0}:ht(e,t,n,(r||{}).unsortableProperties||[],``)}function _t(e,t,n,r){if(!e.enabled)return;e.isSorted=!1;let i=I(e.sharedInternalDocumentStore,n),a=e.sorts[t];a.orderedDocsToRemove.has(i)&&q(e,t),a.docs.set(i,a.orderedDocs.length),a.orderedDocs.push([i,r])}function vt(e){if(e.isSorted||!e.enabled)return;let t=Object.keys(e.sorts);for(let n of t)St(e,n);e.isSorted=!0}function yt(e,t,n){return t[1].localeCompare(n[1],i(e))}function bt(e,t){return e[1]-t[1]}function xt(e,t){return t[1]?-1:1}function St(e,t){let n=e.sorts[t],r;switch(n.type){case`string`:r=yt.bind(null,e.language);break;case`number`:r=bt.bind(null);break;case`boolean`:r=xt.bind(null);break}n.orderedDocs.sort(r);let i=n.orderedDocs.length;for(let e=0;e<i;e++){let t=n.orderedDocs[e][0];n.docs.set(t,e)}}function Ct(e){let t=Object.keys(e.sorts);for(let n of t)q(e,n)}function q(e,t){let n=e.sorts[t];n.orderedDocsToRemove.size&&(n.orderedDocs=n.orderedDocs.filter(e=>!n.orderedDocsToRemove.has(e[0])),n.orderedDocsToRemove.clear())}function wt(e,t,n){if(!e.enabled)return;let r=e.sorts[t],i=I(e.sharedInternalDocumentStore,n);r.docs.get(i)&&(r.docs.delete(i),r.orderedDocsToRemove.set(i,!0))}function Tt(e,t,n){if(!e.enabled)throw j(`SORT_DISABLED`);let r=n.property,i=n.order===`DESC`,a=e.sorts[r];if(!a)throw j(`UNABLE_TO_SORT_ON_UNKNOWN_FIELD`,r,e.sortableProperties.join(`, `));return q(e,r),vt(e),t.sort((t,n)=>{let r=a.docs.get(I(e.sharedInternalDocumentStore,t[0])),o=a.docs.get(I(e.sharedInternalDocumentStore,n[0])),s=r!==void 0,c=o!==void 0;return!s&&!c?0:s?c?i?o-r:r-o:-1:1}),t}function Et(e){return e.enabled?e.sortableProperties:[]}function Dt(e){return e.enabled?e.sortablePropertiesWithTypes:{}}function Ot(e,t){let n=t;if(!n.enabled)return{enabled:!1};let r=Object.keys(n.sorts).reduce((e,t)=>{let{docs:r,orderedDocs:i,type:a}=n.sorts[t];return e[t]={docs:new Map(Object.entries(r).map(([e,t])=>[+e,t])),orderedDocsToRemove:new Map,orderedDocs:i,type:a},e},{});return{sharedInternalDocumentStore:e,language:n.language,sortableProperties:n.sortableProperties,sortablePropertiesWithTypes:n.sortablePropertiesWithTypes,sorts:r,enabled:!0,isSorted:n.isSorted}}function kt(e){if(!e.enabled)return{enabled:!1};Ct(e),vt(e);let t=Object.keys(e.sorts).reduce((t,n)=>{let{docs:r,orderedDocs:i,type:a}=e.sorts[n];return t[n]={docs:Object.fromEntries(r.entries()),orderedDocs:i,type:a},t},{});return{language:e.language,sortableProperties:e.sortableProperties,sortablePropertiesWithTypes:e.sortablePropertiesWithTypes,sorts:t,enabled:e.enabled,isSorted:e.isSorted}}function At(){return{create:gt,insert:_t,remove:wt,save:kt,load:Ot,sortBy:Tt,getSortableProperties:Et,getSortablePropertiesWithTypes:Dt}}var jt=192,Mt=383,Nt=[65,65,65,65,65,65,65,67,69,69,69,69,73,73,73,73,69,78,79,79,79,79,79,null,79,85,85,85,85,89,80,115,97,97,97,97,97,97,97,99,101,101,101,101,105,105,105,105,101,110,111,111,111,111,111,null,111,117,117,117,117,121,112,121,65,97,65,97,65,97,67,99,67,99,67,99,67,99,68,100,68,100,69,101,69,101,69,101,69,101,69,101,71,103,71,103,71,103,71,103,72,104,72,104,73,105,73,105,73,105,73,105,73,105,73,105,74,106,75,107,107,76,108,76,108,76,108,76,108,76,108,78,110,78,110,78,110,110,78,110,79,111,79,111,79,111,79,111,82,114,82,114,82,114,83,115,83,115,83,115,83,115,84,116,84,116,84,116,85,117,85,117,85,117,85,117,85,117,85,117,87,119,89,121,89,90,122,90,122,90,122,115];function Pt(e){return e<jt||e>Mt?e:Nt[e-jt]||e}function Ft(e){let t=[];for(let n=0;n<e.length;n++)t[n]=Pt(e.charCodeAt(n));return String.fromCharCode(...t)}var It={ational:`ate`,tional:`tion`,enci:`ence`,anci:`ance`,izer:`ize`,bli:`ble`,alli:`al`,entli:`ent`,eli:`e`,ousli:`ous`,ization:`ize`,ation:`ate`,ator:`ate`,alism:`al`,iveness:`ive`,fulness:`ful`,ousness:`ous`,aliti:`al`,iviti:`ive`,biliti:`ble`,logi:`log`},Lt={icate:`ic`,ative:``,alize:`al`,iciti:`ic`,ical:`ic`,ful:``,ness:``},J=`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,Rt=`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*([aeiouy][aeiou]*)?$`,Y=`^([^aeiou][^aeiouy]*)?[aeiouy][aeiou]*[^aeiou][^aeiouy]*[aeiouy][aeiou]*[^aeiou][^aeiouy]*`,zt=`^([^aeiou][^aeiouy]*)?[aeiouy]`;function Bt(e){let t,n,r,i,a,o;if(e.length<3)return e;let s=e.substring(0,1);if(s==`y`&&(e=s.toUpperCase()+e.substring(1)),r=/^(.+?)(ss|i)es$/,i=/^(.+?)([^s])s$/,r.test(e)?e=e.replace(r,`$1$2`):i.test(e)&&(e=e.replace(i,`$1$2`)),r=/^(.+?)eed$/,i=/^(.+?)(ed|ing)$/,r.test(e)){let t=r.exec(e);r=new RegExp(J),r.test(t[1])&&(r=/.$/,e=e.replace(r,``))}else i.test(e)&&(t=i.exec(e)[1],i=new RegExp(zt),i.test(t)&&(e=t,i=/(at|bl|iz)$/,a=RegExp(`([^aeiouylsz])\\1$`),o=RegExp(`^[^aeiou][^aeiouy]*[aeiouy][^aeiouwxy]$`),i.test(e)?e+=`e`:a.test(e)?(r=/.$/,e=e.replace(r,``)):o.test(e)&&(e+=`e`)));if(r=/^(.+?)y$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(zt),t&&r.test(t)&&(e=t+`i`)),r=/^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(J),t&&r.test(t)&&(e=t+It[n])}if(r=/^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/,r.test(e)){let i=r.exec(e);t=i?.[1],n=i?.[2],r=new RegExp(J),t&&r.test(t)&&(e=t+Lt[n])}if(r=/^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/,i=/^(.+?)(s|t)(ion)$/,r.test(e))t=r.exec(e)?.[1],r=new RegExp(Y),t&&r.test(t)&&(e=t);else if(i.test(e)){let n=i.exec(e);t=n?.[1]??``+n?.[2]??``,i=new RegExp(Y),i.test(t)&&(e=t)}return r=/^(.+?)e$/,r.test(e)&&(t=r.exec(e)?.[1],r=new RegExp(Y),i=new RegExp(Rt),a=RegExp(`^[^aeiou][^aeiouy]*[aeiouy][^aeiouwxy]$`),t&&(r.test(t)||i.test(t)&&!a.test(t))&&(e=t)),r=/ll$/,i=new RegExp(Y),r.test(e)&&i.test(e)&&(r=/.$/,e=e.replace(r,``)),s==`y`&&(e=s.toLowerCase()+e.substring(1)),e}var Vt=e({createTokenizer:()=>Wt,normalizeToken:()=>X});function X(e,t,n=!0){let r=`${this.language}:${e}:${t}`;return n&&this.normalizationCache.has(r)?this.normalizationCache.get(r):this.stopWords?.includes(t)?(n&&this.normalizationCache.set(r,``),``):(this.stemmer&&!this.stemmerSkipProperties.has(e)&&(t=this.stemmer(t)),t=Ft(t),n&&this.normalizationCache.set(r,t),t)}function Ht(e){for(;e[e.length-1]===``;)e.pop();for(;e[0]===``;)e.shift();return e}function Ut(e,t,r,i=!0){if(t&&t!==this.language)throw j(`LANGUAGE_NOT_SUPPORTED`,t);if(typeof e!=`string`)return[e];let a=this.normalizeToken.bind(this,r??``),o;if(r&&this.tokenizeSkipProperties.has(r))o=[a(e,i)];else{let t=n[this.language];o=e.toLowerCase().split(t).map(e=>a(e,i)).filter(Boolean)}let s=Ht(o);return this.allowDuplicates?s:Array.from(new Set(s))}function Wt(e={}){if(!e.language)e.language=`english`;else if(!r.includes(e.language))throw j(`LANGUAGE_NOT_SUPPORTED`,e.language);let t;if(e.stemming||e.stemmer&&!(`stemming`in e))if(e.stemmer){if(typeof e.stemmer!=`function`)throw j(`INVALID_STEMMER_FUNCTION_TYPE`);t=e.stemmer}else if(e.language===`english`)t=Bt;else throw j(`MISSING_STEMMER`,e.language);let n;if(e.stopWords!==!1){if(n=[],Array.isArray(e.stopWords))n=e.stopWords;else if(typeof e.stopWords==`function`)n=e.stopWords(n);else if(e.stopWords)throw j(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);if(!Array.isArray(n))throw j(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`);for(let e of n)if(typeof e!=`string`)throw j(`CUSTOM_STOP_WORDS_MUST_BE_FUNCTION_OR_ARRAY`)}let i={tokenize:Ut,language:e.language,stemmer:t,stemmerSkipProperties:new Set(e.stemmerSkipProperties?[e.stemmerSkipProperties].flat():[]),tokenizeSkipProperties:new Set(e.tokenizeSkipProperties?[e.tokenizeSkipProperties].flat():[]),stopWords:n,allowDuplicates:!!e.allowDuplicates,normalizeToken:X,normalizationCache:new Map};return i.tokenize=Ut.bind(i),i.normalizeToken=X,i}function Gt(e){return{sharedInternalDocumentStore:e,rules:new Map}}function Kt(e,t){if(e.rules.has(t.id))throw Error(`PINNING_RULE_ALREADY_EXISTS: A pinning rule with id "${t.id}" already exists. Use updateRule to modify it.`);e.rules.set(t.id,t)}function qt(e,t){if(!e.rules.has(t.id))throw Error(`PINNING_RULE_NOT_FOUND: Cannot update pinning rule with id "${t.id}" because it does not exist. Use addRule to create it.`);e.rules.set(t.id,t)}function Jt(e,t){return e.rules.delete(t)}function Yt(e,t){return e.rules.get(t)}function Xt(e){return Array.from(e.rules.values())}function Zt(e,t){let n=e.toLowerCase().trim(),r=t.pattern.toLowerCase().trim();switch(t.anchoring){case`is`:return n===r;case`starts_with`:return n.startsWith(r);case`contains`:return n.includes(r);default:return!1}}function Qt(e,t){return e?t.conditions.every(t=>Zt(e,t)):!1}function $t(e,t){if(!t)return[];let n=[];for(let r of e.rules.values())Qt(t,r)&&n.push(r);return n}function en(e,t){return{sharedInternalDocumentStore:e,rules:new Map(t?.rules??[])}}function tn(e){return{rules:Array.from(e.rules.entries())}}function nn(){return{create:Gt,addRule:Kt,updateRule:qt,removeRule:Jt,getRule:Yt,getAllRules:Xt,getMatchingRules:$t,load:en,save:tn}}function rn(e){let t={formatElapsedTime:oe,getDocumentIndexId:se,getDocumentProperties:w,validateSchema:M};for(let n of Ae){let r=n;if(e[r]){if(typeof e[r]!=`function`)throw j(`COMPONENT_MUST_BE_FUNCTION`,r)}else e[r]=t[r]}for(let t of Object.keys(e))if(!ke.includes(t)&&!Ae.includes(t))throw j(`UNSUPPORTED_COMPONENT`,t)}function an({schema:e,sort:t,language:n,components:r,id:i,plugins:a}){r||={};for(let t of a??[]){if(!(`getComponents`in t)||typeof t.getComponents!=`function`)continue;let n=t.getComponents(e),i=Object.keys(n);for(let e of i)if(r[e])throw j(`PLUGIN_COMPONENT_CONFLICT`,e,t.name);r={...r,...n}}i||=b();let o=r.tokenizer,s=r.index,c=r.documentsStore,l=r.sorter,u=r.pinning;if(o=o?o.tokenize?o:Wt(o):Wt({language:n??`english`}),r.tokenizer&&n)throw j(`NO_LANGUAGE_WITH_CUSTOM_TOKENIZER`);let d=pe();s||=ct(),l||=At(),c||=Ee(),u||=nn(),rn(r);let{getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,formatElapsedTime:h}=r,g={data:{},caches:{},schema:e,tokenizer:o,index:s,sorter:l,documentsStore:c,pinning:u,internalDocumentIDStore:d,getDocumentProperties:f,getDocumentIndexId:p,validateSchema:m,beforeInsert:[],afterInsert:[],beforeRemove:[],afterRemove:[],beforeUpdate:[],afterUpdate:[],beforeUpsert:[],afterUpsert:[],beforeSearch:[],afterSearch:[],beforeInsertMultiple:[],afterInsertMultiple:[],beforeRemoveMultiple:[],afterRemoveMultiple:[],beforeUpdateMultiple:[],afterUpdateMultiple:[],beforeUpsertMultiple:[],afterUpsertMultiple:[],afterCreate:[],formatElapsedTime:h,id:i,plugins:a,version:on()};g.data={index:g.index.create(g,d,e),docs:g.documentsStore.create(g,d),sorting:g.sorter.create(g,d,e,t),pinning:g.pinning.create(d)};for(let e of De)g[e]=(g[e]??[]).concat(Oe(g,e));let _=g.afterCreate;return _&&je(_,g),g}function on(){return`{{VERSION}}`}function sn(e,t){return e.documentsStore.get(e.data.docs,t)}function cn(e){return e.documentsStore.count(e.data.docs)}var ln=e({documentsStore:()=>ge,formatElapsedTime:()=>oe,getDocumentIndexId:()=>se,getDocumentProperties:()=>w,getInnerType:()=>de,getVectorSize:()=>F,index:()=>qe,internalDocumentIDStore:()=>fe,isArrayType:()=>P,isGeoPointType:()=>ue,isVectorType:()=>N,sorter:()=>mt,tokenizer:()=>Vt,validateSchema:()=>M});function Z(e,t,n,r,i){let a=e.validateSchema(t,e.schema);if(a)throw j(`SCHEMA_VALIDATION_FAILURE`,a);return O(e.beforeInsert)||O(e.afterInsert)||O(e.index.beforeInsert)||O(e.index.insert)||O(e.index.afterInsert)?fn(e,t,n,r,i):pn(e,t,n,r,i)}var un=new Set([`enum`,`enum[]`]),dn=new Set([`string`,`number`]);async function fn(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=I(e.internalDocumentIDStore,s);if(r||await R(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw j(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mn(n,r,e,t)}return await hn(e,s,u,f,l,n,t,i),r||await R(e.afterInsert,e,s,t),s}function pn(e,t,n,r,i){let{index:a,docs:o}=e.data,s=e.getDocumentIndexId(t);if(typeof s!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof s);let c=I(e.internalDocumentIDStore,s);if(r||R(e.beforeInsert,e,s,t),!e.documentsStore.store(o,s,c,t))throw j(`DOCUMENT_ALREADY_EXISTS`,s);let l=e.documentsStore.count(o),u=e.index.getSearchableProperties(a),d=e.index.getSearchablePropertiesWithTypes(a),f=e.getDocumentProperties(t,u);for(let[e,t]of Object.entries(f)){if(t===void 0)continue;let n=typeof t,r=d[e];mn(n,r,e,t)}return gn(e,s,u,f,l,n,t,i),r||R(e.afterInsert,e,s,t),s}function mn(e,t,n,r){if(!(ue(t)&&typeof r==`object`&&typeof r.lon==`number`&&typeof r.lat==`number`)&&!(N(t)&&Array.isArray(r))&&!(P(t)&&Array.isArray(r))&&!(un.has(t)&&dn.has(e))&&e!==t)throw j(`INVALID_DOCUMENT_PROPERTY`,n,t,e)}async function hn(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o];await e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i);let l=e.internalDocumentIDStore.idToInternalId.get(t);await e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),await e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function gn(e,t,n,r,i,a,o,s){for(let o of n){let n=r[o];if(n===void 0)continue;let c=e.index.getSearchablePropertiesWithTypes(e.data.index)[o],l=I(e.internalDocumentIDStore,t);e.index.beforeInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i),e.index.insert(e.index,e.data.index,o,t,l,n,c,a,e.tokenizer,i,s),e.index.afterInsert?.(e.data.index,o,t,n,c,a,e.tokenizer,i)}let c=e.sorter.getSortableProperties(e.data.sorting),l=e.getDocumentProperties(o,c);for(let n of c){let r=l[n];if(r===void 0)continue;let i=e.sorter.getSortablePropertiesWithTypes(e.data.sorting)[n];e.sorter.insert(e.data.sorting,n,t,r,i,a)}}function _n(e,t,n,r,i,a){return O(e.afterInsertMultiple)||O(e.beforeInsertMultiple)||O(e.index.beforeInsert)||O(e.index.insert)||O(e.index.afterInsert)?vn(e,t,n,r,i,a):yn(e,t,n,r,i,a)}async function vn(e,t,n=1e3,r,i,a=0){let o=[],s=async a=>{let s=Math.min(a+n,t.length),c=t.slice(a,s);for(let t of c){let n=await Z(e,t,r,i,{avlRebalanceThreshold:c.length});o.push(n)}return s};return await(async()=>{let e=0;for(;e<t.length;){let t=Date.now();if(e=await s(e),a>0){let e=a-(Date.now()-t);e>0&&ie(e)}}})(),i||await z(e.afterInsertMultiple,e,t),o}function yn(e,t,n=1e3,r,i,a=0){let o=[],s=0;function c(){let a=t.slice(s*n,(s+1)*n);if(a.length===0)return!1;for(let t of a){let n=Z(e,t,r,i,{avlRebalanceThreshold:a.length});o.push(n)}return s++,!0}function l(){let e=Date.now();for(;c();)if(a>0){let t=Date.now()-e;if(t>=a){let e=a-t%a;e>0&&ie(e)}}}return l(),i||z(e.afterInsertMultiple,e,t),o}function Q(e,t,n,r,i,a){return O(e.beforeInsert)||O(e.afterInsert)||O(e.index.beforeInsert)||O(e.index.insert)||O(e.index.afterInsert)?vn(e,t,n,r,i,a):yn(e,t,n,r,i,a)}function bn(e,t){e.pinning.addRule(e.data.pinning,t)}function xn(e,t){e.pinning.updateRule(e.data.pinning,t)}function Sn(e,t){return e.pinning.removeRule(e.data.pinning,t)}function Cn(e,t){return e.pinning.getRule(e.data.pinning,t)}function wn(e){return e.pinning.getAllRules(e.data.pinning)}function $(e,t,n,r){return O(e.index.beforeRemove)||O(e.index.remove)||O(e.index.afterRemove)?Tn(e,t,n,r):En(e,t,n,r)}async function Tn(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=I(e.internalDocumentIDStore,t),l=L(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||await R(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];await e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),await e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),await e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=await e.sorter.getSortableProperties(e.data.sorting),h=await e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||await R(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function En(e,t,n,r){let i=!0,{index:a,docs:o}=e.data,s=e.documentsStore.get(o,t);if(!s)return!1;let c=I(e.internalDocumentIDStore,t),l=L(e.internalDocumentIDStore,c),u=e.documentsStore.count(o);r||R(e.beforeRemove,e,l);let d=e.index.getSearchableProperties(a),f=e.index.getSearchablePropertiesWithTypes(a),p=e.getDocumentProperties(s,d);for(let r of d){let a=p[r];if(a===void 0)continue;let o=f[r];e.index.beforeRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u),e.index.remove(e.index,e.data.index,r,t,c,a,o,n,e.tokenizer,u)||(i=!1),e.index.afterRemove?.(e.data.index,r,l,a,o,n,e.tokenizer,u)}let m=e.sorter.getSortableProperties(e.data.sorting),h=e.getDocumentProperties(s,m);for(let n of m)h[n]!==void 0&&e.sorter.remove(e.data.sorting,n,t);return r||R(e.afterRemove,e,l),e.documentsStore.remove(e.data.docs,t,c),i}function Dn(e,t,n,r,i){return O(e.index.beforeRemove)||O(e.index.remove)||O(e.index.afterRemove)||O(e.beforeRemoveMultiple)||O(e.afterRemoveMultiple)?On(e,t,n,r,i):kn(e,t,n,r,i)}async function On(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>L(e.internalDocumentIDStore,I(e.internalDocumentIDStore,t)));return i||await z(e.beforeRemoveMultiple,e,o),await new Promise((o,s)=>{let c=0;async function l(){let u=t.slice(c*n,++c*n);if(!u.length)return o();for(let t of u)try{await $(e,t,r,i)&&a++}catch(e){s(e)}setTimeout(l,0)}setTimeout(l,0)}),i||await z(e.afterRemoveMultiple,e,o),a}function kn(e,t,n,r,i){let a=0;n||=1e3;let o=i?[]:t.map(t=>L(e.internalDocumentIDStore,I(e.internalDocumentIDStore,t)));i||z(e.beforeRemoveMultiple,e,o);let s=0;function c(){let o=t.slice(s*n,++s*n);if(o.length){for(let t of o)$(e,t,r,i)&&a++;setTimeout(c,0)}}return c(),i||z(e.afterRemoveMultiple,e,o),a}var An=`fulltext`,jn=`hybrid`,Mn=`vector`;function Nn(e,t){return e[1]-t[1]}function Pn(e,t){return t[1]-e[1]}function Fn(e=`desc`){return e.toLowerCase()===`asc`?Nn:Pn}function In(e,t,n){let r={},i=t.map(([e])=>e),a=e.documentsStore.getMultiple(e.data.docs,i),o=Object.keys(n),s=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e of o){let t;if(s[e]===`number`){let{ranges:r}=n[e],i=r.length,a=Array.from({length:i});for(let e=0;e<i;e++){let t=r[e];a[e]=[`${t.from}-${t.to}`,0]}t=Object.fromEntries(a)}r[e]={count:0,values:t??{}}}let c=a.length;for(let e=0;e<c;e++){let t=a[e];for(let e of o){let i=e.includes(`.`)?T(t,e):t[e],a=s[e],o=r[e].values;switch(a){case`number`:{let t=n[e].ranges;Ln(t,o)(i);break}case`number[]`:{let t=new Set,r=n[e].ranges,a=Ln(r,o,t);for(let e of i)a(e);break}case`boolean`:case`enum`:case`string`:Rn(o,a)(i);break;case`boolean[]`:case`enum[]`:case`string[]`:{let e=Rn(o,a===`boolean[]`?`boolean`:`string`,new Set);for(let t of i)e(t);break}default:throw j(`FACET_NOT_SUPPORTED`,a)}}}for(let e of o){let t=r[e];if(t.count=Object.keys(t.values).length,s[e]===`string`){let r=n[e],i=Fn(r.sort);t.values=Object.fromEntries(Object.entries(t.values).sort(i).slice(r.offset??0,r.limit??10))}}return r}function Ln(e,t,n){return r=>{for(let i of e){let e=`${i.from}-${i.to}`;n?.has(e)||r>=i.from&&r<=i.to&&(t[e]===void 0?t[e]=1:(t[e]++,n?.add(e)))}}}function Rn(e,t,n){let r=t===`boolean`?`false`:``;return t=>{let i=t?.toString()??r;n?.has(i)||(e[i]=(e[i]??0)+1,n?.add(i))}}var zn={reducer:(e,t,n,r)=>(t[r]=n,t),getInitialValue:e=>Array.from({length:e})},Bn=[`string`,`number`,`boolean`];function Vn(e,t,n){let r=n.properties,i=r.length,a=e.index.getSearchablePropertiesWithTypes(e.data.index);for(let e=0;e<i;e++){let t=r[e];if(a[t]===void 0)throw j(`UNKNOWN_GROUP_BY_PROPERTY`,t);if(!Bn.includes(a[t]))throw j(`INVALID_GROUP_BY_PROPERTY`,t,Bn.join(`, `),a[t])}let o=t.map(([t])=>L(e.internalDocumentIDStore,t)),s=e.documentsStore.getMultiple(e.data.docs,o),c=s.length,l=n.maxResult||2**53-1,u=[],d={};for(let e=0;e<i;e++){let t=r[e],n={property:t,perValue:{}},i=new Set;for(let e=0;e<c;e++){let r=s[e],a=T(r,t);if(a===void 0)continue;let o=typeof a==`boolean`?``+a:a,c=n.perValue[o]??{indexes:[],count:0};c.count>=l||(c.indexes.push(e),c.count++,n.perValue[o]=c,i.add(a))}u.push(Array.from(i)),d[t]=n}let f=Hn(u),p=f.length,m=[];for(let e=0;e<p;e++){let t=f[e],n=t.length,i={values:[],indexes:[]},a=[];for(let e=0;e<n;e++){let n=t[e],o=r[e];a.push(d[o].perValue[typeof n==`boolean`?``+n:n].indexes),i.values.push(n)}i.indexes=C(a).sort((e,t)=>e-t),i.indexes.length!==0&&m.push(i)}let h=m.length,g=Array.from({length:h});for(let e=0;e<h;e++){let r=m[e],i=n.reduce||zn,a=r.indexes.map(e=>({id:o[e],score:t[e][1],document:s[e]})),c=i.reducer.bind(null,r.values),l=i.getInitialValue(r.indexes.length),u=a.reduce(c,l);g[e]={values:r.values,result:u}}return g}function Hn(e,t=0){if(t+1===e.length)return e[t].map(e=>[e]);let n=e[t],r=Hn(e,t+1),i=[];for(let e of n)for(let t of r){let n=[e];f(n,t),i.push(n)}return i}function Un(e,t,n,r){let i=$t(t,r);if(i.length===0)return n;let a=i.flatMap(e=>e.consequence.promote);a.sort((e,t)=>e.position-t.position);let o=new Set,s=new Map,c=new Set;for(let t of a){let n=I(e.internalDocumentIDStore,t.doc_id);if(n!==void 0){if(s.has(n)){let e=s.get(n);t.position<e&&s.set(n,t.position);continue}c.has(t.position)||(o.add(n),s.set(n,t.position),c.add(t.position))}}if(s.size===0)return n;let l=n.filter(([e])=>!o.has(e)),u=[];for(let[t,r]of s.entries())n.find(([e])=>e===t)?u.push([t,1e6-r]):e.documentsStore.get(e.data.docs,t)&&u.push([t,0]);u.sort((e,t)=>(s.get(e[0])??1/0)-(s.get(t[0])??1/0));let d=[],f=new Map;for(let e of u){let t=s.get(e[0]);f.set(t,e)}let p=0,m=0;for(;m<l.length+u.length;)if(f.has(m))d.push(f.get(m)),m++;else if(p<l.length)d.push(l[p]),p++,m++;else break;for(let[e,t]of f.entries())e>=d.length&&d.push(t);return d}function Wn(e,t,n){let{term:r,properties:i}=t,a=e.data.index,o=e.caches.propertiesToSearch;if(!o){let t=e.index.getSearchablePropertiesWithTypes(a);o=e.index.getSearchableProperties(a),o=o.filter(e=>t[e].startsWith(`string`)),e.caches.propertiesToSearch=o}if(i&&i!==`*`){for(let e of i)if(!o.includes(e))throw j(`UNKNOWN_INDEX`,e,o.join(`, `));o=o.filter(e=>i.includes(e))}let s=Object.keys(t.where??{}).length>0,c;s&&(c=e.index.searchByWhereClause(a,e.tokenizer,t.where,n));let l,u=t.threshold!==void 0&&t.threshold!==null?t.threshold:1;if(r||i){let i=cn(e);if(l=e.index.search(a,r||``,e.tokenizer,n,o,t.exact||!1,t.tolerance||0,t.boost||{},Yn(t.relevance),i,c,u),t.exact&&r){let t=r.trim().split(/\s+/);l=l.filter(([n])=>{let r=e.documentsStore.get(e.data.docs,n);if(!r)return!1;for(let e of o){let n=Kn(r,e);if(typeof n==`string`&&t.every(e=>RegExp(`\\b${Gn(e)}\\b`).test(n)))return!0}return!1})}}else l=s?ft(a,t.where)||(c?Array.from(c):[]).map(e=>[+e,0]):Object.keys(e.documentsStore.getAll(e.data.docs)).map(e=>[+e,0]);return l}function Gn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Kn(e,t){let n=t.split(`.`),r=e;for(let e of n)if(r&&typeof r==`object`&&e in r)r=r[e];else return;return r}function qn(e,t,n){let r=y();function i(){let i=Object.keys(e.data.index.vectorIndexes),a=t.facets&&Object.keys(t.facets).length>0,{limit:o=10,offset:s=0,distinctOn:c,includeVectors:l=!1}=t,u=t.preflight===!0,d=Wn(e,t,n);if(t.sortBy)if(typeof t.sortBy==`function`){let n=d.map(([e])=>e),r=e.documentsStore.getMultiple(e.data.docs,n).map((e,t)=>[d[t][0],d[t][1],e]);r.sort(t.sortBy),d=r.map(([e,t])=>[e,t])}else d=e.sorter.sortBy(e.data.sorting,d,t.sortBy).map(([t,n])=>[I(e.internalDocumentIDStore,t),n]);else d=d.sort(S);d=Un(e,e.data.pinning,d,t.term);let f;u||(f=c?sr(e,d,s,o,c):cr(e,d,s,o));let p={elapsed:{formatted:``,raw:0},hits:[],count:d.length};return f!==void 0&&(p.hits=f.filter(Boolean),l||ee(p,i)),a&&(p.facets=In(e,d,t.facets)),t.groupBy&&(p.groups=Vn(e,d,t.groupBy)),p.elapsed=e.formatElapsedTime(y()-r),p}async function a(){e.beforeSearch&&await V(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await B(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}var Jn={k:1.2,b:.75,d:.5};function Yn(e){let t=e??{};return t.k=t.k??Jn.k,t.b=t.b??Jn.b,t.d=t.d??Jn.d,t}function Xn(e,t,n){let r=t.vector;if(r&&(!(`value`in r)||!(`property`in r)))throw j(`INVALID_VECTOR_INPUT`,Object.keys(r).join(`, `));let i=e.data.index.vectorIndexes[r.property];if(!i)throw j(`UNKNOWN_VECTOR_PROPERTY`,r.property);let a=i.node.size;if(r?.value.length!==a)throw r?.property===void 0||r?.value.length===void 0?j(`INVALID_INPUT_VECTOR`,`undefined`,a,`undefined`):j(`INVALID_INPUT_VECTOR`,r.property,a,r.value.length);let o=e.data.index,s;return Object.keys(t.where??{}).length>0&&(s=e.index.searchByWhereClause(o,e.tokenizer,t.where,n)),i.node.find(r.value,t.similarity??.8,s)}function Zn(e,t,n=`english`){let r=y();function i(){let i=Xn(e,t,n).sort(S);i=Un(e,e.data.pinning,i,void 0);let a=[];t.facets&&Object.keys(t.facets).length>0&&(a=In(e,i,t.facets));let o=t.vector.property,s=t.includeVectors??!1,c=t.limit??10,l=t.offset??0,u=Array.from({length:c});for(let t=0;t<c;t++){let n=i[t+l];if(!n)break;let r=e.data.docs.docs[n[0]];r&&(s||(r[o]=null),u[t]={id:L(e.internalDocumentIDStore,n[0]),score:n[1],document:r})}let d=[];t.groupBy&&(d=Vn(e,i,t.groupBy));let f=y()-r;return{count:i.length,hits:u.filter(Boolean),elapsed:{raw:Number(f),formatted:v(f)},...a?{facets:a}:{},...d?{groups:d}:{}}}async function a(){e.beforeSearch&&await V(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await B(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function Qn(e,t,n){let r=tr(Wn(e,t,n)),i=Xn(e,t,n),a=t.hybridWeights;return ir(r,i,t.term??``,a)}function $n(e,t,n){let r=y();function i(){let i=Qn(e,t,n);i=Un(e,e.data.pinning,i,t.term);let a;t.facets&&Object.keys(t.facets).length>0&&(a=In(e,i,t.facets));let o;t.groupBy&&(o=Vn(e,i,t.groupBy));let s=t.offset??0,c=t.limit??10,l=cr(e,i,s,c).filter(Boolean),u=y(),d={count:i.length,elapsed:{raw:Number(u-r),formatted:v(u-r)},hits:l,...a?{facets:a}:{},...o?{groups:o}:{}};return(t.includeVectors??!1)||ee(d,Object.keys(e.data.index.vectorIndexes)),d}async function a(){e.beforeSearch&&await V(e.beforeSearch,e,t,n);let r=i();return e.afterSearch&&await B(e.afterSearch,e,t,n,r),r}return e.beforeSearch?.length||e.afterSearch?.length?a():i()}function er(e){return e[1]}function tr(e){let t=Math.max.apply(Math,e.map(er));return e.map(([e,n])=>[e,n/t])}function nr(e,t){return e/t}function rr(e,t){return(n,r)=>n*e+r*t}function ir(e,t,n,r){let i=Math.max.apply(Math,e.map(er)),a=Math.max.apply(Math,t.map(er)),{text:o,vector:s}=r&&r.text&&r.vector?r:ar(n),c=new Map,l=e.length,u=rr(o,s);for(let t=0;t<l;t++){let[n,r]=e[t],a=u(nr(r,i),0);c.set(n,a)}let d=t.length;for(let e=0;e<d;e++){let[n,r]=t[e],i=nr(r,a),o=c.get(n)??0;c.set(n,o+u(0,i))}return[...c].sort((e,t)=>t[1]-e[1])}function ar(e){return{text:.5,vector:.5}}function or(e,t,n){let r=t.mode??`fulltext`;if(r===`fulltext`)return qn(e,t,n);if(r===`vector`)return Zn(e,t);if(r===`hybrid`)return $n(e,t);throw j(`INVALID_SEARCH_MODE`,r)}function sr(e,t,n,r,i){let a=e.data.docs,o=new Map,s=[],c=new Set,l=t.length,u=0;for(let d=0;d<l;d++){let l=t[d];if(l===void 0)continue;let[f,p]=l;if(c.has(f))continue;let m=e.documentsStore.get(a,f),h=T(m,i);if(!(h===void 0||o.has(h))&&(o.set(h,!0),u++,!(u<=n)&&(s.push({id:L(e.internalDocumentIDStore,f),score:p,document:m}),c.add(f),u>=n+r)))break}return s}function cr(e,t,n,r){let i=e.data.docs,a=Array.from({length:r}),o=new Set;for(let s=n;s<r+n;s++){let n=t[s];if(n===void 0)break;let[r,c]=n;if(!o.has(r)){let t=e.documentsStore.get(i,r);a[s]={id:L(e.internalDocumentIDStore,r),score:c,document:t},o.add(r)}}return a}function lr(e,t){e.internalDocumentIDStore.load(e,t.internalDocumentIDStore),e.data.index=e.index.load(e.internalDocumentIDStore,t.index),e.data.docs=e.documentsStore.load(e.internalDocumentIDStore,t.docs),e.data.sorting=e.sorter.load(e.internalDocumentIDStore,t.sorting),e.data.pinning=e.pinning.load(e.internalDocumentIDStore,t.pinning),e.tokenizer.language=t.language}function ur(e){return{internalDocumentIDStore:e.internalDocumentIDStore.save(e.internalDocumentIDStore),index:e.index.save(e.data.index),docs:e.documentsStore.save(e.data.docs),sorting:e.sorter.save(e.data.sorting),pinning:e.pinning.save(e.data.pinning),language:e.tokenizer.language}}function dr(e,t,n,r,i){return O(e.afterInsert)||O(e.beforeInsert)||O(e.afterRemove)||O(e.beforeRemove)||O(e.beforeUpdate)||O(e.afterUpdate)?fr(e,t,n,r,i):pr(e,t,n,r,i)}async function fr(e,t,n,r,i){!i&&e.beforeUpdate&&await R(e.beforeUpdate,e,t),await $(e,t,r,i);let a=await Z(e,n,r,i);return!i&&e.afterUpdate&&await R(e.afterUpdate,e,a),a}function pr(e,t,n,r,i){!i&&e.beforeUpdate&&R(e.beforeUpdate,e,t),$(e,t,r,i);let a=Z(e,n,r,i);return!i&&e.afterUpdate&&R(e.afterUpdate,e,a),a}function mr(e,t,n,r,i,a){return O(e.afterInsert)||O(e.beforeInsert)||O(e.afterRemove)||O(e.beforeRemove)||O(e.beforeUpdate)||O(e.afterUpdate)||O(e.beforeUpdateMultiple)||O(e.afterUpdateMultiple)||O(e.beforeRemoveMultiple)||O(e.afterRemoveMultiple)||O(e.beforeInsertMultiple)||O(e.afterInsertMultiple)?hr(e,t,n,r,i,a):gr(e,t,n,r,i,a)}async function hr(e,t,n,r,i,a){a||await z(e.beforeUpdateMultiple,e,t);let o=n.length;for(let t=0;t<o;t++){let r=e.validateSchema(n[t],e.schema);if(r)throw j(`SCHEMA_VALIDATION_FAILURE`,r)}await Dn(e,t,r,i,a);let s=await Q(e,n,r,i,a);return a||await z(e.afterUpdateMultiple,e,s),s}function gr(e,t,n,r,i,a){a||z(e.beforeUpdateMultiple,e,t);let o=n.length;for(let t=0;t<o;t++){let r=e.validateSchema(n[t],e.schema);if(r)throw j(`SCHEMA_VALIDATION_FAILURE`,r)}Dn(e,t,r,i,a);let s=Q(e,n,r,i,a);return a||z(e.afterUpdateMultiple,e,s),s}function _r(e,t,n,r,i){return O(e.afterInsert)||O(e.beforeInsert)||O(e.afterRemove)||O(e.beforeRemove)||O(e.beforeUpdate)||O(e.afterUpdate)||O(e.beforeUpsert)||O(e.afterUpsert)||O(e.index.beforeInsert)||O(e.index.insert)||O(e.index.afterInsert)?vr(e,t,n,r,i):yr(e,t,n,r,i)}async function vr(e,t,n,r,i){let a=e.getDocumentIndexId(t);if(typeof a!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof a);!r&&e.beforeUpsert&&await R(e.beforeUpsert,e,a,t);let o=e.documentsStore.get(e.data.docs,a),s;return s=o?await dr(e,a,t,n,r):await Z(e,t,n,r,i),!r&&e.afterUpsert&&await R(e.afterUpsert,e,s,t),s}function yr(e,t,n,r,i){let a=e.getDocumentIndexId(t);if(typeof a!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof a);!r&&e.beforeUpsert&&R(e.beforeUpsert,e,a,t);let o=e.documentsStore.get(e.data.docs,a),s;return s=o?dr(e,a,t,n,r):Z(e,t,n,r,i),!r&&e.afterUpsert&&R(e.afterUpsert,e,s,t),s}function br(e,t,n,r,i){return O(e.afterInsert)||O(e.beforeInsert)||O(e.afterRemove)||O(e.beforeRemove)||O(e.beforeUpdate)||O(e.afterUpdate)||O(e.beforeUpsert)||O(e.afterUpsert)||O(e.beforeUpsertMultiple)||O(e.afterUpsertMultiple)||O(e.beforeInsertMultiple)||O(e.afterInsertMultiple)||O(e.beforeUpdateMultiple)||O(e.afterUpdateMultiple)||O(e.beforeRemoveMultiple)||O(e.afterRemoveMultiple)||O(e.index.beforeInsert)||O(e.index.insert)||O(e.index.afterInsert)?xr(e,t,n,r,i):Sr(e,t,n,r,i)}async function xr(e,t,n,r,i){!i&&e.beforeUpsertMultiple&&await z(e.beforeUpsertMultiple,e,t);let a=t.length;for(let n=0;n<a;n++){let r=e.validateSchema(t[n],e.schema);if(r)throw j(`SCHEMA_VALIDATION_FAILURE`,r)}let o=[],s=[],c=[];for(let n of t){let t=e.getDocumentIndexId(n);if(typeof t!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof t);e.documentsStore.get(e.data.docs,t)?(s.push(n),c.push(t)):o.push(n)}let l=[];if(s.length>0){let t=await mr(e,c,s,n,r,i);l.push(...t)}if(o.length>0){let t=await Q(e,o,n,r,i);l.push(...t)}return!i&&e.afterUpsertMultiple&&await z(e.afterUpsertMultiple,e,l),l}function Sr(e,t,n,r,i){!i&&e.beforeUpsertMultiple&&z(e.beforeUpsertMultiple,e,t);let a=t.length;for(let n=0;n<a;n++){let r=e.validateSchema(t[n],e.schema);if(r)throw j(`SCHEMA_VALIDATION_FAILURE`,r)}let o=[],s=[],c=[];for(let n of t){let t=e.getDocumentIndexId(n);if(typeof t!=`string`)throw j(`DOCUMENT_ID_MUST_BE_STRING`,typeof t);e.documentsStore.get(e.data.docs,t)?(s.push(n),c.push(t)):o.push(n)}let l=[];if(s.length>0){let t=mr(e,c,s,n,r,i);l.push(...t)}if(o.length>0){let t=Q(e,o,n,r,i);l.push(...t)}return!i&&e.afterUpsertMultiple&&z(e.afterUpsertMultiple,e,l),l}var Cr=`orama-secure-proxy`,wr=class{db;proxy=null;config;abortController=null;lastInteractionParams=null;chatModel=null;conversationID;messages=[];events;initPromise;state=[];constructor(e,t){this.db=e,this.config=t,this.init(),this.messages=t.initialMessages||[],this.events=t.events||{},this.conversationID=t.conversationID||this.generateRandomID()}async ask(e){await this.initPromise;let t=``;for await(let n of await this.askStream(e))t+=n;return t}async askStream(e){return await this.initPromise,this.fetchAnswer(e)}abortAnswer(){this.abortController?.abort(),this.state[this.state.length-1].aborted=!0,this.triggerStateChange()}getMessages(){return this.messages}clearSession(){this.messages=[],this.state=[]}regenerateLast({stream:e=!0}){if(this.state.length===0||this.messages.length===0)throw Error(`No messages to regenerate`);if(this.messages.at(-1)?.role!==`assistant`)throw j(`ANSWER_SESSION_LAST_MESSAGE_IS_NOT_ASSISTANT`);return this.messages.pop(),this.state.pop(),e?this.askStream(this.lastInteractionParams):this.ask(this.lastInteractionParams)}async*fetchAnswer(e){if(!this.chatModel)throw j(`PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL`);this.abortController=new AbortController,this.lastInteractionParams=e;let t=this.generateRandomID();this.messages.push({role:`user`,content:e.term??``}),this.state.push({interactionId:t,aborted:!1,loading:!0,query:e.term??``,response:``,sources:null,translatedQuery:null,error:!1,errorMessage:null});let n=this.state.length-1;this.addEmptyAssistantMessage(),this.triggerStateChange();try{let t=await or(this.db,e);this.state[n].sources=t,this.triggerStateChange();for await(let e of this.proxy.chatStream({model:this.chatModel,messages:this.messages}))yield e,this.state[n].response+=e,this.messages.findLast(e=>e.role===`assistant`).content+=e,this.triggerStateChange()}catch(e){e.name===`AbortError`?this.state[n].aborted=!0:(this.state[n].error=!0,this.state[n].errorMessage=e.toString()),this.triggerStateChange()}return this.state[n].loading=!1,this.triggerStateChange(),this.state[n].response}generateRandomID(e=24){return Array.from({length:e},()=>Math.floor(Math.random()*36).toString(36)).join(``)}triggerStateChange(){this.events.onStateChange&&this.events.onStateChange(this.state)}async init(){let e=this;async function t(){return await e.db.plugins.find(e=>e.name===Cr)}let n=await t();if(!n)throw j(`PLUGIN_SECURE_PROXY_NOT_FOUND`);let r=n.extra;if(this.proxy=r.proxy,this.config.systemPrompt&&this.messages.push({role:`system`,content:this.config.systemPrompt}),r?.pluginParams?.chat?.model)this.chatModel=r.pluginParams.chat.model;else throw j(`PLUGIN_SECURE_PROXY_MISSING_CHAT_MODEL`)}addEmptyAssistantMessage(){this.messages.push({role:`assistant`,content:``})}},Tr=Symbol(`orama.insertions`),Er=Symbol(`orama.removals`),Dr=e({boundedLevenshtein:()=>Fe,convertDistanceToMeters:()=>D,formatBytes:()=>m,formatNanoseconds:()=>v,getNanosecondsTime:()=>y,normalizeToken:()=>X,safeArrayPush:()=>f,setDifference:()=>re,setIntersection:()=>k,setUnion:()=>A,uniqueId:()=>b});export{wr as AnswerSession,An as MODE_FULLTEXT_SEARCH,jn as MODE_HYBRID_SEARCH,Mn as MODE_VECTOR_SEARCH,ln as components,cn as count,an as create,Sn as deletePin,wn as getAllPins,sn as getByID,Cn as getPin,Z as insert,_n as insertMultiple,bn as insertPin,Dr as internals,Tr as kInsertions,Er as kRemovals,lr as load,$ as remove,Dn as removeMultiple,ur as save,or as search,Zn as searchVector,dr as update,mr as updateMultiple,xn as updatePin,_r as upsert,br as upsertMultiple};
@@ -1,3 +1,3 @@
1
- import{I as e,L as t,Q as n,R as r,et as i,i as a,n as o,rt as s}from"./wCc4pE4l.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function ee(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function g(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var _=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(x(e)),_(e,t));var v=new Map;function y(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=g(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(v.size>0){let t=x(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function x(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${ee(...e)}"]`}return n}var S=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,te=/^\/\((?:[^)]+)\)$/;function C(e){let t=[];return{pattern:e===`/`||te.test(e)?/^\/$/:RegExp(`^${re(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return ae(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return ae(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=S.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return ae(e)}).join(``)}).join(``)}/?$`),params:t}}function ne(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function re(e){return e.slice(1).split(`/`).filter(ne)}function ie(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function ae(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function oe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=C(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ie(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function se(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ce(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var w=globalThis.__sveltekit_rko9tn?.base??``,le=globalThis.__sveltekit_rko9tn?.assets??w??``,ue=`1780383726391`,de=`sveltekit:snapshot`,fe=`sveltekit:scroll`,pe=`sveltekit:states`,T=`sveltekit:history`,E=`sveltekit:navigation`,D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},O=location.origin;function me(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function k(){return{x:pageXOffset,y:pageYOffset}}function A(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var he={...D,"":D.hover};function ge(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function _e(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ge(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||Ce(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===O&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function ye(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=A(s,`preload-code`)),i===null&&(i=A(s,`preload-data`)),t===null&&(t=A(s,`keepfocus`)),n===null&&(n=A(s,`noscroll`)),a===null&&(a=A(s,`reload`)),o===null&&(o=A(s,`replacestate`)),s=ge(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:he[r??`off`],preload_data:he[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function be(e){let t=s(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var xe={v:h};function Se(){let{set:e,subscribe:t}=s(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${le}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==ue;return n&&(e(!0),xe.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function Ce(e,t,n){return e.origin!==O||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function we(e){}var Te=2**32-1,Ee=Te-1;function De(e){return!(!Number.isInteger(e)||e<0||e>Ee)}function Oe(e){return!(!Number.isInteger(e)||e<0||e>Te)}function ke(e){return Uint8Array.fromBase64(e).buffer}function Ae(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function je(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var Me=typeof Uint8Array.fromBase64==`function`,Ne=typeof process==`object`&&process.versions?.node!==void 0,Pe=Me?ke:Ne?Ae:je;function Fe(e,t){if(typeof e==`number`)return a(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let n=e,r=Array(n.length),i=null;function a(e,o=!1){if(e===-1)return;if(e===-3)return NaN;if(e===-4)return 1/0;if(e===-5)return-1/0;if(e===-6)return-0;if(o||typeof e!=`number`)throw Error(`Invalid input`);if(e in r)return r[e];let s=n[e];if(!s||typeof s!=`object`)r[e]=s;else if(Array.isArray(s))if(typeof s[0]==`string`){let o=s[0],c=t&&Object.hasOwn(t,o)?t[o]:void 0;if(c){let t=s[1];if(typeof t!=`number`&&(t=n.push(s[1])-1),i??=new Set,i.has(t))throw Error(`Invalid circular reference`);return i.add(t),r[e]=c(a(t)),i.delete(t),r[e]}switch(o){case`Date`:r[e]=new Date(s[1]);break;case`Set`:let t=new Set;r[e]=t;for(let e=1;e<s.length;e+=1)t.add(a(s[e]));break;case`Map`:let i=new Map;r[e]=i;for(let e=1;e<s.length;e+=2)i.set(a(s[e]),a(s[e+1]));break;case`RegExp`:r[e]=new RegExp(s[1],s[2]);break;case`Object`:{let t=s[1];if(typeof n[t]==`object`&&n[t][0]!==`BigInt`)throw Error(`Invalid input`);r[e]=Object(a(t));break}case`BigInt`:r[e]=BigInt(s[1]);break;case`null`:let c=Object.create(null);r[e]=c;for(let e=1;e<s.length;e+=2){if(s[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");c[s[e]]=a(s[e+1])}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(n[s[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=globalThis[o],i=a(s[1]);r[e]=s[2]===void 0?new t(i):new t(i,s[2],s[3]);break}case`ArrayBuffer`:{let t=s[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);r[e]=Pe(t);break}case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:{let t=o.slice(9);r[e]=Temporal[t].from(s[1]);break}case`URL`:r[e]=new URL(s[1]);break;case`URLSearchParams`:r[e]=new URLSearchParams(s[1]);break;default:throw Error(`Unknown type ${o}`)}}else if(s[0]===-7){let t=s[1];if(!Oe(t))throw Error(`Invalid input`);let n=[];r[e]=n,n[Ee]=void 0,delete n[Ee];for(let e=2;e<s.length;e+=2){let r=s[e];if(!De(r)||r>=t)throw Error(`Invalid input`);n[r]=a(s[e+1])}n.length=t}else{let t=Array(s.length);r[e]=t;for(let e=0;e<s.length;e+=1){let n=s[e];n!==-2&&(t[e]=a(n))}}else{let t={};r[e]=t;for(let e of Object.keys(s)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");let n=s[e];t[e]=a(n)}}return r[e]}return a(0)}var Ie=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ie,`entries`]);var Le=new Set([...Ie]);new Set([...Le,`actions`,`entries`]),new Set([`GET`,`POST`,`PATCH`,`PUT`,`DELETE`,`OPTIONS`,`HEAD`,`fallback`,`prerender`,`trailingSlash`,`config`,`entries`]);function Re(e){return e.filter(e=>e!=null)}var ze=`x-sveltekit-invalidated`,Be=`x-sveltekit-trailing-slash`;function Ve(e,t){return e+`/`+t}function He(e){return e instanceof c||e instanceof u?e.status:500}function Ue(e){return e instanceof u?e.text:`Internal Error`}var j,M,N,We=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Ge=`a:`;We?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ge)},M={current:null},N={current:!1}):(j=new class{#e=i({});get data(){return e(this.#e)}set data(e){n(this.#e,e)}#t=i(null);get form(){return e(this.#t)}set form(e){n(this.#t,e)}#n=i(null);get error(){return e(this.#n)}set error(e){n(this.#n,e)}#r=i({});get params(){return e(this.#r)}set params(e){n(this.#r,e)}#i=i({id:null});get route(){return e(this.#i)}set route(e){n(this.#i,e)}#a=i({});get state(){return e(this.#a)}set state(e){n(this.#a,e)}#o=i(-1);get status(){return e(this.#o)}set status(e){n(this.#o,e)}#s=i(new URL(Ge));get url(){return e(this.#s)}set url(e){n(this.#s,e)}},M=new class{#e=i(null);get current(){return e(this.#e)}set current(e){n(this.#e,e)}},N=new class{#e=i(!1);get current(){return e(this.#e)}set current(e){n(this.#e,e)}},xe.v=()=>N.current=!0);function Ke(e){Object.assign(j,e)}var qe=`/__data.json`,Je=`.html__data.json`;function Ye(e){return e.endsWith(`.html`)?e.replace(/\.html$/,Je):e.replace(/\/$/,``)+qe}async function*Xe(e){let t=!1,n=``,r=new TextDecoder;for(;;){let i=n.indexOf(`
1
+ import{I as e,L as t,Q as n,R as r,et as i,i as a,n as o,rt as s}from"./wCc4pE4l.js";var c=class{constructor(e,t){this.status=e,typeof t==`string`?this.body={message:t}:t?this.body=t:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function h(){}function ee(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function g(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var _=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(x(e)),_(e,t));var v=new Map;function y(e,t){let n=x(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent),i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),r.getAttribute(`data-b64`)!==null&&(e=g(e)),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function b(e,t,n){if(v.size>0){let t=x(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function x(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${ee(...e)}"]`}return n}var S=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,te=/^\/\((?:[^)]+)\)$/;function C(e){let t=[];return{pattern:e===`/`||te.test(e)?/^\/$/:RegExp(`^${re(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return ae(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return ae(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=S.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return ae(e)}).join(``)}).join(``)}/?$`),params:t}}function ne(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function re(e){return e.slice(1).split(`/`).filter(ne)}function ie(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0)if(s.rest)c=``;else continue;if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function ae(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}function oe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=C(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ie(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function se(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function ce(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var w=globalThis.__sveltekit_5lyl03?.base??``,le=globalThis.__sveltekit_5lyl03?.assets??w??``,ue=`1780414750694`,de=`sveltekit:snapshot`,fe=`sveltekit:scroll`,pe=`sveltekit:states`,T=`sveltekit:history`,E=`sveltekit:navigation`,D={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},O=location.origin;function me(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function k(){return{x:pageXOffset,y:pageYOffset}}function A(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var he={...D,"":D.hover};function ge(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function _e(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=ge(e)}}function ve(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||Ce(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===O&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function ye(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=A(s,`preload-code`)),i===null&&(i=A(s,`preload-data`)),t===null&&(t=A(s,`keepfocus`)),n===null&&(n=A(s,`noscroll`)),a===null&&(a=A(s,`reload`)),o===null&&(o=A(s,`replacestate`)),s=ge(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:he[r??`off`],preload_data:he[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function be(e){let t=s(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var xe={v:h};function Se(){let{set:e,subscribe:t}=s(!1);async function n(){clearTimeout(void 0);try{let t=await fetch(`${le}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let n=(await t.json()).version!==ue;return n&&(e(!0),xe.v(),clearTimeout(void 0)),n}catch{return!1}}return{subscribe:t,check:n}}function Ce(e,t,n){return e.origin!==O||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function we(e){}var Te=2**32-1,Ee=Te-1;function De(e){return!(!Number.isInteger(e)||e<0||e>Ee)}function Oe(e){return!(!Number.isInteger(e)||e<0||e>Te)}function ke(e){return Uint8Array.fromBase64(e).buffer}function Ae(e){return Uint8Array.from(Buffer.from(e,`base64`)).buffer}function je(e){let t=atob(e),n=t.length,r=new Uint8Array(n);for(let e=0;e<n;e++)r[e]=t.charCodeAt(e);return r.buffer}var Me=typeof Uint8Array.fromBase64==`function`,Ne=typeof process==`object`&&process.versions?.node!==void 0,Pe=Me?ke:Ne?Ae:je;function Fe(e,t){if(typeof e==`number`)return a(e,!0);if(!Array.isArray(e)||e.length===0)throw Error(`Invalid input`);let n=e,r=Array(n.length),i=null;function a(e,o=!1){if(e===-1)return;if(e===-3)return NaN;if(e===-4)return 1/0;if(e===-5)return-1/0;if(e===-6)return-0;if(o||typeof e!=`number`)throw Error(`Invalid input`);if(e in r)return r[e];let s=n[e];if(!s||typeof s!=`object`)r[e]=s;else if(Array.isArray(s))if(typeof s[0]==`string`){let o=s[0],c=t&&Object.hasOwn(t,o)?t[o]:void 0;if(c){let t=s[1];if(typeof t!=`number`&&(t=n.push(s[1])-1),i??=new Set,i.has(t))throw Error(`Invalid circular reference`);return i.add(t),r[e]=c(a(t)),i.delete(t),r[e]}switch(o){case`Date`:r[e]=new Date(s[1]);break;case`Set`:let t=new Set;r[e]=t;for(let e=1;e<s.length;e+=1)t.add(a(s[e]));break;case`Map`:let i=new Map;r[e]=i;for(let e=1;e<s.length;e+=2)i.set(a(s[e]),a(s[e+1]));break;case`RegExp`:r[e]=new RegExp(s[1],s[2]);break;case`Object`:{let t=s[1];if(typeof n[t]==`object`&&n[t][0]!==`BigInt`)throw Error(`Invalid input`);r[e]=Object(a(t));break}case`BigInt`:r[e]=BigInt(s[1]);break;case`null`:let c=Object.create(null);r[e]=c;for(let e=1;e<s.length;e+=2){if(s[e]===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");c[s[e]]=a(s[e+1])}break;case`Int8Array`:case`Uint8Array`:case`Uint8ClampedArray`:case`Int16Array`:case`Uint16Array`:case`Float16Array`:case`Int32Array`:case`Uint32Array`:case`Float32Array`:case`Float64Array`:case`BigInt64Array`:case`BigUint64Array`:case`DataView`:{if(n[s[1]][0]!==`ArrayBuffer`)throw Error(`Invalid data`);let t=globalThis[o],i=a(s[1]);r[e]=s[2]===void 0?new t(i):new t(i,s[2],s[3]);break}case`ArrayBuffer`:{let t=s[1];if(typeof t!=`string`)throw Error(`Invalid ArrayBuffer encoding`);r[e]=Pe(t);break}case`Temporal.Duration`:case`Temporal.Instant`:case`Temporal.PlainDate`:case`Temporal.PlainTime`:case`Temporal.PlainDateTime`:case`Temporal.PlainMonthDay`:case`Temporal.PlainYearMonth`:case`Temporal.ZonedDateTime`:{let t=o.slice(9);r[e]=Temporal[t].from(s[1]);break}case`URL`:r[e]=new URL(s[1]);break;case`URLSearchParams`:r[e]=new URLSearchParams(s[1]);break;default:throw Error(`Unknown type ${o}`)}}else if(s[0]===-7){let t=s[1];if(!Oe(t))throw Error(`Invalid input`);let n=[];r[e]=n,n[Ee]=void 0,delete n[Ee];for(let e=2;e<s.length;e+=2){let r=s[e];if(!De(r)||r>=t)throw Error(`Invalid input`);n[r]=a(s[e+1])}n.length=t}else{let t=Array(s.length);r[e]=t;for(let e=0;e<s.length;e+=1){let n=s[e];n!==-2&&(t[e]=a(n))}}else{let t={};r[e]=t;for(let e of Object.keys(s)){if(e===`__proto__`)throw Error("Cannot parse an object with a `__proto__` property");let n=s[e];t[e]=a(n)}}return r[e]}return a(0)}var Ie=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);new Set([...Ie,`entries`]);var Le=new Set([...Ie]);new Set([...Le,`actions`,`entries`]),new Set([`GET`,`POST`,`PATCH`,`PUT`,`DELETE`,`OPTIONS`,`HEAD`,`fallback`,`prerender`,`trailingSlash`,`config`,`entries`]);function Re(e){return e.filter(e=>e!=null)}var ze=`x-sveltekit-invalidated`,Be=`x-sveltekit-trailing-slash`;function Ve(e,t){return e+`/`+t}function He(e){return e instanceof c||e instanceof u?e.status:500}function Ue(e){return e instanceof u?e.text:`Internal Error`}var j,M,N,We=a.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(a.toString()),Ge=`a:`;We?(j={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(Ge)},M={current:null},N={current:!1}):(j=new class{#e=i({});get data(){return e(this.#e)}set data(e){n(this.#e,e)}#t=i(null);get form(){return e(this.#t)}set form(e){n(this.#t,e)}#n=i(null);get error(){return e(this.#n)}set error(e){n(this.#n,e)}#r=i({});get params(){return e(this.#r)}set params(e){n(this.#r,e)}#i=i({id:null});get route(){return e(this.#i)}set route(e){n(this.#i,e)}#a=i({});get state(){return e(this.#a)}set state(e){n(this.#a,e)}#o=i(-1);get status(){return e(this.#o)}set status(e){n(this.#o,e)}#s=i(new URL(Ge));get url(){return e(this.#s)}set url(e){n(this.#s,e)}},M=new class{#e=i(null);get current(){return e(this.#e)}set current(e){n(this.#e,e)}},N=new class{#e=i(!1);get current(){return e(this.#e)}set current(e){n(this.#e,e)}},xe.v=()=>N.current=!0);function Ke(e){Object.assign(j,e)}var qe=`/__data.json`,Je=`.html__data.json`;function Ye(e){return e.endsWith(`.html`)?e.replace(/\.html$/,Je):e.replace(/\/$/,``)+qe}async function*Xe(e){let t=!1,n=``,r=new TextDecoder;for(;;){let i=n.indexOf(`
2
2
  `);for(;i!==-1;){let e=n.slice(0,i).trim();n=n.slice(i+1),e&&(yield JSON.parse(e)),i=n.indexOf(`
3
- `)}if(t){let e=n.trim();e&&(yield JSON.parse(e));return}let a=await e.read();t=a.done,a.value&&(n+=r.decode(a.value,{stream:!0})),t&&(n+=r.decode())}}var{onMount:Ze,tick:Qe}=o,$e=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),P=null,F=se(`sveltekit:scroll`)??{},I=se(`sveltekit:snapshot`)??{},L={url:be({}),page:be({}),navigating:s(null),updated:Se()};function et(e){F[e]=k()}function tt(e,t){let n=e+1;for(;F[n];)delete F[n],n+=1;for(n=t+1;I[n];)delete I[n],n+=1}function R(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function nt(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(w||`/`);e&&await e.update()}}var rt,it,z,B,at,V,ot=[],st=[],H=null;function ct(){H?.fork?.then(e=>e?.discard()),H=null}var lt=new Map,ut=new Set,dt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},ft=!1,pt=!1,mt=!0,G=!1,K=!1,ht=!1,gt=!1,_t,q,J,Y,X=new Set,vt=new Map,yt=new Map;async function bt(e,t,n){globalThis.__sveltekit_rko9tn&&(globalThis.__sveltekit_rko9tn.query,globalThis.__sveltekit_rko9tn.prerender),document.URL!==location.href&&(location.href=location.href),V=e,await e.hooks.init?.(),rt=oe(e),B=document.documentElement,at=t,it=e.nodes[0],z=e.nodes[1],it(),z(),q=history.state?.[T],J=history.state?.[E],q||(q=J=Date.now(),history.replaceState({...history.state,[T]:q,[E]:J},``));let r=F[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Xt(at,n)):(await Q({type:`enter`,url:me(V.hash?rn(new URL(location.href)):location.href),replace_state:!0}),i()),Yt()}function xt(){ot.length=0,gt=!1}function St(e){st.some(e=>e?.snapshot)&&(I[e]=st.map(e=>e?.snapshot?.capture()))}function Ct(e){I[e]?.forEach((e,t)=>{st[t]?.snapshot?.restore(e)})}function wt(){et(q),ce(fe,F),St(J),ce(de,I)}async function Tt(e,t,n,i){let a,o;t.invalidateAll&&ct(),await Q({type:`goto`,url:me(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:i,accept:()=>{if(t.invalidateAll){gt=!0,a=new Set;for(let[e,t]of vt)for(let n of t.keys())a.add(Ve(e,n));o=new Set;for(let[e,t]of yt)for(let n of t.keys())o.add(Ve(e,n))}t.invalidate&&t.invalidate.forEach(Jt)}}),t.invalidateAll&&r().then(r).then(()=>{for(let[e,t]of vt)for(let[n,{resource:r}]of t)a?.has(Ve(e,n))&&r.refresh();for(let[e,t]of yt)for(let[n,{resource:r}]of t)o?.has(Ve(e,n))&&r.reconnect()})}async function Et(e){if(e.id!==H?.id){ct();let t={};X.add(t),H={id:e.id,token:t,promise:It({...e,preload:t}).then(e=>(X.delete(t),e.type===`loaded`&&e.state.error&&ct(),e)),fork:null}}return H.promise}async function Dt(e){let t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function Ot(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Ke(e.props.page),_t=new V.root({target:t,props:{...e.props,stores:L,components:st},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ct(J),n){let e={from:null,to:{...r,scroll:F[q]??k()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}pt=!0}async function kt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(w&&(e.pathname===w||e.pathname===w+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Re(n).map(e=>e.node.component),page:nn(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==j.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:j.data}),l}async function At({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function jt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:pt?b(r,i.href,t):y(r,t)}}function Mt(e,t,n,r,i,a){if(gt)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(ot.some(t=>t(new URL(e))))return!0;return!1}function Nt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Pt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Ft({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:nn(j),constructors:[]}}}async function It({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return X.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=null,p=W.url?e!==Vt(W.url):!1,m=W.route?i.id!==W.route.id:!1,ee=Pt(W.url,n),g=!1;{let t=d.map((e,t)=>{let n=W.branch[t],i=!!e?.[0]&&(n?.loader!==e[1]||Mt(g,m,p,ee,n.server?.uses,r));return i&&(g=!0),i});if(t.some(Boolean)){try{f=await Zt(n,t)}catch(t){let o=await $(t,{url:n,params:r,route:{id:e}});return X.has(a)?Ft({error:o,url:n,params:r,route:i}):Rt({status:He(t),error:o,url:n,route:i})}if(f.type===`redirect`)return f}}let _=f?.nodes,v=!1,y=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t],o=_?.[t];if((!o||o.type===`skip`)&&e[1]===a?.loader&&!Mt(v,m,p,ee,a.universal?.uses,r))return a;if(v=!0,o?.type===`error`)throw o;return At({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await y[n])?.data);return e},server_data_node:Nt(o===void 0&&e[0]?{type:`skip`}:o??null,e[0]?a?.server:void 0)})});for(let e of y)e.catch(h);let b=[];for(let e=0;e<d.length;e+=1)if(d[e])try{b.push(await y[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(X.has(a))return Ft({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=He(t),u;if(_?.includes(t))s=t.status??s,u=t.error;else if(t instanceof c)u=t.body;else{if(await L.updated.check())return await nt(),await R(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await Lt(e,b,o);return d?kt({url:n,params:r,branch:b.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ut(n,{id:i.id},u,s)}else b.push(void 0);return kt({url:n,params:r,branch:b,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Lt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Rt({status:e,error:t,url:n,route:r}){let i={},a=null;if(V.server_loads[0]===0)try{let e=await Zt(n,[!0]);if(e.type!==`data`||e.nodes[0]&&e.nodes[0].type!==`data`)throw 0;a=e.nodes[0]??null}catch{(n.origin!==O||n.pathname!==location.pathname||ft)&&await R(n)}try{return kt({url:n,params:i,branch:[await At({loader:it,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Nt(a)}),{node:await z(),loader:z,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return Tt(new URL(e.location,location.href),{},0);throw e}}async function zt(e){let t=e.href;if(lt.has(t))return lt.get(t);let n;try{let r=(async()=>{let t=await V.hooks.reroute({url:new URL(e),fetch:async(t,n)=>jt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);V.hash?n.hash=t:n.pathname=t,t=n}return t})();lt.set(t,r),n=await r}catch{lt.delete(t);return}return n}async function Z(e,t){if(e&&!Ce(e,w,V.hash)){let n=await zt(e);if(!n)return;let r=Bt(n);for(let n of rt){let i=n.exec(r);if(i)return{id:Vt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Bt(e){return f(V.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(w.length))||`/`}function Vt(e){return(V.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Ht({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=tn(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||ut.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:n,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await Z(n,!1),_=e===`enter`?tn(W,g,n,e):Ht({url:n,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let v=q,y=J;f(),G=!0,pt&&_.navigation.type!==`enter`&&L.navigating.set(M.current=_.navigation);let b=g&&await It(g);if(!b){if(Ce(n,w,V.hash))return await R(n,s);b=await Ut(n,{id:null},await $(new u(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,s)}if(n=g?.url||n,Y!==d)return _.reject(Error(`navigation aborted`)),!1;if(b.type===`redirect`){if(l<20){await Q({type:e,url:new URL(b.location,n),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}b=await Rt({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}})}else b.props.page.status>=400&&await L.updated.check()&&(await nt(),await R(n,s));if(xt(),et(v),St(y),b.props.page.url.pathname!==n.pathname&&(n.pathname=b.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[T]:q+=e,[E]:J+=e,[pe]:c};(s?history.replaceState:history.pushState).call(history,t,``,n),s||tt(q,J)}let x=g&&H?.id===g.id?H.fork:null;H?.fork&&!x&&ct(),H=null,b.props.page.state=c;let S;if(pt){let e=(await Promise.all(Array.from(dt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let r=_.navigation.to;W={...b.state,nav:{params:r.params,route:r.route,url:r.url}},b.props.page&&(b.props.page.url=n);let i=x&&await x;i?S=i.commit():(P=null,_t.$set(b.props),P&&Object.assign(b.props.page,P),Ke(b.props.page),S=t?.()),ht=!0}else await Ot(b,at,!1);let{activeElement:te}=document;if(await S,await r(),await r(),Y!==d)return _.reject(Error(`navigation aborted`)),!1;b.props.page&&P&&Object.assign(b.props.page,P);let C=null;if(mt){let e=i?i.scroll:o?k():null;e?scrollTo(e.x,e.y):(C=n.hash&&document.getElementById(an(n)))?C.scrollIntoView():scrollTo(0,0)}let ne=document.activeElement!==te&&document.activeElement!==document.body;!a&&!ne&&en(n,!C),mt=!0,G=!1,e===`popstate`&&Ct(J),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=k()),U.forEach(e=>e(_.navigation)),L.navigating.set(M.current=null)}async function Ut(e,t,n,r,i){return e.origin===O&&e.pathname===location.pathname&&!ft?await Rt({status:r,error:n,url:e,route:t}):await R(e,i)}function Wt(){let e,t={element:void 0,href:void 0},n;B.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,D.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],D.tap)}B.addEventListener(`mousedown`,r),B.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(Dt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=_e(e,B),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=ve(i,w,V.hash);if(s||c)return;let l=ye(i),u=o&&Vt(W.url)===Vt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=D.tap;let e=await Z(o,!1);if(!e)return;Et(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,Dt(o))}function o(){i.disconnect();for(let e of B.querySelectorAll(`a`)){let{url:t,external:n,download:r}=ve(e,w,V.hash);if(n||r)continue;let a=ye(e);a.reload||(a.preload_code===D.viewport&&i.observe(e),a.preload_code===D.eager&&Dt(t))}}U.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=He(e),r=Ue(e);return V.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Gt(e,t){Ze(()=>(e.add(t),()=>{e.delete(t)}))}function Kt(e){Gt(U,e)}function qt(e,t={}){return e=new URL(me(e)),e.origin===O?Tt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Jt(e){if(typeof e==`function`)ot.push(e);else{let{href:t}=new URL(e,location.href);ot.push(e=>e.href===t)}}function Yt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(wt(),!G){let e=tn(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};ut.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&wt()}),!navigator.connection?.saveData&&!/2g/.test(navigator.connection?.effectiveType)&&Wt(),B.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=_e(t.composedPath()[0],B);if(!n)return;let{url:r,external:i,target:a,download:o}=ve(n,w,V.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=ye(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(V.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Ht({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,et(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),B.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(Ce(r,w,!1))return;let i=e.target,a=ye(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!$t)if(t.state?.[`sveltekit:history`]){let n=t.state[T];if(Y={},n===q)return;let r=F[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[E],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ht||s)){i!==j.state&&(j.state=i),e(a),F[q]=k(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),V.hash&&location.reload())}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[T]:++q,[E]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))$e.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&L.navigating.set(M.current=null)});function e(e){W.url=j.url=e,L.page.set(nn(j)),L.page.notify()}}async function Xt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){ft=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await Z(u,!1)||{}),d=rt.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Qt(r.uses)),At({loader:V.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Nt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await kt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l){await R(new URL(t.location,location.href));return}f=await Rt({status:He(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await Ot(f,e,p)}async function Zt(e,t){let n=new URL(e);n.pathname=Ye(e.pathname),e.pathname.endsWith(`/`)&&n.searchParams.append(Be,`1`),n.searchParams.append(ze,t.map(e=>e?`1`:`0`).join(``));let r=await(0,window.fetch)(n.href,{});if(!r.ok){let e;throw r.headers.get(`content-type`)?.includes(`application/json`)?e=await r.json():r.status===404?e=`Not Found`:r.status===500&&(e=`Internal Error`),new c(r.status,e)}return new Promise(async e=>{let t=new Map,n=r.body.getReader();function i(e){return Fe(e,{...V.decoders,Promise:e=>new Promise((n,r)=>{t.set(e,{fulfil:n,reject:r})})})}for await(let r of Xe(n)){if(r.type===`redirect`)return e(r);if(r.type===`data`)r.nodes?.forEach(e=>{e?.type===`data`&&(e.uses=Qt(e.uses),e.data=i(e.data))}),e(r);else if(r.type===`chunk`){let{id:e,data:n,error:a}=r,o=t.get(e);t.delete(e),a?o.reject(i(a)):o.fulfil(i(n))}}})}function Qt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var $t=!1;function en(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=an(e);if(n&&document.getElementById(n)){let{x:r,y:i}=k();setTimeout(()=>{let a=history.state;$t=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),$t=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function tn(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:k()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function nn(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function rn(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function an(e){let t;if(V.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{M as a,we as c,L as i,w as l,qt as n,j as o,bt as r,N as s,Kt as t};
3
+ `)}if(t){let e=n.trim();e&&(yield JSON.parse(e));return}let a=await e.read();t=a.done,a.value&&(n+=r.decode(a.value,{stream:!0})),t&&(n+=r.decode())}}var{onMount:Ze,tick:Qe}=o,$e=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),P=null,F=se(`sveltekit:scroll`)??{},I=se(`sveltekit:snapshot`)??{},L={url:be({}),page:be({}),navigating:s(null),updated:Se()};function et(e){F[e]=k()}function tt(e,t){let n=e+1;for(;F[n];)delete F[n],n+=1;for(n=t+1;I[n];)delete I[n],n+=1}function R(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function nt(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(w||`/`);e&&await e.update()}}var rt,it,z,B,at,V,ot=[],st=[],H=null;function ct(){H?.fork?.then(e=>e?.discard()),H=null}var lt=new Map,ut=new Set,dt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},ft=!1,pt=!1,mt=!0,G=!1,K=!1,ht=!1,gt=!1,_t,q,J,Y,X=new Set,vt=new Map,yt=new Map;async function bt(e,t,n){globalThis.__sveltekit_5lyl03&&(globalThis.__sveltekit_5lyl03.query,globalThis.__sveltekit_5lyl03.prerender),document.URL!==location.href&&(location.href=location.href),V=e,await e.hooks.init?.(),rt=oe(e),B=document.documentElement,at=t,it=e.nodes[0],z=e.nodes[1],it(),z(),q=history.state?.[T],J=history.state?.[E],q||(q=J=Date.now(),history.replaceState({...history.state,[T]:q,[E]:J},``));let r=F[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Xt(at,n)):(await Q({type:`enter`,url:me(V.hash?rn(new URL(location.href)):location.href),replace_state:!0}),i()),Yt()}function xt(){ot.length=0,gt=!1}function St(e){st.some(e=>e?.snapshot)&&(I[e]=st.map(e=>e?.snapshot?.capture()))}function Ct(e){I[e]?.forEach((e,t)=>{st[t]?.snapshot?.restore(e)})}function wt(){et(q),ce(fe,F),St(J),ce(de,I)}async function Tt(e,t,n,i){let a,o;t.invalidateAll&&ct(),await Q({type:`goto`,url:me(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:i,accept:()=>{if(t.invalidateAll){gt=!0,a=new Set;for(let[e,t]of vt)for(let n of t.keys())a.add(Ve(e,n));o=new Set;for(let[e,t]of yt)for(let n of t.keys())o.add(Ve(e,n))}t.invalidate&&t.invalidate.forEach(Jt)}}),t.invalidateAll&&r().then(r).then(()=>{for(let[e,t]of vt)for(let[n,{resource:r}]of t)a?.has(Ve(e,n))&&r.refresh();for(let[e,t]of yt)for(let[n,{resource:r}]of t)o?.has(Ve(e,n))&&r.reconnect()})}async function Et(e){if(e.id!==H?.id){ct();let t={};X.add(t),H={id:e.id,token:t,promise:It({...e,preload:t}).then(e=>(X.delete(t),e.type===`loaded`&&e.state.error&&ct(),e)),fork:null}}return H.promise}async function Dt(e){let t=(await Z(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function Ot(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Ke(e.props.page),_t=new V.root({target:t,props:{...e.props,stores:L,components:st},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ct(J),n){let e={from:null,to:{...r,scroll:F[q]??k()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}pt=!0}async function kt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(w&&(e.pathname===w||e.pathname===w+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Re(n).map(e=>e.node.component),page:nn(j)}};s!==void 0&&(l.props.form=s);let u={},f=!j,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==j.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:j.data}),l}async function At({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},s=await e();return{node:s,loader:e,server:a,universal:s.universal?.load?{type:`data`,data:null,uses:o}:null,data:a?.data??null,slash:s.universal?.trailingSlash??a?.slash}}function jt(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:pt?b(r,i.href,t):y(r,t)}}function Mt(e,t,n,r,i,a){if(gt)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(ot.some(t=>t(new URL(e))))return!0;return!1}function Nt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Pt(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Ft({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:nn(j),constructors:[]}}}async function It({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(H?.id===e)return X.delete(H.token),H.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=null,p=W.url?e!==Vt(W.url):!1,m=W.route?i.id!==W.route.id:!1,ee=Pt(W.url,n),g=!1;{let t=d.map((e,t)=>{let n=W.branch[t],i=!!e?.[0]&&(n?.loader!==e[1]||Mt(g,m,p,ee,n.server?.uses,r));return i&&(g=!0),i});if(t.some(Boolean)){try{f=await Zt(n,t)}catch(t){let o=await $(t,{url:n,params:r,route:{id:e}});return X.has(a)?Ft({error:o,url:n,params:r,route:i}):Rt({status:He(t),error:o,url:n,route:i})}if(f.type===`redirect`)return f}}let _=f?.nodes,v=!1,y=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t],o=_?.[t];if((!o||o.type===`skip`)&&e[1]===a?.loader&&!Mt(v,m,p,ee,a.universal?.uses,r))return a;if(v=!0,o?.type===`error`)throw o;return At({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await y[n])?.data);return e},server_data_node:Nt(o===void 0&&e[0]?{type:`skip`}:o??null,e[0]?a?.server:void 0)})});for(let e of y)e.catch(h);let b=[];for(let e=0;e<d.length;e+=1)if(d[e])try{b.push(await y[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(X.has(a))return Ft({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=He(t),u;if(_?.includes(t))s=t.status??s,u=t.error;else if(t instanceof c)u=t.body;else{if(await L.updated.check())return await nt(),await R(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await Lt(e,b,o);return d?kt({url:n,params:r,branch:b.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ut(n,{id:i.id},u,s)}else b.push(void 0);return kt({url:n,params:r,branch:b,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function Lt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Rt({status:e,error:t,url:n,route:r}){let i={},a=null;if(V.server_loads[0]===0)try{let e=await Zt(n,[!0]);if(e.type!==`data`||e.nodes[0]&&e.nodes[0].type!==`data`)throw 0;a=e.nodes[0]??null}catch{(n.origin!==O||n.pathname!==location.pathname||ft)&&await R(n)}try{return kt({url:n,params:i,branch:[await At({loader:it,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Nt(a)}),{node:await z(),loader:z,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(e){if(e instanceof l)return Tt(new URL(e.location,location.href),{},0);throw e}}async function zt(e){let t=e.href;if(lt.has(t))return lt.get(t);let n;try{let r=(async()=>{let t=await V.hooks.reroute({url:new URL(e),fetch:async(t,n)=>jt(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);V.hash?n.hash=t:n.pathname=t,t=n}return t})();lt.set(t,r),n=await r}catch{lt.delete(t);return}return n}async function Z(e,t){if(e&&!Ce(e,w,V.hash)){let n=await zt(e);if(!n)return;let r=Bt(n);for(let n of rt){let i=n.exec(r);if(i)return{id:Vt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Bt(e){return f(V.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(w.length))||`/`}function Vt(e){return(V.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Ht({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=tn(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||ut.forEach(e=>e(c)),o?null:s}async function Q({type:e,url:n,popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await Z(n,!1),_=e===`enter`?tn(W,g,n,e):Ht({url:n,type:e,delta:i?.delta,intent:g,scroll:i?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let v=q,y=J;f(),G=!0,pt&&_.navigation.type!==`enter`&&L.navigating.set(M.current=_.navigation);let b=g&&await It(g);if(!b){if(Ce(n,w,V.hash))return await R(n,s);b=await Ut(n,{id:null},await $(new u(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,s)}if(n=g?.url||n,Y!==d)return _.reject(Error(`navigation aborted`)),!1;if(b.type===`redirect`){if(l<20){await Q({type:e,url:new URL(b.location,n),popped:i,keepfocus:a,noscroll:o,replace_state:s,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}b=await Rt({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}})}else b.props.page.status>=400&&await L.updated.check()&&(await nt(),await R(n,s));if(xt(),et(v),St(y),b.props.page.url.pathname!==n.pathname&&(n.pathname=b.props.page.url.pathname),c=i?i.state:c,!i){let e=+!s,t={[T]:q+=e,[E]:J+=e,[pe]:c};(s?history.replaceState:history.pushState).call(history,t,``,n),s||tt(q,J)}let x=g&&H?.id===g.id?H.fork:null;H?.fork&&!x&&ct(),H=null,b.props.page.state=c;let S;if(pt){let e=(await Promise.all(Array.from(dt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let r=_.navigation.to;W={...b.state,nav:{params:r.params,route:r.route,url:r.url}},b.props.page&&(b.props.page.url=n);let i=x&&await x;i?S=i.commit():(P=null,_t.$set(b.props),P&&Object.assign(b.props.page,P),Ke(b.props.page),S=t?.()),ht=!0}else await Ot(b,at,!1);let{activeElement:te}=document;if(await S,await r(),await r(),Y!==d)return _.reject(Error(`navigation aborted`)),!1;b.props.page&&P&&Object.assign(b.props.page,P);let C=null;if(mt){let e=i?i.scroll:o?k():null;e?scrollTo(e.x,e.y):(C=n.hash&&document.getElementById(an(n)))?C.scrollIntoView():scrollTo(0,0)}let ne=document.activeElement!==te&&document.activeElement!==document.body;!a&&!ne&&en(n,!C),mt=!0,G=!1,e===`popstate`&&Ct(J),_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=k()),U.forEach(e=>e(_.navigation)),L.navigating.set(M.current=null)}async function Ut(e,t,n,r,i){return e.origin===O&&e.pathname===location.pathname&&!ft?await Rt({status:r,error:n,url:e,route:t}):await R(e,i)}function Wt(){let e,t={element:void 0,href:void 0},n;B.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{a(n,D.hover)},20)});function r(e){e.defaultPrevented||a(e.composedPath()[0],D.tap)}B.addEventListener(`mousedown`,r),B.addEventListener(`touchstart`,r,{passive:!0});let i=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(Dt(new URL(t.target.href)),i.unobserve(t.target))},{threshold:0});async function a(e,r){let i=_e(e,B),a=i===t.element&&i?.href===t.href&&r>=n;if(!i||a)return;let{url:o,external:s,download:c}=ve(i,w,V.hash);if(s||c)return;let l=ye(i),u=o&&Vt(W.url)===Vt(o);if(!(l.reload||u))if(r<=l.preload_data){t={element:i,href:i.href},n=D.tap;let e=await Z(o,!1);if(!e)return;Et(e)}else r<=l.preload_code&&(t={element:i,href:i.href},n=r,Dt(o))}function o(){i.disconnect();for(let e of B.querySelectorAll(`a`)){let{url:t,external:n,download:r}=ve(e,w,V.hash);if(n||r)continue;let a=ye(e);a.reload||(a.preload_code===D.viewport&&i.observe(e),a.preload_code===D.eager&&Dt(t))}}U.add(o),o()}function $(e,t){if(e instanceof c)return e.body;let n=He(e),r=Ue(e);return V.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Gt(e,t){Ze(()=>(e.add(t),()=>{e.delete(t)}))}function Kt(e){Gt(U,e)}function qt(e,t={}){return e=new URL(me(e)),e.origin===O?Tt(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Jt(e){if(typeof e==`function`)ot.push(e);else{let{href:t}=new URL(e,location.href);ot.push(e=>e.href===t)}}function Yt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(wt(),!G){let e=tn(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};ut.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&wt()}),!navigator.connection?.saveData&&!/2g/.test(navigator.connection?.effectiveType)&&Wt(),B.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=_e(t.composedPath()[0],B);if(!n)return;let{url:r,external:i,target:a,download:o}=ve(n,w,V.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=ye(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&!(r.protocol===`https:`||r.protocol===`http:`)||o)return;let[c,l]=(V.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Ht({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,et(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Q({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),B.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(Ce(r,w,!1))return;let i=e.target,a=ye(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Q({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!$t)if(t.state?.[`sveltekit:history`]){let n=t.state[T];if(Y={},n===q)return;let r=F[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[E],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ht||s)){i!==j.state&&(j.state=i),e(a),F[q]=k(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Q({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),V.hash&&location.reload())}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[T]:++q,[E]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))$e.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&L.navigating.set(M.current=null)});function e(e){W.url=j.url=e,L.page.set(nn(j)),L.page.notify()}}async function Xt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){ft=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await Z(u,!1)||{}),d=rt.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Qt(r.uses)),At({loader:V.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Nt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await kt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l){await R(new URL(t.location,location.href));return}f=await Rt({status:He(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f.props.page&&(f.props.page.state={}),await Ot(f,e,p)}async function Zt(e,t){let n=new URL(e);n.pathname=Ye(e.pathname),e.pathname.endsWith(`/`)&&n.searchParams.append(Be,`1`),n.searchParams.append(ze,t.map(e=>e?`1`:`0`).join(``));let r=await(0,window.fetch)(n.href,{});if(!r.ok){let e;throw r.headers.get(`content-type`)?.includes(`application/json`)?e=await r.json():r.status===404?e=`Not Found`:r.status===500&&(e=`Internal Error`),new c(r.status,e)}return new Promise(async e=>{let t=new Map,n=r.body.getReader();function i(e){return Fe(e,{...V.decoders,Promise:e=>new Promise((n,r)=>{t.set(e,{fulfil:n,reject:r})})})}for await(let r of Xe(n)){if(r.type===`redirect`)return e(r);if(r.type===`data`)r.nodes?.forEach(e=>{e?.type===`data`&&(e.uses=Qt(e.uses),e.data=i(e.data))}),e(r);else if(r.type===`chunk`){let{id:e,data:n,error:a}=r,o=t.get(e);t.delete(e),a?o.reject(i(a)):o.fulfil(i(n))}}})}function Qt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var $t=!1;function en(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=an(e);if(n&&document.getElementById(n)){let{x:r,y:i}=k();setTimeout(()=>{let a=history.state;$t=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),$t=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function tn(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:k()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function nn(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function rn(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function an(e){let t;if(V.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{M as a,we as c,L as i,w as l,qt as n,j as o,bt as r,N as s,Kt as t};
@@ -0,0 +1 @@
1
+ import{h as e}from"./DG5yTEkY.js";import"./CEW3xh3M.js";import"./0tC8Ubqr.js";import"./CXC42hVj2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import"./29nvmPLe2.js";import"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import"./DPoU52N62.js";import"./CUWABXvb2.js";import"./vx_Tnhqd2.js";import{i as t,n,r,t as i}from"./0oJDGpiH.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -0,0 +1 @@
1
+ import{h as e}from"./DG5yTEkY.js";import"./CEW3xh3M.js";import"./0tC8Ubqr.js";import"./CXC42hVj2.js";import"./BjVjgMFk2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import"./B8E5l9fg2.js";import"./29nvmPLe2.js";import"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import"./DPoU52N62.js";import"./CUWABXvb2.js";import"./vx_Tnhqd2.js";import{i as t,n,r,t as i}from"./DC_PITHB2.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./DG5yTEkY.js";import{$ as r,G as i,H as a,K as o,U as s,a as c,d as l,it as u,s as d,v as f,w as ee,x as p,y as m}from"./CEW3xh3M.js";import{t as h}from"./C6Oj8XFW.js";import{c as g,g as _}from"./0tC8Ubqr.js";import"./CXC42hVj.js";import{t as te}from"./BjVjgMFk2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import{t as ne}from"./B8E5l9fg2.js";import{t as re}from"./29nvmPLe2.js";import{t as v}from"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import{o as y}from"./Bie0X5s02.js";import"./B1eXHGII2.js";import{r as b,t as x}from"./BNdlLOgu2.js";import{n as S,t as C}from"./aheLp5ES.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=s,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=m,this.getAccDescription=f,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(t,n,r,i,a,o,s={},c){if(!t||t.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
1
+ import{g as e,h as t,p as n}from"./DG5yTEkY.js";import{$ as r,G as i,H as a,K as o,U as s,a as c,d as l,it as u,s as d,v as f,w as ee,x as p,y as m}from"./CEW3xh3M.js";import{t as h}from"./C6Oj8XFW.js";import{c as g,g as _}from"./0tC8Ubqr.js";import"./CXC42hVj2.js";import{t as te}from"./BjVjgMFk2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import{t as ne}from"./B8E5l9fg2.js";import{t as re}from"./29nvmPLe2.js";import{t as v}from"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import{o as y}from"./DPoU52N62.js";import"./CUWABXvb2.js";import{r as b,t as x}from"./vx_Tnhqd2.js";import{n as S,t as C}from"./aheLp5ES.js";var w=`flowchart-`,T=class{constructor(){this.vertexCounter=0,this.config=p(),this.diagramId=``,this.vertices=new Map,this.edges=[],this.classes=new Map,this.subGraphs=[],this.subGraphLookup=new Map,this.tooltips=new Map,this.subCount=0,this.firstGraphFlag=!0,this.secCount=-1,this.posCrossRef=[],this.funs=[],this.setAccTitle=s,this.setAccDescription=a,this.setDiagramTitle=o,this.getAccTitle=m,this.getAccDescription=f,this.getDiagramTitle=ee,this.funs.push(this.setupToolTips.bind(this)),this.addVertex=this.addVertex.bind(this),this.firstGraph=this.firstGraph.bind(this),this.setDirection=this.setDirection.bind(this),this.addSubGraph=this.addSubGraph.bind(this),this.addLink=this.addLink.bind(this),this.setLink=this.setLink.bind(this),this.updateLink=this.updateLink.bind(this),this.addClass=this.addClass.bind(this),this.setClass=this.setClass.bind(this),this.destructLink=this.destructLink.bind(this),this.setClickEvent=this.setClickEvent.bind(this),this.setTooltip=this.setTooltip.bind(this),this.updateLinkInterpolate=this.updateLinkInterpolate.bind(this),this.setClickFun=this.setClickFun.bind(this),this.bindFunctions=this.bindFunctions.bind(this),this.lex={firstGraph:this.firstGraph.bind(this)},this.clear(),this.setGen(`gen-2`)}static{t(this,`FlowDB`)}sanitizeText(e){return d.sanitizeText(e,this.config)}sanitizeNodeLabelType(e){switch(e){case`markdown`:case`string`:case`text`:return e;default:return`markdown`}}setDiagramId(e){this.diagramId=e}lookUpDomId(e){for(let t of this.vertices.values())if(t.id===e)return this.diagramId?`${this.diagramId}-${t.domId}`:t.domId;return this.diagramId?`${this.diagramId}-${e}`:e}addVertex(t,n,r,i,a,o,s={},c){if(!t||t.trim().length===0)return;let l;if(c!==void 0){let e;e=c.includes(`
2
2
  `)?c+`
3
3
  `:`{
4
4
  `+c+`
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,m as n,p as r}from"./DG5yTEkY.js";import{H as i,K as a,U as o,a as s,it as c,v as l,w as u,x as d,y as f}from"./CEW3xh3M.js";import{t as p}from"./C6Oj8XFW.js";import{c as m,g as h}from"./0tC8Ubqr.js";import"./CXC42hVj.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import{t as g}from"./29nvmPLe2.js";import{t as _}from"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import"./Bie0X5s02.js";import"./B1eXHGII2.js";import{r as v,t as y}from"./BNdlLOgu2.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(n,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,79]),e(n,[2,80]),e(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(n,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(n,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(n,[2,20]),e(n,[2,23],{17:[1,119],42:j}),e(n,[2,11]),{13:[1,120],42:j},e(n,[2,10]),e(J,[2,68]),e(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
1
+ import{g as e,h as t,m as n,p as r}from"./DG5yTEkY.js";import{H as i,K as a,U as o,a as s,it as c,v as l,w as u,x as d,y as f}from"./CEW3xh3M.js";import{t as p}from"./C6Oj8XFW.js";import{c as m,g as h}from"./0tC8Ubqr.js";import"./CXC42hVj2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import{t as g}from"./29nvmPLe2.js";import{t as _}from"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import"./DPoU52N62.js";import"./CUWABXvb2.js";import{r as v,t as y}from"./vx_Tnhqd2.js";var b=(function(){var e=t(function(e,t,n,r){for(n||={},r=e.length;r--;n[e[r]]=t);return n},`o`),n=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52],r=[1,10],i=[1,11],a=[1,12],o=[1,13],s=[1,23],c=[1,24],l=[1,25],u=[1,26],d=[1,27],f=[1,19],p=[1,28],m=[1,29],h=[1,20],g=[1,18],_=[1,21],v=[1,22],y=[1,36],b=[1,37],x=[1,38],S=[1,39],C=[1,40],w=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,48,50,51,52,65,66,67,68,69],T=[1,45],E=[1,46],D=[1,55],O=[40,48,50,51,52,70,71],k=[1,66],A=[1,64],j=[1,61],M=[1,65],N=[1,67],P=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,51,52,65,66,67,68,69],F=[65,66,67,68,69],I=[1,84],L=[1,83],R=[1,81],z=[1,82],B=[6,10,42,47],V=[6,10,13,41,42,47,48,49],H=[1,92],U=[1,91],W=[1,90],G=[19,58],K=[1,101],q=[1,100],J=[19,58,60,62],Y={trace:t(function(){},`trace`),yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,entityName:11,relSpec:12,COLON:13,role:14,STYLE_SEPARATOR:15,idList:16,BLOCK_START:17,attributes:18,BLOCK_STOP:19,SQS:20,SQE:21,title:22,title_value:23,acc_title:24,acc_title_value:25,acc_descr:26,acc_descr_value:27,acc_descr_multiline_value:28,direction:29,classDefStatement:30,classStatement:31,styleStatement:32,direction_tb:33,direction_bt:34,direction_rl:35,direction_lr:36,CLASSDEF:37,stylesOpt:38,separator:39,UNICODE_TEXT:40,STYLE_TEXT:41,COMMA:42,CLASS:43,STYLE:44,style:45,styleComponent:46,SEMI:47,NUM:48,BRKT:49,ENTITY_NAME:50,DECIMAL_NUM:51,ENTITY_ONE:52,attribute:53,attributeType:54,attributeName:55,attributeKeyTypeList:56,attributeComment:57,ATTRIBUTE_WORD:58,attributeKeyType:59,",":60,ATTRIBUTE_KEY:61,COMMENT:62,cardinality:63,relType:64,ZERO_OR_ONE:65,ZERO_OR_MORE:66,ONE_OR_MORE:67,ONLY_ONE:68,MD_PARENT:69,NON_IDENTIFYING:70,IDENTIFYING:71,WORD:72,$accept:0,$end:1},terminals_:{2:`error`,4:`ER_DIAGRAM`,6:`EOF`,8:`SPACE`,10:`NEWLINE`,13:`COLON`,15:`STYLE_SEPARATOR`,17:`BLOCK_START`,19:`BLOCK_STOP`,20:`SQS`,21:`SQE`,22:`title`,23:`title_value`,24:`acc_title`,25:`acc_title_value`,26:`acc_descr`,27:`acc_descr_value`,28:`acc_descr_multiline_value`,33:`direction_tb`,34:`direction_bt`,35:`direction_rl`,36:`direction_lr`,37:`CLASSDEF`,40:`UNICODE_TEXT`,41:`STYLE_TEXT`,42:`COMMA`,43:`CLASS`,44:`STYLE`,47:`SEMI`,48:`NUM`,49:`BRKT`,50:`ENTITY_NAME`,51:`DECIMAL_NUM`,52:`ENTITY_ONE`,58:`ATTRIBUTE_WORD`,60:`,`,61:`ATTRIBUTE_KEY`,62:`COMMENT`,65:`ZERO_OR_ONE`,66:`ZERO_OR_MORE`,67:`ONE_OR_MORE`,68:`ONLY_ONE`,69:`MD_PARENT`,70:`NON_IDENTIFYING`,71:`IDENTIFYING`,72:`WORD`},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,5],[9,9],[9,7],[9,7],[9,4],[9,6],[9,3],[9,5],[9,1],[9,3],[9,7],[9,9],[9,6],[9,8],[9,4],[9,6],[9,2],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[9,1],[29,1],[29,1],[29,1],[29,1],[30,4],[16,1],[16,1],[16,3],[16,3],[31,3],[32,4],[38,1],[38,3],[45,1],[45,2],[39,1],[39,1],[39,1],[46,1],[46,1],[46,1],[46,1],[11,1],[11,1],[11,1],[11,1],[11,1],[18,1],[18,2],[53,2],[53,3],[53,3],[53,4],[54,1],[55,1],[56,1],[56,3],[59,1],[57,1],[12,3],[63,1],[63,1],[63,1],[63,1],[63,1],[64,1],[64,1],[14,1],[14,1],[14,1]],performAction:t(function(e,t,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 2:this.$=[];break;case 3:a[s-1].push(a[s]),this.$=a[s-1];break;case 4:case 5:this.$=a[s];break;case 6:case 7:this.$=[];break;case 8:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 9:r.addEntity(a[s-8]),r.addEntity(a[s-4]),r.addRelationship(a[s-8],a[s],a[s-4],a[s-5]),r.setClass([a[s-8]],a[s-6]),r.setClass([a[s-4]],a[s-2]);break;case 10:r.addEntity(a[s-6]),r.addEntity(a[s-2]),r.addRelationship(a[s-6],a[s],a[s-2],a[s-3]),r.setClass([a[s-6]],a[s-4]);break;case 11:r.addEntity(a[s-6]),r.addEntity(a[s-4]),r.addRelationship(a[s-6],a[s],a[s-4],a[s-5]),r.setClass([a[s-4]],a[s-2]);break;case 12:r.addEntity(a[s-3]),r.addAttributes(a[s-3],a[s-1]);break;case 13:r.addEntity(a[s-5]),r.addAttributes(a[s-5],a[s-1]),r.setClass([a[s-5]],a[s-3]);break;case 14:r.addEntity(a[s-2]);break;case 15:r.addEntity(a[s-4]),r.setClass([a[s-4]],a[s-2]);break;case 16:r.addEntity(a[s]);break;case 17:r.addEntity(a[s-2]),r.setClass([a[s-2]],a[s]);break;case 18:r.addEntity(a[s-6],a[s-4]),r.addAttributes(a[s-6],a[s-1]);break;case 19:r.addEntity(a[s-8],a[s-6]),r.addAttributes(a[s-8],a[s-1]),r.setClass([a[s-8]],a[s-3]);break;case 20:r.addEntity(a[s-5],a[s-3]);break;case 21:r.addEntity(a[s-7],a[s-5]),r.setClass([a[s-7]],a[s-2]);break;case 22:r.addEntity(a[s-3],a[s-1]);break;case 23:r.addEntity(a[s-5],a[s-3]),r.setClass([a[s-5]],a[s]);break;case 24:case 25:this.$=a[s].trim(),r.setAccTitle(this.$);break;case 26:case 27:this.$=a[s].trim(),r.setAccDescription(this.$);break;case 32:r.setDirection(`TB`);break;case 33:r.setDirection(`BT`);break;case 34:r.setDirection(`RL`);break;case 35:r.setDirection(`LR`);break;case 36:this.$=a[s-3],r.addClass(a[s-2],a[s-1]);break;case 37:case 38:case 59:case 67:this.$=[a[s]];break;case 39:case 40:this.$=a[s-2].concat([a[s]]);break;case 41:this.$=a[s-2],r.setClass(a[s-1],a[s]);break;case 42:this.$=a[s-3],r.addCssStyles(a[s-2],a[s-1]);break;case 43:this.$=[a[s]];break;case 44:a[s-2].push(a[s]),this.$=a[s-2];break;case 46:this.$=a[s-1]+a[s];break;case 54:case 79:case 80:this.$=a[s].replace(/"/g,``);break;case 55:case 56:case 57:case 58:case 81:this.$=a[s];break;case 60:a[s].push(a[s-1]),this.$=a[s];break;case 61:this.$={type:a[s-1],name:a[s]};break;case 62:this.$={type:a[s-2],name:a[s-1],keys:a[s]};break;case 63:this.$={type:a[s-2],name:a[s-1],comment:a[s]};break;case 64:this.$={type:a[s-3],name:a[s-2],keys:a[s-1],comment:a[s]};break;case 65:case 66:case 69:this.$=a[s];break;case 68:a[s-2].push(a[s]),this.$=a[s-2];break;case 70:this.$=a[s].replace(/"/g,``);break;case 71:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 72:this.$=r.Cardinality.ZERO_OR_ONE;break;case 73:this.$=r.Cardinality.ZERO_OR_MORE;break;case 74:this.$=r.Cardinality.ONE_OR_MORE;break;case 75:this.$=r.Cardinality.ONLY_ONE;break;case 76:this.$=r.Cardinality.MD_PARENT;break;case 77:this.$=r.Identification.NON_IDENTIFYING;break;case 78:this.$=r.Identification.IDENTIFYING;break}},`anonymous`),table:[{3:1,4:[1,2]},{1:[3]},e(n,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,7],{1:[2,1]}),e(n,[2,3]),{9:30,11:9,22:r,24:i,26:a,28:o,29:14,30:15,31:16,32:17,33:s,34:c,35:l,36:u,37:d,40:f,43:p,44:m,48:h,50:g,51:_,52:v},e(n,[2,5]),e(n,[2,6]),e(n,[2,16],{12:31,63:35,15:[1,32],17:[1,33],20:[1,34],65:y,66:b,67:x,68:S,69:C}),{23:[1,41]},{25:[1,42]},{27:[1,43]},e(n,[2,27]),e(n,[2,28]),e(n,[2,29]),e(n,[2,30]),e(n,[2,31]),e(w,[2,54]),e(w,[2,55]),e(w,[2,56]),e(w,[2,57]),e(w,[2,58]),e(n,[2,32]),e(n,[2,33]),e(n,[2,34]),e(n,[2,35]),{16:44,40:T,41:E},{16:47,40:T,41:E},{16:48,40:T,41:E},e(n,[2,4]),{11:49,40:f,48:h,50:g,51:_,52:v},{16:50,40:T,41:E},{18:51,19:[1,52],53:53,54:54,58:D},{11:56,40:f,48:h,50:g,51:_,52:v},{64:57,70:[1,58],71:[1,59]},e(O,[2,72]),e(O,[2,73]),e(O,[2,74]),e(O,[2,75]),e(O,[2,76]),e(n,[2,24]),e(n,[2,25]),e(n,[2,26]),{13:k,38:60,41:A,42:j,45:62,46:63,48:M,49:N},e(P,[2,37]),e(P,[2,38]),{16:68,40:T,41:E,42:j},{13:k,38:69,41:A,42:j,45:62,46:63,48:M,49:N},{13:[1,70],15:[1,71]},e(n,[2,17],{63:35,12:72,17:[1,73],42:j,65:y,66:b,67:x,68:S,69:C}),{19:[1,74]},e(n,[2,14]),{18:75,19:[2,59],53:53,54:54,58:D},{55:76,58:[1,77]},{58:[2,65]},{21:[1,78]},{63:79,65:y,66:b,67:x,68:S,69:C},e(F,[2,77]),e(F,[2,78]),{6:I,10:L,39:80,42:R,47:z},{40:[1,85],41:[1,86]},e(B,[2,43],{46:87,13:k,41:A,48:M,49:N}),e(V,[2,45]),e(V,[2,50]),e(V,[2,51]),e(V,[2,52]),e(V,[2,53]),e(n,[2,41],{42:j}),{6:I,10:L,39:88,42:R,47:z},{14:89,40:H,50:U,72:W},{16:93,40:T,41:E},{11:94,40:f,48:h,50:g,51:_,52:v},{18:95,19:[1,96],53:53,54:54,58:D},e(n,[2,12]),{19:[2,60]},e(G,[2,61],{56:97,57:98,59:99,61:K,62:q}),e([19,58,61,62],[2,66]),e(n,[2,22],{15:[1,103],17:[1,102]}),e([40,48,50,51,52],[2,71]),e(n,[2,36]),{13:k,41:A,45:104,46:63,48:M,49:N},e(n,[2,47]),e(n,[2,48]),e(n,[2,49]),e(P,[2,39]),e(P,[2,40]),e(V,[2,46]),e(n,[2,42]),e(n,[2,8]),e(n,[2,79]),e(n,[2,80]),e(n,[2,81]),{13:[1,105],42:j},{13:[1,107],15:[1,106]},{19:[1,108]},e(n,[2,15]),e(G,[2,62],{57:109,60:[1,110],62:q}),e(G,[2,63]),e(J,[2,67]),e(G,[2,70]),e(J,[2,69]),{18:111,19:[1,112],53:53,54:54,58:D},{16:113,40:T,41:E},e(B,[2,44],{46:87,13:k,41:A,48:M,49:N}),{14:114,40:H,50:U,72:W},{16:115,40:T,41:E},{14:116,40:H,50:U,72:W},e(n,[2,13]),e(G,[2,64]),{59:117,61:K},{19:[1,118]},e(n,[2,20]),e(n,[2,23],{17:[1,119],42:j}),e(n,[2,11]),{13:[1,120],42:j},e(n,[2,10]),e(J,[2,68]),e(n,[2,18]),{18:121,19:[1,122],53:53,54:54,58:D},{14:123,40:H,50:U,72:W},{19:[1,124]},e(n,[2,21]),e(n,[2,9]),e(n,[2,19])],defaultActions:{55:[2,65],75:[2,60]},parseError:t(function(e,t){if(t.recoverable)this.trace(e);else{var n=Error(e);throw n.hash=t,n}},`parseError`),parse:t(function(e){var n=this,r=[0],i=[],a=[null],o=[],s=this.table,c=``,l=0,u=0,d=0,f=2,p=1,m=o.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var _ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,_)&&(g.yy[_]=this.yy[_]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,h.yylloc===void 0&&(h.yylloc={});var v=h.yylloc;o.push(v);var y=h.options&&h.options.ranges;typeof g.yy.parseError==`function`?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function b(e){r.length-=2*e,a.length-=e,o.length-=e}t(b,`popStack`);function x(){var e=i.pop()||h.lex()||p;return typeof e!=`number`&&(e instanceof Array&&(i=e,e=i.pop()),e=n.symbols_[e]||e),e}t(x,`lex`);for(var S,C,w,T,E,D={},O,k,A,j;;){if(w=r[r.length-1],this.defaultActions[w]?T=this.defaultActions[w]:(S??=x(),T=s[w]&&s[w][S]),T===void 0||!T.length||!T[0]){var M=``;for(O in j=[],s[w])this.terminals_[O]&&O>f&&j.push(`'`+this.terminals_[O]+`'`);M=h.showPosition?`Parse error on line `+(l+1)+`:
2
2
  `+h.showPosition()+`
3
3
  Expecting `+j.join(`, `)+`, got '`+(this.terminals_[S]||S)+`'`:`Parse error on line `+(l+1)+`: Unexpected `+(S==p?`end of input`:`'`+(this.terminals_[S]||S)+`'`),this.parseError(M,{text:h.match,token:this.terminals_[S]||S,line:h.yylineno,loc:v,expected:j})}if(T[0]instanceof Array&&T.length>1)throw Error(`Parse Error: multiple actions possible at state: `+w+`, token: `+S);switch(T[0]){case 1:r.push(S),a.push(h.yytext),o.push(h.yylloc),r.push(T[1]),S=null,C?(S=C,C=null):(u=h.yyleng,c=h.yytext,l=h.yylineno,v=h.yylloc,d>0&&d--);break;case 2:if(k=this.productions_[T[1]][1],D.$=a[a.length-k],D._$={first_line:o[o.length-(k||1)].first_line,last_line:o[o.length-1].last_line,first_column:o[o.length-(k||1)].first_column,last_column:o[o.length-1].last_column},y&&(D._$.range=[o[o.length-(k||1)].range[0],o[o.length-1].range[1]]),E=this.performAction.apply(D,[c,u,l,g.yy,T[1],a,o].concat(m)),E!==void 0)return E;k&&(r=r.slice(0,-1*k*2),a=a.slice(0,-1*k),o=o.slice(0,-1*k)),r.push(this.productions_[T[1]][0]),a.push(D.$),o.push(D._$),A=s[r[r.length-2]][r[r.length-1]],r.push(A);break;case 3:return!0}}return!0},`parse`)};Y.lexer=(function(){return{EOF:1,parseError:t(function(e,t){if(this.yy.parser)this.yy.parser.parseError(e,t);else throw Error(e)},`parseError`),setInput:t(function(e,t){return this.yy=t||this.yy||{},this._input=e,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match=``,this.conditionStack=[`INITIAL`],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},`setInput`),input:t(function(){var e=this._input[0];return this.yytext+=e,this.yyleng++,this.offset++,this.match+=e,this.matched+=e,e.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),e},`input`),unput:t(function(e){var t=e.length,n=e.split(/(?:\r\n?|\n)/g);this._input=e+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-t),this.offset-=t;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-t},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-t]),this.yyleng=this.yytext.length,this},`unput`),more:t(function(){return this._more=!0,this},`more`),reject:t(function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError(`Lexical error on line `+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
4
4
  `+this.showPosition(),{text:``,token:null,line:this.yylineno});return this},`reject`),less:t(function(e){this.unput(this.match.slice(e))},`less`),pastInput:t(function(){var e=this.matched.substr(0,this.matched.length-this.match.length);return(e.length>20?`...`:``)+e.substr(-20).replace(/\n/g,``)},`pastInput`),upcomingInput:t(function(){var e=this.match;return e.length<20&&(e+=this._input.substr(0,20-e.length)),(e.substr(0,20)+(e.length>20?`...`:``)).replace(/\n/g,``)},`upcomingInput`),showPosition:t(function(){var e=this.pastInput(),t=Array(e.length+1).join(`-`);return e+this.upcomingInput()+`
@@ -0,0 +1,4 @@
1
+ import{g as e,h as t}from"./DG5yTEkY.js";import{x as n}from"./CEW3xh3M.js";import"./0tC8Ubqr.js";import"./CXC42hVj2.js";import"./qD2cSsUD2.js";import{n as r}from"./DGHybmkM2.js";import{r as i,t as a}from"./B8gBHxth2.js";import{n as o,r as s,t as c}from"./hFfQmBrk2.js";import"./Chn8RaCU2.js";import{a as l,c as u,i as d,l as f,n as p,t as m,u as h}from"./DPoU52N62.js";import{a as g,i as _,n as v,r as y,t as b}from"./CUWABXvb2.js";var x=4;function S(e){return s(e,x)}function C(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:w(e),edges:T(e)};return i(e.graph())||(t.value=S(e.graph())),t}function w(e){return o(e.nodes(),function(t){var n=e.node(t),r=e.parent(t),a={v:t};return i(n)||(a.value=n),i(r)||(a.parent=r),a})}function T(e){return o(e.edges(),function(t){var n=e.edge(t),r={v:t.v,w:t.w};return i(t.name)||(r.name=t.name),i(n)||(r.value=n),r})}var E=new Map,D=new Map,O=new Map,k=t(()=>{D.clear(),O.clear(),E.clear()},`clear`),A=t((t,n)=>{let r=D.get(n)||[];return e.trace(`In isDescendant`,n,` `,t,` = `,r.includes(t)),r.includes(t)},`isDescendant`),j=t((t,n)=>{let r=D.get(n)||[];return e.info(`Descendants of `,n,` is `,r),e.info(`Edge is `,t),t.v===n||t.w===n?!1:r?r.includes(t.v)||A(t.v,n)||A(t.w,n)||r.includes(t.w):(e.debug(`Tilt, `,n,`,not in descendants`),!1)},`edgeInCluster`),M=t((t,n,r,i)=>{e.warn(`Copying children of `,t,`root`,i,`data`,n.node(t),i);let a=n.children(t)||[];t!==i&&a.push(t),e.warn(`Copying (nodes) clusterId`,t,`nodes`,a),a.forEach(a=>{if(n.children(a).length>0)M(a,n,r,i);else{let o=n.node(a);e.info(`cp `,a,` to `,i,` with parent `,t),r.setNode(a,o),i!==n.parent(a)&&(e.warn(`Setting parent`,a,n.parent(a)),r.setParent(a,n.parent(a))),t!==i&&a!==t?(e.debug(`Setting parent`,a,t),r.setParent(a,t)):(e.info(`In copy `,t,`root`,i,`data`,n.node(t),i),e.debug(`Not Setting parent for node=`,a,`cluster!==rootId`,t!==i,`node!==clusterId`,a!==t));let s=n.edges(a);e.debug(`Copying Edges`,s),s.forEach(a=>{e.info(`Edge`,a);let o=n.edge(a.v,a.w,a.name);e.info(`Edge data`,o,i);try{j(a,i)?(e.info(`Copying as `,a.v,a.w,o,a.name),r.setEdge(a.v,a.w,o,a.name),e.info(`newGraph edges `,r.edges(),r.edge(r.edges()[0]))):e.info(`Skipping copy of edge `,a.v,`-->`,a.w,` rootId: `,i,` clusterId:`,t)}catch(t){e.error(t)}})}e.debug(`Removing node`,a),n.removeNode(a)})},`copy`),N=t((e,t)=>{let n=t.children(e),r=[...n];for(let i of n)O.set(i,e),r=[...r,...N(i,t)];return r},`extractDescendants`),P=t((e,t,n)=>{let r=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===n||e.w===n),a=r.map(e=>({v:e.v===t?n:e.v,w:e.w===t?t:e.w})),o=i.map(e=>({v:e.v,w:e.w}));return a.filter(e=>o.some(t=>e.v===t.v&&e.w===t.w))},`findCommonEdges`),F=t((t,n,r)=>{let i=n.children(t);if(e.trace(`Searching children of id `,t,i),i.length<1)return t;let a;for(let e of i){let t=F(e,n,r),i=P(n,r,t);if(t)if(i.length>0)a=t;else return t}return a},`findNonClusterChild`),I=t(e=>!E.has(e)||!E.get(e).externalConnections?e:E.has(e)?E.get(e).id:e,`getAnchorId`),L=t((t,n)=>{if(!t||n>10){e.debug(`Opting out, no graph `);return}else e.debug(`Opting in, graph `);t.nodes().forEach(function(n){t.children(n).length>0&&(e.warn(`Cluster identified`,n,` Replacement id in edges: `,F(n,t,n)),D.set(n,N(n,t)),E.set(n,{id:F(n,t,n),clusterData:t.node(n)}))}),t.nodes().forEach(function(n){let r=t.children(n),i=t.edges();r.length>0?(e.debug(`Cluster identified`,n,D),i.forEach(t=>{A(t.v,n)^A(t.w,n)&&(e.warn(`Edge: `,t,` leaves cluster `,n),e.warn(`Descendants of XXX `,n,`: `,D.get(n)),E.get(n).externalConnections=!0)})):e.debug(`Not a cluster `,n,D)});for(let e of E.keys()){let n=E.get(e).id,r=t.parent(n);r!==e&&E.has(r)&&!E.get(r).externalConnections&&(E.get(e).id=r)}t.edges().forEach(function(n){let r=t.edge(n);e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(n)),e.warn(`Edge `+n.v+` -> `+n.w+`: `+JSON.stringify(t.edge(n)));let i=n.v,a=n.w;if(e.warn(`Fix XXX`,E,`ids:`,n.v,n.w,`Translating: `,E.get(n.v),` --- `,E.get(n.w)),E.get(n.v)||E.get(n.w)){if(e.warn(`Fixing and trying - removing XXX`,n.v,n.w,n.name),i=I(n.v),a=I(n.w),t.removeEdge(n.v,n.w,n.name),i!==n.v){let e=t.parent(i);E.get(e).externalConnections=!0,r.fromCluster=n.v}if(a!==n.w){let e=t.parent(a);E.get(e).externalConnections=!0,r.toCluster=n.w}e.warn(`Fix Replacing with XXX`,i,a,n.name),t.setEdge(i,a,r,n.name)}}),e.warn(`Adjusted Graph`,C(t)),R(t,0),e.trace(E)},`adjustClustersAndEdges`),R=t((t,n)=>{if(e.warn(`extractor - `,n,C(t),t.children(`D`)),n>10){e.error(`Bailing out`);return}let r=t.nodes(),i=!1;for(let e of r){let n=t.children(e);i||=n.length>0}if(!i){e.debug(`Done, no node has children`,t.nodes());return}e.debug(`Nodes = `,r,n);for(let i of r)if(e.debug(`Extracting node`,i,E,E.has(i)&&!E.get(i).externalConnections,!t.parent(i),t.node(i),t.children(`D`),` Depth `,n),!E.has(i))e.debug(`Not a cluster`,i,n);else if(!E.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){e.warn(`Cluster without external connections, without a parent and with children`,i,n);let r=t.graph().rankdir===`TB`?`LR`:`TB`;E.get(i)?.clusterData?.dir&&(r=E.get(i).clusterData.dir,e.warn(`Fixing dir`,E.get(i).clusterData.dir,r));let o=new a({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});e.warn(`Old graph before copy`,C(t)),M(i,t,o,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:E.get(i).clusterData,label:E.get(i).label,graph:o}),e.warn(`New graph after copy node: (`,i,`)`,C(o)),e.debug(`Old graph after copy`,C(t))}else e.warn(`Cluster ** `,i,` **not meeting the criteria !externalConnections:`,!E.get(i).externalConnections,` no parent: `,!t.parent(i),` children `,t.children(i)&&t.children(i).length>0,t.children(`D`),n),e.debug(E);r=t.nodes(),e.warn(`New list of nodes`,r);for(let i of r){let r=t.node(i);e.warn(` Now next level`,i,r),r?.clusterNode&&R(r.graph,n+1)}},`extractor`),z=t((e,t)=>{if(t.length===0)return[];let n=Object.assign([],t);return t.forEach(t=>{let r=z(e,e.children(t));n=[...n,...r]}),n},`sorter`),B=t(e=>z(e,e.children()),`sortNodesByHierarchy`),V=t(async(n,i,a,o,s,p)=>{e.warn(`Graph in recursive render:XAX`,C(i),s);let m=i.graph().rankdir;e.trace(`Dir in recursive render - dir:`,m);let _=n.insert(`g`).attr(`class`,`root`);i.nodes()?e.info(`Recursive render XXX`,i.nodes()):e.info(`No nodes found for`,i),i.edges().length>0&&e.info(`Recursive edges`,i.edge(i.edges()[0]));let b=_.insert(`g`).attr(`class`,`clusters`),x=_.insert(`g`).attr(`class`,`edgePaths`),S=_.insert(`g`).attr(`class`,`edgeLabels`),w=_.insert(`g`).attr(`class`,`nodes`);await Promise.all(i.nodes().map(async function(t){let n=i.node(t);if(s!==void 0){let n=JSON.parse(JSON.stringify(s.clusterData));e.trace(`Setting data for parent cluster XXX
2
+ Node.id = `,t,`
3
+ data=`,n.height,`
4
+ Parent cluster`,s.height),i.setNode(s.id,n),i.parent(t)||(e.trace(`Setting parent`,t,s.id),i.setParent(t,s.id,n))}if(e.info(`(Insert) Node XXX`+t+`: `+JSON.stringify(i.node(t))),n?.clusterNode){e.info(`Cluster identified XBX`,t,n.width,i.node(t));let{ranksep:r,nodesep:s}=i.graph();n.graph.setGraph({...n.graph.graph(),ranksep:r+25,nodesep:s});let c=await V(w,n.graph,a,o,i.node(t),p),l=c.elem;h(n,l),n.diff=c.diff||0,e.info(`New compound node after recursive render XAX`,t,`width`,n.width,`height`,n.height),f(l,n)}else i.children(t).length>0?(e.trace(`Cluster - the non recursive path XBX`,t,n.id,n,n.width,`Graph:`,i),e.trace(F(n.id,i)),E.set(n.id,{id:F(n.id,i),node:n})):(e.trace(`Node - the non recursive path XAX`,t,w,i.node(t),m),await l(w,i.node(t),{config:p,dir:m}))})),await t(async()=>{let t=i.edges().map(async function(t){let n=i.edge(t.v,t.w,t.name);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(t)),e.info(`Edge `+t.v+` -> `+t.w+`: `,t,` `,JSON.stringify(i.edge(t))),e.info(`Fix`,E,`ids:`,t.v,t.w,`Translating: `,E.get(t.v),E.get(t.w)),await y(S,n)});await Promise.all(t)},`processEdges`)(),e.info(`Graph before layout:`,JSON.stringify(C(i))),e.info(`############################################# XXX`),e.info(`### Layout ### XXX`),e.info(`############################################# XXX`),c(i),e.info(`Graph after layout:`,JSON.stringify(C(i)));let T=0,{subGraphTitleTotalMargin:D}=r(p);return await Promise.all(B(i).map(async function(t){let n=i.node(t);if(e.info(`Position XBX => `+t+`: (`+n.x,`,`+n.y,`) width: `,n.width,` height: `,n.height),n?.clusterNode)n.y+=D,e.info(`A tainted cluster node XBX1`,t,n.id,n.width,n.height,n.x,n.y,i.parent(t)),E.get(n.id).node=n,u(n);else if(i.children(t).length>0){e.info(`A pure cluster node XBX1`,t,n.id,n.x,n.y,n.width,n.height,i.parent(t)),n.height+=D,i.node(n.parentId);let r=n?.padding/2||0,a=n?.labelBBox?.height||0,o=a-r||0;e.debug(`OffsetY`,o,`labelHeight`,a,`halfPadding`,r),await d(b,n),E.get(n.id).node=n}else{let t=i.node(n.parentId);n.y+=D/2,e.info(`A regular node XBX1 - using the padding`,n.id,`parent`,n.parentId,n.width,n.height,n.x,n.y,`offsetY`,n.offsetY,`parent`,t,t?.offsetY,n),u(n)}})),i.edges().forEach(function(t){let n=i.edge(t);e.info(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(n),n),n.points.forEach(e=>e.y+=D/2),g(n,v(x,n,E,a,i.node(t.v),i.node(t.w),o))}),i.nodes().forEach(function(t){let n=i.node(t);e.info(t,n.type,n.diff),n.isGroup&&(T=n.diff)}),e.warn(`Returning from recursive render XAX`,_,T),{elem:_,diff:T}},`recursiveRender`),H=t(async(t,r)=>{let i=new a({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),o=r.select(`g`);_(o,t.markers,t.type,t.diagramId),p(),b(),m(),k(),t.nodes.forEach(e=>{i.setNode(e.id,{...e}),e.parentId&&i.setParent(e.id,e.parentId)}),e.debug(`Edges:`,t.edges),t.edges.forEach(e=>{if(e.start===e.end){let t=e.start,n=t+`---`+t+`---1`,r=t+`---`+t+`---2`,a=i.node(t);i.setNode(n,{domId:n,id:n,parentId:a.parentId,labelStyle:``,label:``,padding:0,shape:`labelRect`,style:``,width:10,height:10}),i.setParent(n,a.parentId),i.setNode(r,{domId:r,id:r,parentId:a.parentId,labelStyle:``,padding:0,shape:`labelRect`,label:``,style:``,width:10,height:10}),i.setParent(r,a.parentId);let o=structuredClone(e),s=structuredClone(e),c=structuredClone(e);o.label=``,o.arrowTypeEnd=`none`,o.endLabelLeft=``,o.endLabelRight=``,o.startLabelLeft=``,o.id=t+`-cyclic-special-1`,s.startLabelRight=``,s.startLabelLeft=``,s.endLabelLeft=``,s.endLabelRight=``,s.arrowTypeStart=`none`,s.arrowTypeEnd=`none`,s.id=t+`-cyclic-special-mid`,c.label=``,c.startLabelRight=``,c.startLabelLeft=``,c.arrowTypeStart=`none`,a.isGroup&&(o.fromCluster=t,c.toCluster=t),c.id=t+`-cyclic-special-2`,c.arrowTypeStart=`none`,i.setEdge(t,n,o,t+`-cyclic-special-0`),i.setEdge(n,r,s,t+`-cyclic-special-1`),i.setEdge(r,t,c,t+`-cyc<lic-special-2`)}else i.setEdge(e.start,e.end,{...e},e.id)}),e.warn(`Graph at first:`,JSON.stringify(C(i))),L(i),e.warn(`Graph after XAX:`,JSON.stringify(C(i)));let s=n();await V(o,i,t.type,t.diagramId,void 0,s)},`render`);export{H as render};
@@ -1,4 +1,4 @@
1
- import{g as e,h as t,p as n}from"./DG5yTEkY.js";import{T as r,b as i,x as a}from"./CEW3xh3M.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./0tC8Ubqr.js";import{t as b}from"./SbORYBuH.js";import{n as x}from"./CXC42hVj.js";import{i as S,n as ee,r as C,t as w}from"./qD2cSsUD2.js";import{n as T}from"./DGHybmkM2.js";import{i as E,n as D}from"./Chn8RaCU2.js";import{t as te}from"./CSKSodPl2.js";import{r as O}from"./Bie0X5s02.js";var ne=t((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&j(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&j(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),k={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},A=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],j=t((t,n,r,i,a,o,s=!1,c)=>{let l=k[r],u=l&&A.includes(l.type);if(!l){e.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let e=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(e)){let t=document.getElementById(d);if(t){let n=t.cloneNode(!0);n.id=e,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),t.parentNode?.appendChild(n)}}t.attr(`marker-${n}`,`url(${i}#${e})`)}else t.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),re=t(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),M=new Map,N=new Map,P=t(()=>{M.clear(),N.clear()},`clear`),F=t(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),I=t(async(t,i)=>{let o=a(),s=r(o),{labelStyles:c}=E(i);i.labelStyle=c;let l=t.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(t,i.label,{style:F(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),e.info(`abc82`,i,i.labelType);let p=f.getBBox(),m=p;if(s){let e=f.children[0],t=n(f);p=e.getBoundingClientRect(),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();e&&typeof e.getBBox==`function`&&(m=e.getBBox())}u.attr(`transform`,w(m,s)),M.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startLeft=e,L(h,i.startLabelLeft)}if(i.startLabelRight){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startRight=e,L(h,i.startLabelRight)}if(i.endLabelLeft){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(e,i.endLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endLeft=e,L(h,i.endLabelLeft)}if(i.endLabelRight){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(e,i.endLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endRight=e,L(h,i.endLabelRight)}return f},`insertEdgeLabel`);function L(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}t(L,`setTerminalWidth`);var R=t((t,n)=>{e.debug(`Moving label abc88 `,t.id,t.label,M.get(t.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=T(a());if(t.label){let a=M.get(t.id),o=t.x,s=t.y;if(r){let i=m.calcLabelPosition(r);e.debug(`Moving label `+t.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(t.startLabelLeft){let e=N.get(t.id).startLeft,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.startLabelRight){let e=N.get(t.id).startRight,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelLeft){let e=N.get(t.id).endLeft,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelRight){let e=N.get(t.id).endRight,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),z=t((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),B=t((t,n,r)=>{e.debug(`intersection calc abc89:
1
+ import{g as e,h as t,p as n}from"./DG5yTEkY.js";import{T as r,b as i,x as a}from"./CEW3xh3M.js";import{$ as o,J as s,K as c,Q as l,X as u,Y as d,Z as f,et as p,g as m,nt as h,q as g,rt as _,tt as v,u as y}from"./0tC8Ubqr.js";import{t as b}from"./SbORYBuH.js";import{n as x}from"./CXC42hVj2.js";import{i as S,n as ee,r as C,t as w}from"./qD2cSsUD2.js";import{n as T}from"./DGHybmkM2.js";import{i as E,n as D}from"./Chn8RaCU2.js";import{t as te}from"./CSKSodPl2.js";import{r as O}from"./DPoU52N62.js";var ne=t((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&j(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&j(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),k={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},A=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],j=t((t,n,r,i,a,o,s=!1,c)=>{let l=k[r],u=l&&A.includes(l.type);if(!l){e.warn(`Unknown arrow type: ${r}`);return}let d=`${a}_${o}-${l.type}${n===`start`?`Start`:`End`}${s&&u?`-margin`:``}`;if(c&&c.trim()!==``){let e=`${d}_${c.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(e)){let t=document.getElementById(d);if(t){let n=t.cloneNode(!0);n.id=e,n.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,c),l.fill&&e.setAttribute(`fill`,c)}),t.parentNode?.appendChild(n)}}t.attr(`marker-${n}`,`url(${i}#${e})`)}else t.attr(`marker-${n}`,`url(${i}#${d})`)},`addEdgeMarker`),re=t(e=>typeof e==`string`?e:a()?.flowchart?.curve,`resolveEdgeCurveType`),M=new Map,N=new Map,P=t(()=>{M.clear(),N.clear()},`clear`),F=t(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),I=t(async(t,i)=>{let o=a(),s=r(o),{labelStyles:c}=E(i);i.labelStyle=c;let l=t.insert(`g`).attr(`class`,`edgeLabel`),u=l.insert(`g`).attr(`class`,`label`).attr(`data-id`,i.id),d=i.labelType===`markdown`,f=await x(t,i.label,{style:F(i.labelStyle),useHtmlLabels:s,addSvgBackground:!0,isNode:!1,markdown:d,width:void 0},o);u.node().appendChild(f),e.info(`abc82`,i,i.labelType);let p=f.getBBox(),m=p;if(s){let e=f.children[0],t=n(f);p=e.getBoundingClientRect(),m=p,t.attr(`width`,p.width),t.attr(`height`,p.height)}else{let e=n(f).select(`text`).node();e&&typeof e.getBBox==`function`&&(m=e.getBBox())}u.attr(`transform`,w(m,s)),M.set(i.id,l),i.width=p.width,i.height=p.height;let h;if(i.startLabelLeft){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startLeft=e,L(h,i.startLabelLeft)}if(i.startLabelRight){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(r,i.startLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).startRight=e,L(h,i.startLabelRight)}if(i.endLabelLeft){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(e,i.endLabelLeft,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endLeft=e,L(h,i.endLabelLeft)}if(i.endLabelRight){let e=t.insert(`g`).attr(`class`,`edgeTerminals`),r=e.insert(`g`).attr(`class`,`inner`),a=await O(e,i.endLabelRight,F(i.labelStyle)||``,!1,!1);h=a;let o=a.getBBox();if(s){let e=a.children[0],t=n(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}r.attr(`transform`,w(o,s)),N.get(i.id)||N.set(i.id,{}),N.get(i.id).endRight=e,L(h,i.endLabelRight)}return f},`insertEdgeLabel`);function L(e,t){r(a())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}t(L,`setTerminalWidth`);var R=t((t,n)=>{e.debug(`Moving label abc88 `,t.id,t.label,M.get(t.id),n);let r=n.updatedPath?n.updatedPath:n.originalPath,{subGraphTitleTotalMargin:i}=T(a());if(t.label){let a=M.get(t.id),o=t.x,s=t.y;if(r){let i=m.calcLabelPosition(r);e.debug(`Moving label `+t.label+` from (`,o,`,`,s,`) to (`,i.x,`,`,i.y,`) abc88`),n.updatedPath&&(o=i.x,s=i.y)}a.attr(`transform`,`translate(${o}, ${s+i/2})`)}if(t.startLabelLeft){let e=N.get(t.id).startLeft,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.startLabelRight){let e=N.get(t.id).startRight,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeStart?10:0,`start_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelLeft){let e=N.get(t.id).endLeft,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_left`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}if(t.endLabelRight){let e=N.get(t.id).endRight,n=t.x,i=t.y;if(r){let e=m.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,`end_right`,r);n=e.x,i=e.y}e.attr(`transform`,`translate(${n}, ${i})`)}},`positionEdgeLabel`),z=t((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),B=t((t,n,r)=>{e.debug(`intersection calc abc89:
2
2
  outsidePoint: ${JSON.stringify(n)}
3
3
  insidePoint : ${JSON.stringify(r)}
4
4
  node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);let i=t.x,a=t.y,o=Math.abs(i-r.x),s=t.width/2,c=r.x<n.x?s-o:s+o,l=t.height/2,u=Math.abs(n.y-r.y),d=Math.abs(n.x-r.x);if(Math.abs(a-n.y)*s>Math.abs(i-n.x)*l){let t=r.y<n.y?n.y-l-a:a-l-n.y;c=d*t/u;let i={x:r.x<n.x?r.x+c:r.x-d+c,y:r.y<n.y?r.y+u-t:r.y-u+t};return c===0&&(i.x=n.x,i.y=n.y),d===0&&(i.x=n.x),u===0&&(i.y=n.y),e.debug(`abc89 top/bottom calc, Q ${u}, q ${t}, R ${d}, r ${c}`,i),i}else{c=r.x<n.x?n.x-s-i:i-s-n.x;let t=u*c/d,a=r.x<n.x?r.x+d-c:r.x-d+c,o=r.y<n.y?r.y+t:r.y-t;return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`,{_x:a,_y:o}),c===0&&(a=n.x,o=n.y),d===0&&(a=n.x),u===0&&(o=n.y),{x:a,y:o}}},`intersection`),V=t((t,n)=>{e.warn(`abc88 cutPathAtIntersect`,t,n);let r=[],i=t[0],a=!1;return t.forEach(t=>{if(e.info(`abc88 checking point`,t,n),!z(n,t)&&!a){let o=B(n,i,t);e.debug(`abc88 inside`,t,i,o),e.debug(`abc88 intersection`,o,n);let s=!1;r.forEach(e=>{s||=e.x===o.x&&e.y===o.y}),r.some(e=>e.x===o.x&&e.y===o.y)?e.warn(`abc88 no intersect`,o,r):r.push(o),a=!0}else e.warn(`abc88 outside`,t,i),i=t,a||r.push(t)}),e.debug(`returning points`,r),r},`cutPathAtIntersect`);function H(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}t(H,`extractCornerPoints`);var U=t(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),ie=t(function(t){let{cornerPointPositions:n}=H(t),r=[];for(let i=0;i<t.length;i++)if(n.includes(i)){let n=t[i-1],a=t[i+1],o=t[i],s=U(n,o,5),c=U(a,o,5),l=c.x-s.x,u=c.y-s.y;r.push(s);let d=Math.sqrt(2)*2,f={x:o.x,y:o.y};Math.abs(a.x-n.x)>10&&Math.abs(a.y-n.y)>=10?(e.debug(`Corner point fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),f=o.x===s.x?{x:l<0?s.x-5+d:s.x+5-d,y:u<0?s.y-d:s.y+d}:{x:l<0?s.x-d:s.x+d,y:u<0?s.y-5+d:s.y+5-d}):e.debug(`Corner point skipping fixing`,Math.abs(a.x-n.x),Math.abs(a.y-n.y)),r.push(f,c)}else r.push(t[i]);return r},`fixCorners`),W=t((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),G=t(function(t,r,i,x,C,w,T,E=!1){if(!T)throw Error(`insertEdge: missing diagramId for edge "${r.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:O}=a(),k=r.points,A=!1,j=C;var M=w;let N=[];for(let e in r.cssCompiledStyles)D(e)||N.push(r.cssCompiledStyles[e]);e.debug(`UIO intersect check`,r.points,M.x,j.x),M.intersect&&j.intersect&&!E&&(k=k.slice(1,r.points.length-1),k.unshift(j.intersect(k[0])),e.debug(`Last point UIO`,r.start,`-->`,r.end,k[k.length-1],M,M.intersect(k[k.length-1])),k.push(M.intersect(k[k.length-1])));let P=btoa(JSON.stringify(k));r.toCluster&&(e.info(`to cluster abc88`,i.get(r.toCluster)),k=V(r.points,i.get(r.toCluster).node),A=!0),r.fromCluster&&(e.debug(`from cluster abc88`,i.get(r.fromCluster),JSON.stringify(k,null,2)),k=V(k.reverse(),i.get(r.fromCluster).node).reverse(),A=!0);let F=k.filter(e=>!Number.isNaN(e.y)),I=re(r.curve);I!==`rounded`&&(F=ie(F));let L=_;switch(I){case`linear`:L=_;break;case`basis`:L=p;break;case`cardinal`:L=o;break;case`bumpX`:L=v;break;case`bumpY`:L=h;break;case`catmullRom`:L=l;break;case`monotoneX`:L=u;break;case`monotoneY`:L=f;break;case`natural`:L=d;break;case`step`:L=s;break;case`stepAfter`:L=c;break;case`stepBefore`:L=g;break;case`rounded`:L=_;break;default:L=p}let{x:R,y:z}=ee(r),B=b().x(R).y(z).curve(L),H;switch(r.thickness){case`normal`:H=`edge-thickness-normal`;break;case`thick`:H=`edge-thickness-thick`;break;case`invisible`:H=`edge-thickness-invisible`;break;default:H=`edge-thickness-normal`}switch(r.pattern){case`solid`:H+=` edge-pattern-solid`;break;case`dotted`:H+=` edge-pattern-dotted`;break;case`dashed`:H+=` edge-pattern-dashed`;break;default:H+=` edge-pattern-solid`}let U,G=I===`rounded`?K(J(F,r),5):B(F),q=Array.isArray(r.style)?r.style:[r.style],Y=q.find(e=>e?.startsWith(`stroke:`)),X=``;r.animate&&(X=`edge-animation-fast`),r.animation&&(X=`edge-animation-`+r.animation);let Z=!1;if(r.look===`handDrawn`){let e=te.svg(t);Object.assign([],F);let i=e.path(G,{roughness:.3,seed:O});H+=` transition`,U=n(i).select(`path`).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+H+(r.classes?` `+r.classes:``)+(X?` `+X:``)).attr(`style`,q?q.reduce((e,t)=>e+`;`+t,``):``);let a=U.attr(`d`);U.attr(`d`,a),t.node().appendChild(U.node())}else{let e=N.join(`;`),n=q?q.reduce((e,t)=>e+t+`;`,``):``,i=(e?e+`;`+n+`;`:n)+`;`+(q?q.reduce((e,t)=>e+`;`+t,``):``);U=t.append(`path`).attr(`d`,G).attr(`id`,`${T}-${r.id}`).attr(`class`,` `+H+(r.classes?` `+r.classes:``)+(X?` `+X:``)).attr(`style`,i),Y=i.match(/stroke:([^;]+)/)?.[1],Z=r.animate===!0||!!r.animation||e.includes(`animation`);let a=U.node(),o=typeof a.getTotalLength==`function`?a.getTotalLength():0,s=S[r.arrowTypeStart]||0,c=S[r.arrowTypeEnd]||0;if(r.look===`neo`&&!Z){let e=`stroke-dasharray: ${r.pattern===`dotted`||r.pattern===`dashed`?W(o,s,c):`0 ${s} ${o-s-c} ${c}`}; stroke-dashoffset: 0;`;U.attr(`style`,e+U.attr(`style`))}}U.attr(`data-edge`,!0),U.attr(`data-et`,`edge`),U.attr(`data-id`,r.id),U.attr(`data-points`,P),U.attr(`data-look`,y(r.look)),r.showPoints&&F.forEach(e=>{t.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,e.x).attr(`cy`,e.y)});let Q=``;(a().flowchart.arrowMarkerAbsolute||a().state.arrowMarkerAbsolute)&&(Q=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,Q=Q.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),e.info(`arrowTypeStart`,r.arrowTypeStart),e.info(`arrowTypeEnd`,r.arrowTypeEnd);let ae=!Z&&r?.look===`neo`;ne(U,r,Q,T,x,ae,Y);let oe=Math.floor(k.length/2),se=k[oe];m.isLabelCoordinateInPath(se,U.attr(`d`))||(A=!0);let $={};return A&&($.updatedPath=k),$.originalPath=r.points,$},`insertEdge`);function K(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}t(K,`generateRoundedPath`);function q(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}t(q,`calculateDeltaAndAngle`);function J(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&C[t.arrowTypeStart]){let r=C[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=q(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&C[t.arrowTypeEnd]){let i=C[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=q(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}t(J,`applyMarkerOffsetsToPoints`);var Y=t((e,t,n,r)=>{t.forEach(t=>{X[t](e,n,r)})},`insertMarkers`),X={extension:t((t,n,r)=>{e.trace(`Making markers for `,r),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionStart`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd`).attr(`class`,`marker extension `+n).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 V 13 L18,7 Z`),t.append(`marker`).attr(`id`,r+`_`+n+`-extensionStart-margin`).attr(`class`,`marker extension `+n).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),t.append(`defs`).append(`marker`).attr(`id`,r+`_`+n+`-extensionEnd-margin`).attr(`class`,`marker extension `+n).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).attr(`refX`,6).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 10 5 L 0 10 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 5 L 10 10 L 10 0 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,11).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-1).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,1).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:t((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,12).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 11 11`).attr(`refX`,-1).attr(`refY`,5.2).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11).attr(`markerHeight`,11).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 l 9,9 M 10,1 l -9,9`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:t((e,t,n)=>{let{themeVariables:r}=i(),{transitionColor:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`strokeWidth`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${a}`)},`barbNeo`),only_one:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:t((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:t((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:t((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${a}`)},`only_one_neo`),zero_or_one_neo:t((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),s.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${a}`).attr(`r`,6),c.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${a}`)},`zero_or_one_neo`),one_or_more_neo:t((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${a}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${a}`)},`one_or_more_neo`),zero_or_more_neo:t((e,t,n)=>{let{themeVariables:r}=i(),{strokeWidth:a,mainBkg:o}=r,s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),s.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${a}`);let c=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);c.append(`circle`).attr(`fill`,o??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${a}`),c.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${a}`)},`zero_or_more_neo`),requirement_arrow:t((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
@@ -0,0 +1 @@
1
+ import{h as e}from"./DG5yTEkY.js";import"./CEW3xh3M.js";import"./0tC8Ubqr.js";import"./CXC42hVj2.js";import"./BjVjgMFk2.js";import"./qD2cSsUD2.js";import"./DGHybmkM2.js";import"./B8E5l9fg2.js";import"./29nvmPLe2.js";import"./CLrCY0qQ2.js";import"./Chn8RaCU2.js";import"./DPoU52N62.js";import"./CUWABXvb2.js";import"./vx_Tnhqd2.js";import{i as t,n,r,t as i}from"./DC_PITHB2.js";var a={parser:n,get db(){return new i},renderer:r,styles:t,init:e(e=>{e.class||={},e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};