1(()=>{var e={3680:()=>{},1879:()=>{},2661:()=>{},3572:()=>{},4454:()=>{},9397:()=>{},8204:()=>{},3379:e=>{"use strict";var t=[];function i(e){for(var i=-1,s=0;s<t.length;s++)if(t[s].identifier===e){i=s;break}return i}function s(e,s){for(var o={},a=[],r=0;r<e.length;r++){var l=e[r],h=s.base?l[0]+s.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 g=n(m,s);s.byIndex=r,t.splice(r,0,{identifier:d,updater:g,references:1})}a.push(d)}return a}function n(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,n){var o=s(e=e||[],n=n||{});return function(e){e=e||[];for(var a=0;a<o.length;a++){var r=i(o[a]);t[r].references--}for(var l=s(e,n),h=0;h<o.length;h++){var c=i(o[h]);0===t[c].references&&(t[c].updater(),t.splice(c,1))}o=l}}},569:e=>{"use strict";var t={};e.exports=function(e,i){var s=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(!s)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");s.appendChild(i)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var s="";i.supports&&(s+="@supports (".concat(i.supports,") {")),i.media&&(s+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(s+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),s+=i.css,n&&(s+="}"),i.media&&(s+="}"),i.supports&&(s+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(s+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(s,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589: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(s){var n=t[s];if(void 0!==n)return n.exports;var o=t[s]={exports:{}};return e[s](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 s in t)i.o(t,s)&&!i.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.nc=void 0,(()=>{"use strict";var e=i(3379),t=i.n(e),s=i(7795),n=i.n(s),o=i(569),a=i.n(o),r=i(3565),l=i.n(r),h=i(9216),c=i.n(h),d=i(4589),u=i.n(d),m=i(9397),g=i.n(m),v={};function p(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}v.styleTagTransform=u(),v.setAttributes=l(),v.insert=a().bind(null,"head"),v.domAPI=n(),v.insertStyleElement=c(),t()(g(),v),g()&&g().locals&&g().locals;var f=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)}var t,i;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">
1<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.041L4
16,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>
1',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 viewBox="0 0 32 32" width="32" height="32" aria-hidden="false"><path d="M30 7.3c-1 .5-2.1.8-3.3.9 1.2-.7 2.1-1.8 2.5-3.2-1.1.7-2.3 1.1-3.6 1.4-1-1.1-2.5-1.8-4.2-1.8-3.2 0-5.7 2.6-5.7 5.7 0 .5.1.9.1 1.3-4.8-.2-9-2.5-11.8-6-.5.9-.8 1.9-.8 3 0 2 1 3.8 2.6 4.8-.9 0-1.8-.3-2.6-.7v.1c0 2.8 2 5.1 4.6 5.6-.5.1-1 .2-1.5.2-.4 0-.7 0-1.1-.1.7 2.3 2.9 3.9 5.4 4-2 1.5-4.4 2.5-7.1 2.5-.5 0-.9 0-1.4-.1 2.5 1.6 5.6 2.6 8.8 2.6 10.6 0 16.3-8.8 16.3-16.3v-.7c1.1-1 2-2 2.8-3.2z"></path></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 viewB
1ox="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,s=document.createElement("div");s.className="".concat(e.ClassPref,"preloader");var n=document.createElement("div");n.className="".concat(e.ClassPref,"static"),n.style.width="".concat(8,"px"),n.style.height="".concat(8,"px"),n.style.margin="".concat(-4,"px"),n.style.backgroundColor=t,s.appendChild(n);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 s.appendChild(o),s}},{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 s in i)if(void 0!==e.style[s])return t[s]}},{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}},s=t.match(/(Windows Phone);?[\s\/]+([\d.]+)?/),n=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(s&&(i.os="windows",i.osVersion=s[2],i.windows=!0),n&&!s&&(i.os="android",i.osVersion=n[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(/.*AppleWeb
1Kit(?!.*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 s=i.offsetWidth;return e.parentNode.removeChild(e),t-s}},{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,s){if(e.Device.browser.ie11)return"".concat(t+(t.indexOf("?")>=0?"&":"?")+encodeURIComponent(i),"=").concat(encodeURIComponent(s));var n=(t=new URL(t)).search,o=new URLSearchParams(n);return o.append(i,s),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 s=document.createElement("iframe");if(s.setAttribute("allow","autoplay"),s.setAttribute("allowfullscreen",""),s.setAttribute("frameborder","0"),"youtube"===e)s.src="https://www.youtube.com/embed/".concat(t,"?autoplay=1&rel=0&showinfo=0&wmode=transparent");else if("vimeo"===e){var n=i?"h="+i+"&":"";s.src="https://player.vimeo.com/video/".concat(t,"?").concat(n,"autoplay=1&byline=0&portrait=0&transparent=0")}return s}},{key:"copyProperties",value:function(e,t){for(var i=[],s=Object.keys(e),n=0;n<s.length;n+=1){var o=s[n];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,s=e.length;0!==s;)i=Math.floor(Math.random()*s),t=e[s-=1],e[s]=e[i],e[i]=t;return e}},{key:"Rect",value:function(e,t,i,s){return{x:e,y:t,width:i,height:s}}},{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,s=0;s<e.childNodes.length;s+=1){var n=e.childNodes[s];
11===n.nodeType&&"SCRIPT"!==n.nodeName&&(t=document.defaultView.getComputedStyle(n,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){var s=arguments[i];t+="".concat(s," , ")}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)}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)}document.onkeydown=null}},{key:"collapseElementsInElemt",value:function(e,t){for(var i=[],s=0;s<e.childNodes.length;s+=1){var n={},o=e.childNodes[s];1===o.nodeType&&"SCRIPT"!==o.nodeName&&o!==t&&(n.element=o,n.height=null,n.overflow=null,""!==o.style.height&&(n.height=o.style.height),""!==o.style.overflow&&(n.overflow=o.style.overflow),i.push(n),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,s){return t+t+i+i+s+s}));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,s){var n=t.width,o=t.height,a=i.width,r=i.height,l=1,h=1,c=1;s?(l=a/n,h=r/o,c=Math.max(l,h)):(l=a/n,h=r/o,c=(c=Math.min(l,h))>1?1:c);var d=Math.round(n*c),u=Math.round(o*c),m=Math.round((a-d)/2),g=Math.round((r-u)/2);return e.Rect(m,g,d,u)}},{key:"getItemFrameByIndexForBox",value:function(t,i,s,n,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)*s)/h:i)*r,d=Math.ceil((t+1)/h)-1,u=d*(c+n),m=(t-d*h)*(l+s);return e.Rect(m,u,l,c)}},{key:"fadeOut",value:function(e,t,i){i||(i=500);var s=Math.sqrt,n=(new Date).getTime();!function o(){var a=(new Date).getTime()-n,r=a/i;if(r<1){var l=1-s(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,s=e.innerHTML.split(" ");e.innerHTML=s[0].substring(0,3);var n=e.clientHeight*t;for(e.innerHTML=i;e.clientHeight>n;)s.pop(),e.innerHTML="".concat(s.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 s=t.parentElement;return s.classList.contains(i)?s:e.searchParentByClassName(s,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,s=(t=Math.min(t,e.scrollHeight-e.clientHeight-1))-e.scrollTop;i=setInterval((function(){s=.05*s+.07*(t-e.scrollTop);var n=e.scrollTop+s;Math.abs(s)<1?(s=0,clearInterval(i)):e.scrollTop=n}),15),document.addEventListener("wheel",(function e(){clearInterval(i),document.removeEventListener("wheel",e,!1)}),!1)}},{key:"scrollWindowToY",value:function(e){var t,i;function s(){clearInterval(t),document.removeEventListener("wheel",s,!1)}var n=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;
1(r===o||Math.abs(r)<1)&&(window.scrollTo(0,e),clearInterval(t)),o=(e-window.pageYOffset)*a,n+=o,window.scrollTo(0,n),void 0===i&&((i=Math.abs(n-window.pageYOffset)>20)?(window.scrollTo(0,e),clearInterval(t)):document.addEventListener("wheel",s,!1))}),15)}},{key:"scrollToY",value:function(e,t){var i,s=window.pageYOffset,n=Math.PI/(t/15),o=s/2,a=0,r=setInterval((function(){window.pageYOffset>e?(a+=1,i=o-o*Math.cos(a*n),window.scrollTo(0,s-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(s){!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[s].webView,e.lastIndex=s,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(s,n,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=n,e.itemsList=s,void 0===n&&(n=0),t(n)},e.status=function(){return{list:e.itemsList,index:e.lastIndex}},e}},{key:"GMEventsManager",value:function(){return{listenerSet:{},addGMEventListener:function(t,i,s){if(!t)return e.trace("********************************* Event UNDEFINED!!! ***************************************"),e.trace(i),e.trace(s),void e.trace("********************************* Event UNDEFINED!!! ***************************************");this.listenerSet[t]||(this.listenerSet[t]=[]);var n={};n.listener=i,n.handler=s,this.listenerSet[t].push(n)},removeGMEventListener:function(e,t,i){if(this.listenerSet[e])for(var s=0;s<this.listenerSet[e].length;s+=1)this.listenerSet[e][s].listener===t&&this.listenerSet[e][s].handler===i&&(this.listenerSet[e].splice(s,1),s=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 s=t[i];s&&s.listener&&"function"==typeof s.listener[s.handler]&&s.listener[s.handler](e)}}}}},{key:"GMEvent",value:function(e,t,i){var s={};return s.type=e,s.params=i,s.target=t,s}}],null&&p(t.prototype,null),i&&p(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();const y=f;var w=i(3680),b=i.n(w),S={};function E(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function C(e,t,i){return t&&E(e.prototype,t),i&&E(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}function _(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}S.styleTagTransform=u(),S.setAttributes=l(),S.insert=a().bind(null,"head"),S.domAPI=n(),S.insertStyleElement=c(),t()(b(),S),b()&&b().locals&&b().locals;var I=C((function e(t,i,s,n,o,a,r){function l(e){return e&&e[0].toUpperCase()+e.slice(1)}_(this,e);var h=document.createElement("div");return h.className=t,h.dataset.type=s,h.innerHTML=i,h.style.backgroundColor=n,h.style.order=r,h.style.fill=o,h.setAttribute("title",l(s)),h.setAttribute("aria-label",l(s)),h.addEventListener("touchend",a,!1),h.addEventListener("click",a,!1),h.addEventListener("mouseenter",a,!1),h.addEventListener("mouseleave",a,!1),h}));const L=function(){function e(t,i,s){_(this,e),this.appSet=t,this.appName=t.appName,this.type=i,this.buttonsList=[];var n=e.MENU_TYPE;this.config=e.CONFIG,y.copyProperties(s,this.config),this.item=void 0,this.lightbox=i===n.LIGHTBOX,this.view=document.createElement("div"),this.view.className="".concat(e.classPref,"view"),this.view.classList.add(i),this.initButtons()}
1return C(e,[{key:"initButtons",value:function(){var t=this.type,i=e.MENU_TYPE,s=this;function n(e){"like"===e.dataset.type&&e.dataset.like||("bookmark"===e.dataset.type&&e.dataset.bookmark?e.style.backgroundColor=s.backgroundColor:(e.style.backgroundColor=s.backgroundColor,e.style.fill=s.iconColor,e.classList.remove("hover")))}function o(t){if(this.eventType=t.type,"click"===t.type){var i=s.item;if(!i)return;var o={};o.type=this.dataset.type,o.item=i,this.dataset.type,n(this),y.Device.desktop||n(this),s.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.ITEM_MENU_ACTION,s,o))}else"mouseenter"===t.type?"bookmark"===(a=this).dataset.type&&a.dataset.bookmark?a.style.backgroundColor=s.backgroundColorOver:(a.style.backgroundColor=s.backgroundColorOver,a.style.fill=s.iconColorOver,a.classList.add("hover")):"mouseleave"===t.type&&n(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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?y.ICONS.LINK_2_SVG:y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?y.ICONS.COMENTS_2_SVG:y.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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?y.ICONS.DOWNLOAD_2_SVG:y.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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?y.ICONS.SHARE_2_SVG:y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),t===i.ULTRABOX?y.ICONS.HEART_2_SVG:y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),y.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 I("".concat(e.classPref,"button"),y.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!==y.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=y.ICONS.SHOP_SVG:this.linkButton.innerHTML=this.type===i.ULTRABOX?y.ICONS.LINK_2_SVG:y.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"de
1sable":this.zoomButton.innerHTML=y.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="none",this.zoomButton.style.opacity=.4;break;case"zoomOut":this.zoomButton.innerHTML=y.ICONS.ZOOM_IN_SVG,this.zoomButton.style.pointerEvents="auto",this.zoomButton.style.opacity=1;break;case"zoomIn":this.zoomButton.innerHTML=y.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=y.ICONS.EXPAND_SVG;break;case"maxi":this.resizeButton.innerHTML=y.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=y.ICONS.PAUSE_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"stop":this.playButton.innerHTML=y.ICONS.PLAY_SVG,this.playButton.style.pointerEvents="auto",this.playButton.style.opacity=1;break;case"desable":this.playButton.innerHTML=y.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?y.ICONS.NORMAL_SCREEN_SVG:y.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}}}]),e}();var T=i(3572),k=i.n(T),P={};function x(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}P.styleTagTransform=u(),P.setAttributes=l(),P.insert=a().bind(null,"head"),P.domAPI=n(),P.insertStyleElement=c(),t()(k(),P),k()&&k().locals&&k().locals,y.trace;const M=function(){function e(t,i,s){!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,y.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(),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,y.setStyleForElFomObj(this.view,s)}var t,i,s;return t=e,s=[{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(y.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={},s=this.pages,n=this.view.scrollLeft;i.pages=s,i.scrollScale=this.scrollScale,i.renderingX=this.renderingX,i.internalControll=this.internalControll,
1i.currentPage=void 0!==t?t:this.currentPagePr,1===s?(i.hasPrevPage=!1,i.hasNextPage=!1):(i.hasPrevPage=n>0,i.hasNextPage=this.scrollWidth-n-this.width>.5),this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.SCR_ACTION,this,i))}},{key:"currentPage",value:function(){var t=this.pages,i=this.width,s=this.view.scrollLeft,n=this.scrollWidth-s-i,o=s%i,a=Math.ceil(s/i)===t-1?this.lastPageWidth:i;this.nextPagePart=o/a;var r=Math.round(Math.floor(s/i)+this.nextPagePart),l=-(this.rPosX-s)/Math.abs(this.rPosX-s);return l&&this.scrollDirection!==l&&(this.scrollDirection=l,this.updateControls()),this.currentPagePr===r&&0!==n&&0!==s||(this.currentPagePr=r,this.updateControls()),this.rPosX=s,this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.SCR_SCROLL,this,{scroll:s,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 s=(e=Math.max(e,0))*this.width;t?this.scrollLeft=s:this.scrollLeftAnime=s,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,s=0,n=.05+.05*Math.abs(this.accelX-i)/1e3;n=Math.min(.9,n),this.renderingX=!0,this.internalControll=!1,this.scrollAnimInterval||(this.scrollAnimInterval=setInterval((function(){s=(t.accelX-i)*n,i+=s,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,s,n,o=this,a=0,r=0,l=0;function h(e){var h,c=e.pageX,d=e.pageY;if(void 0===n&&(d===i?n=!1:(h=180*Math.atan2(Math.abs(d-i),Math.abs(c-t))/Math.PI,n=h>45)),n)o.dragging=!0;else{e.preventDefault();var u=t-c;Math.abs(u)>4&&(o.dragging=!0),o.view.scrollLeft=s+u,r=l,l=o.view.scrollLeft,a=1*(l-r)}}function c(){document.removeEventListener("mousemove",h,!1),document.removeEventListener("mouseup",c,!1),o.config.scrh_smooth_dragin&&0!==a?(o.scrollAnimInterval=setInterval((function(){a*=.9,o.view.scrollLeft+=a,o.accelX=o.view.scrollLeft,o.renderingX=!0,Math.abs(a)<.1&&(o.renderingX=!1,clearInterval(o.scrollAnimInterval),o.updateControls(),o.scrollAnimInterval=void 0)}),17),o.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.SCR_ACTION,o,{dragging:!1})),o.dragging=!1):(o.renderingX=!1,o.updateControls(),o.dragging=!1,o.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.SCR_ACTION,o,{dragging:!1})))}return function(e){e.preventDefault(),clearInterval(o.scrollAnimInterval),o.scrollAnimInterval=void 0,a=0,n=void 0;var r=e.pageX,l=e.pageY;t=r,i=l,s=o.view.scrollLeft,document.addEventListener("mousemove",h,!1),document.addEventListener("mouseup",c,!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)}}
1])&&x(t.prototype,i),s&&x(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();var B=i(1879),N=i.n(B),O={};function z(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function A(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function V(e,t,i){return t&&A(e.prototype,t),i&&A(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}O.styleTagTransform=u(),O.setAttributes=l(),O.insert=a().bind(null,"head"),O.domAPI=n(),O.insertStyleElement=c(),t()(N(),O),N()&&N().locals&&N().locals;var H=y.trace,G=function(){function e(t,i,s){z(this,e),this.config=e.CONFIG,Object.assign(this.config,t),this.context=s,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 V(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=y.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):y.Device.browser.safari&&y.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(y.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=y.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)"}}}]),e}();const R=function(){function e(t,i,s){z(this,e),this.context="ItemsScrollBarPagination",this.config=e.CONFIG,y.copyProperties(i,this.config),this.appName=t.appName,this.appSet=t,this.thumbsList=[],this.presentedList=[],this.thumbSize=y.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 n=M.CONFIG;n.scrh_dragin=!0,n.scrh_block_pan_y=this.config.isb_block_pan_y,this.scroller=new M(this.appSet,n,{}),this.appSet.appEventManager.addGMEventListener(M.EVENTS.SCR_SCROLL,this,"scrollHandler"),this.view.appendChild(this.scroller.view),this.activIndex=void 0,this.activAudioIndex=void 0,s&&y.setStyleForElFomObj(this.view,s),this.appSet.appEventManager.addGMEventListener(G.EVENT.THUMB_ACTION,this,"thumbActionHandler")}return V(e,[{key:"initByItemslist",value:function(e){this.itemsList=e;var t=G.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 s=e[i],n=new G(t,this.appSet,this.context);n.index=i,n.init(s),this.thumbsList.push(n)}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,s=t.scrollDirection;this.scrollLeft=i,this.addPage(Math.ceil(this.scrollLeft/this.width)-(s<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(y.GMEvent(e.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,{action:"click",index:
1parseInt(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 s=this.thumbsList[i];s.updateSize(this.thumbSize.width),s.x=i*this.thumbSize.width,s.y=0,s.display="block",s.opacity={opacity:1},this.presentedList[i]=s,this.sliderContent.appendChild(s.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 s=this.pageByItemIndex(e[0]),n=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(s),this.addPage(n)}}},{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,s=Math.ceil(this.scrollLeft/this.thumbSize.width),n=Math.floor((this.scrollLeft+this.width-this.thumbSize.width)/this.thumbSize.width);if(e<s||e>n){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,s=this.pageByItemIndex(i[0]),n=this.pageByItemIndex(i[i.length-1]);this.addPage(s),this.addPage(n)}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(){H("Update View")}},{key:"prepareToRemove",value:function(){this.appSet.appEventManager.removeGMEventListener(M.EVENTS.SCR_ACTION,this,"scrollHandler"),this.scroller.remove(),this.appSet.appEventManager.removeGMEventListener(G.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"}}}]),e}();var F=i(4454),D=i.n(F),Y={};function X(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function q(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function U(e,t,i){return t&&q(e.prototype,t),i&&q(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}Y.styleTagTransform=u(),Y.setAttributes=l(),Y.insert=a().bind(null,"head"),Y.domAPI=n(),Y.insertStyleElement=c(),t()(D(),Y),D()&&D().locals&&D().locals;var W=y.trace,j=function(){function e(t){X(this,e);var i=document.createElement("div"),s=document.createElement("div");s.className="".concat(e.classPref,"view");var n=document.createElement("div");if(n.className="".concat(e.classPref,"button"),t.meta&&t.meta.subType&&"product"===t.meta.subType?n.innerHTML='<a href="'.concat(t.link,'">').concat(t.linkText,"</a>"):n.innerHTML=t.link_text?t.link_text:t.title,s.appendChild(n),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),s.appendChild(o)}return i.appendChild(s),i}return U(e,null,[{key:"classPref",get:function(){return"pgc-rev-slider-post-informer-"}}]),e}(),Z=U((function e(t){X(this,e);var i=document.createElement("div"),s=document.createElement("div");return s.className="icon-holder",s.innerHTML=t,i.appendChild(s),i})),K=function(){function e(t){X(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=y.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=y.Size(0,0),this.imgSize=y.Size(0,0),this.imageFramePr=y.Rect(0,0,0,0),this.imageFrameFF=y.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=y.Point(0,0),this.origin=y.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=y.Point(0,0),this.stopRenderTransform=!1}return U(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.naturalWi
1dth,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=y.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=y.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=y.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 this.itemImg=t.webView,this.itemInner.appendChild(this.itemImg),this.videoContentReady=!0,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=y.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=y.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=y.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 Z(this.iconSet.PLAY_SVG).innerHTML,this.subContentHolder.getElementsByTagName("svg")[0].style.marginLeft="7px";break;case"post":case"page":case"product":this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new j(this.item).innerHTML;break;default:this.view.classList.remove("info-icon")}t.meta&&t.meta.subType&&"product"===t.meta.subType&&(this.view.classList.add("info-icon"),this.subContentHolder.innerHTML=new j(this.item).innerHTML)}}else this.clearPage()}},{key:"addVideo",value:function(t){var i=this;this.preloader.style.display="block",this.item.webView?(this.imgSize.width=this.item.webImgFrame.width,this.imgSize.height=this.item.webImgFrame.height):(this.item.webImgFrame=y.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=y.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
1)})),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&&y.Device.browser.safari&&y.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=y.getFrameForBoxWithMode(this.imgSize,y.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=y.getFrameForBoxWithMode(this.imgSize,y.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 s=i.width*(t||1),n=i.height*(t||1),o=i.x*(t||1),a=i.y*(t||1);this.boundingBox={left:s>this.size.width?-o:(this.size.width-this.size.width*t)/2,top:n>this.size.height?-a:(this.size.height-this.size.height*t)/2,right:s>this.size.width?this.size.width-(o+s):(this.size.width-this.size.width*t)/2,bottom:n>this.size.height?this.size.height-(a+n):(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,y.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,s=this.size.height/2*this.newScale+this.viewTranslate.y-this.imageFrame.height/2*this.newScale*this.newScale,n=s+this.imageFrame.height*this.scale*this.newScale;return e.x>t&&e.x<i&&e.y>s&&e.y<n}},{key:"normalize",value:function(e){y.cancelAnimationFrame(this.animaSliderRender),e?this.renderTransformTo(y.Point(0,0),1):(this.scale=1,this.newScale=1,this.newScaleMW=1,this.viewTranslate=y.Point(0,0),this.origin=y.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){y.cancelAnimationFrame(this.animaSliderRender);var i=t.x-this.viewTranslate.x,s=t.y-this.viewTranslate.y,n=i/this.scale,o=s/this.scale,a=t.x-n*e,r=t.y-o*e,l=y.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;y.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=y.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("image"===this.item.type){var i;y.cancelAnimationFrame(this.animaSliderRender);var s=e/this.startDistForZoom,n=0;(i=this.startDistForZoom/this.startScale*s/(this.startDistForZoom/this.startScale)*this.startScale)>this.MaxScale&&(n=.8*-(i-this.MaxScale)),i+=n;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=y.Point(h-t.x,c-t.y);this.scale=i,this.newScale=i,this.viewTranslate=d,this.startTranslate=y.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=y.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;y.cancelAnimationFrame(i.animaSliderRender),this.origin=e,this.targetPoint=e,this.newScale=t;var s=0,n=0,o=0,a=.05,r=.22;i.animaSliderRender=y.requestAnimationFrame((function l(){s=s*a+(e.x-i.viewTranslate.x)*r,n=n*a+(e.y-i.viewTranslate.y)*r,t&&(o=o*a+(t-i.scale)*r);var h=i.viewTranslate.x;h+=s;var c=i.viewTranslate.y;c+=n,t&&(i.scale+=o),i.viewTranslate=y.Point(h,c),Math.abs(s)<.02&&Math.abs(n)<.02&&Math.abs(o)<.02?(y.cancelAnimationFrame(i.animaSliderRender),t&&(i.scale=t),i.viewTranslate=y.Point(e.x,e.y),i.stopRenderTransform=!1):i.animaSliderRender=y.requestAnimationFrame(l)}))}},{key:"renderGlidingTransform",value:function(){var e=this;y.cancelAnimationFrame(e.animaSliderRender);var t=.95,i=.95;e.animaSliderRender=y.requestAnimationFrame((function s(){e.speedX*=t,e.speedY*=i;var n=e.viewTranslate.x;n+=e.speedX;var o=e.viewTranslate.y;if(o+=e.speedY,n>e.boundingBox.left||n<e.boundingBox.right){e.speedX*=-1;var a=n<e.boundingBox.right?e.boundingBox.right:n;n=n>e.boundingBox.left?e.boundingBox.left:a,n+=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>
1e.boundingBox.top?e.boundingBox.top:r,o+=e.speedY,i=.75}e.origin=y.Point(n,o),e.viewTranslate=y.Point(n,o),Math.abs(e.speedX)<.02&&Math.abs(e.speedY)<.02?(y.cancelAnimationFrame(e.animaSliderRender),e.speedX=0,e.speedY=0):e.animaSliderRender=y.requestAnimationFrame(s)}))}},{key:"renderStretchstretchTransform",value:function(){var e=this;y.cancelAnimationFrame(e.animaSliderRender);var t=this.checkOffset(y.Point(e.viewTranslate.x+e.speedX,e.viewTranslate.y+e.speedY),e.scale),i=0,s=0;e.animaSliderRender=y.requestAnimationFrame((function n(){i=.2*i+.15*(t.x-e.viewTranslate.x),s=.2*s+.15*(t.y-e.viewTranslate.y);var o=e.viewTranslate.x+i,a=e.viewTranslate.y+s;e.viewTranslate=y.Point(o,a),Math.abs(i)<.02&&Math.abs(s)<.02?(y.cancelAnimationFrame(e.animaSliderRender),e.viewTranslate=t):e.animaSliderRender=y.requestAnimationFrame(n)}))}},{key:"startDrag",value:function(e,t){y.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,s=this.checkOffset(y.Point(t,i),this.newScale);return this.isBlockDraging=s.x!==t||s.y!==i,t-=.7*(t-s.x),i-=.7*(i-s.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=y.Point(t,i),this.viewTranslate=y.Point(t,i),this.draging=!0,!0}},{key:"action",value:function(e,t){if(this.item)switch(e){case"click":if(t&&"enter"
1===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,s=this.delegate,n=this;switch(s.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="'+s.appName+'" ></div>',window.YT){var r=window.YT,l={autoplay:1,frameborder:0,playlist:i,loop:s.config.sl_video_loop?1:0,rel:0};s.config.sl_video_loop||(delete l.playlist,delete l.loop);var h=new r.Player(i,{videoId:i,playerVars:l,events:{onReady:function(){s.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&s.setVideoPlayer(h,"yt",n),s.onYtStatusChange(e.data)}}});s.setVideoPlayer(h,"yt",n)}else window.onYouTubeIframeAPIReady=function(){var e=window.YT,t={autoplay:1,frameborder:0,playlist:i,loop:s.config.sl_video_loop?1:0,rel:0};s.config.sl_video_loop||(delete t.playlist,delete t.loop);var o=new e.Player(i,{videoId:i,playerVars:t,events:{onReady:function(){s.onYtStatusChange("onReady")},onStateChange:function(e){1===e.data&&s.setVideoPlayer(o,"yt",n),s.onYtStatusChange(e.data)}}})};break;case"vimeo":t=(t=y.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",s.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);s.config.sl_video_loop&&e.setLoop(!0),e.on("play",(function(e){s.onYtStatusChange("onReady")})),e.on("ended",(function(e){s.onYtStatusChange(0)})),e.on("play",(function(t){s.onYtStatusChange(1),s.setVideoPlayer(e,"vimeo",n)}))}}}else if(window.Vimeo){var m=new Vimeo.Player(c);s.config.sl_video_loop&&m.setLoop(!0),m.on("play",(function(e){s.onYtStatusChange("onReady")})),m.on("ended",(function(e){s.onYtStatusChange(0)})),m.on("play",(function(e){s.onYtStatusChange(1),s.setVideoPlayer(m,"vimeo",n)}))}}this.isEmbedContent=!0}}},{key:"removeEmbedVideoContent",value:function(){this.isEmbedContent&&(this.subContentHolder.innerHTML=new Z(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-"}}]),e}(),J=function(){function e(t,i){X(this,e),this.iconSet=e.ICONS,this.config=e.CONFIG,y.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=y.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=y.Size(0,0);var s=document.createElement("div");s.className="".concat(e.classPref,"bg"),this.config.sl_backgroundColor&&(this.background=s,this.background.style.backgroundColor=this.config.sl_backgroundColor,this.view.appendChild(s)),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.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 U(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(y.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}}
1,{key:"viewOfsetY",get:function(){return this.view.getBoundingClientRect().top+y.pageYOffset}},{key:"viewOfsetX",get:function(){return this.view.getBoundingClientRect().left+y.pageXOffset}},{key:"copyRight",value:function(){var t,i=this;return function(s){if(!y.Device.ios||"mouseup"!==s.type){var n,o;s.changedTouches&&s.changedTouches[0]?(n=s.changedTouches[0].pageX,o=s.changedTouches[0].pageY):(n=s.pageX,o=s.pageY),n-=i.viewOfsetX,o-=i.viewOfsetY;var a=i.itemsList[i.itemIndex];if(a.webView&&a.webView===s.target||s.target.className&&"pgc-rev-slider-page-sub-content-holder"===s.target.className||s.target.className&&("lb-video-content"===s.target.className||"lb-audio-content"===s.target.className)){s.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(n,"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=y.findHighestZIndex(i)+1,y.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 s=this;if(this.currentItemIndex=t&&0!==t?0:void 0,this.startItemIndex=t||0,this.itemsList=e,!i)return void s.createLayout();this.createlayoutDelay=setTimeout((function(){s.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(y.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(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoPrev();break;case"next":this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{draging:!0})),this.gotoNext();break;case"enter":case"space":this.firstClick(y.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=y.createPreloaderView(this.config.sl_preloaderColor)).id="".concat(this.appName,"slider_preloader"),this.view.appendChild(t)}else(t=document.getElementById("".concat(this.appName,"slider_preloader")))&&y.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=y.Size(this.view.clientWidth,this.view.clientHeight),y.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(y.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 K(this)}},{key:"initSlider",value:function(){var e,t=0;if(0===this.sliderPages.length)for(t=0;t<3;
1t+=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(),y.isTouchDevice&&(this.slider.addEventListener("touchstart",this.startDragHandler,y.passiveListener),window.addEventListener("touchmove",(function(){}),y.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.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(y.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;y.cancelAnimationFrame(t.animaSliderRender);var i=5*t.speedX,s=5*t.speedY;t.animaSliderRender=y.requestAnimationFrame((function n(){i=.2*i+.15*(e.x-t.scrollViewTranslateX),s=.2*s+.15*(e.y-t.scrollViewTranslateY),t.scrollViewTranslateX+=i,t.scrollViewTranslateY+=s,Math.abs(i)<1&&Math.abs(s)<1&&(t.dragging=!1),Math.abs(i)<.1&&Math.abs(s)<.1?(y.cancelAnimationFrame(t.animaSliderRender),t.scrollViewTranslateX=e.x,t.scrollViewTranslateY=e.y,t.sliderTransitionComplete({target:t.slider})):t.animaSliderRender=y.requestAnimationFrame(n)}))}},{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(y.Point(i,this.scrollViewTranslateY)):(y.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.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 s=i-1>=0?i-1:2,n=i+1<3?i+1:0,o=[s,i,n],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[n].initByItem(this.itemIndex+1<this.itemsAmount?this.itemsList[this.itemIndex+1]:this.config.sl_carouselMode?this.itemsList[0]:void 0),this.sliderPages[s].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){W(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){W(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){W(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(y.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.pageInFocusPrev&&this.pageInFocusPrev!==this.pageInFocus&&this.pageInFocusPrev.action("removeSubContent"),void 0!==this.zoomingPage&&this.zoomingPage!==this.pageInFocus&&(this.zoomingPage.normalize(),this.zoomControll())}}},{key:"mouseWheelHandler",value:function(){var t=this,i=Date.now(),s=[],n=[],o=400,a=0;return t.handlerMWheel=function(r){if(!1!==t.mouseWheelMode||!1!==t.config.sl_mou
1seWheelPagination||t.zoomingPage){r.stopPropagation(),r.preventDefault();var l=y.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===s.length&&s.push(c),c-s[0]<o?(n.length>0&&n[n.length-1]!==h&&(a+=1),n.push(h),s.push(c)):(o=a>3?1100:500,n=[],s=[],a=0),c-i>o&&(h>0?t.gotoNext():t.gotoPrev(),t.appSet.appEventManager.dispatchGMEvent(y.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=y.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)||y.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(!y.Device.ios||"mouseup"!==e.type){var i,s;if(e.changedTouches&&e.changedTouches[0]?(i=e.changedTouches[0].pageX,s=e.changedTouches[0].pageY):(i=e.pageX,s=e.pageY),i-=this.viewOfsetX,s-=this.viewOfsetY,this.firsrTap)return clearTimeout(this.firsrTap),this.firsrTap=void 0,void this.secondClick(y.Point(i,s));this.firsrTap=setTimeout((function(){t.firsrTap=void 0,t.firstClick(y.Point(i,s))}),400)}}},{key:"startDrag",value:function(){var t,i,s,n,o,a,r,l,h,c=this,d=c.viewOfsetY,u=c.viewOfsetX,m=0,g=0,v=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,!(y.Device.ios&&i<=20)){var w,b;if(void 0===a&&(l===s?a=!1:(w=180*Math.atan2(Math.abs(l-s),Math.abs(t-i))/Math.PI,a=w>45)),!c.dragging&&c.zoomingPage){e.preventDefault();var S=Math.abs(i-t)>4?i-t:0,E=Math.abs(s-l)>4?s-l:0;return(S||E)&&(c.zoomingDrag=!0),void(r?c.pageInFocus.zoomByScaleDeltaToPoint(f,y.Point(S,E),y.Point(t,l)):c.zoomingPage&&c.zoomingPage.dragin(y.Point(S,E)))}a?(m=0,(b=Math.abs(s-l)>4?s-l:0)&&(c.dragging=!0),c.config.sl_canRemoved&&(c.scrollViewTranslateY=o-b)):(e.preventDefault(),c.transition=!0,(b=Math.abs(i-t)>4?i-t:0)&&(c.dragging=!0),c.scrollViewTranslateX=n-b,g=v,v=c.scrollViewTranslateX,m=v-g)}}function f(e){if(a=void 0,y.isTouchDevice&&(document.removeEventListener("touchmove",p,y.passiveListener),document.removeEventListener("touchend",f,y.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(
1),r=!1),!c.zoomingPage)if(Math.abs(c.scrollViewTranslateY)<4){var i=c.currentItemIndex,s=y.isTouchDevice?7:1;Math.abs(m)>s&&t===c.currentItemIndex&&(i=m>0?i-1:i+1),c.speedX=m,c.scrollViewTranslateY=0,c.gotoPageByIndex(i,!0)}else{var n=c.scrollViewTranslateY/(c.size.height/2);Math.abs(n)>.2?c.prepareToRemove():c.renderTransformTo(y.Point(c.scrollViewTranslateX,0))}this.dragging=!1}else c.doubleClickController(e);c.zoomingDrag=!1,h=e.type}return function(a){var w,b,S,E;"mousedown"===a.type&&"touchend"===h||(c.zoomingPage=c.pageInFocus.isInScale?c.pageInFocus:void 0,y.cancelAnimationFrame(c.animaSliderRender),t=c.currentItemIndex,a.originalEvent&&(a=a.originalEvent),y.isTouchDevice||a.preventDefault(),a.button&&0!==a.button||(a.touches?!c.dragging&&a.touches.length>1?(r=!0,w=a.touches[0].pageX,b=a.touches[0].pageY,S=a.touches[1].pageX,E=a.touches[1].pageY,l=Math.hypot(w-S,b-E),w+=(S-w)/2,b+=(E-b)/2,c.zoomingPage=c.pageInFocus,c.needHideControlls=c.isControllsShow,c.showControlls(!1)):(w=a.touches[0].pageX,b=a.touches[0].pageY):(w=a.pageX,b=a.pageY),w-=u,b-=d,c.speedX=0,c.speedY=0,m=0,g=0,v=c.scrollViewTranslateX,i=w,s=b,n=c.scrollViewTranslateX,o=c.scrollViewTranslateY,c.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,c,{draging:!0})),c.zoomingPage&&c.zoomingPage.startDrag(y.Point(i,s),l),y.isTouchDevice&&(document.addEventListener("touchmove",p,y.passiveListener),document.addEventListener("touchend",f,y.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 s(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=y.ICONS.PREV_ARR,this.prevButton.childNodes[0].style.fill=t.config.sl_navigationIconColor,this.prevButton.onmouseenter=function(){i(this)},this.prevButton.onmouseleave=function(){s(this)},this.prevButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoPrev(),y.Device.desktop||s(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=y.ICONS.NEXT_ARR,this.nextButton.childNodes[0].style.fill=t.config.sl_navigationIconColor,this.nextButton.onmouseenter=function(){i(this)},this.nextButton.onmouseleave=function(){s(this)},this.nextButton.onclick=function(){t.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,t,{draging:!0})),t.gotoNext(),y.Device.desktop||s(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(y.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(y.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(y.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(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"show"})),this.showHideNaviButton("show")):(this.slider.classList.remove("pgc-show-controls"),this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{controls:"hide"})),y.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(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{prev:"hide"})),this.canPrev=!1,this.prevButton&&(this.prevButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(y.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(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{next:"hide"})),this.canNext=!1,this.nextButton&&(this.nextButton.style.visibility="hidden")):(this.appSet.appEventManager.dispatchGMEvent(y.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(y.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(y.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(y.GMEvent(e.EVENTS.UPDATE_CONTROLS,this,{item:t,itemIndex:this.itemIndex}))}},{key:"resizeHandler",value:function(e){var t=this;this.resizeDelay&&clearTimeout(this.resizeDelay),y.cancelAnimationFrame(this.animaSliderRender),this.resizeDelay=setTimeout((function(){if(t.size=e,t.prevButton&&(t.size.width<
1500?(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.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}}}]),e}(),$=i(2661),Q=i.n($),ee={};function te(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function ie(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?te(Object(i),!0).forEach((function(t){se(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):te(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function se(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function ne(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function oe(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function ae(e,t,i){return t&&oe(e.prototype,t),i&&oe(e,i),Object.defineProperty(e,"prototype",{writable:!1}),e}ee.styleTagTransform=u(),ee.setAttributes=l(),ee.insert=a().bind(null,"head"),ee.domAPI=n(),ee.insertStyleElement=c(),t()(Q(),ee),Q()&&Q().locals&&Q().locals;var re=function(){function e(t,i){ne(this,e),this.delegate=t,this.appSet=this.delegate.appSet,this.appName=t.appName,this.config=e.CONFIG,y.copyProperties(i,this.config);var s='<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=s,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 ae(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),s=i*Math.PI/180,n=51*Math.sin(s),o=-51*Math.cos(s),a=i>180?1:0,r="M 0 0 v -%@ A %@ %@ 1 ".replace(/%@/gi,51),l="".concat(r+a," 1 ").concat(n," ").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;y.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(y.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(y.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),y.Device.desktop||(this.view.style.display="none"),this.view.style.opacity=0,this.status="stop",this.appSet.appEventManager.dispatchGMEvent(y.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))}}]),e}();const le=function(){function e(t,i){var s=this;ne(this,e),this.appSet=t,this.config=e.CONFIG,y.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=y.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,y.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 n=document.createElement("div");n.className="".concat(e.classPref,"bg"),this.background=n,this.backgroundOpacity=1,this.background.style.backgroundColor=this.config.lb_backgroundColor,this.view.appendChild(n),this.content=document.createElement("div"),this.content.className="".concat(e.classPref,"content");var o=J.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=y.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(J.EVENTS.UPDATE_CONTROLS,this,"updateViewControl
1s"),this.appSet.appEventManager.addGMEventListener(J.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.addGMEventListener(J.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.addGMEventListener(re.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.addGMEventListener(re.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.addGMEventListener(R.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),this.slider=new J(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=y.ICONS.PREV_ARR,this.prevButton.onclick=function(){s.updateViewControls({params:{dragging:!0}}),s.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=y.ICONS.NEXT_ARR,this.nextButton.onclick=function(){s.updateViewControls({params:{dragging:!0}}),s.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")),y.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=R.CONFIG;c.isb_itemBgColor=this.config.lb_thumbBarHoverColor,c.isb_block_pan_y=!0,this.thumbsBar=new R(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=re.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 re(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=L.CONFIG;m.im_link=!0,m.im_play=this.config.lb_slideshowEneble,m.im_zoom=y.Device.desktop&&this.config.lb_zoom,m.im_discuss=this.config.lb_discuss,m.
1im_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=!y.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 L(this.appSet,L.MENU_TYPE.LIGHTBOX,m),this.itemMenuWrap.appendChild(this.itemMenu.view),this.appSet.appEventManager.addGMEventListener(L.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.addToStage()}return ae(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,s=t.params.type;if(i&&s){var n,o,a={};switch(a.item=i,s){case"info":a.type="info",this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(e.EVENTS.LB_NEED_MODAL,this,a)),this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(re.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(y.GMEvent(e.EVENTS.LB_IT
1EM_ACTION,this,{type:"like",item:i})),this.itemMenu.updateForItem(i);break;case"bookmark":this.appSet.appEventManager.dispatchGMEvent(y.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(y.GMEvent(e.EVENTS.LB_NEED_MODAL,this,a)),this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(re.EVENTS.PLAY,this,{action:"stop"}));break;case"zoom":"function"==typeof this.sliderZoomSwitch&&this.sliderZoomSwitch();break;case"close":this.prepareToRemove();break;case"play":this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(re.EVENTS.PLAY,this,{}));break;case"download":n=i.url,(o=document.createElement("A")).href=n,o.download=n.substr(n.lastIndexOf("/")+1),document.body.appendChild(o),o.click(),document.body.removeChild(o);break;case"coments":"open"===i.comment_status&&(n="".concat(i.sharelink,"/#comments"),window.open(n,"_self"));break;case"fullscreen":this.appSet.appEventManager.dispatchGMEvent(y.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:y.preventDefault(t),e.slider.remoteControl("space");break;case 13:y.preventDefault(t),e.slider.remoteControl("enter")}},e.handlerKB}},{key:"addToStage",value:function(){var t=this,i=document.getElementsByTagName("body")[0];this.view.style.zIndex=y.findHighestZIndex(i)+1,y.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(L.EVENTS.ITEM_MENU_ACTION,this,"itemMenuActionHandler"),this.appSet.appEventManager.removeGMEventListener(J.EVENTS.UPDATE_CONTROLS,this,"updateViewControls"),this.appSet.appEventManager.removeGMEventListener(J.EVENTS.YT_ON_CHANGE_STATUS,this,"updateYTstatus"),this.appSet.appEventManager.removeGMEventListener(J.EVENTS.REMOVE_LIGHTBOX,this,"prepareToRemove"),this.appSet.appEventManager.removeGMEventListener(re.EVENTS.PLAY,this,"slideShowSwitchHandler"),this.appSet.appEventManager.removeGMEventListener(re.EVENTS.NEXT_SLIDE,this,"slideshowHandler"),this.appSet.appEventManager.removeGMEventListener(R.EVENTS.ITEMS_SCROLL_BAR_ITEM_ACTION,this,"scrollBarHandler"),setTimeout((function(){y.enableBodyScrollSlider(),t.appSet.appEventManager.dispatchGMEvent(y.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(y.GMEvent(e.EVENTS.LB_IT
1EM_ACTION,this,ie(ie({},{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(y.GMEvent(re.EVENTS.PLAY,this,{action:"stop"})),t.params.zoom&&(this.appSet.appEventManager.dispatchGMEvent(y.GMEvent(re.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(y.GMEvent(re.EVENTS.PLAY,this,{action:"stop"})),this.headerFooterStatus=t.params.controls,this.mouseMoveHandler(),t.params.controls){case"show":(y.miniScreen||this.backgroundOpacity<.9)&&this.header.classList.add("".concat(e.classPref,"show")),this.footer.classList.add("".concat(e.classPref,"show"));break;case"hide":(y.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(y.GMEvent(e.EVENTS.LB_IT
1EM_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.config.lb_slideshowAutoPlay&&!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=y.Size(e,0)}this.slider&&this.slider.resizeHandler(y.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_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!(!y.isTouchDevice||y.isiPpad)}}]),e}();function he(e){return he="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},he(e)}function ce(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function de(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function ue(e,t){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},ue(e,t)}function me(e,t){if(t&&("object"===he(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)}function ge(e){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},ge(e)}var ve=window.PGC_SGB,pe=function(e){!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&&ue(e,t)}(a,e);var t,i,s,n,o=(s=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=ge(s);if(n){var i=ge(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return me(this,e)});function a(){return ce(this,a),o.apply(this,arguments)}return t=a,i=[{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),s=0;s<i.length;s+=1){var n=t[i[s]];n.deleteAllEmbedInItems&&n.deleteAllEmbedInItems instanceof Function&&n.deleteAllEmbedInItems(e)}}},{key:"deleteAllEmbetContent",value:function(){a.pausedAllVideoPlayers()}},{key:"pausedAllVideoContent",value:function(){var e=document.getElementsByClassName("thumb-video-content");
1if(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)),s=[e[i],e[t]];e[t]=s[0],e[i]=s[1]}return e}},{key:"timeConverter",value:function(e){var t=new Date(e),i=new Date,s=new Date(Date.now()-864e5),n=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)===s.setHours(0,0,0,0)?"Yesterday, ".concat(r,":").concat(l):n===(new Date).getFullYear()?"".concat(a," ").concat(o,", ").concat(n):"".concat(a," ").concat(o," ").concat(n)}},{key:"request",value:function(e,t,i,s,n){var o=new URL(e);if(i)for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&o.searchParams.set(r,i[r]);var l=new XMLHttpRequest;l.open("GET",o,!0),t&&l.setRequestHeader("X-WP-Nonce",t),l.onreadystatechange=function(){if(4===l.readyState){var e={};200!==l.status?e.error=l.statusText:e.data=l.responseText,s&&(e.params=s),n&&"function"==typeof n&&n(e)}},l.onerror=function(){a.trace("An error occurred while transferring the file.")};try{l.send()}catch(e){a.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)}},s=this;if(this.copyProperties(e,i),i.appName=t,i.sharelink=e.postLink,i.alt=""!==e.title?e.title:void 0,i.title){var n=document.createElement("div");n.innerHTML=i.title,i.title=1===n.childNodes.length?n.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 s.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return s.Size(i.thumb.full.width,i.thumb.full.height)}return s.Size(400,400)}(),i.itemViewThumbSize=function(){if(i.thumb){if(i.thumb.medium)return s.Size(i.thumb.medium.width,i.thumb.medium.height);if(i.thumb.large)return s.Size(i.thumb.large.width,i.thumb.large.height);if(i.thumb.full)return s.Size(i.thumb.full.width,i.thumb.full.height)}return s.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,t,i){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 a.Size(this.poster.full.width,this.poster.full.height);if(this.poster.large)return a.Size(this.poster.large.width,this.poster.large.height)}return this.meta?this.meta.original?a.Size(this.meta.original.width,this.meta.original.height):this.meta.web?a.Size(this.meta.web.width,this.meta.web.height):a.Size(300,300):a.Size(300,300)},getItemViewSize:function(){if("audio"===this.type&&this.poster){if(this.poster.large)return a.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return a.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.web?a.Size(this.meta.web.width,this.meta.web.height):this.meta.original?a.Size(this.meta.original.width,this.meta.original.height):a.Size(300,300):a.Size(300,300)},getItemViewThumbSize:function(){if("audio"===this.type&&this.poster){if(this.poster.medium)return a.Size(this.poster.medium.width,this.poster.medium.height);if(this.poster.large)return a.Size(this.poster.large.width,this.poster.large.height);if(this.poster.full)return a.Size(this.poster.full.width,this.poster.full.height)}return this.meta?this.meta.thumb?a.Size(this.meta.thumb.width,this.meta.thumb.height):this.meta.web?a.Size(this.meta.web.width,this.meta.web.height):this.meta.original?a.Size(this.meta.original.width,this.meta.original.height):a.Size(300,300):a.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.linkTarget=e.linkTarget,this.linkText=e.linkText,this.orignLinkText=e.orignLinkText,"image"===this.type||this.parentType&&"image"===this.parentType){var i,s,n,o=this.link;if(o.match(/youtu\.be/i)||o.match(/youtube\.com/i))i=void 0!==(o=o.split(/(vi\/|v%3D|v=|\/v\/|youtu\.be\/|\/embed\/)/))[2]?o[2].split(/[^0-9a-z_\-]/i)[0]:o[0],s="video/youtube";else if(o.match(/vimeo\.com/i)){var a=o.match(/(www\.)?vimeo.com\/(\d+)($|\/)/);a&&(i=parseInt(a[2],10),s="video/vimeo");var r=o.match(/https:\/\/vimeo.com\/(\d+)\/(\w+)$/);if(r){var l=r[2];l&&i&&(n=l)}}
1void 0!==i?(this.parentType||(this.parentType=this.type),this.type="video",this.mime_type=s,this.videoId=i,this.videoHash=n,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=!(!i||!i.itemViewFullSize),s.comment_status="closed",s.featuredImage=void 0,s.tags=[],this.copyProperties(e,s),s.appName=t,s.idPrefix=void 0,s.albums=[],s.categories=[],s.user=s.author,s.sharelink=s.url,s.orignLinkText="",s.id=parseInt(e.id),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 n=s.description.replace(/\r?\n/g,"<br />");s.description=n}return 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(ve.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.webImg=new Image,s.webImg.setAttribute("draggable","false"),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,t,i){var s,n,o="pgcSgb";if(!(n="A"===t.tagName?t:t.getElementsByTagName("A")[0]))return null;if(n.target&&"_self"!==n.target)return null;if(!1===n.hasAttribute("href"))return null;var r=n.getAttribute("href"),l=n.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=i,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(o,"Id")]="".concat(i,"_").concat(e),n&&(n.dataset["".concat(o,"Id")]="".concat(i,"_").concat(e)),s.itemViewSrc=s.url,s.itemViewSize=a.Size(100,100),s.type="image",s.subtype="image/".concat(s.fileExt),l.alt&&""!==l.alt&&(s.alt=l.alt);var d=t.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=a.Size(l.width?parseInt(l.width):150,l.height?parseInt(l.height):150),l.naturalWi
1dth?(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.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,s={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,s),s}},{key:"Meta",value:function(){return{}}}],null&&de(t.prototype,null),i&&de(t,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(y);const fe=pe;function ye(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function we(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?ye(Object(i),!0).forEach((function(t){be(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):ye(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function be(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Se(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var Ee=fe.trace,Ce="pgcSgb";const _e=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.appEventManager=fe.GMEventsManager(),this.globalPreset=we({},this.attributesLightbox);var t,i=window.PGC_SGB_LIGHTBOX,s=i.lightboxSettigs,n=i.lightboxPreset;if(s&&""!==s?s.useGlobalPreset?n&&""!==n&&(t=n):t=s:n&&""!==n&&(t=n),this.globalPreset=we(we({},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(Ce,"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(Ce,"Id")]=u;var g=this.createGalleryByElement(u,m);g&&(this.galleries[u]={},this.galleries[u].appName=u,this.galleries[u].itemsList=g)}}if(!this.globalPreset.nativGalleryEnable)for(var v in this.galleries)Object.prototype.hasOwnProperty.call(this.galleries,v)&&(v.indexOf("cl")+1||v.indexOf("bl")+1)&&delete this.galleries[v];if(this.globalPreset.nativeAttachment){var p="sl",f=[],y=document.getElementsByTagName("A");if(y.length)for(var w=0;w<y.length;w+=1){var b=y[w];if(b.firstChild&&"IMG"===b.firstChild.tagName){var S=void 0;b.firstChild.dataset["".concat(Ce,"Id")]?this.globalPreset.nativGalleryEnable||delete b.firstChild.dataset["".concat(Ce,"Id")]:(S=b.parentNode&&"FIGURE"===b.parentNode.tagName?fe.GalleryItem(f.length,b.parentNode,p):fe.GalleryItem(f.length,b,p))&&f.push(S)}}f.length>0&&(this.galleries.sl={},this.galleries.sl.appName=p,this.galleries.sl.itemsList=f)}if(this.globalPreset.groupingAllImages){var E=[],C=document.querySelectorAll("[data-pgc-sgb-id]");if(C.length)for(var _=0;_<C.length;_+=1){var I=C[_];if("IMG"===I.tagName){var L=I.dataset["".concat(Ce,"Id")].split("_"),T=L[0],k=parseInt(L.pop());this.galleries[T]&&this.galleries[T].itemsList[k]&&E.push(this.galleries[T].itemsList[k])}}E.length>0&&(this.galleries.gl={},this.galleries.gl.appName="gl",this.galleries.gl.itemsList=E)}var P=this;if(this.popstateHandler=function(){P.modal&&P.modal.prepareToRemove(),P.lightbox?P.lightbox.prepareToRemove():P.itemIDFromHash&&P.openLightboxForItemHash(P.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))}}var t,i;return t=e,(i=[{key:"lightboxConstructor",value:function(){return Ee("** Need override - itemViewConstructor **"),null}},{key:"lightboxConfig",get:function(){return Ee("** Need override - lightboxConfig **"),null}},{key:"attributesLightbox",get:function(){return Ee("** Need override - lightbox Attributes **"),null}},{key:"addLightboxEventListres",value:function(){Ee("** Need override - addLightboxEventListres **")}},{key:"removeLightboxEventListres",value:function(){Ee("** Need override - removeLightboxEventListres **")}},{key:"createGalleryByElement",value:function(e,t){var i="".concat(0===e.indexOf("bl")?"blocks-":"","gallery-item"),s=t.getElementsByClassName(i);0===s.length&&(s=t.getElementsByClassName("wp-block-image"));for(var n=[],o=0;o<s.length;o+=1){var a=fe.GalleryItem(n.length,s[o],e);a&&n.push(a)}return n.length>0?n: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,s=window.innerHeight-t.getBoundingClientRect().bottom<-t.clientHeight||t.getBoundingClientRect().bottom<0&&t.getBoundingClientRect().top<0?t.getBoundingClientRect().top+window.pageYOffset-i:void 0;s&&fe.scrollWindowToY(s)}}}},{key:"itemIDFromHash",get:function(){if(0!==Object.keys(this.galleries).length){var e,t=window.location.hash.indexOf(Ce);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 s=e[2];if(s){var n=s.split("_");n[0]&&(i.index=parseInt(n[0])),n[1]&&(i.id=n[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(Ce,"-").concat(this.lightbox.appName,"-").concat(e.ID)}},{key:"openLightboxForItemHash",value:function(e){var t,i,s=e.galleryName,n=e.index,o=e.id;if(s&&this.galleries[s]){var a=(t=this.galleries[s]).itemsList;if(a&&void 0!==n&&a[n]){if(i=a[n],!o)return this.createLightboxForGallery(t,n);if(i.attId&&i.attId===o)return this.createLightboxForGallery(t,n);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,n)}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 Ee("Hash is deprecated")}},{key:"getIndexById",value:function(e,t){var i=t.itemsList;if(!i||0===i.length)return null;for(var s=0;s<i.length;s+=1){var n=i[s];if(n.attId&&n.attId===e)return s}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,s=0;s<i.itemsList.length;s+=1){var n=i.itemsList[s];n.galId===e.appName&&n.index===t&&(t=s,s=i.itemsList.length)}e=i}if(e.cacheItemsList||(e.cacheItemsList=fe.CacheItemsList()),e.appEventManager=this.appEventManager,1===e.itemsList.length||this.globalPreset.singletonAttachment&&e.appName.indexOf("sl")+1){var o=we({},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],s=parseInt(t[1]),n=this.galleries[i];if(n){var o=this.galleries[i].itemsList;if(!o||!o[s])return;this.createLightboxForGallery(n,s)}}else Ee("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&&(fe.toggleFullScreen(e),this.windowResizeHandler())}},{key:"windowResizeHandler",value:function(){var e=this;clearTimeout(this.resizeTimeOut),fe.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)}}
1])&&Se(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();var Ie=i(8204),Le=i.n(Ie),Te={};Te.styleTagTransform=u(),Te.setAttributes=l(),Te.insert=a().bind(null,"head"),Te.domAPI=n(),Te.insertStyleElement=c(),t()(Le(),Te);const ke=Le()&&Le().locals?Le().locals:void 0;function Pe(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);t&&(s=s.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),i.push.apply(i,s)}return i}function xe(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?Pe(Object(i),!0).forEach((function(t){Me(e,t,i[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):Pe(Object(i)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))}))}return e}function Me(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function Be(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}var Ne=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=xe(xe({},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 s=document.createElement("div");s.className="".concat(e.classPref,"bg"),s.dataset.type="bg",this.view.appendChild(s);var n=".".concat(e.classPref,"button:hover{fill:").concat(this.config.ish_iconColorHover,"}"),o=document.createElement("style");if(o.styleSheet?o.styleSheet.cssText=n:o.appendChild(document.createTextNode(n)),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=fe.ICONS.FB_SVG,this.view.appendChild(a)}if(this.config.ish_twitter){var r=document.createElement("div");r.title="Twitter",r.className="".concat(e.classPref,"button"),r.dataset.type="twitter",r.innerHTML=fe.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=fe.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=fe.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=fe.ICONS.LINK_SVG,this.copy=c,this.view.appendChild(c)}}var t,i,s;return t=e,s=[{key:"classPref",get:function(){var e=ke.classPref;return e.substring(e.lastIndexOf(".")+1,e.lastIndexOf('"'))}},{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}}}],(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")),fe.disableBodyScrollSlider()),this.view.style.zIndex=fe.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,s=document.createElement("div");s.innerText=i,s.style.bottom="0",s.style.position="absolute",s.style.opacity=0,s.id="pgc_copy_link";var n,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"twitter":window.open("https://twitter.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":n=e.url,(o=document.createElement("A")).href=n,o.download=n.substr(n.lastIndexOf("/")+1),document.body.appendChild(o),o.click(),document.body.removeChild(o);break;case"copy":l&&window.open(i,"_blank"),t.view.appendChild(s),window.getSelection().selectAllChildren(document.getElementById("pgc_copy_link"));try{document.execCommand("copy")&&(window.getSelection().removeAllRanges(),t.view.removeChild(s),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||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&&fe.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(fe.GMEvent(e.EVENTS.REMOVE_SHARE_WINDOW,i,{}))}),t?0:300)}}
1])&&Be(t.prototype,i),s&&Be(t,s),Object.defineProperty(t,"prototype",{writable:!1}),e}();const Oe=Ne,ze={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,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 Ae(e){return Ae="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},Ae(e)}function Ve(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function He(e,t){for(var i=0;i<t.length;i++){var s=t[i];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function Ge(e,t){return Ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Ge(e,t)}function Re(e,t){if(t&&("object"===Ae(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)}function Fe(e){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Fe(e)}if(window.PGC_SGB_LIGHTBOX){console.log("%c SimpLy Lightbox v.3.1.1","background: rgba(0,0,0,0.2); color: rgba(255,255,255,1)");var De="pgcSgb";fe.trace,window.addEventListener("load",(function(){var e;window.PGC_SGB_LIGHTBOX.lightbox||(window.PGC_SGB_LIGHTBOX.lightbox=(e=function(e){!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&&Ge(e,t)}(a,e);var t,i,s,n,o=(s=a,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=Fe(s);if(n){var i=Fe(this).constructor;e=Reflect.construct(t,arguments,i)}else e=t.apply(this,arguments);return Re(this,e)});function a(){return Ve(this,a),o.apply(this,arguments)}return t=a,(i=[{key:"lightboxConstructor",value:function(e,t){return new le(e,t)}},{key:"lightboxConfig",get:function(){if(this.lightboxConfigByPreset)return this.lightboxConfigByPreset;var e=le.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_menuBackgroun
1dColor=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_slideshowIndicatorColor=this.globalPreset.slideshowIndicatorColor,e.lb_slideshowIndicatorColorBg=this.globalPreset.slideshowIndicatorColorBg,e.lb_slideshowTimer=this.globalPreset.sliderSlideshowDelay,e}},{key:"attributesLightbox",get:function(){return ze}},{key:"addLightboxEventListres",value:function(){this.appEventManager.addGMEventListener(le.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.appEventManager.addGMEventListener(le.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.appEventManager.addGMEventListener(le.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.appEventManager.addGMEventListener(le.EVENTS.LB_IT
1EM_ACTION,this,"itemActionHandler")}},{key:"removeLightboxEventListres",value:function(){this.appEventManager.removeGMEventListener(le.EVENTS.LB_NEED_MODAL,this,"createModalEventHendler"),this.appEventManager.removeGMEventListener(le.EVENTS.LB_REMOVE_LIGHTBOX,this,"removeLightbox"),this.appEventManager.removeGMEventListener(le.EVENTS.LB_FULLSCREEN_SWITCH,this,"fullscreenSwitch"),this.appEventManager.removeGMEventListener(le.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=Oe.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 s=document.getElementsByTagName("body")[0];i.ish_parentDiv=this.lightbox?this.lightbox.view:s,this.appEventManager.addGMEventListener(Oe.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal"),this.modal=new Oe(this.appEventManager,i),this.modal.initByItem(t)}}},{key:"deleteModal",value:function(){this.modal&&delete this.modal,this.appEventManager.removeGMEventListener(Oe.EVENTS.REMOVE_SHARE_WINDOW,this,"deleteModal")}}])&&He(t.prototype,i),Object.defineProperty(t,"prototype",{writable:!1}),a}(_e),new e)),document.addEventListener("click",(function(e){var t=e.target;"IMG"!==t.tagName&&"A"!==t.tagName||!t.dataset["".concat(De,"Id")]||(e.stopPropagation(),e.preventDefault(),window.PGC_SGB_LIGHTBOX.lightbox&&window.PGC_SGB_LIGHTBOX.lightbox.tryLightboxFor(t.dataset["".concat(De,"Id")]))}),!0)}))}})()})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.