Your IP : 3.140.195.205


Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/section/dist/
Upload File :
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/ui/section/dist/section.bundle.min.js

this.BX=this.BX||{};(function(e,t,i){"use strict";var n;function s(e,t,i){r(e,t);t.set(e,i)}function r(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var a=new WeakMap;var l=new WeakMap;var o=new WeakMap;var c=new WeakMap;var d=new WeakMap;var u=new WeakMap;var h=function(){function e(t){babelHelpers.classCallCheck(this,e);s(this,a,{writable:true,value:void 0});s(this,l,{writable:true,value:void 0});s(this,o,{writable:true,value:void 0});s(this,c,{writable:true,value:""});s(this,d,{writable:true,value:void 0});s(this,u,{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(this,a,i.Type.isNil(t.id)?"row_"+i.Text.getRandom(8):t.id);babelHelpers.classPrivateFieldSet(this,o,t.content);babelHelpers.classPrivateFieldSet(this,c,t.separator==="top"?"--top-separator":t.separator==="bottom"?"--bottom-separator":"");babelHelpers.classPrivateFieldSet(this,d,i.Type.isStringFilled(t.className)?t.className:"");babelHelpers.classPrivateFieldSet(this,u,t.isHidden===true)}babelHelpers.createClass(e,[{key:"render",value:function e(){if(babelHelpers.classPrivateFieldGet(this,l)){return babelHelpers.classPrivateFieldGet(this,l)}babelHelpers.classPrivateFieldSet(this,l,i.Tag.render(n||(n=babelHelpers.taggedTemplateLiteral(['\n\t\t<div class="ui-section__row '," ",'" ',">\n\t\t\t\t","\n\t\t\t</div>\n\t\t"])),babelHelpers.classPrivateFieldGet(this,c),babelHelpers.classPrivateFieldGet(this,d),babelHelpers.classPrivateFieldGet(this,u)?"hidden":"",babelHelpers.classPrivateFieldGet(this,o)));return babelHelpers.classPrivateFieldGet(this,l)}},{key:"append",value:function e(t){i.Dom.append(t,this.render())}},{key:"renderTo",value:function e(t){if(!i.Type.isDomNode(t)){throw new Error("Target node must be HTMLElement")}return i.Dom.append(this.render(),t)}},{key:"hide",value:function e(){i.Dom.hide(this.render())}},{key:"show",value:function e(){i.Dom.show(this.render())}},{key:"isHidden",value:function e(){return babelHelpers.classPrivateFieldGet(this,u)}},{key:"toggle",value:function e(){i.Dom.toggle(this.render())}}]);return e}();var p,v,b,f,w;function m(e,t){var i=typeof Symbol!=="undefined"&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=g(e))||t&&e&&typeof e.length==="number"){if(i)e=i;var n=0;var s=function e(){};return{s:s,n:function t(){if(n>=e.length)return{done:true};return{done:false,value:e[n++]}},e:function e(t){throw t},f:s}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r=true,a=false,l;return{s:function t(){i=i.call(e)},n:function e(){var t=i.next();r=t.done;return t},e:function e(t){a=true;l=t},f:function e(){try{if(!r&&i["return"]!=null)i["return"]()}finally{if(a)throw l}}}}function g(e,t){if(!e)return;if(typeof e==="string")return y(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if(i==="Object"&&e.constructor)i=e.constructor.name;if(i==="Map"||i==="Set")return Array.from(e);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return y(e,t)}function y(e,t){if(t==null||t>e.length)t=e.length;for(var i=0,n=new Array(t);i<t;i++)n[i]=e[i];return n}function k(e,t){T(e,t);t.add(e)}function T(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}function H(e,t,i){if(!t.has(e)){throw new TypeError("attempted to get private field on non-instance")}return i}var _=new WeakSet;var C=new WeakSet;var S=new WeakSet;var P=function(){function e(t){babelHelpers.classCallCheck(this,e);k(this,S);k(this,C);k(this,_);babelHelpers.defineProperty(this,"className",{titleIcon:"",arrowTop:"--chevron-up",arrowDown:"--chevron-down",arrowRight:"--chevron-right",bodyActive:"--body-active "});babelHelpers.defineProperty(this,"singleLink",{href:"",isSidePanel:false});this.title=i.Type.isString(t.title)?t.title:"";i.Type.isStringFilled(t.titleIconClasses)?this.className.titleIcon=t.titleIconClasses:"";i.Type.isStringFilled(t.iconArrowDown)?this.className.arrowDown=t.iconArrowDown:"";i.Type.isStringFilled(t.iconArrowTop)?this.className.arrowTop=t.iconArrowTop:"";i.Type.isStringFilled(t.iconArrowRight)?this.className.arrowRight=t.iconArrowRight:"";if(i.Type.isStringFilled(t.bodyActive)){this.className.bodyActive+=t.bodyActive}this.isOpen=i.Type.isBoolean(t.isOpen)?t.isOpen:true;this.isEnable=i.Type.isBoolean(t.isEnable)?t.isEnable:true;this.canCollapse=t.canCollapse!==false;this.id=i.Type.isNil(t.id)?"section_"+i.Text.getRandom(8):t.id;this.bannerCode=i.Type.isStringFilled(t.bannerCode)?t.bannerCode:null;if(t.singleLink){i.Type.isStringFilled(t.singleLink.href)?this.singleLink.href=t.singleLink.href:"";i.Type.isBoolean(t.singleLink.isSidePanel)?this.singleLink.isSidePanel=t.singleLink.isSidePanel:""}}babelHelpers.createClass(e,[{key:"render",value:function e(){var t=this;if(this.content){return this.content}this.content=this.getContent();var n=this.content.querySelectorAll(".ui-section__header");var s=babelHelpers.toConsumableArray(n);if(this.canCollapse&&!this.singleLink.href){var r=m(s),a;try{for(r.s();!(a=r.n()).done;){var l=a.value;if(i.Type.isElementNode(l)){l.addEventListener("click",this.toggle.bind(this))}}}catch(e){r.e(e)}finally{r.f()}}else if(this.singleLink.href){var o=m(s),c;try{for(o.s();!(c=o.n()).done;){var d=c.value;if(i.Type.isElementNode(d)){i.Event.bind(d,"click",(function(){if(t.singleLink.isSidePanel){BX.SidePanel.Instance.open(t.singleLink.href)}else{window.open(t.singleLink.href,"_blank")}}))}}}catch(e){o.e(e)}finally{o.f()}}return this.content}},{key:"getId",value:function e(){return this.id}},{key:"toggle",value:function e(t){var n=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;var s=this.content;var r=this.render().querySelector(".ui-section__collapse-icon");this.isOpen=t===true||t===false?t:!this.isOpen;var a=this.content.querySelector(".ui-section__section-body_inner");i.Dom.removeClass(a,"ui-section__section-toggle-animation");if(n!==false){i.Dom.addClass(a,"ui-section__section-toggle-animation")}if(this.isOpen){i.Dom.removeClass(r,this.className.arrowDown);i.Dom.addClass(r,this.className.arrowTop);i.Dom.addClass(s,this.className.bodyActive)}else{i.Dom.addClass(r,this.className.arrowDown);i.Dom.removeClass(r,this.className.arrowTop);i.Dom.removeClass(s,this.className.bodyActive)}}},{key:"getContent",value:function e(){if(this.sectionWrapper){return this.sectionWrapper}this.sectionWrapper=i.Tag.render(p||(p=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div id="','" class="ui-section__wrapper '," ",'">\n\t\t\t\t<div class="ui-section__header">\n\t\t\t\t\t<span class="ui-section__title-icon ','"></span>\n\t\t\t\t\t<span class="ui-section__title">',"</span>\n\t\t\t\t\t","\n\t\t\t\t\t",'\n\t\t\t\t</div>\n\t\t\t\t<div class="ui-section__separator"></div>\n\t\t\t\t<div class="ui-section__content ui-section__section-body_inner">\n\t\t\t\t\t<div class="ui-section__section-section-body_container">\n\t\t\t\t\t\t<div class="ui-section__row_box"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t'])),this.id,this.isOpen?this.className.bodyActive:"",this.canCollapse||this.singleLink.href?"clickable":"",this.className.titleIcon,this.title,this.isEnable?"":this.renderLockElement(),this.singleLink.href?H(this,_,F).call(this):H(this,C,D).call(this));return this.sectionWrapper}},{key:"addRows",value:function e(t){var i=this;t.forEach((function(e){i.append(e.render())}))}},{key:"addRow",value:function e(t){this.append(t.render())}},{key:"append",value:function e(t){i.Dom.append(t,H(this,S,L).call(this))}},{key:"prepend",value:function e(t){i.Dom.prepend(t,H(this,S,L).call(this))}},{key:"renderTo",value:function e(t){if(!i.Type.isDomNode(t)){throw new Error("Target node must be HTMLElement")}return i.Dom.append(this.render(),t)}},{key:"getBannerCode",value:function e(){return this.bannerCode}},{key:"showBanner",value:function e(){if(this.getBannerCode()){BX.UI.InfoHelper.show(this.getBannerCode())}}},{key:"renderLockElement",value:function e(){var t=this;var n=i.Tag.render(v||(v=babelHelpers.taggedTemplateLiteral(['<span class="ui-section__title-icon ui-icon-set --lock field-has-lock" onclick="event.stopPropagation()"></span>'])));i.Event.bind(n,"click",(function(){t.showBanner()}));return n}}]);return e}();function F(){return i.Tag.render(b||(b=babelHelpers.taggedTemplateLiteral(['<span class="ui-section__collapse-icon clickable ui-icon-set ','"></span>'])),this.className.arrowRight)}function D(){if(this.canCollapse){return i.Tag.render(f||(f=babelHelpers.taggedTemplateLiteral(['<span class="ui-section__collapse-icon clickable ui-icon-set ','"></span>'])),this.isOpen?this.className.arrowTop:this.className.arrowDown)}else{return i.Tag.render(w||(w=babelHelpers.taggedTemplateLiteral(['<span class="ui-section__collapse-icon"></span>'])))}}function L(){if(this.rowsWrapper){return this.rowsWrapper}this.rowsWrapper=this.render().querySelector(".ui-section__row_box");return this.rowsWrapper}function N(e,t,i){E(e,t);t.set(e,i)}function E(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var A=new WeakMap;var W=function(){function e(i,n,s){babelHelpers.classCallCheck(this,e);N(this,A,{writable:true,value:void 0});babelHelpers.classPrivateFieldSet(this,A,new t.Popup(i,n,{content:s,darkMode:true,autoHide:true,angle:true,offsetLeft:20,bindOptions:{position:"bottom"},closeByEsc:true}))}babelHelpers.createClass(e,[{key:"getPopup",value:function e(){return babelHelpers.classPrivateFieldGet(this,A)}},{key:"show",value:function e(){babelHelpers.classPrivateFieldGet(this,A).show()}}]);return e}();var B;function M(e,t,i){G(e,t);t.set(e,i)}function G(e,t){if(t.has(e)){throw new TypeError("Cannot initialize the same private elements twice on an object")}}var I=new WeakMap;var R=new WeakMap;var O=new WeakMap;var X=function(){function e(t){babelHelpers.classCallCheck(this,e);M(this,I,{writable:true,value:void 0});M(this,R,{writable:true,value:void 0});M(this,O,{writable:true,value:void 0});t=i.Type.isNil(t)?{}:t;babelHelpers.classPrivateFieldSet(this,R,t.isHidden===true);babelHelpers.classPrivateFieldSet(this,I,i.Type.isNil(t.id)?"row_"+i.Text.getRandom(8):t.id)}babelHelpers.createClass(e,[{key:"render",value:function e(){if(babelHelpers.classPrivateFieldGet(this,O)){return babelHelpers.classPrivateFieldGet(this,O)}babelHelpers.classPrivateFieldSet(this,O,i.Tag.render(B||(B=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="ui-section__separator-row" ',"></div>\n\t\t"])),babelHelpers.classPrivateFieldGet(this,R)?"hidden":""));return babelHelpers.classPrivateFieldGet(this,O)}},{key:"append",value:function e(t){i.Dom.append(t,this.render())}},{key:"renderTo",value:function e(t){if(!i.Type.isDomNode(t)){throw new Error("Target node must be HTMLElement")}return i.Dom.append(this.render(),t)}},{key:"hide",value:function e(){i.Dom.hide(this.render())}},{key:"show",value:function e(){i.Dom.show(this.render())}},{key:"toggle",value:function e(){i.Dom.toggle(this.render())}}]);return e}();e.Row=h;e.Section=P;e.HelpMessage=W;e.SeparatorRow=X})(this.BX.UI=this.BX.UI||{},BX.Main,BX);
//# sourceMappingURL=section.bundle.map.js