@phatvu/web-component-poc 1.0.6 → 1.0.7

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 (46) hide show
  1. package/dist/cjs/fast-button.cjs.entry.js +46 -0
  2. package/dist/cjs/{fast-button_4.cjs.entry.js → fast-carousel.cjs.entry.js} +1 -231
  3. package/dist/cjs/fast-input_4.cjs.entry.js +499 -0
  4. package/dist/cjs/{index-B2BTpdbN.js → index-BEvZs91D.js} +2 -2
  5. package/dist/cjs/job-card.cjs.entry.js +1 -1
  6. package/dist/cjs/loader.cjs.js +2 -2
  7. package/dist/cjs/web-component-poc.cjs.js +2 -2
  8. package/dist/collection/collection-manifest.json +3 -1
  9. package/dist/collection/components/fast-input/fast-input.css +55 -0
  10. package/dist/collection/components/fast-input/fast-input.js +335 -0
  11. package/dist/collection/components/jobs-list-only/jobs-list-only.js +180 -3
  12. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.css +8 -0
  13. package/dist/collection/components/jobs-list-reactive/jobs-list-reactive.js +203 -0
  14. package/dist/components/fast-button.js +1 -1
  15. package/dist/components/fast-carousel.js +1 -1
  16. package/dist/components/fast-input.d.ts +11 -0
  17. package/dist/components/fast-input.js +1 -0
  18. package/dist/components/index.js +1 -1
  19. package/dist/components/job-card.js +1 -1
  20. package/dist/components/jobs-item.js +1 -1
  21. package/dist/components/jobs-list-only.js +1 -1
  22. package/dist/components/jobs-list-reactive.d.ts +11 -0
  23. package/dist/components/jobs-list-reactive.js +1 -0
  24. package/dist/components/{p-ClQDwJJB.js → p-DQiaLjLf.js} +1 -1
  25. package/dist/esm/fast-button.entry.js +44 -0
  26. package/dist/esm/{fast-button_4.entry.js → fast-carousel.entry.js} +2 -229
  27. package/dist/esm/fast-input_4.entry.js +494 -0
  28. package/dist/esm/{index-Dk5CvWmb.js → index-C_ZLQIpp.js} +2 -2
  29. package/dist/esm/job-card.entry.js +1 -1
  30. package/dist/esm/loader.js +3 -3
  31. package/dist/esm/web-component-poc.js +3 -3
  32. package/dist/types/components/fast-input/fast-input.d.ts +37 -0
  33. package/dist/types/components/jobs-list-only/jobs-list-only.d.ts +22 -0
  34. package/dist/types/components/jobs-list-reactive/jobs-list-reactive.d.ts +26 -0
  35. package/dist/types/components.d.ts +223 -0
  36. package/dist/web-component-poc/p-618fba28.entry.js +1 -0
  37. package/dist/web-component-poc/p-7d45772f.entry.js +1 -0
  38. package/dist/web-component-poc/{p-52c85341.entry.js → p-bef7c8e2.entry.js} +1 -1
  39. package/dist/web-component-poc/p-cfb9aed9.entry.js +1 -0
  40. package/dist/web-component-poc/web-component-poc.esm.js +1 -1
  41. package/hydrate/index.js +354 -6
  42. package/hydrate/index.mjs +354 -6
  43. package/package.json +5 -1
  44. package/dist/web-component-poc/p-96761988.entry.js +0 -1
  45. /package/dist/components/{p-UM9TUfe3.js → p-BiaJAQXY.js} +0 -0
  46. /package/dist/web-component-poc/{p-Dk5CvWmb.js → p-C_ZLQIpp.js} +0 -0
@@ -1,3 +1,4 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
1
2
  import type { Job } from '../../types/jobs-list';
