@airma/react-effect
Advanced tools
Comparing version 18.5.1 to 18.5.2
@@ -1,1 +0,1 @@ | ||
!function(r,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("@airma/react-state"),require("@airma/react-hooks-core")):"function"==typeof define&&define.amd?define(["react","@airma/react-state","@airma/react-hooks-core"],n):"object"==typeof exports?exports["@airma/react-effect"]=n(require("react"),require("@airma/react-state"),require("@airma/react-hooks-core")):r["@airma/react-effect"]=n(r.react,r["@airma/react-state"],r["@airma/react-hooks-core"])}(self,(function(r,n,t){return function(){var e={4933:function(r,n,t){var e=t(6291),o=t(7073),u=TypeError;r.exports=function(r){if(e(r))return r;throw u(o(r)+" is not a function")}},5822:function(r,n,t){var e=t(6802),o=t(2275),u=t(6462).f,i=e("unscopables"),c=Array.prototype;null==c[i]&&u(c,i,{configurable:!0,value:o(null)}),r.exports=function(r){c[i][r]=!0}},4905:function(r,n,t){var e=t(2366),o=String,u=TypeError;r.exports=function(r){if(e(r))return r;throw u(o(r)+" is not an object")}},5029:function(r,n,t){var e=t(678),o=t(6971),u=t(4821),i=function(r){return function(n,t,i){var c,a=e(n),f=u(a),s=o(i,f);if(r&&t!=t){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((r||s in a)&&a[s]===t)return r||s||0;return!r&&-1}};r.exports={includes:i(!0),indexOf:i(!1)}},5489:function(r,n,t){var e=t(936),o=e({}.toString),u=e("".slice);r.exports=function(r){return u(o(r),8,-1)}},6810:function(r,n,t){var e=t(8382),o=t(2466),u=t(8117),i=t(6462);r.exports=function(r,n,t){for(var c=o(n),a=i.f,f=u.f,s=0;s<c.length;s++){var l=c[s];e(r,l)||t&&e(t,l)||a(r,l,f(n,l))}}},430:function(r,n,t){var e=t(1502),o=t(6462),u=t(6034);r.exports=e?function(r,n,t){return o.f(r,n,u(1,t))}:function(r,n,t){return r[n]=t,r}},6034:function(r){r.exports=function(r,n){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:n}}},5850:function(r,n,t){var e=t(6291),o=t(6462),u=t(7192),i=t(1756);r.exports=function(r,n,t,c){c||(c={});var a=c.enumerable,f=void 0!==c.name?c.name:n;if(e(t)&&u(t,f,c),c.global)a?r[n]=t:i(n,t);else{try{c.unsafe?r[n]&&(a=!0):delete r[n]}catch(r){}a?r[n]=t:o.f(r,n,{value:t,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return r}},1756:function(r,n,t){var e=t(5001),o=Object.defineProperty;r.exports=function(r,n){try{o(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}},1502:function(r,n,t){var e=t(5061);r.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5178:function(r){var n="object"==typeof document&&document.all,t=void 0===n&&void 0!==n;r.exports={all:n,IS_HTMLDDA:t}},6009:function(r,n,t){var e=t(5001),o=t(2366),u=e.document,i=o(u)&&o(u.createElement);r.exports=function(r){return i?u.createElement(r):{}}},9966:function(r,n,t){var e=t(3425);r.exports=e("navigator","userAgent")||""},2821:function(r,n,t){var e,o,u=t(5001),i=t(9966),c=u.process,a=u.Deno,f=c&&c.versions||a&&a.version,s=f&&f.v8;s&&(o=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&i&&(!(e=i.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=i.match(/Chrome\/(\d+)/))&&(o=+e[1]),r.exports=o},2089:function(r){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9638:function(r,n,t){var e=t(5001),o=t(8117).f,u=t(430),i=t(5850),c=t(1756),a=t(6810),f=t(1092);r.exports=function(r,n){var t,s,l,v,p,d=r.target,y=r.global,g=r.stat;if(t=y?e:g?e[d]||c(d,{}):(e[d]||{}).prototype)for(s in n){if(v=n[s],l=r.dontCallGetSet?(p=o(t,s))&&p.value:t[s],!f(y?s:d+(g?".":"#")+s,r.forced)&&void 0!==l){if(typeof v==typeof l)continue;a(v,l)}(r.sham||l&&l.sham)&&u(v,"sham",!0),i(t,s,v,r)}}},5061:function(r){r.exports=function(r){try{return!!r()}catch(r){return!0}}},8483:function(r,n,t){var e=t(5061);r.exports=!e((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},3927:function(r,n,t){var e=t(8483),o=Function.prototype.call;r.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},9873:function(r,n,t){var e=t(1502),o=t(8382),u=Function.prototype,i=e&&Object.getOwnPropertyDescriptor,c=o(u,"name"),a=c&&"something"===function(){}.name,f=c&&(!e||e&&i(u,"name").configurable);r.exports={EXISTS:c,PROPER:a,CONFIGURABLE:f}},936:function(r,n,t){var e=t(8483),o=Function.prototype,u=o.call,i=e&&o.bind.bind(u,u);r.exports=e?i:function(r){return function(){return u.apply(r,arguments)}}},3425:function(r,n,t){var e=t(5001),o=t(6291);r.exports=function(r,n){return arguments.length<2?(t=e[r],o(t)?t:void 0):e[r]&&e[r][n];var t}},3815:function(r,n,t){var e=t(4933),o=t(860);r.exports=function(r,n){var t=r[n];return o(t)?void 0:e(t)}},5001:function(r,n,t){var e=function(r){return r&&r.Math==Math&&r};r.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t.g&&t.g)||function(){return this}()||Function("return this")()},8382:function(r,n,t){var e=t(936),o=t(7615),u=e({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,n){return u(o(r),n)}},2499:function(r){r.exports={}},2118:function(r,n,t){var e=t(3425);r.exports=e("document","documentElement")},7788:function(r,n,t){var e=t(1502),o=t(5061),u=t(6009);r.exports=!e&&!o((function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},2901:function(r,n,t){var e=t(936),o=t(5061),u=t(5489),i=Object,c=e("".split);r.exports=o((function(){return!i("z").propertyIsEnumerable(0)}))?function(r){return"String"==u(r)?c(r,""):i(r)}:i},685:function(r,n,t){var e=t(936),o=t(6291),u=t(9982),i=e(Function.toString);o(u.inspectSource)||(u.inspectSource=function(r){return i(r)}),r.exports=u.inspectSource},684:function(r,n,t){var e,o,u,i=t(1899),c=t(5001),a=t(2366),f=t(430),s=t(8382),l=t(9982),v=t(1695),p=t(2499),d="Object already initialized",y=c.TypeError,g=c.WeakMap;if(i||l.state){var b=l.state||(l.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,e=function(r,n){if(b.has(r))throw y(d);return n.facade=r,b.set(r,n),n},o=function(r){return b.get(r)||{}},u=function(r){return b.has(r)}}else{var h=v("state");p[h]=!0,e=function(r,n){if(s(r,h))throw y(d);return n.facade=r,f(r,h,n),n},o=function(r){return s(r,h)?r[h]:{}},u=function(r){return s(r,h)}}r.exports={set:e,get:o,has:u,enforce:function(r){return u(r)?o(r):e(r,{})},getterFor:function(r){return function(n){var t;if(!a(n)||(t=o(n)).type!==r)throw y("Incompatible receiver, "+r+" required");return t}}}},6291:function(r,n,t){var e=t(5178),o=e.all;r.exports=e.IS_HTMLDDA?function(r){return"function"==typeof r||r===o}:function(r){return"function"==typeof r}},1092:function(r,n,t){var e=t(5061),o=t(6291),u=/#|\.prototype\./,i=function(r,n){var t=a[c(r)];return t==s||t!=f&&(o(n)?e(n):!!n)},c=i.normalize=function(r){return String(r).replace(u,".").toLowerCase()},a=i.data={},f=i.NATIVE="N",s=i.POLYFILL="P";r.exports=i},860:function(r){r.exports=function(r){return null==r}},2366:function(r,n,t){var e=t(6291),o=t(5178),u=o.all;r.exports=o.IS_HTMLDDA?function(r){return"object"==typeof r?null!==r:e(r)||r===u}:function(r){return"object"==typeof r?null!==r:e(r)}},13:function(r){r.exports=!1},6448:function(r,n,t){var e=t(3425),o=t(6291),u=t(6282),i=t(7558),c=Object;r.exports=i?function(r){return"symbol"==typeof r}:function(r){var n=e("Symbol");return o(n)&&u(n.prototype,c(r))}},4821:function(r,n,t){var e=t(4479);r.exports=function(r){return e(r.length)}},7192:function(r,n,t){var e=t(5061),o=t(6291),u=t(8382),i=t(1502),c=t(9873).CONFIGURABLE,a=t(685),f=t(684),s=f.enforce,l=f.get,v=Object.defineProperty,p=i&&!e((function(){return 8!==v((function(){}),"length",{value:8}).length})),d=String(String).split("String"),y=r.exports=function(r,n,t){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(n="get "+n),t&&t.setter&&(n="set "+n),(!u(r,"name")||c&&r.name!==n)&&(i?v(r,"name",{value:n,configurable:!0}):r.name=n),p&&t&&u(t,"arity")&&r.length!==t.arity&&v(r,"length",{value:t.arity});try{t&&u(t,"constructor")&&t.constructor?i&&v(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(r){}var e=s(r);return u(e,"source")||(e.source=d.join("string"==typeof n?n:"")),r};Function.prototype.toString=y((function(){return o(this)&&l(this).source||a(this)}),"toString")},1367:function(r){var n=Math.ceil,t=Math.floor;r.exports=Math.trunc||function(r){var e=+r;return(e>0?t:n)(e)}},2275:function(r,n,t){var e,o=t(4905),u=t(6191),i=t(2089),c=t(2499),a=t(2118),f=t(6009),s=t(1695),l="prototype",v="script",p=s("IE_PROTO"),d=function(){},y=function(r){return"<"+v+">"+r+"</"+v+">"},g=function(r){r.write(y("")),r.close();var n=r.parentWindow.Object;return r=null,n},b=function(){try{e=new ActiveXObject("htmlfile")}catch(r){}var r,n,t;b="undefined"!=typeof document?document.domain&&e?g(e):(n=f("iframe"),t="java"+v+":",n.style.display="none",a.appendChild(n),n.src=String(t),(r=n.contentWindow.document).open(),r.write(y("document.F=Object")),r.close(),r.F):g(e);for(var o=i.length;o--;)delete b[l][i[o]];return b()};c[p]=!0,r.exports=Object.create||function(r,n){var t;return null!==r?(d[l]=o(r),t=new d,d[l]=null,t[p]=r):t=b(),void 0===n?t:u.f(t,n)}},6191:function(r,n,t){var e=t(1502),o=t(5780),u=t(6462),i=t(4905),c=t(678),a=t(9749);n.f=e&&!o?Object.defineProperties:function(r,n){i(r);for(var t,e=c(n),o=a(n),f=o.length,s=0;f>s;)u.f(r,t=o[s++],e[t]);return r}},6462:function(r,n,t){var e=t(1502),o=t(7788),u=t(5780),i=t(4905),c=t(1030),a=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",v="configurable",p="writable";n.f=e?u?function(r,n,t){if(i(r),n=c(n),i(t),"function"==typeof r&&"prototype"===n&&"value"in t&&p in t&&!t[p]){var e=s(r,n);e&&e[p]&&(r[n]=t.value,t={configurable:v in t?t[v]:e[v],enumerable:l in t?t[l]:e[l],writable:!1})}return f(r,n,t)}:f:function(r,n,t){if(i(r),n=c(n),i(t),o)try{return f(r,n,t)}catch(r){}if("get"in t||"set"in t)throw a("Accessors not supported");return"value"in t&&(r[n]=t.value),r}},8117:function(r,n,t){var e=t(1502),o=t(3927),u=t(9265),i=t(6034),c=t(678),a=t(1030),f=t(8382),s=t(7788),l=Object.getOwnPropertyDescriptor;n.f=e?l:function(r,n){if(r=c(r),n=a(n),s)try{return l(r,n)}catch(r){}if(f(r,n))return i(!o(u.f,r,n),r[n])}},9219:function(r,n,t){var e=t(3855),o=t(2089).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(r){return e(r,o)}},2822:function(r,n){n.f=Object.getOwnPropertySymbols},6282:function(r,n,t){var e=t(936);r.exports=e({}.isPrototypeOf)},3855:function(r,n,t){var e=t(936),o=t(8382),u=t(678),i=t(5029).indexOf,c=t(2499),a=e([].push);r.exports=function(r,n){var t,e=u(r),f=0,s=[];for(t in e)!o(c,t)&&o(e,t)&&a(s,t);for(;n.length>f;)o(e,t=n[f++])&&(~i(s,t)||a(s,t));return s}},9749:function(r,n,t){var e=t(3855),o=t(2089);r.exports=Object.keys||function(r){return e(r,o)}},9265:function(r,n){"use strict";var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!t.call({1:2},1);n.f=o?function(r){var n=e(this,r);return!!n&&n.enumerable}:t},379:function(r,n,t){var e=t(3927),o=t(6291),u=t(2366),i=TypeError;r.exports=function(r,n){var t,c;if("string"===n&&o(t=r.toString)&&!u(c=e(t,r)))return c;if(o(t=r.valueOf)&&!u(c=e(t,r)))return c;if("string"!==n&&o(t=r.toString)&&!u(c=e(t,r)))return c;throw i("Can't convert object to primitive value")}},2466:function(r,n,t){var e=t(3425),o=t(936),u=t(9219),i=t(2822),c=t(4905),a=o([].concat);r.exports=e("Reflect","ownKeys")||function(r){var n=u.f(c(r)),t=i.f;return t?a(n,t(r)):n}},4475:function(r,n,t){var e=t(860),o=TypeError;r.exports=function(r){if(e(r))throw o("Can't call method on "+r);return r}},1695:function(r,n,t){var e=t(6809),o=t(1050),u=e("keys");r.exports=function(r){return u[r]||(u[r]=o(r))}},9982:function(r,n,t){var e=t(5001),o=t(1756),u="__core-js_shared__",i=e[u]||o(u,{});r.exports=i},6809:function(r,n,t){var e=t(13),o=t(9982);(r.exports=function(r,n){return o[r]||(o[r]=void 0!==n?n:{})})("versions",[]).push({version:"3.26.1",mode:e?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5947:function(r,n,t){var e=t(2821),o=t(5061);r.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},6971:function(r,n,t){var e=t(9398),o=Math.max,u=Math.min;r.exports=function(r,n){var t=e(r);return t<0?o(t+n,0):u(t,n)}},678:function(r,n,t){var e=t(2901),o=t(4475);r.exports=function(r){return e(o(r))}},9398:function(r,n,t){var e=t(1367);r.exports=function(r){var n=+r;return n!=n||0===n?0:e(n)}},4479:function(r,n,t){var e=t(9398),o=Math.min;r.exports=function(r){return r>0?o(e(r),9007199254740991):0}},7615:function(r,n,t){var e=t(4475),o=Object;r.exports=function(r){return o(e(r))}},6973:function(r,n,t){var e=t(3927),o=t(2366),u=t(6448),i=t(3815),c=t(379),a=t(6802),f=TypeError,s=a("toPrimitive");r.exports=function(r,n){if(!o(r)||u(r))return r;var t,a=i(r,s);if(a){if(void 0===n&&(n="default"),t=e(a,r,n),!o(t)||u(t))return t;throw f("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(r,n)}},1030:function(r,n,t){var e=t(6973),o=t(6448);r.exports=function(r){var n=e(r,"string");return o(n)?n:n+""}},7073:function(r){var n=String;r.exports=function(r){try{return n(r)}catch(r){return"Object"}}},1050:function(r,n,t){var e=t(936),o=0,u=Math.random(),i=e(1..toString);r.exports=function(r){return"Symbol("+(void 0===r?"":r)+")_"+i(++o+u,36)}},7558:function(r,n,t){var e=t(5947);r.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5780:function(r,n,t){var e=t(1502),o=t(5061);r.exports=e&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1899:function(r,n,t){var e=t(5001),o=t(6291),u=e.WeakMap;r.exports=o(u)&&/native code/.test(String(u))},6802:function(r,n,t){var e=t(5001),o=t(6809),u=t(8382),i=t(1050),c=t(5947),a=t(7558),f=o("wks"),s=e.Symbol,l=s&&s.for,v=a?s:s&&s.withoutSetter||i;r.exports=function(r){if(!u(f,r)||!c&&"string"!=typeof f[r]){var n="Symbol."+r;c&&u(s,r)?f[r]=s[r]:f[r]=a&&l?l(n):v(n)}return f[r]}},5093:function(r,n,t){"use strict";var e=t(9638),o=t(5029).includes,u=t(5061),i=t(5822);e({target:"Array",proto:!0,forced:u((function(){return!Array(1).includes()}))},{includes:function(r){return o(this,r,arguments.length>1?arguments[1]:void 0)}}),i("includes")},309:function(r){"use strict";r.exports=t},7400:function(r){"use strict";r.exports=n},8156:function(n){"use strict";n.exports=r}},o={};function u(r){var n=o[r];if(void 0!==n)return n.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,u),t.exports}u.d=function(r,n){for(var t in n)u.o(n,t)&&!u.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:n[t]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),u.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},u.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i={};return function(){"use strict";function r(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=new Array(n);t<n;t++)e[t]=r[t];return e}function n(n,t){if(n){if("string"==typeof n)return r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(n,t):void 0}}function t(t){return function(n){if(Array.isArray(n))return r(n)}(t)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(r,n,t){return n in r?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,r}function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,o,u=[],i=!0,c=!1;try{for(t=t.call(r);!(i=(e=t.next()).done)&&(u.push(e.value),!n||u.length!==n);i=!0);}catch(r){c=!0,o=r}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return u}}(r,t)||n(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}u.r(i),u.d(i,{ConfigProvider:function(){return w},Provider:function(){return J},Strategy:function(){return I},createSessionKey:function(){return h},provide:function(){return B},session:function(){return V},useIsFetching:function(){return G},useLazyComponent:function(){return Q},useLoadedSession:function(){return W},useMutation:function(){return N},useQuery:function(){return U},useResponse:function(){return H},useSession:function(){return z}});u(5093);var c=u(8156),a=u(7400),f=u(309);function s(r,n){if(null==r)return{};var t,e,o=function(r,n){if(null==r)return{};var t,e,o={},u=Object.keys(r);for(e=0;e<u.length;e++)t=u[e],n.indexOf(t)>=0||(o[t]=r[t]);return o}(r,n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(e=0;e<u.length;e++)t=u[e],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}var l=["request"];function v(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function p(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function d(r){var n=r.request,t=s(r,l),e=function(t){return p(p({},t),{},{request:n,uniqueKey:r.uniqueKey})},o=function(n){return n.isFetching?p(p({},n),{},{stale:r.stale||{data:r.data}}):p(p({},n),{},{visited:r.visited?r.visited:!n.isError,round:r.round+1,stale:void 0})},u=n?n.version:0;return{state:t,request:n,setState:function(n){return o(e("function"!=typeof n?n:n(r)))},trigger:function(){return p(p({},r),{},{request:{version:u+1}})},execute:function(n){return p(p({},r),{},{request:{version:u+1,variables:n}})}}}var y=function(r){return p({data:void 0,variables:void 0,isError:!1,isFetching:!1,abandon:!1,triggerType:void 0,loaded:!1,sessionLoaded:!1,cache:[],maxCacheCapacity:1,round:0,executeVariables:void 0,visited:!1},r)};function g(r,n,t){var e=r.isFactory;if(!("function"==typeof e&&e()))return[d,r,t,!1];var u=o(r.payload,2),i=u[0],c=u[1].sessionType;if(null!=c&&c!==n)throw new Error("The sessionType is not matched, can not use '".concat(c," type' sessionKey with '").concat("query"===n?"useQuery":"useMutation","'"));return[r,i,t,!0]}function b(r,n,t){return o(g(r,n,Array.isArray(t)?{variables:t}:t),3)[2]||{}}function h(r,n){var t=(0,a.createKey)(d,y());return t.payload=[function(){return r.apply(void 0,arguments)},n?{sessionType:n}:{}],t}var m=(0,a.model)((function(r){return{isFetching:r.length>0,setGlobalFetchingKey:function(n){return r.some((function(r){return r===n}))?r:r.concat(n)},removeGlobalFetchingKey:function(n){return r.some((function(r){return r===n}))?r.filter((function(r){return r!==n})):r}}})).createStore([]).static(),O=(0,c.createContext)(null);function w(r){var n=r.value,t=r.children,e=(0,c.useMemo)((function(){return n.batchUpdate?{batchUpdate:n.batchUpdate}:{}}),[]),o=(0,c.createElement)(O.Provider,{value:n},t);return(0,c.createElement)(a.ConfigProvider,{value:e},o)}function S(){return(0,c.useContext)(O)}function j(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function x(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function P(r){return Array.isArray(r)?r:[r]}function E(r,n,e){var u=P(e.strategy),i=(0,c.useRef)(u.map((function(){return{current:void 0}})));return[function(c,a){var f,s,l=a||[],v={getSessionState:function(){return r().state},variables:l,runner:function(t){var e=r(),o=e.state,u=e.setState,i=x(x({},o),{},{isFetching:!0}),a=t?t(i):i;return a.abandon||u(x(x({},a),{},{triggerType:c})),n(c,l)},triggerType:c,config:e,localCache:i,executeContext:(f=[],s=function(r){var n=f.find((function(n){return o(n,1)[0]===r}));if(Array.isArray(n))return n},{set:function(r,n){var t=s(r);t?t[1]=n:f.push([r,n])},get:function(r){var n=s(r);if(n)return n[1]}})};return function(r){return function(n){var e=[],o=n.localCache.current;return t(r).reverse().reduce((function(r,n,t){var u=o[t]||{current:void 0};return function(t){var o=x(x({},t),{},{localCache:u});return null==n?r(o):n(x(x({},o),{},{runner:function(n){return null!=n&&e.push(n),r(o)}}))}}),(function(r){return r.runner((function(r){return e.reduce((function(r,n){return r.abandon?r:n(r)}),r)}))}))(n).then((function(r){var t=n.getSessionState(),e=t.loaded,o=t.sessionLoaded,u=r.abandon,i=r.isError,c=r.isFetching,a=e||!u&&!i&&!c,f=o||!u&&!i&&!c;return x(x({},r),{},{loaded:a,sessionLoaded:f})}))}}(u)(v).then((function(n){return n.abandon||r().setState(n),n}))},u.map((function(r){if(r)return r.effect})).filter((function(r){return!!r}))]}var F={warn:function(r){var n=new Error(r);"undefined"!=typeof console&&"function"==typeof console.error&&console.error(n);try{throw n}catch(r){}}};function T(r){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},T(r)}function A(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function D(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}var C=function(r,n){return!!Object.is(r,n)||null!=r&&null!=n&&JSON.stringify(r)===JSON.stringify(n)};function K(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.executeContext,u=n.localCache,i=o.get(K);return o.set(K,!0),u.current=r,e().then((function(r){var n=u.current;return!r.isError||i||!n||r.abandon&&!t||n(r.error,r),r}))}}function k(r){var n=function(r){return(0,r.runner)()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&r(n)},n}function M(){return(new Date).getTime()}function q(r,n){var e=null==n?1:n;function u(r,n){var t=r.find((function(r){return o(r,1)[0]===n}))||[void 0,void 0];return o(t,2)[1]}return{get:function(n){return u(r,n)},set:function(n,i){if(e<1)return[];var c={data:i,lastUpdateTime:M()};if(null!=u(r,n))return r.map((function(r){var t=o(r,2),e=t[0],u=t[1];return n!==e?[e,u]:[n,c]}));var a=[].concat(t(r),[[n,c]]);return a.length>e?a.slice(a.length-e):a}}}k.success=function(r){var n=function(r){return(0,r.runner)()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&n.loaded&&(n.isError||n.isFetching||!n.sessionLoaded||r(n.data,n))},n},k.error=function(r){var n=function(r){var n=r.runner;return r.executeContext.set(K,!0),n()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&n.loaded&&n.isError&&!n.isFetching&&r(n.error,n)},n},k.failure=function(r){var n=function(r){var n=r.runner;return r.executeContext.set(K,!0),n()};return n.effect=function(n){n.isError&&!n.isFetching&&r(n.error,n)},n};var I={cache:function(r){var n=r||{},t=n.key,e=void 0===t?function(r){return JSON.stringify(r)}:t,o=n.staleTime,u=n.capacity,i=void 0===u?1:u,c=n.static;return function(r){var n=r.getSessionState,t=r.runner,u=r.variables,a=n(),f=a.cache,s=e(u),l=q(f,i).get(s);if(l&&(o&&M()<o+l.lastUpdateTime||c)){var v=D(D({},a),{},{data:l.data,variables:u,visited:!0});return Promise.resolve(v)}return t((function(r){return D(D({},r),{},l&&(!o||o<0)?{data:l.data,visited:!0}:{visited:!1})})).then((function(r){if(r.isError)return D(D({},r),{},{data:r.stale?r.stale.data:r.data});var t=e(r.variables||[]),o=n().maxCacheCapacity,u=o<i?i:o,c=q(r.cache,u).set(t,r.data);return D(D({},r),{},{cache:c,maxCacheCapacity:u})}))}},debounce:function(r){var n="number"==typeof r?r:r.duration,t="number"!=typeof r&&!!r.lead;return function(r){return t?function(){var t=r.getSessionState,e=r.runner,o=r.localCache;o.current&&o.current.id&&(clearTimeout(o.current.id),o.current.id=void 0);var u=setTimeout((function(){o.current=void 0}),n);if(null!=o.current)return o.current.id=u,o.current.promise.then((function(r){return D(D({},r),{},{abandon:!0})}));var i={id:u,version:0,resolve:function(){},promise:new Promise((function(r){r(D(D({},t()),{},{abandon:!0}))}))},c=new Promise((function(r){r(e()),i.resolve=r}));return i.promise=c,o.current=i,c}():function(){var t=r.getSessionState,e=r.runner,o=r.localCache;if(o.current){var u=o.current,i=u.id,c=u.resolve;clearTimeout(i),o.current.id=setTimeout((function(){o.current=void 0,c(e())}),n),o.current.version+=1;var a=o.current.version;return o.current.promise.then((function(r){var n;return a===(null===(n=o.current)||void 0===n?void 0:n.version)?r:D(D({},r),{},{abandon:!0})}))}var f={id:null,version:0,resolve:function(){},promise:new Promise((function(r){r(D(D({},t()),{},{abandon:!0}))}))},s=new Promise((function(r){f.id=setTimeout((function(){o.current=void 0,r(e())}),n),f.resolve=r}));f.promise=s,o.current=f;var l=f.version;return s.then((function(r){var n;return null!==(n=o.current)&&void 0!==n&&n.version||0===l?r:D(D({},r),{},{abandon:!0})}))}()}},throttle:function(r){var n=function(){if(null!=r)return"number"==typeof r?r:r.duration}();return function(r){var t=r.getSessionState,e=r.runner,o=r.localCache,u=r.variables,i=void 0===u?[]:u;o.current=o.current||{timeoutId:null,variables:void 0};var c=o.current.variables,a=o.current.timeoutId;return function(r,n){return null==r||!C(r,n)}(c,i)||null==a&&null!=n?(o.current.variables=i,null==n||(null!=a&&clearTimeout(a),o.current.timeoutId=setTimeout((function(){o.current=o.current||{},o.current.timeoutId=null}),n)),e()):new Promise((function(r){r(t())}))}},once:function(){return function(r){var n=r.runner,t=r.localCache;return t.current?t.current.then((function(r){return D(D({},r),{},{abandon:!0})})):(t.current=n().then((function(r){return r.isError&&(t.current=void 0),r})),t.current)}},error:K,failure:function(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.executeContext,u=n.localCache,i=o.get(K);return o.set(K,!0),u.current=r,e().then((function(r){var n=u.current;return!r.isError||i||!n||r.abandon&&!t||n(r.error,r),r}))}},success:function(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.localCache;return o.current=r,e().then((function(r){var n=o.current;return r.isError||!n||r.abandon&&!t||n(r.data,r),r}))}},validate:function(r){return function(n){var t=n.runner,e=n.getSessionState,o=n.variables,u=r(o);if(!u){var i=e();return new Promise((function(r){r(D(D({},i),{},{abandon:!0}))}))}return"object"===T(u)&&"function"==typeof u.then?u.then((function(r){if(!r){var n=e();return new Promise((function(r){r(D(D({},n),{},{abandon:!0}))}))}return t()}),(function(){var r=e();return new Promise((function(n){n(D(D({},r),{},{abandon:!0}))}))})):t()}},memo:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;return function(n){var t=n.runner,e=n.getSessionState;return t().then((function(n){var t=e();return("function"==typeof r?r(t.data,n.data):t.data===n.data)?D(D({},n),{},{data:t.data}):n}))}},reduce:function(r){return function(n){var t=n.runner,e=n.getSessionState;return t().then((function(n){if(n.isError||n.abandon)return n;var t=e(),o=r(t.data,n.data,[t,n]);return D(D({},n),{},{data:o})}))}},response:k};function L(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function R(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function _(r,n,u,i){var s=(0,c.useRef)(!1),l=(0,c.useRef)(null),v=(0,c.useRef)({}),p=function(r,n,e,u){var i=Array.isArray(u)?{variables:u}:u,c=o(g(r,e,i),4),f=c[0],s=c[1],l=c[2],v=c[3],p=l||{},d=p.defaultData,b=p.loaded,h=Object.prototype.hasOwnProperty.call(p,"defaultData"),m=v?h?[f,y({data:d,uniqueKey:r,loaded:!0})]:[f]:[f,y(h?{data:d,uniqueKey:n,loaded:!0}:void 0)],O=a.useSignal.apply(void 0,t(m)),w=O();if(b&&!w.state.loaded)throw new Error('This session is not loaded, you should remove "config.loaded" option.');return[w,O,p,s]}(r,v.current,n,u),d=o(p,4),b=d[0],h=d[1],O=d[2],w=d[3],S=O.variables,j=O.deps,x=O.triggerOn,P=void 0===x?["mount","update","manual"]:x,T=function(r){var n=o(r.payload||[],2)[1];return(0,c.useMemo)((function(){return{getData:function(r){return null==n||null==n.data?null:n.data[r]},setData:function(r,t){null!=n&&(n.data=R(R({},n.data||{}),{},e({},r,t)))}}}),[])}(r),A=function(r){return(0,c.useMemo)((function(){return{getFetchingKey:function(){return r.getData("fetchingKey")},getFinalFetchingKey:function(){return r.getData("finalFetchingKey")},setFetchingKey:function(n){r.setData("fetchingKey",n),null!=n&&r.setData("finalFetchingKey",n)},removeFetchingKey:function(n){n===r.getData("fetchingKey")&&r.setData("fetchingKey",void 0)}}}),[])}(T),D=function(r){return(0,c.useMemo)((function(){var n=function(){return r.getData("tunnels")||[]};return{getTunnels:n,registry:function(e){var o=n();o.some((function(r){return r.key===e.key}))||r.setData("tunnels",[].concat(t(o),[e]))},removeTunnel:function(t){var e=n();e.some((function(r){return r.key===t}))&&r.setData("tunnels",e.filter((function(r){return r.key!==t})))}}}),[])}(T),C=m.useSignal(),K=E(h,(function(r,n){var e=function(r){return function(n){var t=r(n);if(!t||"function"!=typeof t.then)throw new Error("The callback have to return a promise object.");return t.then((function(r){return{data:r,variables:n,error:void 0,isError:!1}}),(function(r){return{variables:n,error:r,isError:!0}}))}}((function(r){return w.apply(void 0,t(r))}));return e(n).then((function(n){var t=null!=A.getFinalFetchingKey()&&v.current!==A.getFinalFetchingKey();return R(R(R({},h().state),n),{},{abandon:t,isFetching:!1,triggerType:r})}))}),O),k=o(K,2),M=k[0],q=k[1],I=function(r,n){var t=A.getFetchingKey();return P.indexOf(r)<0||t&&t!==v.current?new Promise((function(r){r(R(R({},h().state),{},{abandon:!0}))})):(["mount","update"].includes(r)&&null==S&&F.warn("Trigger Session with no variables is dangerous. It means calling async function with no parameter."),"manual"===r&&null==S&&null==n&&F.warn("Trigger Session with no variables is dangerous. It means calling async function with no parameter."),A.setFetchingKey(v.current),Promise.resolve(void 0).then((function(){A.removeFetchingKey(v.current)})),M(r,n||S))},L=(0,f.usePersistFn)((function(){if(!(P.indexOf("manual")<0))if(s.current)if(i)I("manual");else{var r=v.current;D.getTunnels().filter((function(r){return r.isFullFunctional})).forEach((function(n){n.key!==r&&n.execution.trigger()})),I("manual")}else l.current={variables:S||null}})),_=(0,f.usePersistFn)((function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];if(!(P.indexOf("manual")<0))if(s.current)if(i)I("manual",n);else{var e=v.current;D.getTunnels().filter((function(r){return r.isFullFunctional})).forEach((function(r){var t;r.key!==e&&(t=r.execution).execute.apply(t,n)})),I("manual",n)}else l.current={variables:n}})),U=j||S||[];(0,c.useLayoutEffect)((function(){return D.registry({key:v.current,isFullFunctional:i,execution:{trigger:L,execute:_}}),function(){D.removeTunnel(v.current)}}),[]),(0,f.useMount)((function(){s.current=!0;var r=l.current;if(l.current=null,r&&P.indexOf("manual")>=0&&P.indexOf("mount")<0){var n=r.variables;n?_.apply(void 0,t(n)):L()}else I("mount")})),(0,f.useUpdate)((function(){I("update")}),U);var N=(0,c.useRef)(b.request);(0,c.useEffect)((function(){if(N.current!==b.request){N.current=b.request;var r=A.getFetchingKey();if(!r||r===v.current){var n=(b.request||{}).variables;n?_.apply(void 0,t(n)):L()}}}),[b.request]),(0,c.useEffect)((function(){var r=C(),n=r.setGlobalFetchingKey,t=r.removeGlobalFetchingKey;b.state.isFetching?n(v.current):t(v.current)}),[b.state.isFetching]),(0,f.useUnmount)((function(){(0,C().removeGlobalFetchingKey)(v.current),A.removeFetchingKey(v.current),l.current=null}));var z=(0,c.useRef)(b.state);return(0,c.useEffect)((function(){var r=z.current;q.forEach((function(n){n(b.state,r)})),z.current=b.state}),[b.state]),[b.state,L,_]}function U(r,n){var t=b(r,"query",n),e=t.variables,o=t.deps,u=t.manual,i=t.triggerOn,c=void 0===i?["mount","update","manual"]:i,a=t.strategy,f=!o&&!e||u?["manual"]:c,s=(S()||{}).strategy,l=P(a),v=s?s(l,"query"):l;return _(r,"query",R(R({},t),{},{triggerOn:f,strategy:v.concat((function(r){var n=r.runner,t=r.localCache;t.current=t.current||0;var e=t.current+1;return t.current=e,n().then((function(r){return t.current!==e?x(x({},r),{},{abandon:!0}):r}))}))}),!!n)}function N(r,n){var t=b(r,"mutation",n),e=t.triggerOn,o=void 0===e?["manual"]:e,u=t.strategy,i=(S()||{}).strategy,c=P(u),a=i?i(c,"mutation"):c;return _(r,"mutation",R(R({},t),{},{triggerOn:o,strategy:a.concat((function(r){var n=r.runner,t=r.localCache;if("manual"!==r.triggerType)return n();if(t.current)return t.current.then((function(r){return x(x({},r),{},{abandon:!0})}));var e=n();return t.current=e.then((function(r){return t.current=void 0,r})),e}))}),!!n)}function z(r,n){var t=o(r.payload,2)[1].sessionType,e=(0,a.useSelector)(r,(function(r){return[r.state,r.trigger,r.execute]})),u="string"==typeof n?{sessionType:n,loaded:void 0}:n||{},i=u.loaded,c=u.sessionType,s=o(e,1)[0].loaded;if(c&&t&&c!==t)throw new Error("The sessionType is not matched, can not use '".concat(t," type' sessionKey with '").concat(c," type' useSession."));if(i&&!s)throw new Error("The session is not loaded yet, check config, and set {loaded: undefined}.");var l=o(e,3),v=l[0],p=l[1],d=l[2],y=(0,f.usePersistFn)((function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];d(n)}));return[v,p,y]}function G(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];var e=(0,c.useMemo)((function(){return n.map((function(r){return Array.isArray(r)?o(r,1)[0]:r})).some((function(r){return r.isFetching}))}),n),u=m.useSelector((function(r){return r.isFetching}));return n.length?e:u}function Q(r){for(var n=arguments.length,e=new Array(n>1?n-1:0),u=1;u<n;u++)e[u-1]=arguments[u];var i=(0,c.useMemo)((function(){return e.map((function(r){var n={loaded:!1};return n.promise=new Promise((function(r,t){n.resolve=r,n.reject=t})),n}))}),[]),a=(0,c.useRef)(i);function f(r){return r.default?r:{default:r}}return(0,c.useEffect)((function(){var r=a.current;e.forEach((function(n,t){var e=Array.isArray(n)?n[0]:n,o=r[t];if(e.isError&&!o.loaded)return o.loaded=!0,void o.reject(e);e.loaded&&!o.loaded&&(o.loaded=!0,o.resolve(!0))}))}),[].concat(e)),(0,c.useMemo)((function(){var n=a.current.map((function(r){return r.promise}));return(0,c.lazy)((function(){var e=r();return Promise.all([e].concat(t(n))).then((function(r){return f(o(r,1)[0])}),(function(r){return e.then((function(n){var t=function(r){var n=r;return n.default&&"function"==typeof n.default?n.default:r}(n),e=function(r,n){return function(t){return(0,c.createElement)(r,R(R({},t),{},{error:n}))}}(t,r);return f(e)}))}))}))}),[])}function W(r,n){return z(r,"string"==typeof n?{sessionType:n,loaded:!0}:R(R({},n),{},{loaded:!0}))}function H(r,n){var t,e=Array.isArray(n)?n[0]:n,o=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly,u=(0,c.useRef)(!1);(0,c.useEffect)((function(){var n=u.current;if(u.current=!0,0!==e.round&&(!o||n)){var t=!e.isFetching&&e.isError,i=!e.isFetching&&e.sessionLoaded&&!e.isError;(t||i)&&r(e)}}),[e.round])}H.useSuccess=function(r,n){var t,e=Array.isArray(n)?n[0]:n,o=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly,u=(0,c.useRef)(!1);(0,c.useEffect)((function(){var n=u.current;(u.current=!0,0!==e.round)&&(o&&!n||!e.isFetching&&e.sessionLoaded&&!e.isError&&r(e.data,e))}),[e.round])},H.useFailure=function(r,n){var t,e=Array.isArray(n)?n[0]:n,o=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly,u=(0,c.useRef)(!1);(0,c.useEffect)((function(){var n=u.current;(u.current=!0,0!==e.round)&&(o&&!n||!e.isFetching&&e.isError&&r(e.error,e))}),[e.round])},H.success=H.useSuccess,H.error=H.useFailure;var J=a.Provider,B=a.provide,V=function(r,n){var e=n,o=function(){return r.apply(void 0,arguments)},u={createStore:function r(n){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=null!=n?n:h(o,e),a={key:i,with:function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var o=u.concat(t.map((function(r){return"function"==typeof r?r:r.key})));return r(i,o)},static:function(){var r=i.static(),n={useSession:function(){return z(r,e)},useLoadedSession:function(){return W(r,e)}};return R(R({},n),{},"query"===e?{useQuery:function(n){return U(r,n)}}:{useMutation:function(n){return N(r,n)}})},useSession:function(){return z(i,e)},useLoadedSession:function(){return W(i,e)},provide:function(){return B([i].concat(t(u)))},provideTo:function(r){return B([i].concat(t(u)))(r)},Provider:function(r){var n=r.children;return(0,c.createElement)(J,{value:[i].concat(t(u))},n)}};return R(R({},a),{},"query"===e?{useQuery:function(r){return U(i,r)}}:{useMutation:function(r){return N(i,r)}})}},i=R(R({},u),{},{useQuery:function(r){return U(o,r)}}),a=R(R({},u),{},{useMutation:function(r){return N(o,r)}}),f="query"===e?i:a;return Object.assign(o,f)}}(),i}()})); | ||
!function(r,n){"object"==typeof exports&&"object"==typeof module?module.exports=n(require("react"),require("@airma/react-state"),require("@airma/react-hooks-core")):"function"==typeof define&&define.amd?define(["react","@airma/react-state","@airma/react-hooks-core"],n):"object"==typeof exports?exports["@airma/react-effect"]=n(require("react"),require("@airma/react-state"),require("@airma/react-hooks-core")):r["@airma/react-effect"]=n(r.react,r["@airma/react-state"],r["@airma/react-hooks-core"])}(self,(function(r,n,t){return function(){var e={4933:function(r,n,t){var e=t(6291),o=t(7073),u=TypeError;r.exports=function(r){if(e(r))return r;throw u(o(r)+" is not a function")}},5822:function(r,n,t){var e=t(6802),o=t(2275),u=t(6462).f,i=e("unscopables"),c=Array.prototype;null==c[i]&&u(c,i,{configurable:!0,value:o(null)}),r.exports=function(r){c[i][r]=!0}},4905:function(r,n,t){var e=t(2366),o=String,u=TypeError;r.exports=function(r){if(e(r))return r;throw u(o(r)+" is not an object")}},5029:function(r,n,t){var e=t(678),o=t(6971),u=t(4821),i=function(r){return function(n,t,i){var c,a=e(n),f=u(a),s=o(i,f);if(r&&t!=t){for(;f>s;)if((c=a[s++])!=c)return!0}else for(;f>s;s++)if((r||s in a)&&a[s]===t)return r||s||0;return!r&&-1}};r.exports={includes:i(!0),indexOf:i(!1)}},5489:function(r,n,t){var e=t(936),o=e({}.toString),u=e("".slice);r.exports=function(r){return u(o(r),8,-1)}},6810:function(r,n,t){var e=t(8382),o=t(2466),u=t(8117),i=t(6462);r.exports=function(r,n,t){for(var c=o(n),a=i.f,f=u.f,s=0;s<c.length;s++){var l=c[s];e(r,l)||t&&e(t,l)||a(r,l,f(n,l))}}},430:function(r,n,t){var e=t(1502),o=t(6462),u=t(6034);r.exports=e?function(r,n,t){return o.f(r,n,u(1,t))}:function(r,n,t){return r[n]=t,r}},6034:function(r){r.exports=function(r,n){return{enumerable:!(1&r),configurable:!(2&r),writable:!(4&r),value:n}}},5850:function(r,n,t){var e=t(6291),o=t(6462),u=t(7192),i=t(1756);r.exports=function(r,n,t,c){c||(c={});var a=c.enumerable,f=void 0!==c.name?c.name:n;if(e(t)&&u(t,f,c),c.global)a?r[n]=t:i(n,t);else{try{c.unsafe?r[n]&&(a=!0):delete r[n]}catch(r){}a?r[n]=t:o.f(r,n,{value:t,enumerable:!1,configurable:!c.nonConfigurable,writable:!c.nonWritable})}return r}},1756:function(r,n,t){var e=t(5001),o=Object.defineProperty;r.exports=function(r,n){try{o(e,r,{value:n,configurable:!0,writable:!0})}catch(t){e[r]=n}return n}},1502:function(r,n,t){var e=t(5061);r.exports=!e((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},5178:function(r){var n="object"==typeof document&&document.all,t=void 0===n&&void 0!==n;r.exports={all:n,IS_HTMLDDA:t}},6009:function(r,n,t){var e=t(5001),o=t(2366),u=e.document,i=o(u)&&o(u.createElement);r.exports=function(r){return i?u.createElement(r):{}}},9966:function(r,n,t){var e=t(3425);r.exports=e("navigator","userAgent")||""},2821:function(r,n,t){var e,o,u=t(5001),i=t(9966),c=u.process,a=u.Deno,f=c&&c.versions||a&&a.version,s=f&&f.v8;s&&(o=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!o&&i&&(!(e=i.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=i.match(/Chrome\/(\d+)/))&&(o=+e[1]),r.exports=o},2089:function(r){r.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},9638:function(r,n,t){var e=t(5001),o=t(8117).f,u=t(430),i=t(5850),c=t(1756),a=t(6810),f=t(1092);r.exports=function(r,n){var t,s,l,v,p,d=r.target,y=r.global,g=r.stat;if(t=y?e:g?e[d]||c(d,{}):(e[d]||{}).prototype)for(s in n){if(v=n[s],l=r.dontCallGetSet?(p=o(t,s))&&p.value:t[s],!f(y?s:d+(g?".":"#")+s,r.forced)&&void 0!==l){if(typeof v==typeof l)continue;a(v,l)}(r.sham||l&&l.sham)&&u(v,"sham",!0),i(t,s,v,r)}}},5061:function(r){r.exports=function(r){try{return!!r()}catch(r){return!0}}},8483:function(r,n,t){var e=t(5061);r.exports=!e((function(){var r=function(){}.bind();return"function"!=typeof r||r.hasOwnProperty("prototype")}))},3927:function(r,n,t){var e=t(8483),o=Function.prototype.call;r.exports=e?o.bind(o):function(){return o.apply(o,arguments)}},9873:function(r,n,t){var e=t(1502),o=t(8382),u=Function.prototype,i=e&&Object.getOwnPropertyDescriptor,c=o(u,"name"),a=c&&"something"===function(){}.name,f=c&&(!e||e&&i(u,"name").configurable);r.exports={EXISTS:c,PROPER:a,CONFIGURABLE:f}},936:function(r,n,t){var e=t(8483),o=Function.prototype,u=o.call,i=e&&o.bind.bind(u,u);r.exports=e?i:function(r){return function(){return u.apply(r,arguments)}}},3425:function(r,n,t){var e=t(5001),o=t(6291);r.exports=function(r,n){return arguments.length<2?(t=e[r],o(t)?t:void 0):e[r]&&e[r][n];var t}},3815:function(r,n,t){var e=t(4933),o=t(860);r.exports=function(r,n){var t=r[n];return o(t)?void 0:e(t)}},5001:function(r,n,t){var e=function(r){return r&&r.Math==Math&&r};r.exports=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof t.g&&t.g)||function(){return this}()||Function("return this")()},8382:function(r,n,t){var e=t(936),o=t(7615),u=e({}.hasOwnProperty);r.exports=Object.hasOwn||function(r,n){return u(o(r),n)}},2499:function(r){r.exports={}},2118:function(r,n,t){var e=t(3425);r.exports=e("document","documentElement")},7788:function(r,n,t){var e=t(1502),o=t(5061),u=t(6009);r.exports=!e&&!o((function(){return 7!=Object.defineProperty(u("div"),"a",{get:function(){return 7}}).a}))},2901:function(r,n,t){var e=t(936),o=t(5061),u=t(5489),i=Object,c=e("".split);r.exports=o((function(){return!i("z").propertyIsEnumerable(0)}))?function(r){return"String"==u(r)?c(r,""):i(r)}:i},685:function(r,n,t){var e=t(936),o=t(6291),u=t(9982),i=e(Function.toString);o(u.inspectSource)||(u.inspectSource=function(r){return i(r)}),r.exports=u.inspectSource},684:function(r,n,t){var e,o,u,i=t(1899),c=t(5001),a=t(2366),f=t(430),s=t(8382),l=t(9982),v=t(1695),p=t(2499),d="Object already initialized",y=c.TypeError,g=c.WeakMap;if(i||l.state){var b=l.state||(l.state=new g);b.get=b.get,b.has=b.has,b.set=b.set,e=function(r,n){if(b.has(r))throw y(d);return n.facade=r,b.set(r,n),n},o=function(r){return b.get(r)||{}},u=function(r){return b.has(r)}}else{var h=v("state");p[h]=!0,e=function(r,n){if(s(r,h))throw y(d);return n.facade=r,f(r,h,n),n},o=function(r){return s(r,h)?r[h]:{}},u=function(r){return s(r,h)}}r.exports={set:e,get:o,has:u,enforce:function(r){return u(r)?o(r):e(r,{})},getterFor:function(r){return function(n){var t;if(!a(n)||(t=o(n)).type!==r)throw y("Incompatible receiver, "+r+" required");return t}}}},6291:function(r,n,t){var e=t(5178),o=e.all;r.exports=e.IS_HTMLDDA?function(r){return"function"==typeof r||r===o}:function(r){return"function"==typeof r}},1092:function(r,n,t){var e=t(5061),o=t(6291),u=/#|\.prototype\./,i=function(r,n){var t=a[c(r)];return t==s||t!=f&&(o(n)?e(n):!!n)},c=i.normalize=function(r){return String(r).replace(u,".").toLowerCase()},a=i.data={},f=i.NATIVE="N",s=i.POLYFILL="P";r.exports=i},860:function(r){r.exports=function(r){return null==r}},2366:function(r,n,t){var e=t(6291),o=t(5178),u=o.all;r.exports=o.IS_HTMLDDA?function(r){return"object"==typeof r?null!==r:e(r)||r===u}:function(r){return"object"==typeof r?null!==r:e(r)}},13:function(r){r.exports=!1},6448:function(r,n,t){var e=t(3425),o=t(6291),u=t(6282),i=t(7558),c=Object;r.exports=i?function(r){return"symbol"==typeof r}:function(r){var n=e("Symbol");return o(n)&&u(n.prototype,c(r))}},4821:function(r,n,t){var e=t(4479);r.exports=function(r){return e(r.length)}},7192:function(r,n,t){var e=t(5061),o=t(6291),u=t(8382),i=t(1502),c=t(9873).CONFIGURABLE,a=t(685),f=t(684),s=f.enforce,l=f.get,v=Object.defineProperty,p=i&&!e((function(){return 8!==v((function(){}),"length",{value:8}).length})),d=String(String).split("String"),y=r.exports=function(r,n,t){"Symbol("===String(n).slice(0,7)&&(n="["+String(n).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),t&&t.getter&&(n="get "+n),t&&t.setter&&(n="set "+n),(!u(r,"name")||c&&r.name!==n)&&(i?v(r,"name",{value:n,configurable:!0}):r.name=n),p&&t&&u(t,"arity")&&r.length!==t.arity&&v(r,"length",{value:t.arity});try{t&&u(t,"constructor")&&t.constructor?i&&v(r,"prototype",{writable:!1}):r.prototype&&(r.prototype=void 0)}catch(r){}var e=s(r);return u(e,"source")||(e.source=d.join("string"==typeof n?n:"")),r};Function.prototype.toString=y((function(){return o(this)&&l(this).source||a(this)}),"toString")},1367:function(r){var n=Math.ceil,t=Math.floor;r.exports=Math.trunc||function(r){var e=+r;return(e>0?t:n)(e)}},2275:function(r,n,t){var e,o=t(4905),u=t(6191),i=t(2089),c=t(2499),a=t(2118),f=t(6009),s=t(1695),l="prototype",v="script",p=s("IE_PROTO"),d=function(){},y=function(r){return"<"+v+">"+r+"</"+v+">"},g=function(r){r.write(y("")),r.close();var n=r.parentWindow.Object;return r=null,n},b=function(){try{e=new ActiveXObject("htmlfile")}catch(r){}var r,n,t;b="undefined"!=typeof document?document.domain&&e?g(e):(n=f("iframe"),t="java"+v+":",n.style.display="none",a.appendChild(n),n.src=String(t),(r=n.contentWindow.document).open(),r.write(y("document.F=Object")),r.close(),r.F):g(e);for(var o=i.length;o--;)delete b[l][i[o]];return b()};c[p]=!0,r.exports=Object.create||function(r,n){var t;return null!==r?(d[l]=o(r),t=new d,d[l]=null,t[p]=r):t=b(),void 0===n?t:u.f(t,n)}},6191:function(r,n,t){var e=t(1502),o=t(5780),u=t(6462),i=t(4905),c=t(678),a=t(9749);n.f=e&&!o?Object.defineProperties:function(r,n){i(r);for(var t,e=c(n),o=a(n),f=o.length,s=0;f>s;)u.f(r,t=o[s++],e[t]);return r}},6462:function(r,n,t){var e=t(1502),o=t(7788),u=t(5780),i=t(4905),c=t(1030),a=TypeError,f=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",v="configurable",p="writable";n.f=e?u?function(r,n,t){if(i(r),n=c(n),i(t),"function"==typeof r&&"prototype"===n&&"value"in t&&p in t&&!t[p]){var e=s(r,n);e&&e[p]&&(r[n]=t.value,t={configurable:v in t?t[v]:e[v],enumerable:l in t?t[l]:e[l],writable:!1})}return f(r,n,t)}:f:function(r,n,t){if(i(r),n=c(n),i(t),o)try{return f(r,n,t)}catch(r){}if("get"in t||"set"in t)throw a("Accessors not supported");return"value"in t&&(r[n]=t.value),r}},8117:function(r,n,t){var e=t(1502),o=t(3927),u=t(9265),i=t(6034),c=t(678),a=t(1030),f=t(8382),s=t(7788),l=Object.getOwnPropertyDescriptor;n.f=e?l:function(r,n){if(r=c(r),n=a(n),s)try{return l(r,n)}catch(r){}if(f(r,n))return i(!o(u.f,r,n),r[n])}},9219:function(r,n,t){var e=t(3855),o=t(2089).concat("length","prototype");n.f=Object.getOwnPropertyNames||function(r){return e(r,o)}},2822:function(r,n){n.f=Object.getOwnPropertySymbols},6282:function(r,n,t){var e=t(936);r.exports=e({}.isPrototypeOf)},3855:function(r,n,t){var e=t(936),o=t(8382),u=t(678),i=t(5029).indexOf,c=t(2499),a=e([].push);r.exports=function(r,n){var t,e=u(r),f=0,s=[];for(t in e)!o(c,t)&&o(e,t)&&a(s,t);for(;n.length>f;)o(e,t=n[f++])&&(~i(s,t)||a(s,t));return s}},9749:function(r,n,t){var e=t(3855),o=t(2089);r.exports=Object.keys||function(r){return e(r,o)}},9265:function(r,n){"use strict";var t={}.propertyIsEnumerable,e=Object.getOwnPropertyDescriptor,o=e&&!t.call({1:2},1);n.f=o?function(r){var n=e(this,r);return!!n&&n.enumerable}:t},379:function(r,n,t){var e=t(3927),o=t(6291),u=t(2366),i=TypeError;r.exports=function(r,n){var t,c;if("string"===n&&o(t=r.toString)&&!u(c=e(t,r)))return c;if(o(t=r.valueOf)&&!u(c=e(t,r)))return c;if("string"!==n&&o(t=r.toString)&&!u(c=e(t,r)))return c;throw i("Can't convert object to primitive value")}},2466:function(r,n,t){var e=t(3425),o=t(936),u=t(9219),i=t(2822),c=t(4905),a=o([].concat);r.exports=e("Reflect","ownKeys")||function(r){var n=u.f(c(r)),t=i.f;return t?a(n,t(r)):n}},4475:function(r,n,t){var e=t(860),o=TypeError;r.exports=function(r){if(e(r))throw o("Can't call method on "+r);return r}},1695:function(r,n,t){var e=t(6809),o=t(1050),u=e("keys");r.exports=function(r){return u[r]||(u[r]=o(r))}},9982:function(r,n,t){var e=t(5001),o=t(1756),u="__core-js_shared__",i=e[u]||o(u,{});r.exports=i},6809:function(r,n,t){var e=t(13),o=t(9982);(r.exports=function(r,n){return o[r]||(o[r]=void 0!==n?n:{})})("versions",[]).push({version:"3.26.1",mode:e?"pure":"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5947:function(r,n,t){var e=t(2821),o=t(5061);r.exports=!!Object.getOwnPropertySymbols&&!o((function(){var r=Symbol();return!String(r)||!(Object(r)instanceof Symbol)||!Symbol.sham&&e&&e<41}))},6971:function(r,n,t){var e=t(9398),o=Math.max,u=Math.min;r.exports=function(r,n){var t=e(r);return t<0?o(t+n,0):u(t,n)}},678:function(r,n,t){var e=t(2901),o=t(4475);r.exports=function(r){return e(o(r))}},9398:function(r,n,t){var e=t(1367);r.exports=function(r){var n=+r;return n!=n||0===n?0:e(n)}},4479:function(r,n,t){var e=t(9398),o=Math.min;r.exports=function(r){return r>0?o(e(r),9007199254740991):0}},7615:function(r,n,t){var e=t(4475),o=Object;r.exports=function(r){return o(e(r))}},6973:function(r,n,t){var e=t(3927),o=t(2366),u=t(6448),i=t(3815),c=t(379),a=t(6802),f=TypeError,s=a("toPrimitive");r.exports=function(r,n){if(!o(r)||u(r))return r;var t,a=i(r,s);if(a){if(void 0===n&&(n="default"),t=e(a,r,n),!o(t)||u(t))return t;throw f("Can't convert object to primitive value")}return void 0===n&&(n="number"),c(r,n)}},1030:function(r,n,t){var e=t(6973),o=t(6448);r.exports=function(r){var n=e(r,"string");return o(n)?n:n+""}},7073:function(r){var n=String;r.exports=function(r){try{return n(r)}catch(r){return"Object"}}},1050:function(r,n,t){var e=t(936),o=0,u=Math.random(),i=e(1..toString);r.exports=function(r){return"Symbol("+(void 0===r?"":r)+")_"+i(++o+u,36)}},7558:function(r,n,t){var e=t(5947);r.exports=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},5780:function(r,n,t){var e=t(1502),o=t(5061);r.exports=e&&o((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},1899:function(r,n,t){var e=t(5001),o=t(6291),u=e.WeakMap;r.exports=o(u)&&/native code/.test(String(u))},6802:function(r,n,t){var e=t(5001),o=t(6809),u=t(8382),i=t(1050),c=t(5947),a=t(7558),f=o("wks"),s=e.Symbol,l=s&&s.for,v=a?s:s&&s.withoutSetter||i;r.exports=function(r){if(!u(f,r)||!c&&"string"!=typeof f[r]){var n="Symbol."+r;c&&u(s,r)?f[r]=s[r]:f[r]=a&&l?l(n):v(n)}return f[r]}},5093:function(r,n,t){"use strict";var e=t(9638),o=t(5029).includes,u=t(5061),i=t(5822);e({target:"Array",proto:!0,forced:u((function(){return!Array(1).includes()}))},{includes:function(r){return o(this,r,arguments.length>1?arguments[1]:void 0)}}),i("includes")},309:function(r){"use strict";r.exports=t},7400:function(r){"use strict";r.exports=n},8156:function(n){"use strict";n.exports=r}},o={};function u(r){var n=o[r];if(void 0!==n)return n.exports;var t=o[r]={exports:{}};return e[r](t,t.exports,u),t.exports}u.d=function(r,n){for(var t in n)u.o(n,t)&&!u.o(r,t)&&Object.defineProperty(r,t,{enumerable:!0,get:n[t]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(r){if("object"==typeof window)return window}}(),u.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},u.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})};var i={};return function(){"use strict";function r(r,n){(null==n||n>r.length)&&(n=r.length);for(var t=0,e=new Array(n);t<n;t++)e[t]=r[t];return e}function n(n,t){if(n){if("string"==typeof n)return r(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(n,t):void 0}}function t(t){return function(n){if(Array.isArray(n))return r(n)}(t)||function(r){if("undefined"!=typeof Symbol&&null!=r[Symbol.iterator]||null!=r["@@iterator"])return Array.from(r)}(t)||n(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function e(r,n,t){return n in r?Object.defineProperty(r,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):r[n]=t,r}function o(r,t){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var t=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=t){var e,o,u=[],i=!0,c=!1;try{for(t=t.call(r);!(i=(e=t.next()).done)&&(u.push(e.value),!n||u.length!==n);i=!0);}catch(r){c=!0,o=r}finally{try{i||null==t.return||t.return()}finally{if(c)throw o}}return u}}(r,t)||n(r,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}u.r(i),u.d(i,{ConfigProvider:function(){return w},Provider:function(){return B},Strategy:function(){return M},createSessionKey:function(){return h},provide:function(){return V},session:function(){return X},useIsFetching:function(){return Q},useLazyComponent:function(){return W},useLoadedSession:function(){return H},useMutation:function(){return z},useQuery:function(){return N},useResponse:function(){return J},useSession:function(){return G}});u(5093);var c=u(8156),a=u(7400),f=u(309);function s(r,n){if(null==r)return{};var t,e,o=function(r,n){if(null==r)return{};var t,e,o={},u=Object.keys(r);for(e=0;e<u.length;e++)t=u[e],n.indexOf(t)>=0||(o[t]=r[t]);return o}(r,n);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);for(e=0;e<u.length;e++)t=u[e],n.indexOf(t)>=0||Object.prototype.propertyIsEnumerable.call(r,t)&&(o[t]=r[t])}return o}var l=["request"];function v(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function p(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?v(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):v(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function d(r){var n=r.request,t=s(r,l),e=function(t){return p(p({},t),{},{request:n,uniqueKey:r.uniqueKey})},o=function(n){return n.isFetching?p(p({},n),{},{stale:r.stale||{data:r.data}}):p(p({},n),{},{visited:r.visited?r.visited:!n.isError,round:r.round+1,stale:void 0})},u=n?n.version:0;return{state:t,request:n,setState:function(n){return o(e("function"!=typeof n?n:n(r)))},trigger:function(){return p(p({},r),{},{request:{version:u+1}})},execute:function(n){return p(p({},r),{},{request:{version:u+1,variables:n}})}}}var y=function(r){return p({data:void 0,variables:void 0,isError:!1,isFetching:!1,abandon:!1,triggerType:void 0,loaded:!1,sessionLoaded:!1,cache:[],maxCacheCapacity:1,round:0,executeVariables:void 0,visited:!1},r)};function g(r,n,t){var e=r.isFactory;if(!("function"==typeof e&&e()))return[d,r,t,!1];var u=o(r.payload,2),i=u[0],c=u[1].sessionType;if(null!=c&&c!==n)throw new Error("The sessionType is not matched, can not use '".concat(c," type' sessionKey with '").concat("query"===n?"useQuery":"useMutation","'"));return[r,i,t,!0]}function b(r,n,t){return o(g(r,n,Array.isArray(t)?{variables:t}:t),3)[2]||{}}function h(r,n){var t=(0,a.createKey)(d,y());return t.payload=[function(){return r.apply(void 0,arguments)},n?{sessionType:n}:{}],t}var m=(0,a.model)((function(r){return{isFetching:r.length>0,setGlobalFetchingKey:function(n){return r.some((function(r){return r===n}))?r:r.concat(n)},removeGlobalFetchingKey:function(n){return r.some((function(r){return r===n}))?r.filter((function(r){return r!==n})):r}}})).createStore([]).static(),O=(0,c.createContext)(null);function w(r){var n=r.value,t=r.children,e=(0,c.useMemo)((function(){return n.batchUpdate?{batchUpdate:n.batchUpdate}:{}}),[]),o=(0,c.createElement)(O.Provider,{value:n},t);return(0,c.createElement)(a.ConfigProvider,{value:e},o)}function S(){return(0,c.useContext)(O)}function j(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function x(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?j(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):j(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function P(r){return Array.isArray(r)?r:[r]}function E(r,n,e){var u=P(e.strategy),i=(0,c.useRef)(u.map((function(){return{current:void 0}})));return[function(c,a){var f,s,l=a||[],v={getSessionState:function(){return r().state},variables:l,runner:function(t){var e=r(),o=e.state,u=e.setState,i=x(x({},o),{},{isFetching:!0}),a=t?t(i):i;return a.abandon||u(x(x({},a),{},{triggerType:c})),n(c,l)},triggerType:c,config:e,localCache:i,executeContext:(f=[],s=function(r){var n=f.find((function(n){return o(n,1)[0]===r}));if(Array.isArray(n))return n},{set:function(r,n){var t=s(r);t?t[1]=n:f.push([r,n])},get:function(r){var n=s(r);if(n)return n[1]}})};return function(r){return function(n){var e=[],o=n.localCache.current;return t(r).reverse().reduce((function(r,n,t){var u=o[t]||{current:void 0};return function(t){var o=x(x({},t),{},{localCache:u});return null==n?r(o):n(x(x({},o),{},{runner:function(n){return null!=n&&e.push(n),r(o)}}))}}),(function(r){return r.runner((function(r){return e.reduce((function(r,n){return r.abandon?r:n(r)}),r)}))}))(n).then((function(r){var t=n.getSessionState(),e=t.loaded,o=t.sessionLoaded,u=r.abandon,i=r.isError,c=r.isFetching,a=e||!u&&!i&&!c,f=o||!u&&!i&&!c;return x(x({},r),{},{loaded:a,sessionLoaded:f})}))}}(u)(v).then((function(n){return n.abandon||r().setState(n),n}))},u.map((function(r){if(r)return r.effect})).filter((function(r){return!!r}))]}var F={warn:function(r){var n=new Error(r);"undefined"!=typeof console&&"function"==typeof console.error&&console.error(n);try{throw n}catch(r){}}};function T(r){return T="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},T(r)}function A(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function D(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?A(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):A(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}var C=function(r,n){return!!Object.is(r,n)||null!=r&&null!=n&&JSON.stringify(r)===JSON.stringify(n)};function K(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.executeContext,u=n.localCache,i=o.get(K);return o.set(K,!0),u.current=r,e().then((function(r){var n=u.current;return!r.isError||i||!n||r.abandon&&!t||n(r.error,r),r}))}}function k(r){var n=function(r){return(0,r.runner)()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&r(n)},n}function q(){return(new Date).getTime()}function I(r,n){var e=null==n?1:n;function u(r,n){var t=r.find((function(r){return o(r,1)[0]===n}))||[void 0,void 0];return o(t,2)[1]}return{get:function(n){return u(r,n)},set:function(n,i){if(e<1)return[];var c={data:i,lastUpdateTime:q()};if(null!=u(r,n))return r.map((function(r){var t=o(r,2),e=t[0],u=t[1];return n!==e?[e,u]:[n,c]}));var a=[].concat(t(r),[[n,c]]);return a.length>e?a.slice(a.length-e):a}}}k.success=function(r){var n=function(r){return(0,r.runner)()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&n.loaded&&(n.isError||n.isFetching||!n.sessionLoaded||r(n.data,n))},n},k.error=function(r){var n=function(r){var n=r.runner;return r.executeContext.set(K,!0),n()};return n.effect=function(n,t){0!==n.round&&n.round!==t.round&&n.loaded&&n.isError&&!n.isFetching&&r(n.error,n)},n},k.failure=function(r){var n=function(r){var n=r.runner;return r.executeContext.set(K,!0),n()};return n.effect=function(n){n.isError&&!n.isFetching&&r(n.error,n)},n};var M={cache:function(r){var n=r||{},t=n.key,e=void 0===t?function(r){return JSON.stringify(r)}:t,o=n.staleTime,u=n.capacity,i=void 0===u?1:u,c=n.static;return function(r){var n=r.getSessionState,t=r.runner,u=r.variables,a=n(),f=a.cache,s=e(u),l=I(f,i).get(s);if(l&&(o&&q()<o+l.lastUpdateTime||c)){var v=D(D({},a),{},{data:l.data,variables:u,visited:!0});return Promise.resolve(v)}return t((function(r){return D(D({},r),{},l&&(!o||o<0)?{data:l.data,visited:!0}:{visited:!1})})).then((function(r){if(r.isError)return D(D({},r),{},{data:r.stale?r.stale.data:r.data});var t=e(r.variables||[]),o=n().maxCacheCapacity,u=o<i?i:o,c=I(r.cache,u).set(t,r.data);return D(D({},r),{},{cache:c,maxCacheCapacity:u})}))}},debounce:function(r){var n="number"==typeof r?r:r.duration,t="number"!=typeof r&&!!r.lead;return function(r){return t?function(){var t=r.getSessionState,e=r.runner,o=r.localCache;o.current&&o.current.id&&(clearTimeout(o.current.id),o.current.id=void 0);var u=setTimeout((function(){o.current=void 0}),n);if(null!=o.current)return o.current.id=u,o.current.promise.then((function(r){return D(D({},r),{},{abandon:!0})}));var i={id:u,version:0,resolve:function(){},promise:new Promise((function(r){r(D(D({},t()),{},{abandon:!0}))}))},c=new Promise((function(r){r(e()),i.resolve=r}));return i.promise=c,o.current=i,c}():function(){var t=r.getSessionState,e=r.runner,o=r.localCache;if(o.current){var u=o.current,i=u.id,c=u.resolve;clearTimeout(i),o.current.id=setTimeout((function(){o.current=void 0,c(e())}),n),o.current.version+=1;var a=o.current.version;return o.current.promise.then((function(r){var n;return a===(null===(n=o.current)||void 0===n?void 0:n.version)?r:D(D({},r),{},{abandon:!0})}))}var f={id:null,version:0,resolve:function(){},promise:new Promise((function(r){r(D(D({},t()),{},{abandon:!0}))}))},s=new Promise((function(r){f.id=setTimeout((function(){o.current=void 0,r(e())}),n),f.resolve=r}));f.promise=s,o.current=f;var l=f.version;return s.then((function(r){var n;return null!==(n=o.current)&&void 0!==n&&n.version||0===l?r:D(D({},r),{},{abandon:!0})}))}()}},throttle:function(r){var n=function(){if(null!=r)return"number"==typeof r?r:r.duration}();return function(r){var t=r.getSessionState,e=r.runner,o=r.localCache,u=r.variables,i=void 0===u?[]:u;o.current=o.current||{timeoutId:null,variables:void 0};var c=o.current.variables,a=o.current.timeoutId;return function(r,n){return null==r||!C(r,n)}(c,i)||null==a&&null!=n?(o.current.variables=i,null==n||(null!=a&&clearTimeout(a),o.current.timeoutId=setTimeout((function(){o.current=o.current||{},o.current.timeoutId=null}),n)),e()):new Promise((function(r){r(t())}))}},once:function(){return function(r){var n=r.runner,t=r.localCache;return t.current?t.current.then((function(r){return D(D({},r),{},{abandon:!0})})):(t.current=n().then((function(r){return r.isError&&(t.current=void 0),r})),t.current)}},error:K,failure:function(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.executeContext,u=n.localCache,i=o.get(K);return o.set(K,!0),u.current=r,e().then((function(r){var n=u.current;return!r.isError||i||!n||r.abandon&&!t||n(r.error,r),r}))}},success:function(r,n){var t=(n||{}).withAbandoned;return function(n){var e=n.runner,o=n.localCache;return o.current=r,e().then((function(r){var n=o.current;return r.isError||!n||r.abandon&&!t||n(r.data,r),r}))}},validate:function(r){return function(n){var t=n.runner,e=n.getSessionState,o=n.variables,u=r(o);if(!u){var i=e();return new Promise((function(r){r(D(D({},i),{},{abandon:!0}))}))}return"object"===T(u)&&"function"==typeof u.then?u.then((function(r){if(!r){var n=e();return new Promise((function(r){r(D(D({},n),{},{abandon:!0}))}))}return t()}),(function(){var r=e();return new Promise((function(n){n(D(D({},r),{},{abandon:!0}))}))})):t()}},memo:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:C;return function(n){var t=n.runner,e=n.getSessionState;return t().then((function(n){var t=e();return("function"==typeof r?r(t.data,n.data):t.data===n.data)?D(D({},n),{},{data:t.data}):n}))}},reduce:function(r){return function(n){var t=n.runner,e=n.getSessionState;return t().then((function(n){if(n.isError||n.abandon)return n;var t=e(),o=r(t.data,n.data,[t,n]);return D(D({},n),{},{data:o})}))}},response:k};function L(r,n){var t=Object.keys(r);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(r);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(r,n).enumerable}))),t.push.apply(t,e)}return t}function R(r){for(var n=1;n<arguments.length;n++){var t=null!=arguments[n]?arguments[n]:{};n%2?L(Object(t),!0).forEach((function(n){e(r,n,t[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(t)):L(Object(t)).forEach((function(n){Object.defineProperty(r,n,Object.getOwnPropertyDescriptor(t,n))}))}return r}function _(r){var n=(0,c.useRef)(null);return null==n.current?(n.current={result:r()},n.current.result):n.current.result}function U(r,n,u,i){var s=(0,c.useRef)(!1),l=(0,c.useRef)(null),v=(0,c.useRef)({}),p=function(r,n,e,u){var i=Array.isArray(u)?{variables:u}:u,c=o(g(r,e,i),4),f=c[0],s=c[1],l=c[2],v=c[3],p=l||{},d=p.defaultData,b=p.loaded,h=Object.prototype.hasOwnProperty.call(p,"defaultData"),m=v?h?[f,y({data:d,uniqueKey:r,loaded:!0})]:[f]:[f,y(h?{data:d,uniqueKey:n,loaded:!0}:void 0)],O=a.useSignal.apply(void 0,t(m)),w=O();if(b&&!w.state.loaded)throw new Error('This session is not loaded, you should remove "config.loaded" option.');return[w,O,p,s]}(r,v.current,n,u),d=o(p,4),b=d[0],h=d[1],O=d[2],w=d[3],S=O.variables,j=O.deps,x=O.triggerOn,P=void 0===x?["mount","update","manual"]:x,T=function(r){var n=o(r.payload||[],2)[1];return{getData:function(r){return null==n||null==n.data?null:n.data[r]},setData:function(r,t){null!=n&&(n.data=R(R({},n.data||{}),{},e({},r,t)))}}}(r),A=function(r){return{getFetchingKey:function(){return r.getData("fetchingKey")},getFinalFetchingKey:function(){return r.getData("finalFetchingKey")},setFetchingKey:function(n){r.setData("fetchingKey",n),null!=n&&r.setData("finalFetchingKey",n)},removeFetchingKey:function(n){n===r.getData("fetchingKey")&&r.setData("fetchingKey",void 0)}}}(T),D=function(r){var n=function(){return r.getData("tunnels")||[]};return{getTunnels:n,registry:function(e){var o=n();o.some((function(r){return r.key===e.key}))||r.setData("tunnels",[].concat(t(o),[e]))},removeTunnel:function(t){var e=n();e.some((function(r){return r.key===t}))&&r.setData("tunnels",e.filter((function(r){return r.key!==t})))}}}(T),C=m.useSignal(),K=E(h,(function(r,n){var e=function(r){return function(n){var t=r(n);if(!t||"function"!=typeof t.then)throw new Error("The callback have to return a promise object.");return t.then((function(r){return{data:r,variables:n,error:void 0,isError:!1}}),(function(r){return{variables:n,error:r,isError:!0}}))}}((function(r){return w.apply(void 0,t(r))}));return e(n).then((function(n){var t=null!=A.getFinalFetchingKey()&&v.current!==A.getFinalFetchingKey();return R(R(R({},h().state),n),{},{abandon:t,isFetching:!1,triggerType:r})}))}),O),k=o(K,2),q=k[0],I=k[1],M=function(r,n){var t=A.getFetchingKey();return P.indexOf(r)<0||t&&t!==v.current?new Promise((function(r){r(R(R({},h().state),{},{abandon:!0}))})):(["mount","update"].includes(r)&&null==S&&F.warn("Trigger Session with no variables is dangerous. It means calling async function with no parameter."),"manual"===r&&null==S&&null==n&&F.warn("Trigger Session with no variables is dangerous. It means calling async function with no parameter."),A.setFetchingKey(v.current),Promise.resolve(void 0).then((function(){A.removeFetchingKey(v.current)})),q(r,n||S))},L=(0,f.usePersistFn)((function(){if(!(P.indexOf("manual")<0))if(s.current)if(i)M("manual");else{var r=v.current;D.getTunnels().filter((function(r){return r.isFullFunctional})).forEach((function(n){n.key!==r&&n.execution.trigger()})),M("manual")}else l.current={variables:S||null}})),_=(0,f.usePersistFn)((function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];if(!(P.indexOf("manual")<0))if(s.current)if(i)M("manual",n);else{var e=v.current;D.getTunnels().filter((function(r){return r.isFullFunctional})).forEach((function(r){var t;r.key!==e&&(t=r.execution).execute.apply(t,n)})),M("manual",n)}else l.current={variables:n}})),U=j||S||[];(0,c.useLayoutEffect)((function(){return D.registry({key:v.current,isFullFunctional:i,execution:{trigger:L,execute:_}}),function(){D.removeTunnel(v.current)}}),[]),(0,f.useMount)((function(){s.current=!0;var r=l.current;if(l.current=null,r&&P.indexOf("manual")>=0&&P.indexOf("mount")<0){var n=r.variables;n?_.apply(void 0,t(n)):L()}else M("mount")})),(0,f.useUpdate)((function(){M("update")}),U);var N=(0,c.useRef)(b.request);(0,c.useEffect)((function(){if(N.current!==b.request){N.current=b.request;var r=A.getFetchingKey();if(!r||r===v.current){var n=(b.request||{}).variables;n?_.apply(void 0,t(n)):L()}}}),[b.request]),(0,c.useEffect)((function(){var r=C(),n=r.setGlobalFetchingKey,t=r.removeGlobalFetchingKey;b.state.isFetching?n(v.current):t(v.current)}),[b.state.isFetching]),(0,f.useUnmount)((function(){(0,C().removeGlobalFetchingKey)(v.current),A.removeFetchingKey(v.current),l.current=null}));var z=(0,c.useRef)(b.state);return(0,c.useEffect)((function(){var r=z.current;I.forEach((function(n){n(b.state,r)})),z.current=b.state}),[b.state]),[b.state,L,_]}function N(r,n){var t=b(r,"query",n),e=t.variables,o=t.deps,u=t.manual,i=t.triggerOn,c=void 0===i?["mount","update","manual"]:i,a=t.strategy,f=!o&&!e||u?["manual"]:c,s=(S()||{}).strategy,l=P(a),v=s?s(l,"query"):l;return U(r,"query",R(R({},t),{},{triggerOn:f,strategy:v.concat((function(r){var n=r.runner,t=r.localCache;t.current=t.current||0;var e=t.current+1;return t.current=e,n().then((function(r){return t.current!==e?x(x({},r),{},{abandon:!0}):r}))}))}),!!n)}function z(r,n){var t=b(r,"mutation",n),e=t.triggerOn,o=void 0===e?["manual"]:e,u=t.strategy,i=(S()||{}).strategy,c=P(u),a=i?i(c,"mutation"):c;return U(r,"mutation",R(R({},t),{},{triggerOn:o,strategy:a.concat((function(r){var n=r.runner,t=r.localCache;if("manual"!==r.triggerType)return n();if(t.current)return t.current.then((function(r){return x(x({},r),{},{abandon:!0})}));var e=n();return t.current=e.then((function(r){return t.current=void 0,r})),e}))}),!!n)}function G(r,n){var t=o(r.payload,2)[1].sessionType,e=(0,a.useSelector)(r,(function(r){return[r.state,r.trigger,r.execute]})),u="string"==typeof n?{sessionType:n,loaded:void 0}:n||{},i=u.loaded,c=u.sessionType,s=o(e,1)[0].loaded;if(c&&t&&c!==t)throw new Error("The sessionType is not matched, can not use '".concat(t," type' sessionKey with '").concat(c," type' useSession."));if(i&&!s)throw new Error("The session is not loaded yet, check config, and set {loaded: undefined}.");var l=o(e,3),v=l[0],p=l[1],d=l[2],y=(0,f.usePersistFn)((function(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];d(n)}));return[v,p,y]}function Q(){for(var r=arguments.length,n=new Array(r),t=0;t<r;t++)n[t]=arguments[t];var e=(0,c.useMemo)((function(){return n.map((function(r){return Array.isArray(r)?o(r,1)[0]:r})).some((function(r){return r.isFetching}))}),n),u=m.useSelector((function(r){return r.isFetching}));return n.length?e:u}function W(r){for(var n=arguments.length,e=new Array(n>1?n-1:0),u=1;u<n;u++)e[u-1]=arguments[u];var i=(0,c.useMemo)((function(){return e.map((function(r){var n={loaded:!1};return n.promise=new Promise((function(r,t){n.resolve=r,n.reject=t})),n}))}),[]),a=(0,c.useRef)(i);function f(r){return r.default?r:{default:r}}return(0,c.useEffect)((function(){var r=a.current;e.forEach((function(n,t){var e=Array.isArray(n)?n[0]:n,o=r[t];if(e.isError&&!o.loaded)return o.loaded=!0,void o.reject(e);e.loaded&&!o.loaded&&(o.loaded=!0,o.resolve(!0))}))}),[].concat(e)),(0,c.useMemo)((function(){var n=a.current.map((function(r){return r.promise}));return(0,c.lazy)((function(){var e=r();return Promise.all([e].concat(t(n))).then((function(r){return f(o(r,1)[0])}),(function(r){return e.then((function(n){var t=function(r){var n=r;return n.default&&"function"==typeof n.default?n.default:r}(n),e=function(r,n){return function(t){return(0,c.createElement)(r,R(R({},t),{},{error:n}))}}(t,r);return f(e)}))}))}))}),[])}function H(r,n){return G(r,"string"==typeof n?{sessionType:n,loaded:!0}:R(R({},n),{},{loaded:!0}))}function J(r,n){var t,e=Array.isArray(n)?n[0]:n,o=_((function(){return e.round})),u=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly;(0,c.useEffect)((function(){if(0!==e.round&&(!u||o!==e.round)){var n=!e.isFetching&&e.isError,t=!e.isFetching&&e.sessionLoaded&&!e.isError;(n||t)&&r(e)}}),[e.round])}J.useSuccess=function(r,n){var t,e=Array.isArray(n)?n[0]:n,o=_((function(){return e.round})),u=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly;(0,c.useEffect)((function(){0!==e.round&&(u&&o===e.round||!e.isFetching&&e.sessionLoaded&&!e.isError&&r(e.data,e))}),[e.round])},J.useFailure=function(r,n){var t,e=Array.isArray(n)?n[0]:n,o=_((function(){return e.round})),u=(null!==(t=Array.isArray(n)?n[1]:void 0)&&void 0!==t?t:{}).watchOnly;(0,c.useEffect)((function(){0!==e.round&&(u&&o===e.round||!e.isFetching&&e.isError&&r(e.error,e))}),[e.round])};var B=a.Provider,V=a.provide,X=function(r,n){var e=n,o=function(){return r.apply(void 0,arguments)},u={createStore:function r(n){var u=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],i=null!=n?n:h(o,e),a={key:i,with:function(){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];var o=u.concat(t.map((function(r){return"function"==typeof r?r:r.key})));return r(i,o)},static:function(){var r=i.static(),n={useSession:function(){return G(r,e)},useLoadedSession:function(){return H(r,e)}};return R(R({},n),{},"query"===e?{useQuery:function(n){return N(r,n)}}:{useMutation:function(n){return z(r,n)}})},useSession:function(){return G(i,e)},useLoadedSession:function(){return H(i,e)},provide:function(){return V([i].concat(t(u)))},provideTo:function(r){return V([i].concat(t(u)))(r)},Provider:function(r){var n=r.children;return(0,c.createElement)(B,{value:[i].concat(t(u))},n)}};return R(R({},a),{},"query"===e?{useQuery:function(r){return N(i,r)}}:{useMutation:function(r){return z(i,r)}})}},i=R(R({},u),{},{useQuery:function(r){return N(o,r)}}),a=R(R({},u),{},{useMutation:function(r){return z(o,r)}}),f="query"===e?i:a;return Object.assign(o,f)}}(),i}()})); |
@@ -315,23 +315,2 @@ import { ModelKeys, ModelKey, AirReducer } from '@airma/react-state'; | ||
): void; | ||
/** | ||
* @deprecated | ||
* @param process | ||
* @param sessionState | ||
*/ | ||
success: <T extends SessionState>( | ||
process: ( | ||
data: SuccessStateOf<T>['data'], | ||
sessionState: SuccessStateOf<T> | ||
) => any, | ||
sessionState: T | [T, ResponseOption?] | ||
) => void; | ||
/** | ||
* @deprecated | ||
* @param process | ||
* @param sessionState | ||
*/ | ||
error: <T extends SessionState>( | ||
process: (error: unknown, sessionState: ImportantVariable<T>) => any, | ||
sessionState: T | [T, ResponseOption?] | ||
) => void; | ||
useSuccess: <T extends SessionState>( | ||
@@ -338,0 +317,0 @@ process: ( |
{ | ||
"private": false, | ||
"name": "@airma/react-effect", | ||
"version": "18.5.1", | ||
"version": "18.5.2", | ||
"description": "This is a react async state management tool", | ||
@@ -29,3 +29,3 @@ "license": "MIT", | ||
"@airma/react-hooks-core": "^18.3.0", | ||
"@airma/react-state": ">=18.5.0", | ||
"@airma/react-state": ">=18.5.2", | ||
"react": ">=16.8.0" | ||
@@ -32,0 +32,0 @@ }, |
68856
482
Updated@airma/react-state@>=18.5.2