@abelxiaoxing/cadence 1.8.4 → 2.0.1

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 (202) hide show
  1. package/README.md +324 -117
  2. package/THIRD_PARTY_NOTICES.md +15 -0
  3. package/agents/design-explorer.md +14 -18
  4. package/agents/diagnosis-worker.md +14 -14
  5. package/agents/implementation-worker.md +16 -17
  6. package/config/workflow-task.example.json +7 -0
  7. package/docs/remote-access.md +60 -0
  8. package/docs/reuse-and-distribution.md +44 -0
  9. package/docs/service-management.md +108 -0
  10. package/licenses/bundled-web.txt +6245 -0
  11. package/licenses/pi-web-ui-MIT.txt +21 -0
  12. package/licenses/pi-web-ui-reuse.md +22 -0
  13. package/package.json +92 -20
  14. package/src/index.ts +21 -1802
  15. package/src/native-build.ts +6 -0
  16. package/src/native-client.ts +103 -0
  17. package/src/native-export.ts +58 -0
  18. package/src/native-history.ts +359 -0
  19. package/src/operator-cli.mjs +453 -1937
  20. package/src/plan-proposal.ts +87 -0
  21. package/src/sdk-worker.mjs +549 -0
  22. package/src/service/contracts/active.ts +82 -0
  23. package/src/service/contracts/budget.ts +148 -0
  24. package/src/service/contracts/build.ts +67 -0
  25. package/src/service/contracts/capture.ts +48 -0
  26. package/src/service/contracts/core.ts +33 -0
  27. package/src/service/contracts/current.ts +261 -0
  28. package/src/service/contracts/domain.ts +68 -0
  29. package/src/service/contracts/history.ts +2245 -0
  30. package/src/service/contracts/models.ts +139 -0
  31. package/src/service/coordination.ts +862 -0
  32. package/src/service/private-files.ts +204 -0
  33. package/src/service-cli.mjs +5592 -0
  34. package/src/service-client.ts +747 -0
  35. package/src/service-contract.ts +245 -0
  36. package/src/service-host.mjs +22382 -0
  37. package/src/service-http-client.ts +425 -0
  38. package/src/service-wire.ts +372 -0
  39. package/src/task-shell.ts +1045 -0
  40. package/src/task-store.ts +479 -0
  41. package/src/task-types.ts +184 -0
  42. package/src/verification-diagnostics.ts +29 -72
  43. package/src/worker-capture.mjs +1197 -0
  44. package/src/worker-public.mjs +1753 -0
  45. package/src/worker-redaction.mjs +608 -0
  46. package/src/worker-tools.mjs +202 -0
  47. package/web/dist/assets/KaTeX_AMS-Regular.ttf +0 -0
  48. package/web/dist/assets/KaTeX_AMS-Regular.woff +0 -0
  49. package/web/dist/assets/KaTeX_AMS-Regular.woff2 +0 -0
  50. package/web/dist/assets/KaTeX_Caligraphic-Bold.ttf +0 -0
  51. package/web/dist/assets/KaTeX_Caligraphic-Bold.woff +0 -0
  52. package/web/dist/assets/KaTeX_Caligraphic-Bold.woff2 +0 -0
  53. package/web/dist/assets/KaTeX_Caligraphic-Regular.ttf +0 -0
  54. package/web/dist/assets/KaTeX_Caligraphic-Regular.woff +0 -0
  55. package/web/dist/assets/KaTeX_Caligraphic-Regular.woff2 +0 -0
  56. package/web/dist/assets/KaTeX_Fraktur-Bold.ttf +0 -0
  57. package/web/dist/assets/KaTeX_Fraktur-Bold.woff +0 -0
  58. package/web/dist/assets/KaTeX_Fraktur-Bold.woff2 +0 -0
  59. package/web/dist/assets/KaTeX_Fraktur-Regular.ttf +0 -0
  60. package/web/dist/assets/KaTeX_Fraktur-Regular.woff +0 -0
  61. package/web/dist/assets/KaTeX_Fraktur-Regular.woff2 +0 -0
  62. package/web/dist/assets/KaTeX_Main-Bold.ttf +0 -0
  63. package/web/dist/assets/KaTeX_Main-Bold.woff +0 -0
  64. package/web/dist/assets/KaTeX_Main-Bold.woff2 +0 -0
  65. package/web/dist/assets/KaTeX_Main-BoldItalic.ttf +0 -0
  66. package/web/dist/assets/KaTeX_Main-BoldItalic.woff +0 -0
  67. package/web/dist/assets/KaTeX_Main-BoldItalic.woff2 +0 -0
  68. package/web/dist/assets/KaTeX_Main-Italic.ttf +0 -0
  69. package/web/dist/assets/KaTeX_Main-Italic.woff +0 -0
  70. package/web/dist/assets/KaTeX_Main-Italic.woff2 +0 -0
  71. package/web/dist/assets/KaTeX_Main-Regular.ttf +0 -0
  72. package/web/dist/assets/KaTeX_Main-Regular.woff +0 -0
  73. package/web/dist/assets/KaTeX_Main-Regular.woff2 +0 -0
  74. package/web/dist/assets/KaTeX_Math-BoldItalic.ttf +0 -0
  75. package/web/dist/assets/KaTeX_Math-BoldItalic.woff +0 -0
  76. package/web/dist/assets/KaTeX_Math-BoldItalic.woff2 +0 -0
  77. package/web/dist/assets/KaTeX_Math-Italic.ttf +0 -0
  78. package/web/dist/assets/KaTeX_Math-Italic.woff +0 -0
  79. package/web/dist/assets/KaTeX_Math-Italic.woff2 +0 -0
  80. package/web/dist/assets/KaTeX_SansSerif-Bold.ttf +0 -0
  81. package/web/dist/assets/KaTeX_SansSerif-Bold.woff +0 -0
  82. package/web/dist/assets/KaTeX_SansSerif-Bold.woff2 +0 -0
  83. package/web/dist/assets/KaTeX_SansSerif-Italic.ttf +0 -0
  84. package/web/dist/assets/KaTeX_SansSerif-Italic.woff +0 -0
  85. package/web/dist/assets/KaTeX_SansSerif-Italic.woff2 +0 -0
  86. package/web/dist/assets/KaTeX_SansSerif-Regular.ttf +0 -0
  87. package/web/dist/assets/KaTeX_SansSerif-Regular.woff +0 -0
  88. package/web/dist/assets/KaTeX_SansSerif-Regular.woff2 +0 -0
  89. package/web/dist/assets/KaTeX_Script-Regular.ttf +0 -0
  90. package/web/dist/assets/KaTeX_Script-Regular.woff +0 -0
  91. package/web/dist/assets/KaTeX_Script-Regular.woff2 +0 -0
  92. package/web/dist/assets/KaTeX_Size1-Regular.ttf +0 -0
  93. package/web/dist/assets/KaTeX_Size1-Regular.woff +0 -0
  94. package/web/dist/assets/KaTeX_Size1-Regular.woff2 +0 -0
  95. package/web/dist/assets/KaTeX_Size2-Regular.ttf +0 -0
  96. package/web/dist/assets/KaTeX_Size2-Regular.woff +0 -0
  97. package/web/dist/assets/KaTeX_Size2-Regular.woff2 +0 -0
  98. package/web/dist/assets/KaTeX_Size3-Regular.ttf +0 -0
  99. package/web/dist/assets/KaTeX_Size3-Regular.woff +0 -0
  100. package/web/dist/assets/KaTeX_Size3-Regular.woff2 +0 -0
  101. package/web/dist/assets/KaTeX_Size4-Regular.ttf +0 -0
  102. package/web/dist/assets/KaTeX_Size4-Regular.woff +0 -0
  103. package/web/dist/assets/KaTeX_Size4-Regular.woff2 +0 -0
  104. package/web/dist/assets/KaTeX_Typewriter-Regular.ttf +0 -0
  105. package/web/dist/assets/KaTeX_Typewriter-Regular.woff +0 -0
  106. package/web/dist/assets/KaTeX_Typewriter-Regular.woff2 +0 -0
  107. package/web/dist/assets/cadence.css +2 -0
  108. package/web/dist/assets/cadence.js +7 -0
  109. package/web/dist/assets/markdown.js +296 -0
  110. package/web/dist/assets/react.js +9 -0
  111. package/web/dist/assets/rolldown-runtime.js +1 -0
  112. package/web/dist/assets/timeline-client.js +41 -0
  113. package/web/dist/assets/vis-timeline.css +1274 -0
  114. package/web/dist/assets/vis-timeline.js +32 -0
  115. package/web/dist/index.html +18 -0
  116. package/web/dist/manifest.json +505 -0
  117. package/config/plan-draft.example.json +0 -125
  118. package/config/plan-draft.multiple-tasks.example.json +0 -375
  119. package/config/plan-draft.quick.example.json +0 -78
  120. package/prompts/abel-design.md +0 -382
  121. package/prompts/abel-diagnose.md +0 -71
  122. package/prompts/abel-implement.md +0 -284
  123. package/prompts/abel-init.md +0 -52
  124. package/src/activation.ts +0 -44
  125. package/src/activity-contracts.ts +0 -82
  126. package/src/agent-registry.ts +0 -53
  127. package/src/apply-transaction.ts +0 -1437
  128. package/src/artifact-store.ts +0 -213
  129. package/src/build-windows-job.mjs +0 -95
  130. package/src/candidate-artifact.ts +0 -143
  131. package/src/candidate-context.ts +0 -289
  132. package/src/candidate-patch.ts +0 -271
  133. package/src/candidate-workspace.ts +0 -80
  134. package/src/canonical.ts +0 -16
  135. package/src/change-contract-schema.ts +0 -191
  136. package/src/change-contract.ts +0 -324
  137. package/src/change-verification.ts +0 -1617
  138. package/src/contracts.ts +0 -2466
  139. package/src/control-contracts.ts +0 -382
  140. package/src/delivery-compiler.ts +0 -1805
  141. package/src/delivery-revision.ts +0 -42
  142. package/src/design-control.ts +0 -1299
  143. package/src/design-diagnostics.ts +0 -181
  144. package/src/design-journal.ts +0 -1773
  145. package/src/directory-sync.ts +0 -36
  146. package/src/durable-contracts.ts +0 -227
  147. package/src/durable-workflow.ts +0 -822
  148. package/src/evidence-draft.ts +0 -122
  149. package/src/execution-profile.ts +0 -64
  150. package/src/execution-retention.ts +0 -77
  151. package/src/file-snapshot.ts +0 -163
  152. package/src/implement-continuation.ts +0 -559
  153. package/src/implement-graph.ts +0 -690
  154. package/src/implement-plan.ts +0 -72
  155. package/src/install-config.d.mts +0 -6
  156. package/src/isolation-backend.ts +0 -353
  157. package/src/model-source.ts +0 -22
  158. package/src/openspec-cli.ts +0 -494
  159. package/src/operator-cli-entry.mjs +0 -24
  160. package/src/operator-tools.ts +0 -309
  161. package/src/package-candidate-process.ts +0 -206
  162. package/src/package-candidate.ts +0 -24
  163. package/src/package-delivery.ts +0 -486
  164. package/src/package-state.ts +0 -320
  165. package/src/package-verification.ts +0 -635
  166. package/src/package-workflow.ts +0 -305
  167. package/src/packet-runtime.ts +0 -459
  168. package/src/phase-execution.ts +0 -2163
  169. package/src/pi-adapter.ts +0 -19
  170. package/src/plan-draft-summary.ts +0 -527
  171. package/src/plan-draft.ts +0 -502
  172. package/src/remove-path.ts +0 -32
  173. package/src/run-state.ts +0 -420
  174. package/src/run-store.ts +0 -1179
  175. package/src/safe-path.ts +0 -77
  176. package/src/scoped-grep-worker.mjs +0 -23
  177. package/src/scoped-tools.ts +0 -775
  178. package/src/single-task-draft.ts +0 -142
  179. package/src/sqlite-schema.ts +0 -171
  180. package/src/state-root.ts +0 -215
  181. package/src/storage-schema.ts +0 -360
  182. package/src/subagent-activity.ts +0 -1417
  183. package/src/subagent-process.ts +0 -476
  184. package/src/task-ledger.ts +0 -1338
  185. package/src/transport-budget.ts +0 -50
  186. package/src/verification-capability.ts +0 -1191
  187. package/src/verification-environment-io.ts +0 -389
  188. package/src/verification-environment.ts +0 -162
  189. package/src/verification-identity.ts +0 -77
  190. package/src/verification-scan.ts +0 -64
  191. package/src/windows-job-backend.ts +0 -419
  192. package/src/windows-job.c +0 -149
  193. package/src/workflow-engine.ts +0 -28
  194. package/src/workflow-policy.ts +0 -1670
  195. package/src/workflow-recovery-policy.ts +0 -97
  196. package/src/workflow-scheduling.ts +0 -105
  197. package/src/workflow-state-machine.ts +0 -4341
  198. package/src/workflow-status.ts +0 -576
  199. package/src/workspace-io-entry.mjs +0 -76
  200. package/src/workspace-io-worker.mjs +0 -1312
  201. package/src/workspace-io.ts +0 -89
  202. package/src/workspace-store.ts +0 -634
@@ -0,0 +1,32 @@
1
+ import{n as e}from"./rolldown-runtime.js";var t=e({DOMutil:()=>dA,DataSet:()=>$k,DataView:()=>eA,Graph2d:()=>LP,Hammer:()=>hA,Queue:()=>Yk,Timeline:()=>qP,keycharm:()=>Se,moment:()=>_A,timeline:()=>QP,util:()=>Ik}),n=typeof globalThis<`u`?globalThis:typeof window<`u`?window:typeof global<`u`?global:typeof self<`u`?self:{};function r(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,`default`)?e.default:e}function a(e){throw Error(`Could not dynamically require "`+e+`". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.`)}var o={exports:{}},s={exports:{}},c=s.exports,l;function u(){return l||(l=1,(function(e,t){(function(t,n){e.exports=n()})(c,(function(){var t;function n(){return t.apply(null,arguments)}function r(e){t=e}function o(e){return e instanceof Array||Object.prototype.toString.call(e)===`[object Array]`}function s(e){return e!=null&&Object.prototype.toString.call(e)===`[object Object]`}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(e).length===0;for(var t in e)if(c(e,t))return!1;return!0}function u(e){return e===void 0}function d(e){return typeof e==`number`||Object.prototype.toString.call(e)===`[object Number]`}function f(e){return e instanceof Date||Object.prototype.toString.call(e)===`[object Date]`}function p(e,t){var n=[],r,a=e.length;for(r=0;r<a;++r)n.push(t(e[r],r));return n}function m(e,t){for(var n in t)c(t,n)&&(e[n]=t[n]);return c(t,`toString`)&&(e.toString=t.toString),c(t,`valueOf`)&&(e.valueOf=t.valueOf),e}function h(e,t,n,r){return pr(e,t,n,r,!0).utc()}function g(){return{empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}}function _(e){return e._pf??=g(),e._pf}var v=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};function y(e){var t=null,n=!1,r=e._d&&!isNaN(e._d.getTime());if(r&&(t=_(e),n=v.call(t.parsedDateParts,function(e){return e!=null}),r=t.overflow<0&&!t.empty&&!t.invalidEra&&!t.invalidMonth&&!t.invalidWeekday&&!t.weekdayMismatch&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(r=r&&t.charsLeftOver===0&&t.unusedTokens.length===0&&t.bigHour===void 0)),Object.isFrozen==null||!Object.isFrozen(e))e._isValid=r;else return r;return e._isValid}function b(e){var t=h(NaN);return e==null?_(t).userInvalidated=!0:m(_(t),e),t}var x=n.momentProperties=[],S=!1;function C(e,t){var n,r,a,o=x.length;if(u(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),u(t._i)||(e._i=t._i),u(t._f)||(e._f=t._f),u(t._l)||(e._l=t._l),u(t._strict)||(e._strict=t._strict),u(t._tzm)||(e._tzm=t._tzm),u(t._isUTC)||(e._isUTC=t._isUTC),u(t._offset)||(e._offset=t._offset),u(t._pf)||(e._pf=_(t)),u(t._locale)||(e._locale=t._locale),o>0)for(n=0;n<o;n++)r=x[n],a=t[r],u(a)||(e[r]=a);return e}function w(e){C(this,e),this._d=new Date(e._d==null?NaN:e._d.getTime()),this.isValid()||(this._d=new Date(NaN)),S===!1&&(S=!0,n.updateOffset(this),S=!1)}function T(e){return e instanceof w||e!=null&&e._isAMomentObject!=null}function ee(e){n.suppressDeprecationWarnings===!1&&typeof console<`u`&&console.warn&&console.warn(`Deprecation warning: `+e)}function E(e,t){var r=!0;return m(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,e),r){var a=[],o,s,l,u=arguments.length;for(s=0;s<u;s++){if(o=``,typeof arguments[s]==`object`){for(l in o+=`
2
+ [`+s+`] `,arguments[0])c(arguments[0],l)&&(o+=l+`: `+arguments[0][l]+`, `);o=o.slice(0,-2)}else o=arguments[s];a.push(o)}ee(e+`
3
+ Arguments: `+Array.prototype.slice.call(a).join(``)+`
4
+ `+Error().stack),r=!1}return t.apply(this,arguments)},t)}var te={};function ne(e,t){n.deprecationHandler!=null&&n.deprecationHandler(e,t),te[e]||(ee(t),te[e]=!0)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;function re(e){return typeof Function<`u`&&e instanceof Function||Object.prototype.toString.call(e)===`[object Function]`}function ie(e){var t,n;for(n in e)c(e,n)&&(t=e[n],re(t)?this[n]=t:this[`_`+n]=t);this._config=e,this._dayOfMonthOrdinalParseLenient=RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+`|\\d{1,2}`)}function ae(e,t){var n=m({},e),r;for(r in t)c(t,r)&&(s(e[r])&&s(t[r])?(n[r]={},m(n[r],e[r]),m(n[r],t[r])):t[r]==null?delete n[r]:n[r]=t[r]);for(r in e)c(e,r)&&!c(t,r)&&s(e[r])&&(n[r]=m({},n[r]));return n}function oe(e){e!=null&&this.set(e)}var se=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)c(e,t)&&n.push(t);return n},ce={sameDay:`[Today at] LT`,nextDay:`[Tomorrow at] LT`,nextWeek:`dddd [at] LT`,lastDay:`[Yesterday at] LT`,lastWeek:`[Last] dddd [at] LT`,sameElse:`L`};function le(e,t,n){var r=this._calendar[e]||this._calendar.sameElse;return re(r)?r.call(t,n):r}function ue(e,t,n){var r=``+Math.abs(e),a=t-r.length;return(e>=0?n?`+`:``:`-`)+(10**Math.max(0,a)).toString().substr(1)+r}var de=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,fe=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,pe={},me={};function D(e,t,n,r){var a=r;typeof r==`string`&&(a=function(){return this[r]()}),e&&(me[e]=a),t&&(me[t[0]]=function(){return ue(a.apply(this,arguments),t[1],t[2])}),n&&(me[n]=function(){return this.localeData().ordinal(a.apply(this,arguments),e)})}function he(e){return e.match(/\[[\s\S]/)?e.replace(/^\[|\]$/g,``):e.replace(/\\/g,``)}function ge(e){for(var t=e.match(de),n=0,r=t.length;n<r;n++)me[t[n]]?t[n]=me[t[n]]:t[n]=he(t[n]);return function(n){for(var a=``,o=0;o<r;o++)a+=re(t[o])?t[o].call(n,e):t[o];return a}}function _e(e,t){return e.isValid()?(t=ve(t,e.localeData()),pe[t]=pe[t]||ge(t),pe[t](e)):e.localeData().invalidDate()}function ve(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(fe.lastIndex=0;n>=0&&fe.test(e);)e=e.replace(fe,r),fe.lastIndex=0,--n;return e}var ye={LTS:`h:mm:ss A`,LT:`h:mm A`,L:`MM/DD/YYYY`,LL:`MMMM D, YYYY`,LLL:`MMMM D, YYYY h:mm A`,LLLL:`dddd, MMMM D, YYYY h:mm A`};function be(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.match(de).map(function(e){return e===`MMMM`||e===`MM`||e===`DD`||e===`dddd`?e.slice(1):e}).join(``),this._longDateFormat[e])}var xe=`Invalid date`;function Se(){return this._invalidDate}var Ce=`%d`,we=/\d{1,2}/;function Te(e){return this._ordinal.replace(`%d`,e)}var Ee={future:`in %s`,past:`%s ago`,s:`a few seconds`,ss:`%d seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,w:`a week`,ww:`%d weeks`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function De(e,t,n,r){var a=this._relativeTime[n];return re(a)?a(e,t,n,r):a.replace(/%d/i,e)}function Oe(e,t){var n=this._relativeTime[e>0?`future`:`past`];return re(n)?n(t):n.replace(/%s/i,t)}var ke={D:`date`,dates:`date`,date:`date`,d:`day`,days:`day`,day:`day`,e:`weekday`,weekdays:`weekday`,weekday:`weekday`,E:`isoWeekday`,isoweekdays:`isoWeekday`,isoweekday:`isoWeekday`,DDD:`dayOfYear`,dayofyears:`dayOfYear`,dayofyear:`dayOfYear`,h:`hour`,hours:`hour`,hour:`hour`,ms:`millisecond`,milliseconds:`millisecond`,millisecond:`millisecond`,m:`minute`,minutes:`minute`,minute:`minute`,M:`month`,months:`month`,month:`month`,Q:`quarter`,quarters:`quarter`,quarter:`quarter`,s:`second`,seconds:`second`,second:`second`,gg:`weekYear`,weekyears:`weekYear`,weekyear:`weekYear`,GG:`isoWeekYear`,isoweekyears:`isoWeekYear`,isoweekyear:`isoWeekYear`,w:`week`,weeks:`week`,week:`week`,W:`isoWeek`,isoweeks:`isoWeek`,isoweek:`isoWeek`,y:`year`,years:`year`,year:`year`};function O(e){return typeof e==`string`?ke[e]||ke[e.toLowerCase()]:void 0}function Ae(e){var t={},n,r;for(r in e)c(e,r)&&(n=O(r),n&&(t[n]=e[r]));return t}var je={date:9,day:11,weekday:11,isoWeekday:11,dayOfYear:4,hour:13,millisecond:16,minute:14,month:8,quarter:7,second:15,weekYear:1,isoWeekYear:1,week:5,isoWeek:5,year:1};function Me(e){var t=[],n;for(n in e)c(e,n)&&t.push({unit:n,priority:je[n]});return t.sort(function(e,t){return e.priority-t.priority}),t}var Ne=/\d/,Pe=/\d\d/,Fe=/\d{3}/,Ie=/\d{4}/,Le=/[+-]?\d{6}/,k=/\d\d?/,Re=/\d\d\d\d?/,ze=/\d\d\d\d\d\d?/,Be=/\d{1,3}/,Ve=/\d{1,4}/,He=/[+-]?\d{1,6}/,Ue=/\d+/,We=/[+-]?\d+/,Ge=/Z|[+-]\d\d:?\d\d/gi,Ke=/Z|[+-]\d\d(?::?\d\d)?/gi,qe=/[+-]?\d+(\.\d{1,3})?/,Je=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,Ye=/^[1-9]\d?/,Xe=/^([1-9]\d|\d)/,Ze={};function A(e,t,n){Ze[e]=re(t)?t:function(e,r){return e&&n?n:t}}function Qe(e,t){return c(Ze,e)?Ze[e](t._strict,t._locale):new RegExp($e(e))}function $e(e){return et(e.replace(`\\`,``).replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,a){return t||n||r||a}))}function et(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,`\\$&`)}function tt(e){return e<0?Math.ceil(e)||0:Math.floor(e)}function j(e){var t=+e,n=0;return t!==0&&isFinite(t)&&(n=tt(t)),n}var nt={};function M(e,t){var n,r=t,a;for(typeof e==`string`&&(e=[e]),d(t)&&(r=function(e,n){n[t]=j(e)}),a=e.length,n=0;n<a;n++)nt[e[n]]=r}function rt(e,t){M(e,function(e,n,r,a){r._w=r._w||{},t(e,r._w,r,a)})}function it(e,t,n){t!=null&&c(nt,e)&&nt[e](t,n._a,n,e)}function at(e){return e%4==0&&e%100!=0||e%400==0}var ot=0,st=1,ct=2,lt=3,ut=4,dt=5,ft=6,pt=7,mt=8;D(`Y`,0,0,function(){var e=this.year();return e<=9999?ue(e,4):`+`+e}),D(0,[`YY`,2],0,function(){return this.year()%100}),D(0,[`YYYY`,4],0,`year`),D(0,[`YYYYY`,5],0,`year`),D(0,[`YYYYYY`,6,!0],0,`year`),A(`Y`,We),A(`YY`,k,Pe),A(`YYYY`,Ve,Ie),A(`YYYYY`,He,Le),A(`YYYYYY`,He,Le),M([`YYYYY`,`YYYYYY`],ot),M(`YYYY`,function(e,t){t[ot]=e.length===2?n.parseTwoDigitYear(e):j(e)}),M(`YY`,function(e,t){t[ot]=n.parseTwoDigitYear(e)}),M(`Y`,function(e,t){t[ot]=parseInt(e,10)});function ht(e){return at(e)?366:365}n.parseTwoDigitYear=function(e){return j(e)+(j(e)>68?1900:2e3)};var gt=vt(`FullYear`,!0);function _t(){return at(this.year())}function vt(e,t){return function(r){return r==null?yt(this,e):(N(this,e,r),n.updateOffset(this,t),this)}}function yt(e,t){if(!e.isValid())return NaN;var n=e._d,r=e._isUTC;switch(t){case`Milliseconds`:return r?n.getUTCMilliseconds():n.getMilliseconds();case`Seconds`:return r?n.getUTCSeconds():n.getSeconds();case`Minutes`:return r?n.getUTCMinutes():n.getMinutes();case`Hours`:return r?n.getUTCHours():n.getHours();case`Date`:return r?n.getUTCDate():n.getDate();case`Day`:return r?n.getUTCDay():n.getDay();case`Month`:return r?n.getUTCMonth():n.getMonth();case`FullYear`:return r?n.getUTCFullYear():n.getFullYear();default:return NaN}}function N(e,t,n){var r,a,o,s,c;if(e.isValid()&&!isNaN(n)){switch(r=e._d,a=e._isUTC,t){case`Milliseconds`:a?r.setUTCMilliseconds(n):r.setMilliseconds(n);return;case`Seconds`:a?r.setUTCSeconds(n):r.setSeconds(n);return;case`Minutes`:a?r.setUTCMinutes(n):r.setMinutes(n);return;case`Hours`:a?r.setUTCHours(n):r.setHours(n);return;case`Date`:a?r.setUTCDate(n):r.setDate(n);return;case`FullYear`:break;default:return}o=n,s=e.month(),c=e.date(),c=c===29&&s===1&&!at(o)?28:c,a?r.setUTCFullYear(o,s,c):r.setFullYear(o,s,c)}}function bt(e){return e=O(e),re(this[e])?this[e]():this}function xt(e,t){if(typeof e==`object`){e=Ae(e);var n=Me(e),r,a=n.length;for(r=0;r<a;r++)this[n[r].unit](e[n[r].unit])}else if(e=O(e),re(this[e]))return this[e](t);return this}function St(e,t){return(e%t+t)%t}var Ct=Array.prototype.indexOf?Array.prototype.indexOf:function(e){for(var t=0;t<this.length;++t)if(this[t]===e)return t;return-1};function wt(e,t){if(isNaN(e)||isNaN(t))return NaN;var n=St(t,12);return e+=(t-n)/12,n===1?at(e)?29:28:31-n%7%2}D(`M`,[`MM`,2],`Mo`,function(){return this.month()+1}),D(`MMM`,0,0,function(e){return this.localeData().monthsShort(this,e)}),D(`MMMM`,0,0,function(e){return this.localeData().months(this,e)}),A(`M`,k,Ye),A(`MM`,k,Pe),A(`MMM`,function(e,t){return t.monthsShortRegex(e)}),A(`MMMM`,function(e,t){return t.monthsRegex(e)}),M([`M`,`MM`],function(e,t){t[st]=j(e)-1}),M([`MMM`,`MMMM`],function(e,t,n,r){var a=n._locale.monthsParse(e,r,n._strict);a==null?_(n).invalidMonth=e:t[st]=a});var P=`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),Tt=`Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec`.split(`_`),Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Dt=Je,Ot=Je;function kt(e,t){return e?o(this._months)?this._months[e.month()]:this._months[(this._months.isFormat||Et).test(t)?`format`:`standalone`][e.month()]:o(this._months)?this._months:this._months.standalone}function At(e,t){return e?o(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[Et.test(t)?`format`:`standalone`][e.month()]:o(this._monthsShort)?this._monthsShort:this._monthsShort.standalone}function jt(e,t,n){var r,a,o,s=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)o=h([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(o,``).toLocaleLowerCase(),this._longMonthsParse[r]=this.months(o,``).toLocaleLowerCase();return n?t===`MMM`?(a=Ct.call(this._shortMonthsParse,s),a===-1?null:a):(a=Ct.call(this._longMonthsParse,s),a===-1?null:a):t===`MMM`?(a=Ct.call(this._shortMonthsParse,s),a===-1?(a=Ct.call(this._longMonthsParse,s),a===-1?null:a):a):(a=Ct.call(this._longMonthsParse,s),a===-1?(a=Ct.call(this._shortMonthsParse,s),a===-1?null:a):a)}function Mt(e,t,n){var r,a,o;if(this._monthsParseExact)return jt.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++)if(a=h([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=RegExp(`^`+this.months(a,``).replace(`.`,``)+`$`,`i`),this._shortMonthsParse[r]=RegExp(`^`+this.monthsShort(a,``).replace(`.`,``)+`$`,`i`)),!n&&!this._monthsParse[r]&&(o=`^`+this.months(a,``)+`|^`+this.monthsShort(a,``),this._monthsParse[r]=new RegExp(o.replace(`.`,``),`i`)),n&&t===`MMMM`&&this._longMonthsParse[r].test(e)||n&&t===`MMM`&&this._shortMonthsParse[r].test(e)||!n&&this._monthsParse[r].test(e))return r}function Nt(e,t){if(!e.isValid())return e;if(typeof t==`string`){if(/^\d+$/.test(t))t=j(t);else if(t=e.localeData().monthsParse(t),!d(t))return e}var n=t,r=e.date();return r=r<29?r:Math.min(r,wt(e.year(),n)),e._isUTC?e._d.setUTCMonth(n,r):e._d.setMonth(n,r),e}function Pt(e){return e==null?yt(this,`Month`):(Nt(this,e),n.updateOffset(this,!0),this)}function Ft(){return wt(this.year(),this.month())}function It(e){return this._monthsParseExact?(c(this,`_monthsRegex`)||Rt.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):(c(this,`_monthsShortRegex`)||(this._monthsShortRegex=Dt),this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex)}function Lt(e){return this._monthsParseExact?(c(this,`_monthsRegex`)||Rt.call(this),e?this._monthsStrictRegex:this._monthsRegex):(c(this,`_monthsRegex`)||(this._monthsRegex=Ot),this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex)}function Rt(){function e(e,t){return t.length-e.length}for(var t=[],n=[],r=[],a=0,o,s,c;a<12;a++)o=h([2e3,a]),s=et(this.monthsShort(o,``)),c=et(this.months(o,``)),t.push(s),n.push(c),r.push(c),r.push(s);t.sort(e),n.sort(e),r.sort(e),this._monthsRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._monthsShortStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function zt(e,t,n,r,a,o,s){var c;return e<100&&e>=0?(c=new Date(e+400,t,n,r,a,o,s),isFinite(c.getFullYear())&&c.setFullYear(e)):c=new Date(e,t,n,r,a,o,s),c}function Bt(e){var t,n;return e<100&&e>=0?(n=Array.prototype.slice.call(arguments),n[0]=e+400,t=new Date(Date.UTC.apply(null,n)),isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e)):t=new Date(Date.UTC.apply(null,arguments)),t}function Vt(e,t,n){var r=7+t-n;return-((7+Bt(e,0,r).getUTCDay()-t)%7)+r-1}function Ht(e,t,n,r,a){var o=(7+n-r)%7,s=Vt(e,r,a),c=1+7*(t-1)+o+s,l,u;return c<=0?(l=e-1,u=ht(l)+c):c>ht(e)?(l=e+1,u=c-ht(e)):(l=e,u=c),{year:l,dayOfYear:u}}function Ut(e,t,n){var r=Vt(e.year(),t,n),a=Math.floor((e.dayOfYear()-r-1)/7)+1,o,s;return a<1?(s=e.year()-1,o=a+Wt(s,t,n)):a>Wt(e.year(),t,n)?(o=a-Wt(e.year(),t,n),s=e.year()+1):(s=e.year(),o=a),{week:o,year:s}}function Wt(e,t,n){var r=Vt(e,t,n),a=Vt(e+1,t,n);return(ht(e)-r+a)/7}D(`w`,[`ww`,2],`wo`,`week`),D(`W`,[`WW`,2],`Wo`,`isoWeek`),A(`w`,k,Ye),A(`ww`,k,Pe),A(`W`,k,Ye),A(`WW`,k,Pe),rt([`w`,`ww`,`W`,`WW`],function(e,t,n,r){t[r.substr(0,1)]=j(e)});function Gt(e){return Ut(e,this._week.dow,this._week.doy).week}var Kt={dow:0,doy:6};function qt(){return this._week.dow}function Jt(){return this._week.doy}function Yt(e){var t=this.localeData().week(this);return e==null?t:this.add((e-t)*7,`d`)}function Xt(e){var t=Ut(this,1,4).week;return e==null?t:this.add((e-t)*7,`d`)}D(`d`,0,`do`,`day`),D(`dd`,0,0,function(e){return this.localeData().weekdaysMin(this,e)}),D(`ddd`,0,0,function(e){return this.localeData().weekdaysShort(this,e)}),D(`dddd`,0,0,function(e){return this.localeData().weekdays(this,e)}),D(`e`,0,0,`weekday`),D(`E`,0,0,`isoWeekday`),A(`d`,k),A(`e`,k),A(`E`,k),A(`dd`,function(e,t){return t.weekdaysMinRegex(e)}),A(`ddd`,function(e,t){return t.weekdaysShortRegex(e)}),A(`dddd`,function(e,t){return t.weekdaysRegex(e)}),rt([`dd`,`ddd`,`dddd`],function(e,t,n,r){var a=n._locale.weekdaysParse(e,r,n._strict);a==null?_(n).invalidWeekday=e:t.d=a}),rt([`d`,`e`,`E`],function(e,t,n,r){t[r]=j(e)});function Zt(e,t){return typeof e==`string`?isNaN(e)?(e=t.weekdaysParse(e),typeof e==`number`?e:null):parseInt(e,10):e}function Qt(e,t){return typeof e==`string`?t.weekdaysParse(e)%7||7:isNaN(e)?null:e}function $t(e,t){return e.slice(t,7).concat(e.slice(0,t))}var en=`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),tn=`Sun_Mon_Tue_Wed_Thu_Fri_Sat`.split(`_`),nn=`Su_Mo_Tu_We_Th_Fr_Sa`.split(`_`),rn=Je,an=Je,on=Je;function sn(e,t){var n=o(this._weekdays)?this._weekdays:this._weekdays[e&&e!==!0&&this._weekdays.isFormat.test(t)?`format`:`standalone`];return e===!0?$t(n,this._week.dow):e?n[e.day()]:n}function cn(e){return e===!0?$t(this._weekdaysShort,this._week.dow):e?this._weekdaysShort[e.day()]:this._weekdaysShort}function ln(e){return e===!0?$t(this._weekdaysMin,this._week.dow):e?this._weekdaysMin[e.day()]:this._weekdaysMin}function un(e,t,n){var r,a,o,s=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)o=h([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(o,``).toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(o,``).toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(o,``).toLocaleLowerCase();return n?t===`dddd`?(a=Ct.call(this._weekdaysParse,s),a===-1?null:a):t===`ddd`?(a=Ct.call(this._shortWeekdaysParse,s),a===-1?null:a):(a=Ct.call(this._minWeekdaysParse,s),a===-1?null:a):t===`dddd`?(a=Ct.call(this._weekdaysParse,s),a!==-1||(a=Ct.call(this._shortWeekdaysParse,s),a!==-1)?a:(a=Ct.call(this._minWeekdaysParse,s),a===-1?null:a)):t===`ddd`?(a=Ct.call(this._shortWeekdaysParse,s),a!==-1||(a=Ct.call(this._weekdaysParse,s),a!==-1)?a:(a=Ct.call(this._minWeekdaysParse,s),a===-1?null:a)):(a=Ct.call(this._minWeekdaysParse,s),a!==-1||(a=Ct.call(this._weekdaysParse,s),a!==-1)?a:(a=Ct.call(this._shortWeekdaysParse,s),a===-1?null:a))}function dn(e,t,n){var r,a,o;if(this._weekdaysParseExact)return un.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++)if(a=h([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=RegExp(`^`+this.weekdays(a,``).replace(`.`,`\\.?`)+`$`,`i`),this._shortWeekdaysParse[r]=RegExp(`^`+this.weekdaysShort(a,``).replace(`.`,`\\.?`)+`$`,`i`),this._minWeekdaysParse[r]=RegExp(`^`+this.weekdaysMin(a,``).replace(`.`,`\\.?`)+`$`,`i`)),this._weekdaysParse[r]||(o=`^`+this.weekdays(a,``)+`|^`+this.weekdaysShort(a,``)+`|^`+this.weekdaysMin(a,``),this._weekdaysParse[r]=new RegExp(o.replace(`.`,``),`i`)),n&&t===`dddd`&&this._fullWeekdaysParse[r].test(e)||n&&t===`ddd`&&this._shortWeekdaysParse[r].test(e)||n&&t===`dd`&&this._minWeekdaysParse[r].test(e)||!n&&this._weekdaysParse[r].test(e))return r}function fn(e){if(!this.isValid())return e==null?NaN:this;var t=yt(this,`Day`);return e==null?t:(e=Zt(e,this.localeData()),this.add(e-t,`d`))}function pn(e){if(!this.isValid())return e==null?NaN:this;var t=(this.day()+7-this.localeData()._week.dow)%7;return e==null?t:this.add(e-t,`d`)}function mn(e){if(!this.isValid())return e==null?NaN:this;if(e!=null){var t=Qt(e,this.localeData());return this.day(this.day()%7?t:t-7)}return this.day()||7}function hn(e){return this._weekdaysParseExact?(c(this,`_weekdaysRegex`)||vn.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):(c(this,`_weekdaysRegex`)||(this._weekdaysRegex=rn),this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex)}function gn(e){return this._weekdaysParseExact?(c(this,`_weekdaysRegex`)||vn.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(c(this,`_weekdaysShortRegex`)||(this._weekdaysShortRegex=an),this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)}function _n(e){return this._weekdaysParseExact?(c(this,`_weekdaysRegex`)||vn.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(c(this,`_weekdaysMinRegex`)||(this._weekdaysMinRegex=on),this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)}function vn(){function e(e,t){return t.length-e.length}for(var t=[],n=[],r=[],a=[],o=0,s,c,l,u;o<7;o++)s=h([2e3,1]).day(o),c=et(this.weekdaysMin(s,``)),l=et(this.weekdaysShort(s,``)),u=et(this.weekdays(s,``)),t.push(c),n.push(l),r.push(u),a.push(c),a.push(l),a.push(u);t.sort(e),n.sort(e),r.sort(e),a.sort(e),this._weekdaysRegex=RegExp(`^(`+a.join(`|`)+`)`,`i`),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._weekdaysShortStrictRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`),this._weekdaysMinStrictRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`)}function yn(){return this.hours()%12||12}function bn(){return this.hours()||24}D(`H`,[`HH`,2],0,`hour`),D(`h`,[`hh`,2],0,yn),D(`k`,[`kk`,2],0,bn),D(`hmm`,0,0,function(){return``+yn.apply(this)+ue(this.minutes(),2)}),D(`hmmss`,0,0,function(){return``+yn.apply(this)+ue(this.minutes(),2)+ue(this.seconds(),2)}),D(`Hmm`,0,0,function(){return``+this.hours()+ue(this.minutes(),2)}),D(`Hmmss`,0,0,function(){return``+this.hours()+ue(this.minutes(),2)+ue(this.seconds(),2)});function xn(e,t){D(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}xn(`a`,!0),xn(`A`,!1);function Sn(e,t){return t._meridiemParse}A(`a`,Sn),A(`A`,Sn),A(`H`,k,Xe),A(`h`,k,Ye),A(`k`,k,Ye),A(`HH`,k,Pe),A(`hh`,k,Pe),A(`kk`,k,Pe),A(`hmm`,Re),A(`hmmss`,ze),A(`Hmm`,Re),A(`Hmmss`,ze),M([`H`,`HH`],lt),M([`k`,`kk`],function(e,t,n){var r=j(e);t[lt]=r===24?0:r}),M([`a`,`A`],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),M([`h`,`hh`],function(e,t,n){t[lt]=j(e),_(n).bigHour=!0}),M(`hmm`,function(e,t,n){var r=e.length-2;t[lt]=j(e.substr(0,r)),t[ut]=j(e.substr(r)),_(n).bigHour=!0}),M(`hmmss`,function(e,t,n){var r=e.length-4,a=e.length-2;t[lt]=j(e.substr(0,r)),t[ut]=j(e.substr(r,2)),t[dt]=j(e.substr(a)),_(n).bigHour=!0}),M(`Hmm`,function(e,t,n){var r=e.length-2;t[lt]=j(e.substr(0,r)),t[ut]=j(e.substr(r))}),M(`Hmmss`,function(e,t,n){var r=e.length-4,a=e.length-2;t[lt]=j(e.substr(0,r)),t[ut]=j(e.substr(r,2)),t[dt]=j(e.substr(a))});function Cn(e){return(e+``).toLowerCase().charAt(0)===`p`}var wn=/[ap]\.?m?\.?/i,Tn=vt(`Hours`,!0);function En(e,t,n){return e>11?n?`pm`:`PM`:n?`am`:`AM`}var Dn={calendar:ce,longDateFormat:ye,invalidDate:xe,ordinal:Ce,dayOfMonthOrdinalParse:we,relativeTime:Ee,months:P,monthsShort:Tt,week:Kt,weekdays:en,weekdaysMin:nn,weekdaysShort:tn,meridiemParse:wn},F={},On={},kn;function An(e,t){var n,r=Math.min(e.length,t.length);for(n=0;n<r;n+=1)if(e[n]!==t[n])return n;return r}function jn(e){return e&&e.toLowerCase().replace(`_`,`-`)}function Mn(e){for(var t=0,n,r,a,o;t<e.length;){for(o=jn(e[t]).split(`-`),n=o.length,r=jn(e[t+1]),r=r?r.split(`-`):null;n>0;){if(a=Pn(o.slice(0,n).join(`-`)),a)return a;if(r&&r.length>=n&&An(o,r)>=n-1)break;n--}t++}return kn}function Nn(e){return!!(e&&e.match(`^[^/\\\\]*$`))}function Pn(t){var n=null,r;if(F[t]===void 0&&e&&e.exports&&Nn(t))try{n=kn._abbr,r=a,r(`./locale/`+t),Fn(n)}catch{F[t]=null}return F[t]}function Fn(e,t){var n;return e&&(n=u(t)?Rn(e):In(e,t),n?kn=n:typeof console<`u`&&console.warn&&console.warn(`Locale `+e+` not found. Did you forget to load it?`)),kn._abbr}function In(e,t){if(t!==null){var n,r=Dn;if(t.abbr=e,F[e]!=null)ne(`defineLocaleOverride`,`use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info.`),r=F[e]._config;else if(t.parentLocale!=null){if(F[t.parentLocale]!=null)r=F[t.parentLocale]._config;else if(n=Pn(t.parentLocale),n!=null)r=n._config;else return On[t.parentLocale]||(On[t.parentLocale]=[]),On[t.parentLocale].push({name:e,config:t}),null}return F[e]=new oe(ae(r,t)),On[e]&&On[e].forEach(function(e){In(e.name,e.config)}),Fn(e),F[e]}return delete F[e],null}function Ln(e,t){if(t!=null){var n,r,a=Dn;F[e]!=null&&F[e].parentLocale!=null?F[e].set(ae(F[e]._config,t)):(r=Pn(e),r!=null&&(a=r._config),t=ae(a,t),r??(t.abbr=e),n=new oe(t),n.parentLocale=F[e],F[e]=n),Fn(e)}else F[e]!=null&&(F[e].parentLocale==null?F[e]!=null&&delete F[e]:(F[e]=F[e].parentLocale,e===Fn()&&Fn(e)));return F[e]}function Rn(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return kn;if(!o(e)){if(t=Pn(e),t)return t;e=[e]}return Mn(e)}function zn(){return se(F)}function Bn(e){var t,n=e._a;return n&&_(e).overflow===-2&&(t=n[st]<0||n[st]>11?st:n[ct]<1||n[ct]>wt(n[ot],n[st])?ct:n[lt]<0||n[lt]>24||n[lt]===24&&(n[ut]!==0||n[dt]!==0||n[ft]!==0)?lt:n[ut]<0||n[ut]>59?ut:n[dt]<0||n[dt]>59?dt:n[ft]<0||n[ft]>999?ft:-1,_(e)._overflowDayOfYear&&(t<ot||t>ct)&&(t=ct),_(e)._overflowWeeks&&t===-1&&(t=pt),_(e)._overflowWeekday&&t===-1&&(t=mt),_(e).overflow=t),e}var Vn=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Hn=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Un=/Z|[+-]\d\d(?::?\d\d)?/,Wn=[[`YYYYYY-MM-DD`,/[+-]\d{6}-\d\d-\d\d/],[`YYYY-MM-DD`,/\d{4}-\d\d-\d\d/],[`GGGG-[W]WW-E`,/\d{4}-W\d\d-\d/],[`GGGG-[W]WW`,/\d{4}-W\d\d/,!1],[`YYYY-DDD`,/\d{4}-\d{3}/],[`YYYY-MM`,/\d{4}-\d\d/,!1],[`YYYYYYMMDD`,/[+-]\d{10}/],[`YYYYMMDD`,/\d{8}/],[`GGGG[W]WWE`,/\d{4}W\d{3}/],[`GGGG[W]WW`,/\d{4}W\d{2}/,!1],[`YYYYDDD`,/\d{7}/],[`YYYYMM`,/\d{6}/,!1],[`YYYY`,/\d{4}/,!1]],Gn=[[`HH:mm:ss.SSSS`,/\d\d:\d\d:\d\d\.\d+/],[`HH:mm:ss,SSSS`,/\d\d:\d\d:\d\d,\d+/],[`HH:mm:ss`,/\d\d:\d\d:\d\d/],[`HH:mm`,/\d\d:\d\d/],[`HHmmss.SSSS`,/\d\d\d\d\d\d\.\d+/],[`HHmmss,SSSS`,/\d\d\d\d\d\d,\d+/],[`HHmmss`,/\d\d\d\d\d\d/],[`HHmm`,/\d\d\d\d/],[`HH`,/\d\d/]],Kn=/^\/?Date\((-?\d+)/i,qn=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,Jn={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Yn(e){var t,n,r=e._i,a=Vn.exec(r)||Hn.exec(r),o,s,c,l,u=Wn.length,d=Gn.length;if(a){for(_(e).iso=!0,t=0,n=u;t<n;t++)if(Wn[t][1].exec(a[1])){s=Wn[t][0],o=Wn[t][2]!==!1;break}if(s==null){e._isValid=!1;return}if(a[3]){for(t=0,n=d;t<n;t++)if(Gn[t][1].exec(a[3])){c=(a[2]||` `)+Gn[t][0];break}if(c==null){e._isValid=!1;return}}if(!o&&c!=null){e._isValid=!1;return}if(a[4]){if(Un.exec(a[4]))l=`Z`;else{e._isValid=!1;return}}e._f=s+(c||``)+(l||``),or(e)}else e._isValid=!1}function Xn(e,t,n,r,a,o){var s=[Zn(e),Tt.indexOf(t),parseInt(n,10),parseInt(r,10),parseInt(a,10)];return o&&s.push(parseInt(o,10)),s}function Zn(e){var t=parseInt(e,10);return t<=49?2e3+t:t<=999?1900+t:t}function Qn(e){return e.replace(/\([^()]*\)|[\n\t]/g,` `).replace(/(\s\s+)/g,` `).replace(/^\s\s*/,``).replace(/\s\s*$/,``)}function $n(e,t,n){return e&&tn.indexOf(e)!==new Date(t[0],t[1],t[2]).getDay()?(_(n).weekdayMismatch=!0,n._isValid=!1,!1):!0}function er(e,t,n){if(e)return Jn[e];if(t)return 0;var r=parseInt(n,10),a=r%100;return(r-a)/100*60+a}function tr(e){var t=qn.exec(Qn(e._i)),n;if(t){if(n=Xn(t[4],t[3],t[2],t[5],t[6],t[7]),!$n(t[1],n,e))return;e._a=n,e._tzm=er(t[8],t[9],t[10]),e._d=Bt.apply(null,e._a),e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),_(e).rfc2822=!0}else e._isValid=!1}function I(e){var t=Kn.exec(e._i);if(t!==null)e._d=new Date(+t[1]);else{if(Yn(e),e._isValid===!1)delete e._isValid;else return;if(tr(e),e._isValid===!1)delete e._isValid;else return;e._strict?e._isValid=!1:n.createFromInputFallback(e)}}n.createFromInputFallback=E(`value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.`,function(e){e._d=new Date(e._i+(e._useUTC?` UTC`:``))});function nr(e,t,n){return e??t??n}function rr(e){var t=new Date(n.now());return e._useUTC?[t.getUTCFullYear(),t.getUTCMonth(),t.getUTCDate()]:[t.getFullYear(),t.getMonth(),t.getDate()]}function ir(e){var t,n,r=[],a,o,s;if(!e._d){for(a=rr(e),e._w&&e._a[ct]==null&&e._a[st]==null&&ar(e),e._dayOfYear!=null&&(s=nr(e._a[ot],a[ot]),(e._dayOfYear>ht(s)||e._dayOfYear===0)&&(_(e)._overflowDayOfYear=!0),n=Bt(s,0,e._dayOfYear),e._a[st]=n.getUTCMonth(),e._a[ct]=n.getUTCDate()),t=0;t<3&&e._a[t]==null;++t)e._a[t]=r[t]=a[t];for(;t<7;t++)e._a[t]=r[t]=e._a[t]==null?+(t===2):e._a[t];e._a[lt]===24&&e._a[ut]===0&&e._a[dt]===0&&e._a[ft]===0&&(e._nextDay=!0,e._a[lt]=0),e._d=(e._useUTC?Bt:zt).apply(null,r),o=e._useUTC?e._d.getUTCDay():e._d.getDay(),e._tzm!=null&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[lt]=24),e._w&&e._w.d!==void 0&&e._w.d!==o&&(_(e).weekdayMismatch=!0)}}function ar(e){var t=e._w,n,r,a,o,s,c,l,u;t.GG!=null||t.W!=null||t.E!=null?(o=1,s=4,n=nr(t.GG,e._a[ot],Ut(mr(),1,4).year),r=nr(t.W,1),a=nr(t.E,1),(a<1||a>7)&&(l=!0)):(o=e._locale._week.dow,s=e._locale._week.doy,u=Ut(mr(),o,s),n=nr(t.gg,e._a[ot],u.year),r=nr(t.w,u.week),t.d==null?t.e==null?a=o:(a=t.e+o,(t.e<0||t.e>6)&&(l=!0)):(a=t.d,(a<0||a>6)&&(l=!0))),r<1||r>Wt(n,o,s)?_(e)._overflowWeeks=!0:l==null?(c=Ht(n,r,a,o,s),e._a[ot]=c.year,e._dayOfYear=c.dayOfYear):_(e)._overflowWeekday=!0}n.ISO_8601=function(){},n.RFC_2822=function(){};function or(e){if(e._f===n.ISO_8601)Yn(e);else if(e._f===n.RFC_2822)tr(e);else{e._a=[],_(e).empty=!0;var t=``+e._i,r,a,o,s,c,l=t.length,u=0,d,f;for(o=ve(e._f,e._locale).match(de)||[],f=o.length,r=0;r<f;r++)s=o[r],a=(t.match(Qe(s,e))||[])[0],a&&(c=t.substr(0,t.indexOf(a)),c.length>0&&_(e).unusedInput.push(c),t=t.slice(t.indexOf(a)+a.length),u+=a.length),me[s]?(a?_(e).empty=!1:_(e).unusedTokens.push(s),it(s,a,e)):e._strict&&!a&&_(e).unusedTokens.push(s);_(e).charsLeftOver=l-u,t.length>0&&_(e).unusedInput.push(t),e._a[lt]<=12&&_(e).bigHour===!0&&e._a[lt]>0&&(_(e).bigHour=void 0),_(e).parsedDateParts=e._a.slice(0),_(e).meridiem=e._meridiem,e._a[lt]=sr(e._locale,e._a[lt],e._meridiem),d=_(e).era,d!==null&&(e._a[ot]=e._locale.erasConvertYear(d,e._a[ot])),ir(e),Bn(e)}}function sr(e,t,n){var r;return n==null?t:e.meridiemHour==null?(e.isPM==null||(r=e.isPM(n),r&&t<12&&(t+=12),!r&&t===12&&(t=0)),t):e.meridiemHour(t,n)}function cr(e){var t,n,r,a,o,s,c=!1,l=e._f.length;if(l===0)_(e).invalidFormat=!0,e._d=new Date(NaN);else{for(a=0;a<l;a++)o=0,s=!1,t=C({},e),e._useUTC!=null&&(t._useUTC=e._useUTC),t._f=e._f[a],or(t),y(t)&&(s=!0),o+=_(t).charsLeftOver,o+=_(t).unusedTokens.length*10,_(t).score=o,c?o<r&&(r=o,n=t):(r==null||o<r||s)&&(r=o,n=t,s&&(c=!0));m(e,n||t)}}function lr(e){if(!e._d){var t=Ae(e._i),n=t.day===void 0?t.date:t.day;e._a=p([t.year,t.month,n,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),ir(e)}}function ur(e){var t=new w(Bn(dr(e)));return t._nextDay&&=(t.add(1,`d`),void 0),t}function dr(e){var t=e._i,n=e._f;return e._locale=e._locale||Rn(e._l),t===null||n===void 0&&t===``?b({nullInput:!0}):(typeof t==`string`&&(e._i=t=e._locale.preparse(t)),T(t)?new w(Bn(t)):(f(t)?e._d=t:o(n)?cr(e):n?or(e):fr(e),y(e)||(e._d=null),e))}function fr(e){var t=e._i;u(t)?e._d=new Date(n.now()):f(t)?e._d=new Date(t.valueOf()):typeof t==`string`?I(e):o(t)?(e._a=p(t.slice(0),function(e){return parseInt(e,10)}),ir(e)):s(t)?lr(e):d(t)?e._d=new Date(t):n.createFromInputFallback(e)}function pr(e,t,n,r,a){var c={};return(t===!0||t===!1)&&(r=t,t=void 0),(n===!0||n===!1)&&(r=n,n=void 0),(s(e)&&l(e)||o(e)&&e.length===0)&&(e=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=a,c._l=n,c._i=e,c._f=t,c._strict=r,ur(c)}function mr(e,t,n,r){return pr(e,t,n,r,!1)}var hr=E(`moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=mr.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:b()}),gr=E(`moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/`,function(){var e=mr.apply(null,arguments);return this.isValid()&&e.isValid()?e>this?this:e:b()});function _r(e,t){var n,r;if(t.length===1&&o(t[0])&&(t=t[0]),!t.length)return mr();for(n=t[0],r=1;r<t.length;++r)(!t[r].isValid()||t[r][e](n))&&(n=t[r]);return n}function vr(){return _r(`isBefore`,[].slice.call(arguments,0))}function yr(){return _r(`isAfter`,[].slice.call(arguments,0))}var br=function(){return Date.now?Date.now():+new Date},xr=[`year`,`quarter`,`month`,`week`,`day`,`hour`,`minute`,`second`,`millisecond`];function Sr(e){var t,n=!1,r,a=xr.length;for(t in e)if(c(e,t)&&(Ct.call(xr,t)===-1||e[t]!=null&&isNaN(e[t])))return!1;for(r=0;r<a;++r)if(e[xr[r]]){if(n)return!1;parseFloat(e[xr[r]])!==j(e[xr[r]])&&(n=!0)}return!0}function Cr(){return this._isValid}function wr(){return qr(NaN)}function Tr(e){var t=Ae(e),n=t.year||0,r=t.quarter||0,a=t.month||0,o=t.week||t.isoWeek||0,s=t.day||0,c=t.hour||0,l=t.minute||0,u=t.second||0,d=t.millisecond||0;this._isValid=Sr(t),this._milliseconds=+d+u*1e3+l*6e4+c*1e3*60*60,this._days=+s+o*7,this._months=+a+r*3+n*12,this._data={},this._locale=Rn(),this._bubble()}function Er(e){return e instanceof Tr}function Dr(e){return e<0?Math.round(-1*e)*-1:Math.round(e)}function Or(e,t,n){for(var r=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0,s=0;s<r;s++)j(e[s])!==j(t[s])&&o++;return o+a}function kr(e,t){D(e,0,0,function(){var e=this.utcOffset(),n=`+`;return e<0&&(e=-e,n=`-`),n+ue(~~(e/60),2)+t+ue(~~e%60,2)})}kr(`Z`,`:`),kr(`ZZ`,``),A(`Z`,Ke),A(`ZZ`,Ke),M([`Z`,`ZZ`],function(e,t,n){n._useUTC=!0,n._tzm=jr(Ke,e)});var Ar=/([\+\-]|\d\d)/gi;function jr(e,t){var n=(t||``).match(e),r,a,o;return n===null?null:(r=n[n.length-1]||[],a=(r+``).match(Ar)||[`-`,0,0],o=+(a[1]*60)+j(a[2]),o===0?0:a[0]===`+`?o:-o)}function Mr(e,t){var r,a;return t._isUTC?(r=t.clone(),a=(T(e)||f(e)?e.valueOf():mr(e).valueOf())-r.valueOf(),r._d.setTime(r._d.valueOf()+a),n.updateOffset(r,!1),r):mr(e).local()}function Nr(e){return-Math.round(e._d.getTimezoneOffset())}n.updateOffset=function(){};function Pr(e,t,r){var a=this._offset||0,o;if(!this.isValid())return e==null?NaN:this;if(e!=null){if(typeof e==`string`){if(e=jr(Ke,e),e===null)return this}else Math.abs(e)<16&&!r&&(e*=60);return!this._isUTC&&t&&(o=Nr(this)),this._offset=e,this._isUTC=!0,o!=null&&this.add(o,`m`),a!==e&&(!t||this._changeInProgress?Qr(this,qr(e-a,`m`),1,!1):this._changeInProgress||=(this._changeInProgress=!0,n.updateOffset(this,!0),null)),this}return this._isUTC?a:Nr(this)}function Fr(e,t){return e==null?-this.utcOffset():(typeof e!=`string`&&(e=-e),this.utcOffset(e,t),this)}function Ir(e){return this.utcOffset(0,e)}function Lr(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(Nr(this),`m`)),this}function Rr(){if(this._tzm!=null)this.utcOffset(this._tzm,!1,!0);else if(typeof this._i==`string`){var e=jr(Ge,this._i);e==null?this.utcOffset(0,!0):this.utcOffset(e)}return this}function zr(e){return this.isValid()?(e=e?mr(e).utcOffset():0,(this.utcOffset()-e)%60==0):!1}function Br(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()}function Vr(){if(!u(this._isDSTShifted))return this._isDSTShifted;var e={},t;return C(e,this),e=dr(e),e._a?(t=e._isUTC?h(e._a):mr(e._a),this._isDSTShifted=this.isValid()&&Or(e._a,t.toArray())>0):this._isDSTShifted=!1,this._isDSTShifted}function Hr(){return this.isValid()?!this._isUTC:!1}function Ur(){return this.isValid()?this._isUTC:!1}function Wr(){return this.isValid()?this._isUTC&&this._offset===0:!1}var Gr=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Kr=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function qr(e,t){var n=e,r=null,a,o,s;return Er(e)?n={ms:e._milliseconds,d:e._days,M:e._months}:d(e)||!isNaN(+e)?(n={},t?n[t]=+e:n.milliseconds=+e):(r=Gr.exec(e))?(a=r[1]===`-`?-1:1,n={y:0,d:j(r[ct])*a,h:j(r[lt])*a,m:j(r[ut])*a,s:j(r[dt])*a,ms:j(Dr(r[ft]*1e3))*a}):(r=Kr.exec(e))?(a=r[1]===`-`?-1:1,n={y:Jr(r[2],a),M:Jr(r[3],a),w:Jr(r[4],a),d:Jr(r[5],a),h:Jr(r[6],a),m:Jr(r[7],a),s:Jr(r[8],a)}):n==null?n={}:typeof n==`object`&&(`from`in n||`to`in n)&&(s=Xr(mr(n.from),mr(n.to)),n={},n.ms=s.milliseconds,n.M=s.months),o=new Tr(n),Er(e)&&c(e,`_locale`)&&(o._locale=e._locale),Er(e)&&c(e,`_isValid`)&&(o._isValid=e._isValid),o}qr.fn=Tr.prototype,qr.invalid=wr;function Jr(e,t){var n=e&&parseFloat(e.replace(`,`,`.`));return(isNaN(n)?0:n)*t}function Yr(e,t){var n={};return n.months=t.month()-e.month()+(t.year()-e.year())*12,e.clone().add(n.months,`M`).isAfter(t)&&--n.months,n.milliseconds=+t-e.clone().add(n.months,`M`),n}function Xr(e,t){var n;return e.isValid()&&t.isValid()?(t=Mr(t,e),e.isBefore(t)?n=Yr(e,t):(n=Yr(t,e),n.milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}function Zr(e,t){return function(n,r){var a,o;return r!==null&&!isNaN(+r)&&(ne(t,`moment().`+t+`(period, number) is deprecated. Please use moment().`+t+`(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info.`),o=n,n=r,r=o),a=qr(n,r),Qr(this,a,e),this}}function Qr(e,t,r,a){var o=t._milliseconds,s=Dr(t._days),c=Dr(t._months);e.isValid()&&(a??=!0,c&&Nt(e,yt(e,`Month`)+c*r),s&&N(e,`Date`,yt(e,`Date`)+s*r),o&&e._d.setTime(e._d.valueOf()+o*r),a&&n.updateOffset(e,s||c))}var $r=Zr(1,`add`),ei=Zr(-1,`subtract`);function ti(e){return typeof e==`string`||e instanceof String}function ni(e){return T(e)||f(e)||ti(e)||d(e)||ii(e)||ri(e)||e==null}function ri(e){var t=s(e)&&!l(e),n=!1,r=[`years`,`year`,`y`,`months`,`month`,`M`,`days`,`day`,`d`,`dates`,`date`,`D`,`hours`,`hour`,`h`,`minutes`,`minute`,`m`,`seconds`,`second`,`s`,`milliseconds`,`millisecond`,`ms`],a,o,u=r.length;for(a=0;a<u;a+=1)o=r[a],n||=c(e,o);return t&&n}function ii(e){var t=o(e),n=!1;return t&&(n=e.filter(function(t){return!d(t)&&ti(e)}).length===0),t&&n}function ai(e){for(var t=s(e)&&!l(e),n=!1,r=[`sameDay`,`nextDay`,`lastDay`,`nextWeek`,`lastWeek`,`sameElse`],a=0,o;a<r.length;a+=1)o=r[a],n||=c(e,o);return t&&n}function oi(e,t){var n=e.diff(t,`days`,!0);return n<-6?`sameElse`:n<-1?`lastWeek`:n<0?`lastDay`:n<1?`sameDay`:n<2?`nextDay`:n<7?`nextWeek`:`sameElse`}function si(e,t){arguments.length===1&&(arguments[0]?ni(arguments[0])?(e=arguments[0],t=void 0):ai(arguments[0])&&(t=arguments[0],e=void 0):(e=void 0,t=void 0));var r=e||mr(),a=Mr(r,this).startOf(`day`),o=n.calendarFormat(this,a)||`sameElse`,s=t&&(re(t[o])?t[o].call(this,r):t[o]);return this.format(s||this.localeData().calendar(o,this,mr(r)))}function ci(){return new w(this)}function li(e,t){var n=T(e)?e:mr(e);return this.isValid()&&n.isValid()?(t=O(t)||`millisecond`,t===`millisecond`?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf()):!1}function ui(e,t){var n=T(e)?e:mr(e);return this.isValid()&&n.isValid()?(t=O(t)||`millisecond`,t===`millisecond`?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf()):!1}function di(e,t,n,r){var a=T(e)?e:mr(e),o=T(t)?t:mr(t);return this.isValid()&&a.isValid()&&o.isValid()?(r||=`()`,(r[0]===`(`?this.isAfter(a,n):!this.isBefore(a,n))&&(r[1]===`)`?this.isBefore(o,n):!this.isAfter(o,n))):!1}function fi(e,t){var n=T(e)?e:mr(e),r;return this.isValid()&&n.isValid()?(t=O(t)||`millisecond`,t===`millisecond`?this.valueOf()===n.valueOf():(r=n.valueOf(),this.clone().startOf(t).valueOf()<=r&&r<=this.clone().endOf(t).valueOf())):!1}function pi(e,t){return this.isSame(e,t)||this.isAfter(e,t)}function mi(e,t){return this.isSame(e,t)||this.isBefore(e,t)}function hi(e,t,n){var r,a,o;if(!this.isValid()||(r=Mr(e,this),!r.isValid()))return NaN;switch(a=(r.utcOffset()-this.utcOffset())*6e4,t=O(t),t){case`year`:o=gi(this,r)/12;break;case`month`:o=gi(this,r);break;case`quarter`:o=gi(this,r)/3;break;case`second`:o=(this-r)/1e3;break;case`minute`:o=(this-r)/6e4;break;case`hour`:o=(this-r)/36e5;break;case`day`:o=(this-r-a)/864e5;break;case`week`:o=(this-r-a)/6048e5;break;default:o=this-r}return n?o:tt(o)}function gi(e,t){if(e.date()<t.date())return-gi(t,e);var n=(t.year()-e.year())*12+(t.month()-e.month()),r=e.clone().add(n,`months`),a,o;return t-r<0?(a=e.clone().add(n-1,`months`),o=(t-r)/(r-a)):(a=e.clone().add(n+1,`months`),o=(t-r)/(a-r)),-(n+o)||0}n.defaultFormat=`YYYY-MM-DDTHH:mm:ssZ`,n.defaultFormatUtc=`YYYY-MM-DDTHH:mm:ss[Z]`;function _i(){return this.clone().locale(`en`).format(`ddd MMM DD YYYY HH:mm:ss [GMT]ZZ`)}function vi(e){if(!this.isValid())return null;var t=e!==!0,n=t?this.clone().utc():this;return n.year()<0||n.year()>9999?_e(n,t?`YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYYYY-MM-DD[T]HH:mm:ss.SSSZ`):re(Date.prototype.toISOString)?t?this.toDate().toISOString():new Date(this.valueOf()+this.utcOffset()*60*1e3).toISOString().replace(`Z`,_e(n,`Z`)):_e(n,t?`YYYY-MM-DD[T]HH:mm:ss.SSS[Z]`:`YYYY-MM-DD[T]HH:mm:ss.SSSZ`)}function yi(){if(!this.isValid())return`moment.invalid(/* `+this._i+` */)`;var e=`moment`,t=``,n,r,a,o;return this.isLocal()||(e=this.utcOffset()===0?`moment.utc`:`moment.parseZone`,t=`Z`),n=`[`+e+`("]`,r=0<=this.year()&&this.year()<=9999?`YYYY`:`YYYYYY`,a=`-MM-DD[T]HH:mm:ss.SSS`,o=t+`[")]`,this.format(n+r+a+o)}function bi(e){e||=this.isUtc()?n.defaultFormatUtc:n.defaultFormat;var t=_e(this,e);return this.localeData().postformat(t)}function xi(e,t){return this.isValid()&&(T(e)&&e.isValid()||mr(e).isValid())?qr({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function Si(e){return this.from(mr(),e)}function Ci(e,t){return this.isValid()&&(T(e)&&e.isValid()||mr(e).isValid())?qr({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()}function wi(e){return this.to(mr(),e)}function Ti(e){var t;return e===void 0?this._locale._abbr:(t=Rn(e),t!=null&&(this._locale=t),this)}var Ei=E(`moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.`,function(e){return e===void 0?this.localeData():this.locale(e)});function Di(){return this._locale}var Oi=1e3,ki=60*Oi,Ai=60*ki,ji=3506328*Ai;function Mi(e,t){return(e%t+t)%t}function Ni(e,t,n){return e<100&&e>=0?new Date(e+400,t,n)-ji:new Date(e,t,n).valueOf()}function Pi(e,t,n){return e<100&&e>=0?Date.UTC(e+400,t,n)-ji:Date.UTC(e,t,n)}function Fi(e){var t,r;if(e=O(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(r=this._isUTC?Pi:Ni,e){case`year`:t=r(this.year(),0,1);break;case`quarter`:t=r(this.year(),this.month()-this.month()%3,1);break;case`month`:t=r(this.year(),this.month(),1);break;case`week`:t=r(this.year(),this.month(),this.date()-this.weekday());break;case`isoWeek`:t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case`day`:case`date`:t=r(this.year(),this.month(),this.date());break;case`hour`:t=this._d.valueOf(),t-=Mi(t+(this._isUTC?0:this.utcOffset()*ki),Ai);break;case`minute`:t=this._d.valueOf(),t-=Mi(t,ki);break;case`second`:t=this._d.valueOf(),t-=Mi(t,Oi)}return this._d.setTime(t),n.updateOffset(this,!0),this}function Ii(e){var t,r;if(e=O(e),e===void 0||e===`millisecond`||!this.isValid())return this;switch(r=this._isUTC?Pi:Ni,e){case`year`:t=r(this.year()+1,0,1)-1;break;case`quarter`:t=r(this.year(),this.month()-this.month()%3+3,1)-1;break;case`month`:t=r(this.year(),this.month()+1,1)-1;break;case`week`:t=r(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case`isoWeek`:t=r(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case`day`:case`date`:t=r(this.year(),this.month(),this.date()+1)-1;break;case`hour`:t=this._d.valueOf(),t+=Ai-Mi(t+(this._isUTC?0:this.utcOffset()*ki),Ai)-1;break;case`minute`:t=this._d.valueOf(),t+=ki-Mi(t,ki)-1;break;case`second`:t=this._d.valueOf(),t+=Oi-Mi(t,Oi)-1}return this._d.setTime(t),n.updateOffset(this,!0),this}function Li(){return this._d.valueOf()-(this._offset||0)*6e4}function Ri(){return Math.floor(this.valueOf()/1e3)}function zi(){return new Date(this.valueOf())}function Bi(){var e=this;return[e.year(),e.month(),e.date(),e.hour(),e.minute(),e.second(),e.millisecond()]}function Vi(){var e=this;return{years:e.year(),months:e.month(),date:e.date(),hours:e.hours(),minutes:e.minutes(),seconds:e.seconds(),milliseconds:e.milliseconds()}}function Hi(){return this.isValid()?this.toISOString():null}function Ui(){return y(this)}function Wi(){return m({},_(this))}function Gi(){return _(this).overflow}function Ki(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}}D(`N`,0,0,`eraAbbr`),D(`NN`,0,0,`eraAbbr`),D(`NNN`,0,0,`eraAbbr`),D(`NNNN`,0,0,`eraName`),D(`NNNNN`,0,0,`eraNarrow`),D(`y`,[`y`,1],`yo`,`eraYear`),D(`y`,[`yy`,2],0,`eraYear`),D(`y`,[`yyy`,3],0,`eraYear`),D(`y`,[`yyyy`,4],0,`eraYear`),A(`N`,ra),A(`NN`,ra),A(`NNN`,ra),A(`NNNN`,ia),A(`NNNNN`,aa),M([`N`,`NN`,`NNN`,`NNNN`,`NNNNN`],function(e,t,n,r){var a=n._locale.erasParse(e,r,n._strict);a?_(n).era=a:_(n).invalidEra=e}),A(`y`,Ue),A(`yy`,Ue),A(`yyy`,Ue),A(`yyyy`,Ue),A(`yo`,oa),M([`y`,`yy`,`yyy`,`yyyy`],ot),M([`yo`],function(e,t,n,r){var a;n._locale._eraYearOrdinalRegex&&(a=e.match(n._locale._eraYearOrdinalRegex)),t[ot]=n._locale.eraYearOrdinalParse?n._locale.eraYearOrdinalParse(e,a):parseInt(e,10)});function qi(e,t){var r,a,o,s=this._eras||Rn(`en`)._eras;for(r=0,a=s.length;r<a;++r)switch(typeof s[r].since==`string`&&(o=n(s[r].since).startOf(`day`),s[r].since=o.valueOf()),typeof s[r].until){case`undefined`:s[r].until=1/0;break;case`string`:o=n(s[r].until).startOf(`day`).valueOf(),s[r].until=o.valueOf()}return s}function Ji(e,t,n){var r,a,o=this.eras(),s,c,l;for(e=e.toUpperCase(),r=0,a=o.length;r<a;++r)if(s=o[r].name.toUpperCase(),c=o[r].abbr.toUpperCase(),l=o[r].narrow.toUpperCase(),n)switch(t){case`N`:case`NN`:case`NNN`:if(c===e)return o[r];break;case`NNNN`:if(s===e)return o[r];break;case`NNNNN`:if(l===e)return o[r]}else if([s,c,l].indexOf(e)>=0)return o[r]}function Yi(e,t){var r=e.since<=e.until?1:-1;return t===void 0?n(e.since).year():n(e.since).year()+(t-e.offset)*r}function Xi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].name;return``}function Zi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].narrow;return``}function Qi(){var e,t,n,r=this.localeData().eras();for(e=0,t=r.length;e<t;++e)if(n=this.clone().startOf(`day`).valueOf(),r[e].since<=n&&n<=r[e].until||r[e].until<=n&&n<=r[e].since)return r[e].abbr;return``}function $i(){var e,t,r,a,o=this.localeData().eras();for(e=0,t=o.length;e<t;++e)if(r=o[e].since<=o[e].until?1:-1,a=this.clone().startOf(`day`).valueOf(),o[e].since<=a&&a<=o[e].until||o[e].until<=a&&a<=o[e].since)return(this.year()-n(o[e].since).year())*r+o[e].offset;return this.year()}function ea(e){return c(this,`_erasNameRegex`)||sa.call(this),e?this._erasNameRegex:this._erasRegex}function ta(e){return c(this,`_erasAbbrRegex`)||sa.call(this),e?this._erasAbbrRegex:this._erasRegex}function na(e){return c(this,`_erasNarrowRegex`)||sa.call(this),e?this._erasNarrowRegex:this._erasRegex}function ra(e,t){return t.erasAbbrRegex(e)}function ia(e,t){return t.erasNameRegex(e)}function aa(e,t){return t.erasNarrowRegex(e)}function oa(e,t){return t._eraYearOrdinalRegex||Ue}function sa(){var e=[],t=[],n=[],r=[],a,o,s,c,l,u=this.eras();for(a=0,o=u.length;a<o;++a)s=et(u[a].name),c=et(u[a].abbr),l=et(u[a].narrow),t.push(s),e.push(c),n.push(l),r.push(s),r.push(c),r.push(l);this._erasRegex=RegExp(`^(`+r.join(`|`)+`)`,`i`),this._erasNameRegex=RegExp(`^(`+t.join(`|`)+`)`,`i`),this._erasAbbrRegex=RegExp(`^(`+e.join(`|`)+`)`,`i`),this._erasNarrowRegex=RegExp(`^(`+n.join(`|`)+`)`,`i`)}D(0,[`gg`,2],0,function(){return this.weekYear()%100}),D(0,[`GG`,2],0,function(){return this.isoWeekYear()%100});function ca(e,t){D(0,[e,e.length],0,t)}ca(`gggg`,`weekYear`),ca(`ggggg`,`weekYear`),ca(`GGGG`,`isoWeekYear`),ca(`GGGGG`,`isoWeekYear`),A(`G`,We),A(`g`,We),A(`GG`,k,Pe),A(`gg`,k,Pe),A(`GGGG`,Ve,Ie),A(`gggg`,Ve,Ie),A(`GGGGG`,He,Le),A(`ggggg`,He,Le),rt([`gggg`,`ggggg`,`GGGG`,`GGGGG`],function(e,t,n,r){t[r.substr(0,2)]=j(e)}),rt([`gg`,`GG`],function(e,t,r,a){t[a]=n.parseTwoDigitYear(e)});function la(e){return ha.call(this,e,this.week(),this.weekday()+this.localeData()._week.dow,this.localeData()._week.dow,this.localeData()._week.doy)}function ua(e){return ha.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)}function da(){return Wt(this.year(),1,4)}function fa(){return Wt(this.isoWeekYear(),1,4)}function pa(){var e=this.localeData()._week;return Wt(this.year(),e.dow,e.doy)}function ma(){var e=this.localeData()._week;return Wt(this.weekYear(),e.dow,e.doy)}function ha(e,t,n,r,a){var o;return e==null?Ut(this,r,a).year:(o=Wt(e,r,a),t>o&&(t=o),ga.call(this,e,t,n,r,a))}function ga(e,t,n,r,a){var o=Ht(e,t,n,r,a),s=Bt(o.year,0,o.dayOfYear);return this.year(s.getUTCFullYear()),this.month(s.getUTCMonth()),this.date(s.getUTCDate()),this}D(`Q`,0,`Qo`,`quarter`),A(`Q`,Ne),M(`Q`,function(e,t){t[st]=(j(e)-1)*3});function _a(e){return e==null?Math.ceil((this.month()+1)/3):this.month((e-1)*3+this.month()%3)}D(`D`,[`DD`,2],`Do`,`date`),A(`D`,k,Ye),A(`DD`,k,Pe),A(`Do`,function(e,t){return e?t._dayOfMonthOrdinalParse||t._ordinalParse:t._dayOfMonthOrdinalParseLenient}),M([`D`,`DD`],ct),M(`Do`,function(e,t){t[ct]=j(e.match(k)[0])});var va=vt(`Date`,!0);D(`DDD`,[`DDDD`,3],`DDDo`,`dayOfYear`),A(`DDD`,Be),A(`DDDD`,Fe),M([`DDD`,`DDDD`],function(e,t,n){n._dayOfYear=j(e)});function ya(e){var t=Math.round((this.clone().startOf(`day`)-this.clone().startOf(`year`))/864e5)+1;return e==null?t:this.add(e-t,`d`)}D(`m`,[`mm`,2],0,`minute`),A(`m`,k,Xe),A(`mm`,k,Pe),M([`m`,`mm`],ut);var ba=vt(`Minutes`,!1);D(`s`,[`ss`,2],0,`second`),A(`s`,k,Xe),A(`ss`,k,Pe),M([`s`,`ss`],dt);var xa=vt(`Seconds`,!1);D(`S`,0,0,function(){return~~(this.millisecond()/100)}),D(0,[`SS`,2],0,function(){return~~(this.millisecond()/10)}),D(0,[`SSS`,3],0,`millisecond`),D(0,[`SSSS`,4],0,function(){return this.millisecond()*10}),D(0,[`SSSSS`,5],0,function(){return this.millisecond()*100}),D(0,[`SSSSSS`,6],0,function(){return this.millisecond()*1e3}),D(0,[`SSSSSSS`,7],0,function(){return this.millisecond()*1e4}),D(0,[`SSSSSSSS`,8],0,function(){return this.millisecond()*1e5}),D(0,[`SSSSSSSSS`,9],0,function(){return this.millisecond()*1e6}),A(`S`,Be,Ne),A(`SS`,Be,Pe),A(`SSS`,Be,Fe);for(var Sa=`SSSS`,Ca;Sa.length<=9;Sa+=`S`)A(Sa,Ue);function wa(e,t){t[ft]=j((`0.`+e)*1e3)}for(Sa=`S`;Sa.length<=9;Sa+=`S`)M(Sa,wa);Ca=vt(`Milliseconds`,!1),D(`z`,0,0,`zoneAbbr`),D(`zz`,0,0,`zoneName`);function Ta(){return this._isUTC?`UTC`:``}function Ea(){return this._isUTC?`Coordinated Universal Time`:``}var L=w.prototype;L.add=$r,L.calendar=si,L.clone=ci,L.diff=hi,L.endOf=Ii,L.format=bi,L.from=xi,L.fromNow=Si,L.to=Ci,L.toNow=wi,L.get=bt,L.invalidAt=Gi,L.isAfter=li,L.isBefore=ui,L.isBetween=di,L.isSame=fi,L.isSameOrAfter=pi,L.isSameOrBefore=mi,L.isValid=Ui,L.lang=Ei,L.locale=Ti,L.localeData=Di,L.max=gr,L.min=hr,L.parsingFlags=Wi,L.set=xt,L.startOf=Fi,L.subtract=ei,L.toArray=Bi,L.toObject=Vi,L.toDate=zi,L.toISOString=vi,L.inspect=yi,typeof Symbol<`u`&&Symbol.for!=null&&(L[Symbol.for(`nodejs.util.inspect.custom`)]=function(){return`Moment<`+this.format()+`>`}),L.toJSON=Hi,L.toString=_i,L.unix=Ri,L.valueOf=Li,L.creationData=Ki,L.eraName=Xi,L.eraNarrow=Zi,L.eraAbbr=Qi,L.eraYear=$i,L.year=gt,L.isLeapYear=_t,L.weekYear=la,L.isoWeekYear=ua,L.quarter=L.quarters=_a,L.month=Pt,L.daysInMonth=Ft,L.week=L.weeks=Yt,L.isoWeek=L.isoWeeks=Xt,L.weeksInYear=pa,L.weeksInWeekYear=ma,L.isoWeeksInYear=da,L.isoWeeksInISOWeekYear=fa,L.date=va,L.day=L.days=fn,L.weekday=pn,L.isoWeekday=mn,L.dayOfYear=ya,L.hour=L.hours=Tn,L.minute=L.minutes=ba,L.second=L.seconds=xa,L.millisecond=L.milliseconds=Ca,L.utcOffset=Pr,L.utc=Ir,L.local=Lr,L.parseZone=Rr,L.hasAlignedHourOffset=zr,L.isDST=Br,L.isLocal=Hr,L.isUtcOffset=Ur,L.isUtc=Wr,L.isUTC=Wr,L.zoneAbbr=Ta,L.zoneName=Ea,L.dates=E(`dates accessor is deprecated. Use date instead.`,va),L.months=E(`months accessor is deprecated. Use month instead`,Pt),L.years=E(`years accessor is deprecated. Use year instead`,gt),L.zone=E(`moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/`,Fr),L.isDSTShifted=E(`isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information`,Vr);function Da(e){return mr(e*1e3)}function Oa(){return mr.apply(null,arguments).parseZone()}function ka(e){return e}var R=oe.prototype;R.calendar=le,R.longDateFormat=be,R.invalidDate=Se,R.ordinal=Te,R.preparse=ka,R.postformat=ka,R.relativeTime=De,R.pastFuture=Oe,R.set=ie,R.eras=qi,R.erasParse=Ji,R.erasConvertYear=Yi,R.erasAbbrRegex=ta,R.erasNameRegex=ea,R.erasNarrowRegex=na,R.months=kt,R.monthsShort=At,R.monthsParse=Mt,R.monthsRegex=Lt,R.monthsShortRegex=It,R.week=Gt,R.firstDayOfYear=Jt,R.firstDayOfWeek=qt,R.weekdays=sn,R.weekdaysMin=ln,R.weekdaysShort=cn,R.weekdaysParse=dn,R.weekdaysRegex=hn,R.weekdaysShortRegex=gn,R.weekdaysMinRegex=_n,R.isPM=Cn,R.meridiem=En;function Aa(e,t,n,r){var a=Rn(),o=h().set(r,t);return a[n](o,e)}function ja(e,t,n){if(d(e)&&(t=e,e=void 0),e||=``,t!=null)return Aa(e,t,n,`month`);var r,a=[];for(r=0;r<12;r++)a[r]=Aa(e,r,n,`month`);return a}function Ma(e,t,n,r){typeof e==`boolean`?(d(t)&&(n=t,t=void 0),t||=``):(t=e,n=t,e=!1,d(t)&&(n=t,t=void 0),t||=``);var a=Rn(),o=e?a._week.dow:0,s,c=[];if(n!=null)return Aa(t,(n+o)%7,r,`day`);for(s=0;s<7;s++)c[s]=Aa(t,(s+o)%7,r,`day`);return c}function Na(e,t){return ja(e,t,`months`)}function Pa(e,t){return ja(e,t,`monthsShort`)}function Fa(e,t,n){return Ma(e,t,n,`weekdays`)}function Ia(e,t,n){return Ma(e,t,n,`weekdaysShort`)}function La(e,t,n){return Ma(e,t,n,`weekdaysMin`)}Fn(`en`,{eras:[{since:`0001-01-01`,until:1/0,offset:1,name:`Anno Domini`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`Before Christ`,narrow:`BC`,abbr:`BC`}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(j(e%100/10)===1?`th`:t===1?`st`:t===2?`nd`:t===3?`rd`:`th`)}}),n.lang=E(`moment.lang is deprecated. Use moment.locale instead.`,Fn),n.langData=E(`moment.langData is deprecated. Use moment.localeData instead.`,Rn);var Ra=Math.abs;function za(){var e=this._data;return this._milliseconds=Ra(this._milliseconds),this._days=Ra(this._days),this._months=Ra(this._months),e.milliseconds=Ra(e.milliseconds),e.seconds=Ra(e.seconds),e.minutes=Ra(e.minutes),e.hours=Ra(e.hours),e.months=Ra(e.months),e.years=Ra(e.years),this}function Ba(e,t,n,r){var a=qr(t,n);return e._milliseconds+=r*a._milliseconds,e._days+=r*a._days,e._months+=r*a._months,e._bubble()}function Va(e,t){return Ba(this,e,t,1)}function Ha(e,t){return Ba(this,e,t,-1)}function Ua(e){return e<0?Math.floor(e):Math.ceil(e)}function Wa(){var e=this._milliseconds,t=this._days,n=this._months,r=this._data,a,o,s,c,l;return e>=0&&t>=0&&n>=0||e<=0&&t<=0&&n<=0||(e+=Ua(Ka(n)+t)*864e5,t=0,n=0),r.milliseconds=e%1e3,a=tt(e/1e3),r.seconds=a%60,o=tt(a/60),r.minutes=o%60,s=tt(o/60),r.hours=s%24,t+=tt(s/24),l=tt(Ga(t)),n+=l,t-=Ua(Ka(l)),c=tt(n/12),n%=12,r.days=t,r.months=n,r.years=c,this}function Ga(e){return e*4800/146097}function Ka(e){return e*146097/4800}function qa(e){if(!this.isValid())return NaN;var t,n,r=this._milliseconds;if(e=O(e),e===`month`||e===`quarter`||e===`year`)switch(t=this._days+r/864e5,n=this._months+Ga(t),e){case`month`:return n;case`quarter`:return n/3;case`year`:return n/12}else switch(t=this._days+Math.round(Ka(this._months)),e){case`week`:return t/7+r/6048e5;case`day`:return t+r/864e5;case`hour`:return t*24+r/36e5;case`minute`:return t*1440+r/6e4;case`second`:return t*86400+r/1e3;case`millisecond`:return Math.floor(t*864e5)+r;default:throw Error(`Unknown unit `+e)}}function Ja(e){return function(){return this.as(e)}}var Ya=Ja(`ms`),Xa=Ja(`s`),Za=Ja(`m`),Qa=Ja(`h`),$a=Ja(`d`),eo=Ja(`w`),to=Ja(`M`),no=Ja(`Q`),ro=Ja(`y`),io=Ya;function ao(){return qr(this)}function oo(e){return e=O(e),this.isValid()?this[e+`s`]():NaN}function so(e){return function(){return this.isValid()?this._data[e]:NaN}}var co=so(`milliseconds`),lo=so(`seconds`),uo=so(`minutes`),fo=so(`hours`),po=so(`days`),mo=so(`months`),ho=so(`years`);function go(){return tt(this.days()/7)}var _o=Math.round,vo={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function yo(e,t,n,r,a){return a.relativeTime(t||1,!!n,e,r)}function bo(e,t,n,r){var a=qr(e).abs(),o=_o(a.as(`s`)),s=_o(a.as(`m`)),c=_o(a.as(`h`)),l=_o(a.as(`d`)),u=_o(a.as(`M`)),d=_o(a.as(`w`)),f=_o(a.as(`y`)),p=o<=n.ss&&[`s`,o]||o<n.s&&[`ss`,o]||s<=1&&[`m`]||s<n.m&&[`mm`,s]||c<=1&&[`h`]||c<n.h&&[`hh`,c]||l<=1&&[`d`]||l<n.d&&[`dd`,l];return n.w!=null&&(p=p||d<=1&&[`w`]||d<n.w&&[`ww`,d]),p=p||u<=1&&[`M`]||u<n.M&&[`MM`,u]||f<=1&&[`y`]||[`yy`,f],p[2]=t,p[3]=+e>0,p[4]=r,yo.apply(null,p)}function xo(e){return e===void 0?_o:typeof e==`function`&&(_o=e,!0)}function So(e,t){return vo[e]===void 0?!1:t===void 0?vo[e]:(vo[e]=t,e===`s`&&(vo.ss=t-1),!0)}function Co(e,t){if(!this.isValid())return this.localeData().invalidDate();var n=!1,r=vo,a,o;return typeof e==`object`&&(t=e,e=!1),typeof e==`boolean`&&(n=e),typeof t==`object`&&(r=Object.assign({},vo,t),t.s!=null&&t.ss==null&&(r.ss=t.s-1)),a=this.localeData(),o=bo(this,!n,r,a),n&&(o=a.pastFuture(+this,o)),a.postformat(o)}var wo=Math.abs;function To(e){return(e>0)-(e<0)||+e}function Eo(){if(!this.isValid())return this.localeData().invalidDate();var e=wo(this._milliseconds)/1e3,t=wo(this._days),n=wo(this._months),r,a,o,s,c=this.asSeconds(),l,u,d,f;return c?(r=tt(e/60),a=tt(r/60),e%=60,r%=60,o=tt(n/12),n%=12,s=e?e.toFixed(3).replace(/\.?0+$/,``):``,l=c<0?`-`:``,u=To(this._months)===To(c)?``:`-`,d=To(this._days)===To(c)?``:`-`,f=To(this._milliseconds)===To(c)?``:`-`,l+`P`+(o?u+o+`Y`:``)+(n?u+n+`M`:``)+(t?d+t+`D`:``)+(a||r||e?`T`:``)+(a?f+a+`H`:``)+(r?f+r+`M`:``)+(e?f+s+`S`:``)):`P0D`}var z=Tr.prototype;return z.isValid=Cr,z.abs=za,z.add=Va,z.subtract=Ha,z.as=qa,z.asMilliseconds=Ya,z.asSeconds=Xa,z.asMinutes=Za,z.asHours=Qa,z.asDays=$a,z.asWeeks=eo,z.asMonths=to,z.asQuarters=no,z.asYears=ro,z.valueOf=io,z._bubble=Wa,z.clone=ao,z.get=oo,z.milliseconds=co,z.seconds=lo,z.minutes=uo,z.hours=fo,z.days=po,z.weeks=go,z.months=mo,z.years=ho,z.humanize=Co,z.toISOString=Eo,z.toString=Eo,z.toJSON=Eo,z.locale=Ti,z.localeData=Di,z.toIsoString=E(`toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)`,Eo),z.lang=Ei,D(`X`,0,0,`unix`),D(`x`,0,0,`valueOf`),A(`x`,We),A(`X`,qe),M(`X`,function(e,t,n){n._d=new Date(parseFloat(e)*1e3)}),M(`x`,function(e,t,n){n._d=new Date(j(e))}),n.version=`2.30.1`,r(mr),n.fn=L,n.min=vr,n.max=yr,n.now=br,n.utc=h,n.unix=Da,n.months=Na,n.isDate=f,n.locale=Fn,n.invalid=b,n.duration=qr,n.isMoment=T,n.weekdays=Fa,n.parseZone=Oa,n.localeData=Rn,n.isDuration=Er,n.monthsShort=Pa,n.weekdaysMin=La,n.defineLocale=In,n.updateLocale=Ln,n.locales=zn,n.weekdaysShort=Ia,n.normalizeUnits=O,n.relativeTimeRounding=xo,n.relativeTimeThreshold=So,n.calendarFormat=oi,n.prototype=L,n.HTML5_FMT={DATETIME_LOCAL:`YYYY-MM-DDTHH:mm`,DATETIME_LOCAL_SECONDS:`YYYY-MM-DDTHH:mm:ss`,DATETIME_LOCAL_MS:`YYYY-MM-DDTHH:mm:ss.SSS`,DATE:`YYYY-MM-DD`,TIME:`HH:mm`,TIME_SECONDS:`HH:mm:ss`,TIME_MS:`HH:mm:ss.SSS`,WEEK:`GGGG-[W]WW`,MONTH:`YYYY-MM`},n}))})(s)),s.exports}var d=o.exports,f;function p(){return f||(f=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(d,(function(e){function t(e,t,n,r){var a={m:[`eine Minute`,`einer Minute`],h:[`eine Stunde`,`einer Stunde`],d:[`ein Tag`,`einem Tag`],dd:[e+` Tage`,e+` Tagen`],w:[`eine Woche`,`einer Woche`],M:[`ein Monat`,`einem Monat`],MM:[e+` Monate`,e+` Monaten`],y:[`ein Jahr`,`einem Jahr`],yy:[e+` Jahre`,e+` Jahren`]};return t?a[n][0]:a[n][1]}return e.defineLocale(`de`,{months:`Januar_Februar_März_April_Mai_Juni_Juli_August_September_Oktober_November_Dezember`.split(`_`),monthsShort:`Jan._Feb._März_Apr._Mai_Juni_Juli_Aug._Sep._Okt._Nov._Dez.`.split(`_`),monthsParseExact:!0,weekdays:`Sonntag_Montag_Dienstag_Mittwoch_Donnerstag_Freitag_Samstag`.split(`_`),weekdaysShort:`So._Mo._Di._Mi._Do._Fr._Sa.`.split(`_`),weekdaysMin:`So_Mo_Di_Mi_Do_Fr_Sa`.split(`_`),weekdaysParseExact:!0,longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD.MM.YYYY`,LL:`D. MMMM YYYY`,LLL:`D. MMMM YYYY HH:mm`,LLLL:`dddd, D. MMMM YYYY HH:mm`},calendar:{sameDay:`[heute um] LT [Uhr]`,sameElse:`L`,nextDay:`[morgen um] LT [Uhr]`,nextWeek:`dddd [um] LT [Uhr]`,lastDay:`[gestern um] LT [Uhr]`,lastWeek:`[letzten] dddd [um] LT [Uhr]`},relativeTime:{future:`in %s`,past:`vor %s`,s:`ein paar Sekunden`,ss:`%d Sekunden`,m:t,mm:`%d Minuten`,h:t,hh:`%d Stunden`,d:t,dd:t,w:t,ww:`%d Wochen`,M:t,MM:t,y:t,yy:t},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:`%d.`,week:{dow:1,doy:4}})}))})()),o.exports}p();var m={exports:{}},h=m.exports,g;function _(){return g||(g=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(h,(function(e){var t=`ene._feb._mar._abr._may._jun._jul._ago._sep._oct._nov._dic.`.split(`_`),n=`ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic`.split(`_`),r=[/^ene/i,/^feb/i,/^mar/i,/^abr/i,/^may/i,/^jun/i,/^jul/i,/^ago/i,/^sep/i,/^oct/i,/^nov/i,/^dic/i],a=/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre|ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i;return e.defineLocale(`es`,{months:`enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre`.split(`_`),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(enero|febrero|marzo|abril|mayo|junio|julio|agosto|septiembre|octubre|noviembre|diciembre)/i,monthsShortStrictRegex:/^(ene\.?|feb\.?|mar\.?|abr\.?|may\.?|jun\.?|jul\.?|ago\.?|sep\.?|oct\.?|nov\.?|dic\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:`domingo_lunes_martes_miércoles_jueves_viernes_sábado`.split(`_`),weekdaysShort:`dom._lun._mar._mié._jue._vie._sáb.`.split(`_`),weekdaysMin:`do_lu_ma_mi_ju_vi_sá`.split(`_`),weekdaysParseExact:!0,longDateFormat:{LT:`H:mm`,LTS:`H:mm:ss`,L:`DD/MM/YYYY`,LL:`D [de] MMMM [de] YYYY`,LLL:`D [de] MMMM [de] YYYY H:mm`,LLLL:`dddd, D [de] MMMM [de] YYYY H:mm`},calendar:{sameDay:function(){return`[hoy a la`+(this.hours()===1?``:`s`)+`] LT`},nextDay:function(){return`[mañana a la`+(this.hours()===1?``:`s`)+`] LT`},nextWeek:function(){return`dddd [a la`+(this.hours()===1?``:`s`)+`] LT`},lastDay:function(){return`[ayer a la`+(this.hours()===1?``:`s`)+`] LT`},lastWeek:function(){return`[el] dddd [pasado a la`+(this.hours()===1?``:`s`)+`] LT`},sameElse:`L`},relativeTime:{future:`en %s`,past:`hace %s`,s:`unos segundos`,ss:`%d segundos`,m:`un minuto`,mm:`%d minutos`,h:`una hora`,hh:`%d horas`,d:`un día`,dd:`%d días`,w:`una semana`,ww:`%d semanas`,M:`un mes`,MM:`%d meses`,y:`un año`,yy:`%d años`},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:`%dº`,week:{dow:1,doy:4},invalidDate:`Fecha inválida`})}))})()),m.exports}_();var v={exports:{}},y=v.exports,b;function x(){return b||(b=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(y,(function(e){var t=/^(janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,n=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?)/i,r=/(janv\.?|févr\.?|mars|avr\.?|mai|juin|juil\.?|août|sept\.?|oct\.?|nov\.?|déc\.?|janvier|février|mars|avril|mai|juin|juillet|août|septembre|octobre|novembre|décembre)/i,a=[/^janv/i,/^févr/i,/^mars/i,/^avr/i,/^mai/i,/^juin/i,/^juil/i,/^août/i,/^sept/i,/^oct/i,/^nov/i,/^déc/i];return e.defineLocale(`fr`,{months:`janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre`.split(`_`),monthsShort:`janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.`.split(`_`),monthsRegex:r,monthsShortRegex:r,monthsStrictRegex:t,monthsShortStrictRegex:n,monthsParse:a,longMonthsParse:a,shortMonthsParse:a,weekdays:`dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi`.split(`_`),weekdaysShort:`dim._lun._mar._mer._jeu._ven._sam.`.split(`_`),weekdaysMin:`di_lu_ma_me_je_ve_sa`.split(`_`),weekdaysParseExact:!0,longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD/MM/YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},calendar:{sameDay:`[Aujourd’hui à] LT`,nextDay:`[Demain à] LT`,nextWeek:`dddd [à] LT`,lastDay:`[Hier à] LT`,lastWeek:`dddd [dernier à] LT`,sameElse:`L`},relativeTime:{future:`dans %s`,past:`il y a %s`,s:`quelques secondes`,ss:`%d secondes`,m:`une minute`,mm:`%d minutes`,h:`une heure`,hh:`%d heures`,d:`un jour`,dd:`%d jours`,w:`une semaine`,ww:`%d semaines`,M:`un mois`,MM:`%d mois`,y:`un an`,yy:`%d ans`},dayOfMonthOrdinalParse:/\d{1,2}(er|)/,ordinal:function(e,t){switch(t){case`D`:return e+(e===1?`er`:``);default:case`M`:case`Q`:case`DDD`:case`d`:return e+(e===1?`er`:`e`);case`w`:case`W`:return e+(e===1?`re`:`e`)}},week:{dow:1,doy:4}})}))})()),v.exports}x();var S={exports:{}},C=S.exports,w;function T(){return w||(w=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(C,(function(e){return e.defineLocale(`it`,{months:`gennaio_febbraio_marzo_aprile_maggio_giugno_luglio_agosto_settembre_ottobre_novembre_dicembre`.split(`_`),monthsShort:`gen_feb_mar_apr_mag_giu_lug_ago_set_ott_nov_dic`.split(`_`),weekdays:`domenica_lunedì_martedì_mercoledì_giovedì_venerdì_sabato`.split(`_`),weekdaysShort:`dom_lun_mar_mer_gio_ven_sab`.split(`_`),weekdaysMin:`do_lu_ma_me_gi_ve_sa`.split(`_`),longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD/MM/YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},calendar:{sameDay:function(){return`[Oggi a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`},nextDay:function(){return`[Domani a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`},nextWeek:function(){return`dddd [a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`},lastDay:function(){return`[Ieri a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`},lastWeek:function(){switch(this.day()){case 0:return`[La scorsa] dddd [a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`;default:return`[Lo scorso] dddd [a`+(this.hours()>1?`lle `:this.hours()===0?` `:`ll'`)+`]LT`}},sameElse:`L`},relativeTime:{future:`tra %s`,past:`%s fa`,s:`alcuni secondi`,ss:`%d secondi`,m:`un minuto`,mm:`%d minuti`,h:`un'ora`,hh:`%d ore`,d:`un giorno`,dd:`%d giorni`,w:`una settimana`,ww:`%d settimane`,M:`un mese`,MM:`%d mesi`,y:`un anno`,yy:`%d anni`},dayOfMonthOrdinalParse:/\d{1,2}º/,ordinal:`%dº`,week:{dow:1,doy:4}})}))})()),S.exports}T();var ee={exports:{}},E=ee.exports,te;function ne(){return te||(te=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(E,(function(e){return e.defineLocale(`ja`,{eras:[{since:`2019-05-01`,offset:1,name:`令和`,narrow:`㋿`,abbr:`R`},{since:`1989-01-08`,until:`2019-04-30`,offset:1,name:`平成`,narrow:`㍻`,abbr:`H`},{since:`1926-12-25`,until:`1989-01-07`,offset:1,name:`昭和`,narrow:`㍼`,abbr:`S`},{since:`1912-07-30`,until:`1926-12-24`,offset:1,name:`大正`,narrow:`㍽`,abbr:`T`},{since:`1873-01-01`,until:`1912-07-29`,offset:6,name:`明治`,narrow:`㍾`,abbr:`M`},{since:`0001-01-01`,until:`1873-12-31`,offset:1,name:`西暦`,narrow:`AD`,abbr:`AD`},{since:`0000-12-31`,until:-1/0,offset:1,name:`紀元前`,narrow:`BC`,abbr:`BC`}],eraYearOrdinalRegex:/(元|\d+)年/,eraYearOrdinalParse:function(e,t){return t[1]===`元`?1:parseInt(t[1]||e,10)},months:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),monthsShort:`1月_2月_3月_4月_5月_6月_7月_8月_9月_10月_11月_12月`.split(`_`),weekdays:`日曜日_月曜日_火曜日_水曜日_木曜日_金曜日_土曜日`.split(`_`),weekdaysShort:`日_月_火_水_木_金_土`.split(`_`),weekdaysMin:`日_月_火_水_木_金_土`.split(`_`),longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`YYYY/MM/DD`,LL:`YYYY年M月D日`,LLL:`YYYY年M月D日 HH:mm`,LLLL:`YYYY年M月D日 dddd HH:mm`,l:`YYYY/MM/DD`,ll:`YYYY年M月D日`,lll:`YYYY年M月D日 HH:mm`,llll:`YYYY年M月D日(ddd) HH:mm`},meridiemParse:/午前|午後/i,isPM:function(e){return e===`午後`},meridiem:function(e,t,n){return e<12?`午前`:`午後`},calendar:{sameDay:`[今日] LT`,nextDay:`[明日] LT`,nextWeek:function(e){return e.week()===this.week()?`dddd LT`:`[来週]dddd LT`},lastDay:`[昨日] LT`,lastWeek:function(e){return this.week()===e.week()?`dddd LT`:`[先週]dddd LT`},sameElse:`L`},dayOfMonthOrdinalParse:/\d{1,2}日/,ordinal:function(e,t){switch(t){case`y`:return e===1?`元年`:e+`年`;case`d`:case`D`:case`DDD`:return e+`日`;default:return e}},relativeTime:{future:`%s後`,past:`%s前`,s:`数秒`,ss:`%d秒`,m:`1分`,mm:`%d分`,h:`1時間`,hh:`%d時間`,d:`1日`,dd:`%d日`,M:`1ヶ月`,MM:`%dヶ月`,y:`1年`,yy:`%d年`}})}))})()),ee.exports}ne();var re={exports:{}},ie=re.exports,ae;function oe(){return ae||(ae=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(ie,(function(e){var t=`jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.`.split(`_`),n=`jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec`.split(`_`),r=[/^jan/i,/^feb/i,/^(maart|mrt\.?)$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],a=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;return e.defineLocale(`nl`,{months:`januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december`.split(`_`),monthsShort:function(e,r){return e?/-MMM-/.test(r)?n[e.month()]:t[e.month()]:t},monthsRegex:a,monthsShortRegex:a,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:`zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag`.split(`_`),weekdaysShort:`zo._ma._di._wo._do._vr._za.`.split(`_`),weekdaysMin:`zo_ma_di_wo_do_vr_za`.split(`_`),weekdaysParseExact:!0,longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD-MM-YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd D MMMM YYYY HH:mm`},calendar:{sameDay:`[vandaag om] LT`,nextDay:`[morgen om] LT`,nextWeek:`dddd [om] LT`,lastDay:`[gisteren om] LT`,lastWeek:`[afgelopen] dddd [om] LT`,sameElse:`L`},relativeTime:{future:`over %s`,past:`%s geleden`,s:`een paar seconden`,ss:`%d seconden`,m:`één minuut`,mm:`%d minuten`,h:`één uur`,hh:`%d uur`,d:`één dag`,dd:`%d dagen`,w:`één week`,ww:`%d weken`,M:`één maand`,MM:`%d maanden`,y:`één jaar`,yy:`%d jaar`},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(e===1||e===8||e>=20?`ste`:`de`)},week:{dow:1,doy:4}})}))})()),re.exports}oe();var se={exports:{}},ce=se.exports,le;function ue(){return le||(le=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(ce,(function(e){var t=`styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień`.split(`_`),n=`stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia`.split(`_`),r=[/^sty/i,/^lut/i,/^mar/i,/^kwi/i,/^maj/i,/^cze/i,/^lip/i,/^sie/i,/^wrz/i,/^paź/i,/^lis/i,/^gru/i];function a(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function o(e,t,n){var r=e+` `;switch(n){case`ss`:return r+(a(e)?`sekundy`:`sekund`);case`m`:return t?`minuta`:`minutę`;case`mm`:return r+(a(e)?`minuty`:`minut`);case`h`:return t?`godzina`:`godzinę`;case`hh`:return r+(a(e)?`godziny`:`godzin`);case`ww`:return r+(a(e)?`tygodnie`:`tygodni`);case`MM`:return r+(a(e)?`miesiące`:`miesięcy`);case`yy`:return r+(a(e)?`lata`:`lat`)}}return e.defineLocale(`pl`,{months:function(e,r){return e?/D MMMM/.test(r)?n[e.month()]:t[e.month()]:t},monthsShort:`sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru`.split(`_`),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,weekdays:`niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota`.split(`_`),weekdaysShort:`ndz_pon_wt_śr_czw_pt_sob`.split(`_`),weekdaysMin:`Nd_Pn_Wt_Śr_Cz_Pt_So`.split(`_`),longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD.MM.YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd, D MMMM YYYY HH:mm`},calendar:{sameDay:`[Dziś o] LT`,nextDay:`[Jutro o] LT`,nextWeek:function(){switch(this.day()){case 0:return`[W niedzielę o] LT`;case 2:return`[We wtorek o] LT`;case 3:return`[W środę o] LT`;case 6:return`[W sobotę o] LT`;default:return`[W] dddd [o] LT`}},lastDay:`[Wczoraj o] LT`,lastWeek:function(){switch(this.day()){case 0:return`[W zeszłą niedzielę o] LT`;case 3:return`[W zeszłą środę o] LT`;case 6:return`[W zeszłą sobotę o] LT`;default:return`[W zeszły] dddd [o] LT`}},sameElse:`L`},relativeTime:{future:`za %s`,past:`%s temu`,s:`kilka sekund`,ss:o,m:o,mm:o,h:o,hh:o,d:`1 dzień`,dd:`%d dni`,w:`tydzień`,ww:o,M:`miesiąc`,MM:o,y:`rok`,yy:o},dayOfMonthOrdinalParse:/\d{1,2}\./,ordinal:`%d.`,week:{dow:1,doy:4}})}))})()),se.exports}ue();var de={exports:{}},fe=de.exports,pe;function me(){return pe||(pe=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(fe,(function(e){function t(e,t){var n=e.split(`_`);return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var a={ss:n?`секунда_секунды_секунд`:`секунду_секунды_секунд`,mm:n?`минута_минуты_минут`:`минуту_минуты_минут`,hh:`час_часа_часов`,dd:`день_дня_дней`,ww:`неделя_недели_недель`,MM:`месяц_месяца_месяцев`,yy:`год_года_лет`};return r===`m`?n?`минута`:`минуту`:e+` `+t(a[r],+e)}var r=[/^янв/i,/^фев/i,/^мар/i,/^апр/i,/^ма[йя]/i,/^июн/i,/^июл/i,/^авг/i,/^сен/i,/^окт/i,/^ноя/i,/^дек/i];return e.defineLocale(`ru`,{months:{format:`января_февраля_марта_апреля_мая_июня_июля_августа_сентября_октября_ноября_декабря`.split(`_`),standalone:`январь_февраль_март_апрель_май_июнь_июль_август_сентябрь_октябрь_ноябрь_декабрь`.split(`_`)},monthsShort:{format:`янв._февр._мар._апр._мая_июня_июля_авг._сент._окт._нояб._дек.`.split(`_`),standalone:`янв._февр._март_апр._май_июнь_июль_авг._сент._окт._нояб._дек.`.split(`_`)},weekdays:{standalone:`воскресенье_понедельник_вторник_среда_четверг_пятница_суббота`.split(`_`),format:`воскресенье_понедельник_вторник_среду_четверг_пятницу_субботу`.split(`_`),isFormat:/\[ ?[Вв] ?(?:прошлую|следующую|эту)? ?] ?dddd/},weekdaysShort:`вс_пн_вт_ср_чт_пт_сб`.split(`_`),weekdaysMin:`вс_пн_вт_ср_чт_пт_сб`.split(`_`),monthsParse:r,longMonthsParse:r,shortMonthsParse:r,monthsRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsShortRegex:/^(январ[ья]|янв\.?|феврал[ья]|февр?\.?|марта?|мар\.?|апрел[ья]|апр\.?|ма[йя]|июн[ья]|июн\.?|июл[ья]|июл\.?|августа?|авг\.?|сентябр[ья]|сент?\.?|октябр[ья]|окт\.?|ноябр[ья]|нояб?\.?|декабр[ья]|дек\.?)/i,monthsStrictRegex:/^(январ[яь]|феврал[яь]|марта?|апрел[яь]|ма[яй]|июн[яь]|июл[яь]|августа?|сентябр[яь]|октябр[яь]|ноябр[яь]|декабр[яь])/i,monthsShortStrictRegex:/^(янв\.|февр?\.|мар[т.]|апр\.|ма[яй]|июн[ья.]|июл[ья.]|авг\.|сент?\.|окт\.|нояб?\.|дек\.)/i,longDateFormat:{LT:`H:mm`,LTS:`H:mm:ss`,L:`DD.MM.YYYY`,LL:`D MMMM YYYY г.`,LLL:`D MMMM YYYY г., H:mm`,LLLL:`dddd, D MMMM YYYY г., H:mm`},calendar:{sameDay:`[Сегодня, в] LT`,nextDay:`[Завтра, в] LT`,lastDay:`[Вчера, в] LT`,nextWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return`[В следующее] dddd, [в] LT`;case 1:case 2:case 4:return`[В следующий] dddd, [в] LT`;case 3:case 5:case 6:return`[В следующую] dddd, [в] LT`}else if(this.day()===2)return`[Во] dddd, [в] LT`;else return`[В] dddd, [в] LT`},lastWeek:function(e){if(e.week()!==this.week())switch(this.day()){case 0:return`[В прошлое] dddd, [в] LT`;case 1:case 2:case 4:return`[В прошлый] dddd, [в] LT`;case 3:case 5:case 6:return`[В прошлую] dddd, [в] LT`}else if(this.day()===2)return`[Во] dddd, [в] LT`;else return`[В] dddd, [в] LT`},sameElse:`L`},relativeTime:{future:`через %s`,past:`%s назад`,s:`несколько секунд`,ss:n,m:n,mm:n,h:`час`,hh:n,d:`день`,dd:n,w:`неделя`,ww:n,M:`месяц`,MM:n,y:`год`,yy:n},meridiemParse:/ночи|утра|дня|вечера/i,isPM:function(e){return/^(дня|вечера)$/.test(e)},meridiem:function(e,t,n){return e<4?`ночи`:e<12?`утра`:e<17?`дня`:`вечера`},dayOfMonthOrdinalParse:/\d{1,2}-(й|го|я)/,ordinal:function(e,t){switch(t){case`M`:case`d`:case`DDD`:return e+`-й`;case`D`:return e+`-го`;case`w`:case`W`:return e+`-я`;default:return e}},week:{dow:1,doy:4}})}))})()),de.exports}me();var D={exports:{}},he=D.exports,ge;function _e(){return ge||(ge=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(he,(function(e){var t={1:`'inci`,5:`'inci`,8:`'inci`,70:`'inci`,80:`'inci`,2:`'nci`,7:`'nci`,20:`'nci`,50:`'nci`,3:`'üncü`,4:`'üncü`,100:`'üncü`,6:`'ncı`,9:`'uncu`,10:`'uncu`,30:`'uncu`,60:`'ıncı`,90:`'ıncı`};return e.defineLocale(`tr`,{months:`Ocak_Şubat_Mart_Nisan_Mayıs_Haziran_Temmuz_Ağustos_Eylül_Ekim_Kasım_Aralık`.split(`_`),monthsShort:`Oca_Şub_Mar_Nis_May_Haz_Tem_Ağu_Eyl_Eki_Kas_Ara`.split(`_`),weekdays:`Pazar_Pazartesi_Salı_Çarşamba_Perşembe_Cuma_Cumartesi`.split(`_`),weekdaysShort:`Paz_Pzt_Sal_Çar_Per_Cum_Cmt`.split(`_`),weekdaysMin:`Pz_Pt_Sa_Ça_Pe_Cu_Ct`.split(`_`),meridiem:function(e,t,n){return e<12?n?`öö`:`ÖÖ`:n?`ös`:`ÖS`},meridiemParse:/öö|ÖÖ|ös|ÖS/,isPM:function(e){return e===`ös`||e===`ÖS`},longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD.MM.YYYY`,LL:`D MMMM YYYY`,LLL:`D MMMM YYYY HH:mm`,LLLL:`dddd, D MMMM YYYY HH:mm`},calendar:{sameDay:`[bugün saat] LT`,nextDay:`[yarın saat] LT`,nextWeek:`[gelecek] dddd [saat] LT`,lastDay:`[dün] LT`,lastWeek:`[geçen] dddd [saat] LT`,sameElse:`L`},relativeTime:{future:`%s sonra`,past:`%s önce`,s:`birkaç saniye`,ss:`%d saniye`,m:`bir dakika`,mm:`%d dakika`,h:`bir saat`,hh:`%d saat`,d:`bir gün`,dd:`%d gün`,w:`bir hafta`,ww:`%d hafta`,M:`bir ay`,MM:`%d ay`,y:`bir yıl`,yy:`%d yıl`},ordinal:function(e,n){switch(n){case`d`:case`D`:case`Do`:case`DD`:return e;default:if(e===0)return e+`'ıncı`;var r=e%10,a=e%100-r,o=e>=100?100:null;return e+(t[r]||t[a]||t[o])}},week:{dow:1,doy:7}})}))})()),D.exports}_e();var ve={exports:{}},ye=ve.exports,be;function xe(){return be||(be=1,(function(e,t){(function(e,t){t(typeof a==`function`?u():e.moment)})(ye,(function(e){function t(e,t){var n=e.split(`_`);return t%10==1&&t%100!=11?n[0]:t%10>=2&&t%10<=4&&(t%100<10||t%100>=20)?n[1]:n[2]}function n(e,n,r){var a={ss:n?`секунда_секунди_секунд`:`секунду_секунди_секунд`,mm:n?`хвилина_хвилини_хвилин`:`хвилину_хвилини_хвилин`,hh:n?`година_години_годин`:`годину_години_годин`,dd:`день_дні_днів`,MM:`місяць_місяці_місяців`,yy:`рік_роки_років`};return r===`m`?n?`хвилина`:`хвилину`:r===`h`?n?`година`:`годину`:e+` `+t(a[r],+e)}function r(e,t){var n={nominative:`неділя_понеділок_вівторок_середа_четвер_п’ятниця_субота`.split(`_`),accusative:`неділю_понеділок_вівторок_середу_четвер_п’ятницю_суботу`.split(`_`),genitive:`неділі_понеділка_вівторка_середи_четверга_п’ятниці_суботи`.split(`_`)},r;return e===!0?n.nominative.slice(1,7).concat(n.nominative.slice(0,1)):e?(r=/(\[[ВвУу]\]) ?dddd/.test(t)?`accusative`:/\[?(?:минулої|наступної)? ?\] ?dddd/.test(t)?`genitive`:`nominative`,n[r][e.day()]):n.nominative}function a(e){return function(){return e+`о`+(this.hours()===11?`б`:``)+`] LT`}}return e.defineLocale(`uk`,{months:{format:`січня_лютого_березня_квітня_травня_червня_липня_серпня_вересня_жовтня_листопада_грудня`.split(`_`),standalone:`січень_лютий_березень_квітень_травень_червень_липень_серпень_вересень_жовтень_листопад_грудень`.split(`_`)},monthsShort:`січ_лют_бер_квіт_трав_черв_лип_серп_вер_жовт_лист_груд`.split(`_`),weekdays:r,weekdaysShort:`нд_пн_вт_ср_чт_пт_сб`.split(`_`),weekdaysMin:`нд_пн_вт_ср_чт_пт_сб`.split(`_`),longDateFormat:{LT:`HH:mm`,LTS:`HH:mm:ss`,L:`DD.MM.YYYY`,LL:`D MMMM YYYY р.`,LLL:`D MMMM YYYY р., HH:mm`,LLLL:`dddd, D MMMM YYYY р., HH:mm`},calendar:{sameDay:a(`[Сьогодні `),nextDay:a(`[Завтра `),lastDay:a(`[Вчора `),nextWeek:a(`[У] dddd [`),lastWeek:function(){switch(this.day()){case 0:case 3:case 5:case 6:return a(`[Минулої] dddd [`).call(this);case 1:case 2:case 4:return a(`[Минулого] dddd [`).call(this)}},sameElse:`L`},relativeTime:{future:`за %s`,past:`%s тому`,s:`декілька секунд`,ss:n,m:n,mm:n,h:`годину`,hh:n,d:`день`,dd:n,M:`місяць`,MM:n,y:`рік`,yy:n},meridiemParse:/ночі|ранку|дня|вечора/,isPM:function(e){return/^(дня|вечора)$/.test(e)},meridiem:function(e,t,n){return e<4?`ночі`:e<12?`ранку`:e<17?`дня`:`вечора`},dayOfMonthOrdinalParse:/\d{1,2}-(й|го)/,ordinal:function(e,t){switch(t){case`M`:case`d`:case`DDD`:case`w`:case`W`:return e+`-й`;case`D`:return e+`-го`;default:return e}},week:{dow:1,doy:7}})}))})()),ve.exports}xe();function Se(e){for(var t=e&&e.preventDefault||!1,n=e&&e.container||window,r={},a={keydown:{},keyup:{}},o={},s=97;s<=122;s++)o[String.fromCharCode(s)]={code:65+(s-97),shift:!1};for(s=65;s<=90;s++)o[String.fromCharCode(s)]={code:s,shift:!0};for(s=0;s<=9;s++)o[``+s]={code:48+s,shift:!1};for(s=1;s<=12;s++)o[`F`+s]={code:111+s,shift:!1};for(s=0;s<=9;s++)o[`num`+s]={code:96+s,shift:!1};o[`num*`]={code:106,shift:!1},o[`num+`]={code:107,shift:!1},o[`num-`]={code:109,shift:!1},o[`num/`]={code:111,shift:!1},o[`num.`]={code:110,shift:!1},o.left={code:37,shift:!1},o.up={code:38,shift:!1},o.right={code:39,shift:!1},o.down={code:40,shift:!1},o.space={code:32,shift:!1},o.enter={code:13,shift:!1},o.shift={code:16,shift:void 0},o.esc={code:27,shift:!1},o.backspace={code:8,shift:!1},o.tab={code:9,shift:!1},o.ctrl={code:17,shift:!1},o.alt={code:18,shift:!1},o.delete={code:46,shift:!1},o.pageup={code:33,shift:!1},o.pagedown={code:34,shift:!1},o[`=`]={code:187,shift:!1},o[`-`]={code:189,shift:!1},o[`]`]={code:221,shift:!1},o[`[`]={code:219,shift:!1};var c=function(e){u(e,`keydown`)},l=function(e){u(e,`keyup`)},u=function(e,n){if(a[n][e.keyCode]!==void 0){for(var r=a[n][e.keyCode],o=0;o<r.length;o++)(r[o].shift===void 0||r[o].shift==1&&e.shiftKey==1||r[o].shift==0&&e.shiftKey==0)&&r[o].fn(e);t==1&&e.preventDefault()}};return r.bind=function(e,t,n){if(n===void 0&&(n=`keydown`),o[e]===void 0)throw Error(`unsupported key: `+e);a[n][o[e].code]===void 0&&(a[n][o[e].code]=[]),a[n][o[e].code].push({fn:t,shift:o[e].shift})},r.bindAll=function(e,t){for(var n in t===void 0&&(t=`keydown`),o)o.hasOwnProperty(n)&&r.bind(n,e,t)},r.getKey=function(e){for(var t in o)if(o.hasOwnProperty(t)&&(e.shiftKey==1&&o[t].shift==1&&e.keyCode==o[t].code||e.shiftKey==0&&o[t].shift==0&&e.keyCode==o[t].code||e.keyCode==o[t].code&&t==`shift`))return t;return`unknown key, currently not supported`},r.unbind=function(e,t,n){if(n===void 0&&(n=`keydown`),o[e]===void 0)throw Error(`unsupported key: `+e);if(t!==void 0){var r=[],s=a[n][o[e].code];if(s!==void 0)for(var c=0;c<s.length;c++)(s[c].fn!=t||s[c].shift!=o[e].shift)&&r.push(a[n][o[e].code][c]);a[n][o[e].code]=r}else a[n][o[e].code]=[]},r.reset=function(){a={keydown:{},keyup:{}}},r.destroy=function(){a={keydown:{},keyup:{}},n.removeEventListener(`keydown`,c,!0),n.removeEventListener(`keyup`,l,!0)},n.addEventListener(`keydown`,c,!0),n.addEventListener(`keyup`,l,!0),r}var Ce={},we={},Te,Ee;function De(){if(Ee)return Te;Ee=1;var e=function(e){return e&&e.Math===Math&&e};return Te=e(typeof globalThis==`object`&&globalThis)||e(typeof window==`object`&&window)||e(typeof self==`object`&&self)||e(typeof n==`object`&&n)||e(typeof Te==`object`&&Te)||(function(){return this})()||Function(`return this`)(),Te}var Oe,ke;function O(){return ke||(ke=1,Oe=function(e){try{return!!e()}catch{return!0}}),Oe}var Ae,je;function Me(){return je||(je=1,Ae=!O()(function(){var e=function(){}.bind();return typeof e!=`function`||e.hasOwnProperty(`prototype`)})),Ae}var Ne,Pe;function Fe(){if(Pe)return Ne;Pe=1;var e=Me(),t=Function.prototype,n=t.apply,r=t.call;return Ne=typeof Reflect==`object`&&Reflect.apply||(e?r.bind(n):function(){return r.apply(n,arguments)}),Ne}var Ie,Le;function k(){if(Le)return Ie;Le=1;var e=Me(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return Ie=e?r:function(e){return function(){return n.apply(e,arguments)}},Ie}var Re,ze;function Be(){if(ze)return Re;ze=1;var e=k(),t=e({}.toString),n=e(``.slice);return Re=function(e){return n(t(e),8,-1)},Re}var Ve,He;function Ue(){if(He)return Ve;He=1;var e=Be(),t=k();return Ve=function(n){if(e(n)===`Function`)return t(n)},Ve}var We,Ge;function Ke(){if(Ge)return We;Ge=1;var e=typeof document==`object`&&document.all;return We=e===void 0&&e!==void 0?function(t){return typeof t==`function`||t===e}:function(e){return typeof e==`function`},We}var qe={},Je,Ye;function Xe(){return Ye||(Ye=1,Je=!O()(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})),Je}var Ze,A;function Qe(){if(A)return Ze;A=1;var e=Me(),t=Function.prototype.call;return Ze=e?t.bind(t):function(){return t.apply(t,arguments)},Ze}var $e={},et;function tt(){if(et)return $e;et=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor;return $e.f=t&&!e.call({1:2},1)?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,$e}var j,nt;function M(){return nt||(nt=1,j=function(e,t){return{enumerable:!(e&1),configurable:!(e&2),writable:!(e&4),value:t}}),j}var rt,it;function at(){if(it)return rt;it=1;var e=k(),t=O(),n=Be(),r=Object,a=e(``.split);return rt=t(function(){return!r(`z`).propertyIsEnumerable(0)})?function(e){return n(e)===`String`?a(e,``):r(e)}:r,rt}var ot,st;function ct(){return st||(st=1,ot=function(e){return e==null}),ot}var lt,ut;function dt(){if(ut)return lt;ut=1;var e=ct(),t=TypeError;return lt=function(n){if(e(n))throw new t(`Can't call method on `+n);return n},lt}var ft,pt;function mt(){if(pt)return ft;pt=1;var e=at(),t=dt();return ft=function(n){return e(t(n))},ft}var ht,gt;function _t(){if(gt)return ht;gt=1;var e=Ke();return ht=function(t){return typeof t==`object`?t!==null:e(t)},ht}var vt,yt;function N(){return yt||(yt=1,vt={}),vt}var bt,xt;function St(){if(xt)return bt;xt=1;var e=N(),t=De(),n=Ke(),r=function(e){return n(e)?e:void 0};return bt=function(n,a){return arguments.length<2?r(e[n])||r(t[n]):e[n]&&e[n][a]||t[n]&&t[n][a]},bt}var Ct,wt;function P(){return wt||(wt=1,Ct=k()({}.isPrototypeOf)),Ct}var Tt,Et;function Dt(){if(Et)return Tt;Et=1;var e=De().navigator,t=e&&e.userAgent;return Tt=t?String(t):``,Tt}var Ot,kt;function At(){if(kt)return Ot;kt=1;var e=De(),t=Dt(),n=e.process,r=e.Deno,a=n&&n.versions||r&&r.version,o=a&&a.v8,s,c;return o&&(s=o.split(`.`),c=s[0]>0&&s[0]<4?1:+(s[0]+s[1])),!c&&t&&(s=t.match(/Edge\/(\d+)/),(!s||s[1]>=74)&&(s=t.match(/Chrome\/(\d+)/),s&&(c=+s[1]))),Ot=c,Ot}var jt,Mt;function Nt(){if(Mt)return jt;Mt=1;var e=At(),t=O(),n=De().String;return jt=!!Object.getOwnPropertySymbols&&!t(function(){var t=Symbol(`symbol detection`);return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}),jt}var Pt,Ft;function It(){return Ft||(Ft=1,Pt=Nt()&&!Symbol.sham&&typeof Symbol.iterator==`symbol`),Pt}var Lt,Rt;function zt(){if(Rt)return Lt;Rt=1;var e=St(),t=Ke(),n=P(),r=It(),a=Object;return Lt=r?function(e){return typeof e==`symbol`}:function(r){var o=e(`Symbol`);return t(o)&&n(o.prototype,a(r))},Lt}var Bt,Vt;function Ht(){if(Vt)return Bt;Vt=1;var e=String;return Bt=function(t){try{return e(t)}catch{return`Object`}},Bt}var Ut,Wt;function Gt(){if(Wt)return Ut;Wt=1;var e=Ke(),t=Ht(),n=TypeError;return Ut=function(r){if(e(r))return r;throw new n(t(r)+` is not a function`)},Ut}var Kt,qt;function Jt(){if(qt)return Kt;qt=1;var e=Gt(),t=ct();return Kt=function(n,r){var a=n[r];return t(a)?void 0:e(a)},Kt}var Yt,Xt;function Zt(){if(Xt)return Yt;Xt=1;var e=Qe(),t=Ke(),n=_t(),r=TypeError;return Yt=function(a,o){var s,c;if(o===`string`&&t(s=a.toString)&&!n(c=e(s,a))||t(s=a.valueOf)&&!n(c=e(s,a))||o!==`string`&&t(s=a.toString)&&!n(c=e(s,a)))return c;throw new r(`Can't convert object to primitive value`)},Yt}var Qt={exports:{}},$t,en;function tn(){return en||(en=1,$t=!0),$t}var nn,rn;function an(){if(rn)return nn;rn=1;var e=De(),t=Object.defineProperty;return nn=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch{e[n]=r}return r},nn}var on;function sn(){if(on)return Qt.exports;on=1;var e=tn(),t=De(),n=an(),r=`__core-js_shared__`,a=Qt.exports=t[r]||n(r,{});return(a.versions||=[]).push({version:`3.49.0`,mode:e?`pure`:`global`,copyright:`© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.`,license:`https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE`,source:`https://github.com/zloirock/core-js`}),Qt.exports}var cn,ln;function un(){if(ln)return cn;ln=1;var e=sn();return cn=function(t,n){return e[t]||(e[t]=n||{})},cn}var dn,fn;function pn(){if(fn)return dn;fn=1;var e=dt(),t=Object;return dn=function(n){return t(e(n))},dn}var mn,hn;function gn(){if(hn)return mn;hn=1;var e=k(),t=pn(),n=e({}.hasOwnProperty);return mn=Object.hasOwn||function(e,r){return n(t(e),r)},mn}var _n,vn;function yn(){if(vn)return _n;vn=1;var e=k(),t=0,n=Math.random(),r=e(1.1.toString);return _n=function(e){return`Symbol(`+(e===void 0?``:e)+`)_`+r(++t+n,36)},_n}var bn,xn;function Sn(){if(xn)return bn;xn=1;var e=De(),t=un(),n=gn(),r=yn(),a=Nt(),o=It(),s=e.Symbol,c=t(`wks`),l=o?s.for||s:s&&s.withoutSetter||r;return bn=function(e){return n(c,e)||(c[e]=a&&n(s,e)?s[e]:l(`Symbol.`+e)),c[e]},bn}var Cn,wn;function Tn(){if(wn)return Cn;wn=1;var e=Qe(),t=_t(),n=zt(),r=Jt(),a=Zt(),o=Sn(),s=TypeError,c=o(`toPrimitive`);return Cn=function(o,l){if(!t(o)||n(o))return o;var u=r(o,c),d;if(u){if(l===void 0&&(l=`default`),d=e(u,o,l),!t(d)||n(d))return d;throw new s(`Can't convert object to primitive value`)}return l===void 0&&(l=`number`),a(o,l)},Cn}var En,Dn;function F(){if(Dn)return En;Dn=1;var e=Tn(),t=zt();return En=function(n){var r=e(n,`string`);return t(r)?r:r+``},En}var On,kn;function An(){if(kn)return On;kn=1;var e=De(),t=_t(),n=e.document,r=t(n)&&t(n.createElement);return On=function(e){return r?n.createElement(e):{}},On}var jn,Mn;function Nn(){if(Mn)return jn;Mn=1;var e=Xe(),t=O(),n=An();return jn=!e&&!t(function(){return Object.defineProperty(n(`div`),"a",{get:function(){return 7}}).a!==7}),jn}var Pn;function Fn(){if(Pn)return qe;Pn=1;var e=Xe(),t=Qe(),n=tt(),r=M(),a=mt(),o=F(),s=gn(),c=Nn(),l=Object.getOwnPropertyDescriptor;return qe.f=e?l:function(e,u){if(e=a(e),u=o(u),c)try{return l(e,u)}catch{}if(s(e,u))return r(!t(n.f,e,u),e[u])},qe}var In,Ln;function Rn(){if(Ln)return In;Ln=1;var e=O(),t=Ke(),n=/#|\.prototype\./,r=function(n,r){var l=o[a(n)];return l===c?!0:l===s?!1:t(r)?e(r):!!r},a=r.normalize=function(e){return String(e).replace(n,`.`).toLowerCase()},o=r.data={},s=r.NATIVE=`N`,c=r.POLYFILL=`P`;return In=r,In}var zn,Bn;function Vn(){if(Bn)return zn;Bn=1;var e=Ue(),t=Gt(),n=Me(),r=e(e.bind);return zn=function(e,a){return t(e),a===void 0?e:n?r(e,a):function(){return e.apply(a,arguments)}},zn}var Hn={},Un,Wn;function Gn(){return Wn||(Wn=1,Un=Xe()&&O()(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})),Un}var Kn,qn;function Jn(){if(qn)return Kn;qn=1;var e=_t(),t=String,n=TypeError;return Kn=function(r){if(e(r))return r;throw new n(t(r)+` is not an object`)},Kn}var Yn;function Xn(){if(Yn)return Hn;Yn=1;var e=Xe(),t=Nn(),n=Gn(),r=Jn(),a=F(),o=TypeError,s=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l=`enumerable`,u=`configurable`,d=`writable`;return Hn.f=e?n?function(e,t,n){if(r(e),t=a(t),r(n),typeof e==`function`&&t===`prototype`&&`value`in n&&d in n&&!n[d]){var o=c(e,t);o&&o[d]&&(e[t]=n.value,n={configurable:u in n?n[u]:o[u],enumerable:l in n?n[l]:o[l],writable:!1})}return s(e,t,n)}:s:function(e,n,c){if(r(e),n=a(n),r(c),t)try{return s(e,n,c)}catch{}if(`get`in c||`set`in c)throw new o(`Accessors not supported`);return`value`in c&&(e[n]=c.value),e},Hn}var Zn,Qn;function $n(){if(Qn)return Zn;Qn=1;var e=Xe(),t=Xn(),n=M();return Zn=e?function(e,r,a){return t.f(e,r,n(1,a))}:function(e,t,n){return e[t]=n,e},Zn}var er,tr;function I(){if(tr)return er;tr=1;var e=De(),t=Fe(),n=Ue(),r=Ke(),a=Fn().f,o=Rn(),s=N(),c=Vn(),l=$n(),u=gn(),d=function(e){var n=function(r,a,o){if(this instanceof n){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,a)}return new e(r,a,o)}return t(e,this,arguments)};return n.prototype=e.prototype,n};return er=function(t,f){var p=t.target,m=t.global,h=t.stat,g=t.proto,_=m?e:h?e[p]:e[p]&&e[p].prototype,v=m?s:s[p]||l(s,p,{})[p],y=v.prototype,b,x,S,C,w,T,ee,E,te;for(C in f)b=o(m?C:p+(h?`.`:`#`)+C,t.forced),x=!b&&_&&u(_,C),T=v[C],x&&(t.dontCallGetSet?(te=a(_,C),ee=te&&te.value):ee=_[C]),w=x&&ee?ee:f[C],(b||g||typeof T!=typeof w)&&(E=t.bind&&x?c(w,e):t.wrap&&x?d(w):g&&r(w)?n(w):w,(t.sham||w&&w.sham||T&&T.sham)&&l(E,`sham`,!0),l(v,C,E),g&&(S=p+`Prototype`,u(s,S)||l(s,S,{}),l(s[S],C,w),t.real&&y&&(b||!y[C])&&l(y,C,w)))},er}var nr,rr;function ir(){if(rr)return nr;rr=1;var e=Sn()(`toStringTag`),t={};return t[e]=`z`,nr=String(t)===`[object z]`,nr}var ar,or;function sr(){if(or)return ar;or=1;var e=ir(),t=Ke(),n=Be(),r=Sn()(`toStringTag`),a=Object,o=n(function(){return arguments}())===`Arguments`,s=function(e,t){try{return e[t]}catch{}};return ar=e?n:function(e){var c,l,u;return e===void 0?`Undefined`:e===null?`Null`:typeof(l=s(c=a(e),r))==`string`?l:o?n(c):(u=n(c))===`Object`&&t(c.callee)?`Arguments`:u},ar}var cr,lr;function ur(){if(lr)return cr;lr=1;var e=sr(),t=String;return cr=function(n){if(e(n)===`Symbol`)throw TypeError(`Cannot convert a Symbol value to a string`);return t(n)},cr}var dr={},fr,pr;function mr(){if(pr)return fr;pr=1;var e=Math.ceil,t=Math.floor;return fr=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)},fr}var hr,gr;function _r(){if(gr)return hr;gr=1;var e=mr();return hr=function(t){var n=+t;return n!==n||n===0?0:e(n)},hr}var vr,yr;function br(){if(yr)return vr;yr=1;var e=_r(),t=Math.max,n=Math.min;return vr=function(r,a){var o=e(r);return o<0?t(o+a,0):n(o,a)},vr}var xr,Sr;function Cr(){if(Sr)return xr;Sr=1;var e=_r(),t=Math.min;return xr=function(n){var r=e(n);return r>0?t(r,9007199254740991):0},xr}var wr,Tr;function Er(){if(Tr)return wr;Tr=1;var e=Cr();return wr=function(t){return e(t.length)},wr}var Dr,Or;function kr(){if(Or)return Dr;Or=1;var e=mt(),t=br(),n=Er(),r=function(r){return function(a,o,s){var c=e(a),l=n(c);if(l===0)return!r&&-1;var u=t(s,l),d;if(r&&o!==o){for(;l>u;)if(d=c[u++],d!==d)return!0}else for(;l>u;u++)if((r||u in c)&&c[u]===o)return r||u||0;return!r&&-1}};return Dr={includes:r(!0),indexOf:r(!1)},Dr}var Ar,jr;function Mr(){return jr||(jr=1,Ar={}),Ar}var Nr,Pr;function Fr(){if(Pr)return Nr;Pr=1;var e=k(),t=gn(),n=mt(),r=kr().indexOf,a=Mr(),o=e([].push);return Nr=function(e,s){var c=n(e),l=0,u=[],d;for(d in c)!t(a,d)&&t(c,d)&&o(u,d);for(;s.length>l;)t(c,d=s[l++])&&(~r(u,d)||o(u,d));return u},Nr}var Ir,Lr;function Rr(){return Lr||(Lr=1,Ir=[`constructor`,`hasOwnProperty`,`isPrototypeOf`,`propertyIsEnumerable`,`toLocaleString`,`toString`,`valueOf`]),Ir}var zr,Br;function Vr(){if(Br)return zr;Br=1;var e=Fr(),t=Rr();return zr=Object.keys||function(n){return e(n,t)},zr}var Hr;function Ur(){if(Hr)return dr;Hr=1;var e=Xe(),t=Gn(),n=Xn(),r=Jn(),a=mt(),o=Vr();return dr.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var s=a(t),c=o(t),l=c.length,u=0,d;l>u;)n.f(e,d=c[u++],s[d]);return e},dr}var Wr,Gr;function Kr(){return Gr||(Gr=1,Wr=St()(`document`,`documentElement`)),Wr}var qr,Jr;function Yr(){if(Jr)return qr;Jr=1;var e=un(),t=yn(),n=e(`keys`);return qr=function(e){return n[e]||(n[e]=t(e))},qr}var Xr,Zr;function Qr(){if(Zr)return Xr;Zr=1;var e=Jn(),t=Ur(),n=Rr(),r=Mr(),a=Kr(),o=An(),s=Yr(),c=`>`,l=`<`,u=`prototype`,d=`script`,f=s(`IE_PROTO`),p=function(){},m=function(e){return l+d+c+e+l+`/`+d+c},h=function(e){e.write(m(``)),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){var e=o(`iframe`),t=`java`+d+`:`,n;return e.style.display=`none`,a.appendChild(e),e.src=String(t),n=e.contentWindow.document,n.open(),n.write(m(`document.F=Object`)),n.close(),n.F},_,v=function(){try{_=new ActiveXObject(`htmlfile`)}catch{}v=typeof document<`u`?document.domain&&_?h(_):g():h(_);for(var e=n.length;e--;)delete v[u][n[e]];return v()};return r[f]=!0,Xr=Object.create||function(n,r){var a;return n===null?a=v():(p[u]=e(n),a=new p,p[u]=null,a[f]=n),r===void 0?a:t.f(a,r)},Xr}var $r={},ei;function ti(){if(ei)return $r;ei=1;var e=Fr(),t=Rr().concat(`length`,`prototype`);return $r.f=Object.getOwnPropertyNames||function(n){return e(n,t)},$r}var ni={},ri,ii;function ai(){return ii||(ii=1,ri=k()([].slice)),ri}var oi;function si(){if(oi)return ni;oi=1;var e=Be(),t=mt(),n=ti().f,r=ai(),a=typeof window==`object`&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],o=function(e){try{return n(e)}catch{return r(a)}};return ni.f=function(r){return a&&e(r)===`Window`?o(r):n(t(r))},ni}var ci={},li;function ui(){return li||(li=1,ci.f=Object.getOwnPropertySymbols),ci}var di,fi;function pi(){if(fi)return di;fi=1;var e=$n();return di=function(t,n,r,a){return a&&a.enumerable?t[n]=r:e(t,n,r),t},di}var mi,hi;function gi(){if(hi)return mi;hi=1;var e=Xn();return mi=function(t,n,r){return e.f(t,n,r)},mi}var _i={},vi;function yi(){return vi||(vi=1,_i.f=Sn()),_i}var bi,xi;function Si(){if(xi)return bi;xi=1;var e=N(),t=gn(),n=yi(),r=Xn().f;return bi=function(a){var o=e.Symbol||={};t(o,a)||r(o,a,{value:n.f(a)})},bi}var Ci,wi;function Ti(){if(wi)return Ci;wi=1;var e=Qe(),t=St(),n=Sn(),r=pi();return Ci=function(){var a=t(`Symbol`),o=a&&a.prototype,s=o&&o.valueOf,c=n(`toPrimitive`);o&&!o[c]&&r(o,c,function(t){return e(s,this)},{arity:1})},Ci}var Ei,Di;function Oi(){if(Di)return Ei;Di=1;var e=ir(),t=sr();return Ei=e?{}.toString:function(){return`[object `+t(this)+`]`},Ei}var ki,Ai;function ji(){if(Ai)return ki;Ai=1;var e=ir(),t=Xn().f,n=$n(),r=gn(),a=Oi(),o=Sn()(`toStringTag`);return ki=function(s,c,l,u){var d=l?s:s&&s.prototype;d&&(r(d,o)||t(d,o,{configurable:!0,value:c}),u&&!e&&n(d,`toString`,a))},ki}var Mi,Ni;function Pi(){if(Ni)return Mi;Ni=1;var e=De(),t=Ke(),n=e.WeakMap;return Mi=t(n)&&/native code/.test(String(n)),Mi}var Fi,Ii;function Li(){if(Ii)return Fi;Ii=1;var e=Pi(),t=De(),n=_t(),r=$n(),a=gn(),o=sn(),s=Yr(),c=Mr(),l=`Object already initialized`,u=t.TypeError,d=t.WeakMap,f,p,m,h=function(e){return m(e)?p(e):f(e,{})},g=function(e){return function(t){var r;if(!n(t)||(r=p(t)).type!==e)throw new u(`Incompatible receiver, `+e+` required`);return r}};if(e||o.state){var _=o.state||=new d;_.get=_.get,_.has=_.has,_.set=_.set,f=function(e,t){if(_.has(e))throw new u(l);return t.facade=e,_.set(e,t),t},p=function(e){return _.get(e)||{}},m=function(e){return _.has(e)}}else{var v=s(`state`);c[v]=!0,f=function(e,t){if(a(e,v))throw new u(l);return t.facade=e,r(e,v,t),t},p=function(e){return a(e,v)?e[v]:{}},m=function(e){return a(e,v)}}return Fi={set:f,get:p,has:m,enforce:h,getterFor:g},Fi}var Ri,zi;function Bi(){if(zi)return Ri;zi=1;var e=Be();return Ri=Array.isArray||function(t){return e(t)===`Array`},Ri}var Vi,Hi;function Ui(){if(Hi)return Vi;Hi=1;var e=k(),t=Ke(),n=sn(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Vi=n.inspectSource,Vi}var Wi,Gi;function Ki(){if(Gi)return Wi;Gi=1;var e=k(),t=O(),n=Ke(),r=sr(),a=St(),o=Ui(),s=function(){},c=a(`Reflect`,`construct`),l=/^\s*(?:class|function)\b/,u=e(l.exec),d=!l.test(s),f=function(e){if(!n(e))return!1;try{return c(s,[],e),!0}catch{return!1}},p=function(e){if(!n(e))return!1;switch(r(e)){case`AsyncFunction`:case`GeneratorFunction`:case`AsyncGeneratorFunction`:return!1}try{return d||!!u(l,o(e))}catch{return!0}};return p.sham=!0,Wi=!c||t(function(){var e;return f(f.call)||!f(Object)||!f(function(){e=!0})||e})?p:f,Wi}var qi,Ji;function Yi(){if(Ji)return qi;Ji=1;var e=Bi(),t=Ki(),n=_t(),r=Sn()(`species`),a=Array;return qi=function(o){var s;return e(o)&&(s=o.constructor,t(s)&&(s===a||e(s.prototype))?s=void 0:n(s)&&(s=s[r],s===null&&(s=void 0))),s===void 0?a:s},qi}var Xi,Zi;function Qi(){if(Zi)return Xi;Zi=1;var e=Yi();return Xi=function(t,n){return new(e(t))(n===0?0:n)},Xi}var $i,ea;function ta(){if(ea)return $i;ea=1;var e=Xe(),t=Xn(),n=M();return $i=function(r,a,o){e?t.f(r,a,n(0,o)):r[a]=o},$i}var na,ra;function ia(){if(ra)return na;ra=1;var e=Vn(),t=at(),n=pn(),r=Er(),a=Qi(),o=ta(),s=function(s){var c=s===1,l=s===2,u=s===3,d=s===4,f=s===6,p=s===7,m=s===5||f;return function(h,g,_){for(var v=n(h),y=t(v),b=r(y),x=e(g,_),S=0,C=0,w=c?a(h,b):l||p?a(h,0):void 0,T,ee;b>S;S++)if((m||S in y)&&(T=y[S],ee=x(T,S,v),s)){if(c)o(w,S,ee);else if(ee)switch(s){case 3:return!0;case 5:return T;case 6:return S;case 2:o(w,C++,T)}else switch(s){case 4:return!1;case 7:o(w,C++,T)}}return f?-1:u||d?d:w}};return na={forEach:s(0),map:s(1),filter:s(2),some:s(3),every:s(4),find:s(5),findIndex:s(6),filterReject:s(7)},na}var aa;function oa(){if(aa)return we;aa=1;var e=I(),t=De(),n=Qe(),r=k(),a=tn(),o=Xe(),s=Nt(),c=O(),l=gn(),u=P(),d=Jn(),f=mt(),p=F(),m=ur(),h=M(),g=Qr(),_=Vr(),v=ti(),y=si(),b=ui(),x=Fn(),S=Xn(),C=Ur(),w=tt(),T=pi(),ee=gi(),E=un(),te=Yr(),ne=Mr(),re=yn(),ie=Sn(),ae=yi(),oe=Si(),se=Ti(),ce=ji(),le=Li(),ue=ia().forEach,de=te(`hidden`),fe=`Symbol`,pe=`prototype`,me=le.set,D=le.getterFor(fe),he=Object[pe],ge=t.Symbol,_e=ge&&ge[pe],ve=t.RangeError,ye=t.TypeError,be=t.QObject,xe=x.f,Se=S.f,Ce=y.f,Te=w.f,Ee=r([].push),Oe=E(`symbols`),ke=E(`op-symbols`),Ae=E(`wks`),je=!be||!be[pe]||!be[pe].findChild,Me=function(e,t,n){var r=xe(he,t);return r&&delete he[t],Se(e,t,n),r&&e!==he&&Se(he,t,r),e},Ne=o&&c(function(){return g(Se({},`a`,{get:function(){return Se(this,`a`,{value:7}).a}})).a!==7})?Me:Se,Pe=function(e,t){var n=Oe[e]=g(_e);return me(n,{type:fe,tag:e,description:t}),o||(n.description=t),n},Fe=function(e,t,n){e===he&&Fe(ke,t,n),d(e);var r=p(t);return d(n),l(Oe,r)?((`enumerable`in n?!n.enumerable:!l(e,r)||l(e,de)&&e[de][r])?(l(e,de)||Se(e,de,h(1,g(null))),e[de][r]=!0):(l(e,de)&&e[de][r]&&(e[de][r]=!1),n=g(n,{enumerable:h(0,!1)})),Ne(e,r,n)):Se(e,r,n)},Ie=function(e,t){d(e);var r=f(t);return ue(_(r).concat(Ve(r)),function(t){(!o||n(Re,r,t))&&Fe(e,t,r[t])}),e},Le=function(e,t){return t===void 0?g(e):Ie(g(e),t)},Re=function(e){var t=p(e),r=n(Te,this,t);return this===he&&l(Oe,t)&&!l(ke,t)?!1:r||!l(this,t)||!l(Oe,t)||l(this,de)&&this[de][t]?r:!0},ze=function(e,t){var n=f(e),r=p(t);if(n!==he||!l(Oe,r)||l(ke,r)){var a=xe(n,r);return a&&l(Oe,r)&&!(l(n,de)&&n[de][r])&&(a.enumerable=!0),a}},Be=function(e){var t=Ce(f(e)),n=[];return ue(t,function(e){!l(Oe,e)&&!l(ne,e)&&Ee(n,e)}),n},Ve=function(e){var t=e===he,n=Ce(t?ke:f(e)),r=[];return ue(n,function(e){l(Oe,e)&&(!t||l(he,e))&&Ee(r,Oe[e])}),r};return s||(ge=function(){if(u(_e,this))throw new ye(`Symbol is not a constructor`);var e=!arguments.length||arguments[0]===void 0?void 0:m(arguments[0]),r=re(e),a=function(e){var o=this===void 0?t:this;o===he&&n(a,ke,e),l(o,de)&&l(o[de],r)&&(o[de][r]=!1);var s=h(1,e);try{Ne(o,r,s)}catch(e){if(!(e instanceof ve))throw e;Me(o,r,s)}};return o&&je&&Ne(he,r,{configurable:!0,set:a}),Pe(r,e)},_e=ge[pe],T(_e,`toString`,function(){return D(this).tag}),T(ge,`withoutSetter`,function(e){return Pe(re(e),e)}),w.f=Re,S.f=Fe,C.f=Ie,x.f=ze,v.f=y.f=Be,b.f=Ve,ae.f=function(e){return Pe(ie(e),e)},o&&(ee(_e,`description`,{configurable:!0,get:function(){return D(this).description}}),a||T(he,`propertyIsEnumerable`,Re,{unsafe:!0}))),e({global:!0,constructor:!0,wrap:!0,forced:!s,sham:!s},{Symbol:ge}),ue(_(Ae),function(e){oe(e)}),e({target:fe,stat:!0,forced:!s},{useSetter:function(){je=!0},useSimple:function(){je=!1}}),e({target:`Object`,stat:!0,forced:!s,sham:!o},{create:Le,defineProperty:Fe,defineProperties:Ie,getOwnPropertyDescriptor:ze}),e({target:`Object`,stat:!0,forced:!s},{getOwnPropertyNames:Be}),se(),ce(ge,fe),ne[de]=!0,we}var sa={},ca,la;function ua(){return la||(la=1,ca=Nt()&&!!Symbol.for&&!!Symbol.keyFor),ca}var da;function fa(){if(da)return sa;da=1;var e=I(),t=St(),n=gn(),r=ur(),a=un(),o=ua(),s=a(`string-to-symbol-registry`),c=a(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!o},{for:function(e){var a=r(e);if(n(s,a))return s[a];var o=t(`Symbol`)(a);return s[a]=o,c[o]=a,o}}),sa}var pa={},ma;function ha(){if(ma)return pa;ma=1;var e=I(),t=gn(),n=zt(),r=Ht(),a=un(),o=ua(),s=a(`symbol-to-string-registry`);return e({target:`Symbol`,stat:!0,forced:!o},{keyFor:function(e){if(!n(e))throw TypeError(r(e)+` is not a symbol`);if(t(s,e))return s[e]}}),pa}var ga={},_a,va;function ya(){if(va)return _a;va=1;var e=_t(),t=Li().get;return _a=function(n){if(!e(n))return!1;var r=t(n);return!!r&&r.type===`RawJSON`},_a}var ba,xa;function Sa(){if(xa)return ba;xa=1;var e=k(),t=gn(),n=SyntaxError,r=parseInt,a=String.fromCharCode,o=e(``.charAt),s=e(``.slice),c=e(/./.exec),l={'\\"':`"`,"\\\\":`\\`,"\\/":`/`,"\\b":`\b`,"\\f":`\f`,"\\n":`
5
+ `,"\\r":`\r`,"\\t":` `},u=/^[\da-f]{4}$/i,d=/^[\u0000-\u001F]$/;return ba=function(e,f){for(var p=!0,m=``;f<e.length;){var h=o(e,f);if(h===`\\`){var g=s(e,f,f+2);if(t(l,g))m+=l[g],f+=2;else if(g===`\\u`){f+=2;var _=s(e,f,f+4);if(!c(u,_))throw new n(`Bad Unicode escape at: `+f);m+=a(r(_,16)),f+=4}else throw new n(`Unknown escape sequence: "`+g+`"`)}else if(h===`"`){p=!1,f++;break}else{if(c(d,h))throw new n(`Bad control character in string literal at: `+f);m+=h,f++}}if(p)throw new n(`Unterminated string at: `+f);return{value:m,end:f}},ba}var Ca,wa;function Ta(){return wa||(wa=1,Ca=!O()(function(){var e=`9007199254740993`,t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})),Ca}var Ea;function L(){if(Ea)return ga;Ea=1;var e=I(),t=St(),n=Fe(),r=Qe(),a=k(),o=O(),s=Bi(),c=Ke(),l=ya(),u=zt(),d=Be(),f=ur(),p=ai(),m=Sa(),h=yn(),g=Nt(),_=Ta(),v=String,y=t(`JSON`,`stringify`),b=a(/./.exec),x=a(``.charAt),S=a(``.charCodeAt),C=a(``.replace),w=a(``.slice),T=a([].push),ee=a(1.1.toString),E=/[\uD800-\uDFFF]/g,te=/^[\uD800-\uDBFF]$/,ne=/^[\uDC00-\uDFFF]$/,re=h(),ie=re.length,ae=!g||o(function(){var e=t(`Symbol`)(`stringify detection`);return y([e])!==`[null]`||y({a:e})!==`{}`||y(Object(e))!==`{}`}),oe=o(function(){return y(`\udf06\ud834`)!==`"\\udf06\\ud834"`||y(`\udead`)!==`"\\udead"`}),se=ae?function(e,t){var a=p(arguments),o=le(t);if(c(o)||e!==void 0&&!u(e))return a[1]=function(e,t){if(c(o)&&(t=r(o,this,v(e),t)),!u(t))return t},n(y,null,a)}:y,ce=function(e,t,n){var r=x(n,t-1),a=x(n,t+1);return b(te,e)&&!b(ne,a)||b(ne,e)&&!b(te,r)?`\\u`+ee(S(e,0),16):e},le=function(e){if(c(e))return e;if(s(e)){for(var t=e.length,n=[],r=0;r<t;r++){var a=e[r];typeof a==`string`?T(n,a):(typeof a==`number`||d(a)===`Number`||d(a)===`String`)&&T(n,f(a))}var o=n.length,l=!0;return function(e,t){if(l)return l=!1,t;if(s(this))return t;for(var r=0;r<o;r++)if(n[r]===e)return t}}};return y&&e({target:`JSON`,stat:!0,arity:3,forced:ae||oe||!_},{stringify:function(e,t,n){var a=le(t),o=[],s=se(e,function(e,t){var n=c(a)?r(a,this,v(e),t):t;return!_&&l(n)?re+(T(o,n.rawJSON)-1):n},n);if(typeof s!=`string`||(oe&&(s=C(s,E,ce)),_))return s;for(var u=``,d=s.length,f=0;f<d;f++){var p=x(s,f);if(p===`"`){var h=m(s,++f).end-1,g=w(s,f,h);u+=w(g,0,ie)===re?o[w(g,ie)]:`"`+g+`"`,f=h}else u+=p}return u}}),ga}var Da={},Oa;function ka(){if(Oa)return Da;Oa=1;var e=I(),t=Nt(),n=O(),r=ui(),a=pn();return e({target:`Object`,stat:!0,forced:!t||n(function(){r.f(1)})},{getOwnPropertySymbols:function(e){var t=r.f;return t?t(a(e)):[]}}),Da}var R;function Aa(){return R||(R=1,oa(),fa(),ha(),L(),ka()),Ce}var ja,Ma;function Na(){return Ma||(Ma=1,Aa(),ja=N().Object.getOwnPropertySymbols),ja}var Pa,Fa;function Ia(){return Fa||(Fa=1,Pa=Na()),Pa}var La,Ra;function za(){return Ra||(Ra=1,La=Ia()),La}var Ba=r(za()),Va={exports:{}},Ha={},Ua;function Wa(){if(Ua)return Ha;Ua=1;var e=I(),t=O(),n=mt(),r=Fn().f,a=Xe();return e({target:`Object`,stat:!0,forced:!a||t(function(){r(1)}),sham:!a},{getOwnPropertyDescriptor:function(e,t){return r(n(e),t)}}),Ha}var Ga;function Ka(){if(Ga)return Va.exports;Ga=1,Wa();var e=N().Object,t=Va.exports=function(t,n){return e.getOwnPropertyDescriptor(t,n)};return e.getOwnPropertyDescriptor.sham&&(t.sham=!0),Va.exports}var qa,Ja;function Ya(){return Ja||(Ja=1,qa=Ka()),qa}var Xa,Za;function Qa(){return Za||(Za=1,Xa=Ya()),Xa}var $a=r(Qa()),eo={},to,no;function ro(){if(no)return to;no=1;var e=St(),t=k(),n=ti(),r=ui(),a=Jn(),o=t([].concat);return to=e(`Reflect`,`ownKeys`)||function(e){var t=n.f(a(e)),s=r.f;return s?o(t,s(e)):t},to}var io;function ao(){if(io)return eo;io=1;var e=I(),t=Xe(),n=ro(),r=mt(),a=Fn(),o=ta();return e({target:`Object`,stat:!0,sham:!t},{getOwnPropertyDescriptors:function(e){for(var t=r(e),s=a.f,c=n(t),l={},u=0,d,f;c.length>u;)f=s(t,d=c[u++]),f!==void 0&&o(l,d,f);return l}}),eo}var oo,so;function co(){return so||(so=1,ao(),oo=N().Object.getOwnPropertyDescriptors),oo}var lo,uo;function fo(){return uo||(uo=1,lo=co()),lo}var po,mo;function ho(){return mo||(mo=1,po=fo()),po}var go=r(ho()),_o={exports:{}},vo={},yo;function bo(){if(yo)return vo;yo=1;var e=I(),t=Xe(),n=Ur().f;return e({target:`Object`,stat:!0,forced:Object.defineProperties!==n,sham:!t},{defineProperties:n}),vo}var xo;function So(){if(xo)return _o.exports;xo=1,bo();var e=N().Object,t=_o.exports=function(t,n){return e.defineProperties(t,n)};return e.defineProperties.sham&&(t.sham=!0),_o.exports}var Co,wo;function To(){return wo||(wo=1,Co=So()),Co}var Eo,z;function Do(){return z||(z=1,Eo=To()),Eo}var Oo=r(Do()),ko={},Ao;function jo(){return Ao||(Ao=1,I()({target:`Array`,stat:!0},{isArray:Bi()})),ko}var Mo,No;function Po(){return No||(No=1,jo(),Mo=N().Array.isArray),Mo}var Fo,Io;function Lo(){return Io||(Io=1,Fo=Po()),Fo}var Ro,zo;function Bo(){return zo||(zo=1,Ro=Lo()),Ro}var Vo,Ho;function Uo(){return Ho||(Ho=1,Vo=Bo()),Vo}var Wo,Go;function Ko(){return Go||(Go=1,Wo=Uo()),Wo}var qo=r(Ko());function Jo(e){if(qo(e))return e}var Yo={},Xo,Zo;function Qo(){if(Zo)return Xo;Zo=1;var e=TypeError,t=9007199254740991;return Xo=function(n){if(n>t)throw new e(`Maximum allowed index exceeded`);return n},Xo}var $o,es;function ts(){if(es)return $o;es=1;var e=Xe(),t=Bi(),n=TypeError,r=Object.getOwnPropertyDescriptor;return $o=e&&!function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,a){if(t(e)&&!r(e,`length`).writable)throw new n(`Cannot set read only .length`);return e.length=a}:function(e,t){return e.length=t},$o}var ns,rs;function is(){if(rs)return ns;rs=1;var e=O(),t=Sn(),n=At(),r=t(`species`);return ns=function(t){return n>=51||!e(function(){var e=[],n=e.constructor={};return n[r]=function(){return{foo:1}},e[t](Boolean).foo!==1})},ns}var as;function os(){if(as)return Yo;as=1;var e=I(),t=O(),n=Bi(),r=_t(),a=pn(),o=Er(),s=Qo(),c=ta(),l=ts(),u=Qi(),d=is(),f=Sn(),p=At(),m=f(`isConcatSpreadable`),h=p>=51||!t(function(){var e=[];return e[m]=!1,e.concat()[0]!==e}),g=function(e){if(!r(e))return!1;var t=e[m];return t===void 0?n(e):!!t};return e({target:`Array`,proto:!0,arity:1,forced:!h||!d(`concat`)},{concat:function(e){for(var t=a(this),n=u(t,0),r=0,d=-1,f,p=arguments.length,m,h;d<p;d++)if(h=d===-1?t:arguments[d],g(h))for(m=o(h),s(r+m),f=0;f<m;f++,r++)f in h&&c(n,r,h[f]);else s(r+1),c(n,r++,h);return l(n,r),n}}),Yo}var ss={},cs;function ls(){return cs||(cs=1,Si()(`asyncDispose`)),ss}var us={},ds;function fs(){return ds||(ds=1,Si()(`asyncIterator`)),us}var ps={},ms;function hs(){return ms||(ms=1,Si()(`dispose`)),ps}var gs={},_s;function vs(){return _s||(_s=1,Si()(`hasInstance`)),gs}var ys={},bs;function xs(){return bs||(bs=1,Si()(`isConcatSpreadable`)),ys}var Ss={},Cs;function ws(){return Cs||(Cs=1,Si()(`iterator`)),Ss}var Ts={},Es;function Ds(){return Es||(Es=1,Si()(`match`)),Ts}var Os={},ks;function As(){return ks||(ks=1,Si()(`matchAll`)),Os}var js={},Ms;function Ns(){return Ms||(Ms=1,Si()(`replace`)),js}var Ps={},Fs;function Is(){return Fs||(Fs=1,Si()(`search`)),Ps}var Ls={},Rs;function zs(){return Rs||(Rs=1,Si()(`species`)),Ls}var Bs={},Vs;function Hs(){return Vs||(Vs=1,Si()(`split`)),Bs}var Us={},Ws;function Gs(){if(Ws)return Us;Ws=1;var e=Si(),t=Ti();return e(`toPrimitive`),t(),Us}var Ks={},qs;function Js(){if(qs)return Ks;qs=1;var e=St(),t=Si(),n=ji();return t(`toStringTag`),n(e(`Symbol`),`Symbol`),Ks}var Ys={},Xs;function Zs(){return Xs||(Xs=1,Si()(`unscopables`)),Ys}var Qs={},$s;function ec(){return $s||($s=1,ji()(De().JSON,`JSON`,!0)),Qs}var tc,nc;function rc(){return nc||(nc=1,os(),Aa(),ls(),fs(),hs(),vs(),xs(),ws(),Ds(),As(),Ns(),Is(),zs(),Hs(),Gs(),Js(),Zs(),ec(),tc=N().Symbol),tc}var ic={},ac,oc;function sc(){return oc||(oc=1,ac=function(){}),ac}var cc,lc;function uc(){return lc||(lc=1,cc={}),cc}var dc,fc;function pc(){if(fc)return dc;fc=1;var e=Xe(),t=gn(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,a=t(n,`name`);return dc={EXISTS:a,PROPER:a&&function(){}.name===`something`,CONFIGURABLE:a&&(!e||e&&r(n,`name`).configurable)},dc}var mc,hc;function gc(){return hc||(hc=1,mc=!O()(function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),mc}var _c,vc;function yc(){if(vc)return _c;vc=1;var e=gn(),t=Ke(),n=pn(),r=Yr(),a=gc(),o=r(`IE_PROTO`),s=Object,c=s.prototype;return _c=a?s.getPrototypeOf:function(r){var a=n(r);if(e(a,o))return a[o];var l=a.constructor;return t(l)&&a instanceof l?l.prototype:a instanceof s?c:null},_c}var bc,xc;function Sc(){if(xc)return bc;xc=1;var e=O(),t=Ke(),n=_t(),r=Qr(),a=yc(),o=pi(),s=Sn(),c=tn(),l=s(`iterator`),u=!1,d,f,p;return[].keys&&(p=[].keys(),`next`in p?(f=a(a(p)),f!==Object.prototype&&(d=f)):u=!0),!n(d)||e(function(){var e={};return d[l].call(e)!==e})?d={}:c&&(d=r(d)),t(d[l])||o(d,l,function(){return this}),bc={IteratorPrototype:d,BUGGY_SAFARI_ITERATORS:u},bc}var Cc,wc;function Tc(){if(wc)return Cc;wc=1;var e=Sc().IteratorPrototype,t=Qr(),n=M(),r=ji(),a=uc(),o=function(){return this};return Cc=function(s,c,l,u){var d=c+` Iterator`;return s.prototype=t(e,{next:n(+!u,l)}),r(s,d,!1,!0),a[d]=o,s},Cc}var Ec,Dc;function Oc(){if(Dc)return Ec;Dc=1;var e=k(),t=Gt();return Ec=function(n,r,a){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[a]))}catch{}},Ec}var kc,Ac;function jc(){if(Ac)return kc;Ac=1;var e=_t();return kc=function(t){return e(t)||t===null},kc}var Mc,Nc;function Pc(){if(Nc)return Mc;Nc=1;var e=jc(),t=String,n=TypeError;return Mc=function(r){if(e(r))return r;throw new n(`Can't set `+t(r)+` as a prototype`)},Mc}var Fc,Ic;function Lc(){if(Ic)return Fc;Ic=1;var e=Oc(),t=_t(),n=dt(),r=Pc();return Fc=Object.setPrototypeOf||(`__proto__`in{}?function(){var a=!1,o={},s;try{s=e(Object.prototype,`__proto__`,`set`),s(o,[]),a=o instanceof Array}catch{}return function(e,o){return n(e),r(o),t(e)&&(a?s(e,o):e.__proto__=o),e}}():void 0),Fc}var Rc,zc;function Bc(){if(zc)return Rc;zc=1;var e=I(),t=Qe(),n=tn(),r=pc(),a=Ke(),o=Tc(),s=yc(),c=Lc(),l=ji(),u=$n(),d=pi(),f=Sn(),p=uc(),m=Sc(),h=r.PROPER,g=r.CONFIGURABLE,_=m.IteratorPrototype,v=m.BUGGY_SAFARI_ITERATORS,y=f(`iterator`),b=`keys`,x=`values`,S=`entries`,C=function(){return this};return Rc=function(r,f,m,w,T,ee,E){o(m,f,w);var te=function(e){if(e===T&&oe)return oe;if(!v&&e&&e in ie)return ie[e];switch(e){case b:return function(){return new m(this,e)};case x:return function(){return new m(this,e)};case S:return function(){return new m(this,e)}}return function(){return new m(this)}},ne=f+` Iterator`,re=!1,ie=r.prototype,ae=ie[y]||ie[`@@iterator`]||T&&ie[T],oe=!v&&ae||te(T),se=f===`Array`&&ie.entries||ae,ce,le,ue;if(se&&(ce=s(se.call(new r)),ce!==Object.prototype&&ce.next&&(!n&&s(ce)!==_&&(c?c(ce,_):a(ce[y])||d(ce,y,C)),l(ce,ne,!0,!0),n&&(p[ne]=C))),h&&T===x&&ae&&ae.name!==x&&(!n&&g?u(ie,`name`,x):(re=!0,oe=function(){return t(ae,this)})),T){if(le={values:te(x),keys:ee?oe:te(b),entries:te(S)},E)for(ue in le)(v||re||!(ue in ie))&&d(ie,ue,le[ue]);else e({target:f,proto:!0,forced:v||re},le)}return(!n||E)&&ie[y]!==oe&&d(ie,y,oe,{name:T}),p[f]=oe,le},Rc}var Vc,Hc;function Uc(){return Hc||(Hc=1,Vc=function(e,t){return{value:e,done:t}}),Vc}var Wc,Gc;function Kc(){if(Gc)return Wc;Gc=1;var e=mt(),t=sc(),n=uc(),r=Li(),a=Xn().f,o=Bc(),s=Uc(),c=tn(),l=Xe(),u=`Array Iterator`,d=r.set,f=r.getterFor(u);Wc=o(Array,`Array`,function(t,n){d(this,{type:u,target:e(t),index:0,kind:n})},function(){var e=f(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,s(void 0,!0);switch(e.kind){case`keys`:return s(n,!1);case`values`:return s(t[n],!1)}return s([n,t[n]],!1)},`values`);var p=n.Arguments=n.Array;if(t(`keys`),t(`values`),t(`entries`),!c&&l&&p.name!==`values`)try{a(p,`name`,{value:`values`})}catch{}return Wc}var qc,Jc;function Yc(){return Jc||(Jc=1,qc={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),qc}var Xc;function Zc(){if(Xc)return ic;Xc=1,Kc();var e=Yc(),t=De(),n=ji(),r=uc();for(var a in e)n(t[a],a),r[a]=r.Array;return ic}var Qc,$c;function el(){if($c)return Qc;$c=1;var e=rc();return Zc(),Qc=e,Qc}var tl={},nl;function rl(){if(nl)return tl;nl=1;var e=Sn(),t=Xn().f,n=e(`metadata`),r=Function.prototype;return r[n]===void 0&&t(r,n,{value:null}),tl}var il={},al;function ol(){return al||(al=1,ls()),il}var sl={},cl;function ll(){return cl||(cl=1,hs()),sl}var ul={},dl;function fl(){return dl||(dl=1,Si()(`metadata`)),ul}var pl,ml;function hl(){if(ml)return pl;ml=1;var e=el();return rl(),ol(),ll(),fl(),pl=e,pl}var gl={},_l,vl;function yl(){if(vl)return _l;vl=1;var e=St(),t=k(),n=e(`Symbol`),r=n.keyFor,a=t(n.prototype.valueOf);return _l=n.isRegisteredSymbol||function(e){try{return r(a(e))!==void 0}catch{return!1}},_l}var bl;function xl(){return bl||(bl=1,I()({target:`Symbol`,stat:!0},{isRegisteredSymbol:yl()})),gl}var Sl={},Cl,wl;function Tl(){if(wl)return Cl;wl=1;for(var e=un(),t=St(),n=k(),r=zt(),a=Sn(),o=t(`Symbol`),s=o.isWellKnownSymbol,c=t(`Object`,`getOwnPropertyNames`),l=n(o.prototype.valueOf),u=e(`wks`),d=0,f=c(o),p=f.length;d<p;d++)try{var m=f[d];r(o[m])&&a(m)}catch{}return Cl=function(e){if(s&&s(e))return!0;try{for(var t=l(e),n=0,r=c(u),a=r.length;n<a;n++)if(u[r[n]]==t)return!0}catch{}return!1},Cl}var El;function Dl(){return El||(El=1,I()({target:`Symbol`,stat:!0,forced:!0},{isWellKnownSymbol:Tl()})),Sl}var Ol={},kl;function Al(){return kl||(kl=1,Si()(`customMatcher`)),Ol}var jl={},Ml;function Nl(){return Ml||(Ml=1,Si()(`observable`)),jl}var Pl={},Fl;function Il(){return Fl||(Fl=1,I()({target:`Symbol`,stat:!0,name:`isRegisteredSymbol`},{isRegistered:yl()})),Pl}var Ll={},Rl;function zl(){return Rl||(Rl=1,I()({target:`Symbol`,stat:!0,name:`isWellKnownSymbol`,forced:!0},{isWellKnown:Tl()})),Ll}var Bl={},Vl;function Hl(){return Vl||(Vl=1,Si()(`matcher`)),Bl}var Ul={},Wl;function Gl(){return Wl||(Wl=1,Si()(`metadataKey`)),Ul}var Kl={},ql;function Jl(){return ql||(ql=1,Si()(`patternMatch`)),Kl}var Yl={},Xl;function Zl(){return Xl||(Xl=1,Si()(`replaceAll`)),Yl}var Ql,$l;function eu(){if($l)return Ql;$l=1;var e=hl();return xl(),Dl(),Al(),Nl(),Il(),zl(),Hl(),Gl(),Jl(),Zl(),Ql=e,Ql}var tu,nu;function ru(){return nu||(nu=1,tu=eu()),tu}var iu=r(ru()),au={},ou,su;function cu(){if(su)return ou;su=1;var e=k(),t=_r(),n=ur(),r=dt(),a=e(``.charAt),o=e(``.charCodeAt),s=e(``.slice),c=function(e){return function(c,l){var u=n(r(c)),d=t(l),f=u.length,p,m;return d<0||d>=f?e?``:void 0:(p=o(u,d),p<55296||p>56319||d+1===f||(m=o(u,d+1))<56320||m>57343?e?a(u,d):p:e?s(u,d,d+2):(p-55296<<10)+(m-56320)+65536)}};return ou={codeAt:c(!1),charAt:c(!0)},ou}var lu;function uu(){if(lu)return au;lu=1;var e=cu().charAt,t=ur(),n=Li(),r=Bc(),a=Uc(),o=`String Iterator`,s=n.set,c=n.getterFor(o);return r(String,`String`,function(e){s(this,{type:o,string:t(e),index:0})},function(){var t=c(this),n=t.string,r=t.index,o;return r>=n.length?a(void 0,!0):(o=e(n,r),t.index+=o.length,a(o,!1))}),au}var du,fu;function pu(){if(fu)return du;fu=1;var e=sr(),t=Jt(),n=ct(),r=uc(),a=Sn()(`iterator`);return du=function(o){if(!n(o))return t(o,a)||t(o,`@@iterator`)||r[e(o)]},du}var mu,hu;function gu(){return hu||(hu=1,Kc(),uu(),mu=pu()),mu}var _u,vu;function yu(){if(vu)return _u;vu=1;var e=gu();return Zc(),_u=e,_u}var bu,xu;function Su(){return xu||(xu=1,bu=yu()),bu}var Cu,wu;function Tu(){return wu||(wu=1,Cu=Su()),Cu}var Eu,Du;function Ou(){return Du||(Du=1,Eu=Tu()),Eu}var ku=r(Ou()),Au={},ju;function Mu(){if(ju)return Au;ju=1;var e=I(),t=pn(),n=Er(),r=ts(),a=Qo();return e({target:`Array`,proto:!0,arity:1,forced:O()(function(){return[].push.call({length:4294967296},1)!==4294967297})||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}()},{push:function(e){var o=t(this),s=n(o),c=arguments.length;a(s+c);for(var l=0;l<c;l++)o[s]=arguments[l],s++;return r(o,s),s}}),Au}var Nu,Pu;function Fu(){if(Pu)return Nu;Pu=1;var e=De(),t=N();return Nu=function(n,r){var a=t[n+`Prototype`],o=a&&a[r];if(o)return o;var s=e[n],c=s&&s.prototype;return c&&c[r]},Nu}var Iu,Lu;function Ru(){return Lu||(Lu=1,Mu(),Iu=Fu()(`Array`,`push`)),Iu}var zu,Bu;function Vu(){if(Bu)return zu;Bu=1;var e=P(),t=Ru(),n=Array.prototype;return zu=function(r){var a=r.push;return r===n||e(n,r)&&a===n.push?t:a},zu}var Hu,Uu;function Wu(){return Uu||(Uu=1,Hu=Vu()),Hu}var Gu,Ku;function qu(){return Ku||(Ku=1,Gu=Wu()),Gu}var Ju,Yu;function Xu(){return Yu||(Yu=1,Ju=qu()),Ju}var Zu,Qu;function $u(){return Qu||(Qu=1,Zu=Xu()),Zu}var ed=r($u());function td(e,t){var n=e==null?null:iu!==void 0&&ku(e)||e[`@@iterator`];if(n!=null){var r,a,o,s,c=[],l=!0,u=!1;try{if(o=(n=n.call(e)).next,t===0){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=o.call(n)).done)&&(ed(c).call(c,r.value),c.length!==t);l=!0);}catch(e){u=!0,a=e}finally{try{if(!l&&n.return!=null&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw a}}return c}}var nd={},rd;function id(){if(rd)return nd;rd=1;var e=I(),t=Bi(),n=Ki(),r=_t(),a=br(),o=Er(),s=mt(),c=ta(),l=ts(),u=Sn(),d=is(),f=ai(),p=d(`slice`),m=u(`species`),h=Array,g=Math.max;return e({target:`Array`,proto:!0,forced:!p},{slice:function(e,u){var d=s(this),p=o(d),_=a(e,p),v=a(u===void 0?p:u,p),y,b,x;if(t(d)&&(y=d.constructor,n(y)&&(y===h||t(y.prototype))?y=void 0:r(y)&&(y=y[m],y===null&&(y=void 0)),y===h||y===void 0))return f(d,_,v);for(b=new(y===void 0?h:y)(g(v-_,0)),x=0;_<v;_++,x++)_ in d&&c(b,x,d[_]);return l(b,x),b}}),nd}var ad,od;function sd(){return od||(od=1,id(),ad=Fu()(`Array`,`slice`)),ad}var cd,ld;function ud(){if(ld)return cd;ld=1;var e=P(),t=sd(),n=Array.prototype;return cd=function(r){var a=r.slice;return r===n||e(n,r)&&a===n.slice?t:a},cd}var dd,fd;function pd(){return fd||(fd=1,dd=ud()),dd}var md,hd;function gd(){return hd||(hd=1,md=pd()),md}var _d,vd;function yd(){return vd||(vd=1,_d=gd()),_d}var bd,xd;function Sd(){return xd||(xd=1,bd=yd()),bd}var Cd=r(Sd()),wd={},Td,Ed;function Dd(){if(Ed)return Td;Ed=1;var e=Qe(),t=Jn(),n=Jt();return Td=function(r,a,o){var s,c;t(r);try{if(s=n(r,`return`),!s){if(a===`throw`)throw o;return o}s=e(s,r)}catch(e){c=!0,s=e}if(a===`throw`)throw o;if(c)throw s;return t(s),o},Td}var Od,kd;function Ad(){if(kd)return Od;kd=1;var e=Jn(),t=Dd();return Od=function(n,r,a,o){try{return o?r(e(a)[0],a[1]):r(a)}catch(e){t(n,`throw`,e)}},Od}var jd,Md;function Nd(){if(Md)return jd;Md=1;var e=Sn(),t=uc(),n=e(`iterator`),r=Array.prototype;return jd=function(e){return e!==void 0&&(t.Array===e||r[n]===e)},jd}var Pd,Fd;function Id(){if(Fd)return Pd;Fd=1;var e=Qe(),t=Gt(),n=Jn(),r=Ht(),a=pu(),o=TypeError;return Pd=function(s,c){var l=arguments.length<2?a(s):c;if(t(l))return n(e(l,s));throw new o(r(s)+` is not iterable`)},Pd}var Ld,Rd;function zd(){if(Rd)return Ld;Rd=1;var e=Vn(),t=Qe(),n=pn(),r=Ad(),a=Nd(),o=Ki(),s=Er(),c=ta(),l=ts(),u=Id(),d=pu(),f=Dd(),p=Array;return Ld=function(m){var h=o(this),g=arguments.length,_=g>1?arguments[1]:void 0,v=_!==void 0;v&&(_=e(_,g>2?arguments[2]:void 0));var y=n(m),b=d(y),x=0,S,C,w,T,ee,E;if(b&&!(this===p&&a(b)))for(C=h?new this:[],T=u(y,b),ee=T.next;!(w=t(ee,T)).done;x++){E=v?r(T,_,[w.value,x],!0):w.value;try{c(C,x,E)}catch(e){f(T,`throw`,e)}}else for(S=s(y),C=h?new this(S):p(S);S>x;x++)E=v?_(y[x],x):y[x],c(C,x,E);return l(C,x),C},Ld}var Bd,Vd;function Hd(){if(Vd)return Bd;Vd=1;var e=Sn()(`iterator`),t=!1;try{var n=0,r={next:function(){return{done:!!n++}},return:function(){t=!0}};r[e]=function(){return this},Array.from(r,function(){throw 2})}catch{}return Bd=function(n,r){try{if(!r&&!t)return!1}catch{return!1}var a=!1;try{var o={};o[e]=function(){return{next:function(){return{done:a=!0}}}},n(o)}catch{}return a},Bd}var Ud;function Wd(){if(Ud)return wd;Ud=1;var e=I(),t=zd();return e({target:`Array`,stat:!0,forced:!Hd()(function(e){Array.from(e)})},{from:t}),wd}var Gd,Kd;function qd(){return Kd||(Kd=1,uu(),Wd(),Gd=N().Array.from),Gd}var Jd,Yd;function Xd(){return Yd||(Yd=1,Jd=qd()),Jd}var Zd,Qd;function $d(){return Qd||(Qd=1,Zd=Xd()),Zd}var ef,tf;function nf(){return tf||(tf=1,ef=$d()),ef}var rf,af;function of(){return af||(af=1,rf=nf()),rf}var sf=r(of());function cf(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function lf(e,t){if(e){var n;if(typeof e==`string`)return cf(e,t);var r=Cd(n={}.toString.call(e)).call(n,8,-1);return r===`Object`&&e.constructor&&(r=e.constructor.name),r===`Map`||r===`Set`?sf(e):r===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?cf(e,t):void 0}}function uf(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function df(e,t){return Jo(e)||td(e,t)||lf(e,t)||uf()}var ff={exports:{}},pf={},mf;function hf(){if(mf)return pf;mf=1;var e=I(),t=Xe(),n=Xn().f;return e({target:`Object`,stat:!0,forced:Object.defineProperty!==n,sham:!t},{defineProperty:n}),pf}var gf;function _f(){if(gf)return ff.exports;gf=1,hf();var e=N().Object,t=ff.exports=function(t,n,r){return e.defineProperty(t,n,r)};return e.defineProperty.sham&&(t.sham=!0),ff.exports}var vf,yf;function bf(){return yf||(yf=1,vf=_f()),vf}var xf,Sf;function Cf(){return Sf||(Sf=1,xf=bf()),xf}var wf,Tf;function Ef(){return Tf||(Tf=1,wf=Cf()),wf}var Df,Of;function kf(){return Of||(Of=1,Df=Ef()),Df}var Af=r(kf()),jf,Mf;function Nf(){return Mf||(Mf=1,Kc(),uu(),ws(),jf=yi().f(`iterator`)),jf}var Pf,Ff;function If(){if(Ff)return Pf;Ff=1;var e=Nf();return Zc(),Pf=e,Pf}var Lf,Rf;function zf(){return Rf||(Rf=1,Lf=If()),Lf}var Bf,Vf;function Hf(){return Vf||(Vf=1,Bf=zf()),Bf}var Uf,Wf;function Gf(){return Wf||(Wf=1,Uf=Hf()),Uf}var Kf=r(Gf());function qf(e){"@babel/helpers - typeof";return qf=typeof iu==`function`&&typeof Kf==`symbol`?function(e){return typeof e}:function(e){return e&&typeof iu==`function`&&e.constructor===iu&&e!==iu.prototype?`symbol`:typeof e},qf(e)}var Jf,Yf;function Xf(){return Yf||(Yf=1,Gs(),Jf=yi().f(`toPrimitive`)),Jf}var Zf,Qf;function $f(){return Qf||(Qf=1,Zf=Xf()),Zf}var ep,tp;function np(){return tp||(tp=1,ep=$f()),ep}var rp,ip;function ap(){return ip||(ip=1,rp=np()),rp}var op,sp;function cp(){return sp||(sp=1,op=ap()),op}var lp=r(cp());function up(e,t){if(qf(e)!=`object`||!e)return e;var n=e[lp];if(n!==void 0){var r=n.call(e,t);if(qf(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function dp(e){var t=up(e,`string`);return qf(t)==`symbol`?t:t+``}function B(e,t,n){return(t=dp(t))in e?Af(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var fp={},pp,mp;function hp(){if(mp)return pp;mp=1;var e=k(),t=Gt(),n=_t(),r=gn(),a=ai(),o=Me(),s=Function,c=e([].concat),l=e([].join),u={},d=function(e,t,n){if(!r(u,t)){for(var a=[],o=0;o<t;o++)a[o]=`a[`+o+`]`;u[t]=s(`C,a`,`return new C(`+l(a,`,`)+`)`)}return u[t](e,n)};return pp=o?s.bind:function(e){var r=t(this),o=r.prototype,s=a(arguments,1),l=function(){var t=c(s,a(arguments));return this instanceof l?d(r,t.length,t):r.apply(e,t)};return n(o)&&(l.prototype=o),l},pp}var gp;function _p(){if(gp)return fp;gp=1;var e=I(),t=hp();return e({target:`Function`,proto:!0,forced:Function.bind!==t},{bind:t}),fp}var vp,yp;function bp(){return yp||(yp=1,_p(),vp=Fu()(`Function`,`bind`)),vp}var xp,Sp;function Cp(){if(Sp)return xp;Sp=1;var e=P(),t=bp(),n=Function.prototype;return xp=function(r){var a=r.bind;return r===n||e(n,r)&&a===n.bind?t:a},xp}var wp,Tp;function Ep(){return Tp||(Tp=1,wp=Cp()),wp}var Dp,Op;function kp(){return Op||(Op=1,Dp=Ep()),Dp}var V=r(kp()),Ap={},jp,Mp;function Np(){if(Mp)return jp;Mp=1;var e=Gt(),t=pn(),n=at(),r=Er(),a=TypeError,o=`Reduce of empty array with no initial value`,s=function(s){return function(c,l,u,d){var f=t(c),p=n(f),m=r(f);if(e(l),m===0&&u<2)throw new a(o);var h=s?m-1:0,g=s?-1:1;if(u<2)for(;;){if(h in p){d=p[h],h+=g;break}if(h+=g,s?h<0:m<=h)throw new a(o)}for(;s?h>=0:m>h;h+=g)h in p&&(d=l(d,p[h],h,f));return d}};return jp={left:s(!1),right:s(!0)},jp}var Pp,Fp;function Ip(){if(Fp)return Pp;Fp=1;var e=O();return Pp=function(t,n){var r=[][t];return!!r&&e(function(){r.call(null,n||function(){return 1},1)})},Pp}var Lp,Rp;function zp(){if(Rp)return Lp;Rp=1;var e=De(),t=Dt(),n=Be(),r=function(e){return t.slice(0,e.length)===e};return Lp=(function(){return r(`Bun/`)?`BUN`:r(`Cloudflare-Workers`)?`CLOUDFLARE`:r(`Deno/`)?`DENO`:r(`Node.js/`)?`NODE`:e.Bun&&typeof Bun.version==`string`?`BUN`:e.Deno&&typeof Deno.version==`object`?`DENO`:n(e.process)===`process`?`NODE`:e.window&&e.document?`BROWSER`:`REST`})(),Lp}var Bp,Vp;function Hp(){return Vp||(Vp=1,Bp=zp()===`NODE`),Bp}var Up;function Wp(){if(Up)return Ap;Up=1;var e=I(),t=Np().left,n=Ip(),r=At();return e({target:`Array`,proto:!0,forced:!Hp()&&r>79&&r<83||!n(`reduce`)},{reduce:function(e){var n=arguments.length;return t(this,e,n,n>1?arguments[1]:void 0)}}),Ap}var Gp,Kp;function qp(){return Kp||(Kp=1,Wp(),Gp=Fu()(`Array`,`reduce`)),Gp}var Jp,Yp;function Xp(){if(Yp)return Jp;Yp=1;var e=P(),t=qp(),n=Array.prototype;return Jp=function(r){var a=r.reduce;return r===n||e(n,r)&&a===n.reduce?t:a},Jp}var Zp,Qp;function $p(){return Qp||(Qp=1,Zp=Xp()),Zp}var em,tm;function nm(){return tm||(tm=1,em=$p()),em}var rm=r(nm()),im={},am;function om(){if(am)return im;am=1;var e=I(),t=ia().filter;return e({target:`Array`,proto:!0,forced:!is()(`filter`)},{filter:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),im}var sm,cm;function lm(){return cm||(cm=1,om(),sm=Fu()(`Array`,`filter`)),sm}var um,dm;function fm(){if(dm)return um;dm=1;var e=P(),t=lm(),n=Array.prototype;return um=function(r){var a=r.filter;return r===n||e(n,r)&&a===n.filter?t:a},um}var pm,mm;function hm(){return mm||(mm=1,pm=fm()),pm}var gm,_m;function vm(){return _m||(_m=1,gm=hm()),gm}var H=r(vm()),ym={},bm;function xm(){if(bm)return ym;bm=1;var e=I(),t=ia().map;return e({target:`Array`,proto:!0,forced:!is()(`map`)},{map:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),ym}var Sm,Cm;function wm(){return Cm||(Cm=1,xm(),Sm=Fu()(`Array`,`map`)),Sm}var Tm,Em;function Dm(){if(Em)return Tm;Em=1;var e=P(),t=wm(),n=Array.prototype;return Tm=function(r){var a=r.map;return r===n||e(n,r)&&a===n.map?t:a},Tm}var Om,km;function Am(){return km||(km=1,Om=Dm()),Om}var jm,Mm;function Nm(){return Mm||(Mm=1,jm=Am()),jm}var U=r(Nm()),Pm={},Fm,Im;function Lm(){if(Im)return Fm;Im=1;var e=Bi(),t=Er(),n=Qo(),r=Vn(),a=ta(),o=function(s,c,l,u,d,f,p,m){for(var h=d,g=0,_=p?r(p,m):!1,v,y;g<u;)g in l&&(v=_?_(l[g],g,c):l[g],f>0&&e(v)?(y=t(v),h=o(s,c,v,y,h,f-1)-1):(n(h+1),a(s,h,v)),h++),g++;return h};return Fm=o,Fm}var Rm;function zm(){if(Rm)return Pm;Rm=1;var e=I(),t=Lm(),n=Gt(),r=pn(),a=Er(),o=Qi();return e({target:`Array`,proto:!0},{flatMap:function(e){var s=r(this),c=a(s),l;return n(e),l=o(s,0),t(l,s,s,c,0,1,e,arguments.length>1?arguments[1]:void 0),l}}),Pm}var Bm={},Vm;function Hm(){return Vm||(Vm=1,sc()(`flatMap`)),Bm}var Um,Wm;function Gm(){return Wm||(Wm=1,zm(),Hm(),Um=Fu()(`Array`,`flatMap`)),Um}var Km,qm;function Jm(){if(qm)return Km;qm=1;var e=P(),t=Gm(),n=Array.prototype;return Km=function(r){var a=r.flatMap;return r===n||e(n,r)&&a===n.flatMap?t:a},Km}var Ym,Xm;function Zm(){return Xm||(Xm=1,Ym=Jm()),Ym}var Qm,$m;function eh(){return $m||($m=1,Qm=Zm()),Qm}var th=r(eh()),nh={},rh={},ih,ah;function oh(){if(ah)return ih;ah=1;var e=TypeError;return ih=function(t,n){if(t<n)throw new e(`Not enough arguments`);return t},ih}var sh,ch;function lh(){if(ch)return sh;ch=1;var e=De(),t=Fe(),n=Ke(),r=zp(),a=Dt(),o=ai(),s=oh(),c=e.Function,l=/MSIE .\./.test(a)||r===`BUN`&&(function(){var t=e.Bun.version.split(`.`);return t.length<3||t[0]===`0`&&(t[1]<3||t[1]===`3`&&t[2]===`0`)})();return sh=function(e,r){var a=r?2:1;return l?function(l,u){var d=s(arguments.length,1)>a,f=n(l)?l:c(l),p=d?o(arguments,a):[],m=d?function(){t(f,this,p)}:f;return r?e(m,u):e(m)}:e},sh}var uh;function dh(){if(uh)return rh;uh=1;var e=I(),t=De(),n=lh()(t.setInterval,!0);return e({global:!0,bind:!0,forced:t.setInterval!==n},{setInterval:n}),rh}var fh={},ph;function mh(){if(ph)return fh;ph=1;var e=I(),t=De(),n=lh()(t.setTimeout,!0);return e({global:!0,bind:!0,forced:t.setTimeout!==n},{setTimeout:n}),fh}var hh;function gh(){return hh||(hh=1,dh(),mh()),nh}var _h,vh;function yh(){return vh||(vh=1,gh(),_h=N().setTimeout),_h}var bh,xh;function Sh(){return xh||(xh=1,bh=yh()),bh}var Ch=r(Sh()),wh={},Th,Eh;function Dh(){if(Eh)return Th;Eh=1;var e=ia().forEach;return Th=Ip()(`forEach`)?[].forEach:function(t){return e(this,t,arguments.length>1?arguments[1]:void 0)},Th}var Oh;function kh(){if(Oh)return wh;Oh=1;var e=I(),t=Dh();return e({target:`Array`,proto:!0,forced:[].forEach!==t},{forEach:t}),wh}var Ah,jh;function Mh(){return jh||(jh=1,kh(),Ah=Fu()(`Array`,`forEach`)),Ah}var Nh,Ph;function Fh(){return Ph||(Ph=1,Nh=Mh()),Nh}var Ih,Lh;function Rh(){if(Lh)return Ih;Lh=1;var e=sr(),t=gn(),n=P(),r=Fh(),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return Ih=function(s){var c=s.forEach;return s===a||n(a,s)&&c===a.forEach||t(o,e(s))?r:c},Ih}var zh,Bh;function Vh(){return Bh||(Bh=1,zh=Rh()),zh}var W=r(Vh()),Hh={},Uh,Wh;function Gh(){if(Wh)return Uh;Wh=1;var e=Ht(),t=TypeError;return Uh=function(n,r){if(!delete n[r])throw new t(`Cannot delete property `+e(r)+` of `+e(n))},Uh}var Kh;function qh(){if(Kh)return Hh;Kh=1;var e=I(),t=pn(),n=br(),r=_r(),a=Er(),o=ts(),s=Qo(),c=Qi(),l=ta(),u=Gh(),d=is()(`splice`),f=Math.max,p=Math.min;return e({target:`Array`,proto:!0,forced:!d},{splice:function(e,d){var m=t(this),h=a(m),g=n(e,h),_=arguments.length,v,y,b,x,S,C;for(_===0?v=y=0:_===1?(v=0,y=h-g):(v=_-2,y=p(f(r(d),0),h-g)),s(h+v-y),b=c(m,y),x=0;x<y;x++)S=g+x,S in m&&l(b,x,m[S]);if(o(b,y),v<y){for(x=g;x<h-y;x++)S=x+y,C=x+v,S in m?m[C]=m[S]:u(m,C);for(x=h;x>h-y+v;x--)u(m,x-1)}else if(v>y)for(x=h-y;x>g;x--)S=x+y-1,C=x+v-1,S in m?m[C]=m[S]:u(m,C);for(x=0;x<v;x++)m[x+g]=arguments[x+2];return o(m,h-y+v),b}}),Hh}var Jh,Yh;function Xh(){return Yh||(Yh=1,qh(),Jh=Fu()(`Array`,`splice`)),Jh}var Zh,Qh;function $h(){if(Qh)return Zh;Qh=1;var e=P(),t=Xh(),n=Array.prototype;return Zh=function(r){var a=r.splice;return r===n||e(n,r)&&a===n.splice?t:a},Zh}var eg,tg;function ng(){return tg||(tg=1,eg=$h()),eg}var rg,ig;function ag(){return ig||(ig=1,rg=ng()),rg}var og=r(ag()),sg,cg;function lg(){return cg||(cg=1,sg=If()),sg}var ug=r(lg()),dg={},fg;function pg(){return fg||(fg=1,I()({target:`Object`,stat:!0,sham:!Xe()},{create:Qr()})),dg}var mg,hg;function gg(){if(hg)return mg;hg=1,pg();var e=N().Object;return mg=function(t,n){return e.create(t,n)},mg}var _g,vg;function yg(){return vg||(vg=1,_g=gg()),_g}var bg,xg;function Sg(){return xg||(xg=1,bg=yg()),bg}var Cg=r(Sg()),wg={},Tg={},Eg={exports:{}},Dg,Og;function kg(){return Og||(Og=1,Dg=O()(function(){if(typeof ArrayBuffer==`function`){var e=new ArrayBuffer(8);Object.isExtensible(e)&&Object.defineProperty(e,"a",{value:8})}})),Dg}var Ag,jg;function Mg(){if(jg)return Ag;jg=1;var e=O(),t=_t(),n=Be(),r=kg(),a=Object.isExtensible;return Ag=e(function(){})||r?function(e){return!t(e)||r&&n(e)===`ArrayBuffer`?!1:!a||a(e)}:a,Ag}var Ng,Pg;function Fg(){return Pg||(Pg=1,Ng=!O()(function(){return Object.isExtensible(Object.preventExtensions({}))})),Ng}var Ig;function Lg(){if(Ig)return Eg.exports;Ig=1;var e=I(),t=k(),n=Mr(),r=_t(),a=gn(),o=Xn().f,s=ti(),c=si(),l=Mg(),u=yn(),d=Fg(),f=!1,p=u(`meta`),m=0,h=function(e){o(e,p,{value:{objectID:`O`+m++,weakData:{}}})},g=Eg.exports={enable:function(){g.enable=function(){},f=!0;var n=s.f,r=t([].splice),a={};a[p]=1,n(a).length&&(s.f=function(e){for(var t=n(e),a=0,o=t.length;a<o;a++)if(t[a]===p){r(t,a,1);break}return t},e({target:`Object`,stat:!0,forced:!0},{getOwnPropertyNames:c.f}))},fastKey:function(e,t){if(!r(e))return typeof e==`symbol`?e:(typeof e==`string`?`S`:`P`)+e;if(!a(e,p)){if(!l(e))return`F`;if(!t)return`E`;h(e)}return e[p].objectID},getWeakData:function(e,t){if(!a(e,p)){if(!l(e))return!0;if(!t)return!1;h(e)}return e[p].weakData},onFreeze:function(e){return d&&f&&l(e)&&!a(e,p)&&h(e),e}};return n[p]=!0,Eg.exports}var Rg,zg;function Bg(){if(zg)return Rg;zg=1;var e=Vn(),t=Qe(),n=Jn(),r=Ht(),a=Nd(),o=Er(),s=P(),c=Id(),l=pu(),u=Dd(),d=TypeError,f=function(e,t){this.stopped=e,this.result=t},p=f.prototype;return Rg=function(m,h,g){var _=g&&g.that,v=!!(g&&g.AS_ENTRIES),y=!!(g&&g.IS_RECORD),b=!!(g&&g.IS_ITERATOR),x=!!(g&&g.INTERRUPTED),S=e(h,_),C,w,T,ee,E,te,ne,re=function(e){var t=C;return C=void 0,t&&u(t,`normal`),new f(!0,e)},ie=function(e){return v?(n(e),x?S(e[0],e[1],re):S(e[0],e[1])):x?S(e,re):S(e)};if(y)C=m.iterator;else if(b)C=m;else{if(w=l(m),!w)throw new d(r(m)+` is not iterable`);if(a(w)){for(T=0,ee=o(m);ee>T;T++)if(E=ie(m[T]),E&&s(p,E))return E;return new f(!1)}C=c(m,w)}for(te=y?m.next:C.next;!(ne=t(te,C)).done;){var ae=ne.value;try{E=ie(ae)}catch(e){if(C)u(C,`throw`,e);else throw e}if(typeof E==`object`&&E&&s(p,E))return E}return new f(!1)},Rg}var Vg,Hg;function Ug(){if(Hg)return Vg;Hg=1;var e=P(),t=TypeError;return Vg=function(n,r){if(e(r,n))return n;throw new t(`Incorrect invocation`)},Vg}var Wg,Gg;function Kg(){if(Gg)return Wg;Gg=1;var e=I(),t=De(),n=Lg(),r=Qe(),a=O(),o=$n(),s=Bg(),c=Ug(),l=Ke(),u=_t(),d=ct(),f=ji(),p=Xn().f,m=ia().forEach,h=Xe(),g=Li(),_=g.set,v=g.getterFor;return Wg=function(g,y,b){var x=g.indexOf(`Map`)!==-1,S=g.indexOf(`Weak`)!==-1,C=x?`set`:`add`,w=t[g],T=w&&w.prototype,ee={},E;if(!h||!l(w)||!(S||T.forEach&&!a(function(){new w().entries().next()})))E=b.getConstructor(y,g,x,C),n.enable();else{E=y(function(e,t){_(c(e,te),{type:g,collection:new w}),d(t)||s(t,e[C],{that:e,AS_ENTRIES:x})});var te=E.prototype,ne=v(g);m([`add`,`clear`,`delete`,`forEach`,`get`,`has`,`set`,`keys`,`values`,`entries`],function(e){var t=e===`add`||e===`set`;e in T&&!(S&&e===`clear`)&&o(te,e,function(n,a){var o=this,s=ne(o).collection;if(!t&&S&&!u(n))return e===`get`&&void 0;var c=s[e](e===`forEach`?function(e,t){r(n,a,e,t,o)}:n===0?0:n,a);return t?o:c})}),S||p(te,`size`,{configurable:!0,get:function(){return ne(this).collection.size}})}return f(E,g,!1,!0),ee[g]=E,e({global:!0,forced:!0},ee),S||b.setStrong(E,g,x),E},Wg}var qg,Jg;function Yg(){if(Jg)return qg;Jg=1;var e=pi();return qg=function(t,n,r){for(var a in n)r&&r.unsafe&&t[a]?t[a]=n[a]:e(t,a,n[a],r);return t},qg}var Xg,Zg;function Qg(){if(Zg)return Xg;Zg=1;var e=St(),t=gi(),n=Sn(),r=Xe(),a=n(`species`);return Xg=function(n){var o=e(n);r&&o&&!o[a]&&t(o,a,{configurable:!0,get:function(){return this}})},Xg}var $g,e_;function t_(){if(e_)return $g;e_=1;var e=Qr(),t=gi(),n=Yg(),r=Vn(),a=Ug(),o=ct(),s=Bg(),c=Bc(),l=Uc(),u=Qg(),d=Xe(),f=Lg().fastKey,p=Li(),m=p.set,h=p.getterFor;return $g={getConstructor:function(c,l,u,p){var g=c(function(t,n){a(t,_),m(t,{type:l,index:e(null),first:null,last:null,size:0}),d||(t.size=0),o(n)||s(n,t[p],{that:t,AS_ENTRIES:u})}),_=g.prototype,v=h(l),y=function(e,t,n){var r=v(e),a=b(e,t),o,s;return a?a.value=n:(r.last=a={index:s=f(t,!0),key:t,value:n,previous:o=r.last,next:null,removed:!1},r.first||=a,o&&(o.next=a),d?r.size++:e.size++,s!==`F`&&(r.index[s]=a)),e},b=function(e,t){var n=v(e),r=f(t),a;if(r!==`F`)return n.index[r];for(a=n.first;a;a=a.next)if(a.key===t)return a};return n(_,{clear:function(){for(var t=this,n=v(t),r=n.first;r;)r.removed=!0,r.previous&&(r.previous=r.previous.next=null),r=r.next;n.first=n.last=null,n.index=e(null),d?n.size=0:t.size=0},delete:function(e){var t=this,n=v(t),r=b(t,e);if(r){var a=r.next,o=r.previous;delete n.index[r.index],r.removed=!0,o&&(o.next=a),a&&(a.previous=o),n.first===r&&(n.first=a),n.last===r&&(n.last=o),d?n.size--:t.size--}return!!r},forEach:function(e){for(var t=v(this),n=r(e,arguments.length>1?arguments[1]:void 0),a;a=a?a.next:t.first;)for(n(a.value,a.key,this);a&&a.removed;)a=a.previous},has:function(e){return!!b(this,e)}}),n(_,u?{get:function(e){var t=b(this,e);return t&&t.value},set:function(e,t){return y(this,e===0?0:e,t)}}:{add:function(e){return y(this,e=e===0?0:e,e)}}),d&&t(_,`size`,{configurable:!0,get:function(){return v(this).size}}),g},setStrong:function(e,t,n){var r=t+` Iterator`,a=h(t),o=h(r);c(e,t,function(e,t){m(this,{type:r,target:e,state:a(e),kind:t,last:null})},function(){for(var e=o(this),t=e.kind,n=e.last;n&&n.removed;)n=n.previous;return!e.target||!(e.last=n=n?n.next:e.state.first)?(e.target=null,l(void 0,!0)):l(t===`keys`?n.key:t===`values`?n.value:[n.key,n.value],!1)},n?`entries`:`values`,!n,!0),u(t)}},$g}var n_;function r_(){return n_||(n_=1,Kg()(`Map`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},t_())),Tg}var i_;function a_(){return i_||(i_=1,r_()),wg}var o_={},s_,c_;function l_(){return c_||(c_=1,s_=function(e,t){return t===1?function(t,n){return t[e](n)}:function(t,n,r){return t[e](n,r)}}),s_}var u_,d_;function f_(){if(d_)return u_;d_=1;var e=St(),t=l_(),n=e(`Map`);return u_={Map:n,set:t(`set`,2),get:t(`get`,1),has:t(`has`,1),remove:t(`delete`,1),proto:n.prototype},u_}var p_;function m_(){if(p_)return o_;p_=1;var e=I(),t=k(),n=Gt(),r=dt(),a=Bg(),o=f_(),s=tn(),c=O(),l=o.Map,u=o.has,d=o.get,f=o.set,p=t([].push),m=s||c(function(){return l.groupBy(`ab`,function(e){return e}).get(`a`).length!==1});return e({target:`Map`,stat:!0,forced:s||m},{groupBy:function(e,t){r(e),n(t);var o=new l,s=0;return a(e,function(e){var n=t(e,s++);u(o,n)?p(d(o,n),e):f(o,n,[e])}),o}}),o_}var h_={},g_;function __(){if(g_)return h_;g_=1;var e=I(),t=f_(),n=tn(),r=t.get,a=t.has,o=t.set;return e({target:`Map`,proto:!0,real:!0,forced:n},{getOrInsert:function(e,t){return a(this,e)?r(this,e):(o(this,e,t),t)}}),h_}var v_={},y_;function b_(){if(y_)return v_;y_=1;var e=I(),t=Gt(),n=f_(),r=tn(),a=n.get,o=n.has,s=n.set;return e({target:`Map`,proto:!0,real:!0,forced:r},{getOrInsertComputed:function(e,n){var r=o(this,e);if(t(n),r)return a(this,e);e===0&&1/e==-1/0&&(e=0);var c=n(e);return s(this,e,c),c}}),v_}var x_,S_;function C_(){return S_||(S_=1,Kc(),a_(),m_(),__(),b_(),uu(),x_=N().Map),x_}var w_,T_;function E_(){if(T_)return w_;T_=1;var e=C_();return Zc(),w_=e,w_}var D_,O_;function k_(){return O_||(O_=1,D_=E_()),D_}var A_=r(k_()),j_={},M_={},N_;function P_(){return N_||(N_=1,Kg()(`Set`,function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}},t_())),M_}var F_;function I_(){return F_||(F_=1,P_()),j_}var L_={},R_,z_;function B_(){if(z_)return R_;z_=1;var e=Ht(),t=TypeError;return R_=function(n){if(typeof n==`object`&&`size`in n&&`has`in n&&`add`in n&&`delete`in n&&`keys`in n)return n;throw new t(e(n)+` is not a set`)},R_}var V_,H_;function U_(){if(H_)return V_;H_=1;var e=St(),t=l_(),n=e(`Set`),r=n.prototype;return V_={Set:n,add:t(`add`,1),has:t(`has`,1),remove:t(`delete`,1),proto:r},V_}var W_,G_;function K_(){if(G_)return W_;G_=1;var e=Qe();return W_=function(t,n,r){for(var a=r?t:t.iterator,o=t.next,s,c;!(s=e(o,a)).done;)if(c=n(s.value),c!==void 0)return c},W_}var q_,J_;function Y_(){if(J_)return q_;J_=1;var e=K_();return q_=function(t,n,r){return r?e(t.keys(),n,!0):t.forEach(n)},q_}var X_,Z_;function Q_(){if(Z_)return X_;Z_=1;var e=U_(),t=Y_(),n=e.Set,r=e.add;return X_=function(e){var a=new n;return t(e,function(e){r(a,e)}),a},X_}var $_,ev;function tv(){return ev||(ev=1,$_=function(e){return e.size}),$_}var nv,rv;function iv(){return rv||(rv=1,nv=function(e){return{iterator:e,next:e.next,done:!1}}),nv}var av,ov;function sv(){if(ov)return av;ov=1;var e=Gt(),t=Jn(),n=Qe(),r=_r(),a=iv(),o=`Invalid size`,s=RangeError,c=TypeError,l=Math.max,u=function(t,n){this.set=t,this.size=l(n,0),this.has=e(t.has),this.keys=e(t.keys)};return u.prototype={getIterator:function(){return a(t(n(this.keys,this.set)))},includes:function(e){return n(this.has,this.set,e)}},av=function(e){t(e);var n=+e.size;if(n!==n)throw new c(o);var a=r(n);if(a<0)throw new s(o);return new u(e,a)},av}var cv,lv;function uv(){if(lv)return cv;lv=1;var e=B_(),t=U_(),n=Q_(),r=tv(),a=sv(),o=Y_(),s=K_(),c=t.has,l=t.remove;return cv=function(t){var u=e(this),d=a(t),f=n(u);return r(f)<=d.size?o(f,function(e){d.includes(e)&&l(f,e)}):s(d.getIterator(),function(e){c(f,e)&&l(f,e)}),f},cv}var dv,fv;function pv(){return fv||(fv=1,dv=function(){return!1}),dv}var mv;function hv(){if(mv)return L_;mv=1;var e=I(),t=uv(),n=O();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`difference`,function(e){return e.size===0})||n(function(){var e={size:1,has:function(){return!0},keys:function(){var e=0;return{next:function(){var n=e++>1;return t.has(1)&&t.clear(),{done:n,value:2}}}}},t=new Set([1,2,3,4]);return t.difference(e).size!==3})},{difference:t}),L_}var gv={},_v,vv;function yv(){if(vv)return _v;vv=1;var e=B_(),t=U_(),n=tv(),r=sv(),a=Y_(),o=K_(),s=t.Set,c=t.add,l=t.has;return _v=function(t){var u=e(this),d=r(t),f=new s;return n(u)>d.size?o(d.getIterator(),function(e){l(u,e)&&c(f,e)}):a(u,function(e){d.includes(e)&&c(f,e)}),f},_v}var bv;function xv(){if(bv)return gv;bv=1;var e=I(),t=O(),n=yv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`intersection`,function(e){return e.size===2&&e.has(1)&&e.has(2)})||t(function(){return String(Array.from(new Set([1,2,3]).intersection(new Set([3,2]))))!==`3,2`})},{intersection:n}),gv}var Sv={},Cv,wv;function Tv(){if(wv)return Cv;wv=1;var e=B_(),t=U_().has,n=tv(),r=sv(),a=Y_(),o=K_(),s=Dd();return Cv=function(c){var l=e(this),u=r(c);if(n(l)<=u.size)return a(l,function(e){if(u.includes(e))return!1},!0)!==!1;var d=u.getIterator();return o(d,function(e){if(t(l,e))return s(d.iterator,`normal`,!1)})!==!1},Cv}var Ev;function Dv(){if(Ev)return Sv;Ev=1;var e=I(),t=Tv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`isDisjointFrom`,function(e){return!e})},{isDisjointFrom:t}),Sv}var Ov={},kv,Av;function jv(){if(Av)return kv;Av=1;var e=B_(),t=tv(),n=Y_(),r=sv();return kv=function(a){var o=e(this),s=r(a);return t(o)>s.size?!1:n(o,function(e){if(!s.includes(e))return!1},!0)!==!1},kv}var Mv;function Nv(){if(Mv)return Ov;Mv=1;var e=I(),t=jv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`isSubsetOf`,function(e){return e})},{isSubsetOf:t}),Ov}var Pv={},Fv,Iv;function Lv(){if(Iv)return Fv;Iv=1;var e=B_(),t=U_().has,n=tv(),r=sv(),a=K_(),o=Dd();return Fv=function(s){var c=e(this),l=r(s);if(n(c)<l.size)return!1;var u=l.getIterator();return a(u,function(e){if(!t(c,e))return o(u.iterator,`normal`,!1)})!==!1},Fv}var Rv;function zv(){if(Rv)return Pv;Rv=1;var e=I(),t=Lv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`isSupersetOf`,function(e){return!e})},{isSupersetOf:t}),Pv}var Bv={},Vv,Hv;function Uv(){if(Hv)return Vv;Hv=1;var e=B_(),t=U_(),n=Q_(),r=sv(),a=K_(),o=t.add,s=t.has,c=t.remove;return Vv=function(t){var l=e(this),u=r(t).getIterator(),d=n(l);return a(u,function(e){s(l,e)?c(d,e):o(d,e)}),d},Vv}var Wv,Gv;function Kv(){return Gv||(Gv=1,Wv=function(e){try{var t=new Set,n=t[e]({size:0,has:function(){return!0},keys:function(){return Object.defineProperty({},"next",{get:function(){return t.clear(),t.add(4),function(){return{done:!0}}}})}});return n.size===1&&n.values().next().value===4}catch{return!1}}),Wv}var qv;function Jv(){if(qv)return Bv;qv=1;var e=I(),t=Uv(),n=Kv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`symmetricDifference`)||!n(`symmetricDifference`)},{symmetricDifference:t}),Bv}var Yv={},Xv,Zv;function Qv(){if(Zv)return Xv;Zv=1;var e=B_(),t=U_().add,n=Q_(),r=sv(),a=K_();return Xv=function(o){var s=e(this),c=r(o).getIterator(),l=n(s);return a(c,function(e){t(l,e)}),l},Xv}var $v;function ey(){if($v)return Yv;$v=1;var e=I(),t=Qv(),n=Kv();return e({target:`Set`,proto:!0,real:!0,forced:!pv()(`union`)||!n(`union`)},{union:t}),Yv}var ty,ny;function ry(){return ny||(ny=1,Kc(),I_(),hv(),xv(),Dv(),Nv(),zv(),Jv(),ey(),uu(),ty=N().Set),ty}var iy,ay;function oy(){if(ay)return iy;ay=1;var e=ry();return Zc(),iy=e,iy}var sy,cy;function ly(){return cy||(cy=1,sy=oy()),sy}var uy=r(ly()),dy,fy;function py(){return fy||(fy=1,Kc(),uu(),dy=Id()),dy}var my,hy;function gy(){if(hy)return my;hy=1;var e=py();return Zc(),my=e,my}var _y,vy;function yy(){return vy||(vy=1,_y=gy()),_y}var by,xy;function Sy(){return xy||(xy=1,by=yy()),by}var Cy,wy;function Ty(){return wy||(wy=1,Cy=Sy()),Cy}var Ey,Dy;function Oy(){return Dy||(Dy=1,Ey=Ty()),Ey}var ky=r(Oy()),Ay={},jy,My;function Ny(){if(My)return jy;My=1;var e=ai(),t=Math.floor,n=function(r,a){var o=r.length;if(o<8)for(var s=1,c,l;s<o;){for(l=s,c=r[s];l&&a(r[l-1],c)>0;)r[l]=r[--l];l!==s++&&(r[l]=c)}else for(var u=t(o/2),d=n(e(r,0,u),a),f=n(e(r,u),a),p=d.length,m=f.length,h=0,g=0;h<p||g<m;)r[h+g]=h<p&&g<m?a(d[h],f[g])<=0?d[h++]:f[g++]:h<p?d[h++]:f[g++];return r};return jy=n,jy}var Py,Fy;function Iy(){if(Fy)return Py;Fy=1;var e=Dt().match(/firefox\/(\d+)/i);return Py=!!e&&+e[1],Py}var Ly,Ry;function zy(){if(Ry)return Ly;Ry=1;var e=Dt();return Ly=/MSIE|Trident/.test(e),Ly}var By,Vy;function Hy(){if(Vy)return By;Vy=1;var e=Dt().match(/AppleWebKit\/(\d+)\./);return By=!!e&&+e[1],By}var Uy;function Wy(){if(Uy)return Ay;Uy=1;var e=I(),t=k(),n=Gt(),r=pn(),a=Er(),o=Gh(),s=ur(),c=O(),l=Ny(),u=Ip(),d=Iy(),f=zy(),p=At(),m=Hy(),h=[],g=t(h.sort),_=t(h.push),v=c(function(){h.sort(void 0)}),y=c(function(){h.sort(null)}),b=u(`sort`),x=!c(function(){if(p)return p<70;if(!(d&&d>3)){if(f)return!0;if(m)return m<603;for(var e=``,t=65,n,r,a;t<76;t++){switch(n=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(a=0;a<47;a++)h.push({k:n+a,v:r})}for(h.sort(function(e,t){return t.v-e.v}),a=0;a<h.length;a++)n=h[a].k.charAt(0),e.charAt(e.length-1)!==n&&(e+=n);return e!==`DGBEFHACIJK`}}),S=v||!y||!b||!x,C=function(e){return function(t,n){if(n===void 0)return-1;if(t===void 0)return 1;if(e!==void 0)return+e(t,n)||0;var r=s(t),a=s(n);return r===a?0:r>a?1:-1}};return e({target:`Array`,proto:!0,forced:S},{sort:function(e){e!==void 0&&n(e);var t=r(this);if(x)return e===void 0?g(t):g(t,e);for(var s=[],c=a(t),u,d=0;d<c;d++)d in t&&_(s,t[d]);for(l(s,C(e)),u=a(s),d=0;d<u;)t[d]=s[d++];for(;d<c;)o(t,d++);return t}}),Ay}var Gy,Ky;function qy(){return Ky||(Ky=1,Wy(),Gy=Fu()(`Array`,`sort`)),Gy}var Jy,Yy;function Xy(){if(Yy)return Jy;Yy=1;var e=P(),t=qy(),n=Array.prototype;return Jy=function(r){var a=r.sort;return r===n||e(n,r)&&a===n.sort?t:a},Jy}var Zy,Qy;function $y(){return Qy||(Qy=1,Zy=Xy()),Zy}var eb,tb;function nb(){return tb||(tb=1,eb=$y()),eb}var rb=r(nb()),ib,ab;function ob(){return ab||(ab=1,ib=Lo()),ib}var G=r(ob()),sb={},cb;function lb(){if(cb)return sb;cb=1;var e=I(),t=ia().some;return e({target:`Array`,proto:!0,forced:!Ip()(`some`)},{some:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),sb}var ub,db;function fb(){return db||(db=1,lb(),ub=Fu()(`Array`,`some`)),ub}var pb,mb;function hb(){if(mb)return pb;mb=1;var e=P(),t=fb(),n=Array.prototype;return pb=function(r){var a=r.some;return r===n||e(n,r)&&a===n.some?t:a},pb}var gb,_b;function vb(){return _b||(_b=1,gb=hb()),gb}var yb,bb;function xb(){return bb||(bb=1,yb=vb()),yb}var Sb=r(xb()),Cb={},wb,Tb;function Eb(){if(Tb)return wb;Tb=1;var e=Xe(),t=k(),n=Qe(),r=O(),a=Vr(),o=ui(),s=tt(),c=pn(),l=at(),u=Object.assign,d=Object.defineProperty,f=t([].concat);return wb=!u||r(function(){if(e&&u({b:1},u(d({},`a`,{enumerable:!0,get:function(){d(this,`b`,{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},n={},r=Symbol(`assign detection`),o=`abcdefghijklmnopqrst`;return t[r]=7,o.split(``).forEach(function(e){n[e]=e}),u({},t)[r]!==7||a(u({},n)).join(``)!==o})?function(t,r){for(var u=c(t),d=arguments.length,p=1,m=o.f,h=s.f;d>p;)for(var g=l(arguments[p++]),_=m?f(a(g),m(g)):a(g),v=_.length,y=0,b;v>y;)b=_[y++],(!e||n(h,g,b))&&(u[b]=g[b]);return u}:u,wb}var Db;function Ob(){if(Db)return Cb;Db=1;var e=I(),t=Eb();return e({target:`Object`,stat:!0,arity:2,forced:Object.assign!==t},{assign:t}),Cb}var kb,Ab;function jb(){return Ab||(Ab=1,Ob(),kb=N().Object.assign),kb}var Mb,Nb;function Pb(){return Nb||(Nb=1,Mb=jb()),Mb}var Fb,Ib;function Lb(){return Ib||(Ib=1,Fb=Pb()),Fb}var Rb=r(Lb()),zb,Bb;function Vb(){return Bb||(Bb=1,os(),zb=Fu()(`Array`,`concat`)),zb}var Hb,Ub;function Wb(){if(Ub)return Hb;Ub=1;var e=P(),t=Vb(),n=Array.prototype;return Hb=function(r){var a=r.concat;return r===n||e(n,r)&&a===n.concat?t:a},Hb}var Gb,Kb;function qb(){return Kb||(Kb=1,Gb=Wb()),Gb}var Jb,Yb;function Xb(){return Yb||(Yb=1,Jb=qb()),Jb}var Zb=r(Xb()),Qb,$b;function ex(){return $b||($b=1,Kc(),Qb=Fu()(`Array`,`keys`)),Qb}var tx,nx;function rx(){return nx||(nx=1,tx=ex()),tx}var ix,ax;function ox(){if(ax)return ix;ax=1,Zc();var e=sr(),t=gn(),n=P(),r=rx(),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return ix=function(s){var c=s.keys;return s===a||n(a,s)&&c===a.keys||t(o,e(s))?r:c},ix}var sx,cx;function lx(){return cx||(cx=1,sx=ox()),sx}var ux=r(lx()),dx={},fx;function px(){if(fx)return dx;fx=1;var e=I(),t=pn(),n=Vr();return e({target:`Object`,stat:!0,forced:O()(function(){n(1)})},{keys:function(e){return n(t(e))}}),dx}var mx,hx;function gx(){return hx||(hx=1,px(),mx=N().Object.keys),mx}var _x,vx;function yx(){return vx||(vx=1,_x=gx()),_x}var bx,xx;function Sx(){return xx||(xx=1,bx=yx()),bx}var Cx=r(Sx()),wx,Tx;function Ex(){return Tx||(Tx=1,Kc(),wx=Fu()(`Array`,`values`)),wx}var Dx,Ox;function kx(){return Ox||(Ox=1,Dx=Ex()),Dx}var Ax,jx;function Mx(){if(jx)return Ax;jx=1,Zc();var e=sr(),t=gn(),n=P(),r=kx(),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return Ax=function(s){var c=s.values;return s===a||n(a,s)&&c===a.values||t(o,e(s))?r:c},Ax}var Nx,Px;function Fx(){return Px||(Px=1,Nx=Mx()),Nx}var Ix=r(Fx()),Lx={},Rx,zx;function Bx(){if(zx)return Rx;zx=1;var e=_r(),t=ur(),n=dt(),r=RangeError,a=Math.floor;return Rx=function(o){var s=t(n(this)),c=``,l=e(o);if(l<0||l===1/0)throw new r(`Wrong number of repetitions`);for(;l>0;(l=a(l/2))&&(s+=s))l%2&&(c+=s);return c},Rx}var Vx,Hx;function Ux(){if(Hx)return Vx;Hx=1;var e=k(),t=Cr(),n=ur(),r=Bx(),a=dt(),o=e(r),s=e(``.slice),c=Math.ceil,l=function(e){return function(r,l,u){var d=n(a(r)),f=t(l),p=d.length;if(f<=p)return d;var m=u===void 0?` `:n(u),h,g;return m===``?d:(h=f-p,g=o(m,c(h/m.length)),g.length>h&&(g=s(g,0,h)),e?d+g:g+d)}};return Vx={start:l(!1),end:l(!0)},Vx}var Wx,Gx;function Kx(){if(Gx)return Wx;Gx=1;var e=k(),t=O(),n=Ux().start,r=RangeError,a=isFinite,o=Math.abs,s=Date.prototype,c=s.toISOString,l=e(s.getTime),u=e(s.getUTCDate),d=e(s.getUTCFullYear),f=e(s.getUTCHours),p=e(s.getUTCMilliseconds),m=e(s.getUTCMinutes),h=e(s.getUTCMonth),g=e(s.getUTCSeconds);return Wx=t(function(){return c.call(new Date(-5e13-1))!==`0385-07-25T07:06:39.999Z`})||!t(function(){c.call(new Date(NaN))})?function(){if(!a(l(this)))throw new r(`Invalid time value`);var e=this,t=d(e),s=p(e),c=t<0?`-`:t>9999?`+`:``;return c+n(o(t),c?6:4,0)+`-`+n(h(e)+1,2,0)+`-`+n(u(e),2,0)+`T`+n(f(e),2,0)+`:`+n(m(e),2,0)+`:`+n(g(e),2,0)+`.`+n(s,3,0)+`Z`}:c,Wx}var qx;function Jx(){if(qx)return Lx;qx=1;var e=I(),t=Qe(),n=pn(),r=Tn(),a=Kx(),o=Be();return e({target:`Date`,proto:!0,forced:O()(function(){return new Date(NaN).toJSON()!==null||t(Date.prototype.toJSON,{toISOString:function(){return 1}})!==1})},{toJSON:function(e){var s=n(this),c=r(s,`number`);return typeof c==`number`&&!isFinite(c)?null:!(`toISOString`in s)&&o(s)===`Date`?t(a,s):s.toISOString()}}),Lx}var Yx,Xx;function Zx(){if(Xx)return Yx;Xx=1,Jx(),L();var e=N(),t=Fe();return e.JSON||={stringify:JSON.stringify},Yx=function(n,r,a){return t(e.JSON.stringify,null,arguments)},Yx}var Qx,$x;function eS(){return $x||($x=1,Qx=Zx()),Qx}var tS,nS;function rS(){return nS||(nS=1,tS=eS()),tS}var iS=r(rS()),aS,oS;function sS(){return oS||(oS=1,Kc(),aS=Fu()(`Array`,`entries`)),aS}var cS,lS;function uS(){return lS||(lS=1,cS=sS()),cS}var dS,fS;function pS(){if(fS)return dS;fS=1,Zc();var e=sr(),t=gn(),n=P(),r=uS(),a=Array.prototype,o={DOMTokenList:!0,NodeList:!0};return dS=function(s){var c=s.entries;return s===a||n(a,s)&&c===a.entries||t(o,e(s))?r:c},dS}var mS,hS;function gS(){return hS||(hS=1,mS=pS()),mS}var _S=r(gS()),vS={},yS;function bS(){return yS||(yS=1,I()({target:`Reflect`,stat:!0},{ownKeys:ro()})),vS}var xS,SS;function CS(){return SS||(SS=1,bS(),xS=N().Reflect.ownKeys),xS}var wS,TS;function ES(){return TS||(TS=1,wS=CS()),wS}var DS,OS;function kS(){return OS||(OS=1,DS=ES()),DS}var AS=r(kS()),jS,MS;function NS(){return MS||(MS=1,jS=bf()),jS}var PS=r(NS()),FS,IS;function LS(){return IS||(IS=1,FS=el()),FS}var RS=r(LS()),zS,BS;function VS(){return BS||(BS=1,zS=pd()),zS}var HS=r(VS()),US={},WS;function GS(){if(WS)return US;WS=1;var e=I(),t=k(),n=Date,r=t(n.prototype.getTime);return e({target:`Date`,stat:!0},{now:function(){return r(new n)}}),US}var KS,qS;function JS(){return qS||(qS=1,GS(),KS=N().Date.now),KS}var YS,XS;function ZS(){return XS||(XS=1,YS=JS()),YS}var QS,$S;function eC(){return $S||($S=1,QS=ZS()),QS}var tC=r(eC()),nC={},rC;function iC(){if(rC)return nC;rC=1;var e=I(),t=k(),n=Bi(),r=t([].reverse),a=[1,2];return e({target:`Array`,proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return n(this)&&(this.length=this.length),r(this)}}),nC}var aC,oC;function sC(){return oC||(oC=1,iC(),aC=Fu()(`Array`,`reverse`)),aC}var cC,lC;function uC(){if(lC)return cC;lC=1;var e=P(),t=sC(),n=Array.prototype;return cC=function(r){var a=r.reverse;return r===n||e(n,r)&&a===n.reverse?t:a},cC}var dC,fC;function pC(){return fC||(fC=1,dC=uC()),dC}var mC,hC;function gC(){return hC||(hC=1,mC=pC()),mC}var _C=r(gC()),vC={},yC;function bC(){if(yC)return vC;yC=1;var e=I(),t=kr().includes,n=O(),r=sc(),a=n(function(){return![,].includes()}),o=n(function(){return[,1].includes(void 0,1)});return e({target:`Array`,proto:!0,forced:a||o},{includes:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),r(`includes`),vC}var xC,SC;function CC(){return SC||(SC=1,bC(),xC=Fu()(`Array`,`includes`)),xC}var wC={},TC,EC;function DC(){if(EC)return TC;EC=1;var e=_t(),t=Be(),n=Sn()(`match`);return TC=function(r){var a;return e(r)&&((a=r[n])===void 0?t(r)===`RegExp`:!!a)},TC}var OC,kC;function AC(){if(kC)return OC;kC=1;var e=DC(),t=TypeError;return OC=function(n){if(e(n))throw new t(`The method doesn't accept regular expressions`);return n},OC}var jC,MC;function NC(){if(MC)return jC;MC=1;var e=Sn()(`match`);return jC=function(t){var n=/./;try{`/./`[t](n)}catch{try{return n[e]=!1,`/./`[t](n)}catch{}}return!1},jC}var PC;function FC(){if(PC)return wC;PC=1;var e=I(),t=k(),n=AC(),r=dt(),a=ur(),o=NC(),s=t(``.indexOf);return e({target:`String`,proto:!0,forced:!o(`includes`)},{includes:function(e){return!!~s(a(r(this)),a(n(e)),arguments.length>1?arguments[1]:void 0)}}),wC}var IC,LC;function RC(){return LC||(LC=1,FC(),IC=Fu()(`String`,`includes`)),IC}var zC,BC;function VC(){if(BC)return zC;BC=1;var e=P(),t=CC(),n=RC(),r=Array.prototype,a=String.prototype;return zC=function(o){var s=o.includes;return o===r||e(r,o)&&s===r.includes?t:typeof o==`string`||o===a||e(a,o)&&s===a.includes?n:s},zC}var HC,UC;function WC(){return UC||(UC=1,HC=VC()),HC}var GC,KC;function qC(){return KC||(KC=1,GC=WC()),GC}var JC=r(qC()),YC={},XC;function ZC(){if(XC)return YC;XC=1;var e=I(),t=O(),n=pn(),r=yc(),a=gc();return e({target:`Object`,stat:!0,forced:t(function(){r(1)}),sham:!a},{getPrototypeOf:function(e){return r(n(e))}}),YC}var QC,$C;function ew(){return $C||($C=1,ZC(),QC=N().Object.getPrototypeOf),QC}var tw,nw;function rw(){return nw||(nw=1,tw=ew()),tw}var iw,aw;function ow(){return aw||(aw=1,iw=rw()),iw}var sw=r(ow()),cw={},lw,uw;function dw(){if(uw)return lw;uw=1;var e=Xe(),t=O(),n=k(),r=yc(),a=Vr(),o=mt(),s=tt().f,c=n(s),l=n([].push),u=e&&t(function(){var e=Object.create(null);return e[2]=2,!c(e,2)}),d=function(t){return function(n){for(var s=o(n),d=a(s),f=u&&r(s)===null,p=d.length,m=0,h=[],g;p>m;)g=d[m++],(!e||(f?g in s:c(s,g)))&&l(h,t?[g,s[g]]:s[g]);return h}};return lw={entries:d(!0),values:d(!1)},lw}var fw;function pw(){if(fw)return cw;fw=1;var e=I(),t=dw().values;return e({target:`Object`,stat:!0},{values:function(e){return t(e)}}),cw}var mw,hw;function gw(){return hw||(hw=1,pw(),mw=N().Object.values),mw}var _w,vw;function yw(){return vw||(vw=1,_w=gw()),_w}var bw,xw;function Sw(){return xw||(xw=1,bw=yw()),bw}var Cw=r(Sw()),ww={},Tw,Ew;function Dw(){return Ew||(Ew=1,Tw=`
7
+ \v\f\r \xA0               \u2028\u2029`),Tw}var Ow,kw;function Aw(){if(kw)return Ow;kw=1;var e=k(),t=dt(),n=ur(),r=Dw(),a=e(``.replace),o=RegExp(`^[`+r+`]+`),s=RegExp(`(^|[^`+r+`])[`+r+`]+$`),c=function(e){return function(r){var c=n(t(r));return e&1&&(c=a(c,o,``)),e&2&&(c=a(c,s,`$1`)),c}};return Ow={start:c(1),end:c(2),trim:c(3)},Ow}var jw,Mw;function Nw(){if(Mw)return jw;Mw=1;var e=De(),t=O(),n=k(),r=ur(),a=Aw().trim,o=Dw(),s=e.parseInt,c=e.Symbol,l=c&&c.iterator,u=/^[+-]?0x/i,d=n(u.exec);return jw=s(o+`08`)!==8||s(o+`0x16`)!==22||l&&!t(function(){s(Object(l))})?function(e,t){var n=a(r(e));return s(n,t>>>0||(d(u,n)?16:10))}:s,jw}var Pw;function Fw(){if(Pw)return ww;Pw=1;var e=I(),t=Nw();return e({global:!0,forced:parseInt!==t},{parseInt:t}),ww}var Iw,Lw;function Rw(){return Lw||(Lw=1,Fw(),Iw=N().parseInt),Iw}var zw,Bw;function Vw(){return Bw||(Bw=1,zw=Rw()),zw}var Hw,Uw;function Ww(){return Uw||(Uw=1,Hw=Vw()),Hw}var Gw=r(Ww()),Kw={},qw;function Jw(){if(qw)return Kw;qw=1;var e=I(),t=Ue(),n=kr().indexOf,r=Ip(),a=t([].indexOf),o=!!a&&1/a([1],1,-0)<0;return e({target:`Array`,proto:!0,forced:o||!r(`indexOf`)},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return o?a(this,e,t)||0:n(this,e,t)}}),Kw}var Yw,Xw;function Zw(){return Xw||(Xw=1,Jw(),Yw=Fu()(`Array`,`indexOf`)),Yw}var Qw,$w;function eT(){if($w)return Qw;$w=1;var e=P(),t=Zw(),n=Array.prototype;return Qw=function(r){var a=r.indexOf;return r===n||e(n,r)&&a===n.indexOf?t:a},Qw}var tT,nT;function rT(){return nT||(nT=1,tT=eT()),tT}var iT,aT;function oT(){return aT||(aT=1,iT=rT()),iT}var K=r(oT()),sT={},cT;function lT(){if(cT)return sT;cT=1;var e=I(),t=dw().entries;return e({target:`Object`,stat:!0},{entries:function(e){return t(e)}}),sT}var uT,dT;function fT(){return dT||(dT=1,lT(),uT=N().Object.entries),uT}var pT,mT;function hT(){return mT||(mT=1,pT=fT()),pT}var gT,_T;function vT(){return _T||(_T=1,gT=hT()),gT}var yT=r(vT()),bT={},xT,ST;function CT(){if(ST)return xT;ST=1;var e=pn(),t=br(),n=Er();return xT=function(r){for(var a=e(this),o=n(a),s=arguments.length,c=t(s>1?arguments[1]:void 0,o),l=s>2?arguments[2]:void 0,u=l===void 0?o:t(l,o);u>c;)a[c++]=r;return a},xT}var wT;function TT(){if(wT)return bT;wT=1;var e=I(),t=CT(),n=sc();return e({target:`Array`,proto:!0},{fill:t}),n(`fill`),bT}var ET,DT;function OT(){return DT||(DT=1,TT(),ET=Fu()(`Array`,`fill`)),ET}var kT,AT;function jT(){if(AT)return kT;AT=1;var e=P(),t=OT(),n=Array.prototype;return kT=function(r){var a=r.fill;return r===n||e(n,r)&&a===n.fill?t:a},kT}var MT,NT;function PT(){return NT||(NT=1,MT=jT()),MT}var FT,IT;function LT(){return IT||(IT=1,FT=PT()),FT}var RT=r(LT()),zT={exports:{}},BT;function VT(){return BT||(BT=1,(function(e){e.exports=t;function t(e){if(e)return n(e)}function n(e){for(var n in t.prototype)e[n]=t.prototype[n];return e}t.prototype.on=t.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[`$`+e]=this._callbacks[`$`+e]||[]).push(t),this},t.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},t.prototype.off=t.prototype.removeListener=t.prototype.removeAllListeners=t.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks[`$`+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks[`$`+e],this;for(var r,a=0;a<n.length;a++)if(r=n[a],r===t||r.fn===t){n.splice(a,1);break}return n.length===0&&delete this._callbacks[`$`+e],this},t.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=Array(arguments.length-1),n=this._callbacks[`$`+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,a=n.length;r<a;++r)n[r].apply(this,t)}return this},t.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[`$`+e]||[]},t.prototype.hasListeners=function(e){return!!this.listeners(e).length}})(zT)),zT.exports}var HT=r(VT());function UT(){return UT=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},UT.apply(this,arguments)}function WT(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}function GT(e){if(e===void 0)throw ReferenceError(`this hasn't been initialised - super() hasn't been called`);return e}var KT=typeof Object.assign==`function`?Object.assign:function(e){if(e==null)throw TypeError(`Cannot convert undefined or null to object`);for(var t=Object(e),n=1;n<arguments.length;n++){var r=arguments[n];if(r!=null)for(var a in r)r.hasOwnProperty(a)&&(t[a]=r[a])}return t},qT=[``,`webkit`,`Moz`,`MS`,`ms`,`o`],JT=typeof document>`u`?{style:{}}:document.createElement(`div`),YT=`function`,XT=Math.round,ZT=Math.abs,QT=Date.now;function $T(e,t){for(var n,r,a=t[0].toUpperCase()+t.slice(1),o=0;o<qT.length;){if(n=qT[o],r=n?n+a:t,r in e)return r;o++}}var eE=typeof window>`u`?{}:window,tE=$T(JT.style,`touchAction`),nE=tE!==void 0;function rE(){if(!nE)return!1;var e={},t=eE.CSS&&eE.CSS.supports;return[`auto`,`manipulation`,`pan-y`,`pan-x`,`pan-x pan-y`,`none`].forEach(function(n){return e[n]=!t||eE.CSS.supports(`touch-action`,n)}),e}var iE=`compute`,aE=`auto`,oE=`manipulation`,sE=`none`,cE=`pan-x`,lE=`pan-y`,uE=rE(),dE=/mobile|tablet|ip(ad|hone|od)|android/i,fE=`ontouchstart`in eE,pE=$T(eE,`PointerEvent`)!==void 0,mE=fE&&dE.test(navigator.userAgent),hE=`touch`,gE=`pen`,_E=`mouse`,vE=`kinect`,yE=25,bE=1,xE=2,SE=4,CE=8,wE=1,TE=2,EE=4,DE=8,OE=16,kE=TE|EE,AE=DE|OE,jE=kE|AE,ME=[`x`,`y`],NE=[`clientX`,`clientY`];function PE(e,t,n){var r;if(e){if(e.forEach)e.forEach(t,n);else if(e.length!==void 0)for(r=0;r<e.length;)t.call(n,e[r],r,e),r++;else for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e)}}function FE(e,t){return typeof e===YT?e.apply(t&&t[0]||void 0,t):e}function IE(e,t){return e.indexOf(t)>-1}function LE(e){if(IE(e,sE))return sE;var t=IE(e,cE),n=IE(e,lE);return t&&n?sE:t||n?t?cE:lE:IE(e,oE)?oE:aE}var RE=function(){function e(e,t){this.manager=e,this.set(t)}var t=e.prototype;return t.set=function(e){e===iE&&(e=this.compute()),nE&&this.manager.element.style&&uE[e]&&(this.manager.element.style[tE]=e),this.actions=e.toLowerCase().trim()},t.update=function(){this.set(this.manager.options.touchAction)},t.compute=function(){var e=[];return PE(this.manager.recognizers,function(t){FE(t.options.enable,[t])&&(e=e.concat(t.getTouchAction()))}),LE(e.join(` `))},t.preventDefaults=function(e){var t=e.srcEvent,n=e.offsetDirection;if(this.manager.session.prevented)t.preventDefault();else{var r=this.actions,a=IE(r,sE)&&!uE[sE],o=IE(r,lE)&&!uE[lE],s=IE(r,cE)&&!uE[cE];if(a){var c=e.pointers.length===1,l=e.distance<2,u=e.deltaTime<250;if(c&&l&&u)return}if(!(s&&o)&&(a||o&&n&kE||s&&n&AE))return this.preventSrc(t)}},t.preventSrc=function(e){this.manager.session.prevented=!0,e.preventDefault()},e}();function zE(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}function BE(e){var t=e.length;if(t===1)return{x:XT(e[0].clientX),y:XT(e[0].clientY)};for(var n=0,r=0,a=0;a<t;)n+=e[a].clientX,r+=e[a].clientY,a++;return{x:XT(n/t),y:XT(r/t)}}function VE(e){for(var t=[],n=0;n<e.pointers.length;)t[n]={clientX:XT(e.pointers[n].clientX),clientY:XT(e.pointers[n].clientY)},n++;return{timeStamp:QT(),pointers:t,center:BE(t),deltaX:e.deltaX,deltaY:e.deltaY}}function HE(e,t,n){n||=ME;var r=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return Math.sqrt(r*r+a*a)}function UE(e,t,n){n||=ME;var r=t[n[0]]-e[n[0]],a=t[n[1]]-e[n[1]];return Math.atan2(a,r)*180/Math.PI}function WE(e,t){return e===t?wE:ZT(e)>=ZT(t)?e<0?TE:EE:t<0?DE:OE}function GE(e,t){var n=t.center,r=e.offsetDelta||{},a=e.prevDelta||{},o=e.prevInput||{};(t.eventType===bE||o.eventType===SE)&&(a=e.prevDelta={x:o.deltaX||0,y:o.deltaY||0},r=e.offsetDelta={x:n.x,y:n.y}),t.deltaX=a.x+(n.x-r.x),t.deltaY=a.y+(n.y-r.y)}function KE(e,t,n){return{x:t/e||0,y:n/e||0}}function qE(e,t){return HE(t[0],t[1],NE)/HE(e[0],e[1],NE)}function JE(e,t){return UE(t[1],t[0],NE)+UE(e[1],e[0],NE)}function YE(e,t){var n=e.lastInterval||t,r=t.timeStamp-n.timeStamp,a,o,s,c;if(t.eventType!==CE&&(r>yE||n.velocity===void 0)){var l=t.deltaX-n.deltaX,u=t.deltaY-n.deltaY,d=KE(r,l,u);o=d.x,s=d.y,a=ZT(d.x)>ZT(d.y)?d.x:d.y,c=WE(l,u),e.lastInterval=t}else a=n.velocity,o=n.velocityX,s=n.velocityY,c=n.direction;t.velocity=a,t.velocityX=o,t.velocityY=s,t.direction=c}function XE(e,t){var n=e.session,r=t.pointers,a=r.length;n.firstInput||=VE(t),a>1&&!n.firstMultiple?n.firstMultiple=VE(t):a===1&&(n.firstMultiple=!1);var o=n.firstInput,s=n.firstMultiple,c=s?s.center:o.center,l=t.center=BE(r);t.timeStamp=QT(),t.deltaTime=t.timeStamp-o.timeStamp,t.angle=UE(c,l),t.distance=HE(c,l),GE(n,t),t.offsetDirection=WE(t.deltaX,t.deltaY);var u=KE(t.deltaTime,t.deltaX,t.deltaY);t.overallVelocityX=u.x,t.overallVelocityY=u.y,t.overallVelocity=ZT(u.x)>ZT(u.y)?u.x:u.y,t.scale=s?qE(s.pointers,r):1,t.rotation=s?JE(s.pointers,r):0,t.maxPointers=n.prevInput?t.pointers.length>n.prevInput.maxPointers?t.pointers.length:n.prevInput.maxPointers:t.pointers.length,YE(n,t);var d=e.element,f=t.srcEvent,p=f.composedPath?f.composedPath()[0]:f.path?f.path[0]:f.target;zE(p,d)&&(d=p),t.target=d}function ZE(e,t,n){var r=n.pointers.length,a=n.changedPointers.length,o=t&bE&&r-a===0,s=t&(SE|CE)&&r-a===0;n.isFirst=!!o,n.isFinal=!!s,o&&(e.session={}),n.eventType=t,XE(e,n),e.emit(`hammer.input`,n),e.recognize(n),e.session.prevInput=n}function QE(e){return e.trim().split(/\s+/g)}function $E(e,t,n){PE(QE(t),function(t){e.addEventListener(t,n,!1)})}function eD(e,t,n){PE(QE(t),function(t){e.removeEventListener(t,n,!1)})}function tD(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow||window}var nD=function(){function e(e,t){var n=this;this.manager=e,this.callback=t,this.element=e.element,this.target=e.options.inputTarget,this.domHandler=function(t){FE(e.options.enable,[e])&&n.handler(t)},this.init()}var t=e.prototype;return t.handler=function(){},t.init=function(){this.evEl&&$E(this.element,this.evEl,this.domHandler),this.evTarget&&$E(this.target,this.evTarget,this.domHandler),this.evWin&&$E(tD(this.element),this.evWin,this.domHandler)},t.destroy=function(){this.evEl&&eD(this.element,this.evEl,this.domHandler),this.evTarget&&eD(this.target,this.evTarget,this.domHandler),this.evWin&&eD(tD(this.element),this.evWin,this.domHandler)},e}();function rD(e,t,n){if(e.indexOf&&!n)return e.indexOf(t);for(var r=0;r<e.length;){if(n&&e[r][n]==t||!n&&e[r]===t)return r;r++}return-1}var iD={pointerdown:bE,pointermove:xE,pointerup:SE,pointercancel:CE,pointerout:CE},aD={2:hE,3:gE,4:_E,5:vE},oD=`pointerdown`,sD=`pointermove pointerup pointercancel`;eE.MSPointerEvent&&!eE.PointerEvent&&(oD=`MSPointerDown`,sD=`MSPointerMove MSPointerUp MSPointerCancel`);var cD=function(e){WT(t,e);function t(){var n,r=t.prototype;return r.evEl=oD,r.evWin=sD,n=e.apply(this,arguments)||this,n.store=n.manager.session.pointerEvents=[],n}var n=t.prototype;return n.handler=function(e){var t=this.store,n=!1,r=iD[e.type.toLowerCase().replace(`ms`,``)],a=aD[e.pointerType]||e.pointerType,o=a===hE,s=rD(t,e.pointerId,`pointerId`);r&bE&&(e.button===0||o)?s<0&&(t.push(e),s=t.length-1):r&(SE|CE)&&(n=!0),!(s<0)&&(t[s]=e,this.callback(this.manager,r,{pointers:t,changedPointers:[e],pointerType:a,srcEvent:e}),n&&t.splice(s,1))},t}(nD);function lD(e){return Array.prototype.slice.call(e,0)}function uD(e,t,n){for(var r=[],a=[],o=0;o<e.length;){var s=t?e[o][t]:e[o];rD(a,s)<0&&r.push(e[o]),a[o]=s,o++}return n&&(r=t?r.sort(function(e,n){return e[t]>n[t]}):r.sort()),r}var dD={touchstart:bE,touchmove:xE,touchend:SE,touchcancel:CE},fD=`touchstart touchmove touchend touchcancel`,pD=function(e){WT(t,e);function t(){var n;return t.prototype.evTarget=fD,n=e.apply(this,arguments)||this,n.targetIds={},n}var n=t.prototype;return n.handler=function(e){var t=dD[e.type],n=mD.call(this,e,t);n&&this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:hE,srcEvent:e})},t}(nD);function mD(e,t){var n=lD(e.touches),r=this.targetIds;if(t&(bE|xE)&&n.length===1)return r[n[0].identifier]=!0,[n,n];var a,o,s=lD(e.changedTouches),c=[],l=this.target;if(o=n.filter(function(e){return zE(e.target,l)}),t===bE)for(a=0;a<o.length;)r[o[a].identifier]=!0,a++;for(a=0;a<s.length;)r[s[a].identifier]&&c.push(s[a]),t&(SE|CE)&&delete r[s[a].identifier],a++;if(c.length)return[uD(o.concat(c),`identifier`,!0),c]}var hD={mousedown:bE,mousemove:xE,mouseup:SE},gD=`mousedown`,_D=`mousemove mouseup`,vD=function(e){WT(t,e);function t(){var n,r=t.prototype;return r.evEl=gD,r.evWin=_D,n=e.apply(this,arguments)||this,n.pressed=!1,n}var n=t.prototype;return n.handler=function(e){var t=hD[e.type];t&bE&&e.button===0&&(this.pressed=!0),t&xE&&e.which!==1&&(t=SE),this.pressed&&(t&SE&&(this.pressed=!1),this.callback(this.manager,t,{pointers:[e],changedPointers:[e],pointerType:_E,srcEvent:e}))},t}(nD),yD=2500,bD=25;function xD(e){var t=e.changedPointers[0];if(t.identifier===this.primaryTouch){var n={x:t.clientX,y:t.clientY},r=this.lastTouches;this.lastTouches.push(n),setTimeout(function(){var e=r.indexOf(n);e>-1&&r.splice(e,1)},yD)}}function SD(e,t){e&bE?(this.primaryTouch=t.changedPointers[0].identifier,xD.call(this,t)):e&(SE|CE)&&xD.call(this,t)}function CD(e){for(var t=e.srcEvent.clientX,n=e.srcEvent.clientY,r=0;r<this.lastTouches.length;r++){var a=this.lastTouches[r],o=Math.abs(t-a.x),s=Math.abs(n-a.y);if(o<=bD&&s<=bD)return!0}return!1}var wD=function(){return function(e){WT(t,e);function t(t,n){var r=e.call(this,t,n)||this;return r.handler=function(e,t,n){var a=n.pointerType===hE,o=n.pointerType===_E;if(!(o&&n.sourceCapabilities&&n.sourceCapabilities.firesTouchEvents)){if(a)SD.call(GT(GT(r)),t,n);else if(o&&CD.call(GT(GT(r)),n))return;r.callback(e,t,n)}},r.touch=new pD(r.manager,r.handler),r.mouse=new vD(r.manager,r.handler),r.primaryTouch=null,r.lastTouches=[],r}var n=t.prototype;return n.destroy=function(){this.touch.destroy(),this.mouse.destroy()},t}(nD)}();function TD(e){return new(e.options.inputClass||(pE?cD:mE?pD:fE?wD:vD))(e,ZE)}function ED(e,t,n){return Array.isArray(e)?(PE(e,n[t],n),!0):!1}var DD=1,OD=2,kD=4,AD=8,jD=AD,MD=16,ND=32,PD=1;function FD(){return PD++}function ID(e,t){var n=t.manager;return n?n.get(e):e}function LD(e){return e&MD?`cancel`:e&AD?`end`:e&kD?`move`:e&OD?`start`:``}var RD=function(){function e(e){e===void 0&&(e={}),this.options=UT({enable:!0},e),this.id=FD(),this.manager=null,this.state=DD,this.simultaneous={},this.requireFail=[]}var t=e.prototype;return t.set=function(e){return KT(this.options,e),this.manager&&this.manager.touchAction.update(),this},t.recognizeWith=function(e){if(ED(e,`recognizeWith`,this))return this;var t=this.simultaneous;return e=ID(e,this),t[e.id]||(t[e.id]=e,e.recognizeWith(this)),this},t.dropRecognizeWith=function(e){return ED(e,`dropRecognizeWith`,this)||(e=ID(e,this),delete this.simultaneous[e.id]),this},t.requireFailure=function(e){if(ED(e,`requireFailure`,this))return this;var t=this.requireFail;return e=ID(e,this),rD(t,e)===-1&&(t.push(e),e.requireFailure(this)),this},t.dropRequireFailure=function(e){if(ED(e,`dropRequireFailure`,this))return this;e=ID(e,this);var t=rD(this.requireFail,e);return t>-1&&this.requireFail.splice(t,1),this},t.hasRequireFailures=function(){return this.requireFail.length>0},t.canRecognizeWith=function(e){return!!this.simultaneous[e.id]},t.emit=function(e){var t=this,n=this.state;function r(n){t.manager.emit(n,e)}n<AD&&r(t.options.event+LD(n)),r(t.options.event),e.additionalEvent&&r(e.additionalEvent),n>=AD&&r(t.options.event+LD(n))},t.tryEmit=function(e){if(this.canEmit())return this.emit(e);this.state=ND},t.canEmit=function(){for(var e=0;e<this.requireFail.length;){if(!(this.requireFail[e].state&(ND|DD)))return!1;e++}return!0},t.recognize=function(e){var t=KT({},e);FE(this.options.enable,[this,t])?(this.state&(jD|MD|ND)&&(this.state=DD),this.state=this.process(t),this.state&(OD|kD|AD|MD)&&this.tryEmit(t)):(this.reset(),this.state=ND)},t.process=function(e){},t.getTouchAction=function(){},t.reset=function(){},e}(),zD=function(e){WT(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,UT({event:`tap`,pointers:1,taps:1,interval:300,time:250,threshold:9,posThreshold:10},t))||this,n.pTime=!1,n.pCenter=!1,n._timer=null,n._input=null,n.count=0,n}var n=t.prototype;return n.getTouchAction=function(){return[oE]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,a=e.distance<n.threshold,o=e.deltaTime<n.time;if(this.reset(),e.eventType&bE&&this.count===0)return this.failTimeout();if(a&&o&&r){if(e.eventType!==SE)return this.failTimeout();var s=!this.pTime||e.timeStamp-this.pTime<n.interval,c=!this.pCenter||HE(this.pCenter,e.center)<n.posThreshold;if(this.pTime=e.timeStamp,this.pCenter=e.center,!c||!s?this.count=1:this.count+=1,this._input=e,this.count%n.taps===0)return this.hasRequireFailures()?(this._timer=setTimeout(function(){t.state=jD,t.tryEmit()},n.interval),OD):jD}return ND},n.failTimeout=function(){var e=this;return this._timer=setTimeout(function(){e.state=ND},this.options.interval),ND},n.reset=function(){clearTimeout(this._timer)},n.emit=function(){this.state===jD&&(this._input.tapCount=this.count,this.manager.emit(this.options.event,this._input))},t}(RD),BD=function(e){WT(t,e);function t(t){return t===void 0&&(t={}),e.call(this,UT({pointers:1},t))||this}var n=t.prototype;return n.attrTest=function(e){var t=this.options.pointers;return t===0||e.pointers.length===t},n.process=function(e){var t=this.state,n=e.eventType,r=t&(OD|kD),a=this.attrTest(e);return r&&(n&CE||!a)?t|MD:r||a?n&SE?t|AD:t&OD?t|kD:OD:ND},t}(RD);function VD(e){return e===OE?`down`:e===DE?`up`:e===TE?`left`:e===EE?`right`:``}var HD=function(e){WT(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,UT({event:`pan`,threshold:10,pointers:1,direction:jE},t))||this,n.pX=null,n.pY=null,n}var n=t.prototype;return n.getTouchAction=function(){var e=this.options.direction,t=[];return e&kE&&t.push(lE),e&AE&&t.push(cE),t},n.directionTest=function(e){var t=this.options,n=!0,r=e.distance,a=e.direction,o=e.deltaX,s=e.deltaY;return a&t.direction||(t.direction&kE?(a=o===0?wE:o<0?TE:EE,n=o!==this.pX,r=Math.abs(e.deltaX)):(a=s===0?wE:s<0?DE:OE,n=s!==this.pY,r=Math.abs(e.deltaY))),e.direction=a,n&&r>t.threshold&&a&t.direction},n.attrTest=function(e){return BD.prototype.attrTest.call(this,e)&&(this.state&OD||!(this.state&OD)&&this.directionTest(e))},n.emit=function(t){this.pX=t.deltaX,this.pY=t.deltaY;var n=VD(t.direction);n&&(t.additionalEvent=this.options.event+n),e.prototype.emit.call(this,t)},t}(BD),UD=function(e){WT(t,e);function t(t){return t===void 0&&(t={}),e.call(this,UT({event:`swipe`,threshold:10,velocity:.3,direction:kE|AE,pointers:1},t))||this}var n=t.prototype;return n.getTouchAction=function(){return HD.prototype.getTouchAction.call(this)},n.attrTest=function(t){var n=this.options.direction,r;return n&(kE|AE)?r=t.overallVelocity:n&kE?r=t.overallVelocityX:n&AE&&(r=t.overallVelocityY),e.prototype.attrTest.call(this,t)&&n&t.offsetDirection&&t.distance>this.options.threshold&&t.maxPointers===this.options.pointers&&ZT(r)>this.options.velocity&&t.eventType&SE},n.emit=function(e){var t=VD(e.offsetDirection);t&&this.manager.emit(this.options.event+t,e),this.manager.emit(this.options.event,e)},t}(BD),WD=function(e){WT(t,e);function t(t){return t===void 0&&(t={}),e.call(this,UT({event:`pinch`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[sE]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.scale-1)>this.options.threshold||this.state&OD)},n.emit=function(t){if(t.scale!==1){var n=t.scale<1?`in`:`out`;t.additionalEvent=this.options.event+n}e.prototype.emit.call(this,t)},t}(BD),GD=function(e){WT(t,e);function t(t){return t===void 0&&(t={}),e.call(this,UT({event:`rotate`,threshold:0,pointers:2},t))||this}var n=t.prototype;return n.getTouchAction=function(){return[sE]},n.attrTest=function(t){return e.prototype.attrTest.call(this,t)&&(Math.abs(t.rotation)>this.options.threshold||this.state&OD)},t}(BD),KD=function(e){WT(t,e);function t(t){var n;return t===void 0&&(t={}),n=e.call(this,UT({event:`press`,pointers:1,time:251,threshold:9},t))||this,n._timer=null,n._input=null,n}var n=t.prototype;return n.getTouchAction=function(){return[aE]},n.process=function(e){var t=this,n=this.options,r=e.pointers.length===n.pointers,a=e.distance<n.threshold,o=e.deltaTime>n.time;if(this._input=e,!a||!r||e.eventType&(SE|CE)&&!o)this.reset();else if(e.eventType&bE)this.reset(),this._timer=setTimeout(function(){t.state=jD,t.tryEmit()},n.time);else if(e.eventType&SE)return jD;return ND},n.reset=function(){clearTimeout(this._timer)},n.emit=function(e){this.state===jD&&(e&&e.eventType&SE?this.manager.emit(this.options.event+`up`,e):(this._input.timeStamp=QT(),this.manager.emit(this.options.event,this._input)))},t}(RD),qD={domEvents:!1,touchAction:iE,enable:!0,inputTarget:null,inputClass:null,cssProps:{userSelect:`none`,touchSelect:`none`,touchCallout:`none`,contentZooming:`none`,userDrag:`none`,tapHighlightColor:`rgba(0,0,0,0)`}},JD=[[GD,{enable:!1}],[WD,{enable:!1},[`rotate`]],[UD,{direction:kE}],[HD,{direction:kE},[`swipe`]],[zD],[zD,{event:`doubletap`,taps:2},[`tap`]],[KD]],YD=1,XD=2;function ZD(e,t){var n=e.element;if(n.style){var r;PE(e.options.cssProps,function(a,o){r=$T(n.style,o),t?(e.oldCssProps[r]=n.style[r],n.style[r]=a):n.style[r]=e.oldCssProps[r]||``}),t||(e.oldCssProps={})}}function QD(e,t){var n=document.createEvent(`Event`);n.initEvent(e,!0,!0),n.gesture=t,t.target.dispatchEvent(n)}var $D=function(){function e(e,t){var n=this;this.options=KT({},qD,t||{}),this.options.inputTarget=this.options.inputTarget||e,this.handlers={},this.session={},this.recognizers=[],this.oldCssProps={},this.element=e,this.input=TD(this),this.touchAction=new RE(this,this.options.touchAction),ZD(this,!0),PE(this.options.recognizers,function(e){var t=n.add(new e[0](e[1]));e[2]&&t.recognizeWith(e[2]),e[3]&&t.requireFailure(e[3])},this)}var t=e.prototype;return t.set=function(e){return KT(this.options,e),e.touchAction&&this.touchAction.update(),e.inputTarget&&(this.input.destroy(),this.input.target=e.inputTarget,this.input.init()),this},t.stop=function(e){this.session.stopped=e?XD:YD},t.recognize=function(e){var t=this.session;if(!t.stopped){this.touchAction.preventDefaults(e);var n,r=this.recognizers,a=t.curRecognizer;(!a||a&&a.state&jD)&&(t.curRecognizer=null,a=null);for(var o=0;o<r.length;)n=r[o],t.stopped!==XD&&(!a||n===a||n.canRecognizeWith(a))?n.recognize(e):n.reset(),!a&&n.state&(OD|kD|AD)&&(t.curRecognizer=n,a=n),o++}},t.get=function(e){if(e instanceof RD)return e;for(var t=this.recognizers,n=0;n<t.length;n++)if(t[n].options.event===e)return t[n];return null},t.add=function(e){if(ED(e,`add`,this))return this;var t=this.get(e.options.event);return t&&this.remove(t),this.recognizers.push(e),e.manager=this,this.touchAction.update(),e},t.remove=function(e){if(ED(e,`remove`,this))return this;var t=this.get(e);if(e){var n=this.recognizers,r=rD(n,t);r!==-1&&(n.splice(r,1),this.touchAction.update())}return this},t.on=function(e,t){if(e===void 0||t===void 0)return this;var n=this.handlers;return PE(QE(e),function(e){n[e]=n[e]||[],n[e].push(t)}),this},t.off=function(e,t){if(e===void 0)return this;var n=this.handlers;return PE(QE(e),function(e){t?n[e]&&n[e].splice(rD(n[e],t),1):delete n[e]}),this},t.emit=function(e,t){this.options.domEvents&&QD(e,t);var n=this.handlers[e]&&this.handlers[e].slice();if(n&&n.length){t.type=e,t.preventDefault=function(){t.srcEvent.preventDefault()};for(var r=0;r<n.length;)n[r](t),r++}},t.destroy=function(){this.element&&ZD(this,!1),this.handlers={},this.session={},this.input.destroy(),this.element=null},e}(),eO={touchstart:bE,touchmove:xE,touchend:SE,touchcancel:CE},tO=`touchstart`,nO=`touchstart touchmove touchend touchcancel`,rO=function(e){WT(t,e);function t(){var n,r=t.prototype;return r.evTarget=tO,r.evWin=nO,n=e.apply(this,arguments)||this,n.started=!1,n}var n=t.prototype;return n.handler=function(e){var t=eO[e.type];if(t===bE&&(this.started=!0),this.started){var n=iO.call(this,e,t);t&(SE|CE)&&n[0].length-n[1].length===0&&(this.started=!1),this.callback(this.manager,t,{pointers:n[0],changedPointers:n[1],pointerType:hE,srcEvent:e})}},t}(nD);function iO(e,t){var n=lD(e.touches),r=lD(e.changedTouches);return t&(SE|CE)&&(n=uD(n.concat(r),`identifier`,!0)),[n,r]}function aO(e,t,n){var r=`DEPRECATED METHOD: `+t+`
8
+ `+n+` AT
9
+ `;return function(){var t=Error(`get-stack-trace`),n=t&&t.stack?t.stack.replace(/^[^\(]+?[\n$]/gm,``).replace(/^\s+at\s+/gm,``).replace(/^Object.<anonymous>\s*\(/gm,`{anonymous}()@`):`Unknown Stack Trace`,a=window.console&&(window.console.warn||window.console.log);return a&&a.call(window.console,r,n),e.apply(this,arguments)}}var oO=aO(function(e,t,n){for(var r=Object.keys(t),a=0;a<r.length;)(!n||n&&e[r[a]]===void 0)&&(e[r[a]]=t[r[a]]),a++;return e},`extend`,"Use `assign`."),sO=aO(function(e,t){return oO(e,t,!0)},`merge`,"Use `assign`.");function cO(e,t,n){var r=t.prototype,a=e.prototype=Object.create(r);a.constructor=e,a._super=r,n&&KT(a,n)}function lO(e,t){return function(){return e.apply(t,arguments)}}var uO=function(){var e=function(e,t){return t===void 0&&(t={}),new $D(e,UT({recognizers:JD.concat()},t))};return e.VERSION=`2.0.17-rc`,e.DIRECTION_ALL=jE,e.DIRECTION_DOWN=OE,e.DIRECTION_LEFT=TE,e.DIRECTION_RIGHT=EE,e.DIRECTION_UP=DE,e.DIRECTION_HORIZONTAL=kE,e.DIRECTION_VERTICAL=AE,e.DIRECTION_NONE=wE,e.DIRECTION_DOWN=OE,e.INPUT_START=bE,e.INPUT_MOVE=xE,e.INPUT_END=SE,e.INPUT_CANCEL=CE,e.STATE_POSSIBLE=DD,e.STATE_BEGAN=OD,e.STATE_CHANGED=kD,e.STATE_ENDED=AD,e.STATE_RECOGNIZED=jD,e.STATE_CANCELLED=MD,e.STATE_FAILED=ND,e.Manager=$D,e.Input=nD,e.TouchAction=RE,e.TouchInput=pD,e.MouseInput=vD,e.PointerEventInput=cD,e.TouchMouseInput=wD,e.SingleTouchInput=rO,e.Recognizer=RD,e.AttrRecognizer=BD,e.Tap=zD,e.Pan=HD,e.Swipe=UD,e.Pinch=WD,e.Rotate=GD,e.Press=KD,e.on=$E,e.off=eD,e.each=PE,e.merge=sO,e.extend=oO,e.bindFn=lO,e.assign=KT,e.inherit=cO,e.bindFn=lO,e.prefixed=$T,e.toArray=lD,e.inArray=rD,e.uniqueArray=uD,e.splitStr=QE,e.boolOrFn=FE,e.hasParent=zE,e.addEventListeners=$E,e.removeEventListeners=eD,e.defaults=KT({},qD,{preset:JD}),e}();uO.defaults;var dO=RS(`DELETE`);function fO(e){return pO({},e,...[...arguments].slice(1))}function pO(){let e=mO(...arguments);return gO(e),e}function mO(){var e=[...arguments];if(e.length<2)return e[0];if(e.length>2)return mO(pO(e[0],e[1]),...HS(e).call(e,2));let t=e[0],n=e[1];if(t instanceof Date&&n instanceof Date)return t.setTime(n.getTime()),t;for(let e of AS(n))Object.prototype.propertyIsEnumerable.call(n,e)&&(n[e]===dO?delete t[e]:t[e]=t[e]!==null&&n[e]!==null&&typeof t[e]==`object`&&typeof n[e]==`object`&&!G(t[e])&&!G(n[e])?mO(t[e],n[e]):hO(n[e]));return t}function hO(e){return G(e)?U(e).call(e,e=>hO(e)):typeof e==`object`&&e?e instanceof Date?new Date(e.getTime()):mO({},e):e}function gO(e){for(let t of Cx(e))e[t]===dO?delete e[t]:typeof e[t]==`object`&&e[t]!==null&&gO(e[t])}function _O(){var e=[...arguments];return vO(e.length?e:[tC()])}function vO(e){let t=df(yO(e),3),n=t[0],r=t[1],a=t[2],o=1,s=()=>{let e=2091639*n+o*23283064365386963e-26;return n=r,r=a,a=e-(o=e|0)};return s.uint32=()=>s()*4294967296,s.fract53=()=>s()+(s()*2097152|0)*11102230246251565e-32,s.algorithm=`Alea`,s.seed=e,s.version=`0.9`,s}function yO(){let e=bO(),t=e(` `),n=e(` `),r=e(` `);for(let a=0;a<arguments.length;a++)t-=e(a<0||arguments.length<=a?void 0:arguments[a]),t<0&&(t+=1),n-=e(a<0||arguments.length<=a?void 0:arguments[a]),n<0&&(n+=1),r-=e(a<0||arguments.length<=a?void 0:arguments[a]),r<0&&(r+=1);return[t,n,r]}function bO(){let e=4022871197;return function(t){let n=t.toString();for(let t=0;t<n.length;t++){e+=n.charCodeAt(t);let r=.02519603282416938*e;e=r>>>0,r-=e,r*=e,e=r>>>0,r-=e,e+=r*4294967296}return(e>>>0)*23283064365386963e-26}}function xO(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var SO=typeof window<`u`?window.Hammer||uO:function(){return xO()};function CO(e){var t;this._cleanupQueue=[],this.active=!1,this._dom={container:e,overlay:document.createElement(`div`)},this._dom.overlay.classList.add(`vis-overlay`),this._dom.container.appendChild(this._dom.overlay),this._cleanupQueue.push(()=>{this._dom.overlay.parentNode.removeChild(this._dom.overlay)});let n=SO(this._dom.overlay);n.on(`tap`,V(t=this._onTapOverlay).call(t,this)),this._cleanupQueue.push(()=>{n.destroy()});let r=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];W(r).call(r,e=>{n.on(e,e=>{e.srcEvent.stopPropagation()})}),document&&document.body&&(this._onClick=t=>{wO(t.target,e)||this.deactivate()},document.body.addEventListener(`click`,this._onClick),this._cleanupQueue.push(()=>{document.body.removeEventListener(`click`,this._onClick)})),this._escListener=e=>{(`key`in e?e.key===`Escape`:e.keyCode===27)&&this.deactivate()}}HT(CO.prototype),CO.current=null,CO.prototype.destroy=function(){this.deactivate();for(let n of _C(e=og(t=this._cleanupQueue).call(t,0)).call(e)){var e,t;n()}},CO.prototype.activate=function(){CO.current&&CO.current.deactivate(),CO.current=this,this.active=!0,this._dom.overlay.style.display=`none`,this._dom.container.classList.add(`vis-active`),this.emit(`change`),this.emit(`activate`),document.body.addEventListener(`keydown`,this._escListener)},CO.prototype.deactivate=function(){this.active=!1,this._dom.overlay.style.display=`block`,this._dom.container.classList.remove(`vis-active`),document.body.removeEventListener(`keydown`,this._escListener),this.emit(`change`),this.emit(`deactivate`)},CO.prototype._onTapOverlay=function(e){this.activate(),e.srcEvent.stopPropagation()};function wO(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var TO=/^\/?Date\((-?\d+)/i,EO=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,DO=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,OO=/^rgb\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *\)$/i,kO=/^rgba\( *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *(1?\d{1,2}|2[0-4]\d|25[0-5]) *, *([01]|0?\.\d+) *\)$/i;function AO(e){return e instanceof Number||typeof e==`number`}function jO(e){if(e)for(;e.hasChildNodes()===!0;){let t=e.firstChild;t&&(jO(t),e.removeChild(t))}}function MO(e){return e instanceof String||typeof e==`string`}function NO(e){return typeof e==`object`&&!!e}function PO(e){return!!(e instanceof Date||MO(e)&&(TO.exec(e)||!isNaN(Date.parse(e))))}function FO(e,t,n,r){let a=!1;r===!0&&(a=t[n]===null&&e[n]!==void 0),a?delete e[n]:e[n]=t[n]}function IO(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2];for(let r in e)if(t[r]!==void 0){if(t[r]===null||typeof t[r]!=`object`)FO(e,t,r,n);else{let a=e[r],o=t[r];NO(a)&&NO(o)&&IO(a,o,n)}}}var LO=Rb;function RO(e,t){if(!G(e))throw Error(`Array with property names expected as first argument`);var n=[...arguments].slice(2);for(let r of n)for(let n=0;n<e.length;n++){let a=e[n];r&&Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t}function zO(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(G(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let a=0;a<e.length;a++){let o=e[a];if(Object.prototype.hasOwnProperty.call(n,o)){if(n[o]&&n[o].constructor===Object)t[o]===void 0&&(t[o]={}),t[o].constructor===Object?VO(t[o],n[o],!1,r):FO(t,n,o,r);else if(G(n[o]))throw TypeError(`Arrays are not supported by deepExtend`);else FO(t,n,o,r)}}return t}function BO(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(G(n))throw TypeError(`Arrays are not supported by deepExtend`);for(let a in n)if(Object.prototype.hasOwnProperty.call(n,a)&&!JC(e).call(e,a)){if(n[a]&&n[a].constructor===Object)t[a]===void 0&&(t[a]={}),t[a].constructor===Object?VO(t[a],n[a]):FO(t,n,a,r);else if(G(n[a])){t[a]=[];for(let e=0;e<n[a].length;e++)t[a].push(n[a][e])}else FO(t,n,a,r)}return t}function VO(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=arguments.length>3&&arguments[3]!==void 0&&arguments[3];for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o)||n===!0){if(typeof t[o]==`object`&&t[o]!==null&&sw(t[o])===Object.prototype)e[o]===void 0?e[o]=VO({},t[o],n):typeof e[o]==`object`&&e[o]!==null&&sw(e[o])===Object.prototype?VO(e[o],t[o],n):FO(e,t,o,r);else if(G(t[o])){var a;e[o]=HS(a=t[o]).call(a)}else FO(e,t,o,r)}return e}function HO(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!=t[n])return!1;return!0}function UO(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`Boolean`:e instanceof Number?`Number`:e instanceof String?`String`:G(e)?`Array`:e instanceof Date?`Date`:`Object`:t===`number`?`Number`:t===`boolean`?`Boolean`:t===`string`?`String`:t===void 0?`undefined`:t}function WO(e,t){return[...e,t]}function GO(e){return HS(e).call(e)}function KO(e){return e.getBoundingClientRect().left}function qO(e){return e.getBoundingClientRect().right}function JO(e){return e.getBoundingClientRect().top}function YO(e,t){let n=e.className.split(` `),r=t.split(` `);n=Zb(n).call(n,H(r).call(r,function(e){return!JC(n).call(n,e)})),e.className=n.join(` `)}function XO(e,t){let n=e.className.split(` `),r=t.split(` `);n=H(n).call(n,function(e){return!JC(r).call(r,e)}),e.className=n.join(` `)}function ZO(e,t){if(G(e)){let n=e.length;for(let r=0;r<n;r++)t(e[r],r,e)}else for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t(e[n],n,e)}var QO=Cw;function $O(e,t,n){return e[t]!==n&&(e[t]=n,!0)}function ek(e){let t=!1;return()=>{t||(t=!0,requestAnimationFrame(()=>{t=!1,e()}))}}function tk(e){e||=window.event,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)}function nk(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event,t=null;return e&&(e.target?t=e.target:e.srcElement&&(t=e.srcElement)),!(t instanceof Element)||t.nodeType!=null&&t.nodeType==3&&(t=t.parentNode,!(t instanceof Element))?null:t}function rk(e,t){let n=e;for(;n;)if(n===t)return!0;else if(n.parentNode)n=n.parentNode;else return!1;return!1}var ik={asBoolean(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:e!=0},asNumber(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:Number(e)||t||null},asString(e,t){return typeof e==`function`&&(e=e()),e==null?t||null:String(e)},asSize(e,t){return typeof e==`function`&&(e=e()),MO(e)?e:AO(e)?e+`px`:t||null},asElement(e,t){return typeof e==`function`&&(e=e()),e||t||null}};function ak(e){let t;switch(e.length){case 3:case 4:return t=DO.exec(e),t?{r:Gw(t[1]+t[1],16),g:Gw(t[2]+t[2],16),b:Gw(t[3]+t[3],16)}:null;case 6:case 7:return t=EO.exec(e),t?{r:Gw(t[1],16),g:Gw(t[2],16),b:Gw(t[3],16)}:null;default:return null}}function ok(e,t){if(JC(e).call(e,`rgba`))return e;if(JC(e).call(e,`rgb`)){let n=e.substr(K(e).call(e,`(`)+1).replace(`)`,``).split(`,`);return`rgba(`+n[0]+`,`+n[1]+`,`+n[2]+`,`+t+`)`}{let n=ak(e);return n==null?e:`rgba(`+n.r+`,`+n.g+`,`+n.b+`,`+t+`)`}}function sk(e,t,n){var r;return`#`+HS(r=((1<<24)+(e<<16)+(t<<8)+n).toString(16)).call(r,1)}function ck(e,t){if(MO(e)){let t=e;if(_k(t)){var n;let e=U(n=t.substr(4).substr(0,t.length-5).split(`,`)).call(n,function(e){return Gw(e)});t=sk(e[0],e[1],e[2])}if(gk(t)===!0){let e=hk(t),n={h:e.h,s:e.s*.8,v:Math.min(1,e.v*1.02)},r={h:e.h,s:Math.min(1,e.s*1.25),v:e.v*.8},a=mk(r.h,r.s,r.v),o=mk(n.h,n.s,n.v);return{background:t,border:a,highlight:{background:o,border:a},hover:{background:o,border:a}}}return{background:t,border:t,highlight:{background:t,border:t},hover:{background:t,border:t}}}return t?{background:e.background||t.background,border:e.border||t.border,highlight:MO(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||t.highlight.background,border:e.highlight&&e.highlight.border||t.highlight.border},hover:MO(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||t.hover.border,background:e.hover&&e.hover.background||t.hover.background}}:{background:e.background||void 0,border:e.border||void 0,highlight:MO(e.highlight)?{border:e.highlight,background:e.highlight}:{background:e.highlight&&e.highlight.background||void 0,border:e.highlight&&e.highlight.border||void 0},hover:MO(e.hover)?{border:e.hover,background:e.hover}:{border:e.hover&&e.hover.border||void 0,background:e.hover&&e.hover.background||void 0}}}function lk(e,t,n){e/=255,t/=255,n/=255;let r=Math.min(e,Math.min(t,n)),a=Math.max(e,Math.max(t,n));if(r===a)return{h:0,s:0,v:r};let o=e===r?t-n:n===r?e-t:n-e;return{h:60*((e===r?3:n===r?1:5)-o/(a-r))/360,s:(a-r)/a,v:a}}function uk(e){let t=document.createElement(`div`),n={};t.style.cssText=e;for(let e=0;e<t.style.length;++e)n[t.style[e]]=t.style.getPropertyValue(t.style[e]);return n}function dk(e,t){let n=uk(t);for(let t of yT(n)){var r=df(t,2);let n=r[0],a=r[1];e.style.setProperty(n,a)}}function fk(e,t){let n=uk(t);for(let t of Cx(n))e.style.removeProperty(t)}function pk(e,t,n){let r,a,o,s=Math.floor(e*6),c=e*6-s,l=n*(1-t),u=n*(1-c*t),d=n*(1-(1-c)*t);switch(s%6){case 0:r=n,a=d,o=l;break;case 1:r=u,a=n,o=l;break;case 2:r=l,a=n,o=d;break;case 3:r=l,a=u,o=n;break;case 4:r=d,a=l,o=n;break;case 5:r=n,a=l,o=u}return{r:Math.floor(r*255),g:Math.floor(a*255),b:Math.floor(o*255)}}function mk(e,t,n){let r=pk(e,t,n);return sk(r.r,r.g,r.b)}function hk(e){let t=ak(e);if(!t)throw TypeError(`'${e}' is not a valid color.`);return lk(t.r,t.g,t.b)}function gk(e){return/(^#[0-9A-F]{6}$)|(^#[0-9A-F]{3}$)/i.test(e)}function _k(e){return OO.test(e)}function vk(e){return kO.test(e)}function yk(e,t){if(typeof t==`object`&&t){let n=Cg(t);for(let r=0;r<e.length;r++)Object.prototype.hasOwnProperty.call(t,e[r])&&typeof t[e[r]]==`object`&&(n[e[r]]=bk(t[e[r]]));return n}return null}function bk(e){if(typeof e!=`object`||!e)return null;if(e instanceof Element)return e;let t=Cg(e);for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&typeof e[n]==`object`&&(t[n]=bk(e[n]));return t}function xk(e,t){for(let n=0;n<e.length;n++){let r=e[n],a;for(a=n;a>0&&t(r,e[a-1])<0;a--)e[a]=e[a-1];e[a]=r}return e}function Sk(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},a=function(e){return e!=null},o=function(e){return typeof e==`object`&&!!e},s=function(e){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t))return!1;return!0};if(!o(e))throw Error(`Parameter mergeTarget must be an object`);if(!o(t))throw Error(`Parameter options must be an object`);if(!a(n))throw Error(`Parameter option must have a value`);if(!o(r))throw Error(`Parameter globalOptions must be an object`);let c=function(e,t,n){o(e[n])||(e[n]={});let r=t[n],a=e[n];for(let e in r)Object.prototype.hasOwnProperty.call(r,e)&&(a[e]=r[e])},l=t[n],u=o(r)&&!s(r)?r[n]:void 0,d=u?u.enabled:void 0;if(l===void 0)return;if(typeof l==`boolean`){o(e[n])||(e[n]={}),e[n].enabled=l;return}if(l===null&&!o(e[n])){if(a(u))e[n]=Cg(u);else return}if(!o(l))return;let f=!0;l.enabled===void 0?d!==void 0&&(f=u.enabled):f=l.enabled,c(e,t,n),e[n].enabled=f}function Ck(e,t,n,r){let a=0,o=0,s=e.length-1;for(;o<=s&&a<1e4;){let c=Math.floor((o+s)/2),l=e[c],u=t(r===void 0?l[n]:l[n][r]);if(u==0)return c;u==-1?o=c+1:s=c-1,a++}return-1}function wk(e,t,n,r,a){let o=0,s=0,c=e.length-1,l,u,d,f;for(a??=function(e,t){return e==t?0:e<t?-1:1};s<=c&&o<1e4;){if(f=Math.floor(.5*(c+s)),l=e[Math.max(0,f-1)][n],u=e[f][n],d=e[Math.min(e.length-1,f+1)][n],a(u,t)==0)return f;if(a(l,t)<0&&a(u,t)>0)return r==`before`?Math.max(0,f-1):f;if(a(u,t)<0&&a(d,t)>0)return r==`before`?f:Math.min(e.length-1,f+1);a(u,t)<0?s=f+1:c=f-1,o++}return-1}var Tk={linear(e){return e},easeInQuad(e){return e*e},easeOutQuad(e){return e*(2-e)},easeInOutQuad(e){return e<.5?2*e*e:-1+(4-2*e)*e},easeInCubic(e){return e*e*e},easeOutCubic(e){return--e*e*e+1},easeInOutCubic(e){return e<.5?4*e*e*e:(e-1)*(2*e-2)*(2*e-2)+1},easeInQuart(e){return e*e*e*e},easeOutQuart(e){return 1- --e*e*e*e},easeInOutQuart(e){return e<.5?8*e*e*e*e:1-8*--e*e*e*e},easeInQuint(e){return e*e*e*e*e},easeOutQuint(e){return 1+--e*e*e*e*e},easeInOutQuint(e){return e<.5?16*e*e*e*e*e:1+16*--e*e*e*e*e}};function Ek(){let e=document.createElement(`p`);e.style.width=`100%`,e.style.height=`200px`;let t=document.createElement(`div`);t.style.position=`absolute`,t.style.top=`0px`,t.style.left=`0px`,t.style.visibility=`hidden`,t.style.width=`200px`,t.style.height=`150px`,t.style.overflow=`hidden`,t.appendChild(e),document.body.appendChild(t);let n=e.offsetWidth;t.style.overflow=`scroll`;let r=e.offsetWidth;return n==r&&(r=t.clientWidth),document.body.removeChild(t),n-r}function Dk(e,t){let n;G(t)||(t=[t]);for(let r of e)if(r){n=r[t[0]];for(let e=1;e<t.length;e++)n&&=n[t[e]];if(n!==void 0)break}return n}var Ok={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},kk=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return Ok[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n,r=this._isColorString(e);if(r!==void 0&&(e=r),MO(e)===!0){if(_k(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(vk(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(gk(e)===!0){let t=ak(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+iS(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=Rb({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,Ch(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=Rb({},e)),this.color=e;let t=lk(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,a=this.centerCoordinates.x+r*Math.sin(n*t.h),o=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=a-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=o-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=lk(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=pk(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=lk(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,a=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,a),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),RT(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerText=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);let a=this;this.opacityRange.onchange=function(){a._setOpacity(this.value)},this.opacityRange.oninput=function(){a._setOpacity(this.value)},this.brightnessRange.onchange=function(){a._setBrightness(this.value)},this.brightnessRange.oninput=function(){a._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerText=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerText=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerText=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerText=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerText=`cancel`,this.cancelButton.onclick=V(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerText=`apply`,this.applyButton.onclick=V(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerText=`save`,this.saveButton.onclick=V(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerText=`load last`,this.loadButton.onclick=V(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new SO(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,a,o,s;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let c=2*Math.PI/360,l=1/this.r,u;for(o=0;o<360;o++)for(s=0;s<this.r;s++)r=this.centerCoordinates.x+s*Math.sin(c*o),a=this.centerCoordinates.y+s*Math.cos(c*o),u=pk(o*.002777777777777778,s*l,1),e.fillStyle=`rgb(`+u.r+`,`+u.g+`,`+u.b+`)`,e.fillRect(r-.5,a-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,a=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,s=n-o,c=r-a,l=Math.atan2(s,c),u=.98*Math.min(Math.sqrt(s*s+c*c),o),d=Math.cos(l)*u+a,f=Math.sin(l)*u+o;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+`px`;let p=l/(2*Math.PI);p=p<0?p+1:p;let m=u/this.r,h=lk(this.color.r,this.color.g,this.color.b);h.h=p,h.s=m;let g=pk(h.h,h.s,h.v);g.a=this.color.a,this.color=g,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}};function Ak(){var e=[...arguments];if(e.length<1)throw TypeError(`Invalid arguments.`);if(e.length===1)return document.createTextNode(e[0]);{let t=document.createElement(e[0]);return t.appendChild(Ak(...HS(e).call(e,1))),t}}var jk=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:()=>!1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.hideOption=a,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},Rb(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new kk(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(G(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),H(e)!==void 0&&(this.options.filter=H(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);H(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=H(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||K(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(let e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(let e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return W(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerText=e,this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=document.createElement(`div`);if(r.className=`vis-configuration vis-config-label vis-config-s`+t.length,n===!0){for(;r.firstChild;)r.removeChild(r.firstChild);r.appendChild(Ak(`i`,`b`,e))}else r.innerText=e+`:`;return r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let a=0;t!==void 0&&K(e).call(e,t)!==-1&&(a=K(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===a&&(n.selected=`selected`),n.innerText=e[t],r.appendChild(n)}let o=this;r.onchange=function(){o._update(this.value,n)};let s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,r)}_makeRange(e,t,n){let r=e[0],a=e[1],o=e[2],s=e[3],c=document.createElement(`input`);c.className=`vis-configuration vis-config-range`;try{c.type=`range`,c.min=a,c.max=o}catch{}c.step=s;let l=``,u=0;if(t!==void 0){let e=1.2;t<0&&t*e<a?(c.min=Math.ceil(t*e),u=c.min,l=`range increased`):t/e<a&&(c.min=Math.ceil(t/e),u=c.min,l=`range increased`),t*e>o&&o!==1&&(c.max=Math.ceil(t*e),u=c.max,l=`range increased`),c.value=t}else c.value=r;let d=document.createElement(`input`);d.className=`vis-configuration vis-config-rangeinput`,d.value=c.value;let f=this;c.onchange=function(){d.value=this.value,f._update(Number(this.value),n)},c.oninput=function(){d.value=this.value};let p=this._makeLabel(n[n.length-1],n),m=this._makeItem(n,p,c,d);l!==``&&this.popupHistory[m]!==u&&(this.popupHistory[m]=u,this._setupPopup(l,m))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerText=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerText=e,n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Ch(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ch(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){let r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let a=this;r.onchange=function(){a._update(this.checked,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeTextInput(e,t,n){let r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeColorField(e,t,n){let r=e[1],a=document.createElement(`div`);t=t===void 0?r:t,t===`none`?a.className=`vis-configuration vis-config-colorBlock none`:(a.className=`vis-configuration vis-config-colorBlock`,a.style.backgroundColor=t),t=t===void 0?r:t,a.onclick=()=>{this._showColorPicker(t,a,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,a)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,a=H(this.options),o=!1;for(let s in e)if(Object.prototype.hasOwnProperty.call(e,s)){r=!0;let c=e[s],l=WO(t,s);if(typeof a==`function`&&(r=a(s,t),r===!1&&!G(c)&&typeof c!=`string`&&typeof c!=`boolean`&&c instanceof Object&&(this.allowCreation=!1,r=this._handleObject(c,l,!0),this.allowCreation=n===!1)),r!==!1){o=!0;let e=this._getValue(l);if(G(c))this._handleArray(c,e,l);else if(typeof c==`string`)this._makeTextInput(c,e,l);else if(typeof c==`boolean`)this._makeCheckbox(c,e,l);else if(c instanceof Object){if(!this.hideOption(t,s,this.moduleOptions)){if(c.enabled!==void 0){let e=WO(l,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(s,l,!0);this._makeItem(l,e),o=this._handleObject(c,l)||o}else this._makeCheckbox(c,t,l)}else{let e=this._makeLabel(s,l,!0);this._makeItem(l,e),o=this._handleObject(c,l)||o}}}else console.error(`dont know how to handle`,c,s,l)}}return o}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`||e,e=e!==`false`&&e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();for(;this.optionsContainer.firstChild;)this.optionsContainer.removeChild(this.optionsContainer.firstChild);this.optionsContainer.appendChild(Ak(`pre`,`const options = `+iS(e,null,2)))}getOptions(){let e={};for(let t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},Mk=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=Gw(e),this.y=Gw(t)}setText(e){if(e instanceof Element){for(;this.frame.firstChild;)this.frame.removeChild(this.frame.firstChild);this.frame.appendChild(e)}else this.frame.innerText=e}show(e){if(e===void 0&&(e=!0),e===!0){let e=this.frame.clientHeight,t=this.frame.clientWidth,n=this.frame.parentNode.clientHeight,r=this.frame.parentNode.clientWidth,a=0,o=0;if(this.overflowMethod==`flip`){let n=!1,s=!0;this.y-e<this.padding&&(s=!1),this.x+t>r-this.padding&&(n=!0),a=n?this.x-t:this.x,o=s?this.y-e:this.y}else o=this.y-e,o+e+this.padding>n&&(o=n-e-this.padding),o<this.padding&&(o=this.padding),a=this.x,a+t+this.padding>r&&(a=r-t-this.padding),a<this.padding&&(a=this.padding);this.frame.style.left=a+`px`,this.frame.style.top=o+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},Nk=!1,Pk,Fk=`background: #FFeeee; color: #dd0000`,Ik=Object.freeze({__proto__:null,Activator:CO,Alea:_O,ColorPicker:kk,Configurator:jk,DELETE:dO,HSVToHex:mk,HSVToRGB:pk,Hammer:SO,Popup:Mk,RGBToHSV:lk,RGBToHex:sk,VALIDATOR_PRINT_STYLE:Fk,Validator:class e{static validate(t,n,r){Nk=!1,Pk=n;let a=n;return r!==void 0&&(a=n[r]),e.parse(t,a,[]),Nk}static parse(t,n,r){for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.check(a,t,n,r)}static check(t,n,r,a){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,a);return}let o=t,s=!0;r[t]===void 0&&r.__any__!==void 0&&(o=`__any__`,s=e.getType(n[t])===`object`);let c=r[o];s&&c.__type__!==void 0&&(c=c.__type__),e.checkFields(t,n,r,o,c,a)}static checkFields(t,n,r,a,o,s){let c=function(n){console.error(`%c`+n+e.printLocation(s,t),Fk)},l=e.getType(n[t]),u=o[l];u===void 0?o.any===void 0&&(c(`Invalid type received for "`+t+`". Expected: `+e.print(Cx(o))+`. Received [`+l+`] "`+n[t]+`"`),Nk=!0):e.getType(u)===`array`&&K(u).call(u,n[t])===-1?(c(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(u)+` not "`+n[t]+`". `),Nk=!0):l===`object`&&a!==`__any__`&&(s=WO(s,t),e.parse(n[t],r[a],s))}static getType(e){let t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:G(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let a=e.findInOptions(t,n,r,!1),o=e.findInOptions(t,Pk,[],!0),s;s=a.indexMatch===void 0?o.distance<=4&&a.distance>o.distance?` in `+e.printLocation(a.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(o.path,o.closestMatch,``):a.distance<=8?`. Did you mean "`+a.closestMatch+`"?`+e.printLocation(a.path,t):`. Did you mean one of these: `+e.print(Cx(n))+e.printLocation(r,t):` in `+e.printLocation(a.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+a.indexMatch+`"?
10
+
11
+ `,console.error(`%cUnknown option detected: "`+t+`"`+s,Fk),Nk=!0}static findInOptions(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0&&arguments[3],o=1e9,s=``,c=[],l=t.toLowerCase(),u;for(let f in n){let p;if(n[f].__type__!==void 0&&a===!0){let a=e.findInOptions(t,n[f],WO(r,f));o>a.distance&&(s=a.closestMatch,c=a.path,o=a.distance,u=a.indexMatch)}else{var d;K(d=f.toLowerCase()).call(d,l)!==-1&&(u=f),p=e.levenshteinDistance(t,f),o>p&&(s=f,c=GO(r),o=p)}}return{closestMatch:s,path:c,distance:o,indexMatch:u}}static printLocation(e,t){let n=`
12
+
13
+ `+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
14
+ `)+`options = {
15
+ `;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {
16
+ `}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`
17
+ `;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}
18
+ `}return n+`
19
+
20
+ `}static print(e){return iS(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;let n=[],r=0;for(;r<=t.length;r++)n[r]=[r];let a=0;for(;a<=e.length;a++)n[0][a]=a;for(r=1;r<=t.length;r++)for(a=1;a<=e.length;a++)t.charAt(r-1)==e.charAt(a-1)?n[r][a]=n[r-1][a-1]:n[r][a]=Math.min(n[r-1][a-1]+1,Math.min(n[r][a-1]+1,n[r-1][a]+1));return n[t.length][e.length]}},addClassName:YO,addCssText:dk,binarySearchCustom:Ck,binarySearchValue:wk,bridgeObject:bk,copyAndExtendArray:WO,copyArray:GO,deepExtend:VO,deepObjectAssign:pO,easingFunctions:Tk,equalArray:HO,extend:LO,fillIfDefined:IO,forEach:ZO,getAbsoluteLeft:KO,getAbsoluteRight:qO,getAbsoluteTop:JO,getScrollBarWidth:Ek,getTarget:nk,getType:UO,hasParent:rk,hexToHSV:hk,hexToRGB:ak,insertSort:xk,isDate:PO,isNumber:AO,isObject:NO,isString:MO,isValidHex:gk,isValidRGB:_k,isValidRGBA:vk,mergeOptions:Sk,option:ik,overrideOpacity:ok,parseColor:ck,preventDefault:tk,pureDeepObjectAssign:fO,recursiveDOMDelete:jO,removeClassName:XO,removeCssText:fk,selectiveBridgeObject:yk,selectiveDeepExtend:zO,selectiveExtend:RO,selectiveNotDeepExtend:BO,throttle:ek,toArray:QO,topMost:Dk,updateProperty:$O}),Lk=[];for(let e=0;e<256;++e)Lk.push((e+256).toString(16).slice(1));function Rk(e,t=0){return(Lk[e[t+0]]+Lk[e[t+1]]+Lk[e[t+2]]+Lk[e[t+3]]+`-`+Lk[e[t+4]]+Lk[e[t+5]]+`-`+Lk[e[t+6]]+Lk[e[t+7]]+`-`+Lk[e[t+8]]+Lk[e[t+9]]+`-`+Lk[e[t+10]]+Lk[e[t+11]]+Lk[e[t+12]]+Lk[e[t+13]]+Lk[e[t+14]]+Lk[e[t+15]]).toLowerCase()}var zk=new Uint8Array(16);function Bk(){return crypto.getRandomValues(zk)}function Vk(e,t,n){return crypto.randomUUID?crypto.randomUUID():Hk(e)}function Hk(e,t,n){e||={};let r=e.random??e.rng?.()??Bk();if(r.length<16)throw Error(`Random bytes length must be >= 16`);return r[6]=r[6]&15|64,r[8]=r[8]&63|128,Rk(r)}function Uk(e,t){var n=Cx(e);if(Ba){var r=Ba(e);t&&(r=H(r).call(r,function(t){return $a(e,t).enumerable})),n.push.apply(n,r)}return n}function Wk(e){for(var t=1;t<arguments.length;t++){var n,r,a=arguments[t]==null?{}:arguments[t];t%2?W(n=Uk(Object(a),!0)).call(n,function(t){B(e,t,a[t])}):go?Oo(e,go(a)):W(r=Uk(Object(a))).call(r,function(t){PS(e,t,$a(a,t))})}return e}function Gk(e){return new qk(e)}var Kk=class{constructor(e,t,n){var r,a,o;B(this,`_source`,void 0),B(this,`_transformers`,void 0),B(this,`_target`,void 0),B(this,`_listeners`,{add:V(r=this._add).call(r,this),remove:V(a=this._remove).call(a,this),update:V(o=this._update).call(o,this)}),this._source=e,this._transformers=t,this._target=n}all(){return this._target.update(this._transformItems(this._source.get())),this}start(){return this._source.on(`add`,this._listeners.add),this._source.on(`remove`,this._listeners.remove),this._source.on(`update`,this._listeners.update),this}stop(){return this._source.off(`add`,this._listeners.add),this._source.off(`remove`,this._listeners.remove),this._source.off(`update`,this._listeners.update),this}_transformItems(e){var t;return rm(t=this._transformers).call(t,(e,t)=>t(e),e)}_add(e,t){t!=null&&this._target.add(this._transformItems(this._source.get(t.items)))}_update(e,t){t!=null&&this._target.update(this._transformItems(this._source.get(t.items)))}_remove(e,t){t!=null&&this._target.remove(this._transformItems(t.oldData))}},qk=class{constructor(e){B(this,`_source`,void 0),B(this,`_transformers`,[]),this._source=e}filter(e){return this._transformers.push(t=>H(t).call(t,e)),this}map(e){return this._transformers.push(t=>U(t).call(t,e)),this}flatMap(e){return this._transformers.push(t=>th(t).call(t,e)),this}to(e){return new Kk(this._source,this._transformers,e)}};function Jk(e){return typeof e==`string`||typeof e==`number`}var Yk=class e{constructor(e){B(this,`delay`,void 0),B(this,`max`,void 0),B(this,`_queue`,[]),B(this,`_timeout`,null),B(this,`_extended`,null),this.delay=null,this.max=1/0,this.setOptions(e)}setOptions(e){e&&e.delay!==void 0&&(this.delay=e.delay),e&&e.max!==void 0&&(this.max=e.max),this._flushIfNeeded()}static extend(t,n){let r=new e(n);if(t.flush!==void 0)throw Error(`Target object already has a property flush`);t.flush=()=>{r.flush()};let a=[{name:`flush`,original:void 0}];if(n&&n.replace)for(let e=0;e<n.replace.length;e++){let o=n.replace[e];a.push({name:o,original:t[o]}),r.replace(t,o)}return r._extended={object:t,methods:a},r}destroy(){if(this.flush(),this._extended){let e=this._extended.object,t=this._extended.methods;for(let n=0;n<t.length;n++){let r=t[n];r.original?e[r.name]=r.original:delete e[r.name]}this._extended=null}}replace(e,t){let n=this,r=e[t];if(!r)throw Error(`Method `+t+` undefined`);e[t]=function(){var e=[...arguments];n.queue({args:e,fn:r,context:this})}}queue(e){typeof e==`function`?this._queue.push({fn:e}):this._queue.push(e),this._flushIfNeeded()}_flushIfNeeded(){this._queue.length>this.max&&this.flush(),this._timeout!=null&&(clearTimeout(this._timeout),this._timeout=null),this.queue.length>0&&typeof this.delay==`number`&&(this._timeout=Ch(()=>{this.flush()},this.delay))}flush(){var e,t;W(e=og(t=this._queue).call(t,0)).call(e,e=>{e.fn.apply(e.context||e.fn,e.args||[])})}},Xk=class e{constructor(){B(this,`_subscribers`,{"*":[],add:[],remove:[],update:[]}),B(this,`subscribe`,e.prototype.on),B(this,`unsubscribe`,e.prototype.off)}_trigger(e,t,n){var r;if(e===`*`)throw Error(`Cannot trigger event *`);W(r=[...this._subscribers[e],...this._subscribers[`*`]]).call(r,r=>{r(e,t,n??null)})}on(e,t){typeof t==`function`&&this._subscribers[e].push(t)}off(e,t){var n;this._subscribers[e]=H(n=this._subscribers[e]).call(n,e=>e!==t)}},Zk=class e{constructor(e){B(this,`_pairs`,void 0),this._pairs=e}*[ug](){for(let t of this._pairs){var e=df(t,2);yield[e[0],e[1]]}}*entries(){for(let t of this._pairs){var e=df(t,2);yield[e[0],e[1]]}}*keys(){for(let e of this._pairs)yield df(e,1)[0]}*values(){for(let e of this._pairs)yield df(e,2)[1]}toIdArray(){var e;return U(e=[...this._pairs]).call(e,e=>e[0])}toItemArray(){var e;return U(e=[...this._pairs]).call(e,e=>e[1])}toEntryArray(){return[...this._pairs]}toObjectMap(){let e=Cg(null);for(let n of this._pairs){var t=df(n,2);let r=t[0];e[r]=t[1]}return e}toMap(){return new A_(this._pairs)}toIdSet(){return new uy(this.toIdArray())}toItemSet(){return new uy(this.toItemArray())}cache(){return new e([...this._pairs])}distinct(e){let t=new uy;for(let r of this._pairs){var n=df(r,2);let a=n[0],o=n[1];t.add(e(o,a))}return t}filter(t){let n=this._pairs;return new e({*[ug](){for(let r of n){var e=df(r,2);let n=e[0],a=e[1];t(a,n)&&(yield[n,a])}}})}forEach(e){for(let n of this._pairs){var t=df(n,2);let r=t[0],a=t[1];e(a,r)}}map(t){let n=this._pairs;return new e({*[ug](){for(let r of n){var e=df(r,2);let n=e[0],a=e[1];yield[n,t(a,n)]}}})}max(e){let t=ky(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],a=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let t=df(n.value,2),o=t[0],s=t[1],c=e(s,o);c>a&&(a=c,r=s)}return r}min(e){let t=ky(this._pairs),n=t.next();if(n.done)return null;let r=n.value[1],a=e(n.value[1],n.value[0]);for(;!(n=t.next()).done;){let t=df(n.value,2),o=t[0],s=t[1],c=e(s,o);c<a&&(a=c,r=s)}return r}reduce(e,t){for(let r of this._pairs){var n=df(r,2);let a=n[0],o=n[1];t=e(t,o,a)}return t}sort(t){return new e({[ug]:()=>{var e;return ky(rb(e=[...this._pairs]).call(e,(e,n)=>{let r=df(e,2),a=r[0],o=r[1],s=df(n,2),c=s[0],l=s[1];return t(o,l,a,c)}))}})}};function Qk(e,t){return e[t]??(e[t]=Vk()),e}var $k=class extends Xk{get idProp(){return this._idProp}constructor(e,t){super(),B(this,`flush`,void 0),B(this,`length`,void 0),B(this,`_options`,void 0),B(this,`_data`,void 0),B(this,`_idProp`,void 0),B(this,`_queue`,null),e&&!G(e)&&(t=e,e=[]),this._options=t||{},this._data=new A_,this.length=0,this._idProp=this._options.fieldId||`id`,e&&e.length&&this.add(e),this.setOptions(t)}setOptions(e){e&&e.queue!==void 0&&(e.queue===!1?this._queue&&=(this._queue.destroy(),null):(this._queue||=Yk.extend(this,{replace:[`add`,`update`,`remove`]}),e.queue&&typeof e.queue==`object`&&this._queue.setOptions(e.queue)))}add(e,t){let n=[],r;if(G(e)){let t=U(e).call(e,e=>e[this._idProp]);if(Sb(t).call(t,e=>this._data.has(e)))throw Error(`A duplicate id was found in the parameter array.`);for(let t=0,a=e.length;t<a;t++)r=this._addItem(e[t]),n.push(r)}else if(e&&typeof e==`object`)r=this._addItem(e),n.push(r);else throw Error(`Unknown dataType`);return n.length&&this._trigger(`add`,{items:n},t),n}update(e,t){let n=[],r=[],a=[],o=[],s=this._idProp,c=e=>{let t=e[s];if(t!=null&&this._data.has(t)){let n=e,s=Rb({},this._data.get(t)),c=this._updateItem(n);r.push(c),o.push(n),a.push(s)}else{let t=this._addItem(e);n.push(t)}};if(G(e))for(let t=0,n=e.length;t<n;t++)e[t]&&typeof e[t]==`object`?c(e[t]):console.warn(`Ignoring input item, which is not an object at index `+t);else if(e&&typeof e==`object`)c(e);else throw Error(`Unknown dataType`);if(n.length&&this._trigger(`add`,{items:n},t),r.length){let e={items:r,oldData:a,data:o};this._trigger(`update`,e,t)}return Zb(n).call(n,r)}updateOnly(e,t){var n;G(e)||(e=[e]);let r=U(n=U(e).call(e,e=>{let t=this._data.get(e[this._idProp]);if(t==null)throw Error(`Updating non-existent items is not allowed.`);return{oldData:t,update:e}})).call(n,e=>{let t=e.oldData,n=e.update,r=t[this._idProp],a=fO(t,n);return this._data.set(r,a),{id:r,oldData:t,updatedData:a}});if(r.length){let e={items:U(r).call(r,e=>e.id),oldData:U(r).call(r,e=>e.oldData),data:U(r).call(r,e=>e.updatedData)};return this._trigger(`update`,e,t),e.items}return[]}get(e,t){let n,r,a;Jk(e)?(n=e,a=t):G(e)?(r=e,a=t):a=e;let o=a&&a.returnType===`Object`?`Object`:`Array`,s=a&&H(a),c=[],l,u,d;if(n!=null)l=this._data.get(n),l&&s&&!s(l)&&(l=void 0);else if(r!=null)for(let e=0,t=r.length;e<t;e++)l=this._data.get(r[e]),l!=null&&(!s||s(l))&&c.push(l);else{var f;u=[...ux(f=this._data).call(f)];for(let e=0,t=u.length;e<t;e++)d=u[e],l=this._data.get(d),l!=null&&(!s||s(l))&&c.push(l)}if(a&&a.order&&n==null&&this._sort(c,a.order),a&&a.fields){let e=a.fields;if(n!=null&&l!=null)l=this._filterFields(l,e);else for(let t=0,n=c.length;t<n;t++)c[t]=this._filterFields(c[t],e)}if(o==`Object`){let e={};for(let t=0,n=c.length;t<n;t++){let n=c[t],r=n[this._idProp];e[r]=n}return e}return n==null?c:l??null}getIds(e){let t=this._data,n=e&&H(e),r=e&&e.order,a=[...ux(t).call(t)],o=[];if(n){if(r){let e=[];for(let t=0,r=a.length;t<r;t++){let r=a[t],o=this._data.get(r);o!=null&&n(o)&&e.push(o)}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)o.push(e[t][this._idProp])}else for(let e=0,t=a.length;e<t;e++){let t=a[e],r=this._data.get(t);r!=null&&n(r)&&o.push(r[this._idProp])}}else if(r){let e=[];for(let n=0,r=a.length;n<r;n++){let r=a[n];e.push(t.get(r))}this._sort(e,r);for(let t=0,n=e.length;t<n;t++)o.push(e[t][this._idProp])}else for(let e=0,n=a.length;e<n;e++){let n=a[e],r=t.get(n);r!=null&&o.push(r[this._idProp])}return o}getDataSet(){return this}forEach(e,t){let n=t&&H(t),r=this._data,a=[...ux(r).call(r)];if(t&&t.order){let n=this.get(t);for(let t=0,r=n.length;t<r;t++){let r=n[t],a=r[this._idProp];e(r,a)}}else for(let t=0,r=a.length;t<r;t++){let r=a[t],o=this._data.get(r);o!=null&&(!n||n(o))&&e(o,r)}}map(e,t){let n=t&&H(t),r=[],a=this._data,o=[...ux(a).call(a)];for(let t=0,a=o.length;t<a;t++){let a=o[t],s=this._data.get(a);s!=null&&(!n||n(s))&&r.push(e(s,a))}return t&&t.order&&this._sort(r,t.order),r}_filterFields(e,t){var n;return e&&rm(n=G(t)?t:Cx(t)).call(n,(t,n)=>(t[n]=e[n],t),{})}_sort(e,t){if(typeof t==`string`){let n=t;rb(e).call(e,(e,t)=>{let r=e[n],a=t[n];return r>a?1:r<a?-1:0})}else if(typeof t==`function`)rb(e).call(e,t);else throw TypeError(`Order must be a function or a string`)}remove(e,t){let n=[],r=[],a=G(e)?e:[e];for(let e=0,t=a.length;e<t;e++){let t=this._remove(a[e]);if(t){let e=t[this._idProp];e!=null&&(n.push(e),r.push(t))}}return n.length&&this._trigger(`remove`,{items:n,oldData:r},t),n}_remove(e){let t;if(Jk(e)?t=e:e&&typeof e==`object`&&(t=e[this._idProp]),t!=null&&this._data.has(t)){let e=this._data.get(t)||null;return this._data.delete(t),--this.length,e}return null}clear(e){var t;let n=[...ux(t=this._data).call(t)],r=[];for(let e=0,t=n.length;e<t;e++)r.push(this._data.get(n[e]));return this._data.clear(),this.length=0,this._trigger(`remove`,{items:n,oldData:r},e),n}max(e){let t=null,n=null;for(let a of Ix(r=this._data).call(r)){var r;let o=a[e];typeof o==`number`&&(n==null||o>n)&&(t=a,n=o)}return t||null}min(e){let t=null,n=null;for(let a of Ix(r=this._data).call(r)){var r;let o=a[e];typeof o==`number`&&(n==null||o<n)&&(t=a,n=o)}return t||null}distinct(e){let t=this._data,n=[...ux(t).call(t)],r=[],a=0;for(let o=0,s=n.length;o<s;o++){let s=n[o],c=t.get(s)[e],l=!1;for(let e=0;e<a;e++)if(r[e]==c){l=!0;break}!l&&c!==void 0&&(r[a]=c,a++)}return r}_addItem(e){let t=Qk(e,this._idProp),n=t[this._idProp];if(this._data.has(n))throw Error(`Cannot add item: item with id `+n+` already exists`);return this._data.set(n,t),++this.length,n}_updateItem(e){let t=e[this._idProp];if(t==null)throw Error(`Cannot update item: item has no id (item: `+iS(e)+`)`);let n=this._data.get(t);if(!n)throw Error(`Cannot update item: no item with id `+t+` found`);return this._data.set(t,Wk(Wk({},n),e)),t}stream(e){if(e){let t=this._data;return new Zk({*[ug](){for(let n of e){let e=t.get(n);e!=null&&(yield[n,e])}}})}var t;return new Zk({[ug]:V(t=_S(this._data)).call(t,this._data)})}},eA=class e extends Xk{get idProp(){return this.getDataSet().idProp}constructor(e,t){var n;super(),B(this,`length`,0),B(this,`_listener`,void 0),B(this,`_data`,void 0),B(this,`_ids`,new uy),B(this,`_options`,void 0),this._options=t||{},this._listener=V(n=this._onEvent).call(n,this),this.setData(e)}setData(e){if(this._data){this._data.off&&this._data.off(`*`,this._listener);let e=this._data.getIds({filter:H(this._options)}),t=this._data.get(e);this._ids.clear(),this.length=0,this._trigger(`remove`,{items:e,oldData:t})}if(e!=null){this._data=e;let t=this._data.getIds({filter:H(this._options)});for(let e=0,n=t.length;e<n;e++){let n=t[e];this._ids.add(n)}this.length=t.length,this._trigger(`add`,{items:t})}else this._data=new $k;this._data.on&&this._data.on(`*`,this._listener)}refresh(){let e=this._data.getIds({filter:H(this._options)}),t=[...this._ids],n={},r=[],a=[],o=[];for(let t=0,a=e.length;t<a;t++){let a=e[t];n[a]=!0,this._ids.has(a)||(r.push(a),this._ids.add(a))}for(let e=0,r=t.length;e<r;e++){let r=t[e],s=this._data.get(r);s==null?console.error(`If you see this, report it please.`):n[r]||(a.push(r),o.push(s),this._ids.delete(r))}this.length+=r.length-a.length,r.length&&this._trigger(`add`,{items:r}),a.length&&this._trigger(`remove`,{items:a,oldData:o})}get(e,t){if(this._data==null)return null;let n=null,r;Jk(e)||G(e)?(n=e,r=t):r=e;let a=Rb({},this._options,r),o=H(this._options),s=r&&H(r);return o&&s&&(a.filter=e=>o(e)&&s(e)),n==null?this._data.get(a):this._data.get(n,a)}getIds(e){if(this._data.length){let t=H(this._options),n=e==null?null:H(e),r;return r=n?t?e=>t(e)&&n(e):n:t,this._data.getIds({filter:r,order:e&&e.order})}return[]}forEach(e,t){if(this._data){var n;let r=H(this._options),a=t&&H(t),o;o=a?r?function(e){return r(e)&&a(e)}:a:r,W(n=this._data).call(n,e,{filter:o,order:t&&t.order})}}map(e,t){if(this._data){var n;let r=H(this._options),a=t&&H(t),o;return o=a?r?e=>r(e)&&a(e):a:r,U(n=this._data).call(n,e,{filter:o,order:t&&t.order})}return[]}getDataSet(){return this._data.getDataSet()}stream(e){var t;return this._data.stream(e||{[ug]:V(t=ux(this._ids)).call(t,this._ids)})}dispose(){var t;(t=this._data)!=null&&t.off&&this._data.off(`*`,this._listener);let n=`This data view has already been disposed of.`,r={get:()=>{throw Error(n)},set:()=>{throw Error(n)},configurable:!1};for(let t of AS(e.prototype))PS(this,t,r)}_onEvent(e,t,n){if(!t||!t.items||!this._data)return;let r=t.items,a=[],o=[],s=[],c=[],l=[],u=[];switch(e){case`add`:for(let e=0,t=r.length;e<t;e++){let t=r[e];this.get(t)&&(this._ids.add(t),a.push(t))}break;case`update`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this.get(n)?this._ids.has(n)?(o.push(n),l.push(t.data[e]),c.push(t.oldData[e])):(this._ids.add(n),a.push(n)):this._ids.has(n)&&(this._ids.delete(n),s.push(n),u.push(t.oldData[e]))}break;case`remove`:for(let e=0,n=r.length;e<n;e++){let n=r[e];this._ids.has(n)&&(this._ids.delete(n),s.push(n),u.push(t.oldData[e]))}}this.length+=a.length-s.length,a.length&&this._trigger(`add`,{items:a},n),o.length&&this._trigger(`update`,{items:o,oldData:c,data:l},n),s.length&&this._trigger(`remove`,{items:s,oldData:u},n)}};function tA(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof t.add==`function`&&typeof t.clear==`function`&&typeof t.distinct==`function`&&typeof W(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof U(t)==`function`&&typeof t.max==`function`&&typeof t.min==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.remove==`function`&&typeof t.setOptions==`function`&&typeof t.stream==`function`&&typeof t.update==`function`&&typeof t.updateOnly==`function`}function nA(e,t){return typeof t==`object`&&!!t&&e===t.idProp&&typeof W(t)==`function`&&typeof t.get==`function`&&typeof t.getDataSet==`function`&&typeof t.getIds==`function`&&typeof t.length==`number`&&typeof U(t)==`function`&&typeof t.off==`function`&&typeof t.on==`function`&&typeof t.stream==`function`&&tA(e,t.getDataSet())}function rA(e){for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(e[t].redundant=e[t].used,e[t].used=[])}function iA(e){for(var t in e){if(!Object.prototype.hasOwnProperty.call(e,t))continue;let r=e[t];for(var n=0;n<r.redundant.length;n++)r.redundant[n].parentNode.removeChild(r.redundant[n]);r.redundant=[]}}function aA(e){rA(e),iA(e),rA(e)}function oA(e,t,n){var r;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(r=t[e].redundant[0],t[e].redundant.shift()):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),n.appendChild(r)):(r=document.createElementNS(`http://www.w3.org/2000/svg`,e),t[e]={used:[],redundant:[]},n.appendChild(r)),t[e].used.push(r),r}function sA(e,t,n,r){var a;return Object.prototype.hasOwnProperty.call(t,e)?t[e].redundant.length>0?(a=t[e].redundant[0],t[e].redundant.shift()):(a=document.createElement(e),r===void 0?n.appendChild(a):n.insertBefore(a,r)):(a=document.createElement(e),t[e]={used:[],redundant:[]},r===void 0?n.appendChild(a):n.insertBefore(a,r)),t[e].used.push(a),a}function cA(e,t,n,r,a,o){var s;if(n.style==`circle`?(s=oA(`circle`,r,a),s.setAttributeNS(null,`cx`,e),s.setAttributeNS(null,`cy`,t),s.setAttributeNS(null,`r`,.5*n.size)):(s=oA(`rect`,r,a),s.setAttributeNS(null,`x`,e-.5*n.size),s.setAttributeNS(null,`y`,t-.5*n.size),s.setAttributeNS(null,`width`,n.size),s.setAttributeNS(null,`height`,n.size)),n.styles!==void 0&&s.setAttributeNS(null,`style`,n.styles),s.setAttributeNS(null,`class`,n.className+` vis-point`),o){var c=oA(`text`,r,a);o.xOffset&&(e+=o.xOffset),o.yOffset&&(t+=o.yOffset),o.content&&(c.textContent=o.content),o.className&&c.setAttributeNS(null,`class`,o.className+` vis-label`),c.setAttributeNS(null,`x`,e),c.setAttributeNS(null,`y`,t)}return s}function lA(e,t,n,r,a,o,s,c){if(r!=0){r<0&&(r*=-1,t-=r);var l=oA(`rect`,o,s);l.setAttributeNS(null,`x`,e-.5*n),l.setAttributeNS(null,`y`,t),l.setAttributeNS(null,`width`,n),l.setAttributeNS(null,`height`,r),l.setAttributeNS(null,`class`,a),c&&l.setAttributeNS(null,`style`,c)}}function uA(){try{return navigator?navigator.languages&&navigator.languages.length?navigator.languages:navigator.userLanguage||navigator.language||navigator.browserLanguage||`en`:`en`}catch{return`en`}}var dA=Object.freeze({__proto__:null,cleanupElements:iA,drawBar:lA,drawPoint:cA,getDOMElement:sA,getNavigatorLanguage:uA,getSVGElement:oA,prepareElements:rA,resetElements:aA}),fA=null;function pA(e,t){var n=t||{preventDefault:!1};if(e.Manager){var r=e,a=function(e,t){var a=Object.create(n);return t&&r.assign(a,t),pA(new r(e,a),a)};return r.assign(a,r),a.Manager=function(e,t){var a=Object.create(n);return t&&r.assign(a,t),pA(new r.Manager(e,a),a)},a}var o=Object.create(e),s=e.element;s.hammer||=[],s.hammer.push(o),e.on(`hammer.input`,function(e){(n.preventDefault===!0||n.preventDefault===e.pointerType)&&e.preventDefault(),e.isFirst&&(fA=e.target)}),o._handlers={},o.on=function(t,n){return c(t).forEach(function(t){var r=o._handlers[t];r||(o._handlers[t]=r=[],e.on(t,l)),r.push(n)}),o},o.off=function(t,n){return c(t).forEach(function(t){var r=o._handlers[t];r&&(r=n?r.filter(function(e){return e!==n}):[],r.length>0?o._handlers[t]=r:(e.off(t,l),delete o._handlers[t]))}),o},o.emit=function(t,n){fA=n.target,e.emit(t,n)},o.destroy=function(){var t=e.element.hammer,n=t.indexOf(o);n!==-1&&t.splice(n,1),t.length||delete e.element.hammer,o._handlers={},e.destroy()};function c(e){return e.match(/[^ ]+/g)}function l(e){if(e.type!==`hammer.input`){if(e.srcEvent._handled||(e.srcEvent._handled={}),e.srcEvent._handled[e.type])return;e.srcEvent._handled[e.type]=!0}var t=!1;e.stopPropagation=function(){t=!0};var n=e.srcEvent.stopPropagation.bind(e.srcEvent);typeof n==`function`&&(e.srcEvent.stopPropagation=function(){n(),e.stopPropagation()}),e.firstTarget=fA;for(var r=fA.isConnected?fA:e.target;r&&!t;){var a=r.hammer;if(a){for(var o,s=0;s<a.length;s++)if(o=a[s]._handlers[e.type],o)for(var c=0;c<o.length&&!t;c++)o[c](e)}r=r.parentNode}}return o}function mA(){let e=()=>{};return{on:e,off:e,destroy:e,emit:e,get(){return{set:e}}}}var hA=function(){return typeof window<`u`?pA(window.Hammer||uO,{preventDefault:`mouse`}):function(){return mA()}}(),gA=r(u()),_A=typeof window<`u`&&window.moment||gA,vA={exports:{}},yA={},bA={exports:{}},xA={},SA;function CA(){if(SA)return xA;SA=1;function e(){var e={};return e[`align-content`]=!1,e[`align-items`]=!1,e[`align-self`]=!1,e[`alignment-adjust`]=!1,e[`alignment-baseline`]=!1,e.all=!1,e[`anchor-point`]=!1,e.animation=!1,e[`animation-delay`]=!1,e[`animation-direction`]=!1,e[`animation-duration`]=!1,e[`animation-fill-mode`]=!1,e[`animation-iteration-count`]=!1,e[`animation-name`]=!1,e[`animation-play-state`]=!1,e[`animation-timing-function`]=!1,e.azimuth=!1,e[`backface-visibility`]=!1,e.background=!0,e[`background-attachment`]=!0,e[`background-clip`]=!0,e[`background-color`]=!0,e[`background-image`]=!0,e[`background-origin`]=!0,e[`background-position`]=!0,e[`background-repeat`]=!0,e[`background-size`]=!0,e[`baseline-shift`]=!1,e.binding=!1,e.bleed=!1,e[`bookmark-label`]=!1,e[`bookmark-level`]=!1,e[`bookmark-state`]=!1,e.border=!0,e[`border-bottom`]=!0,e[`border-bottom-color`]=!0,e[`border-bottom-left-radius`]=!0,e[`border-bottom-right-radius`]=!0,e[`border-bottom-style`]=!0,e[`border-bottom-width`]=!0,e[`border-collapse`]=!0,e[`border-color`]=!0,e[`border-image`]=!0,e[`border-image-outset`]=!0,e[`border-image-repeat`]=!0,e[`border-image-slice`]=!0,e[`border-image-source`]=!0,e[`border-image-width`]=!0,e[`border-left`]=!0,e[`border-left-color`]=!0,e[`border-left-style`]=!0,e[`border-left-width`]=!0,e[`border-radius`]=!0,e[`border-right`]=!0,e[`border-right-color`]=!0,e[`border-right-style`]=!0,e[`border-right-width`]=!0,e[`border-spacing`]=!0,e[`border-style`]=!0,e[`border-top`]=!0,e[`border-top-color`]=!0,e[`border-top-left-radius`]=!0,e[`border-top-right-radius`]=!0,e[`border-top-style`]=!0,e[`border-top-width`]=!0,e[`border-width`]=!0,e.bottom=!1,e[`box-decoration-break`]=!0,e[`box-shadow`]=!0,e[`box-sizing`]=!0,e[`box-snap`]=!0,e[`box-suppress`]=!0,e[`break-after`]=!0,e[`break-before`]=!0,e[`break-inside`]=!0,e[`caption-side`]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e[`clip-path`]=!1,e[`clip-rule`]=!1,e.color=!0,e[`color-interpolation-filters`]=!0,e[`column-count`]=!1,e[`column-fill`]=!1,e[`column-gap`]=!1,e[`column-rule`]=!1,e[`column-rule-color`]=!1,e[`column-rule-style`]=!1,e[`column-rule-width`]=!1,e[`column-span`]=!1,e[`column-width`]=!1,e.columns=!1,e.contain=!1,e.content=!1,e[`counter-increment`]=!1,e[`counter-reset`]=!1,e[`counter-set`]=!1,e.crop=!1,e.cue=!1,e[`cue-after`]=!1,e[`cue-before`]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e[`display-inside`]=!0,e[`display-list`]=!0,e[`display-outside`]=!0,e[`dominant-baseline`]=!1,e.elevation=!1,e[`empty-cells`]=!1,e.filter=!1,e.flex=!1,e[`flex-basis`]=!1,e[`flex-direction`]=!1,e[`flex-flow`]=!1,e[`flex-grow`]=!1,e[`flex-shrink`]=!1,e[`flex-wrap`]=!1,e.float=!1,e[`float-offset`]=!1,e[`flood-color`]=!1,e[`flood-opacity`]=!1,e[`flow-from`]=!1,e[`flow-into`]=!1,e.font=!0,e[`font-family`]=!0,e[`font-feature-settings`]=!0,e[`font-kerning`]=!0,e[`font-language-override`]=!0,e[`font-size`]=!0,e[`font-size-adjust`]=!0,e[`font-stretch`]=!0,e[`font-style`]=!0,e[`font-synthesis`]=!0,e[`font-variant`]=!0,e[`font-variant-alternates`]=!0,e[`font-variant-caps`]=!0,e[`font-variant-east-asian`]=!0,e[`font-variant-ligatures`]=!0,e[`font-variant-numeric`]=!0,e[`font-variant-position`]=!0,e[`font-weight`]=!0,e.grid=!1,e[`grid-area`]=!1,e[`grid-auto-columns`]=!1,e[`grid-auto-flow`]=!1,e[`grid-auto-rows`]=!1,e[`grid-column`]=!1,e[`grid-column-end`]=!1,e[`grid-column-start`]=!1,e[`grid-row`]=!1,e[`grid-row-end`]=!1,e[`grid-row-start`]=!1,e[`grid-template`]=!1,e[`grid-template-areas`]=!1,e[`grid-template-columns`]=!1,e[`grid-template-rows`]=!1,e[`hanging-punctuation`]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e[`image-orientation`]=!1,e[`image-resolution`]=!1,e[`ime-mode`]=!1,e[`initial-letters`]=!1,e[`inline-box-align`]=!1,e[`justify-content`]=!1,e[`justify-items`]=!1,e[`justify-self`]=!1,e.left=!1,e[`letter-spacing`]=!0,e[`lighting-color`]=!0,e[`line-box-contain`]=!1,e[`line-break`]=!1,e[`line-grid`]=!1,e[`line-height`]=!1,e[`line-snap`]=!1,e[`line-stacking`]=!1,e[`line-stacking-ruby`]=!1,e[`line-stacking-shift`]=!1,e[`line-stacking-strategy`]=!1,e[`list-style`]=!0,e[`list-style-image`]=!0,e[`list-style-position`]=!0,e[`list-style-type`]=!0,e.margin=!0,e[`margin-bottom`]=!0,e[`margin-left`]=!0,e[`margin-right`]=!0,e[`margin-top`]=!0,e[`marker-offset`]=!1,e[`marker-side`]=!1,e.marks=!1,e.mask=!1,e[`mask-box`]=!1,e[`mask-box-outset`]=!1,e[`mask-box-repeat`]=!1,e[`mask-box-slice`]=!1,e[`mask-box-source`]=!1,e[`mask-box-width`]=!1,e[`mask-clip`]=!1,e[`mask-image`]=!1,e[`mask-origin`]=!1,e[`mask-position`]=!1,e[`mask-repeat`]=!1,e[`mask-size`]=!1,e[`mask-source-type`]=!1,e[`mask-type`]=!1,e[`max-height`]=!0,e[`max-lines`]=!1,e[`max-width`]=!0,e[`min-height`]=!0,e[`min-width`]=!0,e[`move-to`]=!1,e[`nav-down`]=!1,e[`nav-index`]=!1,e[`nav-left`]=!1,e[`nav-right`]=!1,e[`nav-up`]=!1,e[`object-fit`]=!1,e[`object-position`]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e[`outline-color`]=!1,e[`outline-offset`]=!1,e[`outline-style`]=!1,e[`outline-width`]=!1,e.overflow=!1,e[`overflow-wrap`]=!1,e[`overflow-x`]=!1,e[`overflow-y`]=!1,e.padding=!0,e[`padding-bottom`]=!0,e[`padding-left`]=!0,e[`padding-right`]=!0,e[`padding-top`]=!0,e.page=!1,e[`page-break-after`]=!1,e[`page-break-before`]=!1,e[`page-break-inside`]=!1,e[`page-policy`]=!1,e.pause=!1,e[`pause-after`]=!1,e[`pause-before`]=!1,e.perspective=!1,e[`perspective-origin`]=!1,e.pitch=!1,e[`pitch-range`]=!1,e[`play-during`]=!1,e.position=!1,e[`presentation-level`]=!1,e.quotes=!1,e[`region-fragment`]=!1,e.resize=!1,e.rest=!1,e[`rest-after`]=!1,e[`rest-before`]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e[`rotation-point`]=!1,e[`ruby-align`]=!1,e[`ruby-merge`]=!1,e[`ruby-position`]=!1,e[`shape-image-threshold`]=!1,e[`shape-outside`]=!1,e[`shape-margin`]=!1,e.size=!1,e.speak=!1,e[`speak-as`]=!1,e[`speak-header`]=!1,e[`speak-numeral`]=!1,e[`speak-punctuation`]=!1,e[`speech-rate`]=!1,e.stress=!1,e[`string-set`]=!1,e[`tab-size`]=!1,e[`table-layout`]=!1,e[`text-align`]=!0,e[`text-align-last`]=!0,e[`text-combine-upright`]=!0,e[`text-decoration`]=!0,e[`text-decoration-color`]=!0,e[`text-decoration-line`]=!0,e[`text-decoration-skip`]=!0,e[`text-decoration-style`]=!0,e[`text-emphasis`]=!0,e[`text-emphasis-color`]=!0,e[`text-emphasis-position`]=!0,e[`text-emphasis-style`]=!0,e[`text-height`]=!0,e[`text-indent`]=!0,e[`text-justify`]=!0,e[`text-orientation`]=!0,e[`text-overflow`]=!0,e[`text-shadow`]=!0,e[`text-space-collapse`]=!0,e[`text-transform`]=!0,e[`text-underline-position`]=!0,e[`text-wrap`]=!0,e.top=!1,e.transform=!1,e[`transform-origin`]=!1,e[`transform-style`]=!1,e.transition=!1,e[`transition-delay`]=!1,e[`transition-duration`]=!1,e[`transition-property`]=!1,e[`transition-timing-function`]=!1,e[`unicode-bidi`]=!1,e[`vertical-align`]=!1,e.visibility=!1,e[`voice-balance`]=!1,e[`voice-duration`]=!1,e[`voice-family`]=!1,e[`voice-pitch`]=!1,e[`voice-range`]=!1,e[`voice-rate`]=!1,e[`voice-stress`]=!1,e[`voice-volume`]=!1,e.volume=!1,e[`white-space`]=!1,e.widows=!1,e.width=!0,e[`will-change`]=!1,e[`word-break`]=!0,e[`word-spacing`]=!0,e[`word-wrap`]=!0,e[`wrap-flow`]=!1,e[`wrap-through`]=!1,e[`writing-mode`]=!1,e[`z-index`]=!1,e}function t(e,t,n){}function n(e,t,n){}var r=/javascript\s*\:/gim;function a(e,t){return r.test(t)?``:t}return xA.whiteList=e(),xA.getDefaultWhiteList=e,xA.onAttr=t,xA.onIgnoreAttr=n,xA.safeAttrValue=a,xA}var wA,TA;function EA(){return TA||(TA=1,wA={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,a;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,``)}}),wA}var DA,OA;function kA(){if(OA)return DA;OA=1;var e=EA();function t(t,n){t=e.trimRight(t),t[t.length-1]!==`;`&&(t+=`;`);var r=t.length,a=!1,o=0,s=0,c=``;function l(){if(!a){var r=e.trim(t.slice(o,s)),l=r.indexOf(`:`);if(l!==-1){var u=e.trim(r.slice(0,l)),d=e.trim(r.slice(l+1));if(u){var f=n(o,c.length,u,d,r);f&&(c+=f+`; `)}}}o=s+1}for(;s<r;s++){var u=t[s];if(u===`/`&&t[s+1]===`*`){var d=t.indexOf(`*/`,s+2);if(d===-1)break;s=d+1,o=s+1,a=!1}else u===`(`?a=!0:u===`)`?a=!1:u===`;`?a||l():u===`
21
+ `&&l()}return e.trim(c)}return DA=t,DA}var AA,jA;function MA(){if(jA)return AA;jA=1;var e=CA(),t=kA();EA();function n(e){return e==null}function r(e){var t={};for(var n in e)t[n]=e[n];return t}function a(t){t=r(t||{}),t.whiteList=t.whiteList||e.whiteList,t.onAttr=t.onAttr||e.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||e.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||e.safeAttrValue,this.options=t}return a.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var r=this.options,a=r.whiteList,o=r.onAttr,s=r.onIgnoreAttr,c=r.safeAttrValue;return t(e,function(e,t,r,l,u){var d=a[r],f=!1;if(d===!0?f=d:typeof d==`function`?f=d(l):d instanceof RegExp&&(f=d.test(l)),f!==!0&&(f=!1),l=c(r,l),l){var p={position:t,sourcePosition:e,source:u,isWhite:f};if(f){var m=o(r,l,p);return n(m)?r+`:`+l:m}var m=s(r,l,p);if(!n(m))return m}})},AA=a,AA}var NA;function PA(){return NA||(NA=1,(function(e,t){var n=CA(),r=MA();function a(e,t){return new r(t).process(e)}for(var o in t=e.exports=a,t.FilterCSS=r,n)t[o]=n[o];typeof window<`u`&&(window.filterCSS=e.exports)})(bA,bA.exports)),bA.exports}var FA,IA;function LA(){return IA||(IA=1,FA={indexOf:function(e,t){var n,r;if(Array.prototype.indexOf)return e.indexOf(t);for(n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},forEach:function(e,t,n){var r,a;if(Array.prototype.forEach)return e.forEach(t,n);for(r=0,a=e.length;r<a;r++)t.call(n,e[r],r,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,``)},spaceIndex:function(e){var t=/\s|\n|\t/.exec(e);return t?t.index:-1}}),FA}var RA;function zA(){if(RA)return yA;RA=1;var e=PA().FilterCSS,t=PA().getDefaultWhiteList,n=LA();function r(){return{a:[`target`,`href`,`title`],abbr:[`title`],address:[],area:[`shape`,`coords`,`href`,`alt`],article:[],aside:[],audio:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`preload`,`src`],b:[],bdi:[`dir`],bdo:[`dir`],big:[],blockquote:[`cite`],br:[],caption:[],center:[],cite:[],code:[],col:[`align`,`valign`,`span`,`width`],colgroup:[`align`,`valign`,`span`,`width`],dd:[],del:[`datetime`],details:[`open`],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:[`color`,`size`,`face`],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:[`src`,`alt`,`title`,`width`,`height`,`loading`],ins:[`datetime`],kbd:[],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:[`width`,`border`,`align`,`valign`],tbody:[`align`,`valign`],td:[`width`,`rowspan`,`colspan`,`align`,`valign`],tfoot:[`align`,`valign`],th:[`width`,`rowspan`,`colspan`,`align`,`valign`],thead:[`align`,`valign`],tr:[`rowspan`,`align`,`valign`],tt:[],u:[],ul:[],video:[`autoplay`,`controls`,`crossorigin`,`loop`,`muted`,`playsinline`,`poster`,`preload`,`src`,`height`,`width`]}}var a=new e;function o(e,t,n){}function s(e,t,n){}function c(e,t,n){}function l(e,t,n){}function u(e){return e.replace(f,`&lt;`).replace(p,`&gt;`)}function d(e,t,r,o){if(r=E(r),t===`href`||t===`src`){if(r=n.trim(r),r===`#`)return`#`;if(r.substr(0,7)!==`http://`&&r.substr(0,8)!==`https://`&&r.substr(0,7)!==`mailto:`&&r.substr(0,4)!==`tel:`&&r.substr(0,11)!==`data:image/`&&r.substr(0,6)!==`ftp://`&&r.substr(0,2)!==`./`&&r.substr(0,3)!==`../`&&r[0]!==`#`&&r[0]!==`/`)return``}else if(t===`background`){if(y.lastIndex=0,y.test(r))return``}else if(t===`style`){if(b.lastIndex=0,b.test(r)||(x.lastIndex=0,x.test(r)&&(y.lastIndex=0,y.test(r))))return``;o!==!1&&(o||=a,r=o.process(r))}return r=te(r),r}var f=/</g,p=/>/g,m=/"/g,h=/&quot;/g,g=/&#([a-zA-Z0-9]*);?/gim,_=/&colon;?/gim,v=/&newline;?/gim,y=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,b=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,x=/u\s*r\s*l\s*\(.*/gi;function S(e){return e.replace(m,`&quot;`)}function C(e){return e.replace(h,`"`)}function w(e){return e.replace(g,function(e,t){return t[0]===`x`||t[0]===`X`?String.fromCharCode(parseInt(t.substr(1),16)):String.fromCharCode(parseInt(t,10))})}function T(e){return e.replace(_,`:`).replace(v,` `)}function ee(e){for(var t=``,r=0,a=e.length;r<a;r++)t+=e.charCodeAt(r)<32?` `:e.charAt(r);return n.trim(t)}function E(e){return e=C(e),e=w(e),e=T(e),e=ee(e),e}function te(e){return e=S(e),e=u(e),e}function ne(){return``}function re(e,t){typeof t!=`function`&&(t=function(){});var r=!Array.isArray(e);function a(t){return r?!0:n.indexOf(e,t)!==-1}var o=[],s=!1;return{onIgnoreTag:function(e,n,r){if(a(e)){if(r.isClosing){var c=`[/removed]`,l=r.position+c.length;return o.push([s===!1?r.position:s,l]),s=!1,c}return s||=r.position,`[removed]`}return t(e,n,r)},remove:function(e){var t=``,r=0;return n.forEach(o,function(n){t+=e.slice(r,n[0]),r=n[1]}),t+=e.slice(r),t}}}function ie(e){for(var t=``,n=0;n<e.length;){var r=e.indexOf(`<!--`,n);if(r===-1){t+=e.slice(n);break}t+=e.slice(n,r);var a=e.indexOf(`-->`,r);if(a===-1)break;n=a+3}return t}function ae(e){var t=e.split(``);return t=t.filter(function(e){var t=e.charCodeAt(0);return t===127?!1:t<=31?t===10||t===13:!0}),t.join(``)}return yA.whiteList=r(),yA.getDefaultWhiteList=r,yA.onTag=o,yA.onIgnoreTag=s,yA.onTagAttr=c,yA.onIgnoreTagAttr=l,yA.safeAttrValue=d,yA.escapeHtml=u,yA.escapeQuote=S,yA.unescapeQuote=C,yA.escapeHtmlEntities=w,yA.escapeDangerHtml5Entities=T,yA.clearNonPrintableCharacter=ee,yA.friendlyAttrValue=E,yA.escapeAttrValue=te,yA.onIgnoreTagStripAll=ne,yA.StripTagBody=re,yA.stripCommentTag=ie,yA.stripBlankChar=ae,yA.attributeWrapSign=`"`,yA.cssFilter=a,yA.getDefaultCSSWhiteList=t,yA}var BA={},VA;function HA(){if(VA)return BA;VA=1;var e=LA();function t(t){var n=e.spaceIndex(t),r=n===-1?t.slice(1,-1):t.slice(1,n+1);return r=e.trim(r).toLowerCase(),r.slice(0,1)===`/`&&(r=r.slice(1)),r.slice(-1)===`/`&&(r=r.slice(0,-1)),r}function n(e){return e.slice(0,2)===`</`}function r(e,r,a){var o=``,s=0,c=!1,l=!1,u=0,d=e.length,f=``,p=``;chariterator:for(u=0;u<d;u++){var m=e.charAt(u);if(c===!1){if(m===`<`){c=u;continue}}else if(l===!1){if(m===`<`){o+=a(e.slice(s,u)),c=u,s=u;continue}if(m===`>`||u===d-1){o+=a(e.slice(s,c)),p=e.slice(c,u+1),f=t(p),o+=r(c,o.length,f,p,n(p)),s=u+1,c=!1;continue}if(m===`"`||m===`'`)for(var h=1,g=e.charAt(u-h);g.trim()===``||g===`=`;){if(g===`=`){l=m;continue chariterator}g=e.charAt(u-++h)}}else if(m===l){l=!1;continue}}return s<d&&(o+=a(e.substr(s))),o}var a=/[^a-zA-Z0-9\\_:.-]/gim;function o(t,n){var r=0,o=0,u=[],f=!1,p=t.length;function m(t,r){if(t=e.trim(t),t=t.replace(a,``).toLowerCase(),!(t.length<1)){var o=n(t,r||``);o&&u.push(o)}}for(var h=0;h<p;h++){var g=t.charAt(h),_,v;if(f===!1&&g===`=`)f=t.slice(r,h),r=h+1,o=t.charAt(r)===`"`||t.charAt(r)===`'`?r:c(t,h+1);else if(f!==!1&&h===o){if(v=t.indexOf(g,h+1),v===-1)break;_=e.trim(t.slice(o+1,v)),m(f,_),f=!1,h=v,r=h+1}else if(/\s|\n|\t/.test(g)){if(t=t.replace(/\s|\n|\t/g,` `),f===!1){if(v=s(t,h),v===-1){_=e.trim(t.slice(r,h)),m(_),f=!1,r=h+1;continue}h=v-1;continue}if(v=l(t,h-1),v===-1){_=e.trim(t.slice(r,h)),_=d(_),m(f,_),f=!1,r=h+1;continue}}}return r<t.length&&(f===!1?m(t.slice(r)):m(f,d(e.trim(t.slice(r))))),e.trim(u.join(` `))}function s(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function c(e,t){for(;t<e.length;t++){var n=e[t];if(n!==` `)return n===`'`||n===`"`?t:-1}}function l(e,t){for(;t>0;t--){var n=e[t];if(n!==` `)return n===`=`?t:-1}}function u(e){return e[0]===`"`&&e[e.length-1]===`"`||e[0]===`'`&&e[e.length-1]===`'`}function d(e){return u(e)?e.substr(1,e.length-2):e}return BA.parseTag=r,BA.parseAttr=o,BA}var UA,WA;function GA(){if(WA)return UA;WA=1;var e=PA().FilterCSS,t=zA(),n=HA(),r=n.parseTag,a=n.parseAttr,o=LA();function s(e){return e==null}function c(e){var t=o.spaceIndex(e);if(t===-1)return{html:``,closing:e[e.length-2]===`/`};e=o.trim(e.slice(t+1,-1));var n=e[e.length-1]===`/`;return n&&(e=o.trim(e.slice(0,-1))),{html:e,closing:n}}function l(e){var t={};for(var n in e)t[n]=e[n];return t}function u(e){var t={};for(var n in e)Array.isArray(e[n])?t[n.toLowerCase()]=e[n].map(function(e){return e.toLowerCase()}):t[n.toLowerCase()]=e[n];return t}function d(n){n=l(n||{}),n.stripIgnoreTag&&(n.onIgnoreTag&&console.error(`Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time`),n.onIgnoreTag=t.onIgnoreTagStripAll),n.whiteList||n.allowList?n.whiteList=u(n.whiteList||n.allowList):n.whiteList=t.whiteList,this.attributeWrapSign=n.singleQuotedAttributeValue===!0?`'`:t.attributeWrapSign,n.onTag=n.onTag||t.onTag,n.onTagAttr=n.onTagAttr||t.onTagAttr,n.onIgnoreTag=n.onIgnoreTag||t.onIgnoreTag,n.onIgnoreTagAttr=n.onIgnoreTagAttr||t.onIgnoreTagAttr,n.safeAttrValue=n.safeAttrValue||t.safeAttrValue,n.escapeHtml=n.escapeHtml||t.escapeHtml,this.options=n,n.css===!1?this.cssFilter=!1:(n.css=n.css||{},this.cssFilter=new e(n.css))}return d.prototype.process=function(e){if(e||=``,e=e.toString(),!e)return``;var n=this,l=n.options,u=l.whiteList,d=l.onTag,f=l.onIgnoreTag,p=l.onTagAttr,m=l.onIgnoreTagAttr,h=l.safeAttrValue,g=l.escapeHtml,_=n.attributeWrapSign,v=n.cssFilter;l.stripBlankChar&&(e=t.stripBlankChar(e)),l.allowCommentTag||(e=t.stripCommentTag(e));var y=!1;l.stripIgnoreTagBody&&(y=t.StripTagBody(l.stripIgnoreTagBody,f),f=y.onIgnoreTag);var b=r(e,function(e,t,n,r,l){var y={sourcePosition:e,position:t,isClosing:l,isWhite:Object.prototype.hasOwnProperty.call(u,n)},b=d(n,r,y);if(!s(b))return b;if(y.isWhite){if(y.isClosing)return`</`+n+`>`;var x=c(r),S=u[n],C=a(x.html,function(e,t){var r=o.indexOf(S,e)!==-1,a=p(n,e,t,r);return s(a)?r?(t=h(n,e,t,v),t?e+`=`+_+t+_:e):(a=m(n,e,t,r),s(a)?void 0:a):a});return r=`<`+n,C&&(r+=` `+C),x.closing&&(r+=` /`),r+=`>`,r}return b=f(n,r,y),s(b)?g(r):b},g);return y&&(b=y.remove(b)),b},UA=d,UA}var KA;function qA(){return KA||(KA=1,(function(e,t){var n=zA(),r=HA(),a=GA();function o(e,t){return new a(t).process(e)}t=e.exports=o,t.filterXSS=o,t.FilterXSS=a,(function(){for(var e in n)t[e]=n[e];for(var a in r)t[a]=r[a]})(),typeof window<`u`&&(window.filterXSS=e.exports);function s(){return typeof self<`u`&&typeof DedicatedWorkerGlobalScope<`u`&&self instanceof DedicatedWorkerGlobalScope}s()&&(self.filterXSS=e.exports)})(vA,vA.exports)),vA.exports}var JA=r(qA());function YA(e,t){var n=Cx(e);if(Ba){var r=Ba(e);t&&(r=H(r).call(r,function(t){return $a(e,t).enumerable})),n.push.apply(n,r)}return n}function XA(e){for(var t=1;t<arguments.length;t++){var n,r,a=arguments[t]==null?{}:arguments[t];t%2?W(n=YA(Object(a),!0)).call(n,function(t){B(e,t,a[t])}):go?Oo(e,go(a)):W(r=YA(Object(a))).call(r,function(t){PS(e,t,$a(a,t))})}return e}function ZA(e){if(!e)return!1;let t=e.idProp??e._idProp;return t?nA(t,e):!1}var QA=/^\/?Date\((-?\d+)/i,$A=/^\d+$/;function ej(e,t){let n;if(e!==void 0){if(e===null)return null;if(!t)return e;if(typeof t!=`string`&&!(t instanceof String))throw Error(`Type must be a string`);switch(t){case`boolean`:case`Boolean`:return!!e;case`number`:case`Number`:return MO(e)&&!isNaN(Date.parse(e))?gA(e).valueOf():Number(e.valueOf());case`string`:case`String`:return String(e);case`Date`:try{return ej(e,`Moment`).toDate()}catch(n){throw n instanceof TypeError?TypeError(`Cannot convert object of type `+UO(e)+` to type `+t,{cause:n}):n}case`Moment`:if(AO(e))return gA(e);if(e instanceof Date)return gA(e.valueOf());if(gA.isMoment(e))return gA(e);if(MO(e))return n=QA.exec(e),n?gA(Number(n[1])):(n=$A.exec(e),gA(n?Number(e):e));throw TypeError(`Cannot convert object of type `+UO(e)+` to type `+t);case`ISODate`:if(AO(e))return new Date(e);if(e instanceof Date)return e.toISOString();if(gA.isMoment(e))return e.toDate().toISOString();if(MO(e))return n=QA.exec(e),n?new Date(Number(n[1])).toISOString():gA(e).format();throw Error(`Cannot convert object of type `+UO(e)+` to type ISODate`);case`ASPDate`:if(AO(e))return`/Date(`+e+`)/`;if(e instanceof Date||gA.isMoment(e))return`/Date(`+e.valueOf()+`)/`;if(MO(e)){n=QA.exec(e);let t;return t=n?new Date(Number(n[1])).valueOf():new Date(e).valueOf(),`/Date(`+t+`)/`}throw Error(`Cannot convert object of type `+UO(e)+` to type ASPDate`);default:throw Error(`Unknown type ${t}`)}}}function tj(e){var t,n,r,a,o,s;let c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{start:`Date`,end:`Date`},l=e._idProp,u=new $k({fieldId:l}),d=U(t=Gk(e)).call(t,e=>{var t;return rm(t=Cx(e)).call(t,(t,n)=>(t[n]=ej(e[n],c[n]),t),{})}).to(u);return d.all().start(),{add:function(){return e.getDataSet().add(...arguments)},remove:function(){return e.getDataSet().remove(...arguments)},update:function(){return e.getDataSet().update(...arguments)},updateOnly:function(){return e.getDataSet().updateOnly(...arguments)},clear:function(){return e.getDataSet().clear(...arguments)},forEach:V(n=W(u)).call(n,u),get:V(r=u.get).call(r,u),getIds:V(a=u.getIds).call(a,u),off:V(o=u.off).call(o,u),on:V(s=u.on).call(s,u),get length(){return u.length},idProp:l,type:c,rawDS:e,coercedDS:u,dispose:()=>d.stop()}}var nj=e=>{let t=new JA.FilterXSS(e);return e=>typeof e==`string`?t.process(e):e},rj=e=>e,ij=nj(),q=XA(XA({},Ik),{},{convert:ej,setupXSSProtection:e=>{e&&(e.disabled===!0?(ij=rj,console.warn(`You disabled XSS protection for vis-Timeline. I sure hope you know what you're doing!`)):e.filterOptions&&(ij=nj(e.filterOptions)))}});PS(q,`xss`,{get:function(){return ij}});var aj=.001;function oj(e){rb(e).call(e,(e,t)=>e.data.start-t.data.start)}function sj(e){rb(e).call(e,(e,t)=>(`end`in e.data?e.data.end:e.data.start)-(`end`in t.data?t.data.end:t.data.start))}function cj(e,t,n,r){return pj(e,t.item,!1,e=>e.stack&&(n||e.top===null),e=>e.stack,()=>t.axis,r)===null}function lj(e,t,n){n.height=pj(e,t.item,!1,e=>e.stack,()=>!0,e=>e.baseTop)-n.top+.5*t.item.vertical}function uj(e,t,n,r){for(let a=0;a<e.length;a++){if(e[a].data.subgroup==null){e[a].top=t.item.vertical;continue}if(e[a].data.subgroup===void 0||!r)continue;let o=0;for(let t in n)!Object.prototype.hasOwnProperty.call(n,t)||n[t].visible!==!0||n[t].index>=n[e[a].data.subgroup].index||(o+=n[t].height,n[e[a].data.subgroup].top=o);e[a].top=o+.5*t.item.vertical}r||dj(e,t,n)}function dj(e,t,n){pj(Cw(n).toSorted((e,t)=>e.index>t.index?1:e.index<t.index?-1:0),{vertical:0},!0,()=>!0,()=>!0,()=>0);for(let r=0;r<e.length;r++)e[r].data.subgroup!==void 0&&(e[r].top=n[e[r].data.subgroup].top+.5*t.item.vertical)}function fj(e,t,n){let r=!1,a=[];for(let e in n)Object.prototype.hasOwnProperty.call(n[e],`index`)?a[n[e].index]=e:a.push(e);for(let o=0;o<a.length;o++){let s=a[o];if(!Object.prototype.hasOwnProperty.call(n,s))continue;r||=n[s].stack,n[s].top=0;for(let e in n)n[e].visible&&n[s].index>n[e].index&&(n[s].top+=n[e].height);let c=e[s];for(let e=0;e<c.length;e++)c[e].data.subgroup!==void 0&&(c[e].top=n[c[e].data.subgroup].top+.5*t.item.vertical,n[s].stack&&(c[e].baseTop=c[e].top));r&&n[s].stack&&lj(e[s],t,n[s])}}function pj(e,t,n,r,a,o,s){let c=e=>e.start,l=e=>e.end;n||(c=e[0]&&e[0].options.rtl?e=>e.right:e=>e.left,l=e=>c(e)+e.width+t.horizontal);let u=[],d=[],f=null,p=0;for(let t of e)if(r(t))u.push(t);else if(a(t)){let e=c(t);f!==null&&e<f-aj&&(p=0),f=e,p=hj(d,t=>c(t)-aj>e,p),og(d).call(d,p,0,t),p++}f=null;let m=null;p=0;let h=0,g=0,_=0;for(;u.length>0;){let e=u.shift();e.top=o(e);let n=c(e),r=l(e);f!==null&&n<f-aj&&(h=0,g=0,p=0,m=null),(f===null||n>f+aj)&&(h=hj(d,e=>n<l(e)-aj,h)),f=n,(m===null||m<r-aj)&&(g=hj(d,e=>r<c(e)-aj,Math.max(h,g))),m!==null&&m-aj>r&&(g=gj(d,e=>r+aj>=c(e),h,g)+1),m=r;let v=_j(d,e=>n<l(e)-aj,h,g).toSorted((e,t)=>e.top-t.top);for(let n=0;n<v.length;n++){let r=v[n];mj(e,r,t)&&(e.top=r.top+r.height+t.vertical)}a(e)&&(p=hj(d,e=>c(e)-aj>n,p),og(d).call(d,p,0,e),p<h&&h++,p<=g&&g++,p++);let y=e.top+e.height;if(y>_&&(_=y),s&&s())return null}return _}function mj(e,t,n){return e.top-n.vertical+aj<t.top+t.height&&e.top+e.height+n.vertical-aj>t.top}function hj(e,t,n){n||=0;for(let r=n;r<e.length;r++)if(t(e[r]))return r;return e.length}function gj(e,t,n,r){n||=0,r||=e.length;for(let a=r-1;a>=n;a--)if(t(e[a]))return a;return n-1}function _j(e,t,n,r){n||=0,r=r?Math.min(r,e.length):e.length;let a=[];for(let o=n;o<r;o++)t(e[o])&&a.push(e[o]);return a}var vj=Object.freeze({__proto__:null,nostack:uj,orderByEnd:sj,orderByStart:oj,stack:cj,stackSubgroups:dj,stackSubgroupsWithInnerStack:fj,substack:lj}),yj={BACKGROUND:`__background__`},bj=class{constructor(e,t,n){if(this.groupId=e,this.subgroups={},this.subgroupStack={},this.subgroupStackAll=!1,this.subgroupVisibility={},this.doInnerStack=!1,this.shouldBailStackItems=!1,this.subgroupIndex=0,this.subgroupOrderer=t&&t.subgroupOrder,this.itemSet=n,this.isVisible=null,this.height=0,this.stackDirty=!0,this._disposeCallbacks=[],t&&t.nestedGroups&&(this.nestedGroups=t.nestedGroups,this.showNested=t.showNested!=0),t&&t.subgroupStack){if(typeof t.subgroupStack==`boolean`)this.doInnerStack=t.subgroupStack,this.subgroupStackAll=t.subgroupStack;else for(let e in t.subgroupStack)Object.prototype.hasOwnProperty.call(t.subgroupStack,e)&&(this.subgroupStack[e]=t.subgroupStack[e],this.doInnerStack=this.doInnerStack||t.subgroupStack[e])}this.heightMode=t&&t.heightMode?t.heightMode:n.options.groupHeightMode,this.nestedInGroup=null,this.dom={},this.props={label:{width:0,height:0}},this.className=null,this.items={},this.visibleItems=[],this.itemsInRange=[],this.orderedItems={byStart:[],byEnd:[]},this.checkRangedItems=!1;let r=()=>{this.checkRangedItems=!0};this.itemSet.body.emitter.on(`checkRangedItems`,r),this._disposeCallbacks.push(()=>{this.itemSet.body.emitter.off(`checkRangedItems`,r)}),this._create(),this.setData(t)}_create(){let e=document.createElement(`div`);e.className=this.itemSet.options.groupEditable.order?`vis-label draggable`:`vis-label`,this.dom.label=e;let t=document.createElement(`div`);t.className=`vis-inner`,e.appendChild(t),this.dom.inner=t;let n=document.createElement(`div`);n.className=`vis-group`,n[`vis-group`]=this,this.dom.foreground=n,this.dom.background=document.createElement(`div`),this.dom.background.className=`vis-group`,this.dom.axis=document.createElement(`div`),this.dom.axis.className=`vis-group`,this.dom.marker=document.createElement(`div`),this.dom.marker.style.visibility=`hidden`,this.dom.marker.style.position=`absolute`,this.dom.marker.innerHTML=``,this.dom.background.appendChild(this.dom.marker)}setData(e){if(this.itemSet.groupTouchParams.isDragging)return;let t,n;if(e&&e.subgroupVisibility)for(let t in e.subgroupVisibility)Object.prototype.hasOwnProperty.call(e.subgroupVisibility,t)&&(this.subgroupVisibility[t]=e.subgroupVisibility[t]);if(this.itemSet.options&&this.itemSet.options.groupTemplate){var r;n=V(r=this.itemSet.options.groupTemplate).call(r,this),t=n(e,this.dom.inner)}else t=e&&e.content;if(t instanceof Element){for(;this.dom.inner.firstChild;)this.dom.inner.removeChild(this.dom.inner.firstChild);this.dom.inner.appendChild(t)}else t instanceof Object&&t.isReactComponent||(t instanceof Object?n(e,this.dom.inner):t==null?this.dom.inner.innerHTML=q.xss(this.groupId||``):this.dom.inner.innerHTML=q.xss(t));this.dom.label.title=e&&e.title||``,this.dom.inner.firstChild?q.removeClassName(this.dom.inner,`vis-hidden`):q.addClassName(this.dom.inner,`vis-hidden`),e&&e.nestedGroups?((!this.nestedGroups||this.nestedGroups!=e.nestedGroups)&&(this.nestedGroups=e.nestedGroups),(e.showNested!==void 0||this.showNested===void 0)&&(this.showNested=e.showNested!=0),q.addClassName(this.dom.label,`vis-nesting-group`),this.showNested?(q.removeClassName(this.dom.label,`collapsed`),q.addClassName(this.dom.label,`expanded`)):(q.removeClassName(this.dom.label,`expanded`),q.addClassName(this.dom.label,`collapsed`))):this.nestedGroups&&(this.nestedGroups=null,q.removeClassName(this.dom.label,`collapsed`),q.removeClassName(this.dom.label,`expanded`),q.removeClassName(this.dom.label,`vis-nesting-group`)),e&&(e.treeLevel||e.nestedInGroup)?(q.addClassName(this.dom.label,`vis-nested-group`),e.treeLevel?q.addClassName(this.dom.label,`vis-group-level-`+e.treeLevel):q.addClassName(this.dom.label,`vis-group-level-unknown-but-gte1`)):q.addClassName(this.dom.label,`vis-group-level-0`);let a=e&&e.className||null;a!=this.className&&(this.className&&(q.removeClassName(this.dom.label,this.className),q.removeClassName(this.dom.foreground,this.className),q.removeClassName(this.dom.background,this.className),q.removeClassName(this.dom.axis,this.className)),q.addClassName(this.dom.label,a),q.addClassName(this.dom.foreground,a),q.addClassName(this.dom.background,a),q.addClassName(this.dom.axis,a),this.className=a),this.style&&=(q.removeCssText(this.dom.label,this.style),null),e&&e.style&&(q.addCssText(this.dom.label,e.style),this.style=e.style)}getLabelWidth(){return this.props.label.width}_didMarkerHeightChange(){let e=this.dom.marker.clientHeight;if(e!=this.lastMarkerHeight){this.lastMarkerHeight=e;let t={},n=0;if(W(q).call(q,this.items,(e,r)=>{e.dirty=!0,e.displayed&&(t[r]=e.redraw(!0),n=t[r].length)}),n>0)for(let e=0;e<n;e++)W(q).call(q,t,t=>{t[e]()});return!0}return!1}_calculateGroupSizeAndPosition(){let e=this.dom.foreground,t=e.offsetTop,n=e.offsetLeft,r=e.offsetWidth;this.top=t,this.right=n,this.width=r}_shouldBailItemsRedraw(){let e=this,t=this.itemSet.options.onTimeout,n={relativeBailingTime:this.itemSet.itemsSettingTime,bailTimeMs:t&&t.timeoutMs,userBailFunction:t&&t.callback,shouldBailStackItems:this.shouldBailStackItems},r=null;if(!this.itemSet.initialDrawDone){if(n.shouldBailStackItems)return!0;Math.abs(tC()-new Date(n.relativeBailingTime))>n.bailTimeMs&&(n.userBailFunction&&this.itemSet.userContinueNotBail==null?n.userBailFunction(t=>{e.itemSet.userContinueNotBail=t,r=!t}):r=e.itemSet.userContinueNotBail==0)}return r}_redrawItems(e,t,n,r){if(e||this.stackDirty||this.isVisible&&!t){var a,o,s,c,l,u;let e={byEnd:H(a=this.orderedItems.byEnd).call(a,e=>!e.isCluster),byStart:H(o=this.orderedItems.byStart).call(o,e=>!e.isCluster)},t={byEnd:[...new uy(H(s=U(c=this.orderedItems.byEnd).call(c,e=>e.cluster)).call(s,e=>!!e))],byStart:[...new uy(H(l=U(u=this.orderedItems.byStart).call(u,e=>e.cluster)).call(l,e=>!!e))]},h=()=>{var n,a;let o=this._updateItemsInRange(e,H(n=this.visibleItems).call(n,e=>!e.isCluster),r),s=this._updateClustersInRange(t,H(a=this.visibleItems).call(a,e=>e.isCluster),r);return[...o,...s]},g=e=>{let t={};for(let r in this.subgroups){var n;if(!Object.prototype.hasOwnProperty.call(this.subgroups,r))continue;let a=H(n=this.visibleItems).call(n,e=>e.data.subgroup===r);t[r]=e?a.toSorted((t,n)=>e(t.data,n.data)):a}return t};if(typeof this.itemSet.options.order==`function`){let e=this;if(this.doInnerStack&&this.itemSet.options.stackSubgroups)fj(g(this.itemSet.options.order),n,this.subgroups),this.visibleItems=h(),this._updateSubGroupHeights(n);else{var d,f,p;this.visibleItems=h(),this._updateSubGroupHeights(n);let t=H(d=HS(f=this.visibleItems).call(f)).call(d,e=>e.isCluster||!e.isCluster&&!e.cluster).toSorted((t,n)=>e.itemSet.options.order(t.data,n.data));this.shouldBailStackItems=cj(t,n,!0,V(p=this._shouldBailItemsRedraw).call(p,this))}}else if(this.visibleItems=h(),this._updateSubGroupHeights(n),this.itemSet.options.stack){if(this.doInnerStack&&this.itemSet.options.stackSubgroups)fj(g(),n,this.subgroups);else{var m;this.shouldBailStackItems=cj(this.visibleItems,n,!0,V(m=this._shouldBailItemsRedraw).call(m,this))}}else uj(this.visibleItems,n,this.subgroups,this.itemSet.options.stackSubgroups);for(let e=0;e<this.visibleItems.length;e++)this.visibleItems[e].repositionX(),this.subgroupVisibility[this.visibleItems[e].data.subgroup]!==void 0&&(this.subgroupVisibility[this.visibleItems[e].data.subgroup]||this.visibleItems[e].hide());this.itemSet.options.cluster&&W(q).call(q,this.items,e=>{e.cluster&&e.displayed&&e.hide()}),this.shouldBailStackItems&&this.itemSet.body.emitter.emit(`destroyTimeline`),this.stackDirty=!1}}_didResize(e,t){e=q.updateProperty(this,`height`,t)||e;let n=this.dom.inner.clientWidth,r=this.dom.inner.clientHeight;return e=q.updateProperty(this.props.label,`width`,n)||e,e=q.updateProperty(this.props.label,`height`,r)||e,e}_applyGroupHeight(e){this.dom.background.style.height=`${e}px`,this.dom.foreground.style.height=`${e}px`,this.dom.label.style.height=`${e}px`}_updateItemsVerticalPosition(e){for(let t=0,n=this.visibleItems.length;t<n;t++){let n=this.visibleItems[t];n.repositionY(e),!this.isVisible&&this.groupId!=yj.BACKGROUND&&n.displayed&&n.hide()}}redraw(e,t,n,r){var a,o,s,c;let l=!1,u=this.isVisible,d,f=[()=>{n=this._didMarkerHeightChange.call(this)||n},V(a=this._updateSubGroupHeights).call(a,this,t),V(o=this._calculateGroupSizeAndPosition).call(o,this),()=>{var n;this.isVisible=V(n=this._isGroupVisible).call(n,this)(e,t)},()=>{var r;V(r=this._redrawItems).call(r,this)(n,u,t,e)},V(s=this._updateSubgroupsSizes).call(s,this),()=>{var e;d=this.height=V(e=this._calculateHeight).call(e,this)(t)},V(c=this._calculateGroupSizeAndPosition).call(c,this),()=>{var e;l=V(e=this._didResize).call(e,this)(l,d)},()=>{var e;V(e=this._applyGroupHeight).call(e,this)(d)},()=>{var e;V(e=this._updateItemsVerticalPosition).call(e,this)(t)},()=>(!this.isVisible&&this.height&&(l=!1),l)];if(r)return f;{let e;return W(f).call(f,t=>{e=t()}),e}}_updateSubGroupHeights(e){if(Cx(this.subgroups).length>0){let t=this;this._resetSubgroups(),W(q).call(q,this.visibleItems,n=>{n.data.subgroup!==void 0&&(t.subgroups[n.data.subgroup].height=Math.max(t.subgroups[n.data.subgroup].height,n.height+e.item.vertical),t.subgroups[n.data.subgroup].visible=this.subgroupVisibility[n.data.subgroup]===void 0||!!this.subgroupVisibility[n.data.subgroup])})}}_isGroupVisible(e,t){return this.top<=e.body.domProps.centerContainer.height-e.body.domProps.scrollTop+t.axis&&this.top+this.height+t.axis>=-e.body.domProps.scrollTop}_calculateHeight(e){let t,n;if(n=this.heightMode===`fixed`?q.toArray(this.items):this.visibleItems,!this.isVisible&&this.height)t=Math.max(this.height,this.props.label.height);else if(n.length>0){let r=n[0].top,a=n[0].top+n[0].height;if(W(q).call(q,n,e=>{r=Math.min(r,e.top),a=Math.max(a,e.top+e.height)}),r>e.axis){let t=r-e.axis;a-=t,W(q).call(q,n,e=>{e.top-=t})}t=Math.ceil(a+e.item.vertical/2),this.heightMode!==`fitItems`&&(t=Math.max(t,this.props.label.height))}else t=this.props.label.height;return t}show(){this.dom.label.parentNode||this.itemSet.dom.labelSet.appendChild(this.dom.label),this.dom.foreground.parentNode||this.itemSet.dom.foreground.appendChild(this.dom.foreground),this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background),this.dom.axis.parentNode||this.itemSet.dom.axis.appendChild(this.dom.axis)}hide(){let e=this.dom.label;e.parentNode&&e.parentNode.removeChild(e);let t=this.dom.foreground;t.parentNode&&t.parentNode.removeChild(t);let n=this.dom.background;n.parentNode&&n.parentNode.removeChild(n);let r=this.dom.axis;r.parentNode&&r.parentNode.removeChild(r)}add(e){var t;if(this.items[e.id]=e,e.setParent(this),this.stackDirty=!0,e.data.subgroup!==void 0&&(this._addToSubgroup(e),this.orderSubgroups()),!JC(t=this.visibleItems).call(t,e)){let t=this.itemSet.body.range;this._checkIfVisible(e,this.visibleItems,t)}}_addToSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;t!=null&&this.subgroups[t]===void 0&&(this.subgroups[t]={height:0,top:0,start:e.data.start,end:e.data.end||e.data.start,visible:!1,index:this.subgroupIndex,items:[],stack:this.subgroupStackAll||this.subgroupStack[t]||!1},this.subgroupIndex++),new Date(e.data.start)<new Date(this.subgroups[t].start)&&(this.subgroups[t].start=e.data.start);let n=e.data.end||e.data.start;new Date(n)>new Date(this.subgroups[t].end)&&(this.subgroups[t].end=n),this.subgroups[t].items.push(e)}_updateSubgroupsSizes(){let e=this;if(e.subgroups)for(let n in e.subgroups){var t;if(!Object.prototype.hasOwnProperty.call(e.subgroups,n))continue;let r=e.subgroups[n].items[0].data.end||e.subgroups[n].items[0].data.start,a=e.subgroups[n].items[0].data.start,o=r-1;W(t=e.subgroups[n].items).call(t,e=>{new Date(e.data.start)<new Date(a)&&(a=e.data.start);let t=e.data.end||e.data.start;new Date(t)>new Date(o)&&(o=t)}),e.subgroups[n].start=a,e.subgroups[n].end=new Date(o-1)}}orderSubgroups(){if(this.subgroupOrderer!==void 0){let e=[];if(typeof this.subgroupOrderer==`string`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push({subgroup:t,sortField:this.subgroups[t].items[0].data[this.subgroupOrderer]});rb(e).call(e,(e,t)=>e.sortField-t.sortField)}else if(typeof this.subgroupOrderer==`function`){for(let t in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,t)&&e.push(this.subgroups[t].items[0].data);rb(e).call(e,this.subgroupOrderer)}if(e.length>0)for(let t=0;t<e.length;t++)this.subgroups[e[t].subgroup].index=t}}_resetSubgroups(){for(let e in this.subgroups)Object.prototype.hasOwnProperty.call(this.subgroups,e)&&(this.subgroups[e].visible=!1,this.subgroups[e].height=0)}remove(e){var t,n;delete this.items[e.id],e.setParent(null),this.stackDirty=!0;let r=K(t=this.visibleItems).call(t,e);r!=-1&&og(n=this.visibleItems).call(n,r,1),e.data.subgroup!==void 0&&(this._removeFromSubgroup(e),this.orderSubgroups())}_removeFromSubgroup(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e.data.subgroup;if(t!=null){let a=this.subgroups[t];if(a){var n;let o=K(n=a.items).call(n,e);if(o>=0){var r;og(r=a.items).call(r,o,1),a.items.length?this._updateSubgroupsSizes():delete this.subgroups[t]}}}}removeFromDataSet(e){this.itemSet.removeItem(e.id)}order(){let e=q.toArray(this.items),t=[],n=[];for(let r=0;r<e.length;r++)e[r].data.end!==void 0&&n.push(e[r]),t.push(e[r]);this.orderedItems={byStart:t,byEnd:n},oj(this.orderedItems.byStart),sj(this.orderedItems.byEnd)}_updateItemsInRange(e,t,n){let r=[],a={};if(!this.isVisible&&this.height!==void 0&&this.groupId!=yj.BACKGROUND){for(let e=0;e<t.length;e++){var o=t[e];o.displayed&&o.hide()}return r}let s=(n.end-n.start)/4,c=n.start-s,l=n.end+s,u=e=>e<c?-1:e<=l?0:1;if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,a,n);let d=q.binarySearchCustom(e.byStart,u,`data`,`start`);this._traceVisible(d,e.byStart,r,a,e=>e.data.start<c||e.data.start>l);for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,a,n);this._sortVisibleItems(e.byStart,r,a);let f={},p=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(f[e]=t.redraw(!0),p=f[e].length)}if(p>0)for(let e=0;e<p;e++)W(q).call(q,f,t=>{t[e]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}_traceVisible(e,t,n,r,a){if(e!=-1){for(let o=e;o>=0;o--){let e=t[o];if(a(e))break;(!e.isCluster||e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.unshift(e))}for(let o=e+1;o<t.length;o++){let e=t[o];if(a(e))break;(!e.isCluster||e.hasItems())&&!e.cluster&&r[e.id]===void 0&&(r[e.id]=!0,n.push(e))}}}_sortVisibleItems(e,t,n){t.length=0;for(let r=0;r<e.length;r++){let a=e[r];n[a.id]&&t.push(a)}}_checkIfVisible(e,t,n){e.isVisible(n)?(e.displayed||e.show(),e.repositionX(),t.push(e)):e.displayed&&e.hide()}_checkIfVisibleWithReference(e,t,n,r){e.isVisible(r)?n[e.id]===void 0&&(n[e.id]=!0,t.push(e)):e.displayed&&e.hide()}_updateClustersInRange(e,t,n){let r=[],a={};if(t.length>0)for(let e=0;e<t.length;e++)this._checkIfVisibleWithReference(t[e],r,a,n);for(let t=0;t<e.byStart.length;t++)this._checkIfVisibleWithReference(e.byStart[t],r,a,n);for(let t=0;t<e.byEnd.length;t++)this._checkIfVisibleWithReference(e.byEnd[t],r,a,n);let o={},s=0;for(let e=0;e<r.length;e++){let t=r[e];t.displayed||(o[e]=t.redraw(!0),s=o[e].length)}if(s>0)for(var c=0;c<s;c++)W(q).call(q,o,function(e){e[c]()});for(let e=0;e<r.length;e++)r[e].repositionX();return r}changeSubgroup(e,t,n){this._removeFromSubgroup(e,t),this._addToSubgroup(e,n),this.orderSubgroups()}dispose(){this.hide();let e;for(;e=this._disposeCallbacks.pop();)e()}},xj=class extends bj{constructor(e,t,n){super(e,t,n),this.width=0,this.height=0,this.top=0,this.left=0}redraw(e,t){this.visibleItems=this._updateItemsInRange(this.orderedItems,this.visibleItems,e),this.width=this.dom.background.offsetWidth,this.dom.background.style.height=`0`;for(let e=0,n=this.visibleItems.length;e<n;e++)this.visibleItems[e].repositionY(t);return!1}show(){this.dom.background.parentNode||this.itemSet.dom.background.appendChild(this.dom.background)}},Sj=class{constructor(){this.options=null,this.props=null}setOptions(e){e&&q.extend(this.options,e)}redraw(){return!1}destroy(){}_isResized(){let e=this.props._previousWidth!==this.props.width||this.props._previousHeight!==this.props.height;return this.props._previousWidth=this.props.width,this.props._previousHeight=this.props.height,e}},Cj={current:`current`,time:`time`,deleteSelected:`Delete selected`},wj=Cj,Tj=Cj,Ej={current:`attuale`,time:`tempo`,deleteSelected:`Cancella la selezione`},Dj=Ej,Oj=Ej,kj={current:`huidige`,time:`tijd`,deleteSelected:`Selectie verwijderen`},Aj=kj,jj=kj,Mj={current:`Aktuelle`,time:`Zeit`,deleteSelected:`Lösche Auswahl`},Nj=Mj,Pj=Mj,Fj={current:`actuel`,time:`heure`,deleteSelected:`Effacer la selection`},Ij=Fj,Lj=Fj,Rj=Fj,zj=Fj,Bj={current:`actual`,time:`hora`,deleteSelected:`Eliminar selección`},Vj=Bj,Hj={current:`поточний`,time:`час`,deleteSelected:`Видалити обране`},Uj=Hj,Wj={current:`текущее`,time:`время`,deleteSelected:`Удалить выбранное`},Gj=Wj,Kj={current:`aktualny`,time:`czas`,deleteSelected:`Usuń wybrane`},qj=Kj,Jj={current:`atual`,time:`data`,deleteSelected:`Apagar selecionado`},Yj=Jj,Xj=Jj,Zj={current:`güncel`,time:`zaman`,deleteSelected:`Seçileni sil`},Qj=Zj,$j={current:`現在`,time:`時刻`,deleteSelected:`選択されたものを削除`},eM=$j,tM={current:`nuvarande`,time:`tid`,deleteSelected:`Radera valda`},nM=tM,rM={current:`nåværende`,time:`tid`,deleteSelected:`Slett valgte`},iM=rM,aM=rM,oM=rM,sM={current:`einamas`,time:`laikas`,deleteSelected:`Pašalinti pasirinktą`},cM={en:Cj,en_EN:wj,en_US:Tj,it:Ej,it_IT:Dj,it_CH:Oj,nl:kj,nl_NL:Aj,nl_BE:jj,de:Mj,de_DE:Nj,de_CH:Pj,fr:Fj,fr_FR:Ij,fr_CA:Lj,fr_BE:Rj,fr_CH:zj,es:Bj,es_ES:Vj,uk:Hj,uk_UA:Uj,ru:Wj,ru_RU:Gj,pl:Kj,pl_PL:qj,pt:Jj,pt_BR:Yj,pt_PT:Xj,tr:Zj,tr_TR:Qj,ja:$j,ja_JP:eM,lt:sM,lt_LT:sM,sv:tM,sv_SE:nM,nb:rM,nn:aM,nb_NO:iM,nn_NO:oM},lM=class extends Sj{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={rtl:!1,showCurrentTime:!0,alignCurrentTime:void 0,moment:_A,locales:cM,locale:`en`},this.options=q.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=q.extend({},cM,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];W(n=Cx(this.options.locales)).call(n,e=>{this.options.locales[e]=q.extend({},r,this.options.locales[e])}),this.offset=0,this._create()}_create(){let e=document.createElement(`div`);e.className=`vis-current-time`,e.style.position=`absolute`,e.style.top=`0px`,e.style.height=`100%`,this.bar=e}destroy(){this.options.showCurrentTime=!1,this.redraw(),this.body=null}setOptions(e){e&&q.selectiveExtend([`rtl`,`showCurrentTime`,`alignCurrentTime`,`moment`,`locale`,`locales`],this.options,e)}redraw(){if(this.options.showCurrentTime){var e,t;let n=this.body.dom.backgroundVertical;this.bar.parentNode!=n&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),n.appendChild(this.bar),this.start());let r=this.options.moment(tC()+this.offset);this.options.alignCurrentTime&&(r=r.startOf(this.options.alignCurrentTime));let a=this.body.util.toScreen(r),o=this.options.locales[this.options.locale];o||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let s=Zb(e=Zb(t=`${o.current} `).call(t,o.time,`: `)).call(e,r.format(`dddd, MMMM Do YYYY, H:mm:ss`));s=s.charAt(0).toUpperCase()+s.substring(1),this.options.rtl?this.bar.style.transform=`translateX(${a*-1}px)`:this.bar.style.transform=`translateX(${a}px)`,this.bar.title=s}else this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),this.stop();return!1}start(){let e=this;function t(){e.stop();let n=1/e.body.range.conversion(e.body.domProps.center.width).scale/10;n<30&&(n=30),n>1e3&&(n=1e3),e.redraw(),e.body.emitter.emit(`currentTimeTick`),e.currentTimeTimer=Ch(t,n)}t()}stop(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),delete this.currentTimeTimer)}setCurrentTime(e){let t=q.convert(e,`Date`).valueOf(),n=tC();this.offset=t-n,this.redraw()}getCurrentTime(){return new Date(tC()+this.offset)}},uM=class extends Sj{constructor(e,t){var n;super(),this.body=e,this.defaultOptions={moment:_A,locales:cM,locale:`en`,id:void 0,title:void 0},this.options=q.extend({},this.defaultOptions),this.setOptions(t),this.options.locales=q.extend({},cM,this.options.locales);let r=this.defaultOptions.locales[this.defaultOptions.locale];W(n=Cx(this.options.locales)).call(n,e=>{this.options.locales[e]=q.extend({},r,this.options.locales[e])}),this.customTime=t&&t.time!=null?t.time:new Date,this.eventParams={},this._create()}setOptions(e){e&&q.selectiveExtend([`moment`,`locale`,`locales`,`id`,`title`,`rtl`,`snap`],this.options,e)}_create(){var e,t,n;let r=document.createElement(`div`);r[`custom-time`]=this,r.className=`vis-custom-time ${this.options.id||``}`,r.style.position=`absolute`,r.style.top=`0px`,r.style.height=`100%`,this.bar=r;let a=document.createElement(`div`);a.style.position=`relative`,a.style.top=`0px`,this.options.rtl?a.style.right=`-10px`:a.style.left=`-10px`,a.style.height=`100%`,a.style.width=`20px`;function o(e){this.body.range._onMouseWheel(e)}a.addEventListener?(a.addEventListener(`mousewheel`,V(o).call(o,this),!1),a.addEventListener(`DOMMouseScroll`,V(o).call(o,this),!1)):a.attachEvent(`onmousewheel`,V(o).call(o,this)),r.appendChild(a),this.hammer=new hA(a),this.hammer.on(`panstart`,V(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,V(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,V(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:hA.DIRECTION_ALL}),this.hammer.get(`press`).set({time:1e4})}destroy(){this.hide(),this.hammer.destroy(),this.hammer=null,this.body=null}redraw(){let e=this.body.dom.backgroundVertical;this.bar.parentNode!=e&&(this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar),e.appendChild(this.bar));let t=this.body.util.toScreen(this.customTime),n=this.options.locales[this.options.locale];n||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en);let r=this.options.title;if(r===void 0){var a;r=Zb(a=`${n.time}: `).call(a,this.options.moment(this.customTime).format(`dddd, MMMM Do YYYY, H:mm:ss`)),r=r.charAt(0).toUpperCase()+r.substring(1)}else typeof r==`function`&&(r=r.call(this,this.customTime));return this.options.rtl?this.bar.style.right=`${t}px`:this.bar.style.left=`${t}px`,this.bar.title=r,!1}hide(){this.bar.parentNode&&this.bar.parentNode.removeChild(this.bar)}setCustomTime(e){this.customTime=q.convert(e,`Date`),this.redraw()}getCustomTime(){return new Date(this.customTime.valueOf())}setCustomMarker(e,t){if(this.marker&&this.bar.removeChild(this.marker),this.marker=document.createElement(`div`),this.marker.className=`vis-custom-time-marker`,this.marker.innerHTML=q.xss(e),this.marker.style.position=`absolute`,t){var n;this.marker.setAttribute(`contenteditable`,`true`),this.marker.addEventListener(`pointerdown`,()=>{this.marker.focus()}),this.marker.addEventListener(`input`,V(n=this._onMarkerChange).call(n,this)),this.marker.title=e,this.marker.addEventListener(`blur`,e=>{this.title!=e.target.innerHTML&&(this._onMarkerChanged(e),this.title=e.target.innerHTML)})}this.bar.appendChild(this.marker)}setCustomTitle(e){this.options.title=e}_onDragStart(e){this.eventParams.dragging=!0,this.eventParams.customTime=this.customTime,e.stopPropagation()}_onDrag(e){if(!this.eventParams.dragging)return;let t=this.options.rtl?-1*e.deltaX:e.deltaX,n=this.body.util.toScreen(this.eventParams.customTime)+t,r=this.body.util.toTime(n),a=this.body.util.getScale(),o=this.body.util.getStep(),s=this.options.snap,c=s?s(r,a,o):r;this.setCustomTime(c),this.body.emitter.emit(`timechange`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation()}_onDragEnd(e){this.eventParams.dragging&&(this.body.emitter.emit(`timechanged`,{id:this.options.id,time:new Date(this.customTime.valueOf()),event:e}),e.stopPropagation())}_onMarkerChange(e){this.body.emitter.emit(`markerchange`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}_onMarkerChanged(e){this.body.emitter.emit(`markerchanged`,{id:this.options.id,title:e.target.innerHTML,event:e}),e.stopPropagation()}static customTimeFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`custom-time`))return t[`custom-time`];t=t.parentNode}return null}},dM={},fM,pM;function mM(){if(pM)return fM;pM=1;var e=De(),t=O(),n=k(),r=ur(),a=Aw().trim,o=Dw(),s=n(``.charAt),c=e.parseFloat,l=e.Symbol,u=l&&l.iterator;return fM=1/c(o+`-0`)!=-1/0||u&&!t(function(){c(Object(u))})?function(e){var t=a(r(e)),n=c(t);return n===0&&s(t,0)===`-`?-0:n}:c,fM}var hM;function gM(){if(hM)return dM;hM=1;var e=I(),t=mM();return e({global:!0,forced:parseFloat!==t},{parseFloat:t}),dM}var _M,vM;function yM(){return vM||(vM=1,gM(),_M=N().parseFloat),_M}var bM,xM;function SM(){return xM||(xM=1,bM=yM()),bM}var CM,wM;function TM(){return wM||(wM=1,CM=SM()),CM}var EM=r(TM()),DM=class{constructor(e,t,n,r,a,o){let s=arguments.length>6&&arguments[6]!==void 0&&arguments[6],c=arguments.length>7&&arguments[7]!==void 0&&arguments[7];if(this.majorSteps=[1,2,5,10],this.minorSteps=[.25,.5,1,2],this.customLines=null,this.containerHeight=a,this.majorCharHeight=o,this._start=e,this._end=t,this.scale=1,this.minorStepIdx=-1,this.magnitudefactor=1,this.determineScale(),this.zeroAlign=s,this.autoScaleStart=n,this.autoScaleEnd=r,this.formattingFunction=c,n||r){let e=this,t=t=>{let n=t-t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx]);return t%(e.magnitudefactor*e.minorSteps[e.minorStepIdx])>.5*(e.magnitudefactor*e.minorSteps[e.minorStepIdx])?n+e.magnitudefactor*e.minorSteps[e.minorStepIdx]:n};n&&(this._start-=this.magnitudefactor*2*this.minorSteps[this.minorStepIdx],this._start=t(this._start)),r&&(this._end+=this.magnitudefactor*this.minorSteps[this.minorStepIdx],this._end=t(this._end)),this.determineScale()}}setCharHeight(e){this.majorCharHeight=e}setHeight(e){this.containerHeight=e}determineScale(){let e=this._end-this._start;this.scale=this.containerHeight/e;let t=this.majorCharHeight/this.scale,n=e>0?Math.round(Math.log(e)/Math.LN10):0;this.minorStepIdx=-1,this.magnitudefactor=10**n;let r=0;n<0&&(r=n);let a=!1;for(let e=r;Math.abs(e)<=Math.abs(n);e++){this.magnitudefactor=10**e;for(let e=0;e<this.minorSteps.length;e++)if(this.magnitudefactor*this.minorSteps[e]>=t){a=!0,this.minorStepIdx=e;break}if(a===!0)break}}is_major(e){return e%(this.magnitudefactor*this.majorSteps[this.minorStepIdx])===0}getStep(){return this.magnitudefactor*this.minorSteps[this.minorStepIdx]}getFirstMajor(){let e=this.magnitudefactor*this.majorSteps[this.minorStepIdx];return this.convertValue(this._start+(e-this._start%e)%e)}formatValue(e){let t=e.toPrecision(5);return typeof this.formattingFunction==`function`&&(t=this.formattingFunction(e)),typeof t==`number`?`${t}`:typeof t==`string`?t:e.toPrecision(5)}getLines(){let e=[],t=this.getStep(),n=(t-this._start%t)%t;for(let r=this._start+n;this._end-r>1e-5;r+=t)r!=this._start&&e.push({major:this.is_major(r),y:this.convertValue(r),val:this.formatValue(r)});return e}followScale(e){let t=this.minorStepIdx,n=this._start,r=this._end,a=this,o=()=>{a.magnitudefactor*=2},s=()=>{a.magnitudefactor/=2};e.minorStepIdx<=1&&this.minorStepIdx<=1||e.minorStepIdx>1&&this.minorStepIdx>1||(e.minorStepIdx<this.minorStepIdx?(this.minorStepIdx=1,t==2||o(),o()):(this.minorStepIdx=2,t==1||s(),s()));let c=e.convertValue(0),l=e.getStep()*e.scale,u=!1,d=0;for(;!u&&d++<5;){this.scale=l/(this.minorSteps[this.minorStepIdx]*this.magnitudefactor);let t=this.containerHeight/this.scale;this._start=n,this._end=this._start+t;let a=this._end*this.scale,d=this.magnitudefactor*this.majorSteps[this.minorStepIdx],f=this.getFirstMajor()-e.getFirstMajor();if(this.zeroAlign){let e=c-a;this._end+=e/this.scale,this._start=this._end-t}else this.autoScaleStart?(this._start-=f/this.scale,this._end=this._start+t):(this._start+=d-f/this.scale,this._end=this._start+t);if(!this.autoScaleEnd&&this._end>r+1e-5)s(),u=!1;else{if(!this.autoScaleStart&&this._start<n-1e-5){if(this.zeroAlign&&n>=0)console.warn(`Can't adhere to given 'min' range, due to zeroalign`);else{s(),u=!1;continue}}this.autoScaleStart&&this.autoScaleEnd&&t<r-n?(o(),u=!1):u=!0}}}convertValue(e){return this.containerHeight-(e-this._start)*this.scale}screenToValue(e){return(this.containerHeight-e)/this.scale+this._start}},OM=class extends Sj{constructor(e,t,n,r){super(),this.id=Vk(),this.body=e,this.defaultOptions={orientation:`left`,showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,majorLinesOffset:7,minorLinesOffset:4,labelOffsetX:10,labelOffsetY:2,iconWidth:20,width:`40px`,visible:!0,alignZeros:!0,left:{range:{min:void 0,max:void 0},format(e){return`${EM(e.toPrecision(3))}`},title:{text:void 0,style:void 0}},right:{range:{min:void 0,max:void 0},format(e){return`${EM(e.toPrecision(3))}`},title:{text:void 0,style:void 0}}},this.linegraphOptions=r,this.linegraphSVG=n,this.props={},this.DOMelements={lines:{},labels:{},title:{}},this.dom={},this.scale=void 0,this.range={start:0,end:0},this.options=q.extend({},this.defaultOptions),this.conversionFactor=1,this.setOptions(t),this.width=Number(`${this.options.width}`.replace(`px`,``)),this.minWidth=this.width,this.height=this.linegraphSVG.getBoundingClientRect().height,this.hidden=!1,this.stepPixels=25,this.zeroCrossing=-1,this.amountOfSteps=-1,this.lineOffset=0,this.master=!0,this.masterAxis=null,this.svgElements={},this.iconsRemoved=!1,this.groups={},this.amountOfGroups=0,this._create(),this.scale??this._redrawLabels(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups};let a=this;this.body.emitter.on(`verticalDrag`,()=>{a.dom.lineContainer.style.top=`${a.body.domProps.scrollTop}px`})}addGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1}updateGroup(e,t){Object.prototype.hasOwnProperty.call(this.groups,e)||(this.amountOfGroups+=1),this.groups[e]=t}removeGroup(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)}setOptions(e){if(e){let t=!1;this.options.orientation!=e.orientation&&e.orientation!==void 0&&(t=!0),q.selectiveDeepExtend([`orientation`,`showMinorLabels`,`showMajorLabels`,`icons`,`majorLinesOffset`,`minorLinesOffset`,`labelOffsetX`,`labelOffsetY`,`iconWidth`,`width`,`visible`,`left`,`right`,`alignZeros`],this.options,e),this.minWidth=Number(`${this.options.width}`.replace(`px`,``)),t===!0&&this.dom.frame&&(this.hide(),this.show())}}_create(){this.dom.frame=document.createElement(`div`),this.dom.frame.style.width=this.options.width,this.dom.frame.style.height=this.height,this.dom.lineContainer=document.createElement(`div`),this.dom.lineContainer.style.width=`100%`,this.dom.lineContainer.style.height=this.height,this.dom.lineContainer.style.position=`relative`,this.dom.lineContainer.style.visibility=`visible`,this.dom.lineContainer.style.display=`block`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.height=`100%`,this.svg.style.width=`100%`,this.svg.style.display=`block`,this.dom.frame.appendChild(this.svg)}_redrawGroupIcons(){rA(this.svgElements);let e,t=this.options.iconWidth,n=11.5;e=this.options.orientation===`left`?4:this.width-t-4;let r=Cx(this.groups);rb(r).call(r,(e,t)=>e<t?-1:1);for(let a of r)this.groups[a].visible===!0&&(this.linegraphOptions.visibility[a]===void 0||this.linegraphOptions.visibility[a]===!0)&&(this.groups[a].getLegend(t,15,this.framework,e,n),n+=19);iA(this.svgElements),this.iconsRemoved=!1}_cleanupIcons(){this.iconsRemoved===!1&&(rA(this.svgElements),iA(this.svgElements),this.iconsRemoved=!0)}show(){this.hidden=!1,this.dom.frame.parentNode||(this.options.orientation===`left`?this.body.dom.left.appendChild(this.dom.frame):this.body.dom.right.appendChild(this.dom.frame)),this.dom.lineContainer.parentNode||this.body.dom.backgroundHorizontal.appendChild(this.dom.lineContainer),this.dom.lineContainer.style.display=`block`}hide(){this.hidden=!0,this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.lineContainer.style.display=`none`}setRange(e,t){this.range.start=e,this.range.end=t}redraw(){let e=!1,t=0;this.dom.lineContainer.style.top=`${this.body.domProps.scrollTop}px`;for(let e in this.groups)Object.prototype.hasOwnProperty.call(this.groups,e)&&this.groups[e].visible===!0&&(this.linegraphOptions.visibility[e]===void 0||this.linegraphOptions.visibility[e]===!0)&&t++;if(this.amountOfGroups===0||t===0)this.hide();else{this.show(),this.height=Number(this.linegraphSVG.style.height.replace(`px`,``)),this.dom.lineContainer.style.height=`${this.height}px`,this.width=this.options.visible===!0?Number(`${this.options.width}`.replace(`px`,``)):0;let t=this.props,n=this.dom.frame;n.className=`vis-data-axis`,this._calculateCharSize();let r=this.options.orientation,a=this.options.showMinorLabels,o=this.options.showMajorLabels,s=this.body.dom.backgroundHorizontal.offsetWidth;t.minorLabelHeight=a?t.minorCharHeight:0,t.majorLabelHeight=o?t.majorCharHeight:0,t.minorLineWidth=s-this.lineOffset-this.width+2*this.options.minorLinesOffset,t.minorLineHeight=1,t.majorLineWidth=s-this.lineOffset-this.width+2*this.options.majorLinesOffset,t.majorLineHeight=1,r===`left`?(n.style.top=`0`,n.style.left=`0`,n.style.bottom=``,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.left.width,this.props.height=this.body.domProps.left.height):(n.style.top=``,n.style.bottom=`0`,n.style.left=`0`,n.style.width=`${this.width}px`,n.style.height=`${this.height}px`,this.props.width=this.body.domProps.right.width,this.props.height=this.body.domProps.right.height),e=this._redrawLabels(),e=this._isResized()||e,this.options.icons===!0?this._redrawGroupIcons():this._cleanupIcons(),this._redrawTitle(r)}return e}_redrawLabels(){let e=!1;rA(this.DOMelements.lines),rA(this.DOMelements.labels);let t=this.options.orientation,n=this.options[t].range==null?{}:this.options[t].range,r=!0;n.max!=null&&(this.range.end=n.max,r=!1);let a=!0;n.min!=null&&(this.range.start=n.min,a=!1),this.scale=new DM(this.range.start,this.range.end,a,r,this.dom.frame.offsetHeight,this.props.majorCharHeight,this.options.alignZeros,this.options[t].format),this.master===!1&&this.masterAxis!=null?(this.scale.followScale(this.masterAxis.scale),this.dom.lineContainer.style.display=`none`):this.dom.lineContainer.style.display=`block`,this.maxLabelSize=0;let o=this.scale.getLines();W(o).call(o,e=>{let n=e.y,r=e.major;this.options.showMinorLabels&&r===!1&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-minor`,this.props.minorCharHeight),r&&n>=0&&this._redrawLabel(n-2,e.val,t,`vis-y-axis vis-major`,this.props.majorCharHeight),this.master===!0&&(r?this._redrawLine(n,t,`vis-grid vis-horizontal vis-major`,this.options.majorLinesOffset,this.props.majorLineWidth):this._redrawLine(n,t,`vis-grid vis-horizontal vis-minor`,this.options.minorLinesOffset,this.props.minorLineWidth))});let s=0;this.options[t].title!==void 0&&this.options[t].title.text!==void 0&&(s=this.props.titleCharHeight);let c=this.options.icons===!0?Math.max(this.options.iconWidth,s)+this.options.labelOffsetX+15:s+this.options.labelOffsetX+15;return this.maxLabelSize>this.width-c&&this.options.visible===!0?(this.width=this.maxLabelSize+c,this.options.width=`${this.width}px`,iA(this.DOMelements.lines),iA(this.DOMelements.labels),this.redraw(),e=!0):this.maxLabelSize<this.width-c&&this.options.visible===!0&&this.width>this.minWidth?(this.width=Math.max(this.minWidth,this.maxLabelSize+c),this.options.width=`${this.width}px`,iA(this.DOMelements.lines),iA(this.DOMelements.labels),this.redraw(),e=!0):(iA(this.DOMelements.lines),iA(this.DOMelements.labels),e=!1),e}convertValue(e){return this.scale.convertValue(e)}screenToValue(e){return this.scale.screenToValue(e)}_redrawLabel(e,t,n,r,a){let o=sA(`div`,this.DOMelements.labels,this.dom.frame);o.className=r,o.innerHTML=q.xss(t),n===`left`?(o.style.left=`-${this.options.labelOffsetX}px`,o.style.textAlign=`right`):(o.style.right=`-${this.options.labelOffsetX}px`,o.style.textAlign=`left`),o.style.top=`${e-.5*a+this.options.labelOffsetY}px`,t+=``;let s=Math.max(this.props.majorCharWidth,this.props.minorCharWidth);this.maxLabelSize<t.length*s&&(this.maxLabelSize=t.length*s)}_redrawLine(e,t,n,r,a){if(this.master===!0){let o=sA(`div`,this.DOMelements.lines,this.dom.lineContainer);o.className=n,o.innerHTML=``,t===`left`?o.style.left=`${this.width-r}px`:o.style.right=`${this.width-r}px`,o.style.width=`${a}px`,o.style.top=`${e}px`}}_redrawTitle(e){if(rA(this.DOMelements.title),this.options[e].title!==void 0&&this.options[e].title.text!==void 0){let t=sA(`div`,this.DOMelements.title,this.dom.frame);t.className=`vis-y-axis vis-title vis-${e}`,t.innerHTML=q.xss(this.options[e].title.text),this.options[e].title.style!==void 0&&q.addCssText(t,this.options[e].title.style),e===`left`?t.style.left=`${this.props.titleCharHeight}px`:t.style.right=`${this.props.titleCharHeight}px`,t.style.width=`${this.height}px`}iA(this.DOMelements.title)}_calculateCharSize(){if(!(`minorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-minor vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.minorCharHeight=t.clientHeight,this.props.minorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`majorCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-major vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.majorCharHeight=t.clientHeight,this.props.majorCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}if(!(`titleCharHeight`in this.props)){let e=document.createTextNode(`0`),t=document.createElement(`div`);t.className=`vis-y-axis vis-title vis-measure`,t.appendChild(e),this.dom.frame.appendChild(t),this.props.titleCharHeight=t.clientHeight,this.props.titleCharWidth=t.clientWidth,this.dom.frame.removeChild(t)}}};function kM(){}kM.draw=function(e,t,n,r){r||=0;for(var a=jM(n,t),o=0;o<e.length;o++)if(!a)cA(e[o].screen_x+r,e[o].screen_y,AM(t),n.svgElements,n.svg,e[o].label);else{var s=a(e[o],t);(s===!0||typeof s==`object`)&&cA(e[o].screen_x+r,e[o].screen_y,AM(t,s),n.svgElements,n.svg,e[o].label)}},kM.drawIcon=function(e,t,n,r,a,o){var s=a*.5,c=oA(`rect`,o.svgElements,o.svg);c.setAttributeNS(null,`x`,t),c.setAttributeNS(null,`y`,n-s),c.setAttributeNS(null,`width`,r),c.setAttributeNS(null,`height`,2*s),c.setAttributeNS(null,`class`,`vis-outline`),cA(t+.5*r,n,AM(e),o.svgElements,o.svg)};function AM(e,t){return t=t===void 0?{}:t,{style:t.style||e.options.drawPoints.style,styles:t.styles||e.options.drawPoints.styles,size:t.size||e.options.drawPoints.size,className:t.className||e.className}}function jM(e,t){var n=void 0;return e.options&&e.options.drawPoints&&e.options.drawPoints.onRender&&typeof e.options.drawPoints.onRender==`function`&&(n=e.options.drawPoints.onRender),t.group.options&&t.group.options.drawPoints&&t.group.options.drawPoints.onRender&&typeof t.group.options.drawPoints.onRender==`function`&&(n=t.group.options.drawPoints.onRender),n}function MM(){}MM.drawIcon=function(e,t,n,r,a,o){var s=a*.5,c=oA(`rect`,o.svgElements,o.svg);c.setAttributeNS(null,`x`,t),c.setAttributeNS(null,`y`,n-s),c.setAttributeNS(null,`width`,r),c.setAttributeNS(null,`height`,2*s),c.setAttributeNS(null,`class`,`vis-outline`);var l=Math.round(.3*r),u=e.options.barChart.width/l,d=Math.round(.4*a),f=Math.round(.75*a),p=Math.round((r-2*l)/3);if(lA(t+.5*l+p,n+s-d-1,l,d,e.className+` vis-bar`,o.svgElements,o.svg,e.style),lA(t+1.5*l+p+2,n+s-f-1,l,f,e.className+` vis-bar`,o.svgElements,o.svg,e.style),e.options.drawPoints.enabled==1){var m={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size/u,className:e.className};cA(t+.5*l+p,n+s-d-1,m,o.svgElements,o.svg),cA(t+1.5*l+p+2,n+s-f-1,m,o.svgElements,o.svg)}},MM.draw=function(e,t,n){var r=[],a={},o,s,c,l,u,d,f=0;for(u=0;u<e.length;u++)if(l=n.groups[e[u]],l.options.style===`bar`&&l.visible===!0&&(n.options.groups.visibility[e[u]]===void 0||n.options.groups.visibility[e[u]]===!0))for(d=0;d<t[e[u]].length;d++)r.push({screen_x:t[e[u]][d].screen_x,screen_end:t[e[u]][d].screen_end,screen_y:t[e[u]][d].screen_y,x:t[e[u]][d].x,end:t[e[u]][d].end,y:t[e[u]][d].y,groupId:e[u],label:t[e[u]][d].label}),f+=1;if(f!==0)for(rb(r).call(r,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x}),MM._getDataIntersections(a,r),u=0;u<r.length;u++){l=n.groups[r[u].groupId];var p=l.options.barChart.minWidth==null?.1*l.options.barChart.width:l.options.barChart.minWidth;s=r[u].screen_x;var m=0;if(a[s]===void 0)u+1<r.length&&(o=Math.abs(r[u+1].screen_x-s)),c=MM._getSafeDrawData(o,l,p);else{var h=u+(a[s].amount-a[s].resolved);h<r.length&&(o=Math.abs(r[h].screen_x-s)),c=MM._getSafeDrawData(o,l,p),a[s].resolved+=1,l.options.stack===!0&&l.options.excludeFromStacking!==!0?r[u].screen_y<l.zeroPosition?(m=a[s].accumulatedNegative,a[s].accumulatedNegative+=l.zeroPosition-r[u].screen_y):(m=a[s].accumulatedPositive,a[s].accumulatedPositive+=l.zeroPosition-r[u].screen_y):l.options.barChart.sideBySide===!0&&(c.width/=a[s].amount,c.offset+=a[s].resolved*c.width-.5*c.width*(a[s].amount+1))}let e=c.width,t=r[u].screen_x;if(r[u].screen_end==null?t+=c.offset:(e=r[u].screen_end-r[u].screen_x,t+=e*.5),lA(t,r[u].screen_y-m,e,l.zeroPosition-r[u].screen_y,l.className+` vis-bar`,n.svgElements,n.svg,l.style),l.options.drawPoints.enabled===!0){let e={screen_x:r[u].screen_x,screen_y:r[u].screen_y-m,x:r[u].x,y:r[u].y,groupId:r[u].groupId,label:r[u].label};kM.draw([e],l,n,c.offset)}}},MM._getDataIntersections=function(e,t){for(var n,r=0;r<t.length;r++)r+1<t.length&&(n=Math.abs(t[r+1].screen_x-t[r].screen_x)),r>0&&(n=Math.min(n,Math.abs(t[r-1].screen_x-t[r].screen_x))),n===0&&(e[t[r].screen_x]===void 0&&(e[t[r].screen_x]={amount:0,resolved:0,accumulatedPositive:0,accumulatedNegative:0}),e[t[r].screen_x].amount+=1)},MM._getSafeDrawData=function(e,t,n){var r,a;return e<t.options.barChart.width&&e>0?(r=e<n?n:e,a=0,t.options.barChart.align===`left`?a-=.5*e:t.options.barChart.align===`right`&&(a+=.5*e)):(r=t.options.barChart.width,a=0,t.options.barChart.align===`left`?a-=.5*t.options.barChart.width:t.options.barChart.align===`right`&&(a+=.5*t.options.barChart.width)),{width:r,offset:a}},MM.getStackedYRange=function(e,t,n,r,a){if(e.length>0){rb(e).call(e,function(e,t){return e.screen_x===t.screen_x?e.groupId<t.groupId?-1:1:e.screen_x-t.screen_x});var o={};MM._getDataIntersections(o,e),t[r]=MM._getStackedYRange(o,e),t[r].yAxisOrientation=a,n.push(r)}},MM._getStackedYRange=function(e,t){for(var n,r=t[0].screen_y,a=t[0].screen_y,o=0;o<t.length;o++)n=t[o].screen_x,e[n]===void 0?(r=r>t[o].screen_y?t[o].screen_y:r,a=a<t[o].screen_y?t[o].screen_y:a):t[o].screen_y<0?e[n].accumulatedNegative+=t[o].screen_y:e[n].accumulatedPositive+=t[o].screen_y;for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r=r>e[s].accumulatedNegative?e[s].accumulatedNegative:r,r=r>e[s].accumulatedPositive?e[s].accumulatedPositive:r,a=a<e[s].accumulatedNegative?e[s].accumulatedNegative:a,a=a<e[s].accumulatedPositive?e[s].accumulatedPositive:a);return{min:r,max:a}};function NM(){}NM.calcPath=function(e,t){if(e!=null&&e.length>0){var n=[];return n=t.options.interpolation.enabled==1?NM._catmullRom(e,t):NM._linear(e),n}},NM.drawIcon=function(e,t,n,r,a,o){var s=a*.5,c,l,u=oA(`rect`,o.svgElements,o.svg);if(u.setAttributeNS(null,`x`,t),u.setAttributeNS(null,`y`,n-s),u.setAttributeNS(null,`width`,r),u.setAttributeNS(null,`height`,2*s),u.setAttributeNS(null,`class`,`vis-outline`),c=oA(`path`,o.svgElements,o.svg),c.setAttributeNS(null,`class`,e.className),e.style!==void 0&&c.setAttributeNS(null,`style`,e.style),c.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+(t+r)+`,`+n),e.options.shaded.enabled==1&&(l=oA(`path`,o.svgElements,o.svg),e.options.shaded.orientation==`top`?l.setAttributeNS(null,`d`,`M`+t+`, `+(n-s)+`L`+t+`,`+n+` L`+(t+r)+`,`+n+` L`+(t+r)+`,`+(n-s)):l.setAttributeNS(null,`d`,`M`+t+`,`+n+` L`+t+`,`+(n+s)+` L`+(t+r)+`,`+(n+s)+`L`+(t+r)+`,`+n),l.setAttributeNS(null,`class`,e.className+` vis-icon-fill`),e.options.shaded.style!==void 0&&e.options.shaded.style!==``&&l.setAttributeNS(null,`style`,e.options.shaded.style)),e.options.drawPoints.enabled==1){var d={style:e.options.drawPoints.style,styles:e.options.drawPoints.styles,size:e.options.drawPoints.size,className:e.className};cA(t+.5*r,n,d,o.svgElements,o.svg)}},NM.drawShading=function(e,t,n,r){if(t.options.shaded.enabled==1){var a=Number(r.svg.style.height.replace(`px`,``)),o=oA(`path`,r.svgElements,r.svg),s=`L`;t.options.interpolation.enabled==1&&(s=`C`);var c,l=0;l=t.options.shaded.orientation==`top`?0:t.options.shaded.orientation==`bottom`?a:Math.min(Math.max(0,t.zeroPosition),a),c=t.options.shaded.orientation==`group`&&n!=null&&n!=null?`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,s,!1)+` L`+n[n.length-1][0]+`,`+n[n.length-1][1]+` `+this.serializePath(n,s,!0)+n[0][0]+`,`+n[0][1]+` Z`:`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,s,!1)+` V`+l+` H`+e[0][0]+` Z`,o.setAttributeNS(null,`class`,t.className+` vis-fill`),t.options.shaded.style!==void 0&&o.setAttributeNS(null,`style`,t.options.shaded.style),o.setAttributeNS(null,`d`,c)}},NM.draw=function(e,t,n){if(e!=null&&e!=null){var r=oA(`path`,n.svgElements,n.svg);r.setAttributeNS(null,`class`,t.className),t.style!==void 0&&r.setAttributeNS(null,`style`,t.style);var a=`L`;t.options.interpolation.enabled==1&&(a=`C`),r.setAttributeNS(null,`d`,`M`+e[0][0]+`,`+e[0][1]+` `+this.serializePath(e,a,!1))}},NM.serializePath=function(e,t,n){if(e.length<2)return``;var r=t,a;if(n)for(a=e.length-2;a>0;a--)r+=e[a][0]+`,`+e[a][1]+` `;else for(a=1;a<e.length;a++)r+=e[a][0]+`,`+e[a][1]+` `;return r},NM._catmullRomUniform=function(e){var t,n,r,a,o,s,c=[];c.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var l=1/6,u=e.length,d=0;d<u-1;d++)t=d==0?e[0]:e[d-1],n=e[d],r=e[d+1],a=d+2<u?e[d+2]:r,o={screen_x:(-t.screen_x+6*n.screen_x+r.screen_x)*l,screen_y:(-t.screen_y+6*n.screen_y+r.screen_y)*l},s={screen_x:(n.screen_x+6*r.screen_x-a.screen_x)*l,screen_y:(n.screen_y+6*r.screen_y-a.screen_y)*l},c.push([o.screen_x,o.screen_y]),c.push([s.screen_x,s.screen_y]),c.push([r.screen_x,r.screen_y]);return c},NM._catmullRom=function(e,t){var n=t.options.interpolation.alpha;if(n==0||n===void 0)return this._catmullRomUniform(e);var r,a,o,s,c,l,u,d,f,p,m,h,g,_,v,y,b,x,S,C=[];C.push([Math.round(e[0].screen_x),Math.round(e[0].screen_y)]);for(var w=e.length,T=0;T<w-1;T++)r=T==0?e[0]:e[T-1],a=e[T],o=e[T+1],s=T+2<w?e[T+2]:o,u=Math.sqrt((r.screen_x-a.screen_x)**2+(r.screen_y-a.screen_y)**2),d=Math.sqrt((a.screen_x-o.screen_x)**2+(a.screen_y-o.screen_y)**2),f=Math.sqrt((o.screen_x-s.screen_x)**2+(o.screen_y-s.screen_y)**2),_=f**+n,y=f**(2*n),v=d**+n,b=d**(2*n),S=u**+n,x=u**(2*n),p=2*x+3*S*v+b,m=2*y+3*_*v+b,h=3*S*(S+v),h>0&&(h=1/h),g=3*_*(_+v),g>0&&(g=1/g),c={screen_x:(-b*r.screen_x+p*a.screen_x+x*o.screen_x)*h,screen_y:(-b*r.screen_y+p*a.screen_y+x*o.screen_y)*h},l={screen_x:(y*a.screen_x+m*o.screen_x-b*s.screen_x)*g,screen_y:(y*a.screen_y+m*o.screen_y-b*s.screen_y)*g},c.screen_x==0&&c.screen_y==0&&(c=a),l.screen_x==0&&l.screen_y==0&&(l=o),C.push([c.screen_x,c.screen_y]),C.push([l.screen_x,l.screen_y]),C.push([o.screen_x,o.screen_y]);return C},NM._linear=function(e){for(var t=[],n=0;n<e.length;n++)t.push([e[n].screen_x,e[n].screen_y]);return t};function PM(e,t,n,r){this.id=t;var a=[`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`drawPoints`,`shaded`,`interpolation`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`];this.options=q.selectiveBridgeObject(a,n),this.usingDefaultStyle=e.className===void 0,this.groupsUsingDefaultStyles=r,this.zeroPosition=0,this.update(e),this.usingDefaultStyle==1&&(this.groupsUsingDefaultStyles[0]+=1),this.itemsData=[],this.visible=e.visible===void 0||e.visible}PM.prototype.setItems=function(e){e==null?this.itemsData=[]:(this.itemsData=e,rb(this.options)==1&&q.insertSort(this.itemsData,function(e,t){return e.x>t.x?1:-1}))},PM.prototype.getItems=function(){return this.itemsData},PM.prototype.setZeroPosition=function(e){this.zeroPosition=e},PM.prototype.setOptions=function(e){e!==void 0&&(q.selectiveDeepExtend([`sampling`,`style`,`sort`,`yAxisOrientation`,`barChart`,`zIndex`,`excludeFromStacking`,`excludeFromLegend`],this.options,e),typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),q.mergeOptions(this.options,e,`interpolation`),q.mergeOptions(this.options,e,`drawPoints`),q.mergeOptions(this.options,e,`shaded`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)))},PM.prototype.update=function(e){this.group=e,this.content=e.content||`graph`,this.className=e.className||this.className||`vis-graph-group`+this.groupsUsingDefaultStyles[0]%10,this.visible=e.visible===void 0||e.visible,this.style=e.style,this.setOptions(e.options)},PM.prototype.getLegend=function(e,t,n,r,a){switch((n==null||n==null)&&(n={svg:document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),svgElements:{},options:this.options,groups:[this]}),(r==null||r==null)&&(r=0),(a==null||a==null)&&(a=.5*t),this.options.style){case`line`:NM.drawIcon(this,r,a,e,t,n);break;case`points`:case`point`:kM.drawIcon(this,r,a,e,t,n);break;case`bar`:MM.drawIcon(this,r,a,e,t,n)}return{icon:n.svg,label:this.content,orientation:this.options.yAxisOrientation}},PM.prototype.getYRange=function(e){for(var t=e[0].y,n=e[0].y,r=0;r<e.length;r++)t=t>e[r].y?e[r].y:t,n=n<e[r].y?e[r].y:n;return{min:t,max:n,yAxisOrientation:this.options.yAxisOrientation}};var FM=class{constructor(e,t,n){var r;this.id=null,this.parent=null,this.data=e,this.dom=null,this.conversion=t||{},this.defaultOptions={locales:cM,locale:`en`},this.options=q.extend({},this.defaultOptions,n),this.options.locales=q.extend({},cM,this.options.locales);let a=this.defaultOptions.locales[this.defaultOptions.locale];W(r=Cx(this.options.locales)).call(r,e=>{this.options.locales[e]=q.extend({},a,this.options.locales[e])}),this.selected=!1,this.displayed=!1,this.groupShowing=!0,this.selectable=n&&n.selectable||!1,this.dirty=!0,this.top=null,this.right=null,this.left=null,this.width=null,this.height=null,this.setSelectability(e),this.editable=null,this._updateEditStatus()}select(){this.selectable&&(this.selected=!0,this.dirty=!0,this.displayed&&this.redraw())}unselect(){this.selected=!1,this.dirty=!0,this.displayed&&this.redraw()}setData(e){e.group!=null&&this.data.group!=e.group&&this.parent!=null&&this.parent.itemSet._moveToGroup(this,e.group),this.setSelectability(e),this.parent&&(this.parent.stackDirty=!0),e.subgroup!=null&&this.data.subgroup!=e.subgroup&&this.parent!=null&&this.parent.changeSubgroup(this,this.data.subgroup,e.subgroup),this.data=e,this._updateEditStatus(),this.dirty=!0,this.displayed&&this.redraw()}setSelectability(e){e&&(this.selectable=e.selectable===void 0||!!e.selectable)}setParent(e){this.displayed?(this.hide(),this.parent=e,this.parent&&this.show()):this.parent=e}isVisible(){return!1}show(){return!1}hide(){return!1}redraw(){}repositionX(){}repositionY(){}_repaintDragCenter(){if(this.selected&&this.editable.updateTime&&!this.dom.dragCenter){var e,t;let n=this,r=document.createElement(`div`);r.className=`vis-drag-center`,r.dragCenterItem=this,this.hammerDragCenter=new hA(r),this.hammerDragCenter.on(`tap`,e=>{n.parent.itemSet.body.emitter.emit(`click`,{event:e,item:n.id})}),this.hammerDragCenter.on(`doubletap`,e=>{e.stopPropagation(),n.parent.itemSet._onUpdateItem(n),n.parent.itemSet.body.emitter.emit(`doubleClick`,{event:e,item:n.id})}),this.hammerDragCenter.on(`panstart`,e=>{e.stopPropagation(),n.parent.itemSet._onDragStart(e)}),this.hammerDragCenter.on(`panmove`,V(e=n.parent.itemSet._onDrag).call(e,n.parent.itemSet)),this.hammerDragCenter.on(`panend`,V(t=n.parent.itemSet._onDragEnd).call(t,n.parent.itemSet)),this.hammerDragCenter.get(`press`).set({time:1e4}),this.dom.box?this.dom.dragLeft?this.dom.box.insertBefore(r,this.dom.dragLeft):this.dom.box.appendChild(r):this.dom.point&&this.dom.point.appendChild(r),this.dom.dragCenter=r}else!this.selected&&this.dom.dragCenter&&(this.dom.dragCenter.parentNode&&this.dom.dragCenter.parentNode.removeChild(this.dom.dragCenter),this.dom.dragCenter=null,this.hammerDragCenter&&=(this.hammerDragCenter.destroy(),null))}_repaintDeleteButton(e){let t=(this.options.editable.overrideItems||this.editable==null)&&this.options.editable.remove||!this.options.editable.overrideItems&&this.editable!=null&&this.editable.remove;if(this.selected&&t&&!this.dom.deleteButton){let t=this,n=document.createElement(`div`);n.className=this.options.rtl?`vis-delete-rtl`:`vis-delete`;let r=this.options.locales[this.options.locale];r||=(this.warned||=(console.warn(`WARNING: options.locales['${this.options.locale}'] not found. See https://visjs.github.io/vis-timeline/docs/timeline/#Localization`),!0),this.options.locales.en),n.title=r.deleteSelected,this.hammerDeleteButton=new hA(n).on(`tap`,e=>{e.stopPropagation(),t.parent.removeFromDataSet(t)}),e.appendChild(n),this.dom.deleteButton=n}else(!this.selected||!t)&&this.dom.deleteButton&&(this.dom.deleteButton.parentNode&&this.dom.deleteButton.parentNode.removeChild(this.dom.deleteButton),this.dom.deleteButton=null,this.hammerDeleteButton&&=(this.hammerDeleteButton.destroy(),null))}_repaintOnItemUpdateTimeTooltip(e){if(!this.options.tooltipOnItemUpdateTime)return;let t=(this.options.editable.updateTime||this.data.editable===!0)&&this.data.editable!==!1;if(this.selected&&t&&!this.dom.onItemUpdateTimeTooltip){let t=document.createElement(`div`);t.className=`vis-onUpdateTime-tooltip`,e.appendChild(t),this.dom.onItemUpdateTimeTooltip=t}else!this.selected&&this.dom.onItemUpdateTimeTooltip&&(this.dom.onItemUpdateTimeTooltip.parentNode&&this.dom.onItemUpdateTimeTooltip.parentNode.removeChild(this.dom.onItemUpdateTimeTooltip),this.dom.onItemUpdateTimeTooltip=null);if(this.dom.onItemUpdateTimeTooltip){this.dom.onItemUpdateTimeTooltip.style.visibility=this.parent.itemSet.touchParams.itemIsDragging?`visible`:`hidden`,this.dom.onItemUpdateTimeTooltip.style.transform=`translateX(-50%)`,this.dom.onItemUpdateTimeTooltip.style.left=`50%`;let e=this.parent.itemSet.body.domProps.scrollTop,t;t=this.options.orientation.item==`top`?this.top:this.parent.height-this.top-this.height,t+this.parent.top-50<-e?(this.dom.onItemUpdateTimeTooltip.style.bottom=``,this.dom.onItemUpdateTimeTooltip.style.top=`${this.height+2}px`):(this.dom.onItemUpdateTimeTooltip.style.top=``,this.dom.onItemUpdateTimeTooltip.style.bottom=`${this.height+2}px`);let r,a;if(this.options.tooltipOnItemUpdateTime&&this.options.tooltipOnItemUpdateTime.template){var n;a=V(n=this.options.tooltipOnItemUpdateTime.template).call(n,this),r=a(this.data)}else r=`start: ${_A(this.data.start).format(`MM/DD/YYYY hh:mm`)}`,this.data.end&&(r+=`<br> end: ${_A(this.data.end).format(`MM/DD/YYYY hh:mm`)}`);this.dom.onItemUpdateTimeTooltip.innerHTML=q.xss(r)}}_getItemData(){return this.parent.itemSet.itemsData.get(this.id)}_updateContents(e){let t,n,r,a,o,s=this._getItemData(),c=(this.dom.box||this.dom.point).getElementsByClassName(`vis-item-visible-frame`)[0];if(this.options.visibleFrameTemplate){var l;o=V(l=this.options.visibleFrameTemplate).call(l,this),a=q.xss(o(s,c))}else a=``;if(c){if(a instanceof Object&&!(a instanceof Element))o(s,c);else if(n=this._contentToString(this.itemVisibleFrameContent)!==this._contentToString(a),n){if(a instanceof Element)c.innerHTML=``,c.appendChild(a);else if(a!=null)c.innerHTML=q.xss(a);else if(this.data.type!=`background`||this.data.content!==void 0)throw Error(`Property "content" missing in item ${this.id}`);this.itemVisibleFrameContent=a}}if(this.options.template){var u;r=V(u=this.options.template).call(u,this),t=r(s,e,this.data)}else t=this.data.content;if(t instanceof Object&&!(t instanceof Element))r(s,e);else if(n=this._contentToString(this.content)!==this._contentToString(t),n){if(t instanceof Element)e.innerHTML=``,e.appendChild(t);else if(t!=null)e.innerHTML=q.xss(t);else if(this.data.type!=`background`||this.data.content!==void 0)throw Error(`Property "content" missing in item ${this.id}`);this.content=t}}_updateDataAttributes(e){if(this.options.dataAttributes&&this.options.dataAttributes.length>0){let t=[];if(G(this.options.dataAttributes))t=this.options.dataAttributes;else if(this.options.dataAttributes==`all`)t=Cx(this.data);else return;for(let n of t){let t=this.data[n];t==null?e.removeAttribute(`data-${n}`):e.setAttribute(`data-${n}`,t)}}}_updateStyle(e){this.style&&=(q.removeCssText(e,this.style),null),this.data.style&&(q.addCssText(e,this.data.style),this.style=this.data.style)}_contentToString(e){return typeof e==`string`?e:e&&`outerHTML`in e?e.outerHTML:e}_updateEditStatus(){this.options&&(typeof this.options.editable==`boolean`?this.editable={updateTime:this.options.editable,updateGroup:this.options.editable,remove:this.options.editable}:typeof this.options.editable==`object`&&(this.editable={},q.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.options.editable))),(!this.options||!this.options.editable||this.options.editable.overrideItems!==!0)&&this.data&&(typeof this.data.editable==`boolean`?this.editable={updateTime:this.data.editable,updateGroup:this.data.editable,remove:this.data.editable}:typeof this.data.editable==`object`&&(this.editable={},q.selectiveExtend([`updateTime`,`updateGroup`,`remove`],this.editable,this.data.editable)))}getWidthLeft(){return 0}getWidthRight(){return 0}getTitle(){if(this.options.tooltip&&this.options.tooltip.template){var e;return V(e=this.options.tooltip.template).call(e,this)(this._getItemData(),this.data)}return this.data.title}};FM.prototype.stack=!0;var IM=class extends FM{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return!this.cluster&&this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.visibleFrame=document.createElement(`div`),this.dom.visibleFrame.className=`vis-item-visible-frame`,this.dom.box.appendChild(this.dom.visibleFrame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=this.baseClassName+t,this.dom.content.style.maxWidth=`none`}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.frame).overflow!==`hidden`,this.whiteSpace=window.getComputedStyle(this.dom.content).whiteSpace!==`nowrap`,{content:{width:this.dom.content.offsetWidth},box:{height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=e.box.height,this.dom.content.style.maxWidth=``,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDeleteButton(this.dom.box),this._repaintDragCenter(),this._repaintDragLeft(),this._repaintDragRight()}redraw(e){var t,n,r,a;let o,s=[V(t=this._createDomElement).call(t,this),V(n=this._appendDomElement).call(n,this),V(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;o=V(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;V(e=this._updateDomComponentsSizes).call(e,this)(o)}},V(a=this._repaintDomAdditionals).call(a,this)];if(e)return s;{let e;return W(s).call(s,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom.box;e.parentNode&&e.parentNode.removeChild(e),this.displayed=!1}}repositionX(e){let t=this.parent.width,n=this.conversion.toScreen(this.data.start),r=this.conversion.toScreen(this.data.end),a=this.data.align===void 0?this.options.align:this.data.align,o,s;this.data.limitSize!==!1&&(e===void 0||e===!0)&&(n<-t&&(n=-t),r>2*t&&(r=2*t));let c=Math.max(Math.round((r-n)*1e3)/1e3,1);switch(this.overflow?(this.options.rtl?this.right=n:this.left=n,this.width=c+this.props.content.width,s=this.props.content.width):(this.options.rtl?this.right=n:this.left=n,this.width=c,s=Math.min(r-n,this.props.content.width)),this.options.rtl?this.dom.box.style.transform=`translateX(${this.right*-1}px)`:this.dom.box.style.transform=`translateX(${this.left}px)`,this.dom.box.style.width=`${c}px`,this.whiteSpace&&(this.height=this.dom.box.offsetHeight),a){case`left`:this.dom.content.style.transform=`translateX(0)`;break;case`right`:if(this.options.rtl){let e=Math.max(c-s,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max(c-s,0)}px)`;break;case`center`:if(this.options.rtl){let e=Math.max((c-s)/2,0)*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${Math.max((c-s)/2,0)}px)`;break;default:if(o=this.overflow?r>0?Math.max(-n,0):-s:n<0?-n:0,this.options.rtl){let e=o*-1;this.dom.content.style.transform=`translateX(${e}px)`}else this.dom.content.style.transform=`translateX(${o}px)`}}repositionY(){let e=this.options.orientation.item,t=this.dom.box;e==`top`?t.style.top=`${this.top}px`:t.style.top=`${this.parent.height-this.top-this.height}px`}_repaintDragLeft(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragLeft){let e=document.createElement(`div`);e.className=`vis-drag-left`,e.dragLeftItem=this,this.dom.box.appendChild(e),this.dom.dragLeft=e}else!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragLeft&&(this.dom.dragLeft.parentNode&&this.dom.dragLeft.parentNode.removeChild(this.dom.dragLeft),this.dom.dragLeft=null)}_repaintDragRight(){if((this.selected||this.options.itemsAlwaysDraggable.range)&&this.editable.updateTime&&!this.dom.dragRight){let e=document.createElement(`div`);e.className=`vis-drag-right`,e.dragRightItem=this,this.dom.box.appendChild(e),this.dom.dragRight=e}else!this.selected&&!this.options.itemsAlwaysDraggable.range&&this.dom.dragRight&&(this.dom.dragRight.parentNode&&this.dom.dragRight.parentNode.removeChild(this.dom.dragRight),this.dom.dragRight=null)}};IM.prototype.baseClassName=`vis-item vis-range`;var LM=class extends FM{constructor(e,t,n){if(super(e,t,n),this.props={content:{width:0}},this.overflow=!1,e){if(e.start==null)throw Error(`Property "start" missing in item ${e.id}`);if(e.end==null)throw Error(`Property "end" missing in item ${e.id}`)}}isVisible(e){return this.data.start<e.end&&this.data.end>e.start}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`div`),this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-item-overflow`,this.dom.box.appendChild(this.dom.frame),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.frame.appendChild(this.dom.content),this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.box)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.content),this._updateStyle(this.dom.box);let e=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``);this.dom.box.className=this.baseClassName+e}}_getDomComponentsSizes(){return this.overflow=window.getComputedStyle(this.dom.content).overflow!==`hidden`,{content:{width:this.dom.content.offsetWidth}}}_updateDomComponentsSizes(e){this.props.content.width=e.content.width,this.height=0,this.dirty=!1}_repaintDomAdditionals(){}redraw(e){var t,n,r,a;let o,s=[V(t=this._createDomElement).call(t,this),V(n=this._appendDomElement).call(n,this),V(r=this._updateDirtyDomComponents).call(r,this),()=>{if(this.dirty){var e;o=V(e=this._getDomComponentsSizes).call(e,this)()}},()=>{if(this.dirty){var e;V(e=this._updateDomComponentsSizes).call(e,this)(o)}},V(a=this._repaintDomAdditionals).call(a,this)];if(e)return s;{let e;return W(s).call(s,t=>{e=t()}),e}}repositionY(){let e,t=this.options.orientation.item;if(this.data.subgroup!==void 0){let e=this.data.subgroup;this.dom.box.style.height=`${this.parent.subgroups[e].height}px`,t==`top`?this.dom.box.style.top=`${this.parent.top+this.parent.subgroups[e].top}px`:this.dom.box.style.top=`${this.parent.top+this.parent.height-this.parent.subgroups[e].top-this.parent.subgroups[e].height}px`,this.dom.box.style.bottom=``}else this.parent instanceof xj?(e=Math.max(this.parent.height,this.parent.itemSet.body.domProps.center.height,this.parent.itemSet.body.domProps.centerContainer.height),this.dom.box.style.bottom=t==`bottom`?`0`:``,this.dom.box.style.top=t==`top`?`0`:``):(e=this.parent.height,this.dom.box.style.top=`${this.parent.top}px`,this.dom.box.style.bottom=``);this.dom.box.style.height=`${e}px`}};LM.prototype.baseClassName=`vis-item vis-background`,LM.prototype.stack=!1,LM.prototype.show=IM.prototype.show,LM.prototype.hide=IM.prototype.hide,LM.prototype.repositionX=IM.prototype.repositionX;var RM=class extends FM{constructor(e,t,n){if(super(e,t,n),this.props={dot:{width:0,height:0},line:{width:0,height:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t,n=this.data.align||this.options.align,r=this.width*e.getMillisecondsPerPixel();return t=n==`right`?this.data.start.getTime()>e.start&&this.data.start.getTime()-r<e.end:n==`left`?this.data.start.getTime()+r>e.start&&this.data.start.getTime()<e.end:this.data.start.getTime()+r/2>e.start&&this.data.start.getTime()-r/2<e.end,t}_createDomElement(){this.dom||(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-line`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-dot`,this.dom.box[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}if(!this.dom.line.parentNode){var e=this.parent.dom.background;if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){let t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.box.className=`vis-item vis-box${t}`,this.dom.line.className=`vis-item vis-line${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},dot:{height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},line:{width:this.dom.line.offsetWidth},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}}}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.props.dot.height=e.dot.height,this.props.dot.width=e.dot.width,this.props.line.width=e.line.width,this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.box)}redraw(e){var t,n,r,a;let o,s=[V(t=this._createDomElement).call(t,this),V(n=this._appendDomElement).call(n,this),V(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(o=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;V(e=this._updateDomComponentsSizes).call(e,this)(o)}},V(a=this._repaintDomAdditionals).call(a,this)];if(e)return s;{let e;return W(s).call(s,t=>{e=t()}),e}}show(e){if(!this.displayed)return this.redraw(e)}hide(){if(this.displayed){let e=this.dom;e.box.remove?e.box.remove():e.box.parentNode&&e.box.parentNode.removeChild(e.box),e.line.remove?e.line.remove():e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.remove?e.dot.remove():e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot),this.displayed=!1}}repositionXY(){let e=this.options.rtl,t=function(e,t,n){var r;let a=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t===void 0&&n===void 0)return;let o=a?t*-1:t;n===void 0?e.style.transform=`translateX(${o}px)`:t===void 0?e.style.transform=`translateY(${n}px)`:e.style.transform=Zb(r=`translate(${o}px, `).call(r,n,`px)`)};t(this.dom.box,this.boxX,this.boxY,e),t(this.dom.dot,this.dotX,this.dotY,e),t(this.dom.line,this.lineX,this.lineY,e)}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.align===void 0?this.options.align:this.data.align,n=this.props.line.width,r=this.props.dot.width;t==`right`?(this.boxX=e-this.width,this.lineX=e-n,this.dotX=e-n/2-r/2):t==`left`?(this.boxX=e,this.lineX=e,this.dotX=e+n/2-r/2):(this.boxX=e-this.width/2,this.lineX=this.options.rtl?e-n:e-n/2,this.dotX=e-r/2),this.options.rtl?this.right=this.boxX:this.left=this.boxX,this.repositionXY()}repositionY(){let e=this.options.orientation.item,t=this.dom.line.style;if(e==`top`){let e=this.parent.top+this.top+1;this.boxY=this.top||0,t.height=`${e}px`,t.bottom=``,t.top=`0`}else{let e=this.parent.itemSet.props.height-this.parent.top-this.parent.height+this.top;this.boxY=this.parent.height-this.top-(this.height||0),t.height=`${e}px`,t.top=``,t.bottom=`0`}this.dotY=-this.props.dot.height/2,this.repositionXY()}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}},zM=class e extends FM{constructor(e,t,n){let r=Rb({},{fitOnDoubleClick:!0},n,{editable:!1});if(super(e,t,r),this.props={content:{width:0,height:0}},!e||e.uiItems==null)throw Error(`Property "uiItems" missing in item `+e.id);this.id=Vk(),this.group=e.group,this._setupRange(),this.emitter=this.data.eventEmitter,this.range=this.data.range,this.attached=!1,this.isCluster=!0,this.data.isCluster=!0}hasItems(){return this.data.uiItems&&this.data.uiItems.length&&this.attached}setUiItems(e){this.detach(),this.data.uiItems=e,this._setupRange(),this.attach()}isVisible(e){let t=this.data.end?this.data.end-this.data.start:0,n=this.width*e.getMillisecondsPerPixel(),r=Math.max(this.data.start.getTime()+t,this.data.start.getTime()+n);return this.data.start<e.end&&r>e.start&&this.hasItems()}getData(){return{isCluster:!0,id:this.id,items:this.data.items||[],data:this.data}}redraw(e){var t,n,r,a,o,s,c,l=[V(t=this._createDomElement).call(t,this),V(n=this._appendDomElement).call(n,this),V(r=this._updateDirtyDomComponents).call(r,this),V(a=function(){this.dirty&&(c=this._getDomComponentsSizes())}).call(a,this),V(o=function(){if(this.dirty){var e;V(e=this._updateDomComponentsSizes).call(e,this)(c)}}).call(o,this),V(s=this._repaintDomAdditionals).call(s,this)];if(e)return l;var u;return W(l).call(l,function(e){u=e()}),u}show(){this.displayed||this.redraw()}hide(){if(this.displayed){var e=this.dom;e.box.parentNode&&e.box.parentNode.removeChild(e.box),this.options.showStipes&&(e.line.parentNode&&e.line.parentNode.removeChild(e.line),e.dot.parentNode&&e.dot.parentNode.removeChild(e.dot)),this.displayed=!1}}repositionX(){let e=this.conversion.toScreen(this.data.start),t=this.data.end?this.conversion.toScreen(this.data.end):0;if(t)this.repositionXWithRanges(e,t);else{let t=this.data.align===void 0?this.options.align:this.data.align;this.repositionXWithoutRanges(e,t)}this.options.showStipes&&(this.dom.line.style.display=this._isStipeVisible()?`block`:`none`,this.dom.dot.style.display=this._isStipeVisible()?`block`:`none`,this._isStipeVisible()&&this.repositionStype(e,t))}repositionStype(e,t){this.dom.line.style.display=`block`,this.dom.dot.style.display=`block`;let n=this.dom.line.offsetWidth,r=this.dom.dot.offsetWidth;if(t){let a=n+e+(t-e)/2,o=a-r/2,s=this.options.rtl?a*-1:a,c=this.options.rtl?o*-1:o;this.dom.line.style.transform=`translateX(${s}px)`,this.dom.dot.style.transform=`translateX(${c}px)`}else{let t=this.options.rtl?e*-1:e,n=this.options.rtl?(e-r/2)*-1:e-r/2;this.dom.line.style.transform=`translateX(${t}px)`,this.dom.dot.style.transform=`translateX(${n}px)`}}repositionXWithoutRanges(e,t){t==`right`?this.options.rtl?(this.right=e-this.width,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width,this.dom.box.style.left=this.left+`px`):t==`left`?this.options.rtl?(this.right=e,this.dom.box.style.right=this.right+`px`):(this.left=e,this.dom.box.style.left=this.left+`px`):this.options.rtl?(this.right=e-this.width/2,this.dom.box.style.right=this.right+`px`):(this.left=e-this.width/2,this.dom.box.style.left=this.left+`px`)}repositionXWithRanges(e,t){let n=Math.round(Math.max(t-e+.5,1));this.options.rtl?this.right=e:this.left=e,this.width=Math.max(n,this.minWidth||0),this.options.rtl?this.dom.box.style.right=this.right+`px`:this.dom.box.style.left=this.left+`px`,this.dom.box.style.width=n+`px`}repositionY(){var e=this.options.orientation.item,t=this.dom.box;if(e==`top`?t.style.top=(this.top||0)+`px`:t.style.top=(this.parent.height-this.top-this.height||0)+`px`,this.options.showStipes){if(e==`top`)this.dom.line.style.top=`0`,this.dom.line.style.height=this.parent.top+this.top+1+`px`,this.dom.line.style.bottom=``;else{var n=this.parent.itemSet.props.height,r=n-this.parent.top-this.parent.height+this.top;this.dom.line.style.top=n-r+`px`,this.dom.line.style.bottom=`0`}this.dom.dot.style.top=-this.dom.dot.offsetHeight/2+`px`}}getWidthLeft(){return this.width/2}getWidthRight(){return this.width/2}move(){this.repositionX(),this.repositionY()}attach(){var e;for(let e of this.data.uiItems)e.cluster=this;this.data.items=U(e=this.data.uiItems).call(e,e=>e.data),this.attached=!0,this.dirty=!0}detach(){let e=arguments.length>0&&arguments[0]!==void 0&&arguments[0];if(this.hasItems()){for(let e of this.data.uiItems)delete e.cluster;this.attached=!1,e&&this.group&&(this.group.remove(this),this.group=null),this.data.items=[],this.dirty=!0}}_onDoubleClick(){this._fit()}_setupRange(){var e,t,n;let r=U(e=this.data.uiItems).call(e,e=>({start:e.data.start.valueOf(),end:e.data.end?e.data.end.valueOf():e.data.start.valueOf()}));this.data.min=Math.min(...U(r).call(r,e=>Math.min(e.start,e.end||e.start))),this.data.max=Math.max(...U(r).call(r,e=>Math.max(e.start,e.end||e.start)));let a=U(t=this.data.uiItems).call(t,e=>e.center),o=rm(a).call(a,(e,t)=>e+t,0)/this.data.uiItems.length;Sb(n=this.data.uiItems).call(n,e=>e.data.end)?(this.data.start=new Date(this.data.min),this.data.end=new Date(this.data.max)):(this.data.start=new Date(o),this.data.end=null)}_getUiItems(){if(this.data.uiItems&&this.data.uiItems.length){var e;return H(e=this.data.uiItems).call(e,e=>e.cluster===this)}return[]}_createDomElement(){if(!this.dom){if(this.dom={},this.dom.box=document.createElement(`DIV`),this.dom.content=document.createElement(`DIV`),this.dom.content.className=`vis-item-content`,this.dom.box.appendChild(this.dom.content),this.options.showStipes&&(this.dom.line=document.createElement(`DIV`),this.dom.line.className=`vis-cluster-line`,this.dom.line.style.display=`none`,this.dom.dot=document.createElement(`DIV`),this.dom.dot.className=`vis-cluster-dot`,this.dom.dot.style.display=`none`),this.options.fitOnDoubleClick){var t;this.dom.box.ondblclick=V(t=e.prototype._onDoubleClick).call(t,this)}this.dom.box[`vis-item`]=this,this.dirty=!0}}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.box.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.box)}let e=this.parent.dom.background;if(this.options.showStipes){if(!this.dom.line.parentNode){if(!e)throw Error(`Cannot redraw item: parent has no background container element`);e.appendChild(this.dom.line)}if(!this.dom.dot.parentNode){var t=this.parent.dom.axis;if(!e)throw Error(`Cannot redraw item: parent has no axis container element`);t.appendChild(this.dom.dot)}}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.box),this._updateStyle(this.dom.box);let e=this.baseClassName+` `+(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+` vis-readonly`;this.dom.box.className=`vis-item `+e,this.options.showStipes&&(this.dom.line.className=`vis-item vis-cluster-line `+(this.selected?` vis-selected`:``),this.dom.dot.className=`vis-item vis-cluster-dot `+(this.selected?` vis-selected`:``)),this.data.end&&(this.dom.content.style.maxWidth=`none`)}}_getDomComponentsSizes(){let e={previous:{right:this.dom.box.style.right,left:this.dom.box.style.left},box:{width:this.dom.box.offsetWidth,height:this.dom.box.offsetHeight}};return this.options.showStipes&&(e.dot={height:this.dom.dot.offsetHeight,width:this.dom.dot.offsetWidth},e.line={width:this.dom.line.offsetWidth}),e}_updateDomComponentsSizes(e){this.options.rtl?this.dom.box.style.right=`0px`:this.dom.box.style.left=`0px`,this.data.end?this.minWidth=e.box.width:this.width=e.box.width,this.height=e.box.height,this.options.rtl?this.dom.box.style.right=e.previous.right:this.dom.box.style.left=e.previous.left,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.box)}_isStipeVisible(){return this.minWidth>=this.width||!this.data.end}_getFitRange(){let e=.05*(this.data.max-this.data.min)/2;return{fitStart:this.data.min-e,fitEnd:this.data.max+e}}_fit(){if(this.emitter){let e=this._getFitRange(),t=e.fitStart,n=e.fitEnd,r={start:new Date(t),end:new Date(n),animation:!0};this.emitter.emit(`fit`,r)}}_getItemData(){return this.data}};zM.prototype.baseClassName=`vis-item vis-range vis-cluster`;var BM=class extends FM{constructor(e,t,n){if(super(e,t,n),this.props={dot:{top:0,width:0,height:0},content:{height:0,marginLeft:0,marginRight:0}},e&&e.start==null)throw Error(`Property "start" missing in item ${e}`)}isVisible(e){if(this.cluster)return!1;let t=this.width*e.getMillisecondsPerPixel();return this.data.start.getTime()+t>e.start&&this.data.start<e.end}_createDomElement(){this.dom||(this.dom={},this.dom.point=document.createElement(`div`),this.dom.content=document.createElement(`div`),this.dom.content.className=`vis-item-content`,this.dom.point.appendChild(this.dom.content),this.dom.dot=document.createElement(`div`),this.dom.point.appendChild(this.dom.dot),this.dom.point[`vis-item`]=this,this.dirty=!0)}_appendDomElement(){if(!this.parent)throw Error(`Cannot redraw item: no parent attached`);if(!this.dom.point.parentNode){let e=this.parent.dom.foreground;if(!e)throw Error(`Cannot redraw item: parent has no foreground container element`);e.appendChild(this.dom.point)}this.displayed=!0}_updateDirtyDomComponents(){if(this.dirty){this._updateContents(this.dom.content),this._updateDataAttributes(this.dom.point),this._updateStyle(this.dom.point);let e=this.editable.updateTime||this.editable.updateGroup,t=(this.data.className?` `+this.data.className:``)+(this.selected?` vis-selected`:``)+(e?` vis-editable`:` vis-readonly`);this.dom.point.className=`vis-item vis-point${t}`,this.dom.dot.className=`vis-item vis-dot${t}`}}_getDomComponentsSizes(){return{dot:{width:this.dom.dot.offsetWidth,height:this.dom.dot.offsetHeight},content:{width:this.dom.content.offsetWidth,height:this.dom.content.offsetHeight},point:{width:this.dom.point.offsetWidth,height:this.dom.point.offsetHeight}}}_updateDomComponentsSizes(e){this.props.dot.width=e.dot.width,this.props.dot.height=e.dot.height,this.props.content.height=e.content.height,this.options.rtl?this.dom.content.style.marginRight=`${this.props.dot.width/2}px`:this.dom.content.style.marginLeft=`${this.props.dot.width/2}px`,this.width=e.point.width,this.height=e.point.height,this.dom.dot.style.top=`${(this.height-this.props.dot.height)/2}px`;let t=this.props.dot.width,n=this.options.rtl?t/2:t/2*-1;this.dom.dot.style.transform=`translateX(${n}px`,this.dirty=!1}_repaintDomAdditionals(){this._repaintOnItemUpdateTimeTooltip(this.dom.point),this._repaintDragCenter(),this._repaintDeleteButton(this.dom.point)}redraw(e){var t,n,r,a;let o,s=[V(t=this._createDomElement).call(t,this),V(n=this._appendDomElement).call(n,this),V(r=this._updateDirtyDomComponents).call(r,this),()=>{this.dirty&&(o=this._getDomComponentsSizes())},()=>{if(this.dirty){var e;V(e=this._updateDomComponentsSizes).call(e,this)(o)}},V(a=this._repaintDomAdditionals).call(a,this)];if(e)return s;{let e;return W(s).call(s,t=>{e=t()}),e}}repositionXY(){let e=this.options.rtl;(function(e,t,n){var r;let a=arguments.length>3&&arguments[3]!==void 0&&arguments[3];if(t===void 0&&n===void 0)return;let o=a?t*-1:t;n===void 0?e.style.transform=`translateX(${o}px)`:t===void 0?e.style.transform=`translateY(${n}px)`:e.style.transform=Zb(r=`translate(${o}px, `).call(r,n,`px)`)})(this.dom.point,this.pointX,this.pointY,e)}show(e){if(!this.displayed)return this.redraw(e)}hide(){this.displayed&&=(this.dom.point.parentNode&&this.dom.point.parentNode.removeChild(this.dom.point),!1)}repositionX(){let e=this.conversion.toScreen(this.data.start);this.pointX=e,this.options.rtl?this.right=e-this.props.dot.width:this.left=e-this.props.dot.width,this.repositionXY()}repositionY(){this.pointY=this.options.orientation.item==`top`?this.top:this.parent.height-this.top-this.height,this.repositionXY()}getWidthLeft(){return this.props.dot.width}getWidthRight(){return this.props.dot.width}},VM={},HM;function UM(){if(HM)return VM;HM=1;var e=I(),t=ia().find,n=sc(),r=`find`,a=!0;return r in[]&&[,][r](function(){a=!1}),e({target:`Array`,proto:!0,forced:a},{find:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),n(r),VM}var WM,GM;function KM(){return GM||(GM=1,UM(),WM=Fu()(`Array`,`find`)),WM}var qM,JM;function YM(){if(JM)return qM;JM=1;var e=P(),t=KM(),n=Array.prototype;return qM=function(r){var a=r.find;return r===n||e(n,r)&&a===n.find?t:a},qM}var XM,ZM;function QM(){return ZM||(ZM=1,XM=YM()),XM}var $M,eN;function tN(){return eN||(eN=1,$M=QM()),$M}var nN=r(tN()),rN=class{constructor(e,t){this.container=e,this.overflowMethod=t||`cap`,this.x=0,this.y=0,this.padding=5,this.hidden=!1,this.frame=document.createElement(`div`),this.frame.className=`vis-tooltip`,this.container.appendChild(this.frame)}setPosition(e,t){this.x=Gw(e),this.y=Gw(t)}setText(e){e instanceof Element?(this.frame.innerHTML=``,this.frame.appendChild(e)):this.frame.innerHTML=q.xss(e)}show(e){if(e===void 0&&(e=!0),e===!0){var t=this.frame.clientHeight,n=this.frame.clientWidth,r=this.frame.parentNode.clientHeight,a=this.frame.parentNode.clientWidth,o=0,s=0;if(this.overflowMethod==`flip`||this.overflowMethod==`none`){let e=!1,r=!0;this.overflowMethod==`flip`&&(this.y-t<this.padding&&(r=!1),this.x+n>a-this.padding&&(e=!0)),o=e?this.x-n:this.x,s=r?this.y-t:this.y}else s=this.y-t,s+t+this.padding>r&&(s=r-t-this.padding),s<this.padding&&(s=this.padding),o=this.x,o+n+this.padding>a&&(o=a-n-this.padding),o<this.padding&&(o=this.padding);this.frame.style.left=o+`px`,this.frame.style.top=s+`px`,this.frame.style.visibility=`visible`,this.hidden=!1}else this.hide()}hide(){this.hidden=!0,this.frame.style.left=`0`,this.frame.style.top=`0`,this.frame.style.visibility=`hidden`}destroy(){this.frame.parentNode.removeChild(this.frame)}},iN={},aN;function oN(){return aN||(aN=1,I()({target:`String`,proto:!0},{repeat:Bx()})),iN}var sN,cN;function lN(){return cN||(cN=1,oN(),sN=Fu()(`String`,`repeat`)),sN}var uN,dN;function fN(){if(dN)return uN;dN=1;var e=P(),t=lN(),n=String.prototype;return uN=function(r){var a=r.repeat;return typeof r==`string`||r===n||e(n,r)&&a===n.repeat?t:a},uN}var pN,mN;function hN(){return mN||(mN=1,pN=fN()),pN}var gN,_N;function vN(){return _N||(_N=1,gN=hN()),gN}var yN=r(vN());function bN(e,t,n){if(n&&!G(n))return bN(e,t,[n]);if(t.hiddenDates=[],n&&G(n)==1){var r;for(let r=0;r<n.length;r++)if(yN(n[r])===void 0){let a={};a.start=e(n[r].start).toDate().valueOf(),a.end=e(n[r].end).toDate().valueOf(),t.hiddenDates.push(a)}rb(r=t.hiddenDates).call(r,(e,t)=>e.start-t.start)}}function xN(e,t,n){if(n&&!G(n))return xN(e,t,[n]);if(n&&t.domProps.centerContainer.width!==void 0){bN(e,t,n);let r=e(t.range.start),a=e(t.range.end),o=(t.range.end-t.range.start)/t.domProps.centerContainer.width;for(let s=0;s<n.length;s++)if(yN(n[s])!==void 0){let c=e(n[s].start),l=e(n[s].end);if(c._d==`Invalid Date`)throw Error(`Supplied start date is not valid: ${n[s].start}`);if(l._d==`Invalid Date`)throw Error(`Supplied end date is not valid: ${n[s].end}`);if(l-c>=4*o){let e=0,o=a.clone();switch(yN(n[s])){case`daily`:c.day()!=l.day()&&(e=1),c=c.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7,`days`),l=l.dayOfYear(r.dayOfYear()).year(r.year()).subtract(7-e,`days`),o.add(1,`weeks`);break;case`weekly`:{let e=l.diff(c,`days`),t=c.day();c=c.date(r.date()).month(r.month()).year(r.year()),l=c.clone(),c=c.day(t).subtract(1,`weeks`),l=l.day(t).add(e,`days`).subtract(1,`weeks`),o.add(1,`weeks`);break}case`monthly`:c.month()!=l.month()&&(e=1),c=c.month(r.month()).year(r.year()).subtract(1,`months`),l=l.month(r.month()).year(r.year()).subtract(1,`months`).add(e,`months`),o.add(1,`months`);break;case`yearly`:c.year()!=l.year()&&(e=1),c=c.year(r.year()).subtract(1,`years`),l=l.year(r.year()).subtract(1,`years`).add(e,`years`),o.add(1,`years`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,yN(n[s]));return}for(;c<o;)switch(t.hiddenDates.push({start:c.valueOf(),end:l.valueOf()}),yN(n[s])){case`daily`:c=c.add(1,`days`),l=l.add(1,`days`);break;case`weekly`:c=c.add(1,`weeks`),l=l.add(1,`weeks`);break;case`monthly`:c=c.add(1,`months`),l=l.add(1,`months`);break;case`yearly`:c=c.add(1,`y`),l=l.add(1,`y`);break;default:console.log(`Wrong repeat format, allowed are: daily, weekly, monthly, yearly. Given:`,yN(n[s]));return}t.hiddenDates.push({start:c.valueOf(),end:l.valueOf()})}}SN(t);let s=NN(t.range.start,t.hiddenDates),c=NN(t.range.end,t.hiddenDates),l=t.range.start,u=t.range.end;s.hidden==1&&(l=t.range.startToFront==1?s.startDate-1:s.endDate+1),c.hidden==1&&(u=t.range.endToFront==1?c.startDate-1:c.endDate+1),(s.hidden==1||c.hidden==1)&&t.range._applyRange(l,u)}}function SN(e){var t;let n=e.hiddenDates,r=[];for(var a=0;a<n.length;a++)for(let e=0;e<n.length;e++)a!=e&&n[e].remove!=1&&n[a].remove!=1&&(n[e].start>=n[a].start&&n[e].end<=n[a].end?n[e].remove=!0:n[e].start>=n[a].start&&n[e].start<=n[a].end?(n[a].end=n[e].end,n[e].remove=!0):n[e].end>=n[a].start&&n[e].end<=n[a].end&&(n[a].start=n[e].start,n[e].remove=!0));for(a=0;a<n.length;a++)n[a].remove!==!0&&r.push(n[a]);e.hiddenDates=r,rb(t=e.hiddenDates).call(t,(e,t)=>e.start-t.start)}function CN(e){for(let t=0;t<e.length;t++)console.log(t,new Date(e[t].start),new Date(e[t].end),e[t].start,e[t].end,e[t].remove)}function wN(e,t,n){let r=!1,a=t.current.valueOf();for(let e=0;e<t.hiddenDates.length;e++){let n=t.hiddenDates[e].start;var o=t.hiddenDates[e].end;if(a>=n&&a<o){r=!0;break}}if(r==1&&a<t._end.valueOf()&&a!=n){let r=e(n),a=e(o);r.year()==a.year()?r.month()==a.month()?r.dayOfYear()!=a.dayOfYear()&&(t.switchedDay=!0):t.switchedMonth=!0:t.switchedYear=!0,t.current=a}}function TN(e,t,n){let r;if(e.body.hiddenDates.length==0)return r=e.range.conversion(n),(t.valueOf()-r.offset)*r.scale;{let a=NN(t,e.body.hiddenDates);a.hidden==1&&(t=a.startDate);let o=DN(e.body.hiddenDates,e.range.start,e.range.end);if(t<e.range.start){r=e.range.conversion(n,o);let a=ON(e.body.hiddenDates,t,r.offset);return t=e.options.moment(t).toDate().valueOf(),t+=a,-(r.offset-t.valueOf())*r.scale}if(t>e.range.end){let a={start:e.range.start,end:t};return t=kN(e.options.moment,e.body.hiddenDates,a,t),r=e.range.conversion(n,o),(t.valueOf()-r.offset)*r.scale}return t=kN(e.options.moment,e.body.hiddenDates,e.range,t),r=e.range.conversion(n,o),(t.valueOf()-r.offset)*r.scale}}function EN(e,t,n){if(e.body.hiddenDates.length==0){let r=e.range.conversion(n);return new Date(t/r.scale+r.offset)}{let r=DN(e.body.hiddenDates,e.range.start,e.range.end),a=(e.range.end-e.range.start-r)*t/n,o=jN(e.body.hiddenDates,e.range,a);return new Date(o+a+e.range.start)}}function DN(e,t,n){let r=0;for(let a=0;a<e.length;a++){let o=e[a].start,s=e[a].end;o>=t&&s<n&&(r+=s-o)}return r}function ON(e,t,n){let r=0;for(let a=0;a<e.length;a++){let o=e[a].start,s=e[a].end;o>=t&&s<=n&&(r+=s-o)}return r}function kN(e,t,n,r){return r=e(r).toDate().valueOf(),r-=AN(e,t,n,r),r}function AN(e,t,n,r){let a=0;r=e(r).toDate().valueOf();for(let e=0;e<t.length;e++){let o=t[e].start,s=t[e].end;o>=n.start&&s<n.end&&r>=s&&(a+=s-o)}return a}function jN(e,t,n){let r=0,a=0,o=t.start;for(let s=0;s<e.length;s++){let c=e[s].start,l=e[s].end;if(c>=t.start&&l<t.end){if(a+=c-o,o=l,a>=n)break;r+=l-c}}return r}function MN(e,t,n,r){let a=NN(t,e);return a.hidden==1?n<0?r==1?a.startDate-(a.endDate-t)-1:a.startDate-1:r==1?a.endDate+(t-a.startDate)+1:a.endDate+1:t}function NN(e,t){for(let a=0;a<t.length;a++){var n=t[a].start,r=t[a].end;if(e>=n&&e<r)return{hidden:!0,startDate:n,endDate:r}}return{hidden:!1,startDate:n,endDate:r}}var PN=Object.freeze({__proto__:null,convertHiddenOptions:bN,correctTimeForHidden:kN,getAccumulatedHiddenDuration:jN,getHiddenDurationBefore:AN,getHiddenDurationBeforeStart:ON,getHiddenDurationBetween:DN,getIsHidden:NN,printDates:CN,removeDuplicates:SN,snapAwayFromHidden:MN,stepOverHiddenDates:wN,toScreen:TN,toTime:EN,updateHiddenDates:xN}),FN=class e{constructor(t,n,r,a,o){this.moment=o&&o.moment||_A,this.options=o||{},this.current=this.moment(),this._start=this.moment(),this._end=this.moment(),this.autoScale=!0,this.scale=`day`,this.step=1,this.setRange(t,n,r),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,this.hiddenDates=G(a)?a:a==null?[]:[a],this.format=e.FORMAT}setMoment(e){this.moment=e,this.current=this.moment(this.current.valueOf()),this._start=this.moment(this._start.valueOf()),this._end=this.moment(this._end.valueOf())}setFormat(t){let n=q.deepExtend({},e.FORMAT);this.format=q.deepExtend(n,t)}setRange(e,t,n){if(!(e instanceof Date)||!(t instanceof Date))throw`No legal start or end date in method setRange`;this._start=e==null?tC():this.moment(e.valueOf()),this._end=t==null?tC():this.moment(t.valueOf()),this.autoScale&&this.setMinimumStep(n)}start(){this.current=this._start.clone(),this.roundToMinor()}roundToMinor(){switch(this.scale==`week`&&this.current.weekday(0),this.scale){case`year`:this.current=this.current.year(this.step*Math.floor(this.current.year()/this.step)).month(0);case`month`:this.current=this.current.date(1);case`week`:case`day`:case`weekday`:this.current=this.current.hours(0);case`hour`:this.current=this.current.minutes(0);case`minute`:this.current=this.current.seconds(0);case`second`:this.current=this.current.milliseconds(0)}if(this.step!=1){let e=this.current.clone();switch(this.scale){case`millisecond`:this.current=this.current.subtract(this.current.milliseconds()%this.step,`milliseconds`);break;case`second`:this.current=this.current.subtract(this.current.seconds()%this.step,`seconds`);break;case`minute`:this.current=this.current.subtract(this.current.minutes()%this.step,`minutes`);break;case`hour`:this.current=this.current.subtract(this.current.hours()%this.step,`hours`);break;case`weekday`:case`day`:this.current=this.current.subtract((this.current.date()-1)%this.step,`day`);break;case`week`:this.current=this.current.subtract(this.current.week()%this.step,`week`);break;case`month`:this.current=this.current.subtract(this.current.month()%this.step,`month`);break;case`year`:this.current=this.current.subtract(this.current.year()%this.step,`year`)}e.isSame(this.current)||(this.current=this.moment(MN(this.hiddenDates,this.current.valueOf(),-1,!0)))}}hasNext(){return this.current.valueOf()<=this._end.valueOf()}next(){let e=this.current.valueOf();switch(this.scale){case`millisecond`:this.current=this.current.add(this.step,`millisecond`);break;case`second`:this.current=this.current.add(this.step,`second`);break;case`minute`:this.current=this.current.add(this.step,`minute`);break;case`hour`:this.current=this.current.add(this.step,`hour`),this.current.month()<6?this.current=this.current.subtract(this.current.hours()%this.step,`hour`):this.current.hours()%this.step!==0&&(this.current=this.current.add(this.step-this.current.hours()%this.step,`hour`));break;case`weekday`:case`day`:this.current=this.current.add(this.step,`day`);break;case`week`:if(this.current.weekday()!==0)this.current=this.current.weekday(0).add(this.step,`week`);else if(this.options.showMajorLabels===!1)this.current=this.current.add(this.step,`week`);else{let e=this.current.clone();e.add(1,`week`),this.current=e.isSame(this.current,`month`)?this.current.add(this.step,`week`):this.current.add(this.step,`week`).date(1)}break;case`month`:this.current=this.current.add(this.step,`month`);break;case`year`:this.current=this.current.add(this.step,`year`)}if(this.step!=1)switch(this.scale){case`millisecond`:this.current.milliseconds()>0&&this.current.milliseconds()<this.step&&(this.current=this.current.milliseconds(0));break;case`second`:this.current.seconds()>0&&this.current.seconds()<this.step&&(this.current=this.current.seconds(0));break;case`minute`:this.current.minutes()>0&&this.current.minutes()<this.step&&(this.current=this.current.minutes(0));break;case`hour`:this.current.hours()>0&&this.current.hours()<this.step&&(this.current=this.current.hours(0));break;case`weekday`:case`day`:this.current.date()<this.step+1&&(this.current=this.current.date(1));break;case`week`:this.current.week()<this.step&&(this.current=this.current.week(1));break;case`month`:this.current.month()<this.step&&(this.current=this.current.month(0))}this.current.valueOf()==e&&(this.current=this._end.clone()),this.switchedDay=!1,this.switchedMonth=!1,this.switchedYear=!1,wN(this.moment,this,e)}getCurrent(){return this.current.clone()}setScale(e){e&&typeof e.scale==`string`&&(this.scale=e.scale,this.step=e.step>0?e.step:1,this.autoScale=!1)}setAutoScale(e){this.autoScale=e}setMinimumStep(e){if(e==null)return;let t=31104e6,n=2592e6,r=864e5,a=36e5,o=6e4,s=1e3;t*1e3>e&&(this.scale=`year`,this.step=1e3),t*500>e&&(this.scale=`year`,this.step=500),t*100>e&&(this.scale=`year`,this.step=100),t*50>e&&(this.scale=`year`,this.step=50),t*10>e&&(this.scale=`year`,this.step=10),t*5>e&&(this.scale=`year`,this.step=5),t>e&&(this.scale=`year`,this.step=1),n*3>e&&(this.scale=`month`,this.step=3),n>e&&(this.scale=`month`,this.step=1),r*7>e&&this.options.showWeekScale&&(this.scale=`week`,this.step=1),r*2>e&&(this.scale=`day`,this.step=2),r>e&&(this.scale=`day`,this.step=1),r/2>e&&(this.scale=`weekday`,this.step=1),a*4>e&&(this.scale=`hour`,this.step=4),a>e&&(this.scale=`hour`,this.step=1),o*15>e&&(this.scale=`minute`,this.step=15),o*10>e&&(this.scale=`minute`,this.step=10),o*5>e&&(this.scale=`minute`,this.step=5),o>e&&(this.scale=`minute`,this.step=1),s*15>e&&(this.scale=`second`,this.step=15),s*10>e&&(this.scale=`second`,this.step=10),s*5>e&&(this.scale=`second`,this.step=5),s>e&&(this.scale=`second`,this.step=1),200>e&&(this.scale=`millisecond`,this.step=200),100>e&&(this.scale=`millisecond`,this.step=100),50>e&&(this.scale=`millisecond`,this.step=50),10>e&&(this.scale=`millisecond`,this.step=10),5>e&&(this.scale=`millisecond`,this.step=5),1>e&&(this.scale=`millisecond`,this.step=1)}static snap(e,t,n){let r=_A(e);if(t==`year`){let e=r.year()+Math.round(r.month()/12);r=r.year(Math.round(e/n)*n).month(0).date(0).hours(0).minutes(0).seconds(0).milliseconds(0)}else if(t==`month`)r=r.date()>15?r.date(1).add(1,`month`):r.date(1),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`week`)r=r.weekday()>2?r.weekday(0).add(1,`week`):r.weekday(0),r=r.hours(0).minutes(0).seconds(0).milliseconds(0);else if(t==`day`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/24)*24);break;default:r=r.hours(Math.round(r.hours()/12)*12)}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`weekday`){switch(n){case 5:case 2:r=r.hours(Math.round(r.hours()/12)*12);break;default:r=r.hours(Math.round(r.hours()/6)*6)}r=r.minutes(0).seconds(0).milliseconds(0)}else if(t==`hour`){switch(n){case 4:r=r.minutes(Math.round(r.minutes()/60)*60);break;default:r=r.minutes(Math.round(r.minutes()/30)*30)}r=r.seconds(0).milliseconds(0)}else if(t==`minute`){switch(n){case 15:case 10:r=r.minutes(Math.round(r.minutes()/5)*5).seconds(0);break;case 5:r=r.seconds(Math.round(r.seconds()/60)*60);break;default:r=r.seconds(Math.round(r.seconds()/30)*30)}r=r.milliseconds(0)}else if(t==`second`)switch(n){case 15:case 10:r=r.seconds(Math.round(r.seconds()/5)*5).milliseconds(0);break;case 5:r=r.milliseconds(Math.round(r.milliseconds()/1e3)*1e3);break;default:r=r.milliseconds(Math.round(r.milliseconds()/500)*500)}else if(t==`millisecond`){let e=n>5?n/2:1;r=r.milliseconds(Math.round(r.milliseconds()/e)*e)}return r}isMajor(){if(this.switchedYear==1)switch(this.scale){case`year`:case`month`:case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedMonth==1)switch(this.scale){case`week`:case`weekday`:case`day`:case`hour`:case`minute`:case`second`:case`millisecond`:return!0;default:return!1}else if(this.switchedDay==1)switch(this.scale){case`millisecond`:case`second`:case`minute`:case`hour`:return!0;default:return!1}let e=this.moment(this.current);switch(this.scale){case`millisecond`:return e.milliseconds()==0;case`second`:return e.seconds()==0;case`minute`:return e.hours()==0&&e.minutes()==0;case`hour`:return e.hours()==0;case`weekday`:case`day`:return this.options.showWeekScale?e.isoWeekday()==1:e.date()==1;case`week`:return e.date()==1;case`month`:return e.month()==0;case`year`:return!1;default:return!1}}getLabelMinor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.minorLabels==`function`)return this.format.minorLabels(e,this.scale,this.step);let t=this.format.minorLabels[this.scale];switch(this.scale){case`week`:if(e.date()===1&&e.weekday()!==0)return``;default:return t&&t.length>0?this.moment(e).format(t):``}}getLabelMajor(e){if(e??=this.current,e instanceof Date&&(e=this.moment(e)),typeof this.format.majorLabels==`function`)return this.format.majorLabels(e,this.scale,this.step);let t=this.format.majorLabels[this.scale];return t&&t.length>0?this.moment(e).format(t):``}getClassName(){var e;let t=this.moment,n=this.moment(this.current),r=n.locale?n.locale(`en`):n.lang(`en`),a=this.step,o=[];function s(e){return e/a%2==0?` vis-even`:` vis-odd`}function c(e){return e.isSame(tC(),`day`)?` vis-today`:e.isSame(t().add(1,`day`),`day`)?` vis-tomorrow`:e.isSame(t().add(-1,`day`),`day`)?` vis-yesterday`:``}function l(e){return e.isSame(tC(),`week`)?` vis-current-week`:``}function u(e){return e.isSame(tC(),`month`)?` vis-current-month`:``}function d(e){return e.isSame(tC(),`year`)?` vis-current-year`:``}switch(this.scale){case`millisecond`:o.push(c(r)),o.push(s(r.milliseconds()));break;case`second`:o.push(c(r)),o.push(s(r.seconds()));break;case`minute`:o.push(c(r)),o.push(s(r.minutes()));break;case`hour`:o.push(Zb(e=`vis-h${r.hours()}`).call(e,this.step==4?`-h`+(r.hours()+4):``)),o.push(c(r)),o.push(s(r.hours()));break;case`weekday`:o.push(`vis-${r.format(`dddd`).toLowerCase()}`),o.push(c(r)),o.push(l(r)),o.push(s(r.date()));break;case`day`:o.push(`vis-day${r.date()}`),o.push(`vis-${r.format(`MMMM`).toLowerCase()}`),o.push(c(r)),o.push(u(r)),o.push(this.step<=2?c(r):``),o.push(this.step===1?`vis-${r.format(`dddd`).toLowerCase()}`:``),o.push(s(r.date()-1));break;case`week`:o.push(`vis-week${r.format(`w`)}`),o.push(l(r)),o.push(s(r.week()));break;case`month`:o.push(`vis-${r.format(`MMMM`).toLowerCase()}`),o.push(u(r)),o.push(s(r.month()));break;case`year`:o.push(`vis-year${r.year()}`),o.push(d(r)),o.push(s(r.year()))}return H(o).call(o,String).join(` `)}};FN.FORMAT={minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}};var IN={},LN;function RN(){if(LN)return IN;LN=1;var e=I(),t=ia().every;return e({target:`Array`,proto:!0,forced:!Ip()(`every`)},{every:function(e){return t(this,e,arguments.length>1?arguments[1]:void 0)}}),IN}var zN,BN;function VN(){return BN||(BN=1,RN(),zN=Fu()(`Array`,`every`)),zN}var HN,UN;function WN(){if(UN)return HN;UN=1;var e=P(),t=VN(),n=Array.prototype;return HN=function(r){var a=r.every;return r===n||e(n,r)&&a===n.every?t:a},HN}var GN,KN;function qN(){return KN||(KN=1,GN=WN()),GN}var JN,YN;function XN(){return YN||(YN=1,JN=qN()),JN}var ZN=r(XN()),QN={UNGROUPED:`__ungrouped__`},$N=class{constructor(e){this.itemSet=e,this.groups={},this.cache={},this.cache[-1]=[]}createClusterItem(e,t,n){return new zM(e,t,n)}setItems(e,t){this.items=e||[],this.dataChanged=!0,this.applyOnChangedLevel=!1,t&&t.applyOnChangedLevel&&(this.applyOnChangedLevel=t.applyOnChangedLevel)}updateData(){this.dataChanged=!0,this.applyOnChangedLevel=!1}getClusters(e,t,n){let r=typeof n==`boolean`?{}:n,a=r.maxItems,o=r.clusterCriteria;o||=()=>!0,a||=1;let s=-1,c=0;if(t>0){if(t>=1)return[];s=Math.abs(Math.round(Math.log(100/t)/Math.log(2))),c=Math.abs(2**s)}if(this.dataChanged){let e=s!=this.cacheLevel;(!this.applyOnChangedLevel||e)&&(this._dropLevelsCache(),this._filterData())}this.cacheLevel=s;let l=this.cache[s];if(!l){l=[];for(let t in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,t))continue;let r=this.groups[t],s=r.length,u=0;for(;u<s;){let t=r[u],s=1,d=u-1;for(;d>=0&&t.center-r[d].center<c/2;)!r[d].cluster&&o(t.data,r[d].data)&&s++,d--;let f=u+1;for(;f<r.length&&r[f].center-t.center<c/2;)o(t.data,r[f].data)&&s++,f++;let p=l.length-1;for(;p>=0&&t.center-l[p].center<c;)t.group==l[p].group&&o(t.data,l[p].data)&&s++,p--;if(s>a){let c=s-a+1,d=[],f=u;for(;d.length<c&&f<r.length;)o(r[u].data,r[f].data)&&d.push(r[f]),f++;let p=this.itemSet.getGroupId(t.data),m=this.itemSet.groups[p]||this.itemSet.groups[QN.UNGROUPED],h=this._getClusterForItems(d,m,e,n);l.push(h),u+=c}else delete t.cluster,u+=1}}this.cache[s]=l}return l}_filterData(){let e={};this.groups=e;for(let t of Cw(this.items)){let n=t.parent?t.parent.groupId:``,r=e[n];r||(r=[],e[n]=r),r.push(t),t.data.start&&(t.center=t.data.end?(t.data.start.valueOf()+t.data.end.valueOf())/2:t.data.start.valueOf())}for(let n in e){var t;Object.prototype.hasOwnProperty.call(e,n)&&rb(t=e[n]).call(t,(e,t)=>e.center-t.center)}this.dataChanged=!1}_getClusterForItems(e,t,n,r){var a;let o=U(a=n||[]).call(a,e=>{var t;return{cluster:e,itemsIds:new uy(U(t=e.data.uiItems).call(t,e=>e.id))}}),s;if(o.length){for(let t of o)if(t.itemsIds.size===e.length&&ZN(e).call(e,e=>t.itemsIds.has(e.id))){s=t.cluster;break}}if(s)return s.setUiItems(e),s.group!==t&&(s.group&&s.group.remove(s),t&&(t.add(s),s.group=t)),s;let c=r.titleTemplate||``,l={toScreen:this.itemSet.body.util.toScreen,toTime:this.itemSet.body.util.toTime},u=c.replace(/{count}/,e.length),d=`<div title="`+u+`">`+e.length+`</div>`,f=Rb({},r,this.itemSet.options),p={content:d,title:u,group:t,uiItems:e,eventEmitter:this.itemSet.body.emitter,range:this.itemSet.body.range};return s=this.createClusterItem(p,l,f),t&&(t.add(s),s.group=t),s.attach(),s}_dropLevelsCache(){this.cache={},this.cacheLevel=-1,this.cache[this.cacheLevel]=[]}},eP=`__ungrouped__`,tP=`__background__`,nP=class e extends Sj{constructor(e,t){super(),this.body=e,this.defaultOptions={type:null,orientation:{item:`bottom`},align:`auto`,stack:!0,stackSubgroups:!0,groupOrderSwap(e,t){let n=t.order;t.order=e.order,e.order=n},groupOrder:`order`,selectable:!0,multiselect:!1,longSelectPressTime:251,itemsAlwaysDraggable:{item:!1,range:!1},editable:{updateTime:!1,updateGroup:!1,add:!1,remove:!1,overrideItems:!1},groupEditable:{order:!1,add:!1,remove:!1},snap:FN.snap,onDropObjectOnItem(e,t,n){n(t)},onAdd(e,t){t(e)},onUpdate(e,t){t(e)},onMove(e,t){t(e)},onRemove(e,t){t(e)},onMoving(e,t){t(e)},onAddGroup(e,t){t(e)},onMoveGroup(e,t){t(e)},onRemoveGroup(e,t){t(e)},margin:{item:{horizontal:10,vertical:10},axis:20},showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:500},tooltipOnItemUpdateTime:!1},this.options=q.extend({},this.defaultOptions),this.options.rtl=t.rtl,this.options.onTimeout=t.onTimeout,this.conversion={toScreen:e.util.toScreen,toTime:e.util.toTime},this.dom={},this.props={},this.hammer=null;let n=this;this.itemsData=null,this.groupsData=null,this.itemsSettingTime=null,this.initialItemSetDrawn=!1,this.userContinueNotBail=null,this.sequentialSelection=!1,this.itemListeners={add(e,t){n._onAdd(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},update(e,t){n._onUpdate(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()},remove(e,t){n._onRemove(t.items),n.options.cluster&&n.clusterGenerator.setItems(n.items,{applyOnChangedLevel:!1}),n.redraw()}},this.groupListeners={add(e,t,r){if(n._onAddGroups(t.items),n.groupsData&&n.groupsData.length>0){var a;let e=n.groupsData.getDataSet();W(a=e.get()).call(a,t=>{if(t.nestedGroups){var n;t.showNested!=0&&(t.showNested=!0);let a=[];W(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r&&(r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),a=Zb(a).call(a,r))}),e.update(a,r)}})}},update(e,t){n._onUpdateGroups(t.items)},remove(e,t){n._onRemoveGroups(t.items)}},this.items={},this.groups={},this.groupIds=[],this.selection=[],this.popup=null,this.popupTimer=null,this.touchParams={},this.groupTouchParams={group:null,isDragging:!1},this._create(),this.setOptions(t),this.clusters=[]}_create(){var e,t,n,r,a,o,s,c,l,u,d,f,p,m,h;let g=document.createElement(`div`);g.className=`vis-itemset`,g[`vis-itemset`]=this,this.dom.frame=g;let _=document.createElement(`div`);_.className=`vis-background`,g.appendChild(_),this.dom.background=_;let v=document.createElement(`div`);v.className=`vis-foreground`,g.appendChild(v),this.dom.foreground=v;let y=document.createElement(`div`);y.className=`vis-axis`,this.dom.axis=y;let b=document.createElement(`div`);b.className=`vis-labelset`,this.dom.labelSet=b,this._updateUngrouped();let x=new xj(tP,null,this);x.show(),this.groups[tP]=x,this.hammer=new hA(this.body.dom.centerContainer),this.hammer.on(`hammer.input`,e=>{e.isFirst&&this._onTouch(e)}),this.hammer.on(`panstart`,V(e=this._onDragStart).call(e,this)),this.hammer.on(`panmove`,V(t=this._onDrag).call(t,this)),this.hammer.on(`panend`,V(n=this._onDragEnd).call(n,this)),this.hammer.get(`pan`).set({threshold:5,direction:hA.ALL}),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`tap`,V(r=this._onSelectItem).call(r,this)),this.hammer.on(`press`,V(a=this._onMultiSelectItem).call(a,this)),this.hammer.get(`press`).set({time:1e4}),this.hammer.on(`doubletap`,V(o=this._onAddItem).call(o,this)),this.groupHammer=this.options.rtl?new hA(this.body.dom.rightContainer):new hA(this.body.dom.leftContainer),this.groupHammer.on(`tap`,V(s=this._onGroupClick).call(s,this)),this.groupHammer.on(`panstart`,V(c=this._onGroupDragStart).call(c,this)),this.groupHammer.on(`panmove`,V(l=this._onGroupDrag).call(l,this)),this.groupHammer.on(`panend`,V(u=this._onGroupDragEnd).call(u,this)),this.groupHammer.get(`pan`).set({threshold:5,direction:hA.DIRECTION_VERTICAL}),this.body.dom.centerContainer.addEventListener(`mouseover`,V(d=this._onMouseOver).call(d,this)),this.body.dom.centerContainer.addEventListener(`mouseout`,V(f=this._onMouseOut).call(f,this)),this.body.dom.centerContainer.addEventListener(`mousemove`,V(p=this._onMouseMove).call(p,this)),this.body.dom.centerContainer.addEventListener(`contextmenu`,V(m=this._onDragEnd).call(m,this)),this.body.dom.centerContainer.addEventListener(`mousewheel`,V(h=this._onMouseWheel).call(h,this)),this.show()}setOptions(e){if(e){var t,n;q.selectiveExtend([`type`,`rtl`,`align`,`order`,`stack`,`stackSubgroups`,`selectable`,`multiselect`,`sequentialSelection`,`multiselectPerGroup`,`longSelectPressTime`,`groupOrder`,`dataAttributes`,`template`,`groupTemplate`,`visibleFrameTemplate`,`hide`,`snap`,`groupOrderSwap`,`showTooltips`,`tooltip`,`tooltipOnItemUpdateTime`,`groupHeightMode`,`onTimeout`],this.options,e),`itemsAlwaysDraggable`in e&&(typeof e.itemsAlwaysDraggable==`boolean`?(this.options.itemsAlwaysDraggable.item=e.itemsAlwaysDraggable,this.options.itemsAlwaysDraggable.range=!1):typeof e.itemsAlwaysDraggable==`object`&&(q.selectiveExtend([`item`,`range`],this.options.itemsAlwaysDraggable,e.itemsAlwaysDraggable),this.options.itemsAlwaysDraggable.item||(this.options.itemsAlwaysDraggable.range=!1))),`sequentialSelection`in e&&typeof e.sequentialSelection==`boolean`&&(this.options.sequentialSelection=e.sequentialSelection),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.item=e.orientation===`top`?`top`:`bottom`:typeof e.orientation==`object`&&`item`in e.orientation&&(this.options.orientation.item=e.orientation.item)),`margin`in e&&(typeof e.margin==`number`?(this.options.margin.axis=e.margin,this.options.margin.item.horizontal=e.margin,this.options.margin.item.vertical=e.margin):typeof e.margin==`object`&&(q.selectiveExtend([`axis`],this.options.margin,e.margin),`item`in e.margin&&(typeof e.margin.item==`number`?(this.options.margin.item.horizontal=e.margin.item,this.options.margin.item.vertical=e.margin.item):typeof e.margin.item==`object`&&q.selectiveExtend([`horizontal`,`vertical`],this.options.margin.item,e.margin.item)))),W(t=[`locale`,`locales`]).call(t,t=>{t in e&&(this.options[t]=e[t])}),`editable`in e&&(typeof e.editable==`boolean`?(this.options.editable.updateTime=e.editable,this.options.editable.updateGroup=e.editable,this.options.editable.add=e.editable,this.options.editable.remove=e.editable,this.options.editable.overrideItems=!1):typeof e.editable==`object`&&q.selectiveExtend([`updateTime`,`updateGroup`,`add`,`remove`,`overrideItems`],this.options.editable,e.editable)),`groupEditable`in e&&(typeof e.groupEditable==`boolean`?(this.options.groupEditable.order=e.groupEditable,this.options.groupEditable.add=e.groupEditable,this.options.groupEditable.remove=e.groupEditable):typeof e.groupEditable==`object`&&q.selectiveExtend([`order`,`add`,`remove`],this.options.groupEditable,e.groupEditable)),W(n=[`onDropObjectOnItem`,`onAdd`,`onUpdate`,`onRemove`,`onMove`,`onMoving`,`onAddGroup`,`onMoveGroup`,`onRemoveGroup`]).call(n,t=>{let n=e[t];if(n){if(typeof n!=`function`){var r;throw Error(Zb(r=`option ${t} must be a function `).call(r,t,`(item, callback)`))}this.options[t]=n}}),e.cluster?(Rb(this.options,{cluster:e.cluster}),this.clusterGenerator||=new $N(this),this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.clusterGenerator?(this._detachAllClusters(),this.clusters=[],this.clusterGenerator=null,this.options.cluster=void 0,this.markDirty({refreshItems:!0,restackGroups:!0}),this.redraw()):this.markDirty()}}markDirty(e){this.groupIds=[],e&&(e.refreshItems&&W(q).call(q,this.items,e=>{e.dirty=!0,e.displayed&&e.redraw()}),e.restackGroups&&W(q).call(q,this.groups,(e,t)=>{t!==tP&&(e.stackDirty=!0)}))}destroy(){this.clearPopupTimer(),this.hide(),this.setItems(null),this.setGroups(null),this.hammer&&this.hammer.destroy(),this.groupHammer&&this.groupHammer.destroy(),this.hammer=null,this.body=null,this.conversion=null}hide(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame),this.dom.axis.parentNode&&this.dom.axis.parentNode.removeChild(this.dom.axis),this.dom.labelSet.parentNode&&this.dom.labelSet.parentNode.removeChild(this.dom.labelSet)}show(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame),this.dom.axis.parentNode||this.body.dom.backgroundVertical.appendChild(this.dom.axis),this.dom.labelSet.parentNode||(this.options.rtl?this.body.dom.right.appendChild(this.dom.labelSet):this.body.dom.left.appendChild(this.dom.labelSet))}setPopupTimer(e){if(this.clearPopupTimer(),e){let t=this.options.tooltip.delay||typeof this.options.tooltip.delay==`number`?this.options.tooltip.delay:500;this.popupTimer=Ch(function(){e.show()},t)}}clearPopupTimer(){this.popupTimer!=null&&(clearTimeout(this.popupTimer),this.popupTimer=null)}setSelection(e){var t;e??=[],G(e)||(e=[e]);let n=H(t=this.selection).call(t,t=>K(e).call(e,t)===-1);for(let e of n){let t=this.getItemById(e);t&&t.unselect()}this.selection=[...e];for(let t of e){let e=this.getItemById(t);e&&e.select()}}getSelection(){var e;return Zb(e=this.selection).call(e,[])}getVisibleItems(){let e=this.body.range.getRange(),t,n;this.options.rtl?(t=this.body.util.toScreen(e.start),n=this.body.util.toScreen(e.end)):(n=this.body.util.toScreen(e.start),t=this.body.util.toScreen(e.end));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let a=this.groups[e],o=a.isVisible?a.visibleItems:[];for(let e of o)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getItemsAtCurrentTime(e){let t,n;this.options.rtl?(t=this.body.util.toScreen(e),n=this.body.util.toScreen(e)):(n=this.body.util.toScreen(e),t=this.body.util.toScreen(e));let r=[];for(let e in this.groups){if(!Object.prototype.hasOwnProperty.call(this.groups,e))continue;let a=this.groups[e],o=a.isVisible?a.visibleItems:[];for(let e of o)this.options.rtl?e.right<n&&e.right+e.width>t&&r.push(e.id):e.left<t&&e.left+e.width>n&&r.push(e.id)}return r}getVisibleGroups(){let e=[];for(let t in this.groups)Object.prototype.hasOwnProperty.call(this.groups,t)&&this.groups[t].isVisible&&e.push(t);return e}getItemById(e){var t;return this.items[e]||nN(t=this.clusters).call(t,t=>t.id===e)}_deselect(e){let t=this.selection;for(let n=0,r=t.length;n<r;n++)if(t[n]==e){og(t).call(t,n,1);break}}redraw(){let e=this.options.margin,t=this.body.range,n=q.option.asSize,r=this.options,a=r.orientation.item,o=!1,s=this.dom.frame;this.props.top=this.body.domProps.top.height+this.body.domProps.border.top,this.options.rtl?this.props.right=this.body.domProps.right.width+this.body.domProps.border.right:this.props.left=this.body.domProps.left.width+this.body.domProps.border.left,s.className=`vis-itemset`,this.options.cluster&&this._clusterItems(),o=this._orderGroups()||o;let c=t.end-t.start,l=c!=this.lastVisibleInterval||this.props.width!=this.props.lastWidth,u=t.start!=this.lastRangeStart,d=r.stack!=this.lastStack,f=r.stackSubgroups!=this.lastStackSubgroups,p=l||u||d||f;this.lastVisibleInterval=c,this.lastRangeStart=t.start,this.lastStack=r.stack,this.lastStackSubgroups=r.stackSubgroups,this.props.lastWidth=this.props.width;let m=this._firstGroup(),h={item:e.item,axis:e.axis},g={item:e.item,axis:e.item.vertical/2},_=0,v=e.axis+e.item.vertical;this.groups[tP].redraw(t,g,p);let y={},b=0;if(W(q).call(q,this.groups,(e,n)=>{if(n===tP)return;let r=e==m?h:g;y[n]=e.redraw(t,r,p,!0),b=y[n].length}),b>0){let e={};for(let t=0;t<b;t++)W(q).call(q,y,(n,r)=>{e[r]=n[t]()});W(q).call(q,this.groups,(t,n)=>{n!==tP&&(o=e[n]||o,_+=t.height)}),_=Math.max(_,v)}return _=Math.max(_,v),s.style.height=n(_),this.props.width=s.offsetWidth,this.props.height=_,this.dom.axis.style.top=n(a==`top`?this.body.domProps.top.height+this.body.domProps.border.top:this.body.domProps.top.height+this.body.domProps.centerContainer.height),this.options.rtl?this.dom.axis.style.right=`0`:this.dom.axis.style.left=`0`,this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),this.initialItemSetDrawn=!0,o=this._isResized()||o,o}_firstGroup(){let e=this.options.orientation.item==`top`?0:this.groupIds.length-1,t=this.groupIds[e];return this.groups[t]||this.groups[eP]||null}_updateUngrouped(){let e=this.groups[eP],t,n;if(this.groupsData){if(e)for(n in e.dispose(),delete this.groups[eP],this.items){if(!Object.prototype.hasOwnProperty.call(this.items,n))continue;t=this.items[n],t.parent&&t.parent.remove(t);let e=this.getGroupId(t.data),r=this.groups[e];r&&r.add(t)||t.hide()}}else if(!e){for(n in e=new bj(null,null,this),this.groups[eP]=e,this.items)Object.prototype.hasOwnProperty.call(this.items,n)&&(t=this.items[n],e.add(t));e.show()}}getLabelSet(){return this.dom.labelSet}setItems(e){this.itemsSettingTime=new Date;let t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(ZA(e))this.itemsData=tj(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(W(q).call(q,this.itemListeners,(e,t)=>{r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){let e=this.id;W(q).call(q,this.itemListeners,(n,r)=>{t.itemsData.on(r,n,e)}),n=this.itemsData.getIds(),this._onAdd(n),this._updateUngrouped()}this.body.emitter.emit(`_change`,{queue:!0})}getItems(){return this.itemsData==null?null:this.itemsData.rawDS}setGroups(e){let t=this,n;if(this.groupsData&&(W(q).call(q,this.groupListeners,(e,n)=>{t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null,this._onRemoveGroups(n)),!e)this.groupsData=null;else if(ZA(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var r;let e=this.groupsData.getDataSet();W(r=e.get()).call(r,t=>{if(t.nestedGroups){var n;W(n=t.nestedGroups).call(n,n=>{let r=e.get(n);r.nestedInGroup=t.id,t.showNested==0&&(r.visible=!1),e.update(r)})}});let a=this.id;W(q).call(q,this.groupListeners,(e,n)=>{t.groupsData.on(n,e,a)}),n=this.groupsData.getIds(),this._onAddGroups(n)}this._updateUngrouped(),this._order(),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems(),this.markDirty({refreshItems:!0,restackGroups:!0})),this.body.emitter.emit(`_change`,{queue:!0})}getGroups(){return this.groupsData}removeItem(e){let t=this.itemsData.get(e);t&&this.options.onRemove(t,t=>{t&&this.itemsData.remove(e)})}_getType(e){return e.type||this.options.type||(e.end?`range`:`box`)}getGroupId(e){return this._getType(e)==`background`&&e.group==null?tP:this.groupsData?e.group:eP}_onUpdate(t){let n=this;W(t).call(t,t=>{let r=n.itemsData.get(t),a=n.items[t],o=r?n._getType(r):null,s=e.types[o],c;if(a&&(!s||!(a instanceof s)?(c=a.selected,n._removeItem(a),a=null):n._updateItem(a,r)),!a&&r){if(s)a=new s(r,n.conversion,n.options),a.id=t,n._addItem(a),c&&(this.selection.push(t),a.select());else throw TypeError(`Unknown item type "${o}"`)}}),this._order(),this.options.cluster&&(this.clusterGenerator.setItems(this.items,{applyOnChangedLevel:!1}),this._clusterItems()),this.body.emitter.emit(`_change`,{queue:!0})}_onRemove(e){let t=0,n=this;W(e).call(e,e=>{let r=n.items[e];r&&(t++,n._removeItem(r))}),t&&(this._order(),this.body.emitter.emit(`_change`,{queue:!0}))}_order(){W(q).call(q,this.groups,e=>{e.order()})}_onUpdateGroups(e){this._onAddGroups(e)}_onAddGroups(e){let t=this;W(e).call(e,e=>{let n=t.groupsData.get(e),r=t.groups[e];if(r)r.setData(n);else{if(e==eP||e==tP)throw Error(`Illegal group id. ${e} is a reserved id.`);let a=Cg(t.options);q.extend(a,{height:null}),r=new bj(e,n,t),t.groups[e]=r;for(let n in t.items){if(!Object.prototype.hasOwnProperty.call(t.items,n))continue;let a=t.items[n];a.data.group==e&&r.add(a)}r.order(),r.show()}}),this.body.emitter.emit(`_change`,{queue:!0})}_onRemoveGroups(e){W(e).call(e,e=>{let t=this.groups[e];t&&(t.dispose(),delete this.groups[e])}),this.options.cluster&&(this.clusterGenerator.updateData(),this._clusterItems()),this.markDirty({restackGroups:!!this.options.cluster}),this.body.emitter.emit(`_change`,{queue:!0})}_orderGroups(){if(this.groupsData){let e=this.groupsData.getIds({order:this.options.groupOrder});e=this._orderNestedGroups(e);let t=!q.equalArray(e,this.groupIds);if(t){let t=this.groups;W(e).call(e,e=>{t[e].hide()}),W(e).call(e,e=>{t[e].show()}),this.groupIds=e}return t}return!1}_orderNestedGroups(e){function t(e,n){let r=[];return W(n).call(n,n=>{if(r.push(n),e.groupsData.get(n).nestedGroups){var a;let o=U(a=e.groupsData.get({filter(e){return e.nestedInGroup==n},order:e.options.groupOrder})).call(a,e=>e.id);r=Zb(r).call(r,t(e,o))}}),r}let n=H(e).call(e,e=>!this.groupsData.get(e).nestedInGroup);return t(this,n)}_addItem(e){this.items[e.id]=e;let t=this.getGroupId(e.data),n=this.groups[t];n?n&&n.data&&n.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1,n&&n.add(e)}_updateItem(e,t){e.setData(t);let n=this.getGroupId(e.data),r=this.groups[n];r?r&&r.data&&r.data.showNested&&(e.groupShowing=!0):e.groupShowing=!1}_removeItem(e){var t,n;e.hide(),delete this.items[e.id];let r=K(t=this.selection).call(t,e.id);r!=-1&&og(n=this.selection).call(n,r,1),e.parent&&e.parent.remove(e),this.popup!=null&&this.popup.hide()}_constructByEndArray(e){let t=[];for(let n=0;n<e.length;n++)e[n]instanceof IM&&t.push(e[n]);return t}_onTouch(e){this.touchParams.item=this.itemFromTarget(e),this.touchParams.dragLeftItem=e.target.dragLeftItem||!1,this.touchParams.dragRightItem=e.target.dragRightItem||!1,this.touchParams.itemProps=null}_getGroupIndex(e){for(let t=0;t<this.groupIds.length;t++)if(e==this.groupIds[t])return t}_onDragStart(e){if(this.touchParams.itemIsDragging)return;let t=this.touchParams.item||null,n=this,r;if(t&&(t.selected||this.options.itemsAlwaysDraggable.item)){if(this.options.editable.overrideItems&&!this.options.editable.updateTime&&!this.options.editable.updateGroup||t.editable!=null&&!t.editable.updateTime&&!t.editable.updateGroup&&!this.options.editable.overrideItems)return;let a=this.touchParams.dragLeftItem,o=this.touchParams.dragRightItem;if(this.touchParams.itemIsDragging=!0,this.touchParams.selectedItem=t,a)r={item:a,initialX:e.center.x,dragLeft:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(o)r={item:o,initialX:e.center.x,dragRight:!0,data:this._cloneItemData(t.data)},this.touchParams.itemProps=[r];else if(this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey))this._onDragStartAddItem(e);else{this.groupIds.length<1&&this.redraw();let r=this._getGroupIndex(t.data.group),a=this.options.itemsAlwaysDraggable.item&&!t.selected?[t.id]:this.getSelection();this.touchParams.itemProps=U(a).call(a,t=>{let a=n.items[t],o=n._getGroupIndex(a.data.group);return{item:a,initialX:e.center.x,groupOffset:r-o,data:this._cloneItemData(a.data)}})}e.stopPropagation()}else this.options.editable.add&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey)&&this._onDragStartAddItem(e)}_onDragStartAddItem(e){let t=this.options.snap||null,n=this.dom.frame.getBoundingClientRect(),r=this.options.rtl?n.right-e.center.x+10:e.center.x-n.left-10,a=this.body.util.toTime(r),o=this.body.util.getScale(),s=this.body.util.getStep(),c=t?t(a,o,s):a,l={type:`range`,start:c,end:c,content:`new item`},u=Vk();l[this.itemsData.idProp]=u;let d=this.groupFromTarget(e);d&&(l.group=d.groupId);let f=new IM(l,this.conversion,this.options);f.id=u,f.data=this._cloneItemData(l),this._addItem(f),this.touchParams.selectedItem=f;let p={item:f,initialX:e.center.x,data:f.data};this.options.rtl?p.dragLeft=!0:p.dragRight=!0,this.touchParams.itemProps=[p],e.stopPropagation()}_onDrag(e){if(this.popup!=null&&this.options.showTooltips&&!this.popup.hidden){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.center.x-n.left+t.offsetLeft,e.center.y-n.top+t.offsetTop),this.popup.show()}if(this.touchParams.itemProps){var t;e.stopPropagation();let n=this,r=this.options.snap||null,a=this.body.dom.root.offsetLeft,o=this.options.rtl?a+this.body.domProps.right.width:a+this.body.domProps.left.width,s=this.body.util.getScale(),c=this.body.util.getStep(),l=this.touchParams.selectedItem,u=(this.options.editable.overrideItems||l.editable==null)&&this.options.editable.updateGroup||!this.options.editable.overrideItems&&l.editable!=null&&l.editable.updateGroup,d=null;if(u&&l&&l.data.group!=null){let t=n.groupFromTarget(e);t&&(d=this._getGroupIndex(t.groupId))}W(t=this.touchParams.itemProps).call(t,t=>{let a=n.body.util.toTime(e.center.x-o),f=n.body.util.toTime(t.initialX-o),p,m,h,g,_;p=this.options.rtl?-(a-f):a-f;let v=this._cloneItemData(t.item.data);if(t.item.editable==null||t.item.editable.updateTime||t.item.editable.updateGroup||n.options.editable.overrideItems){if((this.options.editable.overrideItems||l.editable==null)&&this.options.editable.updateTime||!this.options.editable.overrideItems&&l.editable!=null&&l.editable.updateTime){if(t.dragLeft)this.options.rtl?v.end!=null&&(h=q.convert(t.data.end,`Date`),_=new Date(h.valueOf()+p),v.end=r?r(_,s,c):_):v.start!=null&&(m=q.convert(t.data.start,`Date`),g=new Date(m.valueOf()+p),v.start=r?r(g,s,c):g);else if(t.dragRight)this.options.rtl?v.start!=null&&(m=q.convert(t.data.start,`Date`),g=new Date(m.valueOf()+p),v.start=r?r(g,s,c):g):v.end!=null&&(h=q.convert(t.data.end,`Date`),_=new Date(h.valueOf()+p),v.end=r?r(_,s,c):_);else if(v.start!=null){if(m=q.convert(t.data.start,`Date`).valueOf(),g=new Date(m+p),v.end!=null){h=q.convert(t.data.end,`Date`);let e=h.valueOf()-m.valueOf();v.start=r?r(g,s,c):g,v.end=new Date(v.start.valueOf()+e)}else v.start=r?r(g,s,c):g}}if(u&&!t.dragLeft&&!t.dragRight&&d!=null&&v.group!=null){let e=d-t.groupOffset;e=Math.max(0,e),e=Math.min(n.groupIds.length-1,e),v.group=n.groupIds[e]}v=this._cloneItemData(v),n.options.onMoving(v,e=>{e&&t.item.setData(this._cloneItemData(e,`Date`))})}}),this.body.emitter.emit(`_change`)}}_moveToGroup(e,t){let n=this.groups[t];if(n&&n.groupId!=e.data.group){let t=e.parent;t.remove(e),t.order(),e.data.group=n.groupId,n.add(e),n.order()}}_onDragEnd(e){if(this.touchParams.itemIsDragging=!1,this.touchParams.itemProps){e.stopPropagation();let t=this,n=this.touchParams.itemProps;this.touchParams.itemProps=null,W(n).call(n,e=>{let n=e.item.id;if(t.itemsData.get(n)==null)t.options.onAdd(e.item.data,n=>{t._removeItem(e.item),n&&t.itemsData.add(n),t.body.emitter.emit(`_change`)});else{let r=this._cloneItemData(e.item.data);t.options.onMove(r,r=>{r?(r[this.itemsData.idProp]=n,this.itemsData.update(r)):(e.item.setData(e.data),t.body.emitter.emit(`_change`))})}})}}_onGroupClick(e){let t=this.groupFromTarget(e);Ch(()=>{this.toggleGroupShowNested(t)},1)}toggleGroupShowNested(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:void 0;if(!e||!e.nestedGroups)return;let n=this.groupsData.getDataSet();e.showNested=t==null?!e.showNested:!!t;let r=n.get(e.groupId);r.showNested=e.showNested;let a=e.nestedGroups,o=a;for(;o.length>0;){let e=o;o=[];for(let t=0;t<e.length;t++){let r=n.get(e[t]);r.nestedGroups&&(o=Zb(o).call(o,r.nestedGroups))}o.length>0&&(a=Zb(a).call(a,o))}var s;if(r.showNested){var c=n.get(r.nestedGroups);for(let e=0;e<c.length;e++){let t=c[e];t.nestedGroups&&t.nestedGroups.length>0&&(t.showNested==null||t.showNested==1)&&c.push(...n.get(t.nestedGroups))}s=U(c).call(c,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}else{var l;s=U(l=n.get(a)).call(l,function(e){return e.visible??=!0,e.visible=!!r.showNested,e})}n.update(Zb(s).call(s,r)),r.showNested?(q.removeClassName(e.dom.label,`collapsed`),q.addClassName(e.dom.label,`expanded`)):(q.removeClassName(e.dom.label,`expanded`),q.addClassName(e.dom.label,`collapsed`))}toggleGroupDragClassName(e){e.dom.label.classList.toggle(`vis-group-is-dragging`),e.dom.foreground.classList.toggle(`vis-group-is-dragging`)}_onGroupDragStart(e){this.groupTouchParams.isDragging||this.options.groupEditable.order&&(this.groupTouchParams.group=this.groupFromTarget(e),this.groupTouchParams.group&&(e.stopPropagation(),this.groupTouchParams.isDragging=!0,this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.originalOrder=this.groupsData.getIds({order:this.options.groupOrder})))}_onGroupDrag(e){if(this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this.groupsData.getDataSet(),n=this.groupFromTarget(e);if(n&&n.height!=this.groupTouchParams.group.height){let t=n.top<this.groupTouchParams.group.top,r=e.center?e.center.y:e.clientY,a=n.dom.foreground.getBoundingClientRect(),o=this.groupTouchParams.group.height;if(t){if(a.top+o<r)return}else{let e=n.height;if(a.top+e-o>r)return}}if(n&&n!=this.groupTouchParams.group){let e=t.get(n.groupId),r=t.get(this.groupTouchParams.group.groupId);r&&e&&(this.options.groupOrderSwap(r,e,t),t.update(r),t.update(e));let a=t.getIds({order:this.options.groupOrder});if(!q.equalArray(a,this.groupTouchParams.originalOrder)){let e=this.groupTouchParams.originalOrder,n=this.groupTouchParams.group.groupId,r=Math.min(e.length,a.length),o=0,s=0,c=0;for(;o<r;){for(;o+s<r&&o+c<r&&a[o+s]==e[o+c];)o++;if(o+s>=r)break;if(a[o+s]==n)s=1;else if(e[o+c]==n)c=1;else{let n=K(a).call(a,e[o+c]),r=t.get(a[o+s]),l=t.get(e[o+c]);this.options.groupOrderSwap(r,l,t),t.update(r),t.update(l);let u=a[o+s];a[o+s]=e[o+c],a[n]=u,o++}}}}}}_onGroupDragEnd(e){if(this.groupTouchParams.isDragging=!1,this.options.groupEditable.order&&this.groupTouchParams.group){e.stopPropagation();let t=this,n=t.groupTouchParams.group.groupId,r=t.groupsData.getDataSet(),a=q.extend({},r.get(n));t.options.onMoveGroup(a,e=>{if(e)e[r._idProp]=n,r.update(e);else{let e=r.getIds({order:t.options.groupOrder});if(!q.equalArray(e,t.groupTouchParams.originalOrder)){let n=t.groupTouchParams.originalOrder,a=Math.min(n.length,e.length),o=0;for(;o<a;){for(;o<a&&e[o]==n[o];)o++;if(o>=a)break;let s=K(e).call(e,n[o]),c=r.get(e[o]),l=r.get(n[o]);t.options.groupOrderSwap(c,l,r),r.update(c),r.update(l);let u=e[o];e[o]=n[o],e[s]=u,o++}}}}),t.body.emitter.emit(`groupDragged`,{groupId:n}),this.toggleGroupDragClassName(this.groupTouchParams.group),this.groupTouchParams.group=null}}_onSelectItem(e){if(!this.options.selectable)return;let t=e.srcEvent&&(e.srcEvent.ctrlKey||e.srcEvent.metaKey),n=e.srcEvent&&e.srcEvent.shiftKey;if(t||n){this._onMultiSelectItem(e);return}let r=this.getSelection(),a=this.itemFromTarget(e),o=a&&a.selectable?[a.id]:[];this.setSelection(o);let s=this.getSelection();(s.length>0||r.length>0)&&this.body.emitter.emit(`select`,{items:s,event:e})}_onMouseOver(e){let t=this.itemFromTarget(e);if(!t||t===this.itemFromRelatedTarget(e))return;let n=t.getTitle();if(this.options.showTooltips&&n){this.popup??=new rN(this.body.dom.root,this.options.tooltip.overflowMethod||`flip`),this.popup.setText(n);let t=this.body.dom.centerContainer,r=t.getBoundingClientRect();this.popup.setPosition(e.clientX-r.left+t.offsetLeft,e.clientY-r.top+t.offsetTop),this.setPopupTimer(this.popup)}else this.clearPopupTimer(),this.popup!=null&&this.popup.hide();this.body.emitter.emit(`itemover`,{item:t.id,event:e})}_onMouseOut(e){let t=this.itemFromTarget(e);t&&t!==this.itemFromRelatedTarget(e)&&(this.clearPopupTimer(),this.popup!=null&&this.popup.hide(),this.body.emitter.emit(`itemout`,{item:t.id,event:e}))}_onMouseMove(e){if(this.itemFromTarget(e)&&(this.popupTimer!=null&&this.setPopupTimer(this.popup),this.options.showTooltips&&this.options.tooltip.followMouse&&this.popup&&!this.popup.hidden)){let t=this.body.dom.centerContainer,n=t.getBoundingClientRect();this.popup.setPosition(e.clientX-n.left+t.offsetLeft,e.clientY-n.top+t.offsetTop),this.popup.show()}}_onMouseWheel(e){this.touchParams.itemIsDragging&&this._onDragEnd(e)}_onUpdateItem(e){if(!this.options.selectable||!this.options.editable.updateTime&&!this.options.editable.updateGroup)return;let t=this;if(e){let n=t.itemsData.get(e.id);this.options.onUpdate(n,e=>{e&&t.itemsData.update(e)})}}_onDropObjectOnItem(e){let t=this.itemFromTarget(e),n=JSON.parse(e.dataTransfer.getData(`text`));this.options.onDropObjectOnItem(n,t)}_onAddItem(e){if(!this.options.selectable||!this.options.editable.add)return;let t=this,n=this.options.snap||null,r=this.dom.frame.getBoundingClientRect(),a=this.options.rtl?r.right-e.center.x:e.center.x-r.left,o=this.body.util.toTime(a),s=this.body.util.getScale(),c=this.body.util.getStep(),l,u;e.type==`drop`?(u=JSON.parse(e.dataTransfer.getData(`text`)),u.content=u.content?u.content:`new item`,u.start=u.start?u.start:n?n(o,s,c):o,u.type=u.type||`box`,u[this.itemsData.idProp]=u.id||Vk(),u.type==`range`&&!u.end&&(l=this.body.util.toTime(a+this.props.width/5),u.end=n?n(l,s,c):l)):(u={start:n?n(o,s,c):o,content:`new item`},u[this.itemsData.idProp]=Vk(),this.options.type===`range`&&(l=this.body.util.toTime(a+this.props.width/5),u.end=n?n(l,s,c):l));let d=this.groupFromTarget(e);d&&(u.group=d.groupId),u=this._cloneItemData(u),this.options.onAdd(u,n=>{n&&(t.itemsData.add(n),e.type==`drop`&&t.setSelection([n.id]))})}_onMultiSelectItem(t){if(!this.options.selectable)return;let n=this.itemFromTarget(t);if(n){let r=this.options.multiselect?this.getSelection():[];if((t.srcEvent&&t.srcEvent.shiftKey||this.options.sequentialSelection)&&this.options.multiselect){let t=this.itemsData.get(n.id).group,a;this.options.multiselectPerGroup&&r.length>0&&(a=this.itemsData.get(r[0]).group),(!this.options.multiselectPerGroup||a==null||a==t)&&r.push(n.id);let o=e._getItemRange(this.itemsData.get(r));if(!this.options.multiselectPerGroup||a==t){r=[];for(let e in this.items){if(!Object.prototype.hasOwnProperty.call(this.items,e))continue;let t=this.items[e],n=t.data.start,s=t.data.end===void 0?n:t.data.end;n>=o.min&&s<=o.max&&(!this.options.multiselectPerGroup||a==this.itemsData.get(t.id).group)&&!(t instanceof LM)&&r.push(t.id)}}}else{let e=K(r).call(r,n.id);e==-1?r.push(n.id):og(r).call(r,e,1)}let a=H(r).call(r,e=>this.getItemById(e).selectable);this.setSelection(a),this.body.emitter.emit(`select`,{items:this.getSelection(),event:t})}}static _getItemRange(e){let t=null,n=null;return W(e).call(e,e=>{(n==null||e.start<n)&&(n=e.start),e.end==null?(t==null||e.start>t)&&(t=e.start):(t==null||e.end>t)&&(t=e.end)}),{min:n,max:t}}itemFromElement(e){let t=e;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-item`))return t[`vis-item`];t=t.parentNode}return null}itemFromTarget(e){return this.itemFromElement(e.target)}itemFromRelatedTarget(e){return this.itemFromElement(e.relatedTarget)}groupFromTarget(e){let t=e.center?e.center.y:e.clientY,n=this.groupIds;n.length<=0&&this.groupsData&&(n=this.groupsData.getIds({order:this.options.groupOrder}));for(let e=0;e<n.length;e++){let r=n[e],a=this.groups[r],o=a.dom.foreground,s=o.getBoundingClientRect();if(t>=s.top&&t<s.top+o.offsetHeight)return a;if(this.options.orientation.item===`top`){if(e===this.groupIds.length-1&&t>s.top)return a}else if(e===0&&t<s.top+o.offset)return a}return null}static itemSetFromTarget(e){let t=e.target;for(;t;){if(Object.prototype.hasOwnProperty.call(t,`vis-itemset`))return t[`vis-itemset`];t=t.parentNode}return null}_cloneItemData(e,t){let n=q.extend({},e);return t||=this.itemsData.type,n.start!=null&&(n.start=q.convert(n.start,t&&t.start||`Date`)),n.end!=null&&(n.end=q.convert(n.end,t&&t.end||`Date`)),n}_clusterItems(){if(!this.options.cluster)return;let e=this.body.range.conversion(this.body.domProps.center.width).scale,t=this.clusterGenerator.getClusters(this.clusters,e,this.options.cluster);if(this.clusters!=t){if(this._detachAllClusters(),t){for(let e of t)e.attach();this.clusters=t}this._updateClusters(t)}}_detachAllClusters(){if(this.options.cluster&&this.clusters&&this.clusters.length)for(let e of this.clusters)e.detach()}_updateClusters(e){if(this.clusters&&this.clusters.length){var t;let a=new uy(U(e).call(e,e=>e.id)),o=H(t=this.clusters).call(t,e=>!a.has(e.id)),s=!1;for(let e of o){var n;let t=K(n=this.selection).call(n,e.id);if(t!==-1){var r;e.unselect(),og(r=this.selection).call(r,t,1),s=!0}}if(s){let e=this.getSelection();this.body.emitter.emit(`select`,{items:e,event})}}this.clusters=e||[]}};nP.types={background:LM,box:RM,range:IM,point:BM},nP.prototype._onAdd=nP.prototype._onUpdate;function rP(e,t,n,r){this.body=e,this.defaultOptions={enabled:!1,icons:!0,iconSize:20,iconSpacing:6,left:{visible:!0,position:`top-left`},right:{visible:!0,position:`top-right`}},this.side=n,this.options=q.extend({},this.defaultOptions),this.linegraphOptions=r,this.svgElements={},this.dom={},this.groups={},this.amountOfGroups=0,this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups},this.setOptions(t)}rP.prototype=new Sj,rP.prototype.clear=function(){this.groups={},this.amountOfGroups=0},rP.prototype.addGroup=function(e,t){t.options.excludeFromLegend!=1&&(Object.prototype.hasOwnProperty.call(this.groups,e)||(this.groups[e]=t),this.amountOfGroups+=1)},rP.prototype.updateGroup=function(e,t){this.groups[e]=t},rP.prototype.removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(delete this.groups[e],--this.amountOfGroups)},rP.prototype._create=function(){this.dom.frame=document.createElement(`div`),this.dom.frame.className=`vis-legend`,this.dom.frame.style.position=`absolute`,this.dom.frame.style.top=`10px`,this.dom.frame.style.display=`block`,this.dom.textArea=document.createElement(`div`),this.dom.textArea.className=`vis-legend-text`,this.dom.textArea.style.position=`relative`,this.dom.textArea.style.top=`0px`,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`absolute`,this.svg.style.top=`0px`,this.svg.style.width=this.options.iconSize+5+`px`,this.svg.style.height=`100%`,this.dom.frame.appendChild(this.svg),this.dom.frame.appendChild(this.dom.textArea)},rP.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},rP.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},rP.prototype.setOptions=function(e){q.selectiveDeepExtend([`enabled`,`orientation`,`icons`,`left`,`right`],this.options,e)},rP.prototype.redraw=function(){var e=0,t=Cx(this.groups);rb(t).call(t,function(e,t){return e<t?-1:1});for(var n=0;n<t.length;n++){var r=t[n];this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&e++}if(this.options[this.side].visible==0||this.amountOfGroups==0||this.options.enabled==0||e==0)this.hide();else{if(this.show(),this.options[this.side].position==`top-left`||this.options[this.side].position==`bottom-left`?(this.dom.frame.style.left=`4px`,this.dom.frame.style.textAlign=`left`,this.dom.textArea.style.textAlign=`left`,this.dom.textArea.style.left=this.options.iconSize+15+`px`,this.dom.textArea.style.right=``,this.svg.style.left=`0px`,this.svg.style.right=``):(this.dom.frame.style.right=`4px`,this.dom.frame.style.textAlign=`right`,this.dom.textArea.style.textAlign=`right`,this.dom.textArea.style.right=this.options.iconSize+15+`px`,this.dom.textArea.style.left=``,this.svg.style.right=`0px`,this.svg.style.left=``),this.options[this.side].position==`top-left`||this.options[this.side].position==`top-right`)this.dom.frame.style.top=4-Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.bottom=``;else{var a=this.body.domProps.center.height-this.body.domProps.centerContainer.height;this.dom.frame.style.bottom=4+a+Number(this.body.dom.center.style.top.replace(`px`,``))+`px`,this.dom.frame.style.top=``}this.options.icons==0?(this.dom.frame.style.width=this.dom.textArea.offsetWidth+10+`px`,this.dom.textArea.style.right=``,this.dom.textArea.style.left=``,this.svg.style.width=`0px`):(this.dom.frame.style.width=this.options.iconSize+15+this.dom.textArea.offsetWidth+10+`px`,this.drawLegendIcons());var o=``;for(n=0;n<t.length;n++)r=t[n],this.groups[r].visible==1&&(this.linegraphOptions.visibility[r]===void 0||this.linegraphOptions.visibility[r]==1)&&(o+=this.groups[r].content+`<br />`);this.dom.textArea.innerHTML=q.xss(o),this.dom.textArea.style.lineHeight=.75*this.options.iconSize+this.options.iconSpacing+`px`}},rP.prototype.drawLegendIcons=function(){if(this.dom.frame.parentNode){var e=Cx(this.groups);rb(e).call(e,function(e,t){return e<t?-1:1}),aA(this.svgElements);var t=window.getComputedStyle(this.dom.frame).paddingTop,n=Number(t.replace(`px`,``)),r=n,a=this.options.iconSize,o=.75*this.options.iconSize,s=n+.5*o+3;this.svg.style.width=a+5+n+`px`;for(var c=0;c<e.length;c++){var l=e[c];this.groups[l].visible==1&&(this.linegraphOptions.visibility[l]===void 0||this.linegraphOptions.visibility[l]==1)&&(this.groups[l].getLegend(a,o,this.framework,r,s),s+=o+this.options.iconSpacing)}}};var iP=`__ungrouped__`;function J(e,t){this.id=Vk(),this.body=e,this.defaultOptions={yAxisOrientation:`left`,defaultGroup:`default`,sort:!0,sampling:!0,stack:!1,graphHeight:`400px`,shaded:{enabled:!1,orientation:`bottom`},style:`line`,barChart:{width:50,sideBySide:!1,align:`center`},interpolation:{enabled:!0,parametrization:`centripetal`,alpha:.5},drawPoints:{enabled:!0,size:6,style:`square`},dataAxis:{},legend:{},groups:{visibility:{}}},this.options=q.extend({},this.defaultOptions),this.dom={},this.props={},this.hammer=null,this.groups={},this.abortedGraphUpdate=!1,this.updateSVGheight=!1,this.updateSVGheightOnResize=!1,this.forceGraphUpdate=!0;var n=this;this.itemsData=null,this.groupsData=null,this.itemListeners={add:function(e,t){n._onAdd(t.items)},update:function(e,t){n._onUpdate(t.items)},remove:function(e,t){n._onRemove(t.items)}},this.groupListeners={add:function(e,t){n._onAddGroups(t.items)},update:function(e,t){n._onUpdateGroups(t.items)},remove:function(e,t){n._onRemoveGroups(t.items)}},this.items={},this.selection=[],this.lastStart=this.body.range.start,this.touchParams={},this.svgElements={},this.setOptions(t),this.groupsUsingDefaultStyles=[0],this.body.emitter.on(`rangechanged`,function(){n.svg.style.left=q.option.asSize(-n.props.width),n.forceGraphUpdate=!0,n.redraw.call(n)}),this._create(),this.framework={svg:this.svg,svgElements:this.svgElements,options:this.options,groups:this.groups}}J.prototype=new Sj,J.prototype._create=function(){var e=document.createElement(`div`);e.className=`vis-line-graph`,this.dom.frame=e,this.svg=document.createElementNS(`http://www.w3.org/2000/svg`,`svg`),this.svg.style.position=`relative`,this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,this.svg.style.display=`block`,e.appendChild(this.svg),this.options.dataAxis.orientation=`left`,this.yAxisLeft=new OM(this.body,this.options.dataAxis,this.svg,this.options.groups),this.options.dataAxis.orientation=`right`,this.yAxisRight=new OM(this.body,this.options.dataAxis,this.svg,this.options.groups),delete this.options.dataAxis.orientation,this.legendLeft=new rP(this.body,this.options.legend,`left`,this.options.groups),this.legendRight=new rP(this.body,this.options.legend,`right`,this.options.groups),this.show()},J.prototype.setOptions=function(e){if(e){var t=[`sampling`,`defaultGroup`,`stack`,`height`,`graphHeight`,`yAxisOrientation`,`style`,`barChart`,`dataAxis`,`sort`,`groups`];e.graphHeight===void 0&&e.height!==void 0?(this.updateSVGheight=!0,this.updateSVGheightOnResize=!0):this.body.domProps.centerContainer.height!==void 0&&e.graphHeight!==void 0&&Gw((e.graphHeight+``).replace(`px`,``))<this.body.domProps.centerContainer.height&&(this.updateSVGheight=!0),q.selectiveDeepExtend(t,this.options,e),q.mergeOptions(this.options,e,`interpolation`),q.mergeOptions(this.options,e,`drawPoints`),q.mergeOptions(this.options,e,`shaded`),q.mergeOptions(this.options,e,`legend`),e.interpolation&&typeof e.interpolation==`object`&&e.interpolation.parametrization&&(e.interpolation.parametrization==`uniform`?this.options.interpolation.alpha=0:e.interpolation.parametrization==`chordal`?this.options.interpolation.alpha=1:(this.options.interpolation.parametrization=`centripetal`,this.options.interpolation.alpha=.5)),this.yAxisLeft&&e.dataAxis!==void 0&&(this.yAxisLeft.setOptions(this.options.dataAxis),this.yAxisRight.setOptions(this.options.dataAxis)),this.legendLeft&&e.legend!==void 0&&(this.legendLeft.setOptions(this.options.legend),this.legendRight.setOptions(this.options.legend)),Object.prototype.hasOwnProperty.call(this.groups,iP)&&this.groups[iP].setOptions(e)}this.dom.frame&&(this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0}))},J.prototype.hide=function(){this.dom.frame.parentNode&&this.dom.frame.parentNode.removeChild(this.dom.frame)},J.prototype.show=function(){this.dom.frame.parentNode||this.body.dom.center.appendChild(this.dom.frame)},J.prototype.setItems=function(e){var t=this,n,r=this.itemsData;if(!e)this.itemsData=null;else if(ZA(e))this.itemsData=tj(e);else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(r&&(W(q).call(q,this.itemListeners,function(e,t){r.off(t,e)}),r.dispose(),n=r.getIds(),this._onRemove(n)),this.itemsData){var a=this.id;W(q).call(q,this.itemListeners,function(e,n){t.itemsData.on(n,e,a)}),n=this.itemsData.getIds(),this._onAdd(n)}},J.prototype.setGroups=function(e){var t=this,n;if(this.groupsData){W(q).call(q,this.groupListeners,function(e,n){t.groupsData.off(n,e)}),n=this.groupsData.getIds(),this.groupsData=null;for(var r=0;r<n.length;r++)this._removeGroup(n[r])}if(!e)this.groupsData=null;else if(ZA(e))this.groupsData=e;else throw TypeError(`Data must implement the interface of DataSet or DataView`);if(this.groupsData){var a=this.id;W(q).call(q,this.groupListeners,function(e,n){t.groupsData.on(n,e,a)}),n=this.groupsData.getIds(),this._onAddGroups(n)}},J.prototype._onUpdate=function(e){this._updateAllGroupData(e)},J.prototype._onAdd=function(e){this._onUpdate(e)},J.prototype._onRemove=function(e){this._onUpdate(e)},J.prototype._onUpdateGroups=function(e){this._updateAllGroupData(null,e)},J.prototype._onAddGroups=function(e){this._onUpdateGroups(e)},J.prototype._onRemoveGroups=function(e){for(var t=0;t<e.length;t++)this._removeGroup(e[t]);this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})},J.prototype._removeGroup=function(e){Object.prototype.hasOwnProperty.call(this.groups,e)&&(this.groups[e].options.yAxisOrientation==`right`?(this.yAxisRight.removeGroup(e),this.legendRight.removeGroup(e),this.legendRight.redraw()):(this.yAxisLeft.removeGroup(e),this.legendLeft.removeGroup(e),this.legendLeft.redraw()),delete this.groups[e])},J.prototype._updateGroup=function(e,t){Object.prototype.hasOwnProperty.call(this.groups,t)?(this.groups[t].update(e),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.updateGroup(t,this.groups[t]),this.legendRight.updateGroup(t,this.groups[t]),this.yAxisLeft.removeGroup(t),this.legendLeft.removeGroup(t)):(this.yAxisLeft.updateGroup(t,this.groups[t]),this.legendLeft.updateGroup(t,this.groups[t]),this.yAxisRight.removeGroup(t),this.legendRight.removeGroup(t))):(this.groups[t]=new PM(e,t,this.options,this.groupsUsingDefaultStyles),this.groups[t].options.yAxisOrientation==`right`?(this.yAxisRight.addGroup(t,this.groups[t]),this.legendRight.addGroup(t,this.groups[t])):(this.yAxisLeft.addGroup(t,this.groups[t]),this.legendLeft.addGroup(t,this.groups[t]))),this.legendLeft.redraw(),this.legendRight.redraw()},J.prototype._updateAllGroupData=function(e,t){if(this.itemsData!=null){var n={},r=this.itemsData.get(),a=this.itemsData.idProp,o={};e&&U(e).call(e,function(e){o[e]=e});for(var s={},c=0;c<r.length;c++){var l=r[c],u=l.group;u??=iP,Object.prototype.hasOwnProperty.call(s,u)?s[u]++:s[u]=1}var d={};if(!t&&e){for(u in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,u)){g=this.groups[u];var f=g.getItems();n[u]=H(f).call(f,function(e){return d[e[a]]=e[a],e[a]!==o[e[a]]});var p=s[u];s[u]-=n[u].length,n[u].length<p&&(n[u][p-1]={})}}for(c=0;c<r.length;c++)if(l=r[c],u=l.group,u??=iP,!(!t&&e&&l[a]!==o[l[a]]&&Object.prototype.hasOwnProperty.call(d,l[a]))){Object.prototype.hasOwnProperty.call(n,u)||(n[u]=Array(s[u]));var m=q.bridgeObject(l);m.x=q.convert(l.x,`Date`),m.end=q.convert(l.end,`Date`),m.orginalY=l.y,m.y=Number(l.y),m[a]=l[a];var h=n[u].length-s[u]--;n[u][h]=m}for(u in this.groups)Object.prototype.hasOwnProperty.call(this.groups,u)&&!Object.prototype.hasOwnProperty.call(n,u)&&(n[u]=[]);for(u in n)if(Object.prototype.hasOwnProperty.call(n,u)){if(n[u].length==0)Object.prototype.hasOwnProperty.call(this.groups,u)&&this._removeGroup(u);else{var g=void 0;this.groupsData!=null&&(g=this.groupsData.get(u)),g??={id:u,content:this.options.defaultGroup+u},this._updateGroup(g,u),this.groups[u].setItems(n[u])}}this.forceGraphUpdate=!0,this.body.emitter.emit(`_change`,{queue:!0})}},J.prototype.redraw=function(){var e=!1;this.props.width=this.dom.frame.offsetWidth,this.props.height=this.body.domProps.centerContainer.height-this.body.domProps.border.top-this.body.domProps.border.bottom,e=this._isResized()||e;var t=this.body.range.end-this.body.range.start,n=t!=this.lastVisibleInterval;if(this.lastVisibleInterval=t,e==1){var r;this.svg.style.width=q.option.asSize(3*this.props.width),this.svg.style.left=q.option.asSize(-this.props.width),(K(r=this.options.height+``).call(r,`%`)!=-1||this.updateSVGheightOnResize==1)&&(this.updateSVGheight=!0)}if(this.updateSVGheight==1?(this.options.graphHeight!=this.props.height+`px`&&(this.options.graphHeight=this.props.height+`px`,this.svg.style.height=this.props.height+`px`),this.updateSVGheight=!1):this.svg.style.height=(``+this.options.graphHeight).replace(`px`,``)+`px`,e==1||n==1||this.abortedGraphUpdate==1||this.forceGraphUpdate==1)e=this._updateGraph()||e,this.forceGraphUpdate=!1,this.lastStart=this.body.range.start,this.svg.style.left=-this.props.width+`px`;else if(this.lastStart!=0){var a=this.body.range.start-this.lastStart,o=this.body.range.end-this.body.range.start;if(this.props.width!=0){var s=a*(this.props.width/o);this.svg.style.left=-this.props.width-s+`px`}}return this.legendLeft.redraw(),this.legendRight.redraw(),e},J.prototype._getSortedGroupIds=function(){var e=[];for(var t in this.groups)if(Object.prototype.hasOwnProperty.call(this.groups,t)){var n=this.groups[t];n.visible==1&&(this.options.groups.visibility[t]===void 0||this.options.groups.visibility[t]==1)&&e.push({id:t,zIndex:n.options.zIndex})}q.insertSort(e,function(e,t){var n=e.zIndex,r=t.zIndex;return n===void 0&&(n=0),r===void 0&&(r=0),n==r?0:n<r?-1:1});for(var r=Array(e.length),a=0;a<e.length;a++)r[a]=e[a].id;return r},J.prototype._updateGraph=function(){if(rA(this.svgElements),this.props.width!=0&&this.itemsData!=null){var e,t,n={},r=!1,a=this.body.util.toGlobalTime(-this.body.domProps.root.width),o=this.body.util.toGlobalTime(2*this.body.domProps.root.width),s=this._getSortedGroupIds();if(s.length>0){var c={};for(this._getRelevantData(s,c,a,o),this._applySampling(s,c),t=0;t<s.length;t++)this._convertXcoordinates(c[s[t]]);if(this._getYRanges(s,c,n),r=this._updateYAxis(s,n),r==1)return iA(this.svgElements),this.abortedGraphUpdate=!0,!0;this.abortedGraphUpdate=!1;var l=void 0;for(t=0;t<s.length;t++)e=this.groups[s[t]],this.options.stack===!0&&this.options.style===`line`&&(e.options.excludeFromStacking==null||!e.options.excludeFromStacking)&&(l!=null&&(this._stack(c[e.id],c[l.id]),e.options.shaded.enabled==1&&e.options.shaded.orientation!==`group`&&(e.options.shaded.orientation==`top`&&l.options.shaded.orientation!==`group`?(l.options.shaded.orientation=`group`,l.options.shaded.groupId=e.id):(e.options.shaded.orientation=`group`,e.options.shaded.groupId=l.id))),l=e),this._convertYcoordinates(c[s[t]],e);var u={};for(t=0;t<s.length;t++)if(e=this.groups[s[t]],e.options.style===`line`&&e.options.shaded.enabled==1){var d=c[s[t]];if(d==null||d.length==0)continue;if(Object.prototype.hasOwnProperty.call(u,s[t])||(u[s[t]]=NM.calcPath(d,e)),e.options.shaded.orientation===`group`){var f=e.options.shaded.groupId;if(K(s).call(s,f)===-1){console.log(e.id+`: Unknown shading group target given:`+f);continue}Object.prototype.hasOwnProperty.call(u,f)||(u[f]=NM.calcPath(c[f],this.groups[f])),NM.drawShading(u[s[t]],e,u[f],this.framework)}else NM.drawShading(u[s[t]],e,void 0,this.framework)}for(MM.draw(s,c,this.framework),t=0;t<s.length;t++)if(e=this.groups[s[t]],c[s[t]].length>0)switch(e.options.style){case`line`:Object.prototype.hasOwnProperty.call(u,s[t])||(u[s[t]]=NM.calcPath(c[s[t]],e)),NM.draw(u[s[t]],e,this.framework);case`point`:case`points`:(e.options.style==`point`||e.options.style==`points`||e.options.drawPoints.enabled==1)&&kM.draw(c[s[t]],e,this.framework)}}}return iA(this.svgElements),!1},J.prototype._stack=function(e,t){for(var n=0,r,a,o,s,c=0;c<e.length;c++){o=void 0,s=void 0;for(var l=n;l<t.length;l++)if(t[l].x===e[c].x){o=t[l],s=t[l],n=l;break}else if(t[l].x>e[c].x){s=t[l],o=l==0?s:t[l-1],n=l;break}s===void 0&&(o=t[t.length-1],s=t[t.length-1]),r=s.x-o.x,a=s.y-o.y,r==0?e[c].y=e[c].orginalY+s.y:e[c].y=e[c].orginalY+a/r*(e[c].x-o.x)+o.y}},J.prototype._getRelevantData=function(e,t,n,r){var a,o,s,c;if(e.length>0)for(o=0;o<e.length;o++){a=this.groups[e[o]];var l=a.getItems();if(rb(a.options)==1){var u=function(e,t){return e.getTime()==t.getTime()?0:e<t?-1:1},d=Math.max(0,q.binarySearchValue(l,n,`x`,`before`,u)),f=Math.min(l.length,q.binarySearchValue(l,r,`x`,`after`,u)+1);f<=0&&(f=l.length);var p=Array(f-d);for(s=d;s<f;s++)c=a.itemsData[s],p[s-d]=c;t[e[o]]=p}else t[e[o]]=a.itemsData}},J.prototype._applySampling=function(e,t){var n;if(e.length>0){for(var r=0;r<e.length;r++)if(n=this.groups[e[r]],n.options.sampling==1){var a=t[e[r]];if(a.length>0){var o=1,s=a.length,c=s/(this.body.util.toGlobalScreen(a[a.length-1].x)-this.body.util.toGlobalScreen(a[0].x));o=Math.min(Math.ceil(.2*s),Math.max(1,Math.round(c)));for(var l=Array(s),u=0;u<s;u+=o){var d=Math.round(u/o);l[d]=a[u]}t[e[r]]=og(l).call(l,0,Math.round(s/o))}}}},J.prototype._getYRanges=function(e,t,n){var r,a,o,s=[],c=[],l;if(e.length>0){for(o=0;o<e.length;o++)r=t[e[o]],l=this.groups[e[o]].options,r.length>0&&(a=this.groups[e[o]],l.stack===!0&&l.style===`bar`?l.yAxisOrientation===`left`?s=Zb(s).call(s,r):c=Zb(c).call(c,r):n[e[o]]=a.getYRange(r,e[o]));MM.getStackedYRange(s,n,e,`__barStackLeft`,`left`),MM.getStackedYRange(c,n,e,`__barStackRight`,`right`)}},J.prototype._updateYAxis=function(e,t){var n=!1,r=!1,a=!1,o=1e9,s=1e9,c=-1e9,l=-1e9,u,d;if(e.length>0){for(let t=0;t<e.length;t++){var f=this.groups[e[t]];f&&f.options.yAxisOrientation!=`right`?(r=!0,o=1e9,c=-1e9):f&&f.options.yAxisOrientation&&(a=!0,s=1e9,l=-1e9)}for(i=0;i<e.length;i++)Object.prototype.hasOwnProperty.call(t,e[i])&&t[e[i]].ignore!==!0&&(u=t[e[i]].min,d=t[e[i]].max,t[e[i]].yAxisOrientation==`right`?(a=!0,s=s>u?u:s,l=l<d?d:l):(r=!0,o=o>u?u:o,c=c<d?d:c));r==1&&this.yAxisLeft.setRange(o,c),a==1&&this.yAxisRight.setRange(s,l)}n=this._toggleAxisVisiblity(r,this.yAxisLeft)||n,n=this._toggleAxisVisiblity(a,this.yAxisRight)||n,a==1&&r==1?(this.yAxisLeft.drawIcons=!0,this.yAxisRight.drawIcons=!0):(this.yAxisLeft.drawIcons=!1,this.yAxisRight.drawIcons=!1),this.yAxisRight.master=!r,this.yAxisRight.masterAxis=this.yAxisLeft,this.yAxisRight.master==0&&(a==1?this.yAxisLeft.lineOffset=this.yAxisRight.width:this.yAxisLeft.lineOffset=0,n=this.yAxisLeft.redraw()||n),n=this.yAxisRight.redraw()||n;var p=[`__barStackLeft`,`__barStackRight`,`__lineStackLeft`,`__lineStackRight`];for(i=0;i<p.length;i++)K(e).call(e,p[i])!=-1&&og(e).call(e,K(e).call(e,p[i]),1);return n},J.prototype._toggleAxisVisiblity=function(e,t){var n=!1;return e==0?t.dom.frame.parentNode&&t.hidden==0&&(t.hide(),n=!0):!t.dom.frame.parentNode&&t.hidden==1&&(t.show(),n=!0),n},J.prototype._convertXcoordinates=function(e){for(var t=this.body.util.toScreen,n=0;n<e.length;n++)e[n].screen_x=t(e[n].x)+this.props.width,e[n].screen_y=e[n].y,e[n].end==null?e[n].screen_end=void 0:e[n].screen_end=t(e[n].end)+this.props.width},J.prototype._convertYcoordinates=function(e,t){var n=this.yAxisLeft,r=Number(this.svg.style.height.replace(`px`,``));t.options.yAxisOrientation==`right`&&(n=this.yAxisRight);for(var a=0;a<e.length;a++)e[a].screen_y=Math.round(n.convertValue(e[a].y));t.setZeroPosition(Math.min(r,n.convertValue(0)))};var aP=class extends Sj{constructor(e,t){super(),this.dom={foreground:null,lines:[],majorTexts:[],minorTexts:[],redundant:{lines:[],majorTexts:[],minorTexts:[]}},this.props={range:{start:0,end:0,minimumStep:0},lineTop:0},this.defaultOptions={orientation:{axis:`bottom`},showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,maxMinorChars:7,format:q.extend({},FN.FORMAT),moment:_A,timeAxis:null},this.options=q.extend({},this.defaultOptions),this.body=e,this._create(),this.setOptions(t)}setOptions(e){e&&(q.selectiveExtend([`showMinorLabels`,`showMajorLabels`,`showWeekScale`,`maxMinorChars`,`hiddenDates`,`timeAxis`,`moment`,`rtl`],this.options,e),q.selectiveDeepExtend([`format`],this.options,e),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation.axis=e.orientation:typeof e.orientation==`object`&&`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis)),`locale`in e&&(typeof _A.locale==`function`?_A.locale(e.locale):_A.lang(e.locale)))}_create(){this.dom.foreground=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.foreground.className=`vis-time-axis vis-foreground`,this.dom.background.className=`vis-time-axis vis-background`}destroy(){this.dom.foreground.parentNode&&this.dom.foreground.parentNode.removeChild(this.dom.foreground),this.dom.background.parentNode&&this.dom.background.parentNode.removeChild(this.dom.background),this.body=null}redraw(){let e=this.props,t=this.dom.foreground,n=this.dom.background,r=this.options.orientation.axis==`top`?this.body.dom.top:this.body.dom.bottom,a=t.parentNode!==r;this._calculateCharSize();let o=this.options.showMinorLabels&&this.options.orientation.axis!==`none`,s=this.options.showMajorLabels&&this.options.orientation.axis!==`none`;e.minorLabelHeight=o?e.minorCharHeight:0,e.majorLabelHeight=s?e.majorCharHeight:0,e.height=e.minorLabelHeight+e.majorLabelHeight,e.width=t.offsetWidth,e.minorLineHeight=this.body.domProps.root.height-e.majorLabelHeight-(this.options.orientation.axis==`top`?this.body.domProps.bottom.height:this.body.domProps.top.height),e.minorLineWidth=1,e.majorLineHeight=e.minorLineHeight+e.majorLabelHeight,e.majorLineWidth=1;let c=t.nextSibling,l=n.nextSibling;return t.parentNode&&t.parentNode.removeChild(t),n.parentNode&&n.parentNode.removeChild(n),t.style.height=`${this.props.height}px`,this._repaintLabels(),c?r.insertBefore(t,c):r.appendChild(t),l?this.body.dom.backgroundVertical.insertBefore(n,l):this.body.dom.backgroundVertical.appendChild(n),this._isResized()||a}_repaintLabels(){let e=this.options.orientation.axis,t=q.convert(this.body.range.start,`Number`),n=q.convert(this.body.range.end,`Number`),r=this.body.util.toTime((this.props.minorCharWidth||10)*this.options.maxMinorChars).valueOf(),a=r-AN(this.options.moment,this.body.hiddenDates,this.body.range,r);a-=this.body.util.toTime(0).valueOf();let o=new FN(new Date(t),new Date(n),a,this.body.hiddenDates,this.options);o.setMoment(this.options.moment),this.options.format&&o.setFormat(this.options.format),this.options.timeAxis&&o.setScale(this.options.timeAxis),this.step=o;let s=this.dom;s.redundant.lines=s.lines,s.redundant.majorTexts=s.majorTexts,s.redundant.minorTexts=s.minorTexts,s.lines=[],s.majorTexts=[],s.minorTexts=[];let c,l,u,d,f,p,m=0,h,g,_,v=0,y=1e3,b;for(o.start(),l=o.getCurrent(),d=this.body.util.toScreen(l);o.hasNext()&&v<y;){switch(v++,f=o.isMajor(),b=o.getClassName(),c=l,u=d,o.next(),l=o.getCurrent(),d=this.body.util.toScreen(l),h=m,m=d-u,o.scale){case`week`:p=!0;break;default:p=m>=h*.4}if(this.options.showMinorLabels&&p){var x=this._repaintMinorText(u,o.getLabelMinor(c),e,b);x.style.width=`${m}px`}f&&this.options.showMajorLabels?(u>0&&(_??=u,x=this._repaintMajorText(u,o.getLabelMajor(c),e,b)),g=this._repaintMajorLine(u,m,e,b)):p?g=this._repaintMinorLine(u,m,e,b):g&&(g.style.width=`${Gw(g.style.width)+m}px`)}if(v===y&&!oP&&(console.warn(`Something is wrong with the Timeline scale. Limited drawing of grid lines to ${y} lines.`),oP=!0),this.options.showMajorLabels){let t=this.body.util.toTime(0),n=o.getLabelMajor(t),r=n.length*(this.props.majorCharWidth||10)+10;(_==null||r<_)&&this._repaintMajorText(0,n,e,b)}W(q).call(q,this.dom.redundant,e=>{for(;e.length;){let t=e.pop();t&&t.parentNode&&t.parentNode.removeChild(t)}})}_repaintMinorText(e,t,n,r){let a=this.dom.redundant.minorTexts.shift();if(!a){let e=document.createTextNode(``);a=document.createElement(`div`),a.appendChild(e),this.dom.foreground.appendChild(a)}this.dom.minorTexts.push(a),a.innerHTML=q.xss(t);let o=n==`top`?this.props.majorLabelHeight:0;return this._setXY(a,e,o),a.className=`vis-text vis-minor ${r}`,a}_repaintMajorText(e,t,n,r){let a=this.dom.redundant.majorTexts.shift();if(!a){let e=document.createElement(`div`);a=document.createElement(`div`),a.appendChild(e),this.dom.foreground.appendChild(a)}a.childNodes[0].innerHTML=q.xss(t),a.className=`vis-text vis-major ${r}`;let o=n==`top`?0:this.props.minorLabelHeight;return this._setXY(a,e,o),this.dom.majorTexts.push(a),a}_setXY(e,t,n){var r;let a=this.options.rtl?t*-1:t;e.style.transform=Zb(r=`translate(${a}px, `).call(r,n,`px)`)}_repaintMinorLine(e,t,n,r){var a;let o=this.dom.redundant.lines.shift();o||(o=document.createElement(`div`),this.dom.background.appendChild(o)),this.dom.lines.push(o);let s=this.props;o.style.width=`${t}px`,o.style.height=`${s.minorLineHeight}px`;let c=n==`top`?s.majorLabelHeight:this.body.domProps.top.height,l=e-s.minorLineWidth/2;return this._setXY(o,l,c),o.className=Zb(a=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-minor `).call(a,r),o}_repaintMajorLine(e,t,n,r){var a;let o=this.dom.redundant.lines.shift();o||(o=document.createElement(`div`),this.dom.background.appendChild(o)),this.dom.lines.push(o);let s=this.props;o.style.width=`${t}px`,o.style.height=`${s.majorLineHeight}px`;let c=n==`top`?0:this.body.domProps.top.height,l=e-s.majorLineWidth/2;return this._setXY(o,l,c),o.className=Zb(a=`vis-grid ${this.options.rtl?`vis-vertical-rtl`:`vis-vertical`} vis-major `).call(a,r),o}_calculateCharSize(){this.dom.measureCharMinor||(this.dom.measureCharMinor=document.createElement(`DIV`),this.dom.measureCharMinor.className=`vis-text vis-minor vis-measure`,this.dom.measureCharMinor.style.position=`absolute`,this.dom.measureCharMinor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMinor)),this.props.minorCharHeight=this.dom.measureCharMinor.clientHeight,this.props.minorCharWidth=this.dom.measureCharMinor.clientWidth,this.dom.measureCharMajor||(this.dom.measureCharMajor=document.createElement(`DIV`),this.dom.measureCharMajor.className=`vis-text vis-major vis-measure`,this.dom.measureCharMajor.style.position=`absolute`,this.dom.measureCharMajor.appendChild(document.createTextNode(`0`)),this.dom.foreground.appendChild(this.dom.measureCharMajor)),this.props.majorCharHeight=this.dom.measureCharMajor.clientHeight,this.props.majorCharWidth=this.dom.measureCharMajor.clientWidth}},oP=!1,sP,cP;function lP(){return cP||(cP=1,gh(),sP=N().setInterval),sP}var uP,dP;function fP(){return dP||(dP=1,uP=lP()),uP}var pP=r(fP());function mP(e,t){t.inputHandler=function(e){e.isFirst&&t(e)},e.on(`hammer.input`,t.inputHandler)}function hP(e,t){return t.inputHandler=function(e){e.isFinal&&t(e)},e.on(`hammer.input`,t.inputHandler)}function gP(e){return e.getTouchAction=function(){return[`pan-y`]},e}function _P(e){var t,n;this.active=!1,this.dom={container:e},this.dom.overlay=document.createElement(`div`),this.dom.overlay.className=`vis-overlay`,this.dom.container.appendChild(this.dom.overlay),this.hammer=hA(this.dom.overlay),this.hammer.on(`tap`,V(t=this._onTapOverlay).call(t,this));var r=this,a=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];W(a).call(a,function(e){r.hammer.on(e,function(e){e.stopPropagation()})}),document&&document.body&&(this.onClick=function(t){vP(t.target,e)||r.deactivate()},document.body.addEventListener(`click`,this.onClick)),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=Se(),this.escListener=V(n=this.deactivate).call(n,this)}HT(_P.prototype),_P.current=null,_P.prototype.destroy=function(){this.deactivate(),this.dom.overlay.parentNode.removeChild(this.dom.overlay),this.onClick&&document.body.removeEventListener(`click`,this.onClick),this.keycharm!==void 0&&this.keycharm.destroy(),this.keycharm=null,this.hammer.destroy(),this.hammer=null},_P.prototype.activate=function(){var e;_P.current&&_P.current.deactivate(),_P.current=this,this.active=!0,this.dom.overlay.style.display=`none`,q.addClassName(this.dom.container,`vis-active`),this.emit(`change`),this.emit(`activate`),V(e=this.keycharm).call(e,`esc`,this.escListener)},_P.prototype.deactivate=function(){_P.current===this&&(_P.current=null),this.active=!1,this.dom.overlay.style.display=``,q.removeClassName(this.dom.container,`vis-active`),this.keycharm.unbind(`esc`,this.escListener),this.emit(`change`),this.emit(`deactivate`)},_P.prototype._onTapOverlay=function(e){this.activate(),e.stopPropagation()};function vP(e,t){for(;e;){if(e===t)return!0;e=e.parentNode}return!1}var yP=class{_create(e){var t,n,r;this.dom={},this.dom.container=e,this.dom.container.style.position=`relative`,this.dom.root=document.createElement(`div`),this.dom.background=document.createElement(`div`),this.dom.backgroundVertical=document.createElement(`div`),this.dom.backgroundHorizontal=document.createElement(`div`),this.dom.centerContainer=document.createElement(`div`),this.dom.leftContainer=document.createElement(`div`),this.dom.rightContainer=document.createElement(`div`),this.dom.center=document.createElement(`div`),this.dom.left=document.createElement(`div`),this.dom.right=document.createElement(`div`),this.dom.top=document.createElement(`div`),this.dom.bottom=document.createElement(`div`),this.dom.shadowTop=document.createElement(`div`),this.dom.shadowBottom=document.createElement(`div`),this.dom.shadowTopLeft=document.createElement(`div`),this.dom.shadowBottomLeft=document.createElement(`div`),this.dom.shadowTopRight=document.createElement(`div`),this.dom.shadowBottomRight=document.createElement(`div`),this.dom.rollingModeBtn=document.createElement(`div`),this.dom.loadingScreen=document.createElement(`div`),this.dom.root.className=`vis-timeline`,this.dom.background.className=`vis-panel vis-background`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical`,this.dom.backgroundHorizontal.className=`vis-panel vis-background vis-horizontal`,this.dom.centerContainer.className=`vis-panel vis-center`,this.dom.leftContainer.className=`vis-panel vis-left`,this.dom.rightContainer.className=`vis-panel vis-right`,this.dom.top.className=`vis-panel vis-top`,this.dom.bottom.className=`vis-panel vis-bottom`,this.dom.left.className=`vis-content`,this.dom.center.className=`vis-content`,this.dom.right.className=`vis-content`,this.dom.shadowTop.className=`vis-shadow vis-top`,this.dom.shadowBottom.className=`vis-shadow vis-bottom`,this.dom.shadowTopLeft.className=`vis-shadow vis-top`,this.dom.shadowBottomLeft.className=`vis-shadow vis-bottom`,this.dom.shadowTopRight.className=`vis-shadow vis-top`,this.dom.shadowBottomRight.className=`vis-shadow vis-bottom`,this.dom.rollingModeBtn.className=`vis-rolling-mode-btn`,this.dom.loadingScreen.className=`vis-loading-screen`,this.dom.root.appendChild(this.dom.background),this.dom.root.appendChild(this.dom.backgroundVertical),this.dom.root.appendChild(this.dom.backgroundHorizontal),this.dom.root.appendChild(this.dom.centerContainer),this.dom.root.appendChild(this.dom.leftContainer),this.dom.root.appendChild(this.dom.rightContainer),this.dom.root.appendChild(this.dom.top),this.dom.root.appendChild(this.dom.bottom),this.dom.root.appendChild(this.dom.rollingModeBtn),this.dom.centerContainer.appendChild(this.dom.center),this.dom.leftContainer.appendChild(this.dom.left),this.dom.rightContainer.appendChild(this.dom.right),this.dom.centerContainer.appendChild(this.dom.shadowTop),this.dom.centerContainer.appendChild(this.dom.shadowBottom),this.dom.leftContainer.appendChild(this.dom.shadowTopLeft),this.dom.leftContainer.appendChild(this.dom.shadowBottomLeft),this.dom.rightContainer.appendChild(this.dom.shadowTopRight),this.dom.rightContainer.appendChild(this.dom.shadowBottomRight),this.props={root:{},background:{},centerContainer:{},leftContainer:{},rightContainer:{},center:{},left:{},right:{},top:{},bottom:{},border:{},scrollTop:0,scrollTopMin:0},this.on(`rangechange`,()=>{this.initialDrawDone===!0&&this._redraw()}),this.on(`rangechanged`,()=>{this.initialRangeChangeDone||=!0}),this.on(`touch`,V(t=this._onTouch).call(t,this)),this.on(`panmove`,V(n=this._onDrag).call(n,this));let a=this;this._origRedraw=V(r=this._redraw).call(r,this),this._redraw=q.throttle(this._origRedraw),this.on(`_change`,e=>{a.itemSet&&a.itemSet.initialItemSetDrawn&&e&&e.queue==1?a._redraw():a._origRedraw()}),this.hammer=new hA(this.dom.root);let o=this.hammer.get(`pinch`).set({enable:!0});o&&gP(o),this.hammer.get(`pan`).set({threshold:5,direction:hA.DIRECTION_ALL}),this.timelineListeners={};let s=[`tap`,`doubletap`,`press`,`pinch`,`pan`,`panstart`,`panmove`,`panend`];W(s).call(s,e=>{let t=t=>{a.isActive()&&a.emit(e,t)};a.hammer.on(e,t),a.timelineListeners[e]=t}),mP(this.hammer,e=>{a.emit(`touch`,e)}),hP(this.hammer,e=>{a.emit(`release`,e)});function c(e){if(!this.isActive())return;if(this.emit(`mousewheel`,e),this.options.preferZoom){if(!this.options.zoomKey||e[this.options.zoomKey])return}else if(this.options.zoomKey&&e[this.options.zoomKey])return;if(!this.options.verticalScroll&&!this.options.horizontalScroll)return;let t=0,n=0;`detail`in e&&(n=e.detail*-1),`wheelDelta`in e&&(n=e.wheelDelta),`wheelDeltaY`in e&&(n=e.wheelDeltaY),`wheelDeltaX`in e&&(t=e.wheelDeltaX*-1),`axis`in e&&e.axis===e.HORIZONTAL_AXIS&&(t=n*-1,n=0),`deltaY`in e&&(n=e.deltaY*-1),`deltaX`in e&&(t=e.deltaX);var r=40;e.deltaMode&&(e.deltaMode===1?(t*=r,n*=r):(t*=r,n*=800));let a=this.options.verticalScroll,o=Math.abs(n)>=Math.abs(t),s=this.options.horizontalScroll&&this.options.horizontalScrollKey&&e[this.options.horizontalScrollKey];if(a&&o&&!s){let t=this.props.scrollTop,r=t+n;this._setScrollTop(r)!==t&&(this._redraw(),this.emit(`scroll`,e),e.preventDefault())}else if(this.options.horizontalScroll){this.range.stopRolling();let r=(o?n:t)/120*(this.range.end-this.range.start)/20;this.options.horizontalScrollInvert&&o&&(r=-r);let a=this.range.start+r,s=this.range.end+r,c={animation:!1,byUser:!0,event:e};this.range.setRange(a,s,c),e.preventDefault()}}let l=`onwheel`in document.createElement(`div`)?`wheel`:document.onmousewheel===void 0?this.dom.centerContainer.addEventListener?`DOMMouseScroll`:`onmousewheel`:`mousewheel`;this.dom.top.addEventListener,this.dom.bottom.addEventListener,this.dom.centerContainer.addEventListener(l,V(c).call(c,this),!1),this.dom.top.addEventListener(l,V(c).call(c,this),!1),this.dom.bottom.addEventListener(l,V(c).call(c,this),!1);function u(e){if(a.options.verticalScroll&&(e.preventDefault(),a.isActive())){let t=-e.target.scrollTop;a._setScrollTop(t),a._redraw(),a.emit(`scrollSide`,e)}}this.dom.left.parentNode.addEventListener(`scroll`,V(u).call(u,this)),this.dom.right.parentNode.addEventListener(`scroll`,V(u).call(u,this));let d=!1;function f(e){var t;if(e.preventDefault&&(a.emit(`dragover`,a.getEventProperties(e)),e.preventDefault()),K(t=e.target.className).call(t,`timeline`)>-1&&!d)return e.dataTransfer.dropEffect=`move`,d=!0,!1}function p(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();try{var t=JSON.parse(e.dataTransfer.getData(`text`));if(!t||!t.content)return}catch{return!1}return d=!1,e.center={x:e.clientX,y:e.clientY},t.target===`item`?a.itemSet._onDropObjectOnItem(e):a.itemSet._onAddItem(e),a.emit(`drop`,a.getEventProperties(e)),!1}if(this.dom.center.addEventListener(`dragover`,V(f).call(f,this),!1),this.dom.center.addEventListener(`drop`,V(p).call(p,this),!1),this.customTimes=[],this.touch={},this.redrawCount=0,this.initialDrawDone=!1,this.initialRangeChangeDone=!1,!e)throw Error(`No container provided`);e.appendChild(this.dom.root),e.appendChild(this.dom.loadingScreen)}setOptions(e){var t;if(e){if(q.selectiveExtend([`width`,`height`,`minHeight`,`maxHeight`,`autoResize`,`start`,`end`,`clickToUse`,`dataAttributes`,`hiddenDates`,`locale`,`locales`,`moment`,`preferZoom`,`rtl`,`zoomKey`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`,`longSelectPressTime`,`snap`],this.options,e),this.dom.rollingModeBtn.style.visibility=`hidden`,this.options.rtl&&(this.dom.container.style.direction=`rtl`,this.dom.backgroundVertical.className=`vis-panel vis-background vis-vertical-rtl`),this.options.verticalScroll&&(this.options.rtl?this.dom.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`:this.dom.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`),typeof this.options.orientation!=`object`&&(this.options.orientation={item:void 0,axis:void 0}),`orientation`in e&&(typeof e.orientation==`string`?this.options.orientation={item:e.orientation,axis:e.orientation}:typeof e.orientation==`object`&&(`item`in e.orientation&&(this.options.orientation.item=e.orientation.item),`axis`in e.orientation&&(this.options.orientation.axis=e.orientation.axis))),this.options.orientation.axis===`both`){if(!this.timeAxis2){let e=this.timeAxis2=new aP(this.body,this.options);e.setOptions=t=>{let n=t?q.extend({},t):{};n.orientation=`top`,aP.prototype.setOptions.call(e,n)},this.components.push(e)}}else if(this.timeAxis2){var n;let e=K(n=this.components).call(n,this.timeAxis2);if(e!==-1){var r;og(r=this.components).call(r,e,1)}this.timeAxis2.destroy(),this.timeAxis2=null}typeof e.drawPoints==`function`&&(e.drawPoints={onRender:e.drawPoints}),`hiddenDates`in this.options&&bN(this.options.moment,this.body,this.options.hiddenDates),`clickToUse`in e&&(e.clickToUse?this.activator||=new _P(this.dom.root):this.activator&&(this.activator.destroy(),delete this.activator)),this._initAutoResize()}if(W(t=this.components).call(t,t=>t.setOptions(e)),`configure`in e){var a;this.configurator||=this._createConfigurator(),this.configurator.setOptions(e.configure);let t=q.deepExtend({},this.options);W(a=this.components).call(a,e=>{q.deepExtend(t,e.options)}),this.configurator.setModuleOptions({global:t})}this._redraw()}isActive(){return!this.activator||this.activator.active}destroy(){var e;this.setItems(null),this.setGroups(null),this.off(),this._stopAutoResize(),this.dom.root.parentNode&&this.dom.root.parentNode.removeChild(this.dom.root),this.dom=null,this.activator&&(this.activator.destroy(),delete this.activator);for(let e in this.timelineListeners)Object.prototype.hasOwnProperty.call(this.timelineListeners,e)&&delete this.timelineListeners[e];this.timelineListeners=null,this.hammer&&this.hammer.destroy(),this.hammer=null,W(e=this.components).call(e,e=>e.destroy()),this.body=null}setCustomTime(e,t){var n;let r=H(n=this.customTimes).call(n,e=>t===e.options.id);if(r.length===0)throw Error(`No custom time bar found with id ${iS(t)}`);r.length>0&&r[0].setCustomTime(e)}getCustomTime(e){var t;let n=H(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${iS(e)}`);return n[0].getCustomTime()}setCustomTimeMarker(e,t,n){var r;let a=H(r=this.customTimes).call(r,e=>e.options.id===t);if(a.length===0)throw Error(`No custom time bar found with id ${iS(t)}`);a.length>0&&a[0].setCustomMarker(e,n)}setCustomTimeTitle(e,t){var n;let r=H(n=this.customTimes).call(n,e=>e.options.id===t);if(r.length===0)throw Error(`No custom time bar found with id ${iS(t)}`);if(r.length>0)return r[0].setCustomTitle(e)}getEventProperties(e){return{event:e}}addCustomTime(e,t){var n;let r=e===void 0?new Date:q.convert(e,`Date`);if(Sb(n=this.customTimes).call(n,e=>e.options.id===t))throw Error(`A custom time with id ${iS(t)} already exists`);let a=new uM(this.body,q.extend({},this.options,{time:r,id:t,snap:this.itemSet?this.itemSet.options.snap:this.options.snap}));return this.customTimes.push(a),this.components.push(a),this._redraw(),t}removeCustomTime(e){var t;let n=H(t=this.customTimes).call(t,t=>t.options.id===e);if(n.length===0)throw Error(`No custom time bar found with id ${iS(e)}`);W(n).call(n,e=>{var t,n,r,a;og(t=this.customTimes).call(t,K(n=this.customTimes).call(n,e),1),og(r=this.components).call(r,K(a=this.components).call(a,e),1),e.destroy()})}getVisibleItems(){return this.itemSet&&this.itemSet.getVisibleItems()||[]}getItemsAtCurrentTime(e){return this.time=e,this.itemSet&&this.itemSet.getItemsAtCurrentTime(this.time)||[]}getVisibleGroups(){return this.itemSet&&this.itemSet.getVisibleGroups()||[]}fit(e,t){let n=this.getDataRange();if(n.min===null&&n.max===null)return;let r=n.max-n.min,a=new Date(n.min.valueOf()-r*.01),o=new Date(n.max.valueOf()+r*.01),s=e&&e.animation!==void 0?e.animation:!0;this.range.setRange(a,o,{animation:s},t)}getDataRange(){throw Error(`Cannot invoke abstract method getDataRange`)}setWindow(e,t,n,r){typeof arguments[2]==`function`&&(r=arguments[2],n={});let a,o;arguments.length==1?(o=arguments[0],a=o.animation===void 0||o.animation,this.range.setRange(o.start,o.end,{animation:a})):arguments.length==2&&typeof arguments[1]==`function`?(o=arguments[0],r=arguments[1],a=o.animation===void 0||o.animation,this.range.setRange(o.start,o.end,{animation:a},r)):(a=n&&n.animation!==void 0?n.animation:!0,this.range.setRange(e,t,{animation:a},r))}moveTo(e,t,n){typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.range.end-this.range.start,a=q.convert(e,`Date`).valueOf(),o=a-r/2,s=a+r/2,c=t&&t.animation!==void 0?t.animation:!0;this.range.setRange(o,s,{animation:c},n)}getWindow(){let e=this.range.getRange();return{start:new Date(e.start),end:new Date(e.end)}}zoomIn(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),a=r.start.valueOf(),o=r.end.valueOf(),s=o-a,c=(s-s/(1+e))/2,l=a+c,u=o-c;this.setWindow(l,u,t,n)}zoomOut(e,t,n){if(!e||e<0||e>1)return;typeof arguments[1]==`function`&&(n=arguments[1],t={});let r=this.getWindow(),a=r.start.valueOf(),o=r.end.valueOf(),s=o-a,c=a-s*e/2,l=o+s*e/2;this.setWindow(c,l,t,n)}redraw(){this._redraw()}_redraw(){var e;this.redrawCount++;let t=this.dom;if(!t||!t.container||t.root.offsetWidth==0)return;let n=!1,r=this.options,a=this.props;xN(this.options.moment,this.body,this.options.hiddenDates),r.orientation==`top`?(q.addClassName(t.root,`vis-top`),q.removeClassName(t.root,`vis-bottom`)):(q.removeClassName(t.root,`vis-top`),q.addClassName(t.root,`vis-bottom`)),r.rtl?(q.addClassName(t.root,`vis-rtl`),q.removeClassName(t.root,`vis-ltr`)):(q.addClassName(t.root,`vis-ltr`),q.removeClassName(t.root,`vis-rtl`)),t.root.style.maxHeight=q.option.asSize(r.maxHeight,``),t.root.style.minHeight=q.option.asSize(r.minHeight,``),t.root.style.width=q.option.asSize(r.width,``);let o=t.root.offsetWidth;a.border.left=1,a.border.right=1,a.border.top=1,a.border.bottom=1,a.center.height=t.center.offsetHeight,a.left.height=t.left.offsetHeight,a.right.height=t.right.offsetHeight,a.top.height=t.top.clientHeight||-a.border.top,a.bottom.height=Math.round(t.bottom.getBoundingClientRect().height)||t.bottom.clientHeight||-a.border.bottom;let s=Math.max(a.left.height,a.center.height,a.right.height),c=a.top.height+s+a.bottom.height+a.border.top+a.border.bottom;t.root.style.height=q.option.asSize(r.height,`${c}px`),a.root.height=t.root.offsetHeight,a.background.height=a.root.height;let l=a.root.height-a.top.height-a.bottom.height;a.centerContainer.height=l,a.leftContainer.height=l,a.rightContainer.height=a.leftContainer.height,a.root.width=o,a.background.width=a.root.width,this.initialDrawDone||(a.scrollbarWidth=q.getScrollBarWidth());let u=t.leftContainer.clientWidth,d=t.rightContainer.clientWidth;r.verticalScroll?r.rtl?(a.left.width=u||-a.border.left,a.right.width=d+a.scrollbarWidth||-a.border.right):(a.left.width=u+a.scrollbarWidth||-a.border.left,a.right.width=d||-a.border.right):(a.left.width=u||-a.border.left,a.right.width=d||-a.border.right),this._setDOM();let f=this._updateScrollTop();r.orientation.item!=`top`&&(f+=Math.max(a.centerContainer.height-a.center.height-a.border.top-a.border.bottom,0)),t.center.style.transform=`translateY(${f}px)`;let p=a.scrollTop==0?`hidden`:``,m=a.scrollTop==a.scrollTopMin?`hidden`:``;t.shadowTop.style.visibility=p,t.shadowBottom.style.visibility=m,t.shadowTopLeft.style.visibility=p,t.shadowBottomLeft.style.visibility=m,t.shadowTopRight.style.visibility=p,t.shadowBottomRight.style.visibility=m,r.verticalScroll&&(t.rightContainer.className=`vis-panel vis-right vis-vertical-scroll`,t.leftContainer.className=`vis-panel vis-left vis-vertical-scroll`,t.shadowTopRight.style.visibility=`hidden`,t.shadowBottomRight.style.visibility=`hidden`,t.shadowTopLeft.style.visibility=`hidden`,t.shadowBottomLeft.style.visibility=`hidden`,t.left.style.top=`0px`,t.right.style.top=`0px`),(!r.verticalScroll||a.center.height<a.centerContainer.height)&&(t.left.style.top=`${f}px`,t.right.style.top=`${f}px`,t.rightContainer.className=t.rightContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),t.leftContainer.className=t.leftContainer.className.replace(RegExp(`(?:^|\\s)vis-vertical-scroll(?:\\s|$)`),` `),a.left.width=u||-a.border.left,a.right.width=d||-a.border.right,this._setDOM());let h=a.center.height>a.centerContainer.height;if(this.hammer.get(`pan`).set({direction:h?hA.DIRECTION_ALL:hA.DIRECTION_HORIZONTAL}),this.hammer.get(`press`).set({time:this.options.longSelectPressTime}),W(e=this.components).call(e,e=>{n=e.redraw()||n}),n){if(this.redrawCount<5){this.body.emitter.emit(`_change`);return}console.log(`WARNING: infinite loop in redraw?`)}else this.redrawCount=0;this.body.emitter.emit(`changed`)}_setDOM(){let e=this.props,t=this.dom;e.leftContainer.width=e.left.width,e.rightContainer.width=e.right.width;let n=e.root.width-e.left.width-e.right.width;e.center.width=n,e.centerContainer.width=n,e.top.width=n,e.bottom.width=n,t.background.style.height=`${e.background.height}px`,t.backgroundVertical.style.height=`${e.background.height}px`,t.backgroundHorizontal.style.height=`${e.centerContainer.height}px`,t.centerContainer.style.height=`${e.centerContainer.height}px`,t.leftContainer.style.height=`${e.leftContainer.height}px`,t.rightContainer.style.height=`${e.rightContainer.height}px`,t.background.style.width=`${e.background.width}px`,t.backgroundVertical.style.width=`${e.centerContainer.width}px`,t.backgroundHorizontal.style.width=`${e.background.width}px`,t.centerContainer.style.width=`${e.center.width}px`,t.top.style.width=`${e.top.width}px`,t.bottom.style.width=`${e.bottom.width}px`,t.background.style.left=`0`,t.background.style.top=`0`,t.backgroundVertical.style.left=`${e.left.width+e.border.left}px`,t.backgroundVertical.style.top=`0`,t.backgroundHorizontal.style.left=`0`,t.backgroundHorizontal.style.top=`${e.top.height}px`,t.centerContainer.style.left=`${e.left.width}px`,t.centerContainer.style.top=`${e.top.height}px`,t.leftContainer.style.left=`0`,t.leftContainer.style.top=`${e.top.height}px`,t.rightContainer.style.left=`${e.left.width+e.center.width}px`,t.rightContainer.style.top=`${e.top.height}px`,t.top.style.left=`${e.left.width}px`,t.top.style.top=`0`,t.bottom.style.left=`${e.left.width}px`,t.bottom.style.top=`${e.top.height+e.centerContainer.height}px`,t.center.style.left=`0`,t.left.style.left=`0`,t.right.style.left=`0`}setCurrentTime(e){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);this.currentTime.setCurrentTime(e)}getCurrentTime(){if(!this.currentTime)throw Error(`Option showCurrentTime must be true`);return this.currentTime.getCurrentTime()}_toTime(e){return EN(this,e,this.props.center.width)}_toGlobalTime(e){return EN(this,e,this.props.root.width)}_toScreen(e){return TN(this,e,this.props.center.width)}_toGlobalScreen(e){return TN(this,e,this.props.root.width)}_initAutoResize(){this.options.autoResize==1?this._startAutoResize():this._stopAutoResize()}_startAutoResize(){let e=this;this._stopAutoResize(),this._onResize=()=>{if(e.options.autoResize!=1)e._stopAutoResize();else if(e.dom.root){let t=e.dom.root.offsetHeight,n=e.dom.root.offsetWidth;(n!=e.props.lastWidth||t!=e.props.lastHeight)&&(e.props.lastWidth=n,e.props.lastHeight=t,e.props.scrollbarWidth=q.getScrollBarWidth(),e.body.emitter.emit(`_change`))}},window.addEventListener(`resize`,this._onResize),e.dom.root&&(e.props.lastWidth=e.dom.root.offsetWidth,e.props.lastHeight=e.dom.root.offsetHeight),this.watchTimer=pP(this._onResize,1e3)}_stopAutoResize(){this.watchTimer&&=(clearInterval(this.watchTimer),void 0),this._onResize&&=(window.removeEventListener(`resize`,this._onResize),null)}_onTouch(){this.touch.allowDragging=!0,this.touch.initialScrollTop=this.props.scrollTop}_onPinch(){this.touch.allowDragging=!1}_onDrag(e){if(!e||!this.touch.allowDragging)return;let t=e.deltaY,n=this._getScrollTop(),r=this._setScrollTop(this.touch.initialScrollTop+t);this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),r!=n&&this.emit(`verticalDrag`)}_setScrollTop(e){return this.props.scrollTop=e,this._updateScrollTop(),this.props.scrollTop}_updateScrollTop(){let e=Math.min(this.props.centerContainer.height-this.props.border.top-this.props.border.bottom-this.props.center.height,0);return e!=this.props.scrollTopMin&&(this.options.orientation.item!=`top`&&(this.props.scrollTop+=e-this.props.scrollTopMin),this.props.scrollTopMin=e),this.props.scrollTop>0&&(this.props.scrollTop=0),this.props.scrollTop<e&&(this.props.scrollTop=e),this.options.verticalScroll&&(this.dom.left.parentNode.scrollTop=-this.props.scrollTop,this.dom.right.parentNode.scrollTop=-this.props.scrollTop),this.props.scrollTop}_getScrollTop(){return this.props.scrollTop}_createConfigurator(){throw Error(`Cannot invoke abstract method _createConfigurator`)}};HT(yP.prototype);var bP={black:`#000000`,navy:`#000080`,darkblue:`#00008B`,mediumblue:`#0000CD`,blue:`#0000FF`,darkgreen:`#006400`,green:`#008000`,teal:`#008080`,darkcyan:`#008B8B`,deepskyblue:`#00BFFF`,darkturquoise:`#00CED1`,mediumspringgreen:`#00FA9A`,lime:`#00FF00`,springgreen:`#00FF7F`,aqua:`#00FFFF`,cyan:`#00FFFF`,midnightblue:`#191970`,dodgerblue:`#1E90FF`,lightseagreen:`#20B2AA`,forestgreen:`#228B22`,seagreen:`#2E8B57`,darkslategray:`#2F4F4F`,limegreen:`#32CD32`,mediumseagreen:`#3CB371`,turquoise:`#40E0D0`,royalblue:`#4169E1`,steelblue:`#4682B4`,darkslateblue:`#483D8B`,mediumturquoise:`#48D1CC`,indigo:`#4B0082`,darkolivegreen:`#556B2F`,cadetblue:`#5F9EA0`,cornflowerblue:`#6495ED`,mediumaquamarine:`#66CDAA`,dimgray:`#696969`,slateblue:`#6A5ACD`,olivedrab:`#6B8E23`,slategray:`#708090`,lightslategray:`#778899`,mediumslateblue:`#7B68EE`,lawngreen:`#7CFC00`,chartreuse:`#7FFF00`,aquamarine:`#7FFFD4`,maroon:`#800000`,purple:`#800080`,olive:`#808000`,gray:`#808080`,skyblue:`#87CEEB`,lightskyblue:`#87CEFA`,blueviolet:`#8A2BE2`,darkred:`#8B0000`,darkmagenta:`#8B008B`,saddlebrown:`#8B4513`,darkseagreen:`#8FBC8F`,lightgreen:`#90EE90`,mediumpurple:`#9370D8`,darkviolet:`#9400D3`,palegreen:`#98FB98`,darkorchid:`#9932CC`,yellowgreen:`#9ACD32`,sienna:`#A0522D`,brown:`#A52A2A`,darkgray:`#A9A9A9`,lightblue:`#ADD8E6`,greenyellow:`#ADFF2F`,paleturquoise:`#AFEEEE`,lightsteelblue:`#B0C4DE`,powderblue:`#B0E0E6`,firebrick:`#B22222`,darkgoldenrod:`#B8860B`,mediumorchid:`#BA55D3`,rosybrown:`#BC8F8F`,darkkhaki:`#BDB76B`,silver:`#C0C0C0`,mediumvioletred:`#C71585`,indianred:`#CD5C5C`,peru:`#CD853F`,chocolate:`#D2691E`,tan:`#D2B48C`,lightgrey:`#D3D3D3`,palevioletred:`#D87093`,thistle:`#D8BFD8`,orchid:`#DA70D6`,goldenrod:`#DAA520`,crimson:`#DC143C`,gainsboro:`#DCDCDC`,plum:`#DDA0DD`,burlywood:`#DEB887`,lightcyan:`#E0FFFF`,lavender:`#E6E6FA`,darksalmon:`#E9967A`,violet:`#EE82EE`,palegoldenrod:`#EEE8AA`,lightcoral:`#F08080`,khaki:`#F0E68C`,aliceblue:`#F0F8FF`,honeydew:`#F0FFF0`,azure:`#F0FFFF`,sandybrown:`#F4A460`,wheat:`#F5DEB3`,beige:`#F5F5DC`,whitesmoke:`#F5F5F5`,mintcream:`#F5FFFA`,ghostwhite:`#F8F8FF`,salmon:`#FA8072`,antiquewhite:`#FAEBD7`,linen:`#FAF0E6`,lightgoldenrodyellow:`#FAFAD2`,oldlace:`#FDF5E6`,red:`#FF0000`,fuchsia:`#FF00FF`,magenta:`#FF00FF`,deeppink:`#FF1493`,orangered:`#FF4500`,tomato:`#FF6347`,hotpink:`#FF69B4`,coral:`#FF7F50`,darkorange:`#FF8C00`,lightsalmon:`#FFA07A`,orange:`#FFA500`,lightpink:`#FFB6C1`,pink:`#FFC0CB`,gold:`#FFD700`,peachpuff:`#FFDAB9`,navajowhite:`#FFDEAD`,moccasin:`#FFE4B5`,bisque:`#FFE4C4`,mistyrose:`#FFE4E1`,blanchedalmond:`#FFEBCD`,papayawhip:`#FFEFD5`,lavenderblush:`#FFF0F5`,seashell:`#FFF5EE`,cornsilk:`#FFF8DC`,lemonchiffon:`#FFFACD`,floralwhite:`#FFFAF0`,snow:`#FFFAFA`,yellow:`#FFFF00`,lightyellow:`#FFFFE0`,ivory:`#FFFFF0`,white:`#FFFFFF`},xP=class{constructor(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:1;this.pixelRatio=e,this.generated=!1,this.centerCoordinates={x:289/2,y:289/2},this.r=289*.49,this.color={r:255,g:255,b:255,a:1},this.hueCircle=void 0,this.initialColor={r:255,g:255,b:255,a:1},this.previousColor=void 0,this.applied=!1,this.updateCallback=()=>{},this.closeCallback=()=>{},this._create()}insertTo(e){this.hammer!==void 0&&(this.hammer.destroy(),this.hammer=void 0),this.container=e,this.container.appendChild(this.frame),this._bindHammer(),this._setSize()}setUpdateCallback(e){if(typeof e==`function`)this.updateCallback=e;else throw Error(`Function attempted to set as colorPicker update callback is not a function.`)}setCloseCallback(e){if(typeof e==`function`)this.closeCallback=e;else throw Error(`Function attempted to set as colorPicker closing callback is not a function.`)}_isColorString(e){if(typeof e==`string`)return bP[e]}setColor(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e===`none`)return;let n;var r=this._isColorString(e);if(r!==void 0&&(e=r),q.isString(e)===!0){if(q.isValidRGB(e)===!0){let t=e.substr(4).substr(0,e.length-5).split(`,`);n={r:t[0],g:t[1],b:t[2],a:1}}else if(q.isValidRGBA(e)===!0){let t=e.substr(5).substr(0,e.length-6).split(`,`);n={r:t[0],g:t[1],b:t[2],a:t[3]}}else if(q.isValidHex(e)===!0){let t=q.hexToRGB(e);n={r:t.r,g:t.g,b:t.b,a:1}}}else if(e instanceof Object&&e.r!==void 0&&e.g!==void 0&&e.b!==void 0){let t=e.a===void 0?`1.0`:e.a;n={r:e.r,g:e.g,b:e.b,a:t}}if(n===void 0)throw Error(`Unknown color passed to the colorPicker. Supported are strings: rgb, hex, rgba. Object: rgb ({r:r,g:g,b:b,[a:a]}). Supplied: `+iS(e));this._setColor(n,t)}show(){this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0),this.applied=!1,this.frame.style.display=`block`,this._generateHueCircle()}_hide(){(arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0)===!0&&(this.previousColor=q.extend({},this.color)),this.applied===!0&&this.updateCallback(this.initialColor),this.frame.style.display=`none`,Ch(()=>{this.closeCallback!==void 0&&(this.closeCallback(),this.closeCallback=void 0)},0)}_save(){this.updateCallback(this.color),this.applied=!1,this._hide()}_apply(){this.applied=!0,this.updateCallback(this.color),this._updatePicker(this.color)}_loadLast(){this.previousColor===void 0?alert(`There is no last color to load...`):this.setColor(this.previousColor,!1)}_setColor(e){(arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0)===!0&&(this.initialColor=q.extend({},e)),this.color=e;let t=q.RGBToHSV(e.r,e.g,e.b),n=2*Math.PI,r=this.r*t.s,a=this.centerCoordinates.x+r*Math.sin(n*t.h),o=this.centerCoordinates.y+r*Math.cos(n*t.h);this.colorPickerSelector.style.left=a-.5*this.colorPickerSelector.clientWidth+`px`,this.colorPickerSelector.style.top=o-.5*this.colorPickerSelector.clientHeight+`px`,this._updatePicker(e)}_setOpacity(e){this.color.a=e/100,this._updatePicker(this.color)}_setBrightness(e){let t=q.RGBToHSV(this.color.r,this.color.g,this.color.b);t.v=e/100;let n=q.HSVToRGB(t.h,t.s,t.v);n.a=this.color.a,this.color=n,this._updatePicker()}_updatePicker(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.color,t=q.RGBToHSV(e.r,e.g,e.b),n=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(n.webkitBackingStorePixelRatio||n.mozBackingStorePixelRatio||n.msBackingStorePixelRatio||n.oBackingStorePixelRatio||n.backingStorePixelRatio||1)),n.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let r=this.colorPickerCanvas.clientWidth,a=this.colorPickerCanvas.clientHeight;n.clearRect(0,0,r,a),n.putImageData(this.hueCircle,0,0),n.fillStyle=`rgba(0,0,0,`+(1-t.v)+`)`,n.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),RT(n).call(n),this.brightnessRange.value=100*t.v,this.opacityRange.value=100*e.a,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}_setSize(){this.colorPickerCanvas.style.width=`100%`,this.colorPickerCanvas.style.height=`100%`,this.colorPickerCanvas.width=289*this.pixelRatio,this.colorPickerCanvas.height=289*this.pixelRatio}_create(){var e,t,n,r;if(this.frame=document.createElement(`div`),this.frame.className=`vis-color-picker`,this.colorPickerDiv=document.createElement(`div`),this.colorPickerSelector=document.createElement(`div`),this.colorPickerSelector.className=`vis-selector`,this.colorPickerDiv.appendChild(this.colorPickerSelector),this.colorPickerCanvas=document.createElement(`canvas`),this.colorPickerDiv.appendChild(this.colorPickerCanvas),this.colorPickerCanvas.getContext){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1),this.colorPickerCanvas.getContext(`2d`).setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0)}else{let e=document.createElement(`DIV`);e.style.color=`red`,e.style.fontWeight=`bold`,e.style.padding=`10px`,e.innerHTML=`Error: your browser does not support HTML canvas`,this.colorPickerCanvas.appendChild(e)}this.colorPickerDiv.className=`vis-color`,this.opacityDiv=document.createElement(`div`),this.opacityDiv.className=`vis-opacity`,this.brightnessDiv=document.createElement(`div`),this.brightnessDiv.className=`vis-brightness`,this.arrowDiv=document.createElement(`div`),this.arrowDiv.className=`vis-arrow`,this.opacityRange=document.createElement(`input`);try{this.opacityRange.type=`range`,this.opacityRange.min=`0`,this.opacityRange.max=`100`}catch{}this.opacityRange.value=`100`,this.opacityRange.className=`vis-range`,this.brightnessRange=document.createElement(`input`);try{this.brightnessRange.type=`range`,this.brightnessRange.min=`0`,this.brightnessRange.max=`100`}catch{}this.brightnessRange.value=`100`,this.brightnessRange.className=`vis-range`,this.opacityDiv.appendChild(this.opacityRange),this.brightnessDiv.appendChild(this.brightnessRange);var a=this;this.opacityRange.onchange=function(){a._setOpacity(this.value)},this.opacityRange.oninput=function(){a._setOpacity(this.value)},this.brightnessRange.onchange=function(){a._setBrightness(this.value)},this.brightnessRange.oninput=function(){a._setBrightness(this.value)},this.brightnessLabel=document.createElement(`div`),this.brightnessLabel.className=`vis-label vis-brightness`,this.brightnessLabel.innerHTML=`brightness:`,this.opacityLabel=document.createElement(`div`),this.opacityLabel.className=`vis-label vis-opacity`,this.opacityLabel.innerHTML=`opacity:`,this.newColorDiv=document.createElement(`div`),this.newColorDiv.className=`vis-new-color`,this.newColorDiv.innerHTML=`new`,this.initialColorDiv=document.createElement(`div`),this.initialColorDiv.className=`vis-initial-color`,this.initialColorDiv.innerHTML=`initial`,this.cancelButton=document.createElement(`div`),this.cancelButton.className=`vis-button vis-cancel`,this.cancelButton.innerHTML=`cancel`,this.cancelButton.onclick=V(e=this._hide).call(e,this,!1),this.applyButton=document.createElement(`div`),this.applyButton.className=`vis-button vis-apply`,this.applyButton.innerHTML=`apply`,this.applyButton.onclick=V(t=this._apply).call(t,this),this.saveButton=document.createElement(`div`),this.saveButton.className=`vis-button vis-save`,this.saveButton.innerHTML=`save`,this.saveButton.onclick=V(n=this._save).call(n,this),this.loadButton=document.createElement(`div`),this.loadButton.className=`vis-button vis-load`,this.loadButton.innerHTML=`load last`,this.loadButton.onclick=V(r=this._loadLast).call(r,this),this.frame.appendChild(this.colorPickerDiv),this.frame.appendChild(this.arrowDiv),this.frame.appendChild(this.brightnessLabel),this.frame.appendChild(this.brightnessDiv),this.frame.appendChild(this.opacityLabel),this.frame.appendChild(this.opacityDiv),this.frame.appendChild(this.newColorDiv),this.frame.appendChild(this.initialColorDiv),this.frame.appendChild(this.cancelButton),this.frame.appendChild(this.applyButton),this.frame.appendChild(this.saveButton),this.frame.appendChild(this.loadButton)}_bindHammer(){this.drag={},this.pinch={},this.hammer=new hA(this.colorPickerCanvas),this.hammer.get(`pinch`).set({enable:!0}),mP(this.hammer,e=>{this._moveSelector(e)}),this.hammer.on(`tap`,e=>{this._moveSelector(e)}),this.hammer.on(`panstart`,e=>{this._moveSelector(e)}),this.hammer.on(`panmove`,e=>{this._moveSelector(e)}),this.hammer.on(`panend`,e=>{this._moveSelector(e)})}_generateHueCircle(){if(this.generated===!1){let e=this.colorPickerCanvas.getContext(`2d`);this.pixelRation===void 0&&(this.pixelRatio=(window.devicePixelRatio||1)/(e.webkitBackingStorePixelRatio||e.mozBackingStorePixelRatio||e.msBackingStorePixelRatio||e.oBackingStorePixelRatio||e.backingStorePixelRatio||1)),e.setTransform(this.pixelRatio,0,0,this.pixelRatio,0,0);let t=this.colorPickerCanvas.clientWidth,n=this.colorPickerCanvas.clientHeight;e.clearRect(0,0,t,n);let r,a,o,s;this.centerCoordinates={x:t*.5,y:n*.5},this.r=.49*t;let c=2*Math.PI/360,l=1/this.r,u;for(o=0;o<360;o++)for(s=0;s<this.r;s++)r=this.centerCoordinates.x+s*Math.sin(c*o),a=this.centerCoordinates.y+s*Math.cos(c*o),u=q.HSVToRGB(o*.002777777777777778,s*l,1),e.fillStyle=`rgb(`+u.r+`,`+u.g+`,`+u.b+`)`,e.fillRect(r-.5,a-.5,2,2);e.strokeStyle=`rgba(0,0,0,1)`,e.circle(this.centerCoordinates.x,this.centerCoordinates.y,this.r),e.stroke(),this.hueCircle=e.getImageData(0,0,t,n)}this.generated=!0}_moveSelector(e){let t=this.colorPickerDiv.getBoundingClientRect(),n=e.center.x-t.left,r=e.center.y-t.top,a=.5*this.colorPickerDiv.clientHeight,o=.5*this.colorPickerDiv.clientWidth,s=n-o,c=r-a,l=Math.atan2(s,c),u=.98*Math.min(Math.sqrt(s*s+c*c),o),d=Math.cos(l)*u+a,f=Math.sin(l)*u+o;this.colorPickerSelector.style.top=d-.5*this.colorPickerSelector.clientHeight+`px`,this.colorPickerSelector.style.left=f-.5*this.colorPickerSelector.clientWidth+`px`;let p=l/(2*Math.PI);p=p<0?p+1:p;let m=u/this.r,h=q.RGBToHSV(this.color.r,this.color.g,this.color.b);h.h=p,h.s=m;let g=q.HSVToRGB(h.h,h.s,h.v);g.a=this.color.a,this.color=g,this.initialColorDiv.style.backgroundColor=`rgba(`+this.initialColor.r+`,`+this.initialColor.g+`,`+this.initialColor.b+`,`+this.initialColor.a+`)`,this.newColorDiv.style.backgroundColor=`rgba(`+this.color.r+`,`+this.color.g+`,`+this.color.b+`,`+this.color.a+`)`}},SP=class{constructor(e,t,n){let r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:1;this.parent=e,this.changedOptions=[],this.container=t,this.allowCreation=!1,this.options={},this.initialized=!1,this.popupCounter=0,this.defaultOptions={enabled:!1,filter:!0,container:void 0,showButton:!0},q.extend(this.options,this.defaultOptions),this.configureOptions=n,this.moduleOptions={},this.domElements=[],this.popupDiv={},this.popupLimit=5,this.popupHistory={},this.colorPicker=new xP(r),this.wrapper=void 0}setOptions(e){if(e!==void 0){this.popupHistory={},this._removePopup();let t=!0;if(typeof e==`string`)this.options.filter=e;else if(G(e))this.options.filter=e.join();else if(typeof e==`object`){if(e==null)throw TypeError(`options cannot be null`);e.container!==void 0&&(this.options.container=e.container),H(e)!==void 0&&(this.options.filter=H(e)),e.showButton!==void 0&&(this.options.showButton=e.showButton),e.enabled!==void 0&&(t=e.enabled)}else typeof e==`boolean`?(this.options.filter=!0,t=e):typeof e==`function`&&(this.options.filter=e,t=!0);H(this.options)===!1&&(t=!1),this.options.enabled=t}this._clean()}setModuleOptions(e){this.moduleOptions=e,this.options.enabled===!0&&(this._clean(),this.options.container!==void 0&&(this.container=this.options.container),this._create())}_create(){this._clean(),this.changedOptions=[];let e=H(this.options),t=0,n=!1;for(let r in this.configureOptions)Object.prototype.hasOwnProperty.call(this.configureOptions,r)&&(this.allowCreation=!1,n=!1,typeof e==`function`?(n=e(r,[]),n||=this._handleObject(this.configureOptions[r],[r],!0)):(e===!0||K(e).call(e,r)!==-1)&&(n=!0),n!==!1&&(this.allowCreation=!0,t>0&&this._makeItem([]),this._makeHeader(r),this._handleObject(this.configureOptions[r],[r])),t++);this._makeButton(),this._push()}_push(){this.wrapper=document.createElement(`div`),this.wrapper.className=`vis-configuration-wrapper`,this.container.appendChild(this.wrapper);for(var e=0;e<this.domElements.length;e++)this.wrapper.appendChild(this.domElements[e]);this._showPopupIfNeeded()}_clean(){for(var e=0;e<this.domElements.length;e++)this.wrapper.removeChild(this.domElements[e]);this.wrapper!==void 0&&(this.container.removeChild(this.wrapper),this.wrapper=void 0),this.domElements=[],this._removePopup()}_getValue(e){let t=this.moduleOptions;for(let n=0;n<e.length;n++)if(t[e[n]]!==void 0)t=t[e[n]];else{t=void 0;break}return t}_makeItem(e){if(this.allowCreation===!0){let n=document.createElement(`div`);n.className=`vis-configuration vis-config-item vis-config-s`+e.length;var t=[...arguments].slice(1);return W(t).call(t,e=>{n.appendChild(e)}),this.domElements.push(n),this.domElements.length}return 0}_makeHeader(e){let t=document.createElement(`div`);t.className=`vis-configuration vis-config-header`,t.innerHTML=q.xss(e),this._makeItem([],t)}_makeLabel(e,t){let n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=document.createElement(`div`);return r.className=`vis-configuration vis-config-label vis-config-s`+t.length,r.innerHTML=n===!0?q.xss(`<i><b>`+e+`:</b></i>`):q.xss(e+`:`),r}_makeDropdown(e,t,n){let r=document.createElement(`select`);r.className=`vis-configuration vis-config-select`;let a=0;t!==void 0&&K(e).call(e,t)!==-1&&(a=K(e).call(e,t));for(let t=0;t<e.length;t++){let n=document.createElement(`option`);n.value=e[t],t===a&&(n.selected=`selected`),n.innerHTML=e[t],r.appendChild(n)}let o=this;r.onchange=function(){o._update(this.value,n)};let s=this._makeLabel(n[n.length-1],n);this._makeItem(n,s,r)}_makeRange(e,t,n){let r=e[0],a=e[1],o=e[2],s=e[3],c=document.createElement(`input`);c.className=`vis-configuration vis-config-range`;try{c.type=`range`,c.min=a,c.max=o}catch{}c.step=s;let l=``,u=0;if(t!==void 0){let e=1.2;t<0&&t*e<a?(c.min=Math.ceil(t*e),u=c.min,l=`range increased`):t/e<a&&(c.min=Math.ceil(t/e),u=c.min,l=`range increased`),t*e>o&&o!==1&&(c.max=Math.ceil(t*e),u=c.max,l=`range increased`),c.value=t}else c.value=r;let d=document.createElement(`input`);d.className=`vis-configuration vis-config-rangeinput`,d.value=Number(c.value);var f=this;c.onchange=function(){d.value=this.value,f._update(Number(this.value),n)},c.oninput=function(){d.value=this.value};let p=this._makeLabel(n[n.length-1],n),m=this._makeItem(n,p,c,d);l!==``&&this.popupHistory[m]!==u&&(this.popupHistory[m]=u,this._setupPopup(l,m))}_makeButton(){if(this.options.showButton===!0){let e=document.createElement(`div`);e.className=`vis-configuration vis-config-button`,e.innerHTML=`generate options`,e.onclick=()=>{this._printOptions()},e.onmouseover=()=>{e.className=`vis-configuration vis-config-button hover`},e.onmouseout=()=>{e.className=`vis-configuration vis-config-button`},this.optionsContainer=document.createElement(`div`),this.optionsContainer.className=`vis-configuration vis-config-option-container`,this.domElements.push(this.optionsContainer),this.domElements.push(e)}}_setupPopup(e,t){if(this.initialized===!0&&this.allowCreation===!0&&this.popupCounter<this.popupLimit){let n=document.createElement(`div`);n.id=`vis-configuration-popup`,n.className=`vis-configuration-popup`,n.innerHTML=q.xss(e),n.onclick=()=>{this._removePopup()},this.popupCounter+=1,this.popupDiv={html:n,index:t}}}_removePopup(){this.popupDiv.html!==void 0&&(this.popupDiv.html.parentNode.removeChild(this.popupDiv.html),clearTimeout(this.popupDiv.hideTimeout),clearTimeout(this.popupDiv.deleteTimeout),this.popupDiv={})}_showPopupIfNeeded(){if(this.popupDiv.html!==void 0){let e=this.domElements[this.popupDiv.index].getBoundingClientRect();this.popupDiv.html.style.left=e.left+`px`,this.popupDiv.html.style.top=e.top-30+`px`,document.body.appendChild(this.popupDiv.html),this.popupDiv.hideTimeout=Ch(()=>{this.popupDiv.html.style.opacity=0},1500),this.popupDiv.deleteTimeout=Ch(()=>{this._removePopup()},1800)}}_makeCheckbox(e,t,n){var r=document.createElement(`input`);r.type=`checkbox`,r.className=`vis-configuration vis-config-checkbox`,r.checked=e,t!==void 0&&(r.checked=t,t!==e&&(typeof e==`object`?t!==e.enabled&&this.changedOptions.push({path:n,value:t}):this.changedOptions.push({path:n,value:t})));let a=this;r.onchange=function(){a._update(this.checked,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeTextInput(e,t,n){var r=document.createElement(`input`);r.type=`text`,r.className=`vis-configuration vis-config-text`,r.value=t,t!==e&&this.changedOptions.push({path:n,value:t});let a=this;r.onchange=function(){a._update(this.value,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,r)}_makeColorField(e,t,n){let r=e[1],a=document.createElement(`div`);t=t===void 0?r:t,t===`none`?a.className=`vis-configuration vis-config-colorBlock none`:(a.className=`vis-configuration vis-config-colorBlock`,a.style.backgroundColor=t),t=t===void 0?r:t,a.onclick=()=>{this._showColorPicker(t,a,n)};let o=this._makeLabel(n[n.length-1],n);this._makeItem(n,o,a)}_showColorPicker(e,t,n){t.onclick=function(){},this.colorPicker.insertTo(t),this.colorPicker.show(),this.colorPicker.setColor(e),this.colorPicker.setUpdateCallback(e=>{let r=`rgba(`+e.r+`,`+e.g+`,`+e.b+`,`+e.a+`)`;t.style.backgroundColor=r,this._update(r,n)}),this.colorPicker.setCloseCallback(()=>{t.onclick=()=>{this._showColorPicker(e,t,n)}})}_handleObject(e){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0&&arguments[2],r=!1,a=H(this.options),o=!1;for(let s in e){if(!Object.prototype.hasOwnProperty.call(e,s))continue;r=!0;let c=e[s],l=q.copyAndExtendArray(t,s);if(typeof a==`function`&&(r=a(s,t),r===!1&&!G(c)&&typeof c!=`string`&&typeof c!=`boolean`&&c instanceof Object&&(this.allowCreation=!1,r=this._handleObject(c,l,!0),this.allowCreation=n===!1)),r!==!1){o=!0;let e=this._getValue(l);if(G(c))this._handleArray(c,e,l);else if(typeof c==`string`)this._makeTextInput(c,e,l);else if(typeof c==`boolean`)this._makeCheckbox(c,e,l);else if(c instanceof Object){let e=!0;if(K(t).call(t,`physics`)!==-1&&this.moduleOptions.physics.solver!==s&&(e=!1),e===!0){if(c.enabled!==void 0){let e=q.copyAndExtendArray(l,`enabled`),t=this._getValue(e);if(t===!0){let e=this._makeLabel(s,l,!0);this._makeItem(l,e),o=this._handleObject(c,l)||o}else this._makeCheckbox(c,t,l)}else{let e=this._makeLabel(s,l,!0);this._makeItem(l,e),o=this._handleObject(c,l)||o}}}else console.error(`dont know how to handle`,c,s,l)}}return o}_handleArray(e,t,n){typeof e[0]==`string`&&e[0]===`color`?(this._makeColorField(e,t,n),e[1]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`string`?(this._makeDropdown(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:t})):typeof e[0]==`number`&&(this._makeRange(e,t,n),e[0]!==t&&this.changedOptions.push({path:n,value:Number(t)}))}_update(e,t){let n=this._constructOptions(e,t);this.parent.body&&this.parent.body.emitter&&this.parent.body.emitter.emit&&this.parent.body.emitter.emit(`configChange`,n),this.initialized=!0,this.parent.setOptions(n)}_constructOptions(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=n;e=e===`true`||e,e=e!==`false`&&e;for(let n=0;n<t.length;n++)t[n]!==`global`&&(r[t[n]]===void 0&&(r[t[n]]={}),n===t.length-1?r[t[n]]=e:r=r[t[n]]);return n}_printOptions(){let e=this.getOptions();this.optionsContainer.innerHTML=`<pre>var options = `+iS(e,null,2)+`</pre>`}getOptions(){let e={};for(var t=0;t<this.changedOptions.length;t++)this._constructOptions(this.changedOptions[t].value,this.changedOptions[t].path,e);return e}},CP=!1,wP,TP=`background: #FFeeee; color: #dd0000`,EP=class e{static validate(t,n,r){CP=!1,wP=n;let a=n;return r!==void 0&&(a=n[r]),e.parse(t,a,[]),CP}static parse(t,n,r){for(let a in t)Object.prototype.hasOwnProperty.call(t,a)&&e.check(a,t,n,r)}static check(t,n,r,a){if(r[t]===void 0&&r.__any__===void 0){e.getSuggestion(t,r,a);return}let o=t,s=!0;r[t]===void 0&&r.__any__!==void 0&&(o=`__any__`,s=e.getType(n[t])===`object`);let c=r[o];s&&c.__type__!==void 0&&(c=c.__type__),e.checkFields(t,n,r,o,c,a)}static checkFields(t,n,r,a,o,s){let c=function(n){console.log(`%c`+n+e.printLocation(s,t),TP)},l=e.getType(n[t]),u=o[l];u===void 0?o.any===void 0&&(c(`Invalid type received for "`+t+`". Expected: `+e.print(Cx(o))+`. Received [`+l+`] "`+n[t]+`"`),CP=!0):e.getType(u)===`array`&&K(u).call(u,n[t])===-1?(c(`Invalid option detected in "`+t+`". Allowed values are:`+e.print(u)+` not "`+n[t]+`". `),CP=!0):l===`object`&&a!==`__any__`&&(s=q.copyAndExtendArray(s,t),e.parse(n[t],r[a],s))}static getType(e){var t=typeof e;return t===`object`?e===null?`null`:e instanceof Boolean?`boolean`:e instanceof Number?`number`:e instanceof String?`string`:G(e)?`array`:e instanceof Date?`date`:e.nodeType===void 0?e._isAMomentObject===!0?`moment`:`object`:`dom`:t===`number`?`number`:t===`boolean`?`boolean`:t===`string`?`string`:t===void 0?`undefined`:t}static getSuggestion(t,n,r){let a=e.findInOptions(t,n,r,!1),o=e.findInOptions(t,wP,[],!0),s;s=a.indexMatch===void 0?o.distance<=4&&a.distance>o.distance?` in `+e.printLocation(a.path,t,``)+`Perhaps it was misplaced? Matching option found at: `+e.printLocation(o.path,o.closestMatch,``):a.distance<=8?`. Did you mean "`+a.closestMatch+`"?`+e.printLocation(a.path,t):`. Did you mean one of these: `+e.print(Cx(n))+e.printLocation(r,t):` in `+e.printLocation(a.path,t,``)+`Perhaps it was incomplete? Did you mean: "`+a.indexMatch+`"?
22
+
23
+ `,console.log(`%cUnknown option detected: "`+t+`"`+s,TP),CP=!0}static findInOptions(t,n,r){let a=arguments.length>3&&arguments[3]!==void 0&&arguments[3],o=1e9,s=``,c=[],l=t.toLowerCase(),u;for(let f in n){if(!Object.prototype.hasOwnProperty.call(n,f))continue;let p;if(n[f].__type__!==void 0&&a===!0){let a=e.findInOptions(t,n[f],q.copyAndExtendArray(r,f));o>a.distance&&(s=a.closestMatch,c=a.path,o=a.distance,u=a.indexMatch)}else{var d;K(d=f.toLowerCase()).call(d,l)!==-1&&(u=f),p=e.levenshteinDistance(t,f),o>p&&(s=f,c=q.copyArray(r),o=p)}}return{closestMatch:s,path:c,distance:o,indexMatch:u}}static printLocation(e,t){let n=`
24
+
25
+ `+(arguments.length>2&&arguments[2]!==void 0?arguments[2]:`Problem value found at:
26
+ `)+`options = {
27
+ `;for(let t=0;t<e.length;t++){for(let e=0;e<t+1;e++)n+=` `;n+=e[t]+`: {
28
+ `}for(let t=0;t<e.length+1;t++)n+=` `;n+=t+`
29
+ `;for(let t=0;t<e.length+1;t++){for(let r=0;r<e.length-t;r++)n+=` `;n+=`}
30
+ `}return n+`
31
+
32
+ `}static print(e){return iS(e).replace(/(")|(\[)|(\])|(,"__type__")/g,``).replace(/(,)/g,`, `)}static levenshteinDistance(e,t){if(e.length===0)return t.length;if(t.length===0)return e.length;for(var n=[],r=0;r<=t.length;r++)n[r]=[r];for(var a=0;a<=e.length;a++)n[0][a]=a;for(r=1;r<=t.length;r++)for(a=1;a<=e.length;a++)t.charAt(r-1)==e.charAt(a-1)?n[r][a]=n[r-1][a-1]:n[r][a]=Math.min(n[r-1][a-1]+1,Math.min(n[r][a-1]+1,n[r-1][a]+1));return n[t.length][e.length]}},Y=`string`,X=`boolean`,Z=`number`,DP=`array`,OP=`date`,kP=`object`,AP=`dom`,jP=`moment`,MP=`any`,NP={configure:{enabled:{boolean:X},filter:{boolean:X,function:`function`},container:{dom:AP},__type__:{object:kP,boolean:X,function:`function`}},alignCurrentTime:{string:Y,undefined:`undefined`},yAxisOrientation:{string:[`left`,`right`]},defaultGroup:{string:Y},sort:{boolean:X},sampling:{boolean:X},stack:{boolean:X},graphHeight:{string:Y,number:Z},shaded:{enabled:{boolean:X},orientation:{string:[`bottom`,`top`,`zero`,`group`]},groupId:{object:kP},__type__:{boolean:X,object:kP}},style:{string:[`line`,`bar`,`points`]},barChart:{width:{number:Z},minWidth:{number:Z},sideBySide:{boolean:X},align:{string:[`left`,`center`,`right`]},__type__:{object:kP}},interpolation:{enabled:{boolean:X},parametrization:{string:[`centripetal`,`chordal`,`uniform`]},alpha:{number:Z},__type__:{object:kP,boolean:X}},drawPoints:{enabled:{boolean:X},onRender:{function:`function`},size:{number:Z},style:{string:[`square`,`circle`]},__type__:{object:kP,boolean:X,function:`function`}},dataAxis:{showMinorLabels:{boolean:X},showMajorLabels:{boolean:X},showWeekScale:{boolean:X},icons:{boolean:X},width:{string:Y,number:Z},visible:{boolean:X},alignZeros:{boolean:X},left:{range:{min:{number:Z,undefined:`undefined`},max:{number:Z,undefined:`undefined`},__type__:{object:kP}},format:{function:`function`},title:{text:{string:Y,number:Z,undefined:`undefined`},style:{string:Y,undefined:`undefined`},__type__:{object:kP}},__type__:{object:kP}},right:{range:{min:{number:Z,undefined:`undefined`},max:{number:Z,undefined:`undefined`},__type__:{object:kP}},format:{function:`function`},title:{text:{string:Y,number:Z,undefined:`undefined`},style:{string:Y,undefined:`undefined`},__type__:{object:kP}},__type__:{object:kP}},__type__:{object:kP}},legend:{enabled:{boolean:X},icons:{boolean:X},left:{visible:{boolean:X},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:kP}},right:{visible:{boolean:X},position:{string:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},__type__:{object:kP}},__type__:{object:kP,boolean:X}},groups:{visibility:{any:MP},__type__:{object:kP}},autoResize:{boolean:X},throttleRedraw:{number:Z},clickToUse:{boolean:X},end:{number:Z,date:OP,string:Y,moment:jP},format:{minorLabels:{millisecond:{string:Y,undefined:`undefined`},second:{string:Y,undefined:`undefined`},minute:{string:Y,undefined:`undefined`},hour:{string:Y,undefined:`undefined`},weekday:{string:Y,undefined:`undefined`},day:{string:Y,undefined:`undefined`},week:{string:Y,undefined:`undefined`},month:{string:Y,undefined:`undefined`},quarter:{string:Y,undefined:`undefined`},year:{string:Y,undefined:`undefined`},__type__:{object:kP}},majorLabels:{millisecond:{string:Y,undefined:`undefined`},second:{string:Y,undefined:`undefined`},minute:{string:Y,undefined:`undefined`},hour:{string:Y,undefined:`undefined`},weekday:{string:Y,undefined:`undefined`},day:{string:Y,undefined:`undefined`},week:{string:Y,undefined:`undefined`},month:{string:Y,undefined:`undefined`},quarter:{string:Y,undefined:`undefined`},year:{string:Y,undefined:`undefined`},__type__:{object:kP}},__type__:{object:kP}},moment:{function:`function`},height:{string:Y,number:Z},hiddenDates:{start:{date:OP,number:Z,string:Y,moment:jP},end:{date:OP,number:Z,string:Y,moment:jP},repeat:{string:Y},__type__:{object:kP,array:DP}},locale:{string:Y},locales:{__any__:{any:MP},__type__:{object:kP}},max:{date:OP,number:Z,string:Y,moment:jP},maxHeight:{number:Z,string:Y},maxMinorChars:{number:Z},min:{date:OP,number:Z,string:Y,moment:jP},minHeight:{number:Z,string:Y},moveable:{boolean:X},multiselect:{boolean:X},orientation:{string:Y},showCurrentTime:{boolean:X},showMajorLabels:{boolean:X},showMinorLabels:{boolean:X},showWeekScale:{boolean:X},snap:{function:`function`,null:`null`},start:{date:OP,number:Z,string:Y,moment:jP},timeAxis:{scale:{string:Y,undefined:`undefined`},step:{number:Z,undefined:`undefined`},__type__:{object:kP}},width:{string:Y,number:Z},zoomable:{boolean:X},zoomKey:{string:[`ctrlKey`,`altKey`,`metaKey`,``]},zoomMax:{number:Z},zoomMin:{number:Z},zIndex:{number:Z},__type__:{object:kP}},PP={global:{alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],sort:!0,sampling:!0,stack:!1,shaded:{enabled:!1,orientation:[`zero`,`top`,`bottom`,`group`]},style:[`line`,`bar`,`points`],barChart:{width:[50,5,100,5],minWidth:[50,5,100,5],sideBySide:!1,align:[`left`,`center`,`right`]},interpolation:{enabled:!0,parametrization:[`centripetal`,`chordal`,`uniform`]},drawPoints:{enabled:!0,size:[6,2,30,1],style:[`square`,`circle`]},dataAxis:{showMinorLabels:!0,showMajorLabels:!0,showWeekScale:!1,icons:!1,width:[40,0,200,1],visible:!0,alignZeros:!0,left:{title:{text:``,style:``}},right:{title:{text:``,style:``}}},legend:{enabled:!1,icons:!0,left:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]},right:{visible:!0,position:[`top-right`,`bottom-right`,`top-left`,`bottom-left`]}},autoResize:!0,clickToUse:!1,end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,quarter:`[Q]Q`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,quarter:`YYYY`,year:``}},height:``,locale:``,max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!0,orientation:[`both`,`bottom`,`top`],showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,showWeekScale:!1,start:``,width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],zIndex:0}},FP=class e extends Sj{constructor(e,t){var n,r,a,o,s,c,l;super();let u=_A().hours(0).minutes(0).seconds(0).milliseconds(0),d=u.clone().add(-3,`days`).valueOf(),f=u.clone().add(3,`days`).valueOf();this.millisecondsPerPixelCache=void 0,t===void 0?(this.start=d,this.end=f):(this.start=t.start||d,this.end=t.end||f),this.rolling=!1,this.body=e,this.deltaDifference=0,this.scaleOffset=0,this.startToFront=!1,this.endToFront=!0,this.defaultOptions={rtl:!1,start:null,end:null,moment:_A,direction:`horizontal`,moveable:!0,zoomable:!0,min:null,max:null,zoomMin:10,zoomMax:31536e10,rollingMode:{follow:!1,offset:.5}},this.options=q.extend({},this.defaultOptions),this.props={touch:{}},this.animationTimer=null,this.body.emitter.on(`panstart`,V(n=this._onDragStart).call(n,this)),this.body.emitter.on(`panmove`,V(r=this._onDrag).call(r,this)),this.body.emitter.on(`panend`,V(a=this._onDragEnd).call(a,this)),this.body.emitter.on(`mousewheel`,V(o=this._onMouseWheel).call(o,this)),this.body.emitter.on(`touch`,V(s=this._onTouch).call(s,this)),this.body.emitter.on(`pinch`,V(c=this._onPinch).call(c,this)),this.body.dom.rollingModeBtn.addEventListener(`click`,V(l=this.startRolling).call(l,this)),this.setOptions(t)}setOptions(e){e&&(q.selectiveExtend([`animation`,`direction`,`min`,`max`,`zoomMin`,`zoomMax`,`moveable`,`zoomable`,`moment`,`activate`,`hiddenDates`,`zoomKey`,`zoomFriction`,`rtl`,`showCurrentTime`,`rollingMode`,`horizontalScroll`,`horizontalScrollKey`,`horizontalScrollInvert`,`verticalScroll`],this.options,e),e.rollingMode&&e.rollingMode.follow&&this.startRolling(),(`start`in e||`end`in e)&&this.setRange(e.start,e.end))}startRolling(){let e=this;function t(){e.stopRolling(),e.rolling=!0;let n=e.end-e.start,r=q.convert(new Date,`Date`).valueOf(),a=e.options.rollingMode&&e.options.rollingMode.offset||.5,o=r-n*a,s=r+n*(1-a);e.setRange(o,s,{animation:!1}),n=1/e.conversion(e.body.domProps.center.width).scale/10,n<30&&(n=30),n>1e3&&(n=1e3),e.body.dom.rollingModeBtn.style.visibility=`hidden`,e.currentTimeTimer=Ch(t,n)}t()}stopRolling(){this.currentTimeTimer!==void 0&&(clearTimeout(this.currentTimeTimer),this.rolling=!1,this.body.dom.rollingModeBtn.style.visibility=`visible`)}setRange(e,t,n,r,a){n||={},n.byUser!==!0&&(n.byUser=!1);let o=this,s=e==null?null:q.convert(e,`Date`).valueOf(),c=t==null?null:q.convert(t,`Date`).valueOf();if(this._cancelAnimation(),this.millisecondsPerPixelCache=void 0,n.animation){let e=this.start,t=this.end,d=typeof n.animation==`object`&&`duration`in n.animation?n.animation.duration:500,f=typeof n.animation==`object`&&`easingFunction`in n.animation?n.animation.easingFunction:`easeInOutQuad`,p=q.easingFunctions[f];if(!p){var l;throw Error(Zb(l=`Unknown easing function ${iS(f)}. Choose from: `).call(l,Cx(q.easingFunctions).join(`, `)))}let m=tC(),h=!1,g=()=>{if(!o.props.touch.dragging){let l=tC()-m,f=p(l/d),_=l>d,v=_||s===null?s:e+(s-e)*f,y=_||c===null?c:t+(c-t)*f;u=o._applyRange(v,y),xN(o.options.moment,o.body,o.options.hiddenDates),h||=u;let b={start:new Date(o.start),end:new Date(o.end),byUser:n.byUser,event:n.event};if(a&&a(f,u,_),u&&o.body.emitter.emit(`rangechange`,b),_){if(h&&(o.body.emitter.emit(`rangechanged`,b),r))return r()}else o.animationTimer=Ch(g,20)}};return g()}var u=this._applyRange(s,c);if(xN(this.options.moment,this.body,this.options.hiddenDates),u){let e={start:new Date(this.start),end:new Date(this.end),byUser:n.byUser,event:n.event};if(this.body.emitter.emit(`rangechange`,e),clearTimeout(o.timeoutID),o.timeoutID=Ch(()=>{o.body.emitter.emit(`rangechanged`,e)},200),r)return r()}}getMillisecondsPerPixel(){return this.millisecondsPerPixelCache===void 0&&(this.millisecondsPerPixelCache=(this.end-this.start)/this.body.dom.center.clientWidth),this.millisecondsPerPixelCache}_cancelAnimation(){this.animationTimer&&=(clearTimeout(this.animationTimer),null)}_applyRange(e,t){let n=e==null?this.start:q.convert(e,`Date`).valueOf(),r=t==null?this.end:q.convert(t,`Date`).valueOf(),a=this.options.max==null?null:q.convert(this.options.max,`Date`).valueOf(),o=this.options.min==null?null:q.convert(this.options.min,`Date`).valueOf(),s;if(isNaN(n)||n===null)throw Error(`Invalid start "${e}"`);if(isNaN(r)||r===null)throw Error(`Invalid end "${t}"`);if(r<n&&(r=n),o!==null&&n<o&&(s=o-n,n+=s,r+=s,a!=null&&r>a&&(r=a)),a!==null&&r>a&&(s=r-a,n-=s,r-=s,o!=null&&n<o&&(n=o)),this.options.zoomMin!==null){let e=EM(this.options.zoomMin);e<0&&(e=0),r-n<e&&(this.end-this.start===e&&n>=this.start-.5&&r<=this.end?(n=this.start,r=this.end):(s=e-(r-n),n-=s/2,r+=s/2))}if(this.options.zoomMax!==null){let e=EM(this.options.zoomMax);e<0&&(e=0),r-n>e&&(this.end-this.start===e&&n<this.start&&r>this.end?(n=this.start,r=this.end):(s=r-n-e,n+=s/2,r-=s/2))}let c=this.start!=n||this.end!=r;return!(n>=this.start&&n<=this.end||r>=this.start&&r<=this.end)&&!(this.start>=n&&this.start<=r||this.end>=n&&this.end<=r)&&this.body.emitter.emit(`checkRangedItems`),this.start=n,this.end=r,c}getRange(){return{start:this.start,end:this.end}}conversion(t,n){return e.conversion(this.start,this.end,t,n)}static conversion(e,t,n,r){return r===void 0&&(r=0),n!=0&&t-e!=0?{offset:e,scale:n/(t-e-r)}:{offset:0,scale:1}}_onDragStart(e){this.deltaDifference=0,this.previousDelta=0,this.options.moveable&&this._isInsideRange(e)&&this.props.touch.allowDragging&&(this.stopRolling(),this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.dragging=!0,this.body.dom.root&&(this.body.dom.root.style.cursor=`move`))}_onDrag(e){if(!e||!this.props.touch.dragging||!this.options.moveable||!this.props.touch.allowDragging)return;let t=this.options.direction;IP(t);let n=t==`horizontal`?e.deltaX:e.deltaY;n-=this.deltaDifference;let r=this.props.touch.end-this.props.touch.start,a=DN(this.body.hiddenDates,this.start,this.end);r-=a;let o=t==`horizontal`?this.body.domProps.center.width:this.body.domProps.center.height,s;s=this.options.rtl?n/o*r:-n/o*r;let c=this.props.touch.start+s,l=this.props.touch.end+s,u=MN(this.body.hiddenDates,c,this.previousDelta-n,!0),d=MN(this.body.hiddenDates,l,this.previousDelta-n,!0);if(u!=c||d!=l){this.deltaDifference+=n,this.props.touch.start=u,this.props.touch.end=d,this._onDrag(e);return}this.previousDelta=n,this._applyRange(c,l);let f=new Date(this.start),p=new Date(this.end);this.body.emitter.emit(`rangechange`,{start:f,end:p,byUser:!0,event:e}),this.body.emitter.emit(`panmove`)}_onDragEnd(e){this.props.touch.dragging&&this.options.moveable&&this.props.touch.allowDragging&&(this.props.touch.dragging=!1,this.body.dom.root&&(this.body.dom.root.style.cursor=`auto`),this.body.emitter.emit(`rangechanged`,{start:new Date(this.start),end:new Date(this.end),byUser:!0,event:e}))}_onMouseWheel(e){let t=0;if(e.wheelDelta?t=e.wheelDelta/120:e.detail?t=-e.detail/3:e.deltaY&&(t=-e.deltaY/3),!(this.options.zoomKey&&!e[this.options.zoomKey]&&this.options.zoomable||!this.options.zoomable&&this.options.moveable)&&this.options.zoomable&&this.options.moveable&&this._isInsideRange(e)&&t){let n=this.options.zoomFriction||5,r;r=t<0?1-t/n:1/(1+t/n);let a;if(this.rolling){let e=this.options.rollingMode&&this.options.rollingMode.offset||.5;a=this.start+(this.end-this.start)*e}else{let t=this.getPointer({x:e.clientX,y:e.clientY},this.body.dom.center);a=this._pointerToDate(t)}this.zoom(r,a,t,e),e.preventDefault()}}_onTouch(e){this.props.touch.start=this.start,this.props.touch.end=this.end,this.props.touch.allowDragging=!0,this.props.touch.center=null,this.props.touch.centerDate=null,this.scaleOffset=0,this.deltaDifference=0,q.preventDefault(e)}_onPinch(e){if(!(this.options.zoomable&&this.options.moveable))return;q.preventDefault(e),this.props.touch.allowDragging=!1,this.props.touch.center||(this.props.touch.center=this.getPointer(e.center,this.body.dom.center),this.props.touch.centerDate=this._pointerToDate(this.props.touch.center)),this.stopRolling();let t=1/(e.scale+this.scaleOffset),n=this.props.touch.centerDate,r=DN(this.body.hiddenDates,this.start,this.end),a=AN(this.options.moment,this.body.hiddenDates,this,n),o=r-a,s=n-a+(this.props.touch.start-(n-a))*t,c=n+o+(this.props.touch.end-(n+o))*t;this.startToFront=1-t<=0,this.endToFront=t-1<=0;let l=MN(this.body.hiddenDates,s,1-t,!0),u=MN(this.body.hiddenDates,c,t-1,!0);(l!=s||u!=c)&&(this.props.touch.start=l,this.props.touch.end=u,this.scaleOffset=1-e.scale,s=l,c=u);let d={animation:!1,byUser:!0,event:e};this.setRange(s,c,d),this.startToFront=!1,this.endToFront=!0}_isInsideRange(e){let t=e.center?e.center.x:e.clientX,n=this.body.dom.centerContainer.getBoundingClientRect(),r=this.options.rtl?t-n.left:n.right-t,a=this.body.util.toTime(r);return a>=this.start&&a<=this.end}_pointerToDate(e){let t,n=this.options.direction;if(IP(n),n==`horizontal`)return this.body.util.toTime(e.x).valueOf();{let n=this.body.domProps.center.height;return t=this.conversion(n),e.y/t.scale+t.offset}}getPointer(e,t){let n=t.getBoundingClientRect();return this.options.rtl?{x:n.right-e.x,y:e.y-n.top}:{x:e.x-n.left,y:e.y-n.top}}zoom(e,t,n,r){t??=(this.start+this.end)/2;let a=DN(this.body.hiddenDates,this.start,this.end),o=AN(this.options.moment,this.body.hiddenDates,this,t),s=a-o,c=t-o+(this.start-(t-o))*e,l=t+s+(this.end-(t+s))*e;this.startToFront=!(n>0),this.endToFront=!(-n>0);let u=MN(this.body.hiddenDates,c,n,!0),d=MN(this.body.hiddenDates,l,-n,!0);(u!=c||d!=l)&&(c=u,l=d);let f={animation:!1,byUser:!0,event:r};this.setRange(c,l,f),this.startToFront=!1,this.endToFront=!0}move(e){let t=this.end-this.start,n=this.start+t*e,r=this.end+t*e;this.start=n,this.end=r}moveTo(e){let t=(this.start+this.end)/2-e,n=this.start-t,r=this.end-t;this.setRange(n,r,{animation:!1,byUser:!0,event:null})}destroy(){this.stopRolling()}};function IP(e){if(e!=`horizontal`&&e!=`vertical`)throw TypeError(`Unknown direction "${e}". Choose "horizontal" or "vertical".`)}function LP(e,t,n,r){var a,o,s,c,l,u,d;if(!(G(n)||ZA(n))&&n instanceof Object){var f=r;r=n,n=f}r&&r.throttleRedraw&&console.warn(`Graph2d option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);var p=this;this.defaultOptions={start:null,end:null,autoResize:!0,orientation:{axis:`bottom`,item:`bottom`},moment:_A,width:null,height:null,maxHeight:null,minHeight:null},this.options=q.deepExtend({},this.defaultOptions),this._create(e),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:V(a=this.on).call(a,this),off:V(o=this.off).call(o,this),emit:V(s=this.emit).call(s,this)},hiddenDates:[],util:{getScale(){return p.timeAxis.step.scale},getStep(){return p.timeAxis.step.step},toScreen:V(c=p._toScreen).call(c,p),toGlobalScreen:V(l=p._toGlobalScreen).call(l,p),toTime:V(u=p._toTime).call(u,p),toGlobalTime:V(d=p._toGlobalTime).call(d,p)}},this.range=new FP(this.body),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new aP(this.body),this.components.push(this.timeAxis),this.currentTime=new lM(this.body),this.components.push(this.currentTime),this.linegraph=new J(this.body),this.components.push(this.linegraph),this.itemsData=null,this.groupsData=null,this.on(`tap`,function(e){p.emit(`click`,p.getEventProperties(e))}),this.on(`doubletap`,function(e){p.emit(`doubleClick`,p.getEventProperties(e))}),this.dom.root.oncontextmenu=function(e){p.emit(`contextmenu`,p.getEventProperties(e))},this.initialFitDone=!1,this.on(`changed`,function(){if(p.itemsData!=null){if(!p.initialFitDone&&!p.options.rollingMode){if(p.initialFitDone=!0,p.options.start!=null||p.options.end!=null){if(p.options.start==null||p.options.end==null)var e=p.getItemRange();var t=p.options.start==null?e.min:p.options.start,n=p.options.end==null?e.max:p.options.end;p.setWindow(t,n,{animation:!1})}else p.fit({animation:!1})}!p.initialDrawDone&&(p.initialRangeChangeDone||!p.options.start&&!p.options.end||p.options.rollingMode)&&(p.initialDrawDone=!0,p.dom.root.style.visibility=`visible`,p.dom.loadingScreen.parentNode.removeChild(p.dom.loadingScreen),p.options.onInitialDrawComplete&&Ch(()=>p.options.onInitialDrawComplete(),0))}}),r&&this.setOptions(r),n&&this.setGroups(n),t&&this.setItems(t),this._redraw()}LP.prototype=new yP,LP.prototype.setOptions=function(e){EP.validate(e,NP)===!0&&console.log(`%cErrors have been found in the supplied options object.`,TP),yP.prototype.setOptions.call(this,e)},LP.prototype.setItems=function(e){var t=this.itemsData==null,n=e?ZA(e)?tj(e):tj(new $k(e)):null;if(this.itemsData&&this.itemsData.dispose(),this.itemsData=n,this.linegraph&&this.linegraph.setItems(n==null?null:n.rawDS),t){if(this.options.start!=null||this.options.end!=null){var r=this.options.start==null?null:this.options.start,a=this.options.end==null?null:this.options.end;this.setWindow(r,a,{animation:!1})}else this.fit({animation:!1})}},LP.prototype.setGroups=function(e){var t=e?ZA(e)?e:new $k(e):null;this.groupsData=t,this.linegraph.setGroups(t)},LP.prototype.getLegend=function(e,t,n){return t===void 0&&(t=15),n===void 0&&(n=15),this.linegraph.groups[e]===void 0?`cannot find group:'`+e+`'`:this.linegraph.groups[e].getLegend(t,n)},LP.prototype.isGroupVisible=function(e){return this.linegraph.groups[e]!==void 0&&this.linegraph.groups[e].visible&&(this.linegraph.options.groups.visibility[e]===void 0||this.linegraph.options.groups.visibility[e]==1)},LP.prototype.getDataRange=function(){var e=null,t=null;for(var n in this.linegraph.groups)if(Object.prototype.hasOwnProperty.call(this.linegraph.groups,n)&&this.linegraph.groups[n].visible===!0)for(var r=0;r<this.linegraph.groups[n].itemsData.length;r++){var a=this.linegraph.groups[n].itemsData[r],o=q.convert(a.x,`Date`).valueOf();e=e==null||e>o?o:e,t=t==null||t<o?o:t}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}},LP.prototype.getEventProperties=function(e){var t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=t-q.getAbsoluteLeft(this.dom.centerContainer),a=n-q.getAbsoluteTop(this.dom.centerContainer),o=this._toTime(r),s=uM.customTimeFromTarget(e),c=q.getTarget(e),l=null;q.hasParent(c,this.timeAxis.dom.foreground)||this.timeAxis2&&q.hasParent(c,this.timeAxis2.dom.foreground)?l=`axis`:q.hasParent(c,this.linegraph.yAxisLeft.dom.frame)||q.hasParent(c,this.linegraph.yAxisRight.dom.frame)?l=`data-axis`:q.hasParent(c,this.linegraph.legendLeft.dom.frame)||q.hasParent(c,this.linegraph.legendRight.dom.frame)?l=`legend`:s==null?q.hasParent(c,this.currentTime.bar)?l=`current-time`:q.hasParent(c,this.dom.center)&&(l=`background`):l=`custom-time`;var u=[],d=this.linegraph.yAxisLeft,f=this.linegraph.yAxisRight;return!d.hidden&&this.itemsData.length>0&&u.push(d.screenToValue(a)),!f.hidden&&this.itemsData.length>0&&u.push(f.screenToValue(a)),{event:e,customTime:s?s.options.id:null,what:l,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:r,y:a,time:o,value:u}},LP.prototype._createConfigurator=function(){return new SP(this,this.dom.container,PP)};var Q=`string`,$=`boolean`,RP=`number`,zP=`array`,BP=`date`,VP=`object`,HP=`dom`,UP=`moment`,WP=`any`,GP={configure:{enabled:{boolean:$},filter:{boolean:$,function:`function`},container:{dom:HP},__type__:{object:VP,boolean:$,function:`function`}},align:{string:Q},alignCurrentTime:{string:Q,undefined:`undefined`},rtl:{boolean:$,undefined:`undefined`},rollingMode:{follow:{boolean:$},offset:{number:RP,undefined:`undefined`},__type__:{object:VP}},onTimeout:{timeoutMs:{number:RP},callback:{function:`function`},__type__:{object:VP}},verticalScroll:{boolean:$,undefined:`undefined`},horizontalScroll:{boolean:$,undefined:`undefined`},horizontalScrollKey:{string:Q,undefined:`undefined`},horizontalScrollInvert:{boolean:$,undefined:`undefined`},autoResize:{boolean:$},throttleRedraw:{number:RP},clickToUse:{boolean:$},dataAttributes:{string:Q,array:zP},editable:{add:{boolean:$,undefined:`undefined`},remove:{boolean:$,undefined:`undefined`},updateGroup:{boolean:$,undefined:`undefined`},updateTime:{boolean:$,undefined:`undefined`},overrideItems:{boolean:$,undefined:`undefined`},__type__:{boolean:$,object:VP}},end:{number:RP,date:BP,string:Q,moment:UP},format:{minorLabels:{millisecond:{string:Q,undefined:`undefined`},second:{string:Q,undefined:`undefined`},minute:{string:Q,undefined:`undefined`},hour:{string:Q,undefined:`undefined`},weekday:{string:Q,undefined:`undefined`},day:{string:Q,undefined:`undefined`},week:{string:Q,undefined:`undefined`},month:{string:Q,undefined:`undefined`},year:{string:Q,undefined:`undefined`},__type__:{object:VP,function:`function`}},majorLabels:{millisecond:{string:Q,undefined:`undefined`},second:{string:Q,undefined:`undefined`},minute:{string:Q,undefined:`undefined`},hour:{string:Q,undefined:`undefined`},weekday:{string:Q,undefined:`undefined`},day:{string:Q,undefined:`undefined`},week:{string:Q,undefined:`undefined`},month:{string:Q,undefined:`undefined`},year:{string:Q,undefined:`undefined`},__type__:{object:VP,function:`function`}},__type__:{object:VP}},moment:{function:`function`},groupHeightMode:{string:Q},groupOrder:{string:Q,function:`function`},groupEditable:{add:{boolean:$,undefined:`undefined`},remove:{boolean:$,undefined:`undefined`},order:{boolean:$,undefined:`undefined`},__type__:{boolean:$,object:VP}},groupOrderSwap:{function:`function`},height:{string:Q,number:RP},hiddenDates:{start:{date:BP,number:RP,string:Q,moment:UP},end:{date:BP,number:RP,string:Q,moment:UP},repeat:{string:Q},__type__:{object:VP,array:zP}},itemsAlwaysDraggable:{item:{boolean:$,undefined:`undefined`},range:{boolean:$,undefined:`undefined`},__type__:{boolean:$,object:VP}},limitSize:{boolean:$},locale:{string:Q},locales:{__any__:{any:WP},__type__:{object:VP}},longSelectPressTime:{number:RP},margin:{axis:{number:RP},item:{horizontal:{number:RP,undefined:`undefined`},vertical:{number:RP,undefined:`undefined`},__type__:{object:VP,number:RP}},__type__:{object:VP,number:RP}},max:{date:BP,number:RP,string:Q,moment:UP},maxHeight:{number:RP,string:Q},maxMinorChars:{number:RP},min:{date:BP,number:RP,string:Q,moment:UP},minHeight:{number:RP,string:Q},moveable:{boolean:$},multiselect:{boolean:$},multiselectPerGroup:{boolean:$},onAdd:{function:`function`},onDropObjectOnItem:{function:`function`},onUpdate:{function:`function`},onMove:{function:`function`},onMoving:{function:`function`},onRemove:{function:`function`},onAddGroup:{function:`function`},onMoveGroup:{function:`function`},onRemoveGroup:{function:`function`},onInitialDrawComplete:{function:`function`},order:{function:`function`},orientation:{axis:{string:Q,undefined:`undefined`},item:{string:Q,undefined:`undefined`},__type__:{string:Q,object:VP}},selectable:{boolean:$},sequentialSelection:{boolean:$},showCurrentTime:{boolean:$},showMajorLabels:{boolean:$},showMinorLabels:{boolean:$},showWeekScale:{boolean:$},stack:{boolean:$},stackSubgroups:{boolean:$},cluster:{maxItems:{number:RP,undefined:`undefined`},titleTemplate:{string:Q,undefined:`undefined`},clusterCriteria:{function:`function`,undefined:`undefined`},showStipes:{boolean:$,undefined:`undefined`},fitOnDoubleClick:{boolean:$,undefined:`undefined`},__type__:{boolean:$,object:VP}},snap:{function:`function`,null:`null`},start:{date:BP,number:RP,string:Q,moment:UP},template:{function:`function`},loadingScreenTemplate:{function:`function`},groupTemplate:{function:`function`},visibleFrameTemplate:{string:Q,function:`function`},showTooltips:{boolean:$},tooltip:{followMouse:{boolean:$},overflowMethod:{string:[`cap`,`flip`,`none`]},delay:{number:RP},template:{function:`function`},__type__:{object:VP}},tooltipOnItemUpdateTime:{template:{function:`function`},__type__:{boolean:$,object:VP}},timeAxis:{scale:{string:Q,undefined:`undefined`},step:{number:RP,undefined:`undefined`},__type__:{object:VP}},type:{string:Q},width:{string:Q,number:RP},preferZoom:{boolean:$},zoomable:{boolean:$},zoomKey:{string:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``]},zoomFriction:{number:RP},zoomMax:{number:RP},zoomMin:{number:RP},xss:{disabled:{boolean:$},filterOptions:{__any__:{any:WP},__type__:{object:VP}},__type__:{object:VP}},__type__:{object:VP}},KP={global:{align:[`center`,`left`,`right`],alignCurrentTime:[`none`,`year`,`month`,`quarter`,`week`,`isoWeek`,`day`,`date`,`hour`,`minute`,`second`],direction:!1,autoResize:!0,clickToUse:!1,editable:{add:!1,remove:!1,updateGroup:!1,updateTime:!1},end:``,format:{minorLabels:{millisecond:`SSS`,second:`s`,minute:`HH:mm`,hour:`HH:mm`,weekday:`ddd D`,day:`D`,week:`w`,month:`MMM`,year:`YYYY`},majorLabels:{millisecond:`HH:mm:ss`,second:`D MMMM HH:mm`,minute:`ddd D MMMM`,hour:`ddd D MMMM`,weekday:`MMMM YYYY`,day:`MMMM YYYY`,week:`MMMM YYYY`,month:`YYYY`,year:``}},groupHeightMode:[`auto`,`fixed`,`fitItems`],groupsDraggable:!1,height:``,locale:``,longSelectPressTime:251,margin:{axis:[20,0,100,1],item:{horizontal:[10,0,100,1],vertical:[10,0,100,1]}},max:``,maxHeight:``,maxMinorChars:[7,0,20,1],min:``,minHeight:``,moveable:!1,multiselect:!1,multiselectPerGroup:!1,orientation:{axis:[`both`,`bottom`,`top`],item:[`bottom`,`top`]},preferZoom:!1,selectable:!0,showCurrentTime:!1,showMajorLabels:!0,showMinorLabels:!0,stack:!0,stackSubgroups:!0,cluster:!1,start:``,showTooltips:!0,tooltip:{followMouse:!1,overflowMethod:`flip`,delay:[500,0,99999,100]},tooltipOnItemUpdateTime:!1,type:[`box`,`point`,`range`,`background`],width:`100%`,zoomable:!0,zoomKey:[`ctrlKey`,`altKey`,`shiftKey`,`metaKey`,``],zoomMax:[31536e10,10,31536e10,1],zoomMin:[10,10,31536e10,1],xss:{disabled:!1}}},qP=class e extends yP{constructor(t,n,r,a){var o,s,c,l,u,d,f;if(super(),this.initTime=new Date,this.itemsDone=!1,!(this instanceof e))throw SyntaxError(`Constructor must be called with the new operator`);if(!(G(r)||ZA(r))&&r instanceof Object){let e=a;a=r,r=e}a&&a.throttleRedraw&&console.warn(`Timeline option "throttleRedraw" is DEPRICATED and no longer supported. It will be removed in the next MAJOR release.`);let p=this;if(this.defaultOptions={autoResize:!0,longSelectPressTime:251,orientation:{axis:`bottom`,item:`bottom`},moment:_A},this.options=q.deepExtend({},this.defaultOptions),a&&q.setupXSSProtection(a.xss),this._create(t),!a||a&&a.rtl===void 0){this.dom.root.style.visibility=`hidden`;let e,t=this.dom.root;for(;!e&&t;)e=window.getComputedStyle(t,null).direction,t=t.parentElement;this.options.rtl=e&&e.toLowerCase()==`rtl`}else this.options.rtl=a.rtl;a&&(a.rollingMode&&(this.options.rollingMode=a.rollingMode),a.onInitialDrawComplete&&(this.options.onInitialDrawComplete=a.onInitialDrawComplete),a.onTimeout&&(this.options.onTimeout=a.onTimeout),a.loadingScreenTemplate&&(this.options.loadingScreenTemplate=a.loadingScreenTemplate));let m=document.createElement(`div`);if(this.options.loadingScreenTemplate){var h;let e=V(h=this.options.loadingScreenTemplate).call(h,this),t=e(this.dom.loadingScreen);t instanceof Object&&!(t instanceof Element)?e(m):t instanceof Element?(m.innerHTML=``,m.appendChild(t)):t!=null&&(m.innerHTML=q.xss(t))}this.dom.loadingScreen.appendChild(m),this.components=[],this.body={dom:this.dom,domProps:this.props,emitter:{on:V(o=this.on).call(o,this),off:V(s=this.off).call(s,this),emit:V(c=this.emit).call(c,this)},hiddenDates:[],util:{getScale(){return p.timeAxis.step.scale},getStep(){return p.timeAxis.step.step},toScreen:V(l=p._toScreen).call(l,p),toGlobalScreen:V(u=p._toGlobalScreen).call(u,p),toTime:V(d=p._toTime).call(d,p),toGlobalTime:V(f=p._toGlobalTime).call(f,p)}},this.range=new FP(this.body,this.options),this.components.push(this.range),this.body.range=this.range,this.timeAxis=new aP(this.body,this.options),this.timeAxis2=null,this.components.push(this.timeAxis),this.currentTime=new lM(this.body,this.options),this.components.push(this.currentTime),this.itemSet=new nP(this.body,this.options),this.components.push(this.itemSet),this.itemsData=null,this.groupsData=null;function g(e,t){p.hasListeners(e)&&p.emit(e,p.getEventProperties(t))}this.dom.root.onclick=e=>g(`click`,e),this.dom.root.ondblclick=e=>g(`doubleClick`,e),this.dom.root.oncontextmenu=e=>g(`contextmenu`,e),this.dom.root.onmouseover=e=>g(`mouseOver`,e),window.PointerEvent?(this.dom.root.onpointerdown=e=>g(`mouseDown`,e),this.dom.root.onpointermove=e=>g(`mouseMove`,e),this.dom.root.onpointerup=e=>g(`mouseUp`,e)):(this.dom.root.onmousemove=e=>g(`mouseMove`,e),this.dom.root.onmousedown=e=>g(`mouseDown`,e),this.dom.root.onmouseup=e=>g(`mouseUp`,e)),this.initialFitDone=!1,this.on(`changed`,()=>{if(p.itemsData!=null){if(!p.initialFitDone&&!p.options.rollingMode){if(p.initialFitDone=!0,p.options.start!=null||p.options.end!=null){if(p.options.start==null||p.options.end==null)var e=p.getItemRange();let t=p.options.start==null?e.min:p.options.start,n=p.options.end==null?e.max:p.options.end;p.setWindow(t,n,{animation:!1})}else p.fit({animation:!1})}!p.initialDrawDone&&(p.initialRangeChangeDone||!p.options.start&&!p.options.end||p.options.rollingMode)&&(p.initialDrawDone=!0,p.itemSet.initialDrawDone=!0,p.dom.root.style.visibility=`visible`,p.dom.loadingScreen.parentNode.removeChild(p.dom.loadingScreen),p.options.onInitialDrawComplete&&Ch(()=>p.options.onInitialDrawComplete(),0))}}),this.on(`destroyTimeline`,()=>{p.destroy()}),a&&this.setOptions(a),this.body.emitter.on(`fit`,e=>{this._onFit(e),this.redraw()}),r&&this.setGroups(r),n&&this.setItems(n),this._redraw()}_createConfigurator(){return new SP(this,this.dom.container,KP)}redraw(){this.itemSet&&this.itemSet.markDirty({refreshItems:!0}),this._redraw()}setOptions(e){if(EP.validate(e,GP)===!0&&console.log(`%cErrors have been found in the supplied options object.`,TP),yP.prototype.setOptions.call(this,e),`type`in e&&e.type!==this.options.type){this.options.type=e.type;let t=this.itemsData;if(t){let e=this.getSelection();this.setItems(null),this.setItems(t.rawDS),this.setSelection(e)}}}setItems(e){this.itemsDone=!1;let t;t=e?ZA(e)?tj(e):tj(new $k(e)):null,this.itemsData&&this.itemsData.dispose(),this.itemsData=t,this.itemSet&&this.itemSet.setItems(t==null?null:t.rawDS)}setGroups(e){let t;e?(G(e)&&(e=new $k(e)),t=new eA(e,{filter:e=>e.visible!==!1})):t=null,this.groupsData!=null&&typeof this.groupsData.setData==`function`&&this.groupsData.setData(null),this.groupsData=t,this.itemSet.setGroups(t)}setData(e){e&&e.groups&&this.setGroups(e.groups),e&&e.items&&this.setItems(e.items)}setSelection(e,t){this.itemSet&&this.itemSet.setSelection(e),t&&t.focus&&this.focus(e,t)}getSelection(){return this.itemSet&&this.itemSet.getSelection()||[]}focus(e,t){if(!this.itemsData||e==null)return;let n=G(e)?e:[e],r=this.itemsData.get(n),a=null,o=null;if(W(r).call(r,e=>{let t=e.start.valueOf(),n=`end`in e?e.end.valueOf():e.start.valueOf();(a===null||t<a)&&(a=t),(o===null||n>o)&&(o=n)}),a!==null&&o!==null){let e=this,r=this.itemSet.items[n[0]],s=this._getScrollTop()*-1,c=null,l=(t,n,a)=>{let o=XP(e,r);if(o===!1||(c||=o,c.itemTop==o.itemTop&&!c.shouldScroll))return;c.itemTop!=o.itemTop&&o.shouldScroll&&(c=o,s=e._getScrollTop()*-1);let l=s,u=c.scrollOffset,d=a?u:l+(u-l)*t;e._setScrollTop(-d),n||e._redraw()},u=()=>{let t=XP(e,r);t.shouldScroll&&t.itemTop!=c.itemTop&&(e._setScrollTop(-t.scrollOffset),e._redraw())},d=()=>{u(),Ch(u,100)},f=t&&t.zoom!==void 0?t.zoom:!0,p=(a+o)/2,m=f?(o-a)*1.1:Math.max(this.range.end-this.range.start,(o-a)*1.1),h=t&&t.animation!==void 0?t.animation:!0;h||(c={shouldScroll:!1,scrollOffset:-1,itemTop:-1}),this.range.stopRolling(),this.range.setRange(p-m/2,p+m/2,{animation:h},d,l)}}fit(e,t){let n=e&&e.animation!==void 0?e.animation:!0,r;this.itemsData.length===1&&this.itemsData.get()[0].end===void 0?(r=this.getDataRange(),this.moveTo(r.min.valueOf(),{animation:n},t)):(r=this.getItemRange(),this.range.setRange(r.min,r.max,{animation:n},t))}getItemRange(){let e=this.getDataRange(),t=e.min===null?null:e.min.valueOf(),n=e.max===null?null:e.max.valueOf(),r=null,a=null;if(t!=null&&n!=null){let e=n-t;e<=0&&(e=10);let o=e/this.props.center.width,s={},c=0;if(W(q).call(q,this.itemSet.items,(e,t)=>{e.groupShowing&&(s[t]=e.redraw(!0),c=s[t].length)}),c>0)for(let e=0;e<c;e++)W(q).call(q,s,t=>{t[e]()});if(W(q).call(q,this.itemSet.items,e=>{let s=JP(e),c=YP(e),l,u;this.options.rtl?(l=s-(e.getWidthRight()+10)*o,u=c+(e.getWidthLeft()+10)*o):(l=s-(e.getWidthLeft()+10)*o,u=c+(e.getWidthRight()+10)*o),l<t&&(t=l,r=e),u>n&&(n=u,a=e)}),r&&a){let o=r.getWidthLeft()+10,s=a.getWidthRight()+10,c=this.props.center.width-o-s;c>0&&(this.options.rtl?(t=JP(r)-s*e/c,n=YP(a)+o*e/c):(t=JP(r)-o*e/c,n=YP(a)+s*e/c))}}return{min:t==null?null:new Date(t),max:n==null?null:new Date(n)}}getDataRange(){let e=null,t=null;if(this.itemsData){var n;W(n=this.itemsData).call(n,n=>{let r=q.convert(n.start,`Date`).valueOf(),a=q.convert(n.end==null?n.start:n.end,`Date`).valueOf();(e===null||r<e)&&(e=r),(t===null||a>t)&&(t=a)})}return{min:e==null?null:new Date(e),max:t==null?null:new Date(t)}}getEventProperties(e){let t=e.center?e.center.x:e.clientX,n=e.center?e.center.y:e.clientY,r=this.dom.centerContainer.getBoundingClientRect(),a=this.options.rtl?r.right-t:t-r.left,o=n-r.top,s=this.itemSet.itemFromTarget(e),c=this.itemSet.groupFromTarget(e),l=uM.customTimeFromTarget(e),u=this.itemSet.options.snap||null,d=this.body.util.getScale(),f=this.body.util.getStep(),p=this._toTime(a),m=u?u(p,d,f):p,h=q.getTarget(e),g=null;return s==null?l==null?q.hasParent(h,this.timeAxis.dom.foreground)||this.timeAxis2&&q.hasParent(h,this.timeAxis2.dom.foreground)?g=`axis`:q.hasParent(h,this.itemSet.dom.labelSet)?g=`group-label`:q.hasParent(h,this.currentTime.bar)?g=`current-time`:q.hasParent(h,this.dom.center)&&(g=`background`):g=`custom-time`:g=`item`,{event:e,item:s?s.id:null,isCluster:s?!!s.isCluster:!1,items:s?s.items||[]:null,group:c?c.groupId:null,customTime:l?l.options.id:null,what:g,pageX:e.srcEvent?e.srcEvent.pageX:e.pageX,pageY:e.srcEvent?e.srcEvent.pageY:e.pageY,x:a,y:o,time:p,snappedTime:m}}toggleRollingMode(){this.range.rolling?this.range.stopRolling():(this.options.rollingMode??this.setOptions(this.options),this.range.startRolling())}_redraw(){yP.prototype._redraw.call(this)}_onFit(e){let t=e.start,n=e.end,r=e.animation;n?this.range.setRange(t,n,{animation:r}):this.moveTo(t.valueOf(),{animation:r})}};function JP(e){return q.convert(e.data.start,`Date`).valueOf()}function YP(e){let t=e.data.end==null?e.data.start:e.data.end;return q.convert(t,`Date`).valueOf()}function XP(e,t){if(!t.parent)return!1;let n=e.options.rtl?e.props.rightContainer.height:e.props.leftContainer.height,r=e.props.center.height,a=t.parent,o=a.top,s=!0,c=e.timeAxis.options.orientation.axis,l=()=>c==`bottom`?a.height-t.top-t.height:t.top,u=e._getScrollTop()*-1,d=o+l(),f=t.height;return d<u?o+n<=o+l()+f&&(o+=l()-e.itemSet.options.margin.item.vertical):d+f>u+n?o+=l()+f-n+e.itemSet.options.margin.item.vertical:s=!1,o=Math.min(o,r-n),{shouldScroll:s,scrollOffset:o,itemTop:d}}var ZP=uA();_A.locale(ZP);var QP={Core:yP,DateUtil:PN,Range:FP,stack:vj,TimeStep:FN,components:{items:{Item:FM,BackgroundItem:LM,BoxItem:RM,ClusterItem:zM,PointItem:BM,RangeItem:IM},BackgroundGroup:xj,Component:Sj,CurrentTime:lM,CustomTime:uM,DataAxis:OM,DataScale:DM,GraphGroup:PM,Group:bj,ItemSet:nP,Legend:rP,LineGraph:J,TimeAxis:aP}};export{t};