@phatvu/web-component-poc 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/dist/cjs/fast-button_6.cjs.entry.js +578 -0
  2. package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
  3. package/dist/cjs/{index-B2BTpdbN.js → index-227GpI8K.js} +66 -2
  4. package/dist/cjs/job-card.cjs.entry.js +1 -1
  5. package/dist/cjs/loader.cjs.js +2 -2
  6. package/dist/cjs/web-component-poc.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +4 -1
  8. package/dist/collection/components/button/button.css +14 -14
  9. package/dist/collection/components/button/button.js +12 -24
  10. package/dist/collection/components/fast-form/fast-form.css +5 -0
  11. package/dist/collection/components/fast-form/fast-form.js +99 -0
  12. package/dist/collection/components/fast-input/fast-input.css +45 -0
  13. package/dist/collection/components/fast-input/fast-input.js +359 -0
  14. package/dist/collection/components/jobs-list-only/jobs-list-only.js +180 -3
  15. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
  16. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
  17. package/dist/components/fast-button.js +1 -1
  18. package/dist/components/fast-carousel.js +1 -1
  19. package/dist/components/fast-form.d.ts +11 -0
  20. package/dist/components/fast-form.js +1 -0
  21. package/dist/components/fast-input.d.ts +11 -0
  22. package/dist/components/fast-input.js +1 -0
  23. package/dist/components/index.js +1 -1
  24. package/dist/components/job-card.js +1 -1
  25. package/dist/components/jobs-item.js +1 -1
  26. package/dist/components/jobs-list-only.js +1 -1
  27. package/dist/components/jobs-list-reactive.d.ts +11 -0
  28. package/dist/components/jobs-list-reactive.js +1 -0
  29. package/dist/components/p-Bb27ylcX.js +1 -0
  30. package/dist/components/{p-ClQDwJJB.js → p-CzgtwPsc.js} +1 -1
  31. package/dist/esm/fast-button_6.entry.js +571 -0
  32. package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
  33. package/dist/esm/{index-Dk5CvWmb.js → index-BqjrT3zA.js} +66 -2
  34. package/dist/esm/job-card.entry.js +1 -1
  35. package/dist/esm/loader.js +3 -3
  36. package/dist/esm/web-component-poc.js +3 -3
  37. package/dist/types/components/button/button.d.ts +1 -13
  38. package/dist/types/components/fast-form/fast-form.d.ts +10 -0
  39. package/dist/types/components/fast-input/fast-input.d.ts +35 -0
  40. package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +22 -0
  41. package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
  42. package/dist/types/components.d.ts +256 -11
  43. package/dist/web-component-poc/{p-52c85341.entry.js → p-14247159.entry.js} +1 -1
  44. package/dist/web-component-poc/p-309a490b.entry.js +1 -0
  45. package/dist/web-component-poc/p-7ea9a87f.entry.js +1 -0
  46. package/dist/web-component-poc/{p-Dk5CvWmb.js → p-BqjrT3zA.js} +2 -2
  47. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  48. package/hydrate/index.js +457 -27
  49. package/hydrate/index.mjs +457 -27
  50. package/package.json +7 -3
  51. package/dist/components/p-UM9TUfe3.js +0 -1
  52. package/dist/web-component-poc/p-96761988.entry.js +0 -1