2
3
  export declare class JobsListOnly {
3
4
  /**
@@ -22,12 +23,33 @@ export declare class JobsListOnly {
22
23
  enableKilometers: boolean;
23
24
  /** Extra CSS class on the root element (avoid prop name "class" / "classname" reserved). */
24
25
  rootClass: string;
26
+ /** Template string for count display. Tokens: {count} = jobs on page, {total} = total from API. */
27
+ showCountText: string;
25
28
  showSuggestions: boolean;
26
29
  clearResultSuggestionsTitleText: string;
27
30
  clearResultSuggestionsLine1: string;
28
31
  clearResultSuggestionsLine2: string;
29
32
  clearResultSuggestionsLine3: string;
30
33
  clearResultSuggestionsLine4: string;
34
+ /** When true, component manages its own data fetching */
35
+ autoFetch: boolean;
36
+ /** Jobs search endpoint */
37
+ apiUrl: string;
38
+ /** Comma-separated URL param names to watch and forward to the API */
39
+ watchParams: string;
40
+ fetchedJobs: any[];
41
+ fetchedTotal: number;
42
+ fetchLoading: boolean;
43
+ fetchComplete: EventEmitter<{
44
+ jobs: any[];
45
+ totalJob: number;
46
+ }>;
47
+ private searchExecutedHandler;
48
+ private popstateHandler;
49
+ connectedCallback(): void;
50
+ disconnectedCallback(): void;
51
+ private fetchJobs;
52
+ private renderCountText;
31
53
  private getJobsArray;
32
54
  private renderJobItem;
33
55
  render(): any;
@@ -0,0 +1,26 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ import type { Job } from '../../types/jobs-list';
3
+ export declare class JobsListReactive {
4
+ el: HTMLElement;
5
+ /** Jobs search endpoint */
6
+ apiUrl: string;
7
+ /** Comma-separated URL param names to watch and forward to the API */
8
+ watchParams: string;
9
+ /** CSS class added to container while fetching */
10
+ loadingClass: string;
11
+ isLoading: boolean;
12
+ fetchComplete: EventEmitter<{
13
+ jobs: Job[];
14
+ totalJob: number;
15
+ }>;
16
+ private templateEl;
17
+ private searchExecutedHandler;
18
+ private popstateHandler;
19
+ connectedCallback(): void;
20
+ disconnectedCallback(): void;
21
+ private buildQueryString;
22
+ private fetchJobs;
23
+ private renderJobs;
24
+ private updateCountElements;
25
+ render(): any;
26
+ }
@@ -70,6 +70,37 @@ export namespace Components {
70
70
  */
71
71
  "slideClass": string;
72
72
  }
73
+ interface FastInput {
74
+ /**
75
+ * @default '/api/jobs/autocomplete'
76
+ */
77
+ "autocompleteUrl": string;
78
+ /**
79
+ * @default 300
80
+ */
81
+ "debounceMs": number;
82
+ /**
83
+ * @default false
84
+ */
85
+ "enableAutocomplete": boolean;
86
+ /**
87
+ * @default 3
88
+ */
89
+ "minChars": number;
90
+ /**
91
+ * @default 'keyword'
92
+ */
93
+ "paramName": string;
94
+ /**
95
+ * @default 'Search...'
96
+ */
97
+ "placeholder": string;
98
+ "targetPath": string | undefined;
99
+ /**
100
+ * @default ''
101
+ */
102
+ "value": string;
103
+ }
73
104
  /**
74
105
  * JobCard Component
75
106
  * A reusable card component for displaying job information based on the React JobItem component.
@@ -193,10 +224,20 @@ export namespace Components {
193
224
  "showReference": boolean;
194
225
  }
195
226
  interface JobsListOnly {
227
+ /**
228
+ * Jobs search endpoint
229
+ * @default '/api/get-jobs'
230
+ */
231
+ "apiUrl": string;
196
232
  /**
197
233
  * @default 'Apply Now'
198
234
  */
199
235
  "applyButtonText": string;
236
+ /**
237
+ * When true, component manages its own data fetching
238
+ * @default false
239
+ */
240
+ "autoFetch": boolean;
200
241
  /**
201
242
  * @default 'Try different keywords'
202
243
  */
@@ -261,6 +302,11 @@ export namespace Components {
261
302
  * @default true
262
303
  */
263
304
  "showBrand": boolean;
305
+ /**
306
+ * Template string for count display. Tokens: {count} = jobs on page, {total} = total from API.
307
+ * @default ''
308
+ */
309
+ "showCountText": string;
264
310
  /**
265
311
  * @default true
266
312
  */
@@ -282,12 +328,46 @@ export namespace Components {
282
328
  * @default 0
283
329
  */
284
330
  "totalJob": number;
331
+ /**
332
+ * Comma-separated URL param names to watch and forward to the API
333
+ * @default 'keyword'
334
+ */
335
+ "watchParams": string;
336
+ }
337
+ interface JobsListReactive {
338
+ /**
339
+ * Jobs search endpoint
340
+ * @default '/api/get-jobs'
341
+ */
342
+ "apiUrl": string;
343
+ /**
344
+ * CSS class added to container while fetching
345
+ * @default 'loading'
346
+ */
347
+ "loadingClass": string;
348
+ /**
349
+ * Comma-separated URL param names to watch and forward to the API
350
+ * @default 'keyword,location_name'
351
+ */
352
+ "watchParams": string;
285
353
  }
286
354
  }
287
355
  export interface FastButtonCustomEvent<T> extends CustomEvent<T> {
288
356
  detail: T;
289
357
  target: HTMLFastButtonElement;
290
358
  }
359
+ export interface FastInputCustomEvent<T> extends CustomEvent<T> {
360
+ detail: T;
361
+ target: HTMLFastInputElement;
362
+ }
363
+ export interface JobsListOnlyCustomEvent<T> extends CustomEvent<T> {
364
+ detail: T;
365
+ target: HTMLJobsListOnlyElement;
366
+ }
367
+ export interface JobsListReactiveCustomEvent<T> extends CustomEvent<T> {
368
+ detail: T;
369
+ target: HTMLJobsListReactiveElement;
370
+ }
291
371
  declare global {
292
372
  interface HTMLFastButtonElementEventMap {
293
373
  "buttonClick": MouseEvent;
@@ -312,6 +392,24 @@ declare global {
312
392
  prototype: HTMLFastCarouselElement;
313
393
  new (): HTMLFastCarouselElement;
314
394
  };
395
+ interface HTMLFastInputElementEventMap {
396
+ "searchExecuted": { keyword: string };
397
+ "inputChanged": { value: string };
398
+ }
399
+ interface HTMLFastInputElement extends Components.FastInput, HTMLStencilElement {
400
+ addEventListener<K extends keyof HTMLFastInputElementEventMap>(type: K, listener: (this: HTMLFastInputElement, ev: FastInputCustomEvent<HTMLFastInputElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
401
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
402
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
403
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
404
+ removeEventListener<K extends keyof HTMLFastInputElementEventMap>(type: K, listener: (this: HTMLFastInputElement, ev: FastInputCustomEvent<HTMLFastInputElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
405
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
406
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
407
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
408
+ }
409
+ var HTMLFastInputElement: {
410
+ prototype: HTMLFastInputElement;
411
+ new (): HTMLFastInputElement;
412
+ };
315
413
  /**
316
414
  * JobCard Component
317
415
  * A reusable card component for displaying job information based on the React JobItem component.
@@ -345,18 +443,48 @@ declare global {
345
443
  prototype: HTMLJobsItemElement;
346
444
  new (): HTMLJobsItemElement;
347
445
  };
446
+ interface HTMLJobsListOnlyElementEventMap {
447
+ "fetchComplete": { jobs: any[]; totalJob: number };
448
+ }
348
449
  interface HTMLJobsListOnlyElement extends Components.JobsListOnly, HTMLStencilElement {
450
+ addEventListener<K extends keyof HTMLJobsListOnlyElementEventMap>(type: K, listener: (this: HTMLJobsListOnlyElement, ev: JobsListOnlyCustomEvent<HTMLJobsListOnlyElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
451
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
452
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
453
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
454
+ removeEventListener<K extends keyof HTMLJobsListOnlyElementEventMap>(type: K, listener: (this: HTMLJobsListOnlyElement, ev: JobsListOnlyCustomEvent<HTMLJobsListOnlyElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
455
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
456
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
457
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
349
458
  }
350
459
  var HTMLJobsListOnlyElement: {
351
460
  prototype: HTMLJobsListOnlyElement;
352
461
  new (): HTMLJobsListOnlyElement;
353
462
  };
463
+ interface HTMLJobsListReactiveElementEventMap {
464
+ "fetchComplete": { jobs: Job[]; totalJob: number };
465
+ }
466
+ interface HTMLJobsListReactiveElement extends Components.JobsListReactive, HTMLStencilElement {
467
+ addEventListener<K extends keyof HTMLJobsListReactiveElementEventMap>(type: K, listener: (this: HTMLJobsListReactiveElement, ev: JobsListReactiveCustomEvent<HTMLJobsListReactiveElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
468
+ addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
469
+ addEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
470
+ addEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | AddEventListenerOptions): void;
471
+ removeEventListener<K extends keyof HTMLJobsListReactiveElementEventMap>(type: K, listener: (this: HTMLJobsListReactiveElement, ev: JobsListReactiveCustomEvent<HTMLJobsListReactiveElementEventMap[K]>) => any, options?: boolean | EventListenerOptions): void;
472
+ removeEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
473
+ removeEventListener<K extends keyof HTMLElementEventMap>(type: K, listener: (this: HTMLElement, ev: HTMLElementEventMap[K]) => any, options?: boolean | EventListenerOptions): void;
474
+ removeEventListener(type: string, listener: EventListenerOrEventListenerObject, options?: boolean | EventListenerOptions): void;
475
+ }
476
+ var HTMLJobsListReactiveElement: {
477
+ prototype: HTMLJobsListReactiveElement;
478
+ new (): HTMLJobsListReactiveElement;
479
+ };
354
480
  interface HTMLElementTagNameMap {
355
481
  "fast-button": HTMLFastButtonElement;
356
482
  "fast-carousel": HTMLFastCarouselElement;
483
+ "fast-input": HTMLFastInputElement;
357
484
  "job-card": HTMLJobCardElement;
358
485
  "jobs-item": HTMLJobsItemElement;
359
486
  "jobs-list-only": HTMLJobsListOnlyElement;
487
+ "jobs-list-reactive": HTMLJobsListReactiveElement;
360
488
  }
361
489
  }
362
490
  declare namespace LocalJSX {
@@ -408,6 +536,39 @@ declare namespace LocalJSX {
408
536
  */
409
537
  "slideClass"?: string;
410
538
  }
539
+ interface FastInput {
540
+ /**
541
+ * @default '/api/jobs/autocomplete'
542
+ */
543
+ "autocompleteUrl"?: string;
544
+ /**
545
+ * @default 300
546
+ */
547
+ "debounceMs"?: number;
548
+ /**
549
+ * @default false
550
+ */
551
+ "enableAutocomplete"?: boolean;
552
+ /**
553
+ * @default 3
554
+ */
555
+ "minChars"?: number;
556
+ "onInputChanged"?: (event: FastInputCustomEvent<{ value: string }>) => void;
557
+ "onSearchExecuted"?: (event: FastInputCustomEvent<{ keyword: string }>) => void;
558
+ /**
559
+ * @default 'keyword'
560
+ */
561
+ "paramName"?: string;
562
+ /**
563
+ * @default 'Search...'
564
+ */
565
+ "placeholder"?: string;
566
+ "targetPath"?: string | undefined;
567
+ /**
568
+ * @default ''
569
+ */
570
+ "value"?: string;
571
+ }
411
572
  /**
412
573
  * JobCard Component
413
574
  * A reusable card component for displaying job information based on the React JobItem component.
@@ -531,10 +692,20 @@ declare namespace LocalJSX {
531
692
  "showReference"?: boolean;
532
693
  }
533
694
  interface JobsListOnly {
695
+ /**
696
+ * Jobs search endpoint
697
+ * @default '/api/get-jobs'
698
+ */
699
+ "apiUrl"?: string;
534
700
  /**
535
701
  * @default 'Apply Now'
536
702
  */
537
703
  "applyButtonText"?: string;
704
+ /**
705
+ * When true, component manages its own data fetching
706
+ * @default false
707
+ */
708
+ "autoFetch"?: boolean;
538
709
  /**
539
710
  * @default 'Try different keywords'
540
711
  */
@@ -586,6 +757,7 @@ declare namespace LocalJSX {
586
757
  * @default defaultNoResultsLine2
587
758
  */
588
759
  "noResultsLine2"?: string;
760
+ "onFetchComplete"?: (event: JobsListOnlyCustomEvent<{ jobs: any[]; totalJob: number }>) => void;
589
761
  /**
590
762
  * @default 'Remote'
591
763
  */
@@ -599,6 +771,11 @@ declare namespace LocalJSX {
599
771
  * @default true
600
772
  */
601
773
  "showBrand"?: boolean;
774
+ /**
775
+ * Template string for count display. Tokens: {count} = jobs on page, {total} = total from API.
776
+ * @default ''
777
+ */
778
+ "showCountText"?: string;
602
779
  /**
603
780
  * @default true
604
781
  */
@@ -620,6 +797,29 @@ declare namespace LocalJSX {
620
797
  * @default 0
621
798
  */
622
799
  "totalJob"?: number;
800
+ /**
801
+ * Comma-separated URL param names to watch and forward to the API
802
+ * @default 'keyword'
803
+ */
804
+ "watchParams"?: string;
805
+ }
806
+ interface JobsListReactive {
807
+ /**
808
+ * Jobs search endpoint
809
+ * @default '/api/get-jobs'
810
+ */
811
+ "apiUrl"?: string;
812
+ /**
813
+ * CSS class added to container while fetching
814
+ * @default 'loading'
815
+ */
816
+ "loadingClass"?: string;
817
+ "onFetchComplete"?: (event: JobsListReactiveCustomEvent<{ jobs: Job[]; totalJob: number }>) => void;
818
+ /**
819
+ * Comma-separated URL param names to watch and forward to the API
820
+ * @default 'keyword,location_name'
821
+ */
822
+ "watchParams"?: string;
623
823
  }
624
824
 
625
825
  interface FastButtonAttributes {
@@ -635,6 +835,16 @@ declare namespace LocalJSX {
635
835
  "slideClass": string;
636
836
  "itemClass": string;
637
837
  }
838
+ interface FastInputAttributes {
839
+ "placeholder": string;
840
+ "value": string;
841
+ "paramName": string;
842
+ "enableAutocomplete": boolean;
843
+ "autocompleteUrl": string;
844
+ "targetPath": string | undefined;
845
+ "debounceMs": number;
846
+ "minChars": number;
847
+ }
638
848
  interface JobCardAttributes {
639
849
  "job": Job | string;
640
850
  "index": number;
@@ -675,20 +885,31 @@ declare namespace LocalJSX {
675
885
  "remoteLocationText": string;
676
886
  "enableKilometers": boolean;
677
887
  "rootClass": string;
888
+ "showCountText": string;
678
889
  "showSuggestions": boolean;
679
890
  "clearResultSuggestionsTitleText": string;
680
891
  "clearResultSuggestionsLine1": string;
681
892
  "clearResultSuggestionsLine2": string;
682
893
  "clearResultSuggestionsLine3": string;
683
894
  "clearResultSuggestionsLine4": string;
895
+ "autoFetch": boolean;
896
+ "apiUrl": string;
897
+ "watchParams": string;
898
+ }
899
+ interface JobsListReactiveAttributes {
900
+ "apiUrl": string;
901
+ "watchParams": string;
902
+ "loadingClass": string;
684
903
  }
685
904
 
686
905
  interface IntrinsicElements {
687
906
  "fast-button": Omit<FastButton, keyof FastButtonAttributes> & { [K in keyof FastButton & keyof FastButtonAttributes]?: FastButton[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `attr:${K}`]?: FastButtonAttributes[K] } & { [K in keyof FastButton & keyof FastButtonAttributes as `prop:${K}`]?: FastButton[K] };
688
907
  "fast-carousel": Omit<FastCarousel, keyof FastCarouselAttributes> & { [K in keyof FastCarousel & keyof FastCarouselAttributes]?: FastCarousel[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `attr:${K}`]?: FastCarouselAttributes[K] } & { [K in keyof FastCarousel & keyof FastCarouselAttributes as `prop:${K}`]?: FastCarousel[K] };
908
+ "fast-input": Omit<FastInput, keyof FastInputAttributes> & { [K in keyof FastInput & keyof FastInputAttributes]?: FastInput[K] } & { [K in keyof FastInput & keyof FastInputAttributes as `attr:${K}`]?: FastInputAttributes[K] } & { [K in keyof FastInput & keyof FastInputAttributes as `prop:${K}`]?: FastInput[K] };
689
909
  "job-card": Omit<JobCard, keyof JobCardAttributes> & { [K in keyof JobCard & keyof JobCardAttributes]?: JobCard[K] } & { [K in keyof JobCard & keyof JobCardAttributes as `attr:${K}`]?: JobCardAttributes[K] } & { [K in keyof JobCard & keyof JobCardAttributes as `prop:${K}`]?: JobCard[K] };
690
910
  "jobs-item": Omit<JobsItem, keyof JobsItemAttributes> & { [K in keyof JobsItem & keyof JobsItemAttributes]?: JobsItem[K] } & { [K in keyof JobsItem & keyof JobsItemAttributes as `attr:${K}`]?: JobsItemAttributes[K] } & { [K in keyof JobsItem & keyof JobsItemAttributes as `prop:${K}`]?: JobsItem[K] };
691
911
  "jobs-list-only": Omit<JobsListOnly, keyof JobsListOnlyAttributes> & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes]?: JobsListOnly[K] } & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes as `attr:${K}`]?: JobsListOnlyAttributes[K] } & { [K in keyof JobsListOnly & keyof JobsListOnlyAttributes as `prop:${K}`]?: JobsListOnly[K] };
912
+ "jobs-list-reactive": Omit<JobsListReactive, keyof JobsListReactiveAttributes> & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes]?: JobsListReactive[K] } & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes as `attr:${K}`]?: JobsListReactiveAttributes[K] } & { [K in keyof JobsListReactive & keyof JobsListReactiveAttributes as `prop:${K}`]?: JobsListReactive[K] };
692
913
  }
693
914
  }
694
915
  export { LocalJSX as JSX };
@@ -697,6 +918,7 @@ declare module "@stencil/core" {
697
918
  interface IntrinsicElements {
698
919
  "fast-button": LocalJSX.IntrinsicElements["fast-button"] & JSXBase.HTMLAttributes<HTMLFastButtonElement>;
699
920
  "fast-carousel": LocalJSX.IntrinsicElements["fast-carousel"] & JSXBase.HTMLAttributes<HTMLFastCarouselElement>;
921
+ "fast-input": LocalJSX.IntrinsicElements["fast-input"] & JSXBase.HTMLAttributes<HTMLFastInputElement>;
700
922
  /**
701
923
  * JobCard Component
702
924
  * A reusable card component for displaying job information based on the React JobItem component.
@@ -721,6 +943,7 @@ declare module "@stencil/core" {
721
943
  "job-card": LocalJSX.IntrinsicElements["job-card"] & JSXBase.HTMLAttributes<HTMLJobCardElement>;
722
944
  "jobs-item": LocalJSX.IntrinsicElements["jobs-item"] & JSXBase.HTMLAttributes<HTMLJobsItemElement>;
723
945
  "jobs-list-only": LocalJSX.IntrinsicElements["jobs-list-only"] & JSXBase.HTMLAttributes<HTMLJobsListOnlyElement>;
946
+ "jobs-list-reactive": LocalJSX.IntrinsicElements["jobs-list-reactive"] & JSXBase.HTMLAttributes<HTMLJobsListReactiveElement>;
724
947
  }
725
948
  }
726
949
  }
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as r}from"./p-C_ZLQIpp.js";const c=class{constructor(r){t(this,r),this.buttonClick=o(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 r("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},r("slot",{key:"49845d350e4665c5c66e30bd9262f788eaaa1e20"}))}};c.style=":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}";export{c as fast_button}
@@ -0,0 +1 @@
1
+ import{r as n,g as t,h as e}from"./p-C_ZLQIpp.js";function o(n){return"number"==typeof n}function r(n){return"string"==typeof n}function i(n){return"boolean"==typeof n}function s(n){return"[object Object]"===Object.prototype.toString.call(n)}function c(n){return Math.abs(n)}function u(n){return Math.sign(n)}function l(n,t){return c(n-t)}function a(n){return g(n).map(Number)}function d(n){return n[f(n)]}function f(n){return Math.max(0,n.length-1)}function h(n,t){return t===f(n)}function p(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function g(n){return Object.keys(n)}function b(n,t){return[n,t].reduce(((n,t)=>(g(t).forEach((e=>{const o=n[e],r=t[e],i=s(o)&&s(r);n[e]=i?b(o,r):r})),n)),{})}function m(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function y(){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 v(n=0,t=0){const e=c(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 x(n,t,e){const{constrain:o}=v(0,n),r=n+1;let i=s(t);function s(n){return e?c((r+n)%r):o(n)}function u(){return i}function l(){return x(n,u(),e)}const a={get:u,set:function(n){return i=s(n),a},add:function(n){return l().set(u()+n)},clone:l};return a}function _(n,t,e,o,r,s,a,d,f,h,p,g,b,x,_,k,w,S,L){const{cross:C,direction:I}=n,M=["INPUT","SELECT","TEXTAREA"],E={passive:!1},T=y(),A=y(),N=v(50,225).constrain(x.measure(20)),R={mouse:300,touch:400},z={mouse:500,touch:600},O=_?43:25;let j=!1,B=0,F=0,D=!1,H=!1,P=!1,$=!1;function G(n){if(!m(n,o)&&n.touches.length>=2)return V(n);const t=s.readPoint(n),e=s.readPoint(n,C),i=l(t,B),c=l(e,F);if(!H&&!$){if(!n.cancelable)return V(n);if(H=i>c,!H)return V(n)}const u=s.pointerMove(n);i>k&&(P=!0),h.useFriction(.3).useDuration(.75),d.start(),r.add(I(u)),n.preventDefault()}function V(n){const t=p.byDistance(0,!1).index!==g.get(),e=s.pointerUp(n)*(_?z:R)[$?"mouse":"touch"],o=function(n,t){const e=g.add(-1*u(n)),o=p.byDistance(n,!_).distance;return _||c(n)<N?o:w&&t?.5*o:p.byIndex(e.get(),0).distance}(I(e),t),r=function(n,t){if(0===n||0===t)return 0;if(c(n)<=c(t))return 0;const e=l(c(n),c(t));return c(e/n)}(e,o),i=O-10*r,a=S+r/50;H=!1,D=!1,A.clear(),h.useDuration(i).useFriction(a),f.distance(o,!_),$=!1,b.emit("pointerUp")}function W(n){P&&(n.stopPropagation(),n.preventDefault(),P=!1)}return{init:function(n){if(!L)return;function c(c){(i(L)||L(n,c))&&function(n){const i=m(n,o);$=i,P=_&&i&&!n.buttons&&j,j=l(r.get(),a.get())>=2,i&&0!==n.button||function(n){return M.includes(n.nodeName||"")}(n.target)||(D=!0,s.pointerDown(n),h.useFriction(0).useDuration(0),r.set(a),function(){const n=$?e:t;A.add(n,"touchmove",G,E).add(n,"touchend",V).add(n,"mousemove",G,E).add(n,"mouseup",V)}(),B=s.readPoint(n),F=s.readPoint(n,C),b.emit("pointerDown"))}(c)}const u=t;T.add(u,"dragstart",(n=>n.preventDefault()),E).add(u,"touchmove",(()=>{}),E).add(u,"touchend",(()=>{})).add(u,"touchstart",c).add(u,"mousedown",c).add(u,"touchcancel",V).add(u,"contextmenu",V).add(u,"click",W,!0)},destroy:function(){T.clear(),A.clear()},pointerDown:function(){return D}}}function k(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(m(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),u=r(n)-r(o)>170,l=t/s;return s&&!u&&c(l)>.1?l:0},readPoint:i}}function w(n,t,e,o,r,s,u){const l=[n].concat(o);let a,d,f=[],h=!1;function p(n){return r.measureSize(u.measure(n))}return{init:function(r){s&&(d=p(n),f=o.map(p),a=new ResizeObserver((e=>{(i(s)||s(r,e))&&function(e){for(const i of e){if(h)return;const e=i.target===n,s=o.indexOf(i.target),u=e?d:f[s];if(c(p(e?n:o[s])-u)>=.5){r.reInit(),t.emit("resize");break}}}(e)})),e.requestAnimationFrame((()=>{l.forEach((n=>a.observe(n)))})))},destroy:function(){h=!0,a&&a.disconnect()}}}function S(n,t,e,o,r){const i=r.measure(10),s=r.measure(50),u=v(.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=c(n[l]-t.get()),f=e.get()-t.get(),h=u.constrain(d/s);e.subtract(f*h),!r&&c(f)<i&&(e.set(n.constrain(e.get())),o.useDuration(25).useBaseFriction())},toggleActive:function(n){l=!n}}}function L(n,t,e,o){const r=t.min+.1,i=t.max+.1,{reachedMin:s,reachedMax:c}=v(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 C(n){let t=n;function e(n){return o(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=(c=n.direction(t),Math.round(100*c)/100);var c;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=a(r),d=p(h(a(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:C(-1),translate:I(n,u[t]),target:()=>c.get()>i?o:r}}))}return{canLoop:function(){return d.every((({index:n})=>f(l.filter((t=>t!==n)),t)<=.1))},clear:function(){d.forEach((n=>n.translate.clear()))},loop:function(){d.forEach((n=>{const{target:t,translate:e,slideLocation:o}=n,r=t();r!==o.get()&&(e.to(r),o.set(r))}))},loopPoints:d}}function E(n,t,e){let o,r=!1;return{init:function(s){e&&(o=new MutationObserver((n=>{r||(i(e)||e(s,n))&&function(n){for(const e of n)if("childList"===e.type){s.reInit(),t.emit("slidesChanged");break}}(n)})),o.observe(n,{childList:!0}))},destroy:function(){o&&o.disconnect(),r=!0}}}function T(n,t,e,s,b,m,T){const{align:A,axis:N,direction:R,startIndex:z,loop:O,duration:j,dragFree:B,dragThreshold:F,inViewThreshold:D,slidesToScroll:H,skipSnaps:P,containScroll:$,watchResize:G,watchSlides:V,watchDrag:W,watchFocus:Q}=m,U={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=U.measure(t),X=e.map(U.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),Z=function(n){return{measure:function(t){return n*(t/100)}}}(Y),K=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,i){return r(n)?e[n](o):n(t,o,i)}}}(A,Y),nn=!O&&!!$,tn=O||!!$,{slideSizes:en,slideSizesWithGaps:on,startGap:rn,endGap:sn}=function(n,t,e,o,r,i){const{measureSize:s,startEdge:u,endEdge:l}=n,a=e[0]&&r,f=a?c(t[u]-e[0][u]):0,p=function(){if(!a)return 0;const n=i.getComputedStyle(d(o));return parseFloat(n.getPropertyValue(`margin-${l}`))}(),g=e.map(s),b=e.map(((n,t,e)=>{const o=!t,r=h(e,t);return o?g[t]+f:r?g[t]+p:e[t+1][u]-n[u]})).map(c);return{slideSizes:g,slideSizesWithGaps:b,startGap:f,endGap:p}}(J,q,X,e,tn,b),cn=function(n,t,e,r,i,s,u,l,h){const{startEdge:p,endEdge:g,direction:b}=n,m=o(e);return{groupSlides:function(n){return m?function(n,t){return a(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,e):function(n){return n.length?a(n).reduce(((e,o,a)=>{const m=d(e)||0,y=0===m,v=o===f(n),x=i[p]-s[m][p],_=i[p]-s[o][g],k=!r&&y?b(u):0,w=c(_-(!r&&v?b(l):0)-(x+k));return a&&w>t+h&&e.push(o),v&&e.push(n.length),e}),[]).map(((t,e,o)=>{const r=Math.max(o[e-1]||0);return n.slice(r,t)})):[]}(n)}}}(J,Y,H,O,q,X,rn,sn,2),{snaps:un,snapsAligned:ln}=function(n,t,e,o,r){const{startEdge:i,endEdge:s}=n,{groupSlides:u}=r,l=u(o).map((n=>d(n)[s]-n[0][i])).map(c).map(t.measure),a=o.map((n=>e[i]-n[i])).map((n=>-c(n))),f=u(a).map((n=>n[0])).map(((n,t)=>n+l[t]));return{snaps:a,snapsAligned:f}}(J,K,q,X,cn),an=-d(un)+d(on),{snapsContained:dn,scrollContainLimit:fn}=function(n,t,e,o){const r=v(-t+n,0),i=e.map(((n,t)=>{const{min:o,max:i}=r,s=r.constrain(n),u=!t,l=h(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=d(i);return v(i.lastIndexOf(n),i.indexOf(t)+1)}();function c(n,t){return l(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,$),hn=nn?dn:ln,{limit:pn}=function(n,t,e){const o=t[0];return{limit:v(e?o-n:d(t),o)}}(an,hn,O),gn=x(f(hn),z,O),bn=gn.clone(),mn=a(e),yn=function(n,t,e,o){const r=y(),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}}(s,b,(()=>(({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,b=g&&!c.pointerDown();b&&u.stop();const m=e.get()*f+r.get()*(1-f);o.set(m),d&&(i.loop(n.direction()),s.loop()),t.to(o.get()),b&&l.emit("settle"),g||l.emit("scroll")})(Nn,n))),vn=hn[gn.get()],xn=C(vn),_n=C(vn),kn=C(vn),wn=C(vn),Sn=function(n,t,e,o,r){let i=0,s=0,l=r,a=.68,d=n.get(),f=0;function h(n){return l=n,g}function p(n){return a=n,g}const g={direction:function(){return s},duration:function(){return l},velocity:function(){return i},seek:function(){const t=o.get()-n.get();let r=0;return l?(e.set(n),i+=t/l,i*=a,d+=i,n.add(i),r=d-f):(i=0,e.set(o),n.set(o),r=t),s=u(r),f=d,g},settled:function(){return c(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),Ln=function(n,t,e,o,r){const{reachedAny:i,removeOffset:s,constrain:l}=o;function a(n){return n.concat().sort(((n,t)=>c(n)-c(t)))[0]}function f(t,o){const r=[t,t+e,t-e];if(!n)return t;if(!o)return a(r);const i=r.filter((n=>u(n)===o));return i.length?a(i):d(r)-e}return{byDistance:function(e,o){const u=r.get()+e,{index:a,distance:d}=function(e){const o=n?s(e):l(e),r=t.map(((n,t)=>({diff:f(n-o,0),index:t}))).sort(((n,t)=>c(n.diff)-c(t.diff))),{index:i}=r[0];return{index:i,distance:o}}(u),h=!n&&i(u);return!o||h?{index:a,distance:e}:{index:a,distance:e+f(t[a]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-r.get(),e)}},shortcut:f}}(O,hn,an,pn,wn),Cn=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,bn,Sn,Ln,wn,T),In=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),Mn=y(),En=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 g(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,T,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=h(e,t);return o?p(d(e[0])+1):r?p(f(i)-d(e)[0]+1,d(e)[0]):n})):o}()}}(nn,$,hn,fn,cn,mn),An=function(n,t,e,r,s,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=>{(i(l)||l(h,t))&&function(t){if((new Date).getTime()-d>10)return;u.emit("slideFocusStart"),n.scrollLeft=0;const i=e.findIndex((n=>n.includes(t)));o(i)&&(s.useDuration(0),r.index(i,0),u.emit("slideFocus"))}(f)}),a)})))}}}(n,e,Tn,Cn,Sn,Mn,T,Q),Nn={ownerDocument:s,ownerWindow:b,eventHandler:T,containerRect:q,slideRects:X,animation:yn,axis:J,dragHandler:_(J,n,s,b,wn,k(J,b),xn,yn,Cn,Sn,Ln,gn,T,Z,B,F,P,.68,W),eventStore:Mn,percentOfView:Z,index:gn,indexPrevious:bn,limit:pn,location:xn,offsetLocation:kn,previousLocation:_n,options:m,resizeHandler:w(t,T,b,e,J,G,U),scrollBody:Sn,scrollBounds:S(pn,kn,wn,Sn,Z),scrollLooper:L(an,pn,kn,[xn,kn,_n,wn]),scrollProgress:In,scrollSnapList:hn.map(In.get),scrollSnaps:hn,scrollTarget:Ln,scrollTo:Cn,slideLooper:M(J,Y,an,en,on,un,hn,kn,e),slideFocus:An,slidesHandler:E(t,T,V),slidesInView:En,slideIndexes:mn,slideRegistry:Tn,slidesToScroll:cn,target:wn,translate:I(J,t)};return Nn}const A={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 N(n){function t(n,t){return b(n,t||{})}return{mergeOptions:t,optionsAtMedia:function(e){const o=e.breakpoints||{},r=g(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=>g(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}}}function R(n,t,e){const o=n.ownerDocument,i=o.defaultView,s=N(i),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=y(),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,b=M;let m,v,x,_,k=!1,w=a(A,R.globalOptions),S=a(w),L=[];function C(t){const e=T(n,x,_,o,i,t,l);return t.loop&&!e.slideLooper.canLoop()?C(Object.assign({},t,{loop:!1})):e}function I(t,e){k||(w=a(w,t),S=d(w),L=e||L,function(){const{container:t,slides:e}=S,o=r(t)?n.querySelector(t):t;x=o||n.children[0];const i=r(e)?x.querySelectorAll(e):e;_=[].slice.call(i||x.children)}(),m=C(S),f([w,...L.map((({options:n})=>n))]).forEach((n=>u.add(n,"change",M))),S.active&&(m.translate.to(m.location.get()),m.animation.init(),m.slidesInView.init(),m.slideFocus.init(j),m.eventHandler.init(j),m.resizeHandler.init(j),m.slidesHandler.init(j),m.options.loop&&m.slideLooper.loop(),x.offsetParent&&_.length&&m.dragHandler.init(j),v=c.init(j,L)))}function M(n,t){const e=O();E(),I(a({startIndex:e},n),t),l.emit("reInit")}function E(){m.dragHandler.destroy(),m.eventStore.clear(),m.translate.clear(),m.slideLooper.clear(),m.resizeHandler.destroy(),m.slidesHandler.destroy(),m.slidesInView.destroy(),m.animation.destroy(),c.destroy(),u.clear()}function z(n,t,e){S.active&&!k&&(m.scrollBody.useBaseFriction().useDuration(!0===t?0:S.duration),m.scrollTo.index(n,e||0))}function O(){return m.index.get()}const j={canScrollNext:function(){return m.index.add(1).get()!==O()},canScrollPrev:function(){return m.index.add(-1).get()!==O()},containerNode:function(){return x},internalEngine:function(){return m},destroy:function(){k||(k=!0,u.clear(),E(),l.emit("destroy"),l.clear())},off:p,on:h,emit:g,plugins:function(){return v},previousScrollSnap:function(){return m.indexPrevious.get()},reInit:b,rootNode:function(){return n},scrollNext:function(n){z(m.index.add(1).get(),n,-1)},scrollPrev:function(n){z(m.index.add(-1).get(),n,1)},scrollProgress:function(){return m.scrollProgress.get(m.offsetLocation.get())},scrollSnapList:function(){return m.scrollSnapList},scrollTo:z,selectedScrollSnap:O,slideNodes:function(){return _},slidesInView:function(){return m.slidesInView.get()},slidesNotInView:function(){return m.slidesInView.get(!1)}};return I(t,e),setTimeout((()=>l.emit("init")),0),j}R.globalOptions=void 0;const z=class{constructor(t){n(this,t)}get el(){return t(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=R(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 e("div",{key:"3a2ea6c339bf0fe656e5a333789df7a37156b5dc",class:`carousel ${this.class||""}`.trim()},e("div",{key:"0a73b925095ae3188e5e40b024bc250e4c183894",class:`carousel__viewport ${this.slideClass||""}`.trim(),ref:n=>this.viewportRef=n},e("div",{key:"7fc3b5a72e386f7fa21702aeb363e08da1b728cf",class:"carousel__container",ref:n=>this.containerRef=n},t&&n?n.map(((n,t)=>e("div",{key:t,class:`carousel__slide ${this.itemClass||""}`.trim()},"object"==typeof n&&null!==n&&"content"in n?n.content:String(n)))):null)),!t&&e("div",{key:"dee2fc91470728c136c9853cd74ae350ad3c5676",style:{display:"none"},"aria-hidden":"true"},e("slot",{key:"35dd47c03a1b9b6b73d845252c3d0482590f7da2",ref:n=>this.slotRef=n})),e("div",{key:"df639ad86ae8533f1dc15eed30afb70d99e36e1a",class:`carousel__controls ${this.controlClass||""}`.trim()},e("button",{key:"c17c0ea9bf023b5d2621e558c957d92b13425584",type:"button","aria-label":"Previous",class:"carousel__prev",ref:n=>this.prevBtnRef=n},e("svg",{key:"5125abcae0b08ee72106d511b4c24c2d0f24187b",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},e("path",{key:"9b7f28be56f451ad14de226d7163a5587a1cd9e6","stroke-linecap":"round","stroke-linejoin":"round",d:"M15.75 19.5L8.25 12l7.5-7.5"}))),e("div",{key:"9939d3496092a3f319efac9132cec8097c83b497",class:"carousel__dots",ref:n=>this.dotsRef=n}),e("button",{key:"a0b1228f6df0065885f1d272386283926e78464b",type:"button","aria-label":"Next",class:"carousel__next",ref:n=>this.nextBtnRef=n},e("svg",{key:"e00c92cc0485f41a30e97d5d0466aaee48a64998",class:"carousel__icon","stroke-width":"1.5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true"},e("path",{key:"a35c46fdbd1cd333d3e6f76590f45dd837546165","stroke-linecap":"round","stroke-linejoin":"round",d:"M8.25 4.5l7.5 7.5-7.5 7.5"})))))}};z.style=":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)}";export{z as fast_carousel}
@@ -1 +1 @@
1
- import{r as e,h as o}from"./p-Dk5CvWmb.js";const r=class{constructor(o){e(this,o)}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const r=function(e){const o=e.locations;if(o?.length)return o[0]}(e),a=r?(t=r).cityStateAbbr?t.cityStateAbbr:[t.streetAddress,t.city,t.stateAbbr||t.state,t.countryAbbr||t.country].filter(Boolean).join(", ")||t.locationText||"":"";var t;const n=r?.distance??0,s=n>0?this.formatDistance(n):"",i=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),c=`${this.applyButtonText}, ${e.title||""}`,l=e.locations??[],d=l.length>1;return o("div",{class:`job-card ${this.rootClass}`.trim()},o("div",{class:"job-card__header"},o("h3",{class:"job-card__title"},o("a",{class:"job-card__title--link",href:i,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&o("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&o("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),s&&o("div",{class:"job-card__distance"},o("span",{class:"job-card__distance--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),o("span",{class:"job-card__distance--label"},s))),o("div",{class:"job-card__content"},o("div",{class:"job-card__info"},o("div",{class:l.length?"job-card__street":"job-card__street job-card__street--empty"},o("div",{class:"job-card__street--label__wrapper"},o("span",{class:"job-card__street--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),o("span",{class:"job-card__street--label"},a||"—")),d&&o("div",{class:"job-card__street--more-locations__wrapper"},o("span",{class:"job-card__street--amount"},"+",l.length-1),o("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&o("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},o("span",{class:"job-card__brand--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),o("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&o("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},o("span",{class:"job-card__employment-type--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),e.employmentType?.length?e.employmentType?.map((e=>o("span",{key:e,class:"job-card__employment-type--label"},e))):o("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,r)=>o("div",{key:r,class:this.isEmpty(e.value)?`${e.classname}--empty`:`${e.classname}`},Array.isArray(e.value)?e.value.map(((r,a)=>o("span",{key:a,class:`${e.classname}--label`},r))):o("span",{class:`${e.classname}--label`},e.value))))),o("a",{class:"job-card__apply",href:i,target:"_blank",rel:"noopener noreferrer","aria-label":c},o("span",{class:"job-card__apply--label"},this.applyButtonText),o("span",{class:"job-card__apply--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}};r.style=".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}";export{r as job_card}
1
+ import{r as e,h as o}from"./p-C_ZLQIpp.js";const r=class{constructor(o){e(this,o)}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;showCommuteTime=!1;streetFormat="{street}, {city_state_abbr}";rootClass="";extraFieldsConfig=[];formatDistance(e){const o=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*e:e).toFixed(1)} ${o}`.replace(".0","")}isEmpty(e){return null==e||""===e||!(!Array.isArray(e)||0!==e.length)}getJobData(){if(!this.job)return null;if("string"==typeof this.job)try{return JSON.parse(this.job)}catch{return console.warn("job-card: Failed to parse job JSON string"),null}return this.job}render(){const e=this.getJobData();if(!e)return null;const r=function(e){const o=e.locations;if(o?.length)return o[0]}(e),a=r?(t=r).cityStateAbbr?t.cityStateAbbr:[t.streetAddress,t.city,t.stateAbbr||t.state,t.countryAbbr||t.country].filter(Boolean).join(", ")||t.locationText||"":"";var t;const n=r?.distance??0,s=n>0?this.formatDistance(n):"",i=e.applyURL||(e.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${e.originalURL}`:"#"),c=`${this.applyButtonText}, ${e.title||""}`,l=e.locations??[],d=l.length>1;return o("div",{class:`job-card ${this.rootClass}`.trim()},o("div",{class:"job-card__header"},o("h3",{class:"job-card__title"},o("a",{class:"job-card__title--link",href:i,target:"_blank",rel:"noopener noreferrer"},e.title||""),this.showReference&&o("span",{class:"job-card__reference "+(e.reference?"":"job-card__reference--empty")},e.reference||""),e.isRemote&&o("span",{class:this.remoteLocationText?"job-card__remote":"job-card__remote job-card__remote--empty"},this.remoteLocationText)),s&&o("div",{class:"job-card__distance"},o("span",{class:"job-card__distance--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),o("span",{class:"job-card__distance--label"},s))),o("div",{class:"job-card__content"},o("div",{class:"job-card__info"},o("div",{class:l.length?"job-card__street":"job-card__street job-card__street--empty"},o("div",{class:"job-card__street--label__wrapper"},o("span",{class:"job-card__street--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),o("span",{class:"job-card__street--label"},a||"—")),d&&o("div",{class:"job-card__street--more-locations__wrapper"},o("span",{class:"job-card__street--amount"},"+",l.length-1),o("span",{class:"job-card__street--more-locations"},this.multiLocationText))),this.showBrand&&o("div",{class:e.brandName?"job-card__brand":"job-card__brand job-card__brand--empty"},o("span",{class:"job-card__brand--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),o("span",{class:"job-card__brand--label"},e.brandName||"—")),this.showEmploymentType&&o("div",{class:e.employmentType?.length?"job-card__employment-type":"job-card__employment-type job-card__employment-type--empty"},o("span",{class:"job-card__employment-type--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),e.employmentType?.length?e.employmentType?.map((e=>o("span",{key:e,class:"job-card__employment-type--label"},e))):o("span",{class:"job-card__employment-type--label"},"—")),(e.jobCardExtraFields??[]).length>0&&e.jobCardExtraFields?.map(((e,r)=>o("div",{key:r,class:this.isEmpty(e.value)?`${e.classname}--empty`:`${e.classname}`},Array.isArray(e.value)?e.value.map(((r,a)=>o("span",{key:a,class:`${e.classname}--label`},r))):o("span",{class:`${e.classname}--label`},e.value))))),o("a",{class:"job-card__apply",href:i,target:"_blank",rel:"noopener noreferrer","aria-label":c},o("span",{class:"job-card__apply--label"},this.applyButtonText),o("span",{class:"job-card__apply--icon"},o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},o("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13.5 4.5 21 12m0 0-7.5 7.5M21 12H3"}))))))}};r.style=".job-card{display:block;padding:16px;border:1px solid #e0e0e0;border-radius:8px;background-color:#fff;box-shadow:0 2px 4px rgba(0, 0, 0, 0.08);transition:box-shadow 0.2s ease, border-color 0.2s ease}.job-card:hover{box-shadow:0 4px 8px rgba(0, 0, 0, 0.12);border-color:#d0d0d0}.job-card__header{margin-bottom:12px}.job-card__title{margin:0;font-size:18px;font-weight:700;display:flex;align-items:center;flex-wrap:wrap;gap:8px}.job-card__title--link{text-decoration:none;color:#1f9755;transition:color 0.2s ease}.job-card__title--link:hover{text-decoration:underline;color:#1a7a43}.job-card__reference{font-size:0.875em;color:#666;background-color:#f5f5f5;padding:2px 6px;border-radius:3px}.job-card__reference--empty{display:none}.job-card__remote{background:#e8f5e9;color:#2e7d32;border-radius:100px;padding:4px 12px;text-transform:uppercase;font-size:11px;font-weight:700;line-height:1.5;white-space:nowrap}.job-card__remote--empty{display:none}.job-card__distance{display:inline-flex;align-items:center;gap:4px;margin-top:6px;font-size:13px;font-weight:500;color:#555}.job-card__distance--icon{display:inline-flex;align-items:center}.job-card__distance--icon svg{width:16px;height:16px;color:#1f9755}.job-card__content{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.job-card__info{flex:1;display:flex;flex-direction:column;gap:8px}.job-card__street,.job-card__brand,.job-card__employment-type{display:flex;align-items:center;flex-wrap:wrap;gap:4px 6px;font-size:14px}.job-card__street--empty,.job-card__brand--empty,.job-card__employment-type--empty{color:#999}.job-card__street--icon,.job-card__brand--icon,.job-card__employment-type--icon{display:inline-flex;align-items:center;flex-shrink:0}.job-card__street--icon svg,.job-card__brand--icon svg,.job-card__employment-type--icon svg{width:16px;height:16px;color:#666}.job-card__street--label,.job-card__brand--label,.job-card__employment-type--label{color:#333}.job-card__street--label__wrapper{display:flex;align-items:center;gap:6px}.job-card__street--more-locations__wrapper{display:flex;align-items:center;gap:2px;font-size:12px;margin-left:2px}.job-card__street--amount{font-weight:600;color:#1f9755}.job-card__street--more-locations{color:#999}.job-card__apply{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 16px;background-color:#198754;color:#fff;border-radius:4px;text-decoration:none;font-weight:600;font-size:14px;transition:background-color 0.2s ease, transform 0.1s ease;white-space:nowrap;flex-shrink:0}.job-card__apply:hover{background-color:#1a6f47;transform:translateY(-1px)}.job-card__apply:active{transform:translateY(0)}.job-card__apply--icon{display:inline-flex;align-items:center}.job-card__apply--icon svg{width:14px;height:14px}@media (max-width: 768px){.job-card{padding:12px}.job-card__content{flex-direction:column;gap:10px}.job-card__apply{width:100%;justify-content:center}.job-card__title{font-size:16px}}@media (max-width: 480px){.job-card{padding:10px}.job-card__title{font-size:15px}.job-card__distance{font-size:12px}.job-card__street,.job-card__brand,.job-card__employment-type{font-size:13px}}";export{r as job_card}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as s,g as i}from"./p-C_ZLQIpp.js";const o=class{constructor(s){t(this,s),this.searchExecuted=e(this,"searchExecuted"),this.inputChanged=e(this,"inputChanged")}placeholder="Search...";value="";paramName="keyword";enableAutocomplete=!1;autocompleteUrl="/api/jobs/autocomplete";targetPath;debounceMs=300;minChars=3;searchExecuted;inputChanged;inputValue="";suggestions=[];showDropdown=!1;autocompleteLoading=!1;debounceTimer;popstateHandler;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)}updateUrlParam(t){const e=new URLSearchParams(window.location.search);t?e.set(this.paramName,t):e.delete(this.paramName);const s=e.toString(),i=s?`${window.location.pathname}?${s}`:window.location.pathname;history.pushState({},"",i)}submit(){this.updateUrlParam(this.inputValue),document.dispatchEvent(new CustomEvent("search-executed",{detail:{keyword:this.inputValue},bubbles:!0,composed:!0})),this.searchExecuted.emit({keyword:this.inputValue}),this.showDropdown=!1}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?this.submit():"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 new 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.submit()}render(){return s("div",{key:"3a9d31c7b109205600addc326d63979585f10bcd",class:"fast-input"},s("input",{key:"8f238fe9e002f367d4939616be8c06d938d76045",type:"text",class:"fast-input__field",placeholder:this.placeholder,value:this.inputValue,onInput:this.handleInput,onKeyDown:this.handleKeydown,onBlur:this.handleBlur}),s("button",{key:"7b7404f13432750ece669da8ce68be15179921de",class:"fast-input__button",type:"button",onClick:()=>this.submit()},"Search"),this.enableAutocomplete&&this.showDropdown&&s("ul",{key:"1438bacadc21c183842a8bdaa3f336bffb152e14",class:"fast-input__dropdown"},this.autocompleteLoading?s("li",{class:"fast-input__dropdown-loading"},"Loading..."):this.suggestions.map((t=>s("li",{class:"fast-input__dropdown-item",onMouseDown:t=>{t.preventDefault()},onClick:()=>this.selectSuggestion(t.title)},t.title)))))}};o.style=".fast-input{position:relative;display:inline-flex;gap:0.5rem}.fast-input__field{flex:1;padding:0.5rem 0.75rem;font-size:1rem;border:1px solid #ccc;border-radius:4px}.fast-input__button{padding:0.5rem 1rem;font-size:1rem;cursor:pointer;background:#0070f3;color:#fff;border:none;border-radius:4px}.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}";const r=class{constructor(e){t(this,e)}job;index=0;applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;formatDistance(t){const e=this.enableKilometers?"Km":"Miles";return`${(this.enableKilometers?1.60934*t:t).toFixed(1)} ${e}`.replace(".0","")}render(){if(!this.job)return null;const t=function(t){const e=t.locations;if(e?.length)return e[0]}(this.job),e=t?(i=t).cityStateAbbr?i.cityStateAbbr:[i.streetAddress,i.city,i.stateAbbr||i.state,i.countryAbbr||i.country].filter(Boolean).join(", ")||i.locationText||"":"";var i;const o=t?.distance??0,r=o>0?this.formatDistance(o):"",n=this.job.applyURL||(this.job.originalURL?`${"undefined"!=typeof window?window.location.origin:""}${this.job.originalURL}`:"#"),a=`${this.applyButtonText}, ${this.job.title||""}`,l=this.job.locations??[],c=l.length>1;return s("li",{class:"results-list__item"},s("div",{class:"results-list__item-header"},s("h3",{class:"results-list__item-title"},s("a",{class:"results-list__item-title--link",href:n,target:"_blank",rel:"noopener noreferrer"},this.job.title||""),this.showReference&&s("span",{class:"reference "+(this.job.reference?"":"empty")},this.job.reference||""),this.job.isRemote&&s("span",{class:this.remoteLocationText?"remote":"remote remote--empty"},this.remoteLocationText)),r&&s("div",{class:"results-list__item-distance"},s("span",{class:"results-list__item-distance--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18z"}),s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 8v4l2 2"}))),s("span",{class:"results-list__item-distance--label"},r))),s("div",{class:"results-list__item-content"},s("div",{class:"results-list__item-info"},s("div",{class:l.length?"results-list__item-street":"results-list__item-street results-list__item-street--empty"},s("div",{class:"results-list__item-street--label__wrapper"},s("span",{class:"results-list__item-street--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0z"}),s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0z"}))),s("span",{class:"results-list__item-street--label"},e||"—")),c&&s("div",{class:"results-list__item-street--more-locations__wrapper"},s("span",{class:"results-list__item-street--amount"},"+",l.length-1),s("span",{class:"results-list__item-street--more-locations"},this.multiLocationText))),this.showBrand&&s("div",{class:this.job.brandName?"results-list__item-brand":"results-list__item-brand results-list__item-brand--empty"},s("span",{class:"results-list__item-brand--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M2.25 21h19.5m-18-18v18m10.5-18v18m6-13.5V21M6.75 6.75h.75m-.75 3h.75m-.75 3h.75m3-6h.75m-.75 3h.75m-.75 3h.75M6.75 21v-3.375c0-.621.504-1.125 1.125-1.125h2.25c.621 0 1.125.504 1.125 1.125V21M3 3h12m-.75 4.5H21m-3.75 3.75h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008zm0 3h.008v.008h-.008v-.008z"}))),s("span",{class:"results-list__item-brand--label"},this.job.brandName||"—")),this.showEmploymentType&&s("div",{class:this.job.employmentType?.length?"results-list__item-employment-type":"results-list__item-employment-type results-list__item-employment-type--empty"},s("span",{class:"results-list__item-employment-type--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"1.5"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M12 6v6h4.5m4.5 0a9 9 0 1 1-18 0 9 9 0 0 1 18 0z"}))),(this.job.employmentType?.length?this.job.employmentType:["—"]).map((t=>s("span",{key:t,class:"results-list__item-employment-type--label"},t)))),(this.job.jobCardExtraFields??[]).map(((t,e)=>s("div",{key:e,class:(Array.isArray(t.value)?t.value.length:t.value)?t.classname:`${t.classname}--empty`},Array.isArray(t.value)?t.value.map(((e,i)=>s("span",{key:i,class:`${t.classname}--label`},e))):s("span",{class:`${t.classname}--label`},String(t.value)))))),s("a",{class:"results-list__item-apply",href:n,target:"_blank",rel:"noopener noreferrer","aria-label":a},s("span",{class:"results-list__item-apply--label"},this.applyButtonText),s("span",{class:"results-list__item-apply--icon"},s("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2"},s("path",{"stroke-linecap":"round","stroke-linejoin":"round",d:"M13 7l5 5m0 0l-5 5m5-5H6"}))))))}};r.style=".results-list__item{list-style:none;padding:10px 0;border-bottom:1px solid #ddd;margin:15px 0;display:inline-block;width:100%;position:relative}.results-list__item:last-child{border-bottom:none}.results-list__item-header{margin:10px 0;font-size:18px;font-weight:700;display:flex;flex-direction:column}.results-list__item-title{margin:0}.results-list__item-title--link{text-decoration:none;color:#1f9755}.results-list__item-title--link:hover{text-decoration:underline}.reference{margin-left:8px;font-size:0.9em;color:#666}.reference.empty{display:none}.remote{background:#f3f3f3;color:#808285;border-radius:100px;padding:6px 16px;text-transform:uppercase;font-size:12px;font-weight:700;line-height:24px;margin-left:8px}.remote--empty{display:none}.results-list__item-distance{display:inline-flex;align-items:center;gap:4px;margin-top:4px;font-size:14px;font-weight:400}.results-list__item-distance--icon{display:inline-flex}.results-list__item-distance--icon svg{width:16px;height:16px}.results-list__item-content{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-top:8px}.results-list__item-info{flex:1}.results-list__item-street,.results-list__item-brand,.results-list__item-employment-type{margin:10px 0;display:flex;flex-wrap:wrap;align-items:center;gap:4px 8px}.results-list__item-street--empty,.results-list__item-brand--empty,.results-list__item-employment-type--empty{color:#999}.results-list__item-street--icon,.results-list__item-brand--icon,.results-list__item-employment-type--icon{margin-right:6px;display:inline-flex}.results-list__item-street--icon svg,.results-list__item-brand--icon svg,.results-list__item-employment-type--icon svg{width:16px;height:16px}.results-list__item-street--more-locations__wrapper{margin-left:8px}.results-list__item-street--amount{font-weight:600}.results-list__item-apply{margin:10px 0;padding:10px 20px;display:inline-flex;align-items:center;gap:8px;background-color:#198754;color:#fff;border-radius:3px;text-decoration:none;font-weight:600;flex-shrink:0}.results-list__item-apply:hover{background-color:#1f9755;color:#fff}.results-list__item-apply--icon svg{width:14px;height:14px}";const n=[{title:"Senior Software Engineer",reference:"REF-001",originalURL:"/jobs/senior-software-engineer",applyURL:"https://apply.example.com/1",brandName:"Engineering",isRemote:!1,locations:[{city:"San Francisco",stateAbbr:"CA",countryAbbr:"US",distance:5.2,streetAddress:"123 Market St",cityStateAbbr:"San Francisco, CA"}],employmentType:["Full-time","Permanent"]},{title:"Product Manager",reference:"",originalURL:"/jobs/product-manager",brandName:"Product",isRemote:!0,locations:[],employmentType:["Full-time"]},{title:"UX Designer",reference:"REF-003",originalURL:"/jobs/ux-designer",brandName:"Design",isRemote:!1,locations:[{city:"New York",stateAbbr:"NY",countryAbbr:"US",distance:0,cityStateAbbr:"New York, NY"},{city:"Boston",stateAbbr:"MA",countryAbbr:"US",cityStateAbbr:"Boston, MA"}],employmentType:["Full-time","Contract"]}],a=class{constructor(s){t(this,s),this.fetchComplete=e(this,"fetchComplete")}mockData=!1;jobs=[];loading=!1;totalJob=0;noResultsLine1="Sorry, we're not able to load results for your search.";noResultsLine2="Please refine your keywords in the search bar above and try again.";applyButtonText="Apply Now";showBrand=!0;showReference=!1;showEmploymentType=!0;streetFormat="{street}, {city_state_abbr}";multiLocationText="More locations";remoteLocationText="Remote";enableKilometers=!1;rootClass="";showCountText="";showSuggestions=!1;clearResultSuggestionsTitleText="Suggestions";clearResultSuggestionsLine1="Try different keywords";clearResultSuggestionsLine2="Make sure everything is spelled correctly";clearResultSuggestionsLine3="Try other locations";clearResultSuggestionsLine4="";autoFetch=!1;apiUrl="/api/get-jobs";watchParams="keyword";fetchedJobs=[];fetchedTotal=0;fetchLoading=!1;fetchComplete;searchExecutedHandler;popstateHandler;connectedCallback(){this.autoFetch&&(this.fetchJobs(),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler))}disconnectedCallback(){this.autoFetch&&(document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler))}async fetchJobs(){this.fetchLoading=!0;const t=new URLSearchParams(window.location.search),e=this.watchParams.split(",").map((t=>t.trim())).filter(Boolean),s=new URLSearchParams;for(const i of e){const e=t.get(i);null!==e&&s.set(i,e)}const i=`${this.apiUrl}?${s.toString()}`;try{const t=await fetch(i,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!t.ok)throw new Error("fetch failed");const e=await t.json();this.fetchedJobs=e.jobs,this.fetchedTotal=e.totalJob,this.fetchComplete.emit({jobs:e.jobs,totalJob:e.totalJob})}catch{}finally{this.fetchLoading=!1}}renderCountText(t,e){return this.showCountText.replace("{count}",String(t)).replace("{total}",String(e))}getJobsArray(){if(this.mockData)return n;if(this.autoFetch)return this.fetchedJobs;const t=this.jobs;if(Array.isArray(t))return t;if("string"==typeof t)try{const e=JSON.parse(t);return Array.isArray(e)?e:[]}catch{return[]}return[]}renderJobItem(t,e){return s("jobs-item",{job:t,index:e,applyButtonText:this.applyButtonText,showBrand:this.showBrand,showReference:this.showReference,showEmploymentType:this.showEmploymentType,multiLocationText:this.multiLocationText,remoteLocationText:this.remoteLocationText,enableKilometers:this.enableKilometers})}render(){const t=this.getJobsArray(),e=!this.mockData&&(this.autoFetch?this.fetchLoading:this.loading),i=this.mockData?t.length:this.autoFetch?this.fetchedTotal:this.totalJob||t.length,o=!e&&0===i&&!this.showSuggestions,r=!e&&0===i&&this.showSuggestions;return s("div",{key:"1116855473d28d650641b9d962243bfcdcb434ec",class:`jobs-list-root ${this.rootClass}`.trim()},s("div",{key:"fcef04f1da9ad4e150af9f59921688f5781d9d43",class:"results-container"},this.autoFetch&&this.fetchLoading&&s("div",{key:"75b157c82c89691c7ce73d12ea0144b3b45485c3",class:"jobs-list-only__loading"},"Loading..."),s("div",{key:"b09f9879e10ee4a93e32177611912da5f19f3526",class:e?"loader":"loader hide","aria-hidden":!e}),i>0&&this.showCountText&&s("p",{key:"d10f800fb0a33d82531d5f1728bac4ceba2ed577",class:"jobs-list-only__count"},this.renderCountText(t.length,i)),i>0&&s("div",{key:"18153ed1338bd48f7be4f043b11ce15e3271f27b",class:"card"},s("ul",{key:"766e128b1fd5adb456530ae39e92ba8eb0b5d6cf",class:"results-list front"},t.map(((t,e)=>this.renderJobItem(t,e))))),o&&s("div",{key:"ed6f3d2bd2bbedabd6e69d508ea1425580e6941f",class:"share-jobs__no-results"},s("h2",{key:"2302656e33340c69e84cb949afb7256b8f35f440"},this.noResultsLine1),s("h3",{key:"1c7e6642441a96c04ee26883fdec4f81b0fe6cec"},this.noResultsLine2)),r&&s("div",{key:"be7af85f64455918545e88952ca6ff00f0a970c5",class:"card primary-color"},s("h4",{key:"2f63deb8131190eff882308544b15f767b6f3edc",class:"result-suggestions-title"},this.clearResultSuggestionsTitleText,":"),s("ul",{key:"cb18daaa9e2c2c442c5b906ed370dcd653b5262d",class:"results-list front"},s("li",{key:"ff1d5c6518b75c0daa35b43df7162b0dfecde25e",class:"result-suggestions-line"},this.clearResultSuggestionsLine1),s("li",{key:"4099fd7bf8dcf114eca28702a498ab0938f5de46",class:"result-suggestions-line"},this.clearResultSuggestionsLine2),s("li",{key:"fb65b54c3c0b14bc58112977eb4c7c56c1246a45",class:"result-suggestions-line"},this.clearResultSuggestionsLine3),this.clearResultSuggestionsLine4&&s("li",{key:"10f745e74cf68a2b1c42e6f49f810a8b59eb27b6",class:"result-suggestions-line"},this.clearResultSuggestionsLine4)))))}};a.style=":host{display:block}.jobs-list-root{list-style:none}.results-container{position:relative}.loader{display:inline-block;width:24px;height:24px;border:2px solid #ddd;border-top-color:#1f9755;border-radius:50%;animation:jobs-list-spin 0.8s linear infinite}.loader.hide{display:none}@keyframes jobs-list-spin{to{transform:rotate(360deg)}}.card{border:0}.results-list{list-style:none;margin:0;padding:0;display:block}.results-list.front{margin:3px 0}.share-jobs__no-results{padding:24px;text-align:center}.share-jobs__no-results h2,.share-jobs__no-results h3{margin:8px 0;font-weight:600}.card.primary-color{padding:16px;border-radius:4px;background:#f8f9fa}.result-suggestions-title{margin:0 0 12px 0;font-size:16px}.results-list .result-suggestions-line{list-style:none;margin:4px 0}";const l=class{constructor(s){t(this,s),this.fetchComplete=e(this,"fetchComplete")}get el(){return i(this)}apiUrl="/api/get-jobs";watchParams="keyword,location_name";loadingClass="loading";isLoading=!1;fetchComplete;templateEl=null;searchExecutedHandler;popstateHandler;connectedCallback(){this.templateEl=this.el.querySelector("template"),this.searchExecutedHandler=()=>this.fetchJobs(),this.popstateHandler=()=>this.fetchJobs(),document.addEventListener("search-executed",this.searchExecutedHandler),window.addEventListener("popstate",this.popstateHandler)}disconnectedCallback(){document.removeEventListener("search-executed",this.searchExecutedHandler),window.removeEventListener("popstate",this.popstateHandler)}buildQueryString(){const t=new URLSearchParams(window.location.search),e=this.watchParams.split(",").map((t=>t.trim())).filter(Boolean),s=new URLSearchParams;for(const i of e){const e=t.get(i);null!==e&&""!==e&&s.set(i,e)}return s.toString()}async fetchJobs(){this.isLoading=!0,this.el.classList.add(this.loadingClass);const t=this.buildQueryString(),e=t?`${this.apiUrl}?${t}`:this.apiUrl;try{const t=await fetch(e,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({disable_switch_search_mode:!1})});if(!t.ok)throw new Error("fetch failed");const s=await t.json();this.renderJobs(s.jobs),this.updateCountElements(s.jobs.length,s.totalJob),this.fetchComplete.emit({jobs:s.jobs,totalJob:s.totalJob})}catch{}finally{this.isLoading=!1,this.el.classList.remove(this.loadingClass)}}renderJobs(t){if(!this.templateEl)return;const e=Array.from(this.el.children);for(const t of e)t!==this.templateEl&&t.remove();for(const e of t){const t=this.templateEl.content.cloneNode(!0),s=t.querySelector("job-card");s&&s.setAttribute("job",JSON.stringify(e)),this.el.appendChild(t)}}updateCountElements(t,e){const s=document.querySelectorAll("[data-job-count]"),i=document.querySelectorAll("[data-job-total]");s.forEach((e=>{e.textContent=String(t)})),i.forEach((t=>{t.textContent=String(e)}))}render(){return s("slot",{key:"30a6fe9727eb877b6aafb99072c40811df121ba6"})}};l.style="jobs-list-reactive{display:block}jobs-list-reactive.loading{opacity:0.6;pointer-events:none}";export{o as fast_input,r as jobs_item,a as jobs_list_only,l as jobs_list_reactive}
@@ -1 +1 @@
1
- import{p as e,b as t}from"./p-Dk5CvWmb.js";export{s as setNonce}from"./p-Dk5CvWmb.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((async e=>(await o(),t([["p-52c85341",[[512,"job-card",{job:[1],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],showCommuteTime:[4,"show-commute-time"],streetFormat:[1,"street-format"],rootClass:[1,"root-class"],extraFieldsConfig:[16]}]]],["p-96761988",[[512,"jobs-list-only",{mockData:[4,"mock-data"],jobs:[1],loading:[4],totalJob:[2,"total-job"],noResultsLine1:[1,"no-results-line-1"],noResultsLine2:[1,"no-results-line-2"],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],streetFormat:[1,"street-format"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],rootClass:[1,"root-class"],showSuggestions:[4,"show-suggestions"],clearResultSuggestionsTitleText:[1,"clear-result-suggestions-title-text"],clearResultSuggestionsLine1:[1,"clear-result-suggestions-line-1"],clearResultSuggestionsLine2:[1,"clear-result-suggestions-line-2"],clearResultSuggestionsLine3:[1,"clear-result-suggestions-line-3"],clearResultSuggestionsLine4:[1,"clear-result-suggestions-line-4"]}],[772,"fast-button",{variant:[1],type:[1],disabled:[4]}],[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]}],[512,"jobs-item",{job:[16],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"]}]]]],e))));
1
+ import{p as e,b as t}from"./p-C_ZLQIpp.js";export{s as setNonce}from"./p-C_ZLQIpp.js";import{g as o}from"./p-DQuL1Twl.js";(()=>{const t=import.meta.url,o={};return""!==t&&(o.resourcesUrl=new URL(".",t).href),e(o)})().then((async e=>(await o(),t([["p-618fba28",[[772,"fast-button",{variant:[1],type:[1],disabled:[4]}]]],["p-7d45772f",[[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]}]]],["p-bef7c8e2",[[512,"job-card",{job:[1],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],showCommuteTime:[4,"show-commute-time"],streetFormat:[1,"street-format"],rootClass:[1,"root-class"],extraFieldsConfig:[16]}]]],["p-cfb9aed9",[[512,"jobs-list-only",{mockData:[4,"mock-data"],jobs:[1],loading:[4],totalJob:[2,"total-job"],noResultsLine1:[1,"no-results-line-1"],noResultsLine2:[1,"no-results-line-2"],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],streetFormat:[1,"street-format"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"],rootClass:[1,"root-class"],showCountText:[1,"show-count-text"],showSuggestions:[4,"show-suggestions"],clearResultSuggestionsTitleText:[1,"clear-result-suggestions-title-text"],clearResultSuggestionsLine1:[1,"clear-result-suggestions-line-1"],clearResultSuggestionsLine2:[1,"clear-result-suggestions-line-2"],clearResultSuggestionsLine3:[1,"clear-result-suggestions-line-3"],clearResultSuggestionsLine4:[1,"clear-result-suggestions-line-4"],autoFetch:[4,"auto-fetch"],apiUrl:[1,"api-url"],watchParams:[1,"watch-params"],fetchedJobs:[32],fetchedTotal:[32],fetchLoading:[32]}],[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]}],[772,"jobs-list-reactive",{apiUrl:[1,"api-url"],watchParams:[1,"watch-params"],loadingClass:[1,"loading-class"],isLoading:[32]}],[512,"jobs-item",{job:[16],index:[2],applyButtonText:[1,"apply-button-text"],showBrand:[4,"show-brand"],showReference:[4,"show-reference"],showEmploymentType:[4,"show-employment-type"],multiLocationText:[1,"multi-location-text"],remoteLocationText:[1,"remote-location-text"],enableKilometers:[4,"enable-kilometers"]}]]]],e))));