@tanstack/query-devtools 5.0.0-alpha.82 → 5.0.0-alpha.84

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.
@@ -1,4 +1,4 @@
1
- import { c as createRenderEffect, s as setAttribute, t as template, a as createMemo, o as onCleanup, $ as $TRACK, u as untrack, b as createRoot, d as createSignal, e as delegateEvents, i as insert, f as createComponent, g as className, S as Show, I as Index, h as addEventListener, M as Match, j as Switch, k as useContext, l as createContext, m as useTransition, n as onMount, p as createEffect, q as on, r as spread, v as mergeProps, w as use, F as For } from './index-9cbc91c2.js';
1
+ import { u as untrack, c as createSignal, a as createMemo, $ as $TRACK, b as useTransition, o as onCleanup, d as createRoot, e as onMount, f as createEffect, g as createRenderEffect, s as setAttribute, t as template, h as delegateEvents, i as insert, j as createComponent, k as className, S as Show, I as Index, l as addEventListener, M as Match, m as Switch, n as useContext, p as createContext, q as on, r as spread, v as mergeProps, w as use, F as For } from './index-7c6d68e3.js';
2
2
 
3
3
  /**
4
4
  * match-sorter-utils
@@ -2539,1182 +2539,1009 @@ var _createEmotion = createEmotion({
2539
2539
  cx = _createEmotion.cx,
2540
2540
  css = _createEmotion.css;
2541
2541
 
2542
- const ShadowVariants = {
2543
- xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
2544
- sm: '0 1px 3px 0 color, 0 1px 2px -1px color',
2545
- md: '0 4px 6px -1px color, 0 2px 4px -2px color',
2546
- lg: '0 10px 15px -3px color, 0 4px 6px -4px color',
2547
- xl: '0 20px 25px -5px color, 0 8px 10px -6px color',
2548
- '2xl': '0 25px 50px -12px color',
2549
- inner: 'inset 0 2px 4px 0 color',
2550
- none: 'none'
2551
- };
2552
- const getShadow = (variant, color = '') => {
2553
- return ShadowVariants[variant].replace(/color/g, color);
2554
- };
2555
- const Shadow = {
2556
- xs: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xs', color),
2557
- sm: (color = 'rgb(0 0 0 / 0.1)') => getShadow('sm', color),
2558
- md: (color = 'rgb(0 0 0 / 0.1)') => getShadow('md', color),
2559
- lg: (color = 'rgb(0 0 0 / 0.1)') => getShadow('lg', color),
2560
- xl: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xl', color),
2561
- '2xl': (color = 'rgb(0 0 0 / 0.25)') => getShadow('2xl', color),
2562
- inner: (color = 'rgb(0 0 0 / 0.05)') => getShadow('inner', color),
2563
- none: () => getShadow('none')
2564
- };
2565
- const tokens = {
2566
- colors: {
2567
- inherit: 'inherit',
2568
- current: 'currentColor',
2569
- transparent: 'transparent',
2570
- black: '#000000',
2571
- white: '#ffffff',
2572
- neutral: {
2573
- 50: '#f9fafb',
2574
- 100: '#f2f4f7',
2575
- 200: '#eaecf0',
2576
- 300: '#d0d5dd',
2577
- 400: '#98a2b3',
2578
- 500: '#667085',
2579
- 600: '#475467',
2580
- 700: '#344054',
2581
- 800: '#1d2939',
2582
- 900: '#101828'
2583
- },
2584
- darkGray: {
2585
- 50: '#525c7a',
2586
- 100: '#49536e',
2587
- 200: '#414962',
2588
- 300: '#394056',
2589
- 400: '#313749',
2590
- 500: '#292e3d',
2591
- 600: '#212530',
2592
- 700: '#191c24',
2593
- 800: '#111318',
2594
- 900: '#0b0d10'
2595
- },
2596
- gray: {
2597
- 50: '#f9fafb',
2598
- 100: '#f2f4f7',
2599
- 200: '#eaecf0',
2600
- 300: '#d0d5dd',
2601
- 400: '#98a2b3',
2602
- 500: '#667085',
2603
- 600: '#475467',
2604
- 700: '#344054',
2605
- 800: '#1d2939',
2606
- 900: '#101828'
2607
- },
2608
- blue: {
2609
- 25: '#F5FAFF',
2610
- 50: '#EFF8FF',
2611
- 100: '#D1E9FF',
2612
- 200: '#B2DDFF',
2613
- 300: '#84CAFF',
2614
- 400: '#53B1FD',
2615
- 500: '#2E90FA',
2616
- 600: '#1570EF',
2617
- 700: '#175CD3',
2618
- 800: '#1849A9',
2619
- 900: '#194185'
2620
- },
2621
- green: {
2622
- 25: '#F6FEF9',
2623
- 50: '#ECFDF3',
2624
- 100: '#D1FADF',
2625
- 200: '#A6F4C5',
2626
- 300: '#6CE9A6',
2627
- 400: '#32D583',
2628
- 500: '#12B76A',
2629
- 600: '#039855',
2630
- 700: '#027A48',
2631
- 800: '#05603A',
2632
- 900: '#054F31'
2633
- },
2634
- red: {
2635
- 25: '#FFFBFA',
2636
- 50: '#FEF3F2',
2637
- 100: '#FEE4E2',
2638
- 200: '#FECDCA',
2639
- 300: '#FDA29B',
2640
- 400: '#F97066',
2641
- 500: '#F04438',
2642
- 600: '#D92D20',
2643
- 700: '#B42318',
2644
- 800: '#912018',
2645
- 900: '#7A271A'
2646
- },
2647
- yellow: {
2648
- 25: '#FFFCF5',
2649
- 50: '#FFFAEB',
2650
- 100: '#FEF0C7',
2651
- 200: '#FEDF89',
2652
- 300: '#FEC84B',
2653
- 400: '#FDB022',
2654
- 500: '#F79009',
2655
- 600: '#DC6803',
2656
- 700: '#B54708',
2657
- 800: '#93370D',
2658
- 900: '#7A2E0E'
2659
- },
2660
- purple: {
2661
- 25: '#FAFAFF',
2662
- 50: '#F4F3FF',
2663
- 100: '#EBE9FE',
2664
- 200: '#D9D6FE',
2665
- 300: '#BDB4FE',
2666
- 400: '#9B8AFB',
2667
- 500: '#7A5AF8',
2668
- 600: '#6938EF',
2669
- 700: '#5925DC',
2670
- 800: '#4A1FB8',
2671
- 900: '#3E1C96'
2672
- },
2673
- teal: {
2674
- 25: '#F6FEFC',
2675
- 50: '#F0FDF9',
2676
- 100: '#CCFBEF',
2677
- 200: '#99F6E0',
2678
- 300: '#5FE9D0',
2679
- 400: '#2ED3B7',
2680
- 500: '#15B79E',
2681
- 600: '#0E9384',
2682
- 700: '#107569',
2683
- 800: '#125D56',
2684
- 900: '#134E48'
2685
- },
2686
- pink: {
2687
- 25: '#fdf2f8',
2688
- 50: '#fce7f3',
2689
- 100: '#fbcfe8',
2690
- 200: '#f9a8d4',
2691
- 300: '#f472b6',
2692
- 400: '#ec4899',
2693
- 500: '#db2777',
2694
- 600: '#be185d',
2695
- 700: '#9d174d',
2696
- 800: '#831843',
2697
- 900: '#500724'
2698
- },
2699
- cyan: {
2700
- 25: '#ecfeff',
2701
- 50: '#cffafe',
2702
- 100: '#a5f3fc',
2703
- 200: '#67e8f9',
2704
- 300: '#22d3ee',
2705
- 400: '#06b6d4',
2706
- 500: '#0891b2',
2707
- 600: '#0e7490',
2708
- 700: '#155e75',
2709
- 800: '#164e63',
2710
- 900: '#083344'
2711
- }
2712
- },
2713
- alpha: {
2714
- 100: 'ff',
2715
- 90: 'e5',
2716
- 80: 'cc',
2717
- 70: 'b3',
2718
- 60: '99',
2719
- 50: '80',
2720
- 40: '66',
2721
- 30: '4d',
2722
- 20: '33',
2723
- 10: '1a',
2724
- 0: '00'
2725
- },
2726
- font: {
2727
- size: {
2728
- '2xs': '0.625rem',
2729
- xs: '0.75rem',
2730
- sm: '0.875rem',
2731
- md: '1rem',
2732
- lg: '1.125rem',
2733
- xl: '1.25rem',
2734
- '2xl': '1.5rem',
2735
- '3xl': '1.875rem',
2736
- '4xl': '2.25rem',
2737
- '5xl': '3rem',
2738
- '6xl': '3.75rem',
2739
- '7xl': '4.5rem',
2740
- '8xl': '6rem',
2741
- '9xl': '8rem'
2742
- },
2743
- lineHeight: {
2744
- xs: '1rem',
2745
- sm: '1.25rem',
2746
- md: '1.5rem',
2747
- lg: '1.75rem',
2748
- xl: '1.75rem',
2749
- '2xl': '2rem',
2750
- '3xl': '2.25rem',
2751
- '4xl': '2.5rem',
2752
- '5xl': '1',
2753
- '6xl': '1',
2754
- '7xl': '1',
2755
- '8xl': '1',
2756
- '9xl': '1'
2757
- },
2758
- weight: {
2759
- thin: '100',
2760
- extralight: '200',
2761
- light: '300',
2762
- normal: '400',
2763
- medium: '500',
2764
- semibold: '600',
2765
- bold: '700',
2766
- extrabold: '800',
2767
- black: '900'
2768
- }
2769
- },
2770
- breakpoints: {
2771
- xs: '320px',
2772
- sm: '640px',
2773
- md: '768px',
2774
- lg: '1024px',
2775
- xl: '1280px',
2776
- '2xl': '1536px'
2777
- },
2778
- border: {
2779
- radius: {
2780
- none: '0px',
2781
- xs: '0.125rem',
2782
- sm: '0.25rem',
2783
- md: '0.375rem',
2784
- lg: '0.5rem',
2785
- xl: '0.75rem',
2786
- '2xl': '1rem',
2787
- '3xl': '1.5rem',
2788
- full: '9999px'
2789
- }
2790
- },
2791
- size: {
2792
- 0: '0px',
2793
- 0.25: '0.0625rem',
2794
- 0.5: '0.125rem',
2795
- 1: '0.25rem',
2796
- 1.5: '0.375rem',
2797
- 2: '0.5rem',
2798
- 2.5: '0.625rem',
2799
- 3: '0.75rem',
2800
- 3.5: '0.875rem',
2801
- 4: '1rem',
2802
- 4.5: '1.125rem',
2803
- 5: '1.25rem',
2804
- 6: '1.5rem',
2805
- 7: '1.75rem',
2806
- 8: '2rem',
2807
- 9: '2.25rem',
2808
- 10: '2.5rem',
2809
- 11: '2.75rem',
2810
- 12: '3rem',
2811
- 14: '3.5rem',
2812
- 16: '4rem',
2813
- 20: '5rem',
2814
- 24: '6rem',
2815
- 28: '7rem',
2816
- 32: '8rem',
2817
- 36: '9rem',
2818
- 40: '10rem',
2819
- 44: '11rem',
2820
- 48: '12rem',
2821
- 52: '13rem',
2822
- 56: '14rem',
2823
- 60: '15rem',
2824
- 64: '16rem',
2825
- 72: '18rem',
2826
- 80: '20rem',
2827
- 96: '24rem'
2828
- },
2829
- shadow: Shadow,
2830
- zIndices: {
2831
- hide: -1,
2832
- auto: 'auto',
2833
- base: 0,
2834
- docked: 10,
2835
- dropdown: 1000,
2836
- sticky: 1100,
2837
- banner: 1200,
2838
- overlay: 1300,
2839
- modal: 1400,
2840
- popover: 1500,
2841
- skipLink: 1600,
2842
- toast: 1700,
2843
- tooltip: 1800
2844
- }
2845
- };
2846
-
2847
- var DoubleIndexedKV = /** @class */function () {
2848
- function DoubleIndexedKV() {
2849
- this.keyToValue = new Map();
2850
- this.valueToKey = new Map();
2851
- }
2852
- DoubleIndexedKV.prototype.set = function (key, value) {
2853
- this.keyToValue.set(key, value);
2854
- this.valueToKey.set(value, key);
2855
- };
2856
- DoubleIndexedKV.prototype.getByKey = function (key) {
2857
- return this.keyToValue.get(key);
2858
- };
2859
- DoubleIndexedKV.prototype.getByValue = function (value) {
2860
- return this.valueToKey.get(value);
2861
- };
2862
- DoubleIndexedKV.prototype.clear = function () {
2863
- this.keyToValue.clear();
2864
- this.valueToKey.clear();
2865
- };
2866
- return DoubleIndexedKV;
2867
- }();
2868
-
2869
- var Registry = /** @class */function () {
2870
- function Registry(generateIdentifier) {
2871
- this.generateIdentifier = generateIdentifier;
2872
- this.kv = new DoubleIndexedKV();
2873
- }
2874
- Registry.prototype.register = function (value, identifier) {
2875
- if (this.kv.getByValue(value)) {
2876
- return;
2877
- }
2878
- if (!identifier) {
2879
- identifier = this.generateIdentifier(value);
2880
- }
2881
- this.kv.set(identifier, value);
2882
- };
2883
- Registry.prototype.clear = function () {
2884
- this.kv.clear();
2885
- };
2886
- Registry.prototype.getIdentifier = function (value) {
2887
- return this.kv.getByValue(value);
2888
- };
2889
- Registry.prototype.getValue = function (identifier) {
2890
- return this.kv.getByKey(identifier);
2891
- };
2892
- return Registry;
2893
- }();
2894
-
2895
- var __extends = undefined && undefined.__extends || function () {
2896
- var extendStatics = function (d, b) {
2897
- extendStatics = Object.setPrototypeOf || {
2898
- __proto__: []
2899
- } instanceof Array && function (d, b) {
2900
- d.__proto__ = b;
2901
- } || function (d, b) {
2902
- for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
2903
- };
2904
- return extendStatics(d, b);
2905
- };
2906
- return function (d, b) {
2907
- if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
2908
- extendStatics(d, b);
2909
- function __() {
2910
- this.constructor = d;
2911
- }
2912
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
2913
- };
2914
- }();
2915
- var ClassRegistry = /** @class */function (_super) {
2916
- __extends(ClassRegistry, _super);
2917
- function ClassRegistry() {
2918
- var _this = _super.call(this, function (c) {
2919
- return c.name;
2920
- }) || this;
2921
- _this.classToAllowedProps = new Map();
2922
- return _this;
2923
- }
2924
- ClassRegistry.prototype.register = function (value, options) {
2925
- if (typeof options === 'object') {
2926
- if (options.allowProps) {
2927
- this.classToAllowedProps.set(value, options.allowProps);
2928
- }
2929
- _super.prototype.register.call(this, value, options.identifier);
2930
- } else {
2931
- _super.prototype.register.call(this, value, options);
2932
- }
2933
- };
2934
- ClassRegistry.prototype.getAllowedProps = function (value) {
2935
- return this.classToAllowedProps.get(value);
2936
- };
2937
- return ClassRegistry;
2938
- }(Registry);
2939
-
2940
- var __read$3 = undefined && undefined.__read || function (o, n) {
2941
- var m = typeof Symbol === "function" && o[Symbol.iterator];
2942
- if (!m) return o;
2943
- var i = m.call(o),
2944
- r,
2945
- ar = [],
2946
- e;
2947
- try {
2948
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
2949
- } catch (error) {
2950
- e = {
2951
- error: error
2952
- };
2953
- } finally {
2954
- try {
2955
- if (r && !r.done && (m = i["return"])) m.call(i);
2956
- } finally {
2957
- if (e) throw e.error;
2958
- }
2959
- }
2960
- return ar;
2961
- };
2962
- function valuesOfObj(record) {
2963
- if ('values' in Object) {
2964
- // eslint-disable-next-line es5/no-es6-methods
2965
- return Object.values(record);
2966
- }
2967
- var values = [];
2968
- // eslint-disable-next-line no-restricted-syntax
2969
- for (var key in record) {
2970
- if (record.hasOwnProperty(key)) {
2971
- values.push(record[key]);
2972
- }
2973
- }
2974
- return values;
2975
- }
2976
- function find(record, predicate) {
2977
- var values = valuesOfObj(record);
2978
- if ('find' in values) {
2979
- // eslint-disable-next-line es5/no-es6-methods
2980
- return values.find(predicate);
2981
- }
2982
- var valuesNotNever = values;
2983
- for (var i = 0; i < valuesNotNever.length; i++) {
2984
- var value = valuesNotNever[i];
2985
- if (predicate(value)) {
2986
- return value;
2987
- }
2988
- }
2989
- return undefined;
2990
- }
2991
- function forEach(record, run) {
2992
- Object.entries(record).forEach(function (_a) {
2993
- var _b = __read$3(_a, 2),
2994
- key = _b[0],
2995
- value = _b[1];
2996
- return run(value, key);
2997
- });
2998
- }
2999
- function includes(arr, value) {
3000
- return arr.indexOf(value) !== -1;
3001
- }
3002
- function findArr(record, predicate) {
3003
- for (var i = 0; i < record.length; i++) {
3004
- var value = record[i];
3005
- if (predicate(value)) {
3006
- return value;
3007
- }
3008
- }
3009
- return undefined;
3010
- }
3011
-
3012
- var CustomTransformerRegistry = /** @class */function () {
3013
- function CustomTransformerRegistry() {
3014
- this.transfomers = {};
3015
- }
3016
- CustomTransformerRegistry.prototype.register = function (transformer) {
3017
- this.transfomers[transformer.name] = transformer;
3018
- };
3019
- CustomTransformerRegistry.prototype.findApplicable = function (v) {
3020
- return find(this.transfomers, function (transformer) {
3021
- return transformer.isApplicable(v);
3022
- });
3023
- };
3024
- CustomTransformerRegistry.prototype.findByName = function (name) {
3025
- return this.transfomers[name];
3026
- };
3027
- return CustomTransformerRegistry;
3028
- }();
3029
-
3030
- var getType$1 = function (payload) {
3031
- return Object.prototype.toString.call(payload).slice(8, -1);
3032
- };
3033
- var isUndefined = function (payload) {
3034
- return typeof payload === 'undefined';
3035
- };
3036
- var isNull = function (payload) {
3037
- return payload === null;
3038
- };
3039
- var isPlainObject$1 = function (payload) {
3040
- if (typeof payload !== 'object' || payload === null) return false;
3041
- if (payload === Object.prototype) return false;
3042
- if (Object.getPrototypeOf(payload) === null) return true;
3043
- return payload.constructor === Object && Object.getPrototypeOf(payload) === Object.prototype;
3044
- };
3045
- var isEmptyObject = function (payload) {
3046
- return isPlainObject$1(payload) && Object.keys(payload).length === 0;
3047
- };
3048
- var isArray$1 = function (payload) {
3049
- return Array.isArray(payload);
3050
- };
3051
- var isString = function (payload) {
3052
- return typeof payload === 'string';
3053
- };
3054
- var isNumber = function (payload) {
3055
- return typeof payload === 'number' && !isNaN(payload);
3056
- };
3057
- var isBoolean = function (payload) {
3058
- return typeof payload === 'boolean';
3059
- };
3060
- var isRegExp = function (payload) {
3061
- return payload instanceof RegExp;
3062
- };
3063
- var isMap = function (payload) {
3064
- return payload instanceof Map;
3065
- };
3066
- var isSet = function (payload) {
3067
- return payload instanceof Set;
3068
- };
3069
- var isSymbol = function (payload) {
3070
- return getType$1(payload) === 'Symbol';
3071
- };
3072
- var isDate = function (payload) {
3073
- return payload instanceof Date && !isNaN(payload.valueOf());
3074
- };
3075
- var isError = function (payload) {
3076
- return payload instanceof Error;
3077
- };
3078
- var isNaNValue = function (payload) {
3079
- return typeof payload === 'number' && isNaN(payload);
3080
- };
3081
- var isPrimitive = function (payload) {
3082
- return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
3083
- };
3084
- var isBigint = function (payload) {
3085
- return typeof payload === 'bigint';
3086
- };
3087
- var isInfinite = function (payload) {
3088
- return payload === Infinity || payload === -Infinity;
3089
- };
3090
- var isTypedArray = function (payload) {
3091
- return ArrayBuffer.isView(payload) && !(payload instanceof DataView);
3092
- };
3093
- var isURL = function (payload) {
3094
- return payload instanceof URL;
3095
- };
3096
-
3097
- var escapeKey = function (key) {
3098
- return key.replace(/\./g, '\\.');
3099
- };
3100
- var stringifyPath = function (path) {
3101
- return path.map(String).map(escapeKey).join('.');
3102
- };
3103
- var parsePath = function (string) {
3104
- var result = [];
3105
- var segment = '';
3106
- for (var i = 0; i < string.length; i++) {
3107
- var char = string.charAt(i);
3108
- var isEscapedDot = char === '\\' && string.charAt(i + 1) === '.';
3109
- if (isEscapedDot) {
3110
- segment += '.';
3111
- i++;
3112
- continue;
3113
- }
3114
- var isEndOfSegment = char === '.';
3115
- if (isEndOfSegment) {
3116
- result.push(segment);
3117
- segment = '';
3118
- continue;
3119
- }
3120
- segment += char;
3121
- }
3122
- var lastSegment = segment;
3123
- result.push(lastSegment);
3124
- return result;
3125
- };
3126
-
3127
- var __assign$1 = undefined && undefined.__assign || function () {
3128
- __assign$1 = Object.assign || function (t) {
3129
- for (var s, i = 1, n = arguments.length; i < n; i++) {
3130
- s = arguments[i];
3131
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3132
- }
3133
- return t;
3134
- };
3135
- return __assign$1.apply(this, arguments);
3136
- };
3137
- var __read$2 = undefined && undefined.__read || function (o, n) {
3138
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3139
- if (!m) return o;
3140
- var i = m.call(o),
3141
- r,
3142
- ar = [],
3143
- e;
3144
- try {
3145
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3146
- } catch (error) {
3147
- e = {
3148
- error: error
3149
- };
3150
- } finally {
3151
- try {
3152
- if (r && !r.done && (m = i["return"])) m.call(i);
3153
- } finally {
3154
- if (e) throw e.error;
3155
- }
3156
- }
3157
- return ar;
3158
- };
3159
- var __spreadArray$2 = undefined && undefined.__spreadArray || function (to, from) {
3160
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
3161
- return to;
3162
- };
3163
- function simpleTransformation(isApplicable, annotation, transform, untransform) {
3164
- return {
3165
- isApplicable: isApplicable,
3166
- annotation: annotation,
3167
- transform: transform,
3168
- untransform: untransform
3169
- };
3170
- }
3171
- var simpleRules = [simpleTransformation(isUndefined, 'undefined', function () {
3172
- return null;
3173
- }, function () {
3174
- return undefined;
3175
- }), simpleTransformation(isBigint, 'bigint', function (v) {
3176
- return v.toString();
3177
- }, function (v) {
3178
- if (typeof BigInt !== 'undefined') {
3179
- return BigInt(v);
3180
- }
3181
- console.error('Please add a BigInt polyfill.');
3182
- return v;
3183
- }), simpleTransformation(isDate, 'Date', function (v) {
3184
- return v.toISOString();
3185
- }, function (v) {
3186
- return new Date(v);
3187
- }), simpleTransformation(isError, 'Error', function (v, superJson) {
3188
- var baseError = {
3189
- name: v.name,
3190
- message: v.message
3191
- };
3192
- superJson.allowedErrorProps.forEach(function (prop) {
3193
- baseError[prop] = v[prop];
3194
- });
3195
- return baseError;
3196
- }, function (v, superJson) {
3197
- var e = new Error(v.message);
3198
- e.name = v.name;
3199
- e.stack = v.stack;
3200
- superJson.allowedErrorProps.forEach(function (prop) {
3201
- e[prop] = v[prop];
2542
+ // src/index.ts
2543
+ var noop = () => {};
2544
+ function createListTransition(source, options) {
2545
+ const initSource = untrack(source);
2546
+ const {
2547
+ onChange
2548
+ } = options;
2549
+ let prevSet = new Set(options.appear ? void 0 : initSource);
2550
+ const exiting = /* @__PURE__ */new WeakSet();
2551
+ const [toRemove, setToRemove] = createSignal([], {
2552
+ equals: false
3202
2553
  });
3203
- return e;
3204
- }), simpleTransformation(isRegExp, 'regexp', function (v) {
3205
- return '' + v;
3206
- }, function (regex) {
3207
- var body = regex.slice(1, regex.lastIndexOf('/'));
3208
- var flags = regex.slice(regex.lastIndexOf('/') + 1);
3209
- return new RegExp(body, flags);
3210
- }), simpleTransformation(isSet, 'set',
3211
- // (sets only exist in es6+)
3212
- // eslint-disable-next-line es5/no-es6-methods
3213
- function (v) {
3214
- return __spreadArray$2([], __read$2(v.values()));
3215
- }, function (v) {
3216
- return new Set(v);
3217
- }), simpleTransformation(isMap, 'map', function (v) {
3218
- return __spreadArray$2([], __read$2(v.entries()));
3219
- }, function (v) {
3220
- return new Map(v);
3221
- }), simpleTransformation(function (v) {
3222
- return isNaNValue(v) || isInfinite(v);
3223
- }, 'number', function (v) {
3224
- if (isNaNValue(v)) {
3225
- return 'NaN';
3226
- }
3227
- if (v > 0) {
3228
- return 'Infinity';
3229
- } else {
3230
- return '-Infinity';
3231
- }
3232
- }, Number), simpleTransformation(function (v) {
3233
- return v === 0 && 1 / v === -Infinity;
3234
- }, 'number', function () {
3235
- return '-0';
3236
- }, Number), simpleTransformation(isURL, 'URL', function (v) {
3237
- return v.toString();
3238
- }, function (v) {
3239
- return new URL(v);
3240
- })];
3241
- function compositeTransformation(isApplicable, annotation, transform, untransform) {
3242
- return {
3243
- isApplicable: isApplicable,
3244
- annotation: annotation,
3245
- transform: transform,
3246
- untransform: untransform
2554
+ const [isTransitionPending] = useTransition();
2555
+ const finishRemoved = options.exitMethod === "remove" ? noop : els => {
2556
+ setToRemove(p => (p.push.apply(p, els), p));
2557
+ for (const el of els) exiting.delete(el);
3247
2558
  };
2559
+ const handleRemoved = options.exitMethod === "remove" ? noop : options.exitMethod === "keep-index" ? (els, el, i) => els.splice(i, 0, el) : (els, el) => els.push(el);
2560
+ return createMemo(prev => {
2561
+ const elsToRemove = toRemove();
2562
+ const sourceList = source();
2563
+ sourceList[$TRACK];
2564
+ if (untrack(isTransitionPending)) {
2565
+ isTransitionPending();
2566
+ return prev;
2567
+ }
2568
+ if (elsToRemove.length) {
2569
+ const next = prev.filter(e => !elsToRemove.includes(e));
2570
+ elsToRemove.length = 0;
2571
+ onChange({
2572
+ list: next,
2573
+ added: [],
2574
+ removed: [],
2575
+ unchanged: next,
2576
+ finishRemoved
2577
+ });
2578
+ return next;
2579
+ }
2580
+ return untrack(() => {
2581
+ const nextSet = new Set(sourceList);
2582
+ const next = sourceList.slice();
2583
+ const added = [];
2584
+ const removed = [];
2585
+ const unchanged = [];
2586
+ for (const el of sourceList) {
2587
+ (prevSet.has(el) ? unchanged : added).push(el);
2588
+ }
2589
+ let nothingChanged = !added.length;
2590
+ for (let i = 0; i < prev.length; i++) {
2591
+ const el = prev[i];
2592
+ if (!nextSet.has(el)) {
2593
+ if (!exiting.has(el)) {
2594
+ removed.push(el);
2595
+ exiting.add(el);
2596
+ }
2597
+ handleRemoved(next, el, i);
2598
+ }
2599
+ if (nothingChanged && el !== next[i]) nothingChanged = false;
2600
+ }
2601
+ if (!removed.length && nothingChanged) return prev;
2602
+ onChange({
2603
+ list: next,
2604
+ added,
2605
+ removed,
2606
+ unchanged,
2607
+ finishRemoved
2608
+ });
2609
+ prevSet = nextSet;
2610
+ return next;
2611
+ });
2612
+ }, options.appear ? [] : initSource.slice());
3248
2613
  }
3249
- var symbolRule = compositeTransformation(function (s, superJson) {
3250
- if (isSymbol(s)) {
3251
- var isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
3252
- return isRegistered;
3253
- }
3254
- return false;
3255
- }, function (s, superJson) {
3256
- var identifier = superJson.symbolRegistry.getIdentifier(s);
3257
- return ['symbol', identifier];
3258
- }, function (v) {
3259
- return v.description;
3260
- }, function (_, a, superJson) {
3261
- var value = superJson.symbolRegistry.getValue(a[1]);
3262
- if (!value) {
3263
- throw new Error('Trying to deserialize unknown symbol');
2614
+
2615
+ var isNonNullable = i => i != null;
2616
+ var filterNonNullable = arr => arr.filter(isNonNullable);
2617
+ var access = v => typeof v === "function" && !v.length ? v() : v;
2618
+ var asArray = value => Array.isArray(value) ? value : value ? [value] : [];
2619
+ function handleDiffArray(current, prev, handleAdded, handleRemoved) {
2620
+ const currLength = current.length;
2621
+ const prevLength = prev.length;
2622
+ let i = 0;
2623
+ if (!prevLength) {
2624
+ for (; i < currLength; i++) handleAdded(current[i]);
2625
+ return;
3264
2626
  }
3265
- return value;
3266
- });
3267
- var constructorToName = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray].reduce(function (obj, ctor) {
3268
- obj[ctor.name] = ctor;
3269
- return obj;
3270
- }, {});
3271
- var typedArrayRule = compositeTransformation(isTypedArray, function (v) {
3272
- return ['typed-array', v.constructor.name];
3273
- }, function (v) {
3274
- return __spreadArray$2([], __read$2(v));
3275
- }, function (v, a) {
3276
- var ctor = constructorToName[a[1]];
3277
- if (!ctor) {
3278
- throw new Error('Trying to deserialize unknown typed array');
2627
+ if (!currLength) {
2628
+ for (; i < prevLength; i++) handleRemoved(prev[i]);
2629
+ return;
3279
2630
  }
3280
- return new ctor(v);
3281
- });
3282
- function isInstanceOfRegisteredClass(potentialClass, superJson) {
3283
- if (potentialClass === null || potentialClass === void 0 ? void 0 : potentialClass.constructor) {
3284
- var isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
3285
- return isRegistered;
2631
+ for (; i < prevLength; i++) {
2632
+ if (prev[i] !== current[i]) break;
3286
2633
  }
3287
- return false;
3288
- }
3289
- var classRule = compositeTransformation(isInstanceOfRegisteredClass, function (clazz, superJson) {
3290
- var identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
3291
- return ['class', identifier];
3292
- }, function (clazz, superJson) {
3293
- var allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
3294
- if (!allowedProps) {
3295
- return __assign$1({}, clazz);
2634
+ let prevEl;
2635
+ let currEl;
2636
+ prev = prev.slice(i);
2637
+ current = current.slice(i);
2638
+ for (prevEl of prev) {
2639
+ if (!current.includes(prevEl)) handleRemoved(prevEl);
3296
2640
  }
3297
- var result = {};
3298
- allowedProps.forEach(function (prop) {
3299
- result[prop] = clazz[prop];
3300
- });
3301
- return result;
3302
- }, function (v, a, superJson) {
3303
- var clazz = superJson.classRegistry.getValue(a[1]);
3304
- if (!clazz) {
3305
- throw new Error('Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564');
2641
+ for (currEl of current) {
2642
+ if (!prev.includes(currEl)) handleAdded(currEl);
3306
2643
  }
3307
- return Object.assign(Object.create(clazz.prototype), v);
3308
- });
3309
- var customRule = compositeTransformation(function (value, superJson) {
3310
- return !!superJson.customTransformerRegistry.findApplicable(value);
3311
- }, function (value, superJson) {
3312
- var transformer = superJson.customTransformerRegistry.findApplicable(value);
3313
- return ['custom', transformer.name];
3314
- }, function (value, superJson) {
3315
- var transformer = superJson.customTransformerRegistry.findApplicable(value);
3316
- return transformer.serialize(value);
3317
- }, function (v, a, superJson) {
3318
- var transformer = superJson.customTransformerRegistry.findByName(a[1]);
3319
- if (!transformer) {
3320
- throw new Error('Trying to deserialize unknown custom value');
2644
+ }
2645
+
2646
+ var defaultElementPredicate = item => item instanceof Element;
2647
+ function getResolvedElements(value, predicate) {
2648
+ if (predicate(value)) return value;
2649
+ if (typeof value === "function" && !value.length) return getResolvedElements(value(), predicate);
2650
+ if (Array.isArray(value)) {
2651
+ const results = [];
2652
+ for (const item of value) {
2653
+ const result = getResolvedElements(item, predicate);
2654
+ if (result) Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
2655
+ }
2656
+ return results.length ? results : null;
3321
2657
  }
3322
- return transformer.deserialize(v);
3323
- });
3324
- var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
3325
- var transformValue = function (value, superJson) {
3326
- var applicableCompositeRule = findArr(compositeRules, function (rule) {
3327
- return rule.isApplicable(value, superJson);
3328
- });
3329
- if (applicableCompositeRule) {
2658
+ return null;
2659
+ }
2660
+ function resolveElements(fn, predicate = defaultElementPredicate, serverPredicate = defaultElementPredicate) {
2661
+ const children2 = createMemo(fn);
2662
+ const memo = createMemo(() => getResolvedElements(children2(), predicate));
2663
+ memo.toArray = () => {
2664
+ const value = memo();
2665
+ return Array.isArray(value) ? value : value ? [value] : [];
2666
+ };
2667
+ return memo;
2668
+ }
2669
+
2670
+ // src/common.ts
2671
+ function createClassnames(props) {
2672
+ return createMemo(() => {
2673
+ const name = props.name || "s";
3330
2674
  return {
3331
- value: applicableCompositeRule.transform(value, superJson),
3332
- type: applicableCompositeRule.annotation(value, superJson)
2675
+ enterActiveClasses: (props.enterActiveClass || name + "-enter-active").split(" "),
2676
+ enterClasses: (props.enterClass || name + "-enter").split(" "),
2677
+ enterToClasses: (props.enterToClass || name + "-enter-to").split(" "),
2678
+ exitActiveClasses: (props.exitActiveClass || name + "-exit-active").split(" "),
2679
+ exitClasses: (props.exitClass || name + "-exit").split(" "),
2680
+ exitToClasses: (props.exitToClass || name + "-exit-to").split(" "),
2681
+ moveClasses: (props.moveClass || name + "-move").split(" ")
3333
2682
  };
3334
- }
3335
- var applicableSimpleRule = findArr(simpleRules, function (rule) {
3336
- return rule.isApplicable(value, superJson);
3337
2683
  });
3338
- if (applicableSimpleRule) {
3339
- return {
3340
- value: applicableSimpleRule.transform(value, superJson),
3341
- type: applicableSimpleRule.annotation
3342
- };
2684
+ }
2685
+ function nextFrame(fn) {
2686
+ requestAnimationFrame(() => requestAnimationFrame(fn));
2687
+ }
2688
+ function enterTransition(classnames, events, el, done) {
2689
+ const {
2690
+ enterClasses,
2691
+ enterActiveClasses,
2692
+ enterToClasses
2693
+ } = classnames,
2694
+ {
2695
+ onBeforeEnter,
2696
+ onEnter,
2697
+ onAfterEnter
2698
+ } = events;
2699
+ onBeforeEnter?.(el);
2700
+ el.classList.add(...enterClasses);
2701
+ el.classList.add(...enterActiveClasses);
2702
+ queueMicrotask(() => {
2703
+ if (!el.parentNode) return done?.();
2704
+ onEnter?.(el, () => endTransition());
2705
+ });
2706
+ nextFrame(() => {
2707
+ el.classList.remove(...enterClasses);
2708
+ el.classList.add(...enterToClasses);
2709
+ if (!onEnter || onEnter.length < 2) {
2710
+ el.addEventListener("transitionend", endTransition);
2711
+ el.addEventListener("animationend", endTransition);
2712
+ }
2713
+ });
2714
+ function endTransition(e) {
2715
+ if (!e || e.target === el) {
2716
+ done?.();
2717
+ el.removeEventListener("transitionend", endTransition);
2718
+ el.removeEventListener("animationend", endTransition);
2719
+ el.classList.remove(...enterActiveClasses);
2720
+ el.classList.remove(...enterToClasses);
2721
+ onAfterEnter?.(el);
2722
+ }
3343
2723
  }
3344
- return undefined;
3345
- };
3346
- var simpleRulesByAnnotation = {};
3347
- simpleRules.forEach(function (rule) {
3348
- simpleRulesByAnnotation[rule.annotation] = rule;
3349
- });
3350
- var untransformValue = function (json, type, superJson) {
3351
- if (isArray$1(type)) {
3352
- switch (type[0]) {
3353
- case 'symbol':
3354
- return symbolRule.untransform(json, type, superJson);
3355
- case 'class':
3356
- return classRule.untransform(json, type, superJson);
3357
- case 'custom':
3358
- return customRule.untransform(json, type, superJson);
3359
- case 'typed-array':
3360
- return typedArrayRule.untransform(json, type, superJson);
3361
- default:
3362
- throw new Error('Unknown transformation: ' + type);
2724
+ }
2725
+ function exitTransition(classnames, events, el, done) {
2726
+ const {
2727
+ exitClasses,
2728
+ exitActiveClasses,
2729
+ exitToClasses
2730
+ } = classnames,
2731
+ {
2732
+ onBeforeExit,
2733
+ onExit,
2734
+ onAfterExit
2735
+ } = events;
2736
+ if (!el.parentNode) return done?.();
2737
+ onBeforeExit?.(el);
2738
+ el.classList.add(...exitClasses);
2739
+ el.classList.add(...exitActiveClasses);
2740
+ onExit?.(el, () => endTransition());
2741
+ nextFrame(() => {
2742
+ el.classList.remove(...exitClasses);
2743
+ el.classList.add(...exitToClasses);
2744
+ if (!onExit || onExit.length < 2) {
2745
+ el.addEventListener("transitionend", endTransition);
2746
+ el.addEventListener("animationend", endTransition);
3363
2747
  }
3364
- } else {
3365
- var transformation = simpleRulesByAnnotation[type];
3366
- if (!transformation) {
3367
- throw new Error('Unknown transformation: ' + type);
2748
+ });
2749
+ function endTransition(e) {
2750
+ if (!e || e.target === el) {
2751
+ done?.();
2752
+ el.removeEventListener("transitionend", endTransition);
2753
+ el.removeEventListener("animationend", endTransition);
2754
+ el.classList.remove(...exitActiveClasses);
2755
+ el.classList.remove(...exitToClasses);
2756
+ onAfterExit?.(el);
3368
2757
  }
3369
- return transformation.untransform(json, superJson);
3370
- }
3371
- };
3372
-
3373
- var getNthKey = function (value, n) {
3374
- var keys = value.keys();
3375
- while (n > 0) {
3376
- keys.next();
3377
- n--;
3378
- }
3379
- return keys.next().value;
3380
- };
3381
- function validatePath(path) {
3382
- if (includes(path, '__proto__')) {
3383
- throw new Error('__proto__ is not allowed as a property');
3384
- }
3385
- if (includes(path, 'prototype')) {
3386
- throw new Error('prototype is not allowed as a property');
3387
- }
3388
- if (includes(path, 'constructor')) {
3389
- throw new Error('constructor is not allowed as a property');
3390
2758
  }
3391
2759
  }
3392
- var getDeep = function (object, path) {
3393
- validatePath(path);
3394
- path.forEach(function (key) {
3395
- object = object[key];
2760
+ var TransitionGroup = props => {
2761
+ const classnames = createClassnames(props);
2762
+ return createListTransition(resolveElements(() => props.children).toArray, {
2763
+ appear: props.appear,
2764
+ exitMethod: "keep-index",
2765
+ onChange({
2766
+ added,
2767
+ removed,
2768
+ finishRemoved,
2769
+ list
2770
+ }) {
2771
+ const classes = classnames();
2772
+ for (const el of added) {
2773
+ enterTransition(classes, props, el);
2774
+ }
2775
+ const toMove = [];
2776
+ for (const el of list) {
2777
+ if (el.isConnected && (el instanceof HTMLElement || el instanceof SVGElement)) {
2778
+ toMove.push({
2779
+ el,
2780
+ rect: el.getBoundingClientRect()
2781
+ });
2782
+ }
2783
+ }
2784
+ queueMicrotask(() => {
2785
+ const moved = [];
2786
+ for (const {
2787
+ el,
2788
+ rect
2789
+ } of toMove) {
2790
+ if (el.isConnected) {
2791
+ const newRect = el.getBoundingClientRect(),
2792
+ dX = rect.left - newRect.left,
2793
+ dY = rect.top - newRect.top;
2794
+ if (dX || dY) {
2795
+ el.style.transform = `translate(${dX}px, ${dY}px)`;
2796
+ el.style.transitionDuration = "0s";
2797
+ moved.push(el);
2798
+ }
2799
+ }
2800
+ }
2801
+ document.body.offsetHeight;
2802
+ for (const el of moved) {
2803
+ let endTransition2 = function (e) {
2804
+ if (e.target === el || /transform$/.test(e.propertyName)) {
2805
+ el.removeEventListener("transitionend", endTransition2);
2806
+ el.classList.remove(...classes.moveClasses);
2807
+ }
2808
+ };
2809
+ el.classList.add(...classes.moveClasses);
2810
+ el.style.transform = el.style.transitionDuration = "";
2811
+ el.addEventListener("transitionend", endTransition2);
2812
+ }
2813
+ });
2814
+ for (const el of removed) {
2815
+ exitTransition(classes, props, el, () => finishRemoved([el]));
2816
+ }
2817
+ }
3396
2818
  });
3397
- return object;
3398
2819
  };
3399
- var setDeep = function (object, path, mapper) {
3400
- validatePath(path);
3401
- if (path.length === 0) {
3402
- return mapper(object);
2820
+
2821
+ // src/index.ts
2822
+ var FALLBACK = Symbol("fallback");
2823
+ function dispose(list) {
2824
+ for (const o of list) o.dispose();
2825
+ }
2826
+ function keyArray(items, keyFn, mapFn, options = {}) {
2827
+ const prev = /* @__PURE__ */new Map();
2828
+ onCleanup(() => dispose(prev.values()));
2829
+ return () => {
2830
+ const list = items() || [];
2831
+ list[$TRACK];
2832
+ return untrack(() => {
2833
+ if (!list.length) {
2834
+ dispose(prev.values());
2835
+ prev.clear();
2836
+ if (!options.fallback) return [];
2837
+ const fb2 = createRoot(dispose2 => {
2838
+ prev.set(FALLBACK, {
2839
+ dispose: dispose2
2840
+ });
2841
+ return options.fallback();
2842
+ });
2843
+ return [fb2];
2844
+ }
2845
+ const result = new Array(list.length);
2846
+ const fb = prev.get(FALLBACK);
2847
+ if (!prev.size || fb) {
2848
+ fb?.dispose();
2849
+ prev.delete(FALLBACK);
2850
+ for (let i = 0; i < list.length; i++) {
2851
+ const item = list[i];
2852
+ const key = keyFn(item, i);
2853
+ addNewItem(result, item, i, key);
2854
+ }
2855
+ return result;
2856
+ }
2857
+ const prevKeys = new Set(prev.keys());
2858
+ for (let i = 0; i < list.length; i++) {
2859
+ const item = list[i];
2860
+ const key = keyFn(item, i);
2861
+ prevKeys.delete(key);
2862
+ const lookup = prev.get(key);
2863
+ if (lookup) {
2864
+ result[i] = lookup.mapped;
2865
+ lookup.setIndex?.(i);
2866
+ lookup.setItem(() => item);
2867
+ } else addNewItem(result, item, i, key);
2868
+ }
2869
+ for (const key of prevKeys) {
2870
+ prev.get(key)?.dispose();
2871
+ prev.delete(key);
2872
+ }
2873
+ return result;
2874
+ });
2875
+ };
2876
+ function addNewItem(list, item, i, key) {
2877
+ createRoot(dispose2 => {
2878
+ const [getItem, setItem] = createSignal(item);
2879
+ const save = {
2880
+ setItem,
2881
+ dispose: dispose2
2882
+ };
2883
+ if (mapFn.length > 1) {
2884
+ const [index, setIndex] = createSignal(i);
2885
+ save.setIndex = setIndex;
2886
+ save.mapped = mapFn(getItem, index);
2887
+ } else save.mapped = mapFn(getItem);
2888
+ prev.set(key, save);
2889
+ list[i] = save.mapped;
2890
+ });
3403
2891
  }
3404
- var parent = object;
3405
- for (var i = 0; i < path.length - 1; i++) {
3406
- var key = path[i];
3407
- if (isArray$1(parent)) {
3408
- var index = +key;
3409
- parent = parent[index];
3410
- } else if (isPlainObject$1(parent)) {
3411
- parent = parent[key];
3412
- } else if (isSet(parent)) {
3413
- var row = +key;
3414
- parent = getNthKey(parent, row);
3415
- } else if (isMap(parent)) {
3416
- var isEnd = i === path.length - 2;
3417
- if (isEnd) {
3418
- break;
2892
+ }
2893
+ function Key(props) {
2894
+ const {
2895
+ by
2896
+ } = props;
2897
+ return createMemo(keyArray(() => props.each, typeof by === "function" ? by : v => v[by], props.children, "fallback" in props ? {
2898
+ fallback: () => props.fallback
2899
+ } : void 0));
2900
+ }
2901
+
2902
+ // src/storage.ts
2903
+ function createStorage(props) {
2904
+ const [error, setError] = createSignal();
2905
+ const handleError = props?.throw ? (err, fallback) => {
2906
+ setError(err instanceof Error ? err : new Error(fallback));
2907
+ throw err;
2908
+ } : (err, fallback) => {
2909
+ setError(err instanceof Error ? err : new Error(fallback));
2910
+ };
2911
+ const apis = props?.api ? Array.isArray(props.api) ? props.api : [props.api] : [globalThis.localStorage].filter(Boolean);
2912
+ const prefix = props?.prefix ? `${props.prefix}.` : "";
2913
+ const signals = /* @__PURE__ */new Map();
2914
+ const store = new Proxy({}, {
2915
+ get(_, key) {
2916
+ let node = signals.get(key);
2917
+ if (!node) {
2918
+ node = createSignal(void 0, {
2919
+ equals: false
2920
+ });
2921
+ signals.set(key, node);
3419
2922
  }
3420
- var row = +key;
3421
- var type = +path[++i] === 0 ? 'key' : 'value';
3422
- var keyOfRow = getNthKey(parent, row);
3423
- switch (type) {
3424
- case 'key':
3425
- parent = keyOfRow;
3426
- break;
3427
- case 'value':
3428
- parent = parent.get(keyOfRow);
3429
- break;
2923
+ node[0]();
2924
+ const value = apis.reduce((result, api) => {
2925
+ if (result !== null || !api) {
2926
+ return result;
2927
+ }
2928
+ try {
2929
+ return api.getItem(`${prefix}${key}`);
2930
+ } catch (err) {
2931
+ handleError(err, `Error reading ${prefix}${key} from ${api["name"]}`);
2932
+ return null;
2933
+ }
2934
+ }, null);
2935
+ if (value !== null && props?.deserializer) {
2936
+ return props.deserializer(value, key, props.options);
2937
+ }
2938
+ return value;
2939
+ }
2940
+ });
2941
+ const setter = (key, value, options) => {
2942
+ const filteredValue = props?.serializer ? props.serializer(value, key, options ?? props.options) : value;
2943
+ const apiKey = `${prefix}${key}`;
2944
+ apis.forEach(api => {
2945
+ try {
2946
+ api.getItem(apiKey) !== filteredValue && api.setItem(apiKey, filteredValue);
2947
+ } catch (err) {
2948
+ handleError(err, `Error setting ${prefix}${key} to ${filteredValue} in ${api.name}`);
3430
2949
  }
2950
+ });
2951
+ const node = signals.get(key);
2952
+ node && node[1]();
2953
+ };
2954
+ const remove = key => apis.forEach(api => {
2955
+ try {
2956
+ api.removeItem(`${prefix}${key}`);
2957
+ } catch (err) {
2958
+ handleError(err, `Error removing ${prefix}${key} from ${api.name}`);
3431
2959
  }
3432
- }
3433
- var lastKey = path[path.length - 1];
3434
- if (isArray$1(parent) || isPlainObject$1(parent)) {
3435
- parent[lastKey] = mapper(parent[lastKey]);
3436
- }
3437
- if (isSet(parent)) {
3438
- var oldValue = getNthKey(parent, +lastKey);
3439
- var newValue = mapper(oldValue);
3440
- if (oldValue !== newValue) {
3441
- parent["delete"](oldValue);
3442
- parent.add(newValue);
2960
+ });
2961
+ const clear = () => apis.forEach(api => {
2962
+ try {
2963
+ api.clear();
2964
+ } catch (err) {
2965
+ handleError(err, `Error clearing ${api.name}`);
3443
2966
  }
3444
- }
3445
- if (isMap(parent)) {
3446
- var row = +path[path.length - 2];
3447
- var keyToRow = getNthKey(parent, row);
3448
- var type = +lastKey === 0 ? 'key' : 'value';
3449
- switch (type) {
3450
- case 'key':
3451
- {
3452
- var newKey = mapper(keyToRow);
3453
- parent.set(newKey, parent.get(keyToRow));
3454
- if (newKey !== keyToRow) {
3455
- parent["delete"](keyToRow);
2967
+ });
2968
+ const toJSON = () => {
2969
+ const result = {};
2970
+ const addValue = (key, value) => {
2971
+ if (!result.hasOwnProperty(key)) {
2972
+ const filteredValue = value && props?.deserializer ? props.deserializer(value, key, props.options) : value;
2973
+ if (filteredValue) {
2974
+ result[key] = filteredValue;
2975
+ }
2976
+ }
2977
+ };
2978
+ apis.forEach(api => {
2979
+ if (typeof api.getAll === "function") {
2980
+ let values;
2981
+ try {
2982
+ values = api.getAll();
2983
+ } catch (err) {
2984
+ handleError(err, `Error getting all values from in ${api.name}`);
2985
+ }
2986
+ for (const key of values) {
2987
+ addValue(key, values[key]);
2988
+ }
2989
+ } else {
2990
+ let index = 0,
2991
+ key;
2992
+ try {
2993
+ while (key = api.key(index++)) {
2994
+ if (!result.hasOwnProperty(key)) {
2995
+ addValue(key, api.getItem(key));
2996
+ }
3456
2997
  }
3457
- break;
2998
+ } catch (err) {
2999
+ handleError(err, `Error getting all values from ${api.name}`);
3458
3000
  }
3459
- case 'value':
3460
- {
3461
- parent.set(keyToRow, mapper(parent.get(keyToRow)));
3462
- break;
3001
+ }
3002
+ });
3003
+ return result;
3004
+ };
3005
+ props?.sync !== false && onMount(() => {
3006
+ const listener = ev => {
3007
+ let changed = false;
3008
+ apis.forEach(api => {
3009
+ try {
3010
+ if (api !== ev.storageArea && ev.key && ev.newValue !== api.getItem(ev.key)) {
3011
+ ev.newValue ? api.setItem(ev.key, ev.newValue) : api.removeItem(ev.key);
3012
+ changed = true;
3013
+ }
3014
+ } catch (err) {
3015
+ handleError(err, `Error synching api ${api.name} from storage event (${ev.key}=${ev.newValue})`);
3463
3016
  }
3464
- }
3465
- }
3466
- return object;
3467
- };
3468
-
3469
- var __read$1 = undefined && undefined.__read || function (o, n) {
3470
- var m = typeof Symbol === "function" && o[Symbol.iterator];
3471
- if (!m) return o;
3472
- var i = m.call(o),
3473
- r,
3474
- ar = [],
3475
- e;
3476
- try {
3477
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3478
- } catch (error) {
3479
- e = {
3480
- error: error
3017
+ });
3018
+ changed && ev.key && signals.get(ev.key)?.[1]();
3481
3019
  };
3482
- } finally {
3483
- try {
3484
- if (r && !r.done && (m = i["return"])) m.call(i);
3485
- } finally {
3486
- if (e) throw e.error;
3020
+ if ("addEventListener" in globalThis) {
3021
+ globalThis.addEventListener("storage", listener);
3022
+ onCleanup(() => globalThis.removeEventListener("storage", listener));
3023
+ } else {
3024
+ apis.forEach(api => api.addEventListener?.("storage", listener));
3025
+ onCleanup(() => apis.forEach(api => api.removeEventListener?.("storage", listener)));
3487
3026
  }
3488
- }
3489
- return ar;
3490
- };
3491
- var __spreadArray$1 = undefined && undefined.__spreadArray || function (to, from) {
3492
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
3493
- return to;
3494
- };
3495
- function traverse(tree, walker, origin) {
3496
- if (origin === void 0) {
3497
- origin = [];
3498
- }
3499
- if (!tree) {
3500
- return;
3501
- }
3502
- if (!isArray$1(tree)) {
3503
- forEach(tree, function (subtree, key) {
3504
- return traverse(subtree, walker, __spreadArray$1(__spreadArray$1([], __read$1(origin)), __read$1(parsePath(key))));
3505
- });
3506
- return;
3507
- }
3508
- var _a = __read$1(tree, 2),
3509
- nodeValue = _a[0],
3510
- children = _a[1];
3511
- if (children) {
3512
- forEach(children, function (child, key) {
3513
- traverse(child, walker, __spreadArray$1(__spreadArray$1([], __read$1(origin)), __read$1(parsePath(key))));
3514
- });
3515
- }
3516
- walker(nodeValue, origin);
3517
- }
3518
- function applyValueAnnotations(plain, annotations, superJson) {
3519
- traverse(annotations, function (type, path) {
3520
- plain = setDeep(plain, path, function (v) {
3521
- return untransformValue(v, type, superJson);
3522
- });
3523
3027
  });
3524
- return plain;
3028
+ return [store, setter, {
3029
+ clear,
3030
+ error,
3031
+ remove,
3032
+ toJSON
3033
+ }];
3525
3034
  }
3526
- function applyReferentialEqualityAnnotations(plain, annotations) {
3527
- function apply(identicalPaths, path) {
3528
- var object = getDeep(plain, parsePath(path));
3529
- identicalPaths.map(parsePath).forEach(function (identicalObjectPath) {
3530
- plain = setDeep(plain, identicalObjectPath, function () {
3531
- return object;
3532
- });
3533
- });
3035
+ var createLocalStorage = createStorage;
3036
+
3037
+ // src/tools.ts
3038
+ var addClearMethod = storage => {
3039
+ if (typeof storage.clear === "function") {
3040
+ return storage;
3534
3041
  }
3535
- if (isArray$1(annotations)) {
3536
- var _a = __read$1(annotations, 2),
3537
- root = _a[0],
3538
- other = _a[1];
3539
- root.forEach(function (identicalPath) {
3540
- plain = setDeep(plain, parsePath(identicalPath), function () {
3541
- return plain;
3542
- });
3543
- });
3544
- if (other) {
3545
- forEach(other, apply);
3042
+ storage.clear = () => {
3043
+ let key;
3044
+ while (key = storage.key(0)) {
3045
+ storage.removeItem(key);
3546
3046
  }
3547
- } else {
3548
- forEach(annotations, apply);
3047
+ };
3048
+ return storage;
3049
+ };
3050
+
3051
+ // src/cookies.ts
3052
+ var serializeCookieOptions = options => {
3053
+ if (!options) {
3054
+ return "";
3549
3055
  }
3550
- return plain;
3551
- }
3552
- var isDeep = function (object, superJson) {
3553
- return isPlainObject$1(object) || isArray$1(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
3056
+ let memo = "";
3057
+ for (const key in options) {
3058
+ if (!options.hasOwnProperty(key)) {
3059
+ continue;
3060
+ }
3061
+ const value = options[key];
3062
+ memo += value instanceof Date ? `; ${key}=${value.toUTCString()}` : typeof value === "boolean" ? `; ${key}` : `; ${key}=${value}`;
3063
+ }
3064
+ return memo;
3554
3065
  };
3555
- function addIdentity(object, path, identities) {
3556
- var existingSet = identities.get(object);
3557
- if (existingSet) {
3558
- existingSet.push(path);
3559
- } else {
3560
- identities.set(object, [path]);
3066
+ var cookieStorage = addClearMethod({
3067
+ _cookies: [globalThis.document, "cookie"],
3068
+ getItem: key => cookieStorage._cookies[0][cookieStorage._cookies[1]].match("(^|;)\\s*" + key + "\\s*=\\s*([^;]+)")?.pop() ?? null,
3069
+ setItem: (key, value, options) => {
3070
+ const oldValue = cookieStorage.getItem(key);
3071
+ cookieStorage._cookies[0][cookieStorage._cookies[1]] = `${key}=${value}${serializeCookieOptions(options)}`;
3072
+ const storageEvent = Object.assign(new Event("storage"), {
3073
+ key,
3074
+ oldValue,
3075
+ newValue: value,
3076
+ url: globalThis.document.URL,
3077
+ storageArea: cookieStorage
3078
+ });
3079
+ window.dispatchEvent(storageEvent);
3080
+ },
3081
+ removeItem: key => {
3082
+ cookieStorage._cookies[0][cookieStorage._cookies[1]] = `${key}=deleted${serializeCookieOptions({
3083
+ expires: new Date(0)
3084
+ })}`;
3085
+ },
3086
+ key: index => {
3087
+ let key = null;
3088
+ let count = 0;
3089
+ cookieStorage._cookies[0][cookieStorage._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g, (_, found) => {
3090
+ if (!key && found && count++ === index) {
3091
+ key = found;
3092
+ }
3093
+ return "";
3094
+ });
3095
+ return key;
3096
+ },
3097
+ get length() {
3098
+ let length = 0;
3099
+ cookieStorage._cookies[0][cookieStorage._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g, found => {
3100
+ length += found ? 1 : 0;
3101
+ return "";
3102
+ });
3103
+ return length;
3561
3104
  }
3105
+ });
3106
+
3107
+ // src/index.ts
3108
+ function makeResizeObserver(callback, options) {
3109
+ const observer = new ResizeObserver(callback);
3110
+ onCleanup(observer.disconnect.bind(observer));
3111
+ return {
3112
+ observe: ref => observer.observe(ref, options),
3113
+ unobserve: observer.unobserve.bind(observer)
3114
+ };
3562
3115
  }
3563
- function generateReferentialEqualityAnnotations(identitites) {
3564
- var result = {};
3565
- var rootEqualityPaths = undefined;
3566
- identitites.forEach(function (paths) {
3567
- if (paths.length <= 1) {
3568
- return;
3569
- }
3570
- var _a = __read$1(paths.map(function (path) {
3571
- return path.map(String);
3572
- }).sort(function (a, b) {
3573
- return a.length - b.length;
3574
- })),
3575
- shortestPath = _a[0],
3576
- identicalPaths = _a.slice(1);
3577
- if (shortestPath.length === 0) {
3578
- rootEqualityPaths = identicalPaths.map(stringifyPath);
3579
- } else {
3580
- result[stringifyPath(shortestPath)] = identicalPaths.map(stringifyPath);
3581
- }
3582
- });
3583
- if (rootEqualityPaths) {
3584
- if (isEmptyObject(result)) {
3585
- return [rootEqualityPaths];
3586
- } else {
3587
- return [rootEqualityPaths, result];
3588
- }
3589
- } else {
3590
- return isEmptyObject(result) ? undefined : result;
3591
- }
3116
+ function createResizeObserver(targets, onResize, options) {
3117
+ const previousMap = /* @__PURE__ */new WeakMap(),
3118
+ {
3119
+ observe,
3120
+ unobserve
3121
+ } = makeResizeObserver(entries => {
3122
+ for (const entry of entries) {
3123
+ const {
3124
+ contentRect,
3125
+ target
3126
+ } = entry,
3127
+ width = Math.round(contentRect.width),
3128
+ height = Math.round(contentRect.height),
3129
+ previous = previousMap.get(target);
3130
+ if (!previous || previous.width !== width || previous.height !== height) {
3131
+ onResize(contentRect, target, entry);
3132
+ previousMap.set(target, {
3133
+ width,
3134
+ height
3135
+ });
3136
+ }
3137
+ }
3138
+ }, options);
3139
+ createEffect(prev => {
3140
+ const refs = filterNonNullable(asArray(access(targets)));
3141
+ handleDiffArray(refs, prev, observe, unobserve);
3142
+ return refs;
3143
+ }, []);
3592
3144
  }
3593
- var walker = function (object, identities, superJson, path, objectsInThisPath) {
3594
- var _a;
3595
- if (path === void 0) {
3596
- path = [];
3597
- }
3598
- if (objectsInThisPath === void 0) {
3599
- objectsInThisPath = [];
3600
- }
3601
- if (!isPrimitive(object)) {
3602
- addIdentity(object, path, identities);
3603
- }
3604
- if (!isDeep(object, superJson)) {
3605
- var transformed_1 = transformValue(object, superJson);
3606
- if (transformed_1) {
3607
- return {
3608
- transformedValue: transformed_1.value,
3609
- annotations: [transformed_1.type]
3610
- };
3611
- } else {
3612
- return {
3613
- transformedValue: object
3614
- };
3145
+
3146
+ const ShadowVariants = {
3147
+ xs: '0 1px 2px 0 rgb(0 0 0 / 0.05)',
3148
+ sm: '0 1px 3px 0 color, 0 1px 2px -1px color',
3149
+ md: '0 4px 6px -1px color, 0 2px 4px -2px color',
3150
+ lg: '0 10px 15px -3px color, 0 4px 6px -4px color',
3151
+ xl: '0 20px 25px -5px color, 0 8px 10px -6px color',
3152
+ '2xl': '0 25px 50px -12px color',
3153
+ inner: 'inset 0 2px 4px 0 color',
3154
+ none: 'none'
3155
+ };
3156
+ const getShadow = (variant, color = '') => {
3157
+ return ShadowVariants[variant].replace(/color/g, color);
3158
+ };
3159
+ const Shadow = {
3160
+ xs: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xs', color),
3161
+ sm: (color = 'rgb(0 0 0 / 0.1)') => getShadow('sm', color),
3162
+ md: (color = 'rgb(0 0 0 / 0.1)') => getShadow('md', color),
3163
+ lg: (color = 'rgb(0 0 0 / 0.1)') => getShadow('lg', color),
3164
+ xl: (color = 'rgb(0 0 0 / 0.1)') => getShadow('xl', color),
3165
+ '2xl': (color = 'rgb(0 0 0 / 0.25)') => getShadow('2xl', color),
3166
+ inner: (color = 'rgb(0 0 0 / 0.05)') => getShadow('inner', color),
3167
+ none: () => getShadow('none')
3168
+ };
3169
+ const tokens = {
3170
+ colors: {
3171
+ inherit: 'inherit',
3172
+ current: 'currentColor',
3173
+ transparent: 'transparent',
3174
+ black: '#000000',
3175
+ white: '#ffffff',
3176
+ neutral: {
3177
+ 50: '#f9fafb',
3178
+ 100: '#f2f4f7',
3179
+ 200: '#eaecf0',
3180
+ 300: '#d0d5dd',
3181
+ 400: '#98a2b3',
3182
+ 500: '#667085',
3183
+ 600: '#475467',
3184
+ 700: '#344054',
3185
+ 800: '#1d2939',
3186
+ 900: '#101828'
3187
+ },
3188
+ darkGray: {
3189
+ 50: '#525c7a',
3190
+ 100: '#49536e',
3191
+ 200: '#414962',
3192
+ 300: '#394056',
3193
+ 400: '#313749',
3194
+ 500: '#292e3d',
3195
+ 600: '#212530',
3196
+ 700: '#191c24',
3197
+ 800: '#111318',
3198
+ 900: '#0b0d10'
3199
+ },
3200
+ gray: {
3201
+ 50: '#f9fafb',
3202
+ 100: '#f2f4f7',
3203
+ 200: '#eaecf0',
3204
+ 300: '#d0d5dd',
3205
+ 400: '#98a2b3',
3206
+ 500: '#667085',
3207
+ 600: '#475467',
3208
+ 700: '#344054',
3209
+ 800: '#1d2939',
3210
+ 900: '#101828'
3211
+ },
3212
+ blue: {
3213
+ 25: '#F5FAFF',
3214
+ 50: '#EFF8FF',
3215
+ 100: '#D1E9FF',
3216
+ 200: '#B2DDFF',
3217
+ 300: '#84CAFF',
3218
+ 400: '#53B1FD',
3219
+ 500: '#2E90FA',
3220
+ 600: '#1570EF',
3221
+ 700: '#175CD3',
3222
+ 800: '#1849A9',
3223
+ 900: '#194185'
3224
+ },
3225
+ green: {
3226
+ 25: '#F6FEF9',
3227
+ 50: '#ECFDF3',
3228
+ 100: '#D1FADF',
3229
+ 200: '#A6F4C5',
3230
+ 300: '#6CE9A6',
3231
+ 400: '#32D583',
3232
+ 500: '#12B76A',
3233
+ 600: '#039855',
3234
+ 700: '#027A48',
3235
+ 800: '#05603A',
3236
+ 900: '#054F31'
3237
+ },
3238
+ red: {
3239
+ 25: '#FFFBFA',
3240
+ 50: '#FEF3F2',
3241
+ 100: '#FEE4E2',
3242
+ 200: '#FECDCA',
3243
+ 300: '#FDA29B',
3244
+ 400: '#F97066',
3245
+ 500: '#F04438',
3246
+ 600: '#D92D20',
3247
+ 700: '#B42318',
3248
+ 800: '#912018',
3249
+ 900: '#7A271A'
3250
+ },
3251
+ yellow: {
3252
+ 25: '#FFFCF5',
3253
+ 50: '#FFFAEB',
3254
+ 100: '#FEF0C7',
3255
+ 200: '#FEDF89',
3256
+ 300: '#FEC84B',
3257
+ 400: '#FDB022',
3258
+ 500: '#F79009',
3259
+ 600: '#DC6803',
3260
+ 700: '#B54708',
3261
+ 800: '#93370D',
3262
+ 900: '#7A2E0E'
3263
+ },
3264
+ purple: {
3265
+ 25: '#FAFAFF',
3266
+ 50: '#F4F3FF',
3267
+ 100: '#EBE9FE',
3268
+ 200: '#D9D6FE',
3269
+ 300: '#BDB4FE',
3270
+ 400: '#9B8AFB',
3271
+ 500: '#7A5AF8',
3272
+ 600: '#6938EF',
3273
+ 700: '#5925DC',
3274
+ 800: '#4A1FB8',
3275
+ 900: '#3E1C96'
3276
+ },
3277
+ teal: {
3278
+ 25: '#F6FEFC',
3279
+ 50: '#F0FDF9',
3280
+ 100: '#CCFBEF',
3281
+ 200: '#99F6E0',
3282
+ 300: '#5FE9D0',
3283
+ 400: '#2ED3B7',
3284
+ 500: '#15B79E',
3285
+ 600: '#0E9384',
3286
+ 700: '#107569',
3287
+ 800: '#125D56',
3288
+ 900: '#134E48'
3289
+ },
3290
+ pink: {
3291
+ 25: '#fdf2f8',
3292
+ 50: '#fce7f3',
3293
+ 100: '#fbcfe8',
3294
+ 200: '#f9a8d4',
3295
+ 300: '#f472b6',
3296
+ 400: '#ec4899',
3297
+ 500: '#db2777',
3298
+ 600: '#be185d',
3299
+ 700: '#9d174d',
3300
+ 800: '#831843',
3301
+ 900: '#500724'
3302
+ },
3303
+ cyan: {
3304
+ 25: '#ecfeff',
3305
+ 50: '#cffafe',
3306
+ 100: '#a5f3fc',
3307
+ 200: '#67e8f9',
3308
+ 300: '#22d3ee',
3309
+ 400: '#06b6d4',
3310
+ 500: '#0891b2',
3311
+ 600: '#0e7490',
3312
+ 700: '#155e75',
3313
+ 800: '#164e63',
3314
+ 900: '#083344'
3615
3315
  }
3616
- }
3617
- if (includes(objectsInThisPath, object)) {
3618
- return {
3619
- transformedValue: null
3620
- };
3621
- }
3622
- var transformationResult = transformValue(object, superJson);
3623
- var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;
3624
- if (!isPrimitive(object)) {
3625
- objectsInThisPath = __spreadArray$1(__spreadArray$1([], __read$1(objectsInThisPath)), [object]);
3626
- }
3627
- var transformedValue = isArray$1(transformed) ? [] : {};
3628
- var innerAnnotations = {};
3629
- forEach(transformed, function (value, index) {
3630
- var recursiveResult = walker(value, identities, superJson, __spreadArray$1(__spreadArray$1([], __read$1(path)), [index]), objectsInThisPath);
3631
- transformedValue[index] = recursiveResult.transformedValue;
3632
- if (isArray$1(recursiveResult.annotations)) {
3633
- innerAnnotations[index] = recursiveResult.annotations;
3634
- } else if (isPlainObject$1(recursiveResult.annotations)) {
3635
- forEach(recursiveResult.annotations, function (tree, key) {
3636
- innerAnnotations[escapeKey(index) + '.' + key] = tree;
3637
- });
3316
+ },
3317
+ alpha: {
3318
+ 100: 'ff',
3319
+ 90: 'e5',
3320
+ 80: 'cc',
3321
+ 70: 'b3',
3322
+ 60: '99',
3323
+ 50: '80',
3324
+ 40: '66',
3325
+ 30: '4d',
3326
+ 20: '33',
3327
+ 10: '1a',
3328
+ 0: '00'
3329
+ },
3330
+ font: {
3331
+ size: {
3332
+ '2xs': '0.625rem',
3333
+ xs: '0.75rem',
3334
+ sm: '0.875rem',
3335
+ md: '1rem',
3336
+ lg: '1.125rem',
3337
+ xl: '1.25rem',
3338
+ '2xl': '1.5rem',
3339
+ '3xl': '1.875rem',
3340
+ '4xl': '2.25rem',
3341
+ '5xl': '3rem',
3342
+ '6xl': '3.75rem',
3343
+ '7xl': '4.5rem',
3344
+ '8xl': '6rem',
3345
+ '9xl': '8rem'
3346
+ },
3347
+ lineHeight: {
3348
+ xs: '1rem',
3349
+ sm: '1.25rem',
3350
+ md: '1.5rem',
3351
+ lg: '1.75rem',
3352
+ xl: '1.75rem',
3353
+ '2xl': '2rem',
3354
+ '3xl': '2.25rem',
3355
+ '4xl': '2.5rem',
3356
+ '5xl': '1',
3357
+ '6xl': '1',
3358
+ '7xl': '1',
3359
+ '8xl': '1',
3360
+ '9xl': '1'
3361
+ },
3362
+ weight: {
3363
+ thin: '100',
3364
+ extralight: '200',
3365
+ light: '300',
3366
+ normal: '400',
3367
+ medium: '500',
3368
+ semibold: '600',
3369
+ bold: '700',
3370
+ extrabold: '800',
3371
+ black: '900'
3638
3372
  }
3639
- });
3640
- if (isEmptyObject(innerAnnotations)) {
3641
- return {
3642
- transformedValue: transformedValue,
3643
- annotations: !!transformationResult ? [transformationResult.type] : undefined
3644
- };
3645
- } else {
3646
- return {
3647
- transformedValue: transformedValue,
3648
- annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
3649
- };
3373
+ },
3374
+ breakpoints: {
3375
+ xs: '320px',
3376
+ sm: '640px',
3377
+ md: '768px',
3378
+ lg: '1024px',
3379
+ xl: '1280px',
3380
+ '2xl': '1536px'
3381
+ },
3382
+ border: {
3383
+ radius: {
3384
+ none: '0px',
3385
+ xs: '0.125rem',
3386
+ sm: '0.25rem',
3387
+ md: '0.375rem',
3388
+ lg: '0.5rem',
3389
+ xl: '0.75rem',
3390
+ '2xl': '1rem',
3391
+ '3xl': '1.5rem',
3392
+ full: '9999px'
3393
+ }
3394
+ },
3395
+ size: {
3396
+ 0: '0px',
3397
+ 0.25: '0.0625rem',
3398
+ 0.5: '0.125rem',
3399
+ 1: '0.25rem',
3400
+ 1.5: '0.375rem',
3401
+ 2: '0.5rem',
3402
+ 2.5: '0.625rem',
3403
+ 3: '0.75rem',
3404
+ 3.5: '0.875rem',
3405
+ 4: '1rem',
3406
+ 4.5: '1.125rem',
3407
+ 5: '1.25rem',
3408
+ 6: '1.5rem',
3409
+ 7: '1.75rem',
3410
+ 8: '2rem',
3411
+ 9: '2.25rem',
3412
+ 10: '2.5rem',
3413
+ 11: '2.75rem',
3414
+ 12: '3rem',
3415
+ 14: '3.5rem',
3416
+ 16: '4rem',
3417
+ 20: '5rem',
3418
+ 24: '6rem',
3419
+ 28: '7rem',
3420
+ 32: '8rem',
3421
+ 36: '9rem',
3422
+ 40: '10rem',
3423
+ 44: '11rem',
3424
+ 48: '12rem',
3425
+ 52: '13rem',
3426
+ 56: '14rem',
3427
+ 60: '15rem',
3428
+ 64: '16rem',
3429
+ 72: '18rem',
3430
+ 80: '20rem',
3431
+ 96: '24rem'
3432
+ },
3433
+ shadow: Shadow,
3434
+ zIndices: {
3435
+ hide: -1,
3436
+ auto: 'auto',
3437
+ base: 0,
3438
+ docked: 10,
3439
+ dropdown: 1000,
3440
+ sticky: 1100,
3441
+ banner: 1200,
3442
+ overlay: 1300,
3443
+ modal: 1400,
3444
+ popover: 1500,
3445
+ skipLink: 1600,
3446
+ toast: 1700,
3447
+ tooltip: 1800
3650
3448
  }
3651
3449
  };
3652
3450
 
3653
- function getType(payload) {
3654
- return Object.prototype.toString.call(payload).slice(8, -1);
3655
- }
3656
- function isPlainObject(payload) {
3657
- if (getType(payload) !== "Object") return false;
3658
- const prototype = Object.getPrototypeOf(payload);
3659
- return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
3660
- }
3661
- function isArray(payload) {
3662
- return getType(payload) === "Array";
3663
- }
3664
-
3665
- function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
3666
- const propType = {}.propertyIsEnumerable.call(originalObject, key) ? 'enumerable' : 'nonenumerable';
3667
- if (propType === 'enumerable') carry[key] = newVal;
3668
- if (includeNonenumerable && propType === 'nonenumerable') {
3669
- Object.defineProperty(carry, key, {
3670
- value: newVal,
3671
- enumerable: false,
3672
- writable: true,
3673
- configurable: true
3674
- });
3675
- }
3676
- }
3677
- /**
3678
- * Copy (clone) an object and all its props recursively to get rid of any prop referenced of the original object. Arrays are also cloned, however objects inside arrays are still linked.
3679
- *
3680
- * @export
3681
- * @template T
3682
- * @param {T} target Target can be anything
3683
- * @param {Options} [options = {}] Options can be `props` or `nonenumerable`
3684
- * @returns {T} the target with replaced values
3685
- * @export
3686
- */
3687
- function copy(target, options = {}) {
3688
- if (isArray(target)) {
3689
- return target.map(item => copy(item, options));
3451
+ var DoubleIndexedKV = /** @class */function () {
3452
+ function DoubleIndexedKV() {
3453
+ this.keyToValue = new Map();
3454
+ this.valueToKey = new Map();
3690
3455
  }
3691
- if (!isPlainObject(target)) {
3692
- return target;
3456
+ DoubleIndexedKV.prototype.set = function (key, value) {
3457
+ this.keyToValue.set(key, value);
3458
+ this.valueToKey.set(value, key);
3459
+ };
3460
+ DoubleIndexedKV.prototype.getByKey = function (key) {
3461
+ return this.keyToValue.get(key);
3462
+ };
3463
+ DoubleIndexedKV.prototype.getByValue = function (value) {
3464
+ return this.valueToKey.get(value);
3465
+ };
3466
+ DoubleIndexedKV.prototype.clear = function () {
3467
+ this.keyToValue.clear();
3468
+ this.valueToKey.clear();
3469
+ };
3470
+ return DoubleIndexedKV;
3471
+ }();
3472
+
3473
+ var Registry = /** @class */function () {
3474
+ function Registry(generateIdentifier) {
3475
+ this.generateIdentifier = generateIdentifier;
3476
+ this.kv = new DoubleIndexedKV();
3693
3477
  }
3694
- const props = Object.getOwnPropertyNames(target);
3695
- const symbols = Object.getOwnPropertySymbols(target);
3696
- return [...props, ...symbols].reduce((carry, key) => {
3697
- if (isArray(options.props) && !options.props.includes(key)) {
3698
- return carry;
3478
+ Registry.prototype.register = function (value, identifier) {
3479
+ if (this.kv.getByValue(value)) {
3480
+ return;
3699
3481
  }
3700
- const val = target[key];
3701
- const newVal = copy(val, options);
3702
- assignProp(carry, key, newVal, target, options.nonenumerable);
3703
- return carry;
3704
- }, {});
3705
- }
3482
+ if (!identifier) {
3483
+ identifier = this.generateIdentifier(value);
3484
+ }
3485
+ this.kv.set(identifier, value);
3486
+ };
3487
+ Registry.prototype.clear = function () {
3488
+ this.kv.clear();
3489
+ };
3490
+ Registry.prototype.getIdentifier = function (value) {
3491
+ return this.kv.getByValue(value);
3492
+ };
3493
+ Registry.prototype.getValue = function (identifier) {
3494
+ return this.kv.getByKey(identifier);
3495
+ };
3496
+ return Registry;
3497
+ }();
3706
3498
 
3707
- var __assign = undefined && undefined.__assign || function () {
3708
- __assign = Object.assign || function (t) {
3709
- for (var s, i = 1, n = arguments.length; i < n; i++) {
3710
- s = arguments[i];
3711
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3499
+ var __extends = undefined && undefined.__extends || function () {
3500
+ var extendStatics = function (d, b) {
3501
+ extendStatics = Object.setPrototypeOf || {
3502
+ __proto__: []
3503
+ } instanceof Array && function (d, b) {
3504
+ d.__proto__ = b;
3505
+ } || function (d, b) {
3506
+ for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p];
3507
+ };
3508
+ return extendStatics(d, b);
3509
+ };
3510
+ return function (d, b) {
3511
+ if (typeof b !== "function" && b !== null) throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
3512
+ extendStatics(d, b);
3513
+ function __() {
3514
+ this.constructor = d;
3712
3515
  }
3713
- return t;
3516
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
3714
3517
  };
3715
- return __assign.apply(this, arguments);
3716
- };
3717
- var __read = undefined && undefined.__read || function (o, n) {
3518
+ }();
3519
+ var ClassRegistry = /** @class */function (_super) {
3520
+ __extends(ClassRegistry, _super);
3521
+ function ClassRegistry() {
3522
+ var _this = _super.call(this, function (c) {
3523
+ return c.name;
3524
+ }) || this;
3525
+ _this.classToAllowedProps = new Map();
3526
+ return _this;
3527
+ }
3528
+ ClassRegistry.prototype.register = function (value, options) {
3529
+ if (typeof options === 'object') {
3530
+ if (options.allowProps) {
3531
+ this.classToAllowedProps.set(value, options.allowProps);
3532
+ }
3533
+ _super.prototype.register.call(this, value, options.identifier);
3534
+ } else {
3535
+ _super.prototype.register.call(this, value, options);
3536
+ }
3537
+ };
3538
+ ClassRegistry.prototype.getAllowedProps = function (value) {
3539
+ return this.classToAllowedProps.get(value);
3540
+ };
3541
+ return ClassRegistry;
3542
+ }(Registry);
3543
+
3544
+ var __read$3 = undefined && undefined.__read || function (o, n) {
3718
3545
  var m = typeof Symbol === "function" && o[Symbol.iterator];
3719
3546
  if (!m) return o;
3720
3547
  var i = m.call(o),
@@ -3736,1230 +3563,1422 @@ var __read = undefined && undefined.__read || function (o, n) {
3736
3563
  }
3737
3564
  return ar;
3738
3565
  };
3739
- var __spreadArray = undefined && undefined.__spreadArray || function (to, from) {
3740
- for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
3741
- return to;
3742
- };
3743
- var SuperJSON = /** @class */function () {
3744
- function SuperJSON() {
3745
- this.classRegistry = new ClassRegistry();
3746
- this.symbolRegistry = new Registry(function (s) {
3747
- var _a;
3748
- return (_a = s.description) !== null && _a !== void 0 ? _a : '';
3749
- });
3750
- this.customTransformerRegistry = new CustomTransformerRegistry();
3751
- this.allowedErrorProps = [];
3566
+ function valuesOfObj(record) {
3567
+ if ('values' in Object) {
3568
+ // eslint-disable-next-line es5/no-es6-methods
3569
+ return Object.values(record);
3752
3570
  }
3753
- SuperJSON.prototype.serialize = function (object) {
3754
- var identities = new Map();
3755
- var output = walker(object, identities, this);
3756
- var res = {
3757
- json: output.transformedValue
3758
- };
3759
- if (output.annotations) {
3760
- res.meta = __assign(__assign({}, res.meta), {
3761
- values: output.annotations
3762
- });
3571
+ var values = [];
3572
+ // eslint-disable-next-line no-restricted-syntax
3573
+ for (var key in record) {
3574
+ if (record.hasOwnProperty(key)) {
3575
+ values.push(record[key]);
3763
3576
  }
3764
- var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
3765
- if (equalityAnnotations) {
3766
- res.meta = __assign(__assign({}, res.meta), {
3767
- referentialEqualities: equalityAnnotations
3768
- });
3577
+ }
3578
+ return values;
3579
+ }
3580
+ function find(record, predicate) {
3581
+ var values = valuesOfObj(record);
3582
+ if ('find' in values) {
3583
+ // eslint-disable-next-line es5/no-es6-methods
3584
+ return values.find(predicate);
3585
+ }
3586
+ var valuesNotNever = values;
3587
+ for (var i = 0; i < valuesNotNever.length; i++) {
3588
+ var value = valuesNotNever[i];
3589
+ if (predicate(value)) {
3590
+ return value;
3769
3591
  }
3770
- return res;
3592
+ }
3593
+ return undefined;
3594
+ }
3595
+ function forEach(record, run) {
3596
+ Object.entries(record).forEach(function (_a) {
3597
+ var _b = __read$3(_a, 2),
3598
+ key = _b[0],
3599
+ value = _b[1];
3600
+ return run(value, key);
3601
+ });
3602
+ }
3603
+ function includes(arr, value) {
3604
+ return arr.indexOf(value) !== -1;
3605
+ }
3606
+ function findArr(record, predicate) {
3607
+ for (var i = 0; i < record.length; i++) {
3608
+ var value = record[i];
3609
+ if (predicate(value)) {
3610
+ return value;
3611
+ }
3612
+ }
3613
+ return undefined;
3614
+ }
3615
+
3616
+ var CustomTransformerRegistry = /** @class */function () {
3617
+ function CustomTransformerRegistry() {
3618
+ this.transfomers = {};
3619
+ }
3620
+ CustomTransformerRegistry.prototype.register = function (transformer) {
3621
+ this.transfomers[transformer.name] = transformer;
3771
3622
  };
3772
- SuperJSON.prototype.deserialize = function (payload) {
3773
- var json = payload.json,
3774
- meta = payload.meta;
3775
- var result = copy(json);
3776
- if (meta === null || meta === void 0 ? void 0 : meta.values) {
3777
- result = applyValueAnnotations(result, meta.values, this);
3623
+ CustomTransformerRegistry.prototype.findApplicable = function (v) {
3624
+ return find(this.transfomers, function (transformer) {
3625
+ return transformer.isApplicable(v);
3626
+ });
3627
+ };
3628
+ CustomTransformerRegistry.prototype.findByName = function (name) {
3629
+ return this.transfomers[name];
3630
+ };
3631
+ return CustomTransformerRegistry;
3632
+ }();
3633
+
3634
+ var getType$1 = function (payload) {
3635
+ return Object.prototype.toString.call(payload).slice(8, -1);
3636
+ };
3637
+ var isUndefined = function (payload) {
3638
+ return typeof payload === 'undefined';
3639
+ };
3640
+ var isNull = function (payload) {
3641
+ return payload === null;
3642
+ };
3643
+ var isPlainObject$1 = function (payload) {
3644
+ if (typeof payload !== 'object' || payload === null) return false;
3645
+ if (payload === Object.prototype) return false;
3646
+ if (Object.getPrototypeOf(payload) === null) return true;
3647
+ return Object.getPrototypeOf(payload) === Object.prototype;
3648
+ };
3649
+ var isEmptyObject = function (payload) {
3650
+ return isPlainObject$1(payload) && Object.keys(payload).length === 0;
3651
+ };
3652
+ var isArray$1 = function (payload) {
3653
+ return Array.isArray(payload);
3654
+ };
3655
+ var isString = function (payload) {
3656
+ return typeof payload === 'string';
3657
+ };
3658
+ var isNumber = function (payload) {
3659
+ return typeof payload === 'number' && !isNaN(payload);
3660
+ };
3661
+ var isBoolean = function (payload) {
3662
+ return typeof payload === 'boolean';
3663
+ };
3664
+ var isRegExp = function (payload) {
3665
+ return payload instanceof RegExp;
3666
+ };
3667
+ var isMap = function (payload) {
3668
+ return payload instanceof Map;
3669
+ };
3670
+ var isSet = function (payload) {
3671
+ return payload instanceof Set;
3672
+ };
3673
+ var isSymbol = function (payload) {
3674
+ return getType$1(payload) === 'Symbol';
3675
+ };
3676
+ var isDate = function (payload) {
3677
+ return payload instanceof Date && !isNaN(payload.valueOf());
3678
+ };
3679
+ var isError = function (payload) {
3680
+ return payload instanceof Error;
3681
+ };
3682
+ var isNaNValue = function (payload) {
3683
+ return typeof payload === 'number' && isNaN(payload);
3684
+ };
3685
+ var isPrimitive = function (payload) {
3686
+ return isBoolean(payload) || isNull(payload) || isUndefined(payload) || isNumber(payload) || isString(payload) || isSymbol(payload);
3687
+ };
3688
+ var isBigint = function (payload) {
3689
+ return typeof payload === 'bigint';
3690
+ };
3691
+ var isInfinite = function (payload) {
3692
+ return payload === Infinity || payload === -Infinity;
3693
+ };
3694
+ var isTypedArray = function (payload) {
3695
+ return ArrayBuffer.isView(payload) && !(payload instanceof DataView);
3696
+ };
3697
+ var isURL = function (payload) {
3698
+ return payload instanceof URL;
3699
+ };
3700
+
3701
+ var escapeKey = function (key) {
3702
+ return key.replace(/\./g, '\\.');
3703
+ };
3704
+ var stringifyPath = function (path) {
3705
+ return path.map(String).map(escapeKey).join('.');
3706
+ };
3707
+ var parsePath = function (string) {
3708
+ var result = [];
3709
+ var segment = '';
3710
+ for (var i = 0; i < string.length; i++) {
3711
+ var char = string.charAt(i);
3712
+ var isEscapedDot = char === '\\' && string.charAt(i + 1) === '.';
3713
+ if (isEscapedDot) {
3714
+ segment += '.';
3715
+ i++;
3716
+ continue;
3778
3717
  }
3779
- if (meta === null || meta === void 0 ? void 0 : meta.referentialEqualities) {
3780
- result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
3718
+ var isEndOfSegment = char === '.';
3719
+ if (isEndOfSegment) {
3720
+ result.push(segment);
3721
+ segment = '';
3722
+ continue;
3781
3723
  }
3782
- return result;
3783
- };
3784
- SuperJSON.prototype.stringify = function (object) {
3785
- return JSON.stringify(this.serialize(object));
3786
- };
3787
- SuperJSON.prototype.parse = function (string) {
3788
- return this.deserialize(JSON.parse(string));
3789
- };
3790
- SuperJSON.prototype.registerClass = function (v, options) {
3791
- this.classRegistry.register(v, options);
3792
- };
3793
- SuperJSON.prototype.registerSymbol = function (v, identifier) {
3794
- this.symbolRegistry.register(v, identifier);
3795
- };
3796
- SuperJSON.prototype.registerCustom = function (transformer, name) {
3797
- this.customTransformerRegistry.register(__assign({
3798
- name: name
3799
- }, transformer));
3800
- };
3801
- SuperJSON.prototype.allowErrorProps = function () {
3802
- var _a;
3803
- var props = [];
3804
- for (var _i = 0; _i < arguments.length; _i++) {
3805
- props[_i] = arguments[_i];
3724
+ segment += char;
3725
+ }
3726
+ var lastSegment = segment;
3727
+ result.push(lastSegment);
3728
+ return result;
3729
+ };
3730
+
3731
+ var __assign$1 = undefined && undefined.__assign || function () {
3732
+ __assign$1 = Object.assign || function (t) {
3733
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
3734
+ s = arguments[i];
3735
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
3806
3736
  }
3807
- (_a = this.allowedErrorProps).push.apply(_a, __spreadArray([], __read(props)));
3737
+ return t;
3808
3738
  };
3809
- SuperJSON.defaultInstance = new SuperJSON();
3810
- SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
3811
- SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
3812
- SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
3813
- SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
3814
- SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
3815
- SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
3816
- SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
3817
- SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
3818
- return SuperJSON;
3819
- }();
3820
- var serialize = SuperJSON.serialize;
3821
- var stringify = SuperJSON.stringify;
3822
-
3823
- function getQueryStatusLabel(query) {
3824
- return query.state.fetchStatus === 'fetching' ? 'fetching' : !query.getObserversCount() ? 'inactive' : query.state.fetchStatus === 'paused' ? 'paused' : query.isStale() ? 'stale' : 'fresh';
3825
- }
3826
- function getSidedProp(prop, side) {
3827
- return `${prop}${side.charAt(0).toUpperCase() + side.slice(1)}`;
3828
- }
3829
- function getQueryStatusColor({
3830
- queryState,
3831
- observerCount,
3832
- isStale
3833
- }) {
3834
- return queryState.fetchStatus === 'fetching' ? 'blue' : !observerCount ? 'gray' : queryState.fetchStatus === 'paused' ? 'purple' : isStale ? 'yellow' : 'green';
3835
- }
3836
- function getQueryStatusColorByLabel(label) {
3837
- return label === 'fresh' ? 'green' : label === 'stale' ? 'yellow' : label === 'paused' ? 'purple' : label === 'inactive' ? 'gray' : 'blue';
3838
- }
3839
-
3840
- /**
3841
- * Displays a string regardless the type of the data
3842
- * @param {unknown} value Value to be stringified
3843
- * @param {boolean} beautify Formats json to multiline
3844
- */
3845
- const displayValue = (value, beautify = false) => {
3846
- const {
3847
- json
3848
- } = serialize(value);
3849
- return JSON.stringify(json, null, beautify ? 2 : undefined);
3739
+ return __assign$1.apply(this, arguments);
3850
3740
  };
3851
-
3852
- // Sorting functions
3853
-
3854
- const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
3855
- const queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);
3856
- const dateSort = (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1;
3857
- const statusAndDateSort = (a, b) => {
3858
- if (getStatusRank(a) === getStatusRank(b)) {
3859
- return dateSort(a, b);
3741
+ var __read$2 = undefined && undefined.__read || function (o, n) {
3742
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3743
+ if (!m) return o;
3744
+ var i = m.call(o),
3745
+ r,
3746
+ ar = [],
3747
+ e;
3748
+ try {
3749
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
3750
+ } catch (error) {
3751
+ e = {
3752
+ error: error
3753
+ };
3754
+ } finally {
3755
+ try {
3756
+ if (r && !r.done && (m = i["return"])) m.call(i);
3757
+ } finally {
3758
+ if (e) throw e.error;
3759
+ }
3860
3760
  }
3861
- return getStatusRank(a) > getStatusRank(b) ? 1 : -1;
3862
- };
3863
- const sortFns = {
3864
- status: statusAndDateSort,
3865
- 'query hash': queryHashSort,
3866
- 'last updated': dateSort
3761
+ return ar;
3867
3762
  };
3868
- const convertRemToPixels = rem => {
3869
- return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
3763
+ var __spreadArray$2 = undefined && undefined.__spreadArray || function (to, from) {
3764
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
3765
+ return to;
3870
3766
  };
3871
-
3872
- const _tmpl$$2 = /*#__PURE__*/template(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3873
- _tmpl$2$2 = /*#__PURE__*/template(`<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L5 5L9 1" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3874
- _tmpl$3$2 = /*#__PURE__*/template(`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3875
- _tmpl$4$2 = /*#__PURE__*/template(`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3876
- _tmpl$5$2 = /*#__PURE__*/template(`<svg stroke="#98A2B3" fill="#98A2B3" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path></svg>`, 6),
3877
- _tmpl$6$2 = /*#__PURE__*/template(`<svg stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z"></path></svg>`, 6),
3878
- _tmpl$7$2 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z" stroke="#98A2B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z" stroke="#98A2B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 6),
3879
- _tmpl$8$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path class="copier" d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="#98A2B3"></path></svg>`, 4),
3880
- _tmpl$9$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z" stroke="#12B76A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3881
- _tmpl$10$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z" stroke="#F04438" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
3882
- _tmpl$11$1 = /*#__PURE__*/template(`<svg version="1.0" viewBox="0 0 633 633"><linearGradient id="a" x1="-666.45" x2="-666.45" y1="163.28" y2="163.99" gradientTransform="matrix(633 0 0 633 422177 -103358)" gradientUnits="userSpaceOnUse"><stop stop-color="#6BDAFF" offset="0"></stop><stop stop-color="#F9FFB5" offset=".32"></stop><stop stop-color="#FFA770" offset=".71"></stop><stop stop-color="#FF7373" offset="1"></stop></linearGradient><circle cx="316.5" cy="316.5" r="316.5" fill="url(#a)"></circle><defs><filter id="am" x="-137.5" y="412" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="b" x="-137.5" y="412" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#am)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#b)"><ellipse cx="89.5" cy="610.5" rx="214.5" ry="186" fill="#015064" stroke="#00CFE2" stroke-width="25"></ellipse></g><defs><filter id="ah" x="316.5" y="412" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="k" x="316.5" y="412" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ah)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#k)"><ellipse cx="543.5" cy="610.5" rx="214.5" ry="186" fill="#015064" stroke="#00CFE2" stroke-width="25"></ellipse></g><defs><filter id="ae" x="-137.5" y="450" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="j" x="-137.5" y="450" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ae)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#j)"><ellipse cx="89.5" cy="648.5" rx="214.5" ry="186" fill="#015064" stroke="#00A8B8" stroke-width="25"></ellipse></g><defs><filter id="ai" x="316.5" y="450" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="i" x="316.5" y="450" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ai)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#i)"><ellipse cx="543.5" cy="648.5" rx="214.5" ry="186" fill="#015064" stroke="#00A8B8" stroke-width="25"></ellipse></g><defs><filter id="aj" x="-137.5" y="486" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="h" x="-137.5" y="486" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#aj)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#h)"><ellipse cx="89.5" cy="684.5" rx="214.5" ry="186" fill="#015064" stroke="#007782" stroke-width="25"></ellipse></g><defs><filter id="ag" x="316.5" y="486" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="g" x="316.5" y="486" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ag)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#g)"><ellipse cx="543.5" cy="684.5" rx="214.5" ry="186" fill="#015064" stroke="#007782" stroke-width="25"></ellipse></g><defs><filter id="af" x="272.2" y="308" width="176.9" height="129.3" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="f" x="272.2" y="308" width="176.9" height="129.3" maskUnits="userSpaceOnUse"><g filter="url(#af)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#f)"><line x1="436" x2="431" y1="403.2" y2="431.8" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><line x1="291" x2="280" y1="341.5" y2="403.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><line x1="332.9" x2="328.6" y1="384.1" y2="411.2" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><linearGradient id="m" x1="-670.75" x2="-671.59" y1="164.4" y2="164.49" gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)" gradientUnits="userSpaceOnUse"><stop stop-color="#EE2700" offset="0"></stop><stop stop-color="#FF008E" offset="1"></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z" clip-rule="evenodd" fill="url(#m)" fill-rule="evenodd"></path><line x1="428.2" x2="429.1" y1="384.5" y2="378" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="395.2" x2="396.1" y1="379.5" y2="373" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="362.2" x2="363.1" y1="373.5" y2="367.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="324.2" x2="328.4" y1="351.3" y2="347.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="303.2" x2="307.4" y1="331.3" y2="327.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line></g><defs><filter id="ak" x="73.2" y="113.8" width="280.6" height="317.4" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="e" x="73.2" y="113.8" width="280.6" height="317.4" maskUnits="userSpaceOnUse"><g filter="url(#ak)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#e)"><linearGradient id="n" x1="-672.16" x2="-672.16" y1="165.03" y2="166.03" gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)" gradientUnits="userSpaceOnUse"><stop stop-color="#A17500" offset="0"></stop><stop stop-color="#5D2100" offset="1"></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6" clip-rule="evenodd" fill="url(#n)" fill-rule="evenodd"></path><g stroke="#2F8A00"><linearGradient id="r" x1="-660.23" x2="-660.23" y1="166.72" y2="167.72" gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z" clip-rule="evenodd" fill="url(#r)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="s" x1="-661.36" x2="-661.36" y1="164.18" y2="165.18" gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z" clip-rule="evenodd" fill="url(#s)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="q" x1="-656.79" x2="-656.79" y1="165.15" y2="166.15" gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z" clip-rule="evenodd" fill="url(#q)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="p" x1="-663.07" x2="-663.07" y1="165.44" y2="166.44" gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z" clip-rule="evenodd" fill="url(#p)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="o" x1="-662.57" x2="-662.57" y1="164.44" y2="165.44" gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z" clip-rule="evenodd" fill="url(#o)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="l" x1="-656.43" x2="-656.43" y1="163.86" y2="164.86" gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z" clip-rule="evenodd" fill="url(#l)" fill-rule="evenodd" stroke-width="13"></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32" fill="none" stroke-linecap="round" stroke-width="8"></path></g></g><defs><filter id="al" x="50.5" y="399" width="532" height="633" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="d" x="50.5" y="399" width="532" height="633" maskUnits="userSpaceOnUse"><g filter="url(#al)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#d)"><linearGradient id="u" x1="-666.06" x2="-666.23" y1="163.36" y2="163.75" gradientTransform="matrix(532 0 0 633 354760 -102959)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFF400" offset="0"></stop><stop stop-color="#3C8700" offset="1"></stop></linearGradient><ellipse cx="316.5" cy="715.5" rx="266" ry="316.5" fill="url(#u)"></ellipse></g><defs><filter id="ad" x="391" y="-24" width="288" height="283" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="c" x="391" y="-24" width="288" height="283" maskUnits="userSpaceOnUse"><g filter="url(#ad)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#c)"><linearGradient id="t" x1="-664.56" x2="-664.56" y1="163.79" y2="164.79" gradientTransform="matrix(227 0 0 227 151421 -37204)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFDF00" offset="0"></stop><stop stop-color="#FF9D00" offset="1"></stop></linearGradient><circle cx="565.5" cy="89.5" r="113.5" fill="url(#t)"></circle><linearGradient id="v" x1="-644.5" x2="-645.77" y1="342" y2="342" gradientTransform="matrix(30 0 0 1 19770 -253)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="427" x2="397" y1="89" y2="89" fill="none" stroke="url(#v)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="aa" x1="-641.56" x2="-642.83" y1="196.02" y2="196.07" gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="430.5" x2="404" y1="55.5" y2="50" fill="none" stroke="url(#aa)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="w" x1="-643.73" x2="-645" y1="185.83" y2="185.9" gradientTransform="matrix(29 0 0 8 19107 -1361)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="431" x2="402" y1="122" y2="130" fill="none" stroke="url(#w)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="ac" x1="-638.94" x2="-640.22" y1="177.09" y2="177.39" gradientTransform="matrix(24 0 0 13 15783 -2145)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="442" x2="418" y1="153" y2="166" fill="none" stroke="url(#ac)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="ab" x1="-633.42" x2="-634.7" y1="172.41" y2="173.31" gradientTransform="matrix(20 0 0 19 13137 -3096)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="464" x2="444" y1="180" y2="199" fill="none" stroke="url(#ab)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="y" x1="-619.05" x2="-619.52" y1="170.82" y2="171.82" gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="491.4" x2="477.5" y1="203" y2="225.9" fill="none" stroke="url(#y)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="x" x1="-578.5" x2="-578.63" y1="170.31" y2="171.31" gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="524.5" x2="517" y1="219.5" y2="244" fill="none" stroke="url(#x)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="z" x1="666.5" x2="666.5" y1="170.31" y2="171.31" gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="564.5" x2="565" y1="228.5" y2="253" fill="none" stroke="url(#z)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line></g></svg>`, 336);
3883
- function Search() {
3884
- return _tmpl$$2.cloneNode(true);
3885
- }
3886
- function ChevronDown() {
3887
- return _tmpl$2$2.cloneNode(true);
3888
- }
3889
- function ArrowUp() {
3890
- return _tmpl$3$2.cloneNode(true);
3891
- }
3892
- function ArrowDown() {
3893
- return _tmpl$4$2.cloneNode(true);
3894
- }
3895
- function Wifi() {
3896
- return _tmpl$5$2.cloneNode(true);
3897
- }
3898
- function Offline() {
3899
- return (() => {
3900
- const _el$6 = _tmpl$6$2.cloneNode(true);
3901
- createRenderEffect(_p$ => {
3902
- const _v$ = tokens.colors.yellow[500],
3903
- _v$2 = tokens.colors.yellow[500];
3904
- _v$ !== _p$._v$ && setAttribute(_el$6, "stroke", _p$._v$ = _v$);
3905
- _v$2 !== _p$._v$2 && setAttribute(_el$6, "fill", _p$._v$2 = _v$2);
3906
- return _p$;
3907
- }, {
3908
- _v$: undefined,
3909
- _v$2: undefined
3910
- });
3911
- return _el$6;
3912
- })();
3913
- }
3914
- function Settings() {
3915
- return _tmpl$7$2.cloneNode(true);
3916
- }
3917
- function Copier() {
3918
- return _tmpl$8$1.cloneNode(true);
3919
- }
3920
- function CopiedCopier() {
3921
- return _tmpl$9$1.cloneNode(true);
3922
- }
3923
- function ErrorCopier() {
3924
- return _tmpl$10$1.cloneNode(true);
3925
- }
3926
- function TanstackLogo() {
3927
- return _tmpl$11$1.cloneNode(true);
3928
- }
3929
-
3930
- // src/index.ts
3931
- var FALLBACK = Symbol("fallback");
3932
- function dispose(list) {
3933
- for (const o of list) o.dispose();
3767
+ function simpleTransformation(isApplicable, annotation, transform, untransform) {
3768
+ return {
3769
+ isApplicable: isApplicable,
3770
+ annotation: annotation,
3771
+ transform: transform,
3772
+ untransform: untransform
3773
+ };
3934
3774
  }
3935
- function keyArray(items, keyFn, mapFn, options = {}) {
3936
- const prev = /* @__PURE__ */new Map();
3937
- onCleanup(() => dispose(prev.values()));
3938
- return () => {
3939
- const list = items() || [];
3940
- list[$TRACK];
3941
- return untrack(() => {
3942
- if (!list.length) {
3943
- dispose(prev.values());
3944
- prev.clear();
3945
- if (!options.fallback) return [];
3946
- const fb2 = createRoot(dispose2 => {
3947
- prev.set(FALLBACK, {
3948
- dispose: dispose2
3949
- });
3950
- return options.fallback();
3951
- });
3952
- return [fb2];
3953
- }
3954
- const result = new Array(list.length);
3955
- const fb = prev.get(FALLBACK);
3956
- if (!prev.size || fb) {
3957
- fb?.dispose();
3958
- prev.delete(FALLBACK);
3959
- for (let i = 0; i < list.length; i++) {
3960
- const item = list[i];
3961
- const key = keyFn(item, i);
3962
- addNewItem(result, item, i, key);
3963
- }
3964
- return result;
3965
- }
3966
- const prevKeys = new Set(prev.keys());
3967
- for (let i = 0; i < list.length; i++) {
3968
- const item = list[i];
3969
- const key = keyFn(item, i);
3970
- prevKeys.delete(key);
3971
- const lookup = prev.get(key);
3972
- if (lookup) {
3973
- result[i] = lookup.mapped;
3974
- lookup.setIndex?.(i);
3975
- lookup.setItem(() => item);
3976
- } else addNewItem(result, item, i, key);
3977
- }
3978
- for (const key of prevKeys) {
3979
- prev.get(key)?.dispose();
3980
- prev.delete(key);
3981
- }
3982
- return result;
3983
- });
3775
+ var simpleRules = [simpleTransformation(isUndefined, 'undefined', function () {
3776
+ return null;
3777
+ }, function () {
3778
+ return undefined;
3779
+ }), simpleTransformation(isBigint, 'bigint', function (v) {
3780
+ return v.toString();
3781
+ }, function (v) {
3782
+ if (typeof BigInt !== 'undefined') {
3783
+ return BigInt(v);
3784
+ }
3785
+ console.error('Please add a BigInt polyfill.');
3786
+ return v;
3787
+ }), simpleTransformation(isDate, 'Date', function (v) {
3788
+ return v.toISOString();
3789
+ }, function (v) {
3790
+ return new Date(v);
3791
+ }), simpleTransformation(isError, 'Error', function (v, superJson) {
3792
+ var baseError = {
3793
+ name: v.name,
3794
+ message: v.message
3984
3795
  };
3985
- function addNewItem(list, item, i, key) {
3986
- createRoot(dispose2 => {
3987
- const [getItem, setItem] = createSignal(item);
3988
- const save = {
3989
- setItem,
3990
- dispose: dispose2
3991
- };
3992
- if (mapFn.length > 1) {
3993
- const [index, setIndex] = createSignal(i);
3994
- save.setIndex = setIndex;
3995
- save.mapped = mapFn(getItem, index);
3996
- } else save.mapped = mapFn(getItem);
3997
- prev.set(key, save);
3998
- list[i] = save.mapped;
3999
- });
3796
+ superJson.allowedErrorProps.forEach(function (prop) {
3797
+ baseError[prop] = v[prop];
3798
+ });
3799
+ return baseError;
3800
+ }, function (v, superJson) {
3801
+ var e = new Error(v.message);
3802
+ e.name = v.name;
3803
+ e.stack = v.stack;
3804
+ superJson.allowedErrorProps.forEach(function (prop) {
3805
+ e[prop] = v[prop];
3806
+ });
3807
+ return e;
3808
+ }), simpleTransformation(isRegExp, 'regexp', function (v) {
3809
+ return '' + v;
3810
+ }, function (regex) {
3811
+ var body = regex.slice(1, regex.lastIndexOf('/'));
3812
+ var flags = regex.slice(regex.lastIndexOf('/') + 1);
3813
+ return new RegExp(body, flags);
3814
+ }), simpleTransformation(isSet, 'set',
3815
+ // (sets only exist in es6+)
3816
+ // eslint-disable-next-line es5/no-es6-methods
3817
+ function (v) {
3818
+ return __spreadArray$2([], __read$2(v.values()));
3819
+ }, function (v) {
3820
+ return new Set(v);
3821
+ }), simpleTransformation(isMap, 'map', function (v) {
3822
+ return __spreadArray$2([], __read$2(v.entries()));
3823
+ }, function (v) {
3824
+ return new Map(v);
3825
+ }), simpleTransformation(function (v) {
3826
+ return isNaNValue(v) || isInfinite(v);
3827
+ }, 'number', function (v) {
3828
+ if (isNaNValue(v)) {
3829
+ return 'NaN';
3830
+ }
3831
+ if (v > 0) {
3832
+ return 'Infinity';
3833
+ } else {
3834
+ return '-Infinity';
4000
3835
  }
3836
+ }, Number), simpleTransformation(function (v) {
3837
+ return v === 0 && 1 / v === -Infinity;
3838
+ }, 'number', function () {
3839
+ return '-0';
3840
+ }, Number), simpleTransformation(isURL, 'URL', function (v) {
3841
+ return v.toString();
3842
+ }, function (v) {
3843
+ return new URL(v);
3844
+ })];
3845
+ function compositeTransformation(isApplicable, annotation, transform, untransform) {
3846
+ return {
3847
+ isApplicable: isApplicable,
3848
+ annotation: annotation,
3849
+ transform: transform,
3850
+ untransform: untransform
3851
+ };
4001
3852
  }
4002
- function Key(props) {
4003
- const {
4004
- by
4005
- } = props;
4006
- return createMemo(keyArray(() => props.each, typeof by === "function" ? by : v => v[by], props.children, "fallback" in props ? {
4007
- fallback: () => props.fallback
4008
- } : void 0));
3853
+ var symbolRule = compositeTransformation(function (s, superJson) {
3854
+ if (isSymbol(s)) {
3855
+ var isRegistered = !!superJson.symbolRegistry.getIdentifier(s);
3856
+ return isRegistered;
3857
+ }
3858
+ return false;
3859
+ }, function (s, superJson) {
3860
+ var identifier = superJson.symbolRegistry.getIdentifier(s);
3861
+ return ['symbol', identifier];
3862
+ }, function (v) {
3863
+ return v.description;
3864
+ }, function (_, a, superJson) {
3865
+ var value = superJson.symbolRegistry.getValue(a[1]);
3866
+ if (!value) {
3867
+ throw new Error('Trying to deserialize unknown symbol');
3868
+ }
3869
+ return value;
3870
+ });
3871
+ var constructorToName = [Int8Array, Uint8Array, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array, Uint8ClampedArray].reduce(function (obj, ctor) {
3872
+ obj[ctor.name] = ctor;
3873
+ return obj;
3874
+ }, {});
3875
+ var typedArrayRule = compositeTransformation(isTypedArray, function (v) {
3876
+ return ['typed-array', v.constructor.name];
3877
+ }, function (v) {
3878
+ return __spreadArray$2([], __read$2(v));
3879
+ }, function (v, a) {
3880
+ var ctor = constructorToName[a[1]];
3881
+ if (!ctor) {
3882
+ throw new Error('Trying to deserialize unknown typed array');
3883
+ }
3884
+ return new ctor(v);
3885
+ });
3886
+ function isInstanceOfRegisteredClass(potentialClass, superJson) {
3887
+ if (potentialClass === null || potentialClass === void 0 ? void 0 : potentialClass.constructor) {
3888
+ var isRegistered = !!superJson.classRegistry.getIdentifier(potentialClass.constructor);
3889
+ return isRegistered;
3890
+ }
3891
+ return false;
4009
3892
  }
4010
-
4011
- const _tmpl$$1 = /*#__PURE__*/template(`<span><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></span>`, 6),
4012
- _tmpl$2$1 = /*#__PURE__*/template(`<button></button>`, 2),
4013
- _tmpl$3$1 = /*#__PURE__*/template(`<button> <span></span> <span> </span></button>`, 6),
4014
- _tmpl$4$1 = /*#__PURE__*/template(`<div></div>`, 2),
4015
- _tmpl$5$1 = /*#__PURE__*/template(`<span>:</span>`, 2),
4016
- _tmpl$6$1 = /*#__PURE__*/template(`<span></span>`, 2),
4017
- _tmpl$7$1 = /*#__PURE__*/template(`<div><div><button> [<!>...<!>]</button></div></div>`, 8);
4018
-
4019
- /**
4020
- * Chunk elements in the array by size
4021
- *
4022
- * when the array cannot be chunked evenly by size, the last chunk will be
4023
- * filled with the remaining elements
4024
- *
4025
- * @example
4026
- * chunkArray(['a','b', 'c', 'd', 'e'], 2) // returns [['a','b'], ['c', 'd'], ['e']]
4027
- */
4028
- function chunkArray(array, size) {
4029
- if (size < 1) return [];
4030
- let i = 0;
4031
- const result = [];
4032
- while (i < array.length) {
4033
- result.push(array.slice(i, i + size));
4034
- i = i + size;
3893
+ var classRule = compositeTransformation(isInstanceOfRegisteredClass, function (clazz, superJson) {
3894
+ var identifier = superJson.classRegistry.getIdentifier(clazz.constructor);
3895
+ return ['class', identifier];
3896
+ }, function (clazz, superJson) {
3897
+ var allowedProps = superJson.classRegistry.getAllowedProps(clazz.constructor);
3898
+ if (!allowedProps) {
3899
+ return __assign$1({}, clazz);
4035
3900
  }
3901
+ var result = {};
3902
+ allowedProps.forEach(function (prop) {
3903
+ result[prop] = clazz[prop];
3904
+ });
4036
3905
  return result;
4037
- }
4038
- const Expander = props => {
4039
- const styles = getStyles$1();
4040
- return (() => {
4041
- const _el$ = _tmpl$$1.cloneNode(true);
4042
- createRenderEffect(() => className(_el$, cx(styles.expander, css`
4043
- transform: rotate(${props.expanded ? 90 : 0}deg);
4044
- `)));
4045
- return _el$;
4046
- })();
4047
- };
4048
- const CopyButton = props => {
4049
- const styles = getStyles$1();
4050
- const [copyState, setCopyState] = createSignal('NoCopy');
4051
- return (() => {
4052
- const _el$2 = _tmpl$2$1.cloneNode(true);
4053
- addEventListener(_el$2, "click", copyState() === 'NoCopy' ? () => {
4054
- navigator.clipboard.writeText(stringify(props.value)).then(() => {
4055
- setCopyState('SuccessCopy');
4056
- setTimeout(() => {
4057
- setCopyState('NoCopy');
4058
- }, 1500);
4059
- }, err => {
4060
- console.error('Failed to copy: ', err);
4061
- setCopyState('ErrorCopy');
4062
- setTimeout(() => {
4063
- setCopyState('NoCopy');
4064
- }, 1500);
4065
- });
4066
- } : undefined, true);
4067
- insert(_el$2, createComponent(Switch, {
4068
- get children() {
4069
- return [createComponent(Match, {
4070
- get when() {
4071
- return copyState() === 'NoCopy';
4072
- },
4073
- get children() {
4074
- return createComponent(Copier, {});
4075
- }
4076
- }), createComponent(Match, {
4077
- get when() {
4078
- return copyState() === 'SuccessCopy';
4079
- },
4080
- get children() {
4081
- return createComponent(CopiedCopier, {});
4082
- }
4083
- }), createComponent(Match, {
4084
- get when() {
4085
- return copyState() === 'ErrorCopy';
4086
- },
4087
- get children() {
4088
- return createComponent(ErrorCopier, {});
4089
- }
4090
- })];
4091
- }
4092
- }));
4093
- createRenderEffect(_p$ => {
4094
- const _v$ = styles.copyButton,
4095
- _v$2 = `${copyState() === 'NoCopy' ? 'Copy object to clipboard' : copyState() === 'SuccessCopy' ? 'Object copied to clipboard' : 'Error copying object to clipboard'}`;
4096
- _v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
4097
- _v$2 !== _p$._v$2 && setAttribute(_el$2, "aria-label", _p$._v$2 = _v$2);
4098
- return _p$;
4099
- }, {
4100
- _v$: undefined,
4101
- _v$2: undefined
4102
- });
4103
- return _el$2;
4104
- })();
4105
- };
4106
- function isIterable(x) {
4107
- return Symbol.iterator in x;
4108
- }
4109
- function Explorer(props) {
4110
- const styles = getStyles$1();
4111
- const [expanded, setExpanded] = createSignal((props.defaultExpanded || []).includes(props.label));
4112
- const toggleExpanded = () => setExpanded(old => !old);
4113
- const [expandedPages, setExpandedPages] = createSignal([]);
4114
- const subEntries = createMemo(() => {
4115
- if (Array.isArray(props.value)) {
4116
- return props.value.map((d, i) => ({
4117
- label: i.toString(),
4118
- value: d
4119
- }));
4120
- } else if (props.value !== null && typeof props.value === 'object' && isIterable(props.value) && typeof props.value[Symbol.iterator] === 'function') {
4121
- if (props.value instanceof Map) {
4122
- return Array.from(props.value, ([key, val]) => ({
4123
- label: key,
4124
- value: val
4125
- }));
4126
- }
4127
- return Array.from(props.value, (val, i) => ({
4128
- label: i.toString(),
4129
- value: val
4130
- }));
4131
- } else if (typeof props.value === 'object' && props.value !== null) {
4132
- return Object.entries(props.value).map(([key, val]) => ({
4133
- label: key,
4134
- value: val
4135
- }));
4136
- }
4137
- return [];
3906
+ }, function (v, a, superJson) {
3907
+ var clazz = superJson.classRegistry.getValue(a[1]);
3908
+ if (!clazz) {
3909
+ throw new Error('Trying to deserialize unknown class - check https://github.com/blitz-js/superjson/issues/116#issuecomment-773996564');
3910
+ }
3911
+ return Object.assign(Object.create(clazz.prototype), v);
3912
+ });
3913
+ var customRule = compositeTransformation(function (value, superJson) {
3914
+ return !!superJson.customTransformerRegistry.findApplicable(value);
3915
+ }, function (value, superJson) {
3916
+ var transformer = superJson.customTransformerRegistry.findApplicable(value);
3917
+ return ['custom', transformer.name];
3918
+ }, function (value, superJson) {
3919
+ var transformer = superJson.customTransformerRegistry.findApplicable(value);
3920
+ return transformer.serialize(value);
3921
+ }, function (v, a, superJson) {
3922
+ var transformer = superJson.customTransformerRegistry.findByName(a[1]);
3923
+ if (!transformer) {
3924
+ throw new Error('Trying to deserialize unknown custom value');
3925
+ }
3926
+ return transformer.deserialize(v);
3927
+ });
3928
+ var compositeRules = [classRule, symbolRule, customRule, typedArrayRule];
3929
+ var transformValue = function (value, superJson) {
3930
+ var applicableCompositeRule = findArr(compositeRules, function (rule) {
3931
+ return rule.isApplicable(value, superJson);
4138
3932
  });
4139
- const type = createMemo(() => {
4140
- if (Array.isArray(props.value)) {
4141
- return 'array';
4142
- } else if (props.value !== null && typeof props.value === 'object' && isIterable(props.value) && typeof props.value[Symbol.iterator] === 'function') {
4143
- return 'Iterable';
4144
- } else if (typeof props.value === 'object' && props.value !== null) {
4145
- return 'object';
4146
- }
4147
- return typeof props.value;
3933
+ if (applicableCompositeRule) {
3934
+ return {
3935
+ value: applicableCompositeRule.transform(value, superJson),
3936
+ type: applicableCompositeRule.annotation(value, superJson)
3937
+ };
3938
+ }
3939
+ var applicableSimpleRule = findArr(simpleRules, function (rule) {
3940
+ return rule.isApplicable(value, superJson);
4148
3941
  });
4149
- const subEntryPages = createMemo(() => chunkArray(subEntries(), 100));
4150
- return (() => {
4151
- const _el$3 = _tmpl$4$1.cloneNode(true);
4152
- insert(_el$3, createComponent(Show, {
4153
- get when() {
4154
- return subEntryPages().length;
4155
- },
4156
- get children() {
4157
- return [(() => {
4158
- const _el$4 = _tmpl$3$1.cloneNode(true),
4159
- _el$5 = _el$4.firstChild,
4160
- _el$6 = _el$5.nextSibling,
4161
- _el$7 = _el$6.nextSibling,
4162
- _el$8 = _el$7.nextSibling,
4163
- _el$9 = _el$8.firstChild;
4164
- _el$4.$$click = () => toggleExpanded();
4165
- insert(_el$4, createComponent(Expander, {
4166
- get expanded() {
4167
- return expanded();
4168
- }
4169
- }), _el$5);
4170
- insert(_el$6, () => props.label);
4171
- insert(_el$8, () => String(type()).toLowerCase() === 'iterable' ? '(Iterable) ' : '', _el$9);
4172
- insert(_el$8, () => subEntries().length, _el$9);
4173
- insert(_el$8, () => subEntries().length > 1 ? `items` : `item`, null);
4174
- createRenderEffect(_p$ => {
4175
- const _v$3 = styles.expanderButton,
4176
- _v$4 = styles.info;
4177
- _v$3 !== _p$._v$3 && className(_el$4, _p$._v$3 = _v$3);
4178
- _v$4 !== _p$._v$4 && className(_el$8, _p$._v$4 = _v$4);
4179
- return _p$;
4180
- }, {
4181
- _v$3: undefined,
4182
- _v$4: undefined
4183
- });
4184
- return _el$4;
4185
- })(), createComponent(Show, {
4186
- get when() {
4187
- return props.copyable;
4188
- },
4189
- get children() {
4190
- return createComponent(CopyButton, {
4191
- get value() {
4192
- return props.value;
4193
- }
4194
- });
4195
- }
4196
- }), createComponent(Show, {
4197
- get when() {
4198
- return expanded();
4199
- },
4200
- get children() {
4201
- return [createComponent(Show, {
4202
- get when() {
4203
- return subEntryPages().length === 1;
4204
- },
4205
- get children() {
4206
- const _el$10 = _tmpl$4$1.cloneNode(true);
4207
- insert(_el$10, createComponent(Key, {
4208
- get each() {
4209
- return subEntries();
4210
- },
4211
- by: item => item.label,
4212
- children: entry => {
4213
- return createComponent(Explorer, {
4214
- get defaultExpanded() {
4215
- return props.defaultExpanded;
4216
- },
4217
- get label() {
4218
- return entry().label;
4219
- },
4220
- get value() {
4221
- return entry().value;
4222
- },
4223
- get copyable() {
4224
- return props.copyable;
4225
- }
4226
- });
4227
- }
4228
- }));
4229
- createRenderEffect(() => className(_el$10, styles.subEntry));
4230
- return _el$10;
4231
- }
4232
- }), createComponent(Show, {
4233
- get when() {
4234
- return subEntryPages().length > 1;
4235
- },
4236
- get children() {
4237
- const _el$11 = _tmpl$4$1.cloneNode(true);
4238
- insert(_el$11, createComponent(Index, {
4239
- get each() {
4240
- return subEntryPages();
4241
- },
4242
- children: (entries, index) => (() => {
4243
- const _el$15 = _tmpl$7$1.cloneNode(true),
4244
- _el$16 = _el$15.firstChild,
4245
- _el$17 = _el$16.firstChild,
4246
- _el$18 = _el$17.firstChild,
4247
- _el$22 = _el$18.nextSibling,
4248
- _el$20 = _el$22.nextSibling,
4249
- _el$23 = _el$20.nextSibling;
4250
- _el$23.nextSibling;
4251
- _el$17.$$click = () => setExpandedPages(old => old.includes(index) ? old.filter(d => d !== index) : [...old, index]);
4252
- insert(_el$17, createComponent(Expander, {
4253
- get expanded() {
4254
- return expandedPages().includes(index);
4255
- }
4256
- }), _el$18);
4257
- insert(_el$17, index * 100, _el$22);
4258
- insert(_el$17, index * 100 + 100 - 1, _el$23);
4259
- insert(_el$16, createComponent(Show, {
4260
- get when() {
4261
- return expandedPages().includes(index);
4262
- },
4263
- get children() {
4264
- const _el$24 = _tmpl$4$1.cloneNode(true);
4265
- insert(_el$24, createComponent(Key, {
4266
- get each() {
4267
- return entries();
4268
- },
4269
- by: entry => entry.label,
4270
- children: entry => createComponent(Explorer, {
4271
- get defaultExpanded() {
4272
- return props.defaultExpanded;
4273
- },
4274
- get label() {
4275
- return entry().label;
4276
- },
4277
- get value() {
4278
- return entry().value;
4279
- },
4280
- get copyable() {
4281
- return props.copyable;
4282
- }
4283
- })
4284
- }));
4285
- createRenderEffect(() => className(_el$24, styles.subEntry));
4286
- return _el$24;
4287
- }
4288
- }), null);
4289
- createRenderEffect(_p$ => {
4290
- const _v$5 = styles.entry,
4291
- _v$6 = styles.expanderButton;
4292
- _v$5 !== _p$._v$5 && className(_el$16, _p$._v$5 = _v$5);
4293
- _v$6 !== _p$._v$6 && className(_el$17, _p$._v$6 = _v$6);
4294
- return _p$;
4295
- }, {
4296
- _v$5: undefined,
4297
- _v$6: undefined
4298
- });
4299
- return _el$15;
4300
- })()
4301
- }));
4302
- createRenderEffect(() => className(_el$11, styles.subEntry));
4303
- return _el$11;
4304
- }
4305
- })];
4306
- }
4307
- })];
4308
- }
4309
- }), null);
4310
- insert(_el$3, createComponent(Show, {
4311
- get when() {
4312
- return subEntryPages().length === 0;
4313
- },
4314
- get children() {
4315
- return [(() => {
4316
- const _el$12 = _tmpl$5$1.cloneNode(true),
4317
- _el$13 = _el$12.firstChild;
4318
- insert(_el$12, () => props.label, _el$13);
4319
- createRenderEffect(() => className(_el$12, styles.label));
4320
- return _el$12;
4321
- })(), ' ', (() => {
4322
- const _el$14 = _tmpl$6$1.cloneNode(true);
4323
- insert(_el$14, () => displayValue(props.value));
4324
- createRenderEffect(() => className(_el$14, styles.value));
4325
- return _el$14;
4326
- })()];
4327
- }
4328
- }), null);
4329
- createRenderEffect(() => className(_el$3, styles.entry));
4330
- return _el$3;
4331
- })();
3942
+ if (applicableSimpleRule) {
3943
+ return {
3944
+ value: applicableSimpleRule.transform(value, superJson),
3945
+ type: applicableSimpleRule.annotation
3946
+ };
3947
+ }
3948
+ return undefined;
3949
+ };
3950
+ var simpleRulesByAnnotation = {};
3951
+ simpleRules.forEach(function (rule) {
3952
+ simpleRulesByAnnotation[rule.annotation] = rule;
3953
+ });
3954
+ var untransformValue = function (json, type, superJson) {
3955
+ if (isArray$1(type)) {
3956
+ switch (type[0]) {
3957
+ case 'symbol':
3958
+ return symbolRule.untransform(json, type, superJson);
3959
+ case 'class':
3960
+ return classRule.untransform(json, type, superJson);
3961
+ case 'custom':
3962
+ return customRule.untransform(json, type, superJson);
3963
+ case 'typed-array':
3964
+ return typedArrayRule.untransform(json, type, superJson);
3965
+ default:
3966
+ throw new Error('Unknown transformation: ' + type);
3967
+ }
3968
+ } else {
3969
+ var transformation = simpleRulesByAnnotation[type];
3970
+ if (!transformation) {
3971
+ throw new Error('Unknown transformation: ' + type);
3972
+ }
3973
+ return transformation.untransform(json, superJson);
3974
+ }
3975
+ };
3976
+
3977
+ var getNthKey = function (value, n) {
3978
+ var keys = value.keys();
3979
+ while (n > 0) {
3980
+ keys.next();
3981
+ n--;
3982
+ }
3983
+ return keys.next().value;
3984
+ };
3985
+ function validatePath(path) {
3986
+ if (includes(path, '__proto__')) {
3987
+ throw new Error('__proto__ is not allowed as a property');
3988
+ }
3989
+ if (includes(path, 'prototype')) {
3990
+ throw new Error('prototype is not allowed as a property');
3991
+ }
3992
+ if (includes(path, 'constructor')) {
3993
+ throw new Error('constructor is not allowed as a property');
3994
+ }
4332
3995
  }
4333
- const getStyles$1 = () => {
4334
- const {
4335
- colors,
4336
- font,
4337
- size,
4338
- border
4339
- } = tokens;
4340
- return {
4341
- entry: css`
4342
- & * {
4343
- font-size: ${font.size.sm};
4344
- font-family: 'Menlo', 'Fira Code', monospace;
4345
- line-height: 1.7;
4346
- }
4347
- position: relative;
4348
- outline: none;
4349
- word-break: break-word;
4350
- `,
4351
- subEntry: css`
4352
- margin: 0 0 0 0.5em;
4353
- padding-left: 0.75em;
4354
- border-left: 2px solid ${colors.darkGray[400]};
4355
- `,
4356
- expander: css`
4357
- & path {
4358
- stroke: ${colors.gray[400]};
3996
+ var getDeep = function (object, path) {
3997
+ validatePath(path);
3998
+ for (var i = 0; i < path.length; i++) {
3999
+ var key = path[i];
4000
+ if (isSet(object)) {
4001
+ object = getNthKey(object, +key);
4002
+ } else if (isMap(object)) {
4003
+ var row = +key;
4004
+ var type = +path[++i] === 0 ? 'key' : 'value';
4005
+ var keyOfRow = getNthKey(object, row);
4006
+ switch (type) {
4007
+ case 'key':
4008
+ object = keyOfRow;
4009
+ break;
4010
+ case 'value':
4011
+ object = object.get(keyOfRow);
4012
+ break;
4359
4013
  }
4360
- display: inline-flex;
4361
- align-items: center;
4362
- transition: all 0.1s ease;
4363
- `,
4364
- expanderButton: css`
4365
- cursor: pointer;
4366
- color: inherit;
4367
- font: inherit;
4368
- outline: inherit;
4369
- line-height: ${font.size.sm};
4370
- background: transparent;
4371
- border: none;
4372
- padding: 0;
4373
- display: inline-flex;
4374
- align-items: center;
4375
- gap: ${size[1]};
4376
-
4377
- &:focus-visible {
4378
- border-radius: ${border.radius.xs};
4379
- outline: 2px solid ${colors.blue[800]};
4014
+ } else {
4015
+ object = object[key];
4016
+ }
4017
+ }
4018
+ return object;
4019
+ };
4020
+ var setDeep = function (object, path, mapper) {
4021
+ validatePath(path);
4022
+ if (path.length === 0) {
4023
+ return mapper(object);
4024
+ }
4025
+ var parent = object;
4026
+ for (var i = 0; i < path.length - 1; i++) {
4027
+ var key = path[i];
4028
+ if (isArray$1(parent)) {
4029
+ var index = +key;
4030
+ parent = parent[index];
4031
+ } else if (isPlainObject$1(parent)) {
4032
+ parent = parent[key];
4033
+ } else if (isSet(parent)) {
4034
+ var row = +key;
4035
+ parent = getNthKey(parent, row);
4036
+ } else if (isMap(parent)) {
4037
+ var isEnd = i === path.length - 2;
4038
+ if (isEnd) {
4039
+ break;
4380
4040
  }
4381
- `,
4382
- info: css`
4383
- color: ${colors.gray[500]};
4384
- font-size: ${font.size.xs};
4385
- line-height: ${font.size.xs};
4386
- margin-left: ${size[1]};
4387
- `,
4388
- label: css`
4389
- color: ${colors.gray[300]};
4390
- `,
4391
- value: css`
4392
- color: ${colors.purple[400]};
4393
- `,
4394
- copyButton: css`
4395
- background-color: transparent;
4396
- border: none;
4397
- display: inline-flex;
4398
- padding: 0px;
4399
- align-items: center;
4400
- justify-content: center;
4401
- cursor: pointer;
4402
- width: ${size[3.5]};
4403
- height: ${size[3.5]};
4404
- position: relative;
4405
- top: 4px;
4406
- left: ${size[2]};
4407
- z-index: 1;
4408
-
4409
- &:hover svg .copier {
4410
- stroke: ${colors.gray[500]} !important;
4041
+ var row = +key;
4042
+ var type = +path[++i] === 0 ? 'key' : 'value';
4043
+ var keyOfRow = getNthKey(parent, row);
4044
+ switch (type) {
4045
+ case 'key':
4046
+ parent = keyOfRow;
4047
+ break;
4048
+ case 'value':
4049
+ parent = parent.get(keyOfRow);
4050
+ break;
4411
4051
  }
4052
+ }
4053
+ }
4054
+ var lastKey = path[path.length - 1];
4055
+ if (isArray$1(parent)) {
4056
+ parent[+lastKey] = mapper(parent[+lastKey]);
4057
+ } else if (isPlainObject$1(parent)) {
4058
+ parent[lastKey] = mapper(parent[lastKey]);
4059
+ }
4060
+ if (isSet(parent)) {
4061
+ var oldValue = getNthKey(parent, +lastKey);
4062
+ var newValue = mapper(oldValue);
4063
+ if (oldValue !== newValue) {
4064
+ parent["delete"](oldValue);
4065
+ parent.add(newValue);
4066
+ }
4067
+ }
4068
+ if (isMap(parent)) {
4069
+ var row = +path[path.length - 2];
4070
+ var keyToRow = getNthKey(parent, row);
4071
+ var type = +lastKey === 0 ? 'key' : 'value';
4072
+ switch (type) {
4073
+ case 'key':
4074
+ {
4075
+ var newKey = mapper(keyToRow);
4076
+ parent.set(newKey, parent.get(keyToRow));
4077
+ if (newKey !== keyToRow) {
4078
+ parent["delete"](keyToRow);
4079
+ }
4080
+ break;
4081
+ }
4082
+ case 'value':
4083
+ {
4084
+ parent.set(keyToRow, mapper(parent.get(keyToRow)));
4085
+ break;
4086
+ }
4087
+ }
4088
+ }
4089
+ return object;
4090
+ };
4412
4091
 
4413
- &:focus-visible {
4414
- border-radius: ${border.radius.xs};
4415
- outline: 2px solid ${colors.blue[800]};
4416
- outline-offset: 2px;
4417
- }
4418
- `
4419
- };
4092
+ var __read$1 = undefined && undefined.__read || function (o, n) {
4093
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4094
+ if (!m) return o;
4095
+ var i = m.call(o),
4096
+ r,
4097
+ ar = [],
4098
+ e;
4099
+ try {
4100
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4101
+ } catch (error) {
4102
+ e = {
4103
+ error: error
4104
+ };
4105
+ } finally {
4106
+ try {
4107
+ if (r && !r.done && (m = i["return"])) m.call(i);
4108
+ } finally {
4109
+ if (e) throw e.error;
4110
+ }
4111
+ }
4112
+ return ar;
4113
+ };
4114
+ var __spreadArray$1 = undefined && undefined.__spreadArray || function (to, from) {
4115
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
4116
+ return to;
4117
+ };
4118
+ function traverse(tree, walker, origin) {
4119
+ if (origin === void 0) {
4120
+ origin = [];
4121
+ }
4122
+ if (!tree) {
4123
+ return;
4124
+ }
4125
+ if (!isArray$1(tree)) {
4126
+ forEach(tree, function (subtree, key) {
4127
+ return traverse(subtree, walker, __spreadArray$1(__spreadArray$1([], __read$1(origin)), __read$1(parsePath(key))));
4128
+ });
4129
+ return;
4130
+ }
4131
+ var _a = __read$1(tree, 2),
4132
+ nodeValue = _a[0],
4133
+ children = _a[1];
4134
+ if (children) {
4135
+ forEach(children, function (child, key) {
4136
+ traverse(child, walker, __spreadArray$1(__spreadArray$1([], __read$1(origin)), __read$1(parsePath(key))));
4137
+ });
4138
+ }
4139
+ walker(nodeValue, origin);
4140
+ }
4141
+ function applyValueAnnotations(plain, annotations, superJson) {
4142
+ traverse(annotations, function (type, path) {
4143
+ plain = setDeep(plain, path, function (v) {
4144
+ return untransformValue(v, type, superJson);
4145
+ });
4146
+ });
4147
+ return plain;
4148
+ }
4149
+ function applyReferentialEqualityAnnotations(plain, annotations) {
4150
+ function apply(identicalPaths, path) {
4151
+ var object = getDeep(plain, parsePath(path));
4152
+ identicalPaths.map(parsePath).forEach(function (identicalObjectPath) {
4153
+ plain = setDeep(plain, identicalObjectPath, function () {
4154
+ return object;
4155
+ });
4156
+ });
4157
+ }
4158
+ if (isArray$1(annotations)) {
4159
+ var _a = __read$1(annotations, 2),
4160
+ root = _a[0],
4161
+ other = _a[1];
4162
+ root.forEach(function (identicalPath) {
4163
+ plain = setDeep(plain, parsePath(identicalPath), function () {
4164
+ return plain;
4165
+ });
4166
+ });
4167
+ if (other) {
4168
+ forEach(other, apply);
4169
+ }
4170
+ } else {
4171
+ forEach(annotations, apply);
4172
+ }
4173
+ return plain;
4174
+ }
4175
+ var isDeep = function (object, superJson) {
4176
+ return isPlainObject$1(object) || isArray$1(object) || isMap(object) || isSet(object) || isInstanceOfRegisteredClass(object, superJson);
4420
4177
  };
4421
- delegateEvents(["click"]);
4422
-
4423
- const QueryDevtoolsContext = createContext({
4424
- client: undefined,
4425
- onlineManager: undefined,
4426
- queryFlavor: '',
4427
- version: ''
4428
- });
4429
- function useQueryDevtoolsContext() {
4430
- return useContext(QueryDevtoolsContext);
4178
+ function addIdentity(object, path, identities) {
4179
+ var existingSet = identities.get(object);
4180
+ if (existingSet) {
4181
+ existingSet.push(path);
4182
+ } else {
4183
+ identities.set(object, [path]);
4184
+ }
4431
4185
  }
4432
-
4433
- // src/index.ts
4434
- var noop = () => {};
4435
- function createListTransition(source, options) {
4436
- const initSource = untrack(source);
4437
- const {
4438
- onChange
4439
- } = options;
4440
- let prevSet = new Set(options.appear ? void 0 : initSource);
4441
- const exiting = /* @__PURE__ */new WeakSet();
4442
- const [toRemove, setToRemove] = createSignal([], {
4443
- equals: false
4186
+ function generateReferentialEqualityAnnotations(identitites) {
4187
+ var result = {};
4188
+ var rootEqualityPaths = undefined;
4189
+ identitites.forEach(function (paths) {
4190
+ if (paths.length <= 1) {
4191
+ return;
4192
+ }
4193
+ var _a = __read$1(paths.map(function (path) {
4194
+ return path.map(String);
4195
+ }).sort(function (a, b) {
4196
+ return a.length - b.length;
4197
+ })),
4198
+ shortestPath = _a[0],
4199
+ identicalPaths = _a.slice(1);
4200
+ if (shortestPath.length === 0) {
4201
+ rootEqualityPaths = identicalPaths.map(stringifyPath);
4202
+ } else {
4203
+ result[stringifyPath(shortestPath)] = identicalPaths.map(stringifyPath);
4204
+ }
4444
4205
  });
4445
- const [isTransitionPending] = useTransition();
4446
- const finishRemoved = options.exitMethod === "remove" ? noop : els => {
4447
- setToRemove(p => (p.push.apply(p, els), p));
4448
- for (const el of els) exiting.delete(el);
4449
- };
4450
- const handleRemoved = options.exitMethod === "remove" ? noop : options.exitMethod === "keep-index" ? (els, el, i) => els.splice(i, 0, el) : (els, el) => els.push(el);
4451
- return createMemo(prev => {
4452
- const elsToRemove = toRemove();
4453
- const sourceList = source();
4454
- sourceList[$TRACK];
4455
- if (untrack(isTransitionPending)) {
4456
- isTransitionPending();
4457
- return prev;
4206
+ if (rootEqualityPaths) {
4207
+ if (isEmptyObject(result)) {
4208
+ return [rootEqualityPaths];
4209
+ } else {
4210
+ return [rootEqualityPaths, result];
4458
4211
  }
4459
- if (elsToRemove.length) {
4460
- const next = prev.filter(e => !elsToRemove.includes(e));
4461
- elsToRemove.length = 0;
4462
- onChange({
4463
- list: next,
4464
- added: [],
4465
- removed: [],
4466
- unchanged: next,
4467
- finishRemoved
4468
- });
4469
- return next;
4212
+ } else {
4213
+ return isEmptyObject(result) ? undefined : result;
4214
+ }
4215
+ }
4216
+ var walker = function (object, identities, superJson, path, objectsInThisPath) {
4217
+ var _a;
4218
+ if (path === void 0) {
4219
+ path = [];
4220
+ }
4221
+ if (objectsInThisPath === void 0) {
4222
+ objectsInThisPath = [];
4223
+ }
4224
+ if (!isPrimitive(object)) {
4225
+ addIdentity(object, path, identities);
4226
+ }
4227
+ if (!isDeep(object, superJson)) {
4228
+ var transformed_1 = transformValue(object, superJson);
4229
+ if (transformed_1) {
4230
+ return {
4231
+ transformedValue: transformed_1.value,
4232
+ annotations: [transformed_1.type]
4233
+ };
4234
+ } else {
4235
+ return {
4236
+ transformedValue: object
4237
+ };
4470
4238
  }
4471
- return untrack(() => {
4472
- const nextSet = new Set(sourceList);
4473
- const next = sourceList.slice();
4474
- const added = [];
4475
- const removed = [];
4476
- const unchanged = [];
4477
- for (const el of sourceList) {
4478
- (prevSet.has(el) ? unchanged : added).push(el);
4479
- }
4480
- let nothingChanged = !added.length;
4481
- for (let i = 0; i < prev.length; i++) {
4482
- const el = prev[i];
4483
- if (!nextSet.has(el)) {
4484
- if (!exiting.has(el)) {
4485
- removed.push(el);
4486
- exiting.add(el);
4487
- }
4488
- handleRemoved(next, el, i);
4489
- }
4490
- if (nothingChanged && el !== next[i]) nothingChanged = false;
4491
- }
4492
- if (!removed.length && nothingChanged) return prev;
4493
- onChange({
4494
- list: next,
4495
- added,
4496
- removed,
4497
- unchanged,
4498
- finishRemoved
4239
+ }
4240
+ if (includes(objectsInThisPath, object)) {
4241
+ return {
4242
+ transformedValue: null
4243
+ };
4244
+ }
4245
+ var transformationResult = transformValue(object, superJson);
4246
+ var transformed = (_a = transformationResult === null || transformationResult === void 0 ? void 0 : transformationResult.value) !== null && _a !== void 0 ? _a : object;
4247
+ if (!isPrimitive(object)) {
4248
+ objectsInThisPath = __spreadArray$1(__spreadArray$1([], __read$1(objectsInThisPath)), [object]);
4249
+ }
4250
+ var transformedValue = isArray$1(transformed) ? [] : {};
4251
+ var innerAnnotations = {};
4252
+ forEach(transformed, function (value, index) {
4253
+ var recursiveResult = walker(value, identities, superJson, __spreadArray$1(__spreadArray$1([], __read$1(path)), [index]), objectsInThisPath);
4254
+ transformedValue[index] = recursiveResult.transformedValue;
4255
+ if (isArray$1(recursiveResult.annotations)) {
4256
+ innerAnnotations[index] = recursiveResult.annotations;
4257
+ } else if (isPlainObject$1(recursiveResult.annotations)) {
4258
+ forEach(recursiveResult.annotations, function (tree, key) {
4259
+ innerAnnotations[escapeKey(index) + '.' + key] = tree;
4499
4260
  });
4500
- prevSet = nextSet;
4501
- return next;
4502
- });
4503
- }, options.appear ? [] : initSource.slice());
4261
+ }
4262
+ });
4263
+ if (isEmptyObject(innerAnnotations)) {
4264
+ return {
4265
+ transformedValue: transformedValue,
4266
+ annotations: !!transformationResult ? [transformationResult.type] : undefined
4267
+ };
4268
+ } else {
4269
+ return {
4270
+ transformedValue: transformedValue,
4271
+ annotations: !!transformationResult ? [transformationResult.type, innerAnnotations] : innerAnnotations
4272
+ };
4273
+ }
4274
+ };
4275
+
4276
+ function getType(payload) {
4277
+ return Object.prototype.toString.call(payload).slice(8, -1);
4278
+ }
4279
+ function isPlainObject(payload) {
4280
+ if (getType(payload) !== "Object") return false;
4281
+ const prototype = Object.getPrototypeOf(payload);
4282
+ return !!prototype && prototype.constructor === Object && prototype === Object.prototype;
4283
+ }
4284
+ function isArray(payload) {
4285
+ return getType(payload) === "Array";
4504
4286
  }
4505
4287
 
4506
- var isNonNullable = i => i != null;
4507
- var filterNonNullable = arr => arr.filter(isNonNullable);
4508
- var access = v => typeof v === "function" && !v.length ? v() : v;
4509
- var asArray = value => Array.isArray(value) ? value : value ? [value] : [];
4510
- function handleDiffArray(current, prev, handleAdded, handleRemoved) {
4511
- const currLength = current.length;
4512
- const prevLength = prev.length;
4513
- let i = 0;
4514
- if (!prevLength) {
4515
- for (; i < currLength; i++) handleAdded(current[i]);
4516
- return;
4517
- }
4518
- if (!currLength) {
4519
- for (; i < prevLength; i++) handleRemoved(prev[i]);
4520
- return;
4521
- }
4522
- for (; i < prevLength; i++) {
4523
- if (prev[i] !== current[i]) break;
4288
+ function assignProp(carry, key, newVal, originalObject, includeNonenumerable) {
4289
+ const propType = {}.propertyIsEnumerable.call(originalObject, key) ? 'enumerable' : 'nonenumerable';
4290
+ if (propType === 'enumerable') carry[key] = newVal;
4291
+ if (includeNonenumerable && propType === 'nonenumerable') {
4292
+ Object.defineProperty(carry, key, {
4293
+ value: newVal,
4294
+ enumerable: false,
4295
+ writable: true,
4296
+ configurable: true
4297
+ });
4524
4298
  }
4525
- let prevEl;
4526
- let currEl;
4527
- prev = prev.slice(i);
4528
- current = current.slice(i);
4529
- for (prevEl of prev) {
4530
- if (!current.includes(prevEl)) handleRemoved(prevEl);
4299
+ }
4300
+ /**
4301
+ * Copy (clone) an object and all its props recursively to get rid of any prop referenced of the original object. Arrays are also cloned, however objects inside arrays are still linked.
4302
+ *
4303
+ * @export
4304
+ * @template T
4305
+ * @param {T} target Target can be anything
4306
+ * @param {Options} [options = {}] Options can be `props` or `nonenumerable`
4307
+ * @returns {T} the target with replaced values
4308
+ * @export
4309
+ */
4310
+ function copy(target, options = {}) {
4311
+ if (isArray(target)) {
4312
+ return target.map(item => copy(item, options));
4531
4313
  }
4532
- for (currEl of current) {
4533
- if (!prev.includes(currEl)) handleAdded(currEl);
4314
+ if (!isPlainObject(target)) {
4315
+ return target;
4534
4316
  }
4317
+ const props = Object.getOwnPropertyNames(target);
4318
+ const symbols = Object.getOwnPropertySymbols(target);
4319
+ return [...props, ...symbols].reduce((carry, key) => {
4320
+ if (isArray(options.props) && !options.props.includes(key)) {
4321
+ return carry;
4322
+ }
4323
+ const val = target[key];
4324
+ const newVal = copy(val, options);
4325
+ assignProp(carry, key, newVal, target, options.nonenumerable);
4326
+ return carry;
4327
+ }, {});
4535
4328
  }
4536
4329
 
4537
- var defaultElementPredicate = item => item instanceof Element;
4538
- function getResolvedElements(value, predicate) {
4539
- if (predicate(value)) return value;
4540
- if (typeof value === "function" && !value.length) return getResolvedElements(value(), predicate);
4541
- if (Array.isArray(value)) {
4542
- const results = [];
4543
- for (const item of value) {
4544
- const result = getResolvedElements(item, predicate);
4545
- if (result) Array.isArray(result) ? results.push.apply(results, result) : results.push(result);
4330
+ var __assign = undefined && undefined.__assign || function () {
4331
+ __assign = Object.assign || function (t) {
4332
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4333
+ s = arguments[i];
4334
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
4546
4335
  }
4547
- return results.length ? results : null;
4548
- }
4549
- return null;
4550
- }
4551
- function resolveElements(fn, predicate = defaultElementPredicate, serverPredicate = defaultElementPredicate) {
4552
- const children2 = createMemo(fn);
4553
- const memo = createMemo(() => getResolvedElements(children2(), predicate));
4554
- memo.toArray = () => {
4555
- const value = memo();
4556
- return Array.isArray(value) ? value : value ? [value] : [];
4336
+ return t;
4557
4337
  };
4558
- return memo;
4559
- }
4560
-
4561
- // src/common.ts
4562
- function createClassnames(props) {
4563
- return createMemo(() => {
4564
- const name = props.name || "s";
4565
- return {
4566
- enterActiveClasses: (props.enterActiveClass || name + "-enter-active").split(" "),
4567
- enterClasses: (props.enterClass || name + "-enter").split(" "),
4568
- enterToClasses: (props.enterToClass || name + "-enter-to").split(" "),
4569
- exitActiveClasses: (props.exitActiveClass || name + "-exit-active").split(" "),
4570
- exitClasses: (props.exitClass || name + "-exit").split(" "),
4571
- exitToClasses: (props.exitToClass || name + "-exit-to").split(" "),
4572
- moveClasses: (props.moveClass || name + "-move").split(" ")
4338
+ return __assign.apply(this, arguments);
4339
+ };
4340
+ var __read = undefined && undefined.__read || function (o, n) {
4341
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
4342
+ if (!m) return o;
4343
+ var i = m.call(o),
4344
+ r,
4345
+ ar = [],
4346
+ e;
4347
+ try {
4348
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
4349
+ } catch (error) {
4350
+ e = {
4351
+ error: error
4573
4352
  };
4574
- });
4575
- }
4576
- function nextFrame(fn) {
4577
- requestAnimationFrame(() => requestAnimationFrame(fn));
4578
- }
4579
- function enterTransition(classnames, events, el, done) {
4580
- const {
4581
- enterClasses,
4582
- enterActiveClasses,
4583
- enterToClasses
4584
- } = classnames,
4585
- {
4586
- onBeforeEnter,
4587
- onEnter,
4588
- onAfterEnter
4589
- } = events;
4590
- onBeforeEnter?.(el);
4591
- el.classList.add(...enterClasses);
4592
- el.classList.add(...enterActiveClasses);
4593
- queueMicrotask(() => {
4594
- if (!el.parentNode) return done?.();
4595
- onEnter?.(el, () => endTransition());
4596
- });
4597
- nextFrame(() => {
4598
- el.classList.remove(...enterClasses);
4599
- el.classList.add(...enterToClasses);
4600
- if (!onEnter || onEnter.length < 2) {
4601
- el.addEventListener("transitionend", endTransition);
4602
- el.addEventListener("animationend", endTransition);
4603
- }
4604
- });
4605
- function endTransition(e) {
4606
- if (!e || e.target === el) {
4607
- done?.();
4608
- el.removeEventListener("transitionend", endTransition);
4609
- el.removeEventListener("animationend", endTransition);
4610
- el.classList.remove(...enterActiveClasses);
4611
- el.classList.remove(...enterToClasses);
4612
- onAfterEnter?.(el);
4353
+ } finally {
4354
+ try {
4355
+ if (r && !r.done && (m = i["return"])) m.call(i);
4356
+ } finally {
4357
+ if (e) throw e.error;
4613
4358
  }
4614
4359
  }
4615
- }
4616
- function exitTransition(classnames, events, el, done) {
4617
- const {
4618
- exitClasses,
4619
- exitActiveClasses,
4620
- exitToClasses
4621
- } = classnames,
4622
- {
4623
- onBeforeExit,
4624
- onExit,
4625
- onAfterExit
4626
- } = events;
4627
- if (!el.parentNode) return done?.();
4628
- onBeforeExit?.(el);
4629
- el.classList.add(...exitClasses);
4630
- el.classList.add(...exitActiveClasses);
4631
- onExit?.(el, () => endTransition());
4632
- nextFrame(() => {
4633
- el.classList.remove(...exitClasses);
4634
- el.classList.add(...exitToClasses);
4635
- if (!onExit || onExit.length < 2) {
4636
- el.addEventListener("transitionend", endTransition);
4637
- el.addEventListener("animationend", endTransition);
4638
- }
4639
- });
4640
- function endTransition(e) {
4641
- if (!e || e.target === el) {
4642
- done?.();
4643
- el.removeEventListener("transitionend", endTransition);
4644
- el.removeEventListener("animationend", endTransition);
4645
- el.classList.remove(...exitActiveClasses);
4646
- el.classList.remove(...exitToClasses);
4647
- onAfterExit?.(el);
4648
- }
4360
+ return ar;
4361
+ };
4362
+ var __spreadArray = undefined && undefined.__spreadArray || function (to, from) {
4363
+ for (var i = 0, il = from.length, j = to.length; i < il; i++, j++) to[j] = from[i];
4364
+ return to;
4365
+ };
4366
+ var SuperJSON = /** @class */function () {
4367
+ function SuperJSON() {
4368
+ this.classRegistry = new ClassRegistry();
4369
+ this.symbolRegistry = new Registry(function (s) {
4370
+ var _a;
4371
+ return (_a = s.description) !== null && _a !== void 0 ? _a : '';
4372
+ });
4373
+ this.customTransformerRegistry = new CustomTransformerRegistry();
4374
+ this.allowedErrorProps = [];
4649
4375
  }
4650
- }
4651
- var TransitionGroup = props => {
4652
- const classnames = createClassnames(props);
4653
- return createListTransition(resolveElements(() => props.children).toArray, {
4654
- appear: props.appear,
4655
- exitMethod: "keep-index",
4656
- onChange({
4657
- added,
4658
- removed,
4659
- finishRemoved,
4660
- list
4661
- }) {
4662
- const classes = classnames();
4663
- for (const el of added) {
4664
- enterTransition(classes, props, el);
4665
- }
4666
- const toMove = [];
4667
- for (const el of list) {
4668
- if (el.isConnected && (el instanceof HTMLElement || el instanceof SVGElement)) {
4669
- toMove.push({
4670
- el,
4671
- rect: el.getBoundingClientRect()
4672
- });
4673
- }
4674
- }
4675
- queueMicrotask(() => {
4676
- const moved = [];
4677
- for (const {
4678
- el,
4679
- rect
4680
- } of toMove) {
4681
- if (el.isConnected) {
4682
- const newRect = el.getBoundingClientRect(),
4683
- dX = rect.left - newRect.left,
4684
- dY = rect.top - newRect.top;
4685
- if (dX || dY) {
4686
- el.style.transform = `translate(${dX}px, ${dY}px)`;
4687
- el.style.transitionDuration = "0s";
4688
- moved.push(el);
4689
- }
4690
- }
4691
- }
4692
- document.body.offsetHeight;
4693
- for (const el of moved) {
4694
- let endTransition2 = function (e) {
4695
- if (e.target === el || /transform$/.test(e.propertyName)) {
4696
- el.removeEventListener("transitionend", endTransition2);
4697
- el.classList.remove(...classes.moveClasses);
4698
- }
4699
- };
4700
- el.classList.add(...classes.moveClasses);
4701
- el.style.transform = el.style.transitionDuration = "";
4702
- el.addEventListener("transitionend", endTransition2);
4703
- }
4376
+ SuperJSON.prototype.serialize = function (object) {
4377
+ var identities = new Map();
4378
+ var output = walker(object, identities, this);
4379
+ var res = {
4380
+ json: output.transformedValue
4381
+ };
4382
+ if (output.annotations) {
4383
+ res.meta = __assign(__assign({}, res.meta), {
4384
+ values: output.annotations
4704
4385
  });
4705
- for (const el of removed) {
4706
- exitTransition(classes, props, el, () => finishRemoved([el]));
4707
- }
4708
4386
  }
4709
- });
4387
+ var equalityAnnotations = generateReferentialEqualityAnnotations(identities);
4388
+ if (equalityAnnotations) {
4389
+ res.meta = __assign(__assign({}, res.meta), {
4390
+ referentialEqualities: equalityAnnotations
4391
+ });
4392
+ }
4393
+ return res;
4394
+ };
4395
+ SuperJSON.prototype.deserialize = function (payload) {
4396
+ var json = payload.json,
4397
+ meta = payload.meta;
4398
+ var result = copy(json);
4399
+ if (meta === null || meta === void 0 ? void 0 : meta.values) {
4400
+ result = applyValueAnnotations(result, meta.values, this);
4401
+ }
4402
+ if (meta === null || meta === void 0 ? void 0 : meta.referentialEqualities) {
4403
+ result = applyReferentialEqualityAnnotations(result, meta.referentialEqualities);
4404
+ }
4405
+ return result;
4406
+ };
4407
+ SuperJSON.prototype.stringify = function (object) {
4408
+ return JSON.stringify(this.serialize(object));
4409
+ };
4410
+ SuperJSON.prototype.parse = function (string) {
4411
+ return this.deserialize(JSON.parse(string));
4412
+ };
4413
+ SuperJSON.prototype.registerClass = function (v, options) {
4414
+ this.classRegistry.register(v, options);
4415
+ };
4416
+ SuperJSON.prototype.registerSymbol = function (v, identifier) {
4417
+ this.symbolRegistry.register(v, identifier);
4418
+ };
4419
+ SuperJSON.prototype.registerCustom = function (transformer, name) {
4420
+ this.customTransformerRegistry.register(__assign({
4421
+ name: name
4422
+ }, transformer));
4423
+ };
4424
+ SuperJSON.prototype.allowErrorProps = function () {
4425
+ var _a;
4426
+ var props = [];
4427
+ for (var _i = 0; _i < arguments.length; _i++) {
4428
+ props[_i] = arguments[_i];
4429
+ }
4430
+ (_a = this.allowedErrorProps).push.apply(_a, __spreadArray([], __read(props)));
4431
+ };
4432
+ SuperJSON.defaultInstance = new SuperJSON();
4433
+ SuperJSON.serialize = SuperJSON.defaultInstance.serialize.bind(SuperJSON.defaultInstance);
4434
+ SuperJSON.deserialize = SuperJSON.defaultInstance.deserialize.bind(SuperJSON.defaultInstance);
4435
+ SuperJSON.stringify = SuperJSON.defaultInstance.stringify.bind(SuperJSON.defaultInstance);
4436
+ SuperJSON.parse = SuperJSON.defaultInstance.parse.bind(SuperJSON.defaultInstance);
4437
+ SuperJSON.registerClass = SuperJSON.defaultInstance.registerClass.bind(SuperJSON.defaultInstance);
4438
+ SuperJSON.registerSymbol = SuperJSON.defaultInstance.registerSymbol.bind(SuperJSON.defaultInstance);
4439
+ SuperJSON.registerCustom = SuperJSON.defaultInstance.registerCustom.bind(SuperJSON.defaultInstance);
4440
+ SuperJSON.allowErrorProps = SuperJSON.defaultInstance.allowErrorProps.bind(SuperJSON.defaultInstance);
4441
+ return SuperJSON;
4442
+ }();
4443
+ var serialize = SuperJSON.serialize;
4444
+ var stringify = SuperJSON.stringify;
4445
+
4446
+ function getQueryStatusLabel(query) {
4447
+ return query.state.fetchStatus === 'fetching' ? 'fetching' : !query.getObserversCount() ? 'inactive' : query.state.fetchStatus === 'paused' ? 'paused' : query.isStale() ? 'stale' : 'fresh';
4448
+ }
4449
+ function getSidedProp(prop, side) {
4450
+ return `${prop}${side.charAt(0).toUpperCase() + side.slice(1)}`;
4451
+ }
4452
+ function getQueryStatusColor({
4453
+ queryState,
4454
+ observerCount,
4455
+ isStale
4456
+ }) {
4457
+ return queryState.fetchStatus === 'fetching' ? 'blue' : !observerCount ? 'gray' : queryState.fetchStatus === 'paused' ? 'purple' : isStale ? 'yellow' : 'green';
4458
+ }
4459
+ function getQueryStatusColorByLabel(label) {
4460
+ return label === 'fresh' ? 'green' : label === 'stale' ? 'yellow' : label === 'paused' ? 'purple' : label === 'inactive' ? 'gray' : 'blue';
4461
+ }
4462
+
4463
+ /**
4464
+ * Displays a string regardless the type of the data
4465
+ * @param {unknown} value Value to be stringified
4466
+ * @param {boolean} beautify Formats json to multiline
4467
+ */
4468
+ const displayValue = (value, beautify = false) => {
4469
+ const {
4470
+ json
4471
+ } = serialize(value);
4472
+ return JSON.stringify(json, null, beautify ? 2 : undefined);
4710
4473
  };
4711
4474
 
4712
- const loadFonts = () => {
4713
- const link = document.createElement('link');
4714
- link.href = 'https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Roboto&display=swap';
4715
- link.rel = 'stylesheet';
4716
- document.head.appendChild(link);
4475
+ // Sorting functions
4476
+
4477
+ const getStatusRank = q => q.state.fetchStatus !== 'idle' ? 0 : !q.getObserversCount() ? 3 : q.isStale() ? 2 : 1;
4478
+ const queryHashSort = (a, b) => a.queryHash.localeCompare(b.queryHash);
4479
+ const dateSort = (a, b) => a.state.dataUpdatedAt < b.state.dataUpdatedAt ? 1 : -1;
4480
+ const statusAndDateSort = (a, b) => {
4481
+ if (getStatusRank(a) === getStatusRank(b)) {
4482
+ return dateSort(a, b);
4483
+ }
4484
+ return getStatusRank(a) > getStatusRank(b) ? 1 : -1;
4485
+ };
4486
+ const sortFns = {
4487
+ status: statusAndDateSort,
4488
+ 'query hash': queryHashSort,
4489
+ 'last updated': dateSort
4490
+ };
4491
+ const convertRemToPixels = rem => {
4492
+ return rem * parseFloat(getComputedStyle(document.documentElement).fontSize);
4717
4493
  };
4718
4494
 
4719
- // src/storage.ts
4720
- function createStorage(props) {
4721
- const [error, setError] = createSignal();
4722
- const handleError = props?.throw ? (err, fallback) => {
4723
- setError(err instanceof Error ? err : new Error(fallback));
4724
- throw err;
4725
- } : (err, fallback) => {
4726
- setError(err instanceof Error ? err : new Error(fallback));
4727
- };
4728
- const apis = props?.api ? Array.isArray(props.api) ? props.api : [props.api] : [globalThis.localStorage].filter(Boolean);
4729
- const prefix = props?.prefix ? `${props.prefix}.` : "";
4730
- const signals = /* @__PURE__ */new Map();
4731
- const store = new Proxy({}, {
4732
- get(_, key) {
4733
- let node = signals.get(key);
4734
- if (!node) {
4735
- node = createSignal(void 0, {
4736
- equals: false
4737
- });
4738
- signals.set(key, node);
4739
- }
4740
- node[0]();
4741
- const value = apis.reduce((result, api) => {
4742
- if (result !== null || !api) {
4743
- return result;
4744
- }
4745
- try {
4746
- return api.getItem(`${prefix}${key}`);
4747
- } catch (err) {
4748
- handleError(err, `Error reading ${prefix}${key} from ${api["name"]}`);
4749
- return null;
4750
- }
4751
- }, null);
4752
- if (value !== null && props?.deserializer) {
4753
- return props.deserializer(value, key, props.options);
4754
- }
4755
- return value;
4756
- }
4757
- });
4758
- const setter = (key, value, options) => {
4759
- const filteredValue = props?.serializer ? props.serializer(value, key, options ?? props.options) : value;
4760
- const apiKey = `${prefix}${key}`;
4761
- apis.forEach(api => {
4762
- try {
4763
- api.getItem(apiKey) !== filteredValue && api.setItem(apiKey, filteredValue);
4764
- } catch (err) {
4765
- handleError(err, `Error setting ${prefix}${key} to ${filteredValue} in ${api.name}`);
4495
+ const _tmpl$$2 = /*#__PURE__*/template(`<svg width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M13 13L9.00007 9M10.3333 5.66667C10.3333 8.244 8.244 10.3333 5.66667 10.3333C3.08934 10.3333 1 8.244 1 5.66667C1 3.08934 3.08934 1 5.66667 1C8.244 1 10.3333 3.08934 10.3333 5.66667Z" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4496
+ _tmpl$2$2 = /*#__PURE__*/template(`<svg width="10" height="6" viewBox="0 0 10 6" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L5 5L9 1" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4497
+ _tmpl$3$2 = /*#__PURE__*/template(`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 13.3333V2.66667M8 2.66667L4 6.66667M8 2.66667L12 6.66667" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4498
+ _tmpl$4$2 = /*#__PURE__*/template(`<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 2.66667V13.3333M8 13.3333L4 9.33333M8 13.3333L12 9.33333" stroke="#98A2B3" stroke-width="1.66667" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4499
+ _tmpl$5$2 = /*#__PURE__*/template(`<svg stroke="#98A2B3" fill="#98A2B3" stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M0 0h24v24H0z"></path><path d="M1 9l2 2c4.97-4.97 13.03-4.97 18 0l2-2C16.93 2.93 7.08 2.93 1 9zm8 8l3 3 3-3a4.237 4.237 0 00-6 0zm-4-4l2 2a7.074 7.074 0 0110 0l2-2C15.14 9.14 8.87 9.14 5 13z"></path></svg>`, 6),
4500
+ _tmpl$6$2 = /*#__PURE__*/template(`<svg stroke-width="0" viewBox="0 0 24 24" height="1em" width="1em" xmlns="http://www.w3.org/2000/svg"><path fill="none" d="M24 .01c0-.01 0-.01 0 0L0 0v24h24V.01zM0 0h24v24H0V0zm0 0h24v24H0V0z"></path><path d="M22.99 9C19.15 5.16 13.8 3.76 8.84 4.78l2.52 2.52c3.47-.17 6.99 1.05 9.63 3.7l2-2zm-4 4a9.793 9.793 0 00-4.49-2.56l3.53 3.53.96-.97zM2 3.05L5.07 6.1C3.6 6.82 2.22 7.78 1 9l1.99 2c1.24-1.24 2.67-2.16 4.2-2.77l2.24 2.24A9.684 9.684 0 005 13v.01L6.99 15a7.042 7.042 0 014.92-2.06L18.98 20l1.27-1.26L3.29 1.79 2 3.05zM9 17l3 3 3-3a4.237 4.237 0 00-6 0z"></path></svg>`, 6),
4501
+ _tmpl$7$2 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.3951 19.3711L9.97955 20.6856C10.1533 21.0768 10.4368 21.4093 10.7958 21.6426C11.1547 21.8759 11.5737 22.0001 12.0018 22C12.4299 22.0001 12.8488 21.8759 13.2078 21.6426C13.5667 21.4093 13.8503 21.0768 14.024 20.6856L14.6084 19.3711C14.8165 18.9047 15.1664 18.5159 15.6084 18.26C16.0532 18.0034 16.5678 17.8941 17.0784 17.9478L18.5084 18.1C18.9341 18.145 19.3637 18.0656 19.7451 17.8713C20.1265 17.6771 20.4434 17.3763 20.6573 17.0056C20.8715 16.635 20.9735 16.2103 20.9511 15.7829C20.9286 15.3555 20.7825 14.9438 20.5307 14.5978L19.684 13.4344C19.3825 13.0171 19.2214 12.5148 19.224 12C19.2239 11.4866 19.3865 10.9864 19.6884 10.5711L20.5351 9.40778C20.787 9.06175 20.933 8.65007 20.9555 8.22267C20.978 7.79528 20.8759 7.37054 20.6618 7C20.4479 6.62923 20.131 6.32849 19.7496 6.13423C19.3681 5.93997 18.9386 5.86053 18.5129 5.90556L17.0829 6.05778C16.5722 6.11141 16.0577 6.00212 15.6129 5.74556C15.17 5.48825 14.82 5.09736 14.6129 4.62889L14.024 3.31444C13.8503 2.92317 13.5667 2.59072 13.2078 2.3574C12.8488 2.12408 12.4299 1.99993 12.0018 2C11.5737 1.99993 11.1547 2.12408 10.7958 2.3574C10.4368 2.59072 10.1533 2.92317 9.97955 3.31444L9.3951 4.62889C9.18803 5.09736 8.83798 5.48825 8.3951 5.74556C7.95032 6.00212 7.43577 6.11141 6.9251 6.05778L5.49066 5.90556C5.06499 5.86053 4.6354 5.93997 4.25397 6.13423C3.87255 6.32849 3.55567 6.62923 3.34177 7C3.12759 7.37054 3.02555 7.79528 3.04804 8.22267C3.07052 8.65007 3.21656 9.06175 3.46844 9.40778L4.3151 10.5711C4.61704 10.9864 4.77964 11.4866 4.77955 12C4.77964 12.5134 4.61704 13.0137 4.3151 13.4289L3.46844 14.5922C3.21656 14.9382 3.07052 15.3499 3.04804 15.7773C3.02555 16.2047 3.12759 16.6295 3.34177 17C3.55589 17.3706 3.8728 17.6712 4.25417 17.8654C4.63554 18.0596 5.06502 18.1392 5.49066 18.0944L6.92066 17.9422C7.43133 17.8886 7.94587 17.9979 8.39066 18.2544C8.83519 18.511 9.18687 18.902 9.3951 19.3711Z" stroke="#98A2B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path><path d="M12 15C13.6568 15 15 13.6569 15 12C15 10.3431 13.6568 9 12 9C10.3431 9 8.99998 10.3431 8.99998 12C8.99998 13.6569 10.3431 15 12 15Z" stroke="#98A2B3" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 6),
4502
+ _tmpl$8$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path class="copier" d="M8 8V5.2C8 4.0799 8 3.51984 8.21799 3.09202C8.40973 2.71569 8.71569 2.40973 9.09202 2.21799C9.51984 2 10.0799 2 11.2 2H18.8C19.9201 2 20.4802 2 20.908 2.21799C21.2843 2.40973 21.5903 2.71569 21.782 3.09202C22 3.51984 22 4.0799 22 5.2V12.8C22 13.9201 22 14.4802 21.782 14.908C21.5903 15.2843 21.2843 15.5903 20.908 15.782C20.4802 16 19.9201 16 18.8 16H16M5.2 22H12.8C13.9201 22 14.4802 22 14.908 21.782C15.2843 21.5903 15.5903 21.2843 15.782 20.908C16 20.4802 16 19.9201 16 18.8V11.2C16 10.0799 16 9.51984 15.782 9.09202C15.5903 8.71569 15.2843 8.40973 14.908 8.21799C14.4802 8 13.9201 8 12.8 8H5.2C4.0799 8 3.51984 8 3.09202 8.21799C2.71569 8.40973 2.40973 8.71569 2.21799 9.09202C2 9.51984 2 10.0799 2 11.2V18.8C2 19.9201 2 20.4802 2.21799 20.908C2.40973 21.2843 2.71569 21.5903 3.09202 21.782C3.51984 22 4.07989 22 5.2 22Z" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" stroke="#98A2B3"></path></svg>`, 4),
4503
+ _tmpl$9$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.5 12L10.5 15L16.5 9M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z" stroke="#12B76A" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4504
+ _tmpl$10$1 = /*#__PURE__*/template(`<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9 9L15 15M15 9L9 15M7.8 21H16.2C17.8802 21 18.7202 21 19.362 20.673C19.9265 20.3854 20.3854 19.9265 20.673 19.362C21 18.7202 21 17.8802 21 16.2V7.8C21 6.11984 21 5.27976 20.673 4.63803C20.3854 4.07354 19.9265 3.6146 19.362 3.32698C18.7202 3 17.8802 3 16.2 3H7.8C6.11984 3 5.27976 3 4.63803 3.32698C4.07354 3.6146 3.6146 4.07354 3.32698 4.63803C3 5.27976 3 6.11984 3 7.8V16.2C3 17.8802 3 18.7202 3.32698 19.362C3.6146 19.9265 4.07354 20.3854 4.63803 20.673C5.27976 21 6.11984 21 7.8 21Z" stroke="#F04438" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg>`, 4),
4505
+ _tmpl$11$1 = /*#__PURE__*/template(`<svg version="1.0" viewBox="0 0 633 633"><linearGradient id="a" x1="-666.45" x2="-666.45" y1="163.28" y2="163.99" gradientTransform="matrix(633 0 0 633 422177 -103358)" gradientUnits="userSpaceOnUse"><stop stop-color="#6BDAFF" offset="0"></stop><stop stop-color="#F9FFB5" offset=".32"></stop><stop stop-color="#FFA770" offset=".71"></stop><stop stop-color="#FF7373" offset="1"></stop></linearGradient><circle cx="316.5" cy="316.5" r="316.5" fill="url(#a)"></circle><defs><filter id="am" x="-137.5" y="412" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="b" x="-137.5" y="412" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#am)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#b)"><ellipse cx="89.5" cy="610.5" rx="214.5" ry="186" fill="#015064" stroke="#00CFE2" stroke-width="25"></ellipse></g><defs><filter id="ah" x="316.5" y="412" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="k" x="316.5" y="412" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ah)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#k)"><ellipse cx="543.5" cy="610.5" rx="214.5" ry="186" fill="#015064" stroke="#00CFE2" stroke-width="25"></ellipse></g><defs><filter id="ae" x="-137.5" y="450" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="j" x="-137.5" y="450" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ae)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#j)"><ellipse cx="89.5" cy="648.5" rx="214.5" ry="186" fill="#015064" stroke="#00A8B8" stroke-width="25"></ellipse></g><defs><filter id="ai" x="316.5" y="450" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="i" x="316.5" y="450" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ai)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#i)"><ellipse cx="543.5" cy="648.5" rx="214.5" ry="186" fill="#015064" stroke="#00A8B8" stroke-width="25"></ellipse></g><defs><filter id="aj" x="-137.5" y="486" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="h" x="-137.5" y="486" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#aj)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#h)"><ellipse cx="89.5" cy="684.5" rx="214.5" ry="186" fill="#015064" stroke="#007782" stroke-width="25"></ellipse></g><defs><filter id="ag" x="316.5" y="486" width="454" height="396.9" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="g" x="316.5" y="486" width="454" height="396.9" maskUnits="userSpaceOnUse"><g filter="url(#ag)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#g)"><ellipse cx="543.5" cy="684.5" rx="214.5" ry="186" fill="#015064" stroke="#007782" stroke-width="25"></ellipse></g><defs><filter id="af" x="272.2" y="308" width="176.9" height="129.3" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="f" x="272.2" y="308" width="176.9" height="129.3" maskUnits="userSpaceOnUse"><g filter="url(#af)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#f)"><line x1="436" x2="431" y1="403.2" y2="431.8" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><line x1="291" x2="280" y1="341.5" y2="403.5" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><line x1="332.9" x2="328.6" y1="384.1" y2="411.2" fill="none" stroke="#000" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="11"></line><linearGradient id="m" x1="-670.75" x2="-671.59" y1="164.4" y2="164.49" gradientTransform="matrix(-184.16 -32.472 -11.461 64.997 -121359 -32126)" gradientUnits="userSpaceOnUse"><stop stop-color="#EE2700" offset="0"></stop><stop stop-color="#FF008E" offset="1"></stop></linearGradient><path d="m344.1 363 97.7 17.2c5.8 2.1 8.2 6.1 7.1 12.1s-4.7 9.2-11 9.9l-106-18.7-57.5-59.2c-3.2-4.8-2.9-9.1 0.8-12.8s8.3-4.4 13.7-2.1l55.2 53.6z" clip-rule="evenodd" fill="url(#m)" fill-rule="evenodd"></path><line x1="428.2" x2="429.1" y1="384.5" y2="378" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="395.2" x2="396.1" y1="379.5" y2="373" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="362.2" x2="363.1" y1="373.5" y2="367.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="324.2" x2="328.4" y1="351.3" y2="347.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line><line x1="303.2" x2="307.4" y1="331.3" y2="327.4" fill="none" stroke="#fff" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="7"></line></g><defs><filter id="ak" x="73.2" y="113.8" width="280.6" height="317.4" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="e" x="73.2" y="113.8" width="280.6" height="317.4" maskUnits="userSpaceOnUse"><g filter="url(#ak)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#e)"><linearGradient id="n" x1="-672.16" x2="-672.16" y1="165.03" y2="166.03" gradientTransform="matrix(-100.18 48.861 97.976 200.88 -83342 -93.059)" gradientUnits="userSpaceOnUse"><stop stop-color="#A17500" offset="0"></stop><stop stop-color="#5D2100" offset="1"></stop></linearGradient><path d="m192.3 203c8.1 37.3 14 73.6 17.8 109.1 3.8 35.4 2.8 75.1-3 119.2l61.2-16.7c-15.6-59-25.2-97.9-28.6-116.6s-10.8-51.9-22.1-99.6l-25.3 4.6" clip-rule="evenodd" fill="url(#n)" fill-rule="evenodd"></path><g stroke="#2F8A00"><linearGradient id="r" x1="-660.23" x2="-660.23" y1="166.72" y2="167.72" gradientTransform="matrix(92.683 4.8573 -2.0259 38.657 61680 -3088.6)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m195 183.9s-12.6-22.1-36.5-29.9c-15.9-5.2-34.4-1.5-55.5 11.1 15.9 14.3 29.5 22.6 40.7 24.9 16.8 3.6 51.3-6.1 51.3-6.1z" clip-rule="evenodd" fill="url(#r)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="s" x1="-661.36" x2="-661.36" y1="164.18" y2="165.18" gradientTransform="matrix(110 5.7648 -6.3599 121.35 73933 -15933)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5s-47.5-8.5-83.2 15.7c-23.8 16.2-34.3 49.3-31.6 99.4 30.3-27.8 52.1-48.5 65.2-61.9 19.8-20.2 49.6-53.2 49.6-53.2z" clip-rule="evenodd" fill="url(#s)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="q" x1="-656.79" x2="-656.79" y1="165.15" y2="166.15" gradientTransform="matrix(62.954 3.2993 -3.5023 66.828 42156 -8754.1)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m195 183.9c-0.8-21.9 6-38 20.6-48.2s29.8-15.4 45.5-15.3c-6.1 21.4-14.5 35.8-25.2 43.4s-24.4 14.2-40.9 20.1z" clip-rule="evenodd" fill="url(#q)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="p" x1="-663.07" x2="-663.07" y1="165.44" y2="166.44" gradientTransform="matrix(152.47 7.9907 -3.0936 59.029 101884 -4318.7)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c31.9-30 64.1-39.7 96.7-29s50.8 30.4 54.6 59.1c-35.2-5.5-60.4-9.6-75.8-12.1-15.3-2.6-40.5-8.6-75.5-18z" clip-rule="evenodd" fill="url(#p)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="o" x1="-662.57" x2="-662.57" y1="164.44" y2="165.44" gradientTransform="matrix(136.46 7.1517 -5.2163 99.533 91536 -11442)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c35.8-7.6 65.6-0.2 89.2 22s37.7 49 42.3 80.3c-39.8-9.7-68.3-23.8-85.5-42.4s-32.5-38.5-46-59.9z" clip-rule="evenodd" fill="url(#o)" fill-rule="evenodd" stroke-width="13"></path><linearGradient id="l" x1="-656.43" x2="-656.43" y1="163.86" y2="164.86" gradientTransform="matrix(60.866 3.1899 -8.7773 167.48 41560 -25168)" gradientUnits="userSpaceOnUse"><stop stop-color="#2F8A00" offset="0"></stop><stop stop-color="#90FF57" offset="1"></stop></linearGradient><path d="m194.9 184.5c-33.6 13.8-53.6 35.7-60.1 65.6s-3.6 63.1 8.7 99.6c27.4-40.3 43.2-69.6 47.4-88s5.6-44.1 4-77.2z" clip-rule="evenodd" fill="url(#l)" fill-rule="evenodd" stroke-width="13"></path><path d="m196.5 182.3c-14.8 21.6-25.1 41.4-30.8 59.4s-9.5 33-11.1 45.1" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m194.9 185.7c-24.4 1.7-43.8 9-58.1 21.8s-24.7 25.4-31.3 37.8" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m204.5 176.4c29.7-6.7 52-8.4 67-5.1s26.9 8.6 35.8 15.9" fill="none" stroke-linecap="round" stroke-width="8"></path><path d="m196.5 181.4c20.3 9.9 38.2 20.5 53.9 31.9s27.4 22.1 35.1 32" fill="none" stroke-linecap="round" stroke-width="8"></path></g></g><defs><filter id="al" x="50.5" y="399" width="532" height="633" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="d" x="50.5" y="399" width="532" height="633" maskUnits="userSpaceOnUse"><g filter="url(#al)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#d)"><linearGradient id="u" x1="-666.06" x2="-666.23" y1="163.36" y2="163.75" gradientTransform="matrix(532 0 0 633 354760 -102959)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFF400" offset="0"></stop><stop stop-color="#3C8700" offset="1"></stop></linearGradient><ellipse cx="316.5" cy="715.5" rx="266" ry="316.5" fill="url(#u)"></ellipse></g><defs><filter id="ad" x="391" y="-24" width="288" height="283" filterUnits="userSpaceOnUse"><feColorMatrix values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0"></feColorMatrix></filter></defs><mask id="c" x="391" y="-24" width="288" height="283" maskUnits="userSpaceOnUse"><g filter="url(#ad)"><circle cx="316.5" cy="316.5" r="316.5" fill="#fff"></circle></g></mask><g mask="url(#c)"><linearGradient id="t" x1="-664.56" x2="-664.56" y1="163.79" y2="164.79" gradientTransform="matrix(227 0 0 227 151421 -37204)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFDF00" offset="0"></stop><stop stop-color="#FF9D00" offset="1"></stop></linearGradient><circle cx="565.5" cy="89.5" r="113.5" fill="url(#t)"></circle><linearGradient id="v" x1="-644.5" x2="-645.77" y1="342" y2="342" gradientTransform="matrix(30 0 0 1 19770 -253)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="427" x2="397" y1="89" y2="89" fill="none" stroke="url(#v)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="aa" x1="-641.56" x2="-642.83" y1="196.02" y2="196.07" gradientTransform="matrix(26.5 0 0 5.5 17439 -1025.5)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="430.5" x2="404" y1="55.5" y2="50" fill="none" stroke="url(#aa)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="w" x1="-643.73" x2="-645" y1="185.83" y2="185.9" gradientTransform="matrix(29 0 0 8 19107 -1361)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="431" x2="402" y1="122" y2="130" fill="none" stroke="url(#w)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="ac" x1="-638.94" x2="-640.22" y1="177.09" y2="177.39" gradientTransform="matrix(24 0 0 13 15783 -2145)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="442" x2="418" y1="153" y2="166" fill="none" stroke="url(#ac)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="ab" x1="-633.42" x2="-634.7" y1="172.41" y2="173.31" gradientTransform="matrix(20 0 0 19 13137 -3096)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="464" x2="444" y1="180" y2="199" fill="none" stroke="url(#ab)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="y" x1="-619.05" x2="-619.52" y1="170.82" y2="171.82" gradientTransform="matrix(13.83 0 0 22.85 9050 -3703.4)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="491.4" x2="477.5" y1="203" y2="225.9" fill="none" stroke="url(#y)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="x" x1="-578.5" x2="-578.63" y1="170.31" y2="171.31" gradientTransform="matrix(7.5 0 0 24.5 4860 -3953)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="524.5" x2="517" y1="219.5" y2="244" fill="none" stroke="url(#x)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line><linearGradient id="z" x1="666.5" x2="666.5" y1="170.31" y2="171.31" gradientTransform="matrix(.5 0 0 24.5 231.5 -3944)" gradientUnits="userSpaceOnUse"><stop stop-color="#FFA400" offset="0"></stop><stop stop-color="#FF5E00" offset="1"></stop></linearGradient><line x1="564.5" x2="565" y1="228.5" y2="253" fill="none" stroke="url(#z)" stroke-linecap="round" stroke-linejoin="bevel" stroke-width="12"></line></g></svg>`, 336);
4506
+ function Search() {
4507
+ return _tmpl$$2.cloneNode(true);
4508
+ }
4509
+ function ChevronDown() {
4510
+ return _tmpl$2$2.cloneNode(true);
4511
+ }
4512
+ function ArrowUp() {
4513
+ return _tmpl$3$2.cloneNode(true);
4514
+ }
4515
+ function ArrowDown() {
4516
+ return _tmpl$4$2.cloneNode(true);
4517
+ }
4518
+ function Wifi() {
4519
+ return _tmpl$5$2.cloneNode(true);
4520
+ }
4521
+ function Offline() {
4522
+ return (() => {
4523
+ const _el$6 = _tmpl$6$2.cloneNode(true);
4524
+ createRenderEffect(_p$ => {
4525
+ const _v$ = tokens.colors.yellow[500],
4526
+ _v$2 = tokens.colors.yellow[500];
4527
+ _v$ !== _p$._v$ && setAttribute(_el$6, "stroke", _p$._v$ = _v$);
4528
+ _v$2 !== _p$._v$2 && setAttribute(_el$6, "fill", _p$._v$2 = _v$2);
4529
+ return _p$;
4530
+ }, {
4531
+ _v$: undefined,
4532
+ _v$2: undefined
4533
+ });
4534
+ return _el$6;
4535
+ })();
4536
+ }
4537
+ function Settings() {
4538
+ return _tmpl$7$2.cloneNode(true);
4539
+ }
4540
+ function Copier() {
4541
+ return _tmpl$8$1.cloneNode(true);
4542
+ }
4543
+ function CopiedCopier() {
4544
+ return _tmpl$9$1.cloneNode(true);
4545
+ }
4546
+ function ErrorCopier() {
4547
+ return _tmpl$10$1.cloneNode(true);
4548
+ }
4549
+ function TanstackLogo() {
4550
+ return _tmpl$11$1.cloneNode(true);
4551
+ }
4552
+
4553
+ const _tmpl$$1 = /*#__PURE__*/template(`<span><svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6 12L10 8L6 4" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path></svg></span>`, 6),
4554
+ _tmpl$2$1 = /*#__PURE__*/template(`<button></button>`, 2),
4555
+ _tmpl$3$1 = /*#__PURE__*/template(`<button> <span></span> <span> </span></button>`, 6),
4556
+ _tmpl$4$1 = /*#__PURE__*/template(`<div></div>`, 2),
4557
+ _tmpl$5$1 = /*#__PURE__*/template(`<span>:</span>`, 2),
4558
+ _tmpl$6$1 = /*#__PURE__*/template(`<span></span>`, 2),
4559
+ _tmpl$7$1 = /*#__PURE__*/template(`<div><div><button> [<!>...<!>]</button></div></div>`, 8);
4560
+
4561
+ /**
4562
+ * Chunk elements in the array by size
4563
+ *
4564
+ * when the array cannot be chunked evenly by size, the last chunk will be
4565
+ * filled with the remaining elements
4566
+ *
4567
+ * @example
4568
+ * chunkArray(['a','b', 'c', 'd', 'e'], 2) // returns [['a','b'], ['c', 'd'], ['e']]
4569
+ */
4570
+ function chunkArray(array, size) {
4571
+ if (size < 1) return [];
4572
+ let i = 0;
4573
+ const result = [];
4574
+ while (i < array.length) {
4575
+ result.push(array.slice(i, i + size));
4576
+ i = i + size;
4577
+ }
4578
+ return result;
4579
+ }
4580
+ const Expander = props => {
4581
+ const styles = getStyles$1();
4582
+ return (() => {
4583
+ const _el$ = _tmpl$$1.cloneNode(true);
4584
+ createRenderEffect(() => className(_el$, cx(styles.expander, css`
4585
+ transform: rotate(${props.expanded ? 90 : 0}deg);
4586
+ `)));
4587
+ return _el$;
4588
+ })();
4589
+ };
4590
+ const CopyButton = props => {
4591
+ const styles = getStyles$1();
4592
+ const [copyState, setCopyState] = createSignal('NoCopy');
4593
+ return (() => {
4594
+ const _el$2 = _tmpl$2$1.cloneNode(true);
4595
+ addEventListener(_el$2, "click", copyState() === 'NoCopy' ? () => {
4596
+ navigator.clipboard.writeText(stringify(props.value)).then(() => {
4597
+ setCopyState('SuccessCopy');
4598
+ setTimeout(() => {
4599
+ setCopyState('NoCopy');
4600
+ }, 1500);
4601
+ }, err => {
4602
+ console.error('Failed to copy: ', err);
4603
+ setCopyState('ErrorCopy');
4604
+ setTimeout(() => {
4605
+ setCopyState('NoCopy');
4606
+ }, 1500);
4607
+ });
4608
+ } : undefined, true);
4609
+ insert(_el$2, createComponent(Switch, {
4610
+ get children() {
4611
+ return [createComponent(Match, {
4612
+ get when() {
4613
+ return copyState() === 'NoCopy';
4614
+ },
4615
+ get children() {
4616
+ return createComponent(Copier, {});
4617
+ }
4618
+ }), createComponent(Match, {
4619
+ get when() {
4620
+ return copyState() === 'SuccessCopy';
4621
+ },
4622
+ get children() {
4623
+ return createComponent(CopiedCopier, {});
4624
+ }
4625
+ }), createComponent(Match, {
4626
+ get when() {
4627
+ return copyState() === 'ErrorCopy';
4628
+ },
4629
+ get children() {
4630
+ return createComponent(ErrorCopier, {});
4631
+ }
4632
+ })];
4766
4633
  }
4634
+ }));
4635
+ createRenderEffect(_p$ => {
4636
+ const _v$ = styles.copyButton,
4637
+ _v$2 = `${copyState() === 'NoCopy' ? 'Copy object to clipboard' : copyState() === 'SuccessCopy' ? 'Object copied to clipboard' : 'Error copying object to clipboard'}`;
4638
+ _v$ !== _p$._v$ && className(_el$2, _p$._v$ = _v$);
4639
+ _v$2 !== _p$._v$2 && setAttribute(_el$2, "aria-label", _p$._v$2 = _v$2);
4640
+ return _p$;
4641
+ }, {
4642
+ _v$: undefined,
4643
+ _v$2: undefined
4767
4644
  });
4768
- const node = signals.get(key);
4769
- node && node[1]();
4770
- };
4771
- const remove = key => apis.forEach(api => {
4772
- try {
4773
- api.removeItem(`${prefix}${key}`);
4774
- } catch (err) {
4775
- handleError(err, `Error removing ${prefix}${key} from ${api.name}`);
4645
+ return _el$2;
4646
+ })();
4647
+ };
4648
+ function isIterable(x) {
4649
+ return Symbol.iterator in x;
4650
+ }
4651
+ function Explorer(props) {
4652
+ const styles = getStyles$1();
4653
+ const [expanded, setExpanded] = createSignal((props.defaultExpanded || []).includes(props.label));
4654
+ const toggleExpanded = () => setExpanded(old => !old);
4655
+ const [expandedPages, setExpandedPages] = createSignal([]);
4656
+ const subEntries = createMemo(() => {
4657
+ if (Array.isArray(props.value)) {
4658
+ return props.value.map((d, i) => ({
4659
+ label: i.toString(),
4660
+ value: d
4661
+ }));
4662
+ } else if (props.value !== null && typeof props.value === 'object' && isIterable(props.value) && typeof props.value[Symbol.iterator] === 'function') {
4663
+ if (props.value instanceof Map) {
4664
+ return Array.from(props.value, ([key, val]) => ({
4665
+ label: key,
4666
+ value: val
4667
+ }));
4668
+ }
4669
+ return Array.from(props.value, (val, i) => ({
4670
+ label: i.toString(),
4671
+ value: val
4672
+ }));
4673
+ } else if (typeof props.value === 'object' && props.value !== null) {
4674
+ return Object.entries(props.value).map(([key, val]) => ({
4675
+ label: key,
4676
+ value: val
4677
+ }));
4776
4678
  }
4679
+ return [];
4777
4680
  });
4778
- const clear = () => apis.forEach(api => {
4779
- try {
4780
- api.clear();
4781
- } catch (err) {
4782
- handleError(err, `Error clearing ${api.name}`);
4681
+ const type = createMemo(() => {
4682
+ if (Array.isArray(props.value)) {
4683
+ return 'array';
4684
+ } else if (props.value !== null && typeof props.value === 'object' && isIterable(props.value) && typeof props.value[Symbol.iterator] === 'function') {
4685
+ return 'Iterable';
4686
+ } else if (typeof props.value === 'object' && props.value !== null) {
4687
+ return 'object';
4783
4688
  }
4689
+ return typeof props.value;
4784
4690
  });
4785
- const toJSON = () => {
4786
- const result = {};
4787
- const addValue = (key, value) => {
4788
- if (!result.hasOwnProperty(key)) {
4789
- const filteredValue = value && props?.deserializer ? props.deserializer(value, key, props.options) : value;
4790
- if (filteredValue) {
4791
- result[key] = filteredValue;
4792
- }
4793
- }
4794
- };
4795
- apis.forEach(api => {
4796
- if (typeof api.getAll === "function") {
4797
- let values;
4798
- try {
4799
- values = api.getAll();
4800
- } catch (err) {
4801
- handleError(err, `Error getting all values from in ${api.name}`);
4802
- }
4803
- for (const key of values) {
4804
- addValue(key, values[key]);
4805
- }
4806
- } else {
4807
- let index = 0,
4808
- key;
4809
- try {
4810
- while (key = api.key(index++)) {
4811
- if (!result.hasOwnProperty(key)) {
4812
- addValue(key, api.getItem(key));
4691
+ const subEntryPages = createMemo(() => chunkArray(subEntries(), 100));
4692
+ return (() => {
4693
+ const _el$3 = _tmpl$4$1.cloneNode(true);
4694
+ insert(_el$3, createComponent(Show, {
4695
+ get when() {
4696
+ return subEntryPages().length;
4697
+ },
4698
+ get children() {
4699
+ return [(() => {
4700
+ const _el$4 = _tmpl$3$1.cloneNode(true),
4701
+ _el$5 = _el$4.firstChild,
4702
+ _el$6 = _el$5.nextSibling,
4703
+ _el$7 = _el$6.nextSibling,
4704
+ _el$8 = _el$7.nextSibling,
4705
+ _el$9 = _el$8.firstChild;
4706
+ _el$4.$$click = () => toggleExpanded();
4707
+ insert(_el$4, createComponent(Expander, {
4708
+ get expanded() {
4709
+ return expanded();
4813
4710
  }
4711
+ }), _el$5);
4712
+ insert(_el$6, () => props.label);
4713
+ insert(_el$8, () => String(type()).toLowerCase() === 'iterable' ? '(Iterable) ' : '', _el$9);
4714
+ insert(_el$8, () => subEntries().length, _el$9);
4715
+ insert(_el$8, () => subEntries().length > 1 ? `items` : `item`, null);
4716
+ createRenderEffect(_p$ => {
4717
+ const _v$3 = styles.expanderButton,
4718
+ _v$4 = styles.info;
4719
+ _v$3 !== _p$._v$3 && className(_el$4, _p$._v$3 = _v$3);
4720
+ _v$4 !== _p$._v$4 && className(_el$8, _p$._v$4 = _v$4);
4721
+ return _p$;
4722
+ }, {
4723
+ _v$3: undefined,
4724
+ _v$4: undefined
4725
+ });
4726
+ return _el$4;
4727
+ })(), createComponent(Show, {
4728
+ get when() {
4729
+ return props.copyable;
4730
+ },
4731
+ get children() {
4732
+ return createComponent(CopyButton, {
4733
+ get value() {
4734
+ return props.value;
4735
+ }
4736
+ });
4814
4737
  }
4815
- } catch (err) {
4816
- handleError(err, `Error getting all values from ${api.name}`);
4817
- }
4818
- }
4819
- });
4820
- return result;
4821
- };
4822
- props?.sync !== false && onMount(() => {
4823
- const listener = ev => {
4824
- let changed = false;
4825
- apis.forEach(api => {
4826
- try {
4827
- if (api !== ev.storageArea && ev.key && ev.newValue !== api.getItem(ev.key)) {
4828
- ev.newValue ? api.setItem(ev.key, ev.newValue) : api.removeItem(ev.key);
4829
- changed = true;
4738
+ }), createComponent(Show, {
4739
+ get when() {
4740
+ return expanded();
4741
+ },
4742
+ get children() {
4743
+ return [createComponent(Show, {
4744
+ get when() {
4745
+ return subEntryPages().length === 1;
4746
+ },
4747
+ get children() {
4748
+ const _el$10 = _tmpl$4$1.cloneNode(true);
4749
+ insert(_el$10, createComponent(Key, {
4750
+ get each() {
4751
+ return subEntries();
4752
+ },
4753
+ by: item => item.label,
4754
+ children: entry => {
4755
+ return createComponent(Explorer, {
4756
+ get defaultExpanded() {
4757
+ return props.defaultExpanded;
4758
+ },
4759
+ get label() {
4760
+ return entry().label;
4761
+ },
4762
+ get value() {
4763
+ return entry().value;
4764
+ },
4765
+ get copyable() {
4766
+ return props.copyable;
4767
+ }
4768
+ });
4769
+ }
4770
+ }));
4771
+ createRenderEffect(() => className(_el$10, styles.subEntry));
4772
+ return _el$10;
4773
+ }
4774
+ }), createComponent(Show, {
4775
+ get when() {
4776
+ return subEntryPages().length > 1;
4777
+ },
4778
+ get children() {
4779
+ const _el$11 = _tmpl$4$1.cloneNode(true);
4780
+ insert(_el$11, createComponent(Index, {
4781
+ get each() {
4782
+ return subEntryPages();
4783
+ },
4784
+ children: (entries, index) => (() => {
4785
+ const _el$15 = _tmpl$7$1.cloneNode(true),
4786
+ _el$16 = _el$15.firstChild,
4787
+ _el$17 = _el$16.firstChild,
4788
+ _el$18 = _el$17.firstChild,
4789
+ _el$22 = _el$18.nextSibling,
4790
+ _el$20 = _el$22.nextSibling,
4791
+ _el$23 = _el$20.nextSibling;
4792
+ _el$23.nextSibling;
4793
+ _el$17.$$click = () => setExpandedPages(old => old.includes(index) ? old.filter(d => d !== index) : [...old, index]);
4794
+ insert(_el$17, createComponent(Expander, {
4795
+ get expanded() {
4796
+ return expandedPages().includes(index);
4797
+ }
4798
+ }), _el$18);
4799
+ insert(_el$17, index * 100, _el$22);
4800
+ insert(_el$17, index * 100 + 100 - 1, _el$23);
4801
+ insert(_el$16, createComponent(Show, {
4802
+ get when() {
4803
+ return expandedPages().includes(index);
4804
+ },
4805
+ get children() {
4806
+ const _el$24 = _tmpl$4$1.cloneNode(true);
4807
+ insert(_el$24, createComponent(Key, {
4808
+ get each() {
4809
+ return entries();
4810
+ },
4811
+ by: entry => entry.label,
4812
+ children: entry => createComponent(Explorer, {
4813
+ get defaultExpanded() {
4814
+ return props.defaultExpanded;
4815
+ },
4816
+ get label() {
4817
+ return entry().label;
4818
+ },
4819
+ get value() {
4820
+ return entry().value;
4821
+ },
4822
+ get copyable() {
4823
+ return props.copyable;
4824
+ }
4825
+ })
4826
+ }));
4827
+ createRenderEffect(() => className(_el$24, styles.subEntry));
4828
+ return _el$24;
4829
+ }
4830
+ }), null);
4831
+ createRenderEffect(_p$ => {
4832
+ const _v$5 = styles.entry,
4833
+ _v$6 = styles.expanderButton;
4834
+ _v$5 !== _p$._v$5 && className(_el$16, _p$._v$5 = _v$5);
4835
+ _v$6 !== _p$._v$6 && className(_el$17, _p$._v$6 = _v$6);
4836
+ return _p$;
4837
+ }, {
4838
+ _v$5: undefined,
4839
+ _v$6: undefined
4840
+ });
4841
+ return _el$15;
4842
+ })()
4843
+ }));
4844
+ createRenderEffect(() => className(_el$11, styles.subEntry));
4845
+ return _el$11;
4846
+ }
4847
+ })];
4830
4848
  }
4831
- } catch (err) {
4832
- handleError(err, `Error synching api ${api.name} from storage event (${ev.key}=${ev.newValue})`);
4833
- }
4834
- });
4835
- changed && ev.key && signals.get(ev.key)?.[1]();
4836
- };
4837
- if ("addEventListener" in globalThis) {
4838
- globalThis.addEventListener("storage", listener);
4839
- onCleanup(() => globalThis.removeEventListener("storage", listener));
4840
- } else {
4841
- apis.forEach(api => api.addEventListener?.("storage", listener));
4842
- onCleanup(() => apis.forEach(api => api.removeEventListener?.("storage", listener)));
4843
- }
4844
- });
4845
- return [store, setter, {
4846
- clear,
4847
- error,
4848
- remove,
4849
- toJSON
4850
- }];
4849
+ })];
4850
+ }
4851
+ }), null);
4852
+ insert(_el$3, createComponent(Show, {
4853
+ get when() {
4854
+ return subEntryPages().length === 0;
4855
+ },
4856
+ get children() {
4857
+ return [(() => {
4858
+ const _el$12 = _tmpl$5$1.cloneNode(true),
4859
+ _el$13 = _el$12.firstChild;
4860
+ insert(_el$12, () => props.label, _el$13);
4861
+ createRenderEffect(() => className(_el$12, styles.label));
4862
+ return _el$12;
4863
+ })(), ' ', (() => {
4864
+ const _el$14 = _tmpl$6$1.cloneNode(true);
4865
+ insert(_el$14, () => displayValue(props.value));
4866
+ createRenderEffect(() => className(_el$14, styles.value));
4867
+ return _el$14;
4868
+ })()];
4869
+ }
4870
+ }), null);
4871
+ createRenderEffect(() => className(_el$3, styles.entry));
4872
+ return _el$3;
4873
+ })();
4851
4874
  }
4852
- var createLocalStorage = createStorage;
4875
+ const getStyles$1 = () => {
4876
+ const {
4877
+ colors,
4878
+ font,
4879
+ size,
4880
+ border
4881
+ } = tokens;
4882
+ return {
4883
+ entry: css`
4884
+ & * {
4885
+ font-size: ${font.size.sm};
4886
+ font-family: 'Menlo', 'Fira Code', monospace;
4887
+ line-height: 1.7;
4888
+ }
4889
+ position: relative;
4890
+ outline: none;
4891
+ word-break: break-word;
4892
+ `,
4893
+ subEntry: css`
4894
+ margin: 0 0 0 0.5em;
4895
+ padding-left: 0.75em;
4896
+ border-left: 2px solid ${colors.darkGray[400]};
4897
+ `,
4898
+ expander: css`
4899
+ & path {
4900
+ stroke: ${colors.gray[400]};
4901
+ }
4902
+ display: inline-flex;
4903
+ align-items: center;
4904
+ transition: all 0.1s ease;
4905
+ `,
4906
+ expanderButton: css`
4907
+ cursor: pointer;
4908
+ color: inherit;
4909
+ font: inherit;
4910
+ outline: inherit;
4911
+ line-height: ${font.size.sm};
4912
+ background: transparent;
4913
+ border: none;
4914
+ padding: 0;
4915
+ display: inline-flex;
4916
+ align-items: center;
4917
+ gap: ${size[1]};
4853
4918
 
4854
- // src/tools.ts
4855
- var addClearMethod = storage => {
4856
- if (typeof storage.clear === "function") {
4857
- return storage;
4858
- }
4859
- storage.clear = () => {
4860
- let key;
4861
- while (key = storage.key(0)) {
4862
- storage.removeItem(key);
4863
- }
4864
- };
4865
- return storage;
4866
- };
4919
+ &:focus-visible {
4920
+ border-radius: ${border.radius.xs};
4921
+ outline: 2px solid ${colors.blue[800]};
4922
+ }
4923
+ `,
4924
+ info: css`
4925
+ color: ${colors.gray[500]};
4926
+ font-size: ${font.size.xs};
4927
+ line-height: ${font.size.xs};
4928
+ margin-left: ${size[1]};
4929
+ `,
4930
+ label: css`
4931
+ color: ${colors.gray[300]};
4932
+ `,
4933
+ value: css`
4934
+ color: ${colors.purple[400]};
4935
+ `,
4936
+ copyButton: css`
4937
+ background-color: transparent;
4938
+ border: none;
4939
+ display: inline-flex;
4940
+ padding: 0px;
4941
+ align-items: center;
4942
+ justify-content: center;
4943
+ cursor: pointer;
4944
+ width: ${size[3.5]};
4945
+ height: ${size[3.5]};
4946
+ position: relative;
4947
+ top: 4px;
4948
+ left: ${size[2]};
4949
+ z-index: 1;
4867
4950
 
4868
- // src/cookies.ts
4869
- var serializeCookieOptions = options => {
4870
- if (!options) {
4871
- return "";
4872
- }
4873
- let memo = "";
4874
- for (const key in options) {
4875
- if (!options.hasOwnProperty(key)) {
4876
- continue;
4877
- }
4878
- const value = options[key];
4879
- memo += value instanceof Date ? `; ${key}=${value.toUTCString()}` : typeof value === "boolean" ? `; ${key}` : `; ${key}=${value}`;
4880
- }
4881
- return memo;
4882
- };
4883
- var cookieStorage = addClearMethod({
4884
- _cookies: [globalThis.document, "cookie"],
4885
- getItem: key => cookieStorage._cookies[0][cookieStorage._cookies[1]].match("(^|;)\\s*" + key + "\\s*=\\s*([^;]+)")?.pop() ?? null,
4886
- setItem: (key, value, options) => {
4887
- const oldValue = cookieStorage.getItem(key);
4888
- cookieStorage._cookies[0][cookieStorage._cookies[1]] = `${key}=${value}${serializeCookieOptions(options)}`;
4889
- const storageEvent = Object.assign(new Event("storage"), {
4890
- key,
4891
- oldValue,
4892
- newValue: value,
4893
- url: globalThis.document.URL,
4894
- storageArea: cookieStorage
4895
- });
4896
- window.dispatchEvent(storageEvent);
4897
- },
4898
- removeItem: key => {
4899
- cookieStorage._cookies[0][cookieStorage._cookies[1]] = `${key}=deleted${serializeCookieOptions({
4900
- expires: new Date(0)
4901
- })}`;
4902
- },
4903
- key: index => {
4904
- let key = null;
4905
- let count = 0;
4906
- cookieStorage._cookies[0][cookieStorage._cookies[1]].replace(/(?:^|;)\s*(.+?)\s*=\s*[^;]+/g, (_, found) => {
4907
- if (!key && found && count++ === index) {
4908
- key = found;
4951
+ &:hover svg .copier {
4952
+ stroke: ${colors.gray[500]} !important;
4909
4953
  }
4910
- return "";
4911
- });
4912
- return key;
4913
- },
4914
- get length() {
4915
- let length = 0;
4916
- cookieStorage._cookies[0][cookieStorage._cookies[1]].replace(/(?:^|;)\s*.+?\s*=\s*[^;]+/g, found => {
4917
- length += found ? 1 : 0;
4918
- return "";
4919
- });
4920
- return length;
4921
- }
4922
- });
4923
4954
 
4924
- // src/index.ts
4925
- function makeResizeObserver(callback, options) {
4926
- const observer = new ResizeObserver(callback);
4927
- onCleanup(observer.disconnect.bind(observer));
4928
- return {
4929
- observe: ref => observer.observe(ref, options),
4930
- unobserve: observer.unobserve.bind(observer)
4931
- };
4932
- }
4933
- function createResizeObserver(targets, onResize, options) {
4934
- const previousMap = /* @__PURE__ */new WeakMap(),
4935
- {
4936
- observe,
4937
- unobserve
4938
- } = makeResizeObserver(entries => {
4939
- for (const entry of entries) {
4940
- const {
4941
- contentRect,
4942
- target
4943
- } = entry,
4944
- width = Math.round(contentRect.width),
4945
- height = Math.round(contentRect.height),
4946
- previous = previousMap.get(target);
4947
- if (!previous || previous.width !== width || previous.height !== height) {
4948
- onResize(contentRect, target, entry);
4949
- previousMap.set(target, {
4950
- width,
4951
- height
4952
- });
4953
- }
4955
+ &:focus-visible {
4956
+ border-radius: ${border.radius.xs};
4957
+ outline: 2px solid ${colors.blue[800]};
4958
+ outline-offset: 2px;
4954
4959
  }
4955
- }, options);
4956
- createEffect(prev => {
4957
- const refs = filterNonNullable(asArray(access(targets)));
4958
- handleDiffArray(refs, prev, observe, unobserve);
4959
- return refs;
4960
- }, []);
4960
+ `
4961
+ };
4962
+ };
4963
+ delegateEvents(["click"]);
4964
+
4965
+ const QueryDevtoolsContext = createContext({
4966
+ client: undefined,
4967
+ onlineManager: undefined,
4968
+ queryFlavor: '',
4969
+ version: ''
4970
+ });
4971
+ function useQueryDevtoolsContext() {
4972
+ return useContext(QueryDevtoolsContext);
4961
4973
  }
4962
4974
 
4975
+ const loadFonts = () => {
4976
+ const link = document.createElement('link');
4977
+ link.href = 'https://fonts.googleapis.com/css2?family=Fira+Code&family=Inter:wght@100;200;300;400;500;600;700;800;900&family=Roboto&display=swap';
4978
+ link.rel = 'stylesheet';
4979
+ document.head.appendChild(link);
4980
+ };
4981
+
4963
4982
  const _tmpl$ = /*#__PURE__*/template(`<div><div aria-hidden="true"></div><button aria-label="Open Tanstack query devtools"></button></div>`, 6),
4964
4983
  _tmpl$2 = /*#__PURE__*/template(`<div></div>`, 2),
4965
4984
  _tmpl$3 = /*#__PURE__*/template(`<span>Asc</span>`, 2),
@@ -6736,4 +6755,4 @@ const getStyles = () => {
6736
6755
  delegateEvents(["click", "mousedown", "input"]);
6737
6756
 
6738
6757
  export { Devtools, DevtoolsComponent, DevtoolsPanel, QueryRow, QueryStatus, QueryStatusCount, DevtoolsComponent as default };
6739
- //# sourceMappingURL=Devtools-370ac576.js.map
6758
+ //# sourceMappingURL=Devtools-26de9f2c.js.map