pulsar-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] jiazhai commented on a change in pull request #2385: Fix some spelling typos
Date Fri, 17 Aug 2018 00:16:08 GMT
jiazhai commented on a change in pull request #2385: Fix some spelling typos
URL: https://github.com/apache/incubator-pulsar/pull/2385#discussion_r210776943
 
 

 ##########
 File path: site2/website/static/js/pjax-api.min.js
 ##########
 @@ -1,4 +1,4 @@
 /*! pjax-api v3.23.0 https://github.com/falsandtru/pjax-api | (c) 2012, falsandtru | (Apache-2.0 AND MPL-2.0) License */
-require=function(){return function e(t,n,r){function i(o,c){if(!n[o]){if(!t[o]){var u="function"==typeof require&&require;if(!c&&u)return u(o,!0);if(s)return s(o,!0);var a=new Error("Cannot find module '"+o+"'");throw a.code="MODULE_NOT_FOUND",a}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){return i(t[o][1][e]||e)},l,l.exports,e,t,n,r)}return n[o].exports}for(var s="function"==typeof require&&require,o=0;o<r.length;o++)i(r[o]);return i}}()({1:[function(e,t,n){},{}],2:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],3:[function(e,t,n){arguments[4][1][0].apply(n,arguments)},{dup:1}],4:[function(e,t,n){var r,i,s=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function u(e){if(r===setTimeout)return setTimeout(e,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:c}catch(e){i=c}}();var a,l=[],d=!1,h=-1;function f(){d&&a&&(d=!1,a.length?l=a.concat(l):h=-1,l.length&&p())}function p(){if(!d){var e=u(f);d=!0;for(var t=l.length;t;){for(a=l,l=[];++h<t;)a&&a[h].run();h=-1,t=l.length}a=null,d=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===c||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function v(){}s.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new m(e,t)),1!==l.length||d||u(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},s.title="browser",s.browser=!0,s.env={},s.argv=[],s.version="",s.versions={},s.on=v,s.addListener=v,s.once=v,s.off=v,s.removeListener=v,s.removeAllListeners=v,s.emit=v,s.prependListener=v,s.prependOnceListener=v,s.listeners=function(e){return[]},s.binding=function(e){throw new Error("process.binding is not supported")},s.cwd=function(){return"/"},s.chdir=function(e){throw new Error("process.chdir is not supported")},s.umask=function(){return 0}},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./type");function i(e){return function(t,...n){if(void 0===t||null===t)throw new TypeError(`Spica: assign: Cannot walk on ${t}.`);for(const r of n)if(void 0!==r&&null!==r)for(const n of Object.keys(Object(r))){const i=Object.getOwnPropertyDescriptor(Object(r),n);void 0!==i&&i.enumerable&&e(n,Object(t),Object(r))}return Object(t)}}n.assign=i((e,t,n)=>t[e]=n[e]),n.clone=i((e,t,i)=>{switch(r.type(i[e])){case"Array":return t[e]=n.clone([],i[e]);case"Object":return t[e]=i[e]instanceof Object?n.clone({},i[e]):i[e];default:return t[e]=i[e]}}),n.extend=i((e,t,i)=>{switch(r.type(i[e])){case"Array":return t[e]=n.extend([],i[e]);case"Object":switch(r.type(t[e])){case"Object":return t[e]=i[e]instanceof Object?n.extend(t[e],i[e]):i[e];default:return t[e]=i[e]instanceof Object?n.extend({},i[e]):i[e]}default:return t[e]=i[e]}})},{"./type":84}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./assign"),i=e("./equal");n.Cache=class{constructor(e,t=(()=>void 0),n={}){if(this.size=e,this.callback=t,this.opts={ignore:{delete:!1,clear:!1}},e>0==0)throw new Error("Spica: Cache: Cache size must be greater than 0.");Object.freeze(r.extend(this.opts,n));const{stats:i,entries:s}=n.data||{stats:[[],[]],entries:[]},o=i[1].slice(0,e),c=i[0].slice(0,e-o.length);if(this.stats={LRU:c,LFU:o},this.store=new Map(s),[...i[1],...i[0]].slice(o.length+c.length).forEach(e=>void this.store.delete(e)),this.store.size!==o.length+c.length)throw new Error("Spica: Cache: Size of stats and entries is not matched.");if(![...o,...c].every(e=>this.store.has(e)))throw new Error("Spica: Cache: Keys of stats and entries is not matched.")}put(e,t,n=!0){if(!n&&this.store.has(e))return this.store.set(e,t),!0;if(this.access(e))return this.store.set(e,t),!0;const{LRU:r,LFU:i}=this.stats;if(r.length+i.length===this.size&&r.length<i.length){const e=i.pop(),t=this.store.get(e);this.store.delete(e),this.callback(e,t)}if(r.unshift(e),this.store.set(e,t),r.length+i.length>this.size){const e=r.pop(),t=this.store.get(e);this.store.delete(e),this.callback(e,t)}return!1}set(e,t,n){return this.put(e,t,n),t}get(e,t=!0){return t?(this.access(e),this.store.get(e)):this.store.get(e)}has(e){return this.store.has(e)}delete(e){if(!this.store.has(e))return!1;const{LRU:t,LFU:n}=this.stats;for(const r of[n,t]){const t=i.findIndex(e,r);if(-1===t)continue;const n=this.store.get(e);return this.store.delete(r.splice(t,1)[0]),!!this.opts.ignore.delete||(this.callback(e,n),!0)}return!1}clear(){const e=this.store;this.store=new Map,this.stats={LRU:[],LFU:[]},this.opts.ignore.clear||[...e].forEach(([e,t])=>void this.callback(e,t))}[Symbol.iterator](){return this.store[Symbol.iterator]()}export(){return{stats:[this.stats.LRU.slice(),this.stats.LFU.slice()],entries:[...this]}}inspect(){const{LRU:e,LFU:t}=this.stats;return[e.slice(),t.slice()]}access(e){return this.accessLFU(e)||this.accessLRU(e)}accessLRU(e){if(!this.store.has(e))return!1;const{LRU:t}=this.stats,n=i.findIndex(e,t);if(-1===n)return!1;const{LFU:r}=this.stats;return r.unshift(...t.splice(n,1)),!0}accessLFU(e){if(!this.store.has(e))return!1;const{LFU:t}=this.stats,n=i.findIndex(e,t);return-1!==n&&(t.unshift(...t.splice(n,1)),!0)}}},{"./assign":5,"./equal":14}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./promise"),i=e("./future"),s=e("./exception"),o=e("./monad/maybe"),c=e("./monad/either");n.Cancellation=class extends r.AtomicPromise{constructor(e=[]){var t;super(e=>t=e),this.alive=!0,this.canceled_=!1,this.state=new i.AtomicFuture,this.listeners=new Set,this.register=(e=>{return this.canceled_?(t(this.reason),()=>void 0):this.alive?(this.listeners.add(t),()=>this.alive?void this.listeners.delete(t):void 0):()=>void 0;function t(t){try{e(t)}catch(t){s.causeAsyncException(t)}}}),this.cancel=(e=>{this.alive&&(this.alive=!1,this.canceled_=!0,this.reason=e,this.state.bind(this.reason),Object.freeze(this.listeners),Object.freeze(this),this.listeners.forEach(t=>void t(e)))}),this.close=(e=>{this.alive&&(this.alive=!1,this.state.bind(r.AtomicPromise.reject(e)),Object.freeze(this.listeners),Object.freeze(this))}),this.promise=(e=>this.canceled_?r.AtomicPromise.reject(this.reason):r.AtomicPromise.resolve(e)),this.maybe=(e=>this.canceled_?o.Nothing:o.Just(e)),this.either=(e=>this.canceled_?c.Left(this.reason):c.Right(e)),t(this.state),[...e].forEach(e=>void e.register(this.cancel))}static get[Symbol.species](){return r.AtomicPromise}get canceled(){return this.canceled_}}},{"./exception":15,"./future":17,"./monad/either":22,"./monad/maybe":26,"./promise":78}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./exception");let i=[],s=new WeakSet;n.tick=function(e,t=!1){if(t){if(s.has(e))return;s.add(e)}i.push(e),1===i.length&&o.then(c)};const o=Promise.resolve();function c(){const e=function(){const e=i;return i=[],s=new WeakSet,e}();for(;;){try{for(;e.length>0;)e.shift()()}catch(e){r.causeAsyncException(e);continue}return}}},{"./exception":15}],9:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./promise");var i=e("./clock.tick");n.tick=i.tick,n.clock=Promise.resolve(),n.wait=function(e){return new r.AtomicPromise(t=>void setTimeout(t,e))}},{"./clock.tick":8,"./promise":78}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.compose=function(e,...t){return t.reduce((e,t)=>(Object.getOwnPropertyNames(t.prototype).filter(t=>!(t in e.prototype)).forEach(n=>e.prototype[n]=t.prototype[n]),Object.getOwnPropertyNames(t).filter(t=>!(t in e)).forEach(n=>e[n]=t[n]),e),e)}},{}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.concat=function(e,t){for(let n=0,r=e.length,i=t.length;n<i;++n)e[r+n]=t[n];return e}},{}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.curry=((e,t)=>0===e.length?()=>e.call(t):function e(t,n,r){return t.length<=n.length?t.apply(r,n.slice(0,t.length)):(...i)=>e(t,n.concat(i),r)}(e,[],t))},{}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("./monad/either"))},{"./monad/either":22}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.findIndex=function(e,t){const n=e!=e;for(let r=0;r<t.length;++r){const i=t[r];if(n?i!=i:i===e)return r}return-1}},{}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.causeAsyncException=function(e){new Promise((t,n)=>void n(e))}},{}],16:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./curry");n.flip=function(e){return r.curry((t,n)=>e.length>1?e(n,t):e(n)(t))}},{"./curry":12}],17:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./promise");n.Future=class extends Promise{constructor(){let e,t=!0;super(n=>e=(e=>{if(!t)throw new Error("Spica: Future: Cannot rebind a value.");return t=!1,n(e),this})),this.bind=e}static get[Symbol.species](){return Promise}};n.AtomicFuture=class extends r.AtomicPromise{constructor(){let e,t=!0;super(n=>e=(e=>{if(!t)throw new Error("Spica: AtomicFuture: Cannot rebind a value.");return t=!1,n(e),this})),this.bind=e}static get[Symbol.species](){return r.AtomicPromise}}},{"./promise":78}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./concat");class i{constructor(){this.NIL}push(e){return new s(e,this)}extend(e){return this.push(e())}array(){return[]}}n.HNil=i;class s{constructor(e,t){this.head=e,this.tail=t,this.CONS}push(e){return new s(e,this)}walk(e){return e(this.head),this.tail}modify(e){return this.tail.push(e(this.head))}extend(e){return this.push(e(this.head))}compact(e){return this.tail.modify(t=>e(this.head,t))}reverse(){return this.array().reduce((e,t)=>e.push(t),new i)}tuple(){return this.array()}array(){return r.concat([this.head],this.tail.array())}}},{"./concat":11}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("./monad/maybe"))},{"./monad/maybe":26}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./functor"),i=e("../curry");class s extends r.Functor{}n.Applicative=s,function(e){e.ap=function e(t,n){return n?t.bind(e=>n.fmap(t=>0===e.length?e(t):i.curry(e)(t))):n=>e(t,n)}}(s=n.Applicative||(n.Applicative={}))},{"../curry":12,"./functor":23}],21:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./monad");class i extends r.Monad{constructor(e){super(e),this.EITHER}fmap(e){return this.bind(t=>new o(e(t)))}ap(e){return i.ap(this,e)}bind(e){return new i(()=>{const t=this.evaluate();if(t instanceof s)return t;if(t instanceof o)return e(t.extract());if(t instanceof i)return t.bind(e);throw new TypeError(`Spica: Either: Invalid monad value.\n\t${t}`)})}join(){return this.bind(e=>e)}extract(e,t){return t?this.fmap(t).extract(e):this.evaluate().extract(e)}}n.Either=i,function(e){function t(e){return new o(e)}e.pure=t,e.Return=t,e.sequence=function(t){return t.reduce((e,t)=>e.bind(e=>t.fmap(t=>e.concat([t]))),e.Return([]))}}(i=n.Either||(n.Either={}));class s extends i{constructor(e){super(c),this.a=e,this.LEFT}bind(e){return this}extract(e){if(!e)throw this.a;return e(this.a)}}n.Left=s;class o extends i{constructor(e){super(c),this.b=e,this.RIGHT}bind(e){return new i(()=>e(this.extract()))}extract(e,t){return t?t(this.b):this.b}}function c(){throw new Error("Spica: Either: Invalid thunk call.")}n.Right=o},{"./monad":27}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./either.impl");!function(e){e.fmap=r.Either.fmap,e.pure=r.Either.pure,e.ap=r.Either.ap,e.Return=r.Either.Return,e.bind=r.Either.bind,e.sequence=r.Either.sequence}(n.Either||(n.Either={})),n.Left=function(e){return new r.Left(e)},n.Right=function(e){return new r.Right(e)}},{"./either.impl":21}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./lazy");class i extends r.Lazy{}n.Functor=i,function(e){e.fmap=function(e,t){return t?e.fmap(t):t=>e.fmap(t)}}(i=n.Functor||(n.Functor={}))},{"./lazy":24}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});n.Lazy=class{constructor(e){this.thunk=e}evaluate(){return this.memory_=this.memory_||this.thunk()}}},{}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./monadplus");class i extends r.MonadPlus{constructor(e){super(e),this.MAYBE}fmap(e){return this.bind(t=>new s(e(t)))}ap(e){return i.ap(this,e)}bind(e){return new i(()=>{const t=this.evaluate();if(t instanceof s)return e(t.extract());if(t instanceof o)return t;if(t instanceof i)return t.bind(e);throw new TypeError(`Spica: Maybe: Invalid monad value.\n\t${t}`)})}guard(e){return e?this:i.mzero}join(){return this.bind(e=>e)}extract(e,t){return t?this.fmap(t).extract(e):this.evaluate().extract(e)}}n.Maybe=i,function(e){function t(e){return new s(e)}e.pure=t,e.Return=t,e.sequence=function(t){return t.reduce((e,t)=>e.bind(e=>t.fmap(t=>e.concat([t]))),e.Return([]))}}(i=n.Maybe||(n.Maybe={}));class s extends i{constructor(e){super(c),this.a=e,this.JUST}bind(e){return new i(()=>e(this.extract()))}extract(e,t){return t?t(this.a):this.a}}n.Just=s;class o extends i{constructor(){super(c),this.NOTHING}bind(e){return this}extract(e){if(!e)throw void 0;return e()}}function c(){throw new Error("Spica: Maybe: Invalid thunk call.")}n.Nothing=o,function(e){e.mzero=new o,e.mplus=function(t,n){return new e(()=>t.fmap(()=>t).extract(()=>n))}}(i=n.Maybe||(n.Maybe={}))},{"./monadplus":28}],26:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./maybe.impl");!function(e){e.fmap=r.Maybe.fmap,e.pure=r.Maybe.pure,e.ap=r.Maybe.ap,e.Return=r.Maybe.Return,e.bind=r.Maybe.bind,e.sequence=r.Maybe.sequence,e.mzero=r.Maybe.mzero,e.mplus=r.Maybe.mplus}(n.Maybe||(n.Maybe={})),n.Just=function(e){return new r.Just(e)},n.Nothing=r.Maybe.mzero},{"./maybe.impl":25}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./applicative");class i extends r.Applicative{}n.Monad=i,function(e){e.bind=function e(t,n){return n?t.bind(n):n=>e(t,n)}}(i=n.Monad||(n.Monad={}))},{"./applicative":20}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./monad");class i extends r.Monad{}n.MonadPlus=i,i=n.MonadPlus||(n.MonadPlus={})},{"./monad":27}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./sequence/core");n.Sequence=r.Sequence;const i=e("./sequence/member/static/resume"),s=e("./sequence/member/static/from"),o=e("./sequence/member/static/cycle"),c=e("./sequence/member/static/random"),u=e("./sequence/member/static/concat"),a=e("./sequence/member/static/zip"),l=e("./sequence/member/static/difference"),d=e("./sequence/member/static/union"),h=e("./sequence/member/static/intersect"),f=e("./sequence/member/static/pure"),p=e("./sequence/member/static/return"),m=e("./sequence/member/static/sequence"),v=e("./sequence/member/static/mempty"),b=e("./sequence/member/static/mconcat"),y=e("./sequence/member/static/mappend"),w=e("./sequence/member/static/mzero"),q=e("./sequence/member/static/mplus"),S=e("./sequence/member/instance/extract"),g=e("./sequence/member/instance/iterate"),_=e("./sequence/member/instance/memoize"),x=e("./sequence/member/instance/reduce"),E=e("./sequence/member/instance/take"),T=e("./sequence/member/instance/drop"),j=e("./sequence/member/instance/takeWhile"),P=e("./sequence/member/instance/dropWhile"),O=e("./sequence/member/instance/takeUntil"),M=e("./sequence/member/instance/dropUntil"),k=e("./sequence/member/instance/sort"),R=e("./sequence/member/instance/unique"),L=e("./sequence/member/instance/fmap"),A=e("./sequence/member/instance/ap"),I=e("./sequence/member/instance/bind"),U=e("./sequence/member/instance/join"),z=e("./sequence/member/instance/mapM"),C=e("./sequence/member/instance/filterM"),F=e("./sequence/member/instance/map"),N=e("./sequence/member/instance/filter"),$=e("./sequence/member/instance/scanl"),D=e("./sequence/member/instance/foldr"),H=e("./sequence/member/instance/group"),W=e("./sequence/member/instance/inits"),V=e("./sequence/member/instance/tails"),G=e("./sequence/member/instance/segs"),B=e("./sequence/member/instance/subsequences"),J=e("./sequence/member/instance/permutations");e("../compose").compose(r.Sequence,i.default,s.default,o.default,c.default,u.default,a.default,l.default,d.default,h.default,f.default,p.default,m.default,v.default,b.default,y.default,w.default,q.default,S.default,g.default,_.default,x.default,E.default,T.default,j.default,P.default,O.default,M.default,k.default,R.default,L.default,A.default,I.default,U.default,z.default,C.default,F.default,N.default,$.default,D.default,H.default,W.default,V.default,G.default,B.default,J.default)},{"../compose":10,"./sequence/core":30,"./sequence/member/instance/ap":31,"./sequence/member/instance/bind":32,"./sequence/member/instance/drop":33,"./sequence/member/instance/dropUntil":34,"./sequence/member/instance/dropWhile":35,"./sequence/member/instance/extract":36,"./sequence/member/instance/filter":37,"./sequence/member/instance/filterM":38,"./sequence/member/instance/fmap":39,"./sequence/member/instance/foldr":40,"./sequence/member/instance/group":41,"./sequence/member/instance/inits":42,"./sequence/member/instance/iterate":43,"./sequence/member/instance/join":44,"./sequence/member/instance/map":45,"./sequence/member/instance/mapM":46,"./sequence/member/instance/memoize":47,"./sequence/member/instance/permutations":48,"./sequence/member/instance/reduce":49,"./sequence/member/instance/scanl":50,"./sequence/member/instance/segs":51,"./sequence/member/instance/sort":52,"./sequence/member/instance/subsequences":53,"./sequence/member/instance/tails":54,"./sequence/member/instance/take":55,"./sequence/member/instance/takeUntil":56,"./sequence/member/instance/takeWhile":57,"./sequence/member/instance/unique":58,"./sequence/member/static/concat":59,"./sequence/member/static/cycle":60,"./sequence/member/static/difference":61,"./sequence/member/static/from":62,"./sequence/member/static/intersect":63,"./sequence/member/static/mappend":64,"./sequence/member/static/mconcat":65,"./sequence/member/static/mempty":66,"./sequence/member/static/mplus":67,"./sequence/member/static/mzero":68,"./sequence/member/static/pure":69,"./sequence/member/static/random":70,"./sequence/member/static/resume":71,"./sequence/member/static/return":72,"./sequence/member/static/sequence":73,"./sequence/member/static/union":74,"./sequence/member/static/zip":75}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../monadplus");class i extends r.MonadPlus{constructor(e){super(s),this.cons=e}[Symbol.iterator](){let e=()=>this.iterate();return{next(){const t=e();return e=i.Thunk.iterator(t),{done:!i.isIterable(t),value:i.Thunk.value(t)}}}}}function s(){throw new Error("Spica: Sequence: Invalid thunk call.")}n.Sequence=i,i=n.Sequence||(n.Sequence={}),function(e){let t,n,r,i;!function(t){t.cons=function(t,n){switch(arguments.length){case 0:return[];case 1:return[t];case 2:return[t,n];default:throw e.Exception.invalidConsError(arguments)}}}(t=e.Data||(e.Data={})),function(e){e.value=function(e){return e[0]},e.iterator=function(e){return e[1]},e.index=function(e){return e[2]}}(n=e.Thunk||(e.Thunk={})),function(t){t.done=(()=>[void 0,t.done,-1]),t.when=function t(r,i,s){return e.isIterable(r)?s(r,()=>t(n.iterator(r)(),i,s)):i(r)}}(r=e.Iterator||(e.Iterator={})),e.isIterable=function(e){return n.iterator(e)!==r.done},function(e){e.invalidConsError=function(e){return console.error(e,e.length,e[0],e[1]),new TypeError("Spica: Sequence: Invalid parameters of cons.")},e.invalidDataError=function(e){return console.error(e),new TypeError("Spica: Sequence: Invalid data.")},e.invalidThunkError=function(e){return console.error(e),new TypeError("Spica: Sequence: Invalid thunk.")}}(i=e.Exception||(e.Exception={}))}(i=n.Sequence||(n.Sequence={}))},{"../monadplus":28}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{ap(e){return r.Sequence.ap(this,e)}}},{"../../core":30}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{bind(e){return r.Sequence.concat(this.fmap(e))}}},{"../../core":30}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{drop(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),(t,i)=>r.Sequence.Thunk.index(t)<e?i():n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{dropUntil(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),(t,i)=>e(r.Sequence.Thunk.value(t))?i():n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{dropWhile(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),(t,i)=>e(r.Sequence.Thunk.value(t))?i():n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{extract(){const e=[];let t=()=>this.iterate();for(;;){const n=t();if(!r.Sequence.isIterable(n))return e;i.concat(e,[r.Sequence.Thunk.value(n)]),t=r.Sequence.Thunk.iterator(n)}}}},{"../../../../concat":11,"../../core":30}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{filter(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),(t,i)=>e(r.Sequence.Thunk.value(t),r.Sequence.Thunk.index(t))?n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t)):i()))}}},{"../../core":30}],38:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{filterM(e){return r.Sequence.from([0]).bind(()=>{const t=this.extract();switch(t.length){case 0:return r.Sequence.from([[]]);default:{const n=t.shift();return e(n).bind(s=>s?0===t.length?r.Sequence.from([[n]]):r.Sequence.from(t).filterM(e).fmap(e=>i.concat([n],e)):0===t.length?r.Sequence.from([[]]):r.Sequence.from(t).filterM(e))}}})}}},{"../../../../concat":11,"../../core":30}],39:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{fmap(e){return new r.Sequence((t=(()=>this.iterate()))=>r.Sequence.Iterator.when(t(),()=>r.Sequence.Data.cons(),t=>r.Sequence.Data.cons(e(r.Sequence.Thunk.value(t)),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],40:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{foldr(e,t){return new r.Sequence((n=(()=>this.reduce().iterate()))=>r.Sequence.Iterator.when(n(),()=>r.Sequence.Data.cons(t),n=>r.Sequence.Data.cons(e(r.Sequence.Thunk.value(n),r.Sequence.resume(r.Sequence.Thunk.iterator(n)).foldr(e,t))))).bind(e=>e)}}},{"../../core":30}],41:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{group(e){return new r.Sequence(([t,n]=[()=>this.iterate(),[]],s)=>r.Sequence.Iterator.when(t(),()=>0===n.length?s():s(n),(t,o)=>0===n.length||e(n[0],r.Sequence.Thunk.value(t))?(i.concat(n,[r.Sequence.Thunk.value(t)]),o()):s(n,[r.Sequence.Thunk.iterator(t),i.concat([],[r.Sequence.Thunk.value(t)])])))}}},{"../../../../concat":11,"../../core":30}],42:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{inits(){return r.Sequence.mappend(r.Sequence.from([[]]),this.scanl((e,t)=>e.concat([t]),[]).dropWhile(e=>0===e.length))}}},{"../../core":30}],43:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{iterate(){return this.iterate_()}iterate_(e,t=0){const n=this.cons(e,r.Sequence.Data.cons);switch(n.length){case 0:return[void 0,r.Sequence.Iterator.done,-1];case 1:return[n[0],()=>r.Sequence.Iterator.done(),t];case 2:return[n[0],()=>this.iterate_(n[1],t+1),t];default:throw r.Sequence.Exception.invalidDataError(n)}}}},{"../../core":30}],44:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{join(){return r.Sequence.concat(this)}}},{"../../core":30}],45:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{map(e){return new r.Sequence((t=(()=>this.iterate()))=>r.Sequence.Iterator.when(t(),()=>r.Sequence.Data.cons(),t=>r.Sequence.Data.cons(e(r.Sequence.Thunk.value(t),r.Sequence.Thunk.index(t)),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],46:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{mapM(e){return r.Sequence.from([0]).bind(()=>{const t=this.extract();switch(t.length){case 0:return r.Sequence.mempty;default:{const n=t.shift();return e(n).bind(n=>0===t.length?r.Sequence.from([[n]]):r.Sequence.from(t).mapM(e).fmap(e=>i.concat([n],e)))}}})}}},{"../../../../concat":11,"../../core":30}],47:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=new WeakMap;n.default=class extends r.Sequence{memoize(){return new r.Sequence(([e,t]=[0,i.get(this)||i.set(this,new Map).get(this)],n)=>r.Sequence.Iterator.when(t.get(e)||t.set(e,e>0&&t.has(e-1)?r.Sequence.Thunk.iterator(t.get(e-1))():this.iterate()).get(e),()=>n(),i=>n(r.Sequence.Thunk.value(i),[e+1,t])))}}},{"../../core":30}],48:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{permutations(){return r.Sequence.from([0]).bind(()=>{const e=this.extract();return 0===e.length?r.Sequence.mempty:r.Sequence.from([e])}).bind(e=>r.Sequence.mappend(r.Sequence.from([e]),function e(t,n){return r.Sequence.Iterator.when(t.iterate(),()=>r.Sequence.mempty,t=>new r.Sequence((s,o)=>r.Sequence.Iterator.when(t,()=>o(),t=>{const s=r.Sequence.Thunk.value(t),c=r.Sequence.resume(r.Sequence.Thunk.iterator(t)).memoize();return o(n.permutations().foldr((e,t)=>(i=r.Sequence.from(e),t=t,function e(t,n,i){return r.Sequence.Iterator.when(n.iterate(),()=>[c,i],n=>{const o=r.Sequence.Thunk.value(n),[c,u]=e(e=>t(r.Sequence.mappend(r.Sequence.from([o]),e)),r.Sequence.resume(r.Sequence.Thunk.iterator(n)),i);return[r.Sequence.mappend(r.Sequence.from([o]),c),r.Sequence.mappend(r.Sequence.from([t(r.Sequence.mappend(r.Sequence.from([s]),r.Sequence.mappend(r.Sequence.from([o]),c))).extract()]),u)]})}(e=>e,i,t)[1]),e(c,r.Sequence.mappend(r.Sequence.from([s]),n))))})).bind(e=>e));var i,s}(r.Sequence.from(e),r.Sequence.mempty)))}}},{"../../core":30}],49:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{reduce(){return new r.Sequence(([e,t]=[0,new Map],n)=>r.Sequence.Iterator.when(t.get(e)||t.set(e,e>0&&t.has(e-1)?r.Sequence.Thunk.iterator(t.get(e-1))():this.iterate()).get(e),()=>n(),i=>n(r.Sequence.Thunk.value(i),[e+1,t])))}}},{"../../core":30}],50:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{scanl(e,t){return new r.Sequence(([n,i,s]=[t,()=>this.iterate(),0])=>r.Sequence.Iterator.when(i(),()=>0===s?r.Sequence.Data.cons(t):r.Sequence.Data.cons(),t=>r.Sequence.Data.cons(n=e(n,r.Sequence.Thunk.value(t)),[n,r.Sequence.Thunk.iterator(t),r.Sequence.Thunk.index(t)+1])))}}},{"../../core":30}],51:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{segs(){return r.Sequence.mappend(this.foldr((e,t)=>t.take(1).bind(n=>r.Sequence.mappend(r.Sequence.from([r.Sequence.mappend(r.Sequence.from([[e]]),r.Sequence.from(n).map(t=>i.concat([e],t)))]),t)),r.Sequence.from([r.Sequence.from([])])).bind(e=>e),r.Sequence.from([[]]))}}},{"../../../../concat":11,"../../core":30}],52:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{sort(e){return r.Sequence.from(this.extract().sort(e))}}},{"../../core":30}],53:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core"),i=e("../../../../concat");n.default=class extends r.Sequence{subsequences(){return r.Sequence.mappend(r.Sequence.from([[]]),r.Sequence.from([0]).bind(()=>(function e(t){return r.Sequence.Iterator.when(t.iterate(),()=>r.Sequence.mempty,t=>r.Sequence.mappend(r.Sequence.from([[r.Sequence.Thunk.value(t)]]),new r.Sequence((n,s)=>r.Sequence.Iterator.when(t,()=>s(),t=>s(e(r.Sequence.resume(r.Sequence.Thunk.iterator(t))).foldr((e,n)=>r.Sequence.mappend(r.Sequence.mappend(r.Sequence.from([e]),r.Sequence.from([i.concat([r.Sequence.Thunk.value(t)],e)])),n),r.Sequence.mempty)))).bind(e=>e)))})(this)))}}},{"../../../../concat":11,"../../core":30}],54:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{tails(){return r.Sequence.mappend(r.Sequence.from(this.extract().map((e,t,n)=>n.slice(t))),r.Sequence.from([[]]))}}},{"../../core":30}],55:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{take(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(e>0?t():r.Sequence.Iterator.done(),()=>n(),t=>r.Sequence.Thunk.index(t)+1<e?n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t)):n(r.Sequence.Thunk.value(t))))}}},{"../../core":30}],56:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{takeUntil(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),t=>e(r.Sequence.Thunk.value(t))?n(r.Sequence.Thunk.value(t)):n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t))))}}},{"../../core":30}],57:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{takeWhile(e){return new r.Sequence((t=(()=>this.iterate()),n)=>r.Sequence.Iterator.when(t(),()=>n(),t=>e(r.Sequence.Thunk.value(t))?n(r.Sequence.Thunk.value(t),r.Sequence.Thunk.iterator(t)):n()))}}},{"../../core":30}],58:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{unique(){const e=new Set;return this.filter(t=>!e.has(t)&&!!e.add(t))}}},{"../../core":30}],59:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static concat(e){return new r.Sequence(([t,n]=[()=>e.iterate(),r.Sequence.Iterator.done],i)=>r.Sequence.Iterator.when(t(),()=>i(),(e,t)=>(n=n===r.Sequence.Iterator.done?()=>r.Sequence.Thunk.value(e).iterate():n,r.Sequence.Iterator.when(n(),()=>(n=r.Sequence.Iterator.done,t()),t=>i(r.Sequence.Thunk.value(t),[()=>e,r.Sequence.Thunk.iterator(t)])))))}}},{"../../core":30}],60:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static cycle(e){return new r.Sequence(function t([n,r]=[e[Symbol.iterator](),0],i){const s=n.next();return s.done?t([e[Symbol.iterator](),r+1],i):i(s.value,[n,r+1])}).reduce()}}},{"../../core":30}],61:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static difference(e,t,n){return new r.Sequence(([i,s]=[()=>e.iterate(),()=>t.iterate()],o)=>r.Sequence.Iterator.when(i(),()=>r.Sequence.Iterator.when(s(),()=>o(),e=>o(r.Sequence.Thunk.value(e),[r.Sequence.Iterator.done,r.Sequence.Thunk.iterator(e)])),(e,t)=>r.Sequence.Iterator.when(s(),()=>o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),r.Sequence.Iterator.done]),i=>{const c=n(r.Sequence.Thunk.value(e),r.Sequence.Thunk.value(i));return c<0?o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),()=>i]):c>0?o(r.Sequence.Thunk.value(i),[()=>e,r.Sequence.Thunk.iterator(i)]):(s=(()=>r.Sequence.Thunk.iterator(i)()),t())})))}}},{"../../core":30}],62:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static from(e){return new r.Sequence(([t,n]=[e[Symbol.iterator](),0],r)=>{const i=t.next();return i.done?r():r(i.value,[t,n+1])}).reduce()}}},{"../../core":30}],63:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static intersect(e,t,n){return new r.Sequence(([i,s]=[()=>e.iterate(),()=>t.iterate()],o)=>r.Sequence.Iterator.when(i(),()=>o(),(e,t)=>r.Sequence.Iterator.when(s(),()=>o(),(i,c)=>{const u=n(r.Sequence.Thunk.value(e),r.Sequence.Thunk.value(i));return u<0?(s=(()=>i),t()):u>0?c():o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),r.Sequence.Thunk.iterator(i)])})))}}},{"../../core":30}],64:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static mappend(e,t){return r.Sequence.mconcat([e,t])}}},{"../../core":30}],65:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static mconcat(e){return[...e].reduce((e,t)=>(e=e,t=t,new r.Sequence(([n,i]=[()=>e.iterate(),()=>t.iterate()],s)=>r.Sequence.Iterator.when(n(),()=>r.Sequence.Iterator.when(i(),()=>s(),e=>s(r.Sequence.Thunk.value(e),[r.Sequence.Iterator.done,r.Sequence.Thunk.iterator(e)])),e=>s(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),i])))),r.Sequence.mempty);var t,n}}},{"../../core":30}],66:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");class i extends r.Sequence{}i.mempty=new r.Sequence((e,t)=>t()),n.default=i},{"../../core":30}],67:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");class i extends r.Sequence{}i.mplus=r.Sequence.mappend,n.default=i},{"../../core":30}],68:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");class i extends r.Sequence{}i.mzero=r.Sequence.mempty,n.default=i},{"../../core":30}],69:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static pure(e){return new r.Sequence((t,n)=>n(e))}}},{"../../core":30}],70:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static random(e=(()=>Math.random())){return"function"==typeof e?r.Sequence.from(new r.Sequence((t,n)=>n(e(),t))):this.random().map(t=>e[t*e.length|0])}}},{"../../core":30}],71:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static resume(e){return new r.Sequence((t=e,n)=>r.Sequence.Iterator.when(t(),()=>n(),e=>n(r.Sequence.Thunk.value(e),r.Sequence.Thunk.iterator(e))))}}},{"../../core":30}],72:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static Return(e){return new r.Sequence((t,n)=>n(e))}}},{"../../core":30}],73:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static sequence(e){return e.reduce((e,t)=>e.fmap(e=>r.Sequence.mappend(e,t)),r.Sequence.Return(r.Sequence.from([])))}}},{"../../core":30}],74:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static union(e,t,n){return new r.Sequence(([i,s]=[()=>e.iterate(),()=>t.iterate()],o)=>r.Sequence.Iterator.when(i(),()=>r.Sequence.Iterator.when(s(),()=>o(),e=>o(r.Sequence.Thunk.value(e),[r.Sequence.Iterator.done,r.Sequence.Thunk.iterator(e)])),e=>r.Sequence.Iterator.when(s(),()=>o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),r.Sequence.Iterator.done]),t=>{const i=n(r.Sequence.Thunk.value(e),r.Sequence.Thunk.value(t));return i<0?o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),()=>t]):i>0?o(r.Sequence.Thunk.value(t),[()=>e,r.Sequence.Thunk.iterator(t)]):o(r.Sequence.Thunk.value(e),[r.Sequence.Thunk.iterator(e),r.Sequence.Thunk.iterator(t)])})))}}},{"../../core":30}],75:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../core");n.default=class extends r.Sequence{static zip(e,t){return new r.Sequence(([n,i]=[()=>e.iterate(),()=>t.iterate()],s)=>r.Sequence.Iterator.when(n(),()=>s(),e=>r.Sequence.Iterator.when(i(),()=>s(),t=>s([r.Sequence.Thunk.value(e),r.Sequence.Thunk.value(t)],[r.Sequence.Thunk.iterator(e),r.Sequence.Thunk.iterator(t)]))))}}},{"../../core":30}],76:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.noop=function(){}},{}],77:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./assign"),i=e("./concat"),s=e("./equal"),o=e("./exception");var c;!function(e){e.monitor="monitor",e.subscriber="subscriber"}(c=n.RegisterItemType||(n.RegisterItemType={}));function u(e,t,n,r){return e.some(e=>e.type===t&&e.namespace.length===n.length&&e.namespace.every((e,t)=>e===n[t])&&e.listener===r)}n.Observation=class{constructor(e={}){this.settings={limit:10},this.relaySources=new WeakSet,this.node_={parent:void 0,children:new Map,childrenNames:[],items:[]},Object.freeze(r.extend(this.settings,e))}monitor(e,t,{once:n=!1}={}){if("function"!=typeof t)throw new Error(`Spica: Observation: Invalid listener: ${t}`);const r=()=>this.off(e,t,c.monitor),{items:i}=this.seekNode_(e);if(u(i,c.monitor,e,t))return r;if(i.length===this.settings.limit)throw new Error("Spica: Observation: Exceeded max listener limit.");return i.push({type:c.monitor,namespace:e,listener:t,options:{once:n}}),r}on(e,t,{once:n=!1}={}){if("function"!=typeof t)throw new Error(`Spica: Observation: Invalid listener: ${t}`);const r=()=>this.off(e,t),{items:i}=this.seekNode_(e);if(u(i,c.subscriber,e,t))return r;if(i.length===this.settings.limit)throw new Error("Spica: Observation: Exceeded max listener limit.");return i.push({type:c.subscriber,namespace:e,listener:t,options:{once:n}}),r}once(e,t){return this.on(e,t,{once:!0})}off(e,t,n=c.subscriber){switch(typeof t){case"function":return void this.seekNode_(e).items.some(({type:e,listener:r},i,s)=>{if(r!==t)return!1;if(e!==n)return!1;switch(i){case 0:return!void s.shift();case s.length-1:return!void s.pop();default:return!void s.splice(i,1)}});case"undefined":{const t=this.seekNode_(e);return t.childrenNames.slice().forEach(n=>{this.off(e.concat([n]));const r=t.children.get(n);r&&(r.items.length+r.childrenNames.length>0||(t.children.delete(n),t.childrenNames.splice(s.findIndex(n,t.childrenNames),1)))}),void(t.items=t.items.filter(({type:e})=>e===c.monitor))}default:throw new Error("Spica: Observation: Unreachable.")}}emit(e,t,n){this.drain_(e,t,n)}reflect(e,t){let n=[];return this.emit(e,t,(e,t)=>n=t),n}relay(e){if(this.relaySources.has(e))return()=>void 0;this.relaySources.add(e);const t=e.monitor([],(e,t)=>void this.emit(t,e));return()=>(this.relaySources.delete(e),t())}drain_(e,t,n){const r=[];if(this.refsBelow_(this.seekNode_(e)).reduce((i,{type:s,listener:u,options:{once:a}})=>{if(s===c.subscriber){a&&this.off(e,u);try{const i=u(t,e);n&&(r[r.length]=i)}catch(e){o.causeAsyncException(e)}}},void 0),this.refsAbove_(this.seekNode_(e)).reduce((n,{type:r,listener:i,options:{once:s}})=>{if(r===c.monitor){s&&this.off(e,i,c.monitor);try{i(t,e)}catch(e){o.causeAsyncException(e)}}},void 0),n)try{n(t,r)}catch(e){o.causeAsyncException(e)}}refs(e){return this.refsBelow_(this.seekNode_(e))}refsAbove_({parent:e,items:t}){for(t=i.concat([],t);e;)t=i.concat(t,e.items),e=e.parent;return t}refsBelow_({childrenNames:e,children:t,items:n}){n=i.concat([],n);for(let r=0;r<e.length;++r){const o=e[r],c=this.refsBelow_(t.get(o));n=i.concat(n,c),0===c.length&&(t.delete(o),e.splice(s.findIndex(o,e),1),--r)}return n}seekNode_(e){let t=this.node_;for(const n of e){const{children:e}=t;e.has(n)||(t.childrenNames.push(n),e.set(n,{parent:t,children:new Map,childrenNames:[],items:[]})),t=e.get(n)}return t}}},{"./assign":5,"./concat":11,"./equal":14,"./exception":15}],78:[function(e,t,n){"use strict";var r;Object.defineProperty(n,"__esModule",{value:!0});const i=e("./noop"),s=Symbol(),o=Symbol(),c=Symbol();class u{constructor(e){this[Symbol.toStringTag]="Promise",this[r]=[];try{e(e=>{this[s]=this[s]||new a("resolved",e),this[c]()},e=>{this[s]=this[s]||new a("rejected",e),this[c]()})}catch(e){this[s]=new a("rejected",e),this[c]()}}static get[Symbol.species](){return u}static all(e){return e.reduce((e,t)=>e.then(e=>u.resolve(t).then(t=>e.concat([t]))),u.resolve([]))}static race(e){return new u(t=>void e.forEach(e=>void u.resolve(e).then(t,t)))}static resolve(e){return new u((t,n)=>l(e)?void e.then(t,n):void t(e))}static reject(e){return new u((t,n)=>void n(e))}[c](){const e=this[s];if(e)for(;this[o].length>0;){const[t,n]=this[o].shift();switch(e.state){case"resolved":l(e.value)?e.value.then(t,n):t(e.value);continue;case"rejected":n(e.value);continue}}}then(e,t){return e=e||u.resolve,t=t||u.reject,new u((n,r)=>{this[o].push([t=>{try{n(e(t))}catch(e){r(e)}},e=>void new u(n=>void n(t(e))).then(n,r)]),this[c]()})}catch(e){return this.then(void 0,e)}finally(e){return e=e||i.noop,this.then(t=>void e()||t,t=>void e()||u.reject(t))}}r=o,n.AtomicPromise=u;class a{constructor(e,t){this.state=e,this.value=t}}function l(e){return!!e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then}},{"./noop":76}],79:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("./monad/sequence"))},{"./monad/sequence":29}],80:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r="0".repeat(15);let i=0;n.sqid=function(e){if(arguments.length>0){if("number"!=typeof e)throw new TypeError(`Spica: sqid: A parameter value must be a number: ${e}`);if(e>=0==0)throw new TypeError(`Spica: sqid: A parameter value must be a positive number: ${e}`);if(e%1!=0)throw new TypeError(`Spica: sqid: A parameter value must be an integer: ${e}`)}return void 0===e?(r+ ++i).slice(-15):(r+e).slice(-15)}},{}],81:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./promise"),i=e("./observation"),s=e("./assign"),o=e("./clock"),c=e("./sqid"),u=e("./noop"),a=e("./exception");class l{constructor(e={}){if(this.id=c.sqid(),this.settings={name:"",size:1/0,timeout:1/0,destructor:e=>void 0,scheduler:o.tick,resource:10},this.events_={init:new i.Observation,loss:new i.Observation,exit:new i.Observation},this.events=this.events_,this.workers=new Map,this.alive=!0,this.available_=!0,this.scheduler=(()=>void(0,this.settings.scheduler)(this.deliver)),this.messages=[],this.deliver=(()=>{const e=Date.now();for(let t=0,n=this.messages.length;this.available&&t<n;++t){if(this.settings.resource-(Date.now()-e)<=0)return void this.schedule();const[r,i,s,o]=this.messages[t],c="string"==typeof r?[r]:[...r],u=c.reduce((e,t)=>e||(this.workers.has(t)?this.workers.get(t).call([i,o]):void 0),void 0);if(!(void 0===u&&Date.now()<o))if(0===t?this.messages.shift():this.messages.splice(t,1),--t,--n,void 0===u){this.events_.loss.emit([c[0]],[c[0],i]);try{s(void 0,new Error("Spica: Supervisor: A process has failed."))}catch(e){a.causeAsyncException(e)}}else u.then(e=>void s(e),()=>void s(void 0,new Error("Spica: Supervisor: A process has failed.")))}}),Object.freeze(s.extend(this.settings,e)),this.name=this.settings.name,this.constructor===l)throw new Error(`Spica: Supervisor: <${this.id}/${this.name}>: Cannot instantiate abstract classes.`);this.constructor.instances.add(this)}static get instances(){return this.hasOwnProperty("instances_")?this.instances_:this.instances_=new Set}static get count(){return this.instances.size}static get procs(){return[...this.instances].reduce((e,t)=>e+t.workers.size,0)}destructor(e){for(this.available_=!1,this.workers.forEach(t=>void t.terminate(e)),Object.freeze(this.workers);this.messages.length>0;){const[e,t]=this.messages.shift(),n="string"==typeof e?[e]:[...e];this.events_.loss.emit([n[0]],[n[0],t])}Object.freeze(this.messages),this.alive=!1,this.constructor.instances.delete(this),Object.freeze(this),this.settings.destructor(e)}get available(){return this.available_}throwErrorIfNotAvailable(){if(!this.available)throw new Error(`Spica: Supervisor: <${this.id}/${this.name}>: A supervisor is already terminated.`)}register(e,t,n,r){if(this.throwErrorIfNotAvailable(),arguments.length>3)return this.kill(e,r),this.register(e,t,n);if(this.workers.has(e))throw new Error(`Spica: Supervisor: <${this.id}/${this.name}/${e}>: Cannot register a process multiply with the same name.`);return this.schedule(),t="function"==typeof t?{init:e=>e,main:t,exit:e=>void 0}:t,this.workers.set(e,new h(this,e,t,n,n===l.initiated,this.events_,()=>void this.workers.delete(e))).get(e).terminate}call(e,t,n=this.settings.timeout,r=this.settings.timeout){return this.call_(void 0===e?new d(this.workers):e,t,n,r)}call_(e,t,n,i){if(this.throwErrorIfNotAvailable(),"number"==typeof n)return new r.AtomicPromise((n,r)=>void this.call_(e,t,(e,t)=>t?r(t):n(e),i));for(this.messages.push([e,t,n,Date.now()+i]);this.messages.length>this.settings.size;){const[e,t,n]=this.messages.shift(),r="string"==typeof e?[e]:[...e];this.events_.loss.emit([r[0]],[r[0],t]);try{n(void 0,new Error(`Spica: Supervisor: <${this.id}/${this.name}>: A message overflowed.`))}catch(e){a.causeAsyncException(e)}}this.schedule(),i<=0||i!==1/0&&setTimeout(()=>void this.schedule(),i+3)}cast(e,t,n=this.settings.timeout){const r=this.cast_(void 0===e?new d(this.workers):e,t,n);return void 0!==r&&(r.catch(u.noop),!0)}cast_(e,t,n){this.throwErrorIfNotAvailable();const r="string"==typeof e?[e]:[...e],i=r.reduce((e,r)=>e||(this.workers.has(r)?this.workers.get(r).call([t,Date.now()+n]):void 0),void 0);return void 0===i&&this.events_.loss.emit([r[0]],[r[0],t]),i}refs(e){return this.throwErrorIfNotAvailable(),void 0===e?[...this.workers.values()].map(t):this.workers.has(e)?[t(this.workers.get(e))]:[];function t(e){return[e.name,e.process,e.state,e.terminate]}}kill(e,t){return!!this.available&&(!!this.workers.has(e)&&this.workers.get(e).terminate(t))}terminate(e){return!!this.available&&(this.destructor(e),!0)}schedule(){0!==this.messages.length&&o.tick(this.scheduler,!0)}}l.initiated=Symbol(),n.Supervisor=l;class d{constructor(e){this.workers=e}[Symbol.iterator](){return 0===this.workers.size?[""][Symbol.iterator]():this.workers.keys()}}class h{constructor(e,t,n,r,i,s,o){this.sv=e,this.name=t,this.process=n,this.state=r,this.events=s,this.destructor_=o,this.alive=!0,this.available=!0,this.initiated=!1,this.terminate=(e=>!!this.alive&&(this.destructor(e),!0)),i&&this.init()}destructor(e){this.alive=!1,this.available=!1,Object.freeze(this);try{this.destructor_()}catch(e){a.causeAsyncException(e)}this.initiated&&this.exit(e)}init(){this.initiated=!0,this.events.init.emit([this.name],[this.name,this.process,this.state]),this.state=this.process.init(this.state)}exit(e){try{this.process.exit(e,this.state),this.events.exit.emit([this.name],[this.name,this.process,this.state,e])}catch(t){this.events.exit.emit([this.name],[this.name,this.process,this.state,e]),this.sv.terminate(t)}}call([e,t]){const n=Date.now();if(this.available&&!(n>t))return new r.AtomicPromise((i,s)=>{isFinite(t)&&setTimeout(()=>void s(new Error),t-n),this.available=!1,this.initiated||this.init(),r.AtomicPromise.resolve(this.process.main(e,this.state,this.terminate)).then(i,s)}).then(e=>{const[t,n]=Array.isArray(e)?e:[e.reply,e.state];return this.alive?(this.sv.schedule(),this.state=n,this.available=!0,t):t}).catch(e=>{throw this.sv.schedule(),this.terminate(e),e})}}},{"./assign":5,"./clock":9,"./exception":15,"./noop":76,"./observation":77,"./promise":78,"./sqid":80}],82:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.throttle=function(e,t){let n=0,r=[];return i=>{r.push(i),n>0||(n=setTimeout(()=>{n=0,t(r[r.length-1],function(){const e=r;return r=[],e}())},e))}},n.debounce=function(e,t){let n=0,r=[];return i=>{r.push(i),n>0||(n=setTimeout(()=>{n=0,setTimeout(()=>{n>0||t(r[r.length-1],function(){const e=r;return r=[],e}())},e)},e))}}},{}],83:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.tuple=function(e){return e}},{}],84:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.type=function(e){const t=Object.prototype.toString.call(e).split(" ").pop().slice(0,-1);return"object"!=typeof e&&e instanceof Object==0||null===e?t.toLowerCase():t}},{}],85:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.uncurry=(e=>t=>e(...t.slice(0,e.length)))},{}],86:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=Object.freeze("xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".split(""));n.uuid=function(){let e="";for(const t of r)if("x"===t||"y"===t){const n=16*Math.random()|0;e+=("x"==t?n:3&n|8).toString(16)}else e+=t;return e.toLowerCase()}},{}],87:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./src/dom/builder");n.default=r.TypedHTML,n.TypedHTML=r.TypedHTML,n.TypedSVG=r.TypedSVG,n.API=r.API;var i=e("./src/util/dom");n.html=i.html,n.svg=i.svg,n.text=i.text,n.frag=i.frag,n.observe=i.observe,function(e){for(var t in e)n.hasOwnProperty(t)||(n[t]=e[t])}(e("./src/util/listener"))},{"./src/dom/builder":88,"./src/util/dom":91,"./src/util/listener":92}],88:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./manager"),i=e("../util/dom");function s(e){return new Proxy({},function(e){return{get:(t,n)=>t[n]||n in t||"string"!=typeof n?t[n]:t[n]=function(e,t){return function n(s,o,c){return"function"==typeof s?n(void 0,void 0,s):"function"==typeof o?n(s,void 0,o):void 0!==s&&function(e){return"object"!=typeof e||Object.values(e).slice(-1).every(e=>"object"==typeof e)}(s)?n(void 0,s,c):new r.El(function(n,r,s){const o=n(t,e,r,s);if(e!==o.tagName.toLowerCase())throw new Error(`TypedDOM: Tag name must be "${e}", but got "${o.tagName.toLowerCase()}".`);return i.define(o,r),o}(c||((e,t)=>e(t)),s||{},o),o)}}(n,e)}}(e))}n.API=s,n.TypedHTML=s(i.html),n.TypedSVG=s(i.svg)},{"../util/dom":91,"./manager":90}],89:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("spica/uuid"),i=e("spica/sqid"),s=r.uuid().split("-").pop();n.uid=function(){return`id-${s}-${String(+i.sqid()).padStart(6,"0")}`}},{"spica/sqid":80,"spica/uuid":86}],90:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./identity");var i;!function(e){e.Void="void",e.Text="text",e.Collection="collection",e.Record="record"}(i||(i={}));const s=new WeakSet;function o({element:e}){if(null!==e.parentElement&&s.has(e.parentElement))throw new Error("TypedDOM: Cannot add an element used in another typed dom.")}n.El=class{constructor(e,t){switch(this.element_=e,this.children_=t,this.type=void 0===this.children_?i.Void:"string"==typeof this.children_?i.Text:Array.isArray(this.children_)?i.Collection:i.Record,this.tag,o(this),s.add(e),this.type){case i.Void:return;case i.Text:return c(),this.children_=e.appendChild(document.createTextNode("")),void(this.children=t);case i.Collection:return c(),this.children_=[],void(this.children=t);case i.Record:return c(),this.children_=(n=e,r=Object.assign({},t),Object.defineProperties(r,Object.entries(r).reduce((e,[t,r])=>(o(r),n.appendChild(r.element),e[t]={configurable:!0,enumerable:!0,get:()=>r,set:e=>{const t=r;e!==t&&(e.element_.parentElement===n||o(e),r=e,n.replaceChild(e.element,t.element))}},e),{}))),void(this.children=t)}var n,r;function c(){for(;e.childNodes.length>0;)e.removeChild(e.firstChild)}}get id(){return this.id_=this.id_||this.element_.id.trim()||r.uid()}get query(){return this.id===this.element_.id.trim()?`#${this.id}`:`.${this.id}`}scope(e){const t=/^(\s*)\$scope(?!\w)/gm;e.forEach(e=>e.element instanceof HTMLStyleElement&&void function(e,n){if(-1===e.innerHTML.search(t))return;e.innerHTML=e.innerHTML.replace(t,(e,t)=>`${t}${n}`);const r=n.slice(1);switch(n[0]){case".":if(!(e.getAttribute("class")||"").split(" ").includes(r))break;e.setAttribute("class",`${e.getAttribute("class")} ${r}`.trim())}0!==e.children.length&&[...e.querySelectorAll("*")].forEach(e=>void e.remove())}(e.element,this.query))}get element(){return this.element_}get children(){switch(this.type){case i.Text:return this.children_.data;default:return this.children_}}set children(e){switch(this.type){case i.Void:return;case i.Text:return e=document.createTextNode(e),this.element_.replaceChild(e,this.children_),void(this.children_=e);case i.Collection:return this.children_.reduce((e,t)=>{const n=e.indexOf(t);return n>-1?e:(e.splice(n,1),t.element.remove(),e)},[...e]),this.children_=[],e.forEach((e,t)=>{e.element_.parentElement===this.element_||o(e),this.children_[t]=e,this.element_.appendChild(e.element)}),Object.freeze(this.children_),void this.scope(Object.values(this.children_));case i.Record:return Object.keys(this.children_).forEach(t=>this.children_[t]=e[t]),void this.scope(Object.values(this.children_))}}}},{"./identity":89}],91:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.observe=function(e,t,n={childList:!0}){return(r,...i)=>{const s=new MutationObserver(t),o=e(r);return s.observe(o,n),c(o,...i),o}};const r=new Map;function i(e){return document.createTextNode(e)}var s;function o(e,t,n={},i=[]){const s=`${e}:${t}`,o=r.has(s)?r.get(s).cloneNode(!0):r.set(s,function(e,t){switch(e){case 0:return document.createElement(t);case 1:return document.createElementNS("http://www.w3.org/2000/svg",t);default:throw new Error(`TypedDOM: Unknown namespace: ${e}`)}}(e,t)).get(s).cloneNode(!0);return c(o,n,i),o}function c(e,t={},n=[]){return t[Symbol.iterator]?c(e,{},t):"string"==typeof n?c(e,t,[i(n)]):(Object.entries(t).forEach(([t,n])=>"string"==typeof n?void e.setAttribute(t,n):void e.addEventListener(t.slice(2),n,{passive:["wheel","mousewheel","touchstart","touchmove"].includes(t.slice(2))})),void[...n].forEach(t=>void e.appendChild(t)))}n.html=function(e,t={},n=[]){return o(0,e,t,n)},n.svg=function(e,t={},n=[]){return o(1,e,t,n)},n.frag=function(e=[]){e="string"==typeof e?[i(e)]:e;const t=document.createDocumentFragment();return[...e].forEach(e=>void t.appendChild(e)),t},n.text=i,function(e){e[e.HTML=0]="HTML",e[e.SVG=1]="SVG"}(s||(s={})),n.define=c},{}],92:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("./noop");function i(e,t,n,r=!1,i={}){return"string"==typeof n?o(e,t,n,r,Object.assign({},"boolean"==typeof i?{capture:i}:i,{once:!0})):s(e,t,n,Object.assign({},"boolean"==typeof r?{capture:r}:r,{once:!0}))}function s(e,t,i,s=!1){e.addEventListener(t,u,a(s));let o=()=>(o=r.noop,void e.removeEventListener(t,u,a(s)));return()=>void o();function u(e){"object"==typeof s&&(s.passive&&(e.preventDefault=r.noop),s.once&&o()),n.currentTargets.set(e,e.currentTarget),i(e)}function a(e){return c?e:"boolean"==typeof e?e:!!e.capture}}function o(e,t,n,r,o={}){return s(e instanceof Document?e.documentElement:e,n,s=>{const c=s.target.closest(t);c&&[...e.querySelectorAll(t)].filter(e=>e===c).forEach(e=>void i(e,n,e=>{r(e)},o))},Object.assign({},o,{capture:!0}))}n.currentTargets=new WeakMap,n.listen=function(e,t,n,r=!1,i={}){return"string"==typeof n?o(e,t,n,r,i):s(e,t,n,r)},n.once=i,n.bind=s,n.delegate=o;let c=!1;try{document.createElement("div").addEventListener("test",function(){},{get capture(){return c=!0}})}catch(e){}},{"./noop":93}],93:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.noop=function(){}},{}],94:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("./layer/interface/service/gui");n.default=r.GUI;var i=e("./layer/interface/service/gui");n.Pjax=i.GUI;var s=e("./lib/router");n.router=s.router},{"./layer/interface/service/gui":126,"./lib/router":137}],95:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../domain/router/api");var i=e("../domain/event/router");n.RouterEvent=i.RouterEvent,n.RouterEventType=i.RouterEventType,n.RouterEventSource=i.RouterEventSource;var s=e("../domain/data/config");n.Config=s.Config,n.scope=s.scope,n.route=function(e,t,n,i){return r.route(new r.RouterEntity(e,t,new r.RouterEntityState(n.process,n.scripts)),i)}},{"../domain/data/config":99,"../domain/event/router":102,"../domain/router/api":103}],96:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("../domain/store/path");n.loadTitle=r.loadTitle,n.savePosition=r.savePosition},{"../domain/store/path":119}],97:[function(e,t,n){"use strict";var r;function i(e){return e.trim().replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]?|[\uDC00-\uDFFF]/g,e=>2===e.length?e:"").replace(/%(?![0-9A-F]{2})|[^%\[\]]+/gi,encodeURI).replace(/\?[^#]+/,e=>"?"+e.slice(1).replace(/%[0-9A-F]{2}|[^=&]/gi,e=>e.length<3?encodeURIComponent(e):e)).replace(/%[0-9A-F]{2}/gi,e=>e.toUpperCase()).replace(/#.+/,e.slice(e.indexOf("#")))}Object.defineProperty(n,"__esModule",{value:!0}),r||(r={}),n.standardizeUrl=function(e){return i(function(e){return s.href=e||location.href,s.href.replace(/^([^:/?#]+:\/\/[^/?#]*?):(?:80)?(?=$|[/?#])/,"$1").replace(/^([^:/?#]+:\/\/[^/?#]*)\/?/,"$1/").replace(/%[0-9A-F]{2}/gi,e=>e.toUpperCase()).replace(/#.+/,e.slice(e.indexOf("#")))}(e))},n._encode=i;const s=document.createElement("a")},{}],98:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("spica/assign");function i(){window.history.replaceState(r.extend(window.history.state||{},{title:document.title}),document.title)}function s(){window.history.replaceState(r.extend(window.history.state||{},{position:{top:window.pageYOffset,left:window.pageXOffset}}),document.title)}i(),s(),n.loadTitle=function(){return window.history.state.title||document.title},n.saveTitle=i,n.loadPosition=function(){return window.history.state.position||{top:window.pageYOffset,left:window.pageXOffset}},n.savePosition=s},{"spica/assign":5}],99:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{u(r.next(e))}catch(e){s(e)}}function c(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});const i=e("spica/assign");var s=e("./config/scope");n.scope=s.scope;n.Config=class{constructor(e){this.areas=["body"],this.link="a",this.form="form:not([method])",this.replace="",this.fetch={headers:new Headers,timeout:3e3,wait:0},this.update={head:"base, meta, link",css:!0,script:!0,ignore:"",ignores:{extension:'[href^="chrome-extension://"]',security:'[src*=".scr.kaspersky-labs.com/"]'},reload:"",logger:""},this.sequence=new o,this.progressbar="display:none;position:absolute;bottom:0;left:0;width:0;height:2px;background:rgb(40, 105, 255);",this.scope={},Object.defineProperties(this.update,{ignore:{enumerable:!1,set(e){this.ignores._=e},get(){return Object.keys(this.ignores).map(e=>this.ignores[e]).filter(e=>e.trim().length>0).join(",")}}}),i.extend(this,e),Object.freeze(this),this.fetch.headers.set("X-Pjax","1")}filter(e){return e.matches(":not([target])")}redirect(e){return e}rewrite(e,t){}fallback(e,t){if(e instanceof HTMLAnchorElement)window.location.assign(e.href);else if(e instanceof HTMLFormElement)window.location.assign(e.action);else{if(!(e instanceof Window))throw t;window.location.reload(!0)}}};class o{fetch(){return r(this,void 0,void 0,function*(){return"fetch"})}unload(){return r(this,void 0,void 0,function*(){return"unload"})}content(){return r(this,void 0,void 0,function*(){return"content"})}ready(){return r(this,void 0,void 0,function*(){return"ready"})}load(){return r(this,void 0,void 0,function*(){})}}},{"./config/scope":100,"spica/assign":5}],100:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../../../lib/router"),i=e("../../../domain/data/config"),s=e("spica/sequence"),o=e("spica/maybe"),c=e("spica/assign");n.scope=function(e,t){const n=Object.assign({"/":{}},e.scope);return s.Sequence.from(Object.keys(n).sort().reverse()).dropWhile(e=>!r.compare(e,t.orig)&&!r.compare(e,t.dest)).take(1).filter(e=>!!r.compare(e,t.orig)&&r.compare(e,t.dest)).map(e=>n[e]).map(t=>t?o.Just(new i.Config(c.extend({},e,t))):o.Nothing).extract().reduce((e,t)=>t,o.Nothing)}},{"../../../../lib/router":137,"../../../domain/data/config":99,"spica/assign":5,"spica/maybe":19,"spica/sequence":79}],101:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../../lib/error");n.DomainError=class extends r.PjaxError{constructor(e){super(`Domain: ${e}`)}}},{"../../../lib/error":135}],102:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});const r=e("../../../lib/url"),i=e("../../data/model/domain/url"),s=e("../../../lib/dom"),o=e("typed-dom");var c,u;n.RouterEvent=class{constructor(e){this.original=e,this.type=this.original.type.toLowerCase(),this.source=o.currentTargets.get(this.original),this.request=new a(this.source),this.location=new l(this.request.url),Object.freeze(this)}},function(e){e.Anchor=HTMLAnchorElement,e.Form=HTMLFormElement,e.Window=window.Window}(c=n.RouterEventSource||(n.RouterEventSource={})),function(e){e.click="click",e.submit="submit",e.popstate="popstate"}(n.RouterEventType||(n.RouterEventType={})),function(e){e.GET="GET",e.POST="POST"}(u=n.RouterEventMethod||(n.RouterEventMethod={}));class a{constructor(e){this.source=e,this.method=(()=>{if(this.source instanceof c.Anchor)return u.GET;if(this.source instanceof c.Form)return this.source.method.toUpperCase()===u.POST?u.POST:u.GET;if(this.source instanceof c.Window)return u.GET;throw new TypeError})(),this.url=(()=>{if(this.source instanceof c.Anchor)return i.standardizeUrl(this.source.href);if(this.source instanceof c.Form)return this.source.method.toUpperCase()===u.GET?i.standardizeUrl(this.source.action.split(/[?#]/)[0]+`?${s.serialize(this.source)}`):i.standardizeUrl(this.source.action.split(/[?#]/)[0]);if(this.source instanceof c.Window)return i.standardizeUrl(window.location.href);throw new TypeError})(),this.body=(()=>this.source instanceof c.Form&&this.method===u.POST?new FormData(this.source):null)(),Object.freeze(this)}}n.RouterEventRequest=a;class l{constructor(e){this.target=e,this.orig=new r.URL(i.standardizeUrl(window.location.href)),this.dest=new r.URL(this.target),Object.freeze(this)}}n.RouterEventLocation=l},{"../../../lib/dom":134,"../../../lib/url":138,"../../data/model/domain/url":97,"typed-dom":87}],103:[function(e,t,n){"use strict";var r=this&&this.__awaiter||function(e,t,n,r){return new(n||(n=Promise))(function(i,s){function o(e){try{u(r.next(e))}catch(e){s(e)}}function c(e){try{u(r.throw(e))}catch(e){s(e)}}function u(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,c)}u((r=r.apply(e,t||[])).next())})};Object.defineProperty(n,"__esModule",{value:!0});const i=e("spica/either"),s=e("./module/fetch"),o=e("./module/update"),c=e("./module/update/content"),u=e("../store/path"),a=e("../data/error");var l=e("./model/eav/entity");n.Rout
 
 Review comment:
   Thanks @sijie .
   Faild == > Failed
   like:
   new u.DomainError("Faild to validate the content...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message