ariadne_view_components 0.0.55-aarch64-linux → 0.0.58-aarch64-linux

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/app/assets/builds/ariadne_view_components.css +16 -13
  4. data/app/assets/javascripts/ariadne_view_components.js +8 -0
  5. data/app/assets/javascripts/ariadne_view_components.js.map +1 -0
  6. data/app/assets/javascripts/components/ariadne/accumulator_controller/accumulator_controller.d.ts +22 -0
  7. data/app/assets/javascripts/components/ariadne/ariadne-form.d.ts +22 -0
  8. data/app/assets/javascripts/components/ariadne/ariadne.d.ts +2 -0
  9. data/app/assets/javascripts/components/ariadne/clipboard_copy_component/clipboard-copy-component.d.ts +4 -0
  10. data/app/assets/javascripts/components/ariadne/dropdown/menu_component.d.ts +1 -0
  11. data/app/assets/javascripts/components/ariadne/events_controller/events_controller.d.ts +4 -0
  12. data/app/assets/javascripts/components/ariadne/options_controller/options_controller.d.ts +39 -0
  13. data/app/assets/javascripts/components/ariadne/outlet_manager_controller/outlet_manager_controller.d.ts +42 -0
  14. data/app/assets/javascripts/components/ariadne/slideover_component/slideover-component.d.ts +9 -0
  15. data/app/assets/javascripts/components/ariadne/string_match_controller/string_match_controller.d.ts +27 -0
  16. data/app/assets/javascripts/components/ariadne/synced_boolean_attributes_controller/synced_boolean_attributes_controller.d.ts +48 -0
  17. data/app/assets/javascripts/components/ariadne/tab_container_component/tab-container-component.d.ts +1 -0
  18. data/app/assets/javascripts/components/ariadne/tab_nav_component/tab-nav-component.d.ts +9 -0
  19. data/app/assets/javascripts/components/ariadne/time_ago_component/time-ago-component.d.ts +1 -0
  20. data/app/assets/javascripts/components/ariadne/toggleable_controller/toggleable_controller.d.ts +34 -0
  21. data/app/assets/javascripts/components/ariadne/tooltip_component/tooltip-component.d.ts +24 -0
  22. data/app/components/ariadne/ariadne.js +0 -2
  23. data/app/components/ariadne/ariadne.ts +0 -2
  24. data/app/components/ariadne/options_controller/options_controller.js +6 -3
  25. data/app/components/ariadne/options_controller/options_controller.ts +9 -4
  26. data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.js +1 -1
  27. data/app/components/ariadne/outlet_manager_controller/outlet_manager_controller.ts +1 -1
  28. data/lib/ariadne/view_components/version.rb +1 -1
  29. data/static/audited_at.json +0 -2
  30. data/static/constants.json +0 -11
  31. data/static/statuses.json +0 -2
  32. metadata +21 -10
  33. data/app/components/ariadne/comment_component/comment_component.html.erb +0 -37
  34. data/app/components/ariadne/comment_component.rb +0 -71
  35. data/app/components/ariadne/rich_text_area_component/rich-text-area-component.d.ts +0 -6
  36. data/app/components/ariadne/rich_text_area_component/rich-text-area-component.js +0 -38
  37. data/app/components/ariadne/rich_text_area_component/rich-text-area-component.ts +0 -47
  38. data/app/components/ariadne/rich_text_area_component/rich_text_area_component.html.erb +0 -6
  39. data/app/components/ariadne/rich_text_area_component.rb +0 -35
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 806073b6e52610788efbdce81e097aa0dcc320b248840bcc78c8725fdc1fa971
4
- data.tar.gz: 8ddc41c41d707ec285e90ab0f5885bd0ba6a72762f2118b52e77fc25a8f6d06e
3
+ metadata.gz: 8eab294490495253014c08842cfb06149faaac3917a08ec530047c7ce90d00ce
4
+ data.tar.gz: 60a5d9779661849dc3e124fee701883d854ab8e4c65fd011dd8f81b9bcc6827e
5
5
  SHA512:
6
- metadata.gz: 2ba27b4f99c55fd202c404c1709ad2be6d875c317a37a8ae3f658f9e37df2205e419a4b6031a50fa144b3dc1b6fe24ea349bd87fdf9a1504159b0ee193da7d7d
7
- data.tar.gz: 16940a5434ca1c8551e0c1d475845e565be127bd2f14359b459f0e4a0f86c3faed71b82ff45f33b22913e7b74f5a738e134d531d667a9597b7415759fe005f40
6
+ metadata.gz: 7d0164f8d0f74f44b8abfdba7c0b18c763d4a9da18c11eb77c5788f2a536abd57825851799516b5f37b9bb2eb1802bd16ea5394735032d33131e231df6094b34
7
+ data.tar.gz: 29370b2dae147060944aad58a3989e612470dda695926b077a5f82b7b45cf9df1707e80b4c6385520109a78df1ae2ce1ac3de949328629cbb3b65f2231a73a34
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## [v0.0.57] - 14-07-2023
2
+ null
3
+ ## [v0.0.55] - 14-07-2023
4
+ null
1
5
  ## [v0.0.54] - 13-07-2023
2
6
  null
3
7
  ## [v0.0.53] - 11-07-2023
@@ -1,5 +1,5 @@
1
1
  /*
2
- ! tailwindcss v3.3.2 | MIT License | https://tailwindcss.com
2
+ ! tailwindcss v3.3.3 | MIT License | https://tailwindcss.com
3
3
  */
4
4
 
5
5
  /*
@@ -191,6 +191,10 @@ select,
191
191
  textarea {
192
192
  font-family: inherit;
193
193
  /* 1 */
194
+ font-feature-settings: inherit;
195
+ /* 1 */
196
+ font-variation-settings: inherit;
197
+ /* 1 */
194
198
  font-size: 100%;
195
199
  /* 1 */
196
200
  font-weight: inherit;
@@ -341,6 +345,14 @@ menu {
341
345
  padding: 0;
342
346
  }
343
347
 
348
+ /*
349
+ Reset default styling for dialogs.
350
+ */
351
+
352
+ dialog {
353
+ padding: 0;
354
+ }
355
+
344
356
  /*
345
357
  Prevent resizing textareas horizontally by default.
346
358
  */
@@ -422,7 +434,7 @@ video {
422
434
  display: none;
423
435
  }
424
436
 
