{"version":3,"sources":["libs/svgxuse/svgxuse.js"],"names":["window","addEventListener","cache","Object","create","checkUseElems","tid","debouncedCheck","clearTimeout","setTimeout","unobserveChanges","observeChanges","observer","MutationObserver","observe","document","documentElement","childList","subtree","attributes","disconnect","removeEventListener","ignore","createRequest","url","getOrigin","loc","a","protocol","undefined","createElement","href","replace","host","Request","origin","origin2","XMLHttpRequest","location","withCredentials","XDomainRequest","xlinkNS","base","bcr","fallback","hash","i","inProgressCount","isHidden","uses","xhr","observeIfDone","attrUpdateFunc","spec","useEl","setAttributeNS","hasAttribute","setAttribute","onloadFunc","body","x","svg","onload","innerHTML","responseText","getElementsByTagName","style","position","width","height","overflow","insertBefore","firstChild","onErrorTimeout","onerror","ontimeout","length","getBoundingClientRect","getAttribute","getAttributeNS","split","left","right","top","bottom","getElementById","open","send","abort","winLoad","readyState"],"mappings":";;AAAA;;;;;;;AAMA;;AACA;AACC,aAAY;AACT;;AACA,MAAI,OAAOA,MAAP,KAAkB,WAAlB,IAAiCA,MAAM,CAACC,gBAA5C,EAA8D;AAC1D,QAAIC,KAAK,GAAGC,MAAM,CAACC,MAAP,CAAc,IAAd,CAAZ,CAD0D,CACzB;;AACjC,QAAIC,aAAJ;AACA,QAAIC,GAAJ,CAH0D,CAGjD;;AACT,QAAIC,cAAc,GAAG,SAAjBA,cAAiB,GAAY;AAC7BC,MAAAA,YAAY,CAACF,GAAD,CAAZ;AACAA,MAAAA,GAAG,GAAGG,UAAU,CAACJ,aAAD,EAAgB,GAAhB,CAAhB;AACH,KAHD;;AAIA,QAAIK,gBAAgB,GAAG,4BAAY;AAC/B;AACH,KAFD;;AAGA,QAAIC,cAAc,GAAG,SAAjBA,cAAiB,GAAY;AAC7B,UAAIC,QAAJ;AACAZ,MAAAA,MAAM,CAACC,gBAAP,CAAwB,QAAxB,EAAkCM,cAAlC,EAAkD,KAAlD;AACAP,MAAAA,MAAM,CAACC,gBAAP,CAAwB,mBAAxB,EAA6CM,cAA7C,EAA6D,KAA7D;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;;AA0IA,QAAIsC,QAAJ;;AACAA,IAAAA,QAAO,GAAG,mBAAY;AAClBzF,MAAAA,MAAM,CAACqB,mBAAP,CAA2B,MAA3B,EAAmCoE,QAAnC,EAA4C,KAA5C,EADkB,CACkC;;AACpDnF,MAAAA,GAAG,GAAGG,UAAU,CAACJ,aAAD,EAAgB,CAAhB,CAAhB;AACH,KAHD;;AAIA,QAAIU,QAAQ,CAAC2E,UAAT,KAAwB,UAA5B,EAAwC;AACpC;AACA1F,MAAAA,MAAM,CAACC,gBAAP,CAAwB,MAAxB,EAAgCwF,QAAhC,EAAyC,KAAzC;AACH,KAHD,MAGO;AACH;AACAA,MAAAA,QAAO;AACV;AACJ;AACJ,CA7NA,GAAD","sourcesContent":["/*!\r\n * @copyright Copyright (c) 2017 IcoMoon.io\r\n * @license Licensed under MIT license\r\n * See https://github.com/Keyamoon/svgxuse\r\n * @version 1.2.6\r\n */\r\n/*jslint browser: true */\r\n/*global XDomainRequest, MutationObserver, window */\r\n(function () {\r\n \"use strict\";\r\n if (typeof window !== \"undefined\" && window.addEventListener) {\r\n var cache = Object.create(null); // holds xhr objects to prevent multiple requests\r\n var checkUseElems;\r\n var tid; // timeout id\r\n var debouncedCheck = function () {\r\n clearTimeout(tid);\r\n tid = setTimeout(checkUseElems, 100);\r\n };\r\n var unobserveChanges = function () {\r\n return;\r\n };\r\n var observeChanges = function () {\r\n var observer;\r\n window.addEventListener(\"resize\", debouncedCheck, false);\r\n window.addEventListener(\"orientationchange\", debouncedCheck, false);\r\n if (window.MutationObserver) {\r\n observer = new MutationObserver(debouncedCheck);\r\n observer.observe(document.documentElement, {\r\n childList: true,\r\n subtree: true,\r\n attributes: true\r\n });\r\n unobserveChanges = function () {\r\n try {\r\n observer.disconnect();\r\n window.removeEventListener(\"resize\", debouncedCheck, false);\r\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\r\n } catch (ignore) { }\r\n };\r\n } else {\r\n document.documentElement.addEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\r\n unobserveChanges = function () {\r\n document.documentElement.removeEventListener(\"DOMSubtreeModified\", debouncedCheck, false);\r\n window.removeEventListener(\"resize\", debouncedCheck, false);\r\n window.removeEventListener(\"orientationchange\", debouncedCheck, false);\r\n };\r\n }\r\n };\r\n var createRequest = function (url) {\r\n // In IE 9, cross origin requests can only be sent using XDomainRequest.\r\n // XDomainRequest would fail if CORS headers are not set.\r\n // Therefore, XDomainRequest should only be used with cross origin requests.\r\n function getOrigin(loc) {\r\n var a;\r\n if (loc.protocol !== undefined) {\r\n a = loc;\r\n } else {\r\n a = document.createElement(\"a\");\r\n a.href = loc;\r\n }\r\n return a.protocol.replace(/:/g, \"\") + a.host;\r\n }\r\n var Request;\r\n var origin;\r\n var origin2;\r\n if (window.XMLHttpRequest) {\r\n Request = new XMLHttpRequest();\r\n origin = getOrigin(location);\r\n origin2 = getOrigin(url);\r\n if (Request.withCredentials === undefined && origin2 !== \"\" && origin2 !== origin) {\r\n Request = XDomainRequest || undefined;\r\n } else {\r\n Request = XMLHttpRequest;\r\n }\r\n }\r\n return Request;\r\n };\r\n var xlinkNS = \"http://www.w3.org/1999/xlink\";\r\n checkUseElems = function () {\r\n var base;\r\n var bcr;\r\n var fallback = \"\"; // optional fallback URL in case no base path to SVG file was given and no symbol definition was found.\r\n var hash;\r\n var href;\r\n var i;\r\n var inProgressCount = 0;\r\n var isHidden;\r\n var Request;\r\n var url;\r\n var uses;\r\n var xhr;\r\n function observeIfDone() {\r\n // If done with making changes, start watching for chagnes in DOM again\r\n inProgressCount -= 1;\r\n if (inProgressCount === 0) { // if all xhrs were resolved\r\n unobserveChanges(); // make sure to remove old handlers\r\n observeChanges(); // watch for changes to DOM\r\n }\r\n }\r\n function attrUpdateFunc(spec) {\r\n return function () {\r\n if (cache[spec.base] !== true) {\r\n spec.useEl.setAttributeNS(xlinkNS, \"xlink:href\", \"#\" + spec.hash);\r\n if (spec.useEl.hasAttribute(\"href\")) {\r\n spec.useEl.setAttribute(\"href\", \"#\" + spec.hash);\r\n }\r\n }\r\n };\r\n }\r\n function onloadFunc(xhr) {\r\n return function () {\r\n var body = document.body;\r\n var x = document.createElement(\"x\");\r\n var svg;\r\n xhr.onload = null;\r\n x.innerHTML = xhr.responseText;\r\n svg = x.getElementsByTagName(\"svg\")[0];\r\n if (svg) {\r\n svg.setAttribute(\"aria-hidden\", \"true\");\r\n svg.style.position = \"absolute\";\r\n svg.style.width = 0;\r\n svg.style.height = 0;\r\n svg.style.overflow = \"hidden\";\r\n body.insertBefore(svg, body.firstChild);\r\n }\r\n observeIfDone();\r\n };\r\n }\r\n function onErrorTimeout(xhr) {\r\n return function () {\r\n xhr.onerror = null;\r\n xhr.ontimeout = null;\r\n observeIfDone();\r\n };\r\n }\r\n unobserveChanges(); // stop watching for changes to DOM\r\n // find all use elements\r\n uses = document.getElementsByTagName(\"use\");\r\n for (i = 0; i < uses.length; i += 1) {\r\n try {\r\n bcr = uses[i].getBoundingClientRect();\r\n } catch (ignore) {\r\n // failed to get bounding rectangle of the use element\r\n bcr = false;\r\n }\r\n href = uses[i].getAttribute(\"href\")\r\n || uses[i].getAttributeNS(xlinkNS, \"href\")\r\n || uses[i].getAttribute(\"xlink:href\");\r\n if (href && href.split) {\r\n url = href.split(\"#\");\r\n } else {\r\n url = [\"\", \"\"];\r\n }\r\n base = url[0];\r\n hash = url[1];\r\n isHidden = bcr && bcr.left === 0 && bcr.right === 0 && bcr.top === 0 && bcr.bottom === 0;\r\n if (bcr && bcr.width === 0 && bcr.height === 0 && !isHidden) {\r\n // the use element is empty\r\n // if there is a reference to an external SVG, try to fetch it\r\n // use the optional fallback URL if there is no reference to an external SVG\r\n if (fallback && !base.length && hash && !document.getElementById(hash)) {\r\n base = fallback;\r\n }\r\n if (uses[i].hasAttribute(\"href\")) {\r\n uses[i].setAttributeNS(xlinkNS, \"xlink:href\", href);\r\n }\r\n if (base.length) {\r\n // schedule updating xlink:href\r\n xhr = cache[base];\r\n if (xhr !== true) {\r\n // true signifies that prepending the SVG was not required\r\n setTimeout(attrUpdateFunc({\r\n useEl: uses[i],\r\n base: base,\r\n hash: hash\r\n }), 0);\r\n }\r\n if (xhr === undefined) {\r\n Request = createRequest(base);\r\n if (Request !== undefined) {\r\n xhr = new Request();\r\n cache[base] = xhr;\r\n xhr.onload = onloadFunc(xhr);\r\n xhr.onerror = onErrorTimeout(xhr);\r\n xhr.ontimeout = onErrorTimeout(xhr);\r\n xhr.open(\"GET\", base);\r\n xhr.send();\r\n inProgressCount += 1;\r\n }\r\n }\r\n }\r\n } else {\r\n if (!isHidden) {\r\n if (cache[base] === undefined) {\r\n // remember this URL if the use element was not empty and no request was sent\r\n cache[base] = true;\r\n } else if (cache[base].onload) {\r\n // if it turns out that prepending the SVG is not necessary,\r\n // abort the in-progress xhr.\r\n cache[base].abort();\r\n delete cache[base].onload;\r\n cache[base] = true;\r\n }\r\n } else if (base.length && cache[base]) {\r\n setTimeout(attrUpdateFunc({\r\n useEl: uses[i],\r\n base: base,\r\n hash: hash\r\n }), 0);\r\n }\r\n }\r\n }\r\n uses = \"\";\r\n inProgressCount += 1;\r\n observeIfDone();\r\n };\r\n var winLoad;\r\n winLoad = function () {\r\n window.removeEventListener(\"load\", winLoad, false); // to prevent memory leaks\r\n tid = setTimeout(checkUseElems, 0);\r\n };\r\n if (document.readyState !== \"complete\") {\r\n // The load event fires when all resources have finished loading, which allows detecting whether SVG use elements are empty.\r\n window.addEventListener(\"load\", winLoad, false);\r\n } else {\r\n // No need to add a listener if the document is already loaded, initialize immediately.\r\n winLoad();\r\n }\r\n }\r\n}());"],"file":"../../../libs/svgxuse/svgxuse.js"}