@@ -25,16 +25,84 @@ export class JobsListOnly {
25
25
  enableKilometers = false;
26
26
  /** Extra CSS class on the root element (avoid prop name "class" / "classname" reserved). */
27
27
  rootClass = '';
28
+ /** Template string for count display. Tokens: {count} = jobs on page, {total} = total from API. */
29
+ showCountText = '';
28
30
  showSuggestions = false;
29
31
  clearResultSuggestionsTitleText = 'Suggestions';
30
32
  clearResultSuggestionsLine1 = 'Try different keywords';
31
33
  clearResultSuggestionsLine2 = 'Make sure everything is spelled correctly';
32
34
  clearResultSuggestionsLine3 = 'Try other locations';
33
35
  clearResultSuggestionsLine4 = '';
36
+ /** When true, component manages its own data fetching */
37
+ autoFetch = false;
38
+ /** Jobs search endpoint */
39
+ apiUrl = '/api/get-jobs';
40
+ /** Comma-separated URL param names to watch and forward to the API */
41
+ watchParams = 'keyword';
42
+ fetchedJobs = [];
43
+ fetchedTotal = 0;
44
+ fetchLoading = false;
45
+ fetchComplete;
46
+ searchExecutedHandler;
47
+ popstateHandler;
48
+ connectedCallback() {
49
+ if (this.autoFetch) {
50
+ this.fetchJobs();
51
+ this.searchExecutedHandler = () => this.fetchJobs();
52
+ this.popstateHandler = () => this.fetchJobs();
53
+ document.addEventListener('search-executed', this.searchExecutedHandler);
54
+ window.addEventListener('popstate', this.popstateHandler);
55
+ }
56
+ }
57
+ disconnectedCallback() {
58
+ if (this.autoFetch) {
59
+ document.removeEventListener('search-executed', this.searchExecutedHandler);
60
+ window.removeEventListener('popstate', this.popstateHandler);
61
+ }
62
+ }
63
+ async fetchJobs() {
64
+ this.fetchLoading = true;
65
+ const params = new URLSearchParams(window.location.search);
66
+ const watchList = this.watchParams.split(',').map(p => p.trim()).filter(Boolean);
67
+ const query = new URLSearchParams();
68
+ for (const key of watchList) {
69
+ const val = params.get(key);
70
+ if (val !== null)
71
+ query.set(key, val);
72
+ }
73
+ const url = `${this.apiUrl}?${query.toString()}`;
74
+ try {
75
+ const res = await fetch(url, {
76
+ method: 'POST',
77
+ headers: { 'Content-Type': 'application/json' },
78
+ body: JSON.stringify({ disable_switch_search_mode: false }),
79
+ });
80
+ if (!res.ok)
81
+ throw new Error('fetch failed');
82
+ const data = await res.json();
83
+ this.fetchedJobs = data.jobs;
84
+ this.fetchedTotal = data.totalJob;
85
+ this.fetchComplete.emit({ jobs: data.jobs, totalJob: data.totalJob });
86
+ }
87
+ catch {
88
+ // preserve stale data, just stop loading
89
+ }
90
+ finally {
91
+ this.fetchLoading = false;
92
+ }
93
+ }
94
+ renderCountText(count, total) {
95
+ return this.showCountText
96
+ .replace('{count}', String(count))
97
+ .replace('{total}', String(total));
98
+ }
34
99
  getJobsArray() {
35
100
  if (this.mockData) {
36
101
  return mockJobsListOnly;
37
102
  }
103
+ if (this.autoFetch) {
104
+ return this.fetchedJobs;
105
+ }
38
106
  const j = this.jobs;
39
107
  if (Array.isArray(j))
40
108
  return j;
@@ -54,11 +122,15 @@ export class JobsListOnly {
54
122
  }
55
123
  render() {
56
124
  const jobsArray = this.getJobsArray();
57
- const loading = this.mockData ? false : this.loading;
58
- const totalJob = this.mockData ? jobsArray.length : (this.totalJob || jobsArray.length);
125
+ const loading = this.mockData ? false : (this.autoFetch ? this.fetchLoading : this.loading);
126
+ const totalJob = this.mockData
127
+ ? jobsArray.length
128
+ : this.autoFetch
129
+ ? this.fetchedTotal
130
+ : (this.totalJob || jobsArray.length);
59
131
  const showNoResults = !loading && totalJob === 0 && !this.showSuggestions;
60
132
  const showSuggestionsBlock = !loading && totalJob === 0 && this.showSuggestions;
61
- return (h("div", { key: 'c22b59e35668df06633c8c11ae8a51b463e06b19', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: 'e2b5b1bf68b75dd958b906c18c258faa8f4e1e25', class: "results-container" }, h("div", { key: '923d2402d2951d9de47a69c5fd87a80fda382b6e', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && (h("div", { key: '000c2c2d512f1b48999d628a2517701fc061dd11', class: "card" }, h("ul", { key: '7028fc4f1b007eb9ff9bc205201af986c6d0a9ae', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '4f567c7ddbf7d393469886ce3b4865dcb9f4e761', class: "share-jobs__no-results" }, h("h2", { key: '5f1ae77afeca0c37183dc681a9cc42eebaf0e510' }, this.noResultsLine1), h("h3", { key: '6f8a754181cabf1befc6a9a4cf811417075af918' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: 'a09cc45fbed615bb8672f8e77c2a8793efec2dc5', class: "card primary-color" }, h("h4", { key: '9e53bb60ec086f42845d90c807dbd1cb6a88721d', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: '0769ebd6367255dad56e688cd36a65cc41f1f366', class: "results-list front" }, h("li", { key: '7032fc1d77ca040be7d2c949c7bc755c62ef4df3', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: '49e0c6d4cad62448abc42124708472d8c268c7d9', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: 'ad76dbdad20e8de716613baa2bd1e745b6749fa7', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: 'b141b94ceeacd5de8fd430cc9e5e05063953130a', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
133
+ return (h("div", { key: '1974ecb7e1ded8237d851560fc4b20dd63b4e941', class: `jobs-list-root ${this.rootClass}`.trim() }, h("div", { key: '3d80283e8508cbe9ec4aa4516a6f832479374e08', class: "results-container" }, this.autoFetch && this.fetchLoading && (h("div", { key: 'c5d3c5362a10ce2442925093118d3436227e8058', class: "jobs-list-only__loading" }, "Loading...")), h("div", { key: 'c68e5aebee17cce16947029031b63364ab25ecda', class: loading ? 'loader' : 'loader hide', "aria-hidden": !loading }), totalJob > 0 && this.showCountText && (h("p", { key: 'e353fa146040fed1aed050ed3ed833903efcdf41', class: "jobs-list-only__count" }, this.renderCountText(jobsArray.length, totalJob))), totalJob > 0 && (h("div", { key: 'e38346f641a1e776a7e70525bf8f3a6a38b6eea5', class: "card" }, h("ul", { key: 'db82d99df76e33ad6041d4ec8dd7908cdf8b89d7', class: "results-list front" }, jobsArray.map((job, index) => this.renderJobItem(job, index))))), showNoResults && (h("div", { key: '8bd8f45ddb9fcd534c7f386919c1e6cd7a4fb6f3', class: "share-jobs__no-results" }, h("h2", { key: '228d32e9dd38f61bcec9f522d3bc4207e17b5365' }, this.noResultsLine1), h("h3", { key: '4289b10974936669a00afba6f1d55e33874198b1' }, this.noResultsLine2))), showSuggestionsBlock && (h("div", { key: '949e1fe01b2db39a69729a9fbc2eebaf2ea461ba', class: "card primary-color" }, h("h4", { key: 'af3361f98987a3a19d45afc1174a99fc4174a65a', class: "result-suggestions-title" }, this.clearResultSuggestionsTitleText, ":"), h("ul", { key: 'd7b9236dbbeb9f9596d642aa588d1c1305ed658b', class: "results-list front" }, h("li", { key: '0e65c9b985e5708096c8a4b0ea1455b6696db6dd', class: "result-suggestions-line" }, this.clearResultSuggestionsLine1), h("li", { key: 'a7fe8459960af60acc81822b48436a32c0e4ad0c', class: "result-suggestions-line" }, this.clearResultSuggestionsLine2), h("li", { key: '1e41d5730de755d6b2cb9e5fbda33704816f9096', class: "result-suggestions-line" }, this.clearResultSuggestionsLine3), this.clearResultSuggestionsLine4 && (h("li", { key: '9ab1bee87135bfda9996b2c99134597475bfaecb', class: "result-suggestions-line" }, this.clearResultSuggestionsLine4))))))));
62
134
  }
63
135
  static get is() { return "jobs-list-only"; }
64
136
  static get originalStyleUrls() {
@@ -380,6 +452,26 @@ export class JobsListOnly {
380
452
  "attribute": "root-class",
381
453
  "defaultValue": "''"
382
454
  },
455
+ "showCountText": {
456
+ "type": "string",
457
+ "mutable": false,
458
+ "complexType": {
459
+ "original": "string",
460
+ "resolved": "string",
461
+ "references": {}
462
+ },
463
+ "required": false,
464
+ "optional": false,
465
+ "docs": {
466
+ "tags": [],
467
+ "text": "Template string for count display. Tokens: {count} = jobs on page, {total} = total from API."
468
+ },
469
+ "getter": false,
470
+ "setter": false,
471
+ "reflect": false,
472
+ "attribute": "show-count-text",
473
+ "defaultValue": "''"
474
+ },
383
475
  "showSuggestions": {
384
476
  "type": "boolean",
385
477
  "mutable": false,
@@ -499,7 +591,92 @@ export class JobsListOnly {
499
591
  "reflect": false,
500
592
  "attribute": "clear-result-suggestions-line-4",
501
593
  "defaultValue": "''"
594
+ },
595
+ "autoFetch": {
596
+ "type": "boolean",
597
+ "mutable": false,
598
+ "complexType": {
599
+ "original": "boolean",
600
+ "resolved": "boolean",
601
+ "references": {}
602
+ },
603
+ "required": false,
604
+ "optional": false,
605
+ "docs": {
606
+ "tags": [],
607
+ "text": "When true, component manages its own data fetching"
608
+ },
609
+ "getter": false,
610
+ "setter": false,
611
+ "reflect": false,
612
+ "attribute": "auto-fetch",
613
+ "defaultValue": "false"
614
+ },
615
+ "apiUrl": {
616
+ "type": "string",
617
+ "mutable": false,
618
+ "complexType": {
619
+ "original": "string",
620
+ "resolved": "string",
621
+ "references": {}
622
+ },
623
+ "required": false,
624
+ "optional": false,
625
+ "docs": {
626
+ "tags": [],
627
+ "text": "Jobs search endpoint"
628
+ },
629
+ "getter": false,
630
+ "setter": false,
631
+ "reflect": false,
632
+ "attribute": "api-url",
633
+ "defaultValue": "'/api/get-jobs'"
634
+ },
635
+ "watchParams": {
636
+ "type": "string",
637
+ "mutable": false,
638
+ "complexType": {
639
+ "original": "string",
640
+ "resolved": "string",
641
+ "references": {}
642
+ },
643
+ "required": false,
644
+ "optional": false,
645
+ "docs": {
646
+ "tags": [],
647
+ "text": "Comma-separated URL param names to watch and forward to the API"
648
+ },
649
+ "getter": false,
650
+ "setter": false,
651
+ "reflect": false,
652
+ "attribute": "watch-params",
653
+ "defaultValue": "'keyword'"
502
654
  }
503
655
  };
504
656
  }
657
+ static get states() {
658
+ return {
659
+ "fetchedJobs": {},
660
+ "fetchedTotal": {},
661
+ "fetchLoading": {}
662
+ };
663
+ }
664
+ static get events() {
665
+ return [{
666
+ "method": "fetchComplete",
667
+ "name": "fetchComplete",
668
+ "bubbles": true,
669
+ "cancelable": true,
670
+ "composed": true,
671
+ "docs": {
672
+ "tags": [],
673
+ "text": ""
674
+ },
675
+ "complexType": {
676
+ "original": "{ jobs: any[]; totalJob: number }",
677
+ "resolved": "{ jobs: any[]; totalJob: number; }",
678
+ "references": {}
679
+ }
680
+ }];
681
+ }
505
682
  }
@@ -0,0 +1,8 @@
1
+ jobs-list-reactive {
2
+ display: block;
3
+ }
4
+
5
+ jobs-list-reactive.loading {
6
+ opacity: 0.6;
7
+ pointer-events: none;
8
+ }
@@ -0,0 +1,203 @@
1
+ import { h } from "@stencil/core";
2
+ export class JobsListReactive {
3
+ el;
4
+ /** Jobs search endpoint */
5
+ apiUrl = '/api/get-jobs';
6
+ /** Comma-separated URL param names to watch and forward to the API */
7
+ watchParams = 'keyword,location_name';
8
+ /** CSS class added to container while fetching */
9
+ loadingClass = 'loading';
10
+ isLoading = false;
11
+ fetchComplete;
12
+ templateEl = null;
13
+ searchExecutedHandler;
14
+ popstateHandler;
15
+ connectedCallback() {
16
+ this.templateEl = this.el.querySelector('template');
17
+ this.searchExecutedHandler = () => this.fetchJobs();
18
+ this.popstateHandler = () => this.fetchJobs();
19
+ document.addEventListener('search-executed', this.searchExecutedHandler);
20
+ window.addEventListener('popstate', this.popstateHandler);
21
+ }
22
+ disconnectedCallback() {
23
+ document.removeEventListener('search-executed', this.searchExecutedHandler);
24
+ window.removeEventListener('popstate', this.popstateHandler);
25
+ }
26
+ buildQueryString() {
27
+ const urlParams = new URLSearchParams(window.location.search);
28
+ const watchList = this.watchParams.split(',').map(p => p.trim()).filter(Boolean);
29
+ const query = new URLSearchParams();
30
+ for (const key of watchList) {
31
+ const val = urlParams.get(key);
32
+ if (val !== null && val !== '') {
33
+ query.set(key, val);
34
+ }
35
+ }
36
+ return query.toString();
37
+ }
38
+ async fetchJobs() {
39
+ this.isLoading = true;
40
+ this.el.classList.add(this.loadingClass);
41
+ const queryString = this.buildQueryString();
42
+ const url = queryString ? `${this.apiUrl}?${queryString}` : this.apiUrl;
43
+ try {
44
+ const res = await fetch(url, {
45
+ method: 'POST',
46
+ headers: { 'Content-Type': 'application/json' },
47
+ body: JSON.stringify({ disable_switch_search_mode: false }),
48
+ });
49
+ if (!res.ok)
50
+ throw new Error('fetch failed');
51
+ const data = await res.json();
52
+ this.renderJobs(data.jobs);
53
+ this.updateCountElements(data.jobs.length, data.totalJob);
54
+ this.fetchComplete.emit({ jobs: data.jobs, totalJob: data.totalJob });
55
+ }
56
+ catch {
57
+ // Preserve stale data on error
58
+ }
59
+ finally {
60
+ this.isLoading = false;
61
+ this.el.classList.remove(this.loadingClass);
62
+ }
63
+ }
64
+ renderJobs(jobs) {
65
+ if (!this.templateEl)
66
+ return;
67
+ // Remove all children except the template
68
+ const children = Array.from(this.el.children);
69
+ for (const child of children) {
70
+ if (child !== this.templateEl) {
71
+ child.remove();
72
+ }
73
+ }
74
+ // Clone template and render each job
75
+ for (const job of jobs) {
76
+ const clone = this.templateEl.content.cloneNode(true);
77
+ const jobCard = clone.querySelector('job-card');
78
+ if (jobCard) {
79
+ jobCard.setAttribute('job', JSON.stringify(job));
80
+ }
81
+ this.el.appendChild(clone);
82
+ }
83
+ }
84
+ updateCountElements(count, total) {
85
+ const countEls = document.querySelectorAll('[data-job-count]');
86
+ const totalEls = document.querySelectorAll('[data-job-total]');
87
+ countEls.forEach(el => {
88
+ el.textContent = String(count);
89
+ });
90
+ totalEls.forEach(el => {
91
+ el.textContent = String(total);
92
+ });
93
+ }
94
+ render() {
95
+ return h("slot", { key: '9f3ab802e19a298a790cfb5e86a4f4888e466804' });
96
+ }
97
+ static get is() { return "jobs-list-reactive"; }
98
+ static get originalStyleUrls() {
99
+ return {
100
+ "$": ["jobs-list-reactive.css"]
101
+ };
102
+ }
103
+ static get styleUrls() {
104
+ return {
105
+ "$": ["jobs-list-reactive.css"]
106
+ };
107
+ }
108
+ static get properties() {
109
+ return {
110
+ "apiUrl": {
111
+ "type": "string",
112
+ "mutable": false,
113
+ "complexType": {
114
+ "original": "string",
115
+ "resolved": "string",
116
+ "references": {}
117
+ },
118
+ "required": false,
119
+ "optional": false,
120
+ "docs": {
121
+ "tags": [],
122
+ "text": "Jobs search endpoint"
123
+ },
124
+ "getter": false,
125
+ "setter": false,
126
+ "reflect": false,
127
+ "attribute": "api-url",
128
+ "defaultValue": "'/api/get-jobs'"
129
+ },
130
+ "watchParams": {
131
+ "type": "string",
132
+ "mutable": false,
133
+ "complexType": {
134
+ "original": "string",
135
+ "resolved": "string",
136
+ "references": {}
137
+ },
138
+ "required": false,
139
+ "optional": false,
140
+ "docs": {
141
+ "tags": [],
142
+ "text": "Comma-separated URL param names to watch and forward to the API"
143
+ },
144
+ "getter": false,
145
+ "setter": false,
146
+ "reflect": false,
147
+ "attribute": "watch-params",
148
+ "defaultValue": "'keyword,location_name'"
149
+ },
150
+ "loadingClass": {
151
+ "type": "string",
152
+ "mutable": false,
153
+ "complexType": {
154
+ "original": "string",
155
+ "resolved": "string",
156
+ "references": {}
157
+ },
158
+ "required": false,
159
+ "optional": false,
160
+ "docs": {
161
+ "tags": [],
162
+ "text": "CSS class added to container while fetching"
163
+ },
164
+ "getter": false,
165
+ "setter": false,
166
+ "reflect": false,
167
+ "attribute": "loading-class",
168
+ "defaultValue": "'loading'"
169
+ }
170
+ };
171
+ }
172
+ static get states() {
173
+ return {
174
+ "isLoading": {}
175
+ };
176
+ }
177
+ static get events() {
178
+ return [{
179
+ "method": "fetchComplete",
180
+ "name": "fetchComplete",
181
+ "bubbles": true,
182
+ "cancelable": true,
183
+ "composed": true,
184
+ "docs": {
185
+ "tags": [],
186
+ "text": ""
187
+ },
188
+ "complexType": {
189
+ "original": "{ jobs: Job[]; totalJob: number }",
190
+ "resolved": "{ jobs: Job[]; totalJob: number; }",
191
+ "references": {
192
+ "Job": {
193
+ "location": "import",
194
+ "path": "../../types/jobs-list",
195
+ "id": "src/types/jobs-list.ts::Job",
196
+ "referenceLocation": "Job"
197
+ }
198
+ }
199
+ }
200
+ }];
201
+ }
202
+ static get elementRef() { return "el"; }
203
+ }
@@ -1 +1 @@
1
- import{t,p as o,H as e,c as n,h as s}from"./p-UM9TUfe3.js";const u=o(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.buttonClick=n(this,"buttonClick")}variant="primary";type="button";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return s("button",{key:"3b74909afe4e305dfd38f0b07657202e3d5bfccd",type:this.type,class:{"custom-button":!0,["custom-button--"+this.variant]:!0,"custom-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},s("slot",{key:"49845d350e4665c5c66e30bd9262f788eaaa1e20"}))}static get style(){return":host{display:inline-block}.custom-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.custom-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.custom-button:focus:not(:focus-visible){outline:none}.custom-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.custom-button--primary:hover:not(.custom-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.custom-button--primary:active:not(.custom-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.custom-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.custom-button--secondary:hover:not(.custom-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.custom-button--secondary:active:not(.custom-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.custom-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.custom-button--text:hover:not(.custom-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.custom-button--text:active:not(.custom-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.custom-button--disabled,.custom-button:disabled{opacity:0.6;cursor:not-allowed}"}},[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function c(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),u))}))}c();const r=u,a=c;export{r as FastButton,a as defineCustomElement}
1
+ import{t,p as o,H as a,c as s,h as n}from"./p-Bb27ylcX.js";const e=o(class extends a{constructor(t){super(),!1!==t&&this.__registerHost(),this.buttonClick=s(this,"buttonClick")}variant="primary";type="submit";disabled=!1;buttonClick;handleClick=t=>{if(this.disabled)return t.preventDefault(),void t.stopPropagation();this.buttonClick.emit(t)};render(){return n("button",{key:"b8e811748ade97c941bdf197a311d69d2801a120",type:this.type,class:{"fast-button":!0,["fast-button--"+this.variant]:!0,"fast-button--disabled":this.disabled},disabled:this.disabled,onClick:this.handleClick},n("slot",{key:"a6b987059cc33799abd580ea11f0fe644a3973bf"}))}static get style(){return":host{display:inline-block}.fast-button{display:inline-flex;align-items:center;justify-content:center;padding:0.5rem 1rem;font-family:inherit;font-size:0.875rem;font-weight:500;line-height:1.25;border:none;border-radius:0.375rem;cursor:pointer;transition:background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease}.fast-button:focus{outline:2px solid var(--custom-button-focus-ring, #2563eb);outline-offset:2px}.fast-button:focus:not(:focus-visible){outline:none}.fast-button--primary{background-color:var(--custom-button-primary-bg, #2563eb);color:var(--custom-button-primary-color, #fff)}.fast-button--primary:hover:not(.fast-button--disabled){background-color:var(--custom-button-primary-hover-bg, #1d4ed8)}.fast-button--primary:active:not(.fast-button--disabled){background-color:var(--custom-button-primary-active-bg, #1e40af)}.fast-button--secondary{background-color:var(--custom-button-secondary-bg, #e5e7eb);color:var(--custom-button-secondary-color, #1f2937)}.fast-button--secondary:hover:not(.fast-button--disabled){background-color:var(--custom-button-secondary-hover-bg, #d1d5db)}.fast-button--secondary:active:not(.fast-button--disabled){background-color:var(--custom-button-secondary-active-bg, #9ca3af)}.fast-button--text{background-color:transparent;color:var(--custom-button-text-color, #2563eb)}.fast-button--text:hover:not(.fast-button--disabled){background-color:var(--custom-button-text-hover-bg, rgba(37, 99, 235, 0.08))}.fast-button--text:active:not(.fast-button--disabled){background-color:var(--custom-button-text-active-bg, rgba(37, 99, 235, 0.12))}.fast-button--disabled,.fast-button:disabled{opacity:0.6;cursor:not-allowed}"}},[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]);function r(){"undefined"!=typeof customElements&&["fast-button"].forEach((o=>{"fast-button"===o&&(customElements.get(t(o))||customElements.define(t(o),e))}))}r();const b=e,u=r;export{b as FastButton,u as defineCustomElement}
@@ -1 +1 @@
1
- import{t as n,p as t,H as e,h as o}from"./p-UM9TUfe3.js";function r(n){return"number"==typeof n}function i(n){return"string"==typeof n}function s(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function l(n){return Math.sign(n)}function a(n,t){return u(n-t)}function d(n){return m(n).map(Number)}function f(n){return n[h(n)]}function h(n){return Math.max(0,n.length-1)}function p(n,t){return t===h(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function m(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(m(t).forEach((e=>{const o=n[e],r=t[e],i=c(o)&&c(r);n[e]=i?b(o,r):r})),n)),{})}function y(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function v(){let n=[];const t={add:function(e,o,r,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(o,r,i),s=()=>e.removeEventListener(o,r,i);else{const n=e;n.addListener(r),s=()=>n.removeListener(r)}return n.push(s),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n=0,t=0){const e=u(n-t);function o(t){return t<n}function r(n){return n>t}function i(n){return o(n)||r(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?o(e)?n:t:e},reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function _(n,t,e){const{constrain:o}=x(0,n),r=n+1;let i=s(t);function s(n){return e?u((r+n)%r):o(n)}function c(){return i}function l(){return _(n,c(),e)}const a={get:c,set:function(n){return i=s(n),a},add:function(n){return l().set(c()+n)},clone:l};return a}function k(n,t,e,o,r,i,c,d,f,h,p,g,m,b,_,k,w,S,C){const{cross:E,direction:L}=n,M=["INPUT","SELECT","TEXTAREA"],T={passive:!1},I=v(),A=v(),N=x(50,225).constrain(b.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},O=_?43:25;let j=!1,B=0,F=0,D=!1,P=!1,H=!1,G=!1;function V(n){if(!y(n,o)&&n.touches.length>=2)return U(n);const t=i.readPoint(n),e=i.readPoint(n,E),s=a(t,B),c=a(e,F);if(!P&&!G){if(!n.cancelable)return U(n);if(P=s>c,!P)return U(n)}const u=i.pointerMove(n);s>k&&(H=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(L(u)),n.preventDefault()}function U(n){const t=p.byDistance(0,!1).index!==g.get(),e=i.pointerUp(n)*(_?z:R)[G?"mouse":"touch"],o=function(n,t){const e=g.add(-1*l(n)),o=p.byDistance(n,!_).distance;return _||u(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(L(e),t),r=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(e,o),s=O-10*r,c=S+r/50;P=!1,D=!1,A.clear(),h.useDuration(s).useFriction(c),f.distance(o,!_),G=!1,m.emit("pointerUp")}function W(n){H&&(n.stopPropagation(),n.preventDefault(),H=!1)}return{init:function(n){if(!C)return;function u(u){(s(C)||C(n,u))&&function(n){const s=y(n,o);G=s,H=_&&s&&!n.buttons&&j,j=a(r.get(),c.get())>=2,s&&0!==n.button||function(n){return M.includes(n.nodeName||"")}(n.target)||(D=!0,i.pointerDown(n),h.useFriction(0).useDuration(0),r.set(c),function(){const n=G?e:t;A.add(n,"touchmove",V,T).add(n,"touchend",U).add(n,"mousemove",V,T).add(n,"mouseup",U)}(),B=i.readPoint(n),F=i.readPoint(n,E),m.emit("pointerDown"))}(u)}const l=t;I.add(l,"dragstart",(n=>n.preventDefault()),T).add(l,"touchmove",(()=>{}),T).add(l,"touchend",(()=>{})).add(l,"touchstart",u).add(l,"mousedown",u).add(l,"touchcancel",U).add(l,"contextmenu",U).add(l,"click",W,!0)},destroy:function(){I.clear(),A.clear()},pointerDown:function(){return D}}}function w(n,t){let e,o;function r(n){return n.timeStamp}function i(e,o){const r="client"+("x"===(o||n.scroll)?"X":"Y");return(y(e,t)?e:e.touches[0])[r]}return{pointerDown:function(n){return e=n,o=n,i(n)},pointerMove:function(n){const t=i(n)-i(o),s=r(n)-r(e)>170;return o=n,s&&(e=n),t},pointerUp:function(n){if(!e||!o)return 0;const t=i(o)-i(e),s=r(n)-r(e),c=r(n)-r(o)>170,l=t/s;return s&&!c&&u(l)>.1?l:0},readPoint:i}}function S(n,t,e,o,r,i,c){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(c.measure(n))}return{init:function(r){i&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(s(i)||i(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),c=e?d:f[s];if(u(p(e?n:o[s])-c)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function C(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),c=x(.1,.99);let l=!1;function a(){return!l&&!!n.reachedAny(e.get())&&!!n.reachedAny(t.get())}return{shouldConstrain:a,constrain:function(r){if(!a())return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),h=c.constrain(d/s);e.subtract(f*h),!r&&u(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function E(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=x(r,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const r=n*(-1*t);o.forEach((n=>n.add(r)))}}}function L(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function M(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=t.style;let r=null,i=!1;return{clear:function(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=function(n){return Math.round(100*n)/100}(n.direction(t));s!==r&&(o.transform=e(s),r=s)},toggleActive:function(n){i=!n}}}function T(n,t,e,o,r,i,s,c,u){const l=d(r),a=p(h(d(r).reverse(),s[0]),e,!1).concat(p(h(l,t-s[0]-1),-e,!0));function f(n,t){return n.reduce(((n,t)=>n-r[t]),t)}function h(n,t){return n.reduce(((n,e)=>f(n,t)>0?n.concat([e]):n),[])}function p(r,s,l){const a=function(n){return i.map(((e,r)=>({start:e-o[r]+.5+n,end:e+t-.5+n})))}(s);return r.map((t=>{const o=l?0:-e,r=l?e:0,i=a[t][l?"end":"start"];return{index:t,loopPoint:i,slideLocation:L(-1),translate:M(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return a.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){a.forEach((n=>n.translate.clear()))},loop:function(){a.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:a}}function I(n,t,e){let o,r=!1;return{init:function(i){e&&(o=new MutationObserver((n=>{r||(s(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function A(n,t,e,o,c,b,y){const{align:A,axis:N,direction:R,startIndex:z,loop:O,duration:j,dragFree:B,dragThreshold:F,inViewThreshold:D,slidesToScroll:P,skipSnaps:H,containScroll:G,watchResize:V,watchSlides:U,watchDrag:W,watchFocus:q}=b,Q={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:o,offsetHeight:r}=n;return{top:t,right:e+o,bottom:t+r,left:e,width:o,height:r}}},X=Q.measure(t),$=e.map(Q.measure),J=function(n,t){const e="rtl"===t,o="y"===n,r=!o&&e?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":e?"right":"left",endEdge:o?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return o?t:e},direction:function(n){return n*r}}}(N,R),Y=J.measureSize(X),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=function(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o,r){return i(n)?e[n](o):n(t,o,r)}}}(A,Y),nn=!O&&!!G,tn=O||!!G,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=n,a=e[0]&&r,d=a?u(t[c]-e[0][c]):0,h=function(){if(!a)return 0;const n=i.getComputedStyle(f(o));return parseFloat(n.getPropertyValue("margin-"+l))}(),g=e.map(s),m=e.map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g[t]+d:r?g[t]+h:e[t+1][c]-n[c]})).map(u);return{slideSizes:g,slideSizesWithGaps:m,startGap:d,endGap:h}}(J,X,$,e,tn,c),cn=function(n,t,e,o,i,s,c,l,a){const{startEdge:p,endEdge:g,direction:m}=n,b=r(e);return{groupSlides:function(n){return b?function(n,t){return d(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?d(n).reduce(((e,r,d)=>{const b=f(e)||0,y=0===b,v=r===h(n),x=i[p]-s[b][p],_=i[p]-s[r][g],k=!o&&y?m(c):0,w=u(_-(!o&&v?m(l):0)-(x+k));return d&&w>t+a&&e.push(r),v&&e.push(n.length),e}),[]).map(((t,e,o)=>n.slice(Math.max(o[e-1]||0),t))):[]}(n)}}}(J,Y,P,O,X,$,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=r,l=c(o).map((n=>f(n)[s]-n[0][i])).map(u).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-u(n))),d=c(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:d}}(J,Z,X,$,cn),an=-f(un)+f(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=x(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=p(e,t);return u?i:l||c(o,s)?o:c(i,s)?i:s})).map((n=>parseFloat(n.toFixed(3)))),s=function(){const n=i[0],t=f(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return a(n,t)<=1}return{snapsContained:function(){if(t<=n+2)return[r.max];if("keepSnaps"===o)return i;const{min:e,max:c}=s;return i.slice(e,c)}(),scrollContainLimit:s}}(Y,an,ln,G),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:x(e?o-n:f(t),o)}}(an,hn,O),gn=_(h(hn),z,O),mn=gn.clone(),bn=d(e),yn=function(n,t,e,o){const r=v(),i=1e3/60;let s=null,c=0,u=0;function l(n){if(!u)return;s||(s=n,e(),e());const r=n-s;for(s=n,c+=r;c>=i;)e(),c-=i;o(c/i),u&&(u=t.requestAnimationFrame(l))}function a(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){r.add(n,"visibilitychange",(()=>{n.hidden&&(s=null,c=0)}))},destroy:function(){a(),r.clear()},start:function(){u||(u=t.requestAnimationFrame(l))},stop:a,update:e,render:o}}(o,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:o}})=>{o||e.constrain(n.pointerDown()),t.seek()})(Nn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:o,previousLocation:r,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:l,scrollBounds:a,options:{loop:d}},f)=>{const h=n.settled(),p=!a.shouldConstrain(),g=d?h:h&&p,m=g&&!c.pointerDown();m&&u.stop();const b=e.get()*f+r.get()*(1-f);o.set(b),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),m&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=L(vn),_n=L(vn),kn=L(vn),wn=L(vn),Sn=function(n,t,e,o,r){let i=0,s=0,c=r,a=.68,d=n.get(),f=0;function h(n){return c=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return c},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return c?(e.set(n),i+=t/c,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=l(r),f=d,g},settled:function(){return u(o.get()-t.get())<.001},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(r)},useFriction:p,useDuration:h};return g}(xn,kn,_n,wn,j),Cn=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function a(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function d(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>l(n)===o));return i.length?a(i):f(r)-e}return{byDistance:function(e,o){const l=r.get()+e,{index:a,distance:f}=function(e){const o=n?s(e):c(e),r=t.map(((n,t)=>({diff:d(n-o,0),index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(l),h=!n&&i(l);return!o||h?{index:a,distance:e}:{index:a,distance:e+d(t[a]-f,0)}},byIndex:function(n,e){return{index:n,distance:d(t[n]-r.get(),e)}},shortcut:d}}(O,hn,an,pn,wn),En=function(n,t,e,o,r,i,s){function c(r){const c=r.distance,u=r.index!==t.get();i.add(c),c&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(r.index),s.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(yn,gn,mn,Sn,Cn,wn,y),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),Mn=v(),Tn=function(n,t,e,o){const r={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver((n=>{u||(n.forEach((n=>{const e=t.indexOf(n.target);r[e]=n})),s=null,c=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:o}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return m(r).reduce(((t,e)=>{const o=parseInt(e),{isIntersecting:i}=r[o];return(n&&i||!n&&!i)&&t.push(o),t}),[])}(n);return n&&(s=t),n||(c=t),t}}}(t,e,y,D),{slideRegistry:In}=function(n,t,e,o,r,i){const{groupSlides:s}=r,{min:c,max:u}=o;return{slideRegistry:function(){const o=s(i);return 1===e.length?[i]:n&&"keepSnaps"!==t?o.slice(c,u).map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g(f(e[0])+1):r?g(h(i)-f(e)[0]+1,f(e)[0]):n})):o}()}}(nn,G,hn,fn,cn,bn),An=function(n,t,e,o,i,c,u,l){const a={passive:!0,capture:!0};let d=0;function f(n){"Tab"===n.code&&(d=(new Date).getTime())}return{init:function(h){l&&(c.add(document,"keydown",f,!1),t.forEach(((t,f)=>{c.add(t,"focus",(t=>{(s(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const s=e.findIndex((n=>n.includes(t)));r(s)&&(i.useDuration(0),o.index(s,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,In,En,Sn,Mn,y,q),Nn={ownerDocument:o,ownerWindow:c,eventHandler:y,containerRect:X,slideRects:$,animation:yn,axis:J,dragHandler:k(J,n,o,c,wn,w(J,c),xn,yn,En,Sn,Cn,gn,y,K,B,F,H,.68,W),eventStore:Mn,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:b,resizeHandler:S(t,y,c,e,J,V,Q),scrollBody:Sn,scrollBounds:C(pn,kn,wn,Sn,K),scrollLooper:E(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:Ln,scrollSnapList:hn.map(Ln.get),scrollSnaps:hn,scrollTarget:Cn,scrollTo:En,slideLooper:T(J,Y,an,en,on,un,hn,kn,e),slideFocus:An,slidesHandler:I(t,y,U),slidesInView:Tn,slideIndexes:bn,slideRegistry:In,slidesToScroll:cn,target:wn,translate:M(J,t)};return Nn}const N={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function R(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=m(o).filter((t=>n.matchMedia(t).matches)).map((n=>o[n])).reduce(((n,e)=>t(n,e)),{});return t(e,r)},optionsMediaQueries:function(t){return t.map((n=>m(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function z(n,t,e){const o=n.ownerDocument,r=o.defaultView,s=R(r),c=function(n){let t=[];return{init:function(e,o){return t=o.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),o.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(s),u=v(),l=function(){let n,t={};function e(n){return t[n]||[]}const o={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),o},off:function(n,r){return t[n]=e(n).filter((n=>n!==r)),o},on:function(n,r){return t[n]=e(n).concat([r]),o},clear:function(){t={}}};return o}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:p,emit:g}=l,m=M;let b,y,x,_,k=!1,w=a(N,z.globalOptions),S=a(w),C=[];function E(t){const e=A(n,x,_,o,r,t,l);return t.loop&&!e.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):e}function L(t,e){k||(w=a(w,t),S=d(w),C=e||C,function(){const{container:t,slides:e}=S,o=i(t)?n.querySelector(t):t;x=o||n.children[0];const r=i(e)?x.querySelectorAll(e):e;_=[].slice.call(r||x.children)}(),b=E(S),f([w,...C.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",M))),S.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(j),b.eventHandler.init(j),b.resizeHandler.init(j),b.slidesHandler.init(j),b.options.loop&&b.slideLooper.loop(),x.offsetParent&&_.length&&b.dragHandler.init(j),y=c.init(j,C)))}function M(n,t){const e=O();T(),L(a({startIndex:e},n),t),l.emit("reInit")}function T(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),c.destroy(),u.clear()}function I(n,t,e){S.active&&!k&&(b.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),b.scrollTo.index(n,e||0))}function O(){return b.index.get()}const j={canScrollNext:function(){return b.index.add(1).get()!==O()},canScrollPrev:function(){return b.index.add(-1).get()!==O()},containerNode:function(){return x},internalEngine:function(){return b},destroy:function(){k||(k=!0,u.clear(),T(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return y},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:m,rootNode:function(){return n},scrollNext:function(n){I(b.index.add(1).get(),n,-1)},scrollPrev:function(n){I(b.index.add(-1).get(),n,1)},scrollProgress:function(){return b.scrollProgress.get(b.offsetLocation.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:I,selectedScrollSnap:O,slideNodes:function(){return _},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return L(t,e),setTimeout((()=>l.emit("init")),0),j}z.globalOptions=void 0;const O=t(class extends e{constructor(n){super(),!1!==n&&this.__registerHost()}get el(){return this}items;loop=!0;class;controlClass;slideClass;itemClass;viewportRef;containerRef;slotRef;prevBtnRef;nextBtnRef;dotsRef;embla=null;movedNodes=[];prevClickHandler=null;nextClickHandler=null;dotClickHandlers=[];slotNodesMoved=!1;async scrollPrev(){this.embla?.scrollPrev()}async scrollNext(){this.embla?.scrollNext()}async goToSlide(n){this.embla?.scrollTo(n)}async getEmbla(){return this.embla}moveSlotNodesIntoContainer(){if(!this.slotRef||!this.containerRef||this.slotNodesMoved)return;const n=this.slotRef.assignedNodes().filter((n=>n.nodeType===Node.ELEMENT_NODE));0!==n.length&&(this.movedNodes=[],n.forEach((n=>{this.containerRef.appendChild(n),this.movedNodes.push(n)})),this.slotNodesMoved=!0,this.scheduleEmblaInit())}initScheduled=!1;scheduleEmblaInit(){this.initScheduled||(this.initScheduled=!0,requestAnimationFrame((()=>{this.initScheduled=!1,this.destroyEmbla(),this.initEmbla()})))}moveSlotNodesBack(){const n=this.el;this.movedNodes.forEach((t=>n.appendChild(t))),this.movedNodes=[]}initEmbla(){if(!this.viewportRef||!this.containerRef)return;const n=this.getItemsArray();if(!(void 0!==n?n.length>0:this.containerRef.children.length>0))return;this.embla=z(this.viewportRef,{loop:this.loop,align:"center",containScroll:"trimSnaps"});const t=this.prevBtnRef,e=this.nextBtnRef,o=this.dotsRef,r=()=>{t&&(this.embla?.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","")),e&&(this.embla?.canScrollNext()?e.removeAttribute("disabled"):e.setAttribute("disabled",""))};if(this.embla.on("init",r),this.embla.on("reInit",r),this.embla.on("select",r),t&&e&&(this.prevClickHandler=()=>this.embla?.scrollPrev(),this.nextClickHandler=()=>this.embla?.scrollNext(),t.addEventListener("click",this.prevClickHandler),e.addEventListener("click",this.nextClickHandler)),o){const n=this.embla.scrollSnapList().length;o.innerHTML="";for(let t=0;t<n;t++){const n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Go to slide "+(t+1)),n.className="carousel__dot",0===t&&n.classList.add("current");const e=document.createElement("div");e.className="carousel__dot-inner",n.appendChild(e);const r=t,i=()=>this.embla?.scrollTo(r);this.dotClickHandlers.push(i),n.addEventListener("click",i),o.appendChild(n)}this.embla.on("select",(()=>{const n=this.embla?.selectedScrollSnap()??0;o.querySelectorAll("button").forEach(((t,e)=>{t.classList.toggle("current",e===n)}))}))}r()}destroyEmbla(){this.prevBtnRef&&this.prevClickHandler&&(this.prevBtnRef.removeEventListener("click",this.prevClickHandler),this.prevClickHandler=null),this.nextBtnRef&&this.nextClickHandler&&(this.nextBtnRef.removeEventListener("click",this.nextClickHandler),this.nextClickHandler=null),this.dotClickHandlers=[],this.dotsRef&&(this.dotsRef.innerHTML=""),this.embla?.destroy(),this.embla=null}onSlotChange=()=>{void 0===this.getItemsArray()&&this.moveSlotNodesIntoContainer()};componentDidRender(){void 0===this.getItemsArray()?(this.slotRef&&(this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.slotRef.addEventListener("slotchange",this.onSlotChange)),requestAnimationFrame((()=>{this.moveSlotNodesIntoContainer(),this.slotNodesMoved||(this.destroyEmbla(),this.initEmbla())}))):(this.destroyEmbla(),this.initEmbla())}disconnectedCallback(){this.slotRef&&this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.destroyEmbla(),void 0===this.getItemsArray()&&(this.moveSlotNodesBack(),this.slotNodesMoved=!1)}getItemsArray(){if(void 0!==this.items){if(Array.isArray(this.items))return this.items;if("string"==typeof this.items)try{const n=JSON.parse(this.items);return Array.isArray(n)?n:void 0}catch{return}}}render(){const n=this.getItemsArray(),t=void 0!==n&&n.length>0;return o("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:("carousel "+(this.class||"")).trim()},o("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:("carousel__viewport "+(this.slideClass||"")).trim(),ref:n=>this.viewportRef=n},o("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>o("div",{key:t,class:("carousel__slide "+(this.itemClass||"")).trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:n+""))):null)),!t&&o("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},o("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),o("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:("carousel__controls "+(this.controlClass||"")).trim()},o("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},o("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),o("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),o("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},o("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}static get style(){return":host{display:block}.carousel{display:flex;flex-direction:column;overflow:hidden}.carousel__viewport{overflow:hidden;touch-action:pan-y pinch-zoom}.carousel__container{display:flex;flex-direction:row;height:100%;margin-left:calc(-0.4rem)}.carousel__container ::slotted(*){flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__slide{flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__controls{display:flex;gap:0.25rem;margin-top:0.25rem;justify-content:center;align-items:center}.carousel__prev,.carousel__next{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:currentColor}.carousel__prev:disabled,.carousel__next:disabled{opacity:0.4;cursor:not-allowed}.carousel__icon{width:2.4rem;height:2.4rem}.carousel__dots{display:flex;gap:0.25rem;align-items:center}.carousel__dot{padding:0;border:none;background:none;cursor:pointer;width:0.5rem;height:0.5rem;display:flex;align-items:center;justify-content:center}.carousel__dot-inner{width:100%;height:100%;border-radius:50%;background-color:var(--carousel-dot-bg, #cbd5e1);transition:background-color 0.2s ease}.carousel__dot.current .carousel__dot-inner{background-color:var(--carousel-dot-active-bg, #94a3b8)}"}},[772,"fast-carousel",{items:[1],loop:[4],class:[1],controlClass:[1,"control-class"],slideClass:[1,"slide-class"],itemClass:[1,"item-class"],scrollPrev:[64],scrollNext:[64],goToSlide:[64],getEmbla:[64]}]);function j(){"undefined"!=typeof customElements&&["fast-carousel"].forEach((t=>{"fast-carousel"===t&&(customElements.get(n(t))||customElements.define(n(t),O))}))}j();const B=O,F=j;export{B as FastCarousel,F as defineCustomElement}
1
+ import{t as n,p as t,H as e,h as o}from"./p-Bb27ylcX.js";function r(n){return"number"==typeof n}function i(n){return"string"==typeof n}function s(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function l(n){return Math.sign(n)}function a(n,t){return u(n-t)}function d(n){return m(n).map(Number)}function f(n){return n[h(n)]}function h(n){return Math.max(0,n.length-1)}function p(n,t){return t===h(n)}function g(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function m(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(m(t).forEach((e=>{const o=n[e],r=t[e],i=c(o)&&c(r);n[e]=i?b(o,r):r})),n)),{})}function y(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function v(){let n=[];const t={add:function(e,o,r,i={passive:!0}){let s;if("addEventListener"in e)e.addEventListener(o,r,i),s=()=>e.removeEventListener(o,r,i);else{const n=e;n.addListener(r),s=()=>n.removeListener(r)}return n.push(s),t},clear:function(){n=n.filter((n=>n()))}};return t}function x(n=0,t=0){const e=u(n-t);function o(t){return t<n}function r(n){return n>t}function i(n){return o(n)||r(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?o(e)?n:t:e},reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function _(n,t,e){const{constrain:o}=x(0,n),r=n+1;let i=s(t);function s(n){return e?u((r+n)%r):o(n)}function c(){return i}function l(){return _(n,c(),e)}const a={get:c,set:function(n){return i=s(n),a},add:function(n){return l().set(c()+n)},clone:l};return a}function k(n,t,e,o,r,i,c,d,f,h,p,g,m,b,_,k,w,S,C){const{cross:E,direction:L}=n,I=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=v(),A=v(),N=x(50,225).constrain(b.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},B=_?43:25;let O=!1,j=0,F=0,D=!1,P=!1,H=!1,G=!1;function V(n){if(!y(n,o)&&n.touches.length>=2)return W(n);const t=i.readPoint(n),e=i.readPoint(n,E),s=a(t,j),c=a(e,F);if(!P&&!G){if(!n.cancelable)return W(n);if(P=s>c,!P)return W(n)}const u=i.pointerMove(n);s>k&&(H=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(L(u)),n.preventDefault()}function W(n){const t=p.byDistance(0,!1).index!==g.get(),e=i.pointerUp(n)*(_?z:R)[G?"mouse":"touch"],o=function(n,t){const e=g.add(-1*l(n)),o=p.byDistance(n,!_).distance;return _||u(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(L(e),t),r=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(e,o),s=B-10*r,c=S+r/50;P=!1,D=!1,A.clear(),h.useDuration(s).useFriction(c),f.distance(o,!_),G=!1,m.emit("pointerUp")}function U(n){H&&(n.stopPropagation(),n.preventDefault(),H=!1)}return{init:function(n){if(!C)return;function u(u){(s(C)||C(n,u))&&function(n){const s=y(n,o);G=s,H=_&&s&&!n.buttons&&O,O=a(r.get(),c.get())>=2,s&&0!==n.button||function(n){return I.includes(n.nodeName||"")}(n.target)||(D=!0,i.pointerDown(n),h.useFriction(0).useDuration(0),r.set(c),function(){const n=G?e:t;A.add(n,"touchmove",V,M).add(n,"touchend",W).add(n,"mousemove",V,M).add(n,"mouseup",W)}(),j=i.readPoint(n),F=i.readPoint(n,E),m.emit("pointerDown"))}(u)}const l=t;T.add(l,"dragstart",(n=>n.preventDefault()),M).add(l,"touchmove",(()=>{}),M).add(l,"touchend",(()=>{})).add(l,"touchstart",u).add(l,"mousedown",u).add(l,"touchcancel",W).add(l,"contextmenu",W).add(l,"click",U,!0)},destroy:function(){T.clear(),A.clear()},pointerDown:function(){return D}}}function w(n,t){let e,o;function r(n){return n.timeStamp}function i(e,o){const r="client"+("x"===(o||n.scroll)?"X":"Y");return(y(e,t)?e:e.touches[0])[r]}return{pointerDown:function(n){return e=n,o=n,i(n)},pointerMove:function(n){const t=i(n)-i(o),s=r(n)-r(e)>170;return o=n,s&&(e=n),t},pointerUp:function(n){if(!e||!o)return 0;const t=i(o)-i(e),s=r(n)-r(e),c=r(n)-r(o)>170,l=t/s;return s&&!c&&u(l)>.1?l:0},readPoint:i}}function S(n,t,e,o,r,i,c){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(c.measure(n))}return{init:function(r){i&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(s(i)||i(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),c=e?d:f[s];if(u(p(e?n:o[s])-c)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function C(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),c=x(.1,.99);let l=!1;function a(){return!l&&!!n.reachedAny(e.get())&&!!n.reachedAny(t.get())}return{shouldConstrain:a,constrain:function(r){if(!a())return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),h=c.constrain(d/s);e.subtract(f*h),!r&&u(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function E(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=x(r,i);return{loop:function(t){if(!function(n){return 1===n?c(e.get()):-1===n&&s(e.get())}(t))return;const r=n*(-1*t);o.forEach((n=>n.add(r)))}}}function L(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function I(n,t){const e="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=t.style;let r=null,i=!1;return{clear:function(){i||(o.transform="",t.getAttribute("style")||t.removeAttribute("style"))},to:function(t){if(i)return;const s=function(n){return Math.round(100*n)/100}(n.direction(t));s!==r&&(o.transform=e(s),r=s)},toggleActive:function(n){i=!n}}}function M(n,t,e,o,r,i,s,c,u){const l=d(r),a=p(h(d(r).reverse(),s[0]),e,!1).concat(p(h(l,t-s[0]-1),-e,!0));function f(n,t){return n.reduce(((n,t)=>n-r[t]),t)}function h(n,t){return n.reduce(((n,e)=>f(n,t)>0?n.concat([e]):n),[])}function p(r,s,l){const a=function(n){return i.map(((e,r)=>({start:e-o[r]+.5+n,end:e+t-.5+n})))}(s);return r.map((t=>{const o=l?0:-e,r=l?e:0,i=a[t][l?"end":"start"];return{index:t,loopPoint:i,slideLocation:L(-1),translate:I(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return a.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){a.forEach((n=>n.translate.clear()))},loop:function(){a.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:a}}function T(n,t,e){let o,r=!1;return{init:function(i){e&&(o=new MutationObserver((n=>{r||(s(e)||e(i,n))&&function(n){for(const e of n)if("childList"===e.type){i.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function A(n,t,e,o,c,b,y){const{align:A,axis:N,direction:R,startIndex:z,loop:B,duration:O,dragFree:j,dragThreshold:F,inViewThreshold:D,slidesToScroll:P,skipSnaps:H,containScroll:G,watchResize:V,watchSlides:W,watchDrag:U,watchFocus:X}=b,q={measure:function(n){const{offsetTop:t,offsetLeft:e,offsetWidth:o,offsetHeight:r}=n;return{top:t,right:e+o,bottom:t+r,left:e,width:o,height:r}}},Q=q.measure(t),$=e.map(q.measure),J=function(n,t){const e="rtl"===t,o="y"===n,r=!o&&e?-1:1;return{scroll:o?"y":"x",cross:o?"x":"y",startEdge:o?"top":e?"right":"left",endEdge:o?"bottom":e?"left":"right",measureSize:function(n){const{height:t,width:e}=n;return o?t:e},direction:function(n){return n*r}}}(N,R),Y=J.measureSize(Q),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=function(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o,r){return i(n)?e[n](o):n(t,o,r)}}}(A,Y),nn=!B&&!!G,tn=B||!!G,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=n,a=e[0]&&r,d=a?u(t[c]-e[0][c]):0,h=function(){if(!a)return 0;const n=i.getComputedStyle(f(o));return parseFloat(n.getPropertyValue("margin-"+l))}(),g=e.map(s),m=e.map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g[t]+d:r?g[t]+h:e[t+1][c]-n[c]})).map(u);return{slideSizes:g,slideSizesWithGaps:m,startGap:d,endGap:h}}(J,Q,$,e,tn,c),cn=function(n,t,e,o,i,s,c,l,a){const{startEdge:p,endEdge:g,direction:m}=n,b=r(e);return{groupSlides:function(n){return b?function(n,t){return d(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?d(n).reduce(((e,r,d)=>{const b=f(e)||0,y=0===b,v=r===h(n),x=i[p]-s[b][p],_=i[p]-s[r][g],k=!o&&y?m(c):0,w=u(_-(!o&&v?m(l):0)-(x+k));return d&&w>t+a&&e.push(r),v&&e.push(n.length),e}),[]).map(((t,e,o)=>n.slice(Math.max(o[e-1]||0),t))):[]}(n)}}}(J,Y,P,B,Q,$,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:c}=r,l=c(o).map((n=>f(n)[s]-n[0][i])).map(u).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-u(n))),d=c(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:d}}(J,Z,Q,$,cn),an=-f(un)+f(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=x(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=p(e,t);return u?i:l||c(o,s)?o:c(i,s)?i:s})).map((n=>parseFloat(n.toFixed(3)))),s=function(){const n=i[0],t=f(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return a(n,t)<=1}return{snapsContained:function(){if(t<=n+2)return[r.max];if("keepSnaps"===o)return i;const{min:e,max:c}=s;return i.slice(e,c)}(),scrollContainLimit:s}}(Y,an,ln,G),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:x(e?o-n:f(t),o)}}(an,hn,B),gn=_(h(hn),z,B),mn=gn.clone(),bn=d(e),yn=function(n,t,e,o){const r=v(),i=1e3/60;let s=null,c=0,u=0;function l(n){if(!u)return;s||(s=n,e(),e());const r=n-s;for(s=n,c+=r;c>=i;)e(),c-=i;o(c/i),u&&(u=t.requestAnimationFrame(l))}function a(){t.cancelAnimationFrame(u),s=null,c=0,u=0}return{init:function(){r.add(n,"visibilitychange",(()=>{n.hidden&&(s=null,c=0)}))},destroy:function(){a(),r.clear()},start:function(){u||(u=t.requestAnimationFrame(l))},stop:a,update:e,render:o}}(o,c,(()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,options:{loop:o}})=>{o||e.constrain(n.pointerDown()),t.seek()})(Nn)),(n=>(({scrollBody:n,translate:t,location:e,offsetLocation:o,previousLocation:r,scrollLooper:i,slideLooper:s,dragHandler:c,animation:u,eventHandler:l,scrollBounds:a,options:{loop:d}},f)=>{const h=n.settled(),p=!a.shouldConstrain(),g=d?h:h&&p,m=g&&!c.pointerDown();m&&u.stop();const b=e.get()*f+r.get()*(1-f);o.set(b),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),m&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=L(vn),_n=L(vn),kn=L(vn),wn=L(vn),Sn=function(n,t,e,o,r){let i=0,s=0,c=r,a=.68,d=n.get(),f=0;function h(n){return c=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return c},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return c?(e.set(n),i+=t/c,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=l(r),f=d,g},settled:function(){return u(o.get()-t.get())<.001},useBaseFriction:function(){return p(.68)},useBaseDuration:function(){return h(r)},useFriction:p,useDuration:h};return g}(xn,kn,_n,wn,O),Cn=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function a(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function d(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>l(n)===o));return i.length?a(i):f(r)-e}return{byDistance:function(e,o){const l=r.get()+e,{index:a,distance:f}=function(e){const o=n?s(e):c(e),r=t.map(((n,t)=>({diff:d(n-o,0),index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(l),h=!n&&i(l);return!o||h?{index:a,distance:e}:{index:a,distance:e+d(t[a]-f,0)}},byIndex:function(n,e){return{index:n,distance:d(t[n]-r.get(),e)}},shortcut:d}}(B,hn,an,pn,wn),En=function(n,t,e,o,r,i,s){function c(r){const c=r.distance,u=r.index!==t.get();i.add(c),c&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),u&&(e.set(t.get()),t.set(r.index),s.emit("select"))}return{distance:function(n,t){c(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);c(r.byIndex(o.get(),e))}}}(yn,gn,mn,Sn,Cn,wn,y),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),In=v(),Mn=function(n,t,e,o){const r={};let i,s=null,c=null,u=!1;return{init:function(){i=new IntersectionObserver((n=>{u||(n.forEach((n=>{const e=t.indexOf(n.target);r[e]=n})),s=null,c=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:o}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),u=!0},get:function(n=!0){if(n&&s)return s;if(!n&&c)return c;const t=function(n){return m(r).reduce(((t,e)=>{const o=parseInt(e),{isIntersecting:i}=r[o];return(n&&i||!n&&!i)&&t.push(o),t}),[])}(n);return n&&(s=t),n||(c=t),t}}}(t,e,y,D),{slideRegistry:Tn}=function(n,t,e,o,r,i){const{groupSlides:s}=r,{min:c,max:u}=o;return{slideRegistry:function(){const o=s(i);return 1===e.length?[i]:n&&"keepSnaps"!==t?o.slice(c,u).map(((n,t,e)=>{const o=!t,r=p(e,t);return o?g(f(e[0])+1):r?g(h(i)-f(e)[0]+1,f(e)[0]):n})):o}()}}(nn,G,hn,fn,cn,bn),An=function(n,t,e,o,i,c,u,l){const a={passive:!0,capture:!0};let d=0;function f(n){"Tab"===n.code&&(d=(new Date).getTime())}return{init:function(h){l&&(c.add(document,"keydown",f,!1),t.forEach(((t,f)=>{c.add(t,"focus",(t=>{(s(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const s=e.findIndex((n=>n.includes(t)));r(s)&&(i.useDuration(0),o.index(s,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,Tn,En,Sn,In,y,X),Nn={ownerDocument:o,ownerWindow:c,eventHandler:y,containerRect:Q,slideRects:$,animation:yn,axis:J,dragHandler:k(J,n,o,c,wn,w(J,c),xn,yn,En,Sn,Cn,gn,y,K,j,F,H,.68,U),eventStore:In,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:b,resizeHandler:S(t,y,c,e,J,V,q),scrollBody:Sn,scrollBounds:C(pn,kn,wn,Sn,K),scrollLooper:E(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:Ln,scrollSnapList:hn.map(Ln.get),scrollSnaps:hn,scrollTarget:Cn,scrollTo:En,slideLooper:M(J,Y,an,en,on,un,hn,kn,e),slideFocus:An,slidesHandler:T(t,y,W),slidesInView:Mn,slideIndexes:bn,slideRegistry:Tn,slidesToScroll:cn,target:wn,translate:I(J,t)};return Nn}const N={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function R(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=m(o).filter((t=>n.matchMedia(t).matches)).map((n=>o[n])).reduce(((n,e)=>t(n,e)),{});return t(e,r)},optionsMediaQueries:function(t){return t.map((n=>m(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function z(n,t,e){const o=n.ownerDocument,r=o.defaultView,s=R(r),c=function(n){let t=[];return{init:function(e,o){return t=o.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),o.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(s),u=v(),l=function(){let n,t={};function e(n){return t[n]||[]}const o={init:function(t){n=t},emit:function(t){return e(t).forEach((e=>e(n,t))),o},off:function(n,r){return t[n]=e(n).filter((n=>n!==r)),o},on:function(n,r){return t[n]=e(n).concat([r]),o},clear:function(){t={}}};return o}(),{mergeOptions:a,optionsAtMedia:d,optionsMediaQueries:f}=s,{on:h,off:p,emit:g}=l,m=I;let b,y,x,_,k=!1,w=a(N,z.globalOptions),S=a(w),C=[];function E(t){const e=A(n,x,_,o,r,t,l);return t.loop&&!e.slideLooper.canLoop()?E(Object.assign({},t,{loop:!1})):e}function L(t,e){k||(w=a(w,t),S=d(w),C=e||C,function(){const{container:t,slides:e}=S,o=i(t)?n.querySelector(t):t;x=o||n.children[0];const r=i(e)?x.querySelectorAll(e):e;_=[].slice.call(r||x.children)}(),b=E(S),f([w,...C.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",I))),S.active&&(b.translate.to(b.location.get()),b.animation.init(),b.slidesInView.init(),b.slideFocus.init(O),b.eventHandler.init(O),b.resizeHandler.init(O),b.slidesHandler.init(O),b.options.loop&&b.slideLooper.loop(),x.offsetParent&&_.length&&b.dragHandler.init(O),y=c.init(O,C)))}function I(n,t){const e=B();M(),L(a({startIndex:e},n),t),l.emit("reInit")}function M(){b.dragHandler.destroy(),b.eventStore.clear(),b.translate.clear(),b.slideLooper.clear(),b.resizeHandler.destroy(),b.slidesHandler.destroy(),b.slidesInView.destroy(),b.animation.destroy(),c.destroy(),u.clear()}function T(n,t,e){S.active&&!k&&(b.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),b.scrollTo.index(n,e||0))}function B(){return b.index.get()}const O={canScrollNext:function(){return b.index.add(1).get()!==B()},canScrollPrev:function(){return b.index.add(-1).get()!==B()},containerNode:function(){return x},internalEngine:function(){return b},destroy:function(){k||(k=!0,u.clear(),M(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return y},previousScrollSnap:function(){return b.indexPrevious.get()},reInit:m,rootNode:function(){return n},scrollNext:function(n){T(b.index.add(1).get(),n,-1)},scrollPrev:function(n){T(b.index.add(-1).get(),n,1)},scrollProgress:function(){return b.scrollProgress.get(b.offsetLocation.get())},scrollSnapList:function(){return b.scrollSnapList},scrollTo:T,selectedScrollSnap:B,slideNodes:function(){return _},slidesInView:function(){return b.slidesInView.get()},slidesNotInView:function(){return b.slidesInView.get(!1)}};return L(t,e),setTimeout((()=>l.emit("init")),0),O}z.globalOptions=void 0;const B=t(class extends e{constructor(n){super(),!1!==n&&this.__registerHost()}get el(){return this}items;loop=!0;class;controlClass;slideClass;itemClass;viewportRef;containerRef;slotRef;prevBtnRef;nextBtnRef;dotsRef;embla=null;movedNodes=[];prevClickHandler=null;nextClickHandler=null;dotClickHandlers=[];slotNodesMoved=!1;async scrollPrev(){this.embla?.scrollPrev()}async scrollNext(){this.embla?.scrollNext()}async goToSlide(n){this.embla?.scrollTo(n)}async getEmbla(){return this.embla}moveSlotNodesIntoContainer(){if(!this.slotRef||!this.containerRef||this.slotNodesMoved)return;const n=this.slotRef.assignedNodes().filter((n=>n.nodeType===Node.ELEMENT_NODE));0!==n.length&&(this.movedNodes=[],n.forEach((n=>{this.containerRef.appendChild(n),this.movedNodes.push(n)})),this.slotNodesMoved=!0,this.scheduleEmblaInit())}initScheduled=!1;scheduleEmblaInit(){this.initScheduled||(this.initScheduled=!0,requestAnimationFrame((()=>{this.initScheduled=!1,this.destroyEmbla(),this.initEmbla()})))}moveSlotNodesBack(){const n=this.el;this.movedNodes.forEach((t=>n.appendChild(t))),this.movedNodes=[]}initEmbla(){if(!this.viewportRef||!this.containerRef)return;const n=this.getItemsArray();if(!(void 0!==n?n.length>0:this.containerRef.children.length>0))return;this.embla=z(this.viewportRef,{loop:this.loop,align:"center",containScroll:"trimSnaps"});const t=this.prevBtnRef,e=this.nextBtnRef,o=this.dotsRef,r=()=>{t&&(this.embla?.canScrollPrev()?t.removeAttribute("disabled"):t.setAttribute("disabled","")),e&&(this.embla?.canScrollNext()?e.removeAttribute("disabled"):e.setAttribute("disabled",""))};if(this.embla.on("init",r),this.embla.on("reInit",r),this.embla.on("select",r),t&&e&&(this.prevClickHandler=()=>this.embla?.scrollPrev(),this.nextClickHandler=()=>this.embla?.scrollNext(),t.addEventListener("click",this.prevClickHandler),e.addEventListener("click",this.nextClickHandler)),o){const n=this.embla.scrollSnapList().length;o.innerHTML="";for(let t=0;t<n;t++){const n=document.createElement("button");n.type="button",n.setAttribute("aria-label","Go to slide "+(t+1)),n.className="carousel__dot",0===t&&n.classList.add("current");const e=document.createElement("div");e.className="carousel__dot-inner",n.appendChild(e);const r=t,i=()=>this.embla?.scrollTo(r);this.dotClickHandlers.push(i),n.addEventListener("click",i),o.appendChild(n)}this.embla.on("select",(()=>{const n=this.embla?.selectedScrollSnap()??0;o.querySelectorAll("button").forEach(((t,e)=>{t.classList.toggle("current",e===n)}))}))}r()}destroyEmbla(){this.prevBtnRef&&this.prevClickHandler&&(this.prevBtnRef.removeEventListener("click",this.prevClickHandler),this.prevClickHandler=null),this.nextBtnRef&&this.nextClickHandler&&(this.nextBtnRef.removeEventListener("click",this.nextClickHandler),this.nextClickHandler=null),this.dotClickHandlers=[],this.dotsRef&&(this.dotsRef.innerHTML=""),this.embla?.destroy(),this.embla=null}onSlotChange=()=>{void 0===this.getItemsArray()&&this.moveSlotNodesIntoContainer()};componentDidRender(){void 0===this.getItemsArray()?(this.slotRef&&(this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.slotRef.addEventListener("slotchange",this.onSlotChange)),requestAnimationFrame((()=>{this.moveSlotNodesIntoContainer(),this.slotNodesMoved||(this.destroyEmbla(),this.initEmbla())}))):(this.destroyEmbla(),this.initEmbla())}disconnectedCallback(){this.slotRef&&this.slotRef.removeEventListener("slotchange",this.onSlotChange),this.destroyEmbla(),void 0===this.getItemsArray()&&(this.moveSlotNodesBack(),this.slotNodesMoved=!1)}getItemsArray(){if(void 0!==this.items){if(Array.isArray(this.items))return this.items;if("string"==typeof this.items)try{const n=JSON.parse(this.items);return Array.isArray(n)?n:void 0}catch{return}}}render(){const n=this.getItemsArray(),t=void 0!==n&&n.length>0;return o("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:("carousel "+(this.class||"")).trim()},o("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:("carousel__viewport "+(this.slideClass||"")).trim(),ref:n=>this.viewportRef=n},o("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>o("div",{key:t,class:("carousel__slide "+(this.itemClass||"")).trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:n+""))):null)),!t&&o("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},o("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),o("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:("carousel__controls "+(this.controlClass||"")).trim()},o("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},o("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),o("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),o("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},o("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},o("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}static get style(){return":host{display:block}.carousel{display:flex;flex-direction:column;overflow:hidden}.carousel__viewport{overflow:hidden;touch-action:pan-y pinch-zoom}.carousel__container{display:flex;flex-direction:row;height:100%;margin-left:calc(-0.4rem)}.carousel__container ::slotted(*){flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__slide{flex:0 0 50%;width:50%;height:100%;padding-left:0.4rem;box-sizing:border-box}.carousel__controls{display:flex;gap:0.25rem;margin-top:0.25rem;justify-content:center;align-items:center}.carousel__prev,.carousel__next{display:inline-flex;align-items:center;justify-content:center;padding:0;border:none;background:transparent;cursor:pointer;color:currentColor}.carousel__prev:disabled,.carousel__next:disabled{opacity:0.4;cursor:not-allowed}.carousel__icon{width:2.4rem;height:2.4rem}.carousel__dots{display:flex;gap:0.25rem;align-items:center}.carousel__dot{padding:0;border:none;background:none;cursor:pointer;width:0.5rem;height:0.5rem;display:flex;align-items:center;justify-content:center}.carousel__dot-inner{width:100%;height:100%;border-radius:50%;background-color:var(--carousel-dot-bg, #cbd5e1);transition:background-color 0.2s ease}.carousel__dot.current .carousel__dot-inner{background-color:var(--carousel-dot-active-bg, #94a3b8)}"}},[772,"fast-carousel",{items:[1],loop:[4],class:[1],controlClass:[1,"control-class"],slideClass:[1,"slide-class"],itemClass:[1,"item-class"],scrollPrev:[64],scrollNext:[64],goToSlide:[64],getEmbla:[64]}]);function O(){"undefined"!=typeof customElements&&["fast-carousel"].forEach((t=>{"fast-carousel"===t&&(customElements.get(n(t))||customElements.define(n(t),B))}))}O();const j=B,F=O;export{j as FastCarousel,F as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface FastForm extends Components.FastForm, HTMLElement {}
4
+ export const FastForm: {
5
+ prototype: FastForm;
6
+ new (): FastForm;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as s,H as e,c as o,h as a}from"./p-Bb27ylcX.js";const n=s(class extends e{constructor(t){super(),!1!==t&&this.__registerHost(),this.searchExecuted=o(this,"searchExecuted")}get el(){return this}searchExecuted;handleInputSubmit(){this.submit()}async submit(){const t=this.el.querySelectorAll("fast-input"),s={};for(const e of Array.from(t)){const t=await e.getParamName(),o=await e.getValue();o&&(s[t]=o)}this.updateUrlParams(s),document.dispatchEvent(new CustomEvent("search-executed",{detail:s,bubbles:!0,composed:!0})),this.searchExecuted.emit(s)}updateUrlParams(t){const s=new URLSearchParams(window.location.search),e=this.el.querySelectorAll("fast-input");for(const t of Array.from(e)){const e=t.paramName;e&&s.delete(e)}for(const[e,o]of Object.entries(t))o&&s.set(e,o);const o=""+s,a=o?`${window.location.pathname}?${o}`:window.location.pathname;history.pushState({},"",a)}handleFormSubmit=t=>{t.preventDefault(),this.submit()};render(){return a("form",{key:"50436bb904e8b175ae0c23158812a4e4756544c0",class:"fast-form",onSubmit:this.handleFormSubmit},a("slot",{key:"2f76c4c42c15ebf389d6e0fdbcb9a2098bf1156a"}))}static get style(){return".fast-form{display:flex;gap:0.5rem;align-items:flex-start}"}},[260,"fast-form",void 0,[[0,"inputSubmit","handleInputSubmit"]]]);function c(){"undefined"!=typeof customElements&&["fast-form"].forEach((s=>{"fast-form"===s&&(customElements.get(t(s))||customElements.define(t(s),n))}))}c();const r=n,i=c;export{r as FastForm,i as defineCustomElement}
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface FastInput extends Components.FastInput, HTMLElement {}
4
+ export const FastInput: {
5
+ prototype: FastInput;
6
+ new (): FastInput;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1 @@
1
+ import{t,p as e,H as s,c as i,h as a}from"./p-Bb27ylcX.js";const o=e(class extends s{constructor(t){super(),!1!==t&&this.__registerHost(),this.inputSubmit=i(this,"inputSubmit"),this.inputChanged=i(this,"inputChanged")}placeholder="Search...";value="";paramName="keyword";enableAutocomplete=!1;autocompleteUrl="/api/jobs/autocomplete";targetPath;debounceMs=300;minChars=3;inputSubmit;inputChanged;inputValue="";suggestions=[];showDropdown=!1;autocompleteLoading=!1;debounceTimer;popstateHandler;async getValue(){return this.inputValue}async getParamName(){return this.paramName}connectedCallback(){const t=this.getUrlParam();this.inputValue=null!==t?t:this.value,this.popstateHandler=()=>{this.inputValue=this.getUrlParam()??""},window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){window.removeEventListener("popstate",this.popstateHandler),clearTimeout(this.debounceTimer)}getUrlParam(){return new URLSearchParams(window.location.search).get(this.paramName)}handleInput=t=>{const e=t.target.value;this.inputValue=e,this.inputChanged.emit({value:e}),this.enableAutocomplete&&this.scheduleAutocomplete(e)};handleKeydown=t=>{"Enter"===t.key?(t.preventDefault(),this.showDropdown=!1,this.inputSubmit.emit()):"Escape"===t.key&&(this.showDropdown=!1)};handleBlur=()=>{this.showDropdown=!1};scheduleAutocomplete(t){clearTimeout(this.debounceTimer),t.length<this.minChars?this.showDropdown=!1:this.debounceTimer=setTimeout((()=>this.fetchSuggestions(t)),this.debounceMs)}async fetchSuggestions(t){if(this.targetPath){this.autocompleteLoading=!0,this.showDropdown=!0;try{const e=await fetch(this.autocompleteUrl,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({keyword:t,target_path:this.targetPath})});if(!e.ok)throw Error("autocomplete request failed");const s=await e.json();this.suggestions=s}catch{this.showDropdown=!1,this.suggestions=[]}finally{this.autocompleteLoading=!1}}else console.warn("[fast-input] target-path is required for autocomplete")}selectSuggestion(t){this.inputValue=t,this.showDropdown=!1,this.inputSubmit.emit()}render(){return a("div",{key:"ea03f3dd68d0da4fc30cbc18a1ef66b5974a4f89",class:"fast-input"},a("input",{key:"31d85c4c90dde0e10ea9424b960c5e4f4a3ca54a",type:"text",class:"fast-input__field",placeholder:this.placeholder,value:this.inputValue,onInput:this.handleInput,onKeyDown:this.handleKeydown,onBlur:this.handleBlur}),this.enableAutocomplete&&this.showDropdown&&a("ul",{key:"0de6fd68709d906bafd2fec684f0a73045be3705",class:"fast-input__dropdown"},this.autocompleteLoading?a("li",{class:"fast-input__dropdown-loading"},"Loading..."):this.suggestions.map((t=>a("li",{class:"fast-input__dropdown-item",onMouseDown:t=>{t.preventDefault()},onClick:()=>this.selectSuggestion(t.title)},t.title)))))}static get style(){return".fast-input{position:relative;display:inline-block}.fast-input__field{padding:0.5rem 0.75rem;font-size:1rem;border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box}.fast-input__dropdown{position:absolute;top:100%;left:0;right:0;margin:0;padding:0;list-style:none;background:#fff;border:1px solid #ccc;border-top:none;border-radius:0 0 4px 4px;z-index:100;max-height:200px;overflow-y:auto}.fast-input__dropdown-item{padding:0.5rem 0.75rem;cursor:pointer}.fast-input__dropdown-item:hover{background:#f0f0f0}.fast-input__dropdown-loading{padding:0.5rem 0.75rem;color:#999;font-style:italic}"}},[512,"fast-input",{placeholder:[1],value:[1],paramName:[1,"param-name"],enableAutocomplete:[4,"enable-autocomplete"],autocompleteUrl:[1,"autocomplete-url"],targetPath:[1,"target-path"],debounceMs:[2,"debounce-ms"],minChars:[2,"min-chars"],inputValue:[32],suggestions:[32],showDropdown:[32],autocompleteLoading:[32],getValue:[64],getParamName:[64]}]);function n(){"undefined"!=typeof customElements&&["fast-input"].forEach((e=>{"fast-input"===e&&(customElements.get(t(e))||customElements.define(t(e),o))}))}n();const r=o,d=n;export{r as FastInput,d as defineCustomElement}
@@ -1 +1 @@
1
- export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-UM9TUfe3.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-Bb27ylcX.js";function t(s,t,e){return(s||"")+(t?" "+t:"")+(e?" "+e:"")}export{t as format}