425
- [type='text'],[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {
437
+ [type='text'],input:where(:not([type])),[type='email'],[type='url'],[type='password'],[type='number'],[type='date'],[type='datetime-local'],[type='month'],[type='search'],[type='tel'],[type='time'],[type='week'],[multiple],textarea,select {
426
438
  -webkit-appearance: none;
427
439
  -moz-appearance: none;
428
440
  appearance: none;
@@ -439,7 +451,7 @@ video {
439
451
  --tw-shadow: 0 0 #0000;
440
452
  }
441
453
 
442
- [type='text']:focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {
454
+ [type='text']:focus, input:where(:not([type])):focus, [type='email']:focus, [type='url']:focus, [type='password']:focus, [type='number']:focus, [type='date']:focus, [type='datetime-local']:focus, [type='month']:focus, [type='search']:focus, [type='tel']:focus, [type='time']:focus, [type='week']:focus, [multiple]:focus, textarea:focus, select:focus {
443
455
  outline: 2px solid transparent;
444
456
  outline-offset: 2px;
445
457
  --tw-ring-inset: var(--tw-empty,/*!*/ /*!*/);
@@ -485,7 +497,7 @@ select {
485
497
  print-color-adjust: exact;
486
498
  }
487
499
 
488
- [multiple] {
500
+ [multiple],[size]:where(select:not([size="1"])) {
489
501
  background-image: initial;
490
502
  background-position: initial;
491
503
  background-repeat: unset;
@@ -1100,10 +1112,6 @@ select {
1100
1112
  align-items: baseline;
1101
1113
  }
1102
1114
 
1103
- .ariadne-justify-end {
1104
- justify-content: flex-end;
1105
- }
1106
-
1107
1115
  .ariadne-justify-center {
1108
1116
  justify-content: center;
1109
1117
  }
@@ -1393,11 +1401,6 @@ select {
1393
1401
  padding-right: 1rem;
1394
1402
  }
1395
1403
 
1396
- .ariadne-px-5 {
1397
- padding-left: 1.25rem;
1398
- padding-right: 1.25rem;
1399
- }
1400
-
1401
1404
  .ariadne-px-6 {
1402
1405
  padding-left: 1.5rem;
1403
1406
  padding-right: 1.5rem;
@@ -0,0 +1,8 @@
1
+ class t{constructor(t,e,n){this.eventTarget=t,this.eventName=e,this.eventOptions=n,this.unorderedBindings=new Set}connect(){this.eventTarget.addEventListener(this.eventName,this,this.eventOptions)}disconnect(){this.eventTarget.removeEventListener(this.eventName,this,this.eventOptions)}bindingConnected(t){this.unorderedBindings.add(t)}bindingDisconnected(t){this.unorderedBindings.delete(t)}handleEvent(t){const e=function(t){if("immediatePropagationStopped"in t)return t;{const{stopImmediatePropagation:e}=t;return Object.assign(t,{immediatePropagationStopped:!1,stopImmediatePropagation(){this.immediatePropagationStopped=!0,e.call(this)}})}}(t);for(const t of this.bindings){if(e.immediatePropagationStopped)break;t.handleEvent(e)}}hasBindings(){return this.unorderedBindings.size>0}get bindings(){return Array.from(this.unorderedBindings).sort(((t,e)=>{const n=t.index,s=e.index;return n<s?-1:n>s?1:0}))}}class e{constructor(t){this.application=t,this.eventListenerMaps=new Map,this.started=!1}start(){this.started||(this.started=!0,this.eventListeners.forEach((t=>t.connect())))}stop(){this.started&&(this.started=!1,this.eventListeners.forEach((t=>t.disconnect())))}get eventListeners(){return Array.from(this.eventListenerMaps.values()).reduce(((t,e)=>t.concat(Array.from(e.values()))),[])}bindingConnected(t){this.fetchEventListenerForBinding(t).bindingConnected(t)}bindingDisconnected(t,e=!1){this.fetchEventListenerForBinding(t).bindingDisconnected(t),e&&this.clearEventListenersForBinding(t)}handleError(t,e,n={}){this.application.handleError(t,`Error ${e}`,n)}clearEventListenersForBinding(t){const e=this.fetchEventListenerForBinding(t);e.hasBindings()||(e.disconnect(),this.removeMappedEventListenerFor(t))}removeMappedEventListenerFor(t){const{eventTarget:e,eventName:n,eventOptions:s}=t,i=this.fetchEventListenerMapForEventTarget(e),r=this.cacheKey(n,s);i.delete(r),0==i.size&&this.eventListenerMaps.delete(e)}fetchEventListenerForBinding(t){const{eventTarget:e,eventName:n,eventOptions:s}=t;return this.fetchEventListener(e,n,s)}fetchEventListener(t,e,n){const s=this.fetchEventListenerMapForEventTarget(t),i=this.cacheKey(e,n);let r=s.get(i);return r||(r=this.createEventListener(t,e,n),s.set(i,r)),r}createEventListener(e,n,s){const i=new t(e,n,s);return this.started&&i.connect(),i}fetchEventListenerMapForEventTarget(t){let e=this.eventListenerMaps.get(t);return e||(e=new Map,this.eventListenerMaps.set(t,e)),e}cacheKey(t,e){const n=[t];return Object.keys(e).sort().forEach((t=>{n.push(`${e[t]?"":"!"}${t}`)})),n.join(":")}}const n={stop:({event:t,value:e})=>(e&&t.stopPropagation(),!0),prevent:({event:t,value:e})=>(e&&t.preventDefault(),!0),self:({event:t,value:e,element:n})=>!e||n===t.target},s=/^(?:(.+?)(?:\.(.+?))?(?:@(window|document))?->)?(.+?)(?:#([^:]+?))(?::(.+))?$/;function i(t){return"window"==t?window:"document"==t?document:void 0}function r(t){return t.replace(/(?:[_-])([a-z0-9])/g,((t,e)=>e.toUpperCase()))}function o(t){return r(t.replace(/--/g,"-").replace(/__/g,"_"))}function a(t){return t.charAt(0).toUpperCase()+t.slice(1)}function l(t){return t.replace(/([A-Z])/g,((t,e)=>`-${e.toLowerCase()}`))}class c{constructor(t,e,n,s){this.element=t,this.index=e,this.eventTarget=n.eventTarget||t,this.eventName=n.eventName||function(t){const e=t.tagName.toLowerCase();if(e in h)return h[e](t)}(t)||u("missing event name"),this.eventOptions=n.eventOptions||{},this.identifier=n.identifier||u("missing identifier"),this.methodName=n.methodName||u("missing method name"),this.keyFilter=n.keyFilter||"",this.schema=s}static forToken(t,e){return new this(t.element,t.index,function(t){const e=t.trim().match(s)||[];let n=e[1],r=e[2];return r&&!["keydown","keyup","keypress"].includes(n)&&(n+=`.${r}`,r=""),{eventTarget:i(e[3]),eventName:n,eventOptions:e[6]?(o=e[6],o.split(":").reduce(((t,e)=>Object.assign(t,{[e.replace(/^!/,"")]:!/^!/.test(e)})),{})):{},identifier:e[4],methodName:e[5],keyFilter:r};var o}(t.content),e)}toString(){const t=this.keyFilter?`.${this.keyFilter}`:"",e=this.eventTargetName?`@${this.eventTargetName}`:"";return`${this.eventName}${t}${e}->${this.identifier}#${this.methodName}`}isFilterTarget(t){if(!this.keyFilter)return!1;const e=this.keyFilter.split("+"),n=["meta","ctrl","alt","shift"],[s,i,r,o]=n.map((t=>e.includes(t)));if(t.metaKey!==s||t.ctrlKey!==i||t.altKey!==r||t.shiftKey!==o)return!0;const a=e.filter((t=>!n.includes(t)))[0];return!!a&&(Object.prototype.hasOwnProperty.call(this.keyMappings,a)||u(`contains unknown key filter: ${this.keyFilter}`),this.keyMappings[a].toLowerCase()!==t.key.toLowerCase())}get params(){const t={},e=new RegExp(`^data-${this.identifier}-(.+)-param$`,"i");for(const{name:n,value:s}of Array.from(this.element.attributes)){const i=n.match(e),o=i&&i[1];o&&(t[r(o)]=d(s))}return t}get eventTargetName(){return(t=this.eventTarget)==window?"window":t==document?"document":void 0;var t}get keyMappings(){return this.schema.keyMappings}}const h={a:()=>"click",button:()=>"click",form:()=>"submit",details:()=>"toggle",input:t=>"submit"==t.getAttribute("type")?"click":"input",select:()=>"change",textarea:()=>"input"};function u(t){throw new Error(t)}function d(t){try{return JSON.parse(t)}catch(e){return t}}class f{constructor(t,e){this.context=t,this.action=e}get index(){return this.action.index}get eventTarget(){return this.action.eventTarget}get eventOptions(){return this.action.eventOptions}get identifier(){return this.context.identifier}handleEvent(t){this.willBeInvokedByEvent(t)&&this.applyEventModifiers(t)&&this.invokeWithEvent(t)}get eventName(){return this.action.eventName}get method(){const t=this.controller[this.methodName];if("function"==typeof t)return t;throw new Error(`Action "${this.action}" references undefined method "${this.methodName}"`)}applyEventModifiers(t){const{element:e}=this.action,{actionDescriptorFilters:n}=this.context.application;let s=!0;for(const[i,r]of Object.entries(this.eventOptions))if(i in n){const o=n[i];s=s&&o({name:i,value:r,event:t,element:e})}return s}invokeWithEvent(t){const{target:e,currentTarget:n}=t;try{const{params:s}=this.action,i=Object.assign(t,{params:s});this.method.call(this.controller,i),this.context.logDebugActivity(this.methodName,{event:t,target:e,currentTarget:n,action:this.methodName})}catch(e){const{identifier:n,controller:s,element:i,index:r}=this,o={identifier:n,controller:s,element:i,index:r,event:t};this.context.handleError(e,`invoking action "${this.action}"`,o)}}willBeInvokedByEvent(t){const e=t.target;return!(t instanceof KeyboardEvent&&this.action.isFilterTarget(t))&&(this.element===e||(e instanceof Element&&this.element.contains(e)?this.scope.containsElement(e):this.scope.containsElement(this.action.element)))}get controller(){return this.context.controller}get methodName(){return this.action.methodName}get element(){return this.scope.element}get scope(){return this.context.scope}}class m{constructor(t,e){this.mutationObserverInit={attributes:!0,childList:!0,subtree:!0},this.element=t,this.started=!1,this.delegate=e,this.elements=new Set,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,this.mutationObserverInit),this.refresh())}pause(t){this.started&&(this.mutationObserver.disconnect(),this.started=!1),t(),this.started||(this.mutationObserver.observe(this.element,this.mutationObserverInit),this.started=!0)}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started){const t=new Set(this.matchElementsInTree());for(const e of Array.from(this.elements))t.has(e)||this.removeElement(e);for(const e of Array.from(t))this.addElement(e)}}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){"attributes"==t.type?this.processAttributeChange(t.target,t.attributeName):"childList"==t.type&&(this.processRemovedNodes(t.removedNodes),this.processAddedNodes(t.addedNodes))}processAttributeChange(t,e){const n=t;this.elements.has(n)?this.delegate.elementAttributeChanged&&this.matchElement(n)?this.delegate.elementAttributeChanged(n,e):this.removeElement(n):this.matchElement(n)&&this.addElement(n)}processRemovedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.processTree(t,this.removeElement)}}processAddedNodes(t){for(const e of Array.from(t)){const t=this.elementFromNode(e);t&&this.elementIsActive(t)&&this.processTree(t,this.addElement)}}matchElement(t){return this.delegate.matchElement(t)}matchElementsInTree(t=this.element){return this.delegate.matchElementsInTree(t)}processTree(t,e){for(const n of this.matchElementsInTree(t))e.call(this,n)}elementFromNode(t){if(t.nodeType==Node.ELEMENT_NODE)return t}elementIsActive(t){return t.isConnected==this.element.isConnected&&this.element.contains(t)}addElement(t){this.elements.has(t)||this.elementIsActive(t)&&(this.elements.add(t),this.delegate.elementMatched&&this.delegate.elementMatched(t))}removeElement(t){this.elements.has(t)&&(this.elements.delete(t),this.delegate.elementUnmatched&&this.delegate.elementUnmatched(t))}}class p{constructor(t,e,n){this.attributeName=e,this.delegate=n,this.elementObserver=new m(t,this)}get element(){return this.elementObserver.element}get selector(){return`[${this.attributeName}]`}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get started(){return this.elementObserver.started}matchElement(t){return t.hasAttribute(this.attributeName)}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector));return e.concat(n)}elementMatched(t){this.delegate.elementMatchedAttribute&&this.delegate.elementMatchedAttribute(t,this.attributeName)}elementUnmatched(t){this.delegate.elementUnmatchedAttribute&&this.delegate.elementUnmatchedAttribute(t,this.attributeName)}elementAttributeChanged(t,e){this.delegate.elementAttributeValueChanged&&this.attributeName==e&&this.delegate.elementAttributeValueChanged(t,e)}}function g(t,e){let n=t.get(e);return n||(n=new Set,t.set(e,n)),n}class v{constructor(){this.valuesByKey=new Map}get keys(){return Array.from(this.valuesByKey.keys())}get values(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t.concat(Array.from(e))),[])}get size(){return Array.from(this.valuesByKey.values()).reduce(((t,e)=>t+e.size),0)}add(t,e){!function(t,e,n){g(t,e).add(n)}(this.valuesByKey,t,e)}delete(t,e){!function(t,e,n){g(t,e).delete(n),function(t,e){const n=t.get(e);null!=n&&0==n.size&&t.delete(e)}(t,e)}(this.valuesByKey,t,e)}has(t,e){const n=this.valuesByKey.get(t);return null!=n&&n.has(e)}hasKey(t){return this.valuesByKey.has(t)}hasValue(t){return Array.from(this.valuesByKey.values()).some((e=>e.has(t)))}getValuesForKey(t){const e=this.valuesByKey.get(t);return e?Array.from(e):[]}getKeysForValue(t){return Array.from(this.valuesByKey).filter((([e,n])=>n.has(t))).map((([t,e])=>t))}}class b{constructor(t,e,n,s={}){this.selector=e,this.details=s,this.elementObserver=new m(t,this),this.delegate=n,this.matchesByElement=new v}get started(){return this.elementObserver.started}start(){this.elementObserver.start()}pause(t){this.elementObserver.pause(t)}stop(){this.elementObserver.stop()}refresh(){this.elementObserver.refresh()}get element(){return this.elementObserver.element}matchElement(t){const e=t.matches(this.selector);return this.delegate.selectorMatchElement?e&&this.delegate.selectorMatchElement(t,this.details):e}matchElementsInTree(t){const e=this.matchElement(t)?[t]:[],n=Array.from(t.querySelectorAll(this.selector)).filter((t=>this.matchElement(t)));return e.concat(n)}elementMatched(t){this.selectorMatched(t)}elementUnmatched(t){this.selectorUnmatched(t)}elementAttributeChanged(t,e){const n=this.matchElement(t),s=this.matchesByElement.has(this.selector,t);!n&&s&&this.selectorUnmatched(t)}selectorMatched(t){this.delegate.selectorMatched&&(this.delegate.selectorMatched(t,this.selector,this.details),this.matchesByElement.add(this.selector,t))}selectorUnmatched(t){this.delegate.selectorUnmatched(t,this.selector,this.details),this.matchesByElement.delete(this.selector,t)}}class y{constructor(t,e){this.element=t,this.delegate=e,this.started=!1,this.stringMap=new Map,this.mutationObserver=new MutationObserver((t=>this.processMutations(t)))}start(){this.started||(this.started=!0,this.mutationObserver.observe(this.element,{attributes:!0,attributeOldValue:!0}),this.refresh())}stop(){this.started&&(this.mutationObserver.takeRecords(),this.mutationObserver.disconnect(),this.started=!1)}refresh(){if(this.started)for(const t of this.knownAttributeNames)this.refreshAttribute(t,null)}processMutations(t){if(this.started)for(const e of t)this.processMutation(e)}processMutation(t){const e=t.attributeName;e&&this.refreshAttribute(e,t.oldValue)}refreshAttribute(t,e){const n=this.delegate.getStringMapKeyForAttribute(t);if(null!=n){this.stringMap.has(t)||this.stringMapKeyAdded(n,t);const s=this.element.getAttribute(t);if(this.stringMap.get(t)!=s&&this.stringMapValueChanged(s,n,e),null==s){const e=this.stringMap.get(t);this.stringMap.delete(t),e&&this.stringMapKeyRemoved(n,t,e)}else this.stringMap.set(t,s)}}stringMapKeyAdded(t,e){this.delegate.stringMapKeyAdded&&this.delegate.stringMapKeyAdded(t,e)}stringMapValueChanged(t,e,n){this.delegate.stringMapValueChanged&&this.delegate.stringMapValueChanged(t,e,n)}stringMapKeyRemoved(t,e,n){this.delegate.stringMapKeyRemoved&&this.delegate.stringMapKeyRemoved(t,e,n)}get knownAttributeNames(){return Array.from(new Set(this.currentAttributeNames.concat(this.recordedAttributeNames)))}get currentAttributeNames(){return Array.from(this.element.attributes).map((t=>t.name))}get recordedAttributeNames(){return Array.from(this.stringMap.keys())}}class A{constructor(t,e,n){this.attributeObserver=new p(t,e,this),this.delegate=n,this.tokensByElement=new v}get started(){return this.attributeObserver.started}start(){this.attributeObserver.start()}pause(t){this.attributeObserver.pause(t)}stop(){this.attributeObserver.stop()}refresh(){this.attributeObserver.refresh()}get element(){return this.attributeObserver.element}get attributeName(){return this.attributeObserver.attributeName}elementMatchedAttribute(t){this.tokensMatched(this.readTokensForElement(t))}elementAttributeValueChanged(t){const[e,n]=this.refreshTokensForElement(t);this.tokensUnmatched(e),this.tokensMatched(n)}elementUnmatchedAttribute(t){this.tokensUnmatched(this.tokensByElement.getValuesForKey(t))}tokensMatched(t){t.forEach((t=>this.tokenMatched(t)))}tokensUnmatched(t){t.forEach((t=>this.tokenUnmatched(t)))}tokenMatched(t){this.delegate.tokenMatched(t),this.tokensByElement.add(t.element,t)}tokenUnmatched(t){this.delegate.tokenUnmatched(t),this.tokensByElement.delete(t.element,t)}refreshTokensForElement(t){const e=this.tokensByElement.getValuesForKey(t),n=this.readTokensForElement(t),s=function(t,e){const n=Math.max(t.length,e.length);return Array.from({length:n},((n,s)=>[t[s],e[s]]))}(e,n).findIndex((([t,e])=>!function(t,e){return t&&e&&t.index==e.index&&t.content==e.content}(t,e)));return-1==s?[[],[]]:[e.slice(s),n.slice(s)]}readTokensForElement(t){const e=this.attributeName;return function(t,e,n){return t.trim().split(/\s+/).filter((t=>t.length)).map(((t,s)=>({element:e,attributeName:n,content:t,index:s})))}(t.getAttribute(e)||"",t,e)}}class w{constructor(t,e,n){this.tokenListObserver=new A(t,e,this),this.delegate=n,this.parseResultsByToken=new WeakMap,this.valuesByTokenByElement=new WeakMap}get started(){return this.tokenListObserver.started}start(){this.tokenListObserver.start()}stop(){this.tokenListObserver.stop()}refresh(){this.tokenListObserver.refresh()}get element(){return this.tokenListObserver.element}get attributeName(){return this.tokenListObserver.attributeName}tokenMatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).set(t,n),this.delegate.elementMatchedValue(e,n))}tokenUnmatched(t){const{element:e}=t,{value:n}=this.fetchParseResultForToken(t);n&&(this.fetchValuesByTokenForElement(e).delete(t),this.delegate.elementUnmatchedValue(e,n))}fetchParseResultForToken(t){let e=this.parseResultsByToken.get(t);return e||(e=this.parseToken(t),this.parseResultsByToken.set(t,e)),e}fetchValuesByTokenForElement(t){let e=this.valuesByTokenByElement.get(t);return e||(e=new Map,this.valuesByTokenByElement.set(t,e)),e}parseToken(t){try{return{value:this.delegate.parseValueForToken(t)}}catch(t){return{error:t}}}}class E{constructor(t,e){this.context=t,this.delegate=e,this.bindingsByAction=new Map}start(){this.valueListObserver||(this.valueListObserver=new w(this.element,this.actionAttribute,this),this.valueListObserver.start())}stop(){this.valueListObserver&&(this.valueListObserver.stop(),delete this.valueListObserver,this.disconnectAllActions())}get element(){return this.context.element}get identifier(){return this.context.identifier}get actionAttribute(){return this.schema.actionAttribute}get schema(){return this.context.schema}get bindings(){return Array.from(this.bindingsByAction.values())}connectAction(t){const e=new f(this.context,t);this.bindingsByAction.set(t,e),this.delegate.bindingConnected(e)}disconnectAction(t){const e=this.bindingsByAction.get(t);e&&(this.bindingsByAction.delete(t),this.delegate.bindingDisconnected(e))}disconnectAllActions(){this.bindings.forEach((t=>this.delegate.bindingDisconnected(t,!0))),this.bindingsByAction.clear()}parseValueForToken(t){const e=c.forToken(t,this.schema);if(e.identifier==this.identifier)return e}elementMatchedValue(t,e){this.connectAction(e)}elementUnmatchedValue(t,e){this.disconnectAction(e)}}class O{constructor(t,e){this.context=t,this.receiver=e,this.stringMapObserver=new y(this.element,this),this.valueDescriptorMap=this.controller.valueDescriptorMap}start(){this.stringMapObserver.start(),this.invokeChangedCallbacksForDefaultValues()}stop(){this.stringMapObserver.stop()}get element(){return this.context.element}get controller(){return this.context.controller}getStringMapKeyForAttribute(t){if(t in this.valueDescriptorMap)return this.valueDescriptorMap[t].name}stringMapKeyAdded(t,e){const n=this.valueDescriptorMap[e];this.hasValue(t)||this.invokeChangedCallback(t,n.writer(this.receiver[t]),n.writer(n.defaultValue))}stringMapValueChanged(t,e,n){const s=this.valueDescriptorNameMap[e];null!==t&&(null===n&&(n=s.writer(s.defaultValue)),this.invokeChangedCallback(e,t,n))}stringMapKeyRemoved(t,e,n){const s=this.valueDescriptorNameMap[t];this.hasValue(t)?this.invokeChangedCallback(t,s.writer(this.receiver[t]),n):this.invokeChangedCallback(t,s.writer(s.defaultValue),n)}invokeChangedCallbacksForDefaultValues(){for(const{key:t,name:e,defaultValue:n,writer:s}of this.valueDescriptors)null==n||this.controller.data.has(t)||this.invokeChangedCallback(e,s(n),void 0)}invokeChangedCallback(t,e,n){const s=`${t}Changed`,i=this.receiver[s];if("function"==typeof i){const s=this.valueDescriptorNameMap[t];try{const t=s.reader(e);let r=n;n&&(r=s.reader(n)),i.call(this.receiver,t,r)}catch(t){throw t instanceof TypeError&&(t.message=`Stimulus Value "${this.context.identifier}.${s.name}" - ${t.message}`),t}}}get valueDescriptors(){const{valueDescriptorMap:t}=this;return Object.keys(t).map((e=>t[e]))}get valueDescriptorNameMap(){const t={};return Object.keys(this.valueDescriptorMap).forEach((e=>{const n=this.valueDescriptorMap[e];t[n.name]=n})),t}hasValue(t){const e=`has${a(this.valueDescriptorNameMap[t].name)}`;return this.receiver[e]}}class x{constructor(t,e){this.context=t,this.delegate=e,this.targetsByName=new v}start(){this.tokenListObserver||(this.tokenListObserver=new A(this.element,this.attributeName,this),this.tokenListObserver.start())}stop(){this.tokenListObserver&&(this.disconnectAllTargets(),this.tokenListObserver.stop(),delete this.tokenListObserver)}tokenMatched({element:t,content:e}){this.scope.containsElement(t)&&this.connectTarget(t,e)}tokenUnmatched({element:t,content:e}){this.disconnectTarget(t,e)}connectTarget(t,e){var n;this.targetsByName.has(e,t)||(this.targetsByName.add(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetConnected(t,e))))}disconnectTarget(t,e){var n;this.targetsByName.has(e,t)&&(this.targetsByName.delete(e,t),null===(n=this.tokenListObserver)||void 0===n||n.pause((()=>this.delegate.targetDisconnected(t,e))))}disconnectAllTargets(){for(const t of this.targetsByName.keys)for(const e of this.targetsByName.getValuesForKey(t))this.disconnectTarget(e,t)}get attributeName(){return`data-${this.context.identifier}-target`}get element(){return this.context.element}get scope(){return this.context.scope}}function M(t,e){const n=T(t);return Array.from(n.reduce(((t,n)=>(function(t,e){const n=t[e];return Array.isArray(n)?n:[]}(n,e).forEach((e=>t.add(e))),t)),new Set))}function $(t,e){return T(t).reduce(((t,n)=>(t.push(...function(t,e){const n=t[e];return n?Object.keys(n).map((t=>[t,n[t]])):[]}(n,e)),t)),[])}function T(t){const e=[];for(;t;)e.push(t),t=Object.getPrototypeOf(t);return e.reverse()}class k{constructor(t,e){this.context=t,this.delegate=e,this.outletsByName=new v,this.outletElementsByName=new v,this.selectorObserverMap=new Map}start(){0===this.selectorObserverMap.size&&(this.outletDefinitions.forEach((t=>{const e=this.selector(t),n={outletName:t};e&&this.selectorObserverMap.set(t,new b(document.body,e,this,n))})),this.selectorObserverMap.forEach((t=>t.start()))),this.dependentContexts.forEach((t=>t.refresh()))}stop(){this.selectorObserverMap.size>0&&(this.disconnectAllOutlets(),this.selectorObserverMap.forEach((t=>t.stop())),this.selectorObserverMap.clear())}refresh(){this.selectorObserverMap.forEach((t=>t.refresh()))}selectorMatched(t,e,{outletName:n}){const s=this.getOutlet(t,n);s&&this.connectOutlet(s,t,n)}selectorUnmatched(t,e,{outletName:n}){const s=this.getOutletFromMap(t,n);s&&this.disconnectOutlet(s,t,n)}selectorMatchElement(t,{outletName:e}){return this.hasOutlet(t,e)&&t.matches(`[${this.context.application.schema.controllerAttribute}~=${e}]`)}connectOutlet(t,e,n){var s;this.outletElementsByName.has(n,e)||(this.outletsByName.add(n,t),this.outletElementsByName.add(n,e),null===(s=this.selectorObserverMap.get(n))||void 0===s||s.pause((()=>this.delegate.outletConnected(t,e,n))))}disconnectOutlet(t,e,n){var s;this.outletElementsByName.has(n,e)&&(this.outletsByName.delete(n,t),this.outletElementsByName.delete(n,e),null===(s=this.selectorObserverMap.get(n))||void 0===s||s.pause((()=>this.delegate.outletDisconnected(t,e,n))))}disconnectAllOutlets(){for(const t of this.outletElementsByName.keys)for(const e of this.outletElementsByName.getValuesForKey(t))for(const n of this.outletsByName.getValuesForKey(t))this.disconnectOutlet(n,e,t)}selector(t){return this.scope.outlets.getSelectorForOutletName(t)}get outletDependencies(){const t=new v;return this.router.modules.forEach((e=>{M(e.definition.controllerConstructor,"outlets").forEach((n=>t.add(n,e.identifier)))})),t}get outletDefinitions(){return this.outletDependencies.getKeysForValue(this.identifier)}get dependentControllerIdentifiers(){return this.outletDependencies.getValuesForKey(this.identifier)}get dependentContexts(){const t=this.dependentControllerIdentifiers;return this.router.contexts.filter((e=>t.includes(e.identifier)))}hasOutlet(t,e){return!!this.getOutlet(t,e)||!!this.getOutletFromMap(t,e)}getOutlet(t,e){return this.application.getControllerForElementAndIdentifier(t,e)}getOutletFromMap(t,e){return this.outletsByName.getValuesForKey(e).find((e=>e.element===t))}get scope(){return this.context.scope}get identifier(){return this.context.identifier}get application(){return this.context.application}get router(){return this.application.router}}class N{constructor(t,e){this.logDebugActivity=(t,e={})=>{const{identifier:n,controller:s,element:i}=this;e=Object.assign({identifier:n,controller:s,element:i},e),this.application.logDebugActivity(this.identifier,t,e)},this.module=t,this.scope=e,this.controller=new t.controllerConstructor(this),this.bindingObserver=new E(this,this.dispatcher),this.valueObserver=new O(this,this.controller),this.targetObserver=new x(this,this),this.outletObserver=new k(this,this);try{this.controller.initialize(),this.logDebugActivity("initialize")}catch(t){this.handleError(t,"initializing controller")}}connect(){this.bindingObserver.start(),this.valueObserver.start(),this.targetObserver.start(),this.outletObserver.start();try{this.controller.connect(),this.logDebugActivity("connect")}catch(t){this.handleError(t,"connecting controller")}}refresh(){this.outletObserver.refresh()}disconnect(){try{this.controller.disconnect(),this.logDebugActivity("disconnect")}catch(t){this.handleError(t,"disconnecting controller")}this.outletObserver.stop(),this.targetObserver.stop(),this.valueObserver.stop(),this.bindingObserver.stop()}get application(){return this.module.application}get identifier(){return this.module.identifier}get schema(){return this.application.schema}get dispatcher(){return this.application.dispatcher}get element(){return this.scope.element}get parentElement(){return this.element.parentElement}handleError(t,e,n={}){const{identifier:s,controller:i,element:r}=this;n=Object.assign({identifier:s,controller:i,element:r},n),this.application.handleError(t,`Error ${e}`,n)}targetConnected(t,e){this.invokeControllerMethod(`${e}TargetConnected`,t)}targetDisconnected(t,e){this.invokeControllerMethod(`${e}TargetDisconnected`,t)}outletConnected(t,e,n){this.invokeControllerMethod(`${o(n)}OutletConnected`,t,e)}outletDisconnected(t,e,n){this.invokeControllerMethod(`${o(n)}OutletDisconnected`,t,e)}invokeControllerMethod(t,...e){const n=this.controller;"function"==typeof n[t]&&n[t](...e)}}function C(t){return function(t,e){const n=F(t),s=function(t,e){return S(e).reduce(((n,s)=>{const i=function(t,e,n){const s=Object.getOwnPropertyDescriptor(t,n);if(!s||!("value"in s)){const t=Object.getOwnPropertyDescriptor(e,n).value;return s&&(t.get=s.get||t.get,t.set=s.set||t.set),t}}(t,e,s);return i&&Object.assign(n,{[s]:i}),n}),{})}(t.prototype,e);return Object.defineProperties(n.prototype,s),n}(t,function(t){const e=M(t,"blessings");return e.reduce(((e,n)=>{const s=n(t);for(const t in s){const n=e[t]||{};e[t]=Object.assign(n,s[t])}return e}),{})}(t))}const S="function"==typeof Object.getOwnPropertySymbols?t=>[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)]:Object.getOwnPropertyNames,F=(()=>{function t(t){function e(){return Reflect.construct(t,arguments,new.target)}return e.prototype=Object.create(t.prototype,{constructor:{value:e}}),Reflect.setPrototypeOf(e,t),e}try{return function(){const e=t((function(){this.a.call(this)}));e.prototype.a=function(){},new e}(),t}catch(t){return t=>class extends t{}}})();class L{constructor(t,e){this.application=t,this.definition=function(t){return{identifier:t.identifier,controllerConstructor:C(t.controllerConstructor)}}(e),this.contextsByScope=new WeakMap,this.connectedContexts=new Set}get identifier(){return this.definition.identifier}get controllerConstructor(){return this.definition.controllerConstructor}get contexts(){return Array.from(this.connectedContexts)}connectContextForScope(t){const e=this.fetchContextForScope(t);this.connectedContexts.add(e),e.connect()}disconnectContextForScope(t){const e=this.contextsByScope.get(t);e&&(this.connectedContexts.delete(e),e.disconnect())}fetchContextForScope(t){let e=this.contextsByScope.get(t);return e||(e=new N(this,t),this.contextsByScope.set(t,e)),e}}class D{constructor(t){this.scope=t}has(t){return this.data.has(this.getDataKey(t))}get(t){return this.getAll(t)[0]}getAll(t){const e=this.data.get(this.getDataKey(t))||"";return e.match(/[^\s]+/g)||[]}getAttributeName(t){return this.data.getAttributeNameForKey(this.getDataKey(t))}getDataKey(t){return`${t}-class`}get data(){return this.scope.data}}class B{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get(t){const e=this.getAttributeNameForKey(t);return this.element.getAttribute(e)}set(t,e){const n=this.getAttributeNameForKey(t);return this.element.setAttribute(n,e),this.get(t)}has(t){const e=this.getAttributeNameForKey(t);return this.element.hasAttribute(e)}delete(t){if(this.has(t)){const e=this.getAttributeNameForKey(t);return this.element.removeAttribute(e),!0}return!1}getAttributeNameForKey(t){return`data-${this.identifier}-${l(t)}`}}class _{constructor(t){this.warnedKeysByObject=new WeakMap,this.logger=t}warn(t,e,n){let s=this.warnedKeysByObject.get(t);s||(s=new Set,this.warnedKeysByObject.set(t,s)),s.has(e)||(s.add(e),this.logger.warn(n,t))}}function j(t,e){return`[${t}~="${e}"]`}class V{constructor(t){this.scope=t}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findTarget(e)||this.findLegacyTarget(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllTargets(e),...this.findAllLegacyTargets(e)]),[])}findTarget(t){const e=this.getSelectorForTargetName(t);return this.scope.findElement(e)}findAllTargets(t){const e=this.getSelectorForTargetName(t);return this.scope.findAllElements(e)}getSelectorForTargetName(t){return j(this.schema.targetAttributeForScope(this.identifier),t)}findLegacyTarget(t){const e=this.getLegacySelectorForTargetName(t);return this.deprecate(this.scope.findElement(e),t)}findAllLegacyTargets(t){const e=this.getLegacySelectorForTargetName(t);return this.scope.findAllElements(e).map((e=>this.deprecate(e,t)))}getLegacySelectorForTargetName(t){const e=`${this.identifier}.${t}`;return j(this.schema.targetAttribute,e)}deprecate(t,e){if(t){const{identifier:n}=this,s=this.schema.targetAttribute,i=this.schema.targetAttributeForScope(n);this.guide.warn(t,`target:${e}`,`Please replace ${s}="${n}.${e}" with ${i}="${e}". The ${s} attribute is deprecated and will be removed in a future version of Stimulus.`)}return t}get guide(){return this.scope.guide}}class I{constructor(t,e){this.scope=t,this.controllerElement=e}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get schema(){return this.scope.schema}has(t){return null!=this.find(t)}find(...t){return t.reduce(((t,e)=>t||this.findOutlet(e)),void 0)}findAll(...t){return t.reduce(((t,e)=>[...t,...this.findAllOutlets(e)]),[])}getSelectorForOutletName(t){const e=this.schema.outletAttributeForScope(this.identifier,t);return this.controllerElement.getAttribute(e)}findOutlet(t){const e=this.getSelectorForOutletName(t);if(e)return this.findElement(e,t)}findAllOutlets(t){const e=this.getSelectorForOutletName(t);return e?this.findAllElements(e,t):[]}findElement(t,e){return this.scope.queryElements(t).filter((n=>this.matchesElement(n,t,e)))[0]}findAllElements(t,e){return this.scope.queryElements(t).filter((n=>this.matchesElement(n,t,e)))}matchesElement(t,e,n){const s=t.getAttribute(this.scope.schema.controllerAttribute)||"";return t.matches(e)&&s.split(" ").includes(n)}}class H{constructor(t,e,n,s){this.targets=new V(this),this.classes=new D(this),this.data=new B(this),this.containsElement=t=>t.closest(this.controllerSelector)===this.element,this.schema=t,this.element=e,this.identifier=n,this.guide=new _(s),this.outlets=new I(this.documentScope,e)}findElement(t){return this.element.matches(t)?this.element:this.queryElements(t).find(this.containsElement)}findAllElements(t){return[...this.element.matches(t)?[this.element]:[],...this.queryElements(t).filter(this.containsElement)]}queryElements(t){return Array.from(this.element.querySelectorAll(t))}get controllerSelector(){return j(this.schema.controllerAttribute,this.identifier)}get isDocumentScope(){return this.element===document.documentElement}get documentScope(){return this.isDocumentScope?this:new H(this.schema,document.documentElement,this.identifier,this.guide.logger)}}class R{constructor(t,e,n){this.element=t,this.schema=e,this.delegate=n,this.valueListObserver=new w(this.element,this.controllerAttribute,this),this.scopesByIdentifierByElement=new WeakMap,this.scopeReferenceCounts=new WeakMap}start(){this.valueListObserver.start()}stop(){this.valueListObserver.stop()}get controllerAttribute(){return this.schema.controllerAttribute}parseValueForToken(t){const{element:e,content:n}=t,s=this.fetchScopesByIdentifierForElement(e);let i=s.get(n);return i||(i=this.delegate.createScopeForElementAndIdentifier(e,n),s.set(n,i)),i}elementMatchedValue(t,e){const n=(this.scopeReferenceCounts.get(e)||0)+1;this.scopeReferenceCounts.set(e,n),1==n&&this.delegate.scopeConnected(e)}elementUnmatchedValue(t,e){const n=this.scopeReferenceCounts.get(e);n&&(this.scopeReferenceCounts.set(e,n-1),1==n&&this.delegate.scopeDisconnected(e))}fetchScopesByIdentifierForElement(t){let e=this.scopesByIdentifierByElement.get(t);return e||(e=new Map,this.scopesByIdentifierByElement.set(t,e)),e}}class K{constructor(t){this.application=t,this.scopeObserver=new R(this.element,this.schema,this),this.scopesByIdentifier=new v,this.modulesByIdentifier=new Map}get element(){return this.application.element}get schema(){return this.application.schema}get logger(){return this.application.logger}get controllerAttribute(){return this.schema.controllerAttribute}get modules(){return Array.from(this.modulesByIdentifier.values())}get contexts(){return this.modules.reduce(((t,e)=>t.concat(e.contexts)),[])}start(){this.scopeObserver.start()}stop(){this.scopeObserver.stop()}loadDefinition(t){this.unloadIdentifier(t.identifier);const e=new L(this.application,t);this.connectModule(e);const n=t.controllerConstructor.afterLoad;n&&n(t.identifier,this.application)}unloadIdentifier(t){const e=this.modulesByIdentifier.get(t);e&&this.disconnectModule(e)}getContextForElementAndIdentifier(t,e){const n=this.modulesByIdentifier.get(e);if(n)return n.contexts.find((e=>e.element==t))}handleError(t,e,n){this.application.handleError(t,e,n)}createScopeForElementAndIdentifier(t,e){return new H(this.schema,t,e,this.logger)}scopeConnected(t){this.scopesByIdentifier.add(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.connectContextForScope(t)}scopeDisconnected(t){this.scopesByIdentifier.delete(t.identifier,t);const e=this.modulesByIdentifier.get(t.identifier);e&&e.disconnectContextForScope(t)}connectModule(t){this.modulesByIdentifier.set(t.identifier,t);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.connectContextForScope(e)))}disconnectModule(t){this.modulesByIdentifier.delete(t.identifier);this.scopesByIdentifier.getValuesForKey(t.identifier).forEach((e=>t.disconnectContextForScope(e)))}}const P={controllerAttribute:"data-controller",actionAttribute:"data-action",targetAttribute:"data-target",targetAttributeForScope:t=>`data-${t}-target`,outletAttributeForScope:(t,e)=>`data-${t}-${e}-outlet`,keyMappings:Object.assign(Object.assign({enter:"Enter",tab:"Tab",esc:"Escape",space:" ",up:"ArrowUp",down:"ArrowDown",left:"ArrowLeft",right:"ArrowRight",home:"Home",end:"End"},U("abcdefghijklmnopqrstuvwxyz".split("").map((t=>[t,t])))),U("0123456789".split("").map((t=>[t,t]))))};function U(t){return t.reduce(((t,[e,n])=>Object.assign(Object.assign({},t),{[e]:n})),{})}function W([t,e],n){return function(t){const e=`${l(t.token)}-value`,n=function(t){const e=function(t){const e=q(t.typeObject.type);if(!e)return;const n=z(t.typeObject.default);if(e!==n){const s=t.controller?`${t.controller}.${t.token}`:t.token;throw new Error(`The specified default value for the Stimulus Value "${s}" must match the defined type "${e}". The provided default value of "${t.typeObject.default}" is of type "${n}".`)}return e}({controller:t.controller,token:t.token,typeObject:t.typeDefinition}),n=z(t.typeDefinition),s=q(t.typeDefinition),i=e||n||s;if(i)return i;const r=t.controller?`${t.controller}.${t.typeDefinition}`:t.token;throw new Error(`Unknown value type "${r}" for "${t.token}" value`)}(t);return{type:n,key:e,name:r(e),get defaultValue(){return function(t){const e=q(t);if(e)return Z[e];const n=t.default;return void 0!==n?n:t}(t.typeDefinition)},get hasCustomDefaultValue(){return void 0!==z(t.typeDefinition)},reader:Y[n],writer:J[n]||J.default}}({controller:n,token:t,typeDefinition:e})}function q(t){switch(t){case Array:return"array";case Boolean:return"boolean";case Number:return"number";case Object:return"object";case String:return"string"}}function z(t){switch(typeof t){case"boolean":return"boolean";case"number":return"number";case"string":return"string"}return Array.isArray(t)?"array":"[object Object]"===Object.prototype.toString.call(t)?"object":void 0}const Z={get array(){return[]},boolean:!1,number:0,get object(){return{}},string:""},Y={array(t){const e=JSON.parse(t);if(!Array.isArray(e))throw new TypeError(`expected value of type "array" but instead got value "${t}" of type "${z(e)}"`);return e},boolean:t=>!("0"==t||"false"==String(t).toLowerCase()),number:t=>Number(t),object(t){const e=JSON.parse(t);if(null===e||"object"!=typeof e||Array.isArray(e))throw new TypeError(`expected value of type "object" but instead got value "${t}" of type "${z(e)}"`);return e},string:t=>t},J={default:function(t){return`${t}`},array:G,object:G};function G(t){return JSON.stringify(t)}class X{constructor(t){this.context=t}static get shouldLoad(){return!0}static afterLoad(t,e){}get application(){return this.context.application}get scope(){return this.context.scope}get element(){return this.scope.element}get identifier(){return this.scope.identifier}get targets(){return this.scope.targets}get outlets(){return this.scope.outlets}get classes(){return this.scope.classes}get data(){return this.scope.data}initialize(){}connect(){}disconnect(){}dispatch(t,{target:e=this.element,detail:n={},prefix:s=this.identifier,bubbles:i=!0,cancelable:r=!0}={}){const o=new CustomEvent(s?`${s}:${t}`:t,{detail:n,bubbles:i,cancelable:r});return e.dispatchEvent(o),o}}
2
+ /**
3
+ * @license
4
+ * Copyright 2017 Google LLC
5
+ * SPDX-License-Identifier: BSD-3-Clause
6
+ */
7
+ var Q;X.blessings=[function(t){return M(t,"classes").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Class`]:{get(){const{classes:t}=this;if(t.has(n))return t.get(n);{const e=t.getAttributeName(n);throw new Error(`Missing attribute "${e}"`)}}},[`${n}Classes`]:{get(){return this.classes.getAll(n)}},[`has${a(n)}Class`]:{get(){return this.classes.has(n)}}});var n}),{})},function(t){return M(t,"targets").reduce(((t,e)=>{return Object.assign(t,{[`${n=e}Target`]:{get(){const t=this.targets.find(n);if(t)return t;throw new Error(`Missing target element "${n}" for "${this.identifier}" controller`)}},[`${n}Targets`]:{get(){return this.targets.findAll(n)}},[`has${a(n)}Target`]:{get(){return this.targets.has(n)}}});var n}),{})},function(t){const e=$(t,"values"),n={valueDescriptorMap:{get(){return e.reduce(((t,e)=>{const n=W(e,this.identifier),s=this.data.getAttributeNameForKey(n.key);return Object.assign(t,{[s]:n})}),{})}}};return e.reduce(((t,e)=>Object.assign(t,function(t,e){const n=W(t,e),{key:s,name:i,reader:r,writer:o}=n;return{[i]:{get(){const t=this.data.get(s);return null!==t?r(t):n.defaultValue},set(t){void 0===t?this.data.delete(s):this.data.set(s,o(t))}},[`has${a(i)}`]:{get(){return this.data.has(s)||n.hasCustomDefaultValue}}}}(e))),n)},function(t){return M(t,"outlets").reduce(((t,e)=>Object.assign(t,function(t){const e=o(t);return{[`${e}Outlet`]:{get(){const e=this.outlets.find(t);if(e){const n=this.application.getControllerForElementAndIdentifier(e,t);if(n)return n;throw new Error(`Missing "data-controller=${t}" attribute on outlet element for "${this.identifier}" controller`)}throw new Error(`Missing outlet element "${t}" for "${this.identifier}" controller`)}},[`${e}Outlets`]:{get(){const e=this.outlets.findAll(t);return e.length>0?e.map((e=>{const n=this.application.getControllerForElementAndIdentifier(e,t);if(n)return n;console.warn(`The provided outlet element is missing the outlet controller "${t}" for "${this.identifier}"`,e)})).filter((t=>t)):[]}},[`${e}OutletElement`]:{get(){const e=this.outlets.find(t);if(e)return e;throw new Error(`Missing outlet element "${t}" for "${this.identifier}" controller`)}},[`${e}OutletElements`]:{get(){return this.outlets.findAll(t)}},[`has${a(e)}Outlet`]:{get(){return this.outlets.has(t)}}}}(e))),{})}],X.targets=[],X.outlets=[],X.values={};const tt=window,et=tt.trustedTypes,nt=et?et.createPolicy("lit-html",{createHTML:t=>t}):void 0,st="$lit$",it=`lit$${(Math.random()+"").slice(9)}$`,rt="?"+it,ot=`<${rt}>`,at=document,lt=()=>at.createComment(""),ct=t=>null===t||"object"!=typeof t&&"function"!=typeof t,ht=Array.isArray,ut="[ \t\n\f\r]",dt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,ft=/-->/g,mt=/>/g,pt=RegExp(`>|${ut}(?:([^\\s"'>=/]+)(${ut}*=${ut}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`,"g"),gt=/'/g,vt=/"/g,bt=/^(?:script|style|textarea|title)$/i,yt=(t=>(e,...n)=>({_$litType$:t,strings:e,values:n}))(1),At=Symbol.for("lit-noChange"),wt=Symbol.for("lit-nothing"),Et=new WeakMap,Ot=at.createTreeWalker(at,129,null,!1);function xt(t,e){if(!Array.isArray(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return void 0!==nt?nt.createHTML(e):e}const Mt=(t,e)=>{const n=t.length-1,s=[];let i,r=2===e?"<svg>":"",o=dt;for(let e=0;e<n;e++){const n=t[e];let a,l,c=-1,h=0;for(;h<n.length&&(o.lastIndex=h,l=o.exec(n),null!==l);)h=o.lastIndex,o===dt?"!--"===l[1]?o=ft:void 0!==l[1]?o=mt:void 0!==l[2]?(bt.test(l[2])&&(i=RegExp("</"+l[2],"g")),o=pt):void 0!==l[3]&&(o=pt):o===pt?">"===l[0]?(o=null!=i?i:dt,c=-1):void 0===l[1]?c=-2:(c=o.lastIndex-l[2].length,a=l[1],o=void 0===l[3]?pt:'"'===l[3]?vt:gt):o===vt||o===gt?o=pt:o===ft||o===mt?o=dt:(o=pt,i=void 0);const u=o===pt&&t[e+1].startsWith("/>")?" ":"";r+=o===dt?n+ot:c>=0?(s.push(a),n.slice(0,c)+st+n.slice(c)+it+u):n+it+(-2===c?(s.push(void 0),e):u)}return[xt(t,r+(t[n]||"<?>")+(2===e?"</svg>":"")),s]};class $t{constructor({strings:t,_$litType$:e},n){let s;this.parts=[];let i=0,r=0;const o=t.length-1,a=this.parts,[l,c]=Mt(t,e);if(this.el=$t.createElement(l,n),Ot.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(s=Ot.nextNode())&&a.length<o;){if(1===s.nodeType){if(s.hasAttributes()){const t=[];for(const e of s.getAttributeNames())if(e.endsWith(st)||e.startsWith(it)){const n=c[r++];if(t.push(e),void 0!==n){const t=s.getAttribute(n.toLowerCase()+st).split(it),e=/([.?@])?(.*)/.exec(n);a.push({type:1,index:i,name:e[2],strings:t,ctor:"."===e[1]?St:"?"===e[1]?Lt:"@"===e[1]?Dt:Ct})}else a.push({type:6,index:i})}for(const e of t)s.removeAttribute(e)}if(bt.test(s.tagName)){const t=s.textContent.split(it),e=t.length-1;if(e>0){s.textContent=et?et.emptyScript:"";for(let n=0;n<e;n++)s.append(t[n],lt()),Ot.nextNode(),a.push({type:2,index:++i});s.append(t[e],lt())}}}else if(8===s.nodeType)if(s.data===rt)a.push({type:2,index:i});else{let t=-1;for(;-1!==(t=s.data.indexOf(it,t+1));)a.push({type:7,index:i}),t+=it.length-1}i++}}static createElement(t,e){const n=at.createElement("template");return n.innerHTML=t,n}}function Tt(t,e,n=t,s){var i,r,o,a;if(e===At)return e;let l=void 0!==s?null===(i=n._$Co)||void 0===i?void 0:i[s]:n._$Cl;const c=ct(e)?void 0:e._$litDirective$;return(null==l?void 0:l.constructor)!==c&&(null===(r=null==l?void 0:l._$AO)||void 0===r||r.call(l,!1),void 0===c?l=void 0:(l=new c(t),l._$AT(t,n,s)),void 0!==s?(null!==(o=(a=n)._$Co)&&void 0!==o?o:a._$Co=[])[s]=l:n._$Cl=l),void 0!==l&&(e=Tt(t,l._$AS(t,e.values),l,s)),e}class kt{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){var e;const{el:{content:n},parts:s}=this._$AD,i=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:at).importNode(n,!0);Ot.currentNode=i;let r=Ot.nextNode(),o=0,a=0,l=s[0];for(;void 0!==l;){if(o===l.index){let e;2===l.type?e=new Nt(r,r.nextSibling,this,t):1===l.type?e=new l.ctor(r,l.name,l.strings,this,t):6===l.type&&(e=new Bt(r,this,t)),this._$AV.push(e),l=s[++a]}o!==(null==l?void 0:l.index)&&(r=Ot.nextNode(),o++)}return Ot.currentNode=at,i}v(t){let e=0;for(const n of this._$AV)void 0!==n&&(void 0!==n.strings?(n._$AI(t,n,e),e+=n.strings.length-2):n._$AI(t[e])),e++}}class Nt{constructor(t,e,n,s){var i;this.type=2,this._$AH=wt,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=n,this.options=s,this._$Cp=null===(i=null==s?void 0:s.isConnected)||void 0===i||i}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cp}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===(null==t?void 0:t.nodeType)&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=Tt(this,t,e),ct(t)?t===wt||null==t||""===t?(this._$AH!==wt&&this._$AR(),this._$AH=wt):t!==this._$AH&&t!==At&&this._(t):void 0!==t._$litType$?this.g(t):void 0!==t.nodeType?this.$(t):(t=>ht(t)||"function"==typeof(null==t?void 0:t[Symbol.iterator]))(t)?this.T(t):this._(t)}k(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}$(t){this._$AH!==t&&(this._$AR(),this._$AH=this.k(t))}_(t){this._$AH!==wt&&ct(this._$AH)?this._$AA.nextSibling.data=t:this.$(at.createTextNode(t)),this._$AH=t}g(t){var e;const{values:n,_$litType$:s}=t,i="number"==typeof s?this._$AC(t):(void 0===s.el&&(s.el=$t.createElement(xt(s.h,s.h[0]),this.options)),s);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===i)this._$AH.v(n);else{const t=new kt(i,this),e=t.u(this.options);t.v(n),this.$(e),this._$AH=t}}_$AC(t){let e=Et.get(t.strings);return void 0===e&&Et.set(t.strings,e=new $t(t)),e}T(t){ht(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let n,s=0;for(const i of t)s===e.length?e.push(n=new Nt(this.k(lt()),this.k(lt()),this,this.options)):n=e[s],n._$AI(i),s++;s<e.length&&(this._$AR(n&&n._$AB.nextSibling,s),e.length=s)}_$AR(t=this._$AA.nextSibling,e){var n;for(null===(n=this._$AP)||void 0===n||n.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cp=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class Ct{constructor(t,e,n,s,i){this.type=1,this._$AH=wt,this._$AN=void 0,this.element=t,this.name=e,this._$AM=s,this.options=i,n.length>2||""!==n[0]||""!==n[1]?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=wt}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,n,s){const i=this.strings;let r=!1;if(void 0===i)t=Tt(this,t,e,0),r=!ct(t)||t!==this._$AH&&t!==At,r&&(this._$AH=t);else{const s=t;let o,a;for(t=i[0],o=0;o<i.length-1;o++)a=Tt(this,s[n+o],e,o),a===At&&(a=this._$AH[o]),r||(r=!ct(a)||a!==this._$AH[o]),a===wt?t=wt:t!==wt&&(t+=(null!=a?a:"")+i[o+1]),this._$AH[o]=a}r&&!s&&this.j(t)}j(t){t===wt?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class St extends Ct{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===wt?void 0:t}}const Ft=et?et.emptyScript:"";class Lt extends Ct{constructor(){super(...arguments),this.type=4}j(t){t&&t!==wt?this.element.setAttribute(this.name,Ft):this.element.removeAttribute(this.name)}}class Dt extends Ct{constructor(t,e,n,s,i){super(t,e,n,s,i),this.type=5}_$AI(t,e=this){var n;if((t=null!==(n=Tt(this,t,e,0))&&void 0!==n?n:wt)===At)return;const s=this._$AH,i=t===wt&&s!==wt||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,r=t!==wt&&(s===wt||i);i&&this.element.removeEventListener(this.name,this,s),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,n;"function"==typeof this._$AH?this._$AH.call(null!==(n=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==n?n:this.element,t):this._$AH.handleEvent(t)}}class Bt{constructor(t,e,n){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=n}get _$AU(){return this._$AM._$AU}_$AI(t){Tt(this,t)}}const _t=tt.litHtmlPolyfillSupport;null==_t||_t($t,Nt),(null!==(Q=tt.litHtmlVersions)&&void 0!==Q?Q:tt.litHtmlVersions=[]).push("2.7.5");class jt extends X{constructor(){super(...arguments),this.onBlur=t=>{this.validateField(t.target)},this.onSubmit=t=>{var e;this.validateForm()||(t.preventDefault(),null===(e=this.firstInvalidField)||void 0===e||e.focus())},this.getRenderString=t=>{const{strings:e,values:n}=t,s=[...n,""].map((t=>"object"==typeof t?this.getRenderString(t):t));return e.reduce(((t,e,n)=>t+e+s[n]),"")}}connect(){this.element.setAttribute("novalidate","true"),this.element.addEventListener("blur",this.onBlur,!0),this.element.addEventListener("submit",this.onSubmit),this.element.addEventListener("ajax:beforeSend",this.onSubmit)}disconnect(){this.element.removeEventListener("blur",this.onBlur),this.element.removeEventListener("submit",this.onSubmit),this.element.removeEventListener("ajax:beforeSend",this.onSubmit)}validateForm(){let t=!0;for(const e of this.formFields)this.shouldValidateField(e)&&!this.validateField(e)&&(t=!1);return t}validateField(t){if(!this.shouldValidateField(t))return!0;const e=t.checkValidity();return t.classList.toggle("invalid",!e),this.refreshErrorForInvalidField(t,e),e}shouldValidateField(t){return!t.disabled&&!t.classList.contains("ProseMirror")&&!["file","reset","submit","button"].includes(t.type)}refreshErrorForInvalidField(t,e){this.removeExistingErrorMessage(t),e||this.showErrorForInvalidField(t)}removeExistingErrorMessage(t){var e;const n=t.closest(".field");if(!n)return;const s=n.querySelector(".error");s&&(null===(e=null==s?void 0:s.parentNode)||void 0===e||e.removeChild(s))}showErrorForInvalidField(t){t.insertAdjacentHTML("afterend",this.buildFieldErrorHtml(t))}buildFieldErrorHtml(t){const e=yt`<p class="error">${t.validationMessage}</p>`;return this.getRenderString(e)}get formFields(){return Array.from(this.formFieldTargets)}get firstInvalidField(){return this.formFields.find((t=>!t.checkValidity()))}}function Vt(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)}var It,Ht,Rt,Kt,Pt,Ut,Wt,qt,zt,Zt,Yt,Jt,Gt,Xt,Qt;jt.targets=["formField"],"function"==typeof SuppressedError&&SuppressedError;class te extends X{constructor(){super(...arguments),It.add(this),this.outletEventsLookup=null,this.eventRecords=new Map}getOutlets(){return null}outletUpdate(t,e){}getState(){return null}connect(){this.syncOutlets()}syncOutlets(){const t=new Event("init");this.sendToOutlets(t,{data:this.getState(),eventKey:this.getEventKey(t)})}sendToOutlets(t,e={}){var n;const s=null!==(n=e.eventKey)&&void 0!==n?n:this.getEventKey(t),i=Vt(this,It,"a",Ht);if(null==i?void 0:i.length)for(const n in i){const r=i[n];if(r.isListeningForOutletEvent(s)&&!this.hasHeardEvent(t)){const n=this.identifier===r.identifier;r.outletUpdate(t,{eventKey:s,data:n?e.data:void 0})}}}isListeningForOutletEvent(t){const e=t.split("-");if(!e.length)return!1;let n=this.outletEvents;for(let t=0;t<e.length;t++){const s=e[t];if("boolean"==typeof n)return n;let i=s;if(void 0!==n["*"])i="*";else{const t=void 0!==n.domEvent;if(t&&!this.isDOMEventName(s))return!1;t&&(i="domEvent")}if(!n[i])return!1;n=n[i]}return!0}isDOMEventName(t){return te.domEvents[t]}getEventKey(t){const e=this.event_key_prefix,n=this.event_key_postfix,s=e?"-":"",i=null!=e?e:"",r=n?"-":"",o=null!=n?n:"";return`${this.identifier}-${i}${s}${t.type}${r}${o}`}hasHeardEvent(t){return!!this.eventRecords.has(t)||(this.eventRecords.set(t,!0),setTimeout((()=>this.eventRecords.delete(t))),!1)}get event_key_prefix(){return""}get event_key_postfix(){return""}get outletEvents(){return!this.outletEventsLookup&&this.hasOutletEventsValue?this.outletEventsLookup=this.outletEventsValue.reduce(((t,e)=>{let n=t;return e.split("-").forEach(((t,e,s)=>{"boolean"!=typeof n&&(e===s.length-1?n[t]=!0:void 0===n[t]&&(n[t]={}),n=n[t])})),t}),{}):this.outletEventsLookup||(this.outletEventsLookup={"*":!0}),this.outletEventsLookup}}It=new WeakSet,Ht=function(){const t=this.getOutlets();if(t)return t;const e=[];return this.hasToggleableOutlet&&e.push(...this.toggleableOutlets),this.hasOptionsOutlet&&e.push(...this.optionsOutlets),this.hasStringMatchOutlet&&e.push(...this.stringMatchOutlets),e},te.values={outletEvents:Array},te.outlets=["toggleable","options","string-match"],te.domEvents={abort:!0,afterprint:!0,animationend:!0,animationiteration:!0,animationstart:!0,beforeprint:!0,beforeunload:!0,blur:!0,canplay:!0,canplaythrough:!0,change:!0,click:!0,contextmenu:!0,copy:!0,cut:!0,dblclick:!0,drag:!0,dragend:!0,dragenter:!0,dragleave:!0,dragover:!0,dragstart:!0,drop:!0,durationchange:!0,ended:!0,error:!0,focus:!0,focusin:!0,focusout:!0,fullscreenchange:!0,fullscreenerror:!0,hashchange:!0,input:!0,invalid:!0,keydown:!0,keypress:!0,keyup:!0,load:!0,loadeddata:!0,loadedmetadata:!0,loadstart:!0,message:!0,mousedown:!0,mouseenter:!0,mouseleave:!0,mousemove:!0,mouseover:!0,mouseout:!0,mouseup:!0,mousewheel:!0,offline:!0,online:!0,open:!0,pagehide:!0,pageshow:!0,paste:!0,pause:!0,play:!0,playing:!0,popstate:!0,progress:!0,ratechange:!0,resize:!0,reset:!0,scroll:!0,search:!0,seeked:!0,seeking:!0,select:!0,show:!0,stalled:!0,storage:!0,submit:!0,suspend:!0,timeupdate:!0,toggle:!0,touchcancel:!0,touchend:!0,touchmove:!0,touchstart:!0,transitionend:!0,unload:!0,volumechange:!0,waiting:!0,wheel:!0};class ee extends te{constructor(){super(...arguments),Rt.add(this),this.syncedAttrsLookup=null,this.antiAttrsLookup=null}getValueForElement(t){return null}getElementsToSync(){return[]}connect(){this.syncElementAttributes()}updateAttributesForElement(t,e){const n=this.getSyncedAttrsForElement(t);(null==n?void 0:n.length)&&Vt(this,Rt,"m",Wt).call(this,t,n,e);const s=this.getAntiAttrsForElement(t);(null==s?void 0:s.length)&&Vt(this,Rt,"m",Wt).call(this,t,s,!e)}getSyncedAttrsForElement(t){const e=this.getParsedAttributeForElement(t,"data-options-synced-attrs-value");return e||(this.hasSyncedAttrsValue?this.syncedAttrsValue:null)}getAntiAttrsForElement(t){const e=this.getParsedAttributeForElement(t,"data-options-anti-attrs-value");return e||(this.hasAntiAttrsValue?this.antiAttrsValue:null)}getParsedAttributeForElement(t,e){const n=t.getAttribute(e);try{if(null===n)throw new Error("Bad attr");return JSON.parse(n)}catch(t){return null}}syncElementAttributes(){var t;this.syncOutlets();const e=this.getElementsToSync();if(null==e?void 0:e.length)for(const n in e){const s=e[n],i=null!==(t=this.getValueForElement(s))&&void 0!==t&&t;this.updateAttributesForElement(s,i)}}validateAttrChange(t){const{target:e,detail:n}=t;if(e&&n){null!==this.getValueForElement(e)&&this.protectAttrsValue&&Vt(this,Rt,"m",Ut).call(this,n.attr)&&t.preventDefault()}}doesElementHaveOnAttrs(t){if(this.hasSyncedAttrsValue)for(let e=0;e<this.syncedAttrsValue.length;e++){const n=this.syncedAttrsValue[e];if("true"===t.getAttribute(n))return!0}if(this.hasAntiAttrsValue)for(let e=0;e<this.antiAttrsValue.length;e++){const n=this.antiAttrsValue[e],s=t.getAttribute(n);if("false"===s||ee.removeOnFalseAttrs[n]&&!s)return!0}return!1}}Rt=new WeakSet,Kt=function(t){var e;return null===this.syncedAttrsLookup&&(this.syncedAttrsLookup=Vt(this,Rt,"m",qt).call(this,this.syncedAttrsValue)),null!==(e=this.syncedAttrsLookup[t])&&void 0!==e&&e},Pt=function(t){var e;return null===this.antiAttrsLookup&&(this.antiAttrsLookup=Vt(this,Rt,"m",qt).call(this,this.antiAttrsValue)),null!==(e=this.antiAttrsLookup[t])&&void 0!==e&&e},Ut=function(t){return Vt(this,Rt,"m",Pt).call(this,t)||Vt(this,Rt,"m",Kt).call(this,t)},Wt=function(t,e,n){const s=JSON.stringify(n);for(const i in e){const r=e[i];this.dispatch("attrChange",{target:t,detail:{attr:r,value:n}}).defaultPrevented||("false"===s&&ee.removeOnFalseAttrs[r]?t.removeAttribute(r):t.setAttribute(r,s))}},qt=function(t){return(null==t?void 0:t.length)?t.reduce(((t,e)=>(t[e]=!0,t)),{}):{}},ee.values=Object.assign(Object.assign({},te.values),{syncedAttrs:Array,antiAttrs:Array,protectAttrs:Boolean}),ee.removeOnFalseAttrs={checked:!0};class ne extends ee{constructor(){super(...arguments),zt.add(this),this.outletUpdate=this.change}change(t,e={}){var n;const s=null!==(n=e.data)&&void 0!==n?n:t.currentTarget.value;this.keywordValue=s,Vt(this,zt,"m",Zt).call(this),this.sendToOutlets(t,Object.assign(Object.assign({},e),{data:this.keywordValue}))}getElementsToSync(){return this.matchTargets}getValueForElement(t){var e,n;return null!==(n=null===(e=t.textContent)||void 0===e?void 0:e.toLowerCase().includes(this.keywordValue.toLowerCase()))&&void 0!==n&&n}getState(){return this.keywordValue}}zt=new WeakSet,Zt=function(){if(this.hasMatchTarget){let t=!1;for(const e in this.matchTargets){const n=this.matchTargets[e],s=this.getValueForElement(n);this.updateAttributesForElement(n,s),s&&(t=!0)}this.hasEmptyTarget&&this.emptyTarget.setAttribute("aria-hidden",String(t))}},ne.outlets=ee.outlets,ne.targets=["match","empty"],ne.values=Object.assign(Object.assign({},ee.values),{keyword:String});class se extends ee{constructor(){super(...arguments),Yt.add(this),this.outletUpdate=this.select}select(t,e={}){var n;const s=e.data;for(const e in this.optionTargets){const i=this.optionTargets[e],r=i===t.currentTarget,o=null!==(n=this.getValueForElement(i))&&void 0!==n&&n,a=Vt(this,Yt,"m",Qt).call(this,i);if(void 0!==s?!!s[a]!==o:Vt(this,Yt,"m",Jt).call(this,o,r)){const t=!o;this.updateAttributesForElement(i,t),t?Vt(this,Yt,"m",Gt).call(this,a):Vt(this,Yt,"m",Xt).call(this,a)}}this.sendToOutlets(t,Object.assign(Object.assign({},e),{data:this.activeOptionsValue}))}optionTargetConnected(t){const e=Vt(this,Yt,"m",Qt).call(this,t),n=this.activeOptionsValue[e]||this.doesElementHaveOnAttrs(t);n?Vt(this,Yt,"m",Gt).call(this,e):Vt(this,Yt,"m",Xt).call(this,e),this.updateAttributesForElement(t,n)}getValueForElement(t){var e;const n=Vt(this,Yt,"m",Qt).call(this,t);return null!==(e=this.activeOptionsValue[n])&&void 0!==e&&e}getState(){return this.activeOptionsValue}}Yt=new WeakSet,Jt=function(t,e){return!(!e&&!t)&&(!(!e&&t&&this.isMultiValue)&&!(e&&t&&!this.toggleableValue))},Gt=function(t){this.activeOptionsValue=Object.assign(Object.assign({},this.activeOptionsValue),{[t]:!0})},Xt=function(t){const e=Object.assign({},this.activeOptionsValue);delete e[t],this.activeOptionsValue=e},Qt=function(t){const e=null==t?void 0:t.getAttribute("data-option-value");if(e)return e;const n=null==t?void 0:t.textContent;if(null===n)throw new Error(`${t.tagName} was given as an options target without a data-option-value or textContent. One must be provided to identify the target.`);return n.trim()},se.outlets=ee.outlets,se.targets=["option"],se.values=Object.assign(Object.assign({},ee.values),{activeOptions:Object,isMulti:{type:Boolean,default:!1},toggleable:{type:Boolean,default:!1}});class ie extends X{connect(){this.accumulate()}accumulate(){let t=0;for(const e in this.sumTargets){const n=this.sumTargets[e],s=Number(n.getAttribute(this.sumAttrValue));isNaN(s)||(t+=s)}this.setAttributesTo(t)}setAttributesTo(t){for(const e in this.syncAttrsValue){const n=this.syncAttrsValue[e];this.accumulator.setAttribute(n,t.toString())}}get accumulator(){var t;return null!==(t=this.accumulatorTarget)&&void 0!==t?t:this.element}}ie.targets=["sum","accumulator"],ie.values={syncAttrs:{type:Array,default:["aria-valuenow"]},sumAttr:{type:"string",default:"data-value"}};const re={events:["click","touchend"],onlyVisible:!0,dispatchEvent:!0,eventPrefix:!0},oe=(t,e={})=>{const n=t,{onlyVisible:s,dispatchEvent:i,events:r,eventPrefix:o}=Object.assign({},re,e),a=t=>{const r=(null==e?void 0:e.element)||n.element;if(!(r.contains(t.target)||!function(t){const e=t.getBoundingClientRect(),n=window.innerHeight||document.documentElement.clientHeight,s=window.innerWidth||document.documentElement.clientWidth,i=e.top<=n&&e.top+e.height>0,r=e.left<=s&&e.left+e.width>0;return i&&r}(r)&&s)&&(n.clickOutside&&n.clickOutside(t),i)){const e=((t,e,n)=>{let s=t;return!0===n?s=`${e.identifier}:${t}`:"string"==typeof n&&(s=`${n}:${t}`),s})("click:outside",n,o),s=((t,e,n)=>{const{bubbles:s,cancelable:i,composed:r}=e||{bubbles:!0,cancelable:!0,composed:!0};return e&&Object.assign(n,{originalEvent:e}),new CustomEvent(t,{bubbles:s,cancelable:i,composed:r,detail:n})})(e,t,{controller:n});r.dispatchEvent(s)}},l=()=>{null==r||r.forEach((t=>{window.addEventListener(t,a,!0)}))},c=()=>{null==r||r.forEach((t=>{window.removeEventListener(t,a,!0)}))},h=n.disconnect.bind(n);return Object.assign(n,{disconnect(){c(),h()}}),l(),[l,c]};(class extends X{}).debounces=[];(class extends X{}).throttles=[];class ae extends ee{constructor(){super(...arguments),this.outletUpdate=this.toggle}connect(){this.syncElementAttributes(),oe(this,{dispatchEvent:this.closeOnOutsideClickValue&&this.stateValue})}toggle(t,e={}){var n;const s=null!==(n=e.data)&&void 0!==n?n:!this.stateValue;this.updateAttributesForElement(this.element,s),this.stateValue=s,this.sendToOutlets(t,Object.assign(Object.assign({},e),{data:s}))}on(t){this.toggle(t,{data:!0})}off(t){this.toggle(t,{data:!1})}clickOutside(t){this.closeOnOutsideClickValue&&this.stateValue&&this.toggle(t,{data:!1})}getValueForElement(t){return t!==this.element?null:this.stateValue}getElementsToSync(){return[this.element]}getState(){return this.stateValue}get event_key_postfix(){return this.stateValue?"on":"off"}}ae.outlets=ee.outlets,ae.values=Object.assign(Object.assign({},ee.values),{state:{type:Boolean,default:!1},closeOnOutsideClick:{type:Boolean,default:!1}});class le extends X{toggle(){this.expandableTarget.classList.toggle("ariadne-hidden");for(const t of this.slidePanelTargets)t.classList.toggle("ariadne-hidden")}}le.targets=["expandable","expandWrapper","slidePanel","buttonWrapper"];class ce extends X{constructor(){super(...arguments),this.SELECTED_CLASSES=["ariadne-border-slate-500","ariadne-text-slate-600"],this.UNSELECTED_CLASSES=["ariadne-text-gray-500","hover:ariadne-text-gray-700","hover:ariadne-border-gray-300"]}connect(){for(const t of this.tabTargets)t.hasAttribute("aria-current")&&(t.classList.add(...this.SELECTED_CLASSES),t.classList.remove(...this.UNSELECTED_CLASSES))}toggle(t){for(const e of this.tabTargets)e===t.target?(e.setAttribute("aria-current","page"),e.classList.add(...this.SELECTED_CLASSES),e.classList.remove(...this.UNSELECTED_CLASSES)):e.hasAttribute("aria-current")&&(e.removeAttribute("aria-current"),e.classList.add(...this.UNSELECTED_CLASSES),e.classList.remove(...this.SELECTED_CLASSES))}}ce.targets=["tab"];var he="top",ue="bottom",de="right",fe="left",me="auto",pe=[he,ue,de,fe],ge="start",ve="end",be="clippingParents",ye="viewport",Ae="popper",we="reference",Ee=pe.reduce((function(t,e){return t.concat([e+"-"+ge,e+"-"+ve])}),[]),Oe=[].concat(pe,[me]).reduce((function(t,e){return t.concat([e,e+"-"+ge,e+"-"+ve])}),[]),xe=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Me(t){return t?(t.nodeName||"").toLowerCase():null}function $e(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Te(t){return t instanceof $e(t).Element||t instanceof Element}function ke(t){return t instanceof $e(t).HTMLElement||t instanceof HTMLElement}function Ne(t){return"undefined"!=typeof ShadowRoot&&(t instanceof $e(t).ShadowRoot||t instanceof ShadowRoot)}var Ce={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach((function(t){var n=e.styles[t]||{},s=e.attributes[t]||{},i=e.elements[t];ke(i)&&Me(i)&&(Object.assign(i.style,n),Object.keys(s).forEach((function(t){var e=s[t];!1===e?i.removeAttribute(t):i.setAttribute(t,!0===e?"":e)})))}))},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach((function(t){var s=e.elements[t],i=e.attributes[t]||{},r=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce((function(t,e){return t[e]="",t}),{});ke(s)&&Me(s)&&(Object.assign(s.style,r),Object.keys(i).forEach((function(t){s.removeAttribute(t)})))}))}},requires:["computeStyles"]};function Se(t){return t.split("-")[0]}var Fe=Math.max,Le=Math.min,De=Math.round;function Be(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map((function(t){return t.brand+"/"+t.version})).join(" "):navigator.userAgent}function _e(){return!/^((?!chrome|android).)*safari/i.test(Be())}function je(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var s=t.getBoundingClientRect(),i=1,r=1;e&&ke(t)&&(i=t.offsetWidth>0&&De(s.width)/t.offsetWidth||1,r=t.offsetHeight>0&&De(s.height)/t.offsetHeight||1);var o=(Te(t)?$e(t):window).visualViewport,a=!_e()&&n,l=(s.left+(a&&o?o.offsetLeft:0))/i,c=(s.top+(a&&o?o.offsetTop:0))/r,h=s.width/i,u=s.height/r;return{width:h,height:u,top:c,right:l+h,bottom:c+u,left:l,x:l,y:c}}function Ve(t){var e=je(t),n=t.offsetWidth,s=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-s)<=1&&(s=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:s}}function Ie(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ne(n)){var s=e;do{if(s&&t.isSameNode(s))return!0;s=s.parentNode||s.host}while(s)}return!1}function He(t){return $e(t).getComputedStyle(t)}function Re(t){return["table","td","th"].indexOf(Me(t))>=0}function Ke(t){return((Te(t)?t.ownerDocument:t.document)||window.document).documentElement}function Pe(t){return"html"===Me(t)?t:t.assignedSlot||t.parentNode||(Ne(t)?t.host:null)||Ke(t)}function Ue(t){return ke(t)&&"fixed"!==He(t).position?t.offsetParent:null}function We(t){for(var e=$e(t),n=Ue(t);n&&Re(n)&&"static"===He(n).position;)n=Ue(n);return n&&("html"===Me(n)||"body"===Me(n)&&"static"===He(n).position)?e:n||function(t){var e=/firefox/i.test(Be());if(/Trident/i.test(Be())&&ke(t)&&"fixed"===He(t).position)return null;var n=Pe(t);for(Ne(n)&&(n=n.host);ke(n)&&["html","body"].indexOf(Me(n))<0;){var s=He(n);if("none"!==s.transform||"none"!==s.perspective||"paint"===s.contain||-1!==["transform","perspective"].indexOf(s.willChange)||e&&"filter"===s.willChange||e&&s.filter&&"none"!==s.filter)return n;n=n.parentNode}return null}(t)||e}function qe(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function ze(t,e,n){return Fe(t,Le(e,n))}function Ze(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function Ye(t,e){return e.reduce((function(e,n){return e[n]=t,e}),{})}var Je={name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,s=t.name,i=t.options,r=n.elements.arrow,o=n.modifiersData.popperOffsets,a=Se(n.placement),l=qe(a),c=[fe,de].indexOf(a)>=0?"height":"width";if(r&&o){var h=function(t,e){return Ze("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:Ye(t,pe))}(i.padding,n),u=Ve(r),d="y"===l?he:fe,f="y"===l?ue:de,m=n.rects.reference[c]+n.rects.reference[l]-o[l]-n.rects.popper[c],p=o[l]-n.rects.reference[l],g=We(r),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,b=m/2-p/2,y=h[d],A=v-u[c]-h[f],w=v/2-u[c]/2+b,E=ze(y,w,A),O=l;n.modifiersData[s]=((e={})[O]=E,e.centerOffset=E-w,e)}},effect:function(t){var e=t.state,n=t.options.element,s=void 0===n?"[data-popper-arrow]":n;null!=s&&("string"!=typeof s||(s=e.elements.popper.querySelector(s)))&&Ie(e.elements.popper,s)&&(e.elements.arrow=s)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Ge(t){return t.split("-")[1]}var Xe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Qe(t){var e,n=t.popper,s=t.popperRect,i=t.placement,r=t.variation,o=t.offsets,a=t.position,l=t.gpuAcceleration,c=t.adaptive,h=t.roundOffsets,u=t.isFixed,d=o.x,f=void 0===d?0:d,m=o.y,p=void 0===m?0:m,g="function"==typeof h?h({x:f,y:p}):{x:f,y:p};f=g.x,p=g.y;var v=o.hasOwnProperty("x"),b=o.hasOwnProperty("y"),y=fe,A=he,w=window;if(c){var E=We(n),O="clientHeight",x="clientWidth";if(E===$e(n)&&"static"!==He(E=Ke(n)).position&&"absolute"===a&&(O="scrollHeight",x="scrollWidth"),i===he||(i===fe||i===de)&&r===ve)A=ue,p-=(u&&E===w&&w.visualViewport?w.visualViewport.height:E[O])-s.height,p*=l?1:-1;if(i===fe||(i===he||i===ue)&&r===ve)y=de,f-=(u&&E===w&&w.visualViewport?w.visualViewport.width:E[x])-s.width,f*=l?1:-1}var M,$=Object.assign({position:a},c&&Xe),T=!0===h?function(t,e){var n=t.x,s=t.y,i=e.devicePixelRatio||1;return{x:De(n*i)/i||0,y:De(s*i)/i||0}}({x:f,y:p},$e(n)):{x:f,y:p};return f=T.x,p=T.y,l?Object.assign({},$,((M={})[A]=b?"0":"",M[y]=v?"0":"",M.transform=(w.devicePixelRatio||1)<=1?"translate("+f+"px, "+p+"px)":"translate3d("+f+"px, "+p+"px, 0)",M)):Object.assign({},$,((e={})[A]=b?p+"px":"",e[y]=v?f+"px":"",e.transform="",e))}var tn={passive:!0};var en={left:"right",right:"left",bottom:"top",top:"bottom"};function nn(t){return t.replace(/left|right|bottom|top/g,(function(t){return en[t]}))}var sn={start:"end",end:"start"};function rn(t){return t.replace(/start|end/g,(function(t){return sn[t]}))}function on(t){var e=$e(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function an(t){return je(Ke(t)).left+on(t).scrollLeft}function ln(t){var e=He(t),n=e.overflow,s=e.overflowX,i=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+s)}function cn(t){return["html","body","#document"].indexOf(Me(t))>=0?t.ownerDocument.body:ke(t)&&ln(t)?t:cn(Pe(t))}function hn(t,e){var n;void 0===e&&(e=[]);var s=cn(t),i=s===(null==(n=t.ownerDocument)?void 0:n.body),r=$e(s),o=i?[r].concat(r.visualViewport||[],ln(s)?s:[]):s,a=e.concat(o);return i?a:a.concat(hn(Pe(o)))}function un(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function dn(t,e,n){return e===ye?un(function(t,e){var n=$e(t),s=Ke(t),i=n.visualViewport,r=s.clientWidth,o=s.clientHeight,a=0,l=0;if(i){r=i.width,o=i.height;var c=_e();(c||!c&&"fixed"===e)&&(a=i.offsetLeft,l=i.offsetTop)}return{width:r,height:o,x:a+an(t),y:l}}(t,n)):Te(e)?function(t,e){var n=je(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):un(function(t){var e,n=Ke(t),s=on(t),i=null==(e=t.ownerDocument)?void 0:e.body,r=Fe(n.scrollWidth,n.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Fe(n.scrollHeight,n.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),a=-s.scrollLeft+an(t),l=-s.scrollTop;return"rtl"===He(i||n).direction&&(a+=Fe(n.clientWidth,i?i.clientWidth:0)-r),{width:r,height:o,x:a,y:l}}(Ke(t)))}function fn(t,e,n,s){var i="clippingParents"===e?function(t){var e=hn(Pe(t)),n=["absolute","fixed"].indexOf(He(t).position)>=0&&ke(t)?We(t):t;return Te(n)?e.filter((function(t){return Te(t)&&Ie(t,n)&&"body"!==Me(t)})):[]}(t):[].concat(e),r=[].concat(i,[n]),o=r[0],a=r.reduce((function(e,n){var i=dn(t,n,s);return e.top=Fe(i.top,e.top),e.right=Le(i.right,e.right),e.bottom=Le(i.bottom,e.bottom),e.left=Fe(i.left,e.left),e}),dn(t,o,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function mn(t){var e,n=t.reference,s=t.element,i=t.placement,r=i?Se(i):null,o=i?Ge(i):null,a=n.x+n.width/2-s.width/2,l=n.y+n.height/2-s.height/2;switch(r){case he:e={x:a,y:n.y-s.height};break;case ue:e={x:a,y:n.y+n.height};break;case de:e={x:n.x+n.width,y:l};break;case fe:e={x:n.x-s.width,y:l};break;default:e={x:n.x,y:n.y}}var c=r?qe(r):null;if(null!=c){var h="y"===c?"height":"width";switch(o){case ge:e[c]=e[c]-(n[h]/2-s[h]/2);break;case ve:e[c]=e[c]+(n[h]/2-s[h]/2)}}return e}function pn(t,e){void 0===e&&(e={});var n=e,s=n.placement,i=void 0===s?t.placement:s,r=n.strategy,o=void 0===r?t.strategy:r,a=n.boundary,l=void 0===a?be:a,c=n.rootBoundary,h=void 0===c?ye:c,u=n.elementContext,d=void 0===u?Ae:u,f=n.altBoundary,m=void 0!==f&&f,p=n.padding,g=void 0===p?0:p,v=Ze("number"!=typeof g?g:Ye(g,pe)),b=d===Ae?we:Ae,y=t.rects.popper,A=t.elements[m?b:d],w=fn(Te(A)?A:A.contextElement||Ke(t.elements.popper),l,h,o),E=je(t.elements.reference),O=mn({reference:E,element:y,strategy:"absolute",placement:i}),x=un(Object.assign({},y,O)),M=d===Ae?x:E,$={top:w.top-M.top+v.top,bottom:M.bottom-w.bottom+v.bottom,left:w.left-M.left+v.left,right:M.right-w.right+v.right},T=t.modifiersData.offset;if(d===Ae&&T){var k=T[i];Object.keys($).forEach((function(t){var e=[de,ue].indexOf(t)>=0?1:-1,n=[he,ue].indexOf(t)>=0?"y":"x";$[t]+=k[n]*e}))}return $}function gn(t,e){void 0===e&&(e={});var n=e,s=n.placement,i=n.boundary,r=n.rootBoundary,o=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?Oe:l,h=Ge(s),u=h?a?Ee:Ee.filter((function(t){return Ge(t)===h})):pe,d=u.filter((function(t){return c.indexOf(t)>=0}));0===d.length&&(d=u);var f=d.reduce((function(e,n){return e[n]=pn(t,{placement:n,boundary:i,rootBoundary:r,padding:o})[Se(n)],e}),{});return Object.keys(f).sort((function(t,e){return f[t]-f[e]}))}var vn={name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,s=t.name;if(!e.modifiersData[s]._skip){for(var i=n.mainAxis,r=void 0===i||i,o=n.altAxis,a=void 0===o||o,l=n.fallbackPlacements,c=n.padding,h=n.boundary,u=n.rootBoundary,d=n.altBoundary,f=n.flipVariations,m=void 0===f||f,p=n.allowedAutoPlacements,g=e.options.placement,v=Se(g),b=l||(v===g||!m?[nn(g)]:function(t){if(Se(t)===me)return[];var e=nn(t);return[rn(t),e,rn(e)]}(g)),y=[g].concat(b).reduce((function(t,n){return t.concat(Se(n)===me?gn(e,{placement:n,boundary:h,rootBoundary:u,padding:c,flipVariations:m,allowedAutoPlacements:p}):n)}),[]),A=e.rects.reference,w=e.rects.popper,E=new Map,O=!0,x=y[0],M=0;M<y.length;M++){var $=y[M],T=Se($),k=Ge($)===ge,N=[he,ue].indexOf(T)>=0,C=N?"width":"height",S=pn(e,{placement:$,boundary:h,rootBoundary:u,altBoundary:d,padding:c}),F=N?k?de:fe:k?ue:he;A[C]>w[C]&&(F=nn(F));var L=nn(F),D=[];if(r&&D.push(S[T]<=0),a&&D.push(S[F]<=0,S[L]<=0),D.every((function(t){return t}))){x=$,O=!1;break}E.set($,D)}if(O)for(var B=function(t){var e=y.find((function(e){var n=E.get(e);if(n)return n.slice(0,t).every((function(t){return t}))}));if(e)return x=e,"break"},_=m?3:1;_>0;_--){if("break"===B(_))break}e.placement!==x&&(e.modifiersData[s]._skip=!0,e.placement=x,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function bn(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function yn(t){return[he,de,ue,fe].some((function(e){return t[e]>=0}))}var An={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(t){var e=t.state,n=t.options,s=t.name,i=n.offset,r=void 0===i?[0,0]:i,o=Oe.reduce((function(t,n){return t[n]=function(t,e,n){var s=Se(t),i=[fe,he].indexOf(s)>=0?-1:1,r="function"==typeof n?n(Object.assign({},e,{placement:t})):n,o=r[0],a=r[1];return o=o||0,a=(a||0)*i,[fe,de].indexOf(s)>=0?{x:a,y:o}:{x:o,y:a}}(n,e.rects,r),t}),{}),a=o[e.placement],l=a.x,c=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=l,e.modifiersData.popperOffsets.y+=c),e.modifiersData[s]=o}};var wn={name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,s=t.name,i=n.mainAxis,r=void 0===i||i,o=n.altAxis,a=void 0!==o&&o,l=n.boundary,c=n.rootBoundary,h=n.altBoundary,u=n.padding,d=n.tether,f=void 0===d||d,m=n.tetherOffset,p=void 0===m?0:m,g=pn(e,{boundary:l,rootBoundary:c,padding:u,altBoundary:h}),v=Se(e.placement),b=Ge(e.placement),y=!b,A=qe(v),w="x"===A?"y":"x",E=e.modifiersData.popperOffsets,O=e.rects.reference,x=e.rects.popper,M="function"==typeof p?p(Object.assign({},e.rects,{placement:e.placement})):p,$="number"==typeof M?{mainAxis:M,altAxis:M}:Object.assign({mainAxis:0,altAxis:0},M),T=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,k={x:0,y:0};if(E){if(r){var N,C="y"===A?he:fe,S="y"===A?ue:de,F="y"===A?"height":"width",L=E[A],D=L+g[C],B=L-g[S],_=f?-x[F]/2:0,j=b===ge?O[F]:x[F],V=b===ge?-x[F]:-O[F],I=e.elements.arrow,H=f&&I?Ve(I):{width:0,height:0},R=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},K=R[C],P=R[S],U=ze(0,O[F],H[F]),W=y?O[F]/2-_-U-K-$.mainAxis:j-U-K-$.mainAxis,q=y?-O[F]/2+_+U+P+$.mainAxis:V+U+P+$.mainAxis,z=e.elements.arrow&&We(e.elements.arrow),Z=z?"y"===A?z.clientTop||0:z.clientLeft||0:0,Y=null!=(N=null==T?void 0:T[A])?N:0,J=L+q-Y,G=ze(f?Le(D,L+W-Y-Z):D,L,f?Fe(B,J):B);E[A]=G,k[A]=G-L}if(a){var X,Q="x"===A?he:fe,tt="x"===A?ue:de,et=E[w],nt="y"===w?"height":"width",st=et+g[Q],it=et-g[tt],rt=-1!==[he,fe].indexOf(v),ot=null!=(X=null==T?void 0:T[w])?X:0,at=rt?st:et-O[nt]-x[nt]-ot+$.altAxis,lt=rt?et+O[nt]+x[nt]-ot-$.altAxis:it,ct=f&&rt?function(t,e,n){var s=ze(t,e,n);return s>n?n:s}(at,et,lt):ze(f?at:st,et,f?lt:it);E[w]=ct,k[w]=ct-et}e.modifiersData[s]=k}},requiresIfExists:["offset"]};function En(t,e,n){void 0===n&&(n=!1);var s,i,r=ke(e),o=ke(e)&&function(t){var e=t.getBoundingClientRect(),n=De(e.width)/t.offsetWidth||1,s=De(e.height)/t.offsetHeight||1;return 1!==n||1!==s}(e),a=Ke(e),l=je(t,o,n),c={scrollLeft:0,scrollTop:0},h={x:0,y:0};return(r||!r&&!n)&&(("body"!==Me(e)||ln(a))&&(c=(s=e)!==$e(s)&&ke(s)?{scrollLeft:(i=s).scrollLeft,scrollTop:i.scrollTop}:on(s)),ke(e)?((h=je(e,!0)).x+=e.clientLeft,h.y+=e.clientTop):a&&(h.x=an(a))),{x:l.left+c.scrollLeft-h.x,y:l.top+c.scrollTop-h.y,width:l.width,height:l.height}}function On(t){var e=new Map,n=new Set,s=[];function i(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach((function(t){if(!n.has(t)){var s=e.get(t);s&&i(s)}})),s.push(t)}return t.forEach((function(t){e.set(t.name,t)})),t.forEach((function(t){n.has(t.name)||i(t)})),s}var xn={placement:"bottom",modifiers:[],strategy:"absolute"};function Mn(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return!e.some((function(t){return!(t&&"function"==typeof t.getBoundingClientRect)}))}function $n(t){void 0===t&&(t={});var e=t,n=e.defaultModifiers,s=void 0===n?[]:n,i=e.defaultOptions,r=void 0===i?xn:i;return function(t,e,n){void 0===n&&(n=r);var i,o,a={placement:"bottom",orderedModifiers:[],options:Object.assign({},xn,r),modifiersData:{},elements:{reference:t,popper:e},attributes:{},styles:{}},l=[],c=!1,h={state:a,setOptions:function(n){var i="function"==typeof n?n(a.options):n;u(),a.options=Object.assign({},r,a.options,i),a.scrollParents={reference:Te(t)?hn(t):t.contextElement?hn(t.contextElement):[],popper:hn(e)};var o,c,d=function(t){var e=On(t);return xe.reduce((function(t,n){return t.concat(e.filter((function(t){return t.phase===n})))}),[])}((o=[].concat(s,a.options.modifiers),c=o.reduce((function(t,e){var n=t[e.name];return t[e.name]=n?Object.assign({},n,e,{options:Object.assign({},n.options,e.options),data:Object.assign({},n.data,e.data)}):e,t}),{}),Object.keys(c).map((function(t){return c[t]}))));return a.orderedModifiers=d.filter((function(t){return t.enabled})),a.orderedModifiers.forEach((function(t){var e=t.name,n=t.options,s=void 0===n?{}:n,i=t.effect;if("function"==typeof i){var r=i({state:a,name:e,instance:h,options:s}),o=function(){};l.push(r||o)}})),h.update()},forceUpdate:function(){if(!c){var t=a.elements,e=t.reference,n=t.popper;if(Mn(e,n)){a.rects={reference:En(e,We(n),"fixed"===a.options.strategy),popper:Ve(n)},a.reset=!1,a.placement=a.options.placement,a.orderedModifiers.forEach((function(t){return a.modifiersData[t.name]=Object.assign({},t.data)}));for(var s=0;s<a.orderedModifiers.length;s++)if(!0!==a.reset){var i=a.orderedModifiers[s],r=i.fn,o=i.options,l=void 0===o?{}:o,u=i.name;"function"==typeof r&&(a=r({state:a,options:l,name:u,instance:h})||a)}else a.reset=!1,s=-1}}},update:(i=function(){return new Promise((function(t){h.forceUpdate(),t(a)}))},function(){return o||(o=new Promise((function(t){Promise.resolve().then((function(){o=void 0,t(i())}))}))),o}),destroy:function(){u(),c=!0}};if(!Mn(t,e))return h;function u(){l.forEach((function(t){return t()})),l=[]}return h.setOptions(n).then((function(t){!c&&n.onFirstUpdate&&n.onFirstUpdate(t)})),h}}var Tn=$n({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(t){var e=t.state,n=t.instance,s=t.options,i=s.scroll,r=void 0===i||i,o=s.resize,a=void 0===o||o,l=$e(e.elements.popper),c=[].concat(e.scrollParents.reference,e.scrollParents.popper);return r&&c.forEach((function(t){t.addEventListener("scroll",n.update,tn)})),a&&l.addEventListener("resize",n.update,tn),function(){r&&c.forEach((function(t){t.removeEventListener("scroll",n.update,tn)})),a&&l.removeEventListener("resize",n.update,tn)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(t){var e=t.state,n=t.name;e.modifiersData[n]=mn({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(t){var e=t.state,n=t.options,s=n.gpuAcceleration,i=void 0===s||s,r=n.adaptive,o=void 0===r||r,a=n.roundOffsets,l=void 0===a||a,c={placement:Se(e.placement),variation:Ge(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:i,isFixed:"fixed"===e.options.strategy};null!=e.modifiersData.popperOffsets&&(e.styles.popper=Object.assign({},e.styles.popper,Qe(Object.assign({},c,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:o,roundOffsets:l})))),null!=e.modifiersData.arrow&&(e.styles.arrow=Object.assign({},e.styles.arrow,Qe(Object.assign({},c,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})},data:{}},Ce,An,vn,wn,Je,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,s=e.rects.reference,i=e.rects.popper,r=e.modifiersData.preventOverflow,o=pn(e,{elementContext:"reference"}),a=pn(e,{altBoundary:!0}),l=bn(o,s),c=bn(a,i,r),h=yn(l),u=yn(c);e.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:h,hasPopperEscaped:u},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":h,"data-popper-escaped":u})}}]});class kn extends X{connect(){this.popperInstance=Tn(this.triggerTarget,this.tooltipTarget,{placement:this.placementValue,modifiers:[{name:"offset",options:{offset:this.offsetValue}}]})}disconnect(){this.popperInstance&&this.popperInstance.destroy()}show(){this.tooltipTarget.setAttribute("data-tooltip-show",""),this.tooltipTarget.classList.remove("ariadne-invisible"),this.popperInstance.update(),this.dispatch("shown",{detail:{trigger:this.triggerTarget,tooltip:this.tooltipTarget}})}hide(){this.tooltipTarget.removeAttribute("data-tooltip-show"),this.tooltipTarget.classList.add("ariadne-invisible"),this.dispatch("ariadne-hidden",{detail:{trigger:this.triggerTarget,tooltip:this.tooltipTarget}})}}function Nn(t){return Array.from(t.querySelectorAll('[role="tablist"] [role="tab"]')).filter((e=>e instanceof HTMLElement&&e.closest(t.tagName)===t))}kn.targets=["trigger","tooltip"],kn.values={placement:{type:String,default:"top"},offset:{type:Array,default:[0,8]}};class Cn extends HTMLElement{static define(t="tab-container",e=customElements){return e.define(t,this),this}connectedCallback(){this.addEventListener("keydown",(t=>{var e;const n=t.target;if(!(n instanceof HTMLElement))return;if(n.closest(this.tagName)!==this)return;if("tab"!==n.getAttribute("role")&&!n.closest('[role="tablist"]'))return;const s=Nn(this),i=s.indexOf(s.find((t=>t.matches('[aria-selected="true"]')))),[r,o]="vertical"===(null===(e=n.closest('[role="tablist"]'))||void 0===e?void 0:e.getAttribute("aria-orientation"))?[["ArrowDown","ArrowRight"],["ArrowUp","ArrowLeft"]]:[["ArrowRight"],["ArrowLeft"]];if(r.some((e=>t.code===e))){let t=i+1;t>=s.length&&(t=0),this.selectTab(t)}else if(o.some((e=>t.code===e))){let t=i-1;t<0&&(t=s.length-1),this.selectTab(t)}else"Home"===t.code?(this.selectTab(0),t.preventDefault()):"End"===t.code&&(this.selectTab(s.length-1),t.preventDefault())})),this.addEventListener("click",(t=>{const e=Nn(this);if(!(t.target instanceof Element))return;if(t.target.closest(this.tagName)!==this)return;const n=t.target.closest('[role="tab"]');if(!(n instanceof HTMLElement&&n.closest('[role="tablist"]')))return;const s=e.indexOf(n);this.selectTab(s)}));for(const t of Nn(this))t.hasAttribute("aria-selected")||t.setAttribute("aria-selected","false"),t.hasAttribute("tabindex")||("true"===t.getAttribute("aria-selected")?t.setAttribute("tabindex","0"):t.setAttribute("tabindex","-1"))}selectTab(t){const e=Nn(this),n=Array.from(this.querySelectorAll('[role="tabpanel"]')).filter((t=>t.closest(this.tagName)===this));if(t>e.length-1)throw new RangeError(`Index "${t}" out of bounds`);const s=e[t],i=n[t];if(!!this.dispatchEvent(new CustomEvent("tab-container-change",{bubbles:!0,cancelable:!0,detail:{relatedTarget:i}}))){for(const t of e)t.setAttribute("aria-selected","false"),t.setAttribute("tabindex","-1");for(const t of n)t.hidden=!0,t.hasAttribute("tabindex")||t.hasAttribute("data-tab-container-no-tabstop")||t.setAttribute("tabindex","0");s.setAttribute("aria-selected","true"),s.setAttribute("tabindex","0"),s.focus(),i.hidden=!1,this.dispatchEvent(new CustomEvent("tab-container-changed",{bubbles:!0,detail:{relatedTarget:i}}))}}}const Sn="undefined"!=typeof globalThis?globalThis:window;try{Sn.TabContainerElement=Cn.define()}catch(nt){if(!(Sn.DOMException&&nt instanceof DOMException&&"NotSupportedError"===nt.name||nt instanceof ReferenceError))throw nt}const Fn=["ariadne-border-slate-500","ariadne-text-slate-600"],Ln=["ariadne-text-gray-500","hover:ariadne-text-gray-700","hover:ariadne-border-gray-300"];for(const t of document.getElementsByTagName("tab-container"))t.addEventListener("tab-container-change",(function(t){var e;const n=t.detail.relatedTarget,s=n.closest("tab-container").firstElementChild,i=s.querySelector('[aria-selected="true"]'),r=null===(e=n.getAttribute("id"))||void 0===e?void 0:e.split("-").slice(1).join("-"),o=s.querySelector(`#${r}`);i.classList.remove(...Fn),i.classList.add(...Ln),o.classList.add(...Fn),o.classList.remove(...Ln)}));const Dn=["second","minute","hour","day","month","year"];const Bn=/^[-+]?P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/;class _n{constructor(t=0,e=0,n=0,s=0,i=0,r=0,o=0){this.years=t,this.months=e,this.weeks=n,this.days=s,this.hours=i,this.minutes=r,this.seconds=o}abs(){return new _n(Math.abs(this.years),Math.abs(this.months),Math.abs(this.weeks),Math.abs(this.days),Math.abs(this.hours),Math.abs(this.minutes),Math.abs(this.seconds))}static from(t){var e;if("string"==typeof t){const n=String(t).trim(),s=n.startsWith("-")?-1:1,i=null===(e=n.match(Bn))||void 0===e?void 0:e.slice(1).map((t=>(Number(t)||0)*s));return i?new _n(...i):new _n}if("object"==typeof t){const{years:e,months:n,weeks:s,days:i,hours:r,minutes:o,seconds:a}=t;return new _n(e,n,s,i,r,o,a)}throw new RangeError("invalid duration")}}function jn(t,e,n){const s=function(t,e){const n=new Date(t);return n.setFullYear(n.getFullYear()+e.years),n.setMonth(n.getMonth()+e.months),n.setDate(n.getDate()+7*e.weeks+e.days),n.setHours(n.getHours()+e.hours),n.setMinutes(n.getMinutes()+e.minutes),n.setSeconds(n.getSeconds()+e.seconds),n}(t,_n.from(n).abs());return!s||Math.abs(Number(s)-Number(t))>Math.abs(Number(t)-Number(e))}var Vn,In,Hn,Rn,Kn,Pn,Un,Wn=function(t,e,n,s){if("a"===n&&!s)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!s:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?s:"a"===n?s.call(t):s?s.value:e.get(t)},qn=function(t,e,n,s,i){if("m"===s)throw new TypeError("Private method is not writable");if("a"===s&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===s?i.call(t,n):i?i.value=n:e.set(t,n),n};const zn=("undefined"!=typeof globalThis?globalThis:window).HTMLElement||null;class Zn extends Event{constructor(t,e,n,s){super("relative-time-updated",{bubbles:!0,composed:!0}),this.oldText=t,this.newText=e,this.oldTitle=n,this.newTitle=s}}function Yn(t){if(!t.date)return 1/0;if("elapsed"===t.format){const e=t.precision;if("second"===e)return 1e3;if("minute"===e)return 6e4}const e=Math.abs(Date.now()-t.date.getTime());return e<6e4?1e3:e<36e5?6e4:36e5}const Jn=new class{constructor(){this.elements=new Set,this.time=1/0,this.timer=-1}observe(t){if(this.elements.has(t))return;this.elements.add(t);const e=t.date;if(e&&e.getTime()){const e=Yn(t),n=Date.now()+e;n<this.time&&(clearTimeout(this.timer),this.timer=setTimeout((()=>this.update()),e),this.time=n)}}unobserve(t){this.elements.has(t)&&this.elements.delete(t)}update(){if(clearTimeout(this.timer),!this.elements.size)return;let t=1/0;for(const e of this.elements)t=Math.min(t,Yn(e)),e.update();this.time=Math.min(36e5,t),this.timer=setTimeout((()=>this.update()),this.time),this.time+=Date.now()}};class Gn extends zn{constructor(){super(...arguments),Vn.add(this),In.set(this,!1),Hn.set(this,!1),Kn.set(this,this.shadowRoot?this.shadowRoot:this.attachShadow?this.attachShadow({mode:"open"}):this)}static get observedAttributes(){return["second","minute","hour","weekday","day","month","year","time-zone-name","prefix","threshold","tense","precision","format","datetime","lang","title"]}get second(){const t=this.getAttribute("second");if("numeric"===t||"2-digit"===t)return t}set second(t){this.setAttribute("second",t||"")}get minute(){const t=this.getAttribute("minute");if("numeric"===t||"2-digit"===t)return t}set minute(t){this.setAttribute("minute",t||"")}get hour(){const t=this.getAttribute("hour");if("numeric"===t||"2-digit"===t)return t}set hour(t){this.setAttribute("hour",t||"")}get weekday(){const t=this.getAttribute("weekday");if("long"===t||"short"===t||"narrow"===t)return t}set weekday(t){this.setAttribute("weekday",t||"")}get day(){var t;const e=null!==(t=this.getAttribute("day"))&&void 0!==t?t:"numeric";if("numeric"===e||"2-digit"===e)return e}set day(t){this.setAttribute("day",t||"")}get month(){var t;const e=null!==(t=this.getAttribute("month"))&&void 0!==t?t:"short";if("numeric"===e||"2-digit"===e||"short"===e||"long"===e||"narrow"===e)return e}set month(t){this.setAttribute("month",t||"")}get year(){var t;const e=this.getAttribute("year");return"numeric"===e||"2-digit"===e?e:this.hasAttribute("year")||(new Date).getUTCFullYear()===(null===(t=this.date)||void 0===t?void 0:t.getUTCFullYear())?void 0:"numeric"}set year(t){this.setAttribute("day",t||"")}get timeZoneName(){const t=this.getAttribute("time-zone-name");if("long"===t||"short"===t||"shortOffset"===t||"longOffset"===t||"shortGeneric"===t||"longGeneric"===t)return t}set timeZoneName(t){this.setAttribute("time-zone-name",t||"")}get prefix(){var t;return null!==(t=this.getAttribute("prefix"))&&void 0!==t?t:"on"}set prefix(t){this.setAttribute("prefix",t)}get threshold(){const t=this.getAttribute("threshold");return t&&(e=t,Bn.test(e))?t:"P30D";var e}set threshold(t){this.setAttribute("threshold",t)}get tense(){const t=this.getAttribute("tense");return"past"===t?"past":"future"===t?"future":"auto"}set tense(t){this.setAttribute("tense",t)}get precision(){const t=this.getAttribute("precision");return Dn.includes(t)?t:"second"}set precision(t){this.setAttribute("precision",t)}get format(){const t=this.getAttribute("format");return"micro"===t?"micro":"elapsed"===t?"elapsed":"auto"}set format(t){this.setAttribute("format",t)}get datetime(){return this.getAttribute("datetime")||""}set datetime(t){this.setAttribute("datetime",t)}get date(){const t=Date.parse(this.datetime);return Number.isNaN(t)?null:new Date(t)}set date(t){this.datetime=(null==t?void 0:t.toISOString())||""}connectedCallback(){this.update()}disconnectedCallback(){Jn.unobserve(this)}attributeChangedCallback(t,e,n){e!==n&&("title"===t&&qn(this,In,null!==n&&Wn(this,Vn,"m",Pn).call(this)!==n,"f"),Wn(this,Hn,"f")||"title"===t&&Wn(this,In,"f")||qn(this,Hn,(async()=>{await Promise.resolve(),this.update()})(),"f"))}update(){const t=Wn(this,Kn,"f").textContent||"",e=this.getAttribute("title")||"";let n=e,s=t;const i=new Date;Wn(this,In,"f")||(n=Wn(this,Vn,"m",Pn).call(this)||"",n&&this.setAttribute("title",n)),s=Wn(this,Vn,"m",Un).call(this,i)||"",s?Wn(this,Kn,"f").textContent=s:this.shadowRoot===Wn(this,Kn,"f")&&this.textContent&&(Wn(this,Kn,"f").textContent=this.textContent),s===t&&n===e||this.dispatchEvent(new Zn(t,s,e,n));const r=this.date,o=this.format,a=("auto"===o||"micro"===o)&&r&&jn(i,r,this.threshold);"elapsed"===o||a?Jn.observe(this):Jn.unobserve(this),qn(this,Hn,!1,"f")}}In=new WeakMap,Hn=new WeakMap,Kn=new WeakMap,Vn=new WeakSet,Rn=function(){var t,e;return null!==(e=null===(t=this.closest("[lang]"))||void 0===t?void 0:t.getAttribute("lang"))&&void 0!==e?e:"default"},Pn=function(){const t=this.date;if(t&&"undefined"!=typeof Intl&&Intl.DateTimeFormat)return new Intl.DateTimeFormat(Wn(this,Vn,"a",Rn),{day:"numeric",month:"short",year:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}).format(t)},Un=function(t=new Date){const e=this.date;if(!e)return;const n=this.format;if("elapsed"===n){const t=Dn.indexOf(this.precision)||0,n=function(t){const e=Math.abs(t.getTime()-(new Date).getTime()),n=Math.floor(e/1e3),s=Math.floor(n/60),i=Math.floor(s/60),r=Math.floor(i/24),o=Math.floor(r/30),a=Math.floor(o/12),l=[];return a&&l.push([a,"year"]),o-12*a&&l.push([o-12*a,"month"]),r-30*o&&l.push([r-30*o,"day"]),i-24*r&&l.push([i-24*r,"hour"]),s-60*i&&l.push([s-60*i,"minute"]),n-60*s&&l.push([n-60*s,"second"]),l}(e).filter((e=>Dn.indexOf(e[1])>=t));return n.map((([t,e])=>`${t}${e[0]}`)).join(" ")||`0${this.precision[0]}`}const s=this.tense,i="micro"===n,r=t.getTime()<e.getTime(),o=jn(t,e,this.threshold),a=Wn(this,Vn,"a",Rn);if("undefined"!=typeof Intl&&Intl.RelativeTimeFormat){const t=new Intl.RelativeTimeFormat(a,{numeric:"auto"});if("past"===s||"auto"===s&&!r&&o){const[n,s]=i?function(t){const e=(new Date).getTime()-t.getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return s<1?[1,"minute"]:s<60?[s,"minute"]:i<24?[i,"hour"]:r<365?[r,"day"]:[a,"year"]}(e):function(t){const e=(new Date).getTime()-t.getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return e<0||n<10?[0,"second"]:n<45?[-n,"second"]:n<90||s<45?[-s,"minute"]:s<90||i<24?[-i,"hour"]:i<36||r<30?[-r,"day"]:o<18?[-o,"month"]:[-a,"year"]}(e);return i?`${n}${s[0]}`:t.format(n,s)}if("future"===s||"auto"===s&&r&&o){const[n,s]=i?function(t){const e=t.getTime()-(new Date).getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return r>=365?[a,"year"]:i>=24?[r,"day"]:s>=60?[i,"hour"]:s>1?[s,"minute"]:[1,"minute"]}(e):function(t){const e=t.getTime()-(new Date).getTime(),n=Math.round(e/1e3),s=Math.round(n/60),i=Math.round(s/60),r=Math.round(i/24),o=Math.round(r/30),a=Math.round(o/12);return o>=18||o>=12?[a,"year"]:r>=45||r>=30?[o,"month"]:i>=36||i>=24?[r,"day"]:s>=90||s>=45?[i,"hour"]:n>=90||n>=45?[s,"minute"]:n>=10?[n,"second"]:[0,"second"]}(e);return i?`${n}${s[0]}`:t.format(n,s)}}if("undefined"==typeof Intl||!Intl.DateTimeFormat)return;const l=new Intl.DateTimeFormat(a,{second:this.second,minute:this.minute,hour:this.hour,weekday:this.weekday,day:this.day,month:this.month,year:this.year,timeZoneName:this.timeZoneName});return`${this.prefix} ${l.format(e)}`.trim()};const Xn="undefined"!=typeof globalThis?globalThis:window;try{customElements.define("relative-time",Gn),Xn.RelativeTimeElement=Gn}catch(nt){if(!(Xn.DOMException&&nt instanceof DOMException&&"NotSupportedError"===nt.name||nt instanceof ReferenceError))throw nt}const Qn=class{constructor(t=document.documentElement,s=P){this.logger=console,this.debug=!1,this.logDebugActivity=(t,e,n={})=>{this.debug&&this.logFormattedMessage(t,e,n)},this.element=t,this.schema=s,this.dispatcher=new e(this),this.router=new K(this),this.actionDescriptorFilters=Object.assign({},n)}static start(t,e){const n=new this(t,e);return n.start(),n}async start(){await new Promise((t=>{"loading"==document.readyState?document.addEventListener("DOMContentLoaded",(()=>t())):t()})),this.logDebugActivity("application","starting"),this.dispatcher.start(),this.router.start(),this.logDebugActivity("application","start")}stop(){this.logDebugActivity("application","stopping"),this.dispatcher.stop(),this.router.stop(),this.logDebugActivity("application","stop")}register(t,e){this.load({identifier:t,controllerConstructor:e})}registerActionOption(t,e){this.actionDescriptorFilters[t]=e}load(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>{t.controllerConstructor.shouldLoad&&this.router.loadDefinition(t)}))}unload(t,...e){(Array.isArray(t)?t:[t,...e]).forEach((t=>this.router.unloadIdentifier(t)))}get controllers(){return this.router.contexts.map((t=>t.controller))}getControllerForElementAndIdentifier(t,e){const n=this.router.getContextForElementAndIdentifier(t,e);return n?n.controller:null}handleError(t,e,n){var s;this.logger.error("%s\n\n%o\n\n%o",e,t,n),null===(s=window.onerror)||void 0===s||s.call(window,e,"",0,0,t)}logFormattedMessage(t,e,n={}){n=Object.assign({application:this},n),this.logger.groupCollapsed(`${t} #${e}`),this.logger.log("details:",Object.assign({},n)),this.logger.groupEnd()}}.start();Qn.register("clipboard-copy-component",class extends X{copy(){const t=this.element.attributes.getNamedItem("value"),e=this.element.attributes.getNamedItem("for");if(t)navigator.clipboard.writeText(t.value);else if(e){const t=document.getElementById(e.value);navigator.clipboard.writeText((null==t?void 0:t.textContent)||"")}else navigator.clipboard.writeText(this.element.textContent||"")}}),Qn.register("ariadne-form",jt),Qn.register("slideover-component",le),Qn.register("tab-nav-component",ce),Qn.register("tooltip-component",kn),Qn.register("toggleable",ae),Qn.register("accumulator",ie),Qn.register("options",se),Qn.register("string-match",ne),Qn.register("events",class extends X{stopPropagation(t){t.stopPropagation()}});
8
+ //# sourceMappingURL=ariadne_view_components.js.map