@cntrl-site/components 1.0.104 → 1.0.106
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/ClickGallerie-CYQMgrIr.js +36 -0
- package/dist/ClickGallerie-o2U6oyOF.mjs +272 -0
- package/dist/Components/ClickGallerie/ClickGallerie.d.ts +2 -1
- package/dist/Components/Helix/Helix.d.ts +4 -1
- package/dist/Components/Hive/Hive.d.ts +4 -1
- package/dist/Components/ImageRevealSlider/ImageRevealSlider.d.ts +2 -1
- package/dist/Components/List/List.d.ts +6 -2
- package/dist/Components/Marquee/Marquee.d.ts +6 -2
- package/dist/Components/MarqueeText/MarqueeText.d.ts +2 -1
- package/dist/Components/Mercury/Mercury.d.ts +4 -1
- package/dist/Components/Waterfall/WaterfallLightbox.d.ts +4 -1
- package/dist/Components/utils/EmbedMediaFrame.d.ts +27 -0
- package/dist/Components/utils/LinkWrapper.d.ts +16 -0
- package/dist/Components/utils/embedMedia.d.ts +40 -0
- package/dist/Components/utils/index.d.ts +6 -0
- package/dist/Components/utils/observeIntersection.d.ts +4 -0
- package/dist/Components/utils/useLazyVideos.d.ts +0 -3
- package/dist/{ControlSlider-SiOt22l_.js → ControlSlider-Kkec-i14.js} +1 -1
- package/dist/{ControlSlider-pZv7H6BU.mjs → ControlSlider-LcZmviGX.mjs} +1 -1
- package/dist/EmbedMediaFrame-DsOTKE4i.js +1 -0
- package/dist/EmbedMediaFrame-DwHeOAy5.mjs +164 -0
- package/dist/{FAQ-C7823fyi.js → FAQ-BxhMo7T8.js} +1 -1
- package/dist/{FAQ-CZ39u4m8.mjs → FAQ-CdwSft5p.mjs} +1 -1
- package/dist/Grid-CFHTP3mb.js +378 -0
- package/dist/Grid-e-gLfsji.mjs +1590 -0
- package/dist/Helix-BpLo9FD3.js +43 -0
- package/dist/Helix-CidI3ucE.mjs +324 -0
- package/dist/{Hive-BusARSOi.mjs → Hive-BsmFHk2i.mjs} +505 -475
- package/dist/Hive-D1j6wZpV.js +321 -0
- package/dist/ImageRevealSlider-BuukTGAK.js +1 -0
- package/dist/{ImageRevealSlider-BdFGyVEP.mjs → ImageRevealSlider-Df9sygk9.mjs} +63 -70
- package/dist/{LazyVideo-D8eVYFyw.mjs → LazyVideo-CdAWymKO.mjs} +1 -1
- package/dist/{LazyVideo-Cn_vmMq8.js → LazyVideo-imbU18js.js} +1 -1
- package/dist/{Lightbox-eP9qAZzL.mjs → Lightbox-C_fXsfdz.mjs} +1 -1
- package/dist/{Lightbox-CIss_nOG.js → Lightbox-DaunVrkp.js} +1 -1
- package/dist/LinkWrapper-Ca84iPtg.js +1 -0
- package/dist/LinkWrapper-DZs9hlOn.mjs +13 -0
- package/dist/{List-DW7fyJbf.mjs → List-Bh_-l9vD.mjs} +532 -520
- package/dist/List-DVvpQ24J.js +377 -0
- package/dist/Marquee-DByooiWP.mjs +578 -0
- package/dist/Marquee-DfIP-tIN.js +133 -0
- package/dist/MarqueeText-D6FNCe6P.mjs +518 -0
- package/dist/MarqueeText-DsUiV6Zv.js +132 -0
- package/dist/Mercury-B-s2Kvuq.js +267 -0
- package/dist/Mercury-CCW0Es-s.mjs +1700 -0
- package/dist/PretextComponent-Dnbenstn.js +1 -0
- package/dist/{PretextComponent-s4DDfmzY.mjs → PretextComponent-OygSO3fr.mjs} +312 -269
- package/dist/{RichTextRenderer-B6WtTYlR.mjs → RichTextRenderer-BptwNpbJ.mjs} +10 -9
- package/dist/RichTextRenderer-K90Dd7pt.js +1 -0
- package/dist/{Slider20-Dm8BeCli.mjs → Slider20-CCzixTiN.mjs} +1 -1
- package/dist/{Slider20-C9o2REDl.js → Slider20-fMVeRfgx.js} +1 -1
- package/dist/{TestimonialGrid-CPu4qQ6B.mjs → TestimonialGrid-CbsVxSn9.mjs} +1 -1
- package/dist/{TestimonialGrid-D4ieiz9e.js → TestimonialGrid-CiCagfBU.js} +1 -1
- package/dist/{TestimonialSingle-DLdnAVF7.mjs → TestimonialSingle-BVm3Amrl.mjs} +1 -1
- package/dist/{TestimonialSingle-CVu15ZtV.js → TestimonialSingle-BWXynGjv.js} +1 -1
- package/dist/Waterfall-3kKioKh2.mjs +1432 -0
- package/dist/Waterfall-DII4-WV5.js +288 -0
- package/dist/{components-Yf9Zjska.mjs → components-BRmbflgg.mjs} +15 -15
- package/dist/components-nvbH4l0S.js +1 -0
- package/dist/content/postFieldBindings.d.ts +29 -0
- package/dist/elements.js +1 -1
- package/dist/elements.mjs +16 -16
- package/dist/elements.node.js +1 -1
- package/dist/elements.node.mjs +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +52 -15
- package/dist/observeIntersection-B0f3L2iK.mjs +23 -0
- package/dist/observeIntersection-DxGj9Ctt.js +1 -0
- package/dist/sources.js +335 -223
- package/dist/sources.mjs +339 -227
- package/dist/types/SchemaV1.d.ts +53 -1
- package/dist/useLazyVideos-CdCbc2j0.js +1 -0
- package/dist/useLazyVideos-CxXyEjRQ.mjs +52 -0
- package/dist/utils.js +1 -1
- package/dist/utils.mjs +30 -20
- package/package.json +1 -1
- package/dist/ClickGallerie-D7g093HX.js +0 -36
- package/dist/ClickGallerie-QSOQjSdv.mjs +0 -271
- package/dist/Grid-B2_o1dvz.mjs +0 -1576
- package/dist/Grid-Bq6bk2AQ.js +0 -374
- package/dist/Helix-B7rxlvKq.js +0 -43
- package/dist/Helix-BrKQzGX5.mjs +0 -315
- package/dist/Hive-Dh5nKPGm.js +0 -321
- package/dist/ImageRevealSlider-BBWtFjUF.js +0 -1
- package/dist/List-C32WImI3.js +0 -377
- package/dist/Marquee-CdtAqhQE.mjs +0 -563
- package/dist/Marquee-DUN8wUax.js +0 -133
- package/dist/MarqueeText-4Rip_sQX.mjs +0 -515
- package/dist/MarqueeText-E6OubMOG.js +0 -132
- package/dist/Mercury-BRqlbk4i.mjs +0 -1702
- package/dist/Mercury-C-O2VGkK.js +0 -267
- package/dist/PretextComponent-D5P0AjnL.js +0 -1
- package/dist/RichTextRenderer-CIy6yI8U.js +0 -1
- package/dist/Waterfall-DKuh4bnv.mjs +0 -1404
- package/dist/Waterfall-fdiHR0Rc.js +0 -287
- package/dist/components-DzNixU7Q.js +0 -1
- package/dist/useLazyVideos-BbgdvELi.js +0 -1
- package/dist/useLazyVideos-CZLyNolX.mjs +0 -72
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),u=require("react"),Oo=require("react-dom"),P=require("./scalingValue-CSHYgTZl.js"),Fo=require("./buildColorVars-CE2D5cQV.js"),No=require("./useScopedStyles-Bf6yohVQ.js"),ie=require("./EmbedMediaFrame-DsOTKE4i.js"),Se=require("./textStylesToCss-CNN3zZTV.js");function Ho(t){if(ie.isEmbedMedia(t))return!1;if(t.type==="video")return!0;if(t.type==="image")return!1;const e=t.name??"";return/\.(mp4|webm|ogg|mov)(\?|$)/i.test(e)?!0:/\.(mp4|webm|ogg|mov)(\?|$)/i.test(t.assetId)}function Vo({media:t,className:e,style:o}){const n=u.useRef(null);return u.useEffect(()=>{if(!t.isVideo)return;const r=n.current;if(!r)return;const a=r.play();a&&a.catch(()=>{})},[t.isVideo,t.assetId]),t.embed?f.jsx(ie.EmbedMediaFrame,{media:t.embed,startsAtOnce:!0,fit:"contain",className:e,style:o}):t.isVideo?f.jsx("video",{ref:n,className:e,src:t.assetId,style:o,muted:!0,loop:!0,autoPlay:!0,playsInline:!0,preload:"auto"}):f.jsx("img",{className:e,src:t.assetId,alt:"",style:o})}function te(t){return`calc(var(--cntrl-article-width, 100vw) * ${t/1440})`}function jo(t){return String(t??"").trim().length>0}function Me(t,e){const o=t.currentTarget,n=o.getBoundingClientRect(),r=t.clientY-n.top>n.height/2;o.classList.toggle(`${e}-reveal-from-bottom`,r)}function _e(t,e){const o=t.currentTarget,n=o.getBoundingClientRect(),r=t.clientY<n.top+n.height/2;o.classList.toggle(`${e}-reveal-from-bottom`,r)}function Oe(t,e,o,n,r,a,s){const h=P.scalingValue(a,s),p=P.scalingValue(0,s),i=t===0,$=t===e-1&&!r;return{borderTopWidth:i&&o?h:p,borderBottomWidth:!$||n?h:p}}function Do(t,e,o){const n=P.scalingValue(e,o),r=P.scalingValue(0,o);return{borderTopWidth:r,borderBottomWidth:t?n:r}}const Fe=10,Ne=10,bt={positionEase:.14,rotationEase:.09,rotationFactor:2.5,maxRotation:20};function Io(t,e,o){return Math.max(e,Math.min(o,t))}function ee(t,e,o){return t+(e-t)*o}function Ko(t,e,o,n){if(!e)return{x:0,y:0};const r=e.getBoundingClientRect(),a=r.top+r.height/2;if(t==="cursor"&&o)return{x:o.clientX+Fe,y:o.clientY+Fe};switch(t){case"left":return{x:r.left+Ne+n/2,y:a};case"center":return{x:r.left+r.width/2,y:a};case"right":return{x:r.right-Ne-n/2,y:a};default:return{x:r.left+r.width/2,y:a}}}function Xo(t,e){const o=u.useRef(null),n=u.useRef({x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1}),r=u.useRef(null),a=u.useCallback(()=>{const c=o.current,R=n.current;c&&(c.style.transform=`translate3d(${R.x}px, ${R.y}px, 0) translate(-50%, -50%) rotate(${R.rotation.toFixed(3)}deg)`)},[]),s=u.useCallback(()=>{r.current!==null&&(cancelAnimationFrame(r.current),r.current=null)},[]),h=u.useCallback(()=>{const c=n.current;e?(c.x=ee(c.x,c.targetX,bt.positionEase),c.y=ee(c.y,c.targetY,bt.positionEase),c.rotation=ee(c.rotation,c.targetRotation,bt.rotationEase)):(c.x=c.targetX,c.y=c.targetY,c.rotation=c.targetRotation),a();const R=Math.abs(c.x-c.targetX)<.4&&Math.abs(c.y-c.targetY)<.4,y=Math.abs(c.rotation-c.targetRotation)<.08;!R||!y?r.current=requestAnimationFrame(h):r.current=null},[a,e]),p=u.useCallback(()=>{r.current===null&&(r.current=requestAnimationFrame(h))},[h]),i=u.useCallback((c,R)=>{const y=n.current;y.targetX=c,y.targetY=R,y.targetRotation=0,y.x=c,y.y=R,y.rotation=0,y.lastX=c,y.hasLastX=!0,a(),e&&p()},[a,e,p]),$=u.useCallback((c,R)=>{if(!t)return;const y=n.current;if(e&&y.hasLastX){const j=c-y.lastX;y.targetRotation=Io(j*bt.rotationFactor,-20,bt.maxRotation)}else y.targetRotation=0;if(y.lastX=c,y.hasLastX=!0,y.targetX=c,y.targetY=R,e){p();return}y.x=c,y.y=R,y.rotation=y.targetRotation,a()},[t,a,e,p]),T=u.useCallback(c=>{s(),n.current.hasLastX=!1,c==null||c()},[s]),_=u.useCallback(()=>{s(),n.current={x:0,y:0,rotation:0,targetX:0,targetY:0,targetRotation:0,lastX:0,hasLastX:!1},o.current&&(o.current.style.transform="")},[s]);return u.useEffect(()=>(t||_(),s),[t,_,s]),{anchorRef:o,onShow:i,onCursorMove:$,exit:T,reset:_}}function Uo(t){return`
|
|
2
|
+
.${t}-wrapper {
|
|
3
|
+
display: grid;
|
|
4
|
+
align-items: start;
|
|
5
|
+
min-height: ${te(48)};
|
|
6
|
+
position: relative;
|
|
7
|
+
overflow: visible;
|
|
8
|
+
box-sizing: border-box;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.${t}-hover-media-anchor {
|
|
12
|
+
position: fixed;
|
|
13
|
+
left: 0;
|
|
14
|
+
top: 0;
|
|
15
|
+
z-index: 9997;
|
|
16
|
+
pointer-events: none;
|
|
17
|
+
will-change: transform;
|
|
18
|
+
transform-origin: center center;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.${t}-hover-image,
|
|
22
|
+
.${t}-hover-video {
|
|
23
|
+
position: relative;
|
|
24
|
+
display: block;
|
|
25
|
+
pointer-events: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.${t}-list-item {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column;
|
|
31
|
+
align-items: stretch;
|
|
32
|
+
width: 100%;
|
|
33
|
+
overflow: visible;
|
|
34
|
+
position: relative;
|
|
35
|
+
box-sizing: content-box;
|
|
36
|
+
user-select: none;
|
|
37
|
+
background: var(--${t}-background-color);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.${t}-wrapper.${t}-divider-top .${t}-list-item {
|
|
41
|
+
border-top-style: solid;
|
|
42
|
+
border-top-color: var(--${t}-divider-color);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.${t}-wrapper.${t}-divider-bottom .${t}-list-item {
|
|
46
|
+
border-bottom-style: solid;
|
|
47
|
+
border-bottom-color: var(--${t}-divider-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.${t}-list-cols-row {
|
|
51
|
+
display: flex;
|
|
52
|
+
align-items: start;
|
|
53
|
+
width: 100%;
|
|
54
|
+
box-sizing: border-box;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.${t}-list-cols-row-h {
|
|
58
|
+
align-items: stretch;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.${t}-list-cols-row-h [data-list-col] {
|
|
62
|
+
display: grid;
|
|
63
|
+
grid-template-rows: minmax(0, 1fr);
|
|
64
|
+
align-self: stretch;
|
|
65
|
+
min-height: min-content;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.${t}-list-cols-row-h .${t}-list-col {
|
|
69
|
+
display: flex;
|
|
70
|
+
flex-direction: column;
|
|
71
|
+
align-items: flex-start;
|
|
72
|
+
justify-content: flex-start;
|
|
73
|
+
width: 100%;
|
|
74
|
+
min-height: 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.${t}-list-cols-row-h .${t}-list-col-title {
|
|
78
|
+
display: block;
|
|
79
|
+
flex: 0 0 auto;
|
|
80
|
+
align-self: stretch;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.${t}-text-tight-leading {
|
|
84
|
+
display: block;
|
|
85
|
+
flex-shrink: 0;
|
|
86
|
+
padding-top: var(--${t}-title-leading-gap, 0);
|
|
87
|
+
padding-bottom: var(--${t}-title-leading-gap, 0);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.${t}-wrapper.${t}-type-b .${t}-list-cols-row {
|
|
91
|
+
flex-direction: column;
|
|
92
|
+
align-items: stretch;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.${t}-wrapper.${t}-type-b .${t}-list-col {
|
|
96
|
+
width: 100%;
|
|
97
|
+
min-width: 0;
|
|
98
|
+
flex-direction: column;
|
|
99
|
+
justify-content: flex-start;
|
|
100
|
+
align-items: flex-start;
|
|
101
|
+
min-height: min-content;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.${t}-wrapper.${t}-type-b .${t}-list-col-title {
|
|
105
|
+
display: block;
|
|
106
|
+
flex: 0 0 auto;
|
|
107
|
+
align-self: stretch;
|
|
108
|
+
text-align: center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
.${t}-wrapper.${t}-type-b .${t}-cut-item .${t}-list-cols-row {
|
|
112
|
+
flex-direction: row;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.${t}-wrapper.${t}-type-b .${t}-cut-label {
|
|
116
|
+
box-sizing: border-box;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.${t}-wrapper.${t}-type-b .${t}-list-col-last {
|
|
120
|
+
flex: 0 0 auto;
|
|
121
|
+
min-width: 0;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
a.${t}-list-item {
|
|
125
|
+
text-decoration: none;
|
|
126
|
+
color: inherit;
|
|
127
|
+
cursor: pointer;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.${t}-list-col {
|
|
131
|
+
flex-shrink: 0;
|
|
132
|
+
overflow: visible;
|
|
133
|
+
box-sizing: border-box;
|
|
134
|
+
min-width: ${te(50)};
|
|
135
|
+
position: relative;
|
|
136
|
+
display: flex;
|
|
137
|
+
align-items: flex-start;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.${t}-list-col-last {
|
|
141
|
+
flex: 1 1 auto;
|
|
142
|
+
min-width: ${te(50)};
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.${t}-list-col-title {
|
|
146
|
+
color: var(--${t}-text-color);
|
|
147
|
+
white-space: pre-wrap;
|
|
148
|
+
overflow-wrap: anywhere;
|
|
149
|
+
word-break: break-word;
|
|
150
|
+
flex: 1;
|
|
151
|
+
min-width: 0;
|
|
152
|
+
width: 100%;
|
|
153
|
+
box-sizing: border-box;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.${t}-baseline-probe {
|
|
157
|
+
display: inline-block;
|
|
158
|
+
width: 0;
|
|
159
|
+
height: 0;
|
|
160
|
+
overflow: hidden;
|
|
161
|
+
vertical-align: baseline;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
.${t}-col-resize-handle,
|
|
165
|
+
.${t}-control-anchor {
|
|
166
|
+
background: transparent;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.${t}-control-anchor {
|
|
170
|
+
position: absolute;
|
|
171
|
+
pointer-events: none;
|
|
172
|
+
z-index: 2;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.${t}-row-padding-handle {
|
|
176
|
+
width: 100%;
|
|
177
|
+
flex-shrink: 0;
|
|
178
|
+
background: transparent;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.${t}-list-col-wrap {
|
|
182
|
+
position: relative;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.${t}-list-cols-row-controls {
|
|
186
|
+
position: relative;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link,
|
|
190
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link,
|
|
191
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link,
|
|
192
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item,
|
|
193
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item,
|
|
194
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item {
|
|
195
|
+
transition: background-color 250ms, border-color 250ms;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link .${t}-list-col-title,
|
|
199
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link .${t}-list-col-title,
|
|
200
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link .${t}-list-col-title,
|
|
201
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-label,
|
|
202
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label,
|
|
203
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
|
|
204
|
+
transition: color 250ms;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover,
|
|
208
|
+
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
|
|
209
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover,
|
|
210
|
+
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item {
|
|
211
|
+
background: var(--${t}-background-hover-color);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover,
|
|
215
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
216
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
217
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link,
|
|
218
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default .${t}-cut-item:hover,
|
|
219
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item,
|
|
220
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover,
|
|
221
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
222
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
223
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link,
|
|
224
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-cut-item:hover,
|
|
225
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item,
|
|
226
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover,
|
|
227
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item:has(+ .${t}-list-item-has-link:hover),
|
|
228
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal:has(.${t}-cut-item:hover) .${t}-list-item-before-cut,
|
|
229
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link,
|
|
230
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-cut-item:hover,
|
|
231
|
+
.${t}-wrapper.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item {
|
|
232
|
+
border-bottom-color: var(--${t}-divider-hover-color);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
|
|
236
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
237
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
|
|
238
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
239
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
|
|
240
|
+
.${t}-wrapper.${t}-divider-top:not(.${t}-divider-bottom).${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
|
|
241
|
+
border-top-color: var(--${t}-divider-hover-color);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default .${t}-list-item-has-link:hover:first-child,
|
|
245
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
246
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds .${t}-list-item-has-link:hover:first-child,
|
|
247
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link:first-child,
|
|
248
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal .${t}-list-item-has-link:hover:first-child,
|
|
249
|
+
.${t}-wrapper.${t}-divider-top.${t}-divider-bottom.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link:first-child {
|
|
250
|
+
border-top-color: var(--${t}-divider-hover-color);
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
254
|
+
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
255
|
+
.${t}-wrapper.${t}-entry-hover-default .${t}-cut-item:hover .${t}-cut-label,
|
|
256
|
+
.${t}-wrapper.${t}-entry-hover-default.${t}-state-hover .${t}-cut-item .${t}-cut-label,
|
|
257
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
258
|
+
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
259
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover .${t}-cut-label,
|
|
260
|
+
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item .${t}-cut-label,
|
|
261
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover .${t}-list-col-title,
|
|
262
|
+
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link .${t}-list-col-title,
|
|
263
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover .${t}-cut-label,
|
|
264
|
+
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item .${t}-cut-label {
|
|
265
|
+
color: var(--${t}-text-hover-color);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link::before,
|
|
269
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item::before {
|
|
270
|
+
content: '';
|
|
271
|
+
position: absolute;
|
|
272
|
+
inset: 0;
|
|
273
|
+
background: var(--${t}-background-hover-color);
|
|
274
|
+
transform: scaleY(0);
|
|
275
|
+
transform-origin: center center;
|
|
276
|
+
opacity: 0;
|
|
277
|
+
transition: opacity 150ms, transform 0s 250ms;
|
|
278
|
+
z-index: 0;
|
|
279
|
+
pointer-events: none;
|
|
280
|
+
}
|
|
281
|
+
|
|
282
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-col,
|
|
283
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-label {
|
|
284
|
+
position: relative;
|
|
285
|
+
z-index: 1;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-list-item-has-link:hover::before,
|
|
289
|
+
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-list-item-has-link::before,
|
|
290
|
+
.${t}-wrapper.${t}-entry-hover-blinds .${t}-cut-item:hover::before,
|
|
291
|
+
.${t}-wrapper.${t}-entry-hover-blinds.${t}-state-hover .${t}-cut-item::before {
|
|
292
|
+
transform: scaleY(1);
|
|
293
|
+
opacity: 1;
|
|
294
|
+
transition: transform 250ms, opacity 250ms;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link::before,
|
|
298
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item::before {
|
|
299
|
+
content: '';
|
|
300
|
+
position: absolute;
|
|
301
|
+
inset: 0;
|
|
302
|
+
background: var(--${t}-background-hover-color);
|
|
303
|
+
transform: scaleY(0);
|
|
304
|
+
transform-origin: bottom center;
|
|
305
|
+
transition: transform 120ms;
|
|
306
|
+
z-index: 0;
|
|
307
|
+
pointer-events: none;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-col,
|
|
311
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-label {
|
|
312
|
+
position: relative;
|
|
313
|
+
z-index: 1;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link:hover::before,
|
|
317
|
+
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-list-item-has-link::before,
|
|
318
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item:hover::before,
|
|
319
|
+
.${t}-wrapper.${t}-entry-hover-reveal.${t}-state-hover .${t}-cut-item::before {
|
|
320
|
+
transform: scaleY(1);
|
|
321
|
+
transform-origin: top center;
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom::before,
|
|
325
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom::before {
|
|
326
|
+
transform-origin: top center;
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom:hover::before,
|
|
330
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-list-item-has-link.${t}-reveal-from-bottom.${t}-state-hover::before,
|
|
331
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom:hover::before,
|
|
332
|
+
.${t}-wrapper.${t}-entry-hover-reveal .${t}-cut-item.${t}-reveal-from-bottom.${t}-state-hover::before {
|
|
333
|
+
transform-origin: bottom center;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
.${t}-cut-item {
|
|
337
|
+
display: flex;
|
|
338
|
+
align-items: stretch;
|
|
339
|
+
width: 100%;
|
|
340
|
+
overflow: visible;
|
|
341
|
+
position: relative;
|
|
342
|
+
z-index: 3;
|
|
343
|
+
box-sizing: border-box;
|
|
344
|
+
user-select: none;
|
|
345
|
+
background: var(--${t}-background-color);
|
|
346
|
+
cursor: pointer;
|
|
347
|
+
padding: 0;
|
|
348
|
+
border: none;
|
|
349
|
+
font: inherit;
|
|
350
|
+
text-align: inherit;
|
|
351
|
+
appearance: none;
|
|
352
|
+
-webkit-appearance: none;
|
|
353
|
+
}
|
|
354
|
+
|
|
355
|
+
.${t}-cut-item .${t}-list-cols-row {
|
|
356
|
+
flex: 1;
|
|
357
|
+
min-height: 100%;
|
|
358
|
+
width: 100%;
|
|
359
|
+
display: flex;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
.${t}-wrapper.${t}-divider-bottom .${t}-cut-item {
|
|
363
|
+
border-bottom-style: solid;
|
|
364
|
+
border-bottom-color: var(--${t}-divider-color);
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
.${t}-cut-label {
|
|
368
|
+
display: block;
|
|
369
|
+
position: relative;
|
|
370
|
+
z-index: 1;
|
|
371
|
+
margin: 0;
|
|
372
|
+
color: var(--${t}-text-color);
|
|
373
|
+
white-space: pre-wrap;
|
|
374
|
+
overflow-wrap: anywhere;
|
|
375
|
+
word-break: break-word;
|
|
376
|
+
}
|
|
377
|
+
`}const xt=["AColumn","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],ae=["AColumn","BColumn","CColumn","DColumn","EColumn"],at="cutLabel",Xe=[...ae,at],Rt=["A","B","C","D","E"];function le(t){return`${t}ColumnVerticalAlign`}const zo=["Top","Center","Bottom"];function se(t){const e=String(t??"Top").trim();if(e.toLowerCase().startsWith("baseline")){const n=e.slice(-1).toUpperCase();return Rt.includes(n)?`Baseline ${n}`:"Top"}const o=e.toLowerCase();return o==="center"?"Center":o==="bottom"?"Bottom":o==="top"?"Top":e}function Ue(t){const e=se(t);return e.toLowerCase().startsWith("baseline")?!1:e==="Top"||e==="Center"||e==="Bottom"}function ze(t){const e=String(t??"").trim();if(!e.toLowerCase().startsWith("baseline"))return null;const o=e.slice(-1).toUpperCase();return Rt.includes(o)?o:null}function ce(t,e,o){const n=ze(t);return n?n===e?!1:Ue(o[le(n)]):!0}function wt(t){const e=se(t);if(e.toLowerCase().startsWith("baseline")){const o=e.slice(-1).toUpperCase();return Rt.includes(o)?{kind:"baseline",anchorLetter:o}:{kind:"top"}}return e==="Center"?{kind:"center"}:e==="Bottom"?{kind:"bottom"}:{kind:"top"}}function Yo(t,e,o){if(Ye(t,e,o))return wt(t);const n=wt(t);return n.kind==="baseline"?{kind:"top"}:n}function qo(t){const e=wt(t);return e.kind==="baseline"?{kind:"top"}:e}function Ye(t,e,o){return ce(t,o,e)?wt(t).kind==="baseline":!1}function Go(t){const e={};let o=!1;for(const n of Rt){const r=le(n),a=t[r];if(t.type==="b"){const s=String(a??"Top").trim();s!=="Top"&&s!=="Center"&&s!=="Bottom"&&(e[r]="Top",o=!0);continue}ce(a,n,t)||(e[r]="Top",o=!0)}return o?e:null}function Jo(t){return t==="center"?{flex:"0 0 auto",marginTop:"auto",marginBottom:"auto"}:t==="bottom"?{flex:"0 0 auto",marginTop:"auto"}:{}}function Zo(t){const e=wt(t).kind;return e==="baseline"?"center":e}function Qo(t){return t==="right"?"flex-end":t==="center"?"center":"flex-start"}function He(t){return t==="center"?"center":t==="bottom"?"flex-end":"flex-start"}function Po(t,e){const o=document.createElement("i");o.className=e,o.setAttribute("aria-hidden","true"),t.prepend(o);const{top:n}=t.getBoundingClientRect(),{bottom:r}=o.getBoundingClientRect(),a=r-n;return o.remove(),a}function oe(t,e,o,n){const r=t.titleEl;if(!r)return 0;const a=r.closest(`.${o}`);if(!a)return 0;const s=Po(r,n);if(t.kind==="baseline")return r.getBoundingClientRect().top-e+s;const h=a.getBoundingClientRect(),p=r.getBoundingClientRect().height;let i=0;return t.kind==="center"?i=(h.height-p)/2:t.kind==="bottom"&&(i=h.height-p),h.top-e+i+s}function tn(t,e,o){const n=t.getBoundingClientRect().height;return n<=0?0:(e.forEach(r=>{const a=r.querySelector(`.${o}`);a&&(a.style.minHeight=`${n}px`,a.style.height=`${n}px`)}),n)}function en(t,e){return!t||!e?(t&&(t.style.transform=""),0):(t.style.transform=`translateY(${e}px)`,e)}const on={AColumn:"AColumn",BColumnWidth:"BColumn",CColumnWidth:"CColumn",DColumnWidth:"DColumn",EColumnWidth:"EColumn"};function V(t,e){return`${t}${e.replace(/^text/,"Text")}`}const qe={AColumn:"A",BColumn:"B",CColumn:"C",DColumn:"D",EColumn:"E",cutLabel:"CUT"};function Ge(t){return[V(t,"textFontFamily"),V(t,"textFontSettings"),{type:"row",items:[V(t,"textFontSize"),V(t,"textLineHeight"),V(t,"textLetterSpacing"),V(t,"textWordSpacing")]},V(t,"textTextAlign"),V(t,"textTextAppearance"),`${t}VerticalAlign`]}function nn(){return{type:"tab",id:"listColumnTextStyle",tabs:Object.fromEntries(Xe.map(t=>[qe[t],Ge(t)]))}}function It(t,e){const o=n=>{const r=V(e,n);return t[r]};return{textFontFamily:o("textFontFamily")??"Arial",textFontSettings:o("textFontSettings")??{fontWeight:400,fontStyle:"normal"},textFontSize:o("textFontSize"),textLineHeight:o("textLineHeight"),textLetterSpacing:o("textLetterSpacing")??0,textWordSpacing:o("textWordSpacing")??0,textTextAlign:o("textTextAlign")??(e===at?"center":"left"),textTextAppearance:o("textTextAppearance"),textColor:t.textColor}}function Ve(t,e){var n,r;const o={fontSettings:{fontFamily:t.textFontFamily,fontWeight:((n=t.textFontSettings)==null?void 0:n.fontWeight)??400,fontStyle:((r=t.textFontSettings)==null?void 0:r.fontStyle)??"normal"},fontSize:t.textFontSize??.01,lineHeight:t.textLineHeight,letterSpacing:t.textLetterSpacing,wordSpacing:t.textWordSpacing,textAlign:t.textTextAlign,textAppearance:t.textTextAppearance,color:t.textColor??"#767676"};return Se.omitTextColors(Se.textStylesToCss(o,e))}function je(t,e,o,n){const r=It(t,e),a=r.textFontSize??.01,s=r.textLineHeight;return s!==void 0&&s<a?`${o} ${n}`:o}function De(t,e,o,n){const r=It(t,e),a=r.textFontSize??.01,s=r.textLineHeight;return s===void 0||s>=a?{}:{[`--${o}-title-leading-gap`]:P.scalingValue((a-s)/2,n)}}const M=["AColumnWidth","BColumnWidth","CColumnWidth","DColumnWidth","EColumnWidth"],st=["AColumnPaddingLeft","BColumnPaddingLeft","CColumnPaddingLeft","DColumnPaddingLeft","EColumnPaddingLeft"],ct=["AColumnPaddingRight","BColumnPaddingRight","CColumnPaddingRight","DColumnPaddingRight","EColumnPaddingRight"],dt=["AColumnPaddingBottom","BColumnPaddingBottom","CColumnPaddingBottom","DColumnPaddingBottom","EColumnPaddingBottom"],rn={textColor:"text-color",backgroundColor:"background-color",dividerColor:"divider-color",textHoverColor:"text-hover-color",backgroundHoverColor:"background-hover-color",dividerHoverColor:"divider-hover-color"},an=["hover","focus","filled","success","error"],Ie=.004,it=.004,ne=it,de=50,Lt=1440,Tt=de/Lt;function ue(t){const e=typeof t=="number"&&t>0?t:Lt;return de/e}function ln(t){let e=t??null;for(;e;){const o=e.style.getPropertyValue("--cntrl-article-width").trim();if(o){const r=parseFloat(o);if(Number.isFinite(r)&&r>0)return r}const n=getComputedStyle(e).getPropertyValue("--cntrl-article-width").trim();if(n){const r=parseFloat(n);if(Number.isFinite(r)&&r>0)return r}e=e.parentElement}return Lt}const Je={AColumnWidth:.02,BColumnWidth:.02,CColumnWidth:.02,DColumnWidth:.02,EColumnWidth:.02};function lt(t){const e=typeof t.wrapperWidth=="number"?t.wrapperWidth:1;return Math.max(0,e)}function Ze(t,e=1){const o=e/t;return Object.fromEntries(M.map(n=>[n,o]))}function sn(){return Object.fromEntries([...st.map(t=>[t,0]),...ct.map(t=>[t,0])])}function cn(){return Object.fromEntries(dt.map(t=>[t,0]))}function Dt(t){return Object.fromEntries(M.map(e=>[e,typeof t[e]=="number"?t[e]:Je[e]]))}function he(t,e,o){const n=t-Tt,r=e+o;if(r<=0||r<=n)return{paddingLeft:e,paddingRight:o};if(n<=0)return{paddingLeft:0,paddingRight:0};const a=n/r;return{paddingLeft:e*a,paddingRight:o*a}}function Ct(t,e,o){const n=Kt(t,e,o);if(t<=0)return[];const r=n.slice(0,t-1).reduce((a,s)=>a+s,0);return[...n.slice(0,t-1),Math.max(0,e-r)]}function dn(t,e,o){const n={};for(let r=0;r<t;r+=1){const a=st[r],s=ct[r],h=typeof o[a]=="number"?o[a]:0,p=typeof o[s]=="number"?o[s]:0,i=he(e[r]??0,h,p);i.paddingLeft!==h&&(n[a]=i.paddingLeft),i.paddingRight!==p&&(n[s]=i.paddingRight)}return n}function Kt(t,e,o){if(t<=0)return[];const n=M.slice(0,t).map(i=>o[i]);if(t===1)return n;const r=n.slice(0,t-1),s=r.reduce((i,$)=>i+$,0)+Tt;if(e>=s)return n;const h=[...r];let p=s-e;for(let i=h.length-1;i>=0&&p>0;i-=1){const $=h[i]-Tt;if($<=0)continue;const T=Math.min(p,$);h[i]-=T,p-=T}return[...h,n[t-1]]}function un(t,e,o){if(t<=1)return{};const n=Kt(t,e,o),r={};for(let a=0;a<t-1;a+=1){const s=M[a];n[a]!==o[s]&&(r[s]=n[a])}return r}function Ke(t){return Array.isArray(t.columnsOrder)&&t.columnsOrder.length>0?t.columnsOrder:[...xt]}function hn(t,e){return t.length!==e.length?!1:t.every((o,n)=>o===e[n])}function mn(t,e,o,n){const r=Math.min(n,t.length,M.length),a={};for(let s=0;s<r;s+=1){const h=t[s],p=e.indexOf(h);if(p===-1)continue;const i=M[p],$=st[p],T=ct[p],_=dt[p],c=M[s],R=st[s],y=ct[s],j=dt[s],O=o[i],D=o[$],w=o[T],B=o[_];typeof O=="number"&&(a[c]=O),typeof D=="number"&&(a[R]=D),typeof w=="number"&&(a[y]=w),typeof B=="number"&&(a[j]=B)}return a}function Qe(t,e){const o=new Set([...Object.keys(t),...Object.keys(e)]);for(const n of o)if(t[n]!==e[n])return!0;return!1}function fn(t,e){const o=t.columns,n=e.columns;if(typeof o!="number"||o===n)return t;const r=lt(t),a=t.type==="b"||t.type===void 0&&e.type==="b",s={...t,...Ze(o,r),...sn()};if(a)for(const h of dt)typeof e[h]=="number"&&(s[h]=e[h]);else Object.assign(s,cn());return Qe(t,s)?s:t}function Pe(t,e,o){const n=Go(t);n&&(t={...t,...n});const r=ue(o==null?void 0:o.designWidth),a=t.columns,s=e.columns,h=lt(t),p=lt(e),i=t.type==="b"||t.type===void 0&&e.type==="b",$=typeof a=="number"?a:typeof s=="number"?s:xt.length,T=w=>{if(i)return w;const B=Dt({...e,...w}),tt=lt(w),U=Ct($,tt,B),At=dn($,U,{...e,...w});return Object.keys(At).length===0?w:{...w,...At}};if(typeof a=="number"&&a!==s)return t;const _=Ke(t),c=Ke(e);if(!hn(_,c))return T({...t,...mn(_,c,e,$)});if(h<p&&typeof $=="number"&&!i){const w=Dt({...e,...t});return T({...t,...un($,h,w)})}if(i){const w=typeof t.textPaddingLR=="number"?t.textPaddingLR:0,B=Math.max(0,(h-r)/2);return w>B?{...t,textPaddingLR:B}:t}const R=Dt({...e,...t}),y=Ct($,p,Dt(e)),O=Ct($,h,R).some((w,B)=>w<(y[B]??w)),D=M.some(w=>{const B=t[w],tt=e[w];return typeof B=="number"&&typeof tt=="number"&&B!==tt});return O||D?T(t):t}function pn(t,e,o,n){const r=e.slice(0,t).reduce((s,h)=>s+h,0),a=o.slice(t+1,e.length-1).reduce((s,h)=>s+h,0);return Math.max(Tt,n-r-a-Tt)}function $n(t,e){return Math.random()*(e-t)+t}function vn(t){return Object.fromEntries(M.map(e=>[e,typeof t[e]=="number"?t[e]:Je[e]]))}function re(t,e,o=0){return Object.fromEntries(e.map(n=>[n,typeof t[n]=="number"?t[n]:o]))}function gn(t,e,o,n,r,a){return t.slice(0,e).map((s,h)=>{const p=st[h],i=ct[h],$=dt[h];return{key:s,textPrefix:on[s],widthKey:M[h],width:o[M[h]],paddingLeftKey:p,paddingRightKey:i,paddingBottomKey:$,paddingLeft:n[p],paddingRight:r[i],paddingBottom:a[$]}})}function yn({settings:t,content:e,isEditor:o,isPreviewMode:n,isEditMode:r,activeEvent:a,layoutId:s,portalId:h,onUpdateSettings:p}){const{prefix:i}=No.useScopedStyles(),$=!!r,{columns:T,type:_,wrapperWidth:c,entriesCount:R,cellMinHeight:y,dividerWidth:j,showVisibility:O,cut:D,showCut:w,cutCellMinHeight:B,cutLabel:tt,imageSize:U,imageOnHover:At,imagePosition:me="cursor",imageInterpolation:to="on",entryHoverEffect:Wt,entryHoverShowOption:Xt,rowPaddingTop:eo,rowPaddingBottom:oo,rowPaddingTopB:no,columnsOrder:Et,textPaddingLR:ro,textColor:io,backgroundColor:ao,dividerColor:lo,textHoverColor:so,backgroundHoverColor:co,dividerHoverColor:uo}=t,[fe,kt]=u.useState(void 0),[L,Bt]=u.useState(null),St=u.useRef(null),I=At==="on"&&(!o||n),Mt=me==="cursor",ho=Mt&&to==="on",{anchorRef:mo,onShow:pe,onCursorMove:$e,exit:Ut}=Xo(!!(I&&L!==null),ho),_t=(D??0)>0,v=_==="b",ut=u.useRef(null),ve=u.useRef(null),[Ot,Ft]=u.useState(null),[ht,ge]=u.useState(Lt),ye=ue(ht),fo=Math.max(0,((c??0)-ye)/2),mt=Math.min(ro??0,fo),Nt=Math.max(mt,it),be=((c??0)+ye)/2;u.useLayoutEffect(()=>{if(!o){ge(Lt);return}const l=()=>{ge(ln(ut.current))};l();const d=ut.current;if(!d)return;const m=new ResizeObserver(l);m.observe(d);let C=d;for(;C&&!C.style.getPropertyValue("--cntrl-article-width");)C=C.parentElement;return C&&m.observe(C),()=>m.disconnect()},[o,s]),u.useEffect(()=>{kt(void 0)},[D,w,e,R]),u.useEffect(()=>{o&&!n&&kt(void 0)},[o,n]);const po=Fo.buildColorVars(i,{textColor:io,backgroundColor:ao,dividerColor:lo,textHoverColor:so,backgroundHoverColor:co,dividerHoverColor:uo},rn,an),$o=a&&a!=="default"?`${i}-state-${a}`:"",vo=`${!o||n?Wt==="default"?`${i}-entry-hover-default`:Wt==="blinds"?`${i}-entry-hover-blinds`:Wt==="reveal"?`${i}-entry-hover-reveal`:"":""} ${$o}`.trim(),et=Wt==="reveal"&&(!o||n),Ht=(O==null?void 0:O[0])??!1,ft=(O==null?void 0:O[1])??!1,pt=u.useRef(t),zt=u.useRef(s);u.useEffect(()=>{if(!p||!o){pt.current=t,zt.current=s;return}if(zt.current!==s){pt.current=t,zt.current=s;return}const l=pt.current;if(!(l!==t))return;if(typeof l.columns=="number"&&typeof t.columns=="number"&&l.columns!==t.columns){pt.current=t;return}const m=Pe(t,l,{designWidth:ht});pt.current=t,Qe(t,m)&&p(m)},[t,p,o,s,ht]);const z=u.useMemo(()=>vn(t),[t.AColumnWidth,t.BColumnWidth,t.CColumnWidth,t.DColumnWidth,t.EColumnWidth]),Ce=u.useMemo(()=>re(t,st),[t.AColumnPaddingLeft,t.BColumnPaddingLeft,t.CColumnPaddingLeft,t.DColumnPaddingLeft,t.EColumnPaddingLeft]),xe=u.useMemo(()=>re(t,ct),[t.AColumnPaddingRight,t.BColumnPaddingRight,t.CColumnPaddingRight,t.DColumnPaddingRight,t.EColumnPaddingRight]),we=u.useMemo(()=>re(t,dt),[t.AColumnPaddingBottom,t.BColumnPaddingBottom,t.CColumnPaddingBottom,t.DColumnPaddingBottom,t.EColumnPaddingBottom]),Le=u.useMemo(()=>Array.isArray(Et)&&Et.length>0?Et:[...xt],[Et]),S=u.useMemo(()=>gn(Le,T,z,Ce,xe,we),[Le,T,z,Ce,xe,we]),G=lt(t),go=u.useMemo(()=>M.slice(0,T).map(l=>z[l]),[T,z]),Yt=u.useMemo(()=>Kt(T,G,z),[T,G,z]),K=u.useMemo(()=>Ct(T,G,z),[T,G,z]),ot=u.useMemo(()=>S.map((l,d)=>he(K[d]??0,l.paddingLeft,l.paddingRight)),[S,K]),J=u.useMemo(()=>{const l=R===0?1/0:R;return(e??[]).slice(0,l).map((m,C)=>({id:C,cells:Object.fromEntries(xt.map(A=>[A,m[A]??""])),image:m.image,link:m.link}))},[e,R]),qt=_t?fe??D:J.length,Z=u.useMemo(()=>_t?J.slice(0,qt):J,[J,_t,qt]),nt=_t&&qt<J.length,yo=Z.length>1||nt,Te=[Ht?`${i}-divider-top`:"",ft||yo?`${i}-divider-bottom`:""].filter(Boolean).join(" "),Gt=!o||n,bo=()=>{if(!Gt)return;const l=fe??D;if(!w){kt(J.length);return}kt(Math.min(l+w,J.length))},b=l=>P.scalingValue(l,o??!1),Vt=v?no??0:eo??0,jt=oo??0,Jt=y??0,Co=Math.max(jt,ne),xo=Oe(0,Z.length,Ht,ft,nt,j??0,o??!1).borderTopWidth,wo=v?"rowPaddingTopB":"rowPaddingTop",Zt=S[0],Qt=S[S.length-1],$t=ot[0],vt=ot[ot.length-1],Lo=Zt&&$t?Math.max($t.paddingLeft,it):0,Re=Qt&&vt?Math.max(vt.paddingRight,it):0,To=G,Ae=(l,d)=>Ko(me,ut.current,Mt?l:null,d),Ro=(l,d)=>{if(!I)return;const m=l.image;if(!(m!=null&&m.assetId)){Ut(()=>Bt(null));return}const C=(U==null?void 0:U.min)??80,A=(U==null?void 0:U.max)??320,E=(L==null?void 0:L.rowId)===l.id,W=E?L.widthPx:$n(C,A),{x:N,y:g}=Ae(d,W);if(E&&Mt){$e(N,g);return}Bt({rowId:l.id,assetId:m.assetId,objectFit:"contain",isVideo:Ho(m),embed:ie.isEmbedMedia(m)?m:void 0,widthPx:W}),St.current={x:N,y:g}},Ao=l=>{if(!I||!L||!Mt)return;const{x:d,y:m}=Ae(l,L.widthPx);$e(d,m)},Wo=()=>{L&&Ut(()=>Bt(null))},Eo=l=>{et&&Me(l,i),!(!I||!L)&&Ut(()=>Bt(null))},ko=l=>{et&&_e(l,i)};u.useLayoutEffect(()=>{if(!L||!St.current)return;const{x:l,y:d}=St.current;St.current=null,pe(l,d)},[L==null?void 0:L.rowId,L==null?void 0:L.assetId,pe]),u.useLayoutEffect(()=>{if(!$||v){Ft(null);return}const l=ve.current,d=l==null?void 0:l.parentElement;if(!l||!d){Ft(null);return}const m=()=>{const A=l.querySelector("[data-list-row]");if(!A){Ft(null);return}const E=d.getBoundingClientRect(),W=A.getBoundingClientRect();Ft(W.top-E.top+W.height/2)};m();const C=new ResizeObserver(m);return C.observe(l),C.observe(d),()=>C.disconnect()},[$,v,Z,Vt,jt,Jt,e,t,S,K,ht,j,Ht,ft,nt]);const We=u.useMemo(()=>!v&&ae.some(l=>{const d=l.charAt(0),m=t[`${l}VerticalAlign`];return Ye(m,t,d)}),[v,t,t.AColumnVerticalAlign,t.BColumnVerticalAlign,t.CColumnVerticalAlign,t.DColumnVerticalAlign,t.EColumnVerticalAlign]);u.useLayoutEffect(()=>{var N;const l=ut.current;if(!l)return;const d=()=>{l.querySelectorAll("[data-list-col]").forEach(g=>{g.style.transform="";const k=g.querySelector(`.${i}-list-col`);k&&(k.style.minHeight="",k.style.height="");const Y=g.querySelector(`.${i}-list-col-title`);Y&&(Y.style.transform="")})};if(v||!We){d();return}const m=()=>{const g=Array.from(l.querySelectorAll("[data-list-row]")),k=`${i}-list-col`,Y=`${i}-baseline-probe`;g.forEach(H=>{H.querySelectorAll("[data-list-col]").forEach(F=>{F.style.transform="";const X=F.querySelector(`.${k}`);X&&(X.style.minHeight="",X.style.height="");const Q=F.querySelector(`.${i}-list-col-title`);Q&&(Q.style.transform="")})}),g.forEach(H=>{const F=Array.from(H.querySelectorAll("[data-list-col]"));tn(H,F,k)}),l.offsetHeight,g.forEach(H=>{const F=Array.from(H.querySelectorAll("[data-list-col]")),X=H.getBoundingClientRect().top,Q=new Map,Pt=F.map(x=>{const q=x.querySelector(`.${i}-list-col-title`),rt={el:x,titleEl:q,letter:x.getAttribute("data-col-letter")??"",kind:x.getAttribute("data-valign")??"top",anchor:x.getAttribute("data-valign-anchor")};return Q.set(rt.letter,rt),rt}),gt=new Map,yt=(x,q)=>{const rt=gt.get(x.letter);if(rt!==void 0)return rt;const Ee=x.anchor?Q.get(x.anchor):void 0;if(x.kind!=="baseline"||!Ee||q.has(x.letter)){const Be=oe(x,X,k,Y);return gt.set(x.letter,Be),Be}q.add(x.letter);const So=yt(Ee,q);q.delete(x.letter);const Mo=oe(x,X,k,Y),_o=So-Mo;en(x.titleEl,_o);const ke=oe(x,X,k,Y);return gt.set(x.letter,ke),ke};Pt.forEach(x=>yt(x,new Set))})};let C=null;const A=()=>{C===null&&(C=requestAnimationFrame(()=>{C=null,m()}))};m();const E=new ResizeObserver(()=>A());E.observe(l);let W=!1;return typeof document<"u"&&((N=document.fonts)!=null&&N.ready)&&document.fonts.ready.then(()=>{W||A()}),()=>{W=!0,C!==null&&(cancelAnimationFrame(C),C=null),E.disconnect(),d()}},[We,v,t,e,ht,Z,K]);const Bo=u.useMemo(()=>Uo(i),[i]);return f.jsxs(f.Fragment,{children:[f.jsx("style",{dangerouslySetInnerHTML:{__html:Bo}}),f.jsx("div",{style:po,children:f.jsxs("div",{ref:ut,className:`${i}-wrapper ${vo}${Te?` ${Te}`:""}${v?` ${i}-type-b`:""}`.trim(),style:{width:P.scalingValue(c??0,o)},onMouseMove:I?Ao:void 0,onMouseLeave:I?Wo:void 0,children:[f.jsxs("div",{style:{width:"100%",position:"relative"},children:[Z.map((l,d)=>{var E,W,N;const m=(((E=l.link)==null?void 0:E.value.length)??0)>0,C=m&&(!o||n)?"a":"div",A=Oe(d,Z.length,Ht,ft,nt,j??0,o??!1);return f.jsxs(C,{ref:d===0?g=>{ve.current=g}:void 0,className:`${i}-list-item${m||Xt==="always"?` ${i}-list-item-has-link`:""}${nt&&d===Z.length-1?` ${i}-list-item-before-cut`:""}`,...m?{href:(W=l.link)==null?void 0:W.value,target:((N=l.link)==null?void 0:N.target)==="blank"?"_blank":"_self"}:{},style:A,onMouseEnter:g=>{et&&(m||Xt==="always")&&Me(g,i),I&&Ro(l,g)},onMouseLeave:g=>{et&&(m||Xt==="always")&&_e(g,i)},children:[Vt>0&&f.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(Vt)}}),f.jsxs("div",{className:`${i}-list-cols-row${v?"":` ${i}-list-cols-row-h`}${$&&d===0&&v?` ${i}-list-cols-row-controls`:""}`,...v?{}:{"data-list-row":""},style:v?void 0:{minHeight:b(Jt)},children:[S.map((g,k)=>{const Y=k===S.length-1,H=ot[k],F=g.paddingBottom,X=jo(l.cells[g.key]),Q=v&&F>0,Pt=v?{minHeight:b(Jt)}:{width:b(K[k])},gt=v?{paddingLeft:b(mt),paddingRight:b(mt)}:{paddingLeft:b(H.paddingLeft),paddingRight:b(H.paddingRight)},yt=g.textPrefix.charAt(0),x=v?qo(t[`${g.textPrefix}VerticalAlign`]):Yo(t[`${g.textPrefix}VerticalAlign`],t,yt),q=v&&$&&d===0;return f.jsxs("div",{className:v?`${i}-list-col-wrap`:void 0,...v?{}:{"data-list-col":"","data-col-letter":yt,"data-valign":x.kind,...x.kind==="baseline"?{"data-valign-anchor":x.anchorLetter}:{}},children:[f.jsx("div",{className:`${i}-list-col${Y?` ${i}-list-col-last`:""}`,style:{...gt,...Pt,...v?{justifyContent:He(x.kind)}:{}},"data-test":g.width,children:f.jsx("span",{className:je(t,g.textPrefix,`${i}-list-col-title`,`${i}-text-tight-leading`),style:{...Ve(It(t,g.textPrefix),o),...De(t,g.textPrefix,i,o),...v?{}:Jo(x.kind)},children:X?l.cells[g.key]??null:v?" ":null})}),Q&&f.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(F)}}),q&&f.jsx("div",{"data-controls":g.paddingBottomKey,"data-controls-axis":"y","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:b(Math.max(F,ne))}})]},g.key)}),$&&d===0&&v&&f.jsxs(f.Fragment,{children:[f.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(be),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{top:0,left:0,width:b(Nt),height:"100%"}}),f.jsx("div",{"data-controls":"textPaddingLR","data-controls-paired":"","data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(be),"data-controls-center-only-drag":"","data-controls-hit-placement":"center",className:`${i}-control-anchor`,style:{top:0,left:b(Math.max(Nt,G-Nt)),width:b(Nt),height:"100%"}})]})]}),!v&&jt>0&&f.jsx("div",{className:`${i}-row-padding-handle`,style:{height:b(jt)}}),$&&d===0&&!v&&f.jsx("div",{"data-controls":"rowPaddingBottom","data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":"left-y",className:`${i}-control-anchor`,style:{bottom:0,left:0,width:"100%",height:b(Co)}})]},l.id)}),$&&f.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:f.jsx("div",{"data-controls":wo,"data-controls-axis":"y","data-controls-variant":"row-padding","data-controls-min":"0","data-controls-center-only-drag":"","data-controls-hit-placement":v?"center":"left-y",className:`${i}-control-anchor`,style:{top:xo,left:0,width:"100%",height:b(Math.max(Vt,ne))}})},"row-padding-handles"),$&&!v&&Zt&&Qt&&f.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[f.jsx("div",{"data-controls":Zt.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K[0]-(($t==null?void 0:$t.paddingRight)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ot??void 0,className:`${i}-control-anchor`,style:{top:0,left:0,width:b(Lo),height:"100%"}}),f.jsx("div",{"data-controls":Qt.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K[S.length-1]-((vt==null?void 0:vt.paddingLeft)??0)),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ot??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(To-Re),width:b(Re),height:"100%"}})]},"column-edge-padding-handles"),$&&!v&&S.slice(0,-1).map((l,d)=>{const m=S[d+1],C=Yt.slice(0,d+1).reduce((g,k)=>g+k,0),A=ot[d],E=ot[d+1],W=Math.max(A.paddingRight,it),N=Math.max(E.paddingLeft,it);return f.jsxs("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:[f.jsx("div",{"data-controls":l.paddingRightKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-reverse":"","data-controls-min":"0","data-controls-max-fraction":String(K[d]-A.paddingLeft),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ot??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(C-W),width:b(W),height:"100%"}}),f.jsx("div",{"data-controls":m.paddingLeftKey,"data-controls-axis":"x","data-controls-variant":"column-padding","data-controls-min":"0","data-controls-max-fraction":String(K[d+1]-E.paddingRight),"data-controls-center-only-drag":"","data-controls-hit-placement":"center-x","data-controls-hit-top":Ot??void 0,className:`${i}-control-anchor`,style:{top:0,left:b(C),width:b(N),height:"100%"}})]},`${l.paddingRightKey}-padding`)}),$&&!v&&S.slice(0,-1).map((l,d)=>{const m=pn(d,Yt,go,G),A=Yt.slice(0,d+1).reduce((E,W)=>E+W,0)-Ie/2;return f.jsx("div",{style:{position:"absolute",inset:0,pointerEvents:"none"},children:f.jsx("div",{"data-controls":l.widthKey,"data-controls-axis":"x","data-controls-min":String(de),"data-controls-max-fraction":String(m),"data-controls-variant":"column-width",className:`${i}-col-resize-handle`,style:{position:"absolute",top:"0px",left:b(A),width:b(Ie),height:"calc(100%)",pointerEvents:"auto"}})},`${l.widthKey}-junction`)})]}),nt&&(()=>{const l=It(t,at),d=Zo(t.cutLabelVerticalAlign),m=l.textTextAlign==="justify"||v;return f.jsx("button",{type:"button",className:`${i}-cut-item`,style:{minHeight:b(B??0),cursor:Gt?"pointer":"default",...Do(ft,j??0,o??!1)},onClick:Gt?bo:void 0,onMouseEnter:et||I?Eo:void 0,onMouseLeave:et?ko:void 0,children:f.jsx("div",{className:`${i}-list-cols-row`,style:{...v?{paddingLeft:b(mt),paddingRight:b(mt)}:{},justifyContent:Qo(l.textTextAlign),alignItems:He(d)},children:f.jsx("span",{className:je(t,at,`${i}-cut-label`,`${i}-text-tight-leading`),style:{...Ve(l,o),...De(t,at,i,o),...m?{width:"100%"}:{}},children:tt})})})})(),I&&L&&typeof document<"u"&&(()=>{const l=`${L.widthPx}px`,d={width:l,height:"auto",maxHeight:l,objectFit:"contain"},m=(h?document.getElementById(h):null)??document.body;return Oo.createPortal(f.jsx("div",{ref:mo,className:`${i}-hover-media-anchor`,"data-selection":"none",children:f.jsx(Vo,{media:L,className:L.isVideo?`${i}-hover-video`:`${i}-hover-image`,style:d},`${L.rowId}-${L.assetId}`)}),m)})()]})})]})}exports.COLUMN_CONTENT_KEYS=xt;exports.COLUMN_TEXT_PREFIXES=ae;exports.COLUMN_VALIGN_BASIC_OPTIONS=zo;exports.CUT_LABEL_TEXT_PREFIX=at;exports.LIST_COLUMN_LETTERS=Rt;exports.LIST_TEXT_STYLE_PREFIXES=Xe;exports.LIST_TEXT_STYLE_TAB_LABELS=qe;exports.List=yn;exports.applyListColumnCountChange=fn;exports.applyListSettingsChange=Pe;exports.createListTextStylePanelTab=nn;exports.createListTextStyleTabContentItems=Ge;exports.getEffectiveListColumnWidths=Ct;exports.getEqualListColumnWidthUpdates=Ze;exports.getListColumnTextSettingKey=V;exports.getListColumnVerticalAlignSettingKey=le;exports.getListEffectiveContentWidth=lt;exports.getListMinColumnWidth=ue;exports.isBaselineAnchorColumnVerticalAlign=Ue;exports.isValidColumnBaselineVAlign=ce;exports.normalizeListColumnVerticalAlign=se;exports.parseBaselineAnchorLetter=ze;exports.resolveListColumnPadding=he;exports.resolveListColumnWidths=Kt;
|