@okam/stack-ui 1.27.3 → 1.29.0
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/components/Box/interface.d.ts +0 -1
- package/components/Button/interface.d.ts +2 -2
- package/components/Menu/interface.d.ts +5 -2
- package/components/Typography/interface.d.ts +0 -1
- package/components/Video/index.d.ts +3 -0
- package/components/Video/interface.d.ts +6 -0
- package/index.d.ts +1 -2
- package/index.js +1 -1
- package/index.mjs +101 -103
- package/index10.js +1 -1
- package/index10.mjs +1 -1
- package/index100.js +2 -1
- package/index100.mjs +22 -17
- package/index101.js +1 -2
- package/index101.mjs +63 -22
- package/index102.js +1 -1
- package/index102.mjs +24 -58
- package/index103.js +1 -1
- package/index103.mjs +4 -29
- package/index104.js +1 -1
- package/index104.mjs +11 -4
- package/index105.js +1 -1
- package/index105.mjs +14 -11
- package/index106.js +1 -1
- package/index106.mjs +22 -13
- package/index107.js +1 -1
- package/index107.mjs +19 -19
- package/index108.js +1 -1
- package/index108.mjs +38 -22
- package/index109.js +2 -1
- package/index109.mjs +12 -38
- package/index11.js +1 -1
- package/index11.mjs +3 -3
- package/index110.js +1 -2
- package/index110.mjs +7 -12
- package/index111.js +1 -1
- package/index111.mjs +21 -7
- package/index112.js +1 -1
- package/index112.mjs +38 -21
- package/index113.js +1 -1
- package/index113.mjs +49 -38
- package/index114.js +1 -1
- package/index114.mjs +40 -49
- package/index115.js +1 -1
- package/index115.mjs +13 -40
- package/index116.js +1 -1
- package/index116.mjs +26 -14
- package/index117.js +1 -1
- package/index117.mjs +17 -23
- package/index118.js +1 -1
- package/index118.mjs +8 -19
- package/index119.js +1 -1
- package/index119.mjs +30 -9
- package/index12.js +1 -1
- package/index12.mjs +1 -1
- package/index120.js +1 -1
- package/index120.mjs +15 -30
- package/index121.js +1 -1
- package/index121.mjs +15 -13
- package/index122.js +1 -1
- package/index122.mjs +21 -17
- package/index123.js +1 -1
- package/index123.mjs +11 -5
- package/index124.js +2 -1
- package/index124.mjs +21 -20
- package/index125.js +1 -1
- package/index125.mjs +12 -11
- package/index126.js +1 -1
- package/index126.mjs +46 -42
- package/index127.js +1 -2
- package/index127.mjs +239 -20
- package/index128.js +2 -1
- package/index128.mjs +12 -11
- package/index129.js +1 -1
- package/index129.mjs +30 -46
- package/index13.js +1 -1
- package/index13.mjs +32 -15
- package/index130.js +1 -1
- package/index130.mjs +43 -233
- package/index131.js +1 -2
- package/index131.mjs +27 -13
- package/index132.js +1 -1
- package/index132.mjs +21 -30
- package/index133.js +1 -1
- package/index133.mjs +61 -50
- package/index134.js +1 -1
- package/index134.mjs +93 -25
- package/index135.js +1 -1
- package/index135.mjs +27 -16
- package/index136.js +1 -1
- package/index136.mjs +121 -3
- package/index137.js +1 -4
- package/index137.mjs +27 -246
- package/index138.js +1 -1
- package/index138.mjs +124 -61
- package/index139.js +1 -1
- package/index139.mjs +132 -92
- package/index14.js +1 -1
- package/index14.mjs +4 -4
- package/index140.js +1 -1
- package/index140.mjs +14 -31
- package/index141.js +1 -1
- package/index141.mjs +90 -116
- package/index142.js +1 -1
- package/index142.mjs +105 -26
- package/index143.js +1 -1
- package/index143.mjs +5 -124
- package/index144.js +1 -1
- package/index144.mjs +3 -134
- package/index145.js +1 -1
- package/index145.mjs +123 -12
- package/index146.js +1 -1
- package/index146.mjs +18 -84
- package/index147.js +1 -1
- package/index147.mjs +46 -101
- package/index148.js +1 -1
- package/index148.mjs +44 -5
- package/index149.js +1 -1
- package/index149.mjs +37 -3
- package/index15.js +1 -1
- package/index15.mjs +1 -1
- package/index150.js +1 -1
- package/index150.mjs +102 -114
- package/index151.js +1 -1
- package/index151.mjs +69 -21
- package/index152.js +1 -1
- package/index152.mjs +86 -36
- package/index153.js +1 -1
- package/index153.mjs +98 -45
- package/index154.js +1 -1
- package/index154.mjs +192 -30
- package/index155.js +1 -1
- package/index155.mjs +58 -107
- package/index156.js +1 -1
- package/index156.mjs +132 -68
- package/index157.js +1 -1
- package/index157.mjs +119 -101
- package/index158.js +1 -1
- package/index158.mjs +218 -98
- package/index159.js +1 -1
- package/index159.mjs +191 -2
- package/index16.js +1 -1
- package/index16.mjs +2 -2
- package/index160.js +1 -1
- package/index160.mjs +69 -5
- package/index161.js +1 -1
- package/index161.mjs +253 -59
- package/index162.js +1 -1
- package/index162.mjs +95 -24
- package/index163.js +1 -1
- package/index163.mjs +173 -53
- package/index164.js +1 -1
- package/index164.mjs +78 -149
- package/index165.js +1 -1
- package/index165.mjs +57 -21
- package/index166.js +1 -1
- package/index166.mjs +125 -18
- package/index167.js +1 -1
- package/index167.mjs +115 -38
- package/index168.js +1 -1
- package/index168.mjs +117 -77
- package/index169.js +1 -1
- package/index169.mjs +70 -28
- package/index17.js +1 -1
- package/index17.mjs +1 -1
- package/index170.js +1 -1
- package/index170.mjs +110 -21
- package/index171.js +1 -1
- package/index171.mjs +50 -51
- package/index172.js +1 -1
- package/index172.mjs +94 -2
- package/index173.js +1 -11
- package/index173.mjs +69 -114
- package/index174.js +1 -1
- package/index174.mjs +50 -193
- package/index175.js +1 -1
- package/index175.mjs +91 -56
- package/index176.js +5 -1
- package/index176.mjs +75 -136
- package/index177.js +1 -1
- package/index177.mjs +1999 -107
- package/index178.js +1 -1
- package/index178.mjs +56 -214
- package/index179.js +1 -1
- package/index179.mjs +186 -188
- package/index18.js +1 -1
- package/index18.mjs +4 -4
- package/index180.js +1 -1
- package/index180.mjs +5 -69
- package/index181.js +1 -1
- package/index181.mjs +121 -249
- package/index182.js +1 -1
- package/index182.mjs +171 -89
- package/index183.js +1 -1
- package/index183.mjs +8 -173
- package/index184.js +1 -1
- package/index184.mjs +3 -84
- package/index185.js +1 -1
- package/index185.mjs +32 -54
- package/index186.js +1 -1
- package/index186.mjs +5 -126
- package/index187.js +1 -1
- package/index187.mjs +25 -112
- package/index188.js +1 -1
- package/index188.mjs +6 -122
- package/index189.js +1 -1
- package/index189.mjs +307 -66
- package/index19.js +1 -1
- package/index19.mjs +2 -2
- package/index190.js +1 -1
- package/index190.mjs +190 -108
- package/index191.js +1 -1
- package/index191.mjs +8 -52
- package/index192.js +1 -1
- package/index192.mjs +24 -91
- package/index193.js +1 -1
- package/index193.mjs +54 -69
- package/index194.js +1 -1
- package/index194.mjs +43 -53
- package/index195.js +1 -1
- package/index195.mjs +123 -98
- package/index196.js +1 -5
- package/index196.mjs +5 -80
- package/index197.js +1 -1
- package/index197.mjs +25 -2008
- package/index198.js +1 -1
- package/index198.mjs +6 -59
- package/index199.js +1 -1
- package/index199.mjs +7 -188
- package/index2.js +1 -1
- package/index2.mjs +20 -20
- package/index20.js +1 -1
- package/index20.mjs +2 -2
- package/index200.js +1 -1
- package/index200.mjs +6 -4
- package/index201.js +1 -1
- package/index201.mjs +5 -2
- package/index202.js +1 -1
- package/index202.mjs +5 -52
- package/index203.js +1 -1
- package/index203.mjs +9 -20
- package/index21.js +1 -1
- package/index21.mjs +1 -1
- package/index22.js +1 -1
- package/index22.mjs +1 -1
- package/index23.js +1 -1
- package/index23.mjs +4 -4
- package/index24.js +1 -1
- package/index24.mjs +5 -5
- package/index25.js +1 -1
- package/index25.mjs +1 -1
- package/index26.js +1 -1
- package/index26.mjs +3 -3
- package/index27.js +1 -1
- package/index27.mjs +3 -3
- package/index28.js +1 -1
- package/index28.mjs +2 -2
- package/index29.js +1 -1
- package/index29.mjs +2 -2
- package/index3.js +1 -1
- package/index3.mjs +1 -1
- package/index30.js +1 -1
- package/index31.js +1 -1
- package/index31.mjs +4 -4
- package/index32.js +1 -1
- package/index32.mjs +2 -2
- package/index33.js +1 -1
- package/index33.mjs +88 -65
- package/index34.js +1 -1
- package/index34.mjs +2 -2
- package/index35.js +1 -1
- package/index35.mjs +3 -3
- package/index36.js +1 -1
- package/index36.mjs +1 -1
- package/index37.js +1 -1
- package/index38.js +2 -1
- package/index38.mjs +20 -45
- package/index39.js +1 -2
- package/index39.mjs +5 -26
- package/index4.js +1 -1
- package/index4.mjs +4 -4
- package/index40.js +1 -1
- package/index40.mjs +7 -4
- package/index41.js +1 -1
- package/index41.mjs +5 -5
- package/index42.js +1 -1
- package/index42.mjs +5 -8
- package/index43.js +1 -1
- package/index43.mjs +2 -2
- package/index44.js +1 -1
- package/index44.mjs +1 -1
- package/index45.js +1 -1
- package/index45.mjs +4 -4
- package/index46.js +1 -1
- package/index46.mjs +9 -3
- package/index47.js +1 -1
- package/index47.mjs +9 -7
- package/index48.js +1 -1
- package/index48.mjs +9 -9
- package/index49.js +1 -1
- package/index49.mjs +46 -13
- package/index50.js +1 -1
- package/index50.mjs +8 -46
- package/index51.js +1 -1
- package/index51.mjs +69 -6
- package/index52.js +1 -1
- package/index52.mjs +8 -71
- package/index53.js +1 -1
- package/index53.mjs +12 -7
- package/index54.js +1 -1
- package/index54.mjs +9 -12
- package/index55.js +1 -1
- package/index55.mjs +17 -10
- package/index56.js +1 -1
- package/index56.mjs +13 -17
- package/index57.js +1 -1
- package/index57.mjs +5 -5
- package/index58.js +1 -1
- package/index58.mjs +6 -6
- package/index59.js +1 -1
- package/index59.mjs +8 -10
- package/index6.js +1 -1
- package/index6.mjs +1 -1
- package/index60.js +1 -1
- package/index60.mjs +5 -5
- package/index61.js +1 -1
- package/index61.mjs +8 -6
- package/index62.js +1 -1
- package/index62.mjs +14 -13
- package/index63.js +2 -1
- package/index63.mjs +23 -14
- package/index64.js +1 -1
- package/index64.mjs +15 -21
- package/index65.js +1 -1
- package/index65.mjs +14 -16
- package/index66.js +1 -1
- package/index66.mjs +40 -13
- package/index67.js +1 -1
- package/index67.mjs +36 -39
- package/index68.js +1 -1
- package/index68.mjs +11 -37
- package/index69.js +1 -1
- package/index69.mjs +10 -11
- package/index7.js +1 -1
- package/index7.mjs +1 -1
- package/index70.js +1 -1
- package/index70.mjs +13 -10
- package/index71.js +1 -1
- package/index71.mjs +10 -13
- package/index72.js +1 -2
- package/index72.mjs +2 -12
- package/index73.js +2 -1
- package/index73.mjs +9 -2
- package/index74.js +1 -1
- package/index74.mjs +6 -7
- package/index75.js +1 -1
- package/index75.mjs +6 -6
- package/index76.js +1 -1
- package/index76.mjs +6 -6
- package/index77.js +1 -2
- package/index77.mjs +25 -8
- package/index78.js +1 -1
- package/index78.mjs +2 -25
- package/index79.js +6 -1
- package/index79.mjs +94 -2
- package/index8.js +1 -1
- package/index8.mjs +3 -3
- package/index80.js +1 -6
- package/index80.mjs +54 -79
- package/index81.js +1 -1
- package/index81.mjs +33 -61
- package/index82.js +42 -1
- package/index82.mjs +67 -34
- package/index83.js +1 -42
- package/index83.mjs +154 -65
- package/index84.js +9 -1
- package/index84.mjs +47 -149
- package/index85.js +1 -9
- package/index85.mjs +36 -48
- package/index86.js +1 -1
- package/index86.mjs +8 -40
- package/index87.js +1 -1
- package/index87.mjs +31 -9
- package/index88.js +1 -1
- package/index88.mjs +6 -35
- package/index89.js +12 -1
- package/index89.mjs +40 -6
- package/index9.js +1 -1
- package/index9.mjs +38 -43
- package/index90.js +1 -12
- package/index90.mjs +25 -36
- package/index91.js +1 -1
- package/index91.mjs +8 -24
- package/index92.js +7 -1
- package/index92.mjs +13 -7
- package/index93.js +14 -6
- package/index93.mjs +65 -13
- package/index94.js +1 -15
- package/index94.mjs +7 -71
- package/index95.js +16 -1
- package/index95.mjs +25 -7
- package/index96.js +1 -16
- package/index96.mjs +37 -20
- package/index97.js +1 -1
- package/index97.mjs +43 -40
- package/index98.js +1 -1
- package/index98.mjs +47 -44
- package/index99.js +1 -1
- package/index99.mjs +17 -48
- package/package.json +1 -1
- package/theme/Alerts/index.d.ts +88 -0
- package/theme/Button/index.d.ts +28 -0
- package/theme/Carousel/index.d.ts +36 -0
- package/types/next-link.d.ts +16 -0
- package/components/DirectusImg/index.d.ts +0 -3
- package/components/DirectusImg/interface.d.ts +0 -20
- package/components/Img/index.d.ts +0 -3
- package/components/Img/interface.d.ts +0 -6
- package/index204.js +0 -1
- package/index204.mjs +0 -26
- package/index205.js +0 -1
- package/index205.mjs +0 -29
- package/index206.js +0 -1
- package/index206.mjs +0 -49
- package/index207.js +0 -1
- package/index207.mjs +0 -4
- package/index208.js +0 -1
- package/index208.mjs +0 -23
- package/index209.js +0 -1
- package/index209.mjs +0 -4
- package/index210.js +0 -1
- package/index210.mjs +0 -31
- package/index211.js +0 -1
- package/index211.mjs +0 -4
- package/index212.js +0 -1
- package/index212.mjs +0 -4
- package/index213.js +0 -1
- package/index213.mjs +0 -25
- package/index214.js +0 -1
- package/index214.mjs +0 -4
- package/index215.js +0 -1
- package/index215.mjs +0 -4
- package/index216.js +0 -1
- package/index216.mjs +0 -4
- package/index217.js +0 -1
- package/index217.mjs +0 -40
- package/index218.js +0 -1
- package/index218.mjs +0 -4
- package/index219.js +0 -1
- package/index219.mjs +0 -23
- package/index220.js +0 -1
- package/index220.mjs +0 -25
- package/index221.js +0 -1
- package/index221.mjs +0 -4
- package/index222.js +0 -1
- package/index222.mjs +0 -25
- package/index223.js +0 -1
- package/index223.mjs +0 -4
- package/index224.js +0 -1
- package/index224.mjs +0 -133
- package/index225.js +0 -1
- package/index225.mjs +0 -182
- package/index226.js +0 -1
- package/index226.mjs +0 -12
- package/index227.js +0 -1
- package/index227.mjs +0 -6
- package/index228.js +0 -1
- package/index228.mjs +0 -39
- package/index229.js +0 -1
- package/index229.mjs +0 -8
- package/index230.js +0 -1
- package/index230.mjs +0 -32
- package/index231.js +0 -1
- package/index231.mjs +0 -9
- package/index232.js +0 -1
- package/index232.mjs +0 -316
- package/index233.js +0 -1
- package/index233.mjs +0 -195
- package/index234.js +0 -1
- package/index234.mjs +0 -11
- package/index235.js +0 -1
- package/index235.mjs +0 -29
- package/index236.js +0 -1
- package/index236.mjs +0 -58
- package/index237.js +0 -1
- package/index237.mjs +0 -49
- package/index238.js +0 -1
- package/index238.mjs +0 -127
- package/index239.js +0 -1
- package/index239.mjs +0 -4
- package/index240.js +0 -1
- package/index240.mjs +0 -4
- package/index241.js +0 -1
- package/index241.mjs +0 -4
- package/index242.js +0 -1
- package/index242.mjs +0 -20
- package/index243.js +0 -1
- package/index243.mjs +0 -29
- package/index244.js +0 -1
- package/index244.mjs +0 -4
- package/index245.js +0 -1
- package/index245.mjs +0 -91
- package/index246.js +0 -1
- package/index246.mjs +0 -22
- package/index247.js +0 -1
- package/index247.mjs +0 -4
- package/index248.js +0 -1
- package/index248.mjs +0 -40
- package/index249.js +0 -1
- package/index249.mjs +0 -139
- package/index250.js +0 -1
- package/index250.mjs +0 -4
- package/index251.js +0 -1
- package/index251.mjs +0 -4
- package/index252.js +0 -1
- package/index252.mjs +0 -25
- package/index253.js +0 -1
- package/index253.mjs +0 -4
- package/index254.js +0 -1
- package/index254.mjs +0 -4
- package/index255.js +0 -1
- package/index255.mjs +0 -4
- package/index256.js +0 -1
- package/index256.mjs +0 -25
- package/index257.js +0 -1
- package/index257.mjs +0 -4
- package/index258.js +0 -1
- package/index258.mjs +0 -28
- package/index259.js +0 -1
- package/index259.mjs +0 -4
- package/index260.js +0 -1
- package/index260.mjs +0 -8
- package/index261.js +0 -1
- package/index261.mjs +0 -4
- package/index262.js +0 -1
- package/index262.mjs +0 -4
- package/index263.js +0 -1
- package/index263.mjs +0 -4
- package/index264.js +0 -1
- package/index264.mjs +0 -4
- package/index265.js +0 -1
- package/index265.mjs +0 -74
- package/index266.js +0 -1
- package/index266.mjs +0 -4
- package/index267.js +0 -1
- package/index267.mjs +0 -4
- package/index268.js +0 -1
- package/index268.mjs +0 -21
- package/index269.js +0 -1
- package/index269.mjs +0 -4
- package/index270.js +0 -1
- package/index270.mjs +0 -4
- package/index271.js +0 -1
- package/index271.mjs +0 -4
- package/index272.js +0 -1
- package/index272.mjs +0 -31
- package/index273.js +0 -1
- package/index273.mjs +0 -9
- package/index274.js +0 -1
- package/index274.mjs +0 -10
- package/index275.js +0 -1
- package/index275.mjs +0 -10
- package/index276.js +0 -1
- package/index276.mjs +0 -4
- package/index277.js +0 -1
- package/index277.mjs +0 -39
- package/index278.js +0 -1
- package/index278.mjs +0 -4
- package/index279.js +0 -1
- package/index279.mjs +0 -7
- package/index280.js +0 -1
- package/index280.mjs +0 -8
- package/index281.js +0 -1
- package/index281.mjs +0 -12
- package/index282.js +0 -1
- package/index282.mjs +0 -4
- package/index283.js +0 -1
- package/index283.mjs +0 -20
- package/index284.js +0 -1
- package/index284.mjs +0 -33
- package/index285.js +0 -1
- package/index285.mjs +0 -4
- package/index286.js +0 -1
- package/index286.mjs +0 -4
package/index137.mjs
CHANGED
|
@@ -1,249 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
import { __require as ye } from "./index169.mjs";
|
|
14
|
-
import { __require as Ee } from "./index170.mjs";
|
|
15
|
-
import { __require as be } from "./index171.mjs";
|
|
16
|
-
import { __exports as Pe } from "./index172.mjs";
|
|
17
|
-
(function(z, p) {
|
|
18
|
-
"use client";
|
|
19
|
-
Object.defineProperty(p, "__esModule", {
|
|
20
|
-
value: !0
|
|
21
|
-
}), Object.defineProperty(p, "default", {
|
|
22
|
-
enumerable: !0,
|
|
23
|
-
get: function() {
|
|
24
|
-
return se;
|
|
25
|
-
}
|
|
26
|
-
});
|
|
27
|
-
const J = Pe, D = ue, a = /* @__PURE__ */ J._(fe), O = de(), U = pe(), Q = he(), X = me(), Y = _e(), Z = ve(), ee = we(), te = ge(), re = ye(), oe = Ee(), A = be(), S = /* @__PURE__ */ new Set();
|
|
28
|
-
function j(o, r, u, n, s, f) {
|
|
29
|
-
if (typeof window > "u" || !f && !(0, U.isLocalURL)(r))
|
|
30
|
-
return;
|
|
31
|
-
if (!n.bypassPrefetchedCheck) {
|
|
32
|
-
const g = (
|
|
33
|
-
// Let the link's locale prop override the default router locale.
|
|
34
|
-
typeof n.locale < "u" ? n.locale : "locale" in o ? o.locale : void 0
|
|
35
|
-
), y = r + "%" + u + "%" + g;
|
|
36
|
-
if (S.has(y))
|
|
37
|
-
return;
|
|
38
|
-
S.add(y);
|
|
39
|
-
}
|
|
40
|
-
const E = f ? o.prefetch(r, s) : o.prefetch(r, u, n);
|
|
41
|
-
Promise.resolve(E).catch((g) => {
|
|
42
|
-
if (process.env.NODE_ENV !== "production")
|
|
43
|
-
throw g;
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
function ne(o) {
|
|
47
|
-
const u = o.currentTarget.getAttribute("target");
|
|
48
|
-
return u && u !== "_self" || o.metaKey || o.ctrlKey || o.shiftKey || o.altKey || // triggers resource download
|
|
49
|
-
o.nativeEvent && o.nativeEvent.which === 2;
|
|
50
|
-
}
|
|
51
|
-
function ie(o, r, u, n, s, f, E, g, y) {
|
|
52
|
-
const { nodeName: R } = o.currentTarget;
|
|
53
|
-
if (R.toUpperCase() === "A" && (ne(o) || // app-router supports external urls out of the box so it shouldn't short-circuit here as support for e.g. `replace` is added in the app-router.
|
|
54
|
-
!y && !(0, U.isLocalURL)(u)))
|
|
55
|
-
return;
|
|
56
|
-
o.preventDefault();
|
|
57
|
-
const C = () => {
|
|
58
|
-
const h = E ?? !0;
|
|
59
|
-
"beforePopState" in r ? r[s ? "replace" : "push"](u, n, {
|
|
60
|
-
shallow: f,
|
|
61
|
-
locale: g,
|
|
62
|
-
scroll: h
|
|
63
|
-
}) : r[s ? "replace" : "push"](n || u, {
|
|
64
|
-
scroll: h
|
|
65
|
-
});
|
|
1
|
+
import { useState as C, useRef as $, useEffect as S, useCallback as V } from "react";
|
|
2
|
+
function w(o, d, c) {
|
|
3
|
+
let [p, s] = C(o || d), u = $(o !== void 0), e = o !== void 0;
|
|
4
|
+
S(() => {
|
|
5
|
+
let t = u.current;
|
|
6
|
+
t !== e && console.warn(`WARN: A component changed from ${t ? "controlled" : "uncontrolled"} to ${e ? "controlled" : "uncontrolled"}.`), u.current = e;
|
|
7
|
+
}, [
|
|
8
|
+
e
|
|
9
|
+
]);
|
|
10
|
+
let n = e ? o : p, b = V((t, ...i) => {
|
|
11
|
+
let f = (r, ...l) => {
|
|
12
|
+
c && (Object.is(n, r) || c(r, ...l)), e || (n = r);
|
|
66
13
|
};
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return new Error("Failed prop type: The prop `" + t.key + "` expects a " + t.expected + " in `<Link>`, but got `" + t.actual + "` instead." + (typeof window < "u" ? `
|
|
82
|
-
Open your browser's console to view the Component stack trace.` : ""));
|
|
83
|
-
};
|
|
84
|
-
Object.keys({
|
|
85
|
-
href: !0
|
|
86
|
-
}).forEach((t) => {
|
|
87
|
-
if (t === "href" && (r[t] == null || typeof r[t] != "string" && typeof r[t] != "object"))
|
|
88
|
-
throw e({
|
|
89
|
-
key: t,
|
|
90
|
-
expected: "`string` or `object`",
|
|
91
|
-
actual: r[t] === null ? "null" : typeof r[t]
|
|
92
|
-
});
|
|
93
|
-
}), Object.keys({
|
|
94
|
-
as: !0,
|
|
95
|
-
replace: !0,
|
|
96
|
-
scroll: !0,
|
|
97
|
-
shallow: !0,
|
|
98
|
-
passHref: !0,
|
|
99
|
-
prefetch: !0,
|
|
100
|
-
locale: !0,
|
|
101
|
-
onClick: !0,
|
|
102
|
-
onMouseEnter: !0,
|
|
103
|
-
onTouchStart: !0,
|
|
104
|
-
legacyBehavior: !0
|
|
105
|
-
}).forEach((t) => {
|
|
106
|
-
const w = typeof r[t];
|
|
107
|
-
if (t === "as") {
|
|
108
|
-
if (r[t] && w !== "string" && w !== "object")
|
|
109
|
-
throw e({
|
|
110
|
-
key: t,
|
|
111
|
-
expected: "`string` or `object`",
|
|
112
|
-
actual: w
|
|
113
|
-
});
|
|
114
|
-
} else if (t === "locale") {
|
|
115
|
-
if (r[t] && w !== "string")
|
|
116
|
-
throw e({
|
|
117
|
-
key: t,
|
|
118
|
-
expected: "`string`",
|
|
119
|
-
actual: w
|
|
120
|
-
});
|
|
121
|
-
} else if (t === "onClick" || t === "onMouseEnter" || t === "onTouchStart") {
|
|
122
|
-
if (r[t] && w !== "function")
|
|
123
|
-
throw e({
|
|
124
|
-
key: t,
|
|
125
|
-
expected: "`function`",
|
|
126
|
-
actual: w
|
|
127
|
-
});
|
|
128
|
-
} else if ((t === "replace" || t === "scroll" || t === "shallow" || t === "passHref" || t === "prefetch" || t === "legacyBehavior") && r[t] != null && w !== "boolean")
|
|
129
|
-
throw e({
|
|
130
|
-
key: t,
|
|
131
|
-
expected: "`boolean`",
|
|
132
|
-
actual: w
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
const $ = a.default.useRef(!1);
|
|
136
|
-
r.prefetch && !$.current && !_ && ($.current = !0, console.warn("Next.js auto-prefetches automatically based on viewport. The prefetch attribute is no longer needed. More: https://nextjs.org/docs/messages/prefetch-true-deprecated"));
|
|
137
|
-
}
|
|
138
|
-
if (process.env.NODE_ENV !== "production" && _ && !f) {
|
|
139
|
-
let e;
|
|
140
|
-
if (typeof s == "string" ? e = s : typeof s == "object" && typeof s.pathname == "string" && (e = s.pathname), e && e.split("/").some((P) => P.startsWith("[") && P.endsWith("]")))
|
|
141
|
-
throw new Error("Dynamic href `" + e + "` found in <Link> while using the `/app` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href");
|
|
142
|
-
}
|
|
143
|
-
const { href: v, as: l } = a.default.useMemo(() => {
|
|
144
|
-
if (!i) {
|
|
145
|
-
const P = V(s);
|
|
146
|
-
return {
|
|
147
|
-
href: P,
|
|
148
|
-
as: f ? V(f) : P
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
const [e, q] = (0, O.resolveHref)(i, s, !0);
|
|
152
|
-
return {
|
|
153
|
-
href: e,
|
|
154
|
-
as: f ? (0, O.resolveHref)(i, f) : q || e
|
|
155
|
-
};
|
|
156
|
-
}, [
|
|
157
|
-
i,
|
|
158
|
-
s,
|
|
159
|
-
f
|
|
160
|
-
]), K = a.default.useRef(v), G = a.default.useRef(l);
|
|
161
|
-
let c;
|
|
162
|
-
if (d)
|
|
163
|
-
if (process.env.NODE_ENV === "development") {
|
|
164
|
-
T && console.warn('"onClick" was passed to <Link> with `href` of `' + s + '` but "legacyBehavior" was set. The legacy behavior requires onClick be set on the child of next/link'), k && console.warn('"onMouseEnter" was passed to <Link> with `href` of `' + s + '` but "legacyBehavior" was set. The legacy behavior requires onMouseEnter be set on the child of next/link');
|
|
165
|
-
try {
|
|
166
|
-
c = a.default.Children.only(n);
|
|
167
|
-
} catch {
|
|
168
|
-
throw n ? new Error("Multiple children were passed to <Link> with `href` of `" + s + "` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children" + (typeof window < "u" ? `
|
|
169
|
-
Open your browser's console to view the Component stack trace.` : "")) : new Error("No children were passed to <Link> with `href` of `" + s + "` but one child is required https://nextjs.org/docs/messages/link-no-children");
|
|
170
|
-
}
|
|
171
|
-
} else
|
|
172
|
-
c = a.default.Children.only(n);
|
|
173
|
-
else if (process.env.NODE_ENV === "development" && (n == null ? void 0 : n.type) === "a")
|
|
174
|
-
throw new Error(`Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.
|
|
175
|
-
Learn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor`);
|
|
176
|
-
const b = d ? c && typeof c == "object" && c.ref : u, [I, F, W] = (0, te.useIntersection)({
|
|
177
|
-
rootMargin: "200px"
|
|
178
|
-
}), le = a.default.useCallback((e) => {
|
|
179
|
-
(G.current !== l || K.current !== v) && (W(), G.current = l, K.current = v), I(e), b && (typeof b == "function" ? b(e) : typeof b == "object" && (b.current = e));
|
|
180
|
-
}, [
|
|
181
|
-
l,
|
|
182
|
-
b,
|
|
183
|
-
v,
|
|
184
|
-
W,
|
|
185
|
-
I
|
|
186
|
-
]);
|
|
187
|
-
a.default.useEffect(() => {
|
|
188
|
-
process.env.NODE_ENV === "production" && m && (!F || !L || j(m, v, l, {
|
|
189
|
-
locale: h
|
|
190
|
-
}, {
|
|
191
|
-
kind: x
|
|
192
|
-
}, _));
|
|
193
|
-
}, [
|
|
194
|
-
l,
|
|
195
|
-
v,
|
|
196
|
-
F,
|
|
197
|
-
h,
|
|
198
|
-
L,
|
|
199
|
-
i == null ? void 0 : i.locale,
|
|
200
|
-
m,
|
|
201
|
-
_,
|
|
202
|
-
x
|
|
203
|
-
]);
|
|
204
|
-
const N = {
|
|
205
|
-
ref: le,
|
|
206
|
-
onClick(e) {
|
|
207
|
-
if (process.env.NODE_ENV !== "production" && !e)
|
|
208
|
-
throw new Error('Component rendered inside next/link has to pass click event to "onClick" prop.');
|
|
209
|
-
!d && typeof T == "function" && T(e), d && c.props && typeof c.props.onClick == "function" && c.props.onClick(e), m && (e.defaultPrevented || ie(e, m, v, l, R, H, C, h, _));
|
|
210
|
-
},
|
|
211
|
-
onMouseEnter(e) {
|
|
212
|
-
!d && typeof k == "function" && k(e), d && c.props && typeof c.props.onMouseEnter == "function" && c.props.onMouseEnter(e), m && ((!L || process.env.NODE_ENV === "development") && _ || j(m, v, l, {
|
|
213
|
-
locale: h,
|
|
214
|
-
priority: !0,
|
|
215
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
216
|
-
bypassPrefetchedCheck: !0
|
|
217
|
-
}, {
|
|
218
|
-
kind: x
|
|
219
|
-
}, _));
|
|
220
|
-
},
|
|
221
|
-
onTouchStart(e) {
|
|
222
|
-
!d && typeof B == "function" && B(e), d && c.props && typeof c.props.onTouchStart == "function" && c.props.onTouchStart(e), m && (!L && _ || j(m, v, l, {
|
|
223
|
-
locale: h,
|
|
224
|
-
priority: !0,
|
|
225
|
-
// @see {https://github.com/vercel/next.js/discussions/40268?sort=top#discussioncomment-3572642}
|
|
226
|
-
bypassPrefetchedCheck: !0
|
|
227
|
-
}, {
|
|
228
|
-
kind: x
|
|
229
|
-
}, _));
|
|
230
|
-
}
|
|
231
|
-
};
|
|
232
|
-
if ((0, X.isAbsoluteUrl)(l))
|
|
233
|
-
N.href = l;
|
|
234
|
-
else if (!d || y || c.type === "a" && !("href" in c.props)) {
|
|
235
|
-
const e = typeof h < "u" ? h : i == null ? void 0 : i.locale, q = (i == null ? void 0 : i.isLocaleDomain) && (0, re.getDomainLocale)(l, e, i == null ? void 0 : i.locales, i == null ? void 0 : i.domainLocales);
|
|
236
|
-
N.href = q || (0, oe.addBasePath)((0, Y.addLocale)(l, e, i == null ? void 0 : i.defaultLocale));
|
|
237
|
-
}
|
|
238
|
-
return d ? /* @__PURE__ */ a.default.cloneElement(c, N) : /* @__PURE__ */ (0, D.jsx)("a", {
|
|
239
|
-
...ce,
|
|
240
|
-
...N,
|
|
241
|
-
children: n
|
|
242
|
-
});
|
|
243
|
-
});
|
|
244
|
-
(typeof p.default == "function" || typeof p.default == "object" && p.default !== null) && typeof p.default.__esModule > "u" && (Object.defineProperty(p.default, "__esModule", { value: !0 }), Object.assign(p.default, p), z.exports = p.default);
|
|
245
|
-
})(M, M.exports);
|
|
246
|
-
var Ge = M.exports;
|
|
14
|
+
typeof t == "function" ? (console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"), s((l, ...m) => {
|
|
15
|
+
let a = t(e ? n : l, ...m);
|
|
16
|
+
return f(a, ...i), e ? l : a;
|
|
17
|
+
})) : (e || s(t), f(t, ...i));
|
|
18
|
+
}, [
|
|
19
|
+
e,
|
|
20
|
+
n,
|
|
21
|
+
c
|
|
22
|
+
]);
|
|
23
|
+
return [
|
|
24
|
+
n,
|
|
25
|
+
b
|
|
26
|
+
];
|
|
27
|
+
}
|
|
247
28
|
export {
|
|
248
|
-
|
|
29
|
+
w as useControlledState
|
|
249
30
|
};
|
package/index138.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./index139.js"),l=require("./index130.js"),d=require("./index140.js"),f=require("./index141.js"),u=require("./index142.js"),y=require("./index143.js");function m(s){let t=typeof s[0]=="object"?s.shift():new f.GregorianCalendar,e;if(typeof s[0]=="string")e=s.shift();else{let a=t.getEras();e=a[a.length-1]}let r=s.shift(),n=s.shift(),h=s.shift();return[t,e,r,n,h]}var p=new WeakMap;class c{copy(){return this.era?new c(this.calendar,this.era,this.year,this.month,this.day):new c(this.calendar,this.year,this.month,this.day)}add(t){return i.add(this,t)}subtract(t){return i.subtract(this,t)}set(t){return i.set(this,t)}cycle(t,e,r){return i.cycleDate(this,t,e,r)}toDate(t){return u.toDate(this,t)}toString(){return d.dateToString(this)}compare(t){return l.compareDate(this,t)}constructor(...t){y._class_private_field_init(this,p,{writable:!0,value:void 0});let[e,r,n,h,a]=m(t);this.calendar=e,this.era=r,this.year=n,this.month=h,this.day=a,i.constrain(this)}}var v=new WeakMap;class o{copy(){return this.era?new o(this.calendar,this.era,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond):new o(this.calendar,this.year,this.month,this.day,this.hour,this.minute,this.second,this.millisecond)}add(t){return i.add(this,t)}subtract(t){return i.subtract(this,t)}set(t){return i.set(i.setTime(this,t),t)}cycle(t,e,r){switch(t){case"era":case"year":case"month":case"day":return i.cycleDate(this,t,e,r);default:return i.cycleTime(this,t,e,r)}}toDate(t,e){return u.toDate(this,t,e)}toString(){return d.dateTimeToString(this)}compare(t){let e=l.compareDate(this,t);return e===0?l.compareTime(this,u.toCalendarDateTime(t)):e}constructor(...t){y._class_private_field_init(this,v,{writable:!0,value:void 0});let[e,r,n,h,a]=m(t);this.calendar=e,this.era=r,this.year=n,this.month=h,this.day=a,this.hour=t.shift()||0,this.minute=t.shift()||0,this.second=t.shift()||0,this.millisecond=t.shift()||0,i.constrain(this)}}exports.CalendarDate=c;exports.CalendarDateTime=o;
|
package/index138.mjs
CHANGED
|
@@ -1,64 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
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
|
-
|
|
1
|
+
import { add as n, subtract as o, set as $, cycleDate as f, constrain as l, setTime as b, cycleTime as x } from "./index139.mjs";
|
|
2
|
+
import { compareDate as m, compareTime as v } from "./index130.mjs";
|
|
3
|
+
import { dateToString as w, dateTimeToString as D } from "./index140.mjs";
|
|
4
|
+
import { GregorianCalendar as T } from "./index141.mjs";
|
|
5
|
+
import { toDate as u, toCalendarDateTime as C } from "./index142.mjs";
|
|
6
|
+
import { _class_private_field_init as p } from "./index143.mjs";
|
|
7
|
+
function y(r) {
|
|
8
|
+
let t = typeof r[0] == "object" ? r.shift() : new T(), e;
|
|
9
|
+
if (typeof r[0] == "string") e = r.shift();
|
|
10
|
+
else {
|
|
11
|
+
let s = t.getEras();
|
|
12
|
+
e = s[s.length - 1];
|
|
13
|
+
}
|
|
14
|
+
let a = r.shift(), i = r.shift(), h = r.shift();
|
|
15
|
+
return [
|
|
16
|
+
t,
|
|
17
|
+
e,
|
|
18
|
+
a,
|
|
19
|
+
i,
|
|
20
|
+
h
|
|
21
|
+
];
|
|
22
|
+
}
|
|
23
|
+
var S = /* @__PURE__ */ new WeakMap();
|
|
24
|
+
class d {
|
|
25
|
+
/** Returns a copy of this date. */
|
|
26
|
+
copy() {
|
|
27
|
+
return this.era ? new d(this.calendar, this.era, this.year, this.month, this.day) : new d(this.calendar, this.year, this.month, this.day);
|
|
28
|
+
}
|
|
29
|
+
/** Returns a new `CalendarDate` with the given duration added to it. */
|
|
30
|
+
add(t) {
|
|
31
|
+
return n(this, t);
|
|
32
|
+
}
|
|
33
|
+
/** Returns a new `CalendarDate` with the given duration subtracted from it. */
|
|
34
|
+
subtract(t) {
|
|
35
|
+
return o(this, t);
|
|
36
|
+
}
|
|
37
|
+
/** Returns a new `CalendarDate` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
38
|
+
set(t) {
|
|
39
|
+
return $(this, t);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Returns a new `CalendarDate` with the given field adjusted by a specified amount.
|
|
43
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
44
|
+
*/
|
|
45
|
+
cycle(t, e, a) {
|
|
46
|
+
return f(this, t, e, a);
|
|
47
|
+
}
|
|
48
|
+
/** Converts the date to a native JavaScript Date object, with the time set to midnight in the given time zone. */
|
|
49
|
+
toDate(t) {
|
|
50
|
+
return u(this, t);
|
|
51
|
+
}
|
|
52
|
+
/** Converts the date to an ISO 8601 formatted string. */
|
|
53
|
+
toString() {
|
|
54
|
+
return w(this);
|
|
55
|
+
}
|
|
56
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
57
|
+
compare(t) {
|
|
58
|
+
return m(this, t);
|
|
59
|
+
}
|
|
60
|
+
constructor(...t) {
|
|
61
|
+
p(this, S, {
|
|
62
|
+
writable: !0,
|
|
63
|
+
value: void 0
|
|
64
|
+
});
|
|
65
|
+
let [e, a, i, h, s] = y(t);
|
|
66
|
+
this.calendar = e, this.era = a, this.year = i, this.month = h, this.day = s, l(this);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
var k = /* @__PURE__ */ new WeakMap();
|
|
70
|
+
class c {
|
|
71
|
+
/** Returns a copy of this date. */
|
|
72
|
+
copy() {
|
|
73
|
+
return this.era ? new c(this.calendar, this.era, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond) : new c(this.calendar, this.year, this.month, this.day, this.hour, this.minute, this.second, this.millisecond);
|
|
74
|
+
}
|
|
75
|
+
/** Returns a new `CalendarDateTime` with the given duration added to it. */
|
|
76
|
+
add(t) {
|
|
77
|
+
return n(this, t);
|
|
78
|
+
}
|
|
79
|
+
/** Returns a new `CalendarDateTime` with the given duration subtracted from it. */
|
|
80
|
+
subtract(t) {
|
|
81
|
+
return o(this, t);
|
|
82
|
+
}
|
|
83
|
+
/** Returns a new `CalendarDateTime` with the given fields set to the provided values. Other fields will be constrained accordingly. */
|
|
84
|
+
set(t) {
|
|
85
|
+
return $(b(this, t), t);
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* Returns a new `CalendarDateTime` with the given field adjusted by a specified amount.
|
|
89
|
+
* When the resulting value reaches the limits of the field, it wraps around.
|
|
90
|
+
*/
|
|
91
|
+
cycle(t, e, a) {
|
|
92
|
+
switch (t) {
|
|
93
|
+
case "era":
|
|
94
|
+
case "year":
|
|
95
|
+
case "month":
|
|
96
|
+
case "day":
|
|
97
|
+
return f(this, t, e, a);
|
|
98
|
+
default:
|
|
99
|
+
return x(this, t, e, a);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/** Converts the date to a native JavaScript Date object in the given time zone. */
|
|
103
|
+
toDate(t, e) {
|
|
104
|
+
return u(this, t, e);
|
|
105
|
+
}
|
|
106
|
+
/** Converts the date to an ISO 8601 formatted string. */
|
|
107
|
+
toString() {
|
|
108
|
+
return D(this);
|
|
109
|
+
}
|
|
110
|
+
/** Compares this date with another. A negative result indicates that this date is before the given one, and a positive date indicates that it is after. */
|
|
111
|
+
compare(t) {
|
|
112
|
+
let e = m(this, t);
|
|
113
|
+
return e === 0 ? v(this, C(t)) : e;
|
|
114
|
+
}
|
|
115
|
+
constructor(...t) {
|
|
116
|
+
p(this, k, {
|
|
117
|
+
writable: !0,
|
|
118
|
+
value: void 0
|
|
119
|
+
});
|
|
120
|
+
let [e, a, i, h, s] = y(t);
|
|
121
|
+
this.calendar = e, this.era = a, this.year = i, this.month = h, this.day = s, this.hour = t.shift() || 0, this.minute = t.shift() || 0, this.second = t.shift() || 0, this.millisecond = t.shift() || 0, l(this);
|
|
122
|
+
}
|
|
61
123
|
}
|
|
62
124
|
export {
|
|
63
|
-
|
|
125
|
+
d as CalendarDate,
|
|
126
|
+
c as CalendarDateTime
|
|
64
127
|
};
|
package/index139.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function $(n,e){let r=n.copy(),a="hour"in r?Y(r,e):0;f(r,e.years||0),r.calendar.balanceYearMonth&&r.calendar.balanceYearMonth(r,n),r.month+=e.months||0,s(r),M(r),r.day+=(e.weeks||0)*7,r.day+=e.days||0,r.day+=a,b(r),r.calendar.balanceDate&&r.calendar.balanceDate(r),r.year<1&&(r.year=1,r.month=1,r.day=1);let c=r.calendar.getYearsInEra(r);if(r.year>c){var d,h;let o=(d=(h=r.calendar).isInverseEra)===null||d===void 0?void 0:d.call(h,r);r.year=c,r.month=o?1:r.calendar.getMonthsInYear(r),r.day=o?1:r.calendar.getDaysInMonth(r)}r.month<1&&(r.month=1,r.day=1);let l=r.calendar.getMonthsInYear(r);return r.month>l&&(r.month=l,r.day=r.calendar.getDaysInMonth(r)),r.day=Math.max(1,Math.min(r.calendar.getDaysInMonth(r),r.day)),r}function f(n,e){var r,a;!((r=(a=n.calendar).isInverseEra)===null||r===void 0)&&r.call(a,n)&&(e=-e),n.year+=e}function s(n){for(;n.month<1;)f(n,-1),n.month+=n.calendar.getMonthsInYear(n);let e=0;for(;n.month>(e=n.calendar.getMonthsInYear(n));)n.month-=e,f(n,1)}function b(n){for(;n.day<1;)n.month--,s(n),n.day+=n.calendar.getDaysInMonth(n);for(;n.day>n.calendar.getDaysInMonth(n);)n.day-=n.calendar.getDaysInMonth(n),n.month++,s(n)}function M(n){n.month=Math.max(1,Math.min(n.calendar.getMonthsInYear(n),n.month)),n.day=Math.max(1,Math.min(n.calendar.getDaysInMonth(n),n.day))}function y(n){n.calendar.constrainDate&&n.calendar.constrainDate(n),n.year=Math.max(1,Math.min(n.calendar.getYearsInEra(n),n.year)),M(n)}function u(n){let e={};for(let r in n)typeof n[r]=="number"&&(e[r]=-n[r]);return e}function g(n,e){return $(n,u(e))}function I(n,e){let r=n.copy();return e.era!=null&&(r.era=e.era),e.year!=null&&(r.year=e.year),e.month!=null&&(r.month=e.month),e.day!=null&&(r.day=e.day),y(r),r}function x(n,e){let r=n.copy();return e.hour!=null&&(r.hour=e.hour),e.minute!=null&&(r.minute=e.minute),e.second!=null&&(r.second=e.second),e.millisecond!=null&&(r.millisecond=e.millisecond),m(r),r}function D(n){n.second+=Math.floor(n.millisecond/1e3),n.millisecond=i(n.millisecond,1e3),n.minute+=Math.floor(n.second/60),n.second=i(n.second,60),n.hour+=Math.floor(n.minute/60),n.minute=i(n.minute,60);let e=Math.floor(n.hour/24);return n.hour=i(n.hour,24),e}function m(n){n.millisecond=Math.max(0,Math.min(n.millisecond,1e3)),n.second=Math.max(0,Math.min(n.second,59)),n.minute=Math.max(0,Math.min(n.minute,59)),n.hour=Math.max(0,Math.min(n.hour,23))}function i(n,e){let r=n%e;return r<0&&(r+=e),r}function Y(n,e){return n.hour+=e.hours||0,n.minute+=e.minutes||0,n.second+=e.seconds||0,n.millisecond+=e.milliseconds||0,D(n)}function w(n,e,r,a){let c=n.copy();switch(e){case"era":{let l=n.calendar.getEras(),o=l.indexOf(n.era);if(o<0)throw new Error("Invalid era: "+n.era);o=t(o,r,0,l.length-1,a==null?void 0:a.round),c.era=l[o],y(c);break}case"year":var d,h;!((d=(h=c.calendar).isInverseEra)===null||d===void 0)&&d.call(h,c)&&(r=-r),c.year=t(n.year,r,-1/0,9999,a==null?void 0:a.round),c.year===-1/0&&(c.year=1),c.calendar.balanceYearMonth&&c.calendar.balanceYearMonth(c,n);break;case"month":c.month=t(n.month,r,1,n.calendar.getMonthsInYear(n),a==null?void 0:a.round);break;case"day":c.day=t(n.day,r,1,n.calendar.getDaysInMonth(n),a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return n.calendar.balanceDate&&n.calendar.balanceDate(c),y(c),c}function k(n,e,r,a){let c=n.copy();switch(e){case"hour":{let d=n.hour,h=0,l=23;if((a==null?void 0:a.hourCycle)===12){let o=d>=12;h=o?12:0,l=o?23:11}c.hour=t(d,r,h,l,a==null?void 0:a.round);break}case"minute":c.minute=t(n.minute,r,0,59,a==null?void 0:a.round);break;case"second":c.second=t(n.second,r,0,59,a==null?void 0:a.round);break;case"millisecond":c.millisecond=t(n.millisecond,r,0,999,a==null?void 0:a.round);break;default:throw new Error("Unsupported field "+e)}return c}function t(n,e,r,a,c=!1){if(c){n+=Math.sign(e),n<r&&(n=a);let d=Math.abs(e);e>0?n=Math.ceil(n/d)*d:n=Math.floor(n/d)*d,n>a&&(n=r)}else n+=e,n<r?n=a-(r-n-1):n>a&&(n=r+(n-a-1));return n}exports.add=$;exports.constrain=y;exports.constrainTime=m;exports.cycleDate=w;exports.cycleTime=k;exports.invertDuration=u;exports.set=I;exports.setTime=x;exports.subtract=g;
|