/** * vue-meta v2.4.0 * (c) 2020 * - Declan de Wet * - Sébastien Chopin (@Atinux) * - Pim (@pimlie) * - All the amazing contributors * @license MIT */ !function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n=n||self).VueMeta=t()}(this,(function(){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(t)}function t(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e=n.length?{done:!0}:{done:!1,value:n[i++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u,a=!0,f=!1;return{s:function(){r=n[Symbol.iterator]()},n:function(){var n=r.next();return a=n.done,n},e:function(n){f=!0,u=n},f:function(){try{a||null==r.return||r.return()}finally{if(f)throw u}}}}function r(n){return Array.isArray(n)}function i(n){return void 0===n}function o(t){return"object"===n(t)}function u(t){return"object"===n(t)&&null!==t}function a(n){return"function"==typeof n}var f=(function(){try{return!i(window)}catch(n){return!1}}()?window:global).console||{};function c(n){f&&f.warn&&f.warn(n)}var s=function(n){return c("".concat(n," is not supported in browser builds"))},d={title:void 0,titleChunk:"",titleTemplate:"%s",htmlAttrs:{},bodyAttrs:{},headAttrs:{},base:[],link:[],meta:[],style:[],script:[],noscript:[],__dangerouslyDisableSanitizers:[],__dangerouslyDisableSanitizersByTagID:{}},l="metaInfo",v="data-vue-meta",m="data-vue-meta-server-rendered",y="vmid",h="content",p="template",b=!0,g=10,w="ssr",A=Object.keys(d),j=[A[12],A[13]],I=[A[1],A[2],"changed"].concat(j),O=[A[3],A[4],A[5]],T=["link","style","script"],N=["once","skip","template"],S=["body","pbody"],k=["allowfullscreen","amp","amp-boilerplate","async","autofocus","autoplay","checked","compact","controls","declare","default","defaultchecked","defaultmuted","defaultselected","defer","disabled","enabled","formnovalidate","hidden","indeterminate","inert","ismap","itemscope","loop","multiple","muted","nohref","noresize","noshade","novalidate","nowrap","open","pauseonexit","readonly","required","reversed","scoped","seamless","selected","sortable","truespeed","typemustmatch","visible"],M=null;function D(n,t,e){var r=n.t;t._vueMeta.i||!t._vueMeta.o&&"watcher"!==e||(t._vueMeta.i=null),t._vueMeta.i&&!t._vueMeta.u&&function(n,t){if(!(t=void 0===t?10:t))return void n();clearTimeout(M),M=setTimeout((function(){n()}),t)}((function(){t.$meta().refresh()}),r)}function K(n,t,e){if(!Array.prototype.findIndex){for(var r=0;r/g,">"],[/"/g,'"'],[/'/g,"'"]];function U(n,t,e){e=e||[];var i={T:function(n){return e.reduce((function(n,t){return n.replace(t[0],t[1])}),n)}};return j.forEach((function(n,e){if(0===e)L(t,n);else if(1===e)for(var r in t[n])L(t[n],r);i[n]=t[n]})),function n(t,e,i,o){var a=e.m,f=i.T,c=void 0===f?function(n){return n}:f,s={};for(var d in t){var l=t[d];if(x(I,d))s[d]=l;else{var v=j[0];if(i[v]&&x(i[v],d))s[d]=l;else{var m=t[a];if(m&&(v=j[1],i[v]&&i[v][m]&&x(i[v][m],d)))s[d]=l;else if("string"==typeof l?s[d]=c(l):r(l)?s[d]=l.map((function(t){return u(t)?n(t,e,i,!0):c(t)})):u(l)?s[d]=n(l,e,i,!0):s[d]=l,o){var y=c(d);d!==y&&(s[y]=s[d],delete s[d])}}}}return s}(t,n,i)}var q=function(t){return function(t){return!!t&&"object"===n(t)}(t)&&!function(n){var t=Object.prototype.toString.call(n);return"[object RegExp]"===t||"[object Date]"===t||!1}(t)};function F(n,t){return n}function G(n){return Object.keys(n)}function Q(n,t){try{return t in n}catch(n){return!1}}function X(n,t,e){var r={};return e.N(n)&&G(n).forEach((function(t){r[t]=F(n[t])})),G(t).forEach((function(i){(function(n,t){return Q(n,t)&&!(Object.hasOwnProperty.call(n,t)&&Object.propertyIsEnumerable.call(n,t))})(n,i)||(Q(n,i)&&e.N(t[i])?r[i]=Y(n[i],t[i],e):r[i]=F(t[i]))})),r}function Y(n,t,e){(e=e||{}).S=e.S,e.N=e.N||q,e.cloneUnlessOtherwiseSpecified=F;var r=Array.isArray(t);return r===Array.isArray(n)?r?e.S(n,t,e):X(n,t,e):F(t)}var Z=Y;function nn(n,t,e,r){var o=n.component,u=n.k,f=n.M;return!0!==e&&!0!==t[u]&&(i(e)&&t[u]&&(e=t[u],t[u]=!0),e?(i(r)&&(r=t[f]),t[f]=a(e)?e.call(o,r):e.replace(/%s/g,r),!0):(delete t[u],!1))}var tn=!1;function en(n,t,e){return e=e||{},void 0===t.title&&delete t.title,O.forEach((function(n){if(t[n])for(var e in t[n])e in t[n]&&void 0===t[n][e]&&(x(k,e)&&!tn&&(c("VueMeta: Please note that since v2 the value undefined is not used to indicate boolean attributes anymore, see migration guide for details"),tn=!0),delete t[n][e])})),Z(n,t,{S:function(n,t){return function(n,t,e){var r=n.component,i=n.m,o=n.k,u=n.M,a=[];return t.length||e.length?(t.forEach((function(n,t){if(n[i]){var f=K(e,(function(t){return t[i]===n[i]})),c=e[f];if(-1!==f){if(u in c&&void 0===c[u]||"innerHTML"in c&&void 0===c.innerHTML)return a.push(n),void e.splice(f,1);if(null!==c[u]&&null!==c.innerHTML){var s=n[o];if(s){if(!c[o])return nn({component:r,k:o,M:u},c,s),void(c.template=!0);c[u]||nn({component:r,k:o,M:u},c,void 0,n[u])}}else e.splice(f,1)}else a.push(n)}else a.push(n)})),a.concat(e)):a}(e,n,t)}})}function rn(n,t){return function n(t,e,r){if(r=r||{},e._inactive)return r;var u=(t=t||{}).A,a=e.$metaInfo,f=e.$options,c=e.$children;if(f[u]){var s=a||f[u];o(s)&&(r=en(r,s,t))}c.length&&c.forEach((function(e){(function(n){return(n=n||this)&&!i(n._vueMeta)})(e)&&(r=n(t,e,r))}));return r}(n||{},t,d)}var on=[];function un(n,t,e,r){var i=n.m,o=!1;return e.forEach((function(n){n[i]&&n.callback&&(o=!0,function(n,t){1===arguments.length&&(t=n,n=""),on.push([n,t])}("".concat(t,"[data-").concat(i,'="').concat(n[i],'"]'),n.callback))})),r&&o?an():o}function an(){var n;"complete"!==(n||document).readyState?document.onreadystatechange=function(){fn()}:fn()}function fn(n){on.forEach((function(t){var e=t[0],r=t[1],i="".concat(e,'[onload="this.__vm_l=1"]'),o=[];n||(o=_(V(i))),n&&n.matches(i)&&(o=[n]),o.forEach((function(n){if(!n.__vm_cb){var t=function(){n.__vm_cb=!0,E(n,"onload"),r(n)};n.__vm_l?t():n.__vm_ev||(n.__vm_ev=!0,n.addEventListener("load",t))}}))}))}var cn,sn={};function dn(n,t,e,r,i){var o=(t||{}).v,u=i.getAttribute(o);u&&(sn[e]=JSON.parse(decodeURI(u)),E(i,o));var a=sn[e]||{},f=[];for(var c in a)void 0!==a[c]&&n in a[c]&&(f.push(c),r[c]||delete a[c][n]);for(var s in r){var d=a[s];d&&d[n]===r[s]||(f.push(s),void 0!==r[s]&&(a[s]=a[s]||{},a[s][n]=r[s]))}for(var l=0,v=f;l1){var v=[];r=r.filter((function(n){var t=JSON.stringify(n),e=!x(v,t);return v.push(t),e}))}r.forEach((function(t){if(!t.skip){var r=document.createElement(e);t.once||r.setAttribute(a,n),Object.keys(t).forEach((function(n){if(!x(N,n))if("innerHTML"!==n)if("json"!==n)if("cssText"!==n)if("callback"!==n){var e=x(c,n)?"data-".concat(n):n,i=x(k,n);if(!i||t[n]){var o=i?"":t[n];r.setAttribute(e,o)}}else r.onload=function(){return t[n](r)};else r.styleSheet?r.styleSheet.cssText=t.cssText:r.appendChild(document.createTextNode(t.cssText));else r.innerHTML=JSON.stringify(t.json);else r.innerHTML=t.innerHTML}));var i,o=l[function(n){var t=n.body,e=n.pbody;return t?"body":e?"pbody":"head"}(t)];o.some((function(n,t){return i=t,r.isEqualNode(n)}))&&(i||0===i)?o.splice(i,1):s.push(r)}}));var m=[];for(var y in l)Array.prototype.push.apply(m,l[y]);return m.forEach((function(n){n.parentNode.removeChild(n)})),s.forEach((function(n){n.hasAttribute("data-body")?o.appendChild(n):n.hasAttribute("data-pbody")?o.insertBefore(n,o.firstChild):i.appendChild(n)})),{oldTags:m,newTags:s}}function vn(n,t,e){var i=t=t||{},o=i.g,u=i.j,a={},f=z(a,"html");if(n===u&&f.hasAttribute(o)){E(f,o);var c=!1;return T.forEach((function(n){e[n]&&un(t,n,e[n])&&(c=!0)})),c&&an(),!1}var s,d={},l={};for(var v in e)if(!x(I,v))if("title"!==v){if(x(O,v)){var m=v.substr(0,4);dn(n,t,v,e[v],z(a,m))}else if(r(e[v])){var y=ln(n,t,v,e[v],z(a,"head"),z(a,"body")),h=y.oldTags,p=y.newTags;p.length&&(d[v]=p,l[v]=h)}}else((s=e.title)||""===s)&&(document.title=s);return{D:d,K:l}}function mn(n,t,r){return{set:function(e){return function(n,t,e,r){if(n&&n.$el)return vn(t,e,r);(cn=cn||{})[t]=r}(n,t,r,e)},remove:function(){return function(n,t,r){if(n&&n.$el){var i,o={},u=e(O);try{for(u.s();!(i=u.n()).done;){var a=i.value,f=a.substr(0,4);dn(t,r,a,{},z(o,f))}}catch(n){u.e(n)}finally{u.f()}return function(n,t){var e=n.v;_(V("[".concat(e,'="').concat(t,'"]'))).map((function(n){return n.remove()}))}(r,t)}cn[t]&&(delete cn[t],hn())}(n,t,r)}}}function yn(){return cn}function hn(n){!n&&Object.keys(cn).length||(cn=void 0)}function pn(n,t){if(t=t||{},!n._vueMeta)return c("This vue app/component has no vue-meta configuration"),{};var e=function(n,t,e,r){e=e||[];var i=(n=n||{}).m;return t.title&&(t.titleChunk=t.title),t.titleTemplate&&"%s"!==t.titleTemplate&&nn({component:r,M:"title"},t,t.titleTemplate,t.titleChunk||""),t.base&&(t.base=Object.keys(t.base).length?[t.base]:[]),t.meta&&(t.meta=t.meta.filter((function(n,t,e){return!n[i]||t===K(e,(function(t){return t[i]===n[i]}))})),t.meta.forEach((function(t){return nn(n,t)}))),U(n,t,e)}(t,rn(t,n),P,n),r=vn(n._vueMeta.l,t,e);r&&a(e.changed)&&(e.changed(e,r.D,r.K),r={addedTags:r.D,removedTags:r.K});var i=yn();if(i){for(var o in i)vn(o,t,i[o]),delete i[o];hn(!0)}return{vm:n,metaInfo:e,tags:r}}function bn(n){n=n||{};var t=this.$root;return{getOptions:function(){return function(n){var t={};for(var e in n)t[e]=n[e];return t}(n)},setOptions:function(e){e&&e.I&&(n.I=!!e.I,$(t));if(e&&"debounceWait"in e){var r=parseInt(e.t);isNaN(r)||(n.t=r)}e&&"waitOnDestroyed"in e&&(n.O=!!e.O)},refresh:function(){return pn(t,n)},inject:function(n){return s("inject")},pause:function(){return R(t)},resume:function(){return W(t)},addApp:function(e){return mn(t,e,n)}}}function gn(n,t){n.__vuemeta_installed||(n.__vuemeta_installed=!0,t=function(n){return{A:(n=o(n)?n:{}).keyName||l,v:n.attribute||v,g:n.ssrAttribute||m,m:n.tagIDKeyName||y,M:n.contentKeyName||h,k:n.metaTemplateKeyName||p,t:i(n.debounceWait)?g:n.debounceWait,O:i(n.waitOnDestroyed)?b:n.waitOnDestroyed,j:n.ssrAppId||w,I:!!n.refreshOnceOnNavigation}}(t),n.prototype.$meta=function(){return bn.call(this,t)},n.mixin(H(n,t)))}return i(window)||i(window.Vue)||gn(window.Vue),{version:"2.4.0",install:gn,generate:function(n,t){return s("generate")},hasMetaInfo:J}}));