@bull-board/ui
Version:
A Dashboard UI built on top of bull or bullmq.
1 lines • 19.7 kB
JavaScript
(self.webpackChunk_bull_board_ui=self.webpackChunk_bull_board_ui||[]).push([["79535"],{98130(n,t,e){"use strict";e.d(t,{AO:()=>l,TM:()=>b,sC:()=>k,yJ:()=>f,zR:()=>y});var r=e(89575),o=e(49930),i=e(37730);function a(n){return"/"===n.charAt(0)?n:"/"+n}function c(n){return"/"===n.charAt(0)?n.substr(1):n}function u(n,t){return 0===n.toLowerCase().indexOf(t.toLowerCase())&&-1!=="/?#".indexOf(n.charAt(t.length))?n.substr(t.length):n}function s(n){return"/"===n.charAt(n.length-1)?n.slice(0,-1):n}function l(n){var t=n.pathname,e=n.search,r=n.hash,o=t||"/";return e&&"?"!==e&&(o+="?"===e.charAt(0)?e:"?"+e),r&&"#"!==r&&(o+="#"===r.charAt(0)?r:"#"+r),o}function f(n,t,e,i){var a,c,u,s,l,f;"string"==typeof n?(u="",s="",-1!==(l=(c=n||"/").indexOf("#"))&&(s=c.substr(l),c=c.substr(0,l)),-1!==(f=c.indexOf("?"))&&(u=c.substr(f),c=c.substr(0,f)),(a={pathname:c,search:"?"===u?"":u,hash:"#"===s?"":s}).state=t):(void 0===(a=(0,r.A)({},n)).pathname&&(a.pathname=""),a.search?"?"!==a.search.charAt(0)&&(a.search="?"+a.search):a.search="",a.hash?"#"!==a.hash.charAt(0)&&(a.hash="#"+a.hash):a.hash="",void 0!==t&&void 0===a.state&&(a.state=t));try{a.pathname=decodeURI(a.pathname)}catch(n){if(n instanceof URIError)throw URIError('Pathname "'+a.pathname+'" could not be decoded. This is likely caused by an invalid percent-encoding.');throw n}return e&&(a.key=e),i?a.pathname?"/"!==a.pathname.charAt(0)&&(a.pathname=(0,o.A)(a.pathname,i.pathname)):a.pathname=i.pathname:a.pathname||(a.pathname="/"),a}function p(){var n=null,t=[];return{setPrompt:function(t){return n=t,function(){n===t&&(n=null)}},confirmTransitionTo:function(t,e,r,o){if(null!=n){var i="function"==typeof n?n(t,e):n;"string"==typeof i?"function"==typeof r?r(i,o):o(!0):o(!1!==i)}else o(!0)},appendListener:function(n){var e=!0;function r(){e&&n.apply(void 0,arguments)}return t.push(r),function(){e=!1,t=t.filter(function(n){return n!==r})}},notifyListeners:function(){for(var n=arguments.length,e=Array(n),r=0;r<n;r++)e[r]=arguments[r];t.forEach(function(n){return n.apply(void 0,e)})}}}var h=!!("u">typeof window&&window.document&&window.document.createElement);function d(n,t){t(window.confirm(n))}var v="popstate",m="hashchange";function g(){try{return window.history.state||{}}catch(n){return{}}}function y(n){void 0===n&&(n={}),h||(0,i.A)(!1);var t,e=window.history,o=(-1===(t=window.navigator.userAgent).indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone"))&&window.history&&"pushState"in window.history,c=-1!==window.navigator.userAgent.indexOf("Trident"),y=n,x=y.forceRefresh,w=void 0!==x&&x,A=y.getUserConfirmation,C=void 0===A?d:A,E=y.keyLength,b=void 0===E?6:E,P=n.basename?s(a(n.basename)):"";function k(n){var t=n||{},e=t.key,r=t.state,o=window.location,i=o.pathname+o.search+o.hash;return P&&(i=u(i,P)),f(i,r,e)}function O(){return Math.random().toString(36).substr(2,b)}var R=p();function T(n){(0,r.A)(j,n),j.length=e.length,R.notifyListeners(j.location,j.action)}function _(n){(void 0!==n.state||-1!==navigator.userAgent.indexOf("CriOS"))&&U(k(n.state))}function L(){U(k(g()))}var S=!1;function U(n){S?(S=!1,T()):R.confirmTransitionTo(n,"POP",C,function(t){var e,r,o,i,a;t?T({action:"POP",location:n}):(e=n,r=j.location,-1===(o=I.indexOf(r.key))&&(o=0),-1===(i=I.indexOf(e.key))&&(i=0),(a=o-i)&&(S=!0,N(a)))})}var M=k(g()),I=[M.key];function B(n){return P+l(n)}function N(n){e.go(n)}var $=0;function H(n){1===($+=n)&&1===n?(window.addEventListener(v,_),c&&window.addEventListener(m,L)):0===$&&(window.removeEventListener(v,_),c&&window.removeEventListener(m,L))}var W=!1,j={length:e.length,action:"POP",location:M,createHref:B,push:function(n,t){var r="PUSH",i=f(n,t,O(),j.location);R.confirmTransitionTo(i,r,C,function(n){if(n){var t=B(i),a=i.key,c=i.state;if(o)if(e.pushState({key:a,state:c},null,t),w)window.location.href=t;else{var u=I.indexOf(j.location.key),s=I.slice(0,u+1);s.push(i.key),I=s,T({action:r,location:i})}else window.location.href=t}})},replace:function(n,t){var r="REPLACE",i=f(n,t,O(),j.location);R.confirmTransitionTo(i,r,C,function(n){if(n){var t=B(i),a=i.key,c=i.state;if(o)if(e.replaceState({key:a,state:c},null,t),w)window.location.replace(t);else{var u=I.indexOf(j.location.key);-1!==u&&(I[u]=i.key),T({action:r,location:i})}else window.location.replace(t)}})},go:N,goBack:function(){N(-1)},goForward:function(){N(1)},block:function(n){void 0===n&&(n=!1);var t=R.setPrompt(n);return W||(H(1),W=!0),function(){return W&&(W=!1,H(-1)),t()}},listen:function(n){var t=R.appendListener(n);return H(1),function(){H(-1),t()}}};return j}var x="hashchange",w={hashbang:{encodePath:function(n){return"!"===n.charAt(0)?n:"!/"+c(n)},decodePath:function(n){return"!"===n.charAt(0)?n.substr(1):n}},noslash:{encodePath:c,decodePath:a},slash:{encodePath:a,decodePath:a}};function A(n){var t=n.indexOf("#");return -1===t?n:n.slice(0,t)}function C(){var n=window.location.href,t=n.indexOf("#");return -1===t?"":n.substring(t+1)}function E(n){window.location.replace(A(window.location.href)+"#"+n)}function b(n){void 0===n&&(n={}),h||(0,i.A)(!1);var t=window.history;window.navigator.userAgent.indexOf("Firefox");var e=n,o=e.getUserConfirmation,c=void 0===o?d:o,v=e.hashType,m=n.basename?s(a(n.basename)):"",g=w[void 0===v?"slash":v],y=g.encodePath,b=g.decodePath;function P(){var n=b(C());return m&&(n=u(n,m)),f(n)}var k=p();function O(n){(0,r.A)(H,n),H.length=t.length,k.notifyListeners(H.location,H.action)}var R=!1,T=null;function _(){var n=C(),t=y(n);if(n!==t)E(t);else{var e,r=P(),o=H.location;if(!R&&o.pathname===r.pathname&&o.search===r.search&&o.hash===r.hash||T===l(r))return;T=null,e=r,R?(R=!1,O()):k.confirmTransitionTo(e,"POP",c,function(n){var t,r,o,i,a;n?O({action:"POP",location:e}):(t=e,r=H.location,-1===(o=M.lastIndexOf(l(r)))&&(o=0),-1===(i=M.lastIndexOf(l(t)))&&(i=0),(a=o-i)&&(R=!0,I(a)))})}}var L=C(),S=y(L);L!==S&&E(S);var U=P(),M=[l(U)];function I(n){t.go(n)}var B=0;function N(n){1===(B+=n)&&1===n?window.addEventListener(x,_):0===B&&window.removeEventListener(x,_)}var $=!1,H={length:t.length,action:"POP",location:U,createHref:function(n){var t=document.querySelector("base"),e="";return t&&t.getAttribute("href")&&(e=A(window.location.href)),e+"#"+y(m+l(n))},push:function(n,t){var e="PUSH",r=f(n,void 0,void 0,H.location);k.confirmTransitionTo(r,e,c,function(n){if(n){var t=l(r),o=y(m+t);if(C()!==o){T=t,window.location.hash=o;var i=M.lastIndexOf(l(H.location)),a=M.slice(0,i+1);a.push(t),M=a,O({action:e,location:r})}else O()}})},replace:function(n,t){var e="REPLACE",r=f(n,void 0,void 0,H.location);k.confirmTransitionTo(r,e,c,function(n){if(n){var t=l(r),o=y(m+t);C()!==o&&(T=t,E(o));var i=M.indexOf(l(H.location));-1!==i&&(M[i]=t),O({action:e,location:r})}})},go:I,goBack:function(){I(-1)},goForward:function(){I(1)},block:function(n){void 0===n&&(n=!1);var t=k.setPrompt(n);return $||(N(1),$=!0),function(){return $&&($=!1,N(-1)),t()}},listen:function(n){var t=k.appendListener(n);return N(1),function(){N(-1),t()}}};return H}function P(n,t,e){return Math.min(Math.max(n,t),e)}function k(n){void 0===n&&(n={});var t=n,e=t.getUserConfirmation,o=t.initialEntries,i=void 0===o?["/"]:o,a=t.initialIndex,c=t.keyLength,u=void 0===c?6:c,s=p();function h(n){(0,r.A)(y,n),y.length=y.entries.length,s.notifyListeners(y.location,y.action)}function d(){return Math.random().toString(36).substr(2,u)}var v=P(void 0===a?0:a,0,i.length-1),m=i.map(function(n){return"string"==typeof n?f(n,void 0,d()):f(n,void 0,n.key||d())});function g(n){var t=P(y.index+n,0,y.entries.length-1),r=y.entries[t];s.confirmTransitionTo(r,"POP",e,function(n){n?h({action:"POP",location:r,index:t}):h()})}var y={length:m.length,action:"POP",location:m[v],index:v,entries:m,createHref:l,push:function(n,t){var r="PUSH",o=f(n,t,d(),y.location);s.confirmTransitionTo(o,r,e,function(n){if(n){var t=y.index+1,e=y.entries.slice(0);e.length>t?e.splice(t,e.length-t,o):e.push(o),h({action:r,location:o,index:t,entries:e})}})},replace:function(n,t){var r="REPLACE",o=f(n,t,d(),y.location);s.confirmTransitionTo(o,r,e,function(n){n&&(y.entries[y.index]=o,h({action:r,location:o}))})},go:g,goBack:function(){g(-1)},goForward:function(){g(1)},canGo:function(n){var t=y.index+n;return t>=0&&t<y.entries.length},block:function(n){return void 0===n&&(n=!1),s.setPrompt(n)},listen:function(n){return s.appendListener(n)}};return y}},33664(n,t,e){"use strict";e.d(t,{Kd:()=>l,N_:()=>m,k2:()=>x});var r=e(86090),o=e(89086),i=e(14041),a=e(98130),c=e(89575),u=e(17502),s=e(37730),l=function(n){function t(){for(var t,e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return(t=n.call.apply(n,[this].concat(r))||this).history=(0,a.zR)(t.props),t}return(0,o.A)(t,n),t.prototype.render=function(){return i.createElement(r.Ix,{history:this.history,children:this.props.children})},t}(i.Component);i.Component;var f=function(n,t){return"function"==typeof n?n(t):n},p=function(n,t){return"string"==typeof n?(0,a.yJ)(n,null,null,t):n},h=function(n){return n},d=i.forwardRef;void 0===d&&(d=h);var v=d(function(n,t){var e=n.innerRef,r=n.navigate,o=n.onClick,a=(0,u.A)(n,["innerRef","navigate","onClick"]),s=a.target,l=(0,c.A)({},a,{onClick:function(n){try{o&&o(n)}catch(t){throw n.preventDefault(),t}n.defaultPrevented||0!==n.button||s&&"_self"!==s||n.metaKey||n.altKey||n.ctrlKey||n.shiftKey||(n.preventDefault(),r())}});return h!==d?l.ref=t||e:l.ref=e,i.createElement("a",l)}),m=d(function(n,t){var e=n.component,o=void 0===e?v:e,l=n.replace,m=n.to,g=n.innerRef,y=(0,u.A)(n,["component","replace","to","innerRef"]);return i.createElement(r.XZ.Consumer,null,function(n){n||(0,s.A)(!1);var e=n.history,r=p(f(m,n.location),n.location),u=r?e.createHref(r):"",v=(0,c.A)({},y,{href:u,navigate:function(){var t=f(m,n.location),r=(0,a.AO)(n.location)===(0,a.AO)(p(t));(l||r?e.replace:e.push)(t)}});return h!==d?v.ref=t||g:v.innerRef=g,i.createElement(o,v)})}),g=function(n){return n},y=i.forwardRef;void 0===y&&(y=g);var x=y(function(n,t){var e=n["aria-current"],o=void 0===e?"page":e,a=n.activeClassName,l=void 0===a?"active":a,h=n.activeStyle,d=n.className,v=n.exact,x=n.isActive,w=n.location,A=n.sensitive,C=n.strict,E=n.style,b=n.to,P=n.innerRef,k=(0,u.A)(n,["aria-current","activeClassName","activeStyle","className","exact","isActive","location","sensitive","strict","style","to","innerRef"]);return i.createElement(r.XZ.Consumer,null,function(n){n||(0,s.A)(!1);var e=w||n.location,a=p(f(b,e),e),u=a.pathname,O=u&&u.replace(/([.+*?=^!:${}()[\]|/\\])/g,"\\$1"),R=O?(0,r.B6)(e.pathname,{path:O,exact:v,sensitive:A,strict:C}):null,T=!!(x?x(R,e):R),_="function"==typeof d?d(T):d,L="function"==typeof E?E(T):E;T&&(_=function(){for(var n=arguments.length,t=Array(n),e=0;e<n;e++)t[e]=arguments[e];return t.filter(function(n){return n}).join(" ")}(_,l),L=(0,c.A)({},L,h));var S=(0,c.A)({"aria-current":T&&o||null,className:_,style:L,to:a},k);return g!==y?S.ref=t||P:S.innerRef=P,i.createElement(m,S)})})},86090(n,t,e){"use strict";e.d(t,{B6:()=>C,Ix:()=>x,W6:()=>O,XZ:()=>y,dO:()=>b,qh:()=>E,y:()=>P,zy:()=>R});var r=e(89086),o=e(14041),i=e(39067),a=e.n(i),c=(e(98130),e(37730)),u=e(89575),s=e(82402),l=e.n(s);e(524);var f=e(17502),p=e(75985),h=e.n(p),d="u">typeof globalThis?globalThis:"u">typeof window?window:void 0!==e.g?e.g:{},v=o.createContext||function(n,t){var e,i,c="__create-react-context-"+(d.__global_unique_id__=(d.__global_unique_id__||0)+1)+"__",u=function(n){function e(){for(var t,e,r,o=arguments.length,i=Array(o),a=0;a<o;a++)i[a]=arguments[a];return e=(t=n.call.apply(n,[this].concat(i))||this).props.value,r=[],t.emitter={on:function(n){r.push(n)},off:function(n){r=r.filter(function(t){return t!==n})},get:function(){return e},set:function(n,t){e=n,r.forEach(function(n){return n(e,t)})}},t}(0,r.A)(e,n);var o=e.prototype;return o.getChildContext=function(){var n;return(n={})[c]=this.emitter,n},o.componentWillReceiveProps=function(n){if(this.props.value!==n.value){var e,r=this.props.value,o=n.value;(r===o?0!==r||1/r==1/o:r!=r&&o!=o)?e=0:0!=(e=("function"==typeof t?t(r,o):0x3fffffff)|0)&&this.emitter.set(n.value,e)}},o.render=function(){return this.props.children},e}(o.Component);(e={})[c]=a().object.isRequired,u.childContextTypes=e;var s=function(t){function e(){for(var n,e=arguments.length,r=Array(e),o=0;o<e;o++)r[o]=arguments[o];return(n=t.call.apply(t,[this].concat(r))||this).observedBits=void 0,n.state={value:n.getValue()},n.onUpdate=function(t,e){(n.observedBits&e)!=0&&n.setState({value:n.getValue()})},n}(0,r.A)(e,t);var o=e.prototype;return o.componentWillReceiveProps=function(n){var t=n.observedBits;this.observedBits=null==t?0x3fffffff:t},o.componentDidMount=function(){this.context[c]&&this.context[c].on(this.onUpdate);var n=this.props.observedBits;this.observedBits=null==n?0x3fffffff:n},o.componentWillUnmount=function(){this.context[c]&&this.context[c].off(this.onUpdate)},o.getValue=function(){return this.context[c]?this.context[c].get():n},o.render=function(){var n;return(Array.isArray(n=this.props.children)?n[0]:n)(this.state.value)},e}(o.Component);return(i={})[c]=a().object,s.contextTypes=i,{Provider:u,Consumer:s}},m=function(n){var t=v();return t.displayName=n,t},g=m("Router-History"),y=m("Router"),x=function(n){function t(t){var e;return(e=n.call(this,t)||this).state={location:t.history.location},e._isMounted=!1,e._pendingLocation=null,t.staticContext||(e.unlisten=t.history.listen(function(n){e._pendingLocation=n})),e}(0,r.A)(t,n),t.computeRootMatch=function(n){return{path:"/",url:"/",params:{},isExact:"/"===n}};var e=t.prototype;return e.componentDidMount=function(){var n=this;this._isMounted=!0,this.unlisten&&this.unlisten(),this.props.staticContext||(this.unlisten=this.props.history.listen(function(t){n._isMounted&&n.setState({location:t})})),this._pendingLocation&&this.setState({location:this._pendingLocation})},e.componentWillUnmount=function(){this.unlisten&&(this.unlisten(),this._isMounted=!1,this._pendingLocation=null)},e.render=function(){return o.createElement(y.Provider,{value:{history:this.props.history,location:this.state.location,match:t.computeRootMatch(this.state.location.pathname),staticContext:this.props.staticContext}},o.createElement(g.Provider,{children:this.props.children||null,value:this.props.history}))},t}(o.Component);o.Component,o.Component;var w={},A=0;function C(n,t){void 0===t&&(t={}),("string"==typeof t||Array.isArray(t))&&(t={path:t});var e=t,r=e.path,o=e.exact,i=void 0!==o&&o,a=e.strict,c=void 0!==a&&a,u=e.sensitive,s=void 0!==u&&u;return[].concat(r).reduce(function(t,e){if(!e&&""!==e)return null;if(t)return t;var r=function(n,t){var e=""+t.end+t.strict+t.sensitive,r=w[e]||(w[e]={});if(r[n])return r[n];var o=[],i={regexp:l()(n,o,t),keys:o};return A<1e4&&(r[n]=i,A++),i}(e,{end:i,strict:c,sensitive:s}),o=r.regexp,a=r.keys,u=o.exec(n);if(!u)return null;var f=u[0],p=u.slice(1),h=n===f;return i&&!h?null:{path:e,url:"/"===e&&""===f?"/":f,isExact:h,params:a.reduce(function(n,t,e){return n[t.name]=p[e],n},{})}},null)}var E=function(n){function t(){return n.apply(this,arguments)||this}return(0,r.A)(t,n),t.prototype.render=function(){var n=this;return o.createElement(y.Consumer,null,function(t){t||(0,c.A)(!1);var e,r=n.props.location||t.location,i=n.props.computedMatch?n.props.computedMatch:n.props.path?C(r.pathname,n.props):t.match,a=(0,u.A)({},t,{location:r,match:i}),s=n.props,l=s.children,f=s.component,p=s.render;return Array.isArray(l)&&(e=l,0===o.Children.count(e))&&(l=null),o.createElement(y.Provider,{value:a},a.match?l?"function"==typeof l?l(a):l:f?o.createElement(f,a):p?p(a):null:"function"==typeof l?l(a):null)})},t}(o.Component);o.Component;var b=function(n){function t(){return n.apply(this,arguments)||this}return(0,r.A)(t,n),t.prototype.render=function(){var n=this;return o.createElement(y.Consumer,null,function(t){t||(0,c.A)(!1);var e,r,i=n.props.location||t.location;return o.Children.forEach(n.props.children,function(n){if(null==r&&o.isValidElement(n)){e=n;var a=n.props.path||n.props.from;r=a?C(i.pathname,(0,u.A)({},n.props,{path:a})):t.match}}),r?o.cloneElement(e,{location:i,computedMatch:r}):null})},t}(o.Component);function P(n){var t="withRouter("+(n.displayName||n.name)+")",e=function(t){var e=t.wrappedComponentRef,r=(0,f.A)(t,["wrappedComponentRef"]);return o.createElement(y.Consumer,null,function(t){return t||(0,c.A)(!1),o.createElement(n,(0,u.A)({},r,t,{ref:e}))})};return e.displayName=t,e.WrappedComponent=n,h()(e,n)}var k=o.useContext;function O(){return k(g)}function R(){return k(y).location}},82402(n,t,e){var r=e(56815);n.exports=function n(t,e,o){if(r(e)||(o=e||o,e=[]),o=o||{},t instanceof RegExp){var a,c,u=e,f=t.source.match(/\((?!\?)/g);if(f)for(var p=0;p<f.length;p++)u.push({name:p,prefix:null,delimiter:null,optional:!1,repeat:!1,partial:!1,asterisk:!1,pattern:null});return t.keys=u,t}if(r(t)){for(var h,d=e,v=o,m=[],g=0;g<t.length;g++)m.push(n(t[g],d,v).source);return(h=RegExp("(?:"+m.join("|")+")",s(v))).keys=d,h}return a=e,l(i(t,c=o),a,c)},n.exports.parse=i,n.exports.compile=function(n,t){return c(i(n,t),t)},n.exports.tokensToFunction=c,n.exports.tokensToRegExp=l;var o=RegExp("(\\\\.)|([\\/.])?(?:(?:\\:(\\w+)(?:\\(((?:\\\\.|[^\\\\()])+)\\))?|\\(((?:\\\\.|[^\\\\()])+)\\))([+*?])?|(\\*))","g");function i(n,t){for(var e,r=[],i=0,a=0,c="",s=t&&t.delimiter||"/";null!=(e=o.exec(n));){var l,f,p=e[0],h=e[1],d=e.index;if(c+=n.slice(a,d),a=d+p.length,h){c+=h[1];continue}var v=n[a],m=e[2],g=e[3],y=e[4],x=e[5],w=e[6],A=e[7];c&&(r.push(c),c="");var C=null!=m&&null!=v&&v!==m,E="+"===w||"*"===w,b="?"===w||"*"===w,P=m||s,k=y||x,O=m||("string"==typeof r[r.length-1]?r[r.length-1]:"");r.push({name:g||i++,prefix:m||"",delimiter:P,optional:b,repeat:E,partial:C,asterisk:!!A,pattern:k?k.replace(/([=!:$\/()])/g,"\\$1"):A?".*":(l=P,!(f=O)||f.indexOf(l)>-1?"[^"+u(l)+"]+?":u(f)+"|(?:(?!"+u(f)+")[^"+u(l)+"])+?")})}return a<n.length&&(c+=n.substr(a)),c&&r.push(c),r}function a(n){return encodeURI(n).replace(/[\/?#]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()})}function c(n,t){for(var e=Array(n.length),o=0;o<n.length;o++)"object"==typeof n[o]&&(e[o]=RegExp("^(?:"+n[o].pattern+")$",s(t)));return function(t,o){for(var i="",c=t||{},u=(o||{}).pretty?a:encodeURIComponent,s=0;s<n.length;s++){var l,f=n[s];if("string"==typeof f){i+=f;continue}var p=c[f.name];if(null==p)if(f.optional){f.partial&&(i+=f.prefix);continue}else throw TypeError('Expected "'+f.name+'" to be defined');if(r(p)){if(!f.repeat)throw TypeError('Expected "'+f.name+'" to not repeat, but received `'+JSON.stringify(p)+"`");if(0===p.length)if(f.optional)continue;else throw TypeError('Expected "'+f.name+'" to not be empty');for(var h=0;h<p.length;h++){if(l=u(p[h]),!e[s].test(l))throw TypeError('Expected all "'+f.name+'" to match "'+f.pattern+'", but received `'+JSON.stringify(l)+"`");i+=(0===h?f.prefix:f.delimiter)+l}continue}if(l=f.asterisk?encodeURI(p).replace(/[?#]/g,function(n){return"%"+n.charCodeAt(0).toString(16).toUpperCase()}):u(p),!e[s].test(l))throw TypeError('Expected "'+f.name+'" to match "'+f.pattern+'", but received "'+l+'"');i+=f.prefix+l}return i}}function u(n){return n.replace(/([.+*?=^!:${}()[\]|\/\\])/g,"\\$1")}function s(n){return n&&n.sensitive?"":"i"}function l(n,t,e){r(t)||(e=t||e,t=[]);for(var o,i=(e=e||{}).strict,a=!1!==e.end,c="",l=0;l<n.length;l++){var f=n[l];if("string"==typeof f)c+=u(f);else{var p=u(f.prefix),h="(?:"+f.pattern+")";t.push(f),f.repeat&&(h+="(?:"+p+h+")*"),c+=h=f.optional?f.partial?p+"("+h+")?":"(?:"+p+"("+h+"))?":p+"("+h+")"}}var d=u(e.delimiter||"/"),v=c.slice(-d.length)===d;return i||(c=(v?c.slice(0,-d.length):c)+"(?:"+d+"(?=$))?"),a?c+="$":c+=i&&v?"":"(?="+d+"|$)",(o=RegExp("^"+c,s(e))).keys=t,o}}}]);