From d93d4bbedf03994652896170c0050619d3eb07cd Mon Sep 17 00:00:00 2001 From: Sodbileg Gansukh Date: Tue, 7 May 2024 12:09:31 +0800 Subject: [PATCH] Fixed gulp error on non existing directory --- assets/built/main.min.js | 2 +- gulpfile.js | 24 ++++++++++++++++++------ package.json | 1 + 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/assets/built/main.min.js b/assets/built/main.min.js index bb43386b..e5b2740b 100644 --- a/assets/built/main.min.js +++ b/assets/built/main.min.js @@ -1 +1 @@ -function dropdown(){const o=window.matchMedia("(max-width: 767px)"),i=document.querySelector(".gh-head-menu"),a=i?.querySelector(".nav");if(a){const e=document.querySelector(".gh-head-logo"),t=a.innerHTML;o.matches&&a.querySelectorAll("li").forEach(function(e,t){e.style.transitionDelay=.03*(t+1)+"s"});const n=function(){if(!o.matches){for(var e=[];a.offsetWidth+64>i.offsetWidth&&a.lastElementChild;)e.unshift(a.lastElementChild),a.lastElementChild.remove();if(e.length){const t=document.createElement("button"),n=(t.setAttribute("class","nav-more-toggle gh-icon-btn"),t.setAttribute("aria-label","More"),t.innerHTML='',document.createElement("div"));n.setAttribute("class","gh-dropdown"),10<=e.length?(document.body.classList.add("is-dropdown-mega"),n.style.gridTemplateRows=`repeat(${Math.ceil(e.length/2)}, 1fr)`):document.body.classList.remove("is-dropdown-mega"),e.forEach(function(e){n.appendChild(e)}),t.appendChild(n),a.appendChild(t),document.body.classList.add("is-dropdown-loaded"),window.addEventListener("click",function(e){document.body.classList.contains("is-dropdown-open")?document.body.classList.remove("is-dropdown-open"):t.contains(e.target)&&document.body.classList.add("is-dropdown-open")})}else document.body.classList.add("is-dropdown-loaded")}};imagesLoaded(e,function(){n()}),window.addEventListener("load",function(){e||n()}),window.addEventListener("resize",function(){setTimeout(()=>{a.innerHTML=t,n()},1)})}}function lightbox(e){document.querySelectorAll(e).forEach(function(e){e.addEventListener("click",function(e){var t=e;t.preventDefault();for(var n,o=[],i=0,a=t.target.closest(".kg-card").previousElementSibling;a&&(a.classList.contains("kg-image-card")||a.classList.contains("kg-gallery-card"));){var r=[];a.querySelectorAll("img").forEach(function(e){r.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),i+=1}),a=a.previousElementSibling,o=r.concat(o)}t.target.classList.contains("kg-image")?o.push({src:t.target.getAttribute("src"),msrc:t.target.getAttribute("src"),w:t.target.getAttribute("width"),h:t.target.getAttribute("height"),el:t.target}):(n=!1,t.target.closest(".kg-gallery-card").querySelectorAll("img").forEach(function(e){o.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e}),n||e===t.target?n=!0:i+=1}));for(var s=t.target.closest(".kg-card").nextElementSibling;s&&(s.classList.contains("kg-image-card")||s.classList.contains("kg-gallery-card"));)s.querySelectorAll("img").forEach(function(e){o.push({src:e.getAttribute("src"),msrc:e.getAttribute("src"),w:e.getAttribute("width"),h:e.getAttribute("height"),el:e})}),s=s.nextElementSibling;e=document.querySelectorAll(".pswp")[0];new PhotoSwipe(e,PhotoSwipeUI_Default,o,{bgOpacity:.9,closeOnScroll:!0,fullscreenEl:!1,history:!1,index:i,shareEl:!1,zoomEl:!1,getThumbBoundsFn:function(e){var e=o[e].el,t=window.pageYOffset||document.documentElement.scrollTop,e=e.getBoundingClientRect();return{x:e.left,y:e.top+t,w:e.width}}}).init()})})}function pagination(e,s,l=!1){const c=document.querySelector(".gh-feed");if(!c)return;let t=!1;async function n(){var t=document.querySelector("link[rel=next]");if(t)try{var e=await(await fetch(t.href)).text(),n=(new DOMParser).parseFromString(e,"text/html"),o=n.querySelectorAll(".gh-feed:not(.gh-featured):not(.gh-related) > *");const a=document.createDocumentFragment(),r=[];o.forEach(function(e){e=document.importNode(e,!0);l&&(e.style.visibility="hidden"),a.appendChild(e),r.push(e)}),c.appendChild(a),s&&s(r,d);var i=n.querySelector("link[rel=next]");i&&i.href?t.href=i.href:(t.remove(),u&&u.remove())}catch(e){throw t.remove(),u&&u.remove(),e}}const o=c.nextElementSibling||c.parentElement.nextElementSibling||document.querySelector(".gh-foot"),u=document.querySelector(".gh-loadmore"),d=(!document.querySelector("link[rel=next]")&&u&&u.remove(),async function(){o.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]")&&await n()});const i=new IntersectionObserver(async function(e){if(!t){if(t=!0,e[0].isIntersecting)if(l)await n();else for(;o.getBoundingClientRect().top<=window.innerHeight&&document.querySelector("link[rel=next]");)await n();t=!1,document.querySelector("link[rel=next]")||i.disconnect()}});e?i.observe(o):u.addEventListener("click",n)}function initParallax(){jarallax(document.querySelectorAll(".has-parallax-feed .gh-card"),{speed:.8})}!function(){var e=document.querySelector(".gh-burger");e&&e.addEventListener("click",function(){document.body.classList.contains("is-head-open")?document.body.classList.remove("is-head-open"):document.body.classList.add("is-head-open")})}(),lightbox(".kg-image-card > .kg-image[width][height], .kg-gallery-image > img"),reframe(document.querySelectorAll(['.gh-content iframe[src*="youtube.com"]','.gh-content iframe[src*="youtube-nocookie.com"]','.gh-content iframe[src*="player.vimeo.com"]','.gh-content iframe[src*="kickstarter.com"][src*="video.html"]',".gh-content object",".gh-content embed"].join(","))),dropdown(),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).jarallax=t()}(this,function(){"use strict";function e(e){"complete"===document.readyState||"interactive"===document.readyState?e():document.addEventListener("DOMContentLoaded",e,{capture:!0,once:!0,passive:!0})}let t;var p=t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};const r=p["navigator"],n=/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(r.userAgent);let o,f;function i(){f=n?(!o&&document.body&&((o=document.createElement("div")).style.cssText="position: fixed; top: -9999px; left: 0; height: 100vh; width: 0;",document.body.appendChild(o)),(o?o.clientHeight:0)||p.innerHeight||document.documentElement.clientHeight):p.innerHeight||document.documentElement.clientHeight}i(),p.addEventListener("resize",i),p.addEventListener("orientationchange",i),p.addEventListener("load",i),e(()=>{i()});const a=[];function s(){a.length&&(a.forEach((e,t)=>{var{instance:e,oldData:n}=e,o=e.$item.getBoundingClientRect(),o={width:o.width,height:o.height,top:o.top,bottom:o.bottom,wndW:p.innerWidth,wndH:f},i=!n||n.wndW!==o.wndW||n.wndH!==o.wndH||n.width!==o.width||n.height!==o.height,n=i||!n||n.top!==o.top||n.bottom!==o.bottom;a[t].oldData=o,i&&e.onResize(),n&&e.onScroll()}),p.requestAnimationFrame(s))}let l=0;class c{constructor(e,t){const n=this,o=(n.instanceID=l,l+=1,n.$item=e,n.defaults={type:"scroll",speed:.5,imgSrc:null,imgElement:".jarallax-img",imgSize:"cover",imgPosition:"50% 50%",imgRepeat:"no-repeat",keepImg:!1,elementInViewport:null,zIndex:-100,disableParallax:!1,disableVideo:!1,videoSrc:null,videoStartTime:0,videoEndTime:0,videoVolume:0,videoLoop:!0,videoPlayOnlyVisible:!0,videoLazyLoading:!0,onScroll:null,onInit:null,onDestroy:null,onCoverImage:null},n.$item.dataset||{}),i={};if(Object.keys(o).forEach(e=>{var t=e.substr(0,1).toLowerCase()+e.substr(1);t&&void 0!==n.defaults[t]&&(i[t]=o[e])}),n.options=n.extend({},n.defaults,i,t),n.pureOptions=n.extend({},n.options),Object.keys(n.options).forEach(e=>{"true"===n.options[e]?n.options[e]=!0:"false"===n.options[e]&&(n.options[e]=!1)}),n.options.speed=Math.min(2,Math.max(-1,parseFloat(n.options.speed))),"string"==typeof n.options.disableParallax&&(n.options.disableParallax=new RegExp(n.options.disableParallax)),n.options.disableParallax instanceof RegExp){const e=n.options.disableParallax;n.options.disableParallax=()=>e.test(r.userAgent)}if("function"!=typeof n.options.disableParallax&&(n.options.disableParallax=()=>!1),"string"==typeof n.options.disableVideo&&(n.options.disableVideo=new RegExp(n.options.disableVideo)),n.options.disableVideo instanceof RegExp){const e=n.options.disableVideo;n.options.disableVideo=()=>e.test(r.userAgent)}"function"!=typeof n.options.disableVideo&&(n.options.disableVideo=()=>!1);let a=n.options.elementInViewport;a&&"object"==typeof a&&void 0!==a.length&&([a]=a),a instanceof Element||(a=null),n.options.elementInViewport=a,n.image={src:n.options.imgSrc||null,$container:null,useImgTag:!1,position:"fixed"},n.initImg()&&n.canInitParallax()&&n.init()}css(t,n){return"string"==typeof n?p.getComputedStyle(t).getPropertyValue(n):(Object.keys(n).forEach(e=>{t.style[e]=n[e]}),t)}extend(n,...o){return n=n||{},Object.keys(o).forEach(t=>{o[t]&&Object.keys(o[t]).forEach(e=>{n[e]=o[t][e]})}),n}getWindowData(){return{width:p.innerWidth||document.documentElement.clientWidth,height:f,y:document.documentElement.scrollTop}}initImg(){var e=this;let t=e.options.imgElement;return(t=t&&"string"==typeof t?e.$item.querySelector(t):t)instanceof Element||(e.options.imgSrc?(t=new Image).src=e.options.imgSrc:t=null),t&&(e.options.keepImg?e.image.$item=t.cloneNode(!0):(e.image.$item=t,e.image.$itemParent=t.parentNode),e.image.useImgTag=!0),!(!e.image.$item&&(null===e.image.src&&(e.image.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",e.image.bgImage=e.css(e.$item,"background-image")),!e.image.bgImage||"none"===e.image.bgImage))}canInitParallax(){return!this.options.disableParallax()}init(){const e=this,t={position:"absolute",top:0,left:0,width:"100%",height:"100%",overflow:"hidden"};let n={pointerEvents:"none",transformStyle:"preserve-3d",backfaceVisibility:"hidden"};if(!e.options.keepImg){const t=e.$item.getAttribute("style");if(t&&e.$item.setAttribute("data-jarallax-original-styles",t),e.image.useImgTag){const t=e.image.$item.getAttribute("style");t&&e.image.$item.setAttribute("data-jarallax-original-styles",t)}}if("static"===e.css(e.$item,"position")&&e.css(e.$item,{position:"relative"}),"auto"===e.css(e.$item,"z-index")&&e.css(e.$item,{zIndex:0}),e.image.$container=document.createElement("div"),e.css(e.image.$container,t),e.css(e.image.$container,{"z-index":e.options.zIndex}),"fixed"===this.image.position&&e.css(e.image.$container,{"-webkit-clip-path":"polygon(0 0, 100% 0, 100% 100%, 0 100%)","clip-path":"polygon(0 0, 100% 0, 100% 100%, 0 100%)"}),e.image.$container.setAttribute("id","jarallax-container-"+e.instanceID),e.$item.appendChild(e.image.$container),e.image.useImgTag?n=e.extend({"object-fit":e.options.imgSize,"object-position":e.options.imgPosition,"max-width":"none"},t,n):(e.image.$item=document.createElement("div"),e.image.src&&(n=e.extend({"background-position":e.options.imgPosition,"background-size":e.options.imgSize,"background-repeat":e.options.imgRepeat,"background-image":e.image.bgImage||`url("${e.image.src}")`},t,n))),"opacity"!==e.options.type&&"scale"!==e.options.type&&"scale-opacity"!==e.options.type&&1!==e.options.speed||(e.image.position="absolute"),"fixed"===e.image.position){const t=function(e){for(var t=[];null!==e.parentElement;)1===(e=e.parentElement).nodeType&&t.push(e);return t}(e.$item).filter(e=>{var e=p.getComputedStyle(e),t=e["-webkit-transform"]||e["-moz-transform"]||e.transform;return t&&"none"!==t||/(auto|scroll)/.test(e.overflow+e["overflow-y"]+e["overflow-x"])});e.image.position=t.length?"absolute":"fixed"}n.position=e.image.position,e.css(e.image.$item,n),e.image.$container.appendChild(e.image.$item),e.onResize(),e.onScroll(!0),e.options.onInit&&e.options.onInit.call(e),"none"!==e.css(e.$item,"background-image")&&e.css(e.$item,{"background-image":"none"}),e.addToParallaxList()}addToParallaxList(){a.push({instance:this}),1===a.length&&p.requestAnimationFrame(s)}removeFromParallaxList(){const n=this;a.forEach((e,t)=>{e.instance.instanceID===n.instanceID&&a.splice(t,1)})}destroy(){var e,t=this,n=(t.removeFromParallaxList(),t.$item.getAttribute("data-jarallax-original-styles"));t.$item.removeAttribute("data-jarallax-original-styles"),n?t.$item.setAttribute("style",n):t.$item.removeAttribute("style"),t.image.useImgTag&&(e=t.image.$item.getAttribute("data-jarallax-original-styles"),t.image.$item.removeAttribute("data-jarallax-original-styles"),e?t.image.$item.setAttribute("style",n):t.image.$item.removeAttribute("style"),t.image.$itemParent)&&t.image.$itemParent.appendChild(t.image.$item),t.image.$container&&t.image.$container.parentNode.removeChild(t.image.$container),t.options.onDestroy&&t.options.onDestroy.call(t),delete t.$item.jarallax}clipContainer(){}coverImage(){var e=this,t=e.image.$container.getBoundingClientRect(),n=t.height,o=e.options["speed"],i="scroll"===e.options.type||"scroll-opacity"===e.options.type;let a=0,r=n,s;return i&&(o<0?(a=o*Math.max(n,f),f{u(document.querySelectorAll("[data-jarallax]"))}),u}),function(){if(document.body.classList.contains("has-background-about")){const e=document.querySelector(".gh-about");if(e){const t=e.querySelector(".gh-about-image");t.naturalWidth||imagesLoaded(t,function(){e.style.setProperty("--about-height",t.clientWidth*t.naturalHeight/t.naturalWidth+"px")})}}}(),initParallax(),function(){var e=document.querySelector("[data-toggle-comments]");e&&e.addEventListener("click",function(){document.body.classList.toggle("comments-opened")})}(),function(){var e=document.querySelector(".gh-article-excerpt");if(e){let t=e.textContent;var n=t.match(/\p{EPres}|\p{ExtPict}/gu);n&&(n.forEach(function(e){t=t.replace(e,`${e}`)}),e.innerHTML=t)}}(),pagination(!0,initParallax),function(e,t){"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){function e(){}var t=e.prototype;return t.on=function(e,t){var n;return e&&t&&((n=(n=this._events=this._events||{})[e]=n[e]||[]).includes(t)||n.push(t)),this},t.once=function(e,t){var n;return e&&t&&(this.on(e,t),((n=this._onceEvents=this._onceEvents||{})[e]=n[e]||{})[t]=!0),this},t.off=function(e,t){e=this._events&&this._events[e];return e&&e.length&&-1!=(t=e.indexOf(t))&&e.splice(t,1),this},t.emitEvent=function(e,t){let n=this._events&&this._events[e];if(n&&n.length){n=n.slice(0),t=t||[];var o,i=this._onceEvents&&this._onceEvents[e];for(o of n)i&&i[o]&&(this.off(e,o),delete i[o]),o.apply(this,t)}return this},t.allOff=function(){return delete this._events,delete this._onceEvents,this},e}),function(e,t){"object"==typeof module&&module.exports?module.exports=t(e,require("ev-emitter")):e.imagesLoaded=t(e,e.EvEmitter)}("undefined"!=typeof window?window:this,function(t,e){let a=t.jQuery,r=t.console;function s(e,t,n){if(!(this instanceof s))return new s(e,t,n);let o=e;var i;(o="string"==typeof e?document.querySelectorAll(e):o)?(this.elements=(i=o,Array.isArray(i)?i:"object"==typeof i&&"number"==typeof i.length?[...i]:[i]),this.options={},"function"==typeof t?n=t:Object.assign(this.options,t),n&&this.on("always",n),this.getImages(),a&&(this.jqDeferred=new a.Deferred),setTimeout(this.check.bind(this))):r.error("Bad element for imagesLoaded "+(o||e))}(s.prototype=Object.create(e.prototype)).getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)};const i=[1,9,11],l=(s.prototype.addElementImages=function(e){"IMG"===e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t,n,o=e["nodeType"];if(o&&i.includes(o)){for(t of e.querySelectorAll("img"))this.addImage(t);if("string"==typeof this.options.background)for(n of e.querySelectorAll(this.options.background))this.addElementBackgroundImages(n)}},/url\((['"])?(.*?)\1\)/gi);function n(e){this.img=e}function o(e,t){this.url=e,this.element=t,this.img=new Image}return s.prototype.addElementBackgroundImages=function(t){var n=getComputedStyle(t);if(n){let e=l.exec(n.backgroundImage);for(;null!==e;){var o=e&&e[2];o&&this.addBackground(o,t),e=l.exec(n.backgroundImage)}}},s.prototype.addImage=function(e){e=new n(e);this.images.push(e)},s.prototype.addBackground=function(e,t){e=new o(e,t);this.images.push(e)},s.prototype.check=function(){if(this.progressedCount=0,this.hasAnyBroken=!1,this.images.length){let t=(e,t,n)=>{setTimeout(()=>{this.progress(e,t,n)})};this.images.forEach(function(e){e.once("progress",t),e.check()})}else this.complete()},s.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount===this.images.length&&this.complete(),this.options.debug&&r&&r.log("progress: "+n,e,t)},s.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred&&(e=this.hasAnyBroken?"reject":"resolve",this.jqDeferred[e](this))},(n.prototype=Object.create(e.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.img.crossOrigin&&(this.proxyImage.crossOrigin=this.img.crossOrigin),this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.currentSrc||this.img.src)},n.prototype.getIsImageComplete=function(){return this.img.complete&&this.img.naturalWidth},n.prototype.confirm=function(e,t){this.isLoaded=e;e=this.img.parentNode,e="PICTURE"===e.nodeName?e:this.img;this.emitEvent("progress",[this,e,t])},n.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(o.prototype=Object.create(n.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},o.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},o.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},(s.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((a=e).fn.imagesLoaded=function(e,t){return new s(this,e,t).jqDeferred.promise(a(this))})})(),s}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof exports?module.exports=t():e.PhotoSwipeUI_Default=t()}(this,function(){"use strict";return function(o,s){function e(e){if(A)return!0;e=e||window.event,T.timeToIdle&&T.mouseUsed&&!x&&l();for(var t,n,o=(e.target||e.srcElement).getAttribute("class")||"",i=0;i