HEX
Server: Apache
System: Linux efa57bbe-abb1-400d-2985-3b056fbc2701.secureserver.net 6.1.147-1.el9.elrepo.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jul 24 12:33:32 EDT 2025 x86_64
User: root (0)
PHP: 8.0.30.4
Disabled: NONE
Upload Files
File: //var/www/wp-content/plugins/simply-gallery-block/blocks/skins/pgc_sgb_viewer.js
(()=>{var e={6268:()=>{},7157:()=>{},3228:()=>{},6550:()=>{},7625:()=>{},7336:()=>{},2113:()=>{},1280:()=>{},5224:()=>{},5072:e=>{"use strict";var t=[];function i(e){for(var i=-1,a=0;a<t.length;a++)if(t[a].identifier===e){i=a;break}return i}function a(e,a){for(var o={},n=[],r=0;r<e.length;r++){var l=e[r],h=a.base?l[0]+a.base:l[0],c=o[h]||0,d="".concat(h," ").concat(c);o[h]=c+1;var u=i(d),g={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)t[u].references++,t[u].updater(g);else{var m=s(g,a);a.byIndex=r,t.splice(r,0,{identifier:d,updater:m,references:1})}n.push(d)}return n}function s(e,t){var i=t.domAPI(t);return i.update(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap&&t.supports===e.supports&&t.layer===e.layer)return;i.update(e=t)}else i.remove()}}e.exports=function(e,s){var o=a(e=e||[],s=s||{});return function(e){e=e||[];for(var n=0;n<o.length;n++){var r=i(o[n]);t[r].references--}for(var l=a(e,s),h=0;h<o.length;h++){var c=i(o[h]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},7659:e=>{"use strict";var t={};e.exports=function(e,i){var a=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(i)}},540:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},5056:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var a="";i.supports&&(a+="@supports (".concat(i.supports,") {")),i.media&&(a+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(a+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),a+=i.css,s&&(a+="}"),i.media&&(a+="}"),i.supports&&(a+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(a+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(a,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},1113:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}}},t={};function i(a){var s=t[a];if(void 0!==s)return s.exports;var o=t[a]={exports:{}};return e[a](o,o.exports,i),o.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var a in t)i.o(t,a)&&!i.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nc=void 0,(()=>{"use strict";var e=i(5072),t=i.n(e),a=i(7825),s=i.n(a),o=i(7659),n=i.n(o),r=i(5056),l=i.n(r),h=i(540),c=i.n(h),d=i(1113),u=i.n(d),g=i(2113),m=i.n(g),p={};function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function y(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,f(a.key),a)}}function f(e){var t=function(e){if("object"!=v(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=v(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==v(t)?t:t+""}p.styleTagTransform=u(),p.setAttributes=l(),p.insert=n().bind(null,"head"),p.domAPI=s(),p.insertStyleElement=c(),t()(m(),p),m()&&m().locals&&m().locals;var b=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var t=this;this.mouseDetected=!1,this.mouseMoveHandler=function(){return function(e){window.removeEventListener("mousedown",t.mouseMoveHandler,!1),window.removeEventListener("touchstart",t.mouseMoveHandler,!1),"touchstart"===e.type?(e.stopPropagation(),t.mouseDetected=!1):t.mouseDetected=!0}},window.addEventListener("mousedown",this.mouseMoveHandler,!1),window.addEventListener("touchstart",this.mouseMoveHandler,!1)}return t=e,i=[{key:"ClassPref",get:function(){return"pgc-rev-utils-"}},{key:"ICONS",get:function(){return{MORE_SVG:'<svg height="48" viewBox="0 0 48 48" width="48"><path d="M0 0h48v48h-48z" fill="none"/><path d="M12 20c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm24 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4zm-12 0c-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4-1.79-4-4-4z"/></svg>',ARR_DOWN_SVG:'<svg height="48" viewBox="0 0 48 48" width="48"><path d="M14.83 16.42l9.17 9.17 9.17-9.17 2.83 2.83-12 12-12-12z"/><path d="M0-.75h48v48h-48z" fill="none"/></svg>',ZOOM_SVG:'<svg enable-background="new 0 0 32 32" id="Glyph" viewBox="0 0 32 32"><path d="M27.414,24.586l-5.077-5.077C23.386,17.928,24,16.035,24,14c0-5.514-4.486-10-10-10S4,8.486,4,14  s4.486,10,10,10c2.035,0,3.928-0.614,5.509-1.663l5.077,5.077c0.78,0.781,2.048,0.781,2.828,0  C28.195,26.633,28.195,25.367,27.414,24.586z M7,14c0-3.86,3.14-7,7-7s7,3.14,7,7s-3.14,7-7,7S7,17.86,7,14z" id="XMLID_223_"/></svg>',MAXIMIZE_SVG:'<svg fill="none" height="24" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" viewBox="0 0 24 24" width="24"><polyline points="15 3 21 3 21 9"/><polyline points="9 21 3 21 3 15"/><line x1="21" x2="14" y1="3" y2="10"/><line x1="3" x2="10" y1="21" y2="14"/></svg>',NOTE_SVG:'<svg viewBox="0 0 58 94"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736   c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451   c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',VIMEO_SVG:'<svg enable-background="new 0 0 56.693 56.693" height="56.693px" viewBox="-5 -5 66.693 66.693" width="56.693px"><path d="M3.602,22.974l2.01,2.636c0,0,4.146-3.267,5.528-1.634c1.382,1.634,6.656,21.357,8.417,24.997  c1.537,3.192,5.777,7.413,10.426,4.397c4.646-3.014,20.098-16.205,22.863-31.781c2.764-15.574-18.594-12.313-20.854,1.256  c5.652-3.395,8.671,1.38,5.778,6.784c-2.889,5.399-5.527,8.921-6.908,8.921c-1.379,0-2.441-3.612-4.021-9.928  c-1.635-6.53-1.624-18.291-8.416-16.958C12.019,12.921,3.602,22.974,3.602,22.974z"/></svg>',YOU_TUBE_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24"><title/><path d="M21.80731,7.805a2.79915,2.79915,0,0,0-2.54907-2.53906C17.69061,5.13586,15.36707,5,12.50012,5c-3.45251,0-6.05865.14105-7.74353.27332A2.79932,2.79932,0,0,0,2.1925,7.815C2.08936,8.90021,2,10.33344,2,12.0423c0,1.66632.08862,3.07422.19128,4.14594a2.79852,2.79852,0,0,0,2.56384,2.53833C6.43994,18.85883,9.04657,19,12.50012,19c2.86694,0,5.19049-.13586,6.75812-.266a2.799,2.799,0,0,0,2.54907-2.539C21.91052,15.11548,22,13.69189,22,12S21.91052,8.88452,21.80731,7.805ZM9.77594,14.93878V9.06122L15.574,12Z"/></svg>',BOOKMARK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1420 128q23 0 44 9 33 13 52.5 41t19.5 62v1289q0 34-19.5 62t-52.5 41q-19 8-44 8-48 0-83-32l-441-424-441 424q-36 33-83 33-23 0-44-9-33-13-52.5-41t-19.5-62v-1289q0-34 19.5-62t52.5-41q21-9 44-9h1048z"/></svg>',HEART_SVG:'<svg enable-background="new 0 0 51 46" height="46px" viewBox="0 0 51 46" width="51px"><path d="M46.188,4.101c-5.529-5.53-14.495-5.53-20.023,0L25.39,4.875l-0.996-0.774c-5.529-5.53-14.715-5.53-20.245,0  C-1.38,9.63-1.27,18.595,4.26,24.125l18.753,18.643c0.671,0.671,1.4,1.258,2.376,1.766c0.76-0.508,1.483-1.095,2.155-1.766  l18.643-18.643C51.717,18.595,51.717,9.63,46.188,4.101z""/></svg>',HEART_2_SVG:'<svg enable-background="new 0 0 24 24" viewBox="0 0 24 24"><path d="M16.4,6c2,0,3.6,1.6,3.6,3.6c0,2-3.9,6.4-8,9.8c-4.1-3.5-8-7.9-8-9.8C4,7.6,5.6,6,7.6,6C10,6,12,9,12,9S13.9,6,16.4,6   M16.4,4C14.6,4,13,4.9,12,6.3C11,4.9,9.4,4,7.6,4C4.5,4,2,6.5,2,9.6C2,14,12,22,12,22s10-8,10-12.4C22,6.5,19.5,4,16.4,4L16.4,4z"/></svg>',COMENTS_SVG:'<svg style="enable-background:new 0 0 24 24;" viewBox="0 0 24 24"><g id="info"/><g id="icons"><path d="M20,1H4C1.8,1,0,2.8,0,5v10c0,2.2,1.8,4,4,4v3c0,0.9,1.1,1.3,1.7,0.7L9.4,19H20c2.2,0,4-1.8,4-4V5   C24,2.8,22.2,1,20,1z M14,13H8c-0.6,0-1-0.4-1-1c0-0.6,0.4-1,1-1h6c0.6,0,1,0.4,1,1C15,12.6,14.6,13,14,13z M16,9H8   C7.4,9,7,8.6,7,8c0-0.6,0.4-1,1-1h8c0.6,0,1,0.4,1,1C17,8.6,16.6,9,16,9z" id="message"/></g></svg>',COMENTS_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" viewBox="0 0 64 64" width="64px"><g><path d="M47.964,8.127H16.036c-4.4,0-8,3.6-8,8v20.977c0,4.4,3.6,8,8,8h7.397v10.768l13.333-10.768h11.197c4.4,0,8-3.6,8-8V16.127   C55.964,11.727,52.364,8.127,47.964,8.127z M50.964,37.104c0,1.626-1.374,3-3,3H36.767H35l-1.375,1.11l-5.191,4.193v-0.303v-5h-5   h-7.397c-1.626,0-3-1.374-3-3V16.127c0-1.626,1.374-3,3-3h31.928c1.626,0,3,1.374,3,3V37.104z"/><circle cx="21.743" cy="26.617" r="2.913"/><circle cx="32" cy="26.617" r="2.913"/><circle cx="42.256" cy="26.617" r="2.913"/></g></svg>',INFO_SVG:'<svg height="100px" id="Capa_1" style="enable-background:new 0 0 46 100;" viewBox="0 0 46 100" width="46px"><g><path d="M35.162,0c6.696,0,10.043,4.567,10.043,9.789c0,6.522-5.814,12.555-13.391,12.555c-6.344,0-10.045-3.752-9.869-9.947   C21.945,7.176,26.35,0,35.162,0z M14.543,100c-5.287,0-9.164-3.262-5.463-17.615l6.07-25.457c1.057-4.077,1.23-5.707,0-5.707   c-1.588,0-8.451,2.816-12.51,5.59L0,52.406C12.863,41.48,27.662,35.072,34.004,35.072c5.285,0,6.168,6.361,3.525,16.148   L30.58,77.98c-1.234,4.729-0.703,6.359,0.527,6.359c1.586,0,6.787-1.963,11.896-6.041L46,82.377C33.488,95.1,19.83,100,14.543,100z   "/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',DOWNLOAD_SVG:'<svg viewBox="0 0 24 24"><g id="info"/><g id="icons"><g id="save"><path d="M11.2,16.6c0.4,0.5,1.2,0.5,1.6,0l6-6.3C19.3,9.8,18.8,9,18,9h-4c0,0,0.2-4.6,0-7c-0.1-1.1-0.9-2-2-2c-1.1,0-1.9,0.9-2,2    c-0.2,2.3,0,7,0,7H6c-0.8,0-1.3,0.8-0.8,1.4L11.2,16.6z"/><path d="M19,19H5c-1.1,0-2,0.9-2,2v0c0,0.6,0.4,1,1,1h16c0.6,0,1-0.4,1-1v0C21,19.9,20.1,19,19,19z"/></g></g></svg>',DOWNLOAD_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" viewBox="0 0 64 64" width="64px"><g><path d="M40.001,36.254c0,3.299-2.673,5.971-5.97,5.971H29.97c-3.297,0-5.97-2.672-5.97-5.971H8v17c0,2.209,1.791,4,4,4h40   c2.209,0,4-1.791,4-4v-17H40.001z"/><path d="M31.916,33.246l7.608-7.452c0.747-0.733,0.506-1.327-0.543-1.327h-4.565V9.246c0-1.381-1.119-2.5-2.5-2.5   s-2.5,1.119-2.5,2.5v15.221h-4.565c-1.05,0-1.291,0.595-0.542,1.327L31.916,33.246z"/></g></svg>',LINK_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1520 1216q0-40-28-68l-208-208q-28-28-68-28-42 0-72 32 3 3 19 18.5t21.5 21.5 15 19 13 25.5 3.5 27.5q0 40-28 68t-68 28q-15 0-27.5-3.5t-25.5-13-19-15-21.5-21.5-18.5-19q-33 31-33 73 0 40 28 68l206 207q27 27 68 27 40 0 68-26l147-146q28-28 28-67zm-703-705q0-40-28-68l-206-207q-28-28-68-28-39 0-68 27l-147 146q-28 28-28 67 0 40 28 68l208 208q27 27 68 27 42 0 72-31-3-3-19-18.5t-21.5-21.5-15-19-13-25.5-3.5-27.5q0-40 28-68t68-28q15 0 27.5 3.5t25.5 13 19 15 21.5 21.5 18.5 19q33-31 33-73zm895 705q0 120-85 203l-147 146q-83 83-203 83-121 0-204-85l-206-207q-83-83-83-203 0-123 88-209l-88-88q-86 88-208 88-120 0-204-84l-208-208q-84-84-84-204t85-203l147-146q83-83 203-83 121 0 204 85l206 207q83 83 83 203 0 123-88 209l88 88q86-88 208-88 120 0 204 84l208 208q84 84 84 204z"/></svg>',LINK_2_SVG:'<svg data-name="Layer 21" height="24" id="Layer_21" viewBox="0 0 24 24" width="24"><title/><path d="M9.87012,5.541l4.26953,4.26953a2.02108,2.02108,0,0,1,0,2.855l-1.42383,1.42285,1.41406,1.415,1.42383-1.42334a4.02449,4.02449,0,0,0,0-5.68359L11.28418,4.127a4.01858,4.01858,0,0,0-5.68359,0L4.17676,5.55029a4.02212,4.02212,0,0,0,0,5.68311L5.59082,9.81934a2.02108,2.02108,0,0,1,0-2.855L7.01465,5.541A2.06778,2.06778,0,0,1,9.87012,5.541Z"/><path d="M19.82324,12.666l-1.41406,1.41406a2.02108,2.02108,0,0,1,0,2.855L16.98535,18.3584a2.06778,2.06778,0,0,1-2.85547,0L9.86035,14.08887a2.02108,2.02108,0,0,1,0-2.855L11.28418,9.811,9.87012,8.396,8.44629,9.81934a4.02449,4.02449,0,0,0,0,5.68359l4.26953,4.26953a4.01917,4.01917,0,0,0,5.68359.00049l1.42383-1.42334A4.02449,4.02449,0,0,0,19.82324,12.666Z"/></svg>',SHARE_SVG:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1344 1024q133 0 226.5 93.5t93.5 226.5-93.5 226.5-226.5 93.5-226.5-93.5-93.5-226.5q0-12 2-34l-360-180q-92 86-218 86-133 0-226.5-93.5t-93.5-226.5 93.5-226.5 226.5-93.5q126 0 218 86l360-180q-2-22-2-34 0-133 93.5-226.5t226.5-93.5 226.5 93.5 93.5 226.5-93.5 226.5-226.5 93.5q-126 0-218-86l-360 180q2 22 2 34t-2 34l360 180q92-86 218-86z"/></svg>',SHARE_2_SVG:'<svg enable-background="new 0 0 64 64" height="64px" viewBox="0 0 64 64" width="64px"><path d="M48,39.26c-2.377,0-4.515,1-6.033,2.596L24.23,33.172c0.061-0.408,0.103-0.821,0.103-1.246c0-0.414-0.04-0.818-0.098-1.215  l17.711-8.589c1.519,1.609,3.667,2.619,6.054,2.619c4.602,0,8.333-3.731,8.333-8.333c0-4.603-3.731-8.333-8.333-8.333  s-8.333,3.73-8.333,8.333c0,0.414,0.04,0.817,0.098,1.215l-17.711,8.589c-1.519-1.609-3.666-2.619-6.054-2.619  c-4.603,0-8.333,3.731-8.333,8.333c0,4.603,3.73,8.333,8.333,8.333c2.377,0,4.515-1,6.033-2.596l17.737,8.684  c-0.061,0.407-0.103,0.821-0.103,1.246c0,4.603,3.731,8.333,8.333,8.333s8.333-3.73,8.333-8.333C56.333,42.99,52.602,39.26,48,39.26  z"/></svg>',FULL_SCREEN_SVG:'<svg height="14px" viewBox="0 0 14 14" width="14px"><title/><desc/><defs/><g fill-rule="evenodd" id="Page-1" stroke="none" stroke-width="1"><g transform="translate(-215.000000, -257.000000)"><g transform="translate(215.000000, 257.000000)"><path d="M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z" id="Shape"/></g></g></g></svg>',NORMAL_SCREEN_SVG:'<svg height="14px" viewBox="0 0 14 14" width="14px"><g fill-rule="evenodd" stroke="none" stroke-width="1"><g id="Core" transform="translate(-257.000000, -257.000000)"><g id="fullscreen-exit" transform="translate(257.000000, 257.000000)"><path d="M0,11 L3,11 L3,14 L5,14 L5,9 L0,9 L0,11 L0,11 Z M3,3 L0,3 L0,5 L5,5 L5,0 L3,0 L3,3 L3,3 Z M9,14 L11,14 L11,11 L14,11 L14,9 L9,9 L9,14 L9,14 Z M11,3 L11,0 L9,0 L9,5 L14,5 L14,3 L11,3 L11,3 Z" id="Shape"/></g></g></g></svg>',CLOSE_SVG:'<svg height="512px"  viewBox="0 0 512 512" width="512px"><path d="M437.5,386.6L306.9,256l130.6-130.6c14.1-14.1,14.1-36.8,0-50.9c-14.1-14.1-36.8-14.1-50.9,0L256,205.1L125.4,74.5  c-14.1-14.1-36.8-14.1-50.9,0c-14.1,14.1-14.1,36.8,0,50.9L205.1,256L74.5,386.6c-14.1,14.1-14.1,36.8,0,50.9  c14.1,14.1,36.8,14.1,50.9,0L256,306.9l130.6,130.6c14.1,14.1,36.8,14.1,50.9,0C451.5,423.4,451.5,400.6,437.5,386.6z"/></svg>',VIEW_SVG:'<svg enable-background="new 0 0 167 93" height="93px" viewBox="0 0 167 93" width="167px"><g><path d="M83.25,29.25c-9.649,0-17.5,7.851-17.5,17.5s7.851,17.5,17.5,17.5s17.5-7.851,17.5-17.5   S92.899,29.25,83.25,29.25z"/><path d="M83.25,0.75c-45.84,0-83,46-83,46s37.16,46,83,46s83-46,83-46S129.09,0.75,83.25,0.75z M83.25,81.25   c-19.054,0-34.5-15.445-34.5-34.5c0-19.054,15.446-34.5,34.5-34.5s34.5,15.446,34.5,34.5C117.75,65.805,102.304,81.25,83.25,81.25z   "/></g></svg>',FB_SVG_COLOR:'<svg viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M27.6 3h-23.2c-.8 0-1.4.6-1.4 1.4v23.1c0 .9.6 1.5 1.4 1.5h12.5v-10.1h-3.4v-3.9h3.4v-2.9c0-3.4 2.1-5.2 5-5.2 1.4 0 2.7.1 3 .2v3.5h-2.1c-1.6 0-1.9.8-1.9 1.9v2.5h3.9l-.5 3.9h-3.4v10.1h6.6c.8 0 1.4-.6 1.4-1.4v-23.2c.1-.8-.5-1.4-1.3-1.4z"></path></svg>',FB_SVG:'<svg enable-background="new 0 0 32 32" viewBox="0 0 32 32"><g id="Flat_copy"><path d="M11.848,32h6.612V15.998h4.411l0.584-5.514H18.46l0.007-2.761c0-1.437,0.137-2.209,2.2-2.209h2.757V0h-4.412   c-5.299,0-7.164,2.675-7.164,7.174v3.311H8.545v5.515h3.303V32z"/></g></svg>',TW_SVG:'<svg xmlns="http://www.w3.org/2000/svg" width="1200" height="1227" viewBox="0 0 1200 1227" fill="none"><g><path d="M714.163 519.284L1160.89 0H1055.03L667.137 450.887L357.328 0H0L468.492 681.821L0 1226.37H105.866L515.491 750.218L842.672 1226.37H1200L714.137 519.284H714.163ZM569.165 687.828L521.697 619.934L144.011 79.6944H306.615L611.412 515.685L658.88 583.579L1055.08 1150.3H892.476L569.165 687.854V687.828Z"/></g></svg>',PIN_SVG:'<svg viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M16 3c-7.2 0-13 5.8-13 13 0 5.5 3.4 10.2 8.3 12.1-.1-1-.2-2.6 0-3.7.2-1 1.5-6.5 1.5-6.5s-.4-.8-.4-1.9c0-1.8 1-3.2 2.4-3.2 1.1 0 1.6.8 1.6 1.8 0 1.1-.7 2.8-1.1 4.3-.3 1.3.6 2.3 1.9 2.3 2.3 0 4.1-2.4 4.1-6 0-3.1-2.2-5.3-5.4-5.3-3.7 0-5.9 2.8-5.9 5.6 0 1.1.4 2.3 1 3 .1.1.1.2.1.4-.1.4-.3 1.3-.4 1.5-.1.2-.2.3-.4.2-1.6-.8-2.6-3.1-2.6-5 0-4.1 3-7.9 8.6-7.9 4.5 0 8 3.2 8 7.5 0 4.5-2.8 8.1-6.7 8.1-1.3 0-2.6-.7-3-1.5 0 0-.7 2.5-.8 3.1-.3 1.1-1.1 2.5-1.6 3.4 1.2.4 2.5.6 3.8.6 7.2 0 13-5.8 13-13 0-7.1-5.8-12.9-13-12.9z"></path></svg>',NEXT_ARR:'<svg height="512px" viewBox="0 0 512 512" width="512px"><polygon points="160,115.4 180.7,96 352,256 180.7,416 160,396.7 310.5,256 "/></svg>',PREV_ARR:'<svg height="512px" viewBox="0 0 512 512" width="512px"><polygon points="352,115.4 331.3,96 160,256 331.3,416 352,396.7 201.5,256 "/></svg>',ZOOM_IN_SVG:'<svg enable-background="new 0 0 512 512" height="512px" viewBox="0 0 512 512" width="512px"><path d="M497.913,497.914c-18.782,18.781-49.226,18.781-68.008,0l-84.862-84.864c-34.89,22.366-76.131,35.718-120.66,35.718  C100.468,448.768,0,348.314,0,224.384C0,100.454,100.468,0,224.383,0c123.931,0,224.384,100.453,224.384,224.384  c0,44.529-13.353,85.771-35.718,120.675l84.863,84.849C516.695,448.689,516.695,479.131,497.913,497.914z M224.383,64.11  c-88.511,0-160.274,71.763-160.274,160.274c0,88.526,71.764,160.274,160.274,160.274c88.526,0,160.273-71.748,160.273-160.274  C384.656,135.873,312.909,64.11,224.383,64.11z M256.438,320.548h-64.108v-64.109H128.22V192.33h64.109v-64.11h64.108v64.11h64.11  v64.109h-64.11V320.548z"/></svg>',ZOOM_OUT_SVG:'<svg enable-background="new 0 0 512 512" height="512px" viewBox="0 0 512 512" width="512px"><g><g><path d="M497.913,429.906l-84.863-84.848c22.365-34.903,35.718-76.146,35.718-120.676C448.768,100.453,348.314,0,224.383,0    C100.468,0,0,100.453,0,224.384s100.468,224.384,224.383,224.384c44.529,0,85.771-13.352,120.66-35.718l84.862,84.864    c18.782,18.781,49.226,18.781,68.008,0C516.695,479.131,516.695,448.689,497.913,429.906z M224.383,384.658    c-88.511,0-160.274-71.748-160.274-160.274c0-88.511,71.764-160.274,160.274-160.274c88.526,0,160.273,71.763,160.273,160.274    C384.656,312.91,312.909,384.658,224.383,384.658z M128.219,256.438h192.329v-64.109H128.219V256.438z"/></g></g></svg>',PLAY_SVG:'<svg height="512px" enable-background:new 0 0 512 512 viewBox="0 0 512 512" width="512px"><path d="M405.2,232.9L126.8,67.2c-3.4-2-6.9-3.2-10.9-3.2c-10.9,0-19.8,9-19.8,20H96v344h0.1c0,11,8.9,20,19.8,20  c4.1,0,7.5-1.4,11.2-3.4l278.1-165.5c6.6-5.5,10.8-13.8,10.8-23.1C416,246.7,411.8,238.5,405.2,232.9z"/></svg>',PAUSE_SVG:'<svg height="512px" enable-background:new 0 0 512 512 viewBox="0 0 512 512" width="512px"><g><path d="M224,435.8V76.1c0-6.7-5.4-12.1-12.2-12.1h-71.6c-6.8,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6   C218.6,448,224,442.6,224,435.8z"/><path d="M371.8,64h-71.6c-6.7,0-12.2,5.4-12.2,12.1v359.7c0,6.7,5.4,12.2,12.2,12.2h71.6c6.7,0,12.2-5.4,12.2-12.2V76.1   C384,69.4,378.6,64,371.8,64z"/></g></svg>',USER_SVG:'<svg viewBox="0 0 24 24"><g id="info"/><g id="icons"><path d="M12,0C5.4,0,0,5.4,0,12c0,6.6,5.4,12,12,12s12-5.4,12-12C24,5.4,18.6,0,12,0z M12,4c2.2,0,4,2.2,4,5s-1.8,5-4,5   s-4-2.2-4-5S9.8,4,12,4z M18.6,19.5C16.9,21,14.5,22,12,22s-4.9-1-6.6-2.5c-0.4-0.4-0.5-1-0.1-1.4c1.1-1.3,2.6-2.2,4.2-2.7   c0.8,0.4,1.6,0.6,2.5,0.6s1.7-0.2,2.5-0.6c1.7,0.5,3.1,1.4,4.2,2.7C19.1,18.5,19.1,19.1,18.6,19.5z" id="user2"/></g></svg>',ATTENTION_SVG:'<svg enable-background="new 0 0 91.8 92.6" viewBox="0 0 91.8 92.6"><path d="M45.9,3.6c-23.5,0-42.5,19-42.5,42.5c0,23.5,19,42.5,42.5,42.5c23.5,0,42.5-19,42.5-42.5  C88.4,22.7,69.4,3.6,45.9,3.6z M43.7,21.1h4.3c0.5,0,0.9,0.4,0.9,0.9l-0.6,34.5c0,0.5-0.4,0.9-0.9,0.9h-3c-0.5,0-0.9-0.4-0.9-0.9  L42.8,22C42.8,21.5,43.2,21.1,43.7,21.1z M48.6,71.2c-0.8,0.8-1.7,1.1-2.7,1.1c-1,0-1.9-0.3-2.6-1c-0.8-0.7-1.3-1.8-1.3-2.9  c0-1,0.4-1.9,1.1-2.7c0.7-0.8,1.8-1.2,2.9-1.2c1.2,0,2.2,0.5,3,1.4c0.5,0.6,0.8,1.3,0.9,2.1C49.9,69.3,49.5,70.3,48.6,71.2z"/></svg>',POST_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-1024-864q0-14 9-23t23-9h704q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64zm736 224q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704zm0 256q14 0 23 9t9 23v64q0 14-9 23t-23 9h-704q-14 0-23-9t-9-23v-64q0-14 9-23t23-9h704z"/></svg>',VIDEO_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-640-896q52 0 90 38t38 90v384q0 52-38 90t-90 38h-384q-52 0-90-38t-38-90v-384q0-52 38-90t90-38h384zm492 2q20 8 20 30v576q0 22-20 30-8 2-12 2-14 0-23-9l-265-266v-90l265-266q9-9 23-9 4 0 12 2z"/></svg>',AUDIO_TYPE:'<svg height="1792" viewBox="0 0 1792 1792" width="1792"><path d="M1596 380q28 28 48 76t20 88v1152q0 40-28 68t-68 28h-1344q-40 0-68-28t-28-68v-1600q0-40 28-68t68-28h896q40 0 88 20t76 48zm-444-244v376h376q-10-29-22-41l-313-313q-12-12-41-22zm384 1528v-1024h-416q-40 0-68-28t-28-68v-416h-768v1536h1280zm-788-814q20 8 20 30v544q0 22-20 30-8 2-12 2-12 0-23-9l-166-167h-131q-14 0-23-9t-9-23v-192q0-14 9-23t23-9h131l166-167q16-15 35-7zm417 689q31 0 50-24 129-159 129-363t-129-363q-16-21-43-24t-47 14q-21 17-23.5 43.5t14.5 47.5q100 123 100 282t-100 282q-17 21-14.5 47.5t23.5 42.5q18 15 40 15zm-211-148q27 0 47-20 87-93 87-219t-87-219q-18-19-45-20t-46 17-20 44.5 18 46.5q52 57 52 131t-52 131q-19 20-18 46.5t20 44.5q20 17 44 17z"/></svg>',GRID_SVG:'<svg height="32" viewBox="0 0 32 32" width="32"><path d=" M2 2 L10 2 L10 10 L2 10z M12 2 L20 2 L20 10 L12 10z M22 2 L30 2 L30 10 L22 10z M2 12 L10 12 L10 20 L2 20z M12 12 L20 12 L20 20 L12 20z M22 12 L30 12 L30 20 L22 20z M2 22 L10 22 L10 30 L2 30z M12 22 L20 22 L20 30 L12 30z M22 22 L30 22 L30 30 L22 30z "/></svg>',SHOP_SVG:'<svg xmlns= height="24" viewBox="0 0 24 24" width="24"><circle cx="8" cy="21" r="3"></circle><circle cx="20" cy="21" r="3"></circle><path d="M5.67,6H23l-1.68,8.39a2,2,0,0,1-2,1.61H8.75a2,2,0,0,1-2-1.74L5.23,2.74A2,2,0,0,0,3.25,1H1"></path></svg>',EXPAND_SVG:'<svg enable-background="new 0 0 2048 2048" height="2048px" viewBox="0.0 0 1536.0 2048" width="1536.0px"><path d="M755,1184c0,8.667-3.333,16.333-10,23l-332,332l144,144c12.667,12.667,19,27.667,19,45s-6.333,32.333-19,45  s-27.667,19-45,19H64c-17.333,0-32.333-6.333-45-19s-19-27.667-19-45v-448c0-17.333,6.333-32.333,19-45s27.667-19,45-19  s32.333,6.333,45,19l144,144l332-332c6.667-6.667,14.333-10,23-10s16.333,3.333,23,10l114,114  C751.667,1167.667,755,1175.333,755,1184z M1536,320v448c0,17.333-6.333,32.333-19,45s-27.667,19-45,19s-32.333-6.333-45-19  l-144-144l-332,332c-6.667,6.667-14.333,10-23,10s-16.333-3.333-23-10L791,887c-6.667-6.667-10-14.333-10-23s3.333-16.333,10-23  l332-332L979,365c-12.667-12.667-19-27.667-19-45s6.333-32.333,19-45s27.667-19,45-19h448c17.333,0,32.333,6.333,45,19  S1536,302.667,1536,320z"/></svg>',REDUCE_SVG:'<svg enable-background="new 0 0 2048 2048" height="2048px" viewBox="13.0 0 1510.0 2048" width="1510.0px"><path d="M768,1088v448c0,17.333-6.333,32.333-19,45s-27.667,19-45,19s-32.333-6.333-45-19l-144-144l-332,332  c-6.667,6.667-14.333,10-23,10s-16.333-3.333-23-10L23,1655c-6.667-6.667-10-14.333-10-23s3.333-16.333,10-23l332-332l-144-144  c-12.667-12.667-19-27.667-19-45s6.333-32.333,19-45s27.667-19,45-19h448c17.333,0,32.333,6.333,45,19S768,1070.667,768,1088z   M1523,416c0,8.667-3.333,16.333-10,23l-332,332l144,144c12.667,12.667,19,27.667,19,45s-6.333,32.333-19,45s-27.667,19-45,19H832  c-17.333,0-32.333-6.333-45-19s-19-27.667-19-45V512c0-17.333,6.333-32.333,19-45s27.667-19,45-19s32.333,6.333,45,19l144,144  l332-332c6.667-6.667,14.333-10,23-10s16.333,3.333,23,10l114,114C1519.667,399.667,1523,407.333,1523,416z"/></svg>'}}},{key:"createPreloaderView",value:function(t){var i=0,a=document.createElement("div");a.className="".concat(e.ClassPref,"preloader");var s=document.createElement("div");s.className="".concat(e.ClassPref,"static"),s.style.width="".concat(8,"px"),s.style.height="".concat(8,"px"),s.style.margin="".concat(-4,"px"),s.style.backgroundColor=t,a.appendChild(s);var o=document.createElement("div");o.className="".concat(e.ClassPref,"spinner"),o.style.position="absolute",o.style.width="".concat(36,"px"),o.style.height="".concat(36,"px"),o.style.margin="".concat(-18,"px");for(var n=0;n<8;n+=1){var r=document.createElement("div");r.className="".concat(e.ClassPref,"point"),r.style.marginTop="".concat(-4,"px"),r.style.marginLeft="".concat(-4,"px"),r.style.width="".concat(8,"px"),r.style.height="".concat(8,"px"),r.style.backgroundColor=t,r.style.transform="rotate(".concat(i,"deg) translate(").concat(18,"px)"),i+=45,o.appendChild(r)}return a.appendChild(o),a}},{key:"passiveListener",get:function(){var e=!1;try{var t={get:function(){e=!0}},i=Object.defineProperty({},"passive",t);window.addEventListener("testPassive",null,i),window.removeEventListener("testPassive",null,i)}catch(e){}return!!e&&{passive:!1,capture:!1}}},{key:"requestAnimationFrame",value:function(e){return(window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||window.msRequestAnimationFrame)(e)}},{key:"cancelAnimationFrame",value:function(e){(window.cancelAnimationFrame||window.mozCancelAnimationFrame)(e)}},{key:"whichTransitionEventEnd",value:function(){var e=document.createElement("fakeelement"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"},i=Object.keys(t);for(var a in i)if(void 0!==e.style[a])return t[a]}},{key:"Device",get:function(){var e=window,t=e.navigator.userAgent,i={ios:!1,android:!1,androidChrome:!1,desktop:!1,windows:!1,iphone:!1,ipod:!1,ipad:!1,cordova:e.cordova||e.phonegap,phonegap:e.cordova||e.phonegap,browser:{ie11:!1}},a=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),s=t.match(/(Android);?[\s\/]+([\d.]+)?/),o=t.match(/(iPad).*OS\s([\d_]+)/),n=t.match(/(iPod)(.*OS\s([\d_]+))?/),r=!o&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(a&&(i.os="windows",i.osVersion=a[2],i.windows=!0),s&&!a&&(i.os="android",i.osVersion=s[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||r||n)&&(i.os="ios",i.ios=!0),r&&!n&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),o&&(i.osVersion=o[2].replace(/_/g,"."),i.ipad=!0),n&&(i.osVersion=n[3]?n[3].replace(/_/g,"."):null,i.iphone=!0),i.ios&&i.osVersion&&t.indexOf("Version/")>=0&&"10"===i.osVersion.split(".")[0]&&(i.osVersion=t.toLowerCase().split("version/")[1].split(" ")[0]),i.desktop=!(i.os||i.android||i.webView),i.webView=(r||o||n)&&t.match(/.*AppleWebKit(?!.*Safari)/i),i.os&&"ios"===i.os){var l=i.osVersion.split("."),h=document.querySelector('meta[name="viewport"]');i.minimalUi=!i.webView&&(n||r)&&(1*l[0]==7?1*l[1]>=1:1*l[0]>7)&&h&&h.getAttribute("content").indexOf("minimal-ui")>=0}i.pixelRatio=e.devicePixelRatio||1,t.indexOf("Trident/7.0")>-1&&(i.browser.ie11=!0);var c=t.indexOf("Chrome")>-1;i.browser.explorer=t.indexOf("MSIE")>-1,i.browser.firefox=t.indexOf("Firefox")>-1;var d=t.indexOf("Safari")>-1,u=t.toLowerCase().indexOf("op")>-1;return i.browser.opera=u,i.browser.chrome=(!c||!u)&&c,i.browser.safari=(!c||!d)&&d,i}},{key:"preloadedAttributForVideo",get:function(){return e.Device.browser.safari?"auto":"metadata"}},{key:"isTouchDevice",get:function(){try{return document.createEvent("TouchEvent"),!0}catch(e){return!1}}},{key:"isiPpad",get:function(){return 768===window.screen.height&&1024===window.screen.width||1024===window.screen.height&&768===window.screen.width||1366===window.screen.height&&1024===window.screen.width||1024===window.screen.height&&1366===window.screen.width}},{key:"getScrollbarWidth",get:function(){var e=document.createElement("div");e.style.visibility="hidden",e.style.width="100px",e.style.msOverflowStyle="scrollbar",document.body.appendChild(e);var t=e.offsetWidth;e.style.overflow="scroll";var i=document.createElement("div");i.style.width="100%",e.appendChild(i);var a=i.offsetWidth;return e.parentNode.removeChild(e),t-a}},{key:"hasScrollbar",get:function(){var e="BackCompat"===document.compatMode?document.body:document.documentElement;return e.scrollHeight>e.clientHeight}},{key:"miniScreen",get:function(){return window.screen.height<500||window.screen.width<500}},{key:"addParamsToURL",value:function(t,i,a){if(e.Device.browser.ie11)return"".concat(t+(t.indexOf("?")>=0?"&":"?")+encodeURIComponent(i),"=").concat(encodeURIComponent(a));var s=(t=new URL(t)).search,o=new URLSearchParams(s);return o.append(i,a),t.search=o.toString(),t.toString()}},{key:"youTubeCode",get:function(){return'<iframe src="https://www.youtube.com/embed/%id%?autoplay=1&rel=0&showinfo=0&wmode=transparent" allow="autoplay" frameborder="0" allowfullscreen></iframe>'}},{key:"vimeoCode",get:function(){return'<iframe data-id="sgb-video-player" src="https://player.vimeo.com/video/%id%?%hash%autoplay=1&byline=0&portrait=0&transparent=0" frameborder=“0” allowfullscreen allow=autoplay></iframe>'}},{key:"mediaEl",value:function(t){var i=document.createElement(t);return i.className="thumb-".concat(t,"-content"),i.setAttribute("preload","metadata"),i.setAttribute("controlsList","nodownload"),"video"===t&&(i.setAttribute("preload",e.Device.browser.safari||e.Device.browser.opera?"auto":"metadata"),i.setAttribute("webkit-playsinline",""),i.setAttribute("playsinline","")),i}},{key:"embedVideoEl",value:function(e,t,i){var a=document.createElement("iframe");if(a.setAttribute("allow","autoplay"),a.setAttribute("allowfullscreen",""),a.setAttribute("frameborder","0"),"youtube"===e)a.src="https://www.youtube.com/embed/".concat(t,"?autoplay=1&rel=0&showinfo=0&wmode=transparent");else if("vimeo"===e){var s=i?"h="+i+"&":"";a.src="https://player.vimeo.com/video/".concat(t,"?").concat(s,"autoplay=1&byline=0&portrait=0&transparent=0")}return a}},{key:"copyProperties",value:function(e,t){for(var i=[],a=Object.keys(e),s=0;s<a.length;s+=1){var o=a[s];void 0!==e[o]&&(Object.prototype.hasOwnProperty.call(t,o)?t[o]!==e[o]&&i.push(o):i.push(o),t[o]=e[o])}return i}},{key:"setStyleForElFomObj",value:function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e.style[i]=t[i])}},{key:"shuffle",value:function(e){for(var t,i,a=e.length;0!==a;)i=Math.floor(Math.random()*a),t=e[a-=1],e[a]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,a){return{x:e,y:t,width:i,height:a}}},{key:"Size",value:function(e,t){return{width:e,height:t}}},{key:"Point",value:function(e,t){return{x:e,y:t}}},{key:"SvgWithImage",value:function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","svg");t.setAttribute("viewBox","0 0 1 1"),t.setAttribute("version","1.1"),t.setAttribute("role","img");var i=document.createElementNS("http://www.w3.org/2000/svg","image");return i.setAttributeNS("http://www.w3.org/1999/xlink","href",e),i.setAttribute("width","100%"),i.setAttribute("height","100%"),i.setAttribute("x","0"),i.setAttribute("y","0"),i.setAttribute("preserveAspectRatio","xMidYMid slice"),t.appendChild(i),t}},{key:"findHighestZIndex",value:function(e){for(var t,i=99999,a=0;a<e.childNodes.length;a+=1){var s=e.childNodes[a];1===s.nodeType&&"SCRIPT"!==s.nodeName&&(t=document.defaultView.getComputedStyle(s,null).getPropertyValue("z-index")),t>i&&"auto"!==t&&(i=parseInt(t,10))}return i}},{key:"escape",value:function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};return e.replace(/[&<>"']/g,(function(e){return t[e]}))}},{key:"trace",value:function(e){if(1!==arguments.length){for(var t="",i=0;i<arguments.length;i+=1)t+="".concat(arguments[i]," , ");t=t.slice(0,-2),console.log(t)}else console.log(e)}},{key:"preventDefaultForScrollKeys",value:function(e){return!{37:1,38:1,39:1,40:1}[e.keyCode]||(e.preventDefault(),!1)}},{key:"preventDefault",value:function(e){(e=e||window.event).preventDefault&&e.preventDefault(),e.returnValue=!1}},{key:"pageXOffset",get:function(){return void 0!==window.pageXOffset?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft}},{key:"pageYOffset",get:function(){return void 0!==window.pageYOffset?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop}},{key:"disableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.add("".concat(e.ClassPref,"PopUpActive"))}},{key:"enableBodyScroll",value:function(){document.getElementsByTagName("html")[0].classList.remove("".concat(e.ClassPref,"PopUpActive"))}},{key:"disableBodyScrollSlider",value:function(){if(window.addEventListener){var t=e.passiveListener,i=e.preventDefault;window.addEventListener("wheel",i,t),window.addEventListener("mousewheel",i,t),window.addEventListener("touchmove",i,t)}document.onkeydown=e.preventDefaultForScrollKeys}},{key:"enableBodyScrollSlider",value:function(){if(window.removeEventListener){var t=e.passiveListener,i=e.preventDefault;window.removeEventListener("wheel",i,t),window.removeEventListener("mousewheel",i,t),window.removeEventListener("touchmove",i,t)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(e,t){for(var i=[],a=0;a<e.childNodes.length;a+=1){var s={},o=e.childNodes[a];1===o.nodeType&&"SCRIPT"!==o.nodeName&&o!==t&&(s.element=o,s.height=null,s.overflow=null,""!==o.style.height&&(s.height=o.style.height),""!==o.style.overflow&&(s.overflow=o.style.overflow),i.push(s),o.style.overflow="hidden",o.style.height="0")}return i}},{key:"recoverElements",value:function(e){if(0!==e.length)for(var t=0;t<e.length;t+=1){var i=e[t].element;i&&(e[t].overflow?i.style.overflow=e[t].overflow:i.style.removeProperty("overflow"),e[t].height?i.style.height=e[t].height:i.style.removeProperty("height"))}}},{key:"hexToRgbaStrin",value:function(e,t){e=e.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(function(e,t,i,a){return t+t+i+i+a+a}));var i=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return i?"rgba(".concat(parseInt(i[1],16),",").concat(parseInt(i[2],16),",").concat(parseInt(i[3],16),",").concat(t,")"):null}},{key:"getFrameForBoxWithMode",value:function(t,i,a){var s=t.width,o=t.height,n=i.width,r=i.height,l=1,h=1,c=1;a?(l=n/s,h=r/o,c=Math.max(l,h)):(l=n/s,h=r/o,c=(c=Math.min(l,h))>1?1:c);var d=Math.round(s*c),u=Math.round(o*c),g=Math.round((n-d)/2),m=Math.round((r-u)/2);return e.Rect(g,m,d,u)}},{key:"getItemFrameByIndexForBox",value:function(t,i,a,s,o,n){var r=1;n&&(r=n);var l=o=Math.min(i,o),h=Math.floor(i/o),c=(l=h>1?(i-(h-1)*a)/h:i)*r,d=Math.ceil((t+1)/h)-1,u=d*(c+s),g=(t-d*h)*(l+a);return e.Rect(g,u,l,c)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var a=Math.sqrt,s=(new Date).getTime();!function o(){var n=(new Date).getTime()-s,r=n/i;if(r<1){var l=1-a(r);e.style.opacity=String(l),setTimeout(o,Math.min(25,i-n))}else e.style.opacity="0",t&&t()}()}},{key:"ellipsizeTextBoxToLine",value:function(e,t){e.innerHTML=e.textContent||e.innerText||"";var i=e.innerHTML,a=e.innerHTML.split(" ");e.innerHTML=a[0].substring(0,3);var s=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>s;)a.pop(),e.innerHTML="".concat(a.join(" ")," ...")}},{key:"ellipsizeTextBox",value:function(e){e.innerHTML=e.textContent||e.innerText||"";for(var t=e.innerHTML.split(" ");e.scrollHeight>e.offsetHeight;)t.pop(),e.innerHTML="".concat(t.join(" ")," ...")}},{key:"searchParentByClassName",value:function(t,i){if(t.parentElement){var a=t.parentElement;return a.classList.contains(i)?a:e.searchParentByClassName(a,i)}}},{key:"scrollYpositionForDiv",value:function(e){var t=(window.innerHeight-e.clientHeight)/2;return window.innerHeight-e.getBoundingClientRect().bottom<-e.clientHeight||e.getBoundingClientRect().bottom<0&&e.getBoundingClientRect().top<0?e.getBoundingClientRect().top+window.pageYOffset-t:void 0}},{key:"scrollInElementToY",value:function(e,t){var i,a=(t=Math.min(t,e.scrollHeight-e.clientHeight-1))-e.scrollTop;i=setInterval((function(){a=.05*a+.07*(t-e.scrollTop);var s=e.scrollTop+a;Math.abs(a)<1?(a=0,clearInterval(i)):e.scrollTop=s}),15),document.addEventListener("wheel",(function e(){clearInterval(i),document.removeEventListener("wheel",e,!1)}),!1)}},{key:"scrollWindowToY",value:function(e){var t,i;function a(){clearInterval(t),document.removeEventListener("wheel",a,!1)}var s=window.pageYOffset;e=Math.min(e,document.documentElement.scrollHeight-document.documentElement.clientHeight-1);var o=0,n=.05+.01*Math.abs(e-window.pageYOffset)/1e3;n=Math.min(.9,n),t=setInterval((function(){var r=(e-window.pageYOffset)*n;(r===o||Math.abs(r)<1)&&(window.scrollTo(0,e),clearInterval(t)),o=(e-window.pageYOffset)*n,s+=o,window.scrollTo(0,s),void 0===i&&((i=Math.abs(s-window.pageYOffset)>20)?(window.scrollTo(0,e),clearInterval(t)):document.addEventListener("wheel",a,!1))}),15)}},{key:"scrollToY",value:function(e,t){var i,a=window.pageYOffset,s=Math.PI/(t/15),o=a/2,n=0,r=setInterval((function(){window.pageYOffset>e?(n+=1,i=o-o*Math.cos(n*s),window.scrollTo(0,a-i)):clearInterval(r)}),15)}},{key:"isFullscreen",get:function(){return document.webkitIsFullScreen||document.mozFullScreen||!1}},{key:"toggleFullScreen",value:function(e){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.requestFullScreen=e.requestFullScreen||e.webkitRequestFullScreen||e.mozRequestFullScreen||function(){return!1},document.cancelFullScreen=document.cancelFullScreen||document.webkitCancelFullScreen||document.mozCancelFullScreen||function(){return!1},t?document.cancelFullScreen():e.requestFullScreen()}},{key:"PageInteractionListener",value:function(){return{actionHandler:function(e){var t=this;return t.action=function(e){t.callback&&t.callback instanceof Function&&t.callback(e),t.remove()},t.action},init:function(e){this.callback=e,this.action=this.actionHandler(),document.addEventListener("mousedown",this.action,!0),document.addEventListener("touchstart",this.action,!0),document.addEventListener("keydown",this.action,!0)},remove:function(){document.removeEventListener("mousedown",this.action,!0),document.removeEventListener("touchstart",this.action,!0),document.removeEventListener("keydown",this.action,!0)}}}},{key:"CacheItemsList",value:function(){var e={};function t(a){!e.itemsList||e.cached===e.itemsList.length&&!e.amount||e.amount&&e.cached>=e.amount||(e.amount&&(e.amount=Math.min(e.amount,e.itemsList.length)),e.currentItem=e.itemsList[a].webView,e.lastIndex=a,void 0===e.currentItem||e.currentItem.complete?(e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)):e.currentItem.addEventListener("load",i,!1))}function i(){e.cached+=1,t(e.lastIndex+1>=e.itemsList.length?0:e.lastIndex+1)}return e.cached=0,e.itemsList=void 0,e.currentItem=void 0,e.amount=void 0,e.lastIndex=void 0,e.init=function(a,s,o){if(e.itemsList&&e.itemsList.length)for(var n=0;n<e.itemsList.length;n+=1)e.itemsList[n].webView.removeEventListener("load",i,!1);e.amount=o,e.cached=0,e.currentItem=void 0,e.lastIndex=s,e.itemsList=a,void 0===s&&(s=0),t(s)},e.status=function(){return{list:e.itemsList,index:e.lastIndex}},e}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(t,i,a){if(!t)return e.trace("********************************* Event UNDEFINED!!! ***************************************"),e.trace(i),e.trace(a),void e.trace("********************************* Event UNDEFINED!!! ***************************************");this.listenerSet[t]||(this.listenerSet[t]=[]);var s={};s.listener=i,s.handler=a,this.listenerSet[t].push(s)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var a=0;a<this.listenerSet[e].length;a+=1)this.listenerSet[e][a].listener===t&&this.listenerSet[e][a].handler===i&&(this.listenerSet[e].splice(a,1),a=this.listenerSet[e].length)},dispatchGMEvent:function(e){if(this.listenerSet[e.type])for(var t=this.listenerSet[e.type],i=0;i<t.length;i+=1){var a=t[i];a&&a.listener&&"function"==typeof a.listener[a.handler]&&a.listener[a.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var a={};return a.type=e,a.params=i,a.target=t,a}}],null&&y(t.prototype,null),i&&y(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}();const w=b;var C=i(3228),S=i.n(C),k={};function T(e){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},T(e)}function L(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,I(a.key),a)}}function I(e){var t=function(e){if("object"!=T(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=T(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==T(t)?t:t+""}k.styleTagTransform=u(),k.setAttributes=l(),k.insert=n().bind(null,"head"),k.domAPI=s(),k.insertStyleElement=c(),t()(S(),k),S()&&S().locals&&S().locals,w.trace;const P=function(){return e=function e(t,i,a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var s=this;this.appSet=t,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.items=[],this.activIndex=void 0;for(var o=0;o<7;o+=1){var n=document.createElement("div");n.className="".concat(e.classPref,"item"),this.view.appendChild(n),this.items.push(n)}function r(t){var i=t.target&&t.target.dataset.pageIndex?t.target:void 0,a=t.target.dataset.pageIndex;if(i)switch(t.type){case"mouseenter":i.classList.add("hover"),i.style.color=s.config.pgn_activColor,i.style.fill=s.config.pgn_activColor,i.style.backgroundColor=s.config.pgn_activBgColor;break;case"mouseleave":i.classList.remove("hover"),i.style.color=s.config.pgn_Color,i.style.fill=s.config.pgn_Color,i.style.backgroundColor=s.config.pgn_bgColor;break;case"click":s.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PAGINATOR_ITEM_ACTION,s,{index:parseInt(a)}))}}this.config.pgn_nextPrev&&(this.prevB=document.createElement("div"),this.prevB.className="".concat(e.classPref,"prev-button"),this.prevB.style.backgroundColor=this.config.pgn_bgColor,this.prevB.style.fill=this.config.pgn_Color,this.prevB.innerHTML=e.ARR_SVG,this.prevB.firstChild.style.transform="rotate(180deg) translateY(-1px)",this.view.insertBefore(this.prevB,this.view.firstChild),this.nextB=document.createElement("div"),this.nextB.className="".concat(e.classPref,"next-button"),this.nextB.style.backgroundColor=this.config.pgn_bgColor,this.nextB.style.fill=this.config.pgn_Color,this.nextB.innerHTML=e.ARR_SVG,this.view.appendChild(this.nextB)),this.view.addEventListener("click",r,!0),this.view.addEventListener("mouseenter",r,!0),this.view.addEventListener("mouseleave",r,!0),w.setStyleForElFomObj(this.view,a)},i=[{key:"classPref",get:function(){return"pgc-rev-paginator-"}},{key:"EVENTS",get:function(){return{PAGINATOR_ITEM_ACTION:"PAGINATOR_ITEM_ACTION"}}},{key:"ARR_SVG",get:function(){return'<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="-265 388.9 64 64" xml:space="preserve"><g><path d="M-239.1,407l14.8,15.1c0.3,0.4,0.3,1.2,0,1.6l-14.8,15.1c-0.3,0.4-0.8-0.1-0.8-0.8v-30.2   C-239.8,407.1-239.4,406.7-239.1,407z"/></g></svg>'}},{key:"CONFIG",get:function(){return{pgn_bgColor:"lightgray",pgn_Color:"white",pgn_activBgColor:"gray",pgn_activColor:"white",pgn_nextPrev:!0}}}],(t=[{key:"clear",value:function(){this.config.pgn_nextPrev&&(this.nextB.style.display="none",this.prevB.style.display="none");for(var e=0;e<this.items.length;e+=1){var t=this.items[e];t.style.display=null,t.classList.remove("pgc-delim"),t.classList.remove("pgc-selected"),t.removeAttribute("data-page-index"),t.style.color=this.config.pgn_Color,t.style.backgroundColor=this.config.pgn_bgColor}}},{key:"init",value:function(e,t){if(this.clear(),1!==e){var i=e-1,a=t-1,s=a-1<0?void 0:a-1,o=a+1>i?void 0:a+1;void 0!==s?(this.items[2].style.display="block",this.items[2].innerText=t-1,this.items[2].dataset.pageIndex=a-1,this.prevB&&(this.prevB.style.display="block",this.prevB.dataset.pageIndex=a-1)):this.prevB&&(this.prevB.style.display="none"),s-1>0?(this.items[1].style.display="block",this.items[1].innerText="...",this.items[1].classList.add("pgc-delim"),this.items[0].style.display="block",this.items[0].innerText="1",this.items[0].dataset.pageIndex=0):s-1==0&&(this.items[1].style.display="block",this.items[1].innerText="1",this.items[1].dataset.pageIndex=0),this.items[3].style.display="block",this.items[3].innerText=t,this.items[3].classList.add("pgc-selected"),this.items[3].style.color=this.config.pgn_activColor,this.items[3].style.backgroundColor=this.config.pgn_activBgColor,this.activIndex=a,void 0!==o?(this.items[4].style.display="block",this.items[4].innerText=t+1,this.items[4].dataset.pageIndex=a+1,this.nextB&&(this.nextB.style.display="block",this.nextB.dataset.pageIndex=a+1)):this.nextB&&(this.nextB.style.display="none"),o+1<i?(this.items[5].style.display="block",this.items[5].innerText="...",this.items[5].classList.add("pgc-delim"),this.items[6].style.display="block",this.items[6].innerText=e,this.items[6].dataset.pageIndex=i):o+1===i&&(this.items[5].style.display="block",this.items[5].innerText=e,this.items[5].dataset.pageIndex=i)}}}])&&L(e.prototype,t),i&&L(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t,i}();var D=i(6268),E=i.n(D),x={};function M(e){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},M(e)}function _(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,N(a.key),a)}}function N(e){var t=function(e){if("object"!=M(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=M(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==M(t)?t:t+""}x.styleTagTransform=u(),x.setAttributes=l(),x.insert=n().bind(null,"head"),x.domAPI=s(),x.insertStyleElement=c(),t()(E(),x),E()&&E().locals&&E().locals,w.trace;var B=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appSet=t,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config);var a='<svg class="'.concat(e.classPref,'progress-radial" width="22px" height="22px" viewBox="0 0 100 100" shape-rendering="geometricPrecision">\n          <defs><mask id="circle_mask" x="0" y="0" width="100" height="100" maskUnits="userSpaceOnUse">\n          <circle cx="50" cy="50" r="51" stroke-width="0" fill="black" opacity="1"/>\n          <circle cx="50" cy="50" r="50" stroke-width="0" fill="white" opacity="1"/>\n          <circle class="').concat(e.classPref,'progress-radial-mask-inner" cx="50" cy="50" r="40" stroke-width="0" fill="black" opacity="1"/>\n          </mask></defs><g mask="url(#circle_mask)">\n          <circle class="').concat(e.classPref,'progress-radial-track" cx="50" cy="50" r="50" stroke-width="0" opacity="1"/>\n          <path class="').concat(e.classPref,'progress-radial-bar" transform="translate(50, 50)"d="M 0 0"></path></g></svg>');this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"wrap"),this.view.innerHTML=a,this.bar=this.view.getElementsByClassName("".concat(e.classPref,"progress-radial-bar"))[0],this.bar.style.fill=this.config.ap_autoPlayColor,this.view.getElementsByClassName("".concat(e.classPref,"progress-radial-track"))[0].style.fill=this.config.ap_autoPlayBgColor,this.animRatio=25,this.counter=0,this.durationCount=25*this.config.ap_slideshowDelay,this.interval=void 0,this.anPart=0,this.status=void 0}return t=e,a=[{key:"classPref",get:function(){return"pgc-rev-auto-play-"}},{key:"CONFIG",get:function(){return{ap_autoPlayBgColor:"rgba(255,255,255, 0.3)",ap_autoPlayColor:"rgba(255,255,255, 1)",ap_slideshowDelay:8}}},{key:"EVENTS",get:function(){return{NEXT_SLIDE:"NEXT_SLIDE",PLAY:"PLAY"}}},{key:"clamp",value:function(e,t,i){return Math.max(t,Math.min(i,e))}}],(i=[{key:"drawProgress",value:function(t){if(!isNaN(t)){t=e.clamp(parseFloat(t),0,1);var i=e.clamp(360*t,0,359.99999),a=i*Math.PI/180,s=51*Math.sin(a),o=-51*Math.cos(a),n=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+n," 1 ").concat(s," ").concat(o," z");this.bar.setAttribute("d",l)}}},{key:"switch",value:function(){"play"===this.status?this.clear():this.start()}},{key:"start",value:function(){"play"===this.status&&this.clear();var t=this;this.view.style.opacity=1;var i=1/this.durationCount;this.interval=setInterval((function(){t.counter+=1,t.counter>=t.durationCount&&(clearInterval(t.interval),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.NEXT_SLIDE,t,{})),t.counter=0,t.start()),t.drawProgress(i*t.counter)}),1e3/this.animRatio),"play"!==this.status&&(this.status="play",t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PLAY,t,{status:this.status})))}},{key:"pause",value:function(){clearInterval(this.interval),this.status="pause"}},{key:"clear",value:function(){clearInterval(this.interval),this.counter=0,this.drawProgress(0),this.view.style.opacity=0,this.status="stop",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PLAY,this,{status:this.status}))}}])&&_(t.prototype,i),a&&_(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,a}(),O=i(7625),H=i.n(O),V={};function A(e){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},A(e)}function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function F(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,G(a.key),a)}}function R(e,t,i){return t&&F(e.prototype,t),i&&F(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function G(e){var t=function(e){if("object"!=A(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=A(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==A(t)?t:t+""}V.styleTagTransform=u(),V.setAttributes=l(),V.insert=n().bind(null,"head"),V.domAPI=s(),V.insertStyleElement=c(),t()(H(),V),H()&&H().locals&&H().locals;var Y=w.trace,j=function(){return R((function e(t){z(this,e);var i=document.createElement("div"),a=document.createElement("div");a.className="".concat(e.classPref,"view");var s=document.createElement("div");if(s.className="".concat(e.classPref,"button"),t.meta&&t.meta.subType&&"product"===t.meta.subType?s.innerHTML='<a href="'.concat(t.link,'">').concat(t.linkText,"</a>"):s.innerHTML=t.link_text?t.link_text:t.title,a.appendChild(s),t.price||t.meta&&t.meta.price){var o=document.createElement("div"),n=document.createElement("div");n.className="".concat(e.classPref,"price"),n.innerHTML=t.price||t.meta.price,o.appendChild(n),a.appendChild(o)}return i.appendChild(a),i}),null,[{key:"classPref",get:function(){return"pgc-rev-slider-post-informer-"}}])}(),W=R((function e(t){z(this,e);var i=document.createElement("div"),a=document.createElement("div");return a.className="icon-holder",a.innerHTML=t,i.appendChild(a),i})),U=function(){function e(t){z(this,e),this.delegate=t,this.item=void 0,this.id=void 0,this.appName=t.appName,this.itemIndex=void 0,this.iconSet=t.iconSet,this.positionIndex=0,this.view=document.createElement("div"),this.delegate.config.sl_canRemoved||(this.view.style.touchAction="auto"),this.view.className="".concat(e.classPref,"view"),this.itemInner=document.createElement("div"),this.itemInner.className="".concat(e.classPref,"inner"),this.delegate.config.sl_canRemoved||(this.itemInner.style.touchAction="auto"),this.view.appendChild(this.itemInner),this.preloader=w.createPreloaderView(this.delegate.config.sl_preloaderColor),this.preloader.style.display="none",this.view.appendChild(this.preloader),this.subContentHolder=document.createElement("div"),this.subContentHolder.className="".concat(e.classPref,"sub-content-holder"),this.view.appendChild(this.subContentHolder),this.videoContent=!1,this.videoContentReadyAction=!1,this.videoContentReady=!1,this.isEmbedContent=!1,this.videoAutoStarted=void 0,this.size=w.Size(0,0),this.imgSize=w.Size(0,0),this.imageFramePr=w.Rect(0,0,0,0),this.imageFrameFF=w.Rect(0,0,0,0),this.imageScaledFF=!1,this.width=0,this.height=0,this.maxXoffset=0,this.maxYoffset=0,this.MaxScale=4,this.imgScale=1,this.imgScaleFF=1,this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslatePr=w.Point(0,0),this.origin=w.Point(0,0),this.boundingBox=void 0,this.boundingBoxScale=void 0,this.animaSliderRender=void 0,this.speedX=0,this.speedY=0,this.oldX=0,this.newX=0,this.oldY=0,this.newY=0,this.draging=!1,this.isBlockDraging=!1,this.isBlockDragingMem=!1,this.startScale=void 0,this.startGlobalPoint=void 0,this.startDistForZoom=void 0,this.targetPoint=w.Point(0,0),this.stopRenderTransform=!1}return R(e,[{key:"overLoadHandler",value:function(){var e=this;return this.overLoadH||(this.overLoadH=function(){e.preloader.style.display="none",e.subContentHolder.style.display=null,e.imgSize.width=this.naturalWidth,e.imgSize.height=this.naturalHeight,e.item.videoId&&e.imgSize.width<1e3&&(e.imgSize.width*=1.5,e.imgSize.height*=1.5),e.isInScale&&e.normalize(),e.fit(!1)}),this.overLoadH}},{key:"clearPage",value:function(){this.item=void 0,this.id=void 0,1!==this.scale&&(this.scale=1,this.viewTranslate=w.Point(0,0)),this.itemInner.innerHTML="",this.subContentHolder.innerHTML="",this.videoContentReadyAction=!1,this.videoContentReady=!1,this.videoContent&&this.delegate.videoPlayer&&this.delegate.videoPlayer===this.videoContent&&this.delegate.setVideoPlayer(void 0,void 0),delete this.videoContent,delete this.audioContent,this.itemImg&&this.itemImg.removeEventListener("load",this.overLoadHandler(),!1),this.itemImg=void 0}},{key:"initByItem",value:function(t){if(this.fadePrep(),this.stopRenderTransform=!1,void 0!==t){if(this.id!==t.ID){if(this.item=t,this.id=t.ID,1!==this.scale&&(this.scale=1,this.viewTranslate=w.Point(0,0)),this.itemInner.innerHTML="",this.subContentHolder.innerHTML="",this.videoContentReadyAction=!1,this.videoContentReady=!1,this.videoContent&&this.delegate.videoPlayer&&this.delegate.videoPlayer===this.videoContent&&this.delegate.setVideoPlayer(void 0,void 0),delete this.videoContent,delete this.audioContent,this.itemImg&&this.itemImg.removeEventListener("load",this.overLoadHandler(),!1),t.webView)if("video"!==t.type||t.mime_type)if("audio1"===t.type&&t.poster){this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=300,this.imgSize.height=300,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(e.classPref,"place-holder");var i=new Image;i.className="".concat(e.classPref,"item-poster"),i.src=t.poster.medium.url,i.onload=function(){this.classList.add("onLoad")},this.itemImg.appendChild(i),this.itemInner.appendChild(this.itemImg)}else"video"===t.type&&void 0!==t.mime_type&&(this.videoContentReady=!0),this.itemImg=t.webView,this.itemInner.appendChild(this.itemImg),this.itemImg.classList.add("pgc-img"),this.delegate.config.sl_copyR_Proptection&&this.itemImg.classList.add("iph-protect"),t.webView.complete?(this.preloader.style.display="none",this.imgSize.width=this.itemImg.naturalWidth,this.imgSize.height=this.itemImg.naturalHeight,t.videoId&&this.imgSize.width<1e3&&(this.imgSize.width*=1.5,this.imgSize.height*=1.5)):(this.imgSize=(this.delegate.config.sl_FullSizeViewMode,this.item.itemViewSize),t.videoId&&this.imgSize.width<1e3&&(this.imgSize.width*=1.5,this.imgSize.height*=1.5),this.subContentHolder.style.display="none",this.preloader.style.display="block",this.itemImg.addEventListener("load",this.overLoadHandler(),!1));else this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=400,this.imgSize.height=400,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(e.classPref,"place-holder"),this.itemInner.appendChild(this.itemImg);else this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=400,this.imgSize.height=400,this.itemImg=document.createElement("div"),this.itemImg.className="".concat(e.classPref,"place-holder"),"video"===t.type||t.mime_type||this.itemImg.classList.add("bg-mode"),this.itemInner.appendChild(this.itemImg);switch("video"!==t.type||t.mime_type||this.addVideo(t.original),this.isInScale&&this.normalize(),this.fit(!1),t.type){case"audio":this.view.classList.add("info-icon"),this.audioContent=w.mediaEl("audio"),this.audioContent.setAttribute("controls",""),this.audioContent.className="lb-audio-content",this.subContentHolder.childNodes.length?this.subContentHolder.replaceChild(this.audioContent,this.subContentHolder.firstChild):this.subContentHolder.appendChild(this.audioContent),this.audioContent.src=t.original;break;case"video":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new W(this.iconSet.PLAY_SVG).innerHTML,this.subContentHolder.getElementsByTagName("svg")[0].style.marginLeft="7px";break;case"post":case"page":case"product":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new j(this.item).innerHTML;break;default:this.view.classList.remove("info-icon")}t.meta&&t.meta.subType&&"product"===t.meta.subType&&(this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new j(this.item).innerHTML)}}else this.clearPage()}},{key:"addVideo",value:function(t){var i=this;this.preloader.style.display="block",this.item.webView?(this.imgSize.width=this.item.webImgFrame.width,this.imgSize.height=this.item.webImgFrame.height):(this.item.webImgFrame=w.Rect(0,0,0,0),this.imgSize.width=1e3,this.imgSize.height=this.imgSize.width/(16/9)),this.itemImg.parentNode&&this.itemImg.parentNode.removeChild(this.itemImg),this.itemImg=document.createElement("div"),this.itemImg.className="".concat(e.classPref,"place-holder"),this.videoContent=w.mediaEl("video"),this.videoContent.setAttribute("data-id","sgb-video-player"),this.videoContent.setAttribute("data-gallery",this.delegate.appName),this.videoContent.className="lb-video-content",i.delegate.config.sl_video_loop&&this.videoContent.setAttribute("loop",""),this.item.poster?(this.videoContent.setAttribute("poster",this.item.poster.large?this.item.poster.large.url:this.item.poster.full.url),this.videoContent.removeAttribute("preload")):this.item.featuredImage?(this.videoContent.setAttribute("poster",this.item.featuredImage.src),this.videoContent.removeAttribute("preload")):this.item.image&&this.item.image.width>=200&&this.videoContent.setAttribute("poster",this.item.image.src),this.itemImg.appendChild(this.videoContent),this.videoContent.addEventListener("canplay",(function(){i.item&&(i.videoContentReady=!0,i.delegate.tryAutoStartVideo(i.item.id),i.delegate.onYtStatusChange("onReady"))})),this.videoContent.addEventListener("ended",(function(){i.delegate.onYtStatusChange(0)})),this.videoContent.addEventListener("play",(function(){i.delegate.onYtStatusChange(1),i.delegate.setVideoPlayer(i.videoContent,"html",i)})),this.videoContent.addEventListener("loadedmetadata",(function(){i.preloader.style.display="none",this.videoWidth&&this.videoHeight&&(i.imgSize.width=this.videoWidth,i.imgSize.height=this.videoHeight,i.isInScale&&i.normalize(),i.fit(!1))})),this.videoContent.src=t+(void 0===this.item.poster&&void 0===this.item.featuredImage&&w.Device.browser.safari&&w.isTouchDevice?"#t=0.001":""),this.itemInner.appendChild(this.itemImg)}},{key:"posX",set:function(e){this.view.style.left="".concat(this.size.width*e,"px"),this.positionIndex=e}},{key:"resize",value:function(e){this.boundingBoxScale=void 0,this.size=e,this.posX=this.positionIndex,this.isInScale&&this.normalize(),this.fit(!0)}},{key:"fit",value:function(){if(this.itemImg){var e=this.delegate.config.sl_xOffset,t=0,i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*e,this.size.height-2*t),!1,!1);i.x+=e,i.y+=t,this.imageFrameFF=i,t=this.delegate.config.sl_yOffset,(i=w.getFrameForBoxWithMode(this.imgSize,w.Size(this.size.width-2*e,this.size.height-2*t),!1,!1)).x+=e,i.y+=t,this.imageFrameNF=i,this.imgScale=Math.min(this.imgSize.width/i.width,this.MaxScale),this.imgScaleFF=this.imageFrameFF.height/i.height,"image"!==this.item.type&&"video"!==this.item.type&&"audio"!==this.item.type||(this.delegate.FF_Mode?(this.imageFrame=this.imageFrameFF,i=this.imageFrameFF,this.imageScaledFF=!0):(this.imageFrame=this.imageFrameNF,i=this.imageFrameNF,this.imageScaledFF=!1)),this.item.webImgFrame.x!==i.x||this.item.webImgFrame.y!==i.y||this.item.webImgFrame.width!==i.width||this.item.webImgFrame.height!==i.height?(this.imageFrame=i,this.item.webImgFrame=i):this.imageFramePr=i,this.subContentFrame=i}}},{key:"imageFrame",get:function(){return this.imageFramePr},set:function(e){this.itemImg.style.left="".concat(e.x,"px"),this.itemImg.style.top="".concat(e.y,"px"),this.itemImg.style.width="".concat(e.width,"px"),this.itemImg.style.height="".concat(e.height,"px"),this.imageFramePr=e}},{key:"subContentFrame",set:function(e){this.subContentHolder.style.left="".concat(e.x,"px"),this.subContentHolder.style.top="".concat(e.y,"px"),this.subContentHolder.style.width="".concat(e.width,"px"),this.subContentHolder.style.height="".concat(e.height,"px")}},{key:"checkOffset",value:function(e,t){var i=this.imageScaledFF?this.imageFrameFF:this.imageFrame;if(t!==this.boundingBoxScale){var a=i.width*(t||1),s=i.height*(t||1),o=i.x*(t||1),n=i.y*(t||1);this.boundingBox={left:a>this.size.width?-o:(this.size.width-this.size.width*t)/2,top:s>this.size.height?-n:(this.size.height-this.size.height*t)/2,right:a>this.size.width?this.size.width-(o+a):(this.size.width-this.size.width*t)/2,bottom:s>this.size.height?this.size.height-(n+s):(this.size.height-this.size.height*t)/2},this.boundingBoxScale=t}var r=e.x>this.boundingBox.left?this.boundingBox.left:e.x;r=r<this.boundingBox.right?this.boundingBox.right:r;var l=e.y>this.boundingBox.top?this.boundingBox.top:e.y;return l=l<this.boundingBox.bottom?this.boundingBox.bottom:l,w.Point(r,l)}},{key:"isPointInItem",value:function(e){var t=this.viewTranslate.x+this.size.width/2*this.newScale-this.imageFrame.width/2*this.newScale,i=t+this.imageFrame.width*this.newScale,a=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,s=a+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>a&&e.y<s}},{key:"normalize",value:function(e){w.cancelAnimationFrame(this.animaSliderRender),e?this.renderTransformTo(w.Point(0,0),1):(this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslate=w.Point(0,0),this.origin=w.Point(0,0),this.targetPoint=this.origin)}},{key:"isInScale",get:function(){return 1!==this.newScale||0!==this.origin.x||0!==this.origin.y}},{key:"zoomIn",value:function(e,t){if("image"===this.item.type){w.cancelAnimationFrame(this.animaSliderRender);var i=t.x-this.viewTranslate.x,a=t.y-this.viewTranslate.y,s=i/this.scale,o=a/this.scale,n=t.x-s*e,r=t.y-o*e,l=w.Point(n,r);this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(l,e),e)}}},{key:"zoomByScaleIter",value:function(e,t){if("image"===this.item.type){var i=e<0?1.065:.935;w.cancelAnimationFrame(this.animaSliderRender),this.newScale*i>this.MaxScale&&(i=this.MaxScale/this.newScale),this.newScale*i<1&&(i=1/this.newScale),this.newScale*=i,this.origin=w.Point(t.x-i*(t.x-this.origin.x),t.y-i*(t.y-this.origin.y)),this.stopRenderTransform=!0,this.renderTransformTo(this.checkOffset(this.origin,this.newScale),this.newScale)}}},{key:"zoomByScaleDeltaToPoint",value:function(e,t){if(this.delegate.pinchToZoom&&"image"===this.item.type){var i;w.cancelAnimationFrame(this.animaSliderRender);var a=e/this.startDistForZoom,s=0;(i=this.startDistForZoom/this.startScale*a/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(s=.8*-(i-this.MaxScale)),i+=s;var o=this.startGlobalPoint.x-this.startTranslate.x,n=this.startGlobalPoint.y-this.startTranslate.y,r=o/this.newScale,l=n/this.newScale,h=this.startGlobalPoint.x-r*i,c=this.startGlobalPoint.y-l*i,d=w.Point(h-t.x,c-t.y);this.scale=i,this.newScale=i,this.viewTranslate=d,this.startTranslate=w.Point(h,c)}}},{key:"viewTranslate",get:function(){return this.viewTranslatePr},set:function(e){this.viewTranslatePr=e,this.itemInner.style.transform="matrix(".concat(this.scale,", 0, 0, \n        ").concat(this.scale,", ").concat(e.x,", ").concat(e.y,")")}},{key:"renderTransformByDelta",value:function(e,t){if(!this.stopRenderTransform){var i=w.Point(this.targetPoint.x-e,this.targetPoint.y-t);i=this.checkOffset(i,this.scale),this.renderTransformTo(i,this.scale)}}},{key:"renderTransformTo",value:function(e,t){var i=this;w.cancelAnimationFrame(i.animaSliderRender),this.origin=e,this.targetPoint=e,this.newScale=t;var a=0,s=0,o=0,n=.05,r=.22;i.animaSliderRender=w.requestAnimationFrame((function l(){a=a*n+(e.x-i.viewTranslate.x)*r,s=s*n+(e.y-i.viewTranslate.y)*r,t&&(o=o*n+(t-i.scale)*r);var h=i.viewTranslate.x;h+=a;var c=i.viewTranslate.y;c+=s,t&&(i.scale+=o),i.viewTranslate=w.Point(h,c),Math.abs(a)<.02&&Math.abs(s)<.02&&Math.abs(o)<.02?(w.cancelAnimationFrame(i.animaSliderRender),t&&(i.scale=t),i.viewTranslate=w.Point(e.x,e.y),i.stopRenderTransform=!1):i.animaSliderRender=w.requestAnimationFrame(l)}))}},{key:"renderGlidingTransform",value:function(){var e=this;w.cancelAnimationFrame(e.animaSliderRender);var t=.95,i=.95;e.animaSliderRender=w.requestAnimationFrame((function a(){e.speedX*=t,e.speedY*=i;var s=e.viewTranslate.x;s+=e.speedX;var o=e.viewTranslate.y;if(o+=e.speedY,s>e.boundingBox.left||s<e.boundingBox.right){e.speedX*=-1;var n=s<e.boundingBox.right?e.boundingBox.right:s;s=s>e.boundingBox.left?e.boundingBox.left:n,s+=e.speedX,t=.75}if(o>e.boundingBox.top||o<e.boundingBox.bottom){e.speedY*=-1;var r=o<e.boundingBox.bottom?e.boundingBox.bottom:o;o=o>e.boundingBox.top?e.boundingBox.top:r,o+=e.speedY,i=.75}e.origin=w.Point(s,o),e.viewTranslate=w.Point(s,o),Math.abs(e.speedX)<.02&&Math.abs(e.speedY)<.02?(w.cancelAnimationFrame(e.animaSliderRender),e.speedX=0,e.speedY=0):e.animaSliderRender=w.requestAnimationFrame(a)}))}},{key:"renderStretchstretchTransform",value:function(){var e=this;w.cancelAnimationFrame(e.animaSliderRender);var t=this.checkOffset(w.Point(e.viewTranslate.x+e.speedX,e.viewTranslate.y+e.speedY),e.scale),i=0,a=0;e.animaSliderRender=w.requestAnimationFrame((function s(){i=.2*i+.15*(t.x-e.viewTranslate.x),a=.2*a+.15*(t.y-e.viewTranslate.y);var o=e.viewTranslate.x+i,n=e.viewTranslate.y+a;e.viewTranslate=w.Point(o,n),Math.abs(i)<.02&&Math.abs(a)<.02?(w.cancelAnimationFrame(e.animaSliderRender),e.viewTranslate=t):e.animaSliderRender=w.requestAnimationFrame(s)}))}},{key:"startDrag",value:function(e,t){w.cancelAnimationFrame(this.animaSliderRender),"image"===this.item.type&&(this.startDistForZoom=t,this.startGlobalPoint=e,this.startTranslate=this.viewTranslate,this.speedX=0,this.speedY=0,this.newX=this.viewTranslate.x,this.newY=this.viewTranslate.y,this.startScale=this.scale)}},{key:"stopDrag",value:function(){if("image"===this.item.type){if(this.isInScale)if(this.scale<1)this.normalize(!0);else if(this.scale>this.MaxScale)this.zoomIn(this.MaxScale,this.startGlobalPoint);else{var e=this.checkOffset(this.origin,this.newScale);this.isBlockDraging=e.x!==this.origin.x||e.y!==this.origin.y,this.isBlockDraging&&this.renderStretchstretchTransform()}this.draging&&(this.isBlockDraging?this.renderStretchstretchTransform():this.renderGlidingTransform(),this.stopRenderTransform=!1,this.draging=!1)}}},{key:"dragin",value:function(e){if("image"!==this.item.type)return!1;var t=this.startTranslate.x-e.x,i=this.startTranslate.y-e.y,a=this.checkOffset(w.Point(t,i),this.newScale);return this.isBlockDraging=a.x!==t||a.y!==i,t-=.7*(t-a.x),i-=.7*(i-a.y),this.oldX=this.newX,this.newX=t,this.speedX=.7*(this.newX-this.oldX),this.oldY=this.newY,this.newY=i,this.speedY=.7*(this.newY-this.oldY),this.origin=w.Point(t,i),this.viewTranslate=w.Point(t,i),this.draging=!0,!0}},{key:"action",value:function(e,t){if(this.item)switch(e){case"click":if(t&&"enter"===t)return"linkAction";if("video"===this.item.type){if(this.videoContent){if(!1===this.videoContent.controls&&(this.view.classList.add("video-play"),this.view.classList.remove("info-icon"),this.delegate.videoVolume&&(this.videoContent.volume=this.delegate.videoVolume),this.videoContent.controls=!0,t||this.videoContent.play()),t&&"space"===t){if(!this.videoContent.paused)return void this.videoContent.pause();this.videoContent.play()}return this.videoContent.paused?"videoStop":"videoPlay"}if(this.item.mime_type)return this.isEmbedContent?(this.removeEmbedVideoContent(),"videoStop"):(this.addEmbedVideoContent(),"videoPlay")}if("audio"===this.item.type&&this.audioContent)return this.audioContent.paused?(this.audioContent.setAttribute("controls",""),this.audioContent.play(),"audioPlay"):(this.audioContent.pause(),this.audioContent.removeAttribute("controls"),"audioStop");if("post"===this.item.type||"page"===this.item.type||"product"===this.item.type)return"linkAction";break;case"removeSubContent":if("video"===this.item.type)return this.videoContent?(this.view.classList.remove("video-play"),this.view.classList.add("info-icon"),this.videoContent.pause(),this.videoContent.currentTime=0,this.videoContent.controls=!1,0!==this.videoContent.played.length&&(this.delegate.videoVolume=this.videoContent.volume)):this.removeEmbedVideoContent(),"videoStop";this.audioContent&&(this.audioContent.pause(),this.audioContent.currentTime=0);break;default:return}}},{key:"addEmbedVideoContent",value:function(){if(this.item.mime_type){var e=this.item.mime_type.split("/")[1];if(!e)return;this.view.classList.add("video-play");var t,i=this.item.videoId,a=this.delegate,s=this;switch(a.onYtStatusChange(void 0),e){case"youtube":if(void 0===window.YT){var o=document.createElement("script");o.src="https://www.youtube.com/iframe_api";var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(o,n)}if(this.subContentHolder.innerHTML='<div id="'+i+'" data-id="sgb-video-player" data-gallery="'+a.appName+'" ></div>',window.YT){var r=window.YT,l={autoplay:1,frameborder:0,playlist:i,loop:a.config.sl_video_loop?1:0,rel:0};a.config.sl_video_loop||(delete l.playlist,delete l.loop);var h=new r.Player(i,{videoId:i,playerVars:l,events:{onReady:function(){a.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&a.setVideoPlayer(h,"yt",s),a.onYtStatusChange(e.data)}}});a.setVideoPlayer(h,"yt",s)}else window.onYouTubeIframeAPIReady=function(){var e=window.YT,t={autoplay:1,frameborder:0,playlist:i,loop:a.config.sl_video_loop?1:0,rel:0};a.config.sl_video_loop||(delete t.playlist,delete t.loop);var o=new e.Player(i,{videoId:i,playerVars:t,events:{onReady:function(){a.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&a.setVideoPlayer(o,"yt",s),a.onYtStatusChange(e.data)}}})};break;case"vimeo":t=(t=w.vimeoCode.replace("%id%",this.item.videoId)).replace("%hash%",this.item.videoHash?"h="+this.item.videoHash+"&":""),this.subContentHolder.innerHTML=t;var c=this.subContentHolder.querySelector('[data-id="sgb-video-player"]');if(c)if(c.setAttribute("data-gallery",a.appName),void 0===window.Vimeo){var d=document.createElement("script");d.src="https://player.vimeo.com/api/player.js";var u=document.getElementsByTagName("script")[0];u.parentNode.insertBefore(d,u),d.onload=function(){if(window.Vimeo){var e=new Vimeo.Player(c);a.config.sl_video_loop&&e.setLoop(!0),e.on("play",(function(e){a.onYtStatusChange("onReady")})),e.on("ended",(function(e){a.onYtStatusChange(0)})),e.on("play",(function(t){a.onYtStatusChange(1),a.setVideoPlayer(e,"vimeo",s)}))}}}else if(window.Vimeo){var g=new Vimeo.Player(c);a.config.sl_video_loop&&g.setLoop(!0),g.on("play",(function(e){a.onYtStatusChange("onReady")})),g.on("ended",(function(e){a.onYtStatusChange(0)})),g.on("play",(function(e){a.onYtStatusChange(1),a.setVideoPlayer(g,"vimeo",s)}))}}this.isEmbedContent=!0}}},{key:"removeEmbedVideoContent",value:function(){this.isEmbedContent&&(this.subContentHolder.innerHTML=new W(this.iconSet.PLAY_SVG).innerHTML,this.subContentHolder.getElementsByTagName("svg")[0].style.marginLeft="7px",this.isEmbedContent=!1,this.view.classList.remove("video-play"),this.view.classList.add("info-icon"),this.delegate.onYtStatusChange(void 0),this.delegate.setVideoPlayer(void 0,void 0))}},{key:"fadePrep",value:function(){this.itemInner.style.animationName=null}},{key:"fadeIn",value:function(){var e=this;this.itemInner.style.animationName="pgc-rev-fade-in",this.fadeAnimClear=setTimeout((function(){e.fadePrep()}),600)}}],[{key:"classPref",get:function(){return"pgc-rev-slider-page-"}}])}(),q=function(){function e(t,i){z(this,e),this.iconSet=e.ICONS,this.config=e.CONFIG,w.copyProperties(i,this.config),this.appSet=t,this.appName=t.appName,this.cacherItemsList=this.appSet.cacheItemsList,this.id="".concat(this.appName,"_vitSlider_"),this.itemsList=void 0,this.visibleBounds=w.Rect(0,0,0,0),this.isControllsShow=!1,this.isZooming=!1,this.needHideControlls=!1,this.naviButtonsStatus=void 0,this.canNext=!0,this.canPrev=!0,this.firsrTap=void 0,this.removing=!1,this.createlayoutDelay=void 0,this.intitByTermDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.id,"main"),this.resizeDelay=void 0,this.size=w.Size(0,0);var a=document.createElement("div");a.className="".concat(e.classPref,"bg"),this.config.sl_backgroundColor&&(this.background=a,this.background.style.backgroundColor=this.config.sl_backgroundColor,this.view.appendChild(a)),this.config.sl_audioPlayer&&this.config.sl_audioPlayer.pause(),this.sliderPages=[],this.draggingPr=!1,this.zoomingDrag=!1,this.speedX=0,this.speedY=0,this.scrollViewTranslateXPr=0,this.scrollViewTranslateYPr=0,this.startDragHandler=void 0,this.currentItemIndex=void 0,this.startItemIndex=0,this.items=[],this.itemsAmount=0,this.itemNumPr=void 0,this.pageInFocus=void 0,this.pageInFocusPrev=void 0,this.zoomingPage=void 0,this.videoVolume=void 0,this.pinchToZoom=!0,this.canRemovedLite=!1,this.FF_Mode=!1,this.mouseWheelMode=!1,this.animaSliderRender=void 0,this.slider=document.createElement("div"),this.slider.className="".concat(e.classPref,"wrap"),this.view.appendChild(this.slider),this.autoStartActionDelay=void 0,this._ytStatus=void 0}return R(e,[{key:"setYOffset",value:function(e){this.config.sl_yOffset=e,this.resizeHandler(this.size)}},{key:"onYtStatusChange",value:function(t){this._ytStatus=t,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.YT_ON_CHANGE_STATUS,this,{status:t,itemIndex:this.itemIndex,itemID:this.itemsList[this.itemIndex].id}))}},{key:"ytStatus",get:function(){return this._ytStatus}},{key:"dragging",get:function(){return this.draggingPr},set:function(e){e?this.view.classList.add("isDragging"):this.view.classList.remove("isDragging"),this.draggingPr=e}},{key:"viewOfsetY",get:function(){return this.view.getBoundingClientRect().top+w.pageYOffset}},{key:"viewOfsetX",get:function(){return this.view.getBoundingClientRect().left+w.pageXOffset}},{key:"copyRight",value:function(){var t,i=this;return function(a){if(!w.Device.ios||"mouseup"!==a.type){var s,o;a.changedTouches&&a.changedTouches[0]?(s=a.changedTouches[0].pageX,o=a.changedTouches[0].pageY):(s=a.pageX,o=a.pageY),s-=i.viewOfsetX,o-=i.viewOfsetY;var n=i.itemsList[i.itemIndex];if(n.webView&&n.webView===a.target||a.target.className&&"pgc-rev-slider-page-sub-content-holder"===a.target.className||a.target.className&&("lb-video-content"===a.target.className||"lb-audio-content"===a.target.className)){a.preventDefault();var r=document.getElementById("gm_copyr");r&&(clearTimeout(t),r.parentNode.removeChild(r),r=null),(r=document.createElement("div")).id="gm_copyr",r.className="".concat(e.classPref,"hints"),r.innerHTML=n.user&&n.user.displayname?"Hey, this photo is &#169;".concat(n.user.displayname):i.config.sl_copyR_Alert,n.copyright&&""!==n.copyright&&(r.innerHTML=n.copyright),r.style.top="".concat(o,"px"),r.style.left="".concat(s,"px"),i.view.appendChild(r),t=setTimeout((function(){r.parentNode.removeChild(r)}),1e3)}}}}},{key:"initByStage",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];e.appendChild(this.view),t&&this.createControlls()}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"initByList",value:function(e,t){var i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];if(e&&e.length>0){var a=this;if(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,!i)return void a.createLayout();this.createlayoutDelay=setTimeout((function(){a.createLayout()}),100)}}},{key:"prepareToRemove",value:function(){if(!this.removing){clearTimeout(this.createlayoutDelay),clearTimeout(this.intitByTermDelay),this.removing=!0,this.cacherItemsList.init(),this.appSet.appEventManager.removeGMEventListener(e.EVENTS.COLLECTION_DATA_REDY,this,"dataLoaded"),this.view.removeEventListener("wheel",this.handlerMWheel,!1),this.config.sl_copyR_Proptection&&document.removeEventListener("contextmenu",this.copyR,!1),this.config.sl_audioPlayer&&this.config.sl_audioPlayer.pause(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.REMOVE_LIGHTBOX,this,{}));for(var t=0;t<this.sliderPages.length;t+=1){this.sliderPages[t].clearPage();var i=this.sliderPages[t].view;i.parentNode&&i.parentNode.removeChild(i)}this.sliderPages=[],this.removing=!1}}},{key:"remoteControl",value:function(t){if(this.startDragHandler||"esc"===t)switch(t){case"prev":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoNext();break;case"enter":case"space":this.firstClick(w.Point(this.view.clientWidth/2,this.view.clientHeight/2),t);break;case"esc":this.prepareToRemove();break;case"zoom":this.zoomSwitch()}}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=w.createPreloaderView(this.config.sl_preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&w.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"createLayout",value:function(){var t=this;this.itemsAmount=this.itemsList.length,this.size=w.Size(this.view.clientWidth,this.view.clientHeight),w.miniScreen&&this.slider.classList.add("miniScreen"),this.prevButton&&this.size.width<500&&(this.prevButton.classList.add("next-prev-button-mini-screen"),this.nextButton.classList.add("next-prev-button-mini-screen")),this.initSlider(),this.size.height<700&&this.slider.classList.add("miniScreen"),this.initDownloadProtection(this.config.sl_copyR_Proptection,this.config.sl_copyR_Alert),this.view.addEventListener("wheel",this.mouseWheelHandler(),!1),setTimeout((function(){t.showControlls(!0),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{status:"ready"}))}),500)}},{key:"initDownloadProtection",value:function(e,t){t&&(this.config.sl_copyR_Alert=t),e?(this.copyR&&document.removeEventListener("contextmenu",this.copyR,!1),this.copyR=this.copyRight(),document.addEventListener("contextmenu",this.copyR,!1)):(document.removeEventListener("contextmenu",this.copyR,!1),this.copyR=void 0),this.config.sl_copyR_Proptection=e}},{key:"itemIndex",get:function(){return this.itemNumPr},set:function(e){this.itemNumPr=e,this.updateControlls()}},{key:"pageConstructor",get:function(){return new U(this)}},{key:"initSlider",value:function(){var e,t=0;if(0===this.sliderPages.length)for(t=0;t<3;t+=1)e=this.pageConstructor,this.slider.appendChild(e.view),this.sliderPages.push(e),e.resize(this.size);var i=this.itemsAmount>2?-1:0;for(t=0;t<3;t+=1)(e=this.sliderPages[t]).posX=i,e.itemIndex=void 0,i+=1;this.startDragHandler?this.gotoPageByNum(0):(this.startDragHandler=this.startDrag(),w.isTouchDevice&&(this.slider.addEventListener("touchstart",this.startDragHandler,w.passiveListener),window.addEventListener("touchmove",(function(){}),w.passiveListener)),this.slider.addEventListener("mousedown",this.startDragHandler,!1),this.gotoPageByNum(this.startItemIndex))}},{key:"scrollViewTranslateY",get:function(){return this.scrollViewTranslateYPr},set:function(e){this.scrollViewTranslateYPr=e,this.slider.style.transform="translate3d(".concat(this.scrollViewTranslateX,"px,").concat(e,"px, 0px)"),0===e||this.canRemovedLite||this.sliderVerticalRender()}},{key:"scrollViewTranslateX",get:function(){return this.scrollViewTranslateXPr},set:function(e){this.scrollViewTranslateXPr=e,this.slider.style.transform="translate3d(".concat(e,"px,").concat(this.scrollViewTranslateY,"px, 0px)"),!1===this.config.sl_carouselMode&&(e>0||e<-this.size.width*(this.itemsAmount-1))||this.pageRenderByIndex(-Math.round(e/this.size.width))}},{key:"sliderVerticalRender",value:function(){var t=1-Math.abs(this.scrollViewTranslateY)/(this.size.height/2);this.background&&(this.background.style.opacity=t),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{backgroundOpacity:t})),this.needHideControlls||(t<.8?(this.showHideNaviButton("hide"),this.showControlls(!1)):(this.showHideNaviButton("show"),this.showControlls(!0)))}},{key:"tryOpenItemID",value:function(e){for(var t=0;t<this.itemsList.length;t+=1)if(this.itemsList[t].ID===e)return this.gotoPageByNum(t),!0;return!1}},{key:"gotoPageByNum",value:function(e){this.currentItemIndex!==e?this.gotoPageByIndex(e,!1):this.pausePlayVideo()}},{key:"gotoNext",value:function(){this.gotoPageByIndex(this.currentItemIndex+1,this.config.sl_next_prev_animation)}},{key:"gotoPrev",value:function(){this.gotoPageByIndex(this.currentItemIndex-1,this.config.sl_next_prev_animation)}},{key:"renderTransformTo",value:function(e){var t=this;w.cancelAnimationFrame(t.animaSliderRender);var i=5*t.speedX,a=5*t.speedY;t.animaSliderRender=w.requestAnimationFrame((function s(){i=.2*i+.15*(e.x-t.scrollViewTranslateX),a=.2*a+.15*(e.y-t.scrollViewTranslateY),t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=a,Math.abs(i)<1&&Math.abs(a)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(a)<.1?(w.cancelAnimationFrame(t.animaSliderRender),t.scrollViewTranslateX=e.x,t.scrollViewTranslateY=e.y,t.sliderTransitionComplete({target:t.slider})):t.animaSliderRender=w.requestAnimationFrame(s)}))}},{key:"gotoPageByIndex",value:function(e,t){if(void 0!==this.size.width&&0!==this.size.width){(this.itemsAmount<3||!1===this.config.sl_carouselMode)&&(e=Math.max(0,e),e=Math.min(this.itemsAmount-1,e));var i=-e*this.size.width;t?this.renderTransformTo(w.Point(i,this.scrollViewTranslateY)):(w.cancelAnimationFrame(this.animaSliderRender),this.scrollViewTranslateX=i,this.pageInFocus&&this.pageInFocus.fadeIn(),this.sliderTransitionComplete({target:this.slider}))}}},{key:"pageRenderByIndex",value:function(e){if(void 0===e||this.currentItemIndex!==e){void 0!==this.pageInFocus&&(this.pageInFocusPrev=this.pageInFocus,this.pageInFocusPrev.action("removeSubContent"),this.pageInFocus.isInScale&&(this.zoomingPage=this.pageInFocus));var t=0;if(this.itemsAmount<3){for(t=0;t<this.itemsAmount;t+=1)this.sliderPages[t].initByItem(this.itemsList[t]);return this.pageInFocus=this.sliderPages[e],this.currentItemIndex=e,void(this.itemIndex=e)}var i=(e+1)%3;i<0&&(i+=3);var a=i-1>=0?i-1:2,s=i+1<3?i+1:0,o=[a,i,s],n=[e-1,e,e+1];for(t=0;t<o.length;t+=1)this.sliderPages[o[t]].posX=n[t];this.currentItemIndex=e,this.pageInFocus=this.sliderPages[i],this.itemIndex=e<0?this.itemsAmount+(e%this.itemsAmount==0?-this.itemsAmount:e%this.itemsAmount):e%this.itemsAmount,this.sliderPages[i].initByItem(this.itemsList[this.itemIndex]),this.sliderPages[s].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.config.sl_carouselMode?this.itemsList[0]:void 0),this.sliderPages[a].initByItem(this.itemIndex-1<0?this.config.sl_carouselMode?this.itemsList[this.itemsAmount-1]:void 0:this.itemsList[this.itemIndex-1])}}},{key:"pausePlayVideo",value:function(){var e=this;if(void 0!==this.videoInPlayer&&void 0!==this.videoInPlayer&&void 0!==this.videoPlayerType&&this.videoPlayer&&this.videoPlayerType)try{"yt"===this.videoPlayerType?2===this.videoPlayer.getPlayerState()?this.videoPlayer.playVideo():1===this.videoPlayer.getPlayerState()&&this.videoPlayer.pauseVideo():"vimeo"===this.videoPlayerType?this.videoPlayer.getPaused().then((function(t){t?e.videoPlayer.play():e.videoPlayer.pause()})):"html"===this.videoPlayerType&&(this.videoPlayer.paused?this.videoPlayer.play():this.videoPlayer.pause())}catch(e){Y(e)}}},{key:"tryPausedVideo",value:function(e){if(void 0!==this.videoInPlayer&&this.videoInPlayer!==e&&this.videoPlayer)try{"html"===this.videoPlayerType||"vimeo"===this.videoPlayerType?this.videoPlayer.pause():"yt"===this.videoPlayerType&&this.videoPlayer.pauseVideo(),this.externalPause=!0}catch(e){Y(e)}}},{key:"tryPlayAgainVideo",value:function(){if(void 0!==this.videoInPlayer&&void 0!==this.videoPlayer&&void 0!==this.videoPlayerType)try{"html"===this.videoPlayerType||"vimeo"===this.videoPlayerType?this.videoPlayer.play():"yt"===this.videoPlayerType&&this.videoPlayer.playVideo()}catch(e){Y(e)}}},{key:"setVideoPlayer",value:function(e,t,i){this.videoPlayerType=t,this.videoPlayer=e,this.externalPause=!1,i?(this.videoInPlayer=i.item.id,this.videoAutoStarted=i.item.id):this.videoInPlayer=void 0}},{key:"tryAutoStartVideo",value:function(e){this.config.sl_video_auto_start&&this.pageInFocus.item&&this.videoAutoStarted!==e&&"video"===this.pageInFocus.item.type&&this.pageInFocus.item.id===e&&window&&void 0===window.pgcVideoAutostartLock&&(this.videoAutoStarted=e,this.firstClick(w.Point(this.view.clientWidth/2,this.view.clientHeight/2),"space"))}},{key:"sliderTransitionComplete",value:function(e){var t=this;if(e.target===this.slider){var i=this.cacherItemsList.status();(i.list!==this.itemsList||i.list===this.itemsList&&this.itemIndex>=i.index)&&this.cacherItemsList.init(this.itemsList,this.itemIndex,5),clearTimeout(this.autoStartActionDelay),this.config.sl_video_auto_start&&this.pageInFocus.item&&("video"!==this.pageInFocus.item.type&&(this.videoAutoStarted=void 0),this.pageInFocus.videoContentReady&&(this.autoStartActionDelay=setTimeout((function(){t.tryAutoStartVideo(t.pageInFocus.item.id)}),600))),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&(this.zoomingPage.normalize(),this.zoomControll())}}},{key:"mouseWheelHandler",value:function(){var t=this,i=Date.now(),a=[],s=[],o=400,n=0;return t.handlerMWheel=function(r){if(!1!==t.mouseWheelMode||!1!==t.config.sl_mouseWheelPagination||t.zoomingPage){r.stopPropagation(),r.preventDefault();var l=w.Point(0,0);if("deltaX"in r)1===r.deltaMode?(l.x=18*r.deltaX,l.y=18*r.deltaY):(l.x=r.deltaX,l.y=r.deltaY);else if("wheelDelta"in r)r.wheelDeltaX&&(l.x=-.16*r.wheelDeltaX),r.wheelDeltaY?l.y=-.16*r.wheelDeltaY:l.y=-.16*r.wheelDelta;else{if(!("detail"in r))return;l.y=r.detail}if(t.config.sl_mouseWheelPagination&&!t.isZoom){var h=Math.abs(l.y)>Math.abs(l.x)?l.y:-l.x,c=Date.now();0===a.length&&a.push(c),c-a[0]<o?(s.length>0&&s[s.length-1]!==h&&(n+=1),s.push(h),a.push(c)):(o=n>3?1100:500,s=[],a=[],n=0),c-i>o&&(h>0?t.gotoNext():t.gotoPrev(),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),i=c)}else t.zoomingPage&&!t.dragging&&t.zoomingPage.renderTransformByDelta(l.x,l.y)}},t.handlerMWheel}},{key:"zoomSwitch",value:function(){var e=w.Point(this.view.clientWidth/2,this.view.clientHeight/2);this.secondClick(e)}},{key:"isZoom",get:function(){return!!this.pageInFocus&&this.pageInFocus.isInScale}},{key:"fitMode",value:function(e){this.config.sl_fit&&(this.FF_Mode=e);for(var t=0;t<this.sliderPages.length;t+=1)this.sliderPages[t].fit()}},{key:"firstClick",value:function(e,t){var i;if(this.pageInFocus?i=this.pageInFocus.action("click",t):this.prepareToRemove(),this.pageInFocus.isPointInItem(e)||w.miniScreen)if(this.pageInFocus.isInScale)this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(!this.needHideControlls);else switch(i){case"audioPlay":this.fitMode(!0),this.showControlls(!1),this.needHideControlls=!this.isControllsShow;break;case"audioStop":this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow;break;case"linkAction":void 0!==this.pageInFocus.item.link&&""!==this.pageInFocus.item.link&&window.open(this.pageInFocus.item.link,this.pageInFocus.item.link_target?this.pageInFocus.item.link_target:"_blank");break;case"videoPlay":this.pageInFocus.isPointInItem(e)?(this.fitMode(!0),this.showControlls(!1),this.needHideControlls=!this.isControllsShow):(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);break;case"videoStop":this.pageInFocus.isPointInItem(e)?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):(this.switchShowControlls(),this.needHideControlls=!this.isControllsShow);break;default:this.fitMode(this.isControllsShow),this.switchShowControlls(),this.needHideControlls=!this.isControllsShow}else this.config.sl_canRemoved?"videoStop"===i?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):this.prepareToRemove():this.config.sl_canRemoved||("videoStop"===i?(this.fitMode(!1),this.showControlls(!0),this.needHideControlls=!this.isControllsShow):this.blackMilkEvent&&this.blackMilkEvent())}},{key:"secondClick",value:function(e){this.config.sl_zoom&&this.pageInFocus.isPointInItem(e)&&(this.pageInFocus.isInScale?(this.pageInFocus.normalize(!0),this.zoomingPage=void 0,this.showControlls(!this.needHideControlls)):(this.zoomingPage&&this.zoomingPage.normalize(),this.zoomingPage=this.pageInFocus,this.zoomingPage.zoomIn(Math.abs(this.zoomingPage.imgScale-1)<.3?2:this.zoomingPage.imgScale,e),this.needHideControlls=!this.isControllsShow,this.showControlls(!1)))}},{key:"doubleClickController",value:function(e){var t=this;if(!w.Device.ios||"mouseup"!==e.type){var i,a;if(e.changedTouches&&e.changedTouches[0]?(i=e.changedTouches[0].pageX,a=e.changedTouches[0].pageY):(i=e.pageX,a=e.pageY),i-=this.viewOfsetX,a-=this.viewOfsetY,this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(w.Point(i,a));this.firsrTap=setTimeout((function(){t.firsrTap=void 0,t.firstClick(w.Point(i,a))}),400)}}},{key:"startDrag",value:function(){var t,i,a,s,o,n,r,l,h,c=this,d=c.viewOfsetY,u=c.viewOfsetX,g=0,m=0,p=0;function v(e){var t,l,h,v,y;if(e.originalEvent&&(e=e.originalEvent),e.touches?!c.dragging&&e.touches.length>1?c.config.sl_zoom&&(r=!0,t=e.touches[0].pageX,l=e.touches[0].pageY,h=e.touches[1].pageX,v=e.touches[1].pageY,y=Math.hypot(t-h,l-v),t+=(h-t)/2,l+=(v-l)/2):(r=!1,t=e.touches[0].pageX,l=e.touches[0].pageY):(t=e.pageX,l=e.pageY),t-=u,l-=d,!(w.Device.ios&&i<=20)){var f,b;if(void 0===n&&(l===a?n=!1:(f=180*Math.atan2(Math.abs(l-a),Math.abs(t-i))/Math.PI,n=f>45)),!c.dragging&&c.zoomingPage){e.preventDefault();var C=Math.abs(i-t)>4?i-t:0,S=Math.abs(a-l)>4?a-l:0;return(C||S)&&(c.zoomingDrag=!0),void(r?c.pageInFocus.zoomByScaleDeltaToPoint(y,w.Point(C,S),w.Point(t,l)):c.zoomingPage&&c.zoomingPage.dragin(w.Point(C,S)))}n?(g=0,(b=Math.abs(a-l)>4?a-l:0)&&(c.dragging=!0),(c.config.sl_canRemoved||c.canRemovedLite)&&(c.scrollViewTranslateY=o-b)):(e.preventDefault(),c.transition=!0,(b=Math.abs(i-t)>4?i-t:0)&&(c.dragging=!0),c.scrollViewTranslateX=s-b,m=p,p=c.scrollViewTranslateX,g=p-m)}}function y(e){if(n=void 0,w.isTouchDevice&&(document.removeEventListener("touchmove",v,w.passiveListener),document.removeEventListener("touchend",y,w.passiveListener)),document.removeEventListener("mousemove",v,!1),document.removeEventListener("mouseup",y,!1),document.removeEventListener("contextmenu",y,!1),c.dragging||r||c.zoomingDrag){if(c.zoomingPage&&(c.zoomingPage.stopDrag(),r=!1),!c.zoomingPage)if(Math.abs(c.scrollViewTranslateY)<4){var i=c.currentItemIndex,a=w.isTouchDevice?7:1;Math.abs(g)>a&&t===c.currentItemIndex&&(i=g>0?i-1:i+1),c.speedX=g,c.scrollViewTranslateY=0,c.gotoPageByIndex(i,!0)}else{var s=c.scrollViewTranslateY/(c.size.height/2);Math.abs(s)>.2?c.canRemovedLite?c.blackMilkEvent&&(c.scrollViewTranslateY=0,c.blackMilkEvent()):c.prepareToRemove():c.renderTransformTo(w.Point(c.scrollViewTranslateX,0))}this.dragging=!1}else c.doubleClickController(e);c.zoomingDrag=!1,h=e.type}return function(n){var f,b,C,S;"mousedown"===n.type&&"touchend"===h||(c.zoomingPage=c.pageInFocus.isInScale?c.pageInFocus:void 0,w.cancelAnimationFrame(c.animaSliderRender),t=c.currentItemIndex,n.originalEvent&&(n=n.originalEvent),w.isTouchDevice||n.preventDefault(),n.button&&0!==n.button||(n.touches?!c.dragging&&n.touches.length>1?c.config.sl_zoom&&(r=!0,f=n.touches[0].pageX,b=n.touches[0].pageY,C=n.touches[1].pageX,S=n.touches[1].pageY,l=Math.hypot(f-C,b-S),f+=(C-f)/2,b+=(S-b)/2,c.zoomingPage=c.pageInFocus,c.needHideControlls=c.isControllsShow,c.showControlls(!1)):(f=n.touches[0].pageX,b=n.touches[0].pageY):(f=n.pageX,b=n.pageY),f-=u,b-=d,c.speedX=0,c.speedY=0,g=0,m=0,p=c.scrollViewTranslateX,i=f,a=b,s=c.scrollViewTranslateX,o=c.scrollViewTranslateY,c.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,c,{draging:!0})),c.zoomingPage&&c.zoomingPage.startDrag(w.Point(i,a),l),w.isTouchDevice&&(document.addEventListener("touchmove",v,w.passiveListener),document.addEventListener("touchend",y,w.passiveListener)),document.addEventListener("mousemove",v,!1),document.addEventListener("mouseup",y,!1),document.addEventListener("contextmenu",y,!1)))}}},{key:"createControlls",value:function(){var t=this;function i(e){e.style.backgroundColor=t.config.sl_navigationColorOver,e.childNodes[0].style.fill=t.config.sl_navigationIconColorOver,e.classList.add("hover")}function a(e){e.style.backgroundColor=t.config.sl_navigationColor,e.childNodes[0].style.fill=t.config.sl_navigationIconColor,e.classList.remove("hover")}this.prevButton=document.createElement("div"),this.prevButton.className="".concat(e.classPref,"next-prev-button"),this.prevButton.style.left="".concat(0,"px"),this.prevButton.style.transform="translate(-150%, -50%)",this.prevButton.style.backgroundColor=t.config.sl_navigationColor,this.prevButton.style.visibility="hidden",this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=t.config.sl_navigationIconColor,this.prevButton.onmouseenter=function(){i(this)},this.prevButton.onmouseleave=function(){a(this)},this.prevButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),w.Device.desktop||a(this)},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.style.backgroundColor=t.config.sl_navigationColor,this.nextButton.style.right="0px",this.nextButton.style.transform="translate(150%, -50%)",this.nextButton.style.visibility="hidden",this.nextButton.innerHTML=w.ICONS.NEXT_ARR,this.nextButton.childNodes[0].style.fill=t.config.sl_navigationIconColor,this.nextButton.onmouseenter=function(){i(this)},this.nextButton.onmouseleave=function(){a(this)},this.nextButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),w.Device.desktop||a(this)},this.view.appendChild(this.nextButton)}},{key:"switchShowControlls",value:function(){this.showControlls(!this.isControllsShow)}},{key:"showHideNaviButton",value:function(t){if(this.naviButtonsStatus!==t){switch(t){case"show":if(this.isZoom)return;this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:this.canNext?"show":"hide",prev:this.canPrev?"show":"hide"})),this.prevButton&&(this.prevButton.style.transform="translate(0%, -50%)",this.prevButton.style.transform="translate(0%, -50%)",this.canNext&&(this.prevButton.style.transform="translate(0%, -50%)"),this.canNext&&(this.nextButton.style.transform="translate(0%, -50%)"));break;case"hide":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"hide",prev:"hide"})),this.prevButton&&(this.prevButton.style.transform="translate(-150%, -50%)",this.nextButton.style.transform="translate(150%, -50%)")}this.naviButtonsStatus=t}}},{key:"zoomControll",value:function(){this.isZooming!==this.isZoom&&(this.isZooming=this.isZoom,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{zoom:this.isZoom?"zoomIn":"zoomOut"})),this.isZoom?(this.view.classList.add("pgc-img-zoom-in"),this.showHideNaviButton("hide")):(this.view.classList.remove("pgc-img-zoom-in"),this.showHideNaviButton("show")))}},{key:"showControlls",value:function(t){this.zoomControll(),this.isControllsShow!==t&&(t?(this.slider.classList.add("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):(this.slider.classList.remove("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),w.miniScreen&&this.showHideNaviButton("hide")),this.isControllsShow=t)}},{key:"updateControlls",value:function(){this.itemsAmount<3||!1===this.config.sl_carouselMode?(0===this.itemIndex?(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{prev:"hide"})),this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{prev:"show"})),this.canPrev=!0,this.prevButton&&(this.prevButton.style.visibility="visible")),this.itemIndex===this.itemsAmount-1?(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"hide"})),this.canNext=!1,this.nextButton&&(this.nextButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"show"})),this.canNext=!0,this.nextButton&&(this.nextButton.style.visibility="visible")),1===this.itemsAmount&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"hide",prev:"hide"})),this.canNext=this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden"),this.nextButton&&(this.nextButton.style.visibility="hidden"))):(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"show",prev:"show"})),this.canNext=this.canPrev=!0,this.prevButton&&(this.prevButton.style.visibility="visible"),this.nextButton&&(this.nextButton.style.visibility="visible"));var t=this.itemsList[this.itemIndex];t&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{item:t,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(e){var t=this;this.resizeDelay&&clearTimeout(this.resizeDelay),w.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(t.size=e,t.prevButton&&(t.size.width<500?(t.prevButton.classList.add("next-prev-button-mini-screen"),t.nextButton.classList.add("next-prev-button-mini-screen")):(t.prevButton.classList.remove("next-prev-button-mini-screen"),t.nextButton.classList.remove("next-prev-button-mini-screen"))),0!==t.sliderPages.length){for(var i=0;i<t.sliderPages.length;i+=1)t.sliderPages[i].resize(t.size);t.zoomControll(),t.gotoPageByIndex(t.currentItemIndex,!1),t.size.height<410&&t.config.sl_canRemoved&&(t.showControlls(!1,!0),t.needHideControlls=!0)}}),70)}}],[{key:"classPref",get:function(){return"pgc-rev-slider-"}},{key:"ICONS",get:function(){return{PLAY_SVG:'<svg version="1.1" viewBox="0 0 50 60" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M48.479,27.435L5.672,0.915C2.553-1.132,0,0.374,0,4.261v51.48c0,3.885,2.553,5.391,5.672,3.346l42.807-26.52   c0,0,1.521-1.07,1.521-2.566S48.479,27.435,48.479,27.435z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>',NOTE_SVG:'<svg version="1.1" viewBox="0 0 58 94" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g><path d="M37.992,0h-8.021v65.358c-4.435-1.706-10.174-1.73-15.835,0.328C3.994,69.377-2.049,78.355,0.638,85.736   c2.688,7.383,13.088,10.374,23.229,6.683c8.614-3.134,14.249-10.082,14.111-16.626l0.014-53.451   c13.986,2.204,14.943,19.884,13.268,24.842c-0.636,1.879,0.484,3.286,2.598,0C68.938,23.726,37.992,13.376,37.992,0z"/></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></svg>'}}},{key:"EVENTS",get:function(){return{COLLECTION_DATA_REDY:"COLLECTION_DATA_REDY",UPDATE_CONTROLS:"UPDATE_CONTROLS",YT_ON_CHANGE_STATUS:"YT_ON_CHANGE_STATUS",ZOOM:"ZOOM",REMOVE_LIGHTBOX:"REMOVE_LIGHTBOX"}}},{key:"CONFIG",get:function(){return{sl_preloaderColor:"#494949",sl_backgroundColor:"rgba(0,0,0,1)",sl_navigationIconColor:"rgba(255,255,255,1)",sl_navigationIconColorOver:"rgba(0,0,0,0.8)",sl_navigationColor:"rgba(0,0,0,0.8)",sl_navigationColorOver:"rgba(255,255,255,1)",sl_zoom:!1,sl_fit:!1,sl_xOffset:2,sl_yOffset:0,sl_canRemoved:!1,sl_copyR_Alert:"Hello, this photo is mine!",sl_copyR_Proptection:!0,sl_audioPlayer:void 0,sl_mouseWheelPagination:!1,sl_next_prev_animation:!1,sl_video_auto_start:!1,sl_video_loop:!1,sl_carouselMode:!0,sl_FullSizeViewMode:!1}}}])}(),X=i(7157),Z=i.n(X),K={};function J(e){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},J(e)}function $(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ee(a.key),a)}}function Q(e,t,i){return t&&$(e.prototype,t),i&&$(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function ee(e){var t=function(e){if("object"!=J(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=J(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==J(t)?t:t+""}function te(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}K.styleTagTransform=u(),K.setAttributes=l(),K.insert=n().bind(null,"head"),K.domAPI=s(),K.insertStyleElement=c(),t()(Z(),K),Z()&&Z().locals&&Z().locals;var ie=Q((function e(t,i,a,s,o,n,r){function l(e){return e&&e[0].toUpperCase()+e.slice(1)}te(this,e);var h=document.createElement("div");return h.className=t,h.dataset.type=a,h.innerHTML=i,h.style.backgroundColor=s,h.style.order=r,h.style.fill=o,h.setAttribute("title",l(a)),h.setAttribute("aria-label",l(a)),h.addEventListener("touchend",n,!1),h.addEventListener("click",n,!1),h.addEventListener("mouseenter",n,!1),h.addEventListener("mouseleave",n,!1),h}));const ae=function(){function e(t,i,a){te(this,e),this.appSet=t,this.appName=t.appName,this.type=i,this.buttonsList=[];var s=e.MENU_TYPE;this.config=e.CONFIG,w.copyProperties(a,this.config),this.item=void 0,this.lightbox=i===s.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.classList.add(i),this.initButtons()}return Q(e,[{key:"initButtons",value:function(){var t=this.type,i=e.MENU_TYPE,a=this;function s(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=a.backgroundColor:(e.style.backgroundColor=a.backgroundColor,e.style.fill=a.iconColor,e.classList.remove("hover")))}function o(t){if(this.eventType=t.type,"click"===t.type){var i=a.item;if(!i)return;var o={};o.type=this.dataset.type,o.item=i,this.dataset.type,s(this),w.Device.desktop||s(this),a.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.ITEM_MENU_ACTION,a,o))}else"mouseenter"===t.type?"bookmark"===(n=this).dataset.type&&n.dataset.bookmark?n.style.backgroundColor=a.backgroundColorOver:(n.style.backgroundColor=a.backgroundColorOver,n.style.fill=a.iconColorOver,n.classList.add("hover")):"mouseleave"===t.type&&s(this);var n}this.backgroundColor=this.config.im_backgroundColor,this.backgroundColorOver=this.config.im_backgroundColorOver,this.iconColor=this.config.im_iconColor,this.iconColorOver=this.config.im_iconColorOver,this.config.im_link&&(this.linkButton=new ie("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.LINK_2_SVG:w.ICONS.LINK_SVG,"link",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?6:0),this.buttonsList.push(this.linkButton),this.view.appendChild(this.linkButton)),this.config.im_play&&(this.playButton=new ie("".concat(e.classPref,"button"),w.ICONS.PLAY_SVG,"play",this.backgroundColor,this.iconColor,o,1),this.buttonsList.push(this.playButton),this.view.appendChild(this.playButton)),this.config.im_zoom&&(this.zoomButton=new ie("".concat(e.classPref,"button"),w.ICONS.ZOOM_IN_SVG,"zoom",this.backgroundColor,this.iconColor,o,2),this.buttonsList.push(this.zoomButton),this.view.appendChild(this.zoomButton)),this.config.im_info&&(this.infoButton=new ie("".concat(e.classPref,"button"),w.ICONS.INFO_SVG,"info",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?5:3),this.buttonsList.push(this.infoButton),this.view.appendChild(this.infoButton)),this.config.im_discuss&&(this.commentsButton=new ie("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.COMENTS_2_SVG:w.ICONS.COMENTS_SVG,"coments",this.backgroundColor,this.iconColor,o,(i.ULTRABOX,4)),this.buttonsList.push(this.commentsButton),this.view.appendChild(this.commentsButton)),this.config.im_download&&(this.downloadButton=new ie("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.DOWNLOAD_2_SVG:w.ICONS.DOWNLOAD_SVG,"download",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?3:5),this.buttonsList.push(this.downloadButton),this.view.appendChild(this.downloadButton)),this.config.im_share&&(this.shareButton=new ie("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.SHARE_2_SVG:w.ICONS.SHARE_SVG,"share",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?2:6),this.buttonsList.push(this.shareButton),this.view.appendChild(this.shareButton)),this.config.im_bookmark&&(this.bookMarkButton=new ie("".concat(e.classPref,"button"),w.ICONS.BOOKMARK_SVG,"bookmark",this.backgroundColor,this.iconColor,o),this.buttonsList.push(this.bookMarkButton),this.view.appendChild(this.bookMarkButton)),this.config.im_like&&(this.likeButton=new ie("".concat(e.classPref,"button"),t===i.ULTRABOX?w.ICONS.HEART_2_SVG:w.ICONS.HEART_SVG,"like",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?1:7),this.buttonsList.push(this.likeButton),this.view.appendChild(this.likeButton)),this.config.im_thumbnails&&(this.thumbs=new ie("".concat(e.classPref,"button"),w.ICONS.GRID_SVG,"thumbnails",this.backgroundColor,this.iconColor,o,8),this.buttonsList.push(this.thumbs),this.view.appendChild(this.thumbs)),this.config.im_resize&&(this.resizeButton=new ie("".concat(e.classPref,"button"),w.ICONS.EXPAND_SVG,"resize",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?6:9),this.buttonsList.push(this.resizeButton),this.view.appendChild(this.resizeButton)),this.config.im_fulscreen&&(this.fullscreenButton=new ie("".concat(e.classPref,"button"),w.ICONS.FULL_SCREEN_SVG,"fullscreen",this.backgroundColor,this.iconColor,o,t===i.ULTRABOX?7:10),this.buttonsList.push(this.fullscreenButton),this.view.appendChild(this.fullscreenButton)),this.config.im_close&&(this.closeButton=new ie("".concat(e.classPref,"button"),w.ICONS.CLOSE_SVG,"close",this.backgroundColor,this.iconColor,o,11),this.buttonsList.push(this.closeButton),this.view.appendChild(this.closeButton))}},{key:"updateConfig",value:function(e){if(0!==w.copyProperties(e,this.config).length){for(var t=0;t<this.buttonsList.length;t+=1){var i=this.buttonsList[t];i.parentNode&&i.parentNode.removeChild(i),delete this.buttonsList[t]}this.buttonsList=[],this.initButtons()}}},{key:"updateForItem",value:function(t){var i=e.MENU_TYPE;if(this.item=t,this.zoomButton&&("image"!==t.type?this.zoomButtonStatus("desable"):this.zoomButtonStatus("zoomOut")),this.downloadButton&&("image"===t.type||"audio"===t.type||"video"===t.type&&void 0===t.mime_type?(this.downloadButton.style.opacity="1",this.downloadButton.style.cursor="pointer",this.downloadButton.style.pointerEvents="auto"):(this.downloadButton.style.opacity="0.4",this.downloadButton.style.cursor="default",this.downloadButton.style.pointerEvents="none")),this.likeButton&&this.config.im_likesSet&&(this.config.im_likesSet()[t.ID]?(this.likeButton.style.fill="red",this.likeButton.style.cursor="default",this.likeButton.style.pointerEvents="none",this.likeButton.dataset.like=t.ID):(this.likeButton.style.fill=this.iconColor,this.likeButton.style.cursor="pointer",this.likeButton.style.pointerEvents="all",this.likeButton.removeAttribute("data-like"))),this.bookMarkButton&&(this.config.im_isContainIdInBookmarkSet(this.item.ID)||0===this.config.im_isContainIdInBookmarkSet(this.item.ID)?(this.bookMarkButton.dataset.bookmark=t.ID,this.bookMarkButton.style.fill="red"):(delete this.bookMarkButton.dataset.bookmark,this.bookMarkButton.style.fill=this.iconColor)),this.linkButton&&(t.meta&&t.meta.subType&&"product"===t.meta.subType?this.linkButton.innerHTML=w.ICONS.SHOP_SVG:this.linkButton.innerHTML=this.type===i.ULTRABOX?w.ICONS.LINK_2_SVG:w.ICONS.LINK_SVG,t.link?(this.linkButton.style.display="block",this.linkButton.style.opacity="1",this.linkButton.style.cursor="pointer",this.linkButton.style.pointerEvents="all",t.linkText&&""!==t.linkText?this.linkButton.setAttribute("title",t.linkText):this.linkButton.removeAttribute("title")):(this.linkButton.style.opacity="0",this.linkButton.style.display="none",this.linkButton.style.cursor="default",this.linkButton.style.pointerEvents="none")),this.commentsButton)switch(t.comment_status){case"open":this.commentsButton.style.display=null;break;case"closed":this.commentsButton.style.display="none"}}},{key:"zoomButtonStatus",value:function(e){if(this.zoomButton&&this.zoomStatus!==e){switch(e){case"desable":this.zoomButton.innerHTML=w.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="none",this.zoomButton.style.opacity=.4;break;case"zoomOut":this.zoomButton.innerHTML=w.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1;break;case"zoomIn":this.zoomButton.innerHTML=w.ICONS.ZOOM_OUT_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1}this.zoomStatus=e}}},{key:"resizeButtonStatus",value:function(e){if(this.resizeButton)switch(e){case"mini":default:this.resizeButton.innerHTML=w.ICONS.EXPAND_SVG;break;case"maxi":this.resizeButton.innerHTML=w.ICONS.REDUCE_SVG;break;case"disable":this.resizeButton.style.display="none";break;case"enable":this.resizeButton.style.display="inline-block"}}},{key:"playButtonStatus",value:function(e){if(this.playButton&&this.playStatus!==e){switch(e){case"play":this.playButton.innerHTML=w.ICONS.PAUSE_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"stop":this.playButton.innerHTML=w.ICONS.PLAY_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"desable":this.playButton.innerHTML=w.ICONS.PLAY_SVG,this.playButton.style.pointerEvents="none",this.playButton.style.opacity=.4}this.playStatus=e}}},{key:"resizeHandler",value:function(){var e=this;setTimeout((function(){var t=document.webkitIsFullScreen||document.mozFullScreen||!1;e.fullscreenButton&&(e.fullscreenButton.innerHTML=t?w.ICONS.NORMAL_SCREEN_SVG:w.ICONS.FULL_SCREEN_SVG,e.fullscreenButton.style.fill=e.iconColor)}),200)}}],[{key:"classPref",get:function(){return"pgc-rev-item-menu-"}},{key:"EVENTS",get:function(){return{ITEM_MENU_ACTION:"ITEM_MENU_ACTION"}}},{key:"MENU_TYPE",get:function(){return{THUMB:"".concat(e.classPref,"type-thumb"),LIGHTBOX:"".concat(e.classPref,"type-lightbox"),ULTRABOX:"".concat(e.classPref,"type-ultrabox")}}},{key:"CONFIG",get:function(){return{im_linkTargetWindow:"_self",im_backgroundColor:"rgb(0,0,0)",im_backgroundColorOver:"rgb(255,255,255)",im_iconColor:"rgb(255,255,255)",im_iconColorOver:"rgb(0,0,0)",im_link:!1,im_play:!1,im_zoom:!1,im_info:!1,im_discuss:!1,im_download:!1,im_share:!1,im_like:!1,im_bookmark:!1,im_resize:!1,im_fulscreen:!1,im_thumbnails:!1,im_close:!1,im_likesSet:void 0,im_isContainIdInBookmarkSet:void 0}}}])}();var se=i(1280),oe=i.n(se),ne={};function re(e){return re="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},re(e)}function le(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function he(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?le(Object(i),!0).forEach((function(t){ce(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):le(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function ce(e,t,i){return(t=ue(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function de(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,ue(a.key),a)}}function ue(e){var t=function(e){if("object"!=re(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=re(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==re(t)?t:t+""}ne.styleTagTransform=u(),ne.setAttributes=l(),ne.insert=n().bind(null,"head"),ne.domAPI=s(),ne.insertStyleElement=c(),t()(oe(),ne),oe()&&oe().locals&&oe().locals,w.trace;var ge=function(){function e(t,i){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appEventManager=t,this.config=he(he({},e.CONFIG),i),this.type=void 0,this.animDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.backgroundColor=this.config.infb_backgroundColor;var s=document.createElement("div");s.className="".concat(e.classPref,"bg"),s.dataset.type="bg",this.bg=s,s.onclick=function(){a.prepareToRemove()},this.view.appendChild(s),this.contentWrap=document.createElement("div"),this.contentWrap.className="".concat(e.classPref,"content-wrap"),this.view.appendChild(this.contentWrap),this.addToStage()}return t=e,a=[{key:"classPref",get:function(){return"pgc-rev-info-bar-light-"}},{key:"EVENTS",get:function(){return{REMOVE_INFO_BAR_WINDOW:"REMOVE_INFO_BAR_WINDOW"}}},{key:"CONFIG",get:function(){return{infb_parentDiv:void 0,infb_backgroundColor:"rgba(0,0,0,0.8)"}}}],(i=[{key:"addToStage",value:function(){var t=document.getElementsByTagName("BODY")[0];this.config.infb_parentDiv&&(t=this.config.infb_parentDiv,this.view.classList.add("".concat(e.classPref,"fixed"))),this.view.style.zIndex=w.findHighestZIndex(t)+1,t.appendChild(this.view)}},{key:"dataReady",value:function(){var t=this;this.animDelay=setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),40)}},{key:"initByContentDiv",value:function(e){clearTimeout(this.animDelay),this.contentWrap.innerHTML="",e&&this.contentWrap.appendChild(e),this.resizeHandler(),this.dataReady()}},{key:"resizeHandler",value:function(){this.contentWrap.scrollHeight>this.contentWrap.clientHeight?w.enableBodyScrollSlider():w.disableBodyScrollSlider()}},{key:"prepareToRemove",value:function(t){var i=this;clearTimeout(this.animDelay),this.config.infb_parentDiv&&w.enableBodyScrollSlider(),this.view.classList.remove("".concat(e.classPref,"activate")),this.animDelay=setTimeout((function(){i.view.parentNode&&i.view.parentNode.removeChild(i.view),delete i.shareBar,i.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.REMOVE_INFO_BAR_WINDOW,i,{}))}),t?0:300)}}])&&de(t.prototype,i),a&&de(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,a}();const me=ge;var pe=i(7336),ve=i.n(pe),ye={};function fe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function be(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?fe(Object(i),!0).forEach((function(t){we(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):fe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function we(e,t,i){return(t=Le(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Ce(e){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ce(e)}function Se(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ke(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Le(a.key),a)}}function Te(e,t,i){return t&&ke(e.prototype,t),i&&ke(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Le(e){var t=function(e){if("object"!=Ce(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Ce(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ce(t)?t:t+""}ye.styleTagTransform=u(),ye.setAttributes=l(),ye.insert=n().bind(null,"head"),ye.domAPI=s(),ye.insertStyleElement=c(),t()(ve(),ye),ve()&&ve().locals&&ve().locals;var Ie=function(){return Te((function e(t,i,a){Se(this,e),this.id=i,this.name=t,this.config=a,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.dataset.id=i,this.title=document.createElement("div"),this.title.innerHTML=t,this.title.className="".concat(e.classPref,"title"),this.view.appendChild(this.title),this.mouseleave(),this.selected=!1;var s=this;function o(e){switch(e.type){case"mouseenter":s.mouseenter();break;case"mouseleave":if(s.selected)return;s.mouseleave()}}this.view.addEventListener("mouseenter",o,!1),this.view.addEventListener("mouseleave",o,!1)}),[{key:"updateConfig",value:function(e){this.config=e,this.mouseleave()}},{key:"mouseenter",value:function(){this.title.style.color=this.config.tg_titleColorOver,this.view.style.backgroundColor=this.config.tg_backgrounColorOver}},{key:"mouseleave",value:function(){this.title.style.color=this.config.tg_titleColor,this.view.style.backgroundColor=this.config.tg_backgrounColor}},{key:"select",value:function(){this.mouseenter(),this.selected=!0,this.view.classList.add("pgc-selected")}},{key:"deselect",value:function(){this.selected=!1,this.mouseleave(),this.view.classList.remove("pgc-selected")}}],[{key:"classPref",get:function(){return"pgc-rev-tags-list-item-"}},{key:"CONFIG",get:function(){return{tg_backgrounColor:"lightgray",tg_backgrounColorOver:"gray",tg_titleColor:"black",tg_titleColorOver:"white"}}}])}(),Pe=function(){function e(t,i){Se(this,e),this.appSet=i,this.config=e.CONFIG,w.copyProperties(t,this.config),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.fontSize=this.config.tl_fontSize+"px",this.list=[],this.selectedTag=void 0}return Te(e,[{key:"updateViewByQueue",value:function(e,t){var i=this,a=e.map((function(e){return"".concat(e.title.toLowerCase(),"~/~").concat(e.title,"~/~").concat(e.term_id)}));this.config.tl_sort_item&&a.sort(),this.config.tl_all&&a.splice(0,0,"all~/~".concat(this.config.tl_all,"~/~0"));for(var s=function(){var s=a[o].split("~/~"),n={term_id:s[2],title:s[1]},r=Ie.CONFIG;r.tg_backgrounColor=i.config.tl_backgrounColor,r.tg_backgrounColorOver=i.config.tl_backgrounColorOver,r.tg_titleColor=i.config.tl_titleColor,r.tg_titleColorOver=i.config.tl_titleColorOver;var l=new Ie(n.title,n.term_id,r);void 0!==t&&parseInt(n.term_id)===parseInt(t)&&(i.selectedTag=l,l.select()),l.view.addEventListener("click",(function(){i.tagClickHandler(l)}),!1),e.push(l),i.view.appendChild(l.view)},o=0;o<a.length;o+=1)s()}},{key:"clearList",value:function(){for(this.view.removeEventListener("click",this.tagsClickHandler,!1);this.view.lastElementChild;)this.view.removeChild(this.view.lastElementChild);this.list=[]}},{key:"viewHandler",value:function(){var e=this;return e.tagsClickHandler=function(t){if(t.target.dataset&&t.target.dataset.tagIndex){var i=e.list[parseInt(t.target.dataset.tagIndex)];i&&e.tagClickHandler(i)}},e.tagsClickHandler}},{key:"refreshByListCustomSort",value:function(e,t,i){this.clearList(),i||e.unshift({id:"pgc_0",name:this.config.tl_all});var a=Ie.CONFIG;a.tg_backgrounColor=this.config.tl_backgrounColor,a.tg_backgrounColorOver=this.config.tl_backgrounColorOver,a.tg_titleColor=this.config.tl_titleColor,a.tg_titleColorOver=this.config.tl_titleColorOver;for(var s=0;s<e.length;s+=1){var o=e[s],n=new Ie(o.name,o.id,a);o.id===t&&(this.selectedTag=n,n.select()),n.view.dataset.tagIndex=this.list.length,this.list.push(n),this.view.appendChild(n.view)}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"refreshByList",value:function(e,t,i,a){this.clearList();var s=[],o=[],n=be({},e);for(var r in n)"pgc_0"!==r&&s.push(n[r].toLowerCase());a||(n.pgc_0=this.config.tl_all),(void 0===i||void 0!==i&&!0===i)&&s.sort(),a||s.splice(0,0,n.pgc_0.toLowerCase());for(var l=0;l<s.length;l+=1)for(var h in n)if(n[h].toLowerCase()!==s[l]);else{var c=Ie.CONFIG;c.tg_backgrounColor=this.config.tl_backgrounColor,c.tg_backgrounColorOver=this.config.tl_backgrounColorOver,c.tg_titleColor=this.config.tl_titleColor,c.tg_titleColorOver=this.config.tl_titleColorOver;var d=new Ie(n[h],h,c);h===t&&(this.selectedTag=d,d.select()),d.view.dataset.tagIndex=this.list.length,this.list.push(d),o.push(d),this.view.appendChild(d.view),delete n[h]}this.view.addEventListener("click",this.viewHandler(),!1)}},{key:"updateConfig",value:function(e){this.config=e,this.view.style.fontSize=this.config.tl_fontSize+"px";var t=Ie.CONFIG;t.tg_backgrounColor=this.config.tl_backgrounColor,t.tg_backgrounColorOver=this.config.tl_backgrounColorOver,t.tg_titleColor=this.config.tl_titleColor,t.tg_titleColorOver=this.config.tl_titleColorOver;for(var i=0;i<this.list.length;i+=1)this.list[i].updateConfig(t);this.list[0]&&(this.list[0].title.innerHTML=this.config.tl_all),this.selectedTag&&this.selectedTag.select()}},{key:"updateViewByList",value:function(e,t){var i=this,a=[],s=[],o=be({},e);for(var n in o)"0"!==n&&a.push(o[n].toLowerCase());o[0]=this.config.tl_all,a.sort(),a.splice(0,0,o[0].toLowerCase());for(var r=0;r<a.length;r+=1){var l=function(){if(o[h].toLowerCase()===a[r]){var e=Ie.CONFIG;e.tg_backgrounColor=i.config.tl_backgrounColor,e.tg_backgrounColorOver=i.config.tl_backgrounColorOver,e.tg_titleColor=i.config.tl_titleColor,e.tg_titleColorOver=i.config.tl_titleColorOver;var n=new Ie(o[h],h,e);return parseInt(h)===parseInt(t)&&(i.selectedTag=n,n.select()),n.view.addEventListener("click",(function(){i.tagClickHandler(n)}),!1),s.push(n),i.view.appendChild(n.view),delete o[h],1}};for(var h in o)l()}}},{key:"trySelectByTagId",value:function(e){for(var t=0;t<this.list.length;t+=1){var i=this.list[t];i.id===e&&(this.selectedTag&&this.selectedTag.deselect(),i.select(),this.selectedTag=i,t=this.list.length)}}},{key:"tagClickHandler",value:function(t){this.selectedTag&&this.selectedTag.deselect(),t.select(),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.TAG_ACTION,this,{tagId:t.id,tagName:t.name})),this.selectedTag=t}}],[{key:"classPref",get:function(){return"pgc-rev-tags-list-"}},{key:"EVENTS",get:function(){return{TAG_ACTION:"TAG_ACTION"}}},{key:"CONFIG",get:function(){return{tl_all:"All",tl_sort_item:!0,tl_backgrounColor:"lightgray",tl_backgrounColorOver:"gray",tl_titleColor:"black",tl_titleColorOver:"white",tl_fontSize:16}}}])}(),De=i(6550),Ee=i.n(De),xe={};function Me(e){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Me(e)}function _e(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function Ne(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?_e(Object(i),!0).forEach((function(t){Be(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):_e(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Be(e,t,i){return(t=He(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Oe(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,He(a.key),a)}}function He(e){var t=function(e){if("object"!=Me(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Me(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Me(t)?t:t+""}xe.styleTagTransform=u(),xe.setAttributes=l(),xe.insert=n().bind(null,"head"),xe.domAPI=s(),xe.insertStyleElement=c(),t()(Ee(),xe),Ee()&&Ee().locals&&Ee().locals,w.trace;var Ve=function(){function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appEventManager=t,this.config=Ne(Ne({},e.CONFIG),i),this.animDelay=void 0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.style.backgroundColor=this.config.ish_backgroundColor,this.view.style.fill=this.config.ish_iconColor;var a=document.createElement("div");a.className="".concat(e.classPref,"bg"),a.dataset.type="bg",this.view.appendChild(a);var s=".".concat(e.classPref,"button:hover{fill:").concat(this.config.ish_iconColorHover,"}"),o=document.createElement("style");if(o.styleSheet?o.styleSheet.cssText=s:o.appendChild(document.createTextNode(s)),this.view.appendChild(o),this.config.ish_facebook){var n=document.createElement("div");n.title="Facebook",n.className="".concat(e.classPref,"button"),n.dataset.type="facebook",n.innerHTML=w.ICONS.FB_SVG,this.view.appendChild(n)}if(this.config.ish_twitter){var r=document.createElement("div");r.title="X",r.className="".concat(e.classPref,"button"),r.dataset.type="x",r.innerHTML=w.ICONS.TW_SVG,this.view.appendChild(r)}if(this.config.ish_pinterest){var l=document.createElement("div");l.title="Pnterest",l.className="".concat(e.classPref,"button"),l.dataset.type="pinterest",l.innerHTML=w.ICONS.PIN_SVG,this.view.appendChild(l)}if(this.config.ish_download){var h=document.createElement("div");h.title="Download",h.className="".concat(e.classPref,"button"),h.dataset.type="download",h.innerHTML=w.ICONS.DOWNLOAD_SVG,this.download=h,this.view.appendChild(h)}if(this.config.ish_copy){var c=document.createElement("div");c.title="Copy URL",c.className="".concat(e.classPref,"button"),c.dataset.type="copy",c.innerHTML=w.ICONS.LINK_SVG,this.copy=c,this.view.appendChild(c)}}return t=e,a=[{key:"classPref",get:function(){return"pgc-rev-share-bar-light-"}},{key:"EVENTS",get:function(){return{REMOVE_SHARE_WINDOW:"REMOVE_SHARE_WINDOW"}}},{key:"CONFIG",get:function(){return{ish_parentDiv:void 0,ish_backgroundColor:"rgba(0,0,0,0.8)",ish_iconColor:"rgb(255,255,255)",ish_iconColorHover:"rgb(200,200,200)",ish_copy:!1,ish_download:!1,ish_facebook:!0,ish_twitter:!0,ish_pinterest:!0,ish_linkToPost:"sharelink"}}}],(i=[{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("BODY")[0];this.config.ish_parentDiv&&(i=this.config.ish_parentDiv,this.view.classList.add("".concat(e.classPref,"fixed")),w.disableBodyScrollSlider()),this.view.style.zIndex=w.findHighestZIndex(i)+1,i.appendChild(this.view),this.animDelay=setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),40)}},{key:"initByItem",value:function(e){var t=this,i=e.sharelink;"postlink"===this.config.ish_linkToPost&&(i=e.linkOriginal?e.linkOriginal:e[this.config.ish_linkToPost]);var a=document.createElement("div");a.innerText=i,a.style.bottom="0",a.style.position="absolute",a.style.opacity=0,a.id="pgc_copy_link";var s,o,n=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n       left=").concat(n,", height=450,width=600"),l=!1;this.view.onclick=function(n){var h=n.target;if(h.dataset.type)switch(h.dataset.type){case"facebook":window.open("https://www.facebook.com/share.php?u=".concat(i),"",r);break;case"x":window.open("https://x.com/intent/tweet?text=".concat(encodeURI(e.title?e.title:""),"&url=").concat(i),"",r);break;case"pinterest":window.open("https://www.pinterest.com/pin/create/button/?url=".concat(i,"&media=").concat(e.url,"\n              &description=").concat(encodeURI(e.title?e.title:"")),"",r);break;case"download":s=e.url,(o=document.createElement("A")).href=s,o.download=s.substr(s.lastIndexOf("/")+1),document.body.appendChild(o),o.click(),document.body.removeChild(o);break;case"copy":l&&window.open(i,"_blank"),t.view.appendChild(a),window.getSelection().selectAllChildren(document.getElementById("pgc_copy_link"));try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),t.view.removeChild(a),h.style.fill="green",l=!0)}catch(e){window.open(i,"_blank")}break;case"bg":t.prepareToRemove()}},this.addToStage(),this.download&&(this.download.classList.remove("disable"),"post"!==e.type&&"page"!==e.type&&"pgc_simply_gallery"!==e.type||this.download.classList.add("disable"),"video"===e.type&&e.mime_type&&this.download.classList.add("disable"))}},{key:"prepareToRemove",value:function(t){var i=this;clearTimeout(this.animDelay),this.config.ish_parentDiv&&w.enableBodyScrollSlider(),this.view.classList.remove("".concat(e.classPref,"activate")),this.animDelay=setTimeout((function(){i.view.parentNode&&i.view.parentNode.removeChild(i.view),delete i.shareBar,i.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.REMOVE_SHARE_WINDOW,i,{}))}),t?0:300)}}])&&Oe(t.prototype,i),a&&Oe(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,a}();const Ae=Ve;function ze(e){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ze(e)}function Fe(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Re(a.key),a)}}function Re(e){var t=function(e){if("object"!=ze(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ze(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ze(t)?t:t+""}function Ge(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Ge=function(){return!!e})()}function Ye(e){return Ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ye(e)}function je(e,t){return je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},je(e,t)}var We=window.PGC_SGB,Ue=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,i){return t=Ye(t),function(e,t){if(t&&("object"==ze(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Ge()?Reflect.construct(t,i||[],Ye(e).constructor):t.apply(e,i))}(this,t,arguments)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&je(e,t)}(t,e),i=t,a=[{key:"getDefSettungsFromAtt",value:function(e){var t={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i].default);return t}},{key:"moduleSettings",value:function(e){return window.PGC_SGB&&window.PGC_SGB.galleries&&window.PGC_SGB.galleries[e].galleryData?window.PGC_SGB.galleries[e].galleryData:null}},{key:"getViewPortBySelector",value:function(e){var t=document.querySelector('div[data-block-id="'.concat(e,'"]'));return t&&t.dataset.gallery?t:null}},{key:"pausedAllVideoPlayers",value:function(e){if(window&&window.PGC_SGB&&window.PGC_SGB.galleries)for(var t=window.PGC_SGB.galleries,i=Object.keys(t),a=0;a<i.length;a+=1){var s=t[i[a]];s.deleteAllEmbedInItems&&s.deleteAllEmbedInItems instanceof Function&&s.deleteAllEmbedInItems(e)}}},{key:"deleteAllEmbetContent",value:function(){t.pausedAllVideoPlayers()}},{key:"pausedAllVideoContent",value:function(){var e=document.getElementsByClassName("thumb-video-content");if(e.length)for(var t=0;t<e.length;t+=1)e[t].parentNode.classList.remove("pgc-interectiv"),e[t].pause()}},{key:"pausedAllAudioContent",value:function(){var e=document.getElementById("simplyAudioPlayer");e&&e.pause();var t=document.getElementsByClassName("pgc-sgb-svg-rotate");if(t.length)for(var i=0;i<t.length;i+=1)t[i].classList.remove("pgc-sgb-svg-rotate")}},{key:"shuffleArray",value:function(e){for(var t=e.length-1;t>0;t-=1){var i=Math.floor(Math.random()*(t+1)),a=[e[i],e[t]];e[t]=a[0],e[i]=a[1]}return e}},{key:"timeConverter",value:function(e){var t=new Date(e),i=new Date,a=new Date(Date.now()-864e5),s=t.getFullYear(),o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],n=t.getDate(),r=t.getHours(),l=t.getMinutes();return t.setHours(0,0,0,0)===i.setHours(0,0,0,0)?"Today, ".concat(r,":").concat(l):t.setHours(0,0,0,0)===a.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):s===(new Date).getFullYear()?"".concat(n," ").concat(o,", ").concat(s):"".concat(n," ").concat(o," ").concat(s)}},{key:"request",value:function(e,i,a,s,o){var n=new URL(e);if(a)for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&n.searchParams.set(r,a[r]);var l=new XMLHttpRequest;l.open("GET",n,!0),i&&l.setRequestHeader("X-WP-Nonce",i),l.onreadystatechange=function(){if(4===l.readyState){var e={};200!==l.status?e.error=l.statusText:e.data=l.responseText,s&&(e.params=s),o&&"function"==typeof o&&o(e)}},l.onerror=function(){t.trace("An error occurred while transferring the file.")};try{l.send()}catch(e){t.trace(e)}}},{key:"ItemGallery",value:function(e,t){var i={get webView(){return this.webImg.src?i.webImg:(this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)}},a=this;if(this.copyProperties(e,i),i.appName=t,i.sharelink=e.postLink,i.alt=""!==e.title?e.title:void 0,i.title){var s=document.createElement("div");s.innerHTML=i.title,i.title=1===s.childNodes.length?s.childNodes[0].nodeValue:i.title}return i.ratio=1,i.errorStatus=!1,i.itemViewSrc=function(){if(i.thumb){if(i.thumb.large)return i.thumb.large.url;if(i.thumb.full)return i.thumb.full.url}else if(i.thumbURL)return i.thumbURL;return null}(),i.itemViewThumbSrc=function(){if(i.thumb){if(i.thumb.medium)return i.thumb.medium.url;if(i.thumb.large)return i.thumb.large.url;if(i.thumb.full)return i.thumb.full.url}else if(i.thumbURL)return i.thumbURL;return null}(),i.itemViewSize=function(){if(i.thumb){if(i.thumb.large)return a.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return a.Size(i.thumb.full.width,i.thumb.full.height)}return a.Size(400,400)}(),i.itemViewThumbSize=function(){if(i.thumb){if(i.thumb.medium)return a.Size(i.thumb.medium.width,i.thumb.medium.height);if(i.thumb.large)return a.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return a.Size(i.thumb.full.width,i.thumb.full.height)}return a.Size(400,400)}(),i.ratio=i.itemViewSize.height/i.itemViewSize.width,i.webImg=new Image,i.webImg.setAttribute("draggable","false"),i.webImgFrame=this.Rect(0,0,0,0),i.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),i.webImg.addEventListener("error",(function(){i.errorStatus=!0,this.classList.add("onError")}),!1),i}},{key:"Item",value:function(e,i,a){var s={get webView(){return this.webImg.src?s.webImg:(this.itemViewFullSizePr?this.itemViewFlSrc&&(this.webImg.src=this.itemViewFlSrc):this.itemViewSrc&&(this.webImg.src=this.itemViewSrc),this.webImg)},set itemViewFullSize(e){this.itemViewFullSizePr=e},getItemViewFlSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.full)return this.poster.full.url;if(this.poster.large)return this.poster.large.url}return this.meta?this.meta.original?this.meta.original.url:this.meta.web?this.meta.web.url:null:null},getItemViewSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.large)return this.poster.large.url;if(this.poster.full)return this.poster.full.url}return this.meta?this.meta.web?this.meta.web.url:this.meta.original?this.meta.original.url:null:null},getItemViewThumbSrc:function(){if("video"===this.type)return null;if("audio"===this.type&&this.poster){if(this.poster.medium)return this.poster.medium.url;if(this.poster.large)return this.poster.large.url;if(this.poster.full)return this.poster.full.url}return this.meta?this.meta.thumb?this.meta.thumb.url:this.meta.web?this.meta.web.url:this.meta.original?this.meta.original.url:null:null},getItemViewFlSize:function(){if("audio"===this.type&&this.poster){if(this.poster.full)return t.Size(this.poster.full.width,this.poster.full.height);if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height)}return this.meta?this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):t.Size(300,300):t.Size(300,300)},getItemViewSize:function(){if("audio"===this.type&&this.poster){if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return t.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):t.Size(300,300):t.Size(300,300)},getItemViewThumbSize:function(){if("audio"===this.type&&this.poster){if(this.poster.medium)return t.Size(this.poster.medium.width,this.poster.medium.height);if(this.poster.large)return t.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return t.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.thumb?t.Size(this.meta.thumb.width,this.meta.thumb.height):this.meta.web?t.Size(this.meta.web.width,this.meta.web.height):this.meta.original?t.Size(this.meta.original.width,this.meta.original.height):t.Size(300,300):t.Size(300,300)},getRatio:function(){return this.getItemViewSize().height/this.getItemViewSize().width},hasTag:function(e){return"pgc_0"===e||!(!this.tags||0===this.tags.length)&&-1!==this.tags.indexOf(e)},updateSrcAndSizes:function(){this.itemViewFlSrc=this.getItemViewFlSrc(),this.itemViewSrc=this.getItemViewSrc(),this.itemViewThumbSrc=this.getItemViewThumbSrc(),this.itemViewFlSize=this.getItemViewFlSize(),this.itemViewSize=this.getItemViewSize(),this.itemViewThumbSize=this.getItemViewThumbSize(),this.ratio=this.getRatio()},initMetaObj:function(e){var t=!1;if("audio"===this.type&&e.poster!==this.poster&&(t=!0),e.poster?(this.poster=e.poster,"audio"===this.type&&this.updateSrcAndSizes()):(delete this.poster,"audio"===this.type&&this.updateSrcAndSizes()),this.tags=e.tags,e.link&&""!==e.link){if(this.link=decodeURIComponent(e.link),this.linkOriginal=this.link,this.linkTarget=e.linkTarget,this.linkText=e.linkText,this.orignLinkText=e.orignLinkText,"image"===this.type||this.parentType&&"image"===this.parentType){var i,a,s,o=this.link;if(o.match(/youtu\.be/i)||o.match(/youtube\.com/i))i=void 0!==(o=/(youtu.*be.*)\/(watch\?v=|embed\/|v|shorts|)(.*?((?=[&#?])|$))/gm.exec(o))[3]?o[3].split(/[^0-9a-z_\-]/i)[0]:o[0],a="video/youtube";else if(o.match(/vimeo\.com/i)){var n=o.match(/(www\.)?vimeo.com\/(\d+)($|:|\?|\/)/);n&&(i=parseInt(n[2],10),a="video/vimeo");var r=o.match(/vimeo.com\/(\d+):(\w+)$/);if(r){i=parseInt(r[1],10);var l=r[2];l&&i&&(s=l)}var h=o.match(/vimeo.com\/(\d+)\/(\w+)($|\?|\/)/);if(h){var c=h[2];c&&i&&(s=c)}}void 0!==i?(this.parentType||(this.parentType=this.type),this.type="video",this.mime_type=a,this.videoId=i,this.videoHash=s,this.link=void 0):(this.parentType&&(this.type=this.parentType),delete this.parentType,delete this.videoId,delete this.mime_type)}}else this.link=void 0,this.linkTarget="_self",this.linkText="",this.orignLinkText="",this.parentType&&(this.type=this.parentType),delete this.parentType,delete this.videoId,delete this.mime_type;return t}};if(s.itemViewFullSizePr=!(!a||!a.itemViewFullSize),s.comment_status="closed",s.featuredImage=void 0,s.tags=[],this.copyProperties(e,s),s.appName=i,s.idPrefix=void 0,s.albums=[],s.categories=[],s.user=s.author,s.sharelink=s.url,s.orignLinkText="",s.id=parseInt(e.id),s.duration){var o=new Date(null);o.setSeconds(parseInt(s.duration));var n=o.toISOString().slice(11,19).split(":");if(n.length&&3===n.length){var r="00"===n[0]?"":"".concat(n[0],":"),l="".concat(n[1],":"),h=n[2];s.fileLength=r+l+h}}if(s.ID=s.id,e.url&&(s.original=e.url),s.alt=""!==s.alt?s.alt:void 0,s.title=""!==s.title?s.title:void 0,s.caption=""!==s.caption?s.caption:void 0,s.description){var c=s.description.replace(/\r?\n/g,"<br />");s.description=c}if(s.ratio=1,s.errorStatus=!1,"attachment"===e.type&&e.media_type&&(s.type=e.media_type),s.link=e.link&&void 0!==e.linkText?decodeURIComponent(e.link):void 0,s.linkTarget=e.linkTarget?e.linkTarget:void 0,s.linkText=e.linkText?e.linkText:void 0,s.meta=function(){var t={};if(s.meta&&Object.assign(t,s.meta),t.mime=s.mime,t.likes=0,t.views=0,s.sizes)return s.sizes.medium&&(t.thumb=s.sizes.medium),s.sizes.large&&(t.web=s.sizes.large),s.sizes.full&&(t.original=s.sizes.full),t;if(s.fullUrl&&s.url){t.original={},t.original.url=s.url;var i=s.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");i&&i.length>0&&(t.original.width=i[0]&&i[1]?Math.min(parseInt(i[0]),3e3):300,t.original.height=i[0]&&i[1]?Math.min(parseInt(i[1]),3e3):300,s.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original}if(s.media_details&&s.media_details.sizes){var a=s.media_details.sizes;return a.medium&&(t.thumb=a.medium,t.thumb.url||(t.thumb.url=t.thumb.source_url)),a.large&&(t.web=a.large,t.web.url||(t.web.url=t.web.source_url)),a.full&&(t.original=a.full,t.original.url||(t.original.url=t.original.source_url)),t}if("audio"===s.type&&e.image&&e.image.width>=200&&!e.poster){var o={medium:{}};o.medium.url=e.image.src,o.medium.width=e.image.width,o.medium.height=e.image.height,o.medium.orientation=e.image.width/e.image.height>1?"landscape":"portrait",o.large=o.medium,o.full=o.medium,o.thumbnail=o.medium,s.poster=o}if(s.sizes)t.original=s.sizes.full?s.sizes.full:void 0,t.thumb=t.original,t.web=t.original,s.sizes.medium&&(t.thumb=s.sizes.medium),s.sizes.large&&(t.web=s.sizes.large);else{if("image"===s.type){t.original={},t.original.url=s.url;var n=s.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return n&&n.length>0&&(t.original.width=n[0]&&n[1]?Math.min(parseInt(n[0]),3e3):300,t.original.height=n[0]&&n[1]?Math.min(parseInt(n[1]),3e3):300,s.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}if("video"===s.type&&(e.image&&e.image.width>=200&&(s.featuredImage=e.image),e.width&&e.height))return t.original={},t.original.url=s.url,t.original.width=e.width,t.original.height=e.height,s.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t;if("audio"===s.type)return e.image&&e.image.width>=200?(t.original={},t.original.url=e.image.src,t.original.width=e.image.width,t.original.height=e.image.height,s.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t):(t.original={},t.original.url="".concat(We.assets,"holder-mp3.png"),t.original.width=300,t.original.height=300,s.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t);if(s.url&&void 0===s.width&&void 0===s.height){t.original={},t.original.url=s.url;var r=s.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return r&&r.length>0&&(t.original.width=r[0]&&r[1]?Math.min(parseInt(r[0]),3e3):300,t.original.height=r[0]&&r[1]?Math.min(parseInt(r[1]),3e3):300,s.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}if(s.width&&s.height&&(s.src||s.url))return t.original={},t.original.url=s.src||s.url,t.original.width=s.width,t.original.height=s.height,s.ratio=t.original.height/t.original.width,t.thumb=t.original,t.web=t.original,t;if(s.imgUrl){t.original={},t.original.url=s.imgUrl;var l=s.imgUrl.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return l&&l.length>0&&(t.original.width=l[0]&&l[1]?Math.min(parseInt(l[0]),3e3):300,t.original.height=l[0]&&l[1]?Math.min(parseInt(l[1]),3e3):300,s.ratio=t.original.height/t.original.width),t.thumb=t.original,t.web=t.original,t}}return t}(),s.updateSrcAndSizes(),s.sizes){var d="";for(var u in s.sizes)if(s.sizes.hasOwnProperty(u)){var g=s.sizes[u];d="".concat(d+g.url," ").concat(g.width,"w, ")}d=d.slice(0,-2),s.srcset=d}return s.webImg=new Image,s.webImg.setAttribute("draggable","false"),(s.title||s.alt)&&s.webImg.setAttribute("alt",s.alt?s.alt:s.title),s.webImgFrame=this.Rect(0,0,0,0),s.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),s.webImg.addEventListener("error",(function(){s.errorStatus=!0,this.classList.add("onError")}),!1),s}},{key:"GalleryItem",value:function(e,i,a){var s,o,n="pgcSgb";if(!(o="A"===i.tagName?i:i.getElementsByTagName("A")[0]))return null;if(o.target&&"_self"!==o.target)return null;if(!1===o.hasAttribute("href"))return null;var r=o.getAttribute("href"),l=o.getElementsByTagName("IMG")[0];if(l){if(l.dataset.lightboxExclude)return null;var h,c;if((s={get webView(){return this.webImg.src?s.webImg:(this.webImg.src=this.itemViewSrc,this.webImg)}}).galId=a,s.index=e,l.dataset.id?(s.ID="".concat(e,"_").concat(l.dataset.id),s.attId=l.dataset.id):s.ID="".concat(e,"_").concat(s.galId),s.url=r,s.sharelink=r,0===r.indexOf("http://")||0===r.indexOf("https://")){if("/"===(h=new URL(r)).pathname)return null;c=h.pathname.split("/").pop().split("#")[0].split("?")[0].split(".")}else c=(h=r).split("/").pop().split("#")[0].split("?")[0].split(".");if(c.length<=1)return null;if(s.fileName=c[0].split("-")[0],""===s.fileName)return null;if(l.src.indexOf(s.fileName)<0){if(!l.dataset.fullUrl)return null;if(l.dataset.fullUrl.indexOf(s.fileName)<0)return null}s.fileExt=c[c.length-1],l.dataset["".concat(n,"Id")]="".concat(a,"_").concat(e),o&&(o.dataset["".concat(n,"Id")]="".concat(a,"_").concat(e)),s.itemViewSrc=s.url,s.itemViewSize=t.Size(100,100),s.type="image",s.subtype="image/".concat(s.fileExt),l.alt&&""!==l.alt&&(s.alt=l.alt);var d=i.getElementsByTagName("FIGCAPTION");if(d[0]&&(d[0].id&&(s.ID+="_".concat(d[0].id.split("-").pop()),s.attId=d[0].id.split("-").pop()),s.title=d[0].innerHTML),!s.attId&&l.classList&&l.classList.length>0)for(var u=0;u<l.classList.length;u+=1){var g=l.classList.item(u);g.indexOf("wp-image")+1&&(s.attId=g.split("-").pop(),s.ID+="_".concat(s.attId),u=l.classList.length)}s.itemViewThumbSrc=r,s.itemViewThumbSize=t.Size(l.width?parseInt(l.width):150,l.height?parseInt(l.height):150),l.naturalWidth?(s.itemViewThumbSize.width=l.naturalWidth,s.itemViewThumbSize.height=l.naturalHeight):l.addEventListener("load",(function(){s.itemViewThumbSize.width=l.naturalWidth,s.itemViewThumbSize.height=l.naturalHeight}))}return s?(s.webImg=new Image,s.webImg.setAttribute("draggable","false"),(s.title||s.alt)&&s.webImg.setAttribute("alt",s.alt?s.alt:s.title),s.webImgFrame=this.Rect(0,0,0,0),s.webImg.addEventListener("load",(function(){this.classList.add("onLoad")}),!1),s.webImg.addEventListener("error",(function(){s.errorStatus=!0,this.classList.add("onError")}),!1),s):null}},{key:"Term",value:function(e,t){var i=this,a={get count(){return this.itemsList.length},get description(){if(this.description)return this.description},get name(){if(this.title)return this.title},get term_id(){if(this.gid)return this.gid},get sharelink(){if(i.moduleSettings(t).post_url)return i.moduleSettings(t).post_url},get thumbnail(){if(this.itemsList.length>0)return this.itemsList[0].itemViewSrc}};return this.copyProperties(e,a),a}},{key:"Meta",value:function(){return{}}}],null&&Fe(i.prototype,null),a&&Fe(i,a),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,a}(w);const qe=Ue;function Xe(e){return Xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Xe(e)}function Ze(e){return function(e){if(Array.isArray(e))return Ke(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return Ke(e,t);var i={}.toString.call(e).slice(8,-1);return"Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i?Array.from(e):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?Ke(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Ke(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,a=Array(t);i<t;i++)a[i]=e[i];return a}function Je(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,$e(a.key),a)}}function $e(e){var t=function(e){if("object"!=Xe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Xe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Xe(t)?t:t+""}qe.trace;const Qe=function(){return e=function e(t,i){var a=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appName=i.dataset.galleryId?i.dataset.galleryId:t,this.id=t,this.viewPort=i,this.editMode=!1,this.isInitByVp=!1,this.PAGINATION_AMOUNT=20,this.needScrollHandler=!0,this.lastAddedPageNum=void 0,this.itemsList=[],this.filteredList=[],this.tagsList={},this.tagsListAdvancedCustomMode={},this.tagFromHash=void 0,this.filterPr="pgc_0",this.tagsListCopy="",this.timeOut=void 0,this.configureGalleryDefSet(),this.propsFilter=Object.keys(this.galleryData),window.pgcVideoAutostartLock=!0,this.userInteractionListener=qe.PageInteractionListener(),this.userInteractionListener.init((function(e){e&&e.type&&"undefined"!=typeof window&&(window.pgcVideoAutostartLock=void 0)})),this.galleryData.appName=this.appName,this.initMetaDataCollection=void 0,this.presentedList=[],this.page_Amount=0,this.cureantPage=void 0,this.scrollHandler=void 0,this.viewedItem=void 0,this.view=document.createElement("div"),this.styleSheet=document.createElement("style"),this.styleSheet.id="style_".concat(this.appName),this.view.appendChild(this.styleSheet),this.customCssSheet=document.createElement("style"),this.customCssSheet.id="custom_style_".concat(this.appName),this.view.appendChild(this.customCssSheet),this.content=document.createElement("div"),this.view.appendChild(this.content),this.resizeTimeOut=void 0,this.viewWidth=0,this.firstUpdate=!1,this.content.className="".concat(this.classPref,"content"),this.view.className="".concat(this.classPref,"collection"),this.createAudioPlayer(),window.ResizeObserver&&(this.resizeObserver=new ResizeObserver((function(){a.windowResizeHandler()})),this.resizeObserver.observe(this.view)),i.style.minHeight=null},t=[{key:"classPref",get:function(){return qe.trace("** Need override - classPref **"),null}},{key:"itemViewConstructor",get:function(){return qe.trace("** Need override - itemViewConstructor **"),null}},{key:"configureGalleryDefSet",value:function(){this.galleryData={},this.galleryData.customCSS="",this.galleryData.cacheItemsList=qe.CacheItemsList(),this.galleryData.appEventManager=qe.GMEventsManager(),this.galleryData.itemsMetaDataCollection=[],this.galleryData.images=[],this.galleryData.gutIsSelected=!1,this.galleryData.isPremium=window.PGC_SGB&&window.PGC_SGB.skinsList&&window.PGC_SGB.skinsList.pgc_sgb_portfolio,this.galleryData.collectionItemPadding=10,this.galleryData.collectionItemBgColorEv="rgba(237,237,237,1)",this.galleryData.collectionItemBgColorOd="rgba(217,217,217,1)",this.galleryData.thumbTitleColorOd="rgba(153,153,153,1)",this.galleryData.thumbDescriptionTextColorOd="rgba(119,110,119,1)",this.galleryData.collectionThummMediaWidth=40,this.galleryData.collectionThummMediaWidthMax=100,this.galleryData.chessMode=!0,this.galleryData.thumbInfoBarBgColor="rgba(237,237,237,1)",this.galleryData.thumbTitle=!0,this.galleryData.thumbTitleFontSize=18,this.galleryData.thumbTitleColor="rgba(153,153,153,1)",this.galleryData.thumbDescription=!0,this.galleryData.thumbDescriptionSrc="caption",this.galleryData.thumbDescriptionFontSize=16,this.galleryData.thumbDescriptionTextColor="rgba(119,110,119,1)",this.galleryData.thumbPanningEffect=!0,this.galleryData.thumbShadowColor="rgba(0,0,0,1)",this.galleryData.thumbHardOrdering=!1,this.galleryData.tagsFilter=!1,this.galleryData.tagsListCustomMode=!1,this.galleryData.initGalleryByFirstTag=!1,this.galleryData.deepLinkingForTag=!1,this.galleryData.galleryTagsList=void 0,this.galleryData.startByTag="pgc_0",this.galleryData.tagCloudAll="All",this.galleryData.tagCloudBgColor="rgba(153,153,153,1)",this.galleryData.tagCloudBgColorOver="rgba(253,253,253,1)",this.galleryData.tagCloudTextColor="rgba(253,253,253,1)",this.galleryData.tagCloudTextColorOver="rgba(153,153,153,1)",this.galleryData.tagCloudFontSize=16,this.galleryData.pageMode=!1,this.galleryData.itemsPerPage=20,this.galleryData.loadMoreDefName="Load More",this.galleryData.loadMoreAuto=!1,this.galleryData.loadMoreFontSize=16,this.galleryData.loadMoreTextColor="rgba(255,255,255,1)",this.galleryData.loadMoreBgColor="rgba(0,0,0,1)",this.galleryData.numItemsDisplayed=0,this.galleryData.useLightbox=!0,this.galleryData.thumbClickAction="",this.galleryData.deepLinking=!1,this.galleryData.linkTargetWindow="self",this.galleryData.galleryBgColor="rgba(0,0,0,0)",this.galleryData.galleryBorderRadius=0,this.galleryData.lazyLoading=!0,this.galleryData.contentNoPadding=!1,this.galleryData.orderBy=!1,this.galleryData.sliderMaxHeight=400,this.galleryData.sliderAdminWidth=400,this.galleryData.responsiveHeight=!1,this.galleryData.sliderAnimation="animation",this.galleryData.sliderNextPrevNavigation=!0,this.galleryData.sliderNextPrevBgColor="rgba(255,255,255,1)",this.galleryData.sliderNextPrevBgColorHover="rgba(0,0,0,1)",this.galleryData.sliderNextPrevIconColor="rgba(0,0,0,1)",this.galleryData.sliderNextPrevIconColorHover="rgba(255,255,255,1)",this.galleryData.sliderItemFill="true",this.galleryData.sliderItemBgColor="rgba(0,0,0,0)",this.galleryData.sliderItemBorderWidth=0,this.galleryData.sliderItemBorderColor="rgba(0,0,0,0)",this.galleryData.collectionthumbColorsFilter="none",this.galleryData.sliderDotNavi=!1,this.galleryData.sliderDotNaviBgColor="rgba(0,0,0,0.4)",this.galleryData.sliderDotNaviBgColorHover="rgba(255,255,255,1)",this.galleryData.sliderThumbsNavi=!0,this.galleryData.sliderThumbsNaviColor="rgba(255,255,255,1)",this.galleryData.autoPlay=!1,this.galleryData.autoPlayDelay=4,this.galleryData.autoPlayMouseStoper=!0,this.galleryData.collectionPreloaderColor="rgba(0,0,0,0.7)",this.galleryData.thumbHieghtRation=1,this.galleryData.thumbSpacing=5,this.galleryData.thumbMobileSpacing=5,this.galleryData.collectionthumbRoundedCorners=0,this.galleryData.collectionthumbHoverTitleFontSize=18,this.galleryData.collectionthumbHoverTitleTextColor="rgba(255,255,255,1)",this.galleryData.collectionthumbHoverTitleTextBgColor="rgba(0,0,0,0.8)",this.galleryData.collectionthumbHoverBgColor="rgba(0,0,0,0.4)",this.galleryData.externalLink=!0,this.galleryData.externalLinkDefName="Read More",this.galleryData.externalLinkTextColor="rgba(0,0,0,1)",this.galleryData.externalLinkBgColor="rgba(255,255,255,1)",this.galleryData.externalLinkFontSize=18,this.galleryData.captions=!0,this.galleryData.captionSrc="caption",this.galleryData.captionHAlign="top",this.galleryData.collectionColumns=3,this.galleryData.lastRowFill=!1,this.galleryData.collectionThumbRecomendedWidth=200,this.galleryData.collectionThumbRecomendedHeight=200,this.galleryData.collectionThumbMiniScreenScale=!1,this.galleryData.collectionThumbSubMenuVisibility=!1,this.galleryData.collectionThumbSubMenuInfo=!1,this.galleryData.collectionThumbSubMenuComents=!1,this.galleryData.collectionThumbSubMenuShare=!0,this.galleryData.collectionThumbSubMenuDownload=!0,this.galleryData.collectionThumbSubMenuBgColor="rgba(0,0,0,0.8)",this.galleryData.collectionThumbSubMenuBgColorHover="rgba(255,255,255,1)",this.galleryData.collectionThumbSubMenuIconColor="rgba(255,255,255,1)",this.galleryData.collectionThumbSubMenuIconColorHover="rgba(0,0,0,1)",this.galleryData.modaBgColor="rgba(0,0,0,0.8)",this.galleryData.modalInfoBoxBgColor="rgba(240,240,240,1)",this.galleryData.modalInfoBoxTitleTextColor="rgba(20,20,20,1)",this.galleryData.modalInfoBoxTextColor="rgba(20,20,20,1)",this.galleryData.infoBarExifEnable=!1,this.galleryData.infoBarDateInfoEnable=!1,this.galleryData.modalIconColor="rgba(255,255,255,1)",this.galleryData.modalIconColorHover="rgba(200,200,200,1)",this.galleryData.shareFacebook=!0,this.galleryData.shareTwitter=!0,this.galleryData.sharePinterest=!0,this.galleryData.shareCopyLink=!0,this.galleryData.sliderItemDownload=!0,this.galleryData.sharePost="sharelink",this.galleryData.sliderFullSizeViewMode=!1,this.galleryData.sliderCarouselMode=!0,this.galleryData.sliderVideoAutoPlay=!1,this.galleryData.sliderVideoLoop=!1,this.galleryData.sliderTryPlayNext=!1,this.galleryData.sliderScrollNavi=!1,this.galleryData.sliderNextPrevAnimation="animation",this.galleryData.galleryScrollPositionControll=!1,this.galleryData.copyRProtection=!1,this.galleryData.copyRAlert="Hello, this photo is mine!",this.galleryData.sliderItemCounterEnable=!0,this.galleryData.itemCounterColor="rgba(255,255,255,1)",this.galleryData.sliderThumbBarEnable=!0,this.galleryData.sliderThumbBarHoverColor="rgba(240,240,240,1)",this.galleryData.sliderBgColor="rgba(0,0,0,0.8)",this.galleryData.sliderPreloaderColor="rgba(240,240,240,1)",this.galleryData.sliderHeaderFooterBgColor="rgba(0,0,0,0.4)",this.galleryData.sliderNavigationColor="rgba(0,0,0,1)",this.galleryData.sliderNavigationColorOver="rgba(255,255,255,1)",this.galleryData.sliderNavigationIconColor="rgba(255,255,255,1)",this.galleryData.sliderNavigationIconColorOver="rgba(0,0,0,1)",this.galleryData.sliderItemTitleEnable=!0,this.galleryData.sliderCaptionSrc="caption",this.galleryData.sliderItemTitleFontSize=20,this.galleryData.sliderItemTitleTextColor="rgba(255,255,255,1)",this.galleryData.sliderItemDescriptionEnable=!1,this.galleryData.sliderDescriptionSrc="caption",this.galleryData.sliderItemDescriptionFontSize=16,this.galleryData.sliderItemDescriptionTextColor="rgba(255,255,255,1)",this.galleryData.sliderSlideshow=!0,this.galleryData.sliderSlideshowAutoStart=!1,this.galleryData.sliderSlideshowDelay=8,this.galleryData.slideshowIndicatorColor="rgba(255,255,255,1)",this.galleryData.slideshowIndicatorColorBg="rgba(255,255,255,0.5)",this.galleryData.sliderThumbSubMenuBackgroundColor="rgba(255,255,255,0)",this.galleryData.sliderThumbSubMenuBackgroundColorOver="rgba(255,255,255,1)",this.galleryData.sliderThumbSubMenuIconColor="rgba(255,255,255,1)",this.galleryData.sliderThumbSubMenuIconHoverColor="rgba(0,0,0,1)",this.galleryData.sliderInfoEnable=!1,this.galleryData.sliderSocialShareEnabled=!0,this.galleryData.sliderItemDiscuss=!1,this.galleryData.sliderZoomEnable=!0,this.galleryData.sliderLikesEnabled=!1,this.galleryData.sliderFullscreenEnabled=!0}},{key:"addItemToStage",value:function(e){e.initSRC()}},{key:"updateLayout",value:function(){qe.trace("** Need implementation - updateLayout **")}},{key:"isAdmin",get:function(){return"1"===window.PGC_SGB.admin}},{key:"deepLinking",get:function(){return this.galleryData.deepLinking&&this.galleryData.isPremium&&!this.editMode}},{key:"deepLinkingForTag",get:function(){return this.TAGS_CLOUD_CUSTOM&&this.galleryData.deepLinkingForTag}},{key:"tagNameToId",value:function(e){return e.replace(/[^a-zA-Z0-9]/g,"_").toLowerCase()}},{key:"hashForTagName",value:function(e){if("pgc_0"!==e)return this.tagNameToId(e)}},{key:"createAudioPlayer",value:function(){var e;null!=(e=document.getElementById("simplyAudioPlayer")?document.getElementById("simplyAudioPlayer"):new Audio)&&e.canPlayType&&e.canPlayType("audio/mpeg")&&(e.id="simplyAudioPlayer",e.setAttribute("type","audio/mpeg"),e.setAttribute("codecs","mp3"),this.view.appendChild(e),this.galleryData.audioPlayer=e)}},{key:"mediaStoper",value:function(){if(this.galleryData.audioPlayer.src){var e=document.getElementsByClassName("pgc-sgb-svg-rotate");if(e.length)for(var t=0;t<e.length;t+=1)e[t].classList.remove("pgc-sgb-svg-rotate");this.galleryData.audioPlayer.pause()}var i=document.getElementsByClassName("thumb-video-content");if(i.length)for(var a=0;a<i.length;a+=1)i[a].pause()}},{key:"itemFromHash",get:function(){var e,t,i=window.location.hash.indexOf("".concat(this.appName));if(i+1){var a=window.location.hash.substring(i).split("-");return 2===a.length?this.deepLinkingForTag&&void 0!==this.filtredById?void 0!==a[1]&&(t=a[1]):e=a[1]:this.deepLinkingForTag&&void 0!==this.filtredById&&(void 0!==a[1]&&(t=a[1]),void 0!==a[2]&&(e=a[2])),{tagID:t,id:e}}}},{key:"itemHash",value:function(e){return this.deepLinkingForTag&&this.filtredById?"#".concat(this.appName).concat(this.hashForTagName(this.filtredById)?"-".concat(this.hashForTagName(this.filtredById)):"","-").concat(e.ID):"#".concat(this.appName,"-").concat(e.ID)}},{key:"showPreloader",value:function(e){var t;if(e){if(document.getElementById("".concat(this.appName,"slider_preloader")))return;(t=qe.createPreloaderView(qe.hexToRgbaStrin(this.galleryData.collectionPreloaderColor,.7))).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&qe.fadeOut(t,(function(){t&&t.parentNode&&t.parentNode.removeChild(t)}),500)}},{key:"addNotification",value:function(e){this.notificationBlock||(this.notificationBlock=document.createElement("div"),this.notificationBlock.className="".concat(this.classPref,"notification")),this.notificationBlock.innerHTML=e,this.view.appendChild(this.notificationBlock)}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){var i,a;if(e.modal)e.modal.prepareToRemove();else switch(t.keyCode){case 27:e.stopAllMediaContentInCollection(),e.lightbox&&e.lightbox.prepareToRemove();break;case 39:if(e.lightbox)return;if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==e.appName)return;"slider"===e.TYPE&&e.slider||"showcase"===e.TYPE&&e.scroller?"next"===i.dataset.pgcAction&&(e.slider&&e.slider.gotoNext?e.slider.gotoNext():e.gotoNext&&(t.preventDefault(),e.gotoNext())):"horizon"===e.TYPE&&"scroll"===i.dataset.pgcAction&&e.slider.renderTransformTo&&e.slider.renderTransformTo(e.slider.targetX-20);break;case 37:if(e.lightbox)return;if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==e.appName)return;"slider"===e.TYPE&&e.slider||"showcase"===e.TYPE&&e.scroller?"next"===i.dataset.pgcAction&&(e.slider&&e.slider.gotoNext?e.slider.gotoPrev():e.gotoNext&&(t.preventDefault(),e.gotoPrev())):"horizon"===e.TYPE&&"scroll"===i.dataset.pgcAction&&e.slider.renderTransformTo&&e.slider.renderTransformTo(e.slider.targetX+20);break;case 13:if(!e.isAdmin&&!e.lightbox){if(!(i=document.activeElement)||void 0===i.dataset.pgcGallery)return;if(i.dataset.pgcGallery!==e.appName)return;if("showcase"===e.TYPE&&e.scroller)void 0!==e.cureantItem&&e.filteredCollection[e.cureantItem]&&(a=e.filteredCollection[e.cureantItem])&&a.view&&a.view.inner&&(a.view.itemClickHandler?a.view.itemClickHandler({target:a.view.inner}):a.view.itemMediaClickHandler&&a.view.itemMediaClickHandler({target:a.view.inner}));else if("slider"===e.TYPE&&e.slider&&void 0!==e.columns)return void(void 0!==e.slider.currentPageIndex&&e.filteredCollection[e.slider.currentPageIndex*e.columns]&&(a=e.filteredCollection[e.slider.currentPageIndex*e.columns])&&a.view&&a.view.inner&&(a.view.itemClickHandler?a.view.itemClickHandler({target:a.view.inner}):a.view.itemMediaClickHandler&&a.view.itemMediaClickHandler({target:a.view.inner})));i.dataset.pgcAction&&void 0!==i.dataset.index&&e.filteredCollection[parseInt(i.dataset.index)]&&(a=e.filteredCollection[parseInt(i.dataset.index)])&&a.view&&(a.view.itemClickHandler?"portfolio2"===e.TYPE?a.view.itemClickHandler({target:a.view.wrap_item}):a.view.itemClickHandler({target:i}):a.view.itemMediaClickHandler&&("portfolio2"===e.TYPE?a.view.itemClickHandler({target:a.view.wrap_item}):a.view.itemMediaClickHandler({target:i})))}}},e.handlerKB}},{key:"init",value:function(){this.viewPort.appendChild(this.view),this.viewPort.dataset.editor&&(this.editMode=!0),this.initByVpData(),document.addEventListener("keydown",this.keydownHandler(),!0);var e=this;this.resizeWindow=function(){e.windowResizeHandler()},this.focusPage=function(t){e.focusPageHandler(t)},window.addEventListener("resize",this.resizeWindow),window.addEventListener("blur",this.focusPage),window.addEventListener("focus",this.focusPage),this.popstateHandler=function(){e.modal&&e.modal.prepareToRemove(),e.lightbox?e.lightbox.prepareToRemove():(e.itemFromHash&&void 0!==e.itemFromHash.id&&e.tryOpenLightboxForID(e.itemFromHash.id),e.deepLinkingForTag&&e.itemFromHash&&void 0!==e.itemFromHash.tagID&&void 0===e.itemFromHash.id&&void 0!==e.tagsListAdvancedCustomMode[e.itemFromHash.tagID]&&e.tagsListContoller&&(e.tagsListContoller.trySelectByTagId(e.itemFromHash.tagID),e.filtred(e.tagsListAdvancedCustomMode[e.itemFromHash.tagID])))},this.deepLinking&&window.addEventListener("popstate",this.popstateHandler,!1)}},{key:"initByVpData",value:function(){var e,t=this.viewPort.getElementsByClassName("sgb-data")[0];if(t?e=t.textContent:this.viewPort.dataset.gallery?e=this.viewPort.dataset.gallery:qe.trace("Error: Gallery data is missing"),e&&""!==e)try{var i=JSON.parse(e);qe.copyProperties(i,this.galleryData),this.initByData(),this.isInitByVp=!0}catch(e){qe.trace(e)}}},{key:"shuffleArray",value:function(e){for(var t=e.length-1;t>0;t-=1){var i=Math.floor(Math.random()*(t+1)),a=[e[i],e[t]];e[t]=a[0],e[i]=a[1]}return e}},{key:"initByData",value:function(e){if(e&&qe.copyProperties(e,this.galleryData),!this.editMode&&this.galleryData.useClobalSettings&&window.PGC_SGB&&window.PGC_SGB.skinsSettings&&window.PGC_SGB.skinsSettings[this.galleryData.galleryType]){var t=window.PGC_SGB.skinsSettings[this.galleryData.galleryType];qe.copyProperties(t,this.galleryData)}this.galleryData.thumbClickAction&&""!==this.galleryData.thumbClickAction||(this.galleryData.thumbClickAction=this.galleryData.useLightbox?"useLightbox":"none"),this.updateGalleryWrapStyle(),this.updateGalleryStyleSheet(),this.updateGalleryCustomCSS(),this.paddingMarginContent(),this.intByDataExtra(),this.initItemMenu();var i=this.galleryData.images,a=[],s=[];if(s=!Array.isArray(this.galleryData.itemsMetaDataCollection)&&this.galleryData.itemsMetaDataCollection.toJSON?this.galleryData.itemsMetaDataCollection.toJSON():Ze(this.galleryData.itemsMetaDataCollection),i){for(var o=0;o<i.length;o+=1){var n=i[o];n.link&&!n.postlink&&(n.postlink=n.link);for(var r=n.id,l=qe.Item(n,this.appName,{itemViewFullSize:this.galleryData.sliderFullSizeViewMode}),h=0;h<s.length;h+=1){var c=s[h];if(parseInt(c.id)===r){if(c.orignLinkText=c.linkText,c.linkText=""===c.linkText?this.galleryData.externalLinkDefName:c.linkText,c.tags)for(var d=0;d<c.tags.length;d+=1)this.tagsList[c.tags[d].replace(/[ ]/g,"_").toLowerCase()]=c.tags[d];l.initMetaObj(c),s.splice(h,1),h=s.length}}a.push(l)}this.initByList(a)}if(this.deepLinking&&void 0!==this.itemFromHash){var u=this.itemFromHash.id;"pgc_0"===this.filtredById&&void 0===this.itemFromHash.id&&/^\d+$/.test(this.itemFromHash.tagID)&&(u=this.itemFromHash.tagID);var g=this.getItemIndexByID(u,this.filteredCollection);void 0!==g&&(window.history.replaceState(null,null,window.location.pathname+window.location.search),this.createLightbox({index:g}))}}},{key:"updateGalleryWrapStyle",value:function(){""!==this.galleryData.thumbClickAction?(this.view.classList.remove("action-lightbox"),this.view.classList.remove("action-postlink"),"useLightbox"===this.galleryData.thumbClickAction?this.view.classList.add("action-lightbox"):"postLink"===this.galleryData.thumbClickAction&&this.view.classList.add("action-postlink")):this.galleryData.useLightbox?this.view.classList.add("action-lightbox"):this.view.classList.remove("action-lightbox"),this.galleryData.thumbPanningEffect||this.content.classList.add("pgc-no-panning"),this.contentNoPadding=this.galleryData.contentNoPadding,this.galleryData.contentNoPadding?(this.content.style.backgroundColor="rgba(0,0,0,0)",this.content.style.borderRadius="0px"):(this.content.style.backgroundColor=this.galleryData.galleryBgColor,this.content.style.borderRadius="".concat(this.galleryData.galleryBorderRadius,"px"))}},{key:"thumbSpacing",get:function(){var e=this.galleryData,t=e.thumbSpacing,i=e.thumbMobileSpacing;return void 0!==i&&qe.miniScreen?i:t}},{key:"collectionthumbRoundedCorners",get:function(){return this.galleryData.collectionthumbRoundedCorners}},{key:"paddingMarginContent",value:function(){var e=this.thumbSpacing/2;this.galleryData.contentNoPadding?(this.content.style.margin="-".concat(e,"px"),this.content.style.padding=null):(this.content.style.padding="".concat(e,"px"),this.content.style.margin=null)}},{key:"intByDataExtra",value:function(){}},{key:"updateList",value:function(e){if(e){if(Array.isArray(e)){this.removeViewContent();var t=[],i=[];i=!Array.isArray(this.galleryData.itemsMetaDataCollection)&&this.galleryData.itemsMetaDataCollection.toJSON?this.galleryData.itemsMetaDataCollection.toJSON():Ze(this.galleryData.itemsMetaDataCollection);for(var a=0;a<e.length;a+=1){var s=e[a];s.link&&!s.postlink&&(s.postlink=s.link);for(var o=s.id,n=qe.Item(s,this.appName,{itemViewFullSize:this.galleryData.sliderFullSizeViewMode}),r=0;r<i.length;r+=1){var l=i[r];if(parseInt(l.id)===o){if(l.orignLinkText=l.linkText,l.linkText=""===l.linkText?this.galleryData.externalLinkDefName:l.linkText,l.tags)for(var h=0;h<l.tags.length;h+=1)this.tagsList[l.tags[h].replace(/[ ]/g,"_").toLowerCase()]=l.tags[h];n.initMetaObj(l),i.splice(r,1),r=i.length}}t.push(n)}this.initByList(t)}}else for(var c=0;c<this.itemsList.length;c+=1)this.itemsList[c].index=c}},{key:"initByList",value:function(e){this.lastAddedPageNum=void 0,this.cureantPage=void 0,e.length>0&&(this.viewWidth=this.view.clientWidth,this.itemsList="random"!==this.galleryData.orderBy||this.isAdmin?e:this.shuffleArray(e),this.filteredList=[],this.createViewForItem(),this.galleryData.tagsFilter&&Object.keys(this.tagsList).length&&(this.createTagsCloudView(),this.filtredById=this.galleryData.startByTag),this.updateViewByData())}},{key:"createViewForItem",value:function(){if(this.itemViewConstructor&&this.itemsList)for(var e=0;e<this.itemsList.length;e+=1){var t=this.itemViewConstructor(e);this.itemsList[e].view=t,t.init()}}},{key:"updateViewByData",value:function(){this.createLayout()}},{key:"updateExraProps",value:function(e){}},{key:"updateGalleryCustomCSS",value:function(){var e=this.galleryData.customCSS;if(e)if(""!==e){var t,i="",a=/([\s\S]+?)\{([\s\S]*?)\}/gi,s=e.replace(/\/\*[\s\S]*?\*\//g,"");do{try{if(t=a.exec(s)){var o=t[1].trim().split(",");if(o.length){for(var n=t[0],r=0;r<o.length;r+=1){var l=o[r].trim();n=n.replace(l,'div[data-gallery-id="'.concat(this.appName,'"] ').concat(l))}i+="".concat(n," ")}}}catch(e){qe.trace(e)}}while(t);i.trim().length&&(this.customCssSheet.innerHTML=i)}else this.customCssSheet.innerHTML=""}},{key:"updateGalleryStyleSheet",value:function(){this.styleSheet.innerHTML='\n    div[data-gallery-id="'.concat(this.appName,'"] .').concat(this.classPref,"main-wrap{\n      padding:").concat(this.thumbSpacing/2,"px;\n      color:").concat(this.galleryData.collectionthumbHoverTitleTextColor,";\n      font-size:").concat(this.galleryData.collectionthumbHoverTitleFontSize,"px;\n      border-radius:").concat(this.collectionthumbRoundedCorners,'px;\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-button{\n      color:").concat(this.galleryData.externalLinkTextColor,";\n      font-size:").concat(this.galleryData.externalLinkFontSize,"px;\n      background-color:").concat(this.galleryData.externalLinkBgColor,";\n      box-shadow:10px 0 0 ").concat(this.galleryData.externalLinkBgColor,", -10px 0 0 ").concat(this.galleryData.externalLinkBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"load-more{\n      color:").concat(this.galleryData.loadMoreTextColor,";\n      font-size:").concat(this.galleryData.loadMoreFontSize,"px;\n      background-color:").concat(this.galleryData.loadMoreBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"load-more:hover{\n      color:").concat(this.galleryData.loadMoreBgColor,";\n      background-color:").concat(this.galleryData.loadMoreTextColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-button:hover{\n      color:").concat(this.galleryData.externalLinkBgColor,";\n      background-color:").concat(this.galleryData.externalLinkTextColor,";\n      box-shadow:10px 0 0 ").concat(this.galleryData.externalLinkTextColor,", -10px 0 0 ").concat(this.galleryData.externalLinkTextColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-title{\n      background-color:").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,";\n      box-shadow:10px 0 0 ").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,", -10px 0 0 ").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-thumb-price{\n      color:").concat(this.galleryData.collectionthumbHoverTitleTextColor,";\n      background-color:").concat(this.galleryData.collectionthumbHoverTitleTextBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-hover{\n      background-color:").concat(this.galleryData.collectionthumbHoverBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'item-inner.action-lightbox{\n      cursor: zoom-in;\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'item-inner.action-postlink{\n      cursor: pointer;\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-badge{\n      background-color:").concat(this.galleryData.collectionThumbSubMenuBgColor,";\n      fill:").concat(this.galleryData.collectionThumbSubMenuIconColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi{\n      margin:").concat(this.thumbSpacing/2,"px;\n      background-color:").concat(this.galleryData.sliderNextPrevBgColor,";\n      fill:").concat(this.galleryData.sliderNextPrevIconColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi:hover{\n      background-color:").concat(this.galleryData.sliderNextPrevBgColorHover,";\n      fill:").concat(this.galleryData.sliderNextPrevIconColorHover,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'dot-navi,\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"thumbs-navi{\n      margin: ").concat(this.thumbSpacing/2,"px ").concat(this.thumbSpacing/2,'px 0;\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"dot{\n      background-color:").concat(this.galleryData.sliderDotNaviBgColor,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'dot.pgc-selected,\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"dot:hover{\n      background-color:").concat(this.galleryData.sliderDotNaviBgColorHover,';\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi.prev{\n      left:-").concat(this.thumbSpacing,'px;\n    }\n    div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-navi.next{\n      right:-").concat(this.thumbSpacing,'px;\n    }\n    div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button a{\n      color:').concat(this.galleryData.sliderNavigationIconColor,';\n    }\n    div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button:hover a{\n      color:').concat(this.galleryData.sliderNavigationIconColorOver,';\n    }\n    div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button,\n    div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-price{\n      background-color:').concat(this.galleryData.sliderNavigationColor,";\n      color:").concat(this.galleryData.sliderNavigationIconColor,';\n    }\n    div[id="').concat(this.appName,'_lightbox"] .pgc-rev-slider-post-informer-button:hover{\n      background-color:').concat(this.galleryData.sliderNavigationColorOver,";\n      color:").concat(this.galleryData.sliderNavigationIconColorOver,";\n    }\n    ")}},{key:"tagsActionHandler",value:function(e){e.params&&e.params.tagName&&e.params.tagId&&this.filtred("pgc_0"===e.params.tagId?e.params.tagId:e.params.tagName)}},{key:"updateMetaDataWithDelay",value:function(){if(this.galleryData.itemsMetaDataCollection&&this.galleryData.itemsMetaDataCollection.models){var e=this.galleryData.itemsMetaDataCollection.models;this.tagsList={};for(var t=0;t<e.length;t+=1){var i=e[t].toJSON();if(i.tags)for(var a=0;a<i.tags.length;a+=1)this.tagsList[i.tags[a].replace(/[ ]/g,"_").toLowerCase()]=i.tags[a]}this.tagsListCopy!==JSON.stringify(this.tagsList)&&(this.createTagsCloudView(),this.filtred("pgc_0"))}}},{key:"createTagsCloudView",value:function(){if(this.TAGS_CLOUD){if(!this.tagsListContoller){this.header=document.createElement("div"),this.header.className="".concat(this.classPref,"header"),this.view.insertBefore(this.header,this.subContent?this.subContent:this.content);var e=Pe.CONFIG;e.tl_all=this.galleryData.tagCloudAll,e.tl_sort_item=!0,e.tl_backgrounColor=this.galleryData.tagCloudBgColor,e.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,e.tl_titleColor=this.galleryData.tagCloudTextColor,e.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,e.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller=new Pe(e,this.galleryData),this.galleryData.appEventManager.addGMEventListener(Pe.EVENTS.TAG_ACTION,this,"tagsActionHandler")}if(this.galleryData.tagsFilter){var t=Pe.CONFIG;if(t.tl_all=this.galleryData.tagCloudAll,t.tl_sort_item=!0,t.tl_backgrounColor=this.galleryData.tagCloudBgColor,t.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,t.tl_titleColor=this.galleryData.tagCloudTextColor,t.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,t.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller.config=t,Object.keys(this.tagsList).length&&(this.TAGS_CLOUD_CUSTOM&&!this.galleryData.tagsListCustomMode||void 0===this.TAGS_CLOUD_CUSTOM))return this.tagsListCopy=JSON.stringify(this.tagsList),this.tagsListContoller.refreshByList(this.tagsList,this.galleryData.startByTag),void this.header.appendChild(this.tagsListContoller.view);if(this.galleryData.tagsListCustomMode&&this.TAGS_CLOUD_CUSTOM&&this.galleryData.galleryTagsList){for(var i=[],a=0;a<this.galleryData.galleryTagsList.length;a+=1){var s=this.galleryData.galleryTagsList[a];i[a]={id:this.tagNameToId(s),name:s},this.tagsListAdvancedCustomMode[this.tagNameToId(s)]=s}return this.galleryData.initGalleryByFirstTag&&this.galleryData.galleryTagsList[0]&&(this.galleryData.startByTag=this.galleryData.galleryTagsList[0]),void 0!==this.itemFromHash&&this.deepLinkingForTag&&this.itemFromHash.tagID&&void 0!==this.tagsListAdvancedCustomMode[this.itemFromHash.tagID]&&(this.tagFromHash=this.tagsListAdvancedCustomMode[this.itemFromHash.tagID],this.galleryData.startByTag=this.tagFromHash),this.tagsListContoller.refreshByListCustomSort(i,this.tagNameToId(this.galleryData.startByTag),this.galleryData.initGalleryByFirstTag),this.header.appendChild(this.tagsListContoller.view),void(this.tagsListCopy=JSON.stringify(i))}this.tagsListContoller.view.parentNode&&this.tagsListContoller.view.parentNode.removeChild(this.tagsListContoller.view)}else this.tagsListContoller.view.parentNode&&this.tagsListContoller.view.parentNode.removeChild(this.tagsListContoller.view)}}},{key:"needUpdateProps",value:function(e){for(var t={},i=0;i<this.propsFilter.length;i+=1){var a=this.propsFilter[i];Object.prototype.hasOwnProperty.call(e,a)&&("galleryTagsList"===a?JSON.stringify(this.galleryData[a])!==JSON.stringify(e[a])&&(t[a]=Ze(e[a])):this.galleryData[a]!==e[a]&&(t[a]=e[a]))}return t}},{key:"updateItemsMetaData",value:function(e){for(var t=e.toJSON(),i=0;i<t.length;i+=1){var a=this.itemsList[this.getItemIndexByID(t[i].id,this.itemsList)];if(a){var s=t[i];s.orignLinkText=s.linkText,s.linkText=""===s.linkText?this.galleryData.externalLinkDefName:s.linkText,a.initMetaObj(s),a.view&&a.view.updateLink(s)}}}},{key:"inFiltartionByFirstTag",value:function(){if(this.tagsListContoller&&this.tagsListContoller.list){var e=this.tagsListContoller.list[0];e?this.filtred(e.name):this.filtred("pgc_0")}}},{key:"update",value:function(e){var t=this;if(e){var i=this.needUpdateProps(e);if(0!==Object.keys(i).length){if(!this.isInitByVp)return qe.copyProperties(i,this.galleryData),this.initByData(),void(this.isInitByVp=!0);if(void 0!==i.gutIsSelected&&this.isSelected(i.gutIsSelected),i.itemsMetaDataCollection&&!this.initMetaDataCollection&&!1===Array.isArray(i.itemsMetaDataCollection)&&(this.galleryData.itemsMetaDataCollection=i.itemsMetaDataCollection,this.updateItemsMetaData(this.galleryData.itemsMetaDataCollection),this.galleryData.itemsMetaDataCollection.on("change add remove",(function(e){var i=t.itemsList[t.getItemIndexByID(e.id,t.itemsList)];if(i){var a=e.toJSON();a.orignLinkText=a.linkText,a.linkText=""===a.linkText?t.galleryData.externalLinkDefName:a.linkText,i.initMetaObj(a)&&t.updateLayout(),i.view&&i.view.updateLink()}clearTimeout(t.setTimeout),t.setTimeout=setTimeout((function(){t.updateMetaDataWithDelay()}),100)})),this.initMetaDataCollection=!0),i.images&&this.updateList(i.images),void 0!==i.sliderFullSizeViewMode)for(var a=0;a<this.itemsList.length;a+=1)this.itemsList[a].itemViewFullSize=i.sliderFullSizeViewMode;if(this.updateExraProps(i),qe.copyProperties(i,this.galleryData),void 0!==i.initGalleryByFirstTag&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),this.inFiltartionByFirstTag()),void 0!==i.tagsListCustomMode&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),i.tagsListCustomMode&&this.galleryData.initGalleryByFirstTag?this.inFiltartionByFirstTag():this.filtred("pgc_0")),void 0!==i.galleryTagsList&&this.TAGS_CLOUD_CUSTOM&&(this.createTagsCloudView(),this.galleryData.initGalleryByFirstTag&&this.inFiltartionByFirstTag()),void 0!==i.tagsFilter&&this.TAGS_CLOUD&&(this.createTagsCloudView(),!1===i.tagsFilter&&this.filtred(this.galleryData.startByTag)),this.TAGS_CLOUD&&this.tagsListContoller&&(i.tagCloudAll||i.tagCloudBgColor||i.tagCloudBgColorOver||i.tagCloudTextColor||i.tagCloudTextColorOver||i.tagCloudFontSize)){var s=Pe.CONFIG;s.tl_all=this.galleryData.tagCloudAll,s.tl_sort_item=!0,s.tl_backgrounColor=this.galleryData.tagCloudBgColor,s.tl_backgrounColorOver=this.galleryData.tagCloudBgColorOver,s.tl_titleColor=this.galleryData.tagCloudTextColor,s.tl_titleColorOver=this.galleryData.tagCloudTextColorOver,s.tl_fontSize=this.galleryData.tagCloudFontSize,this.tagsListContoller.updateConfig(s)}if(void 0!==i.thumbPanningEffect&&(i.thumbPanningEffect?this.content.classList.remove("pgc-no-panning"):this.content.classList.add("pgc-no-panning")),this.itemMenu){var o=ae.CONFIG;o.im_download=this.galleryData.collectionThumbSubMenuDownload,o.im_share=this.galleryData.collectionThumbSubMenuShare,o.im_backgroundColor=this.galleryData.collectionThumbSubMenuBgColor,o.im_backgroundColorOver=this.galleryData.collectionThumbSubMenuBgColorHover,o.im_iconColor=this.galleryData.collectionThumbSubMenuIconColor,o.im_iconColorOver=this.galleryData.collectionThumbSubMenuIconColorHover,this.itemMenu.updateConfig(o)}else this.initItemMenu();this.updateGalleryStyleSheet(),void 0!==i.customCSS&&this.updateGalleryCustomCSS(),this.updateStyleByProps()}}else this.initByVpData()}},{key:"updateStyleExraProps",value:function(){}},{key:"updateStyleByProps",value:function(){this.updateStyleExraProps(),this.updateGalleryWrapStyle();for(var e=0;e<this.itemsList.length;e+=1){var t=this.itemsList[e].view;t&&t.updateProps()}}},{key:"isSelected",value:function(e){this.placeHolder(!0!==e)}},{key:"placeHolder",value:function(e){e?(this.placeHolderDiv||(this.placeHolderDiv=document.createElement("div"),this.placeHolderDiv.className="pgc-block-protector",this.placeHolderDiv.style.width="100%",this.placeHolderDiv.style.height="100%",this.placeHolderDiv.style.top="0",this.placeHolderDiv.style.bottom="0",this.placeHolderDiv.style.backgroundColor="rgba(255,255,255,0.4)",this.placeHolderDiv.style.cursor="pointer",this.placeHolderDiv.style.position="absolute",this.placeHolderDiv.style.zIndex="auto"),this.view.appendChild(this.placeHolderDiv)):this.placeHolderDiv&&this.placeHolderDiv.parentElement&&this.placeHolderDiv.parentElement.removeChild(this.placeHolderDiv)}},{key:"initItemMenu",value:function(){var e=ae.CONFIG;e.im_link=this.galleryData.collectionThumbSubMenuVisibility,e.im_info=this.galleryData.collectionThumbSubMenuInfo,e.im_discuss=this.galleryData.collectionThumbSubMenuComents,e.im_download=this.galleryData.collectionThumbSubMenuDownload,e.im_share=this.galleryData.collectionThumbSubMenuShare,e.im_backgroundColor=this.galleryData.collectionThumbSubMenuBgColor,e.im_backgroundColorOver=this.galleryData.collectionThumbSubMenuBgColorHover,e.im_iconColor=this.galleryData.collectionThumbSubMenuIconColor,e.im_iconColorOver=this.galleryData.collectionThumbSubMenuIconColorHover,this.itemMenu=new ae(this.galleryData,ae.MENU_TYPE.THUMB,e),this.galleryData.appEventManager.addGMEventListener(ae.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler")}},{key:"itemMenuActionHandler",value:function(e){if(e.target===this.itemMenu){var t,i,a=e.params.item,s={};switch(e.params.type){case"share":s.item=a,s.type="share",this.createModal(s);break;case"download":t=a.url,(i=document.createElement("A")).href=t,i.download=t.substring(t.lastIndexOf("/")+1),document.body.appendChild(i),i.click(),document.body.removeChild(i);break;case"fullscreen":this.fullscreenSwitch()}}}},{key:"deleteItemMenu",value:function(){this.itemMenu&&(this.itemMenu.view.parentElement&&this.itemMenu.view.parentElement.removeChild(this.itemMenu.view),this.galleryData.appEventManager.removeGMEventListener(ae.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),delete this.itemMenu)}},{key:"getItemIndexByID",value:function(e,t){if(e)for(var i=0;i<t.length;i+=1){var a=t[i];if(parseInt(e)===parseInt(a.ID))return i}}},{key:"tryOpenLightboxForID",value:function(e){var t=this.getItemIndexByID(e,this.filteredCollection);void 0!==t?this.createLightbox({index:t}):this.createLightbox({index:0})}},{key:"refreshDataInItems",value:function(){for(var e=this.filteredCollection,t=0;t<e.length;t+=1)e[t].view.updateSomeData()}},{key:"deleteAllEmbedInItems",value:function(e){for(var t=this.filteredCollection,i=0;i<t.length;i+=1)t[i].view.deleteEmbedContent()}},{key:"stopAllMediaContentInCollection",value:function(){for(var e=this.filteredCollection,t=0;t<e.length;t+=1){var i=e[t].view;i.deleteEmbedContent&&i.deleteEmbedContent(),i.stopAllInterectivContentInside&&i.stopAllInterectivContentInside()}}},{key:"activate",value:function(){this.updateLayout(),this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1)}},{key:"deactivate",value:function(){window.removeEventListener("scroll",this.scrollHandler,!1),this.scrollHandler=void 0,this.removePresentedItems()}},{key:"removeViewContent",value:function(){this.itemsList=[],this.presentedList=[],this.cureantPage=void 0}},{key:"removeItemsViewFormStage",value:function(){this.removePresentedItems(),this.presentedList=[],this.cureantPage=void 0}},{key:"removePresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e+=1)this.presentedList[e].display="none"}},{key:"updateSisePresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e+=1)this.presentedList[e].updateImgSize()}},{key:"showPresentedItems",value:function(){for(var e=0;e<this.presentedList.length;e+=1)this.presentedList[e].display="block"}},{key:"initScrollHandler",value:function(){this.scrollHandler||(this.scrollHandler=this.scrollHandlerFunction(),this.scrollHandler&&window.addEventListener("scroll",this.scrollHandler,!1))}},{key:"createLayout",value:function(){this.needScrollHandler&&!this.galleryData.pageMode&&this.initScrollHandler(),this.galleryData.pageMode?this.PAGINATION_AMOUNT=this.galleryData.itemsPerPage:this.PAGINATION_AMOUNT=20,this.page_Amount=Math.min(this.PAGINATION_AMOUNT,this.filteredCollection.length),this.editMode&&(this.filteredCollection.length>20&&!this.galleryData.pageMode?this.addNotification("For greater comfort, in editing mode, the gallery displays only the first 20 images. All images will be available on the page in viewing mode (dynamic loading)."):this.notificationBlock&&this.notificationBlock.parentElement&&(this.notificationBlock.parentElement.removeChild(this.notificationBlock),delete this.notificationBlock))}},{key:"checkLoadMore",value:function(){var e=this;if(this.footer||(this.footer=document.createElement("div"),this.footer.className="".concat(this.classPref,"footer"),this.loadMoreButton=document.createElement("div"),this.loadMoreButton.className="".concat(this.classPref,"load-more"),this.loadMoreButton.innerHTML=this.galleryData.loadMoreDefName,this.footer.appendChild(this.loadMoreButton),this.loadMoreButton.addEventListener("click",(function(){e.addNextPage()}))),this.filteredCollection.length){var t=Math.ceil(this.filteredCollection.length/this.page_Amount);if(this.galleryData.numItemsDisplayed>0){var i=Math.min(this.filteredCollection.length,this.galleryData.numItemsDisplayed);t=Math.ceil(i/this.page_Amount)}this.galleryData.pageMode&&this.cureantPage<t?this.view.appendChild(this.footer):this.footer.parentNode&&this.footer.parentNode.removeChild(this.footer)}}},{key:"scrollHandlerFunction",value:function(){var e=this;return function(){e.offsetYcontroll()}}},{key:"offsetYcontroll",value:function(){this.checkIfNeedNewPage()}},{key:"addNextPage",value:function(){this.needScrollHandler&&this.galleryData.loadMoreAuto&&(this.galleryData.pageMode=!1,this.footer&&this.footer.parentNode&&this.footer.parentNode.removeChild(this.footer),this.initScrollHandler()),this.addPageToStage()}},{key:"itemPageByIndex",value:function(e){return Math.floor(e/this.page_Amount)+1}},{key:"addPageToStage",value:function(){this.addPageToStageByPageNum()}},{key:"addPageToStageByPageNum",value:function(e){var t=this;if(0!==this.itemsList.length&&!(void 0!==this.lastAddedPageNum&&e<=this.lastAddedPageNum)){var i=this.filteredCollection,a=Math.ceil(i.length/this.page_Amount);if(void 0===this.cureantPage&&(this.cureantPage=0),void 0===e){if(this.cureantPage>=a)return}else if(e>a)return;var s=this.cureantPage*this.page_Amount,o=Math.min(void 0===e?s+this.page_Amount:e*this.page_Amount,i.length);this.galleryData.numItemsDisplayed>0&&(o=Math.min(o,this.galleryData.numItemsDisplayed)),clearTimeout(this.layoutSizerDelay);for(var n=1,r=s;r<o;r+=1){var l=i[r].view;l.index=r,l.opacity={opacity:0,delay:0},this.addItemToStage(l),l.opacity={opacity:1,delay:100*n},n+=1}this.cureantPage=void 0===e?this.cureantPage+1:e,this.lastAddedPageNum=this.cureantPage,this.resizeHandler(),this.editMode||this.galleryData.pageMode?this.checkLoadMore():this.layoutSizerDelay=setTimeout((function(){t.checkIfNeedNewPage&&t.checkIfNeedNewPage()}),1e3)}}},{key:"checkIfNeedNewPage",value:function(){this.bottomSpace<400&&this.addPageToStage()}},{key:"bottomSpace",get:function(){var e=this.view.getBoundingClientRect(),t=window.innerHeight;return e.bottom-t}},{key:"filtred",value:function(e){if(this.galleryData.tagsFilter||(e=this.galleryData.startByTag),this.stopAllMediaContentInCollection(),this.removeItemsViewFormStage(),this.filtredById=e,this.createLayout(),this.deepLinkingForTag){if(void 0===this.hashForTagName(e))return void window.history.replaceState(null,null,window.location.pathname+window.location.search);var t="#".concat(this.appName,"-").concat(this.hashForTagName(e));if(window.location.hash===t)return;window.history.replaceState(null,null,t)}}},{key:"filtredById",get:function(){return this.filterPr},set:function(e){if(this.itemsList)if(this.filteredList=[],this.filterPr=e,"pgc_0"!==e)for(var t=0;t<this.itemsList.length;t+=1)this.itemsList[t].hasTag(e)&&this.filteredList.push(this.itemsList[t]);else this.filteredList=this.itemsList}},{key:"filteredCollection",get:function(){return this.filteredList.length>0?this.filteredList:this.itemsList}},{key:"updateItemLink",value:function(e){window.history.replaceState(null,null,this.itemHash(e))}},{key:"createLightbox",value:function(e){return e}},{key:"openPostLink",value:function(e){var t=this.filteredCollection,i=e.index;if(t[i])if(t[i].linkOriginal){var a=t[i].linkOriginal,s=t[i].linkTarget?t[i].linkTarget:"_self";window.open(a,s)}else t[i].postlink&&window.open(t[i].postlink,"_self");return e}},{key:"removeLightbox",value:function(e){return e}},{key:"checkGalleryYpositionForViewedItem",value:function(){if(this.viewedItem){var e=this.viewedItem,t=(window.innerHeight-e.view.view.clientHeight)/2,i=window.innerHeight-e.view.view.getBoundingClientRect().bottom<-e.view.view.clientHeight||e.view.view.getBoundingClientRect().bottom<0&&e.view.view.getBoundingClientRect().top<0?e.view.view.getBoundingClientRect().top+window.pageYOffset-t:void 0;i&&qe.scrollWindowToY(i)}}},{key:"itemActionHandler",value:function(e){if(e&&e.params&&e.params.type&&e.target===this.lightbox)switch(e.params.type){case"view":if(e.params.item){if(this.viewedItem=e.params.item,this.deepLinking&&this.updateItemLink(this.viewedItem),!this.galleryData.galleryScrollPositionControll)return;void 0!==e.params.itemIndex&&this.addPageToStageByPageNum(this.itemPageByIndex(e.params.itemIndex))}break;case"YTstatus":void 0!==e.params.status&&1===e.params.status&&qe.pausedAllVideoPlayers(e.params.itemID)}}},{key:"createModalEventHendler",value:function(e){this.createModal(e.params)}},{key:"createModal",value:function(e){if(e.type&&e.item){var t=e.item,i=Ae.CONFIG;i.ish_backgroundColor=this.galleryData.modaBgColor,i.ish_iconColor=this.galleryData.modalIconColor,i.ish_iconColorHover=this.galleryData.modalIconColorHover,i.ish_facebook=this.galleryData.shareFacebook,i.ish_twitter=this.galleryData.shareTwitter,i.ish_pinterest=this.galleryData.sharePinterest,i.ish_download=this.galleryData.sliderItemDownload,i.ish_copy=this.galleryData.shareCopyLink,i.ish_linkToPost=this.galleryData.sharePost;var a=document.getElementsByTagName("body")[0];i.ish_parentDiv=this.lightbox?this.lightbox.view:a,this.galleryData.appEventManager.addGMEventListener(Ae.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal"),this.modal=new Ae(this.galleryData.appEventManager,i),this.modal.initByItem(t),this.modal.view&&this.modal.view.dataset&&(this.modal.view.dataset.galleryId=this.appName)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.galleryData.appEventManager.removeGMEventListener(Ae.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal")}},{key:"fullscreenSwitch",value:function(){var e=this.lightbox.view;e&&(qe.toggleFullScreen(e),this.windowResizeHandler())}},{key:"pageLeave",value:function(){}},{key:"pageEnter",value:function(){}},{key:"focusPageHandler",value:function(e){if(!this.isAdmin)switch(e.type){case"blur":this.pageLeave();break;case"focus":this.pageEnter()}}},{key:"windowResizeHandler",value:function(){var e=this;clearTimeout(this.resizeTimeOut),qe.isTouchDevice?this.resizeTimeOut=setTimeout((function(){e.windowResize()}),200):this.windowResize()}},{key:"windowResize",value:function(){this.resizeHandler(),this.lightbox&&this.lightbox.resizeHandler()}},{key:"resizeHandler",value:function(){this.viewWidth!==this.view.clientWidth&&(this.updateLayout(),this.viewWidth=this.view.clientWidth)}},{key:"remove",value:function(){this.resizeObserver.disconnect(),this.removeViewContent(),this.deleteItemMenu(),this.galleryData.appEventManager.removeGMEventListener(Pe.EVENTS.TAG_ACTION,this,"tagsActionHandler"),this.tagsList={},this.tagsListContoller=void 0,document.removeEventListener("keydown",this.handlerKB,!0),window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("resize",this.resizeWindow),window.removeEventListener("blur",this.focusPage),window.removeEventListener("focus",this.focusPage),this.view.parentNode&&this.view.parentNode.removeChild(this.view)}}],t&&Je(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function et(e){return et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},et(e)}function tt(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,it(a.key),a)}}function it(e){var t=function(e){if("object"!=et(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=et(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==et(t)?t:t+""}var at=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e);var i=window.PGC_SGB;if(i){var a=t.split("-").pop();window.PGC_SGB.galleries||(window.PGC_SGB.galleries={}),this.galleries=window.PGC_SGB.galleries;var s=e.galleriesVP(t);if(i.vports&&i.vports[a])for(var o in i.vports[a])if(Object.prototype.hasOwnProperty.call(i.vports[a],o)){var n=i.vports[a][o];s.push(n)}if(s.length>0)for(var r=0;r<s.length;r+=1){var l=s[r];if(l.id)this.createGalleryByVpRef(l);else{if(l.getElementsByClassName("sgb-preloader").length){var h=l.getElementsByClassName("sgb-preloader")[0];l.removeChild(h)}if(l.getElementsByClassName("simply-gallery-amp").length){var c=l.getElementsByClassName("simply-gallery-amp")[0];l.removeChild(c)}this.createGalleryByVp(l)}}console.log("%c SGB ".concat(a.toUpperCase()," v.3.2.7"),"background: #222; color: #eaabff")}else qe.trace("Plugin scripts are not ready")}return t=e,a=[{key:"galleriesVP",value:function(e){for(var t=[],i=document.getElementsByClassName(e),a=0;a<i.length;a+=1){var s=i[a];t.push(s)}return t}},{key:"getAppNameFromVp",value:function(e){var t,i=e.getElementsByClassName("sgb-data")[0];if(i?t=i.textContent:e.dataset.gallery?t=this.viewPort.dataset.gallery:qe.trace("Error: Gallery data is missing"),t&&""!==t)try{var a=JSON.parse(t);if(a.galleryId)return a.galleryId}catch(e){qe.trace(e)}}}],(i=[{key:"collectionConstructor",value:function(e,t){qe.trace(" ********* Need an implementation - CollectionConstructor *********** ",e),qe.trace(t)}},{key:"createGalleryByVpRef",value:function(e,t){if(!e)return!1;var i=e.id;if(this.galleries[i])return!0;var a=this.collectionConstructor(i,e);return a.isSelected(t),this.galleries[i]=a,!0}},{key:"updateGalleryById",value:function(e,t,i){t&&void 0!==i&&(t.gutIsSelected=i);var a=this.galleries[e];a&&a.update(t)}},{key:"removeGalleryById",value:function(e){this.galleries[e]&&(this.galleries[e].remove(),delete this.galleries[e])}},{key:"removeDuplicateByAppname",value:function(e){for(var t in this.galleries)if(Object.hasOwn(this.galleries,t)){var i=this.galleries[t];e===i.appName&&(i.remove(),delete this.galleries[t])}}},{key:"createGalleryByVpSavedGalley",value:function(t){var i=e.getAppNameFromVp(t);this.removeDuplicateByAppname(i);var a=this.collectionConstructor(i,t);this.galleries[i]=a}},{key:"createGalleryByVp",value:function(e){if(e.getElementsByClassName("sgb-preloader").length){var t=e.getElementsByClassName("sgb-preloader")[0];e.removeChild(t)}if(e.getElementsByClassName("simply-gallery-amp").length){var i=e.getElementsByClassName("simply-gallery-amp")[0];e.removeChild(i)}var a=(new Date).getTime(),s=this.collectionConstructor(a,e);this.galleries[a]=s}}])&&tt(t.prototype,i),a&&tt(t,a),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,a}();const st=at;function ot(e){return ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ot(e)}function nt(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,rt(a.key),a)}}function rt(e){var t=function(e){if("object"!=ot(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ot(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ot(t)?t:t+""}qe.trace;const lt=function(){return e=function e(t,i){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.delegate=t,this.classPref=t.classPref,this.galleryData=this.delegate.galleryData,this.appName=t.appName,this.index=i,this.inited=!1,this.scrollerViewWrapper=t.scrollerViewWrapper?t.scrollerViewWrapper:document,this.view=document.createElement("div"),this.view.className="".concat(this.classPref,"item"),this.wrap_main=document.createElement("div"),this.wrap_main.className="".concat(this.classPref,"main-wrap"),this.view.appendChild(this.wrap_main),this.wrap_item=document.createElement("div"),this.wrap_item.className="".concat(this.classPref,"item-wrap"),this.wrap_main.appendChild(this.wrap_item),this.captions=!0,this.captionSrc="caption",this.useLightbox=void 0,this.linkTextVal="",this.opacityDelay=void 0,this.displayPr=void 0,this.opacityPr=0,this.imgCompleted=!1,this.itemViewSrcCompleted=!1,this.imageInteractiv=!1,this.completedHandlerCallback=void 0},(t=[{key:"init",value:function(){var e=this.delegate.itemsList[this.index];this.item=e,this.thumbSize=e.itemViewThumbSize,this.type=e.type,this.itemViewSrc=e.itemViewSrc,this.view.dataset.id=e.id,this.view.classList.add("pgc-".concat(e.type)),this.wrap_main.classList.add("pgc-".concat(e.type)),e.ratio>1&&this.view.classList.add("pgc-portrait")}},{key:"initSRC",value:function(){var e=this;if(!this.inited){var t=this.item,i=this;if(this.img=new Image,"video"!==t.type||"video"===t.type&&t.mime_type)"audio"===t.type&&(this.poster=document.createElement("div"),this.poster.className="pgc-item-poster",this.wrap_item.appendChild(this.poster)),this.img=new Image,this.img.onload=function(){(t.title||t.alt)&&this.setAttribute("alt",t.alt?t.alt:t.title),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,i.itemCompleted(),i.updateImgSize()},this.img.onerror=function(){i.view.classList.add("pgc-error"),t.errorStatus=!0;var e=document.createElement("div");e.className="pgc-alert-icon",e.innerHTML=qe.ICONS.ATTENTION_SVG,i.view.appendChild(e),i.view.style.opacity=i.opacityPr,i.imgCompleted=!0,this.itemCompleted()},"audio"===t.type?this.poster.appendChild(this.img):this.wrap_item.appendChild(this.img),this.img.style.width="".concat(t.itemViewThumbSize.width,"px"),this.img.style.height="".concat(t.itemViewThumbSize.height,"px"),this.galleryData.lazyLoading&&!1===this.delegate.isAdmin?this.img.setAttribute("loading","lazy"):this.img.removeAttribute("loading"),t.itemViewThumbSrc&&(this.img.src=t.itemViewThumbSrc);else{if(this.view.style.opacity=this.opacityPr,this.imgCompleted=!1,this.videoContent=qe.mediaEl("video"),this.videoContent.className="thumb-video-content",this.videoContent.setAttribute("loop",""),this.wrap_item.insertBefore(this.videoContent,this.wrap_item.children[0]),t.mime&&this.videoContent.setAttribute("type",t.mime),this.videoContent.src="".concat(t.url+(void 0===t.poster&&void 0===t.featuredImage&&!1===this.galleryData.useLightbox&&qe.Device.browser.safari&&qe.isTouchDevice?"#t=0.001":"")),t.poster){var a=t.poster.medium?t.poster.medium.url:t.poster.full.url;this.videoContent.setAttribute("poster",a),this.videoContent.setAttribute("preload","none"),this.img.src=a,this.img.onload=function(){e.itemCompleted(),e.img=void 0}}else t.featuredImage?(this.videoContent.setAttribute("poster",t.featuredImage.src),this.videoContent.setAttribute("preload","none"),this.img.src=t.featuredImage.src,this.img.onload=function(){e.itemCompleted(),e.img=void 0}):(this.videoContent.setAttribute("preload",qe.preloadedAttributForVideo),this.videoContent.onloadedmetadata=function(){e.itemCompleted()});this.ratio&&(this.ratio<=1&&this.item.ratio<=1&&this.ratio>this.item.ratio?(this.videoContent.classList.add("pgc-lsp"),this.videoContent.classList.remove("pgc-prt")):(this.videoContent.classList.add("pgc-prt"),this.videoContent.classList.remove("pgc-lsp")))}this.inited=!0,this.initViewContent(),this.initBadge(),this.initSubContent(t),this.initItemViewHandlers(),this.updateProps(),this.updateLink()}}},{key:"itemCompleted",value:function(){this.view.style.minHeight=null,this.completedHandlerCallback&&this.completedHandlerCallback(this)}},{key:"initViewContent",value:function(){this.inited&&(this.hover=document.createElement("div"),this.hover.className="".concat(this.classPref,"item-hover"),this.wrap_item.appendChild(this.hover),this.inner=document.createElement("div"),this.inner.className="".concat(this.classPref,"item-inner"),this.wrap_item.appendChild(this.inner))}},{key:"initBadge",value:function(){if(this.inited){var e,t=this.item;switch(this.badge&&this.badge.parentNode&&this.badge.parentNode.removeChild(this.badge),t.type){case"video":(e=document.createElement("div")).className="".concat(this.classPref,"item-badge"),e.innerHTML=qe.ICONS.VIDEO_TYPE,this.inner.appendChild(e);break;case"audio":(e=document.createElement("div")).className="".concat(this.classPref,"item-badge"),e.innerHTML=qe.ICONS.NOTE_SVG,this.inner.appendChild(e)}e&&(this.badge=e)}}},{key:"initSubContent",value:function(e){this.inited&&(this.menuHolder=document.createElement("div"),this.menuHolder.className="".concat(this.classPref,"item-menu-holder"),this.inner.appendChild(this.menuHolder),this.titleHolder=document.createElement("div"),this.titleHolder.className="".concat(this.classPref,"title-wrap"),this.inner.appendChild(this.titleHolder),this.infoWrap=document.createElement("div"),this.infoWrap.className="".concat(this.classPref,"info-wrap"),this.titleHolder.appendChild(this.infoWrap),this.title=document.createElement("div"),this.title.className="".concat(this.classPref,"item-title"),this.captionSrc=this.galleryData.captionSrc,this.title.innerHTML="".concat(e[this.captionSrc]?e[this.captionSrc]:""),qe.Device.browser.safari&&(this.title.style.willChange="opacity"),this.infoWrap.appendChild(this.title),this.linkButton=document.createElement("a"),this.linkButton.className="".concat(this.classPref,"item-button"),e.meta&&e.meta.subType&&"product"===e.meta.subType&&(e.meta.price&&(this.price=document.createElement("div"),this.price.className="".concat(this.classPref,"item-thumb-price"),this.price.innerHTML=e.meta.price,this.inner.appendChild(this.price)),void 0!==e.meta.on_sale&&e.meta.on_sale&&this.inner.classList.add("sgb-product-onsale")))}},{key:"initItemViewHandlers",value:function(){var e=this,t=this.item;function i(i){switch(i.type){case"mouseenter":(e.galleryData.useLightbox||"none"!==e.galleryData.thumbClickAction||"audio"===e.item.type||"video"===e.item.type)&&this.classList.add("hover"),e.delegate.itemMenu&&e.menuHolder&&(this.classList.add("hover-menu"),e.delegate.itemMenu.updateForItem(t),e.menuHolder.appendChild(e.delegate.itemMenu.view));break;case"mouseleave":this.classList.remove("hover"),this.classList.remove("hover-menu")}}this.view.addEventListener("mouseenter",i,!1),this.view.addEventListener("mouseleave",i,!1)}},{key:"clickHandler",value:function(){var e=this;return this.itemClickHandler=function(t){t.target.classList.contains("".concat(e.classPref,"item-inner"))&&(e.view.classList.remove("hover"),e.view.classList.remove("hover-menu"),"useLightbox"===e.galleryData.thumbClickAction&&e.delegate.createLightbox({index:e.index}),"postLink"===e.galleryData.thumbClickAction&&e.delegate.openPostLink({index:e.index}))},this.itemClickHandler}},{key:"checkPositionHandler",value:function(){var e=this;return e.checkPosition||(e.checkPosition=function(t){if(e.videoContent){if(e.delegate.mediaPlayHandler&&"play"===t.type&&e.delegate.mediaPlayHandler(!0),"pause"===t.type||"ended"===t.type)return e.scrollerViewWrapper.removeEventListener("scroll",e.checkPosition),e.videoContent.removeEventListener("pause",e.checkPosition),e.videoContent.removeEventListener("ended",e.checkPosition),void(e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1));qe.scrollYpositionForDiv(e.wrap_item)&&(e.videoContent.pause(),e.wrap_main.classList.remove("pgc-interectiv"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1))}e.embedContent&&qe.scrollYpositionForDiv(e.wrap_item)&&(e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1),e.deleteEmbedContent())}),e.checkPosition}},{key:"deleteEmbedContent",value:function(){this.embedContent&&(this.scrollerViewWrapper.removeEventListener("scroll",this.checkPositionHandler()),this.delegate.mediaPlayHandler&&this.delegate.mediaPlayHandler(!1),this.wrap_main.classList.remove("pgc-interectiv"),this.embedContent.parentNode&&this.embedContent.parentNode.removeChild(this.embedContent),delete this.embedContent)}},{key:"stopAllInterectivContentInside",value:function(){var e=this;if(e.wrap_main.classList.contains("pgc-interectiv")){var t=e.galleryData.audioPlayer;t.src&&t.src===e.item.original&&(t.pause(),e.wrap_main.classList.remove("pgc-interectiv"),e.badge&&e.badge.classList.remove("pgc-sgb-svg-rotate"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1)),e.videoContent&&(e.wrap_main.classList.remove("pgc-interectiv"),e.videoContent.pause()),e.deleteEmbedContent(),e.imageInteractiv&&"image"===e.item.type&&e.wrap_main.classList.remove("pgc-interectiv")}}},{key:"clicMediaHandler",value:function(){var e=this;return this.itemMediaClickHandler=function(t){if(!e.imageInteractiv&&"image"===e.item.type&&e.externalLink&&e.item.link&&""!==e.item.link&&window.open(e.item.link,e.item.linkTarget?e.item.linkTarget:"_blank"),e.wrap_main.classList.contains("pgc-interectiv"))e.stopAllInterectivContentInside();else if(!1!==t.target.classList.contains("".concat(e.classPref,"item-inner"))||!1!==t.target.classList.contains("".concat(e.classPref,"item-wrap"))||!1!==t.target.classList.contains("".concat(e.classPref,"play"))){var i=e.galleryData.audioPlayer;if(i.src&&i.src!==e.item.original){i.pause();for(var a=document.getElementsByClassName("pgc-audio"),s=0;s<a.length;s+=1){var o=a[s];o.classList.contains("pgc-interectiv")&&o.classList.remove("pgc-interectiv")}var n=document.getElementsByClassName("pgc-sgb-svg-rotate");if(n.length)for(var r=0;r<n.length;r+=1)n[r].classList.remove("pgc-sgb-svg-rotate")}var l=document.getElementsByClassName("thumb-video-content");if(l.length)for(var h=0;h<l.length;h+=1)if(l[h]!==e.videoContent){var c=qe.searchParentByClassName(l[h],"pgc-interectiv");c&&c.classList.remove("pgc-interectiv"),l[h].pause()}qe.deleteAllEmbetContent();var d=document.getElementsByClassName("pgc-interectiv");if(d.length)for(var u=0;u<d.length;u+=1)d[u].classList.remove("pgc-interectiv");if("audio"===e.item.type&&i&&(i.src===e.item.original?i.paused?(i.play(),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0),e.badge&&e.badge.classList.add("pgc-sgb-svg-rotate"),e.wrap_main.classList.add("pgc-interectiv")):(i.pause(),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!1),e.wrap_main.classList.remove("pgc-interectiv"),e.badge&&e.badge.classList.remove("pgc-sgb-svg-rotate")):setTimeout((function(){i.src=e.item.original,i.play(),e.wrap_main.classList.add("pgc-interectiv"),e.badge&&e.badge.classList.add("pgc-sgb-svg-rotate"),e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0)}),100)),"video"===e.item.type&&e.videoContent)e.videoContent.paused?(e.videoContent.play(),e.wrap_main.classList.add("pgc-interectiv"),e.view.classList.remove("hover"),e.view.classList.remove("hover-menu"),e.scrollerViewWrapper.addEventListener("scroll",e.checkPositionHandler()),e.videoContent.addEventListener("pause",e.checkPositionHandler()),e.videoContent.addEventListener("ended",e.checkPositionHandler()),e.videoContent.addEventListener("play",e.checkPositionHandler())):(e.videoContent.pause(),e.view.classList.add("hover"),e.view.classList.add("hover-menu"),e.wrap_main.classList.remove("pgc-interectiv"));else if("video"===e.item.type&&e.item.mime_type){var g=e.item.mime_type.split("/")[1];if(!g)return;e.delegate.mediaPlayHandler&&e.delegate.mediaPlayHandler(!0),e.embedContent||(window.PGC_SGB.galleries[e.delegate.id],e.embedContent=qe.embedVideoEl(g,e.item.videoId,e.item.videoHash),e.embedContent.className="thumb-embed-content",e.embedContent.dataset.id=e.delegate.id,e.wrap_item.appendChild(e.embedContent),e.wrap_main.classList.add("pgc-interectiv"),e.scrollerViewWrapper.addEventListener("scroll",e.checkPositionHandler()))}else e.imageInteractiv&&"image"===e.item.type&&e.wrap_main.classList.add("pgc-interectiv");e.itemMediaClickHandlerExtend&&e.itemMediaClickHandlerExtend()}},this.itemMediaClickHandler}},{key:"updateLink",value:function(){if(this.inited){var e,t=this.item;if(this.deleteEmbedContent(),this.videoContent&&(e=this.videoContent.src,this.videoContent.removeAttribute("src")),t.poster){var i=t.poster.medium?t.poster.medium.url:t.poster.full.url;this.videoContent&&(this.videoContent.setAttribute("poster",i),this.videoContent.setAttribute("preload","none")),this.img&&(this.img.src=i),this.itemViewSrcCompleted=!1,this.updateImgSize()}else this.itemViewSrcCompleted=!1,this.videoContent&&(this.videoContent.removeAttribute("poster"),this.videoContent.setAttribute("preload",qe.preloadedAttributForVideo),t.featuredImage&&(this.videoContent.setAttribute("poster",t.featuredImage.src),this.videoContent.setAttribute("preload","none"))),this.img&&t.itemViewThumbSrc&&(this.img.src=t.itemViewThumbSrc),this.updateImgSize();this.videoContent&&e&&(this.videoContent.src=e),"video"===t.type&&t.mime_type?this.addEmbedVideoToItem(t.mime_type.split("/").pop(),t.videoId):(this.view.classList.remove("pgc-embed"),this.wrap_main.classList.remove("pgc-embed"),this.initBadge()),t.link&&""!==t.link?(this.titleHolder&&(this.titleHolder.style.pointerEvents=null),this.linkButton.href=t.link,this.linkButton.innerHTML=t.linkText,t.linkTarget&&(this.linkButton.target=t.linkTarget),this.externalLink&&(this.titleHolder?this.titleHolder.insertBefore(this.linkButton,this.titleHolder.firstChild):this.subMenuHolder&&this.subMenuHolder.insertBefore(this.linkButton,this.subMenuHolder.firstChild),this.descriptionWrap&&this.infoWrap.classList.add("pgc-button"))):this.removeLInkButton()}}},{key:"addEmbedVideoHandler",value:function(){this.inner.removeEventListener("click",this.itemMediaClickHandler),this.inner.addEventListener("click",this.clicMediaHandler())}},{key:"addEmbedVideoToItem",value:function(e){this.view.classList.add("pgc-embed"),this.wrap_main.classList.add("pgc-embed"),this.badge&&this.badge.parentNode&&this.badge.parentNode.removeChild(this.badge),this.badge=document.createElement("div"),this.badge.className="".concat(this.classPref,"item-badge"),"vimeo"===e?(this.badge.innerHTML=qe.ICONS.VIMEO_SVG,this.badge.firstChild.style.fill="#00adef"):"youtube"===e&&(this.badge.innerHTML=qe.ICONS.YOU_TUBE_SVG,this.badge.firstChild.style.fill="#e02f2f"),this.inner.appendChild(this.badge),this.galleryData.useLightbox||"none"!==this.galleryData.thumbClickAction&&""!==this.galleryData.thumbClickAction||this.addEmbedVideoHandler(),this.removeLInkButton()}},{key:"removeLInkButton",value:function(){this.titleHolder&&(this.titleHolder.style.pointerEvents="none"),this.linkButton.parentNode&&this.linkButton.parentNode.removeChild(this.linkButton),this.descriptionWrap&&this.infoWrap.classList.remove("pgc-button"),this.updatePropsSubContent()}},{key:"addItemClickHandler",value:function(){this.useLightbox!==this.galleryData.thumbClickAction&&(this.inner.classList.remove("action-lightbox"),this.inner.classList.remove("action-postlink"),this.inner.removeEventListener("click",this.itemClickHandler),"useLightbox"===this.galleryData.thumbClickAction||"postLink"===this.galleryData.thumbClickAction?(this.deleteEmbedContent(),"useLightbox"===this.galleryData.thumbClickAction?this.inner.classList.add("action-lightbox"):"postLink"===this.galleryData.thumbClickAction&&this.inner.classList.add("action-postlink"),this.inner.addEventListener("click",this.clickHandler()),this.inner.setAttribute("tabindex",0),this.inner.dataset.pgcAction="click",this.inner.dataset.pgcGallery=this.appName,this.inner.removeEventListener("click",this.itemMediaClickHandler)):(this.inner.addEventListener("click",this.clicMediaHandler()),"video"!==this.type&&"audio"!==this.type||(this.inner.setAttribute("tabindex",0),this.inner.dataset.pgcAction="media",this.inner.dataset.pgcGallery=this.appName)),this.useLightbox=this.galleryData.thumbClickAction)}},{key:"updateProps",value:function(){this.inited&&(this.linkTextVal!==this.galleryData.externalLinkDefName&&(""===this.item.orignLinkText&&(this.item.linkText=this.galleryData.externalLinkDefName,this.linkButton.innerHTML=this.galleryData.externalLinkDefName),this.linkTextVal=this.galleryData.externalLinkDefName),this.addItemClickHandler(),this.updatePropsSubContent(),this.img&&(this.galleryData.lazyLoading&&!1===this.delegate.isAdmin?this.img.setAttribute("loading","lazy"):this.img.removeAttribute("loading")))}},{key:"updatePropsSubContent",value:function(){"bottom"===this.galleryData.captionHAlign?(this.menuHolder&&this.menuHolder.classList.add("pgc-bottom-align"),this.inner.classList.add("pgc-bottom-align")):(this.menuHolder&&this.menuHolder.classList.remove("pgc-bottom-align"),this.inner.classList.remove("pgc-bottom-align")),this.galleryData.externalLink!==this.externalLink&&(this.externalLink=this.galleryData.externalLink,this.externalLink&&this.item.link?(this.titleHolder.style.pointerEvents=null,this.titleHolder.insertBefore(this.linkButton,this.titleHolder.firstChild)):(this.titleHolder.style.pointerEvents="none",this.linkButton.parentNode&&this.linkButton.parentNode.removeChild(this.linkButton))),this.galleryData.captions!==this.captions&&(this.captions=this.galleryData.captions,this.captions?this.infoWrap.appendChild(this.title):this.title.parentNode&&this.title.parentNode.removeChild(this.title)),this.galleryData.captionSrc!==this.captionSrc&&this.captions&&(this.captionSrc=this.galleryData.captionSrc,this.title.innerHTML="".concat(this.item[this.galleryData.captionSrc]?this.item[this.galleryData.captionSrc]:""))}},{key:"updateImgSize",value:function(){if(this.rect)if("video"!==this.type&&"audio"!==this.type||!this.item.poster||this.itemViewSrcCompleted)this.imgCompleted&&("audio"!==this.type||"audio"===this.type&&this.item.poster)&&!this.itemViewSrcCompleted&&(this.rect.width.toFixed(2)/this.img.naturalWidth>1.1||this.rect.height.toFixed(2)/this.img.naturalHeight>1.1)&&this.itemViewSrc&&(this.img.src=this.itemViewSrc,this.img.style.width="".concat(this.item.itemViewSize.width,"px"),this.img.style.height="".concat(this.item.itemViewSize.height,"px"),this.itemViewSrcCompleted=!0);else{var e=this.item.poster.medium?this.item.poster.medium:this.item.poster.full,t=this.item.poster.large?this.item.poster.large:this.item.poster.full;(this.rect.width.toFixed(2)/e.width>1.1||this.rect.height.toFixed(2)/e.height>1.1)&&(this.videoContent&&this.videoContent.setAttribute("poster",t.url),this.img&&(this.img.src=t.url),this.itemViewSrcCompleted=!0)}}},{key:"display",get:function(){return this.displayPr},set:function(e){this.displayPr!==e&&("block"===e&&(this.wrap_main.dataset.index=this.index,this.inner&&(this.inner.dataset.index=this.index)),"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e)}},{key:"opacity",set:function(e){if(e.opacity!==this.opacityPr){var t=this;e.delay?this.opacityDelay=setTimeout((function(){(t.imgCompleted||"video"===t.item.type)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),(t.imgCompleted||"video"===t.item.type)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity)}}}])&&nt(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),ht={customCSS:"",cacheItemsList:qe.CacheItemsList(),appEventManager:qe.GMEventsManager(),itemsMetaDataCollection:[],images:[],gutIsSelected:!1,numItemsDisplayed:0,useLightbox:!0,thumbClickAction:"",deepLinking:!1,linkTargetWindow:"self",galleryBgColor:"rgba(0,0,0,0)",galleryBorderRadius:0,lazyLoading:!0,contentNoPadding:!1,orderBy:!1,galleryPreloaderColor:"rgba(0,0,0,0.7)",collectionPreloaderColor:"rgba(0,0,0,0.7)",externalLink:!0,externalLinkDefName:"Read More",externalLinkTextColor:"rgba(0,0,0,1)",externalLinkBgColor:"rgba(255,255,255,1)",externalLinkFontSize:18,captions:!0,captionSrc:"caption",collectionThumbRecomendedWidth:200,collectionThumbRecomendedHeight:200,collectionThumbSubMenuVisibility:!1,collectionThumbSubMenuInfo:!1,collectionThumbSubMenuComents:!1,collectionThumbSubMenuShare:!1,collectionThumbSubMenuDownload:!1,collectionThumbSubMenuBgColor:"rgba(0,0,0,0.8)",collectionThumbSubMenuBgColorHover:"rgba(255,255,255,1)",collectionThumbSubMenuIconColor:"rgba(255,255,255,1)",collectionThumbSubMenuIconColorHover:"rgba(0,0,0,1)",modaBgColor:"rgba(0,0,0,0.8)",modalInfoBoxBgColor:"rgba(240,240,240,1)",modalInfoBoxTitleTextColor:"rgba(20,20,20,1)",modalInfoBoxTextColor:"rgba(20,20,20,1)",infoBarExifEnable:!1,infoBarDateInfoEnable:!1,modalIconColor:"rgba(255,255,255,1)",modalIconColorHover:"rgba(200,200,200,1)",shareFacebook:!0,shareTwitter:!0,sharePinterest:!0,shareCopyLink:!0,sliderItemDownload:!0,sharePost:"sharelink",sliderCarouselMode:!0,sliderVideoAutoPlay:!1,sliderVideoLoop:!1,sliderScrollNavi:!1,sliderNextPrevAnimation:"animation",galleryScrollPositionControll:!1,copyRProtection:!1,copyRAlert:"Hello, this photo is mine!",sliderItemCounterEnable:!0,itemCounterColor:"rgba(255,255,255,1)",sliderThumbBarEnable:!0,sliderThumbBarHoverColor:"rgba(240,240,240,1)",sliderBgColor:"rgba(0,0,0,0.8)",sliderPreloaderColor:"rgba(240,240,240,1)",sliderHeaderFooterBgColor:"rgba(0,0,0,0.4)",sliderNavigationColor:"rgba(0,0,0,1)",sliderNavigationColorOver:"rgba(255,255,255,1)",sliderNavigationIconColor:"rgba(255,255,255,1)",sliderNavigationIconColorOver:"rgba(0,0,0,1)",sliderItemTitleEnable:!0,sliderCaptionSrc:"caption",sliderItemTitleFontSize:20,sliderItemTitleTextColor:"rgba(255,255,255,1)",sliderItemDescriptionEnable:!1,sliderDescriptionSrc:"caption",sliderItemDescriptionFontSize:16,sliderItemDescriptionTextColor:"rgba(255,255,255,1)",sliderSlideshow:!0,sliderSlideshowAutoStart:!1,sliderSlideshowDelay:8,slideshowIndicatorColor:"rgba(255,255,255,1)",slideshowIndicatorColorBg:"rgba(255,255,255,0.5)",sliderThumbSubMenuBackgroundColor:"rgba(255,255,255,0)",sliderThumbSubMenuBackgroundColorOver:"rgba(255,255,255,1)",sliderThumbSubMenuIconColor:"rgba(255,255,255,1)",sliderThumbSubMenuIconHoverColor:"rgba(0,0,0,1)",sliderInfoEnable:!1,sliderSocialShareEnabled:!0,sliderItemDiscuss:!1,sliderZoomEnable:!0,sliderLikesEnabled:!1,sliderFullscreenEnabled:!0};var ct,dt,ut,gt,mt,pt,vt=i(5224),yt=i.n(vt),ft={};function bt(e){return bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},bt(e)}function wt(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,a)}return i}function Ct(e,t,i){return(t=Lt(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function St(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function kt(e,t){for(var i=0;i<t.length;i++){var a=t[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,Lt(a.key),a)}}function Tt(e,t,i){return t&&kt(e.prototype,t),i&&kt(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function Lt(e){var t=function(e){if("object"!=bt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=bt(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==bt(t)?t:t+""}function It(e,t,i){return t=xt(t),function(e,t){if(t&&("object"==bt(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Pt()?Reflect.construct(t,i||[],xt(e).constructor):t.apply(e,i))}function Pt(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Pt=function(){return!!e})()}function Dt(e,t,i,a){var s=Et(xt(1&a?e.prototype:e),t,i);return 2&a&&"function"==typeof s?function(e){return s.apply(i,e)}:s}function Et(){return Et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,i){var a=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=xt(e)););return e}(e,t);if(a){var s=Object.getOwnPropertyDescriptor(a,t);return s.get?s.get.call(arguments.length<3?e:i):s.value}},Et.apply(null,arguments)}function xt(e){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},xt(e)}function Mt(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&_t(e,t)}function _t(e,t){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},_t(e,t)}ft.styleTagTransform=u(),ft.setAttributes=l(),ft.insert=n().bind(null,"head"),ft.domAPI=s(),ft.insertStyleElement=c(),t()(yt(),ft),yt()&&yt().locals&&yt().locals,window.pgc_sgb_viewer=(ct="viewer",dt="wp-block-".concat("pgcsimplygalleryblock","-").concat(ct),ut="".concat("pgcsimplygalleryblock","-").concat(ct,"-"),qe.trace,gt=function(e){function t(e,i){var a;return St(this,t),(a=It(this,t,[e,i])).rect=void 0,a.thumbSize=qe.Size(0,0),a.galleryData.externalLink=!1,a.galleryData.captions=!1,a.galleryData.collectionThumbSubMenuVisibility=!1,a}return Mt(t,e),Tt(t,[{key:"initViewContent",value:function(){Dt(t,"initViewContent",this,3)([]);var e=document.createElement("div");e.className="".concat(ut,"thumb-sel"),this.wrap_item.insertBefore(e,this.inner)}},{key:"addItemClickHandler",value:function(){Dt(t,"addItemClickHandler",this,3)([]),this.inner.removeAttribute("tabindex")}},{key:"updateSize",value:function(e){var t=e*this.delegate.galleryData.thumbHieghtRation;this.ratio=t/e,this.thumbSize=qe.Size(e,t),this.view.style.width="".concat(this.thumbSize.width,"px"),this.view.style.height="".concat(this.thumbSize.height,"px"),this.rect=qe.Size(this.thumbSize.width-this.delegate.thumbSpacing,this.thumbSize.height-this.delegate.thumbSpacing),this.updateImgSize(),this.videoContent&&(this.ratio<=1&&this.item.ratio<=1&&this.ratio>this.item.ratio?(this.videoContent.classList.add("pgc-lsp"),this.videoContent.classList.remove("pgc-prt")):(this.videoContent.classList.add("pgc-prt"),this.videoContent.classList.remove("pgc-lsp")))}},{key:"updateImgSize",value:function(){if(Dt(t,"updateImgSize",this,3)([]),this.rect&&this.imgCompleted){var e=qe.getFrameForBoxWithMode(qe.Size(this.img.naturalWidth,this.img.naturalHeight),this.rect,!0);this.img.style.left="".concat(e.x,"px"),this.img.style.top="".concat(e.y,"px"),this.img.style.width="".concat(e.width,"px"),this.img.style.height="".concat(e.height,"px")}}},{key:"select",value:function(e){e?this.view.classList.add("pgc-selected"):this.view.classList.remove("pgc-selected")}}])}(lt),mt=function(){return Tt((function e(t){var i=this;St(this,e),this.delegate=t,this.classPref=t.classPref,this.galleryData=this.delegate.galleryData,this.appName=this.galleryData.appName,this.headerFooterStatus=void 0,this.clearMode=!1,this.resizeDelay=void 0,this.size=qe.Size(0,0),this.firstAutoStart=!1,this.tempItem=void 0,this.tempIndex=void 0,this.flMode=!1,this.view=document.createElement("div"),this.view.className="".concat(this.classPref,"slider-view"),this.sliderWrap=document.createElement("div"),this.sliderWrap.className="".concat(this.classPref,"slider-wrap"),this.view.appendChild(this.sliderWrap),this.header=document.createElement("div"),this.header.className="".concat(this.classPref,"slider-header");var a=document.createElement("div");a.className="".concat(this.classPref,"slider-header-counter"),this.header.appendChild(a),this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(this.classPref,"current"),a.appendChild(this.item_current_info);var s=document.createElement("div");s.className="".concat(this.classPref,"delimiter"),a.appendChild(s),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(this.classPref,"all"),a.appendChild(this.items_amount_info);var o=B.CONFIG;o.ap_autoPlayBgColor=null,o.ap_autoPlayColor=null,o.ap_slideshowDelay=this.galleryData.sliderSlideshowDelay,this.autoPlay=new B(this.galleryData,o),this.autoPlay.view.classList.add("".concat(this.classPref,"slider-timer")),this.header.appendChild(this.autoPlay.view),this.galleryData.appEventManager.addGMEventListener(B.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.galleryData.appEventManager.addGMEventListener(B.EVENTS.NEXT_SLIDE,this,"slideshowHandler");var n=document.createElement("div");n.className="slider-header-space",this.header.appendChild(n),this.header.onmouseleave=function(){i.tryHideControl("header")},this.view.appendChild(this.header),this.hitAreaHeader=document.createElement("div"),this.hitAreaHeader.className="".concat(this.classPref,"slider-ha-header");var r=document.createElement("div");r.className="pgc-bh-inside",this.hitAreaHeader.appendChild(r),this.hitAreaHeader.onmouseenter=function(){i.tryShowControl("header")},this.initItemMenu(),this.galleryData.appEventManager.addGMEventListener(ae.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.galleryData.sliderItemCounterEnable&&this.header.classList.add("pgc-couner"),this.footer=document.createElement("div"),this.footer.className="".concat(this.classPref,"slider-footer"),this.view.appendChild(this.footer),this.itemTitle=document.createElement("div"),this.itemTitle.className="".concat(this.classPref,"slider-item-title"),this.footer.appendChild(this.itemTitle),this.itemDescription=document.createElement("div"),this.itemDescription.className="".concat(this.classPref,"slider-item-description"),this.footer.appendChild(this.itemDescription),this.itemDescriptionMore=document.createElement("div"),this.itemDescriptionMore.className="".concat(this.classPref,"slider-item-description-more"),this.itemDescriptionMore.innerHTML=qe.ICONS.ARR_DOWN_SVG,this.itemDescriptionMore.style.fill=null,this.itemDescriptionMore.onclick=function(){i.showDescription()},this.footer.appendChild(this.itemDescriptionMore);var l=q.CONFIG;l.sl_audioPlayer=this.galleryData.audioPlayer,l.sl_backgroundColor=!1,l.sl_preloaderColor=this.galleryData.sliderNavigationColor,l.sl_navigationColor=null,l.sl_navigationIconColor=null,l.sl_navigationColorOver=null,l.sl_navigationIconColorOver=null,l.sl_fit=!0,l.sl_yOffset="cleanStyle"===this.galleryData.sliderStyle?0:60,l.sl_canRemoved=!1,l.sl_copyR_Alert=this.galleryData.copyRAlert,l.sl_copyR_Proptection=this.galleryData.copyRProtection,l.sl_zoom=this.galleryData.sliderZoomEnable,l.sl_mouseWheelPagination=!1,l.sl_FullSizeViewMode=this.galleryData.sliderFullSizeViewMode,l.sl_next_prev_animation="animation"===this.galleryData.sliderNextPrevAnimation,l.sl_carouselMode=this.galleryData.sliderCarouselMode,l.sl_video_auto_start=this.galleryData.sliderVideoAutoPlay,l.sl_video_loop=this.galleryData.sliderVideoLoop,this.slider=new q(this.galleryData,l),this.createControlls(),this.setCleanStyle(this.galleryData.sliderStyle),this.view.onmouseleave=function(){i.tryHideControl()}}),[{key:"init",value:function(){this.slider.initByStage(this.sliderWrap,!1),this.slider.mouseWheelMode=!1,this.slider.pinchToZoom=!1}},{key:"initByList",value:function(e,t){this.slider.initByList(e,t,!1),this.curentItemNum=t,this.items_amount_info.innerHTML=e.length,this.autoPlay&&this.autoPlay.clear(),this.galleryData.sliderSlideshow&&this.itemMenu&&(e.length<2?this.itemMenu.playButtonStatus("desable"):this.itemMenu.playButtonStatus("stop")),1===e.length?(this.nextButton.style.visibility="hidden",this.prevButton.style.visibility="hidden"):(this.nextButton.style.visibility="visible",this.prevButton.style.visibility="visible")}},{key:"initItemMenu",value:function(){this.itemMenu&&this.itemMenu.view.parentNode&&this.itemMenu.view.parentNode.removeChild(this.itemMenu.view);var e=ae.CONFIG;e.im_info=this.galleryData.sliderInfoButtonEnable&&"cleanStyle"===this.galleryData.sliderStyle,e.im_play=this.galleryData.sliderSlideshow,e.im_link=this.galleryData.sliderSocialShareEnabled,e.im_zoom=this.galleryData.sliderZoomEnable,e.im_share=this.galleryData.sliderSocialShareEnabled,e.im_download=this.galleryData.sliderItemDownload,e.im_resize=this.galleryData.sliderResizeEnable,e.im_backgroundColor=null,e.im_backgroundColorOver=null,e.im_iconColor=null,e.im_iconColorOver=null,this.itemMenu=new ae(this.galleryData,ae.MENU_TYPE.LIGHTBOX,e),this.header.appendChild(this.itemMenu.view)}},{key:"createControlls",value:function(){var e=this;this.prevButton=document.createElement("div"),this.prevButton.className="".concat(ut,"next-prev-button"),this.prevButton.classList.add("pgc-prev");var t=document.createElement("div");t.className="pgc-bv-inside",this.prevButton.appendChild(t);var i=document.createElement("div");i.className="pgc-b-icon-inside",this.prevButton.appendChild(i),i.innerHTML=qe.ICONS.PREV_ARR,this.prevButton.appendChild(i),this.prevButton.onclick=function(){e.galleryData.appEventManager.dispatchGMEvent(qe.GMEvent(q.EVENTS.UPDATE_CONTROLS,e.slider,{draging:!0})),e.slider.gotoPrev()},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(ut,"next-prev-button"),this.nextButton.classList.add("pgc-next");var a=document.createElement("div");a.className="pgc-bv-inside",this.nextButton.appendChild(a);var s=document.createElement("div");s.className="pgc-b-icon-inside",this.nextButton.appendChild(s),s.innerHTML=qe.ICONS.NEXT_ARR,this.nextButton.appendChild(s),this.nextButton.onclick=function(){e.galleryData.appEventManager.dispatchGMEvent(qe.GMEvent(q.EVENTS.UPDATE_CONTROLS,e.slider,{draging:!0})),e.slider.gotoNext()},this.nextButton.onmouseleave=function(){e.tryHideControl("nextControll")},this.view.appendChild(this.nextButton)}},{key:"setCleanStyle",value:function(e){var t=0;switch(e){case"cleanStyle":this.header.classList.add("".concat(ut,"clear-style")),this.footer.classList.add("".concat(ut,"clear-style")),this.nextButton.classList.add("".concat(ut,"clear-style")),this.prevButton.classList.add("".concat(ut,"clear-style")),this.clearMode=!0;break;case"classical":this.header.classList.remove("".concat(ut,"clear-style")),this.footer.classList.remove("".concat(ut,"clear-style")),this.nextButton.classList.remove("".concat(ut,"clear-style")),this.prevButton.classList.remove("".concat(ut,"clear-style")),this.clearMode=!1,t=60,this.tryShowControl()}this.slider.setYOffset(t)}},{key:"curentItemNum",set:function(e){this.item_current_info.innerHTML=e+1}},{key:"updateCurentItem",value:function(e,t){if(e&&(this.tempItem=e),void 0!==t&&(this.tempIndex=t),this.tempItem&&void 0!==this.tempIndex){if(this.slider.itemsList.length<3||!1===this.galleryData.sliderCarouselMode?(0===this.tempIndex?this.prevButton.style.visibility="hidden":this.prevButton.style.visibility="visible",this.tempIndex===this.slider.itemsList.length-1?this.nextButton.style.visibility="hidden":this.nextButton.style.visibility="visible"):(this.slider.itemsList.length>=3||!0===this.galleryData.sliderCarouselMode)&&(this.nextButton.style.visibility="visible",this.prevButton.style.visibility="visible"),this.curentItemNum=this.tempIndex,this.itemMenu.updateForItem(this.tempItem.item),"classical"===this.galleryData.sliderStyle){var i=!1,a=!1;this.tempItem.item.title&&""!==this.tempItem.item.title?(this.itemTitle.innerHTML=this.tempItem.item.title,i=!0):this.itemTitle.innerHTML="",this.itemDescription.classList.remove("pgc-anime-ready");var s=this.tempItem.item[this.galleryData.sliderDescriptionSrc]?this.tempItem.item[this.galleryData.sliderDescriptionSrc]:"";this.galleryData.sliderItemDescriptionEnable&&s&&""!==s?(this.itemDescription.style.height="0px",this.itemDescription.innerHTML=s,this.calcReadMore(),a=!0):(this.itemDescriptionMore.classList.remove("pgc-read-more"),this.itemDescription.innerHTML="",this.itemDescription.style.height=null),i||a?this.footer.classList.remove("pgc-empty"):this.footer.classList.add("pgc-empty")}else this.delegate.tryUpdateDescription(this.tempItem.item);this.autoPlay&&"play"===this.autoPlay.status&&t===this.delegate.filteredCollection.length-1&&!1===this.galleryData.sliderCarouselMode&&this.autoPlay&&this.autoPlay.clear()}}},{key:"calcReadMore",value:function(){this.itemDescription.scrollHeight>this.descriptionMaxHeight?(this.itemDescription.style.height="".concat(this.descriptionMaxHeight,"px"),this.itemDescriptionMore.classList.add("pgc-read-more"),this.itemDescriptionMore.classList.remove("pgc-opened-desc")):(this.itemDescriptionMore.classList.remove("pgc-read-more"),this.itemDescription.style.height=null)}},{key:"showDescription",value:function(){this.itemDescription.classList.add("pgc-anime-ready"),this.itemDescription.clientHeight<this.itemDescription.scrollHeight?(this.itemDescriptionMore.classList.add("pgc-opened-desc"),this.itemDescription.style.height="".concat(this.itemDescription.scrollHeight,"px")):(this.itemDescriptionMore.classList.remove("pgc-opened-desc"),this.itemDescription.style.height="".concat(this.descriptionMaxHeight,"px"))}},{key:"slideShowSwitchHandler",value:function(e){if(this.autoPlay&&e.target===this.autoPlay)if(e.params.action)switch(e.params.action){case"play":this.autoPlay.start();break;case"stop":this.autoPlay.clear()}else e.params.status?this.itemMenu&&this.delegate.filteredCollection.length>1&&this.itemMenu.playButtonStatus(e.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(e){this.autoPlay&&e.target===this.autoPlay&&this.slider&&this.slider.gotoNext()}},{key:"tryStartSlidshow",value:function(){this.firstAutoStart||this.delegate.filteredCollection.length<2||this.autoPlay&&this.galleryData.sliderSlideshowAutoStart&&(this.autoPlay.start(),this.firstAutoStart=!0)}},{key:"extGotoPageByNum",value:function(e){this.slider.isZoom&&this.slider.remoteControl("zoom"),this.slider.gotoPageByNum(e)}},{key:"nextControll",value:function(e){this.nextButtonStaus!==e&&(this.nextButtonStaus&&this.nextButton.classList.remove(this.nextButtonStaus),this.nextButton.classList.add(e),this.nextButtonStaus=e)}},{key:"prevControll",value:function(e){this.prevButtonStaus!==e&&(this.prevButtonStaus&&this.prevButton.classList.remove(this.prevButtonStaus),this.prevButton.classList.add(e),this.prevButtonStaus=e)}},{key:"updateControll",value:function(e){switch(this.autoPlay&&this.autoPlay.clear(),e){case"show":this.header.classList.add("".concat(this.classPref,"show")),this.footer.classList.add("".concat(this.classPref,"show")),this.headerFooterStatus=e,this.tryShowControl();break;case"hide":this.header.classList.remove("".concat(this.classPref,"show")),this.footer.classList.remove("".concat(this.classPref,"show")),this.headerFooterStatus=e,this.clearMode&&this.tryHideControl();break;case"zoomIn":this.prevControll("pgc-b-hide"),this.nextControll("pgc-b-hide"),this.itemMenu&&this.itemMenu.zoomButtonStatus(e);break;case"zoomOut":this.clearMode||(this.prevControll("pgc-b-show"),this.nextControll("pgc-b-show")),this.itemMenu&&this.itemMenu.zoomButtonStatus(e)}this.slider.showHideNaviButton(e)}},{key:"tryShowControl",value:function(e){switch(e){case"header":this.header.classList.add("".concat(this.classPref,"show")),this.hitAreaHeader.parentNode&&this.hitAreaHeader.parentNode.removeChild(this.hitAreaHeader);break;case"prevControll":this.prevControll("pgc-b-show");break;case"nextControll":this.nextControll("pgc-b-show");break;default:"show"===this.headerFooterStatus&&this.header.classList.add("".concat(this.classPref,"show")),this.prevControll("pgc-b-show"),this.nextControll("pgc-b-show"),this.hitAreaHeader.parentNode&&this.hitAreaHeader.parentNode.removeChild(this.hitAreaHeader)}}},{key:"tryHideControl",value:function(e){if(this.clearMode&&"show"!==this.headerFooterStatus)switch(e){case"header":this.header.classList.remove("".concat(this.classPref,"show")),this.view.insertBefore(this.hitAreaHeader,this.header);break;case"prevControll":this.prevControll("pgc-b-hide");break;case"nextControll":this.nextControll("pgc-b-hide");break;default:this.header.classList.remove("".concat(this.classPref,"show")),this.prevControll("pgc-b-hide"),this.nextControll("pgc-b-hide"),this.view.insertBefore(this.hitAreaHeader,this.header)}}},{key:"updateYTstatus",value:function(e){this.galleryData.sliderVideoAutoPlay&&this.galleryData.sliderTryPlayNext&&e.params&&void 0!==e.params.status&&0===e.params.status&&this.slider.gotoNext(),e.params&&void 0!==e.params.status&&1===e.params.status&&qe.pausedAllVideoPlayers(e.params.itemID)}},{key:"itemMenuActionHandler",value:function(e){if(e.target===this.itemMenu){var t=e.params.item,i=e.params.type;if(t&&i){var a,s,o={};switch(o.item=t,i){case"link":t.link&&window.open(t.link,t.linkTarget?t.linkTarget:"_blank"),this.autoPlay&&this.autoPlay.clear();break;case"share":o.type="share",this.delegate.createModal(o),this.autoPlay&&this.autoPlay.clear();break;case"zoom":this.slider.remoteControl("zoom");break;case"play":this.autoPlay&&this.slider.itemIndex===this.delegate.filteredCollection.length-1&&!1===this.galleryData.sliderCarouselMode&&this.slider.gotoPageByNum(0),this.autoPlay&&this.autoPlay.switch();break;case"download":a=t.url,(s=document.createElement("A")).href=a,s.download=a.substr(a.lastIndexOf("/")+1),document.body.appendChild(s),s.click(),document.body.removeChild(s);break;case"fullscreen":qe.toggleFullScreen(this.view),this.delegate.windowResizeHandler();break;case"resize":this.view.classList.contains("".concat(ut,"modal-wrap"))?this.removeFixedModal():this.createFixedModal(),this.autoPlay&&this.autoPlay.clear();break;case"info":this.delegate.createInfoModal(t)}}}}},{key:"createFixedModal",value:function(){var e=this,t=document.getElementsByTagName("body")[0];this.view.style.zIndex=qe.findHighestZIndex(t)+1,qe.disableBodyScrollSlider(),this.view.classList.add("".concat(ut,"modal-wrap")),this.resizeHandler(),this.itemMenu.resizeButtonStatus("maxi"),this.slider.blackMilkEvent=function(){e.removeFixedModal()},this.slider.pinchToZoom=!0,this.slider.canRemovedLite=!0,this.flMode=!0}},{key:"removeFixedModal",value:function(){this.slider.blackMilkEvent=void 0,this.slider.pinchToZoom=!1,this.slider.canRemovedLite=!1,qe.enableBodyScrollSlider(),this.itemMenu.resizeButtonStatus("mini"),this.view.classList.remove("".concat(ut,"modal-wrap")),this.view.style.zIndex=null,this.resizeHandler(),this.delegate.sliderHeight&&(this.view.style.height="".concat(this.sliderHeight,"px")),this.flMode=!1}},{key:"resizeHandler",value:function(){this.size.width===this.sliderWrap.clientWidth&&this.size.height===this.sliderWrap.clientHeight||(this.itemMenu&&this.itemMenu.resizeHandler(),this.slider.resizeHandler(qe.Size(this.sliderWrap.clientWidth,this.sliderWrap.clientHeight)),this.itemDescription&&this.calcReadMore(),this.size=qe.Size(this.sliderWrap.clientWidth,this.sliderWrap.clientHeight))}},{key:"descriptionMaxHeight",get:function(){var e=this.sliderWrap.clientHeight/4;return Math.floor(e/this.lineHeight)*this.lineHeight}},{key:"lineHeight",get:function(){return Math.floor(1.4*this.galleryData.sliderItemDescriptionFontSize)}},{key:"prepareToRemove",value:function(){this.tempItem=void 0,this.tempIndex=void 0,this.autoPlay&&this.autoPlay.clear(),this.galleryData.appEventManager.removeGMEventListener(B.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.galleryData.appEventManager.removeGMEventListener(B.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.galleryData.appEventManager.removeGMEventListener(ae.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.slider.prepareToRemove()}}])}(),pt=function(e){function t(e,i){var a;return St(this,t),(a=It(this,t,[e,i])).TAGS_CLOUD=!0,a.contentNoPadding=void 0,a.pageCreationProcess=void 0,a.activePage={},a.startIndexFromHash=void 0,a.subContent=document.createElement("div"),a.subContent.className="".concat(a.classPref,"viewport"),a.view.insertBefore(a.subContent,a.content),a.slideViewport=document.createElement("div"),a.slideViewport.className="".concat(a.classPref,"slider-viewport"),a.slideViewport.setAttribute("tabindex",0),a.slideViewport.dataset.pgcGallery=a.appName,a.subContent.appendChild(a.slideViewport),a.footer=document.createElement("div"),a.footer.className="".concat(a.classPref,"footer"),a.view.appendChild(a.footer),a.init(),a.galleryData.appEventManager.addGMEventListener(q.EVENTS.UPDATE_CONTROLS,a,"updateSliderControls"),a.galleryData.appEventManager.addGMEventListener(q.EVENTS.YT_ON_CHANGE_STATUS,a,"updateYTstatus"),a}return Mt(t,e),Tt(t,[{key:"classPref",get:function(){return ut}},{key:"itemViewConstructor",get:function(){var e=this;return function(t){return new gt(e,t)}}},{key:"configureGalleryDefSet",value:function(){delete ht.sliderScrollNavi,this.galleryData=function(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?wt(Object(i),!0).forEach((function(t){Ct(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):wt(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}({},ht);this.galleryData=Object.assign(this.galleryData,{collectionThumbsEnable:!0,collectionthumbHoverBgColor:"rgba(0,0,0,0.4)",collectionthumbActiveColor:"rgba(195,195,194,1)",collectionthumbInfoColor:"rgba(255,255,255,1)",collectionthumbInfoBgColor:"rgba(0,0,0,0.8)",pageControllerThumbsRows:2,thumbHieghtRation:1,thumbSpacing:5,thumbMobileSpacing:5,collectionthumbRoundedCorners:0,collectionColumns:10,collectionThumbRecomendedWidth:100,tagsFilter:!1,tagsListCustomMode:!1,initGalleryByFirstTag:!1,deepLinkingForTag:!1,galleryTagsList:void 0,startByTag:"pgc_0",tagCloudAll:"All",tagCloudBgColor:"rgba(153,153,153,1)",tagCloudBgColorOver:"rgba(253,253,253,1)",tagCloudTextColor:"rgba(253,253,253,1)",tagCloudTextColorOver:"rgba(153,153,153,1)",pageControllerTextCollor:"rgba(253,253,253,1)",pageControllerTextCollorOver:"rgba(153,153,153,1)",pageControllerCollor:"rgba(153,153,153,1)",pageControllerActivCollor:"rgba(253,253,253,1)",sliderRatio:.6,sliderResizeEnable:!0,sliderVideoAutoPlay:!1,sliderBgColor:"rgba(0,0,0,0.8)",sliderHeaderFooterBgColor:"rgba(0,0,0,0.8)",sliderTryPlayNext:!1,sliderTryPouseVideoOnBlurPage:!1,sliderSlideshowAutoStart:!1,sliderFullSizeViewMode:!1,sliderItemDownload:!0,sliderSlideshow:!1,sliderZoomEnable:!1,sliderStyle:"classical",sliderInfoButtonEnable:!1,infoBarBgColor:"rgba(0,0,0,0.8)"})}},{key:"paginatorHandler",value:function(e){e.target===this.paginator&&void 0!==e.params.index&&this.addPageNumToStage(e.params.index)}},{key:"updateExraProps",value:function(e){e.collectionColumns&&(this.galleryData.collectionColumns=e.collectionColumns,this.addPageNumToStage(0)),e.pageControllerThumbsRows&&(this.galleryData.pageControllerThumbsRows=e.pageControllerThumbsRows,this.addPageNumToStage(0)),e.collectionThumbRecomendedWidth&&(this.galleryData.collectionThumbRecomendedWidth=e.collectionThumbRecomendedWidth,this.addPageNumToStage(0)),void 0!==e.collectionThumbsEnable&&(this.galleryData.collectionThumbsEnable=e.collectionThumbsEnable,this.updateLayout()),e.thumbSpacing&&(this.galleryData.thumbSpacing=e.thumbSpacing,this.updateLayout()),e.thumbMobileSpacing&&(this.galleryData.thumbMobileSpacing=e.thumbMobileSpacing,this.updateLayout()),e.thumbHieghtRation&&(this.galleryData.thumbHieghtRation=e.thumbHieghtRation,this.updateLayout()),e.sliderRatio&&(this.galleryData.sliderRatio=e.sliderRatio,this.sliderViewer&&this.sliderHeight&&(this.sliderViewer.view.style.height="".concat(this.sliderHeight,"px"),this.sliderViewer.resizeHandler())),void 0!==e.sliderItemDescriptionEnable&&(this.galleryData.sliderItemDescriptionEnable=e.sliderItemDescriptionEnable,this.sliderViewer&&this.sliderViewer.updateCurentItem()),void 0!==e.copyRProtection&&(this.galleryData.copyRProtection=e.copyRProtection,this.sliderViewer&&this.sliderViewer.slider.initDownloadProtection(this.galleryData.copyRProtection,this.galleryData.copyRAlert)),void 0!==e.copyRAlert&&(this.galleryData.copyRAlert=e.copyRAlert,this.sliderViewer&&(this.sliderViewer.slider.config.sl_copyR_Alert=this.galleryData.copyRAlert)),void 0!==e.sliderStyle&&(this.galleryData.sliderStyle=e.sliderStyle,this.sliderViewer&&(this.sliderViewer.updateCurentItem(),this.sliderViewer.setCleanStyle(e.sliderStyle))),e.sliderDescriptionSrc&&(this.galleryData.sliderDescriptionSrc=e.sliderDescriptionSrc,this.sliderViewer&&this.sliderViewer.updateCurentItem()),void 0!==e.sliderSlideshowAutoStart&&(this.galleryData.sliderSlideshowAutoStart=e.sliderSlideshowAutoStart,this.sliderViewer&&this.sliderViewer.autoPlay&&(this.galleryData.sliderSlideshowAutoStart?this.sliderViewer.autoPlay.start():this.sliderViewer.autoPlay.clear())),e.sliderNextPrevAnimation&&(this.galleryData.sliderNextPrevAnimation=e.sliderNextPrevAnimation,this.sliderViewer&&(this.sliderViewer.slider.config.sl_next_prev_animation="animation"===this.galleryData.sliderNextPrevAnimation)),void 0!==e.sliderItemCounterEnable&&(this.galleryData.sliderItemCounterEnable=e.sliderItemCounterEnable,this.sliderViewer&&(this.galleryData.sliderItemCounterEnable?this.sliderViewer.header.classList.add("pgc-couner"):this.sliderViewer.header.classList.remove("pgc-couner"))),void 0!==e.sliderSlideshow&&(this.galleryData.sliderSlideshow=e.sliderSlideshow,this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderZoomEnable&&(this.galleryData.sliderZoomEnable=e.sliderZoomEnable,this.sliderViewer.slider&&(this.sliderViewer.slider.zoomingPage&&this.sliderViewer.slider.remoteControl("space"),this.sliderViewer.slider.config.sl_zoom=this.galleryData.sliderZoomEnable),this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderItemDownload&&(this.galleryData.sliderItemDownload=e.sliderItemDownload,this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderInfoButtonEnable&&(this.galleryData.sliderInfoButtonEnable=e.sliderInfoButtonEnable,this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderSocialShareEnabled&&(this.galleryData.sliderSocialShareEnabled=e.sliderSocialShareEnabled,this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderResizeEnable&&(this.galleryData.sliderResizeEnable=e.sliderResizeEnable,this.sliderViewer&&(this.sliderViewer.initItemMenu(),this.sliderViewer.updateCurentItem())),void 0!==e.sliderCarouselMode&&(this.galleryData.sliderCarouselMode=e.sliderCarouselMode,this.sliderViewer&&this.sliderViewer.slider&&(this.sliderViewer.slider.config.sl_carouselMode=this.galleryData.sliderCarouselMode,this.sliderViewer.updateCurentItem())),void 0!==e.sliderVideoAutoPlay&&(this.galleryData.sliderVideoAutoPlay=e.sliderVideoAutoPlay,this.sliderViewer&&this.sliderViewer.slider&&(this.sliderViewer.slider.config.sl_video_auto_start=this.galleryData.sliderVideoAutoPlay)),void 0!==e.sliderVideoLoop&&(this.galleryData.sliderVideoLoop=e.sliderVideoLoop,this.sliderViewer&&this.sliderViewer.slider&&(this.sliderViewer.slider.config.sl_video_loop=this.galleryData.sliderVideoLoop)),void 0!==e.sliderTryPlayNext&&(this.galleryData.sliderTryPlayNext=e.sliderTryPlayNext)}},{key:"updateGalleryStyleSheet",value:function(){this.styleSheet.innerHTML='\n      div[data-gallery-id="'.concat(this.appName,'"] .').concat(this.classPref,"main-wrap{\n        padding:").concat(this.thumbSpacing/2,"px;\n        border-radius:").concat(this.collectionthumbRoundedCorners,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-thumb-price{\n        color:").concat(this.galleryData.collectionthumbInfoColor,";\n        background-color:").concat(this.galleryData.collectionthumbInfoBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-hover{\n        background-color:").concat(this.galleryData.collectionthumbHoverBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item.pgc-selected .").concat(this.classPref,"thumb-sel{\n        border: solid ").concat(this.galleryData.collectionthumbActiveColor,' 4px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'item-inner.action-lightbox{\n        cursor: zoom-in;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"item-badge{\n        fill:").concat(this.galleryData.collectionthumbInfoColor,";\n        background-color:").concat(this.galleryData.collectionthumbInfoBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"viewport{\n        padding:").concat(this.thumbSpacing,'px;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-wrap{\n        background-color:").concat(this.galleryData.sliderBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"modal-wrap{\n        background-color:").concat(this.galleryData.sliderBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,'slider-header,\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-footer{\n        background-color:").concat(this.galleryData.sliderHeaderFooterBgColor,";\n        color:").concat(this.galleryData.sliderItemTitleTextColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-header.").concat(this.classPref,'clear-style{\n        background-color: unset;\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-header.").concat(this.classPref,"clear-style .pgc-rev-item-menu-view{\n        background-color:").concat(this.galleryData.sliderHeaderFooterBgColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-item,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-prev-button,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-next-button{\n        color:').concat(this.galleryData.pageControllerTextCollor,";\n        fill:").concat(this.galleryData.pageControllerTextCollor,";\n        background-color:").concat(this.galleryData.pageControllerCollor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-item.hover,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-prev-button.hover,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-next-button.hover,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-paginator-item.pgc-selected{\n        color:').concat(this.galleryData.pageControllerTextCollorOver,";\n        fill:").concat(this.galleryData.pageControllerTextCollorOver,";\n        background-color:").concat(this.galleryData.pageControllerActivCollor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-item-menu-button{\n        fill:').concat(this.galleryData.sliderThumbSubMenuIconColor,";\n        background-color:").concat(this.galleryData.sliderThumbSubMenuBackgroundColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-item-menu-button.hover{\n        fill:').concat(this.galleryData.sliderThumbSubMenuIconHoverColor,";\n        background-color:").concat(this.galleryData.sliderThumbSubMenuBackgroundColorOver,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-auto-play-progress-radial-track{\n        fill:').concat(this.galleryData.slideshowIndicatorColorBg,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-rev-auto-play-progress-radial-bar{\n        fill:').concat(this.galleryData.slideshowIndicatorColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-header-counter{\n        color:").concat(this.galleryData.itemCounterColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"delimiter{\n        background-color:").concat(this.galleryData.itemCounterColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-bh-inside,\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-bv-inside{\n        background-color:').concat(this.galleryData.sliderNavigationIconColor,";\n        border-color:").concat(this.galleryData.sliderNavigationColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .pgc-b-icon-inside{\n        fill:').concat(this.galleryData.sliderNavigationIconColor,";\n        background-color:").concat(this.galleryData.sliderNavigationColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"next-prev-button:hover .pgc-b-icon-inside{\n        fill:").concat(this.galleryData.sliderNavigationIconColorOver,";\n        background-color:").concat(this.galleryData.sliderNavigationColorOver,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-item-title{\n        font-size:").concat(this.galleryData.sliderItemTitleFontSize,"px;\n        color:").concat(this.galleryData.sliderItemTitleTextColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-item-description-more{\n        fill:").concat(this.galleryData.sliderItemTitleTextColor,';\n      }\n      div[data-gallery-id="').concat(this.appName,'"] .').concat(this.classPref,"slider-item-description{\n        font-size:").concat(this.galleryData.sliderItemDescriptionFontSize,"px;\n        line-height:").concat(Math.floor(1.4*this.galleryData.sliderItemDescriptionFontSize),"px;\n        color:").concat(this.galleryData.sliderItemDescriptionTextColor,";\n      }\n      ")}},{key:"updateStyleExraProps",value:function(){var e=this.thumbSpacing/2;this.galleryData.contentNoPadding?(this.content.style.margin="-".concat(e,"px"),this.content.style.padding=null):(this.content.style.margin=null,this.content.style.padding="".concat(e,"px")),this.contentNoPadding!==this.galleryData.contentNoPadding&&(this.contentNoPadding=this.galleryData.contentNoPadding,this.updateLayout())}},{key:"updateViewByData",value:function(){if(this.deepLinking&&void 0===this.startIndexFromHash&&void 0!==this.itemFromHash){var e=this.itemFromHash.id;"pgc_0"===this.filtredById&&void 0===this.itemFromHash.id&&/^\d+$/.test(this.itemFromHash.tagID)&&(e=this.itemFromHash.tagID),this.startIndexFromHash=this.getItemIndexByID(e,this.filteredCollection)}Dt(t,"updateViewByData",this,3)([])}},{key:"createLayout",value:function(){if(!this.paginator){var e=P.CONFIG;e.pgn_Color=null,e.pgn_activColor=null,e.pgn_activBgColor=null,e.pgn_bgColor=null,this.paginator=new P(this.galleryData,e,{}),this.galleryData.appEventManager.addGMEventListener(P.EVENTS.PAGINATOR_ITEM_ACTION,this,"paginatorHandler"),this.footer.appendChild(this.paginator.view)}this.sliderViewer||(this.sliderViewer=new mt(this),this.sliderViewer.init(),this.slideViewport.appendChild(this.sliderViewer.view)),!1===this.galleryData.collectionThumbsEnable?(this.content.classList.add("pgc-thumb-remove"),this.footer.classList.add("pgc-thumb-remove")):(this.content.classList.remove("pgc-thumb-remove"),this.footer.classList.remove("pgc-thumb-remove")),this.activePage=void 0,this.addPageNumToStage(0),this.sliderViewer.slider.prepareToRemove();var t=0;void 0!==this.startIndexFromHash&&(t=this.startIndexFromHash,this.startIndexFromHash=void 0);var i=this.filteredCollection[t],a={target:this.sliderViewer.slider,params:{item:i,itemIndex:t}};i&&(this.sliderViewer.initByList(this.filteredCollection,0),this.updateSliderControls(a))}},{key:"updateLayout",value:function(){if(!0===this.galleryData.collectionThumbsEnable){if(0===this.presentedList.length)return void this.createLayout();this.content.classList.remove("pgc-thumb-remove"),this.footer.classList.remove("pgc-thumb-remove")}else this.content.classList.add("pgc-thumb-remove"),this.footer.classList.add("pgc-thumb-remove");for(var e=0;e<this.presentedList.length;e+=1)this.arangeItem(this.presentedList[e])}},{key:"checkViewYpos",value:function(){this.content.getBoundingClientRect().top<0&&qe.scrollWindowToY(qe.pageYOffset+this.content.getBoundingClientRect().top-40)}},{key:"addPageNumToStage",value:function(e){var t=this;if(!1!==this.galleryData.collectionThumbsEnable){var i=this.filteredCollection;if(this.removePresentedItems(),e<this.pages){clearTimeout(this.pageCreationProcess);for(var a=e*this.itemsOnPage,s=Math.min(a+this.itemsOnPage,this.filteredCollection.length),o=1,n=a;n<s;n+=1){var r=i[n].view;r.index=n,r.opacity={opacity:0,delay:0},this.addItemToStage(r),r.opacity={opacity:1,delay:100*o},o+=1}this.activePage=e,this.paginator.init(this.pages,e+1),this.itemsOnPagePr=this.itemsOnPage,this.pageCreationProcess=setTimeout((function(){t.checkViewYpos()}),50*o)}}}},{key:"addItemToStage",value:function(e){Dt(t,"addItemToStage",this,3)([e]),this.arangeItem(e);var i=e.view;this.content.appendChild(i),this.presentedList.push(e)}},{key:"arangeItem",value:function(e){e.updateSize(this.itemWidth),e.display="block"}},{key:"deleteAllEmbedInItems",value:function(e){this.sliderViewer&&this.sliderViewer.slider.tryPausedVideo(e)}},{key:"pageLeave",value:function(){this.galleryData.sliderTryPouseVideoOnBlurPage&&this.deleteAllEmbedInItems()}},{key:"rows",get:function(){return this.galleryData.pageControllerThumbsRows}},{key:"itemsOnPage",get:function(){return this.columns*this.rows}},{key:"allPages",get:function(){return Math.ceil(this.filteredCollection.length/(this.columns*this.rows))}},{key:"pages",get:function(){return Math.ceil(this.filteredCollection.length/this.itemsOnPage)}},{key:"contentWidth",get:function(){return this.galleryData.contentNoPadding?Math.floor(this.content.clientWidth-.1):Math.floor(this.content.clientWidth-.1-this.thumbSpacing)}},{key:"sliderHeight",get:function(){return Math.floor(this.view.clientWidth*this.galleryData.sliderRatio)}},{key:"columns",get:function(){var e=Math.floor(this.contentWidth/this.galleryData.collectionThumbRecomendedWidth);return e=e<1?1:e,Math.min(e,this.galleryData.collectionColumns)}},{key:"itemWidth",get:function(){return this.contentWidth/this.columns}},{key:"removeViewContent",value:function(){for(var e=this.content.childNodes.length-1;e>=0;e-=1)this.content.removeChild(this.content.childNodes[e]);Dt(t,"removeViewContent",this,3)([])}},{key:"resizeHandler",value:function(){Dt(t,"resizeHandler",this,3)([]),this.sliderViewer&&this.sliderHeight&&(this.sliderViewer.view.style.height="".concat(this.sliderHeight,"px"))}},{key:"updateSliderControls",value:function(e){if(e.target===this.sliderViewer.slider&&e.params)if(e.params.item){var t=Math.floor(e.params.itemIndex/this.itemsOnPage),i=e.params.item.view;this.sliderViewer.updateCurentItem(i,e.params.itemIndex),this.currentItem&&this.currentItem!==i&&this.currentItem.select(!1),this.currentItem=i,i.select(!0),t!==this.activePage&&this.addPageNumToStage(t),this.deepLinking&&this.updateItemLink(i.item)}else e.params.controls?this.sliderViewer.updateControll(e.params.controls):e.params.zoom?this.sliderViewer.updateControll(e.params.zoom):e.params.draging?this.sliderViewer.updateControll(e.params.draging):e.params.status&&"ready"===e.params.status&&this.sliderViewer.tryStartSlidshow()}},{key:"updateYTstatus",value:function(e){e.target===this.sliderViewer.slider&&this.sliderViewer.updateYTstatus(e)}},{key:"createDescriptionForItem",value:function(e){var t=document.createElement("div");t.className="".concat(ut,"info-bar-description-wrap");var i=document.createElement("div");i.className="".concat(this.classPref,"slider-item-title"),t.appendChild(i);var a=document.createElement("div");a.className="".concat(this.classPref,"slider-item-description"),t.appendChild(a);var s=!1,o=!1;if(e.title&&""!==e.title?(i.innerHTML=e.title,s=!0):i.innerHTML="",this.galleryData.sliderItemDescriptionEnable){var n=e[this.galleryData.sliderDescriptionSrc]?e[this.galleryData.sliderDescriptionSrc]:"";n&&""!==n&&(a.innerHTML=n,o=!0)}return s||o?t:null}},{key:"tryUpdateDescription",value:function(e){if("cleanStyle"===this.galleryData.sliderStyle&&this.modal&&"infobar"===this.modal.type){var t=this.createDescriptionForItem(e);t&&this.modal.initByContentDiv(t)}}},{key:"createInfoModal",value:function(e){var t=this.createDescriptionForItem(e);if(t)if(this.modal)"infobar"===this.modal.type?this.modal.initByContentDiv(t):this.modal.prepareToRemove();else{var i=document.getElementsByTagName("body")[0],a=me.CONFIG;a.infb_parentDiv=i,a.infb_backgroundColor=this.galleryData.infoBarBgColor,this.galleryData.appEventManager.addGMEventListener(me.EVENTS.REMOVE_INFO_BAR_WINDOW,this,"deleteModal"),this.modal=new me(this.galleryData.appEventManager,a),this.modal.type="infobar",this.modal.view&&this.modal.view.dataset&&(this.modal.view.dataset.galleryId=this.appName),this.modal.initByContentDiv(t)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.galleryData.appEventManager.removeGMEventListener(me.EVENTS.REMOVE_INFO_BAR_WINDOW,this,"deleteModal")}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){var i;if(e.sliderViewer&&e.sliderViewer.slider)switch(e.modal&&"infobar"!==e.modal.type&&e.modal.prepareToRemove(),document.activeElement&&void 0!==document.activeElement.dataset.pgcGallery&&document.activeElement.dataset.pgcGallery===e.appName&&(i=!0),t.keyCode){case 27:e.modal?e.modal.prepareToRemove():e.sliderViewer.flMode&&e.sliderViewer.removeFixedModal();break;case 37:(e.sliderViewer.flMode||i)&&(t.stopPropagation(),t.preventDefault(),e.sliderViewer.slider.remoteControl("prev"));break;case 39:(e.sliderViewer.flMode||i)&&(t.stopPropagation(),t.preventDefault(),e.sliderViewer.slider.remoteControl("next"));break;case 32:(e.sliderViewer.flMode||i)&&(qe.preventDefault(t),e.sliderViewer.slider.remoteControl("space"));break;case 13:(e.sliderViewer.flMode||i)&&(qe.preventDefault(t),e.modal?e.modal.prepareToRemove():e.sliderViewer.tempItem&&e.createInfoModal(e.sliderViewer.tempItem.item));break;case 9:e.modal&&qe.preventDefault(t);break;case 16:(e.sliderViewer.flMode||i)&&(qe.preventDefault(t),e.sliderViewer&&(e.sliderViewer.flMode?e.sliderViewer.removeFixedModal():e.sliderViewer.createFixedModal()))}},e.handlerKB}},{key:"createLightbox",value:function(e){var t=e.index;if(this.sliderViewer.extGotoPageByNum(t),this.slideViewport.getBoundingClientRect().top<0&&qe.scrollWindowToY(qe.pageYOffset+this.slideViewport.getBoundingClientRect().top-40),this.deepLinking){var i=this.filteredCollection[t],a=this.itemHash(i),s={target:this.sliderViewer.slider,params:{item:i,itemIndex:t}};this.updateSliderControls(s),window.location.hash!==a&&window.history.pushState(null,null,a)}}},{key:"windowResize",value:function(){Dt(t,"windowResize",this,3)([]),this.sliderViewer.resizeHandler(),this.modal&&this.modal.resizeHandler&&"function"==typeof this.modal.resizeHandler&&this.modal.resizeHandler()}},{key:"remove",value:function(){this.galleryData.appEventManager.removeGMEventListener(P.EVENTS.PAGINATOR_ITEM_ACTION,this,"paginatorHandler"),this.galleryData.appEventManager.removeGMEventListener(q.EVENTS.UPDATE_CONTROLS,this,"updateSliderControls"),this.galleryData.appEventManager.removeGMEventListener(q.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.sliderViewer.prepareToRemove(),Dt(t,"remove",this,3)([])}}])}(Qe),new(function(e){function t(){return St(this,t),It(this,t,arguments)}return Mt(t,e),Tt(t,[{key:"collectionConstructor",value:function(e,t){return new pt(e,t)}}])}(st))(dt))})()})();