text: !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("xatto")):"function"==typeof define&&define.amd?define(["exports","xatto"],e):e(t["xatto-route"]={},t.xatto)}(this,function(t,p){"use strict";var n=function(){return(n=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function s(t,e){var o={};for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.indexOf(n)<0&&(o[n]=t[n]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(n=Object.getOwnPropertySymbols(t);r<n.length;r++)e.indexOf(n[r])<0&&(o[n[r]]=t[n[r]])}return o}function c(t,e){return(t.protocol&&":"!==t.protocol?t.protocol:e.protocol)+"//"+([t.hostname,t.port].filter(Boolean).join(":")||[e.hostname,e.port].filter(Boolean).join(":"))}function r(t,e,o,n){var r=function(t,e,o,n){if(!(n.defaultPrevented||0!==n.button||n.altKey||n.metaKey||n.ctrlKey||n.shiftKey||"_blank"===o.target)){var r=o.location||t.location||o.xa.extra.location||window.location;if(c(r,r)===c(n.currentTarget,r)){n.preventDefault();var a=o.href,i=r.pathname;if(a!==i)return history.pushState(i,"",a),{}}}}(t,0,o,n);return o.tier.onclick&&o.tier.onclick(t,e,o,n)||r}t.Route=function(t,e){var o=t.xa,n=o.context,r=o.extra,a=s(t,["xa"]),i=a.location||n.location||r.location||document.location||window.location,c=a.flags||"",l=a.pattern;null==l?l="":l instanceof RegExp&&(c=c||l.flags||"",l=l.source),l="/"===(l="^"===l[0]?l.slice(1):l)[0]?l.slice(1):l;var u=(l=new RegExp("^/"+l)).exec(i.pathname);if(!u)return!1;var f={location:i,match:u,params:u.groups||{},path:u[0],pattern:l};return p.x(p.x,{},e.map(function(t){return t.props.route=f,t}))},t.RouteLink=function(t,e){t.xa.extra;var o=s(t,["xa"]);return p.x("a",n({},o,{onclick:r,tier:o}),e)},t.setPopstateHandle=function(e){var t=function(t){e({})};return addEventListener("popstate",t),function(){removeEventListener("popstate",t)}}});
  //# sourceMappingURL=dist/xatto-route.min.js.map