PageSourceSearch

https://www.chelseatoronto.com/etc.clientlibs/langhamhotels/client….ACSHASH3ba94494e948702a62c78b91f434e562.js

js chelseatoronto.com collected 2026-10-01 14:10:02 UTC 19,337 bytes, 541 lines download raw bytes

1/*!************************************************************************
2 *
3 * ADOBE CONFIDENTIAL
4 * ___________________
5 *
6 *  Copyright 2013 Adobe Systems Incorporated
7 *  All Rights Reserved.
8 *
9 * NOTICE:  All information contained herein is, and remains
10 * the property of Adobe Systems Incorporated and its suppliers,
11 * if any.  The intellectual and technical concepts contained
12 * herein are proprietary to Adobe Systems Incorporated and its
13 * suppliers and are protected by trade secret or copyright law.
14 * Dissemination of this information or reproduction of this material
15 * is strictly forbidden unless prior written permission is obtained
16 * from Adobe Systems Incorporated.
17 **************************************************************************/
18"use strict";
19if (typeof s7responsiveImage == "undefined") {
20    (function (a) {
21        var y = "data-breakpoints";
22        var K = "data-mode";
23        var f = "smartcrop";
24        var x = "data-aspectratio";
25        var I = 0.5;
26        var F = "data-enablehd";
27        var H = "always";
28        var i = "never";
29        function g(L) {
30            if (typeof window.console != "undefined") {
31                window.console.log(L);
32            }
33        }
34        var m = (function () {
35            return (
36                window.requestAnimationFrame ||
37                window.webkitRequestAnimationFrame ||
38                window.mozRequestAnimationFrame ||
39                window.oRequestAnimationFrame ||
40                window.msRequestAnimationFrame ||
41                function (M, L) {
42                    window.setTimeout(M, 1000 / 60);
43                }
44            );
45        })();
46        var q = q || [];
47        var c = c || [];
48        a.s7RIJSONResponse = function t(N, M) {
49            for (var L = 0; L < q.length; L++) {
50                if (q[L] != null) {
51                    if (q[L].id == parseInt(M)) {
52                        if (q[L].callback) {
53                            q[L].callback(N);
54                        }
55                        delete q[L];
56                    }
57                }
58            }
59        };
60        a.s7jsonError = function e(O, N) {
61            var L = true;
62            for (var M = 0; M < c.length; M++) {
63                if (c[M] != null) {
64                    if (c[M].id == parseInt(N)) {
65                        if (c[M].callback) {
66                            c[M].callback(O);
67                        }
68                        delete c[M];
69                        L = false;
70                    }
71                }
72            }
73            if (L) {
74                g(O.message);
75            }
76        };
77        function B(O, N, L, R) {
78            var M = "";
79            var Q = N.indexOf("?");
80            if (Q >= 0) {
81                M = N + "&" + O;
82            } else {
83                M = N + "?" + O;
84            }
85            var S = E(M);
86            M += "&id=" + S + "&handler=s7RIJSONResponse";
87            if (typeof L != "undefined") {
88                q.push({ callback: L, id: S });
89            }
90            if (typeof R != "undefined") {
91                c.push({ callback: R, id: S });
92            }
93            var P = document.getElementById("sjScript_" + S);
94            if (P) {
95                document.getElementsByTagName("head")[0].removeChild(P);
96                P = null;
97            }
98            P = document.createElement("script");
99            P.type = "text/javascript";
100            P.id = "sjScript_" + S;
101            P.src = M;
102            if (typeof P != "undefined") {
103                document.getElementsByTagName("head")[0].appendChild(P);
104            }
105        }
106        function E(N) {
107            var M = 0;
108            if (M == 0 && N.length > 0) {
109                for (var L = 0; L < N.length; L++) {
110                    M = 31 * M + N.charCodeAt(L);
111                    M = M & 4294967295;
112                }
113            }
114            return M;
115        }
116        function j() {
117            var L = 1;
118            if (window.screen.availWidth > 800) {
119				if (window.devicePixelRatio) {
120					L = window.devicePixelRatio;
121				} else {
122					if (screen.deviceXDPI) {
123						L = window.screen.deviceXDPI / window.screen.logicalXDPI;
124					} else {
125						if ("matchMedia" in window && window.matchMedia) {
126							if (window.matchMedia("(min-resolution: 2dppx)").matches || win.matchMedia("(min-resolution: 192dpi)").matches) {
127								L = 2;
128							} else {
129								if (window.matchMedia("(min-resolution: 1.5dppx)").matches || window.matchMedia("(min-resolution: 144dpi)").matches) {
130									L = 1.5;
131								}
132							}
133						}
134					}
135				}
136			}
137            return L;
138        }
139        function C() {
140            var L = "landscape";
141            var M = 1;
142            if (typeof window.orientation != "undefined") {
143                L = screen.width / screen.height > 1 ? "landscape" : "portrait";
144                M = document.documentElement.clientWidth / window.innerWidth;
145                return { zoom: M, orient: L };
146            } else {
147                if (document.documentElement.clientWidth > document.documentElement.clientHeight) {
148                    L = "landscape";
149                } else {
150                    L = "portrait";
151                }
152                return { zoom: 1, orient: L };
153            }
154        }
155        function d(M, L) {
156            return M - L;
157        }
158        function J(M, L) {
159            return L - M;
160        }
161        function l(M, L) {
162            return parseInt(M.width, 10) - parseInt(L.width, 10);
163        }
164        function p(L, M) {
165            return parseInt(L) || M;
166        }
167        function o(L, N) {
168            var M = parseFloat(L);
169            if (isNaN(M)) {
170                M = N;
171            }
172            return M;
173        }
174        function n(L) {
175            L = L || {};
176            this.top = o(L.top, null);
177            this.left = o(L.left, null);
178            this.width = o(L.width, null);
179            this.height = o(L.height, null);
180        }
181        function D(M, N) {
182            var L = M.split(",");
183            if (L.length >= 4) {
184                return new n({ top: L[0], left: L[1], width: L[2], height: L[3] });
185            }
186            return null;
187        }
188        function w(O, Q, P) {
189            var N;
190            var M = decodeURI(O);
191            if (Q && (N = M.indexOf(Q)) != -1) {
192                var L = M.substring(0, N) + encodeURI(P);
193                if (N + Q.length < M.length) {
194                    L += encodeURI(M.substring(N + Q.length));
195                }
196                return L;
197            } else {
198                return O.match(/.*\//)[0] + encodeURI(P);
199            }
200        }
201        function b(O, N, M) {
202            if (O.rect && N && M) {
203                var L = O.rect;
204                if (L.width != null && L.width > 0 && L.height != null && L.height > 0) {
205                    O.maxWidth = Math.min(Math.round(N * L.width), N);
206                    O.maxHeight = Math.min(Math.round(M * L.height), M);
207                    return true;
208                }
209            }
210            return false;
211        }
212        function s(N, M, L) {
213            if (!b(N, M, L)) {
214                N.maxWidth = N.width;
215                N.maxHeight = N.height;
216            }
217        }
218        function r(R, O) {
219            if (R.isCommands) {
220                var S = R.isCommands.split("&");
221                for (var L = 0; L < S.length; L++) {
222                    var N = S[L];
223                    var Q = N.toLowerCase().indexOf("src=");
224                    if (Q == 0) {
225                        if (O) {
226                            R.src = N.substring(4);
227                            var M = O.match(/.*\//)[0] + R.src;
228                            var P = function (T) {
229                                R.maxWidth = p(T["image.width"], null);
230                                R.maxHeight = p(T["image.height"], null);
231                            };
232                            G(M, P);
233                        } else {
234                            g("Cannot request req=props for src= due to missing dataSrc");
235                        }
236                        break;
237                    }
238                }
239            }
240        }
241        function k(Q, L, P, O, N, M) {
242            Q = Q || {};
243            this.name = String(Q.name || "");
244            this.path = String(Q.path || "");
245            this.width = p(Q.width, 0);
246            this.height = p(Q.height, null);
247            if (Q.rect) {
248                this.rect = D(Q.rect);
249            }
250            this.isCommands = String(Q.isCommands || "");
251            this.src = String(Q.src || "");
252            this.maxWidth = null;
253            this.maxHeight = null;
254            if (this.width && this.height) {
255                this.aspectRatio = this.width / this.height;
256            }
257            if (typeof M != "undefined") {
258                s(this, O, N);
259            } else {
260                r(this, L);
261            }
262        }
263        function z(S, M, R, Q, P, N) {
264            if (!S || !S.set || !S.set.relation) {
265                return null;
266            }
267            var O = [];
268            var L;
269            if (Array.isArray(S.set.relation)) {
270                L = S.set.relation;
271            } else {
272                L = [S.set.relation];
273            }
274            L.forEach(function (V) {
275                var T = {};
276                if (V.n && V.userdata) {
277                    T.path = V.n;
278                    var U = V.userdata;
279                    if (U.SmartCropType === "Banner" && U.SmartCropDef && U.SmartCropWidth && U.SmartCropHeight) {
280                        T.name = U.SmartCropDef;
281                        T.width = U.SmartCropWidth;
282                        T.height = U.SmartCropHeight;
283                        T.rect = U.SmartCropRect;
284                        T.isCommands = U.isCommands;
285                        O.push(new k(T, M, R, Q, P, N));
286                    }
287                }
288            });
289            return O;
290        }
291        function h(N, L) {
292            var O = null;
293            if (N && N.length > 0) {
294                O = [];
295                for (var M = 0; M < N.length; M++) {
296                    var P = N[M].split(":");
297                    O.push(new k({ width: parseInt(P[0], 10), isCommands: P[1] }, L));
298                }
299            }
300            return O;
301        }
302        function u(M) {
303            var N = new k();
304            var L = new k();
305            if (M && M.length > 0) {
306                M.sort(l);
307                L = M[M.length - 1];
308                N = M[0];
309            }
310            return { breakpoints: M, minBreakpoint: N, maxBreakpoint: L };
311        }
312        function G(L, N, M) {
313            B(
314                "req=props,json&scl=1",
315                L,
316                function (O) {
317                    N(O);
318                },
319                function (O) {
320                    g("failed loading req=props for image [" + L + "]: " + O.message);
321                    if (M) {
322                        M();
323                    }
324                }
325            );
326        }
327        function v(O, N) {
328            var P = O - I;
329            var L = O + I;
330            if (N && N.length > 0) {
331                for (var M = N.length - 1; M >= 0; M--) {
332                    if (P > N[M].aspectRatio || N[M].aspectRatio > L) {
333                        N.splice(M, 1);
334                    }
335                }
336            }
337        }
338        a.s7responsiveImage = function A(aa) {
339            var ar = aa;
340            if (!ar) {
341                return;
342            }
343            var L = ar.getAttribute("src") || "";
344            var ab = ar.getAttribute("data-src") || "";
345            ab = ab || L;
346            if (!ab) {
347                return;
348            }
349            var U;
350            var Y = 0;
351            var al = -1;
352            var am = null;
353            var aj = null;
354            var ad = null;
355            var N = null;
356            var ai = null;
357            var S = null;
358            var W = null;
359            var R = false;
360            var an = false;
361            var X = false;
362            var ah = navigator.userAgent.toLowerCase();
363            var ac = ah.indexOf("msie");
364            var Q = parseFloat(navigator.appVersion);
365            var ao = null;
366            var ae = true;
367            var ak = false;
368            var ag = null;
369            var af = false;
370            var Z = ar.getAttribute(K);
371            ak = Z === f;
372            af = ar.getAttribute(x) === "true";
373            ae = ar.getAttribute(F) && ar.getAttribute(F).toLowerCase() === i ? false : true;
374            var V = function (at) {
375                R = true;
376                X = !ak || an;
377                N = aj = ar.maxWidth = parseInt(at["image.width"]);
378                ai = ad = ar.maxHeight = parseInt(at["image.height"]);
379                ao = ar.maxWidth / ar.maxHeight;
380                if (ak && W) {
381                    W.forEach(function (au) {
382                        b(au, aj, ad);
383                    });
384                }
385            };
386            G(ab, V);
387            if (!ak) {
388                var ap = ar.getAttribute(y);
389                var M = ap && ap.split(",").length > 0 ? ap.split(",") : null;
390                var T = u(h(M, ab));
391                W = T.breakpoints;
392                S = T.maxBreakpoint;
393            } else {
394                B(
395                    "req=set,json",
396                    ab,
397                    function (au) {
398                        X = R;
399                        if (au && au.set) {
400                            if (au.set.n) {
401                                ag = au.set.n;
402                            }
403                        }
404                        var at = u(z(au, ab, ag, aj, ad, ak));
405                        W = at.breakpoints;
406                        S = at.maxBreakpoint;
407                        an = true;
408                    },
409                    function (at) {
410                        g("failed loading req=set for image [" + ab + "]: " + at.message);
411                    }
412                );
413            }
414            function P(at, au) {
415                if (at > au) {
416                    return au;
417                }
418                var av = Math.ceil(au / Math.pow(2, Math.floor(Math.log(au / at) / Math.log(2))));
419                if (av > 1000) {
420                    av = Math.min(Math.max(1000, Math.ceil(at / 100) * 100), au);
421                }
422                return av;
423            }
424            function O(au, ay) {
425                var aw = al;
426                var at;
427                if (typeof U != "undefined") {
428                    at = U ? U.width : -1;
429                }
430                var av = am ? am.width : -1;
431                U = am;
432                var ax = new Image();
433                ax.onload = function () {
434                    ar.src = ax.src;
435                    var az = ax.width / ax.height;
436                    if (ac != -1 && Q < 9) {
437                        ar.style.height = ar.offsetWidth / az + "px";
438                    }
439                    if (Y == 0 || at != -1 || av != -1) {
440                        var aA = document.createEvent("Events");
441                        aA.s7responsiveViewerEvent = { type: "breakpointchanged", width: av, oldWidth: at };
442                        aA.initEvent("s7responsiveViewer", true, false);
443                        ar.dispatchEvent(aA);
444                    }
445                    Y = aw;
446                    if (ay) {
447                        ay();
448                    }
449                };
450                ax.onerror = function () {
451                    ax.src = ar.src;
452                };
453                ax.onabort = function () {};
454                al = Math.min(N, al);
455                ax.src = au;
456            }
457            function aq(az) {
458                if (!ar || !ar.parentNode || ar.parentNode.nodeType === 11) {
459                    return;
460                }
461                if (!X || !ar.offsetWidth || ar.offsetWidth <= 0) {
462                    m(aq);
463                    return;
464                }
465                var ay = parseFloat(document.defaultView.getComputedStyle(ar, null).getPropertyValue("width"));
466                al = Math.ceil(ay);
467                var ax = ae ? j() * C().zoom : C().zoom;
468                var aw = "";
469                if (W) {
470                    if (af) {
471                        v(ao, W);
472                    }
473                    if (ak && al > S.width) {
474                        am = null;
475                        al = P(al * ax, aj);
476                        N = ar.maxWidth = aj;
477                        ai = ar.maxHeight = ad;
478                    } else {
479                        for (var av = 0; av < W.length; av++) {
480                            if (al <= W[av].width || av == W.length - 1) {
481                                am = W[av];
482                                al = Math.ceil(W[av].width * ax);
483                                aw = W[av].isCommands;
484                                if (ak || (!ak && W[av].src && W[av].src.length > 0)) {
485                                    if (!W[av].maxWidth || !W[av].maxHeight) {
486                                        m(aq);
487                                        return;
488                                    }
489                                }
490                                if (W[av].maxWidth && W[av].maxHeight) {
491                                    N = ar.maxWidth = W[av].maxWidth;
492                                    ai = ar.maxHeight = W[av].maxHeight;
493                                }
494                                al = Math.min(N, al);
495                                break;
496                            }
497                        }
498                    }
499                } else {
500                    am = null;
501                    N = ar.maxWidth = aj;
502                    ai = ar.maxHeight = ad;
503                    al = P(al * ax, aj);
504                }
505                var au = U ? U.width : -1;
506                var at = am ? am.width : -1;
507                if (al != Y || au != at) {
508                    var aA = ab;
509                    if (ak && am) {
510                        aA = w(ab, ag, am.path);
511                    }
512                    const originalWidth = al
513                    let croppedWidth = 0
514                    if (window.screen.availWidth > 800) {
515                        aA = aA + (aA.indexOf("?") == -1 ? "?" : "&") + "wid=" + al;
516                    } else {
517                        croppedWidth = Math.ceil(al / 1.2)
518                        aA = aA + (aA.indexOf("?") == -1 ? "?" : "&") + "wid=" + croppedWidth;
519                    }
520                    if (ak) {
521                        if (window.screen.availWidth > 800) {
522                            aA += "&hei=" + Math.ceil((al * ai) / N);
523                        } else {
524							const width = originalWidth
525							const height = Math.ceil((al * ai) / N)
526							const ratio = height/width
527                            aA += "&hei=" + Math.ceil(ratio * croppedWidth);
528                        }
529                    }
530                    aA += aw != "" ? "&" + aw : "";
531                    O(aA, function () {
532                        m(aq);
533                    });
534                } else {
535                    m(aq);
536                }
537            }
538            m(aq);
539        };
540    })(this);
541}

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.