File: //var/www/wp-content/plugins/simply-gallery-block/plugins/pgc_sgb_lightbox.min.js
(()=>{var e={7157:()=>{},6378:()=>{},9966:()=>{},7412:()=>{},6550:()=>{},7625:()=>{},2113:()=>{},5072:e=>{"use strict";var t=[];function i(e){for(var i=-1,n=0;n<t.length;n++)if(t[n].identifier===e){i=n;break}return i}function n(e,n){for(var o={},a=[],r=0;r<e.length;r++){var l=e[r],h=n.base?l[0]+n.base:l[0],c=o[h]||0,d="".concat(h," ").concat(c);o[h]=c+1;var u=i(d),m={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==u)t[u].references++,t[u].updater(m);else{var v=s(m,n);n.byIndex=r,t.splice(r,0,{identifier:d,updater:v,references:1})}a.push(d)}return a}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=n(e=e||[],s=s||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var r=i(o[a]);t[r].references--}for(var l=n(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 n=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(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.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 n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var s=void 0!==i.layer;s&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,s&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(n,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(n){var s=t[n];if(void 0!==s)return s.exports;var o=t[n]={exports:{}};return e[n](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 n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nc=void 0,(()=>{"use strict";var e=i(5072),t=i.n(e),n=i(7825),s=i.n(n),o=i(7659),a=i.n(o),r=i(5056),l=i.n(r),h=i(540),c=i.n(h),d=i(1113),u=i.n(d),m=i(2113),v=i.n(m),g={};function p(e){return p="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},p(e)}function f(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=p(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}g.styleTagTransform=u(),g.setAttributes=l(),g.insert=a().bind(null,"head"),g.domAPI=s(),g.insertStyleElement=c(),t()(v(),g),v()&&v().locals&&v().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,n=document.createElement("div");n.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,n.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 a=0;a<8;a+=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 n.appendChild(o),n}},{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 n in i)if(void 0!==e.style[n])return t[n]}},{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}},n=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),s=t.match(/(Android);?[\s\/]+([\d.]+)?/),o=t.match(/(iPad).*OS\s([\d_]+)/),a=t.match(/(iPod)(.*OS\s([\d_]+))?/),r=!o&&t.match(/(iPhone\sOS|iOS)\s([\d_]+)/);if(n&&(i.os="windows",i.osVersion=n[2],i.windows=!0),s&&!n&&(i.os="android",i.osVersion=s[2],i.android=!0,i.androidChrome=t.toLowerCase().indexOf("chrome")>=0),(o||r||a)&&(i.os="ios",i.ios=!0),r&&!a&&(i.osVersion=r[2].replace(/_/g,"."),i.iphone=!0),o&&(i.osVersion=o[2].replace(/_/g,"."),i.ipad=!0),a&&(i.osVersion=a[3]?a[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||a)&&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&&(a||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 n=i.offsetWidth;return e.parentNode.removeChild(e),t-n}},{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,n){if(e.Device.browser.ie11)return"".concat(t+(t.indexOf("?")>=0?"&":"?")+encodeURIComponent(i),"=").concat(encodeURIComponent(n));var s=(t=new URL(t)).search,o=new URLSearchParams(s);return o.append(i,n),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 n=document.createElement("iframe");if(n.setAttribute("allow","autoplay"),n.setAttribute("allowfullscreen",""),n.setAttribute("frameborder","0"),"youtube"===e)n.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+"&":"";n.src="https://player.vimeo.com/video/".concat(t,"?").concat(s,"autoplay=1&byline=0&portrait=0&transparent=0")}return n}},{key:"copyProperties",value:function(e,t){for(var i=[],n=Object.keys(e),s=0;s<n.length;s+=1){var o=n[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,n=e.length;0!==n;)i=Math.floor(Math.random()*n),t=e[n-=1],e[n]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,n){return{x:e,y:t,width:i,height:n}}},{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,n=0;n<e.childNodes.length;n+=1){var s=e.childNodes[n];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={"&":"&","<":"<",">":">",'"':""","'":"'"};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=[],n=0;n<e.childNodes.length;n+=1){var s={},o=e.childNodes[n];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,n){return t+t+i+i+n+n}));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,n){var s=t.width,o=t.height,a=i.width,r=i.height,l=1,h=1,c=1;n?(l=a/s,h=r/o,c=Math.max(l,h)):(l=a/s,h=r/o,c=(c=Math.min(l,h))>1?1:c);var d=Math.round(s*c),u=Math.round(o*c),m=Math.round((a-d)/2),v=Math.round((r-u)/2);return e.Rect(m,v,d,u)}},{key:"getItemFrameByIndexForBox",value:function(t,i,n,s,o,a){var r=1;a&&(r=a);var l=o=Math.min(i,o),h=Math.floor(i/o),c=(l=h>1?(i-(h-1)*n)/h:i)*r,d=Math.ceil((t+1)/h)-1,u=d*(c+s),m=(t-d*h)*(l+n);return e.Rect(m,u,l,c)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var n=Math.sqrt,s=(new Date).getTime();!function o(){var a=(new Date).getTime()-s,r=a/i;if(r<1){var l=1-n(r);e.style.opacity=String(l),setTimeout(o,Math.min(25,i-a))}else e.style.opacity="0",t&&t()}()}},{key:"ellipsizeTextBoxToLine",value:function(e,t){e.innerHTML=e.textContent||e.innerText||"";var i=e.innerHTML,n=e.innerHTML.split(" ");e.innerHTML=n[0].substring(0,3);var s=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>s;)n.pop(),e.innerHTML="".concat(n.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 n=t.parentElement;return n.classList.contains(i)?n:e.searchParentByClassName(n,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,n=(t=Math.min(t,e.scrollHeight-e.clientHeight-1))-e.scrollTop;i=setInterval((function(){n=.05*n+.07*(t-e.scrollTop);var s=e.scrollTop+n;Math.abs(n)<1?(n=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 n(){clearInterval(t),document.removeEventListener("wheel",n,!1)}var s=window.pageYOffset;e=Math.min(e,document.documentElement.scrollHeight-document.documentElement.clientHeight-1);var o=0,a=.05+.01*Math.abs(e-window.pageYOffset)/1e3;a=Math.min(.9,a),t=setInterval((function(){var r=(e-window.pageYOffset)*a;(r===o||Math.abs(r)<1)&&(window.scrollTo(0,e),clearInterval(t)),o=(e-window.pageYOffset)*a,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",n,!1))}),15)}},{key:"scrollToY",value:function(e,t){var i,n=window.pageYOffset,s=Math.PI/(t/15),o=n/2,a=0,r=setInterval((function(){window.pageYOffset>e?(a+=1,i=o-o*Math.cos(a*s),window.scrollTo(0,n-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(n){!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[n].webView,e.lastIndex=n,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(n,s,o){if(e.itemsList&&e.itemsList.length)for(var a=0;a<e.itemsList.length;a+=1)e.itemsList[a].webView.removeEventListener("load",i,!1);e.amount=o,e.cached=0,e.currentItem=void 0,e.lastIndex=s,e.itemsList=n,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,n){if(!t)return e.trace("********************************* Event UNDEFINED!!! ***************************************"),e.trace(i),e.trace(n),void e.trace("********************************* Event UNDEFINED!!! ***************************************");this.listenerSet[t]||(this.listenerSet[t]=[]);var s={};s.listener=i,s.handler=n,this.listenerSet[t].push(s)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var n=0;n<this.listenerSet[e].length;n+=1)this.listenerSet[e][n].listener===t&&this.listenerSet[e][n].handler===i&&(this.listenerSet[e].splice(n,1),n=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 n=t[i];n&&n.listener&&"function"==typeof n.listener[n.handler]&&n.listener[n.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var n={};return n.type=e,n.params=i,n.target=t,n}}],null&&f(t.prototype,null),i&&f(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i}();const w=b;var S=i(7157),E=i.n(S),C={};function _(e){return _="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},_(e)}function L(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function I(e,t,i){return t&&L(e.prototype,t),i&&L(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function T(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=_(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function P(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}C.styleTagTransform=u(),C.setAttributes=l(),C.insert=a().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=c(),t()(E(),C),E()&&E().locals&&E().locals;var k=I((function e(t,i,n,s,o,a,r){function l(e){return e&&e[0].toUpperCase()+e.slice(1)}P(this,e);var h=document.createElement("div");return h.className=t,h.dataset.type=n,h.innerHTML=i,h.style.backgroundColor=s,h.style.order=r,h.style.fill=o,h.setAttribute("title",l(n)),h.setAttribute("aria-label",l(n)),h.addEventListener("touchend",a,!1),h.addEventListener("click",a,!1),h.addEventListener("mouseenter",a,!1),h.addEventListener("mouseleave",a,!1),h}));const M=function(){function e(t,i,n){P(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(n,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 I(e,[{key:"initButtons",value:function(){var t=this.type,i=e.MENU_TYPE,n=this;function s(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=n.backgroundColor:(e.style.backgroundColor=n.backgroundColor,e.style.fill=n.iconColor,e.classList.remove("hover")))}function o(t){if(this.eventType=t.type,"click"===t.type){var i=n.item;if(!i)return;var o={};o.type=this.dataset.type,o.item=i,this.dataset.type,s(this),w.Device.desktop||s(this),n.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.ITEM_MENU_ACTION,n,o))}else"mouseenter"===t.type?"bookmark"===(a=this).dataset.type&&a.dataset.bookmark?a.style.backgroundColor=n.backgroundColorOver:(a.style.backgroundColor=n.backgroundColorOver,a.style.fill=n.iconColorOver,a.classList.add("hover")):"mouseleave"===t.type&&s(this);var a}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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 k("".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 x=i(7412),B=i.n(x),N={};function O(e){return O="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},O(e)}function z(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,A(n.key),n)}}function A(e){var t=function(e){if("object"!=O(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=O(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==O(t)?t:t+""}N.styleTagTransform=u(),N.setAttributes=l(),N.insert=a().bind(null,"head"),N.domAPI=s(),N.insertStyleElement=c(),t()(B(),N),B()&&B().locals&&B().locals,w.trace;const V=function(){function e(t,i,n){!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),this.accelX=0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.config.scrh_block_pan_y&&this.view.classList.add("pgc-block-pan-y"),this.startDragHandler=void 0,this.draggingPr=!1,this.config.scrh_dragin?(this.startDragHandler=this.startDrag(),w.isTouchDevice&&(this.view.addEventListener("touchstart",this.startDragHandler,w.passiveListener),window.addEventListener("touchmove",(function(){}),w.passiveListener)),this.view.addEventListener("mousedown",this.startDragHandler,!1)):this.view.addEventListener("mousedown",this.mouseHandler(),!1),this.view.addEventListener("wheel",this.mouseHandler(),!1),this.view.addEventListener("mouseup",this.mouseHandler(),!1),this.view.addEventListener("touchstart",this.mouseHandler(),!1),this.view.addEventListener("touchend",this.mouseHandler(),!1),this.scrollView=void 0,this.pages=0,this.lastPageWidth=0,this.scrollDirection=0,this.nextPagePart=0,this.scrollScale=0,this.rPosX=0,this.currentPageIndex=0,this.currentPagePr=0,this.renderingX=!1,this.internalControll=!1,this.prevButtonSt=!1,this.nextButtonSt=!1,w.setStyleForElFomObj(this.view,n)}return t=e,n=[{key:"classPref",get:function(){return"pgc-rev-scroller-ho-"}},{key:"EVENTS",get:function(){return{SCR_ACTION:"SCR_ACTION",SCR_SCROLL:"SCR_SCROLL"}}},{key:"CONFIG",get:function(){return{scrh_dragin:!1,scrh_dragin_cursor:!0,scrh_smooth_dragin:!0,scrh_block_pan_y:!1}}}],(i=[{key:"dragging",set:function(e){var t=this;clearTimeout(this.draggingDelayTimer),e?(this.draggingPr=!0,this.view.classList.add("isDraging")):(this.draggingDelayTimer=setTimeout((function(){t.draggingPr=!1}),20),this.view.classList.remove("isDraging"))}},{key:"draging",get:function(){return this.draggingPr}},{key:"initByScrollView",value:function(e){this.scrollView=e,this.view.appendChild(this.scrollView),this.calculateScroll()}},{key:"mouseHandler",value:function(){var e=this;return this.msHandler=function(t){switch(t.type){case"mousedown":case"wheel":case"touchstart":e.internalControll=!0;break;case"mouseup":case"touchend":e.internalControll=!1}},this.msHandler}},{key:"scrollWidth",get:function(){if(this.scrollView)return this.scrollView.clientWidth}},{key:"width",get:function(){return this.view.clientWidth}},{key:"refresh",value:function(){clearInterval(this.scrollAnimInterval),this.scrHandler&&this.view.removeEventListener("scroll",this.scrHandler),this.currentPageIndex=0,this.view.scrollLeft=0,this.rPosX=0,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_SCROLL,this,{scroll:0})),this.calculateScroll()}},{key:"calculateScroll",value:function(){this.scrollWidth&&(this.scrollScale=this.width/this.scrollWidth,this.scrollScale<1?(this.view.addEventListener("scroll",this.scrollHandler()),this.config.scrh_dragin&&this.config.scrh_dragin_cursor&&this.view.classList.add("".concat(e.classPref,"grabbable"))):(this.view.removeEventListener("scroll",this.scrHandler),this.config.scrh_dragin&&this.config.scrh_dragin_cursor&&this.view.classList.remove("".concat(e.classPref,"grabbable"))),this.pages=Math.ceil(this.scrollWidth/this.width),this.lastPageWidth=this.scrollWidth%this.width==0?this.width:this.scrollWidth%this.width,this.updateControls())}},{key:"updateControls",value:function(t){var i={},n=this.pages,s=this.view.scrollLeft;i.pages=n,i.scrollScale=this.scrollScale,i.renderingX=this.renderingX,i.internalControll=this.internalControll,i.currentPage=void 0!==t?t:this.currentPagePr,1===n?(i.hasPrevPage=!1,i.hasNextPage=!1):(i.hasPrevPage=s>0,i.hasNextPage=this.scrollWidth-s-this.width>.5),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_ACTION,this,i))}},{key:"currentPage",value:function(){var t=this.pages,i=this.width,n=this.view.scrollLeft,s=this.scrollWidth-n-i,o=n%i,a=Math.ceil(n/i)===t-1?this.lastPageWidth:i;this.nextPagePart=o/a;var r=Math.round(Math.floor(n/i)+this.nextPagePart),l=-(this.rPosX-n)/Math.abs(this.rPosX-n);return l&&this.scrollDirection!==l&&(this.scrollDirection=l,this.updateControls()),this.currentPagePr===r&&0!==s&&0!==n||(this.currentPagePr=r,this.updateControls()),this.rPosX=n,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_SCROLL,this,{scroll:n,scrollDirection:this.scrollDirection,internalControll:this.internalControll})),r}},{key:"gotoNext",value:function(){var e=this.currentPage(),t=this.nextPagePart>=.5&&!this.renderingX?e:e+1;this.gotoPageByIndex(t)}},{key:"gotoPrev",value:function(){var e=this.currentPage(),t=0!==this.nextPagePart&&this.nextPagePart<=.5&&!this.renderingX?e:e-1;this.gotoPageByIndex(t)}},{key:"gotoPageByIndex",value:function(e,t){var i=this.pages;this.internalControll=!1,e=Math.min(e,i-1);var n=(e=Math.max(e,0))*this.width;t?this.scrollLeft=n:this.scrollLeftAnime=n,this.currentPageIndex=e,this.updateControls(e)}},{key:"scrollLeftAnime",set:function(e){var t=this;this.accelX=Math.max(e,0),this.accelX=Math.min(e,this.scrollWidth-this.width);var i=this.view.scrollLeft,n=0,s=.05+.05*Math.abs(this.accelX-i)/1e3;s=Math.min(.9,s),this.renderingX=!0,this.internalControll=!1,this.scrollAnimInterval||(this.scrollAnimInterval=setInterval((function(){n=(t.accelX-i)*s,i+=n,t.view.scrollLeft=i,Math.abs(i-t.accelX)<=1&&(t.view.scrollLeft=t.accelX,t.renderingX=!1,t.updateControls(),clearInterval(t.scrollAnimInterval),t.scrollAnimInterval=void 0)}),17))}},{key:"scrollHandler",value:function(){var e=this;return this.scrHandler=function(){e.internalControll&&(clearInterval(e.scrollAnimInterval),e.scrollAnimInterval=void 0),e.currentPage()},this.scrHandler}},{key:"scrollLeft",get:function(){return this.view.scrollLeft},set:function(e){this.scrollAnimInterval&&(clearInterval(this.scrollAnimInterval),this.scrollAnimInterval=void 0),this.view.scrollLeft=e}},{key:"maxScrollLeft",get:function(){return this.scrollWidth-this.width}},{key:"startDrag",value:function(){var t,i,n,s,o,a,r=this,l=0,h=0,c=0;function d(e){var d;if(e.touches?(o=e.touches[0].pageX,a=e.touches[0].pageY):(o=e.pageX,a=e.pageY),void 0===s&&(a===i?s=!1:(d=180*Math.atan2(Math.abs(a-i),Math.abs(o-t))/Math.PI,s=d>45)),s)r.dragging=!0;else{e.preventDefault();var u=t-o;Math.abs(u)>4&&(r.dragging=!0),r.view.scrollLeft=n+u,c=r.view.scrollLeft,l=1*(c-h)}}function u(){w.isTouchDevice&&(document.removeEventListener("touchmove",d,w.passiveListener),document.removeEventListener("touchend",u,w.passiveListener)),document.removeEventListener("mousemove",d,!1),document.removeEventListener("mouseup",u,!1),r.dragging=!1,r.config.scrh_smooth_dragin&&0!==l?(r.scrollAnimInterval=setInterval((function(){l*=.75,r.view.scrollLeft+=l,r.accelX=r.view.scrollLeft,r.renderingX=!0,Math.abs(l)<.1&&(r.renderingX=!1,clearInterval(r.scrollAnimInterval),r.updateControls(),r.scrollAnimInterval=void 0)}),17),r.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_ACTION,r,{dragging:!1}))):(r.renderingX=!1,r.updateControls(),r.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.SCR_ACTION,r,{dragging:!1})))}return function(e){var o,a;clearInterval(r.scrollAnimInterval),r.scrollAnimInterval=void 0,l=0,s=void 0,e.touches?(o=e.touches[0].pageX,a=e.touches[0].pageY):(o=e.pageX,a=e.pageY),t=o,i=a,n=r.view.scrollLeft,h=r.view.scrollLeft,w.isTouchDevice&&(document.addEventListener("touchmove",d,w.passiveListener),document.addEventListener("touchend",u,w.passiveListener)),document.addEventListener("mousemove",d,!1),document.addEventListener("mouseup",u,!1)}}},{key:"resizeHandler",value:function(){if(this.viewWidth!==this.width){clearInterval(this.scrollAnimInterval),this.scrollAnimInterval=void 0;var e=this.pages;this.viewWidth=this.width;var t=(this.currentPageIndex+1)/e;this.calculateScroll();var i=Math.round(t*e)-1;this.gotoPageByIndex(0===this.currentPageIndex?0:i)}}},{key:"remove",value:function(){clearInterval(this.scrollAnimInterval),this.view.removeEventListener("wheel",this.scrHandler,!1),this.view.removeEventListener("scroll",this.scrHandler),this.view.removeEventListener("mouseup",this.msHandler,!1),this.view.removeEventListener("touchstart",this.msHandler,!1),this.view.removeEventListener("touchend",this.msHandler,!1)}}])&&z(t.prototype,i),n&&z(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();var H=i(6378),G=i.n(H),R={};function F(e){return F="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},F(e)}function D(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function Y(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,q(n.key),n)}}function X(e,t,i){return t&&Y(e.prototype,t),i&&Y(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function q(e){var t=function(e){if("object"!=F(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=F(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==F(t)?t:t+""}R.styleTagTransform=u(),R.setAttributes=l(),R.insert=a().bind(null,"head"),R.domAPI=s(),R.insertStyleElement=c(),t()(G(),R),G()&&G().locals&&G().locals;var j=w.trace,U=function(){function e(t,i,n){D(this,e),this.config=e.CONFIG,Object.assign(this.config,t),this.context=n,this.appSet=i,this.view=document.createElement("div"),this.view.classList.add("".concat(e.classPref,"simple-border")),this.view.style.padding="".concat(this.config.thumb_spasing/2,"px"),this.wrap_main=document.createElement("div"),this.wrap_main.className="".concat(e.classPref,"main-wrap"),this.view.appendChild(this.wrap_main),this.wrap_item=document.createElement("div"),this.wrap_item.className="".concat(e.classPref,"item-wrap"),this.wrap_main.appendChild(this.wrap_item),this.hover=document.createElement("div"),this.hover.className="".concat(e.classPref,"item-hover"),this.inner=document.createElement("div"),this.inner.className="".concat(e.classPref,"item-inner"),this.imgCompleted=!1,this.isSelect=!1,this.opacityDelay=void 0,this.displayPr=void 0,this.opacityPr=0,this.inited=!1}return X(e,[{key:"init",value:function(e){if(!this.inited){this.item=e;var t=this;this.type=e.type;var i=void 0;e.itemViewThumbSrc||e.itemViewSrc||e.poster||e.thumb?(this.img=new Image,this.config.thumb_loading_lazy&&this.img.setAttribute("loading","lazy"),this.img.onload=function(){e.title&&this.setAttribute("alt",e.title),t.imgCompleted=!0,t.view.style.opacity=t.opacityPr},this.img.onerror=function(){t.view.classList.add("pgc-rev-error"),e.errorStatus=!0},this.wrap_item.appendChild(this.img),e.itemViewThumbSrc?(this.img.style.width="".concat(e.itemViewThumbSize.width,"px"),this.img.style.height="".concat(e.itemViewThumbSize.height,"px"),i=e.itemViewThumbSrc):e.poster?(this.img.style.width="".concat(e.poster.thumbnail.width,"px"),this.img.style.height="".concat(e.poster.thumbnail.height,"px"),i=e.poster.thumbnail.url):e.thumb&&e.thumb.width>=150&&(this.img.style.width="".concat(e.thumb.width,"px"),this.img.style.height="".concat(e.thumb.height,"px"),i=e.thumb.src),i&&(this.img.src=i)):this.view.style.opacity=this.opacityPr,this.wrap_item.appendChild(this.hover),this.wrap_item.appendChild(this.inner),this.initSubContent(),this.initInteractive(),this.inited=!0}}},{key:"initSubContent",value:function(){this.type=this.item.type;var t=this.item;if("video"===this.type)if(t.mime_type);else if(!t.poster&&(!t.thumb||t.thumb&&t.thumb.width<150)){this.videoContent=w.mediaEl("video"),this.imgSubstitute=!0,this.videoContent.className="".concat(e.classPref,"video-content");var i=t.original;t.poster&&t.poster.medium?this.videoContent.setAttribute("poster",t.poster.medium.url):w.Device.browser.safari&&w.isTouchDevice&&(i+="#t=0.001"),this.videoContent.src=i,this.wrap_item.insertBefore(this.videoContent,this.wrap_item.firstChild)}this.hover.classList.add("".concat(e.classPref,"hover")),this.hover.style.backgroundColor=this.config.thumb_hover_color}},{key:"initInteractive",value:function(){var t=this;function i(e){switch(e.type){case"mouseenter":this.classList.add("hover"),t.hoverAnim(!0);break;case"mouseleave":!1===t.isSelect&&t.hoverAnim(!1),this.classList.remove("hover")}}this.view.addEventListener("click",(function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENT.THUMB_ACTION,t,{index:t.index}))})),this.view.addEventListener("mouseenter",i,!1),this.view.addEventListener("mouseleave",i,!1)}},{key:"updateSize",value:function(e){var t=Math.round(e*this.config.thumb_coverHieghtRation);this.thumbSize=w.Size(e,t),this.view.style.width="".concat(this.thumbSize.width,"px"),this.view.style.height="".concat(this.thumbSize.height,"px")}},{key:"x",set:function(e){this.view.style.left="".concat(e,"px")}},{key:"y",set:function(e){this.view.style.top="".concat(e,"px")}},{key:"hoverAnim",value:function(e){this.inner.style.border=e?"solid 2px ".concat(this.config.thumb_border_color):null}},{key:"select",set:function(e){e?(this.view.classList.add("pgc-select"),this.hoverAnim(!0)):(this.view.classList.remove("pgc-select"),this.hoverAnim(!1)),this.isSelect=e}},{key:"visibility",set:function(e){this.view.style.visibility=e}},{key:"display",get:function(){return this.displayPr},set:function(e){"none"===e&&clearTimeout(this.opacityDelay),this.view.style.display=e,this.displayPr=e}},{key:"opacity",set:function(e){var t=this;e.delay?this.opacityDelay=setTimeout((function(){(t.imgCompleted||t.imgSubstitute)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity}),e.delay):(clearTimeout(this.opacityDelay),(t.imgCompleted||t.imgSubstitute)&&(t.view.style.opacity=e.opacity),t.opacityPr=e.opacity)}}],[{key:"EVENT",get:function(){return{THUMB_ACTION:"THUMB_ACTION"}}},{key:"classPref",get:function(){return"pgc-rev-scroll-bar-thumb-"}},{key:"CONFIG",get:function(){return{thumb_spasing:10,thumb_coverHieghtRation:1,thumb_loading_lazy:!1,thumb_border_color:"white",thumb_hover_color:"rgba(0,0,0,0.5)"}}}])}();const W=function(){function e(t,i,n){D(this,e),this.context="ItemsScrollBarPagination",this.config=e.CONFIG,w.copyProperties(i,this.config),this.appName=t.appName,this.appSet=t,this.thumbsList=[],this.presentedList=[],this.thumbSize=w.Size(Math.round(this.config.isb_height/this.config.isb_thum_ration),this.config.isb_height),this.activatedPages={},this.maxWidth=0,this.width=1,this.scrollLeft=0,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.sliderContent=document.createElement("div"),this.sliderContent.className="".concat(e.classPref,"slider-content-view");var s=V.CONFIG;s.scrh_dragin=!0,s.scrh_block_pan_y=this.config.isb_block_pan_y,this.scroller=new V(this.appSet,s,{}),this.appSet.appEventManager.addGMEventListener(V.EVENTS.SCR_SCROLL,this,"scrollHandler"),this.view.appendChild(this.scroller.view),this.activIndex=void 0,this.activAudioIndex=void 0,n&&w.setStyleForElFomObj(this.view,n),this.appSet.appEventManager.addGMEventListener(U.EVENT.THUMB_ACTION,this,"thumbActionHandler")}return X(e,[{key:"initByItemslist",value:function(e){this.itemsList=e;var t=U.CONFIG;t.thumb_coverHieghtRation=this.config.isb_thum_ration,t.thumb_loading_lazy=!0,t.thumb_spasing=4,t.thumb_border_color=this.config.isb_itemBgColor;for(var i=0;i<e.length;i+=1){var n=e[i],s=new U(t,this.appSet,this.context);s.index=i,s.init(n),this.thumbsList.push(s)}this.sliderContent.style.width="".concat(this.thumbsList.length*this.thumbSize.width,"px"),this.sliderContent.style.height="".concat(this.thumbSize.height,"px"),this.scroller.initByScrollView(this.sliderContent)}},{key:"scrollHandler",value:function(e){if(e.target===this.scroller){var t=e.params,i=t.scroll,n=t.scrollDirection;this.scrollLeft=i,this.addPage(Math.ceil(this.scrollLeft/this.width)-(n<0?1:0))}}},{key:"thumbActionHandler",value:function(t){if(t.target.context===this.context){var i=t.params.index;this.scroller.draging||void 0===i||this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,{action:"click",index:parseInt(i)}))}}},{key:"addPage",value:function(e){if(!this.activatedPages["".concat(e)]){for(var t=Math.min(e*this.itemsOnPage+this.itemsOnPage,this.thumbsList.length),i=Math.max(t-this.itemsOnPage,0);i<t;i+=1){var n=this.thumbsList[i];n.updateSize(this.thumbSize.width),n.x=i*this.thumbSize.width,n.y=0,n.display="block",n.opacity={opacity:1},this.presentedList[i]=n,this.sliderContent.appendChild(n.view)}this.activatedPages["".concat(e)]=!0}}},{key:"selectThumbsByIndexes",value:function(e){if(0!==this.thumbsList.length){if(void 0!==this.activIndexes)for(var t=0;t<this.activIndexes.length;t+=1)this.thumbsList[this.activIndexes[t]]&&(this.thumbsList[this.activIndexes[t]].select=!1);for(var i=0;i<e.length;i+=1)this.thumbsList[e[i]]&&(this.thumbsList[e[i]].select=!0);this.activIndexes=e;var n=this.pageByItemIndex(e[0]),s=this.pageByItemIndex(e[e.length-1]),o=e[0]*this.thumbSize.width+e.length*this.thumbSize.width/2-this.width/2;this.scroller.scrollLeftAnime=o,this.addPage(n),this.addPage(s)}}},{key:"selectThumbByIndex",value:function(e){if(0!==this.thumbsList.length){void 0!==this.activIndex&&(this.thumbsList[this.activIndex].select=!1),this.thumbsList[e].select=!0;var t=this.pageByItemIndex(e),i=e*this.thumbSize.width,n=Math.ceil(this.scrollLeft/this.thumbSize.width),s=Math.floor((this.scrollLeft+this.width-this.thumbSize.width)/this.thumbSize.width);if(e<n||e>s){var o;i<this.scrollLeft?o=i:i+this.thumbSize.width-this.width>0&&(o=i+this.thumbSize.width-this.width);var a=Math.ceil(o/this.thumbSize.width),r=Math.floor((o+this.width-this.thumbSize.width)/this.thumbSize.width),l=this.pageByItemIndex(a);l!==t&&this.addPage(l);var h=this.pageByItemIndex(r);h!==t&&this.addPage(h),Math.abs(this.scrollLeft-o)>this.width?this.scroller.scrollLeft=o:this.scroller.scrollLeftAnime=o}this.addPage(t),this.activIndex=e}}},{key:"size",set:function(e){var t=Math.floor(e.width/this.thumbSize.width);if(this.view.style.maxWidth="".concat(t*this.thumbSize.width,"px"),this.itemsOnPage!==t){if(this.itemsOnPage=t,this.width=Math.min(this.itemsOnPage,this.thumbsList.length)*this.thumbSize.width,this.view.style.width="".concat(this.width,"px"),this.view.style.maxWidth=null,this.activatedPages={},this.maxWidth=e.width,void 0!==this.activIndexes&&this.activIndexes.length){var i=this.activIndexes,n=this.pageByItemIndex(i[0]),s=this.pageByItemIndex(i[i.length-1]);this.addPage(n),this.addPage(s)}void 0!==this.activIndex&&this.addPage(this.pageByItemIndex(this.activIndex))}}},{key:"pageByItemIndex",value:function(e){return Math.floor(e/this.itemsOnPage)}},{key:"resizeHandler",value:function(){this.updateView()}},{key:"updateView",value:function(){j("Update View")}},{key:"prepareToRemove",value:function(){this.appSet.appEventManager.removeGMEventListener(V.EVENTS.SCR_ACTION,this,"scrollHandler"),this.scroller.remove(),this.appSet.appEventManager.removeGMEventListener(U.EVENT.THUMB_ACTION,this,"thumbActionHandler")}}],[{key:"classPref",get:function(){return"pgc-rev-scroll-bar-"}},{key:"CONFIG",get:function(){return{isb_itemBgColor:"rgba(255,255,255,0.6)",isb_height:50,isb_thum_ration:.85,isb_block_pan_y:!1}}},{key:"EVENTS",get:function(){return{ITEMS_SCROLL_BAR_ITEM_ACTION:"ITEMS_SCROLL_BAR_ITEM_ACTION"}}}])}();var Z=i(7625),K=i.n(Z),$={};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 Q(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ee(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ie(n.key),n)}}function te(e,t,i){return t&&ee(e.prototype,t),i&&ee(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function ie(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+""}$.styleTagTransform=u(),$.setAttributes=l(),$.insert=a().bind(null,"head"),$.domAPI=s(),$.insertStyleElement=c(),t()(K(),$),K()&&K().locals&&K().locals;var ne=w.trace,se=function(){return te((function e(t){Q(this,e);var i=document.createElement("div"),n=document.createElement("div");n.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,n.appendChild(s),t.price||t.meta&&t.meta.price){var o=document.createElement("div"),a=document.createElement("div");a.className="".concat(e.classPref,"price"),a.innerHTML=t.price||t.meta.price,o.appendChild(a),n.appendChild(o)}return i.appendChild(n),i}),null,[{key:"classPref",get:function(){return"pgc-rev-slider-post-informer-"}}])}(),oe=te((function e(t){Q(this,e);var i=document.createElement("div"),n=document.createElement("div");return n.className="icon-holder",n.innerHTML=t,i.appendChild(n),i})),ae=function(){function e(t){Q(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 te(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 oe(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 se(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 se(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 n=i.width*(t||1),s=i.height*(t||1),o=i.x*(t||1),a=i.y*(t||1);this.boundingBox={left:n>this.size.width?-o:(this.size.width-this.size.width*t)/2,top:s>this.size.height?-a:(this.size.height-this.size.height*t)/2,right:n>this.size.width?this.size.width-(o+n):(this.size.width-this.size.width*t)/2,bottom:s>this.size.height?this.size.height-(a+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,n=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,s=n+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>n&&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,n=t.y-this.viewTranslate.y,s=i/this.scale,o=n/this.scale,a=t.x-s*e,r=t.y-o*e,l=w.Point(a,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 n=e/this.startDistForZoom,s=0;(i=this.startDistForZoom/this.startScale*n/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(s=.8*-(i-this.MaxScale)),i+=s;var o=this.startGlobalPoint.x-this.startTranslate.x,a=this.startGlobalPoint.y-this.startTranslate.y,r=o/this.newScale,l=a/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 n=0,s=0,o=0,a=.05,r=.22;i.animaSliderRender=w.requestAnimationFrame((function l(){n=n*a+(e.x-i.viewTranslate.x)*r,s=s*a+(e.y-i.viewTranslate.y)*r,t&&(o=o*a+(t-i.scale)*r);var h=i.viewTranslate.x;h+=n;var c=i.viewTranslate.y;c+=s,t&&(i.scale+=o),i.viewTranslate=w.Point(h,c),Math.abs(n)<.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 n(){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 a=s<e.boundingBox.right?e.boundingBox.right:s;s=s>e.boundingBox.left?e.boundingBox.left:a,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(n)}))}},{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,n=0;e.animaSliderRender=w.requestAnimationFrame((function s(){i=.2*i+.15*(t.x-e.viewTranslate.x),n=.2*n+.15*(t.y-e.viewTranslate.y);var o=e.viewTranslate.x+i,a=e.viewTranslate.y+n;e.viewTranslate=w.Point(o,a),Math.abs(i)<.02&&Math.abs(n)<.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,n=this.checkOffset(w.Point(t,i),this.newScale);return this.isBlockDraging=n.x!==t||n.y!==i,t-=.7*(t-n.x),i-=.7*(i-n.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,n=this.delegate,s=this;switch(n.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 a=document.getElementsByTagName("script")[0];a.parentNode.insertBefore(o,a)}if(this.subContentHolder.innerHTML='<div id="'+i+'" data-id="sgb-video-player" data-gallery="'+n.appName+'" ></div>',window.YT){var r=window.YT,l={autoplay:1,frameborder:0,playlist:i,loop:n.config.sl_video_loop?1:0,rel:0};n.config.sl_video_loop||(delete l.playlist,delete l.loop);var h=new r.Player(i,{videoId:i,playerVars:l,events:{onReady:function(){n.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&n.setVideoPlayer(h,"yt",s),n.onYtStatusChange(e.data)}}});n.setVideoPlayer(h,"yt",s)}else window.onYouTubeIframeAPIReady=function(){var e=window.YT,t={autoplay:1,frameborder:0,playlist:i,loop:n.config.sl_video_loop?1:0,rel:0};n.config.sl_video_loop||(delete t.playlist,delete t.loop);var o=new e.Player(i,{videoId:i,playerVars:t,events:{onReady:function(){n.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&n.setVideoPlayer(o,"yt",s),n.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",n.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);n.config.sl_video_loop&&e.setLoop(!0),e.on("play",(function(e){n.onYtStatusChange("onReady")})),e.on("ended",(function(e){n.onYtStatusChange(0)})),e.on("play",(function(t){n.onYtStatusChange(1),n.setVideoPlayer(e,"vimeo",s)}))}}}else if(window.Vimeo){var m=new Vimeo.Player(c);n.config.sl_video_loop&&m.setLoop(!0),m.on("play",(function(e){n.onYtStatusChange("onReady")})),m.on("ended",(function(e){n.onYtStatusChange(0)})),m.on("play",(function(e){n.onYtStatusChange(1),n.setVideoPlayer(m,"vimeo",s)}))}}this.isEmbedContent=!0}}},{key:"removeEmbedVideoContent",value:function(){this.isEmbedContent&&(this.subContentHolder.innerHTML=new oe(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-"}}])}(),re=function(){function e(t,i){Q(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 n=document.createElement("div");n.className="".concat(e.classPref,"bg"),this.config.sl_backgroundColor&&(this.background=n,this.background.style.backgroundColor=this.config.sl_backgroundColor,this.view.appendChild(n)),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 te(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(n){if(!w.Device.ios||"mouseup"!==n.type){var s,o;n.changedTouches&&n.changedTouches[0]?(s=n.changedTouches[0].pageX,o=n.changedTouches[0].pageY):(s=n.pageX,o=n.pageY),s-=i.viewOfsetX,o-=i.viewOfsetY;var a=i.itemsList[i.itemIndex];if(a.webView&&a.webView===n.target||n.target.className&&"pgc-rev-slider-page-sub-content-holder"===n.target.className||n.target.className&&("lb-video-content"===n.target.className||"lb-audio-content"===n.target.className)){n.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=a.user&&a.user.displayname?"Hey, this photo is ©".concat(a.user.displayname):i.config.sl_copyR_Alert,a.copyright&&""!==a.copyright&&(r.innerHTML=a.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 n=this;if(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,!i)return void n.createLayout();this.createlayoutDelay=setTimeout((function(){n.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 ae(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,n=5*t.speedY;t.animaSliderRender=w.requestAnimationFrame((function s(){i=.2*i+.15*(e.x-t.scrollViewTranslateX),n=.2*n+.15*(e.y-t.scrollViewTranslateY),t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=n,Math.abs(i)<1&&Math.abs(n)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(n)<.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 n=i-1>=0?i-1:2,s=i+1<3?i+1:0,o=[n,i,s],a=[e-1,e,e+1];for(t=0;t<o.length;t+=1)this.sliderPages[o[t]].posX=a[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[n].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){ne(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){ne(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){ne(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(),n=[],s=[],o=400,a=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===n.length&&n.push(c),c-n[0]<o?(s.length>0&&s[s.length-1]!==h&&(a+=1),s.push(h),n.push(c)):(o=a>3?1100:500,s=[],n=[],a=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,n;if(e.changedTouches&&e.changedTouches[0]?(i=e.changedTouches[0].pageX,n=e.changedTouches[0].pageY):(i=e.pageX,n=e.pageY),i-=this.viewOfsetX,n-=this.viewOfsetY,this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(w.Point(i,n));this.firsrTap=setTimeout((function(){t.firsrTap=void 0,t.firstClick(w.Point(i,n))}),400)}}},{key:"startDrag",value:function(){var t,i,n,s,o,a,r,l,h,c=this,d=c.viewOfsetY,u=c.viewOfsetX,m=0,v=0,g=0;function p(e){var t,l,h,p,f;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,p=e.touches[1].pageY,f=Math.hypot(t-h,l-p),t+=(h-t)/2,l+=(p-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 y,b;if(void 0===a&&(l===n?a=!1:(y=180*Math.atan2(Math.abs(l-n),Math.abs(t-i))/Math.PI,a=y>45)),!c.dragging&&c.zoomingPage){e.preventDefault();var S=Math.abs(i-t)>4?i-t:0,E=Math.abs(n-l)>4?n-l:0;return(S||E)&&(c.zoomingDrag=!0),void(r?c.pageInFocus.zoomByScaleDeltaToPoint(f,w.Point(S,E),w.Point(t,l)):c.zoomingPage&&c.zoomingPage.dragin(w.Point(S,E)))}a?(m=0,(b=Math.abs(n-l)>4?n-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,v=g,g=c.scrollViewTranslateX,m=g-v)}}function f(e){if(a=void 0,w.isTouchDevice&&(document.removeEventListener("touchmove",p,w.passiveListener),document.removeEventListener("touchend",f,w.passiveListener)),document.removeEventListener("mousemove",p,!1),document.removeEventListener("mouseup",f,!1),document.removeEventListener("contextmenu",f,!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,n=w.isTouchDevice?7:1;Math.abs(m)>n&&t===c.currentItemIndex&&(i=m>0?i-1:i+1),c.speedX=m,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(a){var y,b,S,E;"mousedown"===a.type&&"touchend"===h||(c.zoomingPage=c.pageInFocus.isInScale?c.pageInFocus:void 0,w.cancelAnimationFrame(c.animaSliderRender),t=c.currentItemIndex,a.originalEvent&&(a=a.originalEvent),w.isTouchDevice||a.preventDefault(),a.button&&0!==a.button||(a.touches?!c.dragging&&a.touches.length>1?c.config.sl_zoom&&(r=!0,y=a.touches[0].pageX,b=a.touches[0].pageY,S=a.touches[1].pageX,E=a.touches[1].pageY,l=Math.hypot(y-S,b-E),y+=(S-y)/2,b+=(E-b)/2,c.zoomingPage=c.pageInFocus,c.needHideControlls=c.isControllsShow,c.showControlls(!1)):(y=a.touches[0].pageX,b=a.touches[0].pageY):(y=a.pageX,b=a.pageY),y-=u,b-=d,c.speedX=0,c.speedY=0,m=0,v=0,g=c.scrollViewTranslateX,i=y,n=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,n),l),w.isTouchDevice&&(document.addEventListener("touchmove",p,w.passiveListener),document.addEventListener("touchend",f,w.passiveListener)),document.addEventListener("mousemove",p,!1),document.addEventListener("mouseup",f,!1),document.addEventListener("contextmenu",f,!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 n(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(){n(this)},this.prevButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),w.Device.desktop||n(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(){n(this)},this.nextButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),w.Device.desktop||n(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}}}])}(),le=i(9966),he=i.n(le),ce={};function de(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function ue(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?de(Object(i),!0).forEach((function(t){me(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):de(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function me(e,t,i){return(t=ye(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ve(e){return ve="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},ve(e)}function ge(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function pe(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ye(n.key),n)}}function fe(e,t,i){return t&&pe(e.prototype,t),i&&pe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function ye(e){var t=function(e){if("object"!=ve(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=ve(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ve(t)?t:t+""}ce.styleTagTransform=u(),ce.setAttributes=l(),ce.insert=a().bind(null,"head"),ce.domAPI=s(),ce.insertStyleElement=c(),t()(he(),ce),he()&&he().locals&&he().locals;var be=function(){function e(t,i){ge(this,e),this.delegate=t,this.appSet=this.delegate.appSet,this.appName=t.appName,this.config=e.CONFIG,w.copyProperties(i,this.config);var n='<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=n,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 fe(e,[{key:"drawProgress",value:function(t){if(!isNaN(t)){t=e.clamp(parseFloat(t),0,1);var i=e.clamp(360*t,0,359.99999),n=i*Math.PI/180,s=51*Math.sin(n),o=-51*Math.cos(n),a=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+a," 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(){var t=this;w.Device.desktop||(this.view.style.display="block"),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),w.Device.desktop||(this.view.style.display="none"),this.view.style.opacity=0,this.status="stop",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.PLAY,this,{status:this.status}))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-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))}}])}();const we=function(){function e(t,i){var n=this;ge(this,e),this.appSet=t,this.config=e.CONFIG,w.copyProperties(i,this.config),this.appName=t.appName,this.headerFooterStatus=void 0,this.headerStatus=void 0,this.mouseMovingTimer=void 0,this.resizeDelay=void 0,this.size=w.Size(0,0),this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.id="".concat(this.appName,"_lightbox"),this.view.dataset.galleryId=this.appName,w.Device.desktop||(this.view.style.height="100%"),this.styleSheet=document.createElement("style"),this.styleSheet.id="style_lb_".concat(this.appName),this.view.appendChild(this.styleSheet),this.updateStyleSheet();var s=document.createElement("div");s.className="".concat(e.classPref,"bg"),this.background=s,this.backgroundOpacity=1,this.background.style.backgroundColor=this.config.lb_backgroundColor,this.view.appendChild(s),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content");var o=re.CONFIG;o.sl_backgroundColor=!1,o.sl_preloaderColor=this.config.lb_preloaderColor,o.sl_FullSizeViewMode=this.config.lb_FullSizeViewMode,o.sl_navigationColor=this.config.lb_sliderNavigationColor,o.sl_navigationIconColor=this.config.lb_sliderNavigationIconColor,o.sl_navigationColorOver=this.config.lb_sliderNavigationColorOver,o.sl_navigationIconColorOver=this.config.lb_sliderNavigationIconColorOver,o.sl_fit=!0;var a=this.config.lb_thumbBarEnable?60:this.config.lb_headerFooterHeight;o.sl_yOffset=w.miniScreen?0:a,o.sl_canRemoved=!0,o.sl_copyR_Alert=this.config.lb_copyR_Alert,o.sl_copyR_Proptection=this.config.lb_copyR_Proptection,o.sl_zoom=this.config.lb_zoom,o.sl_mouseWheel=this.config.lb_zoom,o.sl_audioPlayer=this.config.lb_audioPlayer,o.sl_mouseWheelPagination=this.config.lb_scrollNavi,o.sl_next_prev_animation=this.config.lb_sliderNextPrevAnimation,o.sl_video_auto_start=this.config.lb_videoAutoStart,o.sl_video_loop=this.config.lb_videoLoop,this.appSet.appEventManager.addGMEventListener(re.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.addGMEventListener(re.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.addGMEventListener(re.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.addGMEventListener(be.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.addGMEventListener(be.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.addGMEventListener(W.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new re(this.appSet,o),this.slider.initByStage(this.content,!1),this.slider.mouseWheelMode=this.config.lb_zoom,this.view.appendChild(this.content),this.prevButton=document.createElement("div"),this.prevButton.className="".concat(e.classPref,"next-prev-button"),this.prevButton.classList.add("prev"),this.prevButton.innerHTML=w.ICONS.PREV_ARR,this.prevButton.onclick=function(){n.updateViewControls({params:{draging:!0}}),n.slider.gotoPrev()},this.view.appendChild(this.prevButton),this.nextButton=document.createElement("div"),this.nextButton.className="".concat(e.classPref,"next-prev-button"),this.nextButton.classList.add("next"),this.nextButton.innerHTML=w.ICONS.NEXT_ARR,this.nextButton.onclick=function(){n.updateViewControls({params:{draging:!0}}),n.slider.gotoNext()},this.view.appendChild(this.nextButton),this.header=document.createElement("div"),this.header.className="".concat(e.classPref,"header"),this.header.style.backgroundImage="linear-gradient(0deg,rgba(0,0,0,0),".concat(this.config.lb_headerFooterColor,")"),e.isMobileMode&&this.header.classList.add("".concat(e.classPref,"touch-device")),this.view.appendChild(this.header),this.footer=document.createElement("div"),this.footer.className="".concat(e.classPref,"footer"),this.footer.style.minHeight="".concat(a,"px"),e.isMobileMode&&this.footer.classList.add("".concat(e.classPref,"touch-device")),w.miniScreen&&(this.footer.style.backgroundImage="linear-gradient(0deg,".concat(this.config.lb_headerFooterColor,",rgba(0,0,0,0))")),this.view.appendChild(this.footer),this.infoBar1=document.createElement("div"),this.infoBar1.className="".concat(e.classPref,"info-wrap"),this.header.appendChild(this.infoBar1),this.config.lb_itemTitleEnable&&(this.itemTitle=document.createElement("div"),this.itemTitle.className="".concat(e.classPref,"item-title"),this.itemTitle.style.fontSize=e.isMobileMode?"".concat(16,"px"):"".concat(this.config.lb_itemTitleFontSize,"px"),e.isMobileMode&&(this.itemTitle.style.lineHeight="".concat(16,"px"),this.itemTitle.style.transform="translateY(6px)"),this.itemTitle.style.color=this.config.lb_itemTitleTextColor,this.infoBar1.appendChild(this.itemTitle));var r=document.createElement("div");r.className=this.config.lb_itemTitleEnable?"".concat(e.classPref,"caption-wrap"):"".concat(e.classPref,"caption-wrap-nt"),r.classList.add("mini-screen"),r.style.color=this.config.lb_itemCounterColor,!this.config.lb_thumbBarEnable&&e.isMobileMode,this.item_current_info=document.createElement("div"),this.item_current_info.className="".concat(e.classPref,"caption-current"),r.appendChild(this.item_current_info);var l=document.createElement("div");l.className="".concat(e.classPref,"caption-delimiter"),l.style.opacity=.7,this.config.lb_itemTitleEnable?l.textContent="/":l.style.backgroundColor=this.config.lb_itemCounterColor,r.appendChild(l),this.items_amount_info=document.createElement("div"),this.items_amount_info.className="".concat(e.classPref,"caption-all"),r.appendChild(this.items_amount_info),!1===this.config.lb_itemCounterEnable&&(r.style.display="none"),this.counter=r;var h=document.createElement("div");if(h.className="".concat(e.classPref,"caption-play-wrap"),h.appendChild(r),this.infoBar1.appendChild(h),this.config.lb_thumbBarEnable){var c=W.CONFIG;c.isb_itemBgColor=this.config.lb_thumbBarHoverColor,c.isb_block_pan_y=!0,this.thumbsBar=new W(this.appSet,c),this.footer.appendChild(this.thumbsBar.view),e.isMobileMode&&this.footer.appendChild(h)}else this.footer.appendChild(h);if(this.config.lb_slideshowEneble){var d=be.CONFIG;d.ap_autoPlayBgColor=this.config.lb_slideshowIndicatorColorBg,d.ap_autoPlayColor=this.config.lb_slideshowIndicatorColor,d.ap_slideshowDelay=this.config.lb_slideshowTimer,this.autoPlay=new be(this,d),h.appendChild(this.autoPlay.view)}var u=document.createElement("div");e.isMobileMode&&(u.style.width="100%"),u.className="".concat(e.classPref,"free-space"),this.header.appendChild(u),this.itemMenuWrap=document.createElement("div"),this.itemMenuWrap.className="".concat(e.classPref,"item-menu-wrap"),this.header.appendChild(this.itemMenuWrap);var m=M.CONFIG;m.im_link=!0,m.im_play=this.config.lb_slideshowEneble,m.im_zoom=w.Device.desktop&&this.config.lb_zoom,m.im_discuss=this.config.lb_discuss,m.im_info=this.config.lb_itemInfoEnable,m.im_share=this.config.lb_itemShare,m.im_download=this.config.lb_itemDownload,m.im_bookmark=this.config.lb_bookmark,m.im_like=this.config.lb_itemLike,m.im_close=!0,m.im_fulscreen=!w.Device.ios&&this.config.lb_fullscreen,m.im_backgroundColor=this.config.lb_menuBackgroundColor,m.im_backgroundColorOver=this.config.lb_menuBackgroundColorOver,m.im_iconColor=this.config.lb_menuIconColor,m.im_iconColorOver=this.config.lb_menuIconColorOver,m.im_likesSet=this.config.lb_likesSet,m.im_isContainIdInBookmarkSet=this.config.lb_isContainIdInBookmarkSet,this.itemMenu=new M(this.appSet,M.MENU_TYPE.LIGHTBOX,m),this.itemMenuWrap.appendChild(this.itemMenu.view),this.appSet.appEventManager.addGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return fe(e,[{key:"updateStyleSheet",value:function(){this.styleSheet.innerHTML='\n\t\tdiv[data-gallery-id="'.concat(this.appName,'"] .').concat(e.classPref,"next-prev-button{\n\t\t\tbackground-color:").concat(this.config.lb_sliderNavigationColor,";\n\t\t\tfill:").concat(this.config.lb_sliderNavigationIconColor,';\n\t\t}\n\t\tdiv[data-gallery-id="').concat(this.appName,'"] .').concat(e.classPref,"next-prev-button:hover{\n\t\t\tbackground-color:").concat(this.config.lb_sliderNavigationColorOver,";\n\t\t\tfill:").concat(this.config.lb_sliderNavigationIconColorOver,";\n\t\t}\n\t\t")}},{key:"itemMenuActionHandler",value:function(t){if(t.target===this.itemMenu){var i=t.params.item,n=t.params.type;if(i&&n){var s,o,a={};switch(a.item=i,n){case"info":a.type="info",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_NEED_MODAL,this,a)),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{action:"stop"}));break;case"link":i.link&&window.open(i.link,i.linkTarget?i.linkTarget:this.config.lb_linkTargetWindow);break;case"like":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"like",item:i})),this.itemMenu.updateForItem(i);break;case"bookmark":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"bookmark",item:i})),this.itemMenu.updateForItem(i);break;case"share":a.type="share",this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_NEED_MODAL,this,a)),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{action:"stop"}));break;case"zoom":"function"==typeof this.sliderZoomSwitch&&this.sliderZoomSwitch();break;case"close":this.prepareToRemove();break;case"play":this.autoPlay&&this.itemsList.length>1&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.NEXT_SLIDE,this,{})),this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{})));break;case"download":s=i.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"coments":"open"===i.comment_status&&(s="".concat(i.sharelink,"/#comments"),window.open(s,"_self"));break;case"fullscreen":this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_FULLSCREEN_SWITCH,this,{}))}}}}},{key:"sliderZoomSwitch",value:function(){this.slider&&this.slider.remoteControl("zoom")}},{key:"slideShowSwitchHandler",value:function(e){if(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.itemMenu.playButtonStatus(e.params.status):this.autoPlay.switch()}},{key:"slideshowHandler",value:function(){this.slider&&(void 0===this.slider.ytStatus||0===this.slider.ytStatus)&&this.slider.gotoNext()}},{key:"scrollBarHandler",value:function(e){e.target===this.thumbsBar&&this.slider&&e.params&&e.params.action&&(e.params.index||0===e.params.index)&&"click"===e.params.action&&this.slider.gotoPageByNum(e.params.index)}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){switch(t.keyCode){case 37:e.slider.remoteControl("prev");break;case 39:case 9:t.stopPropagation(),t.preventDefault(),e.slider.remoteControl("next");break;case 32:w.preventDefault(t),e.slider.remoteControl("space");break;case 13:w.preventDefault(t),e.slider.remoteControl("enter")}},e.handlerKB}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=w.findHighestZIndex(i)+1,w.disableBodyScrollSlider(),document.addEventListener("keydown",t.keydownHandler(),!0),i.appendChild(this.view),setTimeout((function(){t.view.classList.add("".concat(e.classPref,"activate"))}),30)}},{key:"initByList",value:function(e,t){e&&e.length>0&&(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,this.thumbsBar&&this.thumbsBar.initByItemslist(this.itemsList),this.slider.initByList(this.itemsList,this.startItemIndex),this.resizeHandler())}},{key:"prepareToRemove",value:function(){var t=this;this.removing||(this.removing=!0,this.autoPlay&&this.autoPlay.clear(),this.slider.prepareToRemove(),this.thumbsBar&&this.thumbsBar.prepareToRemove(),this.view.removeChild(this.header),this.view.removeChild(this.content),this.view.removeChild(this.footer),this.view.removeChild(this.nextButton),this.view.removeChild(this.prevButton),this.background.classList.add("".concat(e.classPref,"deactivate")),this.background.style.opacity="0",document.removeEventListener("keydown",this.handlerKB,!0),document.getElementById("gmediaAudioPlayer")&&document.getElementById("gmediaAudioPlayer").pause(),this.appSet.appEventManager.removeGMEventListener(M.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.appSet.appEventManager.removeGMEventListener(re.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.removeGMEventListener(re.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.removeGMEventListener(re.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.removeGMEventListener(be.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.removeGMEventListener(be.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.removeGMEventListener(W.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),setTimeout((function(){w.enableBodyScrollSlider(),t.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_REMOVE_LIGHTBOX,t))}),300*this.backgroundOpacity))}},{key:"mouseMoveHandler",value:function(){var t=this;"hide"===this.headerFooterStatus?(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("".concat(e.classPref,"show")),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")),this.mouseMovingTimer=setTimeout((function(){t.header.classList.remove("".concat(e.classPref,"show")),t.slider&&t.slider.showHideNaviButton("hide"),t.headerStatus="hide"}),3e3)):(clearTimeout(this.mouseMovingTimer),"show"!==this.headerStatus&&(this.header.classList.add("".concat(e.classPref,"show")),this.headerStatus="show",this.slider&&this.slider.showHideNaviButton("show")))}},{key:"updateYTstatus",value:function(t){this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,ue(ue({},{type:"YTstatus"}),t.params))),this.slider&&this.config.lb_videoAutoStart&&this.config.lb_tryPlayNext&&t.params&&void 0!==t.params.status&&0===t.params.status&&this.slider.gotoNext()}},{key:"updateViewControls",value:function(t){var i=this;if(t.params.backgroundOpacity&&(this.background.style.opacity=t.params.backgroundOpacity,this.backgroundOpacity=t.params.backgroundOpacity),t.params.draging&&this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{action:"stop"})),t.params.zoom&&(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{action:"stop"})),"zoomIn"===t.params.zoom?this.view.classList.add("pgc-zoom-in"):this.view.classList.remove("pgc-zoom-in"),this.itemMenu&&this.itemMenu.zoomButtonStatus(t.params.zoom)),t.params.next&&("show"===t.params.next?this.view.classList.add("pgc-next-show"):this.view.classList.remove("pgc-next-show")),t.params.prev&&("show"===t.params.prev?this.view.classList.add("pgc-prev-show"):this.view.classList.remove("pgc-prev-show")),t.params.controls)switch(this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(be.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=t.params.controls,this.mouseMoveHandler(),t.params.controls){case"show":(w.miniScreen||this.backgroundOpacity<.9)&&this.header.classList.add("".concat(e.classPref,"show")),this.footer.classList.add("".concat(e.classPref,"show"));break;case"hide":(w.miniScreen||this.backgroundOpacity<.9)&&this.header.classList.remove("".concat(e.classPref,"show")),this.footer.classList.remove("".concat(e.classPref,"show"))}(t.params.itemIndex||0===t.params.itemIndex)&&(this.item_current_info.innerHTML=t.params.itemIndex+1,this.items_amount_info.innerHTML=this.itemsList.length,this.thumbsBar&&this.thumbsBar.selectThumbByIndex(t.params.itemIndex)),t.params.item&&(this.currentItem=t.params.item,this.appSet.appEventManager.dispatchGMEvent(w.GMEvent(e.EVENTS.LB_ITEM_ACTION,this,{type:"view",item:this.currentItem,itemIndex:t.params.itemIndex})),this.itemTitle&&(this.itemTitle.innerHTML=t.params.item[this.config.lb_itemTitleSrc]?t.params.item[this.config.lb_itemTitleSrc]:""),this.itemMenu&&this.itemMenu.updateForItem(t.params.item)),t.params.status&&"ready"===t.params.status&&(this.autoPlay&&this.itemsList.length>1&&(this.config.lb_slideshowAutoPlay||this.config.lb_sliderSlideshowAutoStart)&&!this.startItem&&this.autoPlay.start(),this.view.addEventListener("mousemove",(function(e){i.mouseMoveHandler(e)}),!1))}},{key:"resizeHandler",value:function(){if(this.view.clientWidth<360?(this.autoPlay&&(this.autoPlay.view.style.display="none"),this.descriptionWrap||this.thumbsBar):this.autoPlay&&(this.autoPlay.view.style.display=null),this.view.clientWidth<500?this.view.classList.add("pgc-mini-screen"):this.view.classList.remove("pgc-mini-screen"),this.itemMenu&&this.itemMenu.resizeHandler(),this.thumbsBar){var e=this.footer.clientWidth-10;this.thumbsBar.size=w.Size(e,0)}this.slider&&this.slider.resizeHandler(w.Size(this.view.clientWidth,this.view.clientHeight))}}],[{key:"classPref",get:function(){return"pgc-rev-lb-b-"}},{key:"EVENTS",get:function(){return{LB_NEED_MODAL:"LB_NEED_MODAL",LB_REMOVE_LIGHTBOX:"LB_REMOVE_LIGHTBOX",LB_FULLSCREEN_SWITCH:"LB_FULLSCREEN_SWITCH",LB_ITEM_ACTION:"LB_ITEM_ACTION"}}},{key:"CONFIG",get:function(){return{lb_FullSizeViewMode:!1,lb_scrollNavi:!1,lb_backgroundColor:"rgba(0,0,0,0.8)",lb_preloaderColor:"#494949",lb_headerFooterHeight:40,lb_headerFooterColor:"rgba(0,0,0,1)",lb_sliderNavigationColor:"rgba(0,0,0,0.8)",lb_sliderNavigationIconColor:"rgba(255,255,255,1)",lb_sliderNavigationColorOver:"rgba(255,255,255,1)",lb_sliderNavigationIconColorOver:"rgba(0,0,0,0)",lb_itemCounterEnable:!0,lb_itemCounterColor:"rgba(255,255,255,1)",lb_itemTitleEnable:!0,lb_itemTitleSrc:"title",lb_itemTitleFontSize:18,lb_itemTitleTextColor:"rgba(255,255,255,1)",lb_sliderNextPrevAnimation:!0,lb_thumbBarEnable:!0,lb_thumbBarHoverColor:"rgba(255,255,255,1)",lb_itemInfoEnable:!1,lb_itemLike:!1,lb_itemShare:!1,lb_itemDownload:!0,lb_zoom:!0,lb_discuss:!1,lb_fullscreen:!0,lb_bookmark:!1,lb_menuBackgroundColor:"rgb(0,0,0)",lb_menuBackgroundColorOver:"rgb(255,255,255)",lb_menuIconColor:"rgb(255,255,255)",lb_menuIconColorOver:"rgb(0,0,0)",lb_slideshowEneble:!0,lb_sliderSlideshowAutoStart:!1,lb_slideshowTimer:8,lb_slideshowAutoPlay:!1,lb_slideshowIndicatorColorBg:"rgba(255,255,255,0.7)",lb_slideshowIndicatorColor:"rgba(255,255,255,1)",lb_copyR_Alert:"Hello, this photo is mine!",lb_copyR_Proptection:!0,lb_audioPlayer:void 0,lb_likesSet:void 0,lb_isContainIdInBookmarkSet:void 0,lb_videoAutoStart:!1,lb_videoLoop:!1,lb_tryPlayNext:!1}}},{key:"isMobileMode",get:function(){return!(!w.isTouchDevice||w.isiPpad)}}])}();var Se=i(6550),Ee=i.n(Se),Ce={};function _e(e){return _e="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},_e(e)}function Le(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ie(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){Te(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 Te(e,t,i){return(t=ke(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Pe(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,ke(n.key),n)}}function ke(e){var t=function(e){if("object"!=_e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=_e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_e(t)?t:t+""}Ce.styleTagTransform=u(),Ce.setAttributes=l(),Ce.insert=a().bind(null,"head"),Ce.domAPI=s(),Ce.insertStyleElement=c(),t()(Ee(),Ce),Ee()&&Ee().locals&&Ee().locals,w.trace;var Me=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=Ie(Ie({},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 n=document.createElement("div");n.className="".concat(e.classPref,"bg"),n.dataset.type="bg",this.view.appendChild(n);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 a=document.createElement("div");a.title="Facebook",a.className="".concat(e.classPref,"button"),a.dataset.type="facebook",a.innerHTML=w.ICONS.FB_SVG,this.view.appendChild(a)}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,n=[{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 n=document.createElement("div");n.innerText=i,n.style.bottom="0",n.style.position="absolute",n.style.opacity=0,n.id="pgc_copy_link";var s,o,a=(window.screen.width-600)/2,r="menubar=no,toolbar=no,resizable=yes,scrollbars=yes, top=".concat(200,",\n left=").concat(a,", height=450,width=600"),l=!1;this.view.onclick=function(a){var h=a.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(n),window.getSelection().selectAllChildren(document.getElementById("pgc_copy_link"));try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),t.view.removeChild(n),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)}}])&&Pe(t.prototype,i),n&&Pe(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,i,n}();const xe=Me;function Be(e){return Be="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},Be(e)}function Ne(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Oe(n.key),n)}}function Oe(e){var t=function(e){if("object"!=Be(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Be(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Be(t)?t:t+""}function ze(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(ze=function(){return!!e})()}function Ae(e){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ae(e)}function Ve(e,t){return Ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ve(e,t)}var He=window.PGC_SGB,Ge=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=Ae(t),function(e,t){if(t&&("object"==Be(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,ze()?Reflect.construct(t,i||[],Ae(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&&Ve(e,t)}(t,e),i=t,n=[{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),n=0;n<i.length;n+=1){var s=t[i[n]];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)),n=[e[i],e[t]];e[t]=n[0],e[i]=n[1]}return e}},{key:"timeConverter",value:function(e){var t=new Date(e),i=new Date,n=new Date(Date.now()-864e5),s=t.getFullYear(),o=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"][t.getMonth()],a=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)===n.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):s===(new Date).getFullYear()?"".concat(a," ").concat(o,", ").concat(s):"".concat(a," ").concat(o," ").concat(s)}},{key:"request",value:function(e,i,n,s,o){var a=new URL(e);if(n)for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&a.searchParams.set(r,n[r]);var l=new XMLHttpRequest;l.open("GET",a,!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)}},n=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 n.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return n.Size(i.thumb.full.width,i.thumb.full.height)}return n.Size(400,400)}(),i.itemViewThumbSize=function(){if(i.thumb){if(i.thumb.medium)return n.Size(i.thumb.medium.width,i.thumb.medium.height);if(i.thumb.large)return n.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return n.Size(i.thumb.full.width,i.thumb.full.height)}return n.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,n){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,n,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],n="video/youtube";else if(o.match(/vimeo\.com/i)){var a=o.match(/(www\.)?vimeo.com\/(\d+)($|:|\?|\/)/);a&&(i=parseInt(a[2],10),n="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=n,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=!(!n||!n.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 a=o.toISOString().slice(11,19).split(":");if(a.length&&3===a.length){var r="00"===a[0]?"":"".concat(a[0],":"),l="".concat(a[1],":"),h=a[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 n=s.media_details.sizes;return n.medium&&(t.thumb=n.medium,t.thumb.url||(t.thumb.url=t.thumb.source_url)),n.large&&(t.web=n.large,t.web.url||(t.web.url=t.web.source_url)),n.full&&(t.original=n.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 a=s.url.toString().match(/.*\/(.+?)\./)[1].split("-").pop().split("x");return a&&a.length>0&&(t.original.width=a[0]&&a[1]?Math.min(parseInt(a[0]),3e3):300,t.original.height=a[0]&&a[1]?Math.min(parseInt(a[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(He.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 m=s.sizes[u];d="".concat(d+m.url," ").concat(m.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,n){var s,o,a="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=n,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(a,"Id")]="".concat(n,"_").concat(e),o&&(o.dataset["".concat(a,"Id")]="".concat(n,"_").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 m=l.classList.item(u);m.indexOf("wp-image")+1&&(s.attId=m.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,n={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,n),n}},{key:"Meta",value:function(){return{}}}],null&&Ne(i.prototype,null),n&&Ne(i,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(w);const Re=Ge;function Fe(e){return Fe="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},Fe(e)}function De(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,n)}return i}function Ye(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?De(Object(i),!0).forEach((function(t){Xe(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):De(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Xe(e,t,i){return(t=je(t))in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function qe(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,je(n.key),n)}}function je(e){var t=function(e){if("object"!=Fe(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=Fe(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Fe(t)?t:t+""}var Ue=Re.trace,We="pgcSgb";const Ze=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appEventManager=Re.GMEventsManager(),this.globalPreset=Ye({},this.attributesLightbox);var t,i=window.PGC_SGB_LIGHTBOX,n=i.lightboxSettigs,s=i.lightboxPreset;if(n&&""!==n?n.useGlobalPreset?s&&""!==s&&(t=s):t=n:s&&""!==s&&(t=s),this.globalPreset=Ye(Ye({},this.globalPreset),t),this.lightboxConfigByPreset=void 0,this.galleries={},this.globalPreset.nativGalleryEnable||this.globalPreset.nativeAttachment){var o=document.getElementsByClassName("gallery"),a=document.getElementsByClassName("wp-block-gallery");if(o.length>0)for(var r=0;r<o.length;r+=1){var l="cl".concat(r),h=o[r];h.dataset["".concat(We,"Id")]=l;var c=this.createGalleryByElement(l,h);c&&(this.galleries[l]={},this.galleries[l].appName=l,this.galleries[l].itemsList=c)}if(a.length>0)for(var d=0;d<a.length;d+=1){var u="bl".concat(d),m=a[d];m.dataset["".concat(We,"Id")]=u;var v=this.createGalleryByElement(u,m);v&&(this.galleries[u]={},this.galleries[u].appName=u,this.galleries[u].itemsList=v)}}if(!this.globalPreset.nativGalleryEnable)for(var g in this.galleries)Object.prototype.hasOwnProperty.call(this.galleries,g)&&(g.indexOf("cl")+1||g.indexOf("bl")+1)&&delete this.galleries[g];if(this.globalPreset.nativeAttachment){var p="sl",f=[],y=document.getElementsByTagName("A");if(y.length)for(var b=0;b<y.length;b+=1){var w=y[b];if(w.firstChild&&"IMG"===w.firstChild.tagName){var S=void 0;w.firstChild.dataset["".concat(We,"Id")]?this.globalPreset.nativGalleryEnable||delete w.firstChild.dataset["".concat(We,"Id")]:(S=w.parentNode&&"FIGURE"===w.parentNode.tagName?Re.GalleryItem(f.length,w.parentNode,p):Re.GalleryItem(f.length,w,p))&&f.push(S)}}f.length>0&&(this.galleries[p]={},this.galleries[p].appName=p,this.galleries[p].itemsList=f)}if(this.globalPreset.groupingAllImages){var E="gl",C=[],_=document.querySelectorAll("[data-pgc-sgb-id]");if(_.length)for(var L=0;L<_.length;L+=1){var I=_[L];if("IMG"===I.tagName){var T=I.dataset["".concat(We,"Id")].split("_"),P=T[0],k=parseInt(T.pop());this.galleries[P]&&this.galleries[P].itemsList[k]&&C.push(this.galleries[P].itemsList[k])}}C.length>0&&(this.galleries[E]={},this.galleries[E].appName=E,this.galleries[E].itemsList=C)}var M=this;if(this.popstateHandler=function(){M.modal&&M.modal.prepareToRemove(),M.lightbox?M.lightbox.prepareToRemove():M.itemIDFromHash&&M.openLightboxForItemHash(M.itemIDFromHash)},this.globalPreset.deepLinking&&window.addEventListener("popstate",this.popstateHandler,!1),this.globalPreset.deepLinking){var x=this.itemIDFromHash;void 0!==x&&(window.history.replaceState(null,null,window.location.pathname+window.location.search),this.openLightboxForItemHash(x))}},(t=[{key:"lightboxConstructor",value:function(){return Ue("** Need override - itemViewConstructor **"),null}},{key:"lightboxConfig",get:function(){return Ue("** Need override - lightboxConfig **"),null}},{key:"attributesLightbox",get:function(){return Ue("** Need override - lightbox Attributes **"),null}},{key:"addLightboxEventListres",value:function(){Ue("** Need override - addLightboxEventListres **")}},{key:"removeLightboxEventListres",value:function(){Ue("** Need override - removeLightboxEventListres **")}},{key:"createGalleryByElement",value:function(e,t){var i="".concat(0===e.indexOf("bl")?"blocks-":"","gallery-item"),n=t.getElementsByClassName(i);0===n.length&&(n=t.getElementsByClassName("wp-block-image"));for(var s=[],o=0;o<n.length;o+=1){var a=Re.GalleryItem(s.length,n[o],e);a&&s.push(a)}return s.length>0?s:null}},{key:"keydownHandler",value:function(){var e=this;return e.handlerKB=function(t){e.modal?e.modal.prepareToRemove():27===t.keyCode&&e.lightbox&&e.lightbox.prepareToRemove()},e.handlerKB}},{key:"initAppForLightbox",value:function(){this.viewWidth=document.getElementsByTagName("BODY")[0].clientWidth,document.addEventListener("keydown",this.keydownHandler(),!0);var e=this;this.resizeWindow=function(){e.windowResizeHandler()},window.addEventListener("resize",this.resizeWindow),this.addLightboxEventListres()}},{key:"deactivateApp",value:function(){this.removeLightboxEventListres(),document.removeEventListener("keydown",this.handlerKB,!0),window.removeEventListener("resize",this.resizeWindow)}},{key:"checkGalleryYpositionForViewedItem",value:function(){if(this.viewedItem){var e=this.viewedItem,t=document.querySelectorAll('[data-pgc-sgb-id="'.concat(e.galId,"_").concat(e.index,'"]'))[0];if(t){var i=(window.innerHeight-t.clientHeight)/2,n=window.innerHeight-t.getBoundingClientRect().bottom<-t.clientHeight||t.getBoundingClientRect().bottom<0&&t.getBoundingClientRect().top<0?t.getBoundingClientRect().top+window.pageYOffset-i:void 0;n&&Re.scrollWindowToY(n)}}}},{key:"itemIDFromHash",get:function(){if(0!==Object.keys(this.galleries).length){var e,t=window.location.hash.indexOf(We);if(t+1){e=window.location.hash.substr(t).split("-").length>=2?window.location.hash.substr(t).split("-"):void 0;var i={};i.galleryName=this.galleries[e[1]]?e[1]:void 0,i.galleryName||(i.galleryName=Object.keys(this.galleries)[0]);var n=e[2];if(n){var s=n.split("_");s[0]&&(i.index=parseInt(s[0])),s[1]&&(i.id=s[1])}return void 0!==i.index&&i.id&&i.id.indexOf("cl")+1&&(i.id="".concat(i.index,"_").concat(i.id)),i}}}},{key:"itemHash",value:function(e){return"#".concat(We,"-").concat(this.lightbox.appName,"-").concat(e.ID)}},{key:"openLightboxForItemHash",value:function(e){var t,i,n=e.galleryName,s=e.index,o=e.id;if(n&&this.galleries[n]){var a=(t=this.galleries[n]).itemsList;if(a&&void 0!==s&&a[s]){if(i=a[s],!o)return this.createLightboxForGallery(t,s);if(i.attId&&i.attId===o)return this.createLightboxForGallery(t,s);for(var r in this.galleries)if(Object.prototype.hasOwnProperty.call(this.galleries,r)){var l=this.getIndexById(o,this.galleries[r]);if(null!==l)return this.createLightboxForGallery(this.galleries[r],l)}this.createLightboxForGallery(t,s)}else if(!a&&o)for(var h in this.galleries)if(Object.prototype.hasOwnProperty.call(this.galleries,h)){var c=this.getIndexById(o,this.galleries[h]);if(null!==c)return this.createLightboxForGallery(this.galleries[h],c)}}return Ue("Hash is deprecated")}},{key:"getIndexById",value:function(e,t){var i=t.itemsList;if(!i||0===i.length)return null;for(var n=0;n<i.length;n+=1){var s=i[n];if(s.attId&&s.attId===e)return n}return null}},{key:"itemActionHandler",value:function(e){e&&e.params&&e.params.type&&e.params.item&&"view"===e.params.type&&(this.viewedItem=e.params.item,this.globalPreset.deepLinking&&this.updateItemLink(this.viewedItem))}},{key:"updateItemLink",value:function(e){window.history.replaceState(null,null,this.itemHash(e))}},{key:"createLightboxForGallery",value:function(e,t){if(this.initAppForLightbox(),this.lightbox&&this.lightbox.prepareToRemove(),this.globalPreset.groupingAllImages&&this.galleries.gl){for(var i=this.galleries.gl,n=0;n<i.itemsList.length;n+=1){var s=i.itemsList[n];s.galId===e.appName&&s.index===t&&(t=n,n=i.itemsList.length)}e=i}if(e.cacheItemsList||(e.cacheItemsList=Re.CacheItemsList()),e.appEventManager=this.appEventManager,1===e.itemsList.length||this.globalPreset.singletonAttachment&&e.appName.indexOf("sl")+1){var o=Ye({},this.lightboxConfig);o.lb_slideshowEneble=!1,o.lb_thumbBarEnable=!1,o.lb_scrollNavi=!1,o.lb_itemCounterEnable=!1,this.lightbox=this.lightboxConstructor(e,o),this.lightbox.initByList([e.itemsList[t]],0)}else this.lightbox=this.lightboxConstructor(e,this.lightboxConfig),this.lightbox.initByList(e.itemsList,t);if(this.globalPreset.deepLinking){var a=e.itemsList[t];if(a){var r=this.itemHash(a);window.location.hash!==r&&window.history.pushState(null,null,r)}}}},{key:"tryLightboxFor",value:function(e){var t=e.split("_");if(2===t.length){var i=t[0],n=parseInt(t[1]),s=this.galleries[i];if(s){var o=this.galleries[i].itemsList;if(!o||!o[n])return;this.createLightboxForGallery(s,n)}}else Ue("SimpLy Lightbox - Something went wrong!")}},{key:"removeLightbox",value:function(e){if(e.target===this.lightbox){var t=this,i=e.target;setTimeout((function(){i.view&&i.view.parentNode&&i.view.parentNode.removeChild(i.view),t.lightbox&&(t.lightbox=void 0)}),100),this.globalPreset.deepLinking&&this.itemIDFromHash&&window.history.back(),this.globalPreset.galleryScrollPositionControll&&this.checkGalleryYpositionForViewedItem(),this.deactivateApp()}}},{key:"fullscreenSwitch",value:function(){var e=this.lightbox.view;e&&(Re.toggleFullScreen(e),this.windowResizeHandler())}},{key:"windowResizeHandler",value:function(){var e=this;clearTimeout(this.resizeTimeOut),Re.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(){var e=document.getElementsByTagName("BODY")[0].clientWidth;this.viewWidth!==e&&(this.viewWidth=e)}}])&&qe(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}(),Ke={deepLinking:!0,nativGalleryEnable:!0,nativeAttachment:!0,singletonAttachment:!0,groupingAllImages:!1,modaBgColor:"rgba(0,0,0,0.8)",modalIconColor:"rgba(255,255,255,1)",modalIconColorHover:"rgba(200,200,200,1)",shareFacebook:!0,shareTwitter:!0,sharePinterest:!0,shareCopyLink:!0,sliderItemDownload:!0,sliderScrollNavi:!1,sliderNextPrevAnimation:"animation",galleryScrollPositionControll:!1,useLightbox:!0,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,04)",sliderNavigationColor:"rgba(0,0,0,1)",sliderNavigationIconColor:"rgba(255,255,255,1)",sliderNavigationColorOver:"rgba(255,255,255,1)",sliderNavigationIconColorOver:"rgba(0,0,0,1)",sliderDescriptionShow:!1,sliderItemTitleEnable:!0,sliderItemTitleFontSize:20,sliderItemTitleTextColor:"rgba(255,255,255,1)",sliderItemDescriptionEnable:!1,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,05)",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};function $e(e){return $e="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},$e(e)}function Je(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,Qe(n.key),n)}}function Qe(e){var t=function(e){if("object"!=$e(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var i=t.call(e,"string");if("object"!=$e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==$e(t)?t:t+""}function et(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(et=function(){return!!e})()}function tt(e){return tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},tt(e)}function it(e,t){return it=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},it(e,t)}if(window.PGC_SGB_LIGHTBOX){console.log("%c SimpLy Lightbox v.3.2.7","background: rgba(0,0,0,0.2); color: rgba(255,255,255,1)");var nt="pgcSgb";Re.trace,window.addEventListener("load",(function(){var e;window.PGC_SGB_LIGHTBOX.lightbox||(window.PGC_SGB_LIGHTBOX.lightbox=(e=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=tt(t),function(e,t){if(t&&("object"==$e(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,et()?Reflect.construct(t,i||[],tt(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&&it(e,t)}(t,e),i=t,(n=[{key:"lightboxConstructor",value:function(e,t){return new we(e,t)}},{key:"lightboxConfig",get:function(){if(this.lightboxConfigByPreset)return this.lightboxConfigByPreset;var e=we.CONFIG;return e.lb_scrollNavi=this.globalPreset.sliderScrollNavi,e.lb_sliderNextPrevAnimation="animation"===this.globalPreset.sliderNextPrevAnimation,e.lb_copyR_Alert=this.globalPreset.copyRAlert,e.lb_copyR_Proptection=this.globalPreset.copyRProtection,e.lb_backgroundColor=this.globalPreset.sliderBgColor,e.lb_headerFooterColor=this.globalPreset.sliderHeaderFooterBgColor,e.lb_preloaderColor=this.globalPreset.sliderPreloaderColor,e.lb_sliderNavigationColor=this.globalPreset.sliderNavigationColor,e.lb_sliderNavigationIconColor=this.globalPreset.sliderNavigationIconColor,e.lb_sliderNavigationColorOver=this.globalPreset.sliderNavigationColorOver,e.lb_sliderNavigationIconColorOver=this.globalPreset.sliderNavigationIconColorOver,e.lb_itemCounterColor=this.globalPreset.itemCounterColor,e.lb_itemCounterEnable=this.globalPreset.sliderItemCounterEnable,e.lb_itemTitleEnable=this.globalPreset.sliderItemTitleEnable,e.lb_itemTitleFontSize=this.globalPreset.sliderItemTitleFontSize,e.lb_itemTitleTextColor=this.globalPreset.sliderItemTitleTextColor,e.lb_thumbBarEnable=this.globalPreset.sliderThumbBarEnable,e.lb_thumbBarHoverColor=this.globalPreset.sliderThumbBarHoverColor,e.lb_zoom=this.globalPreset.sliderZoomEnable,e.lb_itemInfoEnable=this.globalPreset.sliderInfoEnable,e.lb_itemShare=this.globalPreset.sliderSocialShareEnabled,e.lb_itemDownload=!1,e.lb_itemLike=this.globalPreset.sliderLikesEnabled,e.lb_discuss=this.globalPreset.sliderItemDiscuss,e.lb_menuBackgroundColor=this.globalPreset.sliderThumbSubMenuBackgroundColor,e.lb_menuBackgroundColorOver=this.globalPreset.sliderThumbSubMenuBackgroundColorOver,e.lb_menuIconColor=this.globalPreset.sliderThumbSubMenuIconColor,e.lb_menuIconColorOver=this.globalPreset.sliderThumbSubMenuIconHoverColor,e.lb_fullscreen=this.globalPreset.sliderFullscreenEnabled,e.lb_slideshowEneble=this.globalPreset.sliderSlideshow,e.lb_sliderSlideshowAutoStart=this.globalPreset.sliderSlideshowAutoStart,e.lb_slideshowIndicatorColor=this.globalPreset.slideshowIndicatorColor,e.lb_slideshowIndicatorColorBg=this.globalPreset.slideshowIndicatorColorBg,e.lb_slideshowTimer=this.globalPreset.sliderSlideshowDelay,e}},{key:"attributesLightbox",get:function(){return Ke}},{key:"addLightboxEventListres",value:function(){this.appEventManager.addGMEventListener(we.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.appEventManager.addGMEventListener(we.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.appEventManager.addGMEventListener(we.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.appEventManager.addGMEventListener(we.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler")}},{key:"removeLightboxEventListres",value:function(){this.appEventManager.removeGMEventListener(we.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.appEventManager.removeGMEventListener(we.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.appEventManager.removeGMEventListener(we.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.appEventManager.removeGMEventListener(we.EVENTS.LB_ITEM_ACTION,this,"itemActionHandler")}},{key:"createModalEventHendler",value:function(e){this.createModal(e.params)}},{key:"createModal",value:function(e){if(e.type&&e.item){var t=e.item,i=xe.CONFIG;i.ish_backgroundColor=this.globalPreset.modaBgColor,i.ish_iconColor=this.globalPreset.modalIconColor,i.ish_iconColorHover=this.globalPreset.modalIconColorHover,i.ish_facebook=this.globalPreset.shareFacebook,i.ish_twitter=this.globalPreset.shareTwitter,i.ish_pinterest=this.globalPreset.sharePinterest,i.ish_download=this.globalPreset.sliderItemDownload,i.ish_copy=this.globalPreset.shareCopyLink;var n=document.getElementsByTagName("body")[0];i.ish_parentDiv=this.lightbox?this.lightbox.view:n,this.appEventManager.addGMEventListener(xe.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal"),this.modal=new xe(this.appEventManager,i),this.modal.initByItem(t)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.appEventManager.removeGMEventListener(xe.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal")}}])&&Je(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),i;var i,n}(Ze),new e)),document.addEventListener("click",(function(e){var t=e.target;"IMG"!==t.tagName&&"A"!==t.tagName||!t.dataset["".concat(nt,"Id")]||(e.stopPropagation(),e.preventDefault(),window.PGC_SGB_LIGHTBOX.lightbox&&window.PGC_SGB_LIGHTBOX.lightbox.tryLightboxFor(t.dataset["".concat(nt,"Id")]))}),!0)}))}})()})();