@fluid-topics/ft-wc-utils 0.2.21 → 0.2.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/globals.min.js +1 -1
- package/build/redux.d.ts +5 -2
- package/build/redux.js +22 -7
- package/package.json +2 -2
package/build/globals.min.js
CHANGED
|
@@ -137,4 +137,4 @@ var ft;const ht=null!=(null===(ft=window.HTMLSlotElement)||void 0===ft?void 0:ft
|
|
|
137
137
|
-ms-user-select: none;
|
|
138
138
|
user-select: none;
|
|
139
139
|
}
|
|
140
|
-
`;function Wt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(t){return!!t&&!!t[Ne]}function It(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Me}(t)||Array.isArray(t)||!!t[Re]||!!t.constructor[Re]||Jt(t)||Xt(t))}function Kt(t,e,n){void 0===n&&(n=!1),0===Vt(t)?(n?Object.keys:_e)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function Vt(t){var e=t[Ne];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Jt(t)?2:Xt(t)?3:0}function zt(t,e){return 2===Vt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function qt(t,e,n){var r=Vt(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function Zt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Jt(t){return Se&&t instanceof Map}function Xt(t){return Ee&&t instanceof Set}function Gt(t){return t.o||t.t}function Qt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ae(t);delete e[Ne];for(var n=_e(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Yt(t,e){return void 0===e&&(e=!1),ee(t)||Ht(t)||!It(t)||(Vt(t)>1&&(t.set=t.add=t.clear=t.delete=te),Object.freeze(t),e&&Kt(t,(function(t,e){return Yt(e,!0)}),!0)),t}function te(){Wt(2)}function ee(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ne(t){var e=$e[t];return e||Wt(18,t),e}function re(){return ge}function ie(t,e){e&&(ne("Patches"),t.u=[],t.s=[],t.v=e)}function oe(t){se(t),t.p.forEach(ue),t.p=null}function se(t){t===ge&&(ge=t.l)}function ce(t){return ge={p:[],l:ge,h:t,m:!0,_:0}}function ue(t){var e=t[Ne];0===e.i||1===e.i?e.j():e.O=!0}function ae(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||ne("ES5").S(e,t,r),r?(n[Ne].P&&(oe(e),Wt(4)),It(t)&&(t=le(e,t),e.l||he(e,t)),e.u&&ne("Patches").M(n[Ne].t,t,e.u,e.s)):t=le(e,n,[]),oe(e),e.u&&e.v(e.u,e.s),t!==Ce?t:void 0}function le(t,e,n){if(ee(e))return e;var r=e[Ne];if(!r)return Kt(e,(function(i,o){return fe(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return he(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=Qt(r.k):r.o;Kt(3===r.i?new Set(i):i,(function(e,o){return fe(t,r,i,e,o,n)})),he(t,i,!1),n&&t.u&&ne("Patches").R(r,n,t.u,t.s)}return r.o}function fe(t,e,n,r,i,o){if(Ht(i)){var s=le(t,i,o&&e&&3!==e.i&&!zt(e.D,r)?o.concat(r):void 0);if(qt(n,r,s),!Ht(s))return;t.m=!1}if(It(i)&&!ee(i)){if(!t.h.F&&t._<1)return;le(t,i),e&&e.A.l||he(t,i)}}function he(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&Yt(e,n)}function de(t,e){var n=t[Ne];return(n?Gt(n):t)[e]}function ve(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function pe(t){t.P||(t.P=!0,t.l&&pe(t.l))}function be(t){t.o||(t.o=Qt(t.t))}function ye(t,e,n){var r=Jt(e)?ne("MapSet").N(e,n):Xt(e)?ne("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:re(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=Ue;n&&(i=[r],o=Pe);var s=Proxy.revocable(i,o),c=s.revoke,u=s.proxy;return r.k=u,r.j=c,u}(e,n):ne("ES5").J(e,n);return(n?n.A:re()).p.push(r),r}function me(t){return Ht(t)||Wt(22,t),function t(e){if(!It(e))return e;var n,r=e[Ne],i=Vt(e);if(r){if(!r.P&&(r.i<4||!ne("ES5").K(r)))return r.t;r.I=!0,n=we(e,i),r.I=!1}else n=we(e,i);return Kt(n,(function(e,i){r&&function(t,e){return 2===Vt(t)?t.get(e):t[e]}(r.t,e)===i||qt(n,e,t(i))})),3===i?new Set(n):n}(t)}function we(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Qt(t)}var Oe,ge,xe="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Se="undefined"!=typeof Map,Ee="undefined"!=typeof Set,je="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ce=xe?Symbol.for("immer-nothing"):((Oe={})["immer-nothing"]=!0,Oe),Re=xe?Symbol.for("immer-draftable"):"__$immer_draftable",Ne=xe?Symbol.for("immer-state"):"__$immer_state",Me=""+Object.prototype.constructor,_e="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ae=Object.getOwnPropertyDescriptors||function(t){var e={};return _e(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},$e={},Ue={get:function(t,e){if(e===Ne)return t;var n=Gt(t);if(!zt(n,e))return function(t,e,n){var r,i=ve(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!It(r)?r:r===de(t.t,e)?(be(t),t.o[e]=ye(t.A.h,r,t)):r},has:function(t,e){return e in Gt(t)},ownKeys:function(t){return Reflect.ownKeys(Gt(t))},set:function(t,e,n){var r=ve(Gt(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=de(Gt(t),e),o=null==i?void 0:i[Ne];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(Zt(n,i)&&(void 0!==n||zt(t.t,e)))return!0;be(t),pe(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==de(t.t,e)||e in t.t?(t.D[e]=!1,be(t),pe(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Gt(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Wt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Wt(12)}},Pe={};Kt(Ue,(function(t,e){Pe[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Pe.deleteProperty=function(t,e){return Pe.set.call(this,t,e,void 0)},Pe.set=function(t,e,n){return Ue.set.call(this,t[0],e,n,t[0])};var ke=function(){function t(t){var e=this;this.g=je,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Wt(6),void 0!==r&&"function"!=typeof r&&Wt(7),It(t)){var c=ce(e),u=ye(e,t,void 0),a=!0;try{s=n(u),a=!1}finally{a?oe(c):se(c)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ie(c,r),ae(t,c)}),(function(t){throw oe(c),t})):(ie(c,r),ae(s,c))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===Ce&&(s=void 0),e.F&&Yt(s,!0),r){var l=[],f=[];ne("Patches").M(t,s,l,f),r(l,f)}return s}Wt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){It(t)||Wt(8),Ht(t)&&(t=me(t));var e=ce(this),n=ye(this,t,void 0);return n[Ne].C=!0,se(e),n},e.finishDraft=function(t,e){var n=(t&&t[Ne]).A;return ie(n,e),ae(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!je&&Wt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=ne("Patches").$;return Ht(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Fe=new ke;function Le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Te(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function De(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(n),!0).forEach((function(e){Le(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Be(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Fe.produce,Fe.produceWithPatches.bind(Fe),Fe.setAutoFreeze.bind(Fe),Fe.setUseProxies.bind(Fe),Fe.applyPatches.bind(Fe),Fe.createDraft.bind(Fe),Fe.finishDraft.bind(Fe);var We="function"==typeof Symbol&&Symbol.observable||"@@observable",He=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ie={INIT:"@@redux/INIT"+He(),REPLACE:"@@redux/REPLACE"+He(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+He()}};function Ke(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ve(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Be(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Be(1));return n(Ve)(t,e)}if("function"!=typeof t)throw new Error(Be(2));var i=t,o=e,s=[],c=s,u=!1;function a(){c===s&&(c=s.slice())}function l(){if(u)throw new Error(Be(3));return o}function f(t){if("function"!=typeof t)throw new Error(Be(4));if(u)throw new Error(Be(5));var e=!0;return a(),c.push(t),function(){if(e){if(u)throw new Error(Be(6));e=!1,a();var n=c.indexOf(t);c.splice(n,1),s=null}}}function h(t){if(!Ke(t))throw new Error(Be(7));if(void 0===t.type)throw new Error(Be(8));if(u)throw new Error(Be(9));try{u=!0,o=i(o,t)}finally{u=!1}for(var e=s=c,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(Be(10));i=t,h({type:Ie.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Be(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[We]=function(){return this},t}return h({type:Ie.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[We]=v,r}function ze(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Ie.INIT}))throw new Error(Be(12));if(void 0===n(void 0,{type:Ie.PROBE_UNKNOWN_ACTION()}))throw new Error(Be(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},c=0;c<s.length;c++){var u=s[c],a=n[u],l=t[u],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Be(14));i[u]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function qe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ze(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Be(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=qe.apply(void 0,o)(n.dispatch),De(De({},n),{},{dispatch:r})}}}function Je(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var Xe=Je();Xe.withExtraArgument=Je;var Ge,Qe,Ye,tn,en=Xe,nn=(Ge=function(t,e){return Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ge(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ge(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),rn=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},on=Object.defineProperty,sn=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,an=function(t,e,n){return e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},ln="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?qe:qe.apply(null,arguments)},fn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return nn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,rn([void 0],t[0].concat(this)))):new(e.bind.apply(e,rn([void 0],t.concat(this))))},e}(Array);function hn(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new fn;return n&&(function(t){return"boolean"==typeof t}(n)?r.push(en):r.push(en.withExtraArgument(n.extraArgument))),r}(t)}}function dn(t){var e,n=hn(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,c=void 0===s?n():s,u=r.devTools,a=void 0===u||u,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=ze(o)}var v=c;"function"==typeof v&&(v=v(n));var p=Ze.apply(void 0,v),b=qe;a&&(b=ln(function(t,e){for(var n in e||(e={}))cn.call(e,n)&&an(t,n,e[n]);if(sn)for(var r=0,i=sn(e);r<i.length;r++)n=i[r],un.call(e,n)&&an(t,n,e[n]);return t}({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=rn([p],d):"function"==typeof d&&(y=d(y)),Ve(e,f,b.apply(void 0,y))}!function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Ne];return Ue.get(e,t)},set:function(e){var n=this[Ne];Ue.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Ne];if(!i.P)switch(i.i){case 5:r(i)&&pe(i);break;case 4:n(i)&&pe(i)}}}function n(t){for(var e=t.t,n=t.k,r=_e(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Ne){var s=e[o];if(void 0===s&&!zt(e,o))return!0;var c=n[o],u=c&&c[Ne];if(u?u.t!==s:!Zt(c,s))return!0}}var a=!!e[Ne];return r.length!==_e(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){$e[t]||($e[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=Ae(n);delete o[Ne];for(var s=_e(o),c=0;c<s.length;c++){var u=s[c];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:re(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Ne,{value:o,writable:!0}),i},S:function(t,n,i){i?Ht(n)&&n[Ne].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Ne];if(n){var i=n.t,o=n.k,s=n.D,c=n.i;if(4===c)Kt(o,(function(e){e!==Ne&&(void 0!==i[e]||zt(i,e)?s[e]||t(o[e]):(s[e]=!0,pe(n)))})),Kt(i,(function(t){void 0!==o[t]||zt(o,t)||(s[t]=!1,pe(n))}));else if(5===c){if(r(n)&&(pe(n),s.length=!0),o.length<i.length)for(var u=o.length;u<i.length;u++)s[u]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();const vn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(tn=null===(Ye=null===(Qe=window.safari)||void 0===Qe?void 0:Qe.pushNotification)||void 0===Ye?void 0:Ye.toString())&&void 0!==tn?tn:"");var pn=Object.freeze({__proto__:null,isSafari:vn,Debouncer:class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:kt,designSystemVariables:Lt,FtCssVariable:Ft,setVariable:function(t,e){return o(`${t.name}: ${e}`)},FtLitElement:Dt,noTextSelect:Bt,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>(n,r)=>{n.constructor.createProperty(r,{attribute:!1,hasChanged:e});const i=n;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(r,t)},FtLitElementRedux:class extends Dt{updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,n)=>{this[n]=e(t)}))}connectedCallback(){super.connectedCallback(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()}))}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}},getStore:function(t){window.ftReduxStores||(window.ftReduxStores={});const e=t.name;return window.ftReduxStores[e]||(window.ftReduxStores[e]=dn({reducer:t.reducer})),window.ftReduxStores[e]}});t.lit=ct,t.litClassMap=Mt,t.litDecorators=vt,t.litRepeat=Rt,t.litStyleMap=At,t.litUnsafeHTML=Pt,t.wcUtils=pn,Object.defineProperty(t,"U",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={});
|
|
140
|
+
`;function Wt(t){for(var e=arguments.length,n=Array(e>1?e-1:0),r=1;r<e;r++)n[r-1]=arguments[r];throw Error("[Immer] minified error nr: "+t+(n.length?" "+n.map((function(t){return"'"+t+"'"})).join(","):"")+". Find the full error at: https://bit.ly/3cXEKWf")}function Ht(t){return!!t&&!!t[Ne]}function It(t){return!!t&&(function(t){if(!t||"object"!=typeof t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;var n=Object.hasOwnProperty.call(e,"constructor")&&e.constructor;return n===Object||"function"==typeof n&&Function.toString.call(n)===Me}(t)||Array.isArray(t)||!!t[Re]||!!t.constructor[Re]||Jt(t)||Xt(t))}function Kt(t,e,n){void 0===n&&(n=!1),0===Vt(t)?(n?Object.keys:_e)(t).forEach((function(r){n&&"symbol"==typeof r||e(r,t[r],t)})):t.forEach((function(n,r){return e(r,n,t)}))}function Vt(t){var e=t[Ne];return e?e.i>3?e.i-4:e.i:Array.isArray(t)?1:Jt(t)?2:Xt(t)?3:0}function zt(t,e){return 2===Vt(t)?t.has(e):Object.prototype.hasOwnProperty.call(t,e)}function qt(t,e,n){var r=Vt(t);2===r?t.set(e,n):3===r?(t.delete(e),t.add(n)):t[e]=n}function Zt(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}function Jt(t){return Se&&t instanceof Map}function Xt(t){return Ee&&t instanceof Set}function Gt(t){return t.o||t.t}function Qt(t){if(Array.isArray(t))return Array.prototype.slice.call(t);var e=Ae(t);delete e[Ne];for(var n=_e(e),r=0;r<n.length;r++){var i=n[r],o=e[i];!1===o.writable&&(o.writable=!0,o.configurable=!0),(o.get||o.set)&&(e[i]={configurable:!0,writable:!0,enumerable:o.enumerable,value:t[i]})}return Object.create(Object.getPrototypeOf(t),e)}function Yt(t,e){return void 0===e&&(e=!1),ee(t)||Ht(t)||!It(t)||(Vt(t)>1&&(t.set=t.add=t.clear=t.delete=te),Object.freeze(t),e&&Kt(t,(function(t,e){return Yt(e,!0)}),!0)),t}function te(){Wt(2)}function ee(t){return null==t||"object"!=typeof t||Object.isFrozen(t)}function ne(t){var e=$e[t];return e||Wt(18,t),e}function re(){return ge}function ie(t,e){e&&(ne("Patches"),t.u=[],t.s=[],t.v=e)}function oe(t){se(t),t.p.forEach(ue),t.p=null}function se(t){t===ge&&(ge=t.l)}function ce(t){return ge={p:[],l:ge,h:t,m:!0,_:0}}function ue(t){var e=t[Ne];0===e.i||1===e.i?e.j():e.O=!0}function ae(t,e){e._=e.p.length;var n=e.p[0],r=void 0!==t&&t!==n;return e.h.g||ne("ES5").S(e,t,r),r?(n[Ne].P&&(oe(e),Wt(4)),It(t)&&(t=le(e,t),e.l||he(e,t)),e.u&&ne("Patches").M(n[Ne].t,t,e.u,e.s)):t=le(e,n,[]),oe(e),e.u&&e.v(e.u,e.s),t!==Ce?t:void 0}function le(t,e,n){if(ee(e))return e;var r=e[Ne];if(!r)return Kt(e,(function(i,o){return fe(t,r,e,i,o,n)}),!0),e;if(r.A!==t)return e;if(!r.P)return he(t,r.t,!0),r.t;if(!r.I){r.I=!0,r.A._--;var i=4===r.i||5===r.i?r.o=Qt(r.k):r.o;Kt(3===r.i?new Set(i):i,(function(e,o){return fe(t,r,i,e,o,n)})),he(t,i,!1),n&&t.u&&ne("Patches").R(r,n,t.u,t.s)}return r.o}function fe(t,e,n,r,i,o){if(Ht(i)){var s=le(t,i,o&&e&&3!==e.i&&!zt(e.D,r)?o.concat(r):void 0);if(qt(n,r,s),!Ht(s))return;t.m=!1}if(It(i)&&!ee(i)){if(!t.h.F&&t._<1)return;le(t,i),e&&e.A.l||he(t,i)}}function he(t,e,n){void 0===n&&(n=!1),t.h.F&&t.m&&Yt(e,n)}function de(t,e){var n=t[Ne];return(n?Gt(n):t)[e]}function ve(t,e){if(e in t)for(var n=Object.getPrototypeOf(t);n;){var r=Object.getOwnPropertyDescriptor(n,e);if(r)return r;n=Object.getPrototypeOf(n)}}function pe(t){t.P||(t.P=!0,t.l&&pe(t.l))}function be(t){t.o||(t.o=Qt(t.t))}function ye(t,e,n){var r=Jt(e)?ne("MapSet").N(e,n):Xt(e)?ne("MapSet").T(e,n):t.g?function(t,e){var n=Array.isArray(t),r={i:n?1:0,A:e?e.A:re(),P:!1,I:!1,D:{},l:e,t,k:null,o:null,j:null,C:!1},i=r,o=Ue;n&&(i=[r],o=Pe);var s=Proxy.revocable(i,o),c=s.revoke,u=s.proxy;return r.k=u,r.j=c,u}(e,n):ne("ES5").J(e,n);return(n?n.A:re()).p.push(r),r}function me(t){return Ht(t)||Wt(22,t),function t(e){if(!It(e))return e;var n,r=e[Ne],i=Vt(e);if(r){if(!r.P&&(r.i<4||!ne("ES5").K(r)))return r.t;r.I=!0,n=we(e,i),r.I=!1}else n=we(e,i);return Kt(n,(function(e,i){r&&function(t,e){return 2===Vt(t)?t.get(e):t[e]}(r.t,e)===i||qt(n,e,t(i))})),3===i?new Set(n):n}(t)}function we(t,e){switch(e){case 2:return new Map(t);case 3:return Array.from(t)}return Qt(t)}var Oe,ge,xe="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Se="undefined"!=typeof Map,Ee="undefined"!=typeof Set,je="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Ce=xe?Symbol.for("immer-nothing"):((Oe={})["immer-nothing"]=!0,Oe),Re=xe?Symbol.for("immer-draftable"):"__$immer_draftable",Ne=xe?Symbol.for("immer-state"):"__$immer_state",Me=""+Object.prototype.constructor,_e="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:Object.getOwnPropertyNames,Ae=Object.getOwnPropertyDescriptors||function(t){var e={};return _e(t).forEach((function(n){e[n]=Object.getOwnPropertyDescriptor(t,n)})),e},$e={},Ue={get:function(t,e){if(e===Ne)return t;var n=Gt(t);if(!zt(n,e))return function(t,e,n){var r,i=ve(e,n);return i?"value"in i?i.value:null===(r=i.get)||void 0===r?void 0:r.call(t.k):void 0}(t,n,e);var r=n[e];return t.I||!It(r)?r:r===de(t.t,e)?(be(t),t.o[e]=ye(t.A.h,r,t)):r},has:function(t,e){return e in Gt(t)},ownKeys:function(t){return Reflect.ownKeys(Gt(t))},set:function(t,e,n){var r=ve(Gt(t),e);if(null==r?void 0:r.set)return r.set.call(t.k,n),!0;if(!t.P){var i=de(Gt(t),e),o=null==i?void 0:i[Ne];if(o&&o.t===n)return t.o[e]=n,t.D[e]=!1,!0;if(Zt(n,i)&&(void 0!==n||zt(t.t,e)))return!0;be(t),pe(t)}return t.o[e]===n&&"number"!=typeof n&&(void 0!==n||e in t.o)||(t.o[e]=n,t.D[e]=!0,!0)},deleteProperty:function(t,e){return void 0!==de(t.t,e)||e in t.t?(t.D[e]=!1,be(t),pe(t)):delete t.D[e],t.o&&delete t.o[e],!0},getOwnPropertyDescriptor:function(t,e){var n=Gt(t),r=Reflect.getOwnPropertyDescriptor(n,e);return r?{writable:!0,configurable:1!==t.i||"length"!==e,enumerable:r.enumerable,value:n[e]}:r},defineProperty:function(){Wt(11)},getPrototypeOf:function(t){return Object.getPrototypeOf(t.t)},setPrototypeOf:function(){Wt(12)}},Pe={};Kt(Ue,(function(t,e){Pe[t]=function(){return arguments[0]=arguments[0][0],e.apply(this,arguments)}})),Pe.deleteProperty=function(t,e){return Pe.set.call(this,t,e,void 0)},Pe.set=function(t,e,n){return Ue.set.call(this,t[0],e,n,t[0])};var ke=function(){function t(t){var e=this;this.g=je,this.F=!0,this.produce=function(t,n,r){if("function"==typeof t&&"function"!=typeof n){var i=n;n=t;var o=e;return function(t){var e=this;void 0===t&&(t=i);for(var r=arguments.length,s=Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return o.produce(t,(function(t){var r;return(r=n).call.apply(r,[e,t].concat(s))}))}}var s;if("function"!=typeof n&&Wt(6),void 0!==r&&"function"!=typeof r&&Wt(7),It(t)){var c=ce(e),u=ye(e,t,void 0),a=!0;try{s=n(u),a=!1}finally{a?oe(c):se(c)}return"undefined"!=typeof Promise&&s instanceof Promise?s.then((function(t){return ie(c,r),ae(t,c)}),(function(t){throw oe(c),t})):(ie(c,r),ae(s,c))}if(!t||"object"!=typeof t){if(void 0===(s=n(t))&&(s=t),s===Ce&&(s=void 0),e.F&&Yt(s,!0),r){var l=[],f=[];ne("Patches").M(t,s,l,f),r(l,f)}return s}Wt(21,t)},this.produceWithPatches=function(t,n){if("function"==typeof t)return function(n){for(var r=arguments.length,i=Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];return e.produceWithPatches(n,(function(e){return t.apply(void 0,[e].concat(i))}))};var r,i,o=e.produce(t,n,(function(t,e){r=t,i=e}));return"undefined"!=typeof Promise&&o instanceof Promise?o.then((function(t){return[t,r,i]})):[o,r,i]},"boolean"==typeof(null==t?void 0:t.useProxies)&&this.setUseProxies(t.useProxies),"boolean"==typeof(null==t?void 0:t.autoFreeze)&&this.setAutoFreeze(t.autoFreeze)}var e=t.prototype;return e.createDraft=function(t){It(t)||Wt(8),Ht(t)&&(t=me(t));var e=ce(this),n=ye(this,t,void 0);return n[Ne].C=!0,se(e),n},e.finishDraft=function(t,e){var n=(t&&t[Ne]).A;return ie(n,e),ae(void 0,n)},e.setAutoFreeze=function(t){this.F=t},e.setUseProxies=function(t){t&&!je&&Wt(20),this.g=t},e.applyPatches=function(t,e){var n;for(n=e.length-1;n>=0;n--){var r=e[n];if(0===r.path.length&&"replace"===r.op){t=r.value;break}}n>-1&&(e=e.slice(n+1));var i=ne("Patches").$;return Ht(t)?i(t,e):this.produce(t,(function(t){return i(t,e)}))},t}(),Fe=new ke;function Le(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Te(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function De(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Te(Object(n),!0).forEach((function(e){Le(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function Be(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}Fe.produce,Fe.produceWithPatches.bind(Fe),Fe.setAutoFreeze.bind(Fe),Fe.setUseProxies.bind(Fe),Fe.applyPatches.bind(Fe),Fe.createDraft.bind(Fe),Fe.finishDraft.bind(Fe);var We="function"==typeof Symbol&&Symbol.observable||"@@observable",He=function(){return Math.random().toString(36).substring(7).split("").join(".")},Ie={INIT:"@@redux/INIT"+He(),REPLACE:"@@redux/REPLACE"+He(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+He()}};function Ke(t){if("object"!=typeof t||null===t)return!1;for(var e=t;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}function Ve(t,e,n){var r;if("function"==typeof e&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(Be(0));if("function"==typeof e&&void 0===n&&(n=e,e=void 0),void 0!==n){if("function"!=typeof n)throw new Error(Be(1));return n(Ve)(t,e)}if("function"!=typeof t)throw new Error(Be(2));var i=t,o=e,s=[],c=s,u=!1;function a(){c===s&&(c=s.slice())}function l(){if(u)throw new Error(Be(3));return o}function f(t){if("function"!=typeof t)throw new Error(Be(4));if(u)throw new Error(Be(5));var e=!0;return a(),c.push(t),function(){if(e){if(u)throw new Error(Be(6));e=!1,a();var n=c.indexOf(t);c.splice(n,1),s=null}}}function h(t){if(!Ke(t))throw new Error(Be(7));if(void 0===t.type)throw new Error(Be(8));if(u)throw new Error(Be(9));try{u=!0,o=i(o,t)}finally{u=!1}for(var e=s=c,n=0;n<e.length;n++)(0,e[n])();return t}function d(t){if("function"!=typeof t)throw new Error(Be(10));i=t,h({type:Ie.REPLACE})}function v(){var t,e=f;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(Be(11));function n(){t.next&&t.next(l())}return n(),{unsubscribe:e(n)}}})[We]=function(){return this},t}return h({type:Ie.INIT}),(r={dispatch:h,subscribe:f,getState:l,replaceReducer:d})[We]=v,r}function ze(t){for(var e=Object.keys(t),n={},r=0;r<e.length;r++){var i=e[r];"function"==typeof t[i]&&(n[i]=t[i])}var o,s=Object.keys(n);try{!function(t){Object.keys(t).forEach((function(e){var n=t[e];if(void 0===n(void 0,{type:Ie.INIT}))throw new Error(Be(12));if(void 0===n(void 0,{type:Ie.PROBE_UNKNOWN_ACTION()}))throw new Error(Be(13))}))}(n)}catch(t){o=t}return function(t,e){if(void 0===t&&(t={}),o)throw o;for(var r=!1,i={},c=0;c<s.length;c++){var u=s[c],a=n[u],l=t[u],f=a(l,e);if(void 0===f)throw e&&e.type,new Error(Be(14));i[u]=f,r=r||f!==l}return(r=r||s.length!==Object.keys(t).length)?i:t}}function qe(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return 0===e.length?function(t){return t}:1===e.length?e[0]:e.reduce((function(t,e){return function(){return t(e.apply(void 0,arguments))}}))}function Ze(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];return function(t){return function(){var n=t.apply(void 0,arguments),r=function(){throw new Error(Be(15))},i={getState:n.getState,dispatch:function(){return r.apply(void 0,arguments)}},o=e.map((function(t){return t(i)}));return r=qe.apply(void 0,o)(n.dispatch),De(De({},n),{},{dispatch:r})}}}function Je(t){return function(e){var n=e.dispatch,r=e.getState;return function(e){return function(i){return"function"==typeof i?i(n,r,t):e(i)}}}}var Xe=Je();Xe.withExtraArgument=Je;var Ge,Qe,Ye,tn,en=Xe,nn=(Ge=function(t,e){return Ge=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])},Ge(t,e)},function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Class extends value "+String(e)+" is not a constructor or null");function n(){this.constructor=t}Ge(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}),rn=function(t,e){for(var n=0,r=e.length,i=t.length;n<r;n++,i++)t[i]=e[n];return t},on=Object.defineProperty,sn=Object.getOwnPropertySymbols,cn=Object.prototype.hasOwnProperty,un=Object.prototype.propertyIsEnumerable,an=function(t,e,n){return e in t?on(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n},ln="undefined"!=typeof window&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(0!==arguments.length)return"object"==typeof arguments[0]?qe:qe.apply(null,arguments)},fn=function(t){function e(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var i=t.apply(this,n)||this;return Object.setPrototypeOf(i,e.prototype),i}return nn(e,t),Object.defineProperty(e,Symbol.species,{get:function(){return e},enumerable:!1,configurable:!0}),e.prototype.concat=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return t.prototype.concat.apply(this,e)},e.prototype.prepend=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return 1===t.length&&Array.isArray(t[0])?new(e.bind.apply(e,rn([void 0],t[0].concat(this)))):new(e.bind.apply(e,rn([void 0],t.concat(this))))},e}(Array);function hn(){return function(t){return function(t){void 0===t&&(t={});var e=t.thunk,n=void 0===e||e;t.immutableCheck,t.serializableCheck;var r=new fn;return n&&(function(t){return"boolean"==typeof t}(n)?r.push(en):r.push(en.withExtraArgument(n.extraArgument))),r}(t)}}function dn(t){var e,n=hn(),r=t||{},i=r.reducer,o=void 0===i?void 0:i,s=r.middleware,c=void 0===s?n():s,u=r.devTools,a=void 0===u||u,l=r.preloadedState,f=void 0===l?void 0:l,h=r.enhancers,d=void 0===h?void 0:h;if("function"==typeof o)e=o;else{if(!function(t){if("object"!=typeof t||null===t)return!1;var e=Object.getPrototypeOf(t);if(null===e)return!0;for(var n=e;null!==Object.getPrototypeOf(n);)n=Object.getPrototypeOf(n);return e===n}(o))throw new Error('"reducer" is a required argument, and must be a function or an object of functions that can be passed to combineReducers');e=ze(o)}var v=c;"function"==typeof v&&(v=v(n));var p=Ze.apply(void 0,v),b=qe;a&&(b=ln(function(t,e){for(var n in e||(e={}))cn.call(e,n)&&an(t,n,e[n]);if(sn)for(var r=0,i=sn(e);r<i.length;r++)n=i[r],un.call(e,n)&&an(t,n,e[n]);return t}({trace:!1},"object"==typeof a&&a)));var y=[p];return Array.isArray(d)?y=rn([p],d):"function"==typeof d&&(y=d(y)),Ve(e,f,b.apply(void 0,y))}!function(){function t(t,e){var n=i[t];return n?n.enumerable=e:i[t]=n={configurable:!0,enumerable:e,get:function(){var e=this[Ne];return Ue.get(e,t)},set:function(e){var n=this[Ne];Ue.set(n,t,e)}},n}function e(t){for(var e=t.length-1;e>=0;e--){var i=t[e][Ne];if(!i.P)switch(i.i){case 5:r(i)&&pe(i);break;case 4:n(i)&&pe(i)}}}function n(t){for(var e=t.t,n=t.k,r=_e(n),i=r.length-1;i>=0;i--){var o=r[i];if(o!==Ne){var s=e[o];if(void 0===s&&!zt(e,o))return!0;var c=n[o],u=c&&c[Ne];if(u?u.t!==s:!Zt(c,s))return!0}}var a=!!e[Ne];return r.length!==_e(e).length+(a?0:1)}function r(t){var e=t.k;if(e.length!==t.t.length)return!0;var n=Object.getOwnPropertyDescriptor(e,e.length-1);if(n&&!n.get)return!0;for(var r=0;r<e.length;r++)if(!e.hasOwnProperty(r))return!0;return!1}var i={};!function(t,e){$e[t]||($e[t]=e)}("ES5",{J:function(e,n){var r=Array.isArray(e),i=function(e,n){if(e){for(var r=Array(n.length),i=0;i<n.length;i++)Object.defineProperty(r,""+i,t(i,!0));return r}var o=Ae(n);delete o[Ne];for(var s=_e(o),c=0;c<s.length;c++){var u=s[c];o[u]=t(u,e||!!o[u].enumerable)}return Object.create(Object.getPrototypeOf(n),o)}(r,e),o={i:r?5:4,A:n?n.A:re(),P:!1,I:!1,D:{},l:n,t:e,k:i,o:null,O:!1,C:!1};return Object.defineProperty(i,Ne,{value:o,writable:!0}),i},S:function(t,n,i){i?Ht(n)&&n[Ne].A===t&&e(t.p):(t.u&&function t(e){if(e&&"object"==typeof e){var n=e[Ne];if(n){var i=n.t,o=n.k,s=n.D,c=n.i;if(4===c)Kt(o,(function(e){e!==Ne&&(void 0!==i[e]||zt(i,e)?s[e]||t(o[e]):(s[e]=!0,pe(n)))})),Kt(i,(function(t){void 0!==o[t]||zt(o,t)||(s[t]=!1,pe(n))}));else if(5===c){if(r(n)&&(pe(n),s.length=!0),o.length<i.length)for(var u=o.length;u<i.length;u++)s[u]=!1;else for(var a=i.length;a<o.length;a++)s[a]=!0;for(var l=Math.min(o.length,i.length),f=0;f<l;f++)o.hasOwnProperty(f)||(s[f]=!0),void 0===s[f]&&t(o[f])}}}}(t.p[0]),e(t.p))},K:function(t){return 4===t.i?n(t):r(t)}})}();const vn=navigator.vendor&&!!navigator.vendor.match(/apple/i)||"[object SafariRemoteNotification]"===(null!==(tn=null===(Ye=null===(Qe=window.safari)||void 0===Qe?void 0:Qe.pushNotification)||void 0===Ye?void 0:Ye.toString())&&void 0!==tn?tn:"");var pn=Object.freeze({__proto__:null,isSafari:vn,Debouncer:class{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,e){this.callbacks=[t],this.debounce(e)}queue(t,e){this.callbacks.push(t),this.debounce(e)}cancel(){null!=this._debounce&&window.clearTimeout(this._debounce)}debounce(t){this.cancel(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout)}runCallbacks(){for(let t of this.callbacks)t();this.callbacks=[]}},customElement:t=>e=>{window.customElements.get(t)||window.customElements.define(t,e)},jsonProperty:kt,designSystemVariables:Lt,FtCssVariable:Ft,setVariable:function(t,e){return o(`${t.name}: ${e}`)},FtLitElement:Dt,noTextSelect:Bt,ParametrizedLabelResolver:class{constructor(t,e){this.defaultLabels=t,this.labels=e}resolve(t,...e){var n,r;let i=null!==(r=null!==(n=this.labels[t])&&void 0!==n?n:this.defaultLabels[t])&&void 0!==r?r:"";return e.forEach(((t,e)=>i=i.replace(new RegExp(`\\{${e}\\}`,"g"),t))),i}},redux:(t,e)=>(n,r)=>{n.constructor.createProperty(r,{attribute:!1,hasChanged:e});const i=n;i.reduxProperties=i.reduxProperties||new Map,i.reduxProperties.set(r,t)},FtLitElementRedux:class extends Dt{get store(){return this.internalStore}set store(t){this.internalStore=t,this.setupStore()}updateFromStore(){const t=this.store.getState();this.reduxProperties&&this.reduxProperties.forEach(((e,n)=>{this[n]=e(t)}))}setupStore(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),this.updateFromStore(),this.unsubscribeFromStore=this.store.subscribe((()=>{this.updateFromStore()}))}connectedCallback(){super.connectedCallback(),this.store&&this.setupStore()}disconnectedCallback(){this.unsubscribeFromStore&&this.unsubscribeFromStore(),super.disconnectedCallback()}},getStore:function(t,e){window.ftReduxStores||(window.ftReduxStores={});const n=e||t.name;return window.ftReduxStores[n]||(window.ftReduxStores[n]=dn({reducer:t.reducer})),window.ftReduxStores[n]}});t.lit=ct,t.litClassMap=Mt,t.litDecorators=vt,t.litRepeat=Rt,t.litStyleMap=At,t.litUnsafeHTML=Pt,t.wcUtils=pn,Object.defineProperty(t,"U",{value:!0})},"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).ftGlobals={});
|
package/build/redux.d.ts
CHANGED
|
@@ -5,8 +5,11 @@ export declare const redux: <T, U = unknown>(selector: ReduxSelector<T>, hasChan
|
|
|
5
5
|
export declare abstract class FtLitElementRedux extends FtLitElement {
|
|
6
6
|
reduxProperties?: Map<string, ReduxSelector<unknown>>;
|
|
7
7
|
private unsubscribeFromStore;
|
|
8
|
-
|
|
8
|
+
private internalStore?;
|
|
9
|
+
get store(): any;
|
|
10
|
+
protected set store(store: Store);
|
|
9
11
|
private updateFromStore;
|
|
12
|
+
private setupStore;
|
|
10
13
|
connectedCallback(): void;
|
|
11
14
|
disconnectedCallback(): void;
|
|
12
15
|
}
|
|
@@ -15,5 +18,5 @@ declare global {
|
|
|
15
18
|
ftReduxStores?: Record<string, Store>;
|
|
16
19
|
}
|
|
17
20
|
}
|
|
18
|
-
export declare function getStore(slice: Slice): Store;
|
|
21
|
+
export declare function getStore(slice: Slice, name?: string): Store;
|
|
19
22
|
//# sourceMappingURL=redux.d.ts.map
|
package/build/redux.js
CHANGED
|
@@ -13,6 +13,13 @@ export const redux = (selector, hasChanged) => {
|
|
|
13
13
|
};
|
|
14
14
|
};
|
|
15
15
|
export class FtLitElementRedux extends FtLitElement {
|
|
16
|
+
get store() {
|
|
17
|
+
return this.internalStore;
|
|
18
|
+
}
|
|
19
|
+
set store(store) {
|
|
20
|
+
this.internalStore = store;
|
|
21
|
+
this.setupStore();
|
|
22
|
+
}
|
|
16
23
|
updateFromStore() {
|
|
17
24
|
const rootState = this.store.getState();
|
|
18
25
|
if (this.reduxProperties) {
|
|
@@ -21,13 +28,21 @@ export class FtLitElementRedux extends FtLitElement {
|
|
|
21
28
|
});
|
|
22
29
|
}
|
|
23
30
|
}
|
|
24
|
-
|
|
25
|
-
|
|
31
|
+
setupStore() {
|
|
32
|
+
if (this.unsubscribeFromStore) {
|
|
33
|
+
this.unsubscribeFromStore();
|
|
34
|
+
}
|
|
26
35
|
this.updateFromStore();
|
|
27
36
|
this.unsubscribeFromStore = this.store.subscribe(() => {
|
|
28
37
|
this.updateFromStore();
|
|
29
38
|
});
|
|
30
39
|
}
|
|
40
|
+
connectedCallback() {
|
|
41
|
+
super.connectedCallback();
|
|
42
|
+
if (this.store) {
|
|
43
|
+
this.setupStore();
|
|
44
|
+
}
|
|
45
|
+
}
|
|
31
46
|
disconnectedCallback() {
|
|
32
47
|
if (this.unsubscribeFromStore) {
|
|
33
48
|
this.unsubscribeFromStore();
|
|
@@ -35,16 +50,16 @@ export class FtLitElementRedux extends FtLitElement {
|
|
|
35
50
|
super.disconnectedCallback();
|
|
36
51
|
}
|
|
37
52
|
}
|
|
38
|
-
export function getStore(slice) {
|
|
53
|
+
export function getStore(slice, name) {
|
|
39
54
|
if (!window.ftReduxStores) {
|
|
40
55
|
window.ftReduxStores = {};
|
|
41
56
|
}
|
|
42
|
-
const
|
|
43
|
-
if (!window.ftReduxStores[
|
|
44
|
-
window.ftReduxStores[
|
|
57
|
+
const storeName = name || slice.name;
|
|
58
|
+
if (!window.ftReduxStores[storeName]) {
|
|
59
|
+
window.ftReduxStores[storeName] = configureStore({
|
|
45
60
|
reducer: slice.reducer
|
|
46
61
|
});
|
|
47
62
|
}
|
|
48
|
-
return window.ftReduxStores[
|
|
63
|
+
return window.ftReduxStores[storeName];
|
|
49
64
|
}
|
|
50
65
|
//# sourceMappingURL=redux.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-topics/ft-wc-utils",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "Internal web components tools",
|
|
5
5
|
"author": "Fluid Topics <devtopics@antidot.net>",
|
|
6
6
|
"license": "ISC",
|
|
@@ -19,5 +19,5 @@
|
|
|
19
19
|
"peerDependencies": {
|
|
20
20
|
"lit": "2.1.3"
|
|
21
21
|
},
|
|
22
|
-
"gitHead": "
|
|
22
|
+
"gitHead": "ab090c14b14524bfa890cffb6fe3a38f2362dea9"
|
|
23
23
|
}
|