quantum-component-library 1.4.45-qa.3 → 1.4.45-qa.5

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.
Files changed (37) hide show
  1. package/dist/{babel-vendor-Brd7V25k.js → babel-vendor-BOM86iTb.js} +71 -76
  2. package/dist/babel-vendor-cKvSpnBp.cjs +3 -0
  3. package/dist/components.cjs +1 -1
  4. package/dist/components.js +49 -49
  5. package/dist/{dnd-core-vendor-B9bDJoIO.js → dnd-core-vendor-LFMXiCD5.js} +2 -2
  6. package/dist/{dnd-core-vendor-B8SfRHAC.cjs → dnd-core-vendor-rqY4Q0Vq.cjs} +1 -1
  7. package/dist/{graphql-vendor-2jHffeBc.cjs → graphql-vendor-DRps04BT.cjs} +10 -10
  8. package/dist/{graphql-vendor-DZM4vSNi.js → graphql-vendor-DUv16c0G.js} +42 -42
  9. package/dist/hooks.cjs +1 -1
  10. package/dist/hooks.js +1 -1
  11. package/dist/lodash-vendor-D5A6v3mw.cjs +1 -0
  12. package/dist/lodash-vendor-Dz4vW7Gd.js +1120 -0
  13. package/dist/providers.cjs +1 -1
  14. package/dist/providers.js +6 -6
  15. package/dist/quantum-component-library.css +1 -1
  16. package/dist/{react-dnd-vendor-CrTWIfyP.js → react-dnd-vendor-Cuc51Scz.js} +15 -15
  17. package/dist/{react-dnd-vendor-CMnbNCdx.cjs → react-dnd-vendor-FieaWO8Z.cjs} +1 -1
  18. package/dist/{react-select-vendor-Dt2A4G_u.js → react-select-vendor-BrXjJVof.js} +35 -35
  19. package/dist/{react-select-vendor-DwRVrD2f.cjs → react-select-vendor-CVxjkFXv.cjs} +1 -1
  20. package/dist/services.cjs +1 -1
  21. package/dist/services.js +1 -1
  22. package/dist/types.cjs +1 -1
  23. package/dist/types.js +1 -1
  24. package/dist/utils.cjs +1 -1
  25. package/dist/utils.js +18 -18
  26. package/dist/vendor-CPJGEWOn.cjs +45 -0
  27. package/dist/vendor-CoDHTSgb.js +7981 -0
  28. package/package.json +6 -6
  29. package/dist/babel-vendor-pl7onWh-.cjs +0 -3
  30. package/dist/framer-motion-vendor-BgJ2HqtS.cjs +0 -1
  31. package/dist/framer-motion-vendor-Cn84b4iY.js +0 -3285
  32. package/dist/lodash-vendor-Dkc3o8vE.cjs +0 -1
  33. package/dist/lodash-vendor-KQku4vKh.js +0 -1602
  34. package/dist/ui-vendor-BAkBLewK.cjs +0 -294
  35. package/dist/ui-vendor-DLN2xOTj.js +0 -10756
  36. package/dist/vendor-Br-qBXqd.cjs +0 -90
  37. package/dist/vendor-BvxNWBst.js +0 -11937
@@ -1 +1 @@
1
- "use strict";const M=require("./vendor-Br-qBXqd.cjs"),s=require("./react-dnd-vendor-CMnbNCdx.cjs");function j(t,e,r){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,t)}function H(t,e){return t.filter(r=>r!==e)}function U(t){return typeof t=="object"}function N(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function L(t,e){return t.filter(r=>e.indexOf(r)>-1)}const E="dnd-core/INIT_COORDS",p="dnd-core/BEGIN_DRAG",I="dnd-core/PUBLISH_DRAG_SOURCE",h="dnd-core/HOVER",y="dnd-core/DROP",S="dnd-core/END_DRAG";function _(t,e){return{type:E,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const V={type:E,payload:{clientOffset:null,sourceClientOffset:null}};function k(t){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,c=t.getMonitor(),l=t.getRegistry();t.dispatch(_(o)),q(r,c,l);const f=X(r,c);if(f==null){t.dispatch(V);return}let D=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");B(a),D=a(f)}t.dispatch(_(o,D));const b=l.getSource(f).beginDrag(c,f);if(b==null)return;F(b),l.pinSource(f);const $=l.getSourceType(f);return{type:p,payload:{itemType:$,item:b,sourceId:f,clientOffset:o||null,sourceClientOffset:D||null,isSourcePublic:!!i}}}}function q(t,e,r){s.invariant(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){s.invariant(r.getSource(n),"Expected sourceIds to be registered.")})}function B(t){s.invariant(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function F(t){s.invariant(U(t),"Item must be an object.")}function X(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){W(t,i,r[i])})}return t}function J(t){return function(r={}){const n=t.getMonitor(),i=t.getRegistry();Q(n),K(n).forEach((a,c)=>{const l=Y(a,c,i,n),f={type:y,payload:{dropResult:z({},r,l)}};t.dispatch(f)})}}function Q(t){s.invariant(t.isDragging(),"Cannot call drop while not dragging."),s.invariant(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Y(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;return Z(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Z(t){s.invariant(typeof t>"u"||U(t),"Drop result must either be an object or undefined.")}function K(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function ee(t){return function(){const r=t.getMonitor(),n=t.getRegistry();te(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:S}}}function te(t){s.invariant(t.isDragging(),"Cannot call endDrag while not dragging.")}function v(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function re(t){return function(r,{clientOffset:n}={}){ne(r);const i=r.slice(0),o=t.getMonitor(),a=t.getRegistry(),c=o.getItemType();return oe(i,a,c),ie(i,o,a),se(i,o,a),{type:h,payload:{targetIds:i,clientOffset:n||null}}}}function ne(t){s.invariant(Array.isArray(t),"Expected targetIds to be an array.")}function ie(t,e,r){s.invariant(e.isDragging(),"Cannot call hover while not dragging."),s.invariant(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];s.invariant(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);s.invariant(o,"Expected targetIds to be registered.")}}function oe(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);v(o,r)||t.splice(n,1)}}function se(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function ae(t){return function(){if(t.getMonitor().isDragging())return{type:I}}}function ce(t){return{beginDrag:k(t),publishDragSource:ae(t),hover:re(t),drop:J(t),endDrag:ee(t)}}class ue{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const c=o.apply(e,a);typeof c<"u"&&r(c)}}const i=ce(this);return Object.keys(i).reduce((o,a)=>{const c=i[a];return o[a]=n(c),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function fe(t,e){return{x:t.x+e.x,y:t.y+e.y}}function G(t,e){return{x:t.x-e.x,y:t.y-e.y}}function le(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:G(fe(e,n),r)}function de(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:G(e,r)}const g=[],m=[];g.__IS_NONE__=!0;m.__IS_ALL__=!0;function ge(t,e){return t===g?!1:t===m||typeof e>"u"?!0:L(e,t).length>0}class pe{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;s.invariant(typeof e=="function","listener must be a function."),s.invariant(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),c=a.stateId;try{c===i||c===i+1&&!ge(a.dirtyHandlerIds,n)||e()}finally{i=c}};return this.store.subscribe(o)}subscribeToOffsetChange(e){s.invariant(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return s.invariant(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(s.invariant(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return v(n,i)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(s.invariant(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!v(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return n?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return le(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return de(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const C="dnd-core/ADD_SOURCE",R="dnd-core/ADD_TARGET",x="dnd-core/REMOVE_SOURCE",O="dnd-core/REMOVE_TARGET";function he(t){return{type:C,payload:{sourceId:t}}}function ye(t){return{type:R,payload:{targetId:t}}}function Se(t){return{type:x,payload:{sourceId:t}}}function Oe(t){return{type:O,payload:{targetId:t}}}function De(t){s.invariant(typeof t.canDrag=="function","Expected canDrag to be a function."),s.invariant(typeof t.beginDrag=="function","Expected beginDrag to be a function."),s.invariant(typeof t.endDrag=="function","Expected endDrag to be a function.")}function be(t){s.invariant(typeof t.canDrop=="function","Expected canDrop to be a function."),s.invariant(typeof t.hover=="function","Expected hover to be a function."),s.invariant(typeof t.drop=="function","Expected beginDrag to be a function.")}function T(t,e){if(e&&Array.isArray(t)){t.forEach(r=>T(r,!1));return}s.invariant(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(u||(u={}));let ve=0;function Te(){return ve++}function Ee(t){const e=Te().toString();switch(t){case u.SOURCE:return`S${e}`;case u.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function w(t){switch(t[0]){case"S":return u.SOURCE;case"T":return u.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P(t,e){const r=t.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===e)return!0;n=!!i}while(!n);return!1}class Ie{addSource(e,r){T(e),De(r);const n=this.addHandler(u.SOURCE,e,r);return this.store.dispatch(he(n)),n}addTarget(e,r){T(e,!0),be(r);const n=this.addHandler(u.TARGET,e,r);return this.store.dispatch(ye(n)),n}containsHandler(e){return P(this.dragSources,e)||P(this.dropTargets,e)}getSource(e,r=!1){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return w(e)===u.SOURCE}isTargetId(e){return w(e)===u.TARGET}removeSource(e){s.invariant(this.getSource(e),"Expected an existing source."),this.store.dispatch(Se(e)),s.asap(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){s.invariant(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Oe(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);s.invariant(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){s.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const i=Ee(e);return this.types.set(i,r),e===u.SOURCE?this.dragSources.set(i,n):e===u.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const me=(t,e)=>t===e;function Ce(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Re(t,e,r=me){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function xe(t=g,e){switch(e.type){case h:break;case C:case R:case O:case x:return g;case p:case I:case S:case y:default:return m}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=N(r,n);if(!(i.length>0||!Re(r,n)))return g;const a=n[n.length-1],c=r[r.length-1];return a!==c&&(a&&i.push(a),c&&i.push(c)),i}function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_e(t,i,r[i])})}return t}const A={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pe(t=A,e){const{payload:r}=e;switch(e.type){case E:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case h:return Ce(t.clientOffset,r.clientOffset)?t:we({},t,{clientOffset:r.clientOffset});case S:case y:return A;default:return t}}function Ae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ae(t,i,r[i])})}return t}const Ue={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ge(t=Ue,e){const{payload:r}=e;switch(e.type){case p:return d({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case I:return d({},t,{isSourcePublic:!0});case h:return d({},t,{targetIds:r.targetIds});case O:return t.targetIds.indexOf(r.targetId)===-1?t:d({},t,{targetIds:H(t.targetIds,r.targetId)});case y:return d({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case S:return d({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function $e(t=0,e){switch(e.type){case C:case R:return t+1;case x:case O:return t-1;default:return t}}function Me(t=0){return t+1}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){je(t,i,r[i])})}return t}function Ne(t={},e){return{dirtyHandlerIds:xe(t.dirtyHandlerIds,{type:e.type,payload:He({},e.payload,{prevTargetIds:j(t,"dragOperation.targetIds",[])})}),dragOffset:Pe(t.dragOffset,e),refCount:$e(t.refCount,e),dragOperation:Ge(t.dragOperation,e),stateId:Me(t.stateId)}}function Le(t,e=void 0,r={},n=!1){const i=Ve(n),o=new pe(i,new Ie(i)),a=new ue(i,o),c=t(a,e,r);return a.receiveBackend(c),a}function Ve(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return M.createStore(Ne,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}exports.createDragDropManager=Le;
1
+ "use strict";const M=require("./vendor-CPJGEWOn.cjs"),s=require("./react-dnd-vendor-FieaWO8Z.cjs");function j(t,e,r){return e.split(".").reduce((n,i)=>n&&n[i]?n[i]:r||null,t)}function H(t,e){return t.filter(r=>r!==e)}function U(t){return typeof t=="object"}function N(t,e){const r=new Map,n=o=>{r.set(o,r.has(o)?r.get(o)+1:1)};t.forEach(n),e.forEach(n);const i=[];return r.forEach((o,a)=>{o===1&&i.push(a)}),i}function L(t,e){return t.filter(r=>e.indexOf(r)>-1)}const E="dnd-core/INIT_COORDS",p="dnd-core/BEGIN_DRAG",I="dnd-core/PUBLISH_DRAG_SOURCE",h="dnd-core/HOVER",y="dnd-core/DROP",S="dnd-core/END_DRAG";function _(t,e){return{type:E,payload:{sourceClientOffset:e||null,clientOffset:t||null}}}const V={type:E,payload:{clientOffset:null,sourceClientOffset:null}};function k(t){return function(r=[],n={publishSource:!0}){const{publishSource:i=!0,clientOffset:o,getSourceClientOffset:a}=n,c=t.getMonitor(),l=t.getRegistry();t.dispatch(_(o)),q(r,c,l);const f=X(r,c);if(f==null){t.dispatch(V);return}let D=null;if(o){if(!a)throw new Error("getSourceClientOffset must be defined");B(a),D=a(f)}t.dispatch(_(o,D));const b=l.getSource(f).beginDrag(c,f);if(b==null)return;F(b),l.pinSource(f);const $=l.getSourceType(f);return{type:p,payload:{itemType:$,item:b,sourceId:f,clientOffset:o||null,sourceClientOffset:D||null,isSourcePublic:!!i}}}}function q(t,e,r){s.invariant(!e.isDragging(),"Cannot call beginDrag while dragging."),t.forEach(function(n){s.invariant(r.getSource(n),"Expected sourceIds to be registered.")})}function B(t){s.invariant(typeof t=="function","When clientOffset is provided, getSourceClientOffset must be a function.")}function F(t){s.invariant(U(t),"Item must be an object.")}function X(t,e){let r=null;for(let n=t.length-1;n>=0;n--)if(e.canDragSource(t[n])){r=t[n];break}return r}function W(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function z(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){W(t,i,r[i])})}return t}function J(t){return function(r={}){const n=t.getMonitor(),i=t.getRegistry();Q(n),K(n).forEach((a,c)=>{const l=Y(a,c,i,n),f={type:y,payload:{dropResult:z({},r,l)}};t.dispatch(f)})}}function Q(t){s.invariant(t.isDragging(),"Cannot call drop while not dragging."),s.invariant(!t.didDrop(),"Cannot call drop twice during one drag operation.")}function Y(t,e,r,n){const i=r.getTarget(t);let o=i?i.drop(n,t):void 0;return Z(o),typeof o>"u"&&(o=e===0?{}:n.getDropResult()),o}function Z(t){s.invariant(typeof t>"u"||U(t),"Drop result must either be an object or undefined.")}function K(t){const e=t.getTargetIds().filter(t.canDropOnTarget,t);return e.reverse(),e}function ee(t){return function(){const r=t.getMonitor(),n=t.getRegistry();te(r);const i=r.getSourceId();return i!=null&&(n.getSource(i,!0).endDrag(r,i),n.unpinSource()),{type:S}}}function te(t){s.invariant(t.isDragging(),"Cannot call endDrag while not dragging.")}function v(t,e){return e===null?t===null:Array.isArray(t)?t.some(r=>r===e):t===e}function re(t){return function(r,{clientOffset:n}={}){ne(r);const i=r.slice(0),o=t.getMonitor(),a=t.getRegistry(),c=o.getItemType();return oe(i,a,c),ie(i,o,a),se(i,o,a),{type:h,payload:{targetIds:i,clientOffset:n||null}}}}function ne(t){s.invariant(Array.isArray(t),"Expected targetIds to be an array.")}function ie(t,e,r){s.invariant(e.isDragging(),"Cannot call hover while not dragging."),s.invariant(!e.didDrop(),"Cannot call hover after drop.");for(let n=0;n<t.length;n++){const i=t[n];s.invariant(t.lastIndexOf(i)===n,"Expected targetIds to be unique in the passed array.");const o=r.getTarget(i);s.invariant(o,"Expected targetIds to be registered.")}}function oe(t,e,r){for(let n=t.length-1;n>=0;n--){const i=t[n],o=e.getTargetType(i);v(o,r)||t.splice(n,1)}}function se(t,e,r){t.forEach(function(n){r.getTarget(n).hover(e,n)})}function ae(t){return function(){if(t.getMonitor().isDragging())return{type:I}}}function ce(t){return{beginDrag:k(t),publishDragSource:ae(t),hover:re(t),drop:J(t),endDrag:ee(t)}}class ue{receiveBackend(e){this.backend=e}getMonitor(){return this.monitor}getBackend(){return this.backend}getRegistry(){return this.monitor.registry}getActions(){const e=this,{dispatch:r}=this.store;function n(o){return(...a)=>{const c=o.apply(e,a);typeof c<"u"&&r(c)}}const i=ce(this);return Object.keys(i).reduce((o,a)=>{const c=i[a];return o[a]=n(c),o},{})}dispatch(e){this.store.dispatch(e)}constructor(e,r){this.isSetUp=!1,this.handleRefCountChange=()=>{const n=this.store.getState().refCount>0;this.backend&&(n&&!this.isSetUp?(this.backend.setup(),this.isSetUp=!0):!n&&this.isSetUp&&(this.backend.teardown(),this.isSetUp=!1))},this.store=e,this.monitor=r,e.subscribe(this.handleRefCountChange)}}function fe(t,e){return{x:t.x+e.x,y:t.y+e.y}}function G(t,e){return{x:t.x-e.x,y:t.y-e.y}}function le(t){const{clientOffset:e,initialClientOffset:r,initialSourceClientOffset:n}=t;return!e||!r||!n?null:G(fe(e,n),r)}function de(t){const{clientOffset:e,initialClientOffset:r}=t;return!e||!r?null:G(e,r)}const g=[],m=[];g.__IS_NONE__=!0;m.__IS_ALL__=!0;function ge(t,e){return t===g?!1:t===m||typeof e>"u"?!0:L(e,t).length>0}class pe{subscribeToStateChange(e,r={}){const{handlerIds:n}=r;s.invariant(typeof e=="function","listener must be a function."),s.invariant(typeof n>"u"||Array.isArray(n),"handlerIds, when specified, must be an array of strings.");let i=this.store.getState().stateId;const o=()=>{const a=this.store.getState(),c=a.stateId;try{c===i||c===i+1&&!ge(a.dirtyHandlerIds,n)||e()}finally{i=c}};return this.store.subscribe(o)}subscribeToOffsetChange(e){s.invariant(typeof e=="function","listener must be a function.");let r=this.store.getState().dragOffset;const n=()=>{const i=this.store.getState().dragOffset;i!==r&&(r=i,e())};return this.store.subscribe(n)}canDragSource(e){if(!e)return!1;const r=this.registry.getSource(e);return s.invariant(r,`Expected to find a valid source. sourceId=${e}`),this.isDragging()?!1:r.canDrag(this,e)}canDropOnTarget(e){if(!e)return!1;const r=this.registry.getTarget(e);if(s.invariant(r,`Expected to find a valid target. targetId=${e}`),!this.isDragging()||this.didDrop())return!1;const n=this.registry.getTargetType(e),i=this.getItemType();return v(n,i)&&r.canDrop(this,e)}isDragging(){return!!this.getItemType()}isDraggingSource(e){if(!e)return!1;const r=this.registry.getSource(e,!0);if(s.invariant(r,`Expected to find a valid source. sourceId=${e}`),!this.isDragging()||!this.isSourcePublic())return!1;const n=this.registry.getSourceType(e),i=this.getItemType();return n!==i?!1:r.isDragging(this,e)}isOverTarget(e,r={shallow:!1}){if(!e)return!1;const{shallow:n}=r;if(!this.isDragging())return!1;const i=this.registry.getTargetType(e),o=this.getItemType();if(o&&!v(i,o))return!1;const a=this.getTargetIds();if(!a.length)return!1;const c=a.indexOf(e);return n?c===a.length-1:c>-1}getItemType(){return this.store.getState().dragOperation.itemType}getItem(){return this.store.getState().dragOperation.item}getSourceId(){return this.store.getState().dragOperation.sourceId}getTargetIds(){return this.store.getState().dragOperation.targetIds}getDropResult(){return this.store.getState().dragOperation.dropResult}didDrop(){return this.store.getState().dragOperation.didDrop}isSourcePublic(){return!!this.store.getState().dragOperation.isSourcePublic}getInitialClientOffset(){return this.store.getState().dragOffset.initialClientOffset}getInitialSourceClientOffset(){return this.store.getState().dragOffset.initialSourceClientOffset}getClientOffset(){return this.store.getState().dragOffset.clientOffset}getSourceClientOffset(){return le(this.store.getState().dragOffset)}getDifferenceFromInitialOffset(){return de(this.store.getState().dragOffset)}constructor(e,r){this.store=e,this.registry=r}}const C="dnd-core/ADD_SOURCE",R="dnd-core/ADD_TARGET",x="dnd-core/REMOVE_SOURCE",O="dnd-core/REMOVE_TARGET";function he(t){return{type:C,payload:{sourceId:t}}}function ye(t){return{type:R,payload:{targetId:t}}}function Se(t){return{type:x,payload:{sourceId:t}}}function Oe(t){return{type:O,payload:{targetId:t}}}function De(t){s.invariant(typeof t.canDrag=="function","Expected canDrag to be a function."),s.invariant(typeof t.beginDrag=="function","Expected beginDrag to be a function."),s.invariant(typeof t.endDrag=="function","Expected endDrag to be a function.")}function be(t){s.invariant(typeof t.canDrop=="function","Expected canDrop to be a function."),s.invariant(typeof t.hover=="function","Expected hover to be a function."),s.invariant(typeof t.drop=="function","Expected beginDrag to be a function.")}function T(t,e){if(e&&Array.isArray(t)){t.forEach(r=>T(r,!1));return}s.invariant(typeof t=="string"||typeof t=="symbol",e?"Type can only be a string, a symbol, or an array of either.":"Type can only be a string or a symbol.")}var u;(function(t){t.SOURCE="SOURCE",t.TARGET="TARGET"})(u||(u={}));let ve=0;function Te(){return ve++}function Ee(t){const e=Te().toString();switch(t){case u.SOURCE:return`S${e}`;case u.TARGET:return`T${e}`;default:throw new Error(`Unknown Handler Role: ${t}`)}}function w(t){switch(t[0]){case"S":return u.SOURCE;case"T":return u.TARGET;default:throw new Error(`Cannot parse handler ID: ${t}`)}}function P(t,e){const r=t.entries();let n=!1;do{const{done:i,value:[,o]}=r.next();if(o===e)return!0;n=!!i}while(!n);return!1}class Ie{addSource(e,r){T(e),De(r);const n=this.addHandler(u.SOURCE,e,r);return this.store.dispatch(he(n)),n}addTarget(e,r){T(e,!0),be(r);const n=this.addHandler(u.TARGET,e,r);return this.store.dispatch(ye(n)),n}containsHandler(e){return P(this.dragSources,e)||P(this.dropTargets,e)}getSource(e,r=!1){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),r&&e===this.pinnedSourceId?this.pinnedSource:this.dragSources.get(e)}getTarget(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.dropTargets.get(e)}getSourceType(e){return s.invariant(this.isSourceId(e),"Expected a valid source ID."),this.types.get(e)}getTargetType(e){return s.invariant(this.isTargetId(e),"Expected a valid target ID."),this.types.get(e)}isSourceId(e){return w(e)===u.SOURCE}isTargetId(e){return w(e)===u.TARGET}removeSource(e){s.invariant(this.getSource(e),"Expected an existing source."),this.store.dispatch(Se(e)),s.asap(()=>{this.dragSources.delete(e),this.types.delete(e)})}removeTarget(e){s.invariant(this.getTarget(e),"Expected an existing target."),this.store.dispatch(Oe(e)),this.dropTargets.delete(e),this.types.delete(e)}pinSource(e){const r=this.getSource(e);s.invariant(r,"Expected an existing source."),this.pinnedSourceId=e,this.pinnedSource=r}unpinSource(){s.invariant(this.pinnedSource,"No source is pinned at the time."),this.pinnedSourceId=null,this.pinnedSource=null}addHandler(e,r,n){const i=Ee(e);return this.types.set(i,r),e===u.SOURCE?this.dragSources.set(i,n):e===u.TARGET&&this.dropTargets.set(i,n),i}constructor(e){this.types=new Map,this.dragSources=new Map,this.dropTargets=new Map,this.pinnedSourceId=null,this.pinnedSource=null,this.store=e}}const me=(t,e)=>t===e;function Ce(t,e){return!t&&!e?!0:!t||!e?!1:t.x===e.x&&t.y===e.y}function Re(t,e,r=me){if(t.length!==e.length)return!1;for(let n=0;n<t.length;++n)if(!r(t[n],e[n]))return!1;return!0}function xe(t=g,e){switch(e.type){case h:break;case C:case R:case O:case x:return g;case p:case I:case S:case y:default:return m}const{targetIds:r=[],prevTargetIds:n=[]}=e.payload,i=N(r,n);if(!(i.length>0||!Re(r,n)))return g;const a=n[n.length-1],c=r[r.length-1];return a!==c&&(a&&i.push(a),c&&i.push(c)),i}function _e(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function we(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){_e(t,i,r[i])})}return t}const A={initialSourceClientOffset:null,initialClientOffset:null,clientOffset:null};function Pe(t=A,e){const{payload:r}=e;switch(e.type){case E:case p:return{initialSourceClientOffset:r.sourceClientOffset,initialClientOffset:r.clientOffset,clientOffset:r.clientOffset};case h:return Ce(t.clientOffset,r.clientOffset)?t:we({},t,{clientOffset:r.clientOffset});case S:case y:return A;default:return t}}function Ae(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function d(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){Ae(t,i,r[i])})}return t}const Ue={itemType:null,item:null,sourceId:null,targetIds:[],dropResult:null,didDrop:!1,isSourcePublic:null};function Ge(t=Ue,e){const{payload:r}=e;switch(e.type){case p:return d({},t,{itemType:r.itemType,item:r.item,sourceId:r.sourceId,isSourcePublic:r.isSourcePublic,dropResult:null,didDrop:!1});case I:return d({},t,{isSourcePublic:!0});case h:return d({},t,{targetIds:r.targetIds});case O:return t.targetIds.indexOf(r.targetId)===-1?t:d({},t,{targetIds:H(t.targetIds,r.targetId)});case y:return d({},t,{dropResult:r.dropResult,didDrop:!0,targetIds:[]});case S:return d({},t,{itemType:null,item:null,sourceId:null,dropResult:null,didDrop:!1,isSourcePublic:null,targetIds:[]});default:return t}}function $e(t=0,e){switch(e.type){case C:case R:return t+1;case x:case O:return t-1;default:return t}}function Me(t=0){return t+1}function je(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function He(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{},n=Object.keys(r);typeof Object.getOwnPropertySymbols=="function"&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(i){return Object.getOwnPropertyDescriptor(r,i).enumerable}))),n.forEach(function(i){je(t,i,r[i])})}return t}function Ne(t={},e){return{dirtyHandlerIds:xe(t.dirtyHandlerIds,{type:e.type,payload:He({},e.payload,{prevTargetIds:j(t,"dragOperation.targetIds",[])})}),dragOffset:Pe(t.dragOffset,e),refCount:$e(t.refCount,e),dragOperation:Ge(t.dragOperation,e),stateId:Me(t.stateId)}}function Le(t,e=void 0,r={},n=!1){const i=Ve(n),o=new pe(i,new Ie(i)),a=new ue(i,o),c=t(a,e,r);return a.receiveBackend(c),a}function Ve(t){const e=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__;return M.createStore(Ne,t&&e&&e({name:"dnd-core",instanceId:"dnd-core"}))}exports.createDragDropManager=Le;
@@ -1,19 +1,19 @@
1
- "use strict";const c=require("./vendor-Br-qBXqd.cjs"),Ee=require("react");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=Ne(Ee);var xe={OPERATION_DEFINITION:"OperationDefinition"};class ne extends Error{constructor(t,r,n,i,a,o,v){super(t),this.name="GraphQLError",this.message=t,a&&(this.path=a),r&&(this.nodes=Array.isArray(r)?r:[r]),n&&(this.source=n),i&&(this.positions=i),o&&(this.originalError=o);var h=v;if(!h&&o){var k=o.extensions;k&&typeof k=="object"&&(h=k)}this.extensions=h||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var l,s;function C(e){return new ne(`Syntax Error: Unexpected token at ${s} in ${e}`)}function le(e){if(e.lastIndex=s,e.test(l))return l.slice(s,s=e.lastIndex)}var Q=/ +(?=[^\s])/y;function Se(e){for(var t=e.split(`
1
+ "use strict";const c=require("./vendor-CPJGEWOn.cjs"),Ee=require("react");function Ne(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const q=Ne(Ee);var xe={OPERATION_DEFINITION:"OperationDefinition"};class ne extends Error{constructor(t,r,n,i,a,o,v){super(t),this.name="GraphQLError",this.message=t,a&&(this.path=a),r&&(this.nodes=Array.isArray(r)?r:[r]),n&&(this.source=n),i&&(this.positions=i),o&&(this.originalError=o);var h=v;if(!h&&o){var k=o.extensions;k&&typeof k=="object"&&(h=k)}this.extensions=h||{}}toJSON(){return{...this,message:this.message}}toString(){return this.message}get[Symbol.toStringTag](){return"GraphQLError"}}var l,s;function C(e){return new ne(`Syntax Error: Unexpected token at ${s} in ${e}`)}function le(e){if(e.lastIndex=s,e.test(l))return l.slice(s,s=e.lastIndex)}var Q=/ +(?=[^\s])/y;function Se(e){for(var t=e.split(`
2
2
  `),r="",n=0,i=0,a=t.length-1,o=0;o<t.length;o++)Q.lastIndex=0,Q.test(t[o])&&(o&&(!n||Q.lastIndex<n)&&(n=Q.lastIndex),i=i||o,a=o);for(var v=i;v<=a;v++)v!==i&&(r+=`
3
- `),r+=t[v].slice(n).replace(/\\"""/g,'"""');return r}function x(){for(var e=0|l.charCodeAt(s++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|l.charCodeAt(s++))if(e===35)for(;(e=0|l.charCodeAt(s++))&&e!==10&&e!==13;);s--}function oe(){for(var e=s,t=0|l.charCodeAt(s++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|l.charCodeAt(s++));if(e===s-1)throw C("Name");var r=l.slice(e,--s);return x(),r}function V(){return{kind:"Name",value:oe()}}var Ce=/(?:"""|(?:[\s\S]*?[^\\])""")/y,De=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function M(e){var t;switch(l.charCodeAt(s)){case 91:s++,x();for(var r=[];l.charCodeAt(s)!==93;)r.push(M(e));return s++,x(),{kind:"ListValue",values:r};case 123:s++,x();for(var n=[];l.charCodeAt(s)!==125;){var i=V();if(l.charCodeAt(s++)!==58)throw C("ObjectField");x(),n.push({kind:"ObjectField",name:i,value:M(e)})}return s++,x(),{kind:"ObjectValue",fields:n};case 36:if(e)throw C("Variable");return s++,{kind:"Variable",name:V()};case 34:if(l.charCodeAt(s+1)===34&&l.charCodeAt(s+2)===34){if(s+=3,(t=le(Ce))==null)throw C("StringValue");return x(),{kind:"StringValue",value:Se(t.slice(0,-3)),block:!0}}else{var a=s,o;s++;var v=!1;for(o=0|l.charCodeAt(s++);o===92&&(s++,v=!0)||o!==10&&o!==13&&o!==34&&o;o=0|l.charCodeAt(s++));if(o!==34)throw C("StringValue");return t=l.slice(a,s),x(),{kind:"StringValue",value:v?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var h=s++,k;(k=0|l.charCodeAt(s++))>=48&&k<=57;);var y=l.slice(h,--s);if((k=l.charCodeAt(s))===46||k===69||k===101){if((t=le(De))==null)throw C("FloatValue");return x(),{kind:"FloatValue",value:y+t}}else return x(),{kind:"IntValue",value:y};case 110:if(l.charCodeAt(s+1)===117&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===108)return s+=4,x(),{kind:"NullValue"};break;case 116:if(l.charCodeAt(s+1)===114&&l.charCodeAt(s+2)===117&&l.charCodeAt(s+3)===101)return s+=4,x(),{kind:"BooleanValue",value:!0};break;case 102:if(l.charCodeAt(s+1)===97&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===115&&l.charCodeAt(s+4)===101)return s+=5,x(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:oe()}}function be(e){if(l.charCodeAt(s)===40){var t=[];s++,x();do{var r=V();if(l.charCodeAt(s++)!==58)throw C("Argument");x(),t.push({kind:"Argument",name:r,value:M(e)})}while(l.charCodeAt(s)!==41);return s++,x(),t}}function j(e){if(l.charCodeAt(s)===64){var t=[];do s++,t.push({kind:"Directive",name:V(),arguments:be(e)});while(l.charCodeAt(s)===64);return t}}function _e(){for(var e=0;l.charCodeAt(s)===91;)e++,s++,x();var t={kind:"NamedType",name:V()};do if(l.charCodeAt(s)===33&&(s++,x(),t={kind:"NonNullType",type:t}),e){if(l.charCodeAt(s++)!==93)throw C("NamedType");x(),t={kind:"ListType",type:t}}while(e--);return t}function G(){if(l.charCodeAt(s++)!==123)throw C("SelectionSet");return x(),U()}function U(){var e=[];do if(l.charCodeAt(s)===46){if(l.charCodeAt(++s)!==46||l.charCodeAt(++s)!==46)throw C("SelectionSet");switch(s++,x(),l.charCodeAt(s)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:j(!1),selectionSet:G()});break;case 111:l.charCodeAt(s+1)===110?(s+=2,x(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:V()},directives:j(!1),selectionSet:G()})):e.push({kind:"FragmentSpread",name:V(),directives:j(!1)});break;case 123:s++,x(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:U()});break;default:e.push({kind:"FragmentSpread",name:V(),directives:j(!1)})}}else{var t=V(),r=void 0;l.charCodeAt(s)===58&&(s++,x(),r=t,t=V());var n=be(!1),i=j(!1),a=void 0;l.charCodeAt(s)===123&&(s++,x(),a=U()),e.push({kind:"Field",alias:r,name:t,arguments:n,directives:i,selectionSet:a})}while(l.charCodeAt(s)!==125);return s++,x(),{kind:"SelectionSet",selections:e}}function qe(){if(x(),l.charCodeAt(s)===40){var e=[];s++,x();do{var t=void 0;if(l.charCodeAt(s)===34&&(t=M(!0)),l.charCodeAt(s++)!==36)throw C("Variable");var r=V();if(l.charCodeAt(s++)!==58)throw C("VariableDefinition");x();var n=_e(),i=void 0;l.charCodeAt(s)===61&&(s++,x(),i=M(!0)),x();var a={kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:n,defaultValue:i,directives:j(!0)};t&&(a.description=t),e.push(a)}while(l.charCodeAt(s)!==41);return s++,x(),e}}function Ve(e){var t=V();if(l.charCodeAt(s++)!==111||l.charCodeAt(s++)!==110)throw C("FragmentDefinition");x();var r={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:V()},directives:j(!1),selectionSet:G()};return e&&(r.description=e),r}function fe(){var e=[];do{var t=void 0;if(l.charCodeAt(s)===34&&(t=M(!0)),l.charCodeAt(s)===123){if(t)throw C("Document");s++,x(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:U()})}else{var r=oe();switch(r){case"fragment":e.push(Ve(t));break;case"query":case"mutation":case"subscription":var n,i=void 0;(n=l.charCodeAt(s))!==40&&n!==64&&n!==123&&(i=V());var a={kind:"OperationDefinition",operation:r,name:i,variableDefinitions:qe(),directives:j(!1),selectionSet:G()};t&&(a.description=t),e.push(a);break;default:throw C("Document")}}}while(s<l.length);return e}function Pe(e,t){return l=e.body?e.body:e,s=0,x(),t&&t.noLocation?{kind:"Document",definitions:fe()}:{kind:"Document",definitions:fe(),loc:{start:0,end:l.length,startToken:void 0,endToken:void 0,source:{body:l,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function _(e,t,r){for(var n="",i=0;i<e.length;i++)i&&(n+=t),n+=r(e[i]);return n}function $e(e){return JSON.stringify(e)}function je(e){return`"""
3
+ `),r+=t[v].slice(n).replace(/\\"""/g,'"""');return r}function x(){for(var e=0|l.charCodeAt(s++);e===9||e===10||e===13||e===32||e===35||e===44||e===65279;e=0|l.charCodeAt(s++))if(e===35)for(;(e=0|l.charCodeAt(s++))&&e!==10&&e!==13;);s--}function oe(){for(var e=s,t=0|l.charCodeAt(s++);t>=48&&t<=57||t>=65&&t<=90||t===95||t>=97&&t<=122;t=0|l.charCodeAt(s++));if(e===s-1)throw C("Name");var r=l.slice(e,--s);return x(),r}function V(){return{kind:"Name",value:oe()}}var Ce=/(?:"""|(?:[\s\S]*?[^\\])""")/y,De=/(?:(?:\.\d+)?[eE][+-]?\d+|\.\d+)/y;function $(e){var t;switch(l.charCodeAt(s)){case 91:s++,x();for(var r=[];l.charCodeAt(s)!==93;)r.push($(e));return s++,x(),{kind:"ListValue",values:r};case 123:s++,x();for(var n=[];l.charCodeAt(s)!==125;){var i=V();if(l.charCodeAt(s++)!==58)throw C("ObjectField");x(),n.push({kind:"ObjectField",name:i,value:$(e)})}return s++,x(),{kind:"ObjectValue",fields:n};case 36:if(e)throw C("Variable");return s++,{kind:"Variable",name:V()};case 34:if(l.charCodeAt(s+1)===34&&l.charCodeAt(s+2)===34){if(s+=3,(t=le(Ce))==null)throw C("StringValue");return x(),{kind:"StringValue",value:Se(t.slice(0,-3)),block:!0}}else{var a=s,o;s++;var v=!1;for(o=0|l.charCodeAt(s++);o===92&&(s++,v=!0)||o!==10&&o!==13&&o!==34&&o;o=0|l.charCodeAt(s++));if(o!==34)throw C("StringValue");return t=l.slice(a,s),x(),{kind:"StringValue",value:v?JSON.parse(t):t.slice(1,-1),block:!1}}case 45:case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:for(var h=s++,k;(k=0|l.charCodeAt(s++))>=48&&k<=57;);var y=l.slice(h,--s);if((k=l.charCodeAt(s))===46||k===69||k===101){if((t=le(De))==null)throw C("FloatValue");return x(),{kind:"FloatValue",value:y+t}}else return x(),{kind:"IntValue",value:y};case 110:if(l.charCodeAt(s+1)===117&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===108)return s+=4,x(),{kind:"NullValue"};break;case 116:if(l.charCodeAt(s+1)===114&&l.charCodeAt(s+2)===117&&l.charCodeAt(s+3)===101)return s+=4,x(),{kind:"BooleanValue",value:!0};break;case 102:if(l.charCodeAt(s+1)===97&&l.charCodeAt(s+2)===108&&l.charCodeAt(s+3)===115&&l.charCodeAt(s+4)===101)return s+=5,x(),{kind:"BooleanValue",value:!1};break}return{kind:"EnumValue",value:oe()}}function be(e){if(l.charCodeAt(s)===40){var t=[];s++,x();do{var r=V();if(l.charCodeAt(s++)!==58)throw C("Argument");x(),t.push({kind:"Argument",name:r,value:$(e)})}while(l.charCodeAt(s)!==41);return s++,x(),t}}function I(e){if(l.charCodeAt(s)===64){var t=[];do s++,t.push({kind:"Directive",name:V(),arguments:be(e)});while(l.charCodeAt(s)===64);return t}}function _e(){for(var e=0;l.charCodeAt(s)===91;)e++,s++,x();var t={kind:"NamedType",name:V()};do if(l.charCodeAt(s)===33&&(s++,x(),t={kind:"NonNullType",type:t}),e){if(l.charCodeAt(s++)!==93)throw C("NamedType");x(),t={kind:"ListType",type:t}}while(e--);return t}function G(){if(l.charCodeAt(s++)!==123)throw C("SelectionSet");return x(),U()}function U(){var e=[];do if(l.charCodeAt(s)===46){if(l.charCodeAt(++s)!==46||l.charCodeAt(++s)!==46)throw C("SelectionSet");switch(s++,x(),l.charCodeAt(s)){case 64:e.push({kind:"InlineFragment",typeCondition:void 0,directives:I(!1),selectionSet:G()});break;case 111:l.charCodeAt(s+1)===110?(s+=2,x(),e.push({kind:"InlineFragment",typeCondition:{kind:"NamedType",name:V()},directives:I(!1),selectionSet:G()})):e.push({kind:"FragmentSpread",name:V(),directives:I(!1)});break;case 123:s++,x(),e.push({kind:"InlineFragment",typeCondition:void 0,directives:void 0,selectionSet:U()});break;default:e.push({kind:"FragmentSpread",name:V(),directives:I(!1)})}}else{var t=V(),r=void 0;l.charCodeAt(s)===58&&(s++,x(),r=t,t=V());var n=be(!1),i=I(!1),a=void 0;l.charCodeAt(s)===123&&(s++,x(),a=U()),e.push({kind:"Field",alias:r,name:t,arguments:n,directives:i,selectionSet:a})}while(l.charCodeAt(s)!==125);return s++,x(),{kind:"SelectionSet",selections:e}}function qe(){if(x(),l.charCodeAt(s)===40){var e=[];s++,x();do{var t=void 0;if(l.charCodeAt(s)===34&&(t=$(!0)),l.charCodeAt(s++)!==36)throw C("Variable");var r=V();if(l.charCodeAt(s++)!==58)throw C("VariableDefinition");x();var n=_e(),i=void 0;l.charCodeAt(s)===61&&(s++,x(),i=$(!0)),x();var a={kind:"VariableDefinition",variable:{kind:"Variable",name:r},type:n,defaultValue:i,directives:I(!0)};t&&(a.description=t),e.push(a)}while(l.charCodeAt(s)!==41);return s++,x(),e}}function Ve(e){var t=V();if(l.charCodeAt(s++)!==111||l.charCodeAt(s++)!==110)throw C("FragmentDefinition");x();var r={kind:"FragmentDefinition",name:t,typeCondition:{kind:"NamedType",name:V()},directives:I(!1),selectionSet:G()};return e&&(r.description=e),r}function fe(){var e=[];do{var t=void 0;if(l.charCodeAt(s)===34&&(t=$(!0)),l.charCodeAt(s)===123){if(t)throw C("Document");s++,x(),e.push({kind:"OperationDefinition",operation:"query",name:void 0,variableDefinitions:void 0,directives:void 0,selectionSet:U()})}else{var r=oe();switch(r){case"fragment":e.push(Ve(t));break;case"query":case"mutation":case"subscription":var n,i=void 0;(n=l.charCodeAt(s))!==40&&n!==64&&n!==123&&(i=V());var a={kind:"OperationDefinition",operation:r,name:i,variableDefinitions:qe(),directives:I(!1),selectionSet:G()};t&&(a.description=t),e.push(a);break;default:throw C("Document")}}}while(s<l.length);return e}function Pe(e,t){return l=e.body?e.body:e,s=0,x(),t&&t.noLocation?{kind:"Document",definitions:fe()}:{kind:"Document",definitions:fe(),loc:{start:0,end:l.length,startToken:void 0,endToken:void 0,source:{body:l,name:"graphql.web",locationOffset:{line:1,column:1}}}}}function _(e,t,r){for(var n="",i=0;i<e.length;i++)i&&(n+=t),n+=r(e[i]);return n}function je(e){return JSON.stringify(e)}function Ie(e){return`"""
4
4
  `+e.replace(/"""/g,'\\"""')+`
5
5
  """`}var P=`
6
6
  `,E={OperationDefinition(e){var t="";e.description&&(t+=E.StringValue(e.description)+`
7
- `),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+_(e.variableDefinitions,", ",E.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive));var r=E.SelectionSet(e.selectionSet);return t!=="query"?t+" "+r:r},VariableDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+" "),t+=E.Variable(e.variable)+": "+$(e.type),e.defaultValue&&(t+=" = "+$(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var r=_(e.arguments,", ",E.Argument);t.length+r.length+2>80?t+="("+(P+=" ")+_(e.arguments,P,E.Argument)+(P=P.slice(0,-2))+")":t+="("+r+")"}return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+E.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?je(e.value).replace(/\n/g,P):$e(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+_(e.values,", ",$)+"]",ObjectValue:e=>"{"+_(e.fields,", ",E.ObjectField)+"}",ObjectField:e=>e.name.value+": "+$(e.value),Document(e){return!e.definitions||!e.definitions.length?"":_(e.definitions,`
7
+ `),t+=e.operation,e.name&&(t+=" "+e.name.value),e.variableDefinitions&&e.variableDefinitions.length&&(e.name||(t+=" "),t+="("+_(e.variableDefinitions,", ",E.VariableDefinition)+")"),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive));var r=E.SelectionSet(e.selectionSet);return t!=="query"?t+" "+r:r},VariableDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+" "),t+=E.Variable(e.variable)+": "+j(e.type),e.defaultValue&&(t+=" = "+j(e.defaultValue)),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},Field(e){var t=e.alias?e.alias.value+": "+e.name.value:e.name.value;if(e.arguments&&e.arguments.length){var r=_(e.arguments,", ",E.Argument);t.length+r.length+2>80?t+="("+(P+=" ")+_(e.arguments,P,E.Argument)+(P=P.slice(0,-2))+")":t+="("+r+")"}return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),e.selectionSet&&e.selectionSet.selections.length&&(t+=" "+E.SelectionSet(e.selectionSet)),t},StringValue(e){return e.block?Ie(e.value).replace(/\n/g,P):je(e.value)},BooleanValue:e=>""+e.value,NullValue:e=>"null",IntValue:e=>e.value,FloatValue:e=>e.value,EnumValue:e=>e.value,Name:e=>e.value,Variable:e=>"$"+e.name.value,ListValue:e=>"["+_(e.values,", ",j)+"]",ObjectValue:e=>"{"+_(e.fields,", ",E.ObjectField)+"}",ObjectField:e=>e.name.value+": "+j(e.value),Document(e){return!e.definitions||!e.definitions.length?"":_(e.definitions,`
8
8
 
9
- `,$)},SelectionSet:e=>"{"+(P+=" ")+_(e.selections,P,$)+(P=P.slice(0,-2))+"}",Argument:e=>e.name.value+": "+$(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+=" "+E.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+`
10
- `),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+" "+E.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+_(e.arguments,", ",E.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+$(e.type)+"]",NonNullType:e=>$(e.type)+"!"},$=e=>E[e.kind](e);function Ie(e){return P=`
11
- `,E[e.kind]?E[e.kind](e):""}var Re=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new ne(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new ne(e);class se extends Error{constructor(t){var r=(t.graphQLErrors||[]).map(Re),n=((i,a)=>{var o="";if(i)return`[Network] ${i.message}`;if(a)for(var v=0,h=a.length;v<h;v++)o&&(o+=`
12
- `),o+=`[GraphQL] ${a[v].message}`;return o})(t.networkError,r);super(n),this.name="CombinedError",this.message=n,this.graphQLErrors=r,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var J=(e,t)=>{for(var r=0|(t||5381),n=0,i=0|e.length;n<i;n++)r=(r<<5)+r+e.charCodeAt(n);return r},I=new Set,de=new WeakMap,T=(e,t)=>{if(e===null||I.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return T(e.toJSON(),t);if(Array.isArray(e)){for(var r="[",n=0,i=e.length;n<i;n++)r.length>1&&(r+=","),r+=T(e[n],t)||"null";return r+="]"}else if(!t&&(W!==L&&e instanceof W||Y!==L&&e instanceof Y))return"null";var a=Object.keys(e).sort();if(!a.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=de.get(e)||Math.random().toString(36).slice(2);return de.set(e,o),T({__key:o},t)}I.add(e);for(var v="{",h=0,k=a.length;h<k;h++){var y=T(e[a[h]],t);y&&(v.length>1&&(v+=","),v+=T(a[h],t)+":"+y)}return I.delete(e),v+="}"},ae=(e,t,r)=>{if(!(r==null||typeof r!="object"||r.toJSON||I.has(r)))if(Array.isArray(r))for(var n=0,i=r.length;n<i;n++)ae(e,`${t}.${n}`,r[n]);else if(r instanceof W||r instanceof Y)e.set(t,r);else{I.add(r);for(var a in r)ae(e,`${t}.${a}`,r[a])}},z=(e,t)=>(I.clear(),T(e,t||!1));class L{}var W=typeof File<"u"?File:L,Y=typeof Blob<"u"?Blob:L,Te=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,Fe=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,Me=(e,t)=>t%2==0?e.replace(Fe,`
13
- `):e,ve=e=>e.split(Te).map(Me).join("").trim(),he=new Map,B=new Map,ue=e=>{var t;return typeof e=="string"?t=ve(e):e.loc&&B.get(e.__key)===e?t=e.loc.source.body:(t=he.get(e)||ve(Ie(e)),he.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},pe=e=>{var t;if(e.documentId)t=J(e.documentId);else if(t=J(ue(e)),e.definitions){var r=we(e);r&&(t=J(`
14
- # ${r}`,t))}return t},Le=e=>{var t,r;return typeof e=="string"?(t=pe(e),r=B.get(t)||Pe(e,{noLocation:!0})):(t=e.__key||pe(e),r=B.get(t)||e),r.loc||ue(r),r.__key=t,B.set(t,r),r},F=(e,t,r)=>{var n=t||{},i=Le(e),a=z(n,!0),o=i.__key;return a!=="{}"&&(o=J(a,o)),{key:o,query:i,variables:n,extensions:r}},we=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.name?n.name.value:void 0}},Qe=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.operation}},ye=(e,t,r)=>{if(!("data"in t||"errors"in t&&Array.isArray(t.errors)))throw new Error("No Content");var n=e.kind==="subscription";return{operation:e,data:t.data,error:Array.isArray(t.errors)?new se({graphQLErrors:t.errors,response:r}):void 0,extensions:t.extensions?{...t.extensions}:void 0,hasNext:t.hasNext==null?n:t.hasNext,stale:!1}},H=(e,t)=>{if(typeof e=="object"&&e!=null){if(Array.isArray(e)){e=[...e];for(var r=0,n=t.length;r<n;r++)e[r]=H(e[r],t[r]);return e}if(!e.constructor||e.constructor===Object){e={...e};for(var i in t)e[i]=H(e[i],t[i]);return e}}return t},Je=(e,t,r,n)=>{var i=e.error?e.error.graphQLErrors:[],a=!!e.extensions||!!(t.payload||t).extensions,o={...e.extensions,...(t.payload||t).extensions},v=t.incremental;"path"in t&&(v=[t]);var h={data:e.data};if(v)for(var k=function(){var m=v[y];Array.isArray(m.errors)&&i.push(...m.errors),m.extensions&&(Object.assign(o,m.extensions),a=!0);var b="data",p=h,w=[];if(m.path)w=m.path;else if(n){var S=n.find((d=>d.id===m.id));m.subPath?w=[...S.path,...m.subPath]:w=S.path}for(var f=0,A=w.length;f<A;b=w[f++])p=p[b]=Array.isArray(p[b])?[...p[b]]:{...p[b]};if(m.items)for(var N=+b>=0?b:0,u=0,g=m.items.length;u<g;u++)p[N+u]=H(p[N+u],m.items[u]);else m.data!==void 0&&(p[b]=H(p[b],m.data))},y=0,O=v.length;y<O;y++)k();else h.data=(t.payload||t).data||e.data,i=t.errors||t.payload&&t.payload.errors||i;return{operation:e.operation,data:h.data,error:i.length?new se({graphQLErrors:i,response:r}):void 0,extensions:a?o:void 0,hasNext:t.hasNext!=null?t.hasNext:e.hasNext,stale:!1}},Oe=(e,t,r)=>({operation:e,data:void 0,error:new se({networkError:t,response:r}),extensions:void 0,hasNext:!1,stale:!1});function Be(e){var t={query:void 0,documentId:void 0,operationName:we(e.query),variables:e.variables||void 0,extensions:e.extensions};return"documentId"in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?t.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(t.query=ue(e.query)),t}var Ge=(e,t)=>{var r=e.kind==="query"&&e.context.preferGetMethod;if(!r||!t)return e.context.url;var n=Ue(e.context.url);for(var i in t){var a=t[i];a&&n[1].set(i,typeof a=="object"?z(a):a)}var o=n.join("?");return o.length>2047&&r!=="force"?(e.context.preferGetMethod=!1,e.context.url):o},Ue=e=>{var t=e.indexOf("?");return t>-1?[e.slice(0,t),new URLSearchParams(e.slice(t+1))]:[e,new URLSearchParams]},ze=(e,t)=>{if(t&&!(e.kind==="query"&&e.context.preferGetMethod)){var r=z(t),n=(v=>{var h=new Map;return(W!==L||Y!==L)&&(I.clear(),ae(h,"variables",v)),h})(t.variables);if(n.size){var i=new FormData;i.append("operations",r),i.append("map",z({...[...n.keys()].map((v=>[v]))}));var a=0;for(var o of n.values())i.append(""+a++,o);return i}return r}},We=(e,t)=>{var r={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},n=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(n.headers)if((o=>"has"in o&&!Object.keys(o).length)(n.headers))n.headers.forEach(((o,v)=>{r[v]=o}));else if(Array.isArray(n.headers))n.headers.forEach(((o,v)=>{Array.isArray(o)?r[o[0]]?r[o[0]]=`${r[o[0]]},${o[1]}`:r[o[0]]=o[1]:r[v]=o}));else for(var i in n.headers)r[i.toLowerCase()]=n.headers[i];var a=ze(e,t);return typeof a=="string"&&!r["content-type"]&&(r["content-type"]="application/json"),{...n,method:a?"POST":"GET",body:a,headers:r}},Ye=/boundary="?([^=";]+)"?/i,He=/data: ?([^\n]+)/;async function*me(e){if(e.body[Symbol.asyncIterator])for await(var t of e.body)yield t;else{var r=e.body.getReader(),n;try{for(;!(n=await r.read()).done;)yield n.value}finally{r.cancel()}}}async function*ge(e,t){var r=typeof TextDecoder<"u"?new TextDecoder:null,n="",i;for await(var a of e)for(n+=a.constructor.name==="Buffer"?a.toString():r.decode(a,{stream:!0});(i=n.indexOf(t))>-1;)yield n.slice(0,i),n=n.slice(i+t.length)}async function*Ke(e,t,r){var n=!0,i=null,a;try{yield await Promise.resolve();var o=(a=await(e.context.fetch||fetch)(t,r)).headers.get("Content-Type")||"",v;/multipart\/mixed/i.test(o)?v=(async function*(O,m){var b=O.match(Ye),p="--"+(b?b[1]:"-"),w=!0,S;for await(var f of ge(me(m),`\r
9
+ `,j)},SelectionSet:e=>"{"+(P+=" ")+_(e.selections,P,j)+(P=P.slice(0,-2))+"}",Argument:e=>e.name.value+": "+j(e.value),FragmentSpread(e){var t="..."+e.name.value;return e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t},InlineFragment(e){var t="...";return e.typeCondition&&(t+=" on "+e.typeCondition.name.value),e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+=" "+E.SelectionSet(e.selectionSet)},FragmentDefinition(e){var t="";return e.description&&(t+=E.StringValue(e.description)+`
10
+ `),t+="fragment "+e.name.value,t+=" on "+e.typeCondition.name.value,e.directives&&e.directives.length&&(t+=" "+_(e.directives," ",E.Directive)),t+" "+E.SelectionSet(e.selectionSet)},Directive(e){var t="@"+e.name.value;return e.arguments&&e.arguments.length&&(t+="("+_(e.arguments,", ",E.Argument)+")"),t},NamedType:e=>e.name.value,ListType:e=>"["+j(e.type)+"]",NonNullType:e=>j(e.type)+"!"},j=e=>E[e.kind](e);function Re(e){return P=`
11
+ `,E[e.kind]?E[e.kind](e):""}var Te=e=>e&&typeof e.message=="string"&&(e.extensions||e.name==="GraphQLError")?e:typeof e=="object"&&typeof e.message=="string"?new ne(e.message,e.nodes,e.source,e.positions,e.path,e,e.extensions||{}):new ne(e);class se extends Error{constructor(t){var r=(t.graphQLErrors||[]).map(Te),n=((i,a)=>{var o="";if(i)return`[Network] ${i.message}`;if(a)for(var v=0,h=a.length;v<h;v++)o&&(o+=`
12
+ `),o+=`[GraphQL] ${a[v].message}`;return o})(t.networkError,r);super(n),this.name="CombinedError",this.message=n,this.graphQLErrors=r,this.networkError=t.networkError,this.response=t.response}toString(){return this.message}}var J=(e,t)=>{for(var r=0|(t||5381),n=0,i=0|e.length;n<i;n++)r=(r<<5)+r+e.charCodeAt(n);return r},R=new Set,de=new WeakMap,F=(e,t)=>{if(e===null||R.has(e))return"null";if(typeof e!="object")return JSON.stringify(e)||"";if(e.toJSON)return F(e.toJSON(),t);if(Array.isArray(e)){for(var r="[",n=0,i=e.length;n<i;n++)r.length>1&&(r+=","),r+=F(e[n],t)||"null";return r+="]"}else if(!t&&(W!==L&&e instanceof W||Y!==L&&e instanceof Y))return"null";var a=Object.keys(e).sort();if(!a.length&&e.constructor&&Object.getPrototypeOf(e).constructor!==Object.prototype.constructor){var o=de.get(e)||Math.random().toString(36).slice(2);return de.set(e,o),F({__key:o},t)}R.add(e);for(var v="{",h=0,k=a.length;h<k;h++){var y=F(e[a[h]],t);y&&(v.length>1&&(v+=","),v+=F(a[h],t)+":"+y)}return R.delete(e),v+="}"},ae=(e,t,r)=>{if(!(r==null||typeof r!="object"||r.toJSON||R.has(r)))if(Array.isArray(r))for(var n=0,i=r.length;n<i;n++)ae(e,`${t}.${n}`,r[n]);else if(r instanceof W||r instanceof Y)e.set(t,r);else{R.add(r);for(var a in r)ae(e,`${t}.${a}`,r[a])}},z=(e,t)=>(R.clear(),F(e,t||!1));class L{}var W=typeof File<"u"?File:L,Y=typeof Blob<"u"?Blob:L,Fe=/("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g,Me=/(?:#[^\n\r]+)?(?:[\r\n]+|$)/g,$e=(e,t)=>t%2==0?e.replace(Me,`
13
+ `):e,ve=e=>e.split(Fe).map($e).join("").trim(),he=new Map,B=new Map,ue=e=>{var t;return typeof e=="string"?t=ve(e):e.loc&&B.get(e.__key)===e?t=e.loc.source.body:(t=he.get(e)||ve(Re(e)),he.set(e,t)),typeof e!="string"&&!e.loc&&(e.loc={start:0,end:t.length,source:{body:t,name:"gql",locationOffset:{line:1,column:1}}}),t},pe=e=>{var t;if(e.documentId)t=J(e.documentId);else if(t=J(ue(e)),e.definitions){var r=we(e);r&&(t=J(`
14
+ # ${r}`,t))}return t},Le=e=>{var t,r;return typeof e=="string"?(t=pe(e),r=B.get(t)||Pe(e,{noLocation:!0})):(t=e.__key||pe(e),r=B.get(t)||e),r.loc||ue(r),r.__key=t,B.set(t,r),r},M=(e,t,r)=>{var n=t||{},i=Le(e),a=z(n,!0),o=i.__key;return a!=="{}"&&(o=J(a,o)),{key:o,query:i,variables:n,extensions:r}},we=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.name?n.name.value:void 0}},Qe=e=>{for(var t=0,r=e.definitions.length;t<r;t++){var n=e.definitions[t];if(n.kind===xe.OPERATION_DEFINITION)return n.operation}},ye=(e,t,r)=>{if(!("data"in t||"errors"in t&&Array.isArray(t.errors)))throw new Error("No Content");var n=e.kind==="subscription";return{operation:e,data:t.data,error:Array.isArray(t.errors)?new se({graphQLErrors:t.errors,response:r}):void 0,extensions:t.extensions?{...t.extensions}:void 0,hasNext:t.hasNext==null?n:t.hasNext,stale:!1}},H=(e,t)=>{if(typeof e=="object"&&e!=null){if(Array.isArray(e)){e=[...e];for(var r=0,n=t.length;r<n;r++)e[r]=H(e[r],t[r]);return e}if(!e.constructor||e.constructor===Object){e={...e};for(var i in t)e[i]=H(e[i],t[i]);return e}}return t},Je=(e,t,r,n)=>{var i=e.error?e.error.graphQLErrors:[],a=!!e.extensions||!!(t.payload||t).extensions,o={...e.extensions,...(t.payload||t).extensions},v=t.incremental;"path"in t&&(v=[t]);var h={data:e.data};if(v)for(var k=function(){var m=v[y];Array.isArray(m.errors)&&i.push(...m.errors),m.extensions&&(Object.assign(o,m.extensions),a=!0);var b="data",p=h,w=[];if(m.path)w=m.path;else if(n){var S=n.find((d=>d.id===m.id));m.subPath?w=[...S.path,...m.subPath]:w=S.path}for(var f=0,A=w.length;f<A;b=w[f++])p=p[b]=Array.isArray(p[b])?[...p[b]]:{...p[b]};if(m.items)for(var N=+b>=0?b:0,u=0,g=m.items.length;u<g;u++)p[N+u]=H(p[N+u],m.items[u]);else m.data!==void 0&&(p[b]=H(p[b],m.data))},y=0,O=v.length;y<O;y++)k();else h.data=(t.payload||t).data||e.data,i=t.errors||t.payload&&t.payload.errors||i;return{operation:e.operation,data:h.data,error:i.length?new se({graphQLErrors:i,response:r}):void 0,extensions:a?o:void 0,hasNext:t.hasNext!=null?t.hasNext:e.hasNext,stale:!1}},Oe=(e,t,r)=>({operation:e,data:void 0,error:new se({networkError:t,response:r}),extensions:void 0,hasNext:!1,stale:!1});function Be(e){var t={query:void 0,documentId:void 0,operationName:we(e.query),variables:e.variables||void 0,extensions:e.extensions};return"documentId"in e.query&&e.query.documentId&&(!e.query.definitions||!e.query.definitions.length)?t.documentId=e.query.documentId:(!e.extensions||!e.extensions.persistedQuery||e.extensions.persistedQuery.miss)&&(t.query=ue(e.query)),t}var Ge=(e,t)=>{var r=e.kind==="query"&&e.context.preferGetMethod;if(!r||!t)return e.context.url;var n=Ue(e.context.url);for(var i in t){var a=t[i];a&&n[1].set(i,typeof a=="object"?z(a):a)}var o=n.join("?");return o.length>2047&&r!=="force"?(e.context.preferGetMethod=!1,e.context.url):o},Ue=e=>{var t=e.indexOf("?");return t>-1?[e.slice(0,t),new URLSearchParams(e.slice(t+1))]:[e,new URLSearchParams]},ze=(e,t)=>{if(t&&!(e.kind==="query"&&e.context.preferGetMethod)){var r=z(t),n=(v=>{var h=new Map;return(W!==L||Y!==L)&&(R.clear(),ae(h,"variables",v)),h})(t.variables);if(n.size){var i=new FormData;i.append("operations",r),i.append("map",z({...[...n.keys()].map((v=>[v]))}));var a=0;for(var o of n.values())i.append(""+a++,o);return i}return r}},We=(e,t)=>{var r={accept:e.kind==="subscription"?"text/event-stream, multipart/mixed":"application/graphql-response+json, application/graphql+json, application/json, text/event-stream, multipart/mixed"},n=(typeof e.context.fetchOptions=="function"?e.context.fetchOptions():e.context.fetchOptions)||{};if(n.headers)if((o=>"has"in o&&!Object.keys(o).length)(n.headers))n.headers.forEach(((o,v)=>{r[v]=o}));else if(Array.isArray(n.headers))n.headers.forEach(((o,v)=>{Array.isArray(o)?r[o[0]]?r[o[0]]=`${r[o[0]]},${o[1]}`:r[o[0]]=o[1]:r[v]=o}));else for(var i in n.headers)r[i.toLowerCase()]=n.headers[i];var a=ze(e,t);return typeof a=="string"&&!r["content-type"]&&(r["content-type"]="application/json"),{...n,method:a?"POST":"GET",body:a,headers:r}},Ye=/boundary="?([^=";]+)"?/i,He=/data: ?([^\n]+)/;async function*me(e){if(e.body[Symbol.asyncIterator])for await(var t of e.body)yield t;else{var r=e.body.getReader(),n;try{for(;!(n=await r.read()).done;)yield n.value}finally{r.cancel()}}}async function*ge(e,t){var r=typeof TextDecoder<"u"?new TextDecoder:null,n="",i;for await(var a of e)for(n+=a.constructor.name==="Buffer"?a.toString():r.decode(a,{stream:!0});(i=n.indexOf(t))>-1;)yield n.slice(0,i),n=n.slice(i+t.length)}async function*Ke(e,t,r){var n=!0,i=null,a;try{yield await Promise.resolve();var o=(a=await(e.context.fetch||fetch)(t,r)).headers.get("Content-Type")||"",v;/multipart\/mixed/i.test(o)?v=(async function*(O,m){var b=O.match(Ye),p="--"+(b?b[1]:"-"),w=!0,S;for await(var f of ge(me(m),`\r
15
15
  `+p)){if(w){w=!1;var A=f.indexOf(p);if(A>-1)f=f.slice(A+p.length);else continue}try{yield S=JSON.parse(f.slice(f.indexOf(`\r
16
16
  \r
17
17
  `)+4))}catch(N){if(!S)throw N}if(S&&S.hasNext===!1)break}S&&S.hasNext!==!1&&(yield{hasNext:!1})})(o,a):/text\/event-stream/i.test(o)?v=(async function*(O){var m;for await(var b of ge(me(O),`
18
18
 
19
- `)){var p=b.match(He);if(p){var w=p[1];try{yield m=JSON.parse(w)}catch(S){if(!m)throw S}if(m&&m.hasNext===!1)break}}m&&m.hasNext!==!1&&(yield{hasNext:!1})})(a):/text\//i.test(o)?v=(async function*(O){var m=await O.text();try{var b=JSON.parse(m);process.env.NODE_ENV!=="production"&&console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'),yield b}catch{throw new Error(m)}})(a):v=(async function*(O){yield JSON.parse(await O.text())})(a);var h;for await(var k of v)k.pending&&!i?h=k.pending:k.pending&&(h=[...h,...k.pending]),i=i?Je(i,k,a,h):ye(e,k,a),n=!1,yield i,n=!0;i||(yield i=ye(e,{},a))}catch(y){if(!n)throw y;yield Oe(e,a&&(a.status<200||a.status>=300)&&a.statusText?new Error(a.statusText):y,a)}}function Xe(e,t,r){var n;return typeof AbortController<"u"&&(r.signal=(n=new AbortController).signal),c.onEnd((()=>{n&&n.abort()}))(c.filter$1((i=>!!i))(c.fromAsyncIterable(Ke(e,t,r))))}function ke(e){var t=r=>e(r);return t.toPromise=()=>c.toPromise(c.take(1)(c.filter$1((r=>!r.stale&&!r.hasNext))(t))),t.then=(r,n)=>t.toPromise().then(r,n),t.subscribe=r=>c.subscribe(r)(t),t}function K(e,t,r){return{...t,kind:e,context:t.context?{...t.context,...r}:r||t.context}}var Ze=()=>{},et=({forward:e,dispatchDebug:t})=>r=>{var n=c.mergeMap((a=>{var o=Be(a),v=Ge(a,o),h=We(a,o);process.env.NODE_ENV!=="production"&&t({type:"fetchRequest",message:"A fetch request is being executed.",operation:a,data:{url:v,fetchOptions:h},source:"fetchExchange"});var k=c.takeUntil(c.filter$1((y=>y.kind==="teardown"&&y.key===a.key))(r))(Xe(a,v,h));return process.env.NODE_ENV!=="production"?c.onPush((y=>{var O=y.data?void 0:y.error;process.env.NODE_ENV!=="production"&&t({type:O?"fetchError":"fetchSuccess",message:`A ${O?"failed":"successful"} fetch response has been returned.`,operation:a,data:{url:v,fetchOptions:h,value:O||y},source:"fetchExchange"})}))(k):k}))(c.filter$1((a=>a.kind!=="teardown"&&(a.kind!=="subscription"||!!a.context.fetchSubscriptions)))(r)),i=e(c.filter$1((a=>a.kind==="teardown"||a.kind==="subscription"&&!a.context.fetchSubscriptions))(r));return c.merge([n,i])},tt=e=>({client:t,forward:r,dispatchDebug:n})=>e.reduceRight(((i,a)=>{var o=!1;return a({client:t,forward(v){if(process.env.NODE_ENV!=="production"){if(o)throw new Error("forward() must only be called once in each Exchange.");o=!0}return c.share(i(c.share(v)))},dispatchDebug(v){process.env.NODE_ENV!=="production"&&n({timestamp:Date.now(),source:a.name,...v})}})}),r),rt=({dispatchDebug:e})=>t=>(process.env.NODE_ENV!=="production"&&(t=c.onPush((r=>{if(r.kind!=="teardown"&&process.env.NODE_ENV!=="production"){var n=`No exchange has handled operations of kind "${r.kind}". Check whether you've added an exchange responsible for these operations.`;process.env.NODE_ENV!=="production"&&e({type:"fallbackCatch",message:n,operation:r,source:"fallbackExchange"}),console.warn(n)}}))(t)),c.filter$1((r=>!1))(t)),nt=function e(t){if(process.env.NODE_ENV!=="production"&&!t.url)throw new Error("You are creating an urql-client without a url.");var r=0,n=new Map,i=new Map,a=new Set,o=[],v={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod,requestPolicy:t.requestPolicy||"cache-first"},h=c.makeSubject();function k(u){(u.kind==="mutation"||u.kind==="teardown"||!a.has(u.key))&&(u.kind==="teardown"?a.delete(u.key):u.kind!=="mutation"&&a.add(u.key),h.next(u))}var y=!1;function O(u){if(u&&k(u),!y){for(y=!0;y&&(u=o.shift());)k(u);y=!1}}var m=u=>{var g=c.takeUntil(c.filter$1((d=>d.kind==="teardown"&&d.key===u.key))(h.source))(c.filter$1((d=>d.operation.kind===u.kind&&d.operation.key===u.key&&(!d.operation.context._instance||d.operation.context._instance===u.context._instance)))(N));return u.kind!=="query"?g=c.takeWhile((d=>!!d.hasNext),!0)(g):g=c.switchMap((d=>{var D=c.fromValue(d);return d.stale||d.hasNext?D:c.merge([D,c.map((()=>(d.stale=!0,d)))(c.take(1)(c.filter$1((R=>R.key===u.key))(h.source)))])}))(g),u.kind!=="mutation"?g=c.onEnd((()=>{a.delete(u.key),n.delete(u.key),i.delete(u.key),y=!1;for(var d=o.length-1;d>=0;d--)o[d].key===u.key&&o.splice(d,1);k(K("teardown",u,u.context))}))(c.onPush((d=>{if(d.stale)if(!d.hasNext)a.delete(u.key);else for(var D=0;D<o.length;D++){var R=o[D];if(R.key===d.operation.key){a.delete(R.key);break}}else d.hasNext||a.delete(u.key);n.set(u.key,d)}))(g)):g=c.onStart((()=>{k(u)}))(g),c.share(g)},b=this instanceof e?this:Object.create(e.prototype),p=Object.assign(b,{suspense:!!t.suspense,operations$:h.source,reexecuteOperation(u){if(u.kind==="teardown")O(u);else if(u.kind==="mutation")o.push(u),Promise.resolve().then(O);else if(i.has(u.key)){for(var g=!1,d=0;d<o.length;d++)o[d].key===u.key&&(o[d]=u,g=!0);g||a.has(u.key)&&u.context.requestPolicy!=="network-only"?(a.delete(u.key),Promise.resolve().then(O)):(o.push(u),Promise.resolve().then(O))}},createRequestOperation(u,g,d){d||(d={});var D;if(process.env.NODE_ENV!=="production"&&u!=="teardown"&&(D=Qe(g.query))!==u)throw new Error(`Expected operation of type "${u}" but found "${D}"`);return K(u,g,{_instance:u==="mutation"?r=r+1|0:void 0,...v,...d,requestPolicy:d.requestPolicy||v.requestPolicy,suspense:d.suspense||d.suspense!==!1&&p.suspense})},executeRequestOperation(u){return u.kind==="mutation"?ke(m(u)):ke(c.lazy((()=>{var g=i.get(u.key);g||i.set(u.key,g=m(u)),g=c.onStart((()=>{O(u)}))(g);var d=n.get(u.key);return u.kind==="query"&&d&&(d.stale||d.hasNext)?c.switchMap(c.fromValue)(c.merge([g,c.filter$1((D=>D===n.get(u.key)))(c.fromValue(d))])):g})))},executeQuery(u,g){var d=p.createRequestOperation("query",u,g);return p.executeRequestOperation(d)},executeSubscription(u,g){var d=p.createRequestOperation("subscription",u,g);return p.executeRequestOperation(d)},executeMutation(u,g){var d=p.createRequestOperation("mutation",u,g);return p.executeRequestOperation(d)},readQuery(u,g,d){var D=null;return c.subscribe((R=>{D=R}))(p.query(u,g,d)).unsubscribe(),D},query:(u,g,d)=>p.executeQuery(F(u,g),d),subscription:(u,g,d)=>p.executeSubscription(F(u,g),d),mutation:(u,g,d)=>p.executeMutation(F(u,g),d)}),w=Ze;if(process.env.NODE_ENV!=="production"){var{next:S,source:f}=c.makeSubject();p.subscribeToDebugTarget=u=>c.subscribe(u)(f),w=S}var A=tt(t.exchanges),N=c.share(A({client:p,dispatchDebug:w,forward:rt({dispatchDebug:w})})(h.source));return c.publish(N),p},Ae={},Z=q.createContext(Ae),at=Z.Provider;Z.Consumer;Z.displayName="UrqlContext";var ce=()=>{var e=q.useContext(Z);if(e===Ae&&process.env.NODE_ENV!=="production"){var t="No client has been specified using urql's Provider. please create a client and add a Provider.";throw console.error(t),new Error(t)}return e},ie={fetching:!1,stale:!1,hasNext:!1,error:void 0,data:void 0,extensions:void 0,operation:void 0},it=(e,t)=>e===t||!(!e||!t||e.key!==t.key),ee=(e,t)=>{var r={...e,...t,data:t.data!==void 0||t.error?t.data:e.data,fetching:!!t.fetching,stale:!!t.stale};return((n,i)=>{for(var a in n)if(!(a in i))return!0;for(var o in i)if(o==="operation"?!it(n[o],i[o]):n[o]!==i[o])return!0;return!1})(e,r)?r:e},ot=(e,t)=>{for(var r=0,n=t.length;r<n;r++)if(e[r]!==t[r])return!0;return!1},te=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t){process.env.NODE_ENV!=="production"&&te&&te.ReactCurrentOwner&&te.ReactCurrentOwner.current?Promise.resolve(t).then(e):e(t)}function st(e){var t=q.useRef(!0),r=ce(),[n,i]=q.useState(ie),a=q.useCallback(((o,v)=>(X(i,{...ie,fetching:!0}),c.toPromise(c.take(1)(c.filter$1((h=>!h.hasNext))(c.onPush((h=>{t.current&&X(i,{fetching:!1,stale:h.stale,data:h.data,error:h.error,extensions:h.extensions,operation:h.operation,hasNext:h.hasNext})}))(r.executeMutation(F(e,o),v||{}))))))),[r,e,i]);return q.useEffect((()=>(t.current=!0,()=>{t.current=!1})),[]),[n,a]}function ut(e,t){var r=q.useRef(void 0);return q.useMemo((()=>{var n=F(e,t);return r.current!==void 0&&r.current.key===n.key?r.current:(r.current=n,n)}),[e,t])}var ct=e=>{if(!e._react){var t=new Set,r=new Map;e.operations$&&c.subscribe((n=>{n.kind==="teardown"&&t.has(n.key)&&(t.delete(n.key),r.delete(n.key))}))(e.operations$),e._react={get:n=>r.get(n),set(n,i){t.delete(n),r.set(n,i)},dispose(n){t.add(n)}}}return e._react},lt=(e,t)=>t&&t.suspense!==void 0?!!t.suspense:e.suspense;function ft(e){var t=ce(),r=ct(t),n=lt(t,e.context),i=ut(e.query,e.variables),a=q.useMemo((()=>{if(e.pause)return null;var m=t.executeQuery(i,{requestPolicy:e.requestPolicy,...e.context});return n?c.onPush((b=>{r.set(i.key,b)}))(m):m}),[r,t,i,n,e.pause,e.requestPolicy,e.context]),o=q.useCallback(((m,b)=>{if(!m)return{fetching:!1};var p=r.get(i.key);if(p){if(b&&p!=null&&"then"in p)throw p}else{var w,S=c.subscribe((A=>{p=A,w&&w(p)}))(c.takeWhile((()=>b&&!w||!p||"hasNext"in p&&p.hasNext))(m));if(p==null&&b){var f=new Promise((A=>{w=A}));throw r.set(i.key,f),f}else S.unsubscribe()}return p||{fetching:!0}}),[r,i]),v=[t,i,e.requestPolicy,e.context,e.pause],[h,k]=q.useState((()=>[a,ee(ie,o(a,n)),v])),y=h[1];a!==h[0]&&ot(h[2],v)&&k([a,y=ee(h[1],o(a,n)),v]),q.useEffect((()=>{var m=h[0],b=h[2][1],p=!1,w=f=>{p=!0,X(k,(A=>{var N=ee(A[1],f);return A[1]!==N?[A[0],N,A[2]]:A}))};if(m){var S=c.subscribe(w)(c.onEnd((()=>{w({fetching:!1})}))(m));return p||w({fetching:!0}),()=>{r.dispose(b.key),S.unsubscribe()}}else w({fetching:!1})}),[r,h[0],h[2][1]]);var O=q.useCallback((m=>{var b={requestPolicy:e.requestPolicy,...e.context,...m};X(k,(p=>[n?c.onPush((w=>{r.set(i.key,w)}))(t.executeQuery(i,b)):t.executeQuery(i,b),p[1],v]))}),[t,r,i,n,e.requestPolicy,e.context,e.pause]);return[y,O]}var re=(e,t)=>K(e.kind,e,{...e.context,authAttempt:t});function dt(e){return({client:t,forward:r})=>{var n=new Set,i=c.makeSubject(),a=c.makeSubject(),o=new Map;function v(){k=void 0;var O=o;o=new Map,O.forEach(i.next)}function h(O){k=void 0;var m=o;o=new Map,m.forEach((b=>{a.next(Oe(b,O))}))}var k,y=null;return O=>{function m(){k=Promise.resolve().then((()=>e({mutate(f,A,N){var u=t.createRequestOperation("mutation",F(f,A),N);return c.toPromise(c.take(1)(c.filter$1((g=>g.operation.key===u.key&&u.context._instance===g.operation.context._instance))(c.onStart((()=>{var g=p(u);n.add(g.context._instance),i.next(g)}))(S))))},appendHeaders(f,A){var N=typeof f.context.fetchOptions=="function"?f.context.fetchOptions():f.context.fetchOptions||{};return K(f.kind,f,{...f.context,fetchOptions:{...N,headers:{...N.headers,...A}}})}}))).then((f=>{f&&(y=f),v()})).catch((f=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",f),h(f)}))}m();function b(f){o.set(f.key,re(f,!0)),y&&!k&&(k=y.refreshAuth().then(v).catch(h))}function p(f){return y?y.addAuthToOperation(f):f}var w=c.filter$1(Boolean)(c.map((f=>f.kind==="teardown"?(o.delete(f.key),f):f.context._instance&&n.has(f.context._instance)?f:f.context.authAttempt?p(f):k||!y?(k||m(),o.has(f.key)||o.set(f.key,re(f,!1)),null):(function(N){return!N.context.authAttempt&&y&&y.willAuthError&&y.willAuthError(N)})(f)?(b(f),null):p(re(f,!1))))(c.merge([i.source,O]))),S=r(w);return c.merge([a.source,c.filter$1((f=>!n.has(f.operation.context._instance)&&f.error&&(function(N){return y&&y.didAuthError&&y.didAuthError(N.error,N.operation)})(f)&&!f.operation.context.authAttempt?(b(f.operation),!1):(n.has(f.operation.context._instance)&&n.delete(f.operation.context._instance),!0)))(S)])}}}exports.C=nt;exports.authExchange=dt;exports.f=at;exports.fetchExchange=et;exports.useClient=ce;exports.useMutation=st;exports.useQuery=ft;
19
+ `)){var p=b.match(He);if(p){var w=p[1];try{yield m=JSON.parse(w)}catch(S){if(!m)throw S}if(m&&m.hasNext===!1)break}}m&&m.hasNext!==!1&&(yield{hasNext:!1})})(a):/text\//i.test(o)?v=(async function*(O){var m=await O.text();try{var b=JSON.parse(m);process.env.NODE_ENV!=="production"&&console.warn('Found response with content-type "text/plain" but it had a valid "application/json" response.'),yield b}catch{throw new Error(m)}})(a):v=(async function*(O){yield JSON.parse(await O.text())})(a);var h;for await(var k of v)k.pending&&!i?h=k.pending:k.pending&&(h=[...h,...k.pending]),i=i?Je(i,k,a,h):ye(e,k,a),n=!1,yield i,n=!0;i||(yield i=ye(e,{},a))}catch(y){if(!n)throw y;yield Oe(e,a&&(a.status<200||a.status>=300)&&a.statusText?new Error(a.statusText):y,a)}}function Xe(e,t,r){var n;return typeof AbortController<"u"&&(r.signal=(n=new AbortController).signal),c.onEnd((()=>{n&&n.abort()}))(c.filter((i=>!!i))(c.fromAsyncIterable(Ke(e,t,r))))}function ke(e){var t=r=>e(r);return t.toPromise=()=>c.toPromise(c.take(1)(c.filter((r=>!r.stale&&!r.hasNext))(t))),t.then=(r,n)=>t.toPromise().then(r,n),t.subscribe=r=>c.subscribe(r)(t),t}function K(e,t,r){return{...t,kind:e,context:t.context?{...t.context,...r}:r||t.context}}var Ze=()=>{},et=({forward:e,dispatchDebug:t})=>r=>{var n=c.mergeMap((a=>{var o=Be(a),v=Ge(a,o),h=We(a,o);process.env.NODE_ENV!=="production"&&t({type:"fetchRequest",message:"A fetch request is being executed.",operation:a,data:{url:v,fetchOptions:h},source:"fetchExchange"});var k=c.takeUntil(c.filter((y=>y.kind==="teardown"&&y.key===a.key))(r))(Xe(a,v,h));return process.env.NODE_ENV!=="production"?c.onPush((y=>{var O=y.data?void 0:y.error;process.env.NODE_ENV!=="production"&&t({type:O?"fetchError":"fetchSuccess",message:`A ${O?"failed":"successful"} fetch response has been returned.`,operation:a,data:{url:v,fetchOptions:h,value:O||y},source:"fetchExchange"})}))(k):k}))(c.filter((a=>a.kind!=="teardown"&&(a.kind!=="subscription"||!!a.context.fetchSubscriptions)))(r)),i=e(c.filter((a=>a.kind==="teardown"||a.kind==="subscription"&&!a.context.fetchSubscriptions))(r));return c.merge([n,i])},tt=e=>({client:t,forward:r,dispatchDebug:n})=>e.reduceRight(((i,a)=>{var o=!1;return a({client:t,forward(v){if(process.env.NODE_ENV!=="production"){if(o)throw new Error("forward() must only be called once in each Exchange.");o=!0}return c.share(i(c.share(v)))},dispatchDebug(v){process.env.NODE_ENV!=="production"&&n({timestamp:Date.now(),source:a.name,...v})}})}),r),rt=({dispatchDebug:e})=>t=>(process.env.NODE_ENV!=="production"&&(t=c.onPush((r=>{if(r.kind!=="teardown"&&process.env.NODE_ENV!=="production"){var n=`No exchange has handled operations of kind "${r.kind}". Check whether you've added an exchange responsible for these operations.`;process.env.NODE_ENV!=="production"&&e({type:"fallbackCatch",message:n,operation:r,source:"fallbackExchange"}),console.warn(n)}}))(t)),c.filter((r=>!1))(t)),nt=function e(t){if(process.env.NODE_ENV!=="production"&&!t.url)throw new Error("You are creating an urql-client without a url.");var r=0,n=new Map,i=new Map,a=new Set,o=[],v={url:t.url,fetchSubscriptions:t.fetchSubscriptions,fetchOptions:t.fetchOptions,fetch:t.fetch,preferGetMethod:t.preferGetMethod,requestPolicy:t.requestPolicy||"cache-first"},h=c.makeSubject();function k(u){(u.kind==="mutation"||u.kind==="teardown"||!a.has(u.key))&&(u.kind==="teardown"?a.delete(u.key):u.kind!=="mutation"&&a.add(u.key),h.next(u))}var y=!1;function O(u){if(u&&k(u),!y){for(y=!0;y&&(u=o.shift());)k(u);y=!1}}var m=u=>{var g=c.takeUntil(c.filter((d=>d.kind==="teardown"&&d.key===u.key))(h.source))(c.filter((d=>d.operation.kind===u.kind&&d.operation.key===u.key&&(!d.operation.context._instance||d.operation.context._instance===u.context._instance)))(N));return u.kind!=="query"?g=c.takeWhile((d=>!!d.hasNext),!0)(g):g=c.switchMap((d=>{var D=c.fromValue(d);return d.stale||d.hasNext?D:c.merge([D,c.map((()=>(d.stale=!0,d)))(c.take(1)(c.filter((T=>T.key===u.key))(h.source)))])}))(g),u.kind!=="mutation"?g=c.onEnd((()=>{a.delete(u.key),n.delete(u.key),i.delete(u.key),y=!1;for(var d=o.length-1;d>=0;d--)o[d].key===u.key&&o.splice(d,1);k(K("teardown",u,u.context))}))(c.onPush((d=>{if(d.stale)if(!d.hasNext)a.delete(u.key);else for(var D=0;D<o.length;D++){var T=o[D];if(T.key===d.operation.key){a.delete(T.key);break}}else d.hasNext||a.delete(u.key);n.set(u.key,d)}))(g)):g=c.onStart((()=>{k(u)}))(g),c.share(g)},b=this instanceof e?this:Object.create(e.prototype),p=Object.assign(b,{suspense:!!t.suspense,operations$:h.source,reexecuteOperation(u){if(u.kind==="teardown")O(u);else if(u.kind==="mutation")o.push(u),Promise.resolve().then(O);else if(i.has(u.key)){for(var g=!1,d=0;d<o.length;d++)o[d].key===u.key&&(o[d]=u,g=!0);g||a.has(u.key)&&u.context.requestPolicy!=="network-only"?(a.delete(u.key),Promise.resolve().then(O)):(o.push(u),Promise.resolve().then(O))}},createRequestOperation(u,g,d){d||(d={});var D;if(process.env.NODE_ENV!=="production"&&u!=="teardown"&&(D=Qe(g.query))!==u)throw new Error(`Expected operation of type "${u}" but found "${D}"`);return K(u,g,{_instance:u==="mutation"?r=r+1|0:void 0,...v,...d,requestPolicy:d.requestPolicy||v.requestPolicy,suspense:d.suspense||d.suspense!==!1&&p.suspense})},executeRequestOperation(u){return u.kind==="mutation"?ke(m(u)):ke(c.lazy((()=>{var g=i.get(u.key);g||i.set(u.key,g=m(u)),g=c.onStart((()=>{O(u)}))(g);var d=n.get(u.key);return u.kind==="query"&&d&&(d.stale||d.hasNext)?c.switchMap(c.fromValue)(c.merge([g,c.filter((D=>D===n.get(u.key)))(c.fromValue(d))])):g})))},executeQuery(u,g){var d=p.createRequestOperation("query",u,g);return p.executeRequestOperation(d)},executeSubscription(u,g){var d=p.createRequestOperation("subscription",u,g);return p.executeRequestOperation(d)},executeMutation(u,g){var d=p.createRequestOperation("mutation",u,g);return p.executeRequestOperation(d)},readQuery(u,g,d){var D=null;return c.subscribe((T=>{D=T}))(p.query(u,g,d)).unsubscribe(),D},query:(u,g,d)=>p.executeQuery(M(u,g),d),subscription:(u,g,d)=>p.executeSubscription(M(u,g),d),mutation:(u,g,d)=>p.executeMutation(M(u,g),d)}),w=Ze;if(process.env.NODE_ENV!=="production"){var{next:S,source:f}=c.makeSubject();p.subscribeToDebugTarget=u=>c.subscribe(u)(f),w=S}var A=tt(t.exchanges),N=c.share(A({client:p,dispatchDebug:w,forward:rt({dispatchDebug:w})})(h.source));return c.publish(N),p},Ae={},Z=q.createContext(Ae),at=Z.Provider;Z.Consumer;Z.displayName="UrqlContext";var ce=()=>{var e=q.useContext(Z);if(e===Ae&&process.env.NODE_ENV!=="production"){var t="No client has been specified using urql's Provider. please create a client and add a Provider.";throw console.error(t),new Error(t)}return e},ie={fetching:!1,stale:!1,hasNext:!1,error:void 0,data:void 0,extensions:void 0,operation:void 0},it=(e,t)=>e===t||!(!e||!t||e.key!==t.key),ee=(e,t)=>{var r={...e,...t,data:t.data!==void 0||t.error?t.data:e.data,fetching:!!t.fetching,stale:!!t.stale};return((n,i)=>{for(var a in n)if(!(a in i))return!0;for(var o in i)if(o==="operation"?!it(n[o],i[o]):n[o]!==i[o])return!0;return!1})(e,r)?r:e},ot=(e,t)=>{for(var r=0,n=t.length;r<n;r++)if(e[r]!==t[r])return!0;return!1},te=q.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function X(e,t){process.env.NODE_ENV!=="production"&&te&&te.ReactCurrentOwner&&te.ReactCurrentOwner.current?Promise.resolve(t).then(e):e(t)}function st(e){var t=q.useRef(!0),r=ce(),[n,i]=q.useState(ie),a=q.useCallback(((o,v)=>(X(i,{...ie,fetching:!0}),c.toPromise(c.take(1)(c.filter((h=>!h.hasNext))(c.onPush((h=>{t.current&&X(i,{fetching:!1,stale:h.stale,data:h.data,error:h.error,extensions:h.extensions,operation:h.operation,hasNext:h.hasNext})}))(r.executeMutation(M(e,o),v||{}))))))),[r,e,i]);return q.useEffect((()=>(t.current=!0,()=>{t.current=!1})),[]),[n,a]}function ut(e,t){var r=q.useRef(void 0);return q.useMemo((()=>{var n=M(e,t);return r.current!==void 0&&r.current.key===n.key?r.current:(r.current=n,n)}),[e,t])}var ct=e=>{if(!e._react){var t=new Set,r=new Map;e.operations$&&c.subscribe((n=>{n.kind==="teardown"&&t.has(n.key)&&(t.delete(n.key),r.delete(n.key))}))(e.operations$),e._react={get:n=>r.get(n),set(n,i){t.delete(n),r.set(n,i)},dispose(n){t.add(n)}}}return e._react},lt=(e,t)=>t&&t.suspense!==void 0?!!t.suspense:e.suspense;function ft(e){var t=ce(),r=ct(t),n=lt(t,e.context),i=ut(e.query,e.variables),a=q.useMemo((()=>{if(e.pause)return null;var m=t.executeQuery(i,{requestPolicy:e.requestPolicy,...e.context});return n?c.onPush((b=>{r.set(i.key,b)}))(m):m}),[r,t,i,n,e.pause,e.requestPolicy,e.context]),o=q.useCallback(((m,b)=>{if(!m)return{fetching:!1};var p=r.get(i.key);if(p){if(b&&p!=null&&"then"in p)throw p}else{var w,S=c.subscribe((A=>{p=A,w&&w(p)}))(c.takeWhile((()=>b&&!w||!p||"hasNext"in p&&p.hasNext))(m));if(p==null&&b){var f=new Promise((A=>{w=A}));throw r.set(i.key,f),f}else S.unsubscribe()}return p||{fetching:!0}}),[r,i]),v=[t,i,e.requestPolicy,e.context,e.pause],[h,k]=q.useState((()=>[a,ee(ie,o(a,n)),v])),y=h[1];a!==h[0]&&ot(h[2],v)&&k([a,y=ee(h[1],o(a,n)),v]),q.useEffect((()=>{var m=h[0],b=h[2][1],p=!1,w=f=>{p=!0,X(k,(A=>{var N=ee(A[1],f);return A[1]!==N?[A[0],N,A[2]]:A}))};if(m){var S=c.subscribe(w)(c.onEnd((()=>{w({fetching:!1})}))(m));return p||w({fetching:!0}),()=>{r.dispose(b.key),S.unsubscribe()}}else w({fetching:!1})}),[r,h[0],h[2][1]]);var O=q.useCallback((m=>{var b={requestPolicy:e.requestPolicy,...e.context,...m};X(k,(p=>[n?c.onPush((w=>{r.set(i.key,w)}))(t.executeQuery(i,b)):t.executeQuery(i,b),p[1],v]))}),[t,r,i,n,e.requestPolicy,e.context,e.pause]);return[y,O]}var re=(e,t)=>K(e.kind,e,{...e.context,authAttempt:t});function dt(e){return({client:t,forward:r})=>{var n=new Set,i=c.makeSubject(),a=c.makeSubject(),o=new Map;function v(){k=void 0;var O=o;o=new Map,O.forEach(i.next)}function h(O){k=void 0;var m=o;o=new Map,m.forEach((b=>{a.next(Oe(b,O))}))}var k,y=null;return O=>{function m(){k=Promise.resolve().then((()=>e({mutate(f,A,N){var u=t.createRequestOperation("mutation",M(f,A),N);return c.toPromise(c.take(1)(c.filter((g=>g.operation.key===u.key&&u.context._instance===g.operation.context._instance))(c.onStart((()=>{var g=p(u);n.add(g.context._instance),i.next(g)}))(S))))},appendHeaders(f,A){var N=typeof f.context.fetchOptions=="function"?f.context.fetchOptions():f.context.fetchOptions||{};return K(f.kind,f,{...f.context,fetchOptions:{...N,headers:{...N.headers,...A}}})}}))).then((f=>{f&&(y=f),v()})).catch((f=>{process.env.NODE_ENV!=="production"&&console.warn("authExchange()’s initialization function has failed, which is unexpected.\nIf your initialization function is expected to throw/reject, catch this error and handle it explicitly.\nUnless this error is handled it’ll be passed onto any `OperationResult` instantly and authExchange() will block further operations and retry.",f),h(f)}))}m();function b(f){o.set(f.key,re(f,!0)),y&&!k&&(k=y.refreshAuth().then(v).catch(h))}function p(f){return y?y.addAuthToOperation(f):f}var w=c.filter(Boolean)(c.map((f=>f.kind==="teardown"?(o.delete(f.key),f):f.context._instance&&n.has(f.context._instance)?f:f.context.authAttempt?p(f):k||!y?(k||m(),o.has(f.key)||o.set(f.key,re(f,!1)),null):(function(N){return!N.context.authAttempt&&y&&y.willAuthError&&y.willAuthError(N)})(f)?(b(f),null):p(re(f,!1))))(c.merge([i.source,O]))),S=r(w);return c.merge([a.source,c.filter((f=>!n.has(f.operation.context._instance)&&f.error&&(function(N){return y&&y.didAuthError&&y.didAuthError(N.error,N.operation)})(f)&&!f.operation.context.authAttempt?(b(f.operation),!1):(n.has(f.operation.context._instance)&&n.delete(f.operation.context._instance),!0)))(S)])}}}exports.C=nt;exports.authExchange=dt;exports.f=at;exports.fetchExchange=et;exports.useClient=ce;exports.useMutation=st;exports.useQuery=ft;
@@ -1,4 +1,4 @@
1
- import { S as he, T as V, U as Me, V as W, W as $, X as Y, Y as $e, Z as pe, $ as ne, a0 as qe, a1 as Le, a2 as L, a3 as _e, a4 as ke, a5 as le, a6 as B, a7 as oe, a8 as Ve, a9 as Qe } from "./vendor-BvxNWBst.js";
1
+ import { o as he, f as V, a as Me, m as W, s as $, b as Y, p as $e, t as pe, d as ne, e as qe, l as Le, g as L, h as _e, i as ke, k as le, n as B, q as oe, r as Ve, v as Qe } from "./vendor-CoDHTSgb.js";
2
2
  import * as q from "react";
3
3
  var Pe = {
4
4
  OPERATION_DEFINITION: "OperationDefinition"
@@ -192,7 +192,7 @@ function Ie(e) {
192
192
  return s++, k(), r;
193
193
  }
194
194
  }
195
- function T(e) {
195
+ function R(e) {
196
196
  if (c.charCodeAt(s) === 64) {
197
197
  var r = [];
198
198
  do
@@ -230,9 +230,9 @@ function Ue() {
230
230
  function H() {
231
231
  if (c.charCodeAt(s++) !== 123)
232
232
  throw S("SelectionSet");
233
- return k(), X();
233
+ return k(), K();
234
234
  }
235
- function X() {
235
+ function K() {
236
236
  var e = [];
237
237
  do
238
238
  if (c.charCodeAt(s) === 46) {
@@ -243,7 +243,7 @@ function X() {
243
243
  e.push({
244
244
  kind: "InlineFragment",
245
245
  typeCondition: void 0,
246
- directives: T(!1),
246
+ directives: R(!1),
247
247
  selectionSet: H()
248
248
  });
249
249
  break;
@@ -254,12 +254,12 @@ function X() {
254
254
  kind: "NamedType",
255
255
  name: _()
256
256
  },
257
- directives: T(!1),
257
+ directives: R(!1),
258
258
  selectionSet: H()
259
259
  })) : e.push({
260
260
  kind: "FragmentSpread",
261
261
  name: _(),
262
- directives: T(!1)
262
+ directives: R(!1)
263
263
  });
264
264
  break;
265
265
  case 123:
@@ -267,21 +267,21 @@ function X() {
267
267
  kind: "InlineFragment",
268
268
  typeCondition: void 0,
269
269
  directives: void 0,
270
- selectionSet: X()
270
+ selectionSet: K()
271
271
  });
272
272
  break;
273
273
  default:
274
274
  e.push({
275
275
  kind: "FragmentSpread",
276
276
  name: _(),
277
- directives: T(!1)
277
+ directives: R(!1)
278
278
  });
279
279
  }
280
280
  } else {
281
281
  var r = _(), t = void 0;
282
282
  c.charCodeAt(s) === 58 && (s++, k(), t = r, r = _());
283
- var a = Ie(!1), i = T(!1), n = void 0;
284
- c.charCodeAt(s) === 123 && (s++, k(), n = X()), e.push({
283
+ var a = Ie(!1), i = R(!1), n = void 0;
284
+ c.charCodeAt(s) === 123 && (s++, k(), n = K()), e.push({
285
285
  kind: "Field",
286
286
  alias: t,
287
287
  name: r,
@@ -318,7 +318,7 @@ function ze() {
318
318
  },
319
319
  type: a,
320
320
  defaultValue: i,
321
- directives: T(!0)
321
+ directives: R(!0)
322
322
  };
323
323
  r && (n.description = r), e.push(n);
324
324
  } while (c.charCodeAt(s) !== 41);
@@ -337,7 +337,7 @@ function We(e) {
337
337
  kind: "NamedType",
338
338
  name: _()
339
339
  },
340
- directives: T(!1),
340
+ directives: R(!1),
341
341
  selectionSet: H()
342
342
  };
343
343
  return e && (t.description = e), t;
@@ -355,7 +355,7 @@ function be() {
355
355
  name: void 0,
356
356
  variableDefinitions: void 0,
357
357
  directives: void 0,
358
- selectionSet: X()
358
+ selectionSet: K()
359
359
  });
360
360
  } else {
361
361
  var t = ye();
@@ -373,7 +373,7 @@ function be() {
373
373
  operation: t,
374
374
  name: i,
375
375
  variableDefinitions: ze(),
376
- directives: T(!1),
376
+ directives: R(!1),
377
377
  selectionSet: H()
378
378
  };
379
379
  r && (n.description = r), e.push(n);
@@ -416,7 +416,7 @@ function D(e, r, t) {
416
416
  function He(e) {
417
417
  return JSON.stringify(e);
418
418
  }
419
- function Xe(e) {
419
+ function Ke(e) {
420
420
  return `"""
421
421
  ` + e.replace(/"""/g, '\\"""') + `
422
422
  """`;
@@ -443,7 +443,7 @@ var P = `
443
443
  return e.directives && e.directives.length && (r += " " + D(e.directives, " ", N.Directive)), e.selectionSet && e.selectionSet.selections.length && (r += " " + N.SelectionSet(e.selectionSet)), r;
444
444
  },
445
445
  StringValue(e) {
446
- return e.block ? Xe(e.value).replace(/\n/g, P) : He(e.value);
446
+ return e.block ? Ke(e.value).replace(/\n/g, P) : He(e.value);
447
447
  },
448
448
  BooleanValue: (e) => "" + e.value,
449
449
  NullValue: (e) => "null",
@@ -483,14 +483,14 @@ var P = `
483
483
  ListType: (e) => "[" + I(e.type) + "]",
484
484
  NonNullType: (e) => I(e.type) + "!"
485
485
  }, I = (e) => N[e.kind](e);
486
- function Ze(e) {
486
+ function Xe(e) {
487
487
  return P = `
488
488
  `, N[e.kind] ? N[e.kind](e) : "";
489
489
  }
490
- var Ke = (e) => e && typeof e.message == "string" && (e.extensions || e.name === "GraphQLError") ? e : typeof e == "object" && typeof e.message == "string" ? new fe(e.message, e.nodes, e.source, e.positions, e.path, e, e.extensions || {}) : new fe(e);
490
+ var Ze = (e) => e && typeof e.message == "string" && (e.extensions || e.name === "GraphQLError") ? e : typeof e == "object" && typeof e.message == "string" ? new fe(e.message, e.nodes, e.source, e.positions, e.path, e, e.extensions || {}) : new fe(e);
491
491
  class me extends Error {
492
492
  constructor(r) {
493
- var t = (r.graphQLErrors || []).map(Ke), a = ((i, n) => {
493
+ var t = (r.graphQLErrors || []).map(Ze), a = ((i, n) => {
494
494
  var o = "";
495
495
  if (i)
496
496
  return `[Network] ${i.message}`;
@@ -510,8 +510,8 @@ var U = (e, r) => {
510
510
  for (var t = 0 | (r || 5381), a = 0, i = 0 | e.length; a < i; a++)
511
511
  t = (t << 5) + t + e.charCodeAt(a);
512
512
  return t;
513
- }, R = /* @__PURE__ */ new Set(), we = /* @__PURE__ */ new WeakMap(), j = (e, r) => {
514
- if (e === null || R.has(e))
513
+ }, T = /* @__PURE__ */ new Set(), we = /* @__PURE__ */ new WeakMap(), j = (e, r) => {
514
+ if (e === null || T.has(e))
515
515
  return "null";
516
516
  if (typeof e != "object")
517
517
  return JSON.stringify(e) || "";
@@ -521,7 +521,7 @@ var U = (e, r) => {
521
521
  for (var t = "[", a = 0, i = e.length; a < i; a++)
522
522
  t.length > 1 && (t += ","), t += j(e[a], r) || "null";
523
523
  return t += "]";
524
- } else if (!r && (K !== J && e instanceof K || ee !== J && e instanceof ee))
524
+ } else if (!r && (Z !== J && e instanceof Z || ee !== J && e instanceof ee))
525
525
  return "null";
526
526
  var n = Object.keys(e).sort();
527
527
  if (!n.length && e.constructor && Object.getPrototypeOf(e).constructor !== Object.prototype.constructor) {
@@ -530,30 +530,30 @@ var U = (e, r) => {
530
530
  __key: o
531
531
  }, r);
532
532
  }
533
- R.add(e);
533
+ T.add(e);
534
534
  for (var d = "{", v = 0, g = n.length; v < g; v++) {
535
535
  var p = j(e[n[v]], r);
536
536
  p && (d.length > 1 && (d += ","), d += j(n[v], r) + ":" + p);
537
537
  }
538
- return R.delete(e), d += "}";
538
+ return T.delete(e), d += "}";
539
539
  }, de = (e, r, t) => {
540
- if (!(t == null || typeof t != "object" || t.toJSON || R.has(t))) if (Array.isArray(t))
540
+ if (!(t == null || typeof t != "object" || t.toJSON || T.has(t))) if (Array.isArray(t))
541
541
  for (var a = 0, i = t.length; a < i; a++)
542
542
  de(e, `${r}.${a}`, t[a]);
543
- else if (t instanceof K || t instanceof ee)
543
+ else if (t instanceof Z || t instanceof ee)
544
544
  e.set(r, t);
545
545
  else {
546
- R.add(t);
546
+ T.add(t);
547
547
  for (var n in t)
548
548
  de(e, `${r}.${n}`, t[n]);
549
549
  }
550
- }, Z = (e, r) => (R.clear(), j(e, r || !1));
550
+ }, X = (e, r) => (T.clear(), j(e, r || !1));
551
551
  class J {
552
552
  }
553
- var K = typeof File < "u" ? File : J, ee = typeof Blob < "u" ? Blob : J, er = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g, rr = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g, tr = (e, r) => r % 2 == 0 ? e.replace(rr, `
553
+ var Z = typeof File < "u" ? File : J, ee = typeof Blob < "u" ? Blob : J, er = /("{3}[\s\S]*"{3}|"(?:\\.|[^"])*")/g, rr = /(?:#[^\n\r]+)?(?:[\r\n]+|$)/g, tr = (e, r) => r % 2 == 0 ? e.replace(rr, `
554
554
  `) : e, Ae = (e) => e.split(er).map(tr).join("").trim(), Ne = /* @__PURE__ */ new Map(), z = /* @__PURE__ */ new Map(), ge = (e) => {
555
555
  var r;
556
- return typeof e == "string" ? r = Ae(e) : e.loc && z.get(e.__key) === e ? r = e.loc.source.body : (r = Ne.get(e) || Ae(Ze(e)), Ne.set(e, r)), typeof e != "string" && !e.loc && (e.loc = {
556
+ return typeof e == "string" ? r = Ae(e) : e.loc && z.get(e.__key) === e ? r = e.loc.source.body : (r = Ne.get(e) || Ae(Xe(e)), Ne.set(e, r)), typeof e != "string" && !e.loc && (e.loc = {
557
557
  start: 0,
558
558
  end: r.length,
559
559
  source: {
@@ -570,7 +570,7 @@ var K = typeof File < "u" ? File : J, ee = typeof Blob < "u" ? Blob : J, er = /(
570
570
  if (e.documentId)
571
571
  r = U(e.documentId);
572
572
  else if (r = U(ge(e)), e.definitions) {
573
- var t = Te(e);
573
+ var t = Re(e);
574
574
  t && (r = U(`
575
575
  # ${t}`, r));
576
576
  }
@@ -581,14 +581,14 @@ var K = typeof File < "u" ? File : J, ee = typeof Blob < "u" ? Blob : J, er = /(
581
581
  noLocation: !0
582
582
  })) : (r = e.__key || Oe(e), t = z.get(r) || e), t.loc || ge(t), t.__key = r, z.set(r, t), t;
583
583
  }, M = (e, r, t) => {
584
- var a = r || {}, i = ar(e), n = Z(a, !0), o = i.__key;
584
+ var a = r || {}, i = ar(e), n = X(a, !0), o = i.__key;
585
585
  return n !== "{}" && (o = U(n, o)), {
586
586
  key: o,
587
587
  query: i,
588
588
  variables: a,
589
589
  extensions: t
590
590
  };
591
- }, Te = (e) => {
591
+ }, Re = (e) => {
592
592
  for (var r = 0, t = e.definitions.length; r < t; r++) {
593
593
  var a = e.definitions[r];
594
594
  if (a.kind === Pe.OPERATION_DEFINITION)
@@ -678,7 +678,7 @@ var K = typeof File < "u" ? File : J, ee = typeof Blob < "u" ? Blob : J, er = /(
678
678
  hasNext: r.hasNext != null ? r.hasNext : e.hasNext,
679
679
  stale: !1
680
680
  };
681
- }, Re = (e, r, t) => ({
681
+ }, Te = (e, r, t) => ({
682
682
  operation: e,
683
683
  data: void 0,
684
684
  error: new me({
@@ -693,7 +693,7 @@ function or(e) {
693
693
  var r = {
694
694
  query: void 0,
695
695
  documentId: void 0,
696
- operationName: Te(e.query),
696
+ operationName: Re(e.query),
697
697
  variables: e.variables || void 0,
698
698
  extensions: e.extensions
699
699
  };
@@ -706,7 +706,7 @@ var sr = (e, r) => {
706
706
  var a = ur(e.context.url);
707
707
  for (var i in r) {
708
708
  var n = r[i];
709
- n && a[1].set(i, typeof n == "object" ? Z(n) : n);
709
+ n && a[1].set(i, typeof n == "object" ? X(n) : n);
710
710
  }
711
711
  var o = a.join("?");
712
712
  return o.length > 2047 && t !== "force" ? (e.context.preferGetMethod = !1, e.context.url) : o;
@@ -715,13 +715,13 @@ var sr = (e, r) => {
715
715
  return r > -1 ? [e.slice(0, r), new URLSearchParams(e.slice(r + 1))] : [e, new URLSearchParams()];
716
716
  }, cr = (e, r) => {
717
717
  if (r && !(e.kind === "query" && e.context.preferGetMethod)) {
718
- var t = Z(r), a = ((d) => {
718
+ var t = X(r), a = ((d) => {
719
719
  var v = /* @__PURE__ */ new Map();
720
- return (K !== J || ee !== J) && (R.clear(), de(v, "variables", d)), v;
720
+ return (Z !== J || ee !== J) && (T.clear(), de(v, "variables", d)), v;
721
721
  })(r.variables);
722
722
  if (a.size) {
723
723
  var i = new FormData();
724
- i.append("operations", t), i.append("map", Z({
724
+ i.append("operations", t), i.append("map", X({
725
725
  ...[...a.keys()].map(((d) => [d]))
726
726
  }));
727
727
  var n = 0;
@@ -847,7 +847,7 @@ async function* vr(e, r, t) {
847
847
  } catch (p) {
848
848
  if (!a)
849
849
  throw p;
850
- yield Re(e, n && (n.status < 200 || n.status >= 300) && n.statusText ? new Error(n.statusText) : p, n);
850
+ yield Te(e, n && (n.status < 200 || n.status >= 300) && n.statusText ? new Error(n.statusText) : p, n);
851
851
  }
852
852
  }
853
853
  function hr(e, r, t) {
@@ -1225,7 +1225,7 @@ function Dr(e) {
1225
1225
  g = void 0;
1226
1226
  var y = o;
1227
1227
  o = /* @__PURE__ */ new Map(), y.forEach(((x) => {
1228
- n.next(Re(x, w));
1228
+ n.next(Te(x, w));
1229
1229
  }));
1230
1230
  }
1231
1231
  var g, p = null;
package/dist/hooks.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./graphql-vendor-2jHffeBc.cjs"),a=require("react"),i=require("./services.cjs"),u=require("./types.cjs"),L=({url:e,getAuthToken:t})=>new l.C({url:e,requestPolicy:"cache-and-network",exchanges:[l.authExchange(r=>{const n=t();return Promise.resolve({addAuthToOperation(s){return n?r.appendHeaders(s,{Authorization:`Bearer ${n}`}):s},didAuthError:s=>/unauthorized/gi.test(s?.message),refreshAuth:()=>Promise.resolve()})}),l.fetchExchange]}),f=({url:e,getAuthToken:t})=>a.useMemo(()=>L({url:e,getAuthToken:t}),[e,t]),c=e=>{const t=i.getAllAvailableJoints();return a.useMemo(()=>t.filter(r=>r.id==="NavalSpine"||r.id==="ChestSpine"?!1:i.limbsRequiredForJoints[r.id].every(s=>e.includes(s))),[e,t])},m=e=>{const t=a.useMemo(()=>e.map(u.sensorLocationToLimbId).filter(n=>!!n),[e]);return c(t)},d=e=>a.useMemo(()=>{const r=i.getAllAvailableLimbs(),n=e.map(u.sensorLocationToLimbId);return r.filter(s=>n.includes(s.id))},[e]),p=(e,t)=>a.useMemo(()=>e.flatMap(n=>i.getEnabledJointPlanes(n,t).map(s=>({id:{joint:n},plane:s,...i.getDefaultJointRange(n,s)}))),[e,t]),b=(e,t)=>{const r=a.useMemo(()=>{const s=i.getAllAvailableLimbs();return e.filter(o=>s.some(g=>g.id===o))},[e]);return a.useMemo(()=>r.flatMap(s=>i.getEnabledSegmentPlanes(s,t).map(o=>({id:{segment:s},plane:o,...i.getDefaultLimbRange(s,o)}))),[r,t])},h=e=>{const t=d(e),r=m(e),n=p(r.map(o=>o.id),u.AngleDataSource.Sensor),s=b(t.map(o=>o.id),u.AngleDataSource.Sensor);return[...n,...s]};exports.useGraphqlClient=f;exports.useJointsForLimbIds=c;exports.useJointsForSensorLocations=m;exports.useLimbsForSensorLocations=d;exports.usePartOptionsForJoints=p;exports.usePartOptionsForLimbs=b;exports.usePartOptionsForSensorLocations=h;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./graphql-vendor-DRps04BT.cjs"),a=require("react"),i=require("./services.cjs"),u=require("./types.cjs"),L=({url:e,getAuthToken:t})=>new l.C({url:e,requestPolicy:"cache-and-network",exchanges:[l.authExchange(r=>{const n=t();return Promise.resolve({addAuthToOperation(s){return n?r.appendHeaders(s,{Authorization:`Bearer ${n}`}):s},didAuthError:s=>/unauthorized/gi.test(s?.message),refreshAuth:()=>Promise.resolve()})}),l.fetchExchange]}),f=({url:e,getAuthToken:t})=>a.useMemo(()=>L({url:e,getAuthToken:t}),[e,t]),c=e=>{const t=i.getAllAvailableJoints();return a.useMemo(()=>t.filter(r=>r.id==="NavalSpine"||r.id==="ChestSpine"?!1:i.limbsRequiredForJoints[r.id].every(s=>e.includes(s))),[e,t])},m=e=>{const t=a.useMemo(()=>e.map(u.sensorLocationToLimbId).filter(n=>!!n),[e]);return c(t)},d=e=>a.useMemo(()=>{const r=i.getAllAvailableLimbs(),n=e.map(u.sensorLocationToLimbId);return r.filter(s=>n.includes(s.id))},[e]),p=(e,t)=>a.useMemo(()=>e.flatMap(n=>i.getEnabledJointPlanes(n,t).map(s=>({id:{joint:n},plane:s,...i.getDefaultJointRange(n,s)}))),[e,t]),b=(e,t)=>{const r=a.useMemo(()=>{const s=i.getAllAvailableLimbs();return e.filter(o=>s.some(g=>g.id===o))},[e]);return a.useMemo(()=>r.flatMap(s=>i.getEnabledSegmentPlanes(s,t).map(o=>({id:{segment:s},plane:o,...i.getDefaultLimbRange(s,o)}))),[r,t])},h=e=>{const t=d(e),r=m(e),n=p(r.map(o=>o.id),u.AngleDataSource.Sensor),s=b(t.map(o=>o.id),u.AngleDataSource.Sensor);return[...n,...s]};exports.useGraphqlClient=f;exports.useJointsForLimbIds=c;exports.useJointsForSensorLocations=m;exports.useLimbsForSensorLocations=d;exports.usePartOptionsForJoints=p;exports.usePartOptionsForLimbs=b;exports.usePartOptionsForSensorLocations=h;
package/dist/hooks.js CHANGED
@@ -1,4 +1,4 @@
1
- import { C as c, c as d, f as p } from "./graphql-vendor-DZM4vSNi.js";
1
+ import { C as c, c as d, f as p } from "./graphql-vendor-DUv16c0G.js";
2
2
  import { useMemo as i } from "react";
3
3
  import { getAllAvailableJoints as f, limbsRequiredForJoints as b, getAllAvailableLimbs as u, getEnabledJointPlanes as g, getDefaultJointRange as h, getEnabledSegmentPlanes as L, getDefaultLimbRange as A } from "./services.js";
4
4
  import { sensorLocationToLimbId as l, AngleDataSource as a } from "./types.js";
@@ -0,0 +1 @@
1
+ "use strict";const m=require("./other-TR0ap-t4.cjs");var K,Mr;function Fa(){if(Mr)return K;Mr=1;function e(){this.__data__=[],this.size=0}return K=e,K}var V,Gr;function D(){if(Gr)return V;Gr=1;function e(r,t){return r===t||r!==r&&t!==t}return V=e,V}var k,Dr;function L(){if(Dr)return k;Dr=1;var e=D();function r(t,a){for(var n=t.length;n--;)if(e(t[n][0],a))return n;return-1}return k=r,k}var z,Lr;function Ha(){if(Lr)return z;Lr=1;var e=L(),r=Array.prototype,t=r.splice;function a(n){var i=this.__data__,u=e(i,n);if(u<0)return!1;var s=i.length-1;return u==s?i.pop():t.call(i,u,1),--this.size,!0}return z=a,z}var $,Fr;function Ea(){if(Fr)return $;Fr=1;var e=L();function r(t){var a=this.__data__,n=e(a,t);return n<0?void 0:a[n][1]}return $=r,$}var J,Hr;function Ba(){if(Hr)return J;Hr=1;var e=L();function r(t){return e(this.__data__,t)>-1}return J=r,J}var X,Er;function Ua(){if(Er)return X;Er=1;var e=L();function r(t,a){var n=this.__data__,i=e(n,t);return i<0?(++this.size,n.push([t,a])):n[i][1]=a,this}return X=r,X}var W,Br;function F(){if(Br)return W;Br=1;var e=Fa(),r=Ha(),t=Ea(),a=Ba(),n=Ua();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,W=i,W}var Y,Ur;function Na(){if(Ur)return Y;Ur=1;var e=F();function r(){this.__data__=new e,this.size=0}return Y=r,Y}var Z,Nr;function Ka(){if(Nr)return Z;Nr=1;function e(r){var t=this.__data__,a=t.delete(r);return this.size=t.size,a}return Z=e,Z}var Q,Kr;function Va(){if(Kr)return Q;Kr=1;function e(r){return this.__data__.get(r)}return Q=e,Q}var ee,Vr;function ka(){if(Vr)return ee;Vr=1;function e(r){return this.__data__.has(r)}return ee=e,ee}var re,kr;function Ca(){if(kr)return re;kr=1;var e=typeof m.commonjsGlobal=="object"&&m.commonjsGlobal&&m.commonjsGlobal.Object===Object&&m.commonjsGlobal;return re=e,re}var te,zr;function A(){if(zr)return te;zr=1;var e=Ca(),r=typeof self=="object"&&self&&self.Object===Object&&self,t=e||r||Function("return this")();return te=t,te}var ae,$r;function Ra(){if($r)return ae;$r=1;var e=A(),r=e.Symbol;return ae=r,ae}var ne,Jr;function za(){if(Jr)return ne;Jr=1;var e=Ra(),r=Object.prototype,t=r.hasOwnProperty,a=r.toString,n=e?e.toStringTag:void 0;function i(u){var s=t.call(u,n),o=u[n];try{u[n]=void 0;var c=!0}catch{}var f=a.call(u);return c&&(s?u[n]=o:delete u[n]),f}return ne=i,ne}var ie,Xr;function $a(){if(Xr)return ie;Xr=1;var e=Object.prototype,r=e.toString;function t(a){return r.call(a)}return ie=t,ie}var ue,Wr;function H(){if(Wr)return ue;Wr=1;var e=Ra(),r=za(),t=$a(),a="[object Null]",n="[object Undefined]",i=e?e.toStringTag:void 0;function u(s){return s==null?s===void 0?n:a:i&&i in Object(s)?r(s):t(s)}return ue=u,ue}var se,Yr;function T(){if(Yr)return se;Yr=1;function e(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}return se=e,se}var oe,Zr;function Sr(){if(Zr)return oe;Zr=1;var e=H(),r=T(),t="[object AsyncFunction]",a="[object Function]",n="[object GeneratorFunction]",i="[object Proxy]";function u(s){if(!r(s))return!1;var o=e(s);return o==a||o==n||o==t||o==i}return oe=u,oe}var ce,Qr;function Ja(){if(Qr)return ce;Qr=1;var e=A(),r=e["__core-js_shared__"];return ce=r,ce}var fe,et;function Xa(){if(et)return fe;et=1;var e=Ja(),r=(function(){var a=/[^.]+$/.exec(e&&e.keys&&e.keys.IE_PROTO||"");return a?"Symbol(src)_1."+a:""})();function t(a){return!!r&&r in a}return fe=t,fe}var ve,rt;function Wa(){if(rt)return ve;rt=1;var e=Function.prototype,r=e.toString;function t(a){if(a!=null){try{return r.call(a)}catch{}try{return a+""}catch{}}return""}return ve=t,ve}var _e,tt;function Ya(){if(tt)return _e;tt=1;var e=Sr(),r=Xa(),t=T(),a=Wa(),n=/[\\^$.*+?()[\]{}|]/g,i=/^\[object .+?Constructor\]$/,u=Function.prototype,s=Object.prototype,o=u.toString,c=s.hasOwnProperty,f=RegExp("^"+o.call(c).replace(n,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function _(h){if(!t(h)||r(h))return!1;var g=e(h)?f:i;return g.test(a(h))}return _e=_,_e}var he,at;function Za(){if(at)return he;at=1;function e(r,t){return r?.[t]}return he=e,he}var le,nt;function mr(){if(nt)return le;nt=1;var e=Ya(),r=Za();function t(a,n){var i=r(a,n);return e(i)?i:void 0}return le=t,le}var de,it;function Oa(){if(it)return de;it=1;var e=mr(),r=A(),t=e(r,"Map");return de=t,de}var pe,ut;function E(){if(ut)return pe;ut=1;var e=mr(),r=e(Object,"create");return pe=r,pe}var ge,st;function Qa(){if(st)return ge;st=1;var e=E();function r(){this.__data__=e?e(null):{},this.size=0}return ge=r,ge}var be,ot;function en(){if(ot)return be;ot=1;function e(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}return be=e,be}var ye,ct;function rn(){if(ct)return ye;ct=1;var e=E(),r="__lodash_hash_undefined__",t=Object.prototype,a=t.hasOwnProperty;function n(i){var u=this.__data__;if(e){var s=u[i];return s===r?void 0:s}return a.call(u,i)?u[i]:void 0}return ye=n,ye}var qe,ft;function tn(){if(ft)return qe;ft=1;var e=E(),r=Object.prototype,t=r.hasOwnProperty;function a(n){var i=this.__data__;return e?i[n]!==void 0:t.call(i,n)}return qe=a,qe}var Ce,vt;function an(){if(vt)return Ce;vt=1;var e=E(),r="__lodash_hash_undefined__";function t(a,n){var i=this.__data__;return this.size+=this.has(a)?0:1,i[a]=e&&n===void 0?r:n,this}return Ce=t,Ce}var Re,_t;function nn(){if(_t)return Re;_t=1;var e=Qa(),r=en(),t=rn(),a=tn(),n=an();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,Re=i,Re}var Oe,ht;function un(){if(ht)return Oe;ht=1;var e=nn(),r=F(),t=Oa();function a(){this.size=0,this.__data__={hash:new e,map:new(t||r),string:new e}}return Oe=a,Oe}var Te,lt;function sn(){if(lt)return Te;lt=1;function e(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}return Te=e,Te}var je,dt;function B(){if(dt)return je;dt=1;var e=sn();function r(t,a){var n=t.__data__;return e(a)?n[typeof a=="string"?"string":"hash"]:n.map}return je=r,je}var Ae,pt;function on(){if(pt)return Ae;pt=1;var e=B();function r(t){var a=e(this,t).delete(t);return this.size-=a?1:0,a}return Ae=r,Ae}var Ie,gt;function cn(){if(gt)return Ie;gt=1;var e=B();function r(t){return e(this,t).get(t)}return Ie=r,Ie}var Se,bt;function fn(){if(bt)return Se;bt=1;var e=B();function r(t){return e(this,t).has(t)}return Se=r,Se}var me,yt;function vn(){if(yt)return me;yt=1;var e=B();function r(t,a){var n=e(this,t),i=n.size;return n.set(t,a),this.size+=n.size==i?0:1,this}return me=r,me}var Pe,qt;function _n(){if(qt)return Pe;qt=1;var e=un(),r=on(),t=cn(),a=fn(),n=vn();function i(u){var s=-1,o=u==null?0:u.length;for(this.clear();++s<o;){var c=u[s];this.set(c[0],c[1])}}return i.prototype.clear=e,i.prototype.delete=r,i.prototype.get=t,i.prototype.has=a,i.prototype.set=n,Pe=i,Pe}var xe,Ct;function hn(){if(Ct)return xe;Ct=1;var e=F(),r=Oa(),t=_n(),a=200;function n(i,u){var s=this.__data__;if(s instanceof e){var o=s.__data__;if(!r||o.length<a-1)return o.push([i,u]),this.size=++s.size,this;s=this.__data__=new t(o)}return s.set(i,u),this.size=s.size,this}return xe=n,xe}var we,Rt;function ln(){if(Rt)return we;Rt=1;var e=F(),r=Na(),t=Ka(),a=Va(),n=ka(),i=hn();function u(s){var o=this.__data__=new e(s);this.size=o.size}return u.prototype.clear=r,u.prototype.delete=t,u.prototype.get=a,u.prototype.has=n,u.prototype.set=i,we=u,we}var Me,Ot;function Ta(){if(Ot)return Me;Ot=1;var e=mr(),r=(function(){try{var t=e(Object,"defineProperty");return t({},"",{}),t}catch{}})();return Me=r,Me}var Ge,Tt;function Pr(){if(Tt)return Ge;Tt=1;var e=Ta();function r(t,a,n){a=="__proto__"&&e?e(t,a,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[a]=n}return Ge=r,Ge}var De,jt;function ja(){if(jt)return De;jt=1;var e=Pr(),r=D();function t(a,n,i){(i!==void 0&&!r(a[n],i)||i===void 0&&!(n in a))&&e(a,n,i)}return De=t,De}var Le,At;function dn(){if(At)return Le;At=1;function e(r){return function(t,a,n){for(var i=-1,u=Object(t),s=n(t),o=s.length;o--;){var c=s[r?o:++i];if(a(u[c],c,u)===!1)break}return t}}return Le=e,Le}var Fe,It;function pn(){if(It)return Fe;It=1;var e=dn(),r=e();return Fe=r,Fe}var P={exports:{}};P.exports;var St;function gn(){return St||(St=1,(function(e,r){var t=A(),a=r&&!r.nodeType&&r,n=a&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===a,u=i?t.Buffer:void 0,s=u?u.allocUnsafe:void 0;function o(c,f){if(f)return c.slice();var _=c.length,h=s?s(_):new c.constructor(_);return c.copy(h),h}e.exports=o})(P,P.exports)),P.exports}var He,mt;function bn(){if(mt)return He;mt=1;var e=A(),r=e.Uint8Array;return He=r,He}var Ee,Pt;function yn(){if(Pt)return Ee;Pt=1;var e=bn();function r(t){var a=new t.constructor(t.byteLength);return new e(a).set(new e(t)),a}return Ee=r,Ee}var Be,xt;function qn(){if(xt)return Be;xt=1;var e=yn();function r(t,a){var n=a?e(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}return Be=r,Be}var Ue,wt;function Cn(){if(wt)return Ue;wt=1;function e(r,t){var a=-1,n=r.length;for(t||(t=Array(n));++a<n;)t[a]=r[a];return t}return Ue=e,Ue}var Ne,Mt;function Rn(){if(Mt)return Ne;Mt=1;var e=T(),r=Object.create,t=(function(){function a(){}return function(n){if(!e(n))return{};if(r)return r(n);a.prototype=n;var i=new a;return a.prototype=void 0,i}})();return Ne=t,Ne}var Ke,Gt;function On(){if(Gt)return Ke;Gt=1;function e(r,t){return function(a){return r(t(a))}}return Ke=e,Ke}var Ve,Dt;function Aa(){if(Dt)return Ve;Dt=1;var e=On(),r=e(Object.getPrototypeOf,Object);return Ve=r,Ve}var ke,Lt;function Ia(){if(Lt)return ke;Lt=1;var e=Object.prototype;function r(t){var a=t&&t.constructor,n=typeof a=="function"&&a.prototype||e;return t===n}return ke=r,ke}var ze,Ft;function Tn(){if(Ft)return ze;Ft=1;var e=Rn(),r=Aa(),t=Ia();function a(n){return typeof n.constructor=="function"&&!t(n)?e(r(n)):{}}return ze=a,ze}var $e,Ht;function M(){if(Ht)return $e;Ht=1;function e(r){return r!=null&&typeof r=="object"}return $e=e,$e}var Je,Et;function jn(){if(Et)return Je;Et=1;var e=H(),r=M(),t="[object Arguments]";function a(n){return r(n)&&e(n)==t}return Je=a,Je}var Xe,Bt;function Sa(){if(Bt)return Xe;Bt=1;var e=jn(),r=M(),t=Object.prototype,a=t.hasOwnProperty,n=t.propertyIsEnumerable,i=e((function(){return arguments})())?e:function(u){return r(u)&&a.call(u,"callee")&&!n.call(u,"callee")};return Xe=i,Xe}var We,Ut;function ma(){if(Ut)return We;Ut=1;var e=Array.isArray;return We=e,We}var Ye,Nt;function Pa(){if(Nt)return Ye;Nt=1;var e=9007199254740991;function r(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=e}return Ye=r,Ye}var Ze,Kt;function xr(){if(Kt)return Ze;Kt=1;var e=Sr(),r=Pa();function t(a){return a!=null&&r(a.length)&&!e(a)}return Ze=t,Ze}var Qe,Vt;function An(){if(Vt)return Qe;Vt=1;var e=xr(),r=M();function t(a){return r(a)&&e(a)}return Qe=t,Qe}var x={exports:{}},er,kt;function In(){if(kt)return er;kt=1;function e(){return!1}return er=e,er}x.exports;var zt;function xa(){return zt||(zt=1,(function(e,r){var t=A(),a=In(),n=r&&!r.nodeType&&r,i=n&&!0&&e&&!e.nodeType&&e,u=i&&i.exports===n,s=u?t.Buffer:void 0,o=s?s.isBuffer:void 0,c=o||a;e.exports=c})(x,x.exports)),x.exports}var rr,$t;function Sn(){if($t)return rr;$t=1;var e=H(),r=Aa(),t=M(),a="[object Object]",n=Function.prototype,i=Object.prototype,u=n.toString,s=i.hasOwnProperty,o=u.call(Object);function c(f){if(!t(f)||e(f)!=a)return!1;var _=r(f);if(_===null)return!0;var h=s.call(_,"constructor")&&_.constructor;return typeof h=="function"&&h instanceof h&&u.call(h)==o}return rr=c,rr}var tr,Jt;function mn(){if(Jt)return tr;Jt=1;var e=H(),r=Pa(),t=M(),a="[object Arguments]",n="[object Array]",i="[object Boolean]",u="[object Date]",s="[object Error]",o="[object Function]",c="[object Map]",f="[object Number]",_="[object Object]",h="[object RegExp]",g="[object Set]",y="[object String]",q="[object WeakMap]",C="[object ArrayBuffer]",j="[object DataView]",l="[object Float32Array]",U="[object Float64Array]",N="[object Int8Array]",I="[object Int16Array]",R="[object Int32Array]",b="[object Uint8Array]",d="[object Uint8ClampedArray]",G="[object Uint16Array]",p="[object Uint32Array]",v={};v[l]=v[U]=v[N]=v[I]=v[R]=v[b]=v[d]=v[G]=v[p]=!0,v[a]=v[n]=v[C]=v[i]=v[j]=v[u]=v[s]=v[o]=v[c]=v[f]=v[_]=v[h]=v[g]=v[y]=v[q]=!1;function S(O){return t(O)&&r(O.length)&&!!v[e(O)]}return tr=S,tr}var ar,Xt;function Pn(){if(Xt)return ar;Xt=1;function e(r){return function(t){return r(t)}}return ar=e,ar}var w={exports:{}};w.exports;var Wt;function xn(){return Wt||(Wt=1,(function(e,r){var t=Ca(),a=r&&!r.nodeType&&r,n=a&&!0&&e&&!e.nodeType&&e,i=n&&n.exports===a,u=i&&t.process,s=(function(){try{var o=n&&n.require&&n.require("util").types;return o||u&&u.binding&&u.binding("util")}catch{}})();e.exports=s})(w,w.exports)),w.exports}var nr,Yt;function wa(){if(Yt)return nr;Yt=1;var e=mn(),r=Pn(),t=xn(),a=t&&t.isTypedArray,n=a?r(a):e;return nr=n,nr}var ir,Zt;function Ma(){if(Zt)return ir;Zt=1;function e(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}return ir=e,ir}var ur,Qt;function wn(){if(Qt)return ur;Qt=1;var e=Pr(),r=D(),t=Object.prototype,a=t.hasOwnProperty;function n(i,u,s){var o=i[u];(!(a.call(i,u)&&r(o,s))||s===void 0&&!(u in i))&&e(i,u,s)}return ur=n,ur}var sr,ea;function Mn(){if(ea)return sr;ea=1;var e=wn(),r=Pr();function t(a,n,i,u){var s=!i;i||(i={});for(var o=-1,c=n.length;++o<c;){var f=n[o],_=u?u(i[f],a[f],f,i,a):void 0;_===void 0&&(_=a[f]),s?r(i,f,_):e(i,f,_)}return i}return sr=t,sr}var or,ra;function Gn(){if(ra)return or;ra=1;function e(r,t){for(var a=-1,n=Array(r);++a<r;)n[a]=t(a);return n}return or=e,or}var cr,ta;function Ga(){if(ta)return cr;ta=1;var e=9007199254740991,r=/^(?:0|[1-9]\d*)$/;function t(a,n){var i=typeof a;return n=n??e,!!n&&(i=="number"||i!="symbol"&&r.test(a))&&a>-1&&a%1==0&&a<n}return cr=t,cr}var fr,aa;function Dn(){if(aa)return fr;aa=1;var e=Gn(),r=Sa(),t=ma(),a=xa(),n=Ga(),i=wa(),u=Object.prototype,s=u.hasOwnProperty;function o(c,f){var _=t(c),h=!_&&r(c),g=!_&&!h&&a(c),y=!_&&!h&&!g&&i(c),q=_||h||g||y,C=q?e(c.length,String):[],j=C.length;for(var l in c)(f||s.call(c,l))&&!(q&&(l=="length"||g&&(l=="offset"||l=="parent")||y&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||n(l,j)))&&C.push(l);return C}return fr=o,fr}var vr,na;function Ln(){if(na)return vr;na=1;function e(r){var t=[];if(r!=null)for(var a in Object(r))t.push(a);return t}return vr=e,vr}var _r,ia;function Fn(){if(ia)return _r;ia=1;var e=T(),r=Ia(),t=Ln(),a=Object.prototype,n=a.hasOwnProperty;function i(u){if(!e(u))return t(u);var s=r(u),o=[];for(var c in u)c=="constructor"&&(s||!n.call(u,c))||o.push(c);return o}return _r=i,_r}var hr,ua;function Da(){if(ua)return hr;ua=1;var e=Dn(),r=Fn(),t=xr();function a(n){return t(n)?e(n,!0):r(n)}return hr=a,hr}var lr,sa;function Hn(){if(sa)return lr;sa=1;var e=Mn(),r=Da();function t(a){return e(a,r(a))}return lr=t,lr}var dr,oa;function En(){if(oa)return dr;oa=1;var e=ja(),r=gn(),t=qn(),a=Cn(),n=Tn(),i=Sa(),u=ma(),s=An(),o=xa(),c=Sr(),f=T(),_=Sn(),h=wa(),g=Ma(),y=Hn();function q(C,j,l,U,N,I,R){var b=g(C,l),d=g(j,l),G=R.get(d);if(G){e(C,l,G);return}var p=I?I(b,d,l+"",C,j,R):void 0,v=p===void 0;if(v){var S=u(d),O=!S&&o(d),wr=!S&&!O&&h(d);p=d,S||O||wr?u(b)?p=b:s(b)?p=a(b):O?(v=!1,p=r(d,!0)):wr?(v=!1,p=t(d,!0)):p=[]:_(d)||i(d)?(p=b,i(b)?p=y(b):(!f(b)||c(b))&&(p=n(d))):v=!1}v&&(R.set(d,p),N(p,d,U,I,R),R.delete(d)),e(C,l,p)}return dr=q,dr}var pr,ca;function Bn(){if(ca)return pr;ca=1;var e=ln(),r=ja(),t=pn(),a=En(),n=T(),i=Da(),u=Ma();function s(o,c,f,_,h){o!==c&&t(c,function(g,y){if(h||(h=new e),n(g))a(o,c,y,f,s,_,h);else{var q=_?_(u(o,y),g,y+"",o,c,h):void 0;q===void 0&&(q=g),r(o,y,q)}},i)}return pr=s,pr}var gr,fa;function La(){if(fa)return gr;fa=1;function e(r){return r}return gr=e,gr}var br,va;function Un(){if(va)return br;va=1;function e(r,t,a){switch(a.length){case 0:return r.call(t);case 1:return r.call(t,a[0]);case 2:return r.call(t,a[0],a[1]);case 3:return r.call(t,a[0],a[1],a[2])}return r.apply(t,a)}return br=e,br}var yr,_a;function Nn(){if(_a)return yr;_a=1;var e=Un(),r=Math.max;function t(a,n,i){return n=r(n===void 0?a.length-1:n,0),function(){for(var u=arguments,s=-1,o=r(u.length-n,0),c=Array(o);++s<o;)c[s]=u[n+s];s=-1;for(var f=Array(n+1);++s<n;)f[s]=u[s];return f[n]=i(c),e(a,this,f)}}return yr=t,yr}var qr,ha;function Kn(){if(ha)return qr;ha=1;function e(r){return function(){return r}}return qr=e,qr}var Cr,la;function Vn(){if(la)return Cr;la=1;var e=Kn(),r=Ta(),t=La(),a=r?function(n,i){return r(n,"toString",{configurable:!0,enumerable:!1,value:e(i),writable:!0})}:t;return Cr=a,Cr}var Rr,da;function kn(){if(da)return Rr;da=1;var e=800,r=16,t=Date.now;function a(n){var i=0,u=0;return function(){var s=t(),o=r-(s-u);if(u=s,o>0){if(++i>=e)return arguments[0]}else i=0;return n.apply(void 0,arguments)}}return Rr=a,Rr}var Or,pa;function zn(){if(pa)return Or;pa=1;var e=Vn(),r=kn(),t=r(e);return Or=t,Or}var Tr,ga;function $n(){if(ga)return Tr;ga=1;var e=La(),r=Nn(),t=zn();function a(n,i){return t(r(n,i,e),n+"")}return Tr=a,Tr}var jr,ba;function Jn(){if(ba)return jr;ba=1;var e=D(),r=xr(),t=Ga(),a=T();function n(i,u,s){if(!a(s))return!1;var o=typeof u;return(o=="number"?r(s)&&t(u,s.length):o=="string"&&u in s)?e(s[u],i):!1}return jr=n,jr}var Ar,ya;function Xn(){if(ya)return Ar;ya=1;var e=$n(),r=Jn();function t(a){return e(function(n,i){var u=-1,s=i.length,o=s>1?i[s-1]:void 0,c=s>2?i[2]:void 0;for(o=a.length>3&&typeof o=="function"?(s--,o):void 0,c&&r(i[0],i[1],c)&&(o=s<3?void 0:o,s=1),n=Object(n);++u<s;){var f=i[u];f&&a(n,f,u,o)}return n})}return Ar=t,Ar}var Ir,qa;function Wn(){if(qa)return Ir;qa=1;var e=Bn(),r=Xn(),t=r(function(a,n,i){e(a,n,i)});return Ir=t,Ir}var Yn=Wn();const Zn=m.getDefaultExportFromCjs(Yn);exports.merge=Zn;