PageSourceSearch

https://ici.radio-canada.ca/v5/dotca/dist/assets/utils-BSYzXOZC.js

js radio-canada.ca collected 2026-09-24 08:26:35 UTC 8,802 bytes, 286 lines download raw bytes

1import { m as c, B as s, d, e as $, a as g, __tla as __tla_0 } from "./styledImmersiveCardsPageIndex-D3U3i_8v.js";
2import { h as e, __tla as __tla_1 } from "./colorManipulation-DbBWAPfn.js";
3let m, b, v, D, a, y, M, h, k, G, x, A, S;
4let __tla = Promise.all([
5  (() => {
6    try {
7      return __tla_0;
8    } catch (e2) {
9    }
10  })(),
11  (() => {
12    try {
13      return __tla_1;
14    } catch (e2) {
15    }
16  })()
17]).then(async () => {
18  b = [
19    {
20      ratio: "9x16",
21      value: "177"
22    },
23    {
24      ratio: "16x9",
25      value: "56.25"
26    },
27    {
28      ratio: "4x3",
29      value: "75"
30    },
31    {
32      ratio: "1x1",
33      value: "100"
34    },
35    {
36      ratio: "2x3",
37      value: "150"
38    },
39    {
40      ratio: "3x2",
41      value: "66.6"
42    },
43    {
44      ratio: "17x6",
45      value: "35.6"
46    }
47  ];
48  m = {
49    XS: {
50      min: 0,
51      max: 479
52    },
53    SM: {
54      min: 480,
55      max: 719
56    },
57    MD: {
58      min: 720,
59      max: 1023
60    },
61    LG: {
62      min: 1024,
63      max: 1439
64    },
65    XL: {
66      min: 1440,
67      max: 99999,
68      fixed: 1920
69    }
70  };
71  k = {
72    SM: 624,
73    MD: 672,
74    LG: 800,
75    XL: 896
76  };
77  h = {
78    SM: 30,
79    MD: 40,
80    LG: 60
81  };
82  x = {
83    MD: -80,
84    LG: -100,
85    XL: -120
86  };
87  M = {
88    mobile: 24,
89    desktop: 48
90  };
91  v = {
92    mobile: 24,
93    desktop: 36
94  };
95  A = function(n) {
96    return n === "#FFFFFF" || n === "#ffffff" || n === "white";
97  };
98  a = function(n) {
99    const l = {};
100    let i = null;
101    return $[n] && (i = $[n]), !i && d[n] && (i = d[n]), !i && g[n] && (i = g[n]), !i && /^#[0-9A-F]{6}$/i.test(n) && (i = (function(r) {
102      return r && r.length === 4 && r.charAt(0) === "#" ? "".concat(r.charAt(0)).concat(r.charAt(1)).concat(r.charAt(1)).concat(r.charAt(2)).concat(r.charAt(2)).concat(r.charAt(3)).concat(r.charAt(3)) : r;
103    })(n)), i || n !== "transparent" || (i = n), i || (i = d.graphite), l.color = i, l;
104  };
105  G = function(n, l = 1) {
106    return "\n    background-color: ".concat(e(a(n).color, l), ";\n  ");
107  };
108  D = function(n, l, i, r = "normal") {
109    let o, t = [
110      0.9,
111      0.9,
112      0.6,
113      0
114    ];
115    if (!l) return "";
116    switch (r) {
117      case "mild":
118        t = [
119          0.85,
120          0.8,
121          0.6,
122          0.3
123        ];
124        break;
125      case "soft":
126        t = [
127          0.75,
128          0.65,
129          0.6,
130          0
131        ];
132        break;
133      case "softest":
134        t = [
135          0.6,
136          0.4,
137          0.1,
138          0
139        ];
140        break;
141      case "one-third-normal":
142        t = [
143          1,
144          0.86,
145          0.7,
146          0.5,
147          0.2,
148          0
149        ];
150        break;
151      case "one-third-soft":
152        t = [
153          0.75,
154          0.64,
155          0.52,
156          0.37,
157          0.15,
158          0
159        ];
160        break;
161      case "one-third-softest":
162        t = [
163          0.6,
164          0.51,
165          0.42,
166          0.3,
167          0.12,
168          0
169        ];
170        break;
171      default:
172        t = [
173          1,
174          0.9,
175          0.6,
176          0
177        ];
178    }
179    switch (l) {
180      case "tb-over":
181        o = "background: linear-gradient(to bottom,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 45%,\n        ").concat(e(a(n).color, t[3]), " 70%,\n        ").concat(e(a(n).color, t[3]), " 100%);");
182        break;
183      case "bt-over":
184        o = "background: linear-gradient(to bottom,\n        ".concat(e(a(n).color, t[3]), " 0%,\n        ").concat(e(a(n).color, t[3]), " 25%,\n        ").concat(e(a(n).color, t[1]), " 55%,\n        ").concat(e(a(n).color, t[0]), " 100%);");
185        break;
186      case "bt":
187        o = "background: linear-gradient(to bottom,\n        ".concat(e(a(n).color, t[3]), " 0%,\n        ").concat(e(a(n).color, t[3]), " 44%,\n        ").concat(e(a(n).color, t[1]), " 72%,\n        ").concat(e(a(n).color, t[0]), " 100%);");
188        break;
189      case "tb":
190        o = "background: linear-gradient(to bottom,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 44%,\n        ").concat(e(a(n).color, t[3]), " 72%,\n        ").concat(e(a(n).color, t[3]), " 100%);");
191        break;
192      case "ctr":
193        o = "background: linear-gradient(to right,\n        ".concat(e(a(n).color, 0), " 0%,\n        ").concat(e(a(n).color, t[0]), " 25%,\n        ").concat(e(a(n).color, t[1]), " 75%,\n        ").concat(e(a(n).color, t[3]), " 100%);");
194        break;
195      case "rl":
196        o = "background: linear-gradient(to left,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 50%,\n        ").concat(e(a(n).color, t[2]), " 65%,\n        ").concat(e(a(n).color, t[3]), " 100%);");
197        break;
198      case "lr-one-third":
199        o = "background: linear-gradient(to right,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 28%,\n        ").concat(e(a(n).color, t[2]), " 36%,\n        ").concat(e(a(n).color, t[3]), " 40%,\n        ").concat(e(a(n).color, t[4]), " 45.5%,\n        ").concat(e(a(n).color, t[5]), " 100%);");
200        break;
201      case "rl-one-third":
202        o = "background: linear-gradient(to left,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 28%,\n        ").concat(e(a(n).color, t[2]), " 36%,\n        ").concat(e(a(n).color, t[3]), " 40%,\n        ").concat(e(a(n).color, t[4]), " 45.5%,\n        ").concat(e(a(n).color, t[5]), " 100%);");
203        break;
204      default:
205        o = "background: linear-gradient(to right,\n        ".concat(e(a(n).color, t[0]), " 0%,\n        ").concat(e(a(n).color, t[1]), " 50%,\n        ").concat(e(a(n).color, t[2]), " 65%,\n        ").concat(e(a(n).color, t[3]), " 100%);");
206    }
207    return o;
208  };
209  y = function(n, l = true) {
210    let i = "";
211    return n.forEach((r) => {
212      var _a, _b, _c, _d, _e;
213      switch (r.breakpoint) {
214        case "xs":
215          i += "\n          ".concat(c(s.XS.min, "\n            padding-bottom: ".concat((_a = b.find((o) => o.ratio === r.ratio)) == null ? void 0 : _a.value, "%;\n          ")), "\n        ");
216          break;
217        case "sm":
218          i += "\n          ".concat(c(s.SM.min, "\n            padding-bottom: ".concat((_b = b.find((o) => o.ratio === r.ratio)) == null ? void 0 : _b.value, "%;\n          "), l), "\n        ");
219          break;
220        case "md":
221          i += "\n          ".concat(c(s.MD.min, "\n            padding-bottom: ".concat((_c = b.find((o) => o.ratio === r.ratio)) == null ? void 0 : _c.value, "%;\n          "), l), "\n        ");
222          break;
223        case "lg":
224          i += "\n          ".concat(c(s.LG.min, "\n            padding-bottom: ".concat((_d = b.find((o) => o.ratio === r.ratio)) == null ? void 0 : _d.value, "%;\n          "), l), "\n        ");
225          break;
226        case "xl":
227          i += "\n          ".concat(c(s.XL.min, "\n            padding-bottom: ".concat((_e = b.find((o) => o.ratio === r.ratio)) == null ? void 0 : _e.value, "%;\n          "), l), "\n        ");
228          break;
229        default:
230          return "";
231      }
232      return "";
233    }), i;
234  };
235  function u(n) {
236    var _a;
237    let l = n.options.textColor;
238    return !n.textColor || !n.isDefault && l || (l = (_a = n == null ? void 0 : n.textColor) == null ? void 0 : _a.toLowerCase()), l;
239  }
240  S = function(n, l, i, r, o = false, t = false) {
241    return {
242      active: true,
243      activeReadable: true,
244      bgColor: n.options.halfContentPanel || n.options.panelType === "half" ? null : r,
245      bgGradientDirection: n.options.bgGradientDirection,
246      bgGradientDirectionMobile: n.options.bgGradientDirectionMobile,
247      bgGradientIntensity: n.options.bgGradientIntensity,
248      bgGradientIntensityMobile: n.options.bgGradientIntensityMobile,
249      bgOpacity: n.options.bgOpacity,
250      bgOpacityMobile: n.options.bgOpacityMobile,
251      bgPosition: n.options.bgPosition,
252      contentAlign: n.options.contentAlign,
253      fixed: o,
254      isActiveAnimBg: false,
255      isGrayScale: false,
256      isGrayScaleInverted: false,
257      isContrast: false,
258      noReadable: n.options.noReadable,
259      noReadableDesktop: n.options.noReadableDesktop,
260      noReadableMobile: n.options.noReadableMobile,
261      parallax: n.options.parallax,
262      slowerTransition: !t && !(n.options.halfContentPanel || n.options.panelType === "half"),
263      textColor: u(n),
264      textAlign: n.options.textAlign,
265      isMobileView: l.isMobileView,
266      noBgDesktop: !!n.options.videoSources,
267      noBgMobile: !!n.options.videoSourcesMobile
268    };
269  };
270});
271export {
272  m as H,
273  b as P,
274  v as S,
275  __tla,
276  D as a,
277  a as b,
278  y as c,
279  M as d,
280  h as e,
281  k as f,
282  G as g,
283  x as h,
284  A as i,
285  S as j
286};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.