UNPKG

30.1 kBJavaScriptView Raw
1!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueSvgInlinePlugin=e():t.VueSvgInlinePlugin=e()}(self,(function(){return function(){var t={373:function(t,e,r){"use strict";r.r(e);var o="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==o&&o,n="URLSearchParams"in o,i="Symbol"in o&&"iterator"in Symbol,s="FileReader"in o&&"Blob"in o&&function(){try{return new Blob,!0}catch(t){return!1}}(),a="FormData"in o,h="ArrayBuffer"in o;if(h)var u=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(t){return t&&u.indexOf(Object.prototype.toString.call(t))>-1};function l(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(t)||""===t)throw new TypeError('Invalid character in header field name: "'+t+'"');return t.toLowerCase()}function d(t){return"string"!=typeof t&&(t=String(t)),t}function f(t){var e={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return i&&(e[Symbol.iterator]=function(){return e}),e}function p(t){this.map={},t instanceof p?t.forEach((function(t,e){this.append(e,t)}),this):Array.isArray(t)?t.forEach((function(t){this.append(t[0],t[1])}),this):t&&Object.getOwnPropertyNames(t).forEach((function(e){this.append(e,t[e])}),this)}function m(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function g(t){return new Promise((function(e,r){t.onload=function(){e(t.result)},t.onerror=function(){r(t.error)}}))}function y(t){var e=new FileReader,r=g(e);return e.readAsArrayBuffer(t),r}function w(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(t){var e;this.bodyUsed=this.bodyUsed,this._bodyInit=t,t?"string"==typeof t?this._bodyText=t:s&&Blob.prototype.isPrototypeOf(t)?this._bodyBlob=t:a&&FormData.prototype.isPrototypeOf(t)?this._bodyFormData=t:n&&URLSearchParams.prototype.isPrototypeOf(t)?this._bodyText=t.toString():h&&s&&((e=t)&&DataView.prototype.isPrototypeOf(e))?(this._bodyArrayBuffer=w(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):h&&(ArrayBuffer.prototype.isPrototypeOf(t)||c(t))?this._bodyArrayBuffer=w(t):this._bodyText=t=Object.prototype.toString.call(t):this._bodyText="",this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},s&&(this.blob=function(){var t=m(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){if(this._bodyArrayBuffer){var t=m(this);return t||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer))}return this.blob().then(y)}),this.text=function(){var t,e,r,o=m(this);if(o)return o;if(this._bodyBlob)return t=this._bodyBlob,e=new FileReader,r=g(e),e.readAsText(t),r;if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),r=new Array(e.length),o=0;o<e.length;o++)r[o]=String.fromCharCode(e[o]);return r.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},a&&(this.formData=function(){return this.text().then(E)}),this.json=function(){return this.text().then(JSON.parse)},this}p.prototype.append=function(t,e){t=l(t),e=d(e);var r=this.map[t];this.map[t]=r?r+", "+e:e},p.prototype.delete=function(t){delete this.map[l(t)]},p.prototype.get=function(t){return t=l(t),this.has(t)?this.map[t]:null},p.prototype.has=function(t){return this.map.hasOwnProperty(l(t))},p.prototype.set=function(t,e){this.map[l(t)]=d(e)},p.prototype.forEach=function(t,e){for(var r in this.map)this.map.hasOwnProperty(r)&&t.call(e,this.map[r],r,this)},p.prototype.keys=function(){var t=[];return this.forEach((function(e,r){t.push(r)})),f(t)},p.prototype.values=function(){var t=[];return this.forEach((function(e){t.push(e)})),f(t)},p.prototype.entries=function(){var t=[];return this.forEach((function(e,r){t.push([r,e])})),f(t)},i&&(p.prototype[Symbol.iterator]=p.prototype.entries);var v=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function _(t,e){if(!(this instanceof _))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var r,o,n=(e=e||{}).body;if(t instanceof _){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new p(t.headers)),this.method=t.method,this.mode=t.mode,this.signal=t.signal,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"same-origin",!e.headers&&this.headers||(this.headers=new p(e.headers)),this.method=(r=e.method||this.method||"GET",o=r.toUpperCase(),v.indexOf(o)>-1?o:r),this.mode=e.mode||this.mode||null,this.signal=e.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(n),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==e.cache&&"no-cache"!==e.cache)){var i=/([?&])_=[^&]*/;if(i.test(this.url))this.url=this.url.replace(i,"$1_="+(new Date).getTime());else{this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}}function E(t){var e=new FormData;return t.trim().split("&").forEach((function(t){if(t){var r=t.split("="),o=r.shift().replace(/\+/g," "),n=r.join("=").replace(/\+/g," ");e.append(decodeURIComponent(o),decodeURIComponent(n))}})),e}function T(t,e){if(!(this instanceof T))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===e.statusText?"":""+e.statusText,this.headers=new p(e.headers),this.url=e.url||"",this._initBody(t)}_.prototype.clone=function(){return new _(this,{body:this._bodyInit})},b.call(_.prototype),b.call(T.prototype),T.prototype.clone=function(){return new T(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new p(this.headers),url:this.url})},T.error=function(){var t=new T(null,{status:0,statusText:""});return t.type="error",t};var x=[301,302,303,307,308];T.redirect=function(t,e){if(-1===x.indexOf(e))throw new RangeError("Invalid status code");return new T(null,{status:e,headers:{location:t}})};var $=o.DOMException;try{new $}catch(t){($=function(t,e){this.message=t,this.name=e;var r=Error(t);this.stack=r.stack}).prototype=Object.create(Error.prototype),$.prototype.constructor=$}function O(t,e){return new Promise((function(r,n){var i=new _(t,e);if(i.signal&&i.signal.aborted)return n(new $("Aborted","AbortError"));var a=new XMLHttpRequest;function u(){a.abort()}a.onload=function(){var t,e,o={status:a.status,statusText:a.statusText,headers:(t=a.getAllResponseHeaders()||"",e=new p,t.replace(/\r?\n[\t ]+/g," ").split("\r").map((function(t){return 0===t.indexOf("\n")?t.substr(1,t.length):t})).forEach((function(t){var r=t.split(":"),o=r.shift().trim();if(o){var n=r.join(":").trim();e.append(o,n)}})),e)};o.url="responseURL"in a?a.responseURL:o.headers.get("X-Request-URL");var n="response"in a?a.response:a.responseText;setTimeout((function(){r(new T(n,o))}),0)},a.onerror=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.ontimeout=function(){setTimeout((function(){n(new TypeError("Network request failed"))}),0)},a.onabort=function(){setTimeout((function(){n(new $("Aborted","AbortError"))}),0)},a.open(i.method,function(t){try{return""===t&&o.location.href?o.location.href:t}catch(e){return t}}(i.url),!0),"include"===i.credentials?a.withCredentials=!0:"omit"===i.credentials&&(a.withCredentials=!1),"responseType"in a&&(s?a.responseType="blob":h&&i.headers.get("Content-Type")&&-1!==i.headers.get("Content-Type").indexOf("application/octet-stream")&&(a.responseType="arraybuffer")),!e||"object"!=typeof e.headers||e.headers instanceof p?i.headers.forEach((function(t,e){a.setRequestHeader(e,t)})):Object.getOwnPropertyNames(e.headers).forEach((function(t){a.setRequestHeader(t,d(e.headers[t]))})),i.signal&&(i.signal.addEventListener("abort",u),a.onreadystatechange=function(){4===a.readyState&&i.signal.removeEventListener("abort",u)}),a.send(void 0===i._bodyInit?null:i._bodyInit)}))}O.polyfill=!0,o.fetch||(o.fetch=O,o.Headers=p,o.Request=_,o.Response=T);r(337)},337:function(){!function(){"use strict";if("object"==typeof window)if("IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype)"isIntersecting"in window.IntersectionObserverEntry.prototype||Object.defineProperty(window.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var t=function(t){for(var e=window.document,r=n(e);r;)r=n(e=r.ownerDocument);return e}(),e=[],r=null,o=null;s.prototype.THROTTLE_TIMEOUT=100,s.prototype.POLL_INTERVAL=null,s.prototype.USE_MUTATION_OBSERVER=!0,s._setupCrossOriginUpdater=function(){return r||(r=function(t,r){o=t&&r?l(t,r):{top:0,bottom:0,left:0,right:0,width:0,height:0},e.forEach((function(t){t._checkForIntersections()}))}),r},s._resetCrossOriginUpdater=function(){r=null,o=null},s.prototype.observe=function(t){if(!this._observationTargets.some((function(e){return e.element==t}))){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections(t.ownerDocument),this._checkForIntersections()}},s.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter((function(e){return e.element!=t})),this._unmonitorIntersections(t.ownerDocument),0==this._observationTargets.length&&this._unregisterInstance()},s.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorAllIntersections(),this._unregisterInstance()},s.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},s.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter((function(t,e,r){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==r[e-1]}))},s.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map((function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}}));return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},s.prototype._monitorIntersections=function(e){var r=e.defaultView;if(r&&-1==this._monitoringDocuments.indexOf(e)){var o=this._checkForIntersections,i=null,s=null;this.POLL_INTERVAL?i=r.setInterval(o,this.POLL_INTERVAL):(a(r,"resize",o,!0),a(e,"scroll",o,!0),this.USE_MUTATION_OBSERVER&&"MutationObserver"in r&&(s=new r.MutationObserver(o)).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})),this._monitoringDocuments.push(e),this._monitoringUnsubscribes.push((function(){var t=e.defaultView;t&&(i&&t.clearInterval(i),h(t,"resize",o,!0)),h(e,"scroll",o,!0),s&&s.disconnect()}));var u=this.root&&(this.root.ownerDocument||this.root)||t;if(e!=u){var c=n(e);c&&this._monitorIntersections(c.ownerDocument)}}},s.prototype._unmonitorIntersections=function(e){var r=this._monitoringDocuments.indexOf(e);if(-1!=r){var o=this.root&&(this.root.ownerDocument||this.root)||t,i=this._observationTargets.some((function(t){var r=t.element.ownerDocument;if(r==e)return!0;for(;r&&r!=o;){var i=n(r);if((r=i&&i.ownerDocument)==e)return!0}return!1}));if(!i){var s=this._monitoringUnsubscribes[r];if(this._monitoringDocuments.splice(r,1),this._monitoringUnsubscribes.splice(r,1),s(),e!=o){var a=n(e);a&&this._unmonitorIntersections(a.ownerDocument)}}}},s.prototype._unmonitorAllIntersections=function(){var t=this._monitoringUnsubscribes.slice(0);this._monitoringDocuments.length=0,this._monitoringUnsubscribes.length=0;for(var e=0;e<t.length;e++)t[e]()},s.prototype._checkForIntersections=function(){if(this.root||!r||o){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach((function(o){var n=o.element,s=u(n),a=this._rootContainsTarget(n),h=o.entry,c=t&&a&&this._computeTargetAndRootIntersection(n,s,e),l=null;this._rootContainsTarget(n)?r&&!this.root||(l=e):l={top:0,bottom:0,left:0,right:0,width:0,height:0};var d=o.entry=new i({time:window.performance&&performance.now&&performance.now(),target:n,boundingClientRect:s,rootBounds:l,intersectionRect:c});h?t&&a?this._hasCrossedThreshold(h,d)&&this._queuedEntries.push(d):h&&h.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)}),this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)}},s.prototype._computeTargetAndRootIntersection=function(e,n,i){if("none"!=window.getComputedStyle(e).display){for(var s,a,h,c,d,p,m,g,y=n,w=f(e),b=!1;!b&&w;){var v=null,_=1==w.nodeType?window.getComputedStyle(w):{};if("none"==_.display)return null;if(w==this.root||9==w.nodeType)if(b=!0,w==this.root||w==t)r&&!this.root?!o||0==o.width&&0==o.height?(w=null,v=null,y=null):v=o:v=i;else{var E=f(w),T=E&&u(E),x=E&&this._computeTargetAndRootIntersection(E,T,i);T&&x?(w=E,v=l(T,x)):(w=null,y=null)}else{var $=w.ownerDocument;w!=$.body&&w!=$.documentElement&&"visible"!=_.overflow&&(v=u(w))}if(v&&(s=v,a=y,h=void 0,c=void 0,d=void 0,p=void 0,m=void 0,g=void 0,h=Math.max(s.top,a.top),c=Math.min(s.bottom,a.bottom),d=Math.max(s.left,a.left),p=Math.min(s.right,a.right),g=c-h,y=(m=p-d)>=0&&g>=0&&{top:h,bottom:c,left:d,right:p,width:m,height:g}||null),!y)break;w=w&&f(w)}return y}},s.prototype._getRootRect=function(){var e;if(this.root&&!p(this.root))e=u(this.root);else{var r=p(this.root)?this.root:t,o=r.documentElement,n=r.body;e={top:0,left:0,right:o.clientWidth||n.clientWidth,width:o.clientWidth||n.clientWidth,bottom:o.clientHeight||n.clientHeight,height:o.clientHeight||n.clientHeight}}return this._expandRectByRootMargin(e)},s.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map((function(e,r){return"px"==e.unit?e.value:e.value*(r%2?t.width:t.height)/100})),r={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return r.width=r.right-r.left,r.height=r.bottom-r.top,r},s.prototype._hasCrossedThreshold=function(t,e){var r=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(r!==o)for(var n=0;n<this.thresholds.length;n++){var i=this.thresholds[n];if(i==r||i==o||i<r!=i<o)return!0}},s.prototype._rootIsInDom=function(){return!this.root||d(t,this.root)},s.prototype._rootContainsTarget=function(e){var r=this.root&&(this.root.ownerDocument||this.root)||t;return d(r,e)&&(!this.root||r==e.ownerDocument)},s.prototype._registerInstance=function(){e.indexOf(this)<0&&e.push(this)},s.prototype._unregisterInstance=function(){var t=e.indexOf(this);-1!=t&&e.splice(t,1)},window.IntersectionObserver=s,window.IntersectionObserverEntry=i}function n(t){try{return t.defaultView&&t.defaultView.frameElement||null}catch(t){return null}}function i(t){this.time=t.time,this.target=t.target,this.rootBounds=c(t.rootBounds),this.boundingClientRect=c(t.boundingClientRect),this.intersectionRect=c(t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0}),this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,r=e.width*e.height,o=this.intersectionRect,n=o.width*o.height;this.intersectionRatio=r?Number((n/r).toFixed(4)):this.isIntersecting?1:0}function s(t,e){var r,o,n,i=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(i.root&&1!=i.root.nodeType&&9!=i.root.nodeType)throw new Error("root must be a Document or Element");this._checkForIntersections=(r=this._checkForIntersections.bind(this),o=this.THROTTLE_TIMEOUT,n=null,function(){n||(n=setTimeout((function(){r(),n=null}),o))}),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(i.rootMargin),this.thresholds=this._initThresholds(i.threshold),this.root=i.root||null,this.rootMargin=this._rootMarginValues.map((function(t){return t.value+t.unit})).join(" "),this._monitoringDocuments=[],this._monitoringUnsubscribes=[]}function a(t,e,r,o){"function"==typeof t.addEventListener?t.addEventListener(e,r,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,r)}function h(t,e,r,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,r,o||!1):"function"==typeof t.detachEvent&&t.detachEvent("on"+e,r)}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function c(t){return!t||"x"in t?t:{top:t.top,y:t.top,bottom:t.bottom,left:t.left,x:t.left,right:t.right,width:t.width,height:t.height}}function l(t,e){var r=e.top-t.top,o=e.left-t.left;return{top:r,left:o,height:e.height,width:e.width,bottom:r+e.height,right:o+e.width}}function d(t,e){for(var r=e;r;){if(r==t)return!0;r=f(r)}return!1}function f(e){var r=e.parentNode;return 9==e.nodeType&&e!=t?n(e):(r&&r.assignedSlot&&(r=r.assignedSlot.parentNode),r&&11==r.nodeType&&r.host?r.host:r)}function p(t){return t&&9===t.nodeType}}()}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var i=e[o]={exports:{}};return t[o](i,i.exports,r),i.exports}r.d=function(t,e){for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};return function(){"use strict";r.d(o,{default:function(){return b}});var t=JSON.parse('{"u2":"vue-svg-inline-plugin","i8":"2.2.3"}');
2/**
3 * @author Oliver Findl
4 * @version 2.2.3
5 * @license MIT
6 */
7const e=t.u2,n=t.i8;r(373);const i={directive:{name:"v-svg-inline",spriteModifierName:"sprite"},attributes:{clone:["viewbox"],merge:["class","style"],add:[{name:"focusable",value:!1},{name:"role",value:"presentation"},{name:"tabindex",value:-1}],data:[],remove:["alt","src","data-src"]},cache:{version:n,persistent:!0,removeRevisions:!0},intersectionObserverOptions:{},axios:null,xhtml:!1},s="observer",a="container",h=`${e}-flags`,u=`${e}-sprite`,c=`${u}-container`,l=/.+\.svg(?:[?#].*)?$/i,d=/<svg(\s+[^>]+)?>([\s\S]+)<\/svg>/i,f=/\s*([^\s=]+)[\s=]+(?:"([^"]*)"|'([^']*)')?\s*/g,p=/^[a-z](?:[a-z0-9-:]*[a-z0-9])?$/i,m=/^v-/i,g=/\s+/g,y=/[\n\t]+/g,w=new Set([200,304]);var b={install:function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};const o="string",n="function",b="object";if(!t)throw new Error(`[${e}] Required argument is missing! [VueOrApp]`);if(![n,b].includes(typeof t))throw new TypeError(`[${e}] Required argument is not valid! [VueOrApp]`);if(!t.directive)throw new Error(`[${e}] Required method is missing! [VueOrApp.directive]`);if(typeof t.directive!==n)throw new TypeError(`[${e}] Required method is not valid! [VueOrApp.directive]`);if(!t.version)throw new Error(`[${e}] Required property is missing! [VueOrApp.version]`);if(typeof t.version!==o)throw new TypeError(`[${e}] Required property is not valid! [VueOrApp.version]`);if(t.version.startsWith("1."))throw new Error(`[${e}] Vue@1 is not supported!`);["directive","attributes","cache","intersectionObserverOptions"].forEach((t=>r[t]=Object.assign({},i[t],r[t]||{}))),r=Object.assign({},i,r);for(const t in r.directive)if(r.directive[t]=r.directive[t].toString().trim().toLowerCase(),!r.directive[t]||"name"===t&&!p.test(r.directive[t]))throw new TypeError(`[${e}] Option is not valid! [options.directives.${t}="${r.directives[t]}"]`);r.directive.name=r.directive.name.replace(m,"");for(const t in r.attributes){if(!Array.isArray(r.attributes[t]))throw new TypeError(`[${e}] Option is not valid! [options.attributes.${t}=${JSON.stringify(r.attributes[t])}]`);r.attributes[t]="add"===t?r.attributes[t].map((t=>({name:t.name.toString().trim().toLowerCase(),value:t.value.toString().trim()}))):r.attributes[t].map((t=>t.toString().trim().toLowerCase())),r.attributes[t]=new Set(r.attributes[t])}for(const t in r.cache)r.cache[t]="version"===t?r.cache[t].toString().trim().toLowerCase():!!r.cache[t];r.xhtml=!!r.xhtml;const v=t.version.startsWith("3.");r._fetch="fetch"in window&&typeof fetch===n,r._axios="axios"in window&&typeof axios===n;const _=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return!!t&&typeof t===n&&"get"in t&&typeof t.get===n};let E=!1;if(r.axios=((E=_(r.axios))?r.axios:null)||(r._axios&&"create"in axios&&typeof axios.create===n?axios.create():null),r._axios=E||_(r.axios),!r._fetch&&!r._axios)throw new Error(`[${e}] Feature is not supported by browser! [fetch || axios]`);r._observer="IntersectionObserver"in window,r._observer||console.error(`[${e}] Feature is not supported by browser! Disabling lazy processing of image nodes. [IntersectionObserver]`),r._storage="localStorage"in window,!r._storage&&r.cache.persistent&&console.error(`[${e}] Feature is not supported by browser! Disabling persistent cache of SVG files. [localStorage]`);const T=`${e}:${r.cache.version}`;r._storage&&r.cache.removeRevisions&&Object.entries(localStorage).map((t=>t.shift())).filter((t=>t.startsWith(`${e}:`)&&!t.endsWith(`:${r.cache.version}`))).forEach((t=>localStorage.removeItem(t)));const x=r._storage&&r.cache.persistent?new Map(JSON.parse(localStorage.getItem(T)||"[]")):new Map,$=new Set,O=new Map,R=()=>{if(!r._observer)throw new Error(`[${e}] Feature is not supported by browser! [IntersectionObserver]`);if(O.has(s))throw new Error(`[${e}] Can not create image node intersection observer, intersection observer already exists!`);const t=new IntersectionObserver(((t,e)=>{for(const r of t){if(!r.isIntersecting)continue;const t=r.target;P(t),e.unobserve(t)}}),r.intersectionObserverOptions);return O.set(s,t),t},I=()=>O.has(s)?O.get(s):R(),A=()=>{if(O.has(a))throw new Error(`[${e}] Can not create SVG symbol container node, container node already exists!`);let t=B(`<svg xmlns="http://www.w3.org/2000/svg" id="${c}" style="display: none !important;"></svg>`);return document.body.appendChild(t),O.set(a,t=document.getElementById(c)),t},S=()=>O.has(a)?O.get(a):A(),B=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!t)throw new Error(`[${e}] Required argument is missing! [string]`);if(t=t.toString().trim(),!t.startsWith("<")||!t.endsWith(">"))throw new TypeError(`[${e}] Argument is not valid! [string="${t}"]`);return t=t.replace(y,""),document.createRange().createContextualFragment(t)},D=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)throw new Error(`[${e}] Required argument is missing! [node]`);if(!r)throw new Error(`[${e}] Required argument is missing! [newNode]`);if(!t.parentNode)throw new Error(`[${e}] Required property is missing! [node.parentNode]`);t.parentNode.replaceChild(r,t)},j=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!t)throw new Error(`[${e}] Required argument is missing! [string]`);t=t.toString().trim();const o=new Map;let n;for(f.lastIndex=0;n=f.exec(t);){n.index===f.lastIndex&&f.lastIndex++;const t=(n[1]||"").trim().toLowerCase();if(!t||t.startsWith("<")||t.endsWith(">"))continue;if(!p.test(t))throw new TypeError(`[${e}] Attribute name is not valid! [attribute="${t}"]`);const i=(n[2]||n[3]||"").trim();o.set(t,i||(r.xhtml?t:""))}return o},C=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!t)throw new Error(`[${e}] Required argument is missing! [namedNodeAttributeMap]`);if(!(t instanceof NamedNodeMap))throw new TypeError(`[${e}] Argument is not valid! [namedNodeAttributeMap]`);const o=new Map([...t].map((t=>{let{name:o,value:n}=t;if(o=(o||"").trim().toLowerCase(),!p.test(o))throw new TypeError(`[${e}] Attribute name is not valid! [attribute="${o}"]`);return n=(n||"").trim(),[o,n||(r.xhtml?o:"")]})));return o},M=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";if(!r._fetch&&!r._axios)throw new Error(`[${e}] Feature is not supported by browser! [fetch || axios]`);if(!t)throw new Error(`[${e}] Required argument is missing! [path]`);if(t=t.toString().trim(),!l.test(t))throw new TypeError(`[${e}] Argument is not valid! [path="${t}"]`);return new Promise(((e,o)=>{const n={path:t};if(x.has(n.path))return n.content=x.get(n.path),e(n);(r._axios?r.axios.get:fetch)(n.path).then((t=>{if(!w.has(0|t.status))throw new Error(`Wrong response status! [response.status=${t.status}]`);return r._axios?t.data.toString():t.text()})).then((t=>(n.content=t.trim(),x.set(n.path,n.content),r._storage&&r.cache.persistent&&localStorage.setItem(T,JSON.stringify([...x])),e(n)))).catch(o)}))},U=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(!t)throw new Error(`[${e}] Required argument is missing! [file]`);if(!o)throw new Error(`[${e}] Required argument is missing! [node]`);if(!t.path)throw new Error(`[${e}] Required property is missing! [file.path]`);if(t.path=t.path.toString().trim(),!l.test(t.path))throw new TypeError(`[${e}] Argument property is not valid! [file.path="${t.path}"]`);if(!t.content)throw new Error(`[${e}] Required property is missing! [file.content]`);if(t.content=t.content.toString().trim(),!d.test(t.content))throw new TypeError(`[${e}] Argument property is not valid! [file.content="${t.content}"]`);if(!o.outerHTML)throw new Error(`[${e}] Required property is missing! [node.outerHTML]`);return o[h].has("sprite")&&(t.content=t.content.replace(d,((e,o,n)=>{const i=$.has(t.path),s=`${u}-${i?[...$].indexOf(t.path):$.size}`;if(!i){const e=B(`<svg xmlns="http://www.w3.org/2000/svg"><symbol id="${s}"${o}>${n}</symbol></svg>`);S().appendChild(e.firstChild.firstChild),$.add(t.path)}return`<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"${r.attributes.clone.size&&(o=j(o))?` ${[...r.attributes.clone].filter((t=>!!t&&o.has(t))).map((t=>`${t}="${o.get(t)}"`)).join(" ")}`:""}><use xlink:href="#${s}" href="#${s}"></use></svg>`}))),t.content.replace(d,((t,n,i)=>{const s=j(n),a=C(o.attributes);n=new Map([...s,...a]);const h=new Set(["class"]);for(const t of r.attributes.merge){const e=s.has(t)?s.get(t).split(g).filter((t=>!!t)):[],o=a.has(t)?a.get(t).split(g).filter((t=>!!t)):[];if(r.xhtml&&!e.length&&!o.length)continue;const i=[...e,...o];n.set(t,(h.has(t)?[...new Set(i)]:i).join(" ").trim())}for(const t of r.attributes.add){let o=t.value.split(g).filter((t=>!!t));if(n.has(t.name)){if(!r.attributes.merge.has(t.name))throw new Error(`[${e}] Can not add attribute, attribute already exists. [${t.name}]`);const i=n.get(t.name).split(g).filter((t=>!!t));if(r.xhtml&&!o.length&&!i.length)continue;o=[...i,...o]}n.set(t.name,(h.has(t.name)?[...new Set(o)]:o).join(" ").trim())}for(const t of r.attributes.data){if(!n.has(t))continue;let o=n.get(t).split(g).filter((t=>!!t));const i=`data-${t}`;if(n.has(i)){if(!r.attributes.merge.has(i))throw new Error(`[${e}] Can not transform attribute to data-attribute, data-attribute already exists. [${t}]`);const s=n.get(i).split(g).filter((t=>!!t));if(r.xhtml&&!o.length&&!s.length)continue;o=[...s,...o]}n.set(i,(h.has(t)?[...new Set(o)]:o).join(" ").trim()),r.attributes.remove.has(t)||r.attributes.remove.add(t)}for(const t of r.attributes.remove)n.has(t)&&n.delete(t);return`<svg${n.size?` ${[...n.keys()].filter((t=>!!t)).map((t=>`${t}="${n.get(t)}"`)).join(" ")}`:""}>${i}</svg>`}))},P=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;if(!t)throw new Error(`[${e}] Required argument is missing! [node]`);if(!t.dataset.src&&!t.src)throw new Error(`[${e}] Required property is missing! [node.data-src || node.src]`);t.dataset.src&&(t.dataset.src=t.dataset.src.toString().trim()),t.src&&(t.src=t.src.toString().trim()),M(t.dataset.src||t.src).then((e=>{const r=U(e,t),o=B(r);D(t,o)})).catch((t=>console.error(`[${e}] ${t.toString()}`)))},q=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!t)throw new Error(`[${e}] Required argument is missing! [node]`);if("IMG"!==t.tagName)throw new Error(`[${e}] Required argument is not valid! [node]`);if(!o)throw new Error(`[${e}] Required argument is missing! [vnode]`);if(t[h]||(t[h]=new Set),t[h].has("processed"))return;t[h].add("processed");const n=v?o.dirs:o.data.directives;if(n.length>1)throw new Error(`[${e}] Node has more than 1 directive! [${v?"vnode.dirs":"vnode.data.directives"}]`);n[0].modifiers[r.directive.spriteModifierName]&&t[h].add("sprite"),!r._observer&&t.dataset.src&&(t.src=t.dataset.src,delete t.dataset.src),t.dataset.src?I().observe(t):P(t)};t.directive(r.directive.name,v?{beforeMount:q}:{bind:q})}}}(),o=o.default}()}));
\No newline at end of file