@appartmint/mint
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -72,4 +72,8 @@ /** | ||
static updateArray(original: any[], update?: any[], key?: string): any; | ||
/** | ||
* Get an object's key by value | ||
*/ | ||
static getKeyByValue(object: any, value: any): string | undefined; | ||
} | ||
export default MintObject; | ||
//# sourceMappingURL=object.d.ts.map |
@@ -1373,2 +1373,8 @@ (function webpackUniversalModuleDefinition(root, factory) { | ||
} | ||
/** | ||
* Get an object's key by value | ||
*/ | ||
static getKeyByValue(object, value) { | ||
return Object.keys(object).find(key => object[key] === value); | ||
} | ||
} | ||
@@ -1375,0 +1381,0 @@ exports.MintObject = MintObject; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mint=t():e.mint=t()}(self,(()=>(()=>{"use strict";var e={870:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintHeader=void 0;const s=i(573),n=i(17);class l{constructor(e){this.settings={from:s.EMintSide.Top,fixed:!0},this.el={},this.settings=Object.assign(Object.assign({},this.settings),e),this.attachElements(),this.attachEvents(),this.addClasses()}attachElements(){var e;this.el.html=document.querySelector("html"),this.el.body=document.querySelector("body"),this.el.header=document.getElementById("mint-header"),this.el.mobileButton=(null===(e=this.el.header)||void 0===e?void 0:e.querySelector(n.MintSelectors.controls("mint-wrapper")))||null,this.el.wrapper=document.getElementById("mint-wrapper")}attachEvents(){var e,t,i,s;window.addEventListener("resize",n.MintEvent.throttleEvent(this.eHandleResize.bind(this),n.MintSettings.delay.default)),window.addEventListener("scroll",n.MintEvent.throttleEvent(this.eHandleScroll.bind(this),n.MintSettings.delay.default,{trailing:!1}));let l=null===(e=this.el.header)||void 0===e?void 0:e.querySelectorAll(n.MintSelectors.focusable),a=null==l?void 0:l[(null==l?void 0:l.length)-1];null==a||a.addEventListener("keydown",n.MintEvent.throttleEvent(this.eWrapTab.bind(this))),null==l||l.forEach((e=>{e.addEventListener("keydown",n.MintEvent.throttleEvent(this.eHandleKeypress.bind(this)))}));let r=null===(t=this.el.wrapper)||void 0===t?void 0:t.querySelectorAll(n.MintSelectors.controls());null==r||r.forEach((e=>{e.addEventListener("click",n.MintEvent.throttleEvent(this.eToggleMenu.bind(this),n.MintSettings.delay.slow,{trailing:!1}))})),null===(i=this.el.mobileButton)||void 0===i||i.addEventListener("click",n.MintEvent.throttleEvent(this.eToggleMobileMenu.bind(this),n.MintSettings.delay.slow,{trailing:!1})),null===(s=this.el.wrapper)||void 0===s||s.addEventListener("transitionend",this.eTransitionEnd.bind(this))}addClasses(){var e,t,i,n,l;null===(e=this.el.header)||void 0===e||e.classList.remove("mint-top","mint-right","mint-bottom","mint-left"),null===(t=this.el.header)||void 0===t||t.classList.add(`mint-${s.EMintSide[null!==(i=this.settings.from)&&void 0!==i?i:0].toLowerCase()}`),this.settings.fixed&&(null===(n=this.el.body)||void 0===n||n.classList.add("mint-fixed")),this.settings.tray&&(null===(l=this.el.header)||void 0===l||l.classList.add("mint-tray"))}setMobileMenu(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;let i=e?"true":"false",l=e?"close menu":"open menu";null===(t=this.el.mobileButton)||void 0===t||t.setAttribute("aria-expanded",i),setTimeout((()=>{var e;null===(e=this.el.mobileButton)||void 0===e||e.setAttribute("aria-label",l)}),n.MintSettings.delay.fast),e?(!0!==this.settings.fixed&&window.scroll({top:0,left:0,behavior:"smooth"}),setTimeout((()=>{if(this.el.html){let e=n.MintWindow.width()<=n.MintSettings.break.sm,t="auto";this.settings.tray?e&&(t="hidden"):t="hidden",this.el.html.style.overflow=t}}),this.settings.from===s.EMintSide.Left?n.MintSettings.delay.default:n.MintSettings.delay.instant),this.el.wrapper&&(this.el.wrapper.style.display="flex"),requestAnimationFrame((()=>{var e;null===(e=this.el.wrapper)||void 0===e||e.classList.add("mint-open")}))):(this.el.html&&(this.el.html.style.overflow="auto"),requestAnimationFrame((()=>{var e;null===(e=this.el.wrapper)||void 0===e||e.classList.remove("mint-open")})),this.closeAllMenus())}toggleMobileMenu(){var e,t;this.setMobileMenu("false"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}setMenu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t?"true":"false",s=null==e?void 0:e.nextElementSibling;e&&s&&(e.setAttribute("aria-expanded",i),t?n.MintDisplay.show(s):(n.MintDisplay.hide(s),this.closeSubMenus(e)))}toggleMenu(e){var t;this.setMenu(e,"true"!==(null===(t=null==e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}closeSubMenus(e){let t=null==e?void 0:e.nextElementSibling;(null==t?void 0:t.querySelectorAll(n.MintSelectors.subMenuButtons)).forEach((e=>{var i;(null===(i=e.parentElement)||void 0===i?void 0:i.parentElement)===t&&this.setMenu(e)}))}closeSiblingMenus(e){var t;let i=null==e?void 0:e.parentElement;(null===(t=null==i?void 0:i.parentElement)||void 0===t?void 0:t.querySelectorAll(n.MintSelectors.subMenuButtons)).forEach((t=>{t!==e&&this.setMenu(t)}))}closeAllMenus(){var e;let t=null===(e=this.el.wrapper)||void 0===e?void 0:e.querySelectorAll(n.MintSelectors.subMenuButtons);null==t||t.forEach((e=>{this.setMenu(e)}))}openClosestMenu(){var e;let t=document.activeElement,i=null==t?void 0:t.nextElementSibling,s="true"===(null===(e=null==t?void 0:t.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase());if("mint-wrapper"===(null==t?void 0:t.getAttribute("aria-controls"))&&(i=this.el.wrapper),(null==t?void 0:t.getAttribute("aria-controls"))&&i&&!s){t.click();let e=i.querySelector(n.MintSelectors.focusable);null==e||e.focus()}}closeClosestMenu(){var e,t;let i=document.activeElement,s=null==i?void 0:i.closest(n.MintSelectors.subMenu),l=(null==s?void 0:s.previousElementSibling)?s.previousElementSibling:this.el.mobileButton;(null==i?void 0:i.getAttribute("aria-controls"))&&"true"===(null===(e=null==i?void 0:i.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase())&&(l=i),"true"===(null===(t=null==l?void 0:l.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())&&(null==l||l.click(),null==l||l.focus())}toggleClosestMenu(){var e,t;"true"===(null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())?this.closeClosestMenu():this.openClosestMenu()}eHandleResize(){var e,t;let i="true"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()),s=n.MintWindow.width()<=n.MintSettings.break.sm,l="auto";i&&(this.settings.tray?s&&(l="hidden"):l="hidden"),this.el.html&&(this.el.html.style.overflow=l)}eHandleScroll(){this.closeAllMenus()}eWrapTab(e){var t;"tab"!==e.key.toLowerCase()||e.shiftKey||(null===(t=this.el.mobileButton)||void 0===t||t.focus(),document.activeElement===this.el.mobileButton&&e.preventDefault())}eHandleButtonKeypress(e){var t;let i=e.target,s=null==i?void 0:i.closest("li");switch(e.key.toLowerCase()){case"escape":(null==s?void 0:s.classList.contains("mint-open"))?this.setMenu(s):(this.setMobileMenu(),null===(t=this.el.menuButton)||void 0===t||t.focus());break;case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":null==i||i.click()}}eHandleLinkKeypress(e){let t=e.target;switch(e.key.toLowerCase()){case"escape":case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":null==t||t.click()}}eHandleKeypress(e){"tab"!==e.key.toLowerCase()&&e.preventDefault();const t=e.target;switch(null==t?void 0:t.tagName.toLowerCase()){case"a":this.eHandleLinkKeypress(e);break;case"button":this.eHandleButtonKeypress(e)}}eToggleMobileMenu(){this.toggleMobileMenu()}eToggleMenu(e){let t=e.target;this.closeSiblingMenus(t),this.toggleMenu(t)}eTransitionEnd(){var e;!1===(null===(e=this.el.wrapper)||void 0===e?void 0:e.classList.contains("mint-open"))&&(this.el.wrapper.style.display="none")}}t.MintHeader=l,t.default=l},940:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(870),t)},573:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(22),t)},22:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.EMintSide=void 0,(i=t.EMintSide||(t.EMintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},709:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(940),t),n(i(573),t),n(i(231),t),n(i(17),t)},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},231:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(54),t),n(i(708),t)},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.price=0,this.level=0,this.size=0,this.num=0,this.width=0,this.height=0,this.centered=!1,this.disabled=!1,this.private=!1,this.attr={},this.params={},this.options={},this.lists={},this.paragraphs=[],this.classes=[],this.items=[],this.images=[],this.buttons=[]}}t.MintItem=i,t.default=i},139:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintDisplay=void 0;const s=i(573),n=i(110);class l{static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.MintSettings.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.EMintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.MintSettings.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.EMintSide.Top;if(e){let n=e.scrollHeight,l=e.scrollWidth,a=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height=`${n}px`:e.style.width=`${l}px`,e.style.transition=a,requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}}t.MintDisplay=l,t.default=l},376:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MintEvent=void 0;const n=s(i(110));class l{static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default;return function(s){t&&clearTimeout(t),t=setTimeout(e,i,s)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default;return l.debounce(e,t)}static throttle(e){let t,i,s,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default,r=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==r?void 0:r.leading)?0:(new Date).getTime(),l=0,s=e.apply(t,i),l||(t=i=null)};return function(){let n=(new Date).getTime();o||!1!==(null==r?void 0:r.leading)||(o=n);let u=a-n+o;return t=this,i=arguments,u<=0||u>a?(l&&(clearTimeout(l),l=0),o=n,s=e.apply(t,i),l||(t=i=null)):l||!1===(null==r?void 0:r.trailing)||(l=window.setTimeout(d,u)),s}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return l.throttle(e,t,i)}}t.MintEvent=l,t.default=l},4:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MintIcon=void 0;const n=s(i(982));class l{static append(e,t){document.querySelectorAll(t).forEach((t=>{let i=document.createElement("i");i.classList.add(...e.split(" ")),t.querySelector("i")||t.appendChild(i),i.classList.contains("fa-up-right-from-square")&&t.setAttribute("target","_blank")}))}static update(e){let t=n.default.removeValues(Object.assign(Object.assign({},this.icons),e),[!1]);Object.keys(t).forEach((e=>{this.append(t[e],e)}))}static remove(e,t){document.querySelectorAll(t).forEach((e=>{let t=e.querySelector("i");t&&t.remove()}))}}t.MintIcon=l,l.icons={'a[href^="mailto:"]':"far fa-envelope",'a[href^="tel:"]':"fas fa-phone-flip",'a[href^="sms:"]':"far fa-message",'a[href^="https://maps"]':"fas fa-map-location-dot",'a[href^="http"]':"fas fa-up-right-from-square"},t.default=l},17:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(139),t),n(i(376),t),n(i(4),t),n(i(718),t),n(i(683),t),n(i(982),t),n(i(85),t),n(i(378),t),n(i(110),t),n(i(226),t),n(i(505),t)},718:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintList=void 0;class i{static shuffleCopy(e){let t=[...e];for(let e=t.length-1;e>0;e--){const i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t}static filter(e,t){let i=0;for(let s=0;s<e.length;s++)t(e[s])&&(e[i++]=e[s]);return e.length=i,e}}t.MintList=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.MintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;let s=!0;return i.forEach((i=>{e[i]!==t[i]&&(s=!1)})),s}static isSuperset(e,t){let s=!0;if(e===t)return s;try{if(0===Object.keys(t).length)return!s}catch(e){return!s}return Object.keys(t).forEach((n=>{s=s&&i.isSuperset(e[n],t[n])})),s}static remove(e,t){return this.removeKeys(e,t)}static removeKeys(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(s)||(i[s]=e[s]),i)),{})}static removeValues(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(e[s])||(i[s]=e[s]),i)),{})}static sort(e,t){return this.sortKeys(e,t)}static sortKeys(e,t){return Object.keys(e).sort(t).reduce(((t,i)=>(t[i]=e[i],t)),{})}static sortValues(e,t){return Object.keys(e).sort(((i,s)=>t(e[i],e[s]))).reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(e[s])&&(i[s]=e[s]),i)),{})}static updateArray(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(null==t?void 0:t.length){const s=t.reduce(((e,t)=>{var s;return Object.assign(Object.assign({},e),{[null!==(s=null==t?void 0:t[i])&&void 0!==s?s:""]:t})}),{}),n=e.filter((e=>{var t;return!s[null!==(t=null==e?void 0:e[i])&&void 0!==t?t:""]}));null==n||n.forEach((t=>{const i=e.indexOf(t);"number"==typeof i&&-1!==i&&e.splice(i,1)})),e.forEach((e=>{var t,n;s[null!==(t=null==e?void 0:e[i])&&void 0!==t?t:""]&&Object.assign(e,s[null!==(n=null==e?void 0:e[i])&&void 0!==n?n:""])}))}else null==t||t.forEach((t=>e.push(t)));const s=null==t?void 0:t.filter((t=>!e.some((e=>(null==e?void 0:e[i])===(null==t?void 0:t[i])))));null==s||s.forEach((t=>e.push(t)))}}t.MintObject=i,t.default=i},85:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintScroll=void 0;class i{static toTop(){window.scrollTo(0,0)}static toBottom(){window.scrollTo(0,document.body.scrollHeight)}static showElements(){requestAnimationFrame((()=>{let e=document.querySelectorAll(".mint-fall-in:not(.mint-show)"),t=[];for(let i=0;i<e.length;i++)e[i].getBoundingClientRect().top<0?e[i].classList.add("mint-show"):e[i].getBoundingClientRect().top<3*window.innerHeight/4&&t.push(e[i]);for(let e=0;e<t.length;e++)setTimeout((()=>{t[e].classList.add("mint-show")}),200*e+e*e*20)}))}}t.MintScroll=i,t.default=i},378:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MintSelectors=void 0;class s{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getFocusables(e){let t;return t=e?Array.from(e.querySelectorAll(this.focusable)):Array.from(document.querySelectorAll(this.focusable)),t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.MintSelectors=s,i=s,s.lib="mint",s.pre=`${i.lib}-`,s.disabled="[disabled]",s.hasControls="[aria-controls]",s.hasExpanded="[aria-expanded]",s.hasLink="[href]",s.hasRouterLink="[routerLink]",s.hasId="[id]",s.notTabbable='[tabindex^="-"]',s.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,s.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),s.subMenuButtons=`button${i.hasControls}`,s.subMenu=`${i.subMenuButtons} + ul${i.hasId}`,t.default=s},110:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MintSettings=void 0;class s{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay)),e.break&&Object.keys(e.break).length&&Object.values(e.break).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.break=Object.assign(Object.assign({},this.break),e.break))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.MintSettings=s,i=s,s.delayBase=0,s.delayStep=100,s.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},s.break={z:0,xs:480,sm:768,md:1024,lg:1200,xl:1440},t.default=s},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintText=void 0;class i{static slug(e){var t;return null!==(t=null==e?void 0:e.toLowerCase().replace(/\W+/g,"-").replace(/^-+|-+$/g,""))&&void 0!==t?t:""}static phone(e){var t,i;const s=null!==(t=null==e?void 0:e.toString().trim())&&void 0!==t?t:"";if("("===s||""===s)return s;let n=null!==(i=s.replace(/\D/g,""))&&void 0!==i?i:"",l="";n.length>10&&(l+=`+${n.slice(0,n.length-10)} `,n=n.slice(n.length-10));for(var a=0;a<n.length;a++){switch(a){case 0:l+="(";break;case 3:l+=") ";break;case 6:l+="-"}l+=n[a]}switch(s[s.length-1]){case")":3===a&&(l+=") ");break;case"-":6===a&&(l+="-")}return l}static pluralize(e){return e.endsWith("ies")||e.endsWith("es")||e.endsWith("s")&&!e.endsWith("us")&&!e.endsWith("is")&&!e.endsWith("ss")?e:e.endsWith("y")&&!["a","e","i","o","u"].includes(e.charAt(e.length-2))?e.slice(0,-1)+"ies":e.endsWith("s")||e.endsWith("sh")||e.endsWith("ch")||e.endsWith("x")||e.endsWith("z")?e+"es":e+"s"}static titleCase(e){return e.toLowerCase().replace(/(?:^|\s)\S/g,(e=>e.toUpperCase()))}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.MintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintWindow=void 0;class i{static width(){const e=document.body.getBoundingClientRect().width%1;return window.innerWidth+e}}t.MintWindow=i,t.default=i},491:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(709),t)}},t={};return function i(s){var n=t[s];if(void 0!==n)return n.exports;var l=t[s]={exports:{}};return e[s].call(l.exports,l,l.exports,i),l.exports}(491)})())); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.mint=t():e.mint=t()}(self,(()=>(()=>{"use strict";var e={870:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintHeader=void 0;const s=i(573),n=i(17);class l{constructor(e){this.settings={from:s.EMintSide.Top,fixed:!0},this.el={},this.settings=Object.assign(Object.assign({},this.settings),e),this.attachElements(),this.attachEvents(),this.addClasses()}attachElements(){var e;this.el.html=document.querySelector("html"),this.el.body=document.querySelector("body"),this.el.header=document.getElementById("mint-header"),this.el.mobileButton=(null===(e=this.el.header)||void 0===e?void 0:e.querySelector(n.MintSelectors.controls("mint-wrapper")))||null,this.el.wrapper=document.getElementById("mint-wrapper")}attachEvents(){var e,t,i,s;window.addEventListener("resize",n.MintEvent.throttleEvent(this.eHandleResize.bind(this),n.MintSettings.delay.default)),window.addEventListener("scroll",n.MintEvent.throttleEvent(this.eHandleScroll.bind(this),n.MintSettings.delay.default,{trailing:!1}));let l=null===(e=this.el.header)||void 0===e?void 0:e.querySelectorAll(n.MintSelectors.focusable),a=null==l?void 0:l[(null==l?void 0:l.length)-1];null==a||a.addEventListener("keydown",n.MintEvent.throttleEvent(this.eWrapTab.bind(this))),null==l||l.forEach((e=>{e.addEventListener("keydown",n.MintEvent.throttleEvent(this.eHandleKeypress.bind(this)))}));let r=null===(t=this.el.wrapper)||void 0===t?void 0:t.querySelectorAll(n.MintSelectors.controls());null==r||r.forEach((e=>{e.addEventListener("click",n.MintEvent.throttleEvent(this.eToggleMenu.bind(this),n.MintSettings.delay.slow,{trailing:!1}))})),null===(i=this.el.mobileButton)||void 0===i||i.addEventListener("click",n.MintEvent.throttleEvent(this.eToggleMobileMenu.bind(this),n.MintSettings.delay.slow,{trailing:!1})),null===(s=this.el.wrapper)||void 0===s||s.addEventListener("transitionend",this.eTransitionEnd.bind(this))}addClasses(){var e,t,i,n,l;null===(e=this.el.header)||void 0===e||e.classList.remove("mint-top","mint-right","mint-bottom","mint-left"),null===(t=this.el.header)||void 0===t||t.classList.add(`mint-${s.EMintSide[null!==(i=this.settings.from)&&void 0!==i?i:0].toLowerCase()}`),this.settings.fixed&&(null===(n=this.el.body)||void 0===n||n.classList.add("mint-fixed")),this.settings.tray&&(null===(l=this.el.header)||void 0===l||l.classList.add("mint-tray"))}setMobileMenu(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];var t;let i=e?"true":"false",l=e?"close menu":"open menu";null===(t=this.el.mobileButton)||void 0===t||t.setAttribute("aria-expanded",i),setTimeout((()=>{var e;null===(e=this.el.mobileButton)||void 0===e||e.setAttribute("aria-label",l)}),n.MintSettings.delay.fast),e?(!0!==this.settings.fixed&&window.scroll({top:0,left:0,behavior:"smooth"}),setTimeout((()=>{if(this.el.html){let e=n.MintWindow.width()<=n.MintSettings.break.sm,t="auto";this.settings.tray?e&&(t="hidden"):t="hidden",this.el.html.style.overflow=t}}),this.settings.from===s.EMintSide.Left?n.MintSettings.delay.default:n.MintSettings.delay.instant),this.el.wrapper&&(this.el.wrapper.style.display="flex"),requestAnimationFrame((()=>{var e;null===(e=this.el.wrapper)||void 0===e||e.classList.add("mint-open")}))):(this.el.html&&(this.el.html.style.overflow="auto"),requestAnimationFrame((()=>{var e;null===(e=this.el.wrapper)||void 0===e||e.classList.remove("mint-open")})),this.closeAllMenus())}toggleMobileMenu(){var e,t;this.setMobileMenu("false"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}setMenu(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=t?"true":"false",s=null==e?void 0:e.nextElementSibling;e&&s&&(e.setAttribute("aria-expanded",i),t?n.MintDisplay.show(s):(n.MintDisplay.hide(s),this.closeSubMenus(e)))}toggleMenu(e){var t;this.setMenu(e,"true"!==(null===(t=null==e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()))}closeSubMenus(e){let t=null==e?void 0:e.nextElementSibling;(null==t?void 0:t.querySelectorAll(n.MintSelectors.subMenuButtons)).forEach((e=>{var i;(null===(i=e.parentElement)||void 0===i?void 0:i.parentElement)===t&&this.setMenu(e)}))}closeSiblingMenus(e){var t;let i=null==e?void 0:e.parentElement;(null===(t=null==i?void 0:i.parentElement)||void 0===t?void 0:t.querySelectorAll(n.MintSelectors.subMenuButtons)).forEach((t=>{t!==e&&this.setMenu(t)}))}closeAllMenus(){var e;let t=null===(e=this.el.wrapper)||void 0===e?void 0:e.querySelectorAll(n.MintSelectors.subMenuButtons);null==t||t.forEach((e=>{this.setMenu(e)}))}openClosestMenu(){var e;let t=document.activeElement,i=null==t?void 0:t.nextElementSibling,s="true"===(null===(e=null==t?void 0:t.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase());if("mint-wrapper"===(null==t?void 0:t.getAttribute("aria-controls"))&&(i=this.el.wrapper),(null==t?void 0:t.getAttribute("aria-controls"))&&i&&!s){t.click();let e=i.querySelector(n.MintSelectors.focusable);null==e||e.focus()}}closeClosestMenu(){var e,t;let i=document.activeElement,s=null==i?void 0:i.closest(n.MintSelectors.subMenu),l=(null==s?void 0:s.previousElementSibling)?s.previousElementSibling:this.el.mobileButton;(null==i?void 0:i.getAttribute("aria-controls"))&&"true"===(null===(e=null==i?void 0:i.getAttribute("aria-expanded"))||void 0===e?void 0:e.toLowerCase())&&(l=i),"true"===(null===(t=null==l?void 0:l.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())&&(null==l||l.click(),null==l||l.focus())}toggleClosestMenu(){var e,t;"true"===(null===(t=null===(e=document.activeElement)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase())?this.closeClosestMenu():this.openClosestMenu()}eHandleResize(){var e,t;let i="true"===(null===(t=null===(e=this.el.mobileButton)||void 0===e?void 0:e.getAttribute("aria-expanded"))||void 0===t?void 0:t.toLowerCase()),s=n.MintWindow.width()<=n.MintSettings.break.sm,l="auto";i&&(this.settings.tray?s&&(l="hidden"):l="hidden"),this.el.html&&(this.el.html.style.overflow=l)}eHandleScroll(){this.closeAllMenus()}eWrapTab(e){var t;"tab"!==e.key.toLowerCase()||e.shiftKey||(null===(t=this.el.mobileButton)||void 0===t||t.focus(),document.activeElement===this.el.mobileButton&&e.preventDefault())}eHandleButtonKeypress(e){var t;let i=e.target,s=null==i?void 0:i.closest("li");switch(e.key.toLowerCase()){case"escape":(null==s?void 0:s.classList.contains("mint-open"))?this.setMenu(s):(this.setMobileMenu(),null===(t=this.el.menuButton)||void 0===t||t.focus());break;case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":null==i||i.click()}}eHandleLinkKeypress(e){let t=e.target;switch(e.key.toLowerCase()){case"escape":case"arrowleft":this.closeClosestMenu();break;case"arrowright":this.openClosestMenu();break;case"enter":case"space":null==t||t.click()}}eHandleKeypress(e){"tab"!==e.key.toLowerCase()&&e.preventDefault();const t=e.target;switch(null==t?void 0:t.tagName.toLowerCase()){case"a":this.eHandleLinkKeypress(e);break;case"button":this.eHandleButtonKeypress(e)}}eToggleMobileMenu(){this.toggleMobileMenu()}eToggleMenu(e){let t=e.target;this.closeSiblingMenus(t),this.toggleMenu(t)}eTransitionEnd(){var e;!1===(null===(e=this.el.wrapper)||void 0===e?void 0:e.classList.contains("mint-open"))&&(this.el.wrapper.style.display="none")}}t.MintHeader=l,t.default=l},940:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(870),t)},573:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(22),t)},22:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.EMintSide=void 0,(i=t.EMintSide||(t.EMintSide={}))[i.Top=0]="Top",i[i.Right=1]="Right",i[i.Bottom=2]="Bottom",i[i.Left=3]="Left"},709:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(940),t),n(i(573),t),n(i(231),t),n(i(17),t)},54:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.mintColor=void 0;class i{constructor(e){this.r="number"==typeof e.r?Math.max(Math.min(e.r,i.hexBase**2-1),0):0,this.g="number"==typeof e.g?Math.max(Math.min(e.g,i.hexBase**2-1),0):0,this.b="number"==typeof e.b?Math.max(Math.min(e.b,i.hexBase**2-1),0):0,this.a="number"==typeof e.a?Math.max(Math.min(e.a,1),0):1,"string"==typeof e.color&&this.stringConstructor(e.color)}stringConstructor(e){e.startsWith("#")?this.hexConstructor(e):(~e.indexOf("linear-gradient")&&(e=e.substring(e.indexOf("linear-gradient"),e.length)),this.rgbConstructor(e))}hexConstructor(e){switch(e.length){case 1:case 5:case 6:return;case 2:e="#"+e[1]+e[1]+e[1]+e[1]+e[1]+e[1]+i.hexMax;break;case 3:e="#"+e[1]+e[1]+e[1]+e[2]+e[2]+e[2]+i.hexMax;break;case 4:e="#"+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+i.hexMax;break;case 7:e+=i.hexMax;break;case 8:e+=e[e.length-1];break;default:e=e.substring(0,9)}this.r=parseInt(e.substring(1,3),i.hexBase),this.g=parseInt(e.substring(3,5),i.hexBase),this.b=parseInt(e.substring(5,7),i.hexBase),this.a=parseInt(e.substring(7,9),i.hexBase)/i.hexBase**2}rgbConstructor(e){let t=e.match(/rgba?\((\d{1,3}), ?(\d{1,3}), ?(\d{1,3})\)?(?:, ?(\d(?:\.\d*)?)\))?/);t&&(this.r=parseInt(t[1]),this.g=parseInt(t[2]),this.b=parseInt(t[3]),this.a=parseFloat(t[4]))}getBrightness(){return 0===this.a?262:isNaN(this.r)||isNaN(this.g)||isNaN(this.b)?-1:Math.round((299*this.r+587*this.g+144*this.b)/1e3)}}t.mintColor=i,i.hexBase=16,i.hexMax="FF",t.default=i},231:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(54),t),n(i(708),t)},708:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintItem=void 0;class i{constructor(){this.version=0,this.priority=0,this.price=0,this.level=0,this.size=0,this.num=0,this.width=0,this.height=0,this.centered=!1,this.disabled=!1,this.private=!1,this.attr={},this.params={},this.options={},this.lists={},this.paragraphs=[],this.classes=[],this.items=[],this.images=[],this.buttons=[]}}t.MintItem=i,t.default=i},139:(e,t,i)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintDisplay=void 0;const s=i(573),n=i(110);class l{static show(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.MintSettings.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.EMintSide.Top;e&&(e.style.display="",requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height=`${e.scrollHeight}px`:e.style.width=`${e.scrollWidth}px`,setTimeout((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height="auto":e.style.width="auto"}),t)})))}static hide(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.MintSettings.delay.default,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:s.EMintSide.Top;if(e){let n=e.scrollHeight,l=e.scrollWidth,a=e.style.transition;e.style.transition="",requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height=`${n}px`:e.style.width=`${l}px`,e.style.transition=a,requestAnimationFrame((()=>{i===s.EMintSide.Top||i===s.EMintSide.Bottom?e.style.height="0":e.style.width="0"}))})),setTimeout((()=>{e.style.display="none"}),t)}}}t.MintDisplay=l,t.default=l},376:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MintEvent=void 0;const n=s(i(110));class l{static debounce(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default;return function(s){t&&clearTimeout(t),t=setTimeout(e,i,s)}}static debounceEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default;return l.debounce(e,t)}static throttle(e){let t,i,s,l,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default,r=arguments.length>2?arguments[2]:void 0,o=0,d=function(){o=!1===(null==r?void 0:r.leading)?0:(new Date).getTime(),l=0,s=e.apply(t,i),l||(t=i=null)};return function(){let n=(new Date).getTime();o||!1!==(null==r?void 0:r.leading)||(o=n);let u=a-n+o;return t=this,i=arguments,u<=0||u>a?(l&&(clearTimeout(l),l=0),o=n,s=e.apply(t,i),l||(t=i=null)):l||!1===(null==r?void 0:r.trailing)||(l=window.setTimeout(d,u)),s}}static throttleEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:n.default.delay.default,i=arguments.length>2?arguments[2]:void 0;return l.throttle(e,t,i)}}t.MintEvent=l,t.default=l},4:function(e,t,i){var s=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MintIcon=void 0;const n=s(i(982));class l{static append(e,t){document.querySelectorAll(t).forEach((t=>{let i=document.createElement("i");i.classList.add(...e.split(" ")),t.querySelector("i")||t.appendChild(i),i.classList.contains("fa-up-right-from-square")&&t.setAttribute("target","_blank")}))}static update(e){let t=n.default.removeValues(Object.assign(Object.assign({},this.icons),e),[!1]);Object.keys(t).forEach((e=>{this.append(t[e],e)}))}static remove(e,t){document.querySelectorAll(t).forEach((e=>{let t=e.querySelector("i");t&&t.remove()}))}}t.MintIcon=l,l.icons={'a[href^="mailto:"]':"far fa-envelope",'a[href^="tel:"]':"fas fa-phone-flip",'a[href^="sms:"]':"far fa-message",'a[href^="https://maps"]':"fas fa-map-location-dot",'a[href^="http"]':"fas fa-up-right-from-square"},t.default=l},17:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(139),t),n(i(376),t),n(i(4),t),n(i(718),t),n(i(683),t),n(i(982),t),n(i(85),t),n(i(378),t),n(i(110),t),n(i(226),t),n(i(505),t)},718:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintList=void 0;class i{static shuffleCopy(e){let t=[...e];for(let e=t.length-1;e>0;e--){const i=Math.floor(Math.random()*(e+1));[t[e],t[i]]=[t[i],t[e]]}return t}static filter(e,t){let i=0;for(let s=0;s<e.length;s++)t(e[s])&&(e[i++]=e[s]);return e.length=i,e}}t.MintList=i,t.default=i},683:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintMath=void 0;class i{static randomInt(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return t=Math.ceil(t),e=Math.floor(e),Math.floor(Math.random()*(e-t)+t)}}t.MintMath=i,t.default=i},982:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintObject=void 0;class i{static isSimilar(e,t){let i=Object.keys(e);if(i.length!==Object.keys(t).length)return!1;let s=!0;return i.forEach((i=>{e[i]!==t[i]&&(s=!1)})),s}static isSuperset(e,t){let s=!0;if(e===t)return s;try{if(0===Object.keys(t).length)return!s}catch(e){return!s}return Object.keys(t).forEach((n=>{s=s&&i.isSuperset(e[n],t[n])})),s}static remove(e,t){return this.removeKeys(e,t)}static removeKeys(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(s)||(i[s]=e[s]),i)),{})}static removeValues(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(e[s])||(i[s]=e[s]),i)),{})}static sort(e,t){return this.sortKeys(e,t)}static sortKeys(e,t){return Object.keys(e).sort(t).reduce(((t,i)=>(t[i]=e[i],t)),{})}static sortValues(e,t){return Object.keys(e).sort(((i,s)=>t(e[i],e[s]))).reduce(((t,i)=>(t[i]=e[i],t)),{})}static filter(e,t){return this.filterKeys(e,t)}static filterKeys(e,t){return t.reduce(((t,i)=>(t[i]=e[i],t)),{})}static filterValues(e,t){return Object.keys(e).reduce(((i,s)=>(t.includes(e[s])&&(i[s]=e[s]),i)),{})}static updateArray(e,t){let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"id";if(null==t?void 0:t.length){const s=t.reduce(((e,t)=>{var s;return Object.assign(Object.assign({},e),{[null!==(s=null==t?void 0:t[i])&&void 0!==s?s:""]:t})}),{}),n=e.filter((e=>{var t;return!s[null!==(t=null==e?void 0:e[i])&&void 0!==t?t:""]}));null==n||n.forEach((t=>{const i=e.indexOf(t);"number"==typeof i&&-1!==i&&e.splice(i,1)})),e.forEach((e=>{var t,n;s[null!==(t=null==e?void 0:e[i])&&void 0!==t?t:""]&&Object.assign(e,s[null!==(n=null==e?void 0:e[i])&&void 0!==n?n:""])}))}else null==t||t.forEach((t=>e.push(t)));const s=null==t?void 0:t.filter((t=>!e.some((e=>(null==e?void 0:e[i])===(null==t?void 0:t[i])))));null==s||s.forEach((t=>e.push(t)))}static getKeyByValue(e,t){return Object.keys(e).find((i=>e[i]===t))}}t.MintObject=i,t.default=i},85:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintScroll=void 0;class i{static toTop(){window.scrollTo(0,0)}static toBottom(){window.scrollTo(0,document.body.scrollHeight)}static showElements(){requestAnimationFrame((()=>{let e=document.querySelectorAll(".mint-fall-in:not(.mint-show)"),t=[];for(let i=0;i<e.length;i++)e[i].getBoundingClientRect().top<0?e[i].classList.add("mint-show"):e[i].getBoundingClientRect().top<3*window.innerHeight/4&&t.push(e[i]);for(let e=0;e<t.length;e++)setTimeout((()=>{t[e].classList.add("mint-show")}),200*e+e*e*20)}))}}t.MintScroll=i,t.default=i},378:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MintSelectors=void 0;class s{static prefix(e){return(e=e.toLowerCase()).startsWith(this.pre)?e:`${this.pre}${e}`}static cssPrefix(e){return`--${this.prefix(e.replace(/^-+/,""))}`}static cssVar(e){return`var(${this.cssPrefix(e)})`}static neg(e){return`:not(${e})`}static class(e){return`.${this.prefix(e)}`}static id(e){return`#${this.prefix(e)}`}static controls(e){return e?`[aria-controls="${this.prefix(e)}"]`:this.hasControls}static expanded(e){return"boolean"==typeof e?`[aria-expanded="${e}"]`:this.hasExpanded}static getFocusables(e){let t;return t=e?Array.from(e.querySelectorAll(this.focusable)):Array.from(document.querySelectorAll(this.focusable)),t.filter((e=>this.isFocusable(e)))}static isFocusable(e){let t=e;do{if("none"===window.getComputedStyle(t).getPropertyValue("display").toLowerCase())return!1;t=t.parentElement}while(t);return!0}}t.MintSelectors=s,i=s,s.lib="mint",s.pre=`${i.lib}-`,s.disabled="[disabled]",s.hasControls="[aria-controls]",s.hasExpanded="[aria-expanded]",s.hasLink="[href]",s.hasRouterLink="[routerLink]",s.hasId="[id]",s.notTabbable='[tabindex^="-"]',s.tabbable=`[tabindex]${i.neg(i.notTabbable)}`,s.focusable=`input${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n select${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n textarea${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n button${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n object${i.neg(i.disabled)}${i.neg(i.notTabbable)},\n a${i.hasLink}, a${i.hasRouterLink},\n area${i.hasLink},\n ${i.tabbable}`.replace(/\s/g,""),s.subMenuButtons=`button${i.hasControls}`,s.subMenu=`${i.subMenuButtons} + ul${i.hasId}`,t.default=s},110:(e,t)=>{var i;Object.defineProperty(t,"__esModule",{value:!0}),t.MintSettings=void 0;class s{static set(e){let t=!1;"number"==typeof e.delayBase&&(this.delayBase=e.delayBase,t=!0),"number"==typeof e.delayStep&&(this.delayStep=e.delayStep,t=!0),t&&this.setDelay(),e.delay&&Object.keys(e.delay).length&&Object.values(e.delay).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.delay=Object.assign(Object.assign({},this.delay),e.delay)),e.break&&Object.keys(e.break).length&&Object.values(e.break).reduce(((e,t)=>e&&"number"==typeof t),!0)&&(this.break=Object.assign(Object.assign({},this.break),e.break))}static setDelay(){this.delay={instant:this.delayBase+0*this.delayStep,fast:this.delayBase+1*this.delayStep,medFast:this.delayBase+2*this.delayStep,default:this.delayBase+3*this.delayStep,medSlow:this.delayBase+4*this.delayStep,slow:this.delayBase+5*this.delayStep}}}t.MintSettings=s,i=s,s.delayBase=0,s.delayStep=100,s.delay={instant:i.delayBase+0*i.delayStep,fast:i.delayBase+1*i.delayStep,medFast:i.delayBase+2*i.delayStep,default:i.delayBase+3*i.delayStep,medSlow:i.delayBase+4*i.delayStep,slow:i.delayBase+5*i.delayStep},s.break={z:0,xs:480,sm:768,md:1024,lg:1200,xl:1440},t.default=s},226:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintText=void 0;class i{static slug(e){var t;return null!==(t=null==e?void 0:e.toLowerCase().replace(/\W+/g,"-").replace(/^-+|-+$/g,""))&&void 0!==t?t:""}static phone(e){var t,i;const s=null!==(t=null==e?void 0:e.toString().trim())&&void 0!==t?t:"";if("("===s||""===s)return s;let n=null!==(i=s.replace(/\D/g,""))&&void 0!==i?i:"",l="";n.length>10&&(l+=`+${n.slice(0,n.length-10)} `,n=n.slice(n.length-10));for(var a=0;a<n.length;a++){switch(a){case 0:l+="(";break;case 3:l+=") ";break;case 6:l+="-"}l+=n[a]}switch(s[s.length-1]){case")":3===a&&(l+=") ");break;case"-":6===a&&(l+="-")}return l}static pluralize(e){return e.endsWith("ies")||e.endsWith("es")||e.endsWith("s")&&!e.endsWith("us")&&!e.endsWith("is")&&!e.endsWith("ss")?e:e.endsWith("y")&&!["a","e","i","o","u"].includes(e.charAt(e.length-2))?e.slice(0,-1)+"ies":e.endsWith("s")||e.endsWith("sh")||e.endsWith("ch")||e.endsWith("x")||e.endsWith("z")?e+"es":e+"s"}static titleCase(e){return e.toLowerCase().replace(/(?:^|\s)\S/g,(e=>e.toUpperCase()))}static copyText(e){let t=document.createElement("textarea");return!(!e||!t||(t.value=e,t.style.cssText="\n position: fixed;\n top: 0;\n left: 0;\n transform: translate(-100%, -100%);\n opacity: 0;\n z-index: -1;\n ",document.body.appendChild(t),t.select(),t.setSelectionRange(0,99999),navigator.clipboard.writeText(t.value),document.body.removeChild(t),0))}static isEmail(e){return null!==e.match(/(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])/)}}t.MintText=i,t.default=i},505:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MintWindow=void 0;class i{static width(){const e=document.body.getBoundingClientRect().width%1;return window.innerWidth+e}}t.MintWindow=i,t.default=i},491:function(e,t,i){var s=this&&this.__createBinding||(Object.create?function(e,t,i,s){void 0===s&&(s=i);var n=Object.getOwnPropertyDescriptor(t,i);n&&!("get"in n?!t.__esModule:n.writable||n.configurable)||(n={enumerable:!0,get:function(){return t[i]}}),Object.defineProperty(e,s,n)}:function(e,t,i,s){void 0===s&&(s=i),e[s]=t[i]}),n=this&&this.__exportStar||function(e,t){for(var i in e)"default"===i||Object.prototype.hasOwnProperty.call(t,i)||s(t,e,i)};Object.defineProperty(t,"__esModule",{value:!0}),n(i(709),t)}},t={};return function i(s){var n=t[s];if(void 0!==n)return n.exports;var l=t[s]={exports:{}};return e[s].call(l.exports,l,l.exports,i),l.exports}(491)})())); | ||
//# sourceMappingURL=index.min.js.map |
{ | ||
"name": "@appartmint/mint", | ||
"author": "App Art Mint LLC", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"license": "MIT", | ||
@@ -6,0 +6,0 @@ "description": "The front-end TS/SCSS framework of App Art Mint", |
@@ -200,3 +200,10 @@ /** | ||
} | ||
/** | ||
* Get an object's key by value | ||
*/ | ||
static getKeyByValue(object: any, value: any): string | undefined { | ||
return Object.keys(object).find((key) => object[key] === value); | ||
} | ||
}; | ||
export default MintObject; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
872537
7425