bitboss-ui 2.0.5 → 2.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BaseDialog/BaseDialog.vue.d.ts +1 -3
- package/dist/composables/useOptions.d.ts +1 -1
- package/dist/index.js +89 -87
- package/dist/index.js.map +1 -1
- package/dist/index10.js +7 -39
- package/dist/index10.js.map +1 -1
- package/dist/index101.js +60 -87
- package/dist/index101.js.map +1 -1
- package/dist/index103.js +113 -258
- package/dist/index103.js.map +1 -1
- package/dist/index105.js +254 -388
- package/dist/index105.js.map +1 -1
- package/dist/index107.js +387 -98
- package/dist/index107.js.map +1 -1
- package/dist/index109.js +52 -48
- package/dist/index109.js.map +1 -1
- package/dist/index11.js +74 -188
- package/dist/index11.js.map +1 -1
- package/dist/index111.js +35 -34
- package/dist/index111.js.map +1 -1
- package/dist/index113.js +105 -23
- package/dist/index113.js.map +1 -1
- package/dist/index115.js +23 -156
- package/dist/index115.js.map +1 -1
- package/dist/index117.js +153 -112
- package/dist/index117.js.map +1 -1
- package/dist/index119.js +115 -39
- package/dist/index119.js.map +1 -1
- package/dist/index12.js +38 -80
- package/dist/index12.js.map +1 -1
- package/dist/index121.js +36 -40
- package/dist/index121.js.map +1 -1
- package/dist/index122.js +34 -37
- package/dist/index122.js.map +1 -1
- package/dist/index123.js +30 -21
- package/dist/index123.js.map +1 -1
- package/dist/index124.js +47 -2
- package/dist/index124.js.map +1 -1
- package/dist/index125.js +35 -21
- package/dist/index125.js.map +1 -1
- package/dist/index126.js +2 -2
- package/dist/index126.js.map +1 -1
- package/dist/index127.js +21 -312
- package/dist/index127.js.map +1 -1
- package/dist/index128.js +2 -24
- package/dist/index128.js.map +1 -1
- package/dist/index129.js +312 -2
- package/dist/index129.js.map +1 -1
- package/dist/index13.js +196 -0
- package/dist/index13.js.map +1 -0
- package/dist/index130.js +24 -5
- package/dist/index130.js.map +1 -1
- package/dist/index131.js +2 -9
- package/dist/index131.js.map +1 -1
- package/dist/index132.js +5 -6
- package/dist/index132.js.map +1 -1
- package/dist/index133.js +9 -3
- package/dist/index133.js.map +1 -1
- package/dist/index134.js +6 -3
- package/dist/index134.js.map +1 -1
- package/dist/index135.js +1 -1
- package/dist/index136.js +1 -1
- package/dist/index137.js +1 -1
- package/dist/index138.js +1 -1
- package/dist/index139.js +1 -1
- package/dist/index14.js +73 -121
- package/dist/index14.js.map +1 -1
- package/dist/index140.js +1 -1
- package/dist/index141.js +1 -1
- package/dist/index142.js +1 -1
- package/dist/index143.js +1 -1
- package/dist/index144.js +1 -1
- package/dist/index145.js +1 -1
- package/dist/index146.js +1 -1
- package/dist/index147.js +1 -1
- package/dist/index148.js +1 -1
- package/dist/index149.js +1 -1
- package/dist/index150.js +1 -1
- package/dist/index151.js +1 -1
- package/dist/index152.js +1 -1
- package/dist/index153.js +1 -1
- package/dist/index154.js +1 -1
- package/dist/index155.js +1 -1
- package/dist/index156.js +1 -1
- package/dist/index157.js +1 -1
- package/dist/index158.js +1 -1
- package/dist/index159.js +2 -2
- package/dist/index16.js +119 -118
- package/dist/index16.js.map +1 -1
- package/dist/index160.js +6 -0
- package/dist/index160.js.map +1 -0
- package/dist/index161.js +1 -1
- package/dist/index163.js +2 -2
- package/dist/index165.js +1 -1
- package/dist/index166.js +1 -1
- package/dist/index167.js +1 -1
- package/dist/index168.js +1 -1
- package/dist/index169.js +2 -2
- package/dist/index170.js +6 -0
- package/dist/index170.js.map +1 -0
- package/dist/index171.js +3 -2
- package/dist/index171.js.map +1 -1
- package/dist/index173.js +2 -3
- package/dist/index173.js.map +1 -1
- package/dist/index174.js +1 -1
- package/dist/index175.js +1 -1
- package/dist/index176.js +1 -1
- package/dist/index177.js +1 -1
- package/dist/index178.js +1 -1
- package/dist/index179.js +1 -1
- package/dist/index18.js +120 -208
- package/dist/index18.js.map +1 -1
- package/dist/index180.js +1 -1
- package/dist/index181.js +1 -1
- package/dist/index182.js +1 -1
- package/dist/index183.js +2 -2
- package/dist/index184.js +6 -0
- package/dist/index184.js.map +1 -0
- package/dist/index185.js +1 -1
- package/dist/index187.js +1 -1
- package/dist/index189.js +1 -1
- package/dist/index190.js +1 -1
- package/dist/index191.js +1 -1
- package/dist/index192.js +1 -1
- package/dist/index193.js +1 -1
- package/dist/index194.js +1 -1
- package/dist/index195.js +1 -1
- package/dist/index196.js +1 -1
- package/dist/index197.js +3 -81
- package/dist/index197.js.map +1 -1
- package/dist/index198.js +3 -3
- package/dist/index198.js.map +1 -1
- package/dist/index199.js +81 -5
- package/dist/index199.js.map +1 -1
- package/dist/index20.js +193 -275
- package/dist/index20.js.map +1 -1
- package/dist/index200.js +2 -16
- package/dist/index200.js.map +1 -1
- package/dist/index201.js +3 -16
- package/dist/index201.js.map +1 -1
- package/dist/index202.js +124 -17
- package/dist/index202.js.map +1 -1
- package/dist/index203.js +5 -19
- package/dist/index203.js.map +1 -1
- package/dist/index204.js +119 -23
- package/dist/index204.js.map +1 -1
- package/dist/index205.js +19 -3
- package/dist/index205.js.map +1 -1
- package/dist/index206.js +16 -2
- package/dist/index206.js.map +1 -1
- package/dist/index207.js +16 -8
- package/dist/index207.js.map +1 -1
- package/dist/index208.js +2 -249
- package/dist/index208.js.map +1 -1
- package/dist/index209.js +5 -0
- package/dist/index209.js.map +1 -0
- package/dist/index210.js +35 -52
- package/dist/index210.js.map +1 -1
- package/dist/index211.js +173 -36
- package/dist/index211.js.map +1 -1
- package/dist/index212.js +6 -5
- package/dist/index212.js.map +1 -1
- package/dist/index213.js +39 -36
- package/dist/index213.js.map +1 -1
- package/dist/index215.js +13 -4
- package/dist/index215.js.map +1 -1
- package/dist/index216.js +5 -2
- package/dist/index216.js.map +1 -1
- package/dist/index217.js +369 -2
- package/dist/index217.js.map +1 -1
- package/dist/index218.js +6 -40
- package/dist/index218.js.map +1 -1
- package/dist/{index214.js → index219.js} +1 -1
- package/dist/{index214.js.map → index219.js.map} +1 -1
- package/dist/index22.js +287 -247
- package/dist/index22.js.map +1 -1
- package/dist/index220.js +4 -13
- package/dist/index220.js.map +1 -1
- package/dist/index221.js +2 -158
- package/dist/index221.js.map +1 -1
- package/dist/index222.js +3 -84
- package/dist/index222.js.map +1 -1
- package/dist/index223.js +10 -0
- package/dist/index223.js.map +1 -0
- package/dist/index224.js +19 -3
- package/dist/index224.js.map +1 -1
- package/dist/index225.js +26 -34
- package/dist/index225.js.map +1 -1
- package/dist/index226.js +3 -6
- package/dist/index226.js.map +1 -1
- package/dist/index227.js +249 -7
- package/dist/index227.js.map +1 -1
- package/dist/index228.js +49 -123
- package/dist/index228.js.map +1 -1
- package/dist/index229.js +44 -123
- package/dist/index229.js.map +1 -1
- package/dist/index230.js +5 -2
- package/dist/index230.js.map +1 -1
- package/dist/index231.js +49 -174
- package/dist/index231.js.map +1 -1
- package/dist/index232.js +158 -5
- package/dist/index232.js.map +1 -1
- package/dist/index233.js +83 -368
- package/dist/index233.js.map +1 -1
- package/dist/index235.js +2 -18
- package/dist/index235.js.map +1 -1
- package/dist/index236.js +17 -105
- package/dist/index236.js.map +1 -1
- package/dist/index237.js +109 -0
- package/dist/index237.js.map +1 -0
- package/dist/{index238.js → index239.js} +3 -3
- package/dist/{index238.js.map → index239.js.map} +1 -1
- package/dist/index24.js +249 -120
- package/dist/index24.js.map +1 -1
- package/dist/index241.js +2 -10
- package/dist/index241.js.map +1 -1
- package/dist/index242.js +9 -2
- package/dist/index242.js.map +1 -1
- package/dist/index243.js +3 -224
- package/dist/index243.js.map +1 -1
- package/dist/index244.js +9 -281
- package/dist/index244.js.map +1 -1
- package/dist/index245.js +23 -6
- package/dist/index245.js.map +1 -1
- package/dist/index246.js +6 -2
- package/dist/index246.js.map +1 -1
- package/dist/index247.js +16 -2
- package/dist/index247.js.map +1 -1
- package/dist/index248.js +224 -2
- package/dist/index248.js.map +1 -1
- package/dist/index249.js +281 -2
- package/dist/index249.js.map +1 -1
- package/dist/index250.js +6 -2
- package/dist/index250.js.map +1 -1
- package/dist/index251.js +2 -2
- package/dist/index252.js +2 -3
- package/dist/index252.js.map +1 -1
- package/dist/index253.js +2 -2
- package/dist/index254.js +2 -2
- package/dist/index255.js +2 -2
- package/dist/index256.js +122 -24
- package/dist/index256.js.map +1 -1
- package/dist/index257.js +429 -20
- package/dist/index257.js.map +1 -1
- package/dist/index258.js +6 -0
- package/dist/index258.js.map +1 -0
- package/dist/index26.js +119 -142
- package/dist/index26.js.map +1 -1
- package/dist/index260.js +6 -3
- package/dist/index260.js.map +1 -1
- package/dist/index261.js +21 -8
- package/dist/index261.js.map +1 -1
- package/dist/index263.js +9 -3
- package/dist/index263.js.map +1 -1
- package/dist/index264.js +439 -0
- package/dist/index264.js.map +1 -0
- package/dist/index265.js +127 -6
- package/dist/index265.js.map +1 -1
- package/dist/index266.js +199 -15
- package/dist/index266.js.map +1 -1
- package/dist/index267.js +4 -9
- package/dist/index267.js.map +1 -1
- package/dist/index268.js +89 -3
- package/dist/index268.js.map +1 -1
- package/dist/index269.js +2 -12
- package/dist/index269.js.map +1 -1
- package/dist/index270.js +2 -9
- package/dist/index270.js.map +1 -1
- package/dist/index271.js +2 -9
- package/dist/index271.js.map +1 -1
- package/dist/index272.js +2 -17
- package/dist/index272.js.map +1 -1
- package/dist/index273.js +2 -431
- package/dist/index273.js.map +1 -1
- package/dist/index274.js +2 -89
- package/dist/index274.js.map +1 -1
- package/dist/index275.js +28 -2
- package/dist/index275.js.map +1 -1
- package/dist/index276.js +17 -64
- package/dist/index276.js.map +1 -1
- package/dist/index278.js +3 -200
- package/dist/index278.js.map +1 -1
- package/dist/index279.js +12 -2
- package/dist/index279.js.map +1 -1
- package/dist/index28.js +138 -83
- package/dist/index28.js.map +1 -1
- package/dist/index280.js +7 -124
- package/dist/index280.js.map +1 -1
- package/dist/index281.js +7 -20
- package/dist/index281.js.map +1 -1
- package/dist/index282.js +20 -0
- package/dist/index282.js.map +1 -0
- package/dist/index283.js +2 -436
- package/dist/index283.js.map +1 -1
- package/dist/index284.js +68 -126
- package/dist/index284.js.map +1 -1
- package/dist/index285.js +5 -3
- package/dist/index285.js.map +1 -1
- package/dist/index286.js +1 -1
- package/dist/index287.js +3 -211
- package/dist/index287.js.map +1 -1
- package/dist/index288.js +214 -0
- package/dist/index288.js.map +1 -0
- package/dist/index290.js +4 -7
- package/dist/index290.js.map +1 -1
- package/dist/index291.js +4 -19
- package/dist/index291.js.map +1 -1
- package/dist/index292.js +58 -6
- package/dist/index292.js.map +1 -1
- package/dist/index293.js +35 -4
- package/dist/index293.js.map +1 -1
- package/dist/index294.js +7 -4
- package/dist/index294.js.map +1 -1
- package/dist/index295.js +6 -58
- package/dist/index295.js.map +1 -1
- package/dist/index296.js +18 -34
- package/dist/index296.js.map +1 -1
- package/dist/index297.js +2 -11
- package/dist/index297.js.map +1 -1
- package/dist/index298.js +47 -2
- package/dist/index298.js.map +1 -1
- package/dist/index299.js +10 -46
- package/dist/index299.js.map +1 -1
- package/dist/index30.js +85 -115
- package/dist/index30.js.map +1 -1
- package/dist/index32.js +111 -112
- package/dist/index32.js.map +1 -1
- package/dist/index34.js +114 -365
- package/dist/index34.js.map +1 -1
- package/dist/index36.js +361 -283
- package/dist/index36.js.map +1 -1
- package/dist/index38.js +288 -106
- package/dist/index38.js.map +1 -1
- package/dist/index40.js +114 -121
- package/dist/index40.js.map +1 -1
- package/dist/index42.js +113 -200
- package/dist/index42.js.map +1 -1
- package/dist/index44.js +180 -90
- package/dist/index44.js.map +1 -1
- package/dist/index46.js +110 -78
- package/dist/index46.js.map +1 -1
- package/dist/index48.js +89 -54
- package/dist/index48.js.map +1 -1
- package/dist/index5.js +14 -78
- package/dist/index5.js.map +1 -1
- package/dist/index50.js +54 -84
- package/dist/index50.js.map +1 -1
- package/dist/index52.js +86 -60
- package/dist/index52.js.map +1 -1
- package/dist/index54.js +59 -40
- package/dist/index54.js.map +1 -1
- package/dist/index56.js +42 -55
- package/dist/index56.js.map +1 -1
- package/dist/index58.js +53 -103
- package/dist/index58.js.map +1 -1
- package/dist/index6.js +36 -58
- package/dist/index6.js.map +1 -1
- package/dist/index60.js +103 -89
- package/dist/index60.js.map +1 -1
- package/dist/index62.js +61 -88
- package/dist/index62.js.map +1 -1
- package/dist/index64.js +119 -77
- package/dist/index64.js.map +1 -1
- package/dist/index66.js +77 -91
- package/dist/index66.js.map +1 -1
- package/dist/index68.js +88 -49
- package/dist/index68.js.map +1 -1
- package/dist/index7.js +78 -20
- package/dist/index7.js.map +1 -1
- package/dist/index70.js +51 -304
- package/dist/index70.js.map +1 -1
- package/dist/index72.js +299 -115
- package/dist/index72.js.map +1 -1
- package/dist/index74.js +120 -214
- package/dist/index74.js.map +1 -1
- package/dist/index76.js +213 -36
- package/dist/index76.js.map +1 -1
- package/dist/index78.js +47 -0
- package/dist/index78.js.map +1 -0
- package/dist/index79.js +119 -230
- package/dist/index79.js.map +1 -1
- package/dist/index8.js +61 -7
- package/dist/index8.js.map +1 -1
- package/dist/index81.js +227 -154
- package/dist/index81.js.map +1 -1
- package/dist/index83.js +154 -207
- package/dist/index83.js.map +1 -1
- package/dist/index85.js +215 -26
- package/dist/index85.js.map +1 -1
- package/dist/index87.js +27 -88
- package/dist/index87.js.map +1 -1
- package/dist/index89.js +53 -88
- package/dist/index89.js.map +1 -1
- package/dist/index9.js +17 -76
- package/dist/index9.js.map +1 -1
- package/dist/index91.js +75 -44
- package/dist/index91.js.map +1 -1
- package/dist/index93.js +89 -15
- package/dist/index93.js.map +1 -1
- package/dist/index95.js +15 -166
- package/dist/index95.js.map +1 -1
- package/dist/index97.js +120 -59
- package/dist/index97.js.map +1 -1
- package/dist/index99.js +66 -52
- package/dist/index99.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +2 -2
- package/dist/index120.js +0 -47
- package/dist/index120.js.map +0 -1
- package/dist/index164.js +0 -6
- package/dist/index164.js.map +0 -1
- package/dist/index172.js +0 -6
- package/dist/index172.js.map +0 -1
- package/dist/index188.js +0 -6
- package/dist/index188.js.map +0 -1
- package/dist/index234.js +0 -6
- package/dist/index234.js.map +0 -1
- package/dist/index240.js +0 -5
- package/dist/index240.js.map +0 -1
- package/dist/index259.js +0 -10
- package/dist/index259.js.map +0 -1
- package/dist/index262.js +0 -26
- package/dist/index262.js.map +0 -1
- package/dist/index277.js +0 -8
- package/dist/index277.js.map +0 -1
- package/dist/index3.js +0 -17
- package/dist/index3.js.map +0 -1
- package/dist/index4.js +0 -43
- package/dist/index4.js.map +0 -1
- package/dist/index77.js +0 -130
- package/dist/index77.js.map +0 -1
package/dist/index36.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index36.js","sources":["../src/components/BaseSlider/BaseSlider.vue"],"sourcesContent":["<template>\n\t<span v-bind=\"containerAttributes\" ref=\"container\">\n\t\t<slot name=\"prepend\"></slot>\n\t\t<span class=\"bb-base-slider__slider-container\">\n\t\t\t<span v-if=\"ticks.length\" class=\"bb-base-slider__ticks-container\">\n\t\t\t\t<span\n\t\t\t\t\tv-for=\"tick in ticks\"\n\t\t\t\t\t:key=\"tick.value\"\n\t\t\t\t\tclass=\"bb-base-slider__tick\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:active=\"tick.active\"\n\t\t\t\t\t\tname=\"tick\"\n\t\t\t\t\t\t:percent=\"tick.percent\"\n\t\t\t\t\t\t:value=\"tick.value\"\n\t\t\t\t/></span>\n\t\t\t</span>\n\t\t\t<input\n\t\t\t\t:id=\"id\"\n\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t:name=\"name\"\n\t\t\t\t:readonly=\"readonly\"\n\t\t\t\t:required=\"required\"\n\t\t\t\t:tabindex=\"-1\"\n\t\t\t\t:type=\"'number'\"\n\t\t\t\t:value=\"JSON.stringify(modelValue)\"\n\t\t\t/>\n\t\t\t<span ref=\"track\" class=\"bb-base-slider__track-container\">\n\t\t\t\t<span class=\"bb-base-slider__track-fill\"></span>\n\t\t\t\t<span v-bind=\"sliderBackgroundAttributes\"></span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-if=\"props.range\"\n\t\t\t\tv-bind=\"listeners\"\n\t\t\t\tkey=\"thumblower\"\n\t\t\t\tref=\"thumblower\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-orientation=\"'horizontal'\"\n\t\t\t\t:aria-readonly=\"!readonly\"\n\t\t\t\t:aria-valuemax=\"max\"\n\t\t\t\t:aria-valuemin=\"min\"\n\t\t\t\t:aria-valuenow=\"valueNowLower\"\n\t\t\t\t:class=\"'bb-base-slider__thumb-container'\"\n\t\t\t\tdata-thumb=\"lower\"\n\t\t\t\t:role=\"'slider'\"\n\t\t\t\t:style=\"{ left: `${internalValueLower}%` }\"\n\t\t\t\t:tabindex=\"disabled ? -1 : 0\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-slider__thumb': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--lower': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--focused': targetThumb === 'lower',\n\t\t\t\t\t}\"\n\t\t\t\t\t:style=\"{\n\t\t\t\t\t\ttransform: `translateY(-50%) ${thumbTranslate ? `translateX(-${internalValueLower}%)` : `translateX(-50%)`}`,\n\t\t\t\t\t\tleft: `${internalValueLower}%`,\n\t\t\t\t\t}\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:focused=\"targetThumb === 'lower'\"\n\t\t\t\t\t\tname=\"thumb:lower\"\n\t\t\t\t\t\t:percent=\"internalValueLower\"\n\t\t\t\t\t\t:value=\"valueNowLower\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:focused=\"targetThumb === 'lower'\"\n\t\t\t\t\t\t\tname=\"thumb\"\n\t\t\t\t\t\t\t:percent=\"internalValueLower\"\n\t\t\t\t\t\t\t:value=\"valueNowLower\" /></slot\n\t\t\t\t></span>\n\t\t\t</span>\n\t\t\t<span\n\t\t\t\tv-bind=\"listeners\"\n\t\t\t\tkey=\"thumbhigher\"\n\t\t\t\tref=\"thumbhigher\"\n\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t:aria-orientation=\"'horizontal'\"\n\t\t\t\t:aria-readonly=\"!readonly\"\n\t\t\t\t:aria-valuemax=\"max\"\n\t\t\t\t:aria-valuemin=\"min\"\n\t\t\t\t:aria-valuenow=\"valueNowHigher\"\n\t\t\t\t:class=\"'bb-base-slider__thumb-container'\"\n\t\t\t\tdata-thumb=\"higher\"\n\t\t\t\t:role=\"'slider'\"\n\t\t\t\t:style=\"{ left: `${internalValueHigher}%` }\"\n\t\t\t\t:tabindex=\"disabled ? -1 : 0\"\n\t\t\t\t@focus=\"onFocus\"\n\t\t\t\t@keydown=\"onKeydown\"\n\t\t\t>\n\t\t\t\t<span\n\t\t\t\t\t:class=\"{\n\t\t\t\t\t\t'bb-base-slider__thumb': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--higher': true,\n\t\t\t\t\t\t'bb-base-slider__thumb--focused': targetThumb === 'higher',\n\t\t\t\t\t}\"\n\t\t\t\t\t:style=\"{\n\t\t\t\t\t\ttransform: `translateY(-50%) ${thumbTranslate ? `translateX(-${internalValueHigher}%)` : `translateX(-50%)`}`,\n\t\t\t\t\t\tleft: `${internalValueHigher}%`,\n\t\t\t\t\t}\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:focused=\"targetThumb === 'higher'\"\n\t\t\t\t\t\tname=\"thumb:higher\"\n\t\t\t\t\t\t:percent=\"internalValueHigher\"\n\t\t\t\t\t\t:value=\"valueNowHigher\"\n\t\t\t\t\t\t><slot\n\t\t\t\t\t\t\t:focused=\"targetThumb === 'higher'\"\n\t\t\t\t\t\t\tname=\"thumb\"\n\t\t\t\t\t\t\t:percent=\"internalValueHigher\"\n\t\t\t\t\t\t\t:value=\"valueNowHigher\" /></slot\n\t\t\t\t></span>\n\t\t\t</span>\n\t\t</span>\n\t\t<slot name=\"append\"></slot>\n\t</span>\n</template>\n\n<script setup lang=\"ts\">\nimport { clamp } from '@/utilities/functions/clamp';\nimport { computed, onMounted, ref, watch } from 'vue';\nimport { head } from '@/utilities/functions/head';\nimport { isCssColor } from '@/utilities/functions/isCssColor';\nimport { isNil } from '@/utilities/functions/isNil';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { transposeValue } from '@/utilities/functions/percentage';\nimport type { InputHTMLAttributes, HTMLAttributes } from 'vue';\nimport { hash } from '@/utilities/functions/hash';\n\nexport type BaseSliderProps = {\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Define a color for the component.\n\t *\n\t * Either a custom color or a coded color in common HEX, RGB, etc... format.\n\t */\n\tcolor?: string;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Maximum value cap.\n\t */\n\tmax?: number;\n\n\t/**\n\t * Minimum value cap.\n\t */\n\tmin?: number;\n\n\t/**\n\t * Used by v-model.\n\t */\n\tmodelValue: number[] | number | string | null;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * Set the input as range.\n\t * modelValue must be an array\n\t */\n\trange?: boolean;\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: InputHTMLAttributes['readonly'];\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * The step attribute is a number that specifies the granularity that the value must adhere to.\n\t */\n\tstep?: number;\n\n\t/**\n\t * Displays ticks on step\n\t */\n\tticks?: boolean;\n\t/**\n\t * Proportionally translates the thumb so it remains on track. Set it to false when displaying ticks so they align with less effort.\n\t */\n\tthumbTranslate?: boolean;\n};\n\nconst props = withDefaults(defineProps<BaseSliderProps>(), {\n\tmax: 100,\n\tmin: 0,\n\tmodelValue: 0,\n\tstep: 1,\n\tthumbTranslate: true,\n});\n\nexport type BaseSliderEvents = {\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'active'): void;\n\t(e: 'inactive'): void;\n\t(e: 'keydown', event: KeyboardEvent): void;\n\t(e: 'pointerdown', event: PointerEvent): void;\n\t(e: 'pointermove', event: PointerEvent): void;\n\t(e: 'pointerup', event: PointerEvent): void;\n\t(e: 'update:modelValue', event: number | number[]): void;\n};\n\nconst emit = defineEmits<BaseSliderEvents>();\n\nexport type BaseSliderSlots = {\n\t'thumb:higher': (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\t'thumb:lower': (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\tappend: (props: object) => any;\n\tprepend: (props: object) => any;\n\tthumb: (props: {\n\t\tvalue: number | undefined;\n\t\tpercent: number;\n\t\tfocused: boolean;\n\t}) => any;\n\ttick: (props: { value: number; percent: number; active: boolean }) => any;\n};\n\ndefineSlots<BaseSliderSlots>();\n\nconst container = ref<HTMLElement>();\nconst track = ref<HTMLElement>();\nconst thumblower = ref<HTMLElement>();\nconst thumbhigher = ref<HTMLElement>();\nconst internalValueLower = ref(0);\nconst internalValueHigher = ref(0);\nconst valueNowLower = computed(() => {\n\tif (Array.isArray(props.modelValue))\n\t\treturn head(props.modelValue) ?? undefined;\n\treturn isNil(props.modelValue) ? undefined : Number(props.modelValue);\n});\nconst valueNowHigher = computed(() => {\n\tif (Array.isArray(props.modelValue))\n\t\treturn head(props.modelValue) ?? undefined;\n\treturn isNil(props.modelValue) ? undefined : Number(props.modelValue);\n});\nconst sortedInternalValues = computed(() => {\n\treturn [internalValueLower.value, internalValueHigher.value].sort(\n\t\t(a, b) => a - b\n\t);\n});\n\nconst proportionalStep = transposeValue({\n\tvalue: props.min + props.step,\n\toriginalBounds: { min: props.min, max: props.max },\n\ttargetBounds: { min: 0, max: 100 },\n\tstep: 1,\n});\n\nconst active = ref(false);\n\nif (props.range && !Array.isArray(props.modelValue)) {\n\tthrow new TypeError(\n\t\t'BaseSlider mode is set as range but modelValue is not an array'\n\t);\n}\n\nonMounted(() => {\n\tif (props.autofocus) {\n\t\tthumbhigher.value?.focus();\n\t}\n});\n\n/**\n * When modelValue changes realign the internal positioning\n */\nwatch(\n\t() => props.modelValue,\n\t(value) => {\n\t\tlet values: number[];\n\t\tif (props.range) {\n\t\t\tconst [min = props.min, max = props.min] = value as number[];\n\t\t\tvalues = [min, max];\n\t\t} else {\n\t\t\tvalues = [props.min, isNotNil(value) ? Number(value) : props.min];\n\t\t}\n\t\tconst [lBound, uBound] = values.map((value) => {\n\t\t\t// Useful for ranges from negative to positive\n\t\t\tlet fallback = isNil(value) ? props.min : Number(value);\n\t\t\tconst transposedValue = transposeValue({\n\t\t\t\tvalue: fallback,\n\t\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\t\tstep: 1,\n\t\t\t});\n\t\t\treturn transposedValue;\n\t\t});\n\t\tinternalValueLower.value = lBound;\n\t\tinternalValueHigher.value = uBound;\n\t},\n\t{ immediate: true }\n);\n\nlet thumbPressed = ref(false);\nlet targetThumb = ref<'higher' | 'lower' | null>(null);\n\nconst getTargetThumb = (event: FocusEvent) => {\n\tif (thumbhigher.value && thumbhigher.value.contains(event.target as Node))\n\t\treturn 'higher';\n\tif (thumblower.value && thumblower.value.contains(event.target as Node))\n\t\treturn 'lower';\n\tthrow new Error('Could not identify target thumb');\n};\n\nconst onPointerdown = (event: PointerEvent) => {\n\tif (props.disabled || props.readonly) return;\n\tif (!targetThumb.value) {\n\t\ttargetThumb.value = getTargetThumb(event);\n\t}\n\tthumbPressed.value = true;\n\tdocument.addEventListener('pointermove', onPointermove);\n\tdocument.addEventListener('pointerup', onPointerup);\n\temit('pointerdown', event);\n};\n\nlet listeners = computed(() => (thumbPressed.value ? {} : { onPointerdown }));\n\nconst onPointermove = (event: PointerEvent | MouseEvent) => {\n\tif (props.disabled || props.readonly) return;\n\tif (track.value) {\n\t\tconst trackPosition = track.value.getBoundingClientRect();\n\t\tconst clickOffset = event.clientX;\n\t\tconst trackStart = trackPosition.left;\n\t\tconst trackLength = trackPosition.width;\n\t\tif (event instanceof PointerEvent) {\n\t\t\temit('pointermove', event);\n\t\t} else {\n\t\t\temit('click', event);\n\t\t}\n\t\tconst position = transposeValue({\n\t\t\tvalue: clamp(clickOffset, trackStart, trackStart + trackLength),\n\t\t\toriginalBounds: { min: trackStart, max: trackStart + trackLength },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: proportionalStep,\n\t\t});\n\t\tif (targetThumb.value === 'higher') {\n\t\t\tinternalValueHigher.value = position;\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = position;\n\t\t}\n\t}\n};\n\nconst getValueToEmit = () => {\n\tconst [min, max] = [internalValueLower.value, internalValueHigher.value].sort(\n\t\t(a, b) => a - b\n\t);\n\tconst refined = [min, max].map((value) =>\n\t\ttransposeValue({\n\t\t\tvalue,\n\t\t\toriginalBounds: { min: 0, max: 100 },\n\t\t\ttargetBounds: { min: props.min, max: props.max },\n\t\t\tstep: props.step,\n\t\t})\n\t);\n\tif (props.range) return refined;\n\treturn refined[1];\n};\n\nconst onPointerup = (event: PointerEvent) => {\n\tthumbPressed.value = false;\n\ttargetThumb.value = null;\n\tdocument.removeEventListener('pointermove', onPointermove);\n\tdocument.removeEventListener('pointerup', onPointerup);\n\temit('pointerup', event);\n\temit('update:modelValue', getValueToEmit());\n};\n\nconst onKeydown = (event: KeyboardEvent) => {\n\temit('keydown', event);\n\tif (\n\t\tprops.disabled ||\n\t\tprops.readonly ||\n\t\t(event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')\n\t) {\n\t\treturn;\n\t}\n\n\tif (event.key === 'ArrowLeft') {\n\t\tif (\n\t\t\ttargetThumb.value === 'higher' ||\n\t\t\tdocument.activeElement === thumbhigher.value\n\t\t) {\n\t\t\tinternalValueHigher.value = Math.max(\n\t\t\t\tinternalValueHigher.value - proportionalStep,\n\t\t\t\tinternalValueLower.value\n\t\t\t);\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = Math.max(\n\t\t\t\tinternalValueLower.value - proportionalStep,\n\t\t\t\t0\n\t\t\t);\n\t\t}\n\t} else if (event.key === 'ArrowRight') {\n\t\tif (\n\t\t\ttargetThumb.value === 'higher' ||\n\t\t\tdocument.activeElement === thumbhigher.value\n\t\t) {\n\t\t\tinternalValueHigher.value = Math.min(\n\t\t\t\tinternalValueHigher.value + proportionalStep,\n\t\t\t\t100\n\t\t\t);\n\t\t} else if (targetThumb.value === 'lower') {\n\t\t\tinternalValueLower.value = Math.min(\n\t\t\t\tinternalValueLower.value + proportionalStep,\n\t\t\t\tinternalValueHigher.value\n\t\t\t);\n\t\t}\n\t}\n\temit('update:modelValue', getValueToEmit());\n};\n\nconst onFocus = (event: FocusEvent) => {\n\temit('focus', event);\n\tconst found = getTargetThumb(event);\n\tif (found) targetThumb.value = found;\n\tif (!active.value) {\n\t\tactive.value = true;\n\t\temit('active');\n\t\tdocument.addEventListener('focusin', onDocumentInteraction);\n\t\tdocument.addEventListener('click', onDocumentInteraction);\n\t}\n};\n\nconst onDocumentInteraction = (event: FocusEvent) => {\n\tif (event.target instanceof HTMLElement) {\n\t\tif (!container.value?.contains(event.target)) {\n\t\t\tactive.value = false;\n\t\t\ttargetThumb.value = null;\n\t\t\temit('inactive');\n\t\t\tdocument.removeEventListener('focusin', onDocumentInteraction);\n\t\t\tdocument.removeEventListener('click', onDocumentInteraction);\n\t\t}\n\t}\n};\n\nconst containerAttributes: Record<string, any> = {\n\tclass: {\n\t\t'bb-base-slider': true,\n\t\t'bb-base-slider--disabled': props.disabled,\n\t\t'bb-base-slider--errors': props.hasErrors,\n\t\t'bb-base-slider--readonly': props.readonly,\n\t\t[`bb-base-slider--${props.color}`]: props.color && !isCssColor(props.color),\n\t},\n\tonClick: (event: MouseEvent) => {\n\t\tif (props.range) return;\n\t\tthumbhigher.value?.focus();\n\t\tonPointermove(event);\n\t\tconst valueToEmit = getValueToEmit();\n\t\t// Prevent emitting twice when clicking on the thumb directly\n\t\tif (hash(valueToEmit) === hash(props.modelValue)) return;\n\t\temit('update:modelValue', getValueToEmit());\n\t},\n\tstyle: {},\n};\n\nif (props.color && isCssColor(props.color)) {\n\tcontainerAttributes.style['--color'] = props.color;\n}\n\nconst sliderBackgroundAttributes = computed(() => {\n\tconst classes = 'bb-base-slider__track-background';\n\tconst style: Record<string, any> = {\n\t\twidth: `${sortedInternalValues.value[1] - sortedInternalValues.value[0]}%`,\n\t\tleft: `${sortedInternalValues.value[0]}%`,\n\t};\n\treturn {\n\t\tclass: classes,\n\t\tstyle,\n\t};\n});\n\ntype Tick = {\n\tvalue: number;\n\tpercent: number;\n\tactive: boolean;\n};\n\nconst ticks = computed<Tick[]>(() => {\n\tif (!props.ticks) return [] as Tick[];\n\tlet ticks: Tick[] = [];\n\tlet current = props.min;\n\twhile (current <= props.max) {\n\t\tlet value = current;\n\t\tlet percent = transposeValue({\n\t\t\tvalue,\n\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: proportionalStep,\n\t\t});\n\t\tlet transposedValue = transposeValue({\n\t\t\tvalue: current,\n\t\t\toriginalBounds: { min: props.min, max: props.max },\n\t\t\ttargetBounds: { min: 0, max: 100 },\n\t\t\tstep: props.step,\n\t\t});\n\t\tconst active =\n\t\t\ttransposedValue >= internalValueLower.value &&\n\t\t\ttransposedValue <= internalValueHigher.value;\n\t\tticks.push({\n\t\t\tvalue,\n\t\t\tpercent,\n\t\t\tactive,\n\t\t});\n\t\tcurrent += props.step;\n\t}\n\treturn ticks;\n});\n</script>\n\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSlider';\n</style>\n"],"names":["props","__props","emit","__emit","container","ref","track","thumblower","thumbhigher","internalValueLower","internalValueHigher","valueNowLower","computed","head","isNil","valueNowHigher","sortedInternalValues","a","b","proportionalStep","transposeValue","active","onMounted","_a","watch","value","values","min","max","isNotNil","lBound","uBound","fallback","thumbPressed","targetThumb","getTargetThumb","event","onPointerdown","onPointermove","onPointerup","listeners","trackPosition","clickOffset","trackStart","trackLength","position","clamp","getValueToEmit","refined","onKeydown","onFocus","found","onDocumentInteraction","containerAttributes","isCssColor","valueToEmit","hash","sliderBackgroundAttributes","classes","style","ticks","current","percent","transposedValue"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmNA,UAAMA,IAAQC,GAoBRC,IAAOC,GAyBPC,IAAYC,KACZC,IAAQD,KACRE,IAAaF,KACbG,IAAcH,KACdI,IAAqBJ,EAAI,CAAC,GAC1BK,IAAsBL,EAAI,CAAC,GAC3BM,IAAgBC,EAAS,MAC1B,MAAM,QAAQZ,EAAM,UAAU,IAC1Ba,EAAKb,EAAM,UAAU,KAAK,SAC3Bc,EAAMd,EAAM,UAAU,IAAI,SAAY,OAAOA,EAAM,UAAU,CACpE,GACKe,IAAiBH,EAAS,MAC3B,MAAM,QAAQZ,EAAM,UAAU,IAC1Ba,EAAKb,EAAM,UAAU,KAAK,SAC3Bc,EAAMd,EAAM,UAAU,IAAI,SAAY,OAAOA,EAAM,UAAU,CACpE,GACKgB,IAAuBJ,EAAS,MAC9B,CAACH,EAAmB,OAAOC,EAAoB,KAAK,EAAE;AAAA,MAC5D,CAACO,GAAGC,MAAMD,IAAIC;AAAA,IAAA,CAEf,GAEKC,IAAmBC,EAAe;AAAA,MACvC,OAAOpB,EAAM,MAAMA,EAAM;AAAA,MACzB,gBAAgB,EAAE,KAAKA,EAAM,KAAK,KAAKA,E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ourcesContent":["<template>\n\t<CommonInputOuterContainer\n\t\tref=\"outerContainer\"\n\t\t:class=\"{\n\t\t\t'bb-base-select': true,\n\t\t\t'bb-base-select--active': active,\n\t\t\t'bb-base-select--shown': shown,\n\t\t\t'bb-base-select--loading': computedLoading,\n\t\t\t'bb-base-select--disabled': disabled,\n\t\t\t'bb-base-select--errors': hasErrors,\n\t\t\t'bb-base-select--readonly': readonly,\n\t\t}\"\n\t\t@click=\"onOuterContainerClick\"\n\t>\n\t\t<template #prepend-outer\n\t\t\t><slot name=\"prepend-outer\" :query=\"query\"></slot\n\t\t></template>\n\n\t\t<CommonInputInnerContainer\n\t\t\tref=\"innerContainer\"\n\t\t\t:append:icon=\"props['append:icon']\"\n\t\t\t:prepend:icon=\"props['prepend:icon']\"\n\t\t>\n\t\t\t<template #prepend><slot name=\"prepend\" :query=\"query\"></slot></template>\n\t\t\t<template #prefix><slot name=\"prefix\" /></template>\n\t\t\t<BbSmoothHeight tag=\"span\">\n\t\t\t\t<span class=\"bb-base-select__input-container\">\n\t\t\t\t\t<template v-if=\"multiple\">\n\t\t\t\t\t\t<template v-if=\"comma\">\n\t\t\t\t\t\t\t<CommaBox ref=\"commaBox\" :options=\"selectedOptions\" />\n\t\t\t\t\t\t</template>\n\t\t\t\t\t\t<template v-else>\n\t\t\t\t\t\t\t<ChipsBox\n\t\t\t\t\t\t\t\tref=\"chipsBox\"\n\t\t\t\t\t\t\t\t:options=\"selectedOptions\"\n\t\t\t\t\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</template>\n\t\t\t\t\t</template>\n\t\t\t\t\t<input\n\t\t\t\t\t\t:id=\"id\"\n\t\t\t\t\t\tref=\"input\"\n\t\t\t\t\t\tv-model=\"query\"\n\t\t\t\t\t\t:aria-autocomplete=\"'list'\"\n\t\t\t\t\t\t:aria-controls=\"`${id}_listbox`\"\n\t\t\t\t\t\t:aria-describedby=\"ariaDescribedby\"\n\t\t\t\t\t\t:aria-expanded=\"shown\"\n\t\t\t\t\t\t:autocomplete=\"autocomplete\"\n\t\t\t\t\t\t:autofocus=\"autofocus\"\n\t\t\t\t\t\t:class=\"'bb-base-select__text-input'\"\n\t\t\t\t\t\t:disabled=\"disabled\"\n\t\t\t\t\t\t:inputmode=\"inputmode\"\n\t\t\t\t\t\t:placeholder=\"computedPlaceholder\"\n\t\t\t\t\t\t:readonly=\"readonly || !allowWriting\"\n\t\t\t\t\t\t:required=\"\n\t\t\t\t\t\t\t(required && !multiple) || (multiple && !modelValue.length)\n\t\t\t\t\t\t\"\n\t\t\t\t\t\trole=\"combobox\"\n\t\t\t\t\t\t:type=\"'text'\"\n\t\t\t\t\t\t@blur.stop=\"onInputBlur\"\n\t\t\t\t\t\t@change.stop=\"onInputChange\"\n\t\t\t\t\t\t@focus.once.stop=\"onInputFirstFocus\"\n\t\t\t\t\t\t@focus.stop=\"onInputFocus\"\n\t\t\t\t\t\t@input.stop=\"onInputInput\"\n\t\t\t\t\t\t@keydown.stop.delete=\"onBackspace\"\n\t\t\t\t\t\t@keydown.stop.left=\"onArrowLeft\"\n\t\t\t\t\t\t@keydown.stop.prevent.down=\"onArrowDown\"\n\t\t\t\t\t\t@keydown.stop.prevent.enter=\"onEnter\"\n\t\t\t\t\t\t@keydown.stop.prevent.esc=\"onEscape\"\n\t\t\t\t\t\t@keydown.stop.prevent.up=\"onArrowUp\"\n\t\t\t\t\t\t@keydown.stop.right=\"onArrowRight\"\n\t\t\t\t\t/>\n\t\t\t\t</span>\n\t\t\t</BbSmoothHeight>\n\t\t\t<slot :loading=\"!!innerLoading\" name=\"chevron\" :shown=\"shown\">\n\t\t\t\t<svg\n\t\t\t\t\tclass=\"bb-base-select__chevron\"\n\t\t\t\t\tviewBox=\"0 0 24 24\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<path\n\t\t\t\t\t\td=\"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z\"\n\t\t\t\t\t\tfill=\"currentColor\"\n\t\t\t\t\t/>\n\t\t\t\t</svg>\n\t\t\t</slot>\n\t\t\t<template #append><slot name=\"append\" :query=\"query\"></slot></template>\n\n\t\t\t<template #suffix><slot name=\"suffix\" /></template>\n\t\t</CommonInputInnerContainer>\n\t\t<template #append-outer\n\t\t\t><slot name=\"append-outer\" :query=\"query\"></slot\n\t\t></template>\n\t\t<input v-for=\"input in hiddenInputs\" :key=\"input.value\" v-bind=\"input\" />\n\n\t\t<teleport v-if=\"renderListBox\" to=\"body\">\n\t\t\t<ListBox\n\t\t\t\tref=\"optionsContainer\"\n\t\t\t\t:loading=\"computedLoading\"\n\t\t\t\t:open=\"shown\"\n\t\t\t\t:options=\"filteredOptions\"\n\t\t\t\t:style=\"optionsContainerStyles\"\n\t\t\t\t@option:selected=\"onOptionSelected\"\n\t\t\t\t@option:unselected=\"onOptionUnselected\"\n\t\t\t>\n\t\t\t\t<template #options:prepend><slot name=\"options:prepend\" /></template>\n\t\t\t\t<template #loading><slot name=\"loading\" :query=\"query\" /></template>\n\t\t\t\t<template #no-data><slot name=\"no-data\" :query=\"query\" /></template>\n\t\t\t\t<template #options:append><slot name=\"options:append\" /></template>\n\t\t\t\t<template #option=\"data\"\n\t\t\t\t\t><slot\n\t\t\t\t\t\t:has-errors=\"hasErrors\"\n\t\t\t\t\t\t:loading=\"computedLoading\"\n\t\t\t\t\t\tname=\"option\"\n\t\t\t\t\t\tv-bind=\"data\"\n\t\t\t\t/></template>\n\t\t\t</ListBox>\n\t\t</teleport>\n\t</CommonInputOuterContainer>\n</template>\n\n<script setup lang=\"ts\">\nimport { BbSmoothHeight } from '@/index';\nimport { computed, ref, nextTick, defineAsyncComponent } from 'vue';\nimport { isNotNil } from '@/utilities/functions/isNotNil';\nimport { last } from '@/utilities/functions/last';\nimport { matchAnyKey } from '@/utilities/functions/matchAnyKey';\nimport { toRef } from 'vue';\nimport { useFloating, autoUpdate, flip, shift, offset } from '@floating-ui/vue';\nimport { useId } from '@/composables/useId';\nimport { useIntersectionObserver } from '@vueuse/core';\nimport { useLogger } from '@/composables/useLogger';\nimport { useMobile } from '@/composables/useMobile';\nimport { useOptions } from '@/composables/useOptions';\nimport { wait } from '@/utilities/functions/wait';\nimport { when } from '@/utilities/functions/when';\nimport ChipsBox from '../ChipsBox.vue';\nimport CommaBox from '../CommaBox.vue';\nimport CommonInputInnerContainer from '../CommonInputInnerContainer.vue';\nimport CommonInputOuterContainer from '../CommonInputOuterContainer.vue';\nimport type { HTMLAttributes, InputHTMLAttributes } from 'vue';\nimport type { Option as BaseOption } from '@/types/Option';\nimport { waitFor } from '@/utilities/functions/waitFor';\n\nexport type BaseSelectProps = {\n\t/**\n\t * Allows the user to add options to the list by\n\t * inserting text in the input and pressing ENTER.\n\t * The value and text of the option generated is a\n\t * string equal to what has been inserted.\n\t */\n\taddOptions?: boolean;\n\n\t/**\n\t * Allows typing into the input.\n\t */\n\tallowWriting?: boolean | 'not-mobile';\n\n\t/**\n\t * Name of the icon to be added at the end of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'append:icon'?: string;\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tariaDescribedby?: InputHTMLAttributes['aria-describedby'];\n\n\t/**\n\t * Guides to the browser as to the type of information expected in the field.\n\t */\n\tautocomplete?: InputHTMLAttributes['autocomplete'];\n\n\t/**\n\t * Sets autofocus on page load.\n\t */\n\tautofocus?: InputHTMLAttributes['autofocus'];\n\n\t/**\n\t * Sets the display model for selected values to a list\n\t * of comma separated string. In this mode the user\n\t * cannot deselect an option by pressing the close button.\n\t */\n\tcomma?: boolean;\n\n\t/**\n\t * Defines an array of dependencies that will trigger actions in the component upon change.\n\t */\n\tdependencies?: any[];\n\n\t/**\n\t * Timeout used to debounce response to changes to dependencies.\n\t */\n\tdepsDebounceTime?: number;\n\n\t/**\n\t * Disables the component\n\t */\n\tdisabled?: boolean;\n\n\t/**\n\t * If coherence is enforce the input cannot have a modelValue that is incoherent with its current items.\n\t *\n\t * e.g. You cannot set v-model to a user that is not present in the items passed.\n\t *\n\t * modelValue will be reset upon incoherence.\n\t */\n\tenforceCoherence?: boolean;\n\n\t/**\n\t * Defines how the filtering should work.\n\t * In any case options are always filtered by the text displayed but\n\t * they can also take into account other properties of the\n\t * passed elements when this property is a string or an array of string.\n\t * E.g. items could be a list of users and you can filter users by email or phone by passing `['email', 'phone']`\n\t * You can also pass false to not filter anything or a function for more granular control.\n\t *\n\t */\n\tfilterBy?:\n\t\t| string\n\t\t| string[]\n\t\t| false\n\t\t| ((value: any, item: any) => boolean)\n\t\t| null;\n\n\t/**\n\t * Define if the component should be in an error state.\n\t * It usually attaches a CSS class for styling purposes.\n\t */\n\thasErrors?: boolean;\n\n\t/**\n\t * The identifier of the component.\n\t */\n\tid?: HTMLAttributes['id'];\n\n\t/**\n\t * Used to retrieve items can be an array or a function.\n\t */\n\titems:\n\t\t| any[]\n\t\t| ((query: string, prefill: boolean, modelValue: any) => Promise<any[]>)\n\t\t| ((query: string, prefill: boolean, modelValue: any) => any[]);\n\n\t/**\n\t * Defines a path that returns a property of the object to use as text or a function that returns a string\n\t */\n\titemText?: string | ((item: any) => string) | undefined;\n\n\t/**\n\t * Defines a path that returns a property of the object to use as value or a function that returns any value\n\t */\n\titemValue?: string | ((item: any) => string) | undefined;\n\n\t/**\n\t * Sets the component in a loading state, usually triggering some visual styles.\n\t */\n\tloading?: boolean;\n\n\t/**\n\t * String displayed while items are being loaded.\n\t */\n\tloadingText?: string;\n\n\t/**\n\t * Used by v-model. Can be any serializable type.\n\t */\n\tmodelValue: any;\n\n\t/**\n\t * Timeout used to debounce response to changes to modelValue.\n\t */\n\tmodelValueDebounceTime?: number;\n\n\t/**\n\t * Allows the selection of multiple items.\n\t */\n\tmultiple?: boolean;\n\n\t/**\n\t * Defines the name of the input.\n\t */\n\tname?: InputHTMLAttributes['name'];\n\n\t/**\n\t * String displayed when there are no items to display.\n\t */\n\tnoDataText?: string;\n\n\t/**\n\t * String displayed when there's no data.\n\t */\n\tplaceholder?: InputHTMLAttributes['placeholder'];\n\n\t/**\n\t * Defines the prefill strategy for the input. By default the input will prefill\n\t * on focus. It can also always prefill with `true` and only prefill on search with `false`.\n\t */\n\tprefill?: boolean | 'focus';\n\n\t/**\n\t * Name of the icon to be added at the start of the input.\n\t */\n\t// eslint-disable-next-line vue/prop-name-casing\n\t'prepend:icon'?: string;\n\n\t/**\n\t * Time to wait when the users stops writing in the input before querying data.\n\t * Especially useful when searching live data on big datasets.\n\t */\n\tqueryDebounceTime?: number;\n\n\t/**\n\t * Sets the input in a readonly state.\n\t */\n\treadonly?: boolean;\n\n\t/**\n\t * Sets the input as required.\n\t */\n\trequired?: boolean;\n\n\t/**\n\t * If `true` when in multiple selection, reset the query immediately\n\t * upon selecting an option. By default the query is\n\t * not reset until focus is lost so the user can search\n\t * for \"Cath\" and select \"Cathy\" and then write more to\n\t * search for \"Catherine\"\n\t */\n\tresetQueryOnOptionSelected?: boolean;\n\n\t/**\n\t * Adds a stash to accumulate selected values. Especially\n\t * useful when searching in a big database of items.\n\t * E.g. if you search for \"John\" and then search for \"Richard\"\n\t * you either always return the previous items or you stash them passing `true` to this option.\n\t */\n\tstash?: boolean;\n\n\t/**\n\t * How long the transition has to last in milliseconds\n\t */\n\ttransitionDuration?: number;\n\n\t/**\n\t * Pass `true` if the dropdown is not updating following movement in the UI, like in modals. Very expensive so use with care.\n\t */\n\tupdateOnAnimationFrame?: boolean;\n};\nexport type BaseSelectEvents = {\n\t(e: 'blur', event: FocusEvent): void;\n\t(e: 'change', event: Event): void;\n\t(e: 'click', event: MouseEvent): void;\n\t(e: 'focus', event: FocusEvent): void;\n\t(e: 'inactive'): void;\n\t(e: 'input', event: Event): void;\n\t(e: 'update:modelValue', value: any): void;\n};\n\nexport type BaseSelectSlots = {\n\tappend?: (props: { query: string }) => any;\n\t'append-outer'?: (props: { query: string }) => any;\n\tchevron?: (props: { loading: boolean; shown: boolean }) => any;\n\tchip?: (props: {\n\t\tdisabled: boolean | undefined;\n\t\thasErrors?: boolean;\n\t\tindex: number;\n\t\titem: any;\n\t\tloading: boolean;\n\t\tmanual: boolean;\n\t\tselected: boolean | undefined;\n\t\ttext: string;\n\t\tvalue: any;\n\t}) => any;\n\tloading?: (props: { query: string }) => any;\n\t'no-data'?: (props: { query: string }) => any;\n\toption?: (props: {\n\t\tdisabled: boolean;\n\t\tfocused: boolean;\n\t\tindex: number;\n\t\thasErrors?: boolean;\n\t\titem: any;\n\t\tloading: boolean;\n\t\tselected: boolean;\n\t\ttext: string;\n\t\tvalue: any;\n\t}) => any;\n\t'option:append'?: (props: { item: any }) => any;\n\t'option:prepend'?: (props: { item: any }) => any;\n\t'options:append'?: (props: object) => any;\n\t'options:prepend'?: (props: object) => any;\n\tprefix?: (props: object) => any;\n\tprepend?: (props: { query: string }) => any;\n\t'prepend-outer'?: (props: { query: string }) => any;\n\tsuffix?: (props: object) => any;\n};\n\nconst props = withDefaults(defineProps<BaseSelectProps>(), {\n\tallowWriting: true,\n\tdepsDebounceTime: 0,\n\tdependencies: () => [],\n\tfilterBy: () => [],\n\tloadingText: 'Caricamento...',\n\tmodelValueDebounceTime: 0,\n\tnoDataText: 'Nessun elemento da visualizzare',\n\tprefill: 'focus',\n\tqueryDebounceTime: 500,\n\ttransitionDuration: 300,\n\tupdateOnAnimationFrame: false,\n});\n\nconst emit = defineEmits<BaseSelectEvents>();\n\ndefineSlots<BaseSelectSlots>();\n\nif (props.multiple && !Array.isArray(props.modelValue)) {\n\tthrow new Error('Multiple is set to \"true\" but modelValue is not an array.');\n}\n\n/**\n * START ELEMENT REFERENCES\n */\nconst ListBox = defineAsyncComponent(() => import('../ListBox.vue'));\nconst outerContainer = ref<InstanceType<\n\ttypeof CommonInputOuterContainer\n> | null>(null);\nconst innerContainer = ref<InstanceType<\n\ttypeof CommonInputInnerContainer\n> | null>(null);\nconst optionsContainer = ref<InstanceType<typeof ListBox> | null>(null);\nconst commaBox = ref<InstanceType<typeof CommaBox> | null>(null);\nconst chipsBox = ref<InstanceType<typeof ChipsBox> | null>(null);\nconst selectedBox = computed(() =>\n\tprops.comma ? commaBox.value : chipsBox.value\n);\n/**\n * END ELEMENT REFERENCES\n */\n\nconst { isMobile } = useMobile();\nconst inputmode = computed(() =>\n\tprops.allowWriting === 'not-mobile' && isMobile.value ? 'none' : undefined\n);\n\n// Always provide an id so that inputs can be focussed by clicking oin the label\nconst id = props.id || useId().id.value;\n\nuseIntersectionObserver(\n\tinnerContainer,\n\t([{ intersectionRatio }]) => {\n\t\tif (intersectionRatio !== 1) {\n\t\t\tclose();\n\t\t}\n\t},\n\t{ threshold: [0, 1] }\n);\n\nconst { floatingStyles } = useFloating(\n\tinnerContainer,\n\toptionsContainer as any,\n\t{\n\t\tplacement: 'bottom',\n\t\twhileElementsMounted: autoUpdate,\n\t\tmiddleware: [flip(), offset(5), shift()],\n\t}\n);\n\nconst optionsContainerStyles = computed(() => {\n\tconst base: Record<string, any> = {\n\t\t...floatingStyles.value,\n\t\tzIndex: '10',\n\t};\n\tif (innerContainer.value) {\n\t\tbase.width = `${innerContainer.value?.$el.clientWidth}px`;\n\t}\n\n\treturn base;\n});\n\n/**\n * START INPUT HANDLING\n */\nconst input = ref<HTMLElement | null>(null);\nconst focusInput = () => {\n\tif (input.value instanceof HTMLInputElement) {\n\t\tinput.value.focus();\n\t}\n};\n\n/**\n * When the focus goes to the input we select the current text\n * so the user can replace or delete it.\n * On top of that if the prefill strategy is to prefill on first focus and options\n * weren't already retrieved by the watcher on mount, we do that\n */\nconst onInputFocus = async (event: FocusEvent) => {\n\temit('focus', event);\n\tsetActive();\n\tdocument.addEventListener('click', onOutsideInteraction);\n\tdocument.addEventListener('focusin', onOutsideInteraction);\n};\n\nconst onInputFirstFocus = () => {\n\tif (props.prefill === 'focus' && !isPrefilling.value && !hasPrefilled.value) {\n\t\tprefillItems();\n\t}\n};\n\nconst onInputBlur = async (event: FocusEvent) => {\n\temit('blur', event);\n};\n\nconst onInputChange = (event: Event) => emit('change', event);\n\n/**\n * Search at every input by the user.\n * When the user deletes the query unselect the current option\n */\nconst onInputInput = (event: Event) => {\n\temit('input', event);\n\tif (query.value === '') {\n\t\tif (!props.multiple) {\n\t\t\tupdateModelValue(null);\n\t\t}\n\t}\n\tselectedBox.value?.blur();\n\tsearchByQuery();\n};\n\n/**\n * On click outside of the container close the panel, remove active state.\n * In multiple selection clear query after a timeout\n */\nconst onOutsideInteraction = async (event: Event) => {\n\tif (event.target instanceof Node) {\n\t\tif (outerContainer.value && optionsContainer.value) {\n\t\t\tif (\n\t\t\t\t!outerContainer.value.$el.contains(event.target) &&\n\t\t\t\t!optionsContainer.value.$el.contains(event.target)\n\t\t\t) {\n\t\t\t\tclose();\n\t\t\t\tsetInactive();\n\t\t\t\tdocument.removeEventListener('click', onOutsideInteraction);\n\t\t\t\tdocument.removeEventListener('focusin', onOutsideInteraction);\n\t\t\t\tawait wait(props.transitionDuration);\n\t\t\t\talignQueryToState();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}\n};\n\nconst canProcessKeyboardBindings = computed(() => {\n\tif (props.readonly) return false;\n\tif (props.disabled) return false;\n\tif (computedLoading.value) return false;\n\tif (!selectedBox.value && props.multiple) return false;\n\treturn true;\n});\n\n/**\n * On arrow prevent the page from scrolling.\n * Reset horizontal focus\n * When the panel is open\n * - Focus on the previous option\n * When the panel is closed\n * - focus on the first selected option\n */\nconst onArrowUp = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\t// Reset horizontal focus while moving vertically\n\tselectedBox.value?.blur();\n\tif (shown.value) {\n\t\toptionsContainer.value?.focusPrevious();\n\t} else {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\toptionsContainer.value?.focusLastSelected();\n\t}\n};\n\nconst onArrowDown = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\t// Reset horizontal focus while moving vertically\n\tselectedBox.value?.blur();\n\tif (shown.value) {\n\t\toptionsContainer.value?.focusNext();\n\t} else {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\toptionsContainer.value?.focusFirstSelected();\n\t}\n};\n\nconst onArrowLeft = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\t// Reset vertical focus while moving horizontally\n\toptionsContainer.value?.blur();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusPrevious();\n\tconst highlightedOption = selectedBox.value?.getHighlighted();\n\tif (highlightedOption) {\n\t\toptionsContainer.value?.focusByHash(highlightedOption.valueHash);\n\t}\n};\n\nconst onArrowRight = (event: KeyboardEvent) => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!props.multiple || query.value) {\n\t\treturn;\n\t}\n\tevent.preventDefault();\n\t// Reset vertical focus while moving horizontally\n\toptionsContainer.value?.blur();\n\tif (!selectedOptions.value.length) return;\n\tselectedBox.value?.focusNext();\n\tconst highlightedOption = selectedBox.value?.getHighlighted();\n\tif (highlightedOption) {\n\t\toptionsContainer.value?.focusByHash(highlightedOption.valueHash);\n\t}\n};\n\nconst onEnter = async () => {\n\tif (!canProcessKeyboardBindings.value) {\n\t\treturn;\n\t}\n\tif (!shown.value) {\n\t\tawait open();\n\t\tawait wait(props.transitionDuration);\n\t\tif (selectedOptions.value.length) {\n\t\t\toptionsContainer.value?.focusFirstSelected();\n\t\t}\n\t} else if (optionsContainer.value?.getHighlighted()) {\n\t\toptionsContainer.value.confirmOption();\n\t} else if (props.addOptions) {\n\t\tif (props.itemText || props.itemValue) {\n\t\t\tconst { error } = useLogger();\n\t\t\terror(\n\t\t\t\t`Adding an option for mapped items is not supported. You can't create an option while passing \"item-text\" or \"item-value\".`\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\t\tconst text = query.value.trim();\n\t\t// Do not add manual items that are already present\n\t\tif (valueIsSelected(text)) return;\n\t\taddCurrentQueryToManualItems();\n\t\tonOptionSelected(last(manualItems.value)!);\n\t}\n};\n\nconst onEscape = async () => {\n\tif (shown.value) {\n\t\tawait close();\n\t}\n};\n\n/**\n * Delete behavior is different when query is empty\n * If query is empty\n * If no chip is selected - select rightmost chip\n * If a chip is selected - deselect that option\n * If any option remains move focus to that or reset\n */\nconst onBackspace = async () => {\n\tif (\n\t\t!canProcessKeyboardBindings.value ||\n\t\tquery.value ||\n\t\t!selectedOptions.value.length\n\t) {\n\t\treturn;\n\t}\n\tif (selectedBox.value?.getHighlighted()) {\n\t\tselectedBox.value.confirmOption();\n\t}\n\tawait nextTick();\n\tselectedBox.value?.focusPrevious();\n};\n\n/**\n * It should prefill if asked, or\n * when single if modelValue is not null\n * when multiple if modelValue is not empty\n */\nconst shouldPrefill =\n\tprops.prefill === true ||\n\t(!props.multiple && isNotNil(props.modelValue)) ||\n\t(props.multiple && !!props.modelValue.length);\n\nconst {\n\tquery,\n\talignQueryToState,\n\taddCurrentQueryToManualItems,\n\tinnerLoading,\n\toptions,\n\tselectedOptions,\n\tselectOption,\n\tunselectOption,\n\tprefillItems,\n\tisPrefilling,\n\thasPrefilled,\n\tupdateModelValue,\n\tvalueIsSelected,\n\tmanualItems,\n\tsearchByQuery,\n} = useOptions({\n\temit,\n\titemText: props.itemText,\n\titemValue: props.itemValue,\n\tmodelValue: toRef(props, 'modelValue'),\n\tmultiple: props.multiple,\n\tresetQueryOnOptionSelected: props.resetQueryOnOptionSelected,\n\tstash: props.stash,\n\titems: toRef(props, 'items'),\n\tenforceCoherence: props.enforceCoherence,\n\tprefill: shouldPrefill,\n\tmodelValueDebounceTime: props.modelValueDebounceTime,\n\tdependencies: toRef(props, 'dependencies'),\n\tdepsDebounceTime: props.depsDebounceTime,\n\tqueryDebounceTime: props.queryDebounceTime,\n\tdisabled: toRef(props, 'disabled'),\n});\n\nconst computedPlaceholder = computed(() => {\n\tif (selectedOptions.value.length) return '';\n\telse return props.placeholder;\n});\n\nconst computedLoading = computed(() => !!(innerLoading.value || props.loading));\n\n/**\n * Filter options to be displayed based on the current query.\n * If no query is used or when query is set from the inside (after a selection) display all possible options\n */\nconst filteredOptions = computed<BaseOption[]>(() => {\n\tlet base = [];\n\t/** Only filter when a value is being searched not when the query is fully set on a selected option text */\n\tconst queryMatchesASelectedOption = selectedOptions.value.some(\n\t\t(option: BaseOption) => option.text === query.value\n\t);\n\tconst shouldFilter =\n\t\t(props.multiple && query.value) ||\n\t\t(query.value && !queryMatchesASelectedOption && !props.multiple);\n\n\tif (shouldFilter && props.filterBy) {\n\t\tbase = options.value.filter((item: BaseOption) => {\n\t\t\tlet matchedAnything = false;\n\t\t\tif (typeof props.filterBy === 'function')\n\t\t\t\tmatchedAnything = props.filterBy(item.value, item.item);\n\t\t\telse if (Array.isArray(props.filterBy) && props.filterBy.length) {\n\t\t\t\tmatchedAnything =\n\t\t\t\t\tmatchedAnything ||\n\t\t\t\t\tmatchAnyKey(item.item, props.filterBy, query.value.trim());\n\t\t\t}\n\t\t\treturn matchedAnything || matchAnyKey(item, ['text'], query.value.trim());\n\t\t});\n\t\t/** Otherwise default to the whole set of options */\n\t} else base = options.value;\n\n\t/** This is done here so that only visible options are highlighted */\n\treturn base;\n});\n\nconst onOptionSelected = (option: BaseOption) => {\n\tselectOption(option);\n\tfocusInput();\n\tif (!props.multiple) {\n\t\tclose();\n\t}\n};\n\nconst onOptionUnselected = (option: BaseOption) => {\n\tunselectOption(option);\n\tfocusInput();\n};\n\n/**\n * We need the transitions because elements must be hidden and shown\n * to accessibility tools when they are fully closed or fully open,\n * while still being animated for sighted users.\n */\n\n// Option panel is open\nconst shown = ref(false);\n// Option panel il closed\nconst hidden = ref(true);\n\nconst renderListBox = ref(false);\n\nconst open = async () => {\n\trenderListBox.value = true;\n\tawait waitFor(() => !!optionsContainer.value);\n\thidden.value = false;\n\tshown.value = true;\n};\n\nconst close = async () => {\n\tshown.value = false;\n\thidden.value = true;\n\tselectedBox.value?.blur();\n};\n\nconst toggle = () => {\n\tif (shown.value) return close();\n\treturn open();\n};\n\n/**\n * Applies a class when the user is inside this whole component.\n * We cannot use focus within as it doesn't work for elements that are teleported.\n * Also we cannot use the <input/> if we physically move focus to the options so\n * we track it manually.\n */\nconst active = ref(false);\n\nconst setActive = () => {\n\tactive.value = true;\n};\nconst setInactive = () => {\n\tactive.value = false;\n\temit('inactive');\n};\n\n/**\n * When clicking on the outside container seamlessly move focus to the input and open the panel\n */\nconst onOuterContainerClick = (event: MouseEvent) => {\n\tevent.preventDefault();\n\temit('click', event);\n\tif (props.disabled || props.readonly) return;\n\tfocusInput();\n\ttoggle();\n};\n\n/**\n * When using this component for submission we add a bunch of hidden\n * inputs so the submitted inputs are on par with v-model\n */\n/**\n * This is used to keep the value compatible to common html expected values.\n * Convert to string everything that's not but do not double encode strings\n */\nconst makeInputValue = when(\n\t(item: unknown) => typeof item !== 'string',\n\tJSON.stringify\n);\n\nconst hiddenInputs = computed(() => {\n\treturn [].concat(props.modelValue).map((current) => {\n\t\tconst value = makeInputValue(current);\n\t\treturn {\n\t\t\tdisabled: props.disabled,\n\t\t\tname: props.name,\n\t\t\ttype: 'hidden',\n\t\t\tvalue: value,\n\t\t};\n\t});\n});\n</script>\n<style lang=\"postcss\">\n@import '@/assets/css/BaseSelect';\n</style>\n"],"names":["props","__props","emit","__emit","ListBox","defineAsyncComponent","outerContainer","ref","innerContainer","optionsContainer","commaBox","chipsBox","selectedBox","computed","isMobile","useMobile","inputmode","id","useId","useIntersectionObserver","intersectionRatio","close","floatingStyles","useFloating","autoUpdate","flip","offset","shift","optionsContainerStyles","base","_a","input","focusInput","onInputFocus","event","setActive","onOutsideInteraction","onInputFirstFocus","isPrefilling","hasPrefilled","prefillItems","onInputBlur","onInputChange","onInputInput","query","updateModelValue","searchByQuery","setInactive","wait","alignQueryToState","canProcessKeyboardBindings","computedLoading","onArrowUp","shown","_b","open","_c","onArrowDown","onArrowLeft","selectedOptions","highlightedOption","_d","onArrowRight","onEnter","error","useLogger","text","valueIsSelected","addCurrentQueryToManualItems","onOptionSelected","last","manualItems","onEscape","onBackspace","nextTick","shouldPrefill","isNotNil","innerLoading","options","selectOption","unselectOption","useOptions","toRef","computedPlaceholder","filteredOptions","queryMatchesASelectedOption","option","item","matchedAnything","matchAnyKey","onOptionUnselected","hidden","renderListBox","waitFor","toggle","active","onOuterContainerClick","makeInputValue","when","hiddenInputs","current","value"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8YA,UAAMA,IAAQC,GAcRC,IAAOC;AAIb,QAAIH,EAAM,YAAY,CAAC,MAAM,QAAQA,EAAM,UAAU;AAC9C,YAAA,IAAI,MAAM,2DAA2D;AAM5E,UAAMI,IAAUC,GAAqB,MAAM,OAAO,eAAgB,CAAC,GAC7DC,IAAiBC,EAEb,IAAI,GACRC,IAAiBD,EAEb,IAAI,GACRE,IAAmBF,EAAyC,IAAI,GAChEG,IAAWH,EAA0C,IAAI,GACzDI,IAAWJ,EAA0C,IAAI,GACzDK,IAAcC;AAAA,MAAS,MAC5Bb,EAAM,QAAQU,EAAS,QAAQC,EAAS;AAAA,IAAA,GAMnC,EAAE,UAAAG,OAAaC,MACfC,KAAYH;AAAA,MAAS,MAC1Bb,EAAM,iBAAiB,gBAAgBc,GAAS,QAAQ,SAAS;AAAA,IAAA,GAI5DG,IAAKjB,EAAM,MAAMkB,KAAQ,GAAG;AAElC,IAAAC;AAAA,MACCX;AAAA,MACA,CAAC,CAAC,EAAE,mBAAAY,EAAA,CAAmB,MAAM;AAC5B,QAAIA,MAAsB,KACnBC;MAER;AAAA,MACA,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE;AAAA,IAAA;AAGf,UAAA,EAAE,gBAAAC,OAAmBC;AAAA,MAC1Bf;AAAA,MACAC;AAAA,MACA;AAAA,QACC,WAAW;AAAA,QACX,sBAAsBe;AAAA,QACt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,EAAM,cACjBgC,KACJ8D;IAAA,GAWFG,KAAiBC;AAAA,MACtB,CAACX,MAAkB,OAAOA,KAAS;AAAA,MACnC,KAAK;AAAA,IAAA,GAGAY,KAAetF,EAAS,MACtB,CAAA,EAAG,OAAOb,EAAM,UAAU,EAAE,IAAI,CAACoG,MAAY;AAC7C,YAAAC,IAAQJ,GAAeG,CAAO;AAC7B,aAAA;AAAA,QACN,UAAUpG,EAAM;AAAA,QAChB,MAAMA,EAAM;AAAA,QACZ,MAAM;AAAA,QACN,OAAAqG;AAAA,MAAA;AAAA,IACD,CACA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index38.js
CHANGED
|
@@ -1,127 +1,309 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { defineComponent as U, ref as d, computed as h, onMounted as W, watch as Z, openBlock as g, createElementBlock as w, mergeProps as T, renderSlot as f, createElementVNode as b, Fragment as ee, renderList as ae, createCommentVNode as H, normalizeProps as re, guardReactiveProps as te, unref as c, normalizeClass as F, normalizeStyle as I } from "vue";
|
|
2
|
+
import { clamp as le } from "./index200.js";
|
|
3
|
+
import { head as O } from "./index241.js";
|
|
4
|
+
import { isCssColor as Y } from "./index219.js";
|
|
5
|
+
import { isNil as P } from "./index126.js";
|
|
6
|
+
import { isNotNil as ne } from "./index131.js";
|
|
7
|
+
import { transposeValue as y } from "./index127.js";
|
|
8
|
+
import { hash as J } from "./index226.js";
|
|
9
|
+
const oe = { class: "bb-base-slider__slider-container" }, ie = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "bb-base-slider__ticks-container"
|
|
12
|
+
}, se = ["id", "disabled", "name", "readonly", "required", "value"], ue = /* @__PURE__ */ b("span", { class: "bb-base-slider__track-fill" }, null, -1), de = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], me = ["aria-describedby", "aria-readonly", "aria-valuemax", "aria-valuemin", "aria-valuenow", "tabindex"], ke = /* @__PURE__ */ U({
|
|
13
|
+
__name: "BaseSlider",
|
|
8
14
|
props: {
|
|
9
15
|
ariaDescribedby: {},
|
|
10
16
|
autofocus: {},
|
|
11
|
-
checked: { type: [Boolean, String] },
|
|
12
17
|
color: {},
|
|
13
18
|
disabled: { type: Boolean },
|
|
14
|
-
falseValue: { default: !1 },
|
|
15
19
|
hasErrors: { type: Boolean },
|
|
16
20
|
id: {},
|
|
17
|
-
|
|
21
|
+
max: { default: 100 },
|
|
22
|
+
min: { default: 0 },
|
|
23
|
+
modelValue: { default: 0 },
|
|
18
24
|
name: {},
|
|
25
|
+
range: { type: Boolean },
|
|
19
26
|
readonly: {},
|
|
20
27
|
required: { type: Boolean },
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
28
|
+
step: { default: 1 },
|
|
29
|
+
ticks: { type: Boolean },
|
|
30
|
+
thumbTranslate: { type: Boolean, default: !0 }
|
|
24
31
|
},
|
|
25
|
-
emits: ["
|
|
26
|
-
setup(
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
32
|
+
emits: ["click", "focus", "active", "inactive", "keydown", "pointerdown", "pointermove", "pointerup", "update:modelValue"],
|
|
33
|
+
setup(K, { emit: j }) {
|
|
34
|
+
const a = K, u = j, C = d(), B = d(), _ = d(), v = d(), n = d(0), o = d(0), E = h(() => Array.isArray(a.modelValue) ? O(a.modelValue) ?? void 0 : P(a.modelValue) ? void 0 : Number(a.modelValue)), $ = h(() => Array.isArray(a.modelValue) ? O(a.modelValue) ?? void 0 : P(a.modelValue) ? void 0 : Number(a.modelValue)), L = h(() => [n.value, o.value].sort(
|
|
35
|
+
(e, r) => e - r
|
|
36
|
+
)), p = y({
|
|
37
|
+
value: a.min + a.step,
|
|
38
|
+
originalBounds: { min: a.min, max: a.max },
|
|
39
|
+
targetBounds: { min: 0, max: 100 },
|
|
40
|
+
step: 1
|
|
41
|
+
}), A = d(!1);
|
|
42
|
+
if (a.range && !Array.isArray(a.modelValue))
|
|
43
|
+
throw new TypeError(
|
|
44
|
+
"BaseSlider mode is set as range but modelValue is not an array"
|
|
45
|
+
);
|
|
46
|
+
W(() => {
|
|
47
|
+
var e;
|
|
48
|
+
a.autofocus && ((e = v.value) == null || e.focus());
|
|
49
|
+
}), Z(
|
|
50
|
+
() => a.modelValue,
|
|
51
|
+
(e) => {
|
|
52
|
+
let r;
|
|
53
|
+
if (a.range) {
|
|
54
|
+
const [s = a.min, m = a.min] = e;
|
|
55
|
+
r = [s, m];
|
|
56
|
+
} else
|
|
57
|
+
r = [a.min, ne(e) ? Number(e) : a.min];
|
|
58
|
+
const [l, i] = r.map((s) => {
|
|
59
|
+
let m = P(s) ? a.min : Number(s);
|
|
60
|
+
return y({
|
|
61
|
+
value: m,
|
|
62
|
+
targetBounds: { min: 0, max: 100 },
|
|
63
|
+
originalBounds: { min: a.min, max: a.max },
|
|
64
|
+
step: 1
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
n.value = l, o.value = i;
|
|
68
|
+
},
|
|
69
|
+
{ immediate: !0 }
|
|
70
|
+
);
|
|
71
|
+
let N = d(!1), t = d(null);
|
|
72
|
+
const S = (e) => {
|
|
73
|
+
if (v.value && v.value.contains(e.target))
|
|
74
|
+
return "higher";
|
|
75
|
+
if (_.value && _.value.contains(e.target))
|
|
76
|
+
return "lower";
|
|
77
|
+
throw new Error("Could not identify target thumb");
|
|
78
|
+
}, G = (e) => {
|
|
79
|
+
a.disabled || a.readonly || (t.value || (t.value = S(e)), N.value = !0, document.addEventListener("pointermove", x), document.addEventListener("pointerup", z), u("pointerdown", e));
|
|
80
|
+
};
|
|
81
|
+
let M = h(() => N.value ? {} : { onPointerdown: G });
|
|
82
|
+
const x = (e) => {
|
|
83
|
+
if (!(a.disabled || a.readonly) && B.value) {
|
|
84
|
+
const r = B.value.getBoundingClientRect(), l = e.clientX, i = r.left, s = r.width;
|
|
85
|
+
e instanceof PointerEvent ? u("pointermove", e) : u("click", e);
|
|
86
|
+
const m = y({
|
|
87
|
+
value: le(l, i, i + s),
|
|
88
|
+
originalBounds: { min: i, max: i + s },
|
|
89
|
+
targetBounds: { min: 0, max: 100 },
|
|
90
|
+
step: p
|
|
91
|
+
});
|
|
92
|
+
t.value === "higher" ? o.value = m : t.value === "lower" && (n.value = m);
|
|
93
|
+
}
|
|
94
|
+
}, k = () => {
|
|
95
|
+
const [e, r] = [n.value, o.value].sort(
|
|
96
|
+
(i, s) => i - s
|
|
97
|
+
), l = [e, r].map(
|
|
98
|
+
(i) => y({
|
|
99
|
+
value: i,
|
|
100
|
+
originalBounds: { min: 0, max: 100 },
|
|
101
|
+
targetBounds: { min: a.min, max: a.max },
|
|
102
|
+
step: a.step
|
|
103
|
+
})
|
|
104
|
+
);
|
|
105
|
+
return a.range ? l : l[1];
|
|
106
|
+
}, z = (e) => {
|
|
107
|
+
N.value = !1, t.value = null, document.removeEventListener("pointermove", x), document.removeEventListener("pointerup", z), u("pointerup", e), u("update:modelValue", k());
|
|
108
|
+
}, X = (e) => {
|
|
109
|
+
u("keydown", e), !(a.disabled || a.readonly || e.key !== "ArrowLeft" && e.key !== "ArrowRight") && (e.key === "ArrowLeft" ? t.value === "higher" || document.activeElement === v.value ? o.value = Math.max(
|
|
110
|
+
o.value - p,
|
|
111
|
+
n.value
|
|
112
|
+
) : t.value === "lower" && (n.value = Math.max(
|
|
113
|
+
n.value - p,
|
|
114
|
+
0
|
|
115
|
+
)) : e.key === "ArrowRight" && (t.value === "higher" || document.activeElement === v.value ? o.value = Math.min(
|
|
116
|
+
o.value + p,
|
|
117
|
+
100
|
|
118
|
+
) : t.value === "lower" && (n.value = Math.min(
|
|
119
|
+
n.value + p,
|
|
120
|
+
o.value
|
|
121
|
+
))), u("update:modelValue", k()));
|
|
122
|
+
}, q = (e) => {
|
|
123
|
+
u("focus", e);
|
|
124
|
+
const r = S(e);
|
|
125
|
+
r && (t.value = r), A.value || (A.value = !0, u("active"), document.addEventListener("focusin", V), document.addEventListener("click", V));
|
|
126
|
+
}, V = (e) => {
|
|
127
|
+
var r;
|
|
128
|
+
e.target instanceof HTMLElement && ((r = C.value) != null && r.contains(e.target) || (A.value = !1, t.value = null, u("inactive"), document.removeEventListener("focusin", V), document.removeEventListener("click", V)));
|
|
129
|
+
}, D = {
|
|
130
|
+
class: {
|
|
131
|
+
"bb-base-slider": !0,
|
|
132
|
+
"bb-base-slider--disabled": a.disabled,
|
|
133
|
+
"bb-base-slider--errors": a.hasErrors,
|
|
134
|
+
"bb-base-slider--readonly": a.readonly,
|
|
135
|
+
[`bb-base-slider--${a.color}`]: a.color && !Y(a.color)
|
|
136
|
+
},
|
|
137
|
+
onClick: (e) => {
|
|
138
|
+
var l;
|
|
139
|
+
if (a.range) return;
|
|
140
|
+
(l = v.value) == null || l.focus(), x(e);
|
|
141
|
+
const r = k();
|
|
142
|
+
J(r) !== J(a.modelValue) && u("update:modelValue", k());
|
|
143
|
+
},
|
|
144
|
+
style: {}
|
|
145
|
+
};
|
|
146
|
+
a.color && Y(a.color) && (D.style["--color"] = a.color);
|
|
147
|
+
const Q = h(() => {
|
|
148
|
+
const e = "bb-base-slider__track-background", r = {
|
|
149
|
+
width: `${L.value[1] - L.value[0]}%`,
|
|
150
|
+
left: `${L.value[0]}%`
|
|
69
151
|
};
|
|
70
152
|
return {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
checked: s.value,
|
|
74
|
-
// There is no such thing as readonly checkbox so we disable and style it with css
|
|
75
|
-
disabled: e.disabled || e.readonly,
|
|
76
|
-
id: e.id,
|
|
77
|
-
indeterminate: e.indeterminate,
|
|
78
|
-
name: e.name,
|
|
79
|
-
required: e.required,
|
|
80
|
-
tabindex: e.disabled ? -1 : void 0,
|
|
81
|
-
type: "checkbox",
|
|
82
|
-
value: o,
|
|
83
|
-
...C
|
|
153
|
+
class: e,
|
|
154
|
+
style: r
|
|
84
155
|
};
|
|
85
|
-
}),
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
() => [e.modelValue, e.checked, e.indeterminate],
|
|
107
|
-
() => {
|
|
108
|
-
u.value && (u.value.indeterminate = !!e.indeterminate);
|
|
156
|
+
}), R = h(() => {
|
|
157
|
+
if (!a.ticks) return [];
|
|
158
|
+
let e = [], r = a.min;
|
|
159
|
+
for (; r <= a.max; ) {
|
|
160
|
+
let l = r, i = y({
|
|
161
|
+
value: l,
|
|
162
|
+
originalBounds: { min: a.min, max: a.max },
|
|
163
|
+
targetBounds: { min: 0, max: 100 },
|
|
164
|
+
step: p
|
|
165
|
+
}), s = y({
|
|
166
|
+
value: r,
|
|
167
|
+
originalBounds: { min: a.min, max: a.max },
|
|
168
|
+
targetBounds: { min: 0, max: 100 },
|
|
169
|
+
step: a.step
|
|
170
|
+
});
|
|
171
|
+
const m = s >= n.value && s <= o.value;
|
|
172
|
+
e.push({
|
|
173
|
+
value: l,
|
|
174
|
+
percent: i,
|
|
175
|
+
active: m
|
|
176
|
+
}), r += a.step;
|
|
109
177
|
}
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
178
|
+
return e;
|
|
179
|
+
});
|
|
180
|
+
return (e, r) => (g(), w("span", T(D, {
|
|
181
|
+
ref_key: "container",
|
|
182
|
+
ref: C
|
|
183
|
+
}), [
|
|
184
|
+
f(e.$slots, "prepend"),
|
|
185
|
+
b("span", oe, [
|
|
186
|
+
R.value.length ? (g(), w("span", ie, [
|
|
187
|
+
(g(!0), w(ee, null, ae(R.value, (l) => (g(), w("span", {
|
|
188
|
+
key: l.value,
|
|
189
|
+
class: "bb-base-slider__tick"
|
|
190
|
+
}, [
|
|
191
|
+
f(e.$slots, "tick", {
|
|
192
|
+
active: l.active,
|
|
193
|
+
percent: l.percent,
|
|
194
|
+
value: l.value
|
|
195
|
+
})
|
|
196
|
+
]))), 128))
|
|
197
|
+
])) : H("", !0),
|
|
198
|
+
b("input", {
|
|
199
|
+
id: e.id,
|
|
200
|
+
class: "sr-only",
|
|
201
|
+
disabled: e.disabled,
|
|
202
|
+
name: e.name,
|
|
203
|
+
readonly: e.readonly,
|
|
204
|
+
required: e.required,
|
|
205
|
+
tabindex: -1,
|
|
206
|
+
type: "number",
|
|
207
|
+
value: JSON.stringify(e.modelValue)
|
|
208
|
+
}, null, 8, se),
|
|
209
|
+
b("span", {
|
|
210
|
+
ref_key: "track",
|
|
211
|
+
ref: B,
|
|
212
|
+
class: "bb-base-slider__track-container"
|
|
213
|
+
}, [
|
|
214
|
+
ue,
|
|
215
|
+
b("span", re(te(Q.value)), null, 16)
|
|
216
|
+
], 512),
|
|
217
|
+
a.range ? (g(), w("span", T({ key: 1 }, c(M), {
|
|
218
|
+
key: "thumblower",
|
|
219
|
+
ref_key: "thumblower",
|
|
220
|
+
ref: _,
|
|
221
|
+
"aria-describedby": e.ariaDescribedby,
|
|
222
|
+
"aria-orientation": "horizontal",
|
|
223
|
+
"aria-readonly": !e.readonly,
|
|
224
|
+
"aria-valuemax": e.max,
|
|
225
|
+
"aria-valuemin": e.min,
|
|
226
|
+
"aria-valuenow": E.value,
|
|
227
|
+
class: "bb-base-slider__thumb-container",
|
|
228
|
+
"data-thumb": "lower",
|
|
229
|
+
role: "slider",
|
|
230
|
+
style: { left: `${n.value}%` },
|
|
231
|
+
tabindex: e.disabled ? -1 : 0,
|
|
232
|
+
onFocus: q,
|
|
233
|
+
onKeydown: X
|
|
234
|
+
}), [
|
|
235
|
+
b("span", {
|
|
236
|
+
class: F({
|
|
237
|
+
"bb-base-slider__thumb": !0,
|
|
238
|
+
"bb-base-slider__thumb--lower": !0,
|
|
239
|
+
"bb-base-slider__thumb--focused": c(t) === "lower"
|
|
240
|
+
}),
|
|
241
|
+
style: I({
|
|
242
|
+
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${n.value}%)` : "translateX(-50%)"}`,
|
|
243
|
+
left: `${n.value}%`
|
|
244
|
+
})
|
|
245
|
+
}, [
|
|
246
|
+
f(e.$slots, "thumb:lower", {
|
|
247
|
+
focused: c(t) === "lower",
|
|
248
|
+
percent: n.value,
|
|
249
|
+
value: E.value
|
|
250
|
+
}, () => [
|
|
251
|
+
f(e.$slots, "thumb", {
|
|
252
|
+
focused: c(t) === "lower",
|
|
253
|
+
percent: n.value,
|
|
254
|
+
value: E.value
|
|
255
|
+
})
|
|
256
|
+
])
|
|
257
|
+
], 6)
|
|
258
|
+
], 16, de)) : H("", !0),
|
|
259
|
+
b("span", T(c(M), {
|
|
260
|
+
key: "thumbhigher",
|
|
261
|
+
ref_key: "thumbhigher",
|
|
262
|
+
ref: v,
|
|
263
|
+
"aria-describedby": e.ariaDescribedby,
|
|
264
|
+
"aria-orientation": "horizontal",
|
|
265
|
+
"aria-readonly": !e.readonly,
|
|
266
|
+
"aria-valuemax": e.max,
|
|
267
|
+
"aria-valuemin": e.min,
|
|
268
|
+
"aria-valuenow": $.value,
|
|
269
|
+
class: "bb-base-slider__thumb-container",
|
|
270
|
+
"data-thumb": "higher",
|
|
271
|
+
role: "slider",
|
|
272
|
+
style: { left: `${o.value}%` },
|
|
273
|
+
tabindex: e.disabled ? -1 : 0,
|
|
274
|
+
onFocus: q,
|
|
275
|
+
onKeydown: X
|
|
276
|
+
}), [
|
|
277
|
+
b("span", {
|
|
278
|
+
class: F({
|
|
279
|
+
"bb-base-slider__thumb": !0,
|
|
280
|
+
"bb-base-slider__thumb--higher": !0,
|
|
281
|
+
"bb-base-slider__thumb--focused": c(t) === "higher"
|
|
282
|
+
}),
|
|
283
|
+
style: I({
|
|
284
|
+
transform: `translateY(-50%) ${e.thumbTranslate ? `translateX(-${o.value}%)` : "translateX(-50%)"}`,
|
|
285
|
+
left: `${o.value}%`
|
|
286
|
+
})
|
|
287
|
+
}, [
|
|
288
|
+
f(e.$slots, "thumb:higher", {
|
|
289
|
+
focused: c(t) === "higher",
|
|
290
|
+
percent: o.value,
|
|
291
|
+
value: $.value
|
|
292
|
+
}, () => [
|
|
293
|
+
f(e.$slots, "thumb", {
|
|
294
|
+
focused: c(t) === "higher",
|
|
295
|
+
percent: o.value,
|
|
296
|
+
value: $.value
|
|
297
|
+
})
|
|
298
|
+
])
|
|
299
|
+
], 6)
|
|
300
|
+
], 16, me)
|
|
301
|
+
]),
|
|
302
|
+
f(e.$slots, "append")
|
|
121
303
|
], 16));
|
|
122
304
|
}
|
|
123
305
|
});
|
|
124
306
|
export {
|
|
125
|
-
|
|
307
|
+
ke as default
|
|
126
308
|
};
|
|
127
309
|
//# sourceMappingURL=index38.js.map
|