1 line
5.7 KiB
JavaScript
1 line
5.7 KiB
JavaScript
"use strict";(self.webpackChunkmantis_material_react=self.webpackChunkmantis_material_react||[]).push([[3680],{6604:(t,e,s)=>{s.d(e,{UF6:()=>r});var i=s(99230);function r(t){return(0,i.k5)({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeMiterlimit:"10",strokeWidth:"32",d:"M400 148l-21.12-24.57A191.43 191.43 0 00240 64C134 64 48 150 48 256s86 192 192 192a192.09 192.09 0 00181.07-128"}},{tag:"path",attr:{d:"M464 97.42V208a16 16 0 01-16 16H337.42c-14.26 0-21.4-17.23-11.32-27.31L436.69 86.1C446.77 76 464 83.16 464 97.42z"}}]})(t)}},36687:(t,e,s)=>{s.d(e,{E:()=>j});var i,r,n,o,a,u,l,h,c,p,f,d=s(80045),A=s(9950),v=s(39790),w=s(55149),b=s(64137),m=s(83568),y=s(53167),g=s(15941),k=s(69347),O=s(95732),Q=s(61664);function C(t,e){return t.filter((t=>!e.includes(t)))}var E=(i=new WeakMap,r=new WeakMap,n=new WeakMap,o=new WeakMap,a=new WeakMap,u=new WeakMap,l=new WeakSet,h=new WeakSet,c=new WeakSet,p=new WeakSet,f=new WeakSet,class extends O.Q{constructor(t,e,s){super(),(0,v.A)(this,f),(0,v.A)(this,p),(0,v.A)(this,c),(0,v.A)(this,h),(0,v.A)(this,l),(0,w.A)(this,i,{writable:!0,value:void 0}),(0,w.A)(this,r,{writable:!0,value:void 0}),(0,w.A)(this,n,{writable:!0,value:void 0}),(0,w.A)(this,o,{writable:!0,value:void 0}),(0,w.A)(this,a,{writable:!0,value:void 0}),(0,w.A)(this,u,{writable:!0,value:void 0}),(0,y.A)(this,i,t),(0,y.A)(this,n,[]),(0,y.A)(this,o,[]),(0,m.A)(this,l,M).call(this,[]),this.setQueries(e,s)}onSubscribe(){1===this.listeners.size&&(0,b.A)(this,o).forEach((t=>{t.subscribe((e=>{(0,m.A)(this,p,S).call(this,t,e)}))}))}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,(0,b.A)(this,o).forEach((t=>{t.destroy()}))}setQueries(t,e,s){(0,y.A)(this,n,t),(0,y.A)(this,a,e),g.j.batch((()=>{const t=(0,b.A)(this,o),e=(0,m.A)(this,c,R).call(this,(0,b.A)(this,n));e.forEach((t=>t.observer.setOptions(t.defaultedQueryOptions,s)));const i=e.map((t=>t.observer)),r=i.map((t=>t.getCurrentResult())),a=i.some(((e,s)=>e!==t[s]));(t.length!==i.length||a)&&((0,y.A)(this,o,i),(0,m.A)(this,l,M).call(this,r),this.hasListeners()&&(C(t,i).forEach((t=>{t.destroy()})),C(i,t).forEach((t=>{t.subscribe((e=>{(0,m.A)(this,p,S).call(this,t,e)}))})),(0,m.A)(this,f,q).call(this)))}))}getCurrentResult(){return(0,b.A)(this,u)}getQueries(){return(0,b.A)(this,o).map((t=>t.getCurrentQuery()))}getObservers(){return(0,b.A)(this,o)}getOptimisticResult(t,e){const s=(0,m.A)(this,c,R).call(this,t),i=s.map((t=>t.observer.getOptimisticResult(t.defaultedQueryOptions)));return[i,t=>(0,m.A)(this,h,W).call(this,null!==t&&void 0!==t?t:i,e),()=>s.map(((t,e)=>{const s=i[e];return t.defaultedQueryOptions.notifyOnChangeProps?s:t.observer.trackResult(s)}))]}});function M(t){var e;(0,y.A)(this,r,t),(0,y.A)(this,u,(0,m.A)(this,h,W).call(this,t,null===(e=(0,b.A)(this,a))||void 0===e?void 0:e.combine))}function W(t,e){return e?(0,Q.BH)((0,b.A)(this,u),e(t)):t}function R(t){const e=(0,b.A)(this,o),s=new Map(e.map((t=>[t.options.queryHash,t]))),r=t.map((t=>(0,b.A)(this,i).defaultQueryOptions(t))),n=r.flatMap((t=>{const e=s.get(t.queryHash);return null!=e?[{defaultedQueryOptions:t,observer:e}]:[]})),a=new Set(n.map((t=>t.defaultedQueryOptions.queryHash))),u=r.filter((t=>!a.has(t.queryHash))),l=t=>{const e=(0,b.A)(this,i).defaultQueryOptions(t),s=(0,b.A)(this,o).find((t=>t.options.queryHash===e.queryHash));return null!==s&&void 0!==s?s:new k.$((0,b.A)(this,i),e)},h=u.map((t=>({defaultedQueryOptions:t,observer:l(t)})));return n.concat(h).sort(((t,e)=>r.indexOf(t.defaultedQueryOptions)-r.indexOf(e.defaultedQueryOptions)))}function S(t,e){const s=(0,b.A)(this,o).indexOf(t);-1!==s&&((0,m.A)(this,l,M).call(this,function(t,e,s){const i=t.slice(0);return i[e]=s,i}((0,b.A)(this,r),s,e)),(0,m.A)(this,f,q).call(this))}function q(){g.j.batch((()=>{this.listeners.forEach((t=>{t((0,b.A)(this,r))}))}))}var H=s(15441),L=s(30618),x=s(45904),P=s(80958),U=s(73895);const _=["queries"];function j(t,e){let{queries:s}=t,i=(0,d.A)(t,_);const r=(0,H.jE)(e),n=(0,L.w)(),o=(0,x.h)(),a=A.useMemo((()=>s.map((t=>{const e=r.defaultQueryOptions(t);return e._optimisticResults=n?"isRestoring":"optimistic",e}))),[s,r,n]);a.forEach((t=>{(0,U.tu)(t),(0,P.LJ)(t,o)})),(0,P.wZ)(o);const[u]=A.useState((()=>new E(r,a,i))),[l,h,c]=u.getOptimisticResult(a,i.combine);A.useSyncExternalStore(A.useCallback((t=>n?()=>{}:u.subscribe(g.j.batchCalls(t))),[u,n]),(()=>u.getCurrentResult()),(()=>u.getCurrentResult())),A.useEffect((()=>{u.setQueries(a,i,{listeners:!1})}),[a,i,u]);const p=l.some(((t,e)=>(0,U.EU)(a[e],t)))?l.flatMap(((t,e)=>{const s=a[e];if(s){const e=new k.$(r,s);if((0,U.EU)(s,t))return(0,U.iL)(s,e,o);(0,U.nE)(t,n)&&(0,U.iL)(s,e,o)}return[]})):[];if(p.length>0)throw Promise.all(p);const f=l.find(((t,e)=>{const s=a[e];return s&&(0,P.$1)({result:t,errorResetBoundary:o,throwOnError:s.throwOnError,query:r.getQueryCache().get(s.queryHash)})}));if(null!==f&&void 0!==f&&f.error)throw f.error;return h(c())}},37119:(t,e,s)=>{s.d(e,{p:()=>n});var i=s(464),r=s(2527);const n=(0,i.T7)((function(t){return new r.Control.Zoom(t)}))},48513:(t,e,s)=>{s.d(e,{z:()=>a});var i=s(464),r=s(69995),n=s(2527),o=s(9950);const a=(0,i.wk)((function(t,e){const s=new n.Popup(t,e.overlayContainer);return(0,r.Q)(s,e)}),(function(t,e,s,i){let{position:r}=s;(0,o.useEffect)((function(){const{instance:s}=t;function n(t){t.popup===s&&(s.update(),i(!0))}function o(t){t.popup===s&&i(!1)}return e.map.on({popupopen:n,popupclose:o}),null==e.overlayContainer?(null!=r&&s.setLatLng(r),s.openOn(e.map)):e.overlayContainer.bindPopup(s),function(){var t;e.map.off({popupopen:n,popupclose:o}),null===(t=e.overlayContainer)||void 0===t||t.unbindPopup(),e.map.removeLayer(s)}}),[t,e,i,r])}))},98007:(t,e,s)=>{s.d(e,{ko:()=>r});var i=s(3388);s(9950);function r(){return(0,i.U$)().map}}}]); |