partial.lenses
Advanced tools
@@ -148,7 +148,11 @@ 'use strict'; | ||
var setName = process.env.NODE_ENV === 'production' ? id : function (to, name) { | ||
var setName = process.env.NODE_ENV === 'production' ? function (x) { | ||
return x; | ||
} : function (to, name) { | ||
return I.defineNameU(to, name); | ||
}; | ||
var copyName = process.env.NODE_ENV === 'production' ? id : function (to, from) { | ||
var copyName = process.env.NODE_ENV === 'production' ? function (x) { | ||
return x; | ||
} : function (to, from) { | ||
return I.defineNameU(to, from.name); | ||
@@ -155,0 +159,0 @@ }; |
@@ -144,7 +144,11 @@ import { defineNameU, isString, isFunction, isArray, freeze, isObject, acyclicEqualsU, array0, object0, sndU, always, curry, curryN, assocPartialU, dissocPartialU, isNumber, constructorOf, toObject, applyU, isDefined, keys, hasU, arityN, id, assign } from 'infestines'; | ||
var setName = process.env.NODE_ENV === 'production' ? id$1 : function (to, name) { | ||
var setName = process.env.NODE_ENV === 'production' ? function (x) { | ||
return x; | ||
} : function (to, name) { | ||
return defineNameU(to, name); | ||
}; | ||
var copyName = process.env.NODE_ENV === 'production' ? id$1 : function (to, from) { | ||
var copyName = process.env.NODE_ENV === 'production' ? function (x) { | ||
return x; | ||
} : function (to, from) { | ||
return defineNameU(to, from.name); | ||
@@ -151,0 +155,0 @@ }; |
@@ -1,1 +0,1 @@ | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,b){"use strict";function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n,r,t,u){var e=n.map,i=n.ap,o=n.of(V),c=t.length;if(e===b.sndU){for(var f=0;f<c;++f)o=i(o,r(t[f],f));return o}for(var a=V(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(X,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Jn(r[n]):mn;for(var e=Jn(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=on(Jn(r[n+t]),i);var o=Jn(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function o(n,r,t,u){for(var e,i=n.length;t<i;++t)switch(typeof(e=n[t])){case"string":r=Z(u.v=e,r);break;case"number":r=tn(u.v=e,r);break;case"object":r=o(e,r,0,u);break;default:r=e(r,u.v,Fn,u)}return r}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=Z(e,t);break;case"number":t=tn(e,t);break;default:t=a(f,n)(t,n[f-1],$n,r||b.always(u)),o=f}for(o===n.length&&(t=r?r(t,n[o-1]):u);0<=--o;)t=b.isString(i=n[o])?nn(i,t,c[o]):un(i,t,c[o]);return t}function v(n,r,t,u,e){var i=t.of;return i?i(n):t.map(b.always(n),u(e,r))}function t(r,n){return 1<arguments.length?vn(r,n):function(n){return vn(r,n)}}function c(r,n,t,u){var e=Ln(r)?r.length:0;return t.map(function(n){return un(e,n,r)},u(void 0,e))}function f(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=Ln(n)?n:"",i=c.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u<e;++u,--i){if(r(t[u],u,n))return u;if(r(t[i],i,n))return i}for(;u<e;++u)if(r(t[u],u,n))return u;for(;0<=i;--i)if(r(t[i],i,n))return i;return e}(c,o,e);return t.map(function(n){return un(i,n,e)},u(e[i],i))}}function r(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return yt(t)}function s(r,n){return 1<arguments.length?cn(r,n,void 0):function(n){return cn(r,n,void 0)}}var l=function(n,r){return n+r},d=function(n,r){return n*r},h=b.curry(l),p=b.curry(d),y=b.curry(function(n,r){return r/n}),g=function(n){return-n},m=function(n,r){return n<r},j=function(n,r){return r<n},A=b.curry(function(n,r){return r instanceof n}),O=Object.create,x=function(n){return b.assign(O(null),n)},w=b.freeze(x(b.object0)),U=b.curry(function(n,r,t){return t.replace(n,r)}),k=function(n){return n},S=k,I=k,E=function(n,r){return b.isString(n)?new RegExp(U(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},N=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},R=function(n){return void 0!==n?String(n):""},q=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},M=function(r){return function(n){return[n,r]}},P=function(r){return function(n){return void 0!==n?n:r}},z=P(0),C=function(n){return void 0!==n?!n:n},D=function(n){return void 0!==n?[n]:n},W=function(r,t){return I(function(n){return r(n)?t(n):void 0},t)},L=function(n){return!(n instanceof Object)||b.isArray(n)},$=k(function(n){if(Ln(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),B=k(function(n,r,t){for(var u=r.length,e=Array(u),i=0,o=!0,c=0;c<u;++c){var f=r[c],a=n(f,c);t!==a&&(e[i++]=a,o&&(o=f===a&&(0!==f||1/f==1/a)||f!=f&&a!=a))}return i!==u?(e.length=i,e):o?r:e}),F=function(n,r){return Ln(r)?B(n,r,void 0):void 0},J=k(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),T={map:b.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},_=function(n,r){return{map:b.sndU,ap:n,of:b.always(r)}},G=_(l,0),H=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return K(T,function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},K=function(n,r,t,u){return Jn(t)(u,void 0,n,r)},Q=function(e,n){return b.curryN(4,I(function(t,u){return u=n(u),function(n,r){return e(K(u,t,n,r))}},n))},V=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},X=k(function(n){for(var r=[];V!==n;)r.push(n[0]),n=n[1];return r.reverse()}),Y=function(i,o){return function(e){return function(r,n,t,u){return t.map(function(n){return o(e,n,r)},u(i(e,r),e))}}},Z=function(n,r){return r instanceof Object?r[n]:void 0},nn=k(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),rn=Y(Z,nn),tn=function(n,r){return Ln(r)?r[n]:void 0},un=k(function(n,r,t){Ln(t)||(t="");var u=t.length;if(void 0!==r){for(var e=Math.max(n+1,u),i=Array(e),o=0;o<e;++o)i[o]=t[o];return i[n]=r,i}if(u<=n)return J(Array(u),0,t,0,u);for(var c=Array(u-1),f=0;f<n;++f)c[f]=t[f];for(var a=n+1;a<u;++a)c[a-1]=t[a];return c}),en=Y(tn,un),on=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},cn=k(function(n,r,t){switch(typeof n){case"string":return nn(n,r,t);case"number":return un(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,$n,b.always(r)):t}}),fn=k(function(n,r,t){switch(typeof n){case"string":return nn(n,r(Z(n,t),n),t);case"number":return un(n,r(tn(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,$n,r):(r(n(t,void 0),void 0),t)}}),an=function(n,r,t){return u=Jn(n)(t,void 0,Bn,r),Promise.resolve(u);var u},vn=k(function(n,r){switch(typeof n){case"string":return Z(n,r);case"number":return tn(n,r);case"object":for(var t,u=0,e=n.length;u<e;++u)switch(typeof(t=n[u])){case"string":r=Z(t,r);break;case"number":r=tn(t,r);break;default:return o(n,r,u,((i=function n(r,t){return n.v=t,r}).v=n[u-1],i))}return r;default:return n(r,void 0,Fn,k)}var i}),sn=function(e,i){return I(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))},e)},ln=function(e,i){return I(function(n,r,t,u){return t.map(i,u(e(n),r))},e)},dn=function(n,r){return ln(W(b.isString,n),W(b.isString,r))},hn=function(n,r){return ln(W(b.isNumber,n),W(b.isNumber,r))},pn=k(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?pn(e,r):vn(e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),yn=k(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?yn(i,e,t):cn(i,e,t)}return t}),gn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},mn=function(n,r,t,u){return u(n,r)},bn=k(function(e){return function(n){for(var r={},t=e.length;t--;){var u=n[0];void 0!==u&&(r[e[t]]=u),n=n[1]}return r}}),jn=k(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var h=t[d],p=n(h,d,e,i);void 0!==p?(f[d]=p,c&&(c=h===p&&(0!==h||1/h==1/p)||h!=h&&p!=p)):c=!1}return o?c&&t===u?u:f:u}),An=function(g,m){return function(n,r,t,u){var e=n instanceof Object?gn(n):b.object0;if($n===t)return jn(g,m,e,n,t,u);if(T!==t){var i=t.map,o=t.ap,c=t.of,f=c(M),a=[];for(var v in m)a.push(v),f=o(i(M,f),m[v](e[v],v,t,u));var s=!!a.length||void 0;for(var l in e)void 0===(s&&m[l])&&(a.push(l),f=o(i(M,f),g(e[l],l,t,u)));return a.length?i(bn(a),f):c(n)}for(var d in m){var h=m[d](e[d],d,t,u);if(void 0!==h)return h}for(var p in e)if(void 0===m[p]){var y=g(e[p],p,t,u);if(void 0!==y)return y}}},On=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},xn=k(function(n,r,t,u){for(var e,i=0,o=r.length;i<o;++i)(n(e=r[i],i)?t:u).push(e)}),wn=function(n){return n[0]},Un=function(n){return n.index},kn=function(n){return Un(n)+n[0].length},Sn=k(function(n,r){var t=r.lastIndex;r.lastIndex=kn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),In=function(t){return function(r){return function(n){return[t,n,r]}}},En=ln(W(A(Object),k(function(n){n=gn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),W(b.isArray,k(function(n){for(var r={},t=0,u=n.length;t<u;++t){var e=n[t];2===e.length&&(r[e[0]]=e[1])}return r}))),Nn=k(function(n,r){if(r instanceof Object){var t={};for(var u in r=gn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Rn=k(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=gn(n)){var u=n[t];if(u instanceof Object)for(var e in u=gn(u))i(e)===t&&(r[e]=u[e])}return r}}}),qn=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},Mn=function(e,i){return i=Jn(i),e=Jn(e),function(n,r,t,u){return(Wr(i,n)?i:e)(n,r,t,u)}},Pn=function(n,r,t,u){return t===$n?B(u,n,void 0):t===T?e(u,n):i(t,u,n,void 0)},zn=function(e,i){return function(n,r,t,u){return t.chain(function(n){return i(n,r,t,u)},e(n,r,t,u))}},Cn=function(n,r){return[r,dt(n)]},Dn=b.always(v),Wn=function(t,u,e){return function(n,r){return t(n,r)?u:e(n,r)}},Ln=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},$n=k({map:b.applyU,of:k,ap:b.applyU,chain:b.applyU}),Bn=k({map:N,ap:function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},of:k,chain:N}),Fn=k({map:b.sndU}),Jn=k(function(n){switch(typeof n){case"string":return rn(n);case"number":return en(n);case"object":return a(0,n);default:return 4===n.length?n:I(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))},e=n)}var e}),Tn=b.curry(function(n,r,t){return cn([n,pt(r)],r,t)}),_n=b.curry(fn),Gn=b.curry(an),Hn=b.curry(function(n,r){return cn(n,void 0,r)}),Kn=b.curry(cn),Qn=b.curry(function(n,r){return fn(n,k,r)}),Vn=b.curry(function(n,r){return an(n,k,r)}),Xn=b.curry(K),Yn=function(e){return I(function(n,r,t,u){return Jn(e(n,r))(n,r,t,u)},e)},Zn=k(function(){for(var n=arguments.length,r=fr;n--;){var t=arguments[n];r=t.length<2?Jn(t[0]):qn(Jn(t[1]),r)(t[0])}return r}),nr=k(function(e){e=Jn(e);for(var i=Dn,n=arguments.length;--n;){var r=arguments[n];i=1===r.length?b.always(Jn(r[0])):Wn(r[0],Jn(r[1]),i)}return function(n,r,t,u){return e(n,r,Fn,i)(n,r,t,u)}}),rr=b.curry(function(n,r,t){return qn(Jn(r),Jn(t))(n)}),tr=k(function(n,r){for(var t=arguments.length,u=1&t?Jn(arguments[--t]):fr;0<=(t-=2);)u=qn(Jn(arguments[t+1]),u)(arguments[t]);return u}),ur=b.curry(Mn),er=b.curry(function(t,n){return[n,Yn(function(n,r){return void 0!==n?t(n,r):fr})]}),ir=qn(v,mn),or=qn(mn,v),cr=or(b.isDefined),fr=function(n,r,t,u){return v(n,r,t,u)},ar=function(e){return function(n,r,t,u){return v(e,r,t,u,e)}},vr=ar(),sr=k(function(){var n=arguments.length,r=fr;if(n)for(r=Jn(arguments[--n]);n;)r=zn(Jn(arguments[--n]),r);return r}),lr=k(b.curryN(2,function(r){return r=Jn(r),function(n){return function n(r,t){var u=O(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):Jn(i)}return An(r,u)}(r,n)}})),dr=lr(fr),hr=k(function(n,r,t,u){return Ln(n)?Pn(n,0,t,u):t.of(n)}),pr=S(Jn([En,hr]),"entries"),yr=S(Jn([En,hr,0]),"keys"),gr=k(function(f){return function(r,n,t,u){if(b.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,T===t?function(n,r,t){for(;t=Sn(t,r);){var u=n(wn(t),Un(t));if(void 0!==u)return u}}(u,f,i):e((c=r,function(n){for(var r="",t=0,u=function(n){for(var r=[];In!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=c.slice(t,Un(i));var o=u[e+1];void 0!==o&&(r+=o),t=kn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(In);i=Sn(i,e);)o=r(r(n(In,t(i)),o),u(wn(i),Un(i)));return o}(e,t.ap,t.of,u,f,i))}var o=r.match(f);if(o)return e(function(n){return r.replace(f,void 0!==n?n:"")},u(o[0],Un(o)))}var c;return v(r,void 0,t,u)}}),mr=k(S(An(mn,w),"values")),br=k(function(n,r,t,u){return b.isArray(n)?Pn(n,0,t,u):b.isObject(n)?mr(n,r,t,u):t.of(n)}),jr=k(function(n,r,u,e){return function n(r,t){return b.isArray(r)?Pn(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}),Ar=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):br(r,t,u,n)}(n,r)}},Or=Ar(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),xr=b.curry(function(t,n,r){return!K(T,function(n,r){if(!t(n,r))return!0},n,r)}),wr=xr(k),Ur=b.curry(function(t,n,r){return!!K(T,function(n,r){if(t(n,r))return!0},n,r)}),kr=(0,b.curry)(function(u,n,r){var e=[];return K(T,function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),Sr=kr(k),Ir=Q(k,function(n){return _(n.concat,n.empty())}),Er=Ir(k),Nr=b.curry(function(t,n,r){return K(G,function(n,r){return t(n,r)?1:0},n,r)}),Rr=Nr(b.isDefined),qr=b.curry(function(e,n,r){var i=new Map;return K(T,function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),Mr=qr(k),Pr=b.curry(function(t,u,n,r){return K(T,function(n,r){u=t(u,n,r)},n,r),u}),zr=b.curry(function(n,r,t,u){var e=[],i=[];K(T,function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),Cr=b.curry(function(t,n,r){return K(T,function(n,r){t(n,r)},n,r)}),Dr=b.curry(function(n,t,r,u){var e=n();return K(T,function(n,r){t(e,n,r)},r,u),e}),Wr=b.curry(function(n,r){return void 0!==K(T,k,n,r)}),Lr=b.curry(function(n,r){return!K(T,b.always(!0),n,r)}),$r=Q(R,k(function(t){return _(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),Br=$r(k),Fr=H(j),Jr=Fr(k),Tr=b.curry(function(u,n,r){var e=0,i=0;return K(T,function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),_r=Tr(k),Gr=H(m),Hr=Gr(k),Kr=b.curry(function(t,n,r){return!K(T,function(n,r){if(t(n,r))return!0},n,r)}),Qr=Ur(k),Vr=Xn(_(d,1)),Xr=Vr(P(1)),Yr=Xn(T),Zr=Yr(k),nt=Xn(G),rt=nt(z),tt=b.curry(sn),ut=tt(k),et=b.curry(function(n,r){return sn(n(r),Kn(r))}),it=k(function(e){var i=P(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}}),ot=k(function(n){return gt(n,void 0)}),ct=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},ft=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},at=k(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return Ln(n)&&xn(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:J(J(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),vt=k,st=Yn(function(n){return Ln(n)&&n.length?n.length-1:0}),lt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=Ln(u),i=e&&u.length,o=q(0,i,0,f),c=q(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return J(J(J(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?J(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),dt=function(n){return b.isObject(n)?yt(_n(mr,Cn,n)):n},ht=k,pt=function(n){return r.apply(null,b.keys(n))},yt=k(function(e){return function(r,n,t,u){return t.map(function(n){return yn(e,n,r)},u(pn(e,r),n))}}),gt=b.curry(function(e,i){function o(n){return On(i,e,n)}return function(n,r,t,u){return t.map(o,u(On(e,i,n),r))}}),mt=b.curry(ln),bt=ln(C,C),jt=ln(W(Ln,k(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),W(b.isArray,k(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u){var e=n[u];2===e.length&&(t[e[0]]=e[1])}r=t.length;for(var i=0,o=0;o<r;++o){var c=t[o];void 0!==c&&(o!==i&&(t[i]=c),++i)}return t.length=i,t}))),At=ln($,$),Ot=k(function(n,r,t,u){return t.map(D,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),xt=dn(decodeURI,encodeURI),wt=dn(decodeURIComponent,encodeURIComponent),Ut=k(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return ln(W(b.isString,function(n){return JSON.parse(n,t)}),W(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),kt=b.curry(function(n,r){return dn(U(E(n,"g"),r),U(E(r,"g"),n))}),St=k(function(r){var t=1<arguments.length?arguments[1]:r;return ln(W(b.isString,function(n){return n.split(t)}),W(b.isArray,function(n){return n.join(r)}))}),It=k(function(u){var t=E(1<arguments.length?arguments[1]:u,"");return ln(W(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Un(r)),n.slice(kn(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),Et=hn(g,g);n.seemsArrayLike=Ln,n.Identity=$n,n.IdentityAsync=Bn,n.Constant=Fn,n.toFunction=Jn,n.assign=Tn,n.modify=_n,n.modifyAsync=Gn,n.remove=Hn,n.set=Kn,n.transform=Qn,n.transformAsync=Vn,n.traverse=Xn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:mn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[jr],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],jr);return n},n.lazy=function(e){function i(n,r,t,u){return o(n,r,t,u)}var o=function(n,r,t,u){return(o=Jn(e(i)))(n,r,t,u)};return i},n.choices=function(n){for(var r=arguments.length,t=Array(1<r?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return t.length?Mn(t.reduceRight(Mn),n):n},n.choose=Yn,n.cond=Zn,n.condOf=nr,n.ifElse=rr,n.iftes=tr,n.orElse=ur,n.chain=er,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(Mn,fr)},n.unless=ir,n.when=or,n.optional=cr,n.zero=fr,n.assignOp=function(n){return[pt(n),ar(n)]},n.modifyOp=function(e){return function(n,r,t,u){return v(n=e(n,r),r,t,u,n)}},n.setOp=ar,n.removeOp=vr,n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,J([],0,arguments,0,arguments.length).concat([n,r])),r});return ln(n("get"),n("set"))},n.seq=sr,n.branchOr=lr,n.branch=dr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=mn;return dr(r)},n.elems=hr,n.elemsTotal=function(n,r,t,u){return Ln(n)?t===$n?B(u,n,B):t===T?e(u,n):i(t,u,n,i):t.of(n)},n.entries=pr,n.keys=yr,n.matches=gr,n.values=mr,n.children=br,n.flatten=jr,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Jn(arguments[r]);n.push(Ar(Wr(u)),u)}return n},n.satisfying=Ar,n.leafs=Or,n.all=xr,n.and=wr,n.any=Ur,n.collectAs=kr,n.collect=Sr,n.concatAs=Ir,n.concat=Er,n.countIf=Nr,n.count=Rr,n.countsAs=qr,n.counts=Mr,n.foldl=Pr,n.foldr=zr,n.forEach=Cr,n.forEachWith=Dr,n.isDefined=Wr,n.isEmpty=Lr,n.joinAs=$r,n.join=Br,n.maximumBy=Fr,n.maximum=Jr,n.meanAs=Tr,n.mean=_r,n.minimumBy=Gr,n.minimum=Hr,n.none=Kr,n.or=Qr,n.productAs=Vr,n.product=Xr,n.selectAs=Yr,n.select=Zr,n.sumAs=nt,n.sum=rt,n.get=t,n.lens=tt,n.setter=ut,n.foldTraversalLens=et,n.defaults=function(e){function i(n){return On(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=it,n.normalize=function(n){return[ct(n),ft(n)]},n.required=ot,n.reread=ct,n.rewrite=ft,n.append=c,n.filter=at,n.find=f,n.findWith=function(n){var r=Jn(n),t=Wr(r);return[1<arguments.length?f(t,arguments[1]):f(t),r]},n.first=0,n.index=vt,n.last=st,n.prefix=function(n){return lt(0,n)},n.slice=lt,n.suffix=function(n){return lt(0===n?1/0:n?-n:0,void 0)},n.pickIn=dt,n.prop=ht,n.props=r,n.propsOf=pt,n.removable=function(){function e(n){if(!(n instanceof Object))return n;for(var r=0,t=u.length;r<t;++r)if(b.hasU(u[r],n))return n}for(var n=arguments.length,u=Array(n),r=0;r<n;r++)u[r]=arguments[r];return function(n,r,t,u){return t.map(e,u(n,r))}},n.valueOr=function(e){return function(n,r,t,u){return u(null!=n?n:e,r)}},n.pick=yt,n.replace=gt,n.getInverse=s,n.iso=mt,n.array=function(n){var r=s(n),e=t(n),i=function(n){return F(r,n)};return function(n,r,t,u){return t.map(i,u(F(e,n),r))}},n.inverse=function(e){return function(n,r,t,u){return t.map(function(n){return vn(e,n)},u(cn(e,n,void 0),r))}},n.complement=bt,n.identity=mn,n.is=function(r){return ln(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.indexed=jt,n.reverse=At,n.singleton=Ot,n.disjoint=function(i){return function(n,r,t,u){var e=Rn(i);return t.map(e,u(Nn(i,n),r))}},n.keyed=En,n.uri=xt,n.uriComponent=wt,n.json=Ut,n.dropPrefix=function(r){return dn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return dn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=kt,n.split=St,n.uncouple=It,n.add=function(n){return hn(h(n),h(-n))},n.divide=function(n){return hn(y(n),p(n))},n.multiply=function(n){return hn(p(n),y(n))},n.negate=Et,n.subtract=function(n){return hn(h(-n),h(n))},n.pointer=function(n){"#"===n[0]&&(n=vn(wt,n));for(var r=n.split("/"),t=r.length,u=1;u<t;++u){var e=r[u];r[u-1]=/^(0|[1-9]\d*)$/.test(e)?rr(L,Number(e),e):"-"===e?rr(L,c,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("infestines")):"function"==typeof define&&define.amd?define(["exports","infestines"],r):r(n.L={},n.I)}(this,function(n,b){"use strict";function e(n,r){for(var t=0,u=r.length;t<u;++t){var e=n(r[t],t);if(void 0!==e)return e}}function i(n,r,t,u){var e=n.map,i=n.ap,o=n.of(V),c=t.length;if(e===b.sndU){for(var f=0;f<c;++f)o=i(o,r(t[f],f));return o}for(var a=V(u),v=0;v<c;++v)o=i(e(a,o),r(t[v],v));return e(X,o)}function a(n,r){var t=r.length-n;if(t<2)return t?Jn(r[n]):mn;for(var e=Jn(r[n+--t]),i=function(t,u){return function(n,r){return e(n,r,t,u)}};--t;)i=on(Jn(r[n+t]),i);var o=Jn(r[n]);return function(n,r,t,u){return o(n,r,t,i(t,u))}}function o(n,r,t,u){for(var e,i=n.length;t<i;++t)switch(typeof(e=n[t])){case"string":r=Z(u.v=e,r);break;case"number":r=tn(u.v=e,r);break;case"object":r=o(e,r,0,u);break;default:r=e(r,u.v,Fn,u)}return r}function u(n,r,t,u){for(var e,i,o=n.length,c=Array(o),f=0;f<o;++f)switch(c[f]=t,typeof(e=n[f])){case"string":t=Z(e,t);break;case"number":t=tn(e,t);break;default:t=a(f,n)(t,n[f-1],$n,r||b.always(u)),o=f}for(o===n.length&&(t=r?r(t,n[o-1]):u);0<=--o;)t=b.isString(i=n[o])?nn(i,t,c[o]):un(i,t,c[o]);return t}function v(n,r,t,u,e){var i=t.of;return i?i(n):t.map(b.always(n),u(e,r))}function t(r,n){return 1<arguments.length?vn(r,n):function(n){return vn(r,n)}}function c(r,n,t,u){var e=Ln(r)?r.length:0;return t.map(function(n){return un(e,n,r)},u(void 0,e))}function f(o){var c=1<arguments.length?arguments[1]:{hint:0};return function(n,r,t,u){var e=Ln(n)?n:"",i=c.hint=function(n,r,t){var u=n.hint,e=t.length;e<=u&&(u=e-1),u<0&&(u=0);for(var i=u-1;0<=i&&u<e;++u,--i){if(r(t[u],u,n))return u;if(r(t[i],i,n))return i}for(;u<e;++u)if(r(t[u],u,n))return u;for(;0<=i;--i)if(r(t[i],i,n))return i;return e}(c,o,e);return t.map(function(n){return un(i,n,e)},u(e[i],i))}}function r(){for(var n,r=arguments.length,t={},u=0;u<r;++u)t[n=arguments[u]]=n;return yt(t)}function s(r,n){return 1<arguments.length?cn(r,n,void 0):function(n){return cn(r,n,void 0)}}var l=function(n,r){return n+r},d=function(n,r){return n*r},h=b.curry(l),p=b.curry(d),y=b.curry(function(n,r){return r/n}),g=function(n){return-n},m=function(n,r){return n<r},j=function(n,r){return r<n},A=b.curry(function(n,r){return r instanceof n}),O=Object.create,x=function(n){return b.assign(O(null),n)},w=b.freeze(x(b.object0)),U=b.curry(function(n,r,t){return t.replace(n,r)}),S=function(n){return n},k=function(n){return n},I=function(n){return n},E=function(n,r){return b.isString(n)?new RegExp(U(/[|\\{}()[\]^$+*?.]/g,"\\$&",n),r):n},N=function(n,r){return null!=r&&b.isFunction(r.then)?r.then(n):n(r)},R=function(n){return void 0!==n?String(n):""},q=function(n,r,t,u){return void 0!==u?Math.min(Math.max(n,u<0?r+u:u),r):t},M=function(r){return function(n){return[n,r]}},P=function(r){return function(n){return void 0!==n?n:r}},z=P(0),C=function(n){return void 0!==n?!n:n},D=function(n){return void 0!==n?[n]:n},W=function(r,t){return I(function(n){return r(n)?t(n):void 0})},L=function(n){return!(n instanceof Object)||b.isArray(n)},$=S(function(n){if(Ln(n)){for(var r=n.length,t=Array(r),u=0;r;)t[u++]=n[--r];return t}}),B=S(function(n,r,t){for(var u=r.length,e=Array(u),i=0,o=!0,c=0;c<u;++c){var f=r[c],a=n(f,c);t!==a&&(e[i++]=a,o&&(o=f===a&&(0!==f||1/f==1/a)||f!=f&&a!=a))}return i!==u?(e.length=i,e):o?r:e}),F=function(n,r){return Ln(r)?B(n,r,void 0):void 0},J=S(function(n,r,t,u,e){for(;u<e;)n[r++]=t[u++];return n}),T={map:b.sndU,of:function(){},ap:function(n,r){return void 0!==n?n:r}},_=function(n,r){return{map:b.sndU,ap:n,of:b.always(r)}},G=_(l,0),H=function(o){return b.curry(function(u,n,r){var e=void 0,i=void 0;return K(T,function(n,r){var t=u(n,r);void 0===t||void 0!==i&&!o(t,i)||(e=n,i=t)},n,r),e})},K=function(n,r,t,u){return Jn(t)(u,void 0,n,r)},Q=function(e,n){return b.curryN(4,I(function(t,u){return u=n(u),function(n,r){return e(K(u,t,n,r))}}))},V=function(t){return function(r){return function(n){return t!==n?[n,r]:r}}},X=S(function(n){for(var r=[];V!==n;)r.push(n[0]),n=n[1];return r.reverse()}),Y=function(i,o){return function(e){return function(r,n,t,u){return t.map(function(n){return o(e,n,r)},u(i(e,r),e))}}},Z=function(n,r){return r instanceof Object?r[n]:void 0},nn=S(function(n,r,t){return void 0!==r?b.assocPartialU(n,r,t):b.dissocPartialU(n,t)||b.object0}),rn=Y(Z,nn),tn=function(n,r){return Ln(r)?r[n]:void 0},un=S(function(n,r,t){Ln(t)||(t="");var u=t.length;if(void 0!==r){for(var e=Math.max(n+1,u),i=Array(e),o=0;o<e;++o)i[o]=t[o];return i[n]=r,i}if(u<=n)return J(Array(u),0,t,0,u);for(var c=Array(u-1),f=0;f<n;++f)c[f]=t[f];for(var a=n+1;a<u;++a)c[a-1]=t[a];return c}),en=Y(tn,un),on=function(e,n){return function(t,u){return u=n(t,u),function(n,r){return e(n,r,t,u)}}},cn=S(function(n,r,t){switch(typeof n){case"string":return nn(n,r,t);case"number":return un(n,r,t);case"object":return u(n,0,t,r);default:return 4===n.length?n(t,void 0,$n,b.always(r)):t}}),fn=S(function(n,r,t){switch(typeof n){case"string":return nn(n,r(Z(n,t),n),t);case"number":return un(n,r(tn(n,t),n),t);case"object":return u(n,r,t);default:return 4===n.length?n(t,void 0,$n,r):(r(n(t,void 0),void 0),t)}}),an=function(n,r,t){return u=Jn(n)(t,void 0,Bn,r),Promise.resolve(u);var u},vn=S(function(n,r){switch(typeof n){case"string":return Z(n,r);case"number":return tn(n,r);case"object":for(var t,u=0,e=n.length;u<e;++u)switch(typeof(t=n[u])){case"string":r=Z(t,r);break;case"number":r=tn(t,r);break;default:return o(n,r,u,((i=function n(r,t){return n.v=t,r}).v=n[u-1],i))}return r;default:return n(r,void 0,Fn,S)}var i}),sn=function(e,i){return I(function(r,t,n,u){return n.map(function(n){return i(n,r,t)},u(e(r,t),t))})},ln=function(e,i){return I(function(n,r,t,u){return t.map(i,u(e(n),r))})},dn=function(n,r){return ln(W(b.isString,n),W(b.isString,r))},hn=function(n,r){return ln(W(b.isNumber,n),W(b.isNumber,r))},pn=S(function(n,r){var t=void 0;for(var u in n){var e=n[u],i=b.isObject(e)?pn(e,r):vn(e,r);void 0!==i&&(t||(t={}),t[u]=i)}return t}),yn=S(function(n,r,t){for(var u in n){var e=r&&r[u],i=n[u];t=b.isObject(i)?yn(i,e,t):cn(i,e,t)}return t}),gn=function(n){return b.constructorOf(n)!==Object?b.toObject(n):n},mn=function(n,r,t,u){return u(n,r)},bn=S(function(e){return function(n){for(var r={},t=e.length;t--;){var u=n[0];void 0!==u&&(r[e[t]]=u),n=n[1]}return r}}),jn=S(function(n,r,t,u,e,i){var o=void 0,c=!0,f={};for(var a in r){o=1;var v=t[a],s=r[a](v,a,e,i);void 0!==s?(f[a]=s,c&&(c=v===s&&(0!==v||1/v==1/s)||v!=v&&s!=s)):c=!1}var l=o;for(var d in t)if(void 0===(l&&r[d])){o=1;var h=t[d],p=n(h,d,e,i);void 0!==p?(f[d]=p,c&&(c=h===p&&(0!==h||1/h==1/p)||h!=h&&p!=p)):c=!1}return o?c&&t===u?u:f:u}),An=function(g,m){return function(n,r,t,u){var e=n instanceof Object?gn(n):b.object0;if($n===t)return jn(g,m,e,n,t,u);if(T!==t){var i=t.map,o=t.ap,c=t.of,f=c(M),a=[];for(var v in m)a.push(v),f=o(i(M,f),m[v](e[v],v,t,u));var s=!!a.length||void 0;for(var l in e)void 0===(s&&m[l])&&(a.push(l),f=o(i(M,f),g(e[l],l,t,u)));return a.length?i(bn(a),f):c(n)}for(var d in m){var h=m[d](e[d],d,t,u);if(void 0!==h)return h}for(var p in e)if(void 0===m[p]){var y=g(e[p],p,t,u);if(void 0!==y)return y}}},On=function(n,r,t){return b.acyclicEqualsU(t,n)?r:t},xn=S(function(n,r,t,u){for(var e,i=0,o=r.length;i<o;++i)(n(e=r[i],i)?t:u).push(e)}),wn=function(n){return n[0]},Un=function(n){return n.index},Sn=function(n){return Un(n)+n[0].length},kn=S(function(n,r){var t=r.lastIndex;r.lastIndex=Sn(n);var u=r.exec(n.input);return r.lastIndex=t,u&&u[0]&&u}),In=function(t){return function(r){return function(n){return[t,n,r]}}},En=ln(W(A(Object),S(function(n){n=gn(n);var r=[];for(var t in n)r.push([t,n[t]]);return r})),W(b.isArray,S(function(n){for(var r={},t=0,u=n.length;t<u;++t){var e=n[t];2===e.length&&(r[e[0]]=e[1])}return r}))),Nn=S(function(n,r){if(r instanceof Object){var t={};for(var u in r=gn(r)){var e=n(u),i=t[e];void 0===i&&(t[e]=i={}),i[u]=r[u]}return t}}),Rn=S(function(i){return function(n){if(n instanceof Object){var r={};for(var t in n=gn(n)){var u=n[t];if(u instanceof Object)for(var e in u=gn(u))i(e)===t&&(r[e]=u[e])}return r}}}),qn=function(i,o){return function(e){return function(n,r,t,u){return(e(n,r)?i:o)(n,r,t,u)}}},Mn=function(e,i){return i=Jn(i),e=Jn(e),function(n,r,t,u){return(Wr(i,n)?i:e)(n,r,t,u)}},Pn=function(n,r,t,u){return t===$n?B(u,n,void 0):t===T?e(u,n):i(t,u,n,void 0)},zn=function(e,i){return function(n,r,t,u){return t.chain(function(n){return i(n,r,t,u)},e(n,r,t,u))}},Cn=function(n,r){return[r,dt(n)]},Dn=b.always(v),Wn=function(t,u,e){return function(n,r){return t(n,r)?u:e(n,r)}},Ln=function(n){return n instanceof Object&&(n=n.length)===n>>0&&0<=n||b.isString(n)},$n=S({map:b.applyU,of:S,ap:b.applyU,chain:b.applyU}),Bn=S({map:N,ap:function(n,r){return N(function(r){return N(function(n){return n(r)},n)},r)},of:S,chain:N}),Fn=S({map:b.sndU}),Jn=S(function(n){switch(typeof n){case"string":return rn(n);case"number":return en(n);case"object":return a(0,n);default:return 4===n.length?n:(e=n,I(function(n,r,t,u){return t.map(b.always(n),u(e(n,r),r))}))}var e}),Tn=b.curry(function(n,r,t){return cn([n,pt(r)],r,t)}),_n=b.curry(fn),Gn=b.curry(an),Hn=b.curry(function(n,r){return cn(n,void 0,r)}),Kn=b.curry(cn),Qn=b.curry(function(n,r){return fn(n,S,r)}),Vn=b.curry(function(n,r){return an(n,S,r)}),Xn=b.curry(K),Yn=function(e){return I(function(n,r,t,u){return Jn(e(n,r))(n,r,t,u)})},Zn=S(function(){for(var n=arguments.length,r=fr;n--;){var t=arguments[n];r=t.length<2?Jn(t[0]):qn(Jn(t[1]),r)(t[0])}return r}),nr=S(function(e){e=Jn(e);for(var i=Dn,n=arguments.length;--n;){var r=arguments[n];i=1===r.length?b.always(Jn(r[0])):Wn(r[0],Jn(r[1]),i)}return function(n,r,t,u){return e(n,r,Fn,i)(n,r,t,u)}}),rr=b.curry(function(n,r,t){return qn(Jn(r),Jn(t))(n)}),tr=S(function(n,r){for(var t=arguments.length,u=1&t?Jn(arguments[--t]):fr;0<=(t-=2);)u=qn(Jn(arguments[t+1]),u)(arguments[t]);return u}),ur=b.curry(Mn),er=b.curry(function(t,n){return[n,Yn(function(n,r){return void 0!==n?t(n,r):fr})]}),ir=qn(v,mn),or=qn(mn,v),cr=or(b.isDefined),fr=function(n,r,t,u){return v(n,r,t,u)},ar=function(e){return function(n,r,t,u){return v(e,r,t,u,e)}},vr=ar(),sr=S(function(){var n=arguments.length,r=fr;if(n)for(r=Jn(arguments[--n]);n;)r=zn(Jn(arguments[--n]),r);return r}),lr=S(b.curryN(2,function(r){return r=Jn(r),function(n){return function n(r,t){var u=O(null);for(var e in t){var i=t[e];u[e]=b.isObject(i)?n(r,i):Jn(i)}return An(r,u)}(r,n)}})),dr=lr(fr),hr=S(function(n,r,t,u){return Ln(n)?Pn(n,0,t,u):t.of(n)}),pr=k(Jn([En,hr])),yr=k(Jn([En,hr,0])),gr=S(function(f){return function(r,n,t,u){if(b.isString(r)){var e=t.map;if(f.global){var i=[""];return i.input=r,i.index=0,T===t?function(n,r,t){for(;t=kn(t,r);){var u=n(wn(t),Un(t));if(void 0!==u)return u}}(u,f,i):e((c=r,function(n){for(var r="",t=0,u=function(n){for(var r=[];In!==n;)r.push(n[0],n[1]),n=n[2];return r}(n),e=u.length-2;-2!==e;e+=-2){var i=u[e];r+=c.slice(t,Un(i));var o=u[e+1];void 0!==o&&(r+=o),t=Sn(i)}return r+c.slice(t)}),function(n,r,t,u,e,i){for(var o=t(In);i=kn(i,e);)o=r(r(n(In,t(i)),o),u(wn(i),Un(i)));return o}(e,t.ap,t.of,u,f,i))}var o=r.match(f);if(o)return e(function(n){return r.replace(f,void 0!==n?n:"")},u(o[0],Un(o)))}var c;return v(r,void 0,t,u)}}),mr=S(k(An(mn,w))),br=S(function(n,r,t,u){return b.isArray(n)?Pn(n,0,t,u):b.isObject(n)?mr(n,r,t,u):t.of(n)}),jr=S(function(n,r,u,e){return function n(r,t){return b.isArray(r)?Pn(r,0,u,n):void 0!==r?e(r,t):u.of(r)}(n,r)}),Ar=function(i){return function(n,r,u,e){return function n(r,t){return i(r,t)?e(r,t):br(r,t,u,n)}(n,r)}},Or=Ar(function(n){return void 0!==n&&!b.isArray(n)&&!b.isObject(n)}),xr=b.curry(function(t,n,r){return!K(T,function(n,r){if(!t(n,r))return!0},n,r)}),wr=xr(S),Ur=b.curry(function(t,n,r){return!!K(T,function(n,r){if(t(n,r))return!0},n,r)}),Sr=(0,b.curry)(function(u,n,r){var e=[];return K(T,function(n,r){var t=u(n,r);void 0!==t&&e.push(t)},n,r),e}),kr=Sr(S),Ir=Q(S,function(n){return _(n.concat,n.empty())}),Er=Ir(S),Nr=b.curry(function(t,n,r){return K(G,function(n,r){return t(n,r)?1:0},n,r)}),Rr=Nr(b.isDefined),qr=b.curry(function(e,n,r){var i=new Map;return K(T,function(n,r){var t=e(n,r),u=i.get(t);i.set(t,void 0!==u?u+1:1)},n,r),i}),Mr=qr(S),Pr=b.curry(function(t,u,n,r){return K(T,function(n,r){u=t(u,n,r)},n,r),u}),zr=b.curry(function(n,r,t,u){var e=[],i=[];K(T,function(n,r){i.push(n),e.push(r)},t,u);for(var o=i.length-1;0<=o;--o)r=n(r,i[o],e[o]);return r}),Cr=b.curry(function(t,n,r){return K(T,function(n,r){t(n,r)},n,r)}),Dr=b.curry(function(n,t,r,u){var e=n();return K(T,function(n,r){t(e,n,r)},r,u),e}),Wr=b.curry(function(n,r){return void 0!==K(T,S,n,r)}),Lr=b.curry(function(n,r){return!K(T,b.always(!0),n,r)}),$r=Q(R,S(function(t){return _(function(n,r){return void 0!==n?void 0!==r?n+t+r:n:r})})),Br=$r(S),Fr=H(j),Jr=Fr(S),Tr=b.curry(function(u,n,r){var e=0,i=0;return K(T,function(n,r){var t=u(n,r);void 0!==t&&(i+=1,e+=t)},n,r),e/i}),_r=Tr(S),Gr=H(m),Hr=Gr(S),Kr=b.curry(function(t,n,r){return!K(T,function(n,r){if(t(n,r))return!0},n,r)}),Qr=Ur(S),Vr=Xn(_(d,1)),Xr=Vr(P(1)),Yr=Xn(T),Zr=Yr(S),nt=Xn(G),rt=nt(z),tt=b.curry(sn),ut=tt(S),et=b.curry(function(n,r){return sn(n(r),Kn(r))}),it=S(function(e){var i=P(e);return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}}),ot=S(function(n){return gt(n,void 0)}),ct=function(e){return function(n,r,t,u){return u(void 0!==n?e(n,r):n,r)}},ft=function(e){return function(n,r,t,u){return t.map(function(n){return void 0!==n?e(n,r):n},u(n,r))}},at=S(function(o){return function(n,r,t,u){var e=void 0,i=b.array0;return Ln(n)&&xn(o,n,e=[],i=[]),t.map(function(n){var r=n?n.length:0,t=i.length,u=r+t;return u===t?i:J(J(Array(u),0,n,0,r),r,i,0,t)},u(e,r))}}),vt=S,st=Yn(function(n){return Ln(n)&&n.length?n.length-1:0}),lt=(0,b.curry)(function(f,a){return function(u,n,r,t){var e=Ln(u),i=e&&u.length,o=q(0,i,0,f),c=q(o,i,i,a);return r.map(function(n){var r=n?n.length:0,t=o+r;return J(J(J(Array(i-c+t),0,u,0,o),o,n,0,r),t,u,c,i)},t(e?J(Array(Math.max(0,c-o)),0,u,o,c):void 0,n))}}),dt=function(n){return b.isObject(n)?yt(_n(mr,Cn,n)):n},ht=S,pt=function(n){return r.apply(null,b.keys(n))},yt=S(function(e){return function(r,n,t,u){return t.map(function(n){return yn(e,n,r)},u(pn(e,r),n))}}),gt=b.curry(function(e,i){function o(n){return On(i,e,n)}return function(n,r,t,u){return t.map(o,u(On(e,i,n),r))}}),mt=b.curry(ln),bt=ln(C,C),jt=ln(W(Ln,S(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u)t[u]=[u,n[u]];return t})),W(b.isArray,S(function(n){for(var r=n.length,t=Array(r),u=0;u<r;++u){var e=n[u];2===e.length&&(t[e[0]]=e[1])}r=t.length;for(var i=0,o=0;o<r;++o){var c=t[o];void 0!==c&&(o!==i&&(t[i]=c),++i)}return t.length=i,t}))),At=ln($,$),Ot=S(function(n,r,t,u){return t.map(D,u((n instanceof Object||b.isString(n))&&1===n.length?n[0]:void 0,r))}),xt=dn(decodeURI,encodeURI),wt=dn(decodeURIComponent,encodeURIComponent),Ut=S(function(n){var r=n||b.object0,t=r.reviver,u=r.replacer,e=r.space;return ln(W(b.isString,function(n){return JSON.parse(n,t)}),W(b.isDefined,function(n){return JSON.stringify(n,u,e)}))}),St=b.curry(function(n,r){return dn(U(E(n,"g"),r),U(E(r,"g"),n))}),kt=S(function(r){var t=1<arguments.length?arguments[1]:r;return ln(W(b.isString,function(n){return n.split(t)}),W(b.isArray,function(n){return n.join(r)}))}),It=S(function(u){var t=E(1<arguments.length?arguments[1]:u,"");return ln(W(b.isString,function(n){var r=t.exec(n);return r?[n.slice(0,Un(r)),n.slice(Sn(r))]:[n,""]}),function(n){if(b.isArray(n)&&2===n.length){var r=n[0],t=n[1];return t?r+u+t:r}})}),Et=hn(g,g);n.seemsArrayLike=Ln,n.Identity=$n,n.IdentityAsync=Bn,n.Constant=Fn,n.toFunction=Jn,n.assign=Tn,n.modify=_n,n.modifyAsync=Gn,n.remove=Hn,n.set=Kn,n.transform=Qn,n.transformAsync=Vn,n.traverse=Xn,n.compose=function(){var n=arguments.length;if(n<2)return n?arguments[0]:mn;for(var r=Array(n);n--;)r[n]=arguments[n];return r},n.flat=function(){for(var n=[jr],r=0,t=arguments.length;r<t;++r)n.push(arguments[r],jr);return n},n.lazy=function(e){function i(n,r,t,u){return o(n,r,t,u)}var o=function(n,r,t,u){return(o=Jn(e(i)))(n,r,t,u)};return i},n.choices=function(n){for(var r=arguments.length,t=Array(1<r?r-1:0),u=1;u<r;u++)t[u-1]=arguments[u];return t.length?Mn(t.reduceRight(Mn),n):n},n.choose=Yn,n.cond=Zn,n.condOf=nr,n.ifElse=rr,n.iftes=tr,n.orElse=ur,n.chain=er,n.choice=function(){for(var n=arguments.length,r=Array(n),t=0;t<n;t++)r[t]=arguments[t];return r.reduceRight(Mn,fr)},n.unless=ir,n.when=or,n.optional=cr,n.zero=fr,n.assignOp=function(n){return[pt(n),ar(n)]},n.modifyOp=function(e){return function(n,r,t,u){return v(n=e(n,r),r,t,u,n)}},n.setOp=ar,n.removeOp=vr,n.log=function(){var n=b.curry(function(n,r){return console.log.apply(console,J([],0,arguments,0,arguments.length).concat([n,r])),r});return ln(n("get"),n("set"))},n.seq=sr,n.branchOr=lr,n.branch=dr,n.branches=function(){for(var n=arguments.length,r={},t=0;t<n;++t)r[arguments[t]]=mn;return dr(r)},n.elems=hr,n.elemsTotal=function(n,r,t,u){return Ln(n)?t===$n?B(u,n,B):t===T?e(u,n):i(t,u,n,i):t.of(n)},n.entries=pr,n.keys=yr,n.matches=gr,n.values=mr,n.children=br,n.flatten=jr,n.query=function(){for(var n=[],r=0,t=arguments.length;r<t;++r){var u=Jn(arguments[r]);n.push(Ar(Wr(u)),u)}return n},n.satisfying=Ar,n.leafs=Or,n.all=xr,n.and=wr,n.any=Ur,n.collectAs=Sr,n.collect=kr,n.concatAs=Ir,n.concat=Er,n.countIf=Nr,n.count=Rr,n.countsAs=qr,n.counts=Mr,n.foldl=Pr,n.foldr=zr,n.forEach=Cr,n.forEachWith=Dr,n.isDefined=Wr,n.isEmpty=Lr,n.joinAs=$r,n.join=Br,n.maximumBy=Fr,n.maximum=Jr,n.meanAs=Tr,n.mean=_r,n.minimumBy=Gr,n.minimum=Hr,n.none=Kr,n.or=Qr,n.productAs=Vr,n.product=Xr,n.selectAs=Yr,n.select=Zr,n.sumAs=nt,n.sum=rt,n.get=t,n.lens=tt,n.setter=ut,n.foldTraversalLens=et,n.defaults=function(e){function i(n){return On(e,void 0,n)}return function(n,r,t,u){return t.map(i,u(void 0!==n?n:e,r))}},n.define=it,n.normalize=function(n){return[ct(n),ft(n)]},n.required=ot,n.reread=ct,n.rewrite=ft,n.append=c,n.filter=at,n.find=f,n.findWith=function(n){var r=Jn(n),t=Wr(r);return[1<arguments.length?f(t,arguments[1]):f(t),r]},n.first=0,n.index=vt,n.last=st,n.prefix=function(n){return lt(0,n)},n.slice=lt,n.suffix=function(n){return lt(0===n?1/0:n?-n:0,void 0)},n.pickIn=dt,n.prop=ht,n.props=r,n.propsOf=pt,n.removable=function(){function e(n){if(!(n instanceof Object))return n;for(var r=0,t=u.length;r<t;++r)if(b.hasU(u[r],n))return n}for(var n=arguments.length,u=Array(n),r=0;r<n;r++)u[r]=arguments[r];return function(n,r,t,u){return t.map(e,u(n,r))}},n.valueOr=function(e){return function(n,r,t,u){return u(null!=n?n:e,r)}},n.pick=yt,n.replace=gt,n.getInverse=s,n.iso=mt,n.array=function(n){var r=s(n),e=t(n),i=function(n){return F(r,n)};return function(n,r,t,u){return t.map(i,u(F(e,n),r))}},n.inverse=function(e){return function(n,r,t,u){return t.map(function(n){return vn(e,n)},u(cn(e,n,void 0),r))}},n.complement=bt,n.identity=mn,n.is=function(r){return ln(function(n){return b.acyclicEqualsU(r,n)},function(n){return!0===n?r:void 0})},n.indexed=jt,n.reverse=At,n.singleton=Ot,n.disjoint=function(i){return function(n,r,t,u){var e=Rn(i);return t.map(e,u(Nn(i,n),r))}},n.keyed=En,n.uri=xt,n.uriComponent=wt,n.json=Ut,n.dropPrefix=function(r){return dn(function(n){return n.startsWith(r)?n.slice(r.length):void 0},function(n){return r+n})},n.dropSuffix=function(r){return dn(function(n){return n.endsWith(r)?n.slice(0,n.length-r.length):void 0},function(n){return n+r})},n.replaces=St,n.split=kt,n.uncouple=It,n.add=function(n){return hn(h(n),h(-n))},n.divide=function(n){return hn(y(n),p(n))},n.multiply=function(n){return hn(p(n),y(n))},n.negate=Et,n.subtract=function(n){return hn(h(-n),h(n))},n.pointer=function(n){"#"===n[0]&&(n=vn(wt,n));for(var r=n.split("/"),t=r.length,u=1;u<t;++u){var e=r[u];r[u-1]=/^(0|[1-9]\d*)$/.test(e)?rr(L,Number(e),e):"-"===e?rr(L,c,e):e.replace("~1","/").replace("~0","~")}return r.length=t-1,r},Object.defineProperty(n,"__esModule",{value:!0})}); |
{ | ||
"name": "partial.lenses", | ||
"version": "13.13.1", | ||
"version": "13.13.2", | ||
"description": "Partial lenses is a comprehensive, high-performance optics library for JavaScript", | ||
@@ -5,0 +5,0 @@ "module": "dist/partial.lenses.es.js", |
@@ -11,3 +11,3 @@ import * as I from './ext/infestines' | ||
process.env.NODE_ENV === 'production' | ||
? id | ||
? x => x | ||
: (to, name) => I.defineNameU(to, name) | ||
@@ -17,3 +17,3 @@ | ||
process.env.NODE_ENV === 'production' | ||
? id | ||
? x => x | ||
: (to, from) => I.defineNameU(to, from.name) | ||
@@ -20,0 +20,0 @@ |
510040
0.02%6967
0.11%