Your IP : 18.119.163.163


Current Path : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/node/
Upload File :
Current File : /var/www/www-root/data/www/monolith-realty.ru/bitrix/js/landing/node/icon.min.js

(function(){"use strict";BX.namespace("BX.Landing.Block.Node");var t=BX.Landing.Utils.encodeDataValue;var n=BX.Landing.Utils.decodeDataValue;var i=BX.Landing.Utils.data;var e=BX.Landing.Utils.attr;BX.Landing.Block.Node.Icon=function(t){BX.Landing.Block.Node.Img.apply(this,arguments);this.type="icon"};function s(t){var n=i(t.node,"data-pseudo-url");return!!n?n:""}function a(t){return t.node.className.split(" ")}function o(t,n){return BX.Landing.UI.Panel.IconPanel.getLibraries().then((function(i){i.forEach((function(n){n.categories.forEach((function(n){n.items.forEach((function(n){var i="";if(BX.Type.isObject(n)){i=n.options.join(" ")}else{i=n}var e=i.split(" ");e.forEach((function(n){if(n){t.node.classList.remove(n)}}))}))}))}));n.classList.forEach((function(n){t.node.classList.add(n)}))}))}BX.Landing.Block.Node.Icon.prototype={constructor:BX.Landing.Block.Node.Icon,__proto__:BX.Landing.Block.Node.Img.prototype,getField:function(){if(!this.field){var t=this.getValue();t.url=n(t.url);var i=!!this.node.closest("a");this.field=new BX.Landing.UI.Field.Icon({selector:this.selector,title:this.manifest.name,disableLink:i,content:t,dimensions:!!this.manifest.dimensions?this.manifest.dimensions:{}})}else{this.field.content=this.getValue()}return this.field},setValue:function(t,n,i){this.lastValue=this.lastValue||this.getValue();this.preventSave(n);return o(this,t).then(function(){if(t.url){const n=this.preparePseudoUrl(t.url);if(n!==null){e(this.node,"data-pseudo-url",n)}}this.onChange(i);if(!i){BX.Landing.History.getInstance().push()}this.lastValue=this.getValue()}.bind(this))},getValue:function(){return{type:"icon",src:"",id:-1,alt:"",classList:a(this),url:t(s(this))}}}})();
//# sourceMappingURL=icon.map.js