PageSourceSearch

https://www.roomlala.fr/assets/exposed/Profile-06ac1471648dd1019d076e1e95046cef.js

js roomlala.fr collected 2026-10-10 00:46:33 UTC 7,830 bytes, 188 lines download raw bytes

1function _assert_this_initialized(self) {
2    if (self === void 0) {
3        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
4    }
5    return self;
6}
7function _class_call_check(instance, Constructor) {
8    if (!(instance instanceof Constructor)) {
9        throw new TypeError("Cannot call a class as a function");
10    }
11}
12function _defineProperties(target, props) {
13    for(var i = 0; i < props.length; i++){
14        var descriptor = props[i];
15        descriptor.enumerable = descriptor.enumerable || false;
16        descriptor.configurable = true;
17        if ("value" in descriptor) descriptor.writable = true;
18        Object.defineProperty(target, descriptor.key, descriptor);
19    }
20}
21function _create_class(Constructor, protoProps, staticProps) {
22    if (protoProps) _defineProperties(Constructor.prototype, protoProps);
23    if (staticProps) _defineProperties(Constructor, staticProps);
24    return Constructor;
25}
26function _define_property(obj, key, value) {
27    if (key in obj) {
28        Object.defineProperty(obj, key, {
29            value: value,
30            enumerable: true,
31            configurable: true,
32            writable: true
33        });
34    } else {
35        obj[key] = value;
36    }
37    return obj;
38}
39function _get_prototype_of(o) {
40    _get_prototype_of = Object.setPrototypeOf ? Object.getPrototypeOf : function getPrototypeOf(o) {
41        return o.__proto__ || Object.getPrototypeOf(o);
42    };
43    return _get_prototype_of(o);
44}
45function _inherits(subClass, superClass) {
46    if (typeof superClass !== "function" && superClass !== null) {
47        throw new TypeError("Super expression must either be null or a function");
48    }
49    subClass.prototype = Object.create(superClass && superClass.prototype, {
50        constructor: {
51            value: subClass,
52            writable: true,
53            configurable: true
54        }
55    });
56    if (superClass) _set_prototype_of(subClass, superClass);
57}
58function _possible_constructor_return(self, call) {
59    if (call && (_type_of(call) === "object" || typeof call === "function")) {
60        return call;
61    }
62    return _assert_this_initialized(self);
63}
64function _set_prototype_of(o, p) {
65    _set_prototype_of = Object.setPrototypeOf || function setPrototypeOf(o, p) {
66        o.__proto__ = p;
67        return o;
68    };
69    return _set_prototype_of(o, p);
70}
71function _type_of(obj) {
72    "@swc/helpers - typeof";
73    return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
74}
75function _is_native_reflect_construct() {
76    if (typeof Reflect === "undefined" || !Reflect.construct) return false;
77    if (Reflect.construct.sham) return false;
78    if (typeof Proxy === "function") return true;
79    try {
80        Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {}));
81        return true;
82    } catch (e) {
83        return false;
84    }
85}
86function _create_super(Derived) {
87    var hasNativeReflectConstruct = _is_native_reflect_construct();
88    return function _createSuperInternal() {
89        var Super = _get_prototype_of(Derived), result;
90        if (hasNativeReflectConstruct) {
91            var NewTarget = _get_prototype_of(this).constructor;
92            result = Reflect.construct(Super, arguments, NewTarget);
93        } else {
94            result = Super.apply(this, arguments);
95        }
96        return _possible_constructor_return(this, result);
97    };
98}
99import EventListenerUtils from "../utils/event_listener_utils.js";
100import Modal from "../module/Modal.js";
101import Tooltip from "../module/tooltip.js";
102import ExposedController from "./ExposedController.js";
103import ImageSliderV4 from "../module/image_slider_v4.js";
104var Profile = /*#__PURE__*/ function(ExposedController) {
105    "use strict";
106    _inherits(Profile, ExposedController);
107    var _super = _create_super(Profile);
108    function Profile() {
109        _class_call_check(this, Profile);
110        var _this;
111        _this = _super.call(this);
112        _define_property(_assert_this_initialized(_this), "pictureModal", null);
113        Tooltip.init("[data-tippy-content]");
114        _this.initUserPictureModal();
115        _this.initListingSliders();
116        EventListenerUtils.clickOnId("js-user-video-modal-btn", function() {
117            new Modal("js-profile-user-video-modal").open();
118        });
119        return _this;
120    }
121    _create_class(Profile, [
122        {
123            key: "initListingSliders",
124            value: function initListingSliders() {
125                var desktopContainer = document.querySelector(".home-search-ads__desktop");
126                if (!desktopContainer || window.getComputedStyle(desktopContainer).display === "none") {
127                    return;
128                }
129                var sliders = document.querySelectorAll(".home-search-ads__desktop .slideshow-root");
130                if (0 === sliders.length) {
131                    return;
132                }
133                var isDragEnabled = !window.navigator.userAgent.includes("iPhone");
134                requestAnimationFrame(function() {
135                    var _iteratorNormalCompletion = true, _didIteratorError = false, _iteratorError = undefined;
136                    try {
137                        for(var _iterator = sliders[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true){
138                            var slider = _step.value;
139                            var widthReference = slider.closest(".image-container");
140                            if (!widthReference) {
141                                continue;
142                            }
143                            new ImageSliderV4(slider, widthReference, isDragEnabled);
144                            if (slider.querySelectorAll(".slideshow__slide").length > 1) {
145                                var _slider_querySelector, _slider_querySelector1;
146                                (_slider_querySelector = slider.querySelector(".slideshow-prev")) === null || _slider_querySelector === void 0 ? void 0 : _slider_querySelector.classList.remove("invisible");
147                                (_slider_querySelector1 = slider.querySelector(".slideshow-next")) === null || _slider_querySelector1 === void 0 ? void 0 : _slider_querySelector1.classList.remove("invisible");
148                            }
149                        }
150                    } catch (err) {
151                        _didIteratorError = true;
152                        _iteratorError = err;
153                    } finally{
154                        try {
155                            if (!_iteratorNormalCompletion && _iterator.return != null) {
156                                _iterator.return();
157                            }
158                        } finally{
159                            if (_didIteratorError) {
160                                throw _iteratorError;
161                            }
162                        }
163                    }
164                });
165            }
166        },
167        {
168            key: "initUserPictureModal",
169            value: function initUserPictureModal() {
170                var _this = this;
171                var _picture = document.getElementById("js-user-photo") // optional
172                ;
173                if (_picture) {
174                    _picture.addEventListener("click", function() {
175                        if (!_this.pictureModal) {
176                            _this.pictureModal = new Modal("js-profile-user-photo-modal");
177                            _this.pictureModal.removeListenersOnClose = false;
178                        }
179                        console.log("click on pic", _this.pictureModal);
180                        _this.pictureModal.open();
181                    });
182                }
183            }
184        }
185    ]);
186    return Profile;
187}(ExposedController);
188new Profile();

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.