"use strict"; (function ($) { "use strict"; /** * Formulaire du depot d'annonce * @param init : {} */ $.fn.commonSnippet = function (init) { var form = $(this); var prefixForm = form.attr('name'); form.find('a[data-toggle="pill"]').on('shown.bs.tab', function (e) { var ariaControls = $(e.target).attr('aria-controls'); $('#steps-form-depot-tab a[aria-controls=' + ariaControls + ']').tab('show'); if ($(e.target).hasClass('nextBtn') || $(e.target).hasClass('prevBtn')) { refreshActiveTab(e.target); } }); selectDiagnosticDpe(); function checkSelectDiagnosticDpe(valueSelect) { if (valueSelect == '0') { $('#' + prefixForm + '_Bien_diagnosticPartner').parent().hide(); $('#' + prefixForm + '_Bien_dpe').parent().parent().show(); $('#' + prefixForm + '_Bien_ges').parent().parent().show(); $('#' + prefixForm + '_Bien_diagnosticPartner').prop("checked", false); $('#' + prefixForm + '_Bien_dpe').val(''); $('#' + prefixForm + '_Bien_ges').val(''); } else { if (valueSelect == '5') { $('#' + prefixForm + '_Bien_diagnosticPartner').parent().show(); $('#' + prefixForm + '_Bien_diagnosticPartner').prop("checked", true); } else { $('#' + prefixForm + '_Bien_diagnosticPartner').parent().hide(); $('#' + prefixForm + '_Bien_diagnosticPartner').prop("checked", false); } $('#' + prefixForm + '_Bien_dpe').parent().parent().hide(); $('#' + prefixForm + '_Bien_ges').parent().parent().hide(); $('#' + prefixForm + '_Bien_dpe').val(valueSelect); $('#' + prefixForm + '_Bien_ges').val(valueSelect); } } /** * Refresh tab with class active for control with other btn * @param $target selected current tab */ function refreshActiveTab($target) { $($target).attr('aria-selected', 'false'); $($target).removeClass('active'); } function selectDiagnosticDpe() { checkSelectDiagnosticDpe($('#' + prefixForm + '_Bien_statusDiagnostic').val()); $(document).on('change', '#' + prefixForm + '_Bien_statusDiagnostic', function () { checkSelectDiagnosticDpe($(this).val()); }); } /* EVENT CLIC PREV NEXT FOR SCROLL TOP FORM */ $(".prevBtn, .nextBtn").click(function () { $("body,html").animate({ scrollTop: $(".formDepotAnnonce").offset().top }, 800 //speed ); }); }; })(jQuery); //# sourceMappingURL=common-compiled.js.map "use strict"; /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define */ /*jshint undef:false */ /*eslint no-eval: "error"*/ (function ($) { "use strict"; $.slug = function (val) { return val.toLowerCase().replace(/^\s+|\s+$/g, "").replace(/[_|\s]+/g, "-").replace(/[^a-z\u0400-\u04FF0-9-]+/g, "").replace(/[-]+/g, "-").replace(/^-+|-+$/g, ""); }; })(jQuery); //# sourceMappingURL=format-str-compiled.js.map /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define */ /*jshint undef:false */ /*eslint no-eval: "error"*/ "use strict"; function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } "object" != _typeof(window.CP) && (window.CP = {}), window.CP.PenTimer = { programNoLongerBeingMonitored: !1, timeOfFirstCallToShouldStopLoop: 0, _loopExits: {}, _loopTimers: {}, START_MONITORING_AFTER: 2e3, STOP_ALL_MONITORING_TIMEOUT: 5e3, MAX_TIME_IN_LOOP_WO_EXIT: 2200, exitedLoop: function exitedLoop(o) { this._loopExits[o] = !0; }, shouldStopLoop: function shouldStopLoop(o) { if (this.programKilledSoStopMonitoring) return !0; if (this.programNoLongerBeingMonitored) return !1; if (this._loopExits[o]) return !1; var t = this._getTime(); if (0 === this.timeOfFirstCallToShouldStopLoop) return this.timeOfFirstCallToShouldStopLoop = t, !1; var i = t - this.timeOfFirstCallToShouldStopLoop; if (i < this.START_MONITORING_AFTER) return !1; if (i > this.STOP_ALL_MONITORING_TIMEOUT) return this.programNoLongerBeingMonitored = !0, !1; try { this._checkOnInfiniteLoop(o, t); } catch (o) { return this._sendErrorMessageToEditor(), this.programKilledSoStopMonitoring = !0, !0; } return !1; }, _sendErrorMessageToEditor: function _sendErrorMessageToEditor() { try { if (this._shouldPostMessage()) { var o = { action: "infinite-loop", line: this._findAroundLineNumber() }; parent.postMessage(JSON.stringify(o), "*"); } else this._throwAnErrorToStopPen(); } catch (o) { this._throwAnErrorToStopPen(); } }, _shouldPostMessage: function _shouldPostMessage() { return document.location.href.match(/boomerang/); }, _throwAnErrorToStopPen: function _throwAnErrorToStopPen() { throw "We found an infinite loop in your Pen. We've stopped the Pen from running. Please correct it or contact support@codepen.io."; }, _findAroundLineNumber: function _findAroundLineNumber() { var o = new Error(), t = 0; if (o.stack) { var i = o.stack.match(/boomerang\S+:(\d+):\d+/); i && (t = i[1]); } return t; }, _checkOnInfiniteLoop: function _checkOnInfiniteLoop(o, t) { if (!this._loopTimers[o]) return this._loopTimers[o] = t, !1; var i = t - this._loopTimers[o]; if (i > this.MAX_TIME_IN_LOOP_WO_EXIT) throw "Infinite Loop found on loop: " + o; }, _getTime: function _getTime() { return +new Date(); } }, window.CP.shouldStopExecution = function (o) { var t = window.CP.PenTimer.shouldStopLoop(o); return t === !0 && console.warn("[CodePen]: An infinite loop (or a loop taking too long) was detected, so we stopped its execution. Sorry!"), t; }, window.CP.exitedLoop = function (o) { window.CP.PenTimer.exitedLoop(o); }; (function ($) { "use strict"; function initImageUpload(box) { var uploadField = box.querySelector('.image-upload'); uploadField.addEventListener('change', getFile); function getFile(e) { var file = e.currentTarget.files[0]; checkType(file); } function previewImage(file) { var thumb = box.querySelector('.js--image-preview'), reader = new FileReader(); reader.onload = function () { thumb.style.backgroundImage = 'url(' + reader.result + ')'; }; reader.readAsDataURL(file); thumb.className += ' js--no-default'; } function checkType(file) { var imageType = /image.*/; if (!file.type.match(imageType)) { throw 'Datei ist kein Bild'; } else if (!file) { throw 'Kein Bild gewählt'; } else { previewImage(file); } } } /// drop-effect function initDropEffect(box) { var area, drop, areaWidth, areaHeight, maxDistance, dropWidth, dropHeight, x, y; // get clickable area for drop effect area = box.querySelector('.js--image-preview'); area.addEventListener('click', fireRipple); function fireRipple(e) { area = e.currentTarget; // create drop if (!drop) { drop = document.createElement('span'); drop.className = 'drop'; this.appendChild(drop); } // reset animate class drop.className = 'drop'; // calculate dimensions of area (longest side) areaWidth = getComputedStyle(this, null).getPropertyValue("width"); areaHeight = getComputedStyle(this, null).getPropertyValue("height"); maxDistance = Math.max(parseInt(areaWidth, 10), parseInt(areaHeight, 10)); // set drop dimensions to fill area drop.style.width = maxDistance + 'px'; drop.style.height = maxDistance + 'px'; // calculate dimensions of drop dropWidth = getComputedStyle(this, null).getPropertyValue("width"); dropHeight = getComputedStyle(this, null).getPropertyValue("height"); // calculate relative coordinates of click // logic: click coordinates relative to page - parent's position relative to page - half of self height/width to make it controllable from the center x = e.pageX - this.offsetLeft - parseInt(dropWidth, 10) / 2; y = e.pageY - this.offsetTop - parseInt(dropHeight, 10) / 2 - 30; // position drop and animate drop.style.top = y + 'px'; drop.style.left = x + 'px'; drop.className += ' animate'; e.stopPropagation(); } } // initialize box-scope var boxes = document.querySelectorAll('.boxPhoto'); for (var i = 0; i < boxes.length; i++) { if (window.CP.shouldStopExecution(1)) { break; } var box = boxes[i]; initDropEffect(box); initImageUpload(box); } window.CP.exitedLoop(1); })(jQuery); //# sourceMappingURL=photos-compiled.js.map "use strict"; /*jslint vars: true, plusplus: true, devel: true, nomen: true, indent: 4, maxerr: 50 */ /*global define */ /*jshint undef:false */ /*eslint no-eval: "error"*/ (function ($) { "use strict"; /** * Formulaire du depot d'annonce * @param init : {} */ $.fn.formDepotMandat = function (init) { var form = $(this); var prefixForm = form.attr('name'); var DIFFUSION_OFF = 0; var DIFFUSION_MAX = 1; var DIFFUSION_OFF_OR_MAX = '0|1'; var ESTIMATION_ONLINE = 2; var ESTIMATION_VISIO = 3; var ESTIMATION_AGENT = 4; var choiceAction = $("#snippetbundle_depotmandatannonce_choiceAction").val(); var togglePill = $(this).find('a[data-toggle="pill"][id^="step"]'); initForm(); processOnClickUserChoice(togglePill); checkOnSubmitDepositForm(); changeCheckboxChoiceDiffusion(); processOnClickUserChoiceAgent(); changeTypeExt(); clickNoPillsAgent(); if (isEstimation()) { calculPlusMoinsValue(); changeTypeBienInEstimation(); changeCityInEstimation(); checkPlusMoinsValueLabel(); hideDpeGes(); } $('#loader').addClass('hidden'); function initForm() { setTitleForm(); setRequireEstimationField(); initPricePills(); if (choiceAction == DIFFUSION_OFF_OR_MAX) { $('a.choiceStep1[data-diffusion=2]').parents('.cardConfiguration').parent().hide(); $("#snippetbundle_depotmandatannonce_choiceAction").val(DIFFUSION_MAX); } else { if (isEstimation()) { $("#snippetbundle_depotmandatannonce_choiceAction").val(ESTIMATION_ONLINE); $('#switchOnlyForDiffusion').hide(); $('#descriptif').hide(); } } checkValueTypeExt(); } function setTitleForm() { if (isEstimation()) { $('.titleForm').